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 |
---|---|---|---|---|---|---|
Simulates testEncoding w/ corrupt data. | @Test
public void testEncodingNegative()
{
byte[] orginalBytes = sensitiveString.getBytes();
byte[] encoded = StateUtils.encode(orginalBytes);
encoded[1] = (byte) 9;
try
{
byte[] decoded = StateUtils.decode(encoded);
Assertions.assertFalse(Arrays.equals(decoded, orginalBytes));
}
catch (Exception e)
{
// do nothing
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\r\n public void testInvalidEncodings() {\r\n assertThatInputIsInvalid(\"NIX\");\r\n assertThatInputIsInvalid(\"UTF-9\");\r\n assertThatInputIsInvalid(\"ISO-8859-42\");\r\n }",
"public void testSetEncoding_Normal() throws Exception {\n ByteArrayOutputStream aos = new ByteArrayOutputStream();\n StreamHandler h = new StreamHandler(aos, new MockFormatter());\n h.setEncoding(\"iso-8859-1\");\n assertEquals(\"iso-8859-1\", h.getEncoding());\n LogRecord r = new LogRecord(Level.INFO, \"\\u6881\\u884D\\u8F69\");\n h.publish(r);\n h.flush();\n\n byte[] bytes = encoder.encode(\n CharBuffer.wrap(\"MockFormatter_Head\" + \"\\u6881\\u884D\\u8F69\"))\n .array();\n assertTrue(Arrays.equals(bytes, aos.toByteArray()));\n }",
"public void testEncoding() throws Exception\r\n {\r\n ComponentDirective result = \r\n (ComponentDirective) executeEncodingTest( m_directive );\r\n assertEquals( \"encoded-equality\", m_directive, result );\r\n }",
"@Test(timeout = 4000)\n public void test04() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray0 = new byte[9];\n defaultNucleotideCodec0.getUngappedLength(byteArray0);\n byteArray0[0] = (byte)60;\n byteArray0[1] = (byte)82;\n byte byte0 = (byte) (-73);\n byteArray0[2] = (byte) (-73);\n byteArray0[3] = (byte)86;\n defaultNucleotideCodec0.iterator(byteArray0);\n byteArray0[4] = (byte)8;\n // Undeclared exception!\n try { \n defaultNucleotideCodec0.decode(byteArray0, 3555L);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // index 3555 corresponds to encodedIndex 1781 encodedglyph length is 9\n //\n verifyException(\"org.jcvi.jillion.core.residue.nt.DefaultNucleotideCodec\", e);\n }\n }",
"@Test\n public void testWriteByteArray() {\n System.out.println(\"writeByteArray\");\n /** Positive testing. */\n String bytes = \"spam\";\n String expResult = \"4:spam\";\n String result = Bencoder.writeByteArray(bytes.getBytes(BConst.ASCII));\n assertEquals(expResult, result);\n bytes = \"\";\n expResult = \"0:\";\n result = Bencoder.writeByteArray(bytes.getBytes(BConst.ASCII));\n assertEquals(expResult, result);\n }",
"@org.junit.Test\n public void coverage()\n {\n new Encodings();\n }",
"public void testSetEncoding_Unsupported() {\n StreamHandler h = new StreamHandler();\n try {\n h.setEncoding(\"impossible\");\n fail(\"Should throw UnsupportedEncodingException!\");\n } catch (UnsupportedEncodingException e) {\n // expected\n }\n assertNull(h.getEncoding());\n }",
"@Test\n\tpublic void test_ReadUtf8String_bad_data() throws IOException {\n\t\tBinaryReader br = br(true, -22, -87, 'A', 0);\n\t\tassertEquals(\"\\ufffdA\" /* unicode replacement char, 'A'*/, br.readUtf8String(0));\n\t}",
"@Test(timeout = 4000)\n public void test12() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray0 = new byte[5];\n byteArray0[0] = (byte) (-3);\n byte byte0 = (byte) (-2);\n defaultNucleotideCodec0.getGappedOffsetFor(byteArray0, 2130);\n Nucleotide nucleotide0 = Nucleotide.NotCytosine;\n Set<Nucleotide> set0 = nucleotide0.getBasesFor();\n byte[] byteArray1 = defaultNucleotideCodec0.encode((Collection<Nucleotide>) set0);\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec1.toString(byteArray1);\n DefaultNucleotideCodec defaultNucleotideCodec2 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray2 = new byte[5];\n byteArray2[0] = (byte) (-2);\n byteArray2[1] = (byte) (-3);\n byteArray2[2] = (byte) (-3);\n byteArray2[3] = (byte) (-3);\n byteArray2[4] = (byte) (-3);\n // Undeclared exception!\n try { \n defaultNucleotideCodec2.toString(byteArray2);\n fail(\"Expecting exception: NegativeArraySizeException\");\n \n } catch(NegativeArraySizeException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"java.lang.AbstractStringBuilder\", e);\n }\n }",
"@Test void test3() {\n\t\tAztecCode marker = new AztecEncoder().\n\t\t\t\taddPunctuation(\"?\").addPunctuation(\"?\").\n\t\t\t\taddUpper(\"ABC\").addUpper(\"CDEF\").\n\t\t\t\taddLower(\"ab\").addLower(\"erf\").fixate();\n\n\t\t// clear the old data\n\t\tclearMarker(marker);\n\n\t\tassertTrue(new AztecDecoder().process(marker));\n\n\t\tassertEquals(\"??ABCCDEFaberf\", marker.message);\n\t\tassertEquals(0, marker.totalBitErrors);\n\t}",
"@Test(expected = UninitializedMessageException.class)\n public void testWriteToNewByteArrayInvalidInput() throws IOException {\n final JunitTestMainObject testObj = JunitTestMainObject.newBuilder().build();\n testObj.toByteArray();\n }",
"@Test(timeout = 4000)\n public void test07() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray0 = new byte[4];\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n Iterator<Nucleotide> iterator0 = defaultNucleotideCodec1.iterator(byteArray0);\n // Undeclared exception!\n try { \n defaultNucleotideCodec0.encode(11, iterator0);\n fail(\"Expecting exception: NoSuchElementException\");\n \n } catch(NoSuchElementException e) {\n //\n // no more elements\n //\n verifyException(\"org.jcvi.jillion.core.residue.nt.DefaultNucleotideCodec$IteratorImpl\", e);\n }\n }",
"@Test\r\n public void testValidEncodings() {\r\n assertThatInputIsValid(\"\");\r\n assertThatInputIsValid(\"UTF8\");\r\n assertThatInputIsValid(\"UTF-8\");\r\n assertThatInputIsValid(\"CP1252\");\r\n assertThatInputIsValid(\"ISO-8859-1\");\r\n assertThatInputIsValid(\"ISO-8859-5\");\r\n assertThatInputIsValid(\"ISO-8859-9\");\r\n }",
"@Test\n void test7BitEncoding() throws Exception {\n ascii_cp1251_lcid1049.guess7BitEncoding();\n ascii_cp1251_lcid1049.setReturnNullOnMissingChunk(true);\n ascii_utf_8_cp1252_lcid1031.guess7BitEncoding();\n ascii_utf_8_cp1252_lcid1031.setReturnNullOnMissingChunk(true);\n ascii_utf_8_cp1252_lcid1031_html.guess7BitEncoding();\n ascii_utf_8_cp1252_lcid1031_html.setReturnNullOnMissingChunk(true);\n htmlbodybinary_cp1251.guess7BitEncoding();\n htmlbodybinary_cp1251.setReturnNullOnMissingChunk(true);\n htmlbodybinary_utf_8.guess7BitEncoding();\n htmlbodybinary_utf_8.setReturnNullOnMissingChunk(true);\n\n assertEquals(\"Subject автоматически Subject\", ascii_cp1251_lcid1049.getSubject());\n assertEquals(\"Body автоматически Body\", ascii_cp1251_lcid1049.getTextBody());\n assertEquals(\"<!DOCTYPE html><html><meta charset=\\\\\\\"windows-1251\\\\\\\"><body>HTML автоматически</body></html>\", ascii_cp1251_lcid1049.getHtmlBody());\n\n assertEquals(\"Subject öäü Subject\", ascii_utf_8_cp1252_lcid1031.getSubject());\n assertEquals(\"Body öäü Body\", ascii_utf_8_cp1252_lcid1031.getTextBody());\n assertNull(ascii_utf_8_cp1252_lcid1031.getHtmlBody());\n\n assertEquals(\"Subject öäü Subject\", ascii_utf_8_cp1252_lcid1031_html.getSubject());\n assertEquals(\"Body öäü Body\", ascii_utf_8_cp1252_lcid1031_html.getTextBody());\n assertEquals(\"<!DOCTYPE html><html><meta charset=\\\\\\\"utf-8\\\\\\\"><body>HTML öäü</body></html>\", ascii_utf_8_cp1252_lcid1031_html.getHtmlBody());\n\n assertEquals(\"Subject öäü Subject\", htmlbodybinary_cp1251.getSubject());\n assertNull(htmlbodybinary_cp1251.getTextBody());\n assertEquals(\"<!DOCTYPE html><html><meta charset=\\\\\\\"utf-8\\\\\\\"><body>HTML автоматически</body></html>\", htmlbodybinary_cp1251.getHtmlBody());\n\n assertEquals(\"Subject öäü Subject\", htmlbodybinary_utf_8.getSubject());\n assertNull(htmlbodybinary_utf_8.getTextBody());\n assertEquals(\"<!DOCTYPE html><html><meta charset=\\\\\\\"utf-8\\\\\\\"><body>HTML öäü</body></html>\", htmlbodybinary_utf_8.getHtmlBody());\n }",
"public void testInvalidTextValueWithBrokenUTF8() throws Exception\n {\n final byte[] input = readResource(\"/data/clusterfuzz-cbor-35979.cbor\");\n try (JsonParser p = MAPPER.createParser(input)) {\n assertToken(JsonToken.VALUE_STRING, p.nextToken());\n p.getText();\n fail(\"Should not pass\");\n } catch (StreamReadException e) {\n verifyException(e, \"Truncated UTF-8 character in Short Unicode Name (36 bytes)\");\n }\n\n }",
"@Test void test1() {\n\t\tAztecCode marker = new AztecEncoder().addUpper(\"C\").addPunctuation(\"!!!\").addDigit(\"0\").addPunctuation(\"!!\").fixate();\n\t\tclearMarker(marker);\n\n\t\tassertTrue(new AztecDecoder().process(marker));\n\n\t\tassertEquals(\"C!!!0!!\", marker.message);\n\t\tassertEquals(0, marker.totalBitErrors);\n\t}",
"public void testSetEncoding_AfterPublish() throws Exception {\n ByteArrayOutputStream aos = new ByteArrayOutputStream();\n StreamHandler h = new StreamHandler(aos, new MockFormatter());\n h.setEncoding(\"iso-8859-1\");\n assertEquals(\"iso-8859-1\", h.getEncoding());\n LogRecord r = new LogRecord(Level.INFO, \"\\u6881\\u884D\\u8F69\");\n h.publish(r);\n h.flush();\n assertTrue(Arrays.equals(aos.toByteArray(), encoder.encode(\n CharBuffer.wrap(\"MockFormatter_Head\" + \"\\u6881\\u884D\\u8F69\"))\n .array()));\n\n h.setEncoding(\"iso8859-1\");\n assertEquals(\"iso8859-1\", h.getEncoding());\n r = new LogRecord(Level.INFO, \"\\u6881\\u884D\\u8F69\");\n h.publish(r);\n h.flush();\n assertFalse(Arrays.equals(aos.toByteArray(), encoder.encode(\n CharBuffer.wrap(\"MockFormatter_Head\" + \"\\u6881\\u884D\\u8F69\"\n + \"testSetEncoding_Normal2\")).array()));\n byte[] b0 = aos.toByteArray();\n byte[] b1 = encoder.encode(\n CharBuffer.wrap(\"MockFormatter_Head\" + \"\\u6881\\u884D\\u8F69\"))\n .array();\n byte[] b2 = encoder.encode(CharBuffer.wrap(\"\\u6881\\u884D\\u8F69\"))\n .array();\n byte[] b3 = new byte[b1.length + b2.length];\n System.arraycopy(b1, 0, b3, 0, b1.length);\n System.arraycopy(b2, 0, b3, b1.length, b2.length);\n assertTrue(Arrays.equals(b0, b3));\n }",
"@Test\n public void testEncode() {\n LOGGER.info(\"testEncode\");\n final String actual = new AtomString().encode();\n final String expected = \"0:\";\n assertEquals(expected, actual);\n }",
"@org.junit.Test\n public void encodeDecode()\n {\n String test = \"just some \\t\\ftes\\rt\\u001B for decoding\\t and...\\n\";\n\n assertEquals(\"encode/decode\", test,\n Encodings.decodeEscapes(Encodings.encodeEscapes(test)));\n assertEquals(\"encode/decode\", \"\",\n Encodings.decodeEscapes(Encodings.encodeEscapes(null)));\n }",
"@Test(timeout = 4000)\n public void test091() throws Throwable {\n try { \n JavaCharStream.hexval('R');\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"public void testSetEncoding_FlushBeforeSetting() throws Exception {\n ByteArrayOutputStream aos = new ByteArrayOutputStream();\n StreamHandler h = new StreamHandler(aos, new MockFormatter());\n LogRecord r = new LogRecord(Level.INFO, \"abcd\");\n h.publish(r);\n assertFalse(aos.toString().indexOf(\"abcd\") > 0);\n h.setEncoding(\"iso-8859-1\");\n assertTrue(aos.toString().indexOf(\"abcd\") > 0);\n }",
"@Test(timeout = 4000)\n public void test088() throws Throwable {\n try { \n JavaCharStream.hexval('U');\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test049() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Invalid escape character at line \");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.Done();\n // Undeclared exception!\n try { \n javaCharStream0.AdjustBuffSize();\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"public void testEncodeableMustBeAEncoderDecoder() {\n }",
"@Test(timeout = 4000)\n public void test084() throws Throwable {\n try { \n JavaCharStream.hexval('Y');\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test012() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.readChar();\n javaCharStream0.readChar();\n try { \n javaCharStream0.FillBuff();\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"@Test void test2() {\n\t\tAztecCode marker = new AztecEncoder().addLower(\"c\").addPunctuation(\"!!\").addMixed(\"^\").addPunctuation(\"!!\").fixate();\n\n\t\tclearMarker(marker);\n\n\t\tassertTrue(new AztecDecoder().process(marker));\n\n\t\tassertEquals(\"c!!^!!\", marker.message);\n\t\tassertEquals(0, marker.totalBitErrors);\n\t}",
"@Test(timeout = 4000)\n public void test096() throws Throwable {\n try { \n JavaCharStream.hexval('M');\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test089() throws Throwable {\n try { \n JavaCharStream.hexval('T');\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"public void testEncodingAndType() throws Exception {\n \t// check default\n \tSampleResult res = new SampleResult();\n \tassertEquals(SampleResult.DEFAULT_ENCODING,res.getDataEncoding());\n \tassertEquals(SampleResult.DEFAULT_ENCODING,res.getDataEncodingWithDefault());\n \tassertEquals(\"DataType should be blank\",\"\",res.getDataType());\n \tassertNull(res.getDataEncodingNoDefault());\n \t\n \t// check null changes nothing\n \tres.setEncodingAndType(null);\n \tassertEquals(SampleResult.DEFAULT_ENCODING,res.getDataEncoding());\n \tassertEquals(SampleResult.DEFAULT_ENCODING,res.getDataEncodingWithDefault());\n \tassertEquals(\"DataType should be blank\",\"\",res.getDataType());\n \tassertNull(res.getDataEncodingNoDefault());\n\n \t// check no charset\n \tres.setEncodingAndType(\"text/html\");\n \tassertEquals(SampleResult.DEFAULT_ENCODING,res.getDataEncoding());\n \tassertEquals(SampleResult.DEFAULT_ENCODING,res.getDataEncodingWithDefault());\n \tassertEquals(\"text\",res.getDataType());\n \tassertNull(res.getDataEncodingNoDefault());\n\n \t// Check unquoted charset\n \tres.setEncodingAndType(\"text/html; charset=aBcd\");\n \tassertEquals(\"aBcd\",res.getDataEncodingWithDefault());\n \tassertEquals(\"aBcd\",res.getDataEncodingNoDefault());\n \tassertEquals(\"aBcd\",res.getDataEncoding());\n \tassertEquals(\"text\",res.getDataType());\n\n \t// Check quoted charset\n \tres.setEncodingAndType(\"text/html; charset=\\\"aBCd\\\"\");\n \tassertEquals(\"aBCd\",res.getDataEncodingWithDefault());\n \tassertEquals(\"aBCd\",res.getDataEncodingNoDefault());\n \tassertEquals(\"aBCd\",res.getDataEncoding());\n \tassertEquals(\"text\",res.getDataType()); \t\n }",
"@Ignore @Test\n public void testEncode() {\n OutputStream[] outStreams = new OutputStream[8];\n for (int i = 0; i<7; i++)\n {\n try {\n outStreams[i] = new FileOutputStream(new File(tmpdir, \"bigRS\" + i));\n } catch (Exception e) {\n }\n \n } \n \n EncoderRS reed = new EncoderRS(5, 3, this.file, outStreams);\n \n reed.encode();\n String[] teste = reed.getPartsHash();\n BufferedOutputStream[] partesSaida = reed.getWriteBufs();\n \n File[] partesEntrada = new File[7];\n \n \n for (int i = 0; i<7; i++)\n {\n try {\n partesEntrada[i] = new File(tmpdir, \"bigRS\" + i);\n } catch (Exception e) {\n }\n \n } \n \n try { \n OutputStream outputStream2 = new FileOutputStream(new File(tmpdir, \"big2RS.pdf\"));\n DecoderRS dreed = new DecoderRS(5, 3, partesEntrada, outputStream2, null);\n dreed.decode();\n String teste2[] = dreed.getPartsHash();\n String testee = dreed.getFileHash();\n \n String rola;\n } catch (Exception e) {\n }\n \n \n \n \n System.out.println(\"E: \" + Monitor.getInstance().getTimeToEncode() + \" D: \" + Monitor.getInstance().getTimeToDecode());\n }",
"@Test(timeout = 4000)\n public void test087() throws Throwable {\n try { \n JavaCharStream.hexval('V');\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test083() throws Throwable {\n try { \n JavaCharStream.hexval('Z');\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"@Test\n public void testEncodeAsBytes() {\n LOGGER.info(\"encodeAsBytes\");\n final AtomString atomString = new AtomString();\n final byte[] actual = atomString.encodeAsBytes();\n final byte[] expected = {0x30, 0x3a};\n assertArrayEquals(expected, actual);\n }",
"@Test(timeout = 4000)\n public void test06() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray0 = new byte[4];\n byteArray0[0] = (byte) (-14);\n // Undeclared exception!\n try { \n defaultNucleotideCodec0.decode(byteArray0, (byte) (-14));\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // index can not be negative: -14\n //\n verifyException(\"org.jcvi.jillion.core.residue.nt.DefaultNucleotideCodec\", e);\n }\n }",
"@Test\n public void test084() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n // Undeclared exception!\n try {\n String string0 = errorPage0.encode(\"%k8|vhOy\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }",
"@Test(timeout = 4000)\n public void test098() throws Throwable {\n try { \n JavaCharStream.hexval('J');\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test094() throws Throwable {\n try { \n JavaCharStream.hexval('O');\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"public void testOneByte () throws IOException\n {\n Stream stream;\n\n stream = new Stream (new ByteArrayInputStream (new byte[] { (byte)0x42 }));\n assertTrue (\"erroneous character\", 0x42 == stream.read ());\n assertTrue (\"erroneous character\", -1 == stream.read ());\n }",
"@Test\r\n public void testEncode() throws Exception {\r\n System.out.println(\"encode\");\r\n String message = \"furkan\";\r\n \r\n HuffmanTree Htree = new HuffmanTree();\r\n\r\n HuffmanTree.HuffData[] symbols = {\r\n new HuffmanTree.HuffData(186, '_'),\r\n new HuffmanTree.HuffData(103, 'e'),\r\n new HuffmanTree.HuffData(80, 't'),\r\n new HuffmanTree.HuffData(64, 'a'),\r\n new HuffmanTree.HuffData(63, 'o'),\r\n new HuffmanTree.HuffData(57, 'i'),\r\n new HuffmanTree.HuffData(57, 'n'),\r\n new HuffmanTree.HuffData(51, 's'),\r\n new HuffmanTree.HuffData(48, 'r'),\r\n new HuffmanTree.HuffData(47, 'h'),\r\n new HuffmanTree.HuffData(32, 'b'),\r\n new HuffmanTree.HuffData(32, 'l'),\r\n new HuffmanTree.HuffData(23, 'u'),\r\n new HuffmanTree.HuffData(22, 'c'),\r\n new HuffmanTree.HuffData(21, 'f'),\r\n new HuffmanTree.HuffData(20, 'm'),\r\n new HuffmanTree.HuffData(18, 'w'),\r\n new HuffmanTree.HuffData(16, 'y'),\r\n new HuffmanTree.HuffData(15, 'g'),\r\n new HuffmanTree.HuffData(15, 'p'),\r\n new HuffmanTree.HuffData(13, 'd'),\r\n new HuffmanTree.HuffData(8, 'v'),\r\n new HuffmanTree.HuffData(5, 'k'),\r\n new HuffmanTree.HuffData(1, 'j'),\r\n new HuffmanTree.HuffData(1, 'q'),\r\n new HuffmanTree.HuffData(1, 'x'),\r\n new HuffmanTree.HuffData(1, 'z')\r\n };\r\n\r\n Htree.buildTree(symbols);\r\n \r\n String expResult = \"1100110000100101100001110100111\";\r\n String result = Htree.encode(message, Htree.huffTree);\r\n \r\n assertEquals(expResult, result);\r\n \r\n }",
"public void testEmpty () throws IOException\n {\n Stream stream;\n\n stream = new Stream (new ByteArrayInputStream (new byte[0]));\n assertTrue (\"erroneous character\", -1 == stream.read ());\n }",
"@Test(timeout = 4000)\n public void test097() throws Throwable {\n try { \n JavaCharStream.hexval('K');\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test086() throws Throwable {\n try { \n JavaCharStream.hexval('W');\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test101() throws Throwable {\n try { \n JavaCharStream.hexval('G');\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test109() throws Throwable {\n try { \n JavaCharStream.hexval('?');\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test043() throws Throwable {\n StringReader stringReader0 = new StringReader(\"s\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n // Undeclared exception!\n try { \n javaCharStream0.ReInit((Reader) stringReader0, (-1), (-1), (-1));\n fail(\"Expecting exception: NegativeArraySizeException\");\n \n } catch(NegativeArraySizeException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test111() throws Throwable {\n try { \n JavaCharStream.hexval('=');\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"public void testCorruptedXMLRecord() throws Exception {\n DIMERecord corruptedXML = null;\n \n // must have valid data.\n String data = new String(xmlRecord.getData());\n corruptedXML = createCorruptRecord(xmlRecord, data.substring(1));\n try {\n createTree(corruptedXML, treeRecord);\n fail(\"expected exception\");\n } catch(IOException expected) {}\n \n // all these must be correct or the stream is bad.\n checkXML(\"file size=\", \"02011981\", false);\n checkXML(\"file size=\", \"abcd\", false);\n checkXML(\"segmentsize=\", \"42\", false);\n checkXML(\"segmentsize=\", \"zef\", false);\n checkXML(\"digest algorithm=\",\n \"http://open-content.net/spec/digest/sha1\", false);\n checkXML(\"outputsize=\", \"20\", false);\n checkXML(\"outputsize=\", \"pizza\", false);\n checkXML(\"type=\", \"http://open-content.net/spec/thex/depthfirst\",\n false);\n\n // depth is not checked heavily.\n checkXML(\"depth=\", \"1982\", true);\n checkXML(\"depth=\", \"large\", true);\n \n // test shareaza's wrong system \n replaceXML(\"SYSTEM\", \"system\", true);\n // require that the main element is called hashtree\n replaceXML(\"hashtree>\", \"random>\", false);\n // allow unknown additional elements\n replaceXML(\"<hashtree>\", \"<hashtree><element attribute=\\\"a\\\"/>\", true);\n // allow elements to have random children.\n replaceXML(\"/></hashtree>\",\n \">info</serializedtree></hashtree>\", true);\n }",
"@Test\n public void encode_whenMessageCantBeParsed_dontWriteToBuffer() throws Exception {\n when(parser.encode(any(StartCommunicationMessage.class))).thenReturn(null);\n\n ByteBuf out = Unpooled.buffer();\n messageFrameEncoder.encode(ctx, new StartCommunicationMessage(), out);\n\n assertFalse(new String(out.array()).contains(\"\\r\\n\"));\n }",
"@Test(timeout = 4000)\n public void test13() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray0 = new byte[9];\n defaultNucleotideCodec0.toString(byteArray0);\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n Nucleotide nucleotide0 = Nucleotide.Pyrimidine;\n Set<Nucleotide> set0 = nucleotide0.getBasesFor();\n byte[] byteArray1 = defaultNucleotideCodec1.encode((Collection<Nucleotide>) set0);\n DefaultNucleotideCodec defaultNucleotideCodec2 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec2.toString(byteArray1);\n defaultNucleotideCodec2.toString(byteArray1);\n // Undeclared exception!\n try { \n defaultNucleotideCodec0.getUngappedOffsetFor((byte[]) null, 12);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"java.nio.ByteBuffer\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test080() throws Throwable {\n try { \n JavaCharStream.hexval(']');\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"@Test\n public void testEncodeDecodeBase64() {\n ///////////////////////////////\n // plaintext=\"Text to convert.\";\n plaintext=\"ABCDEFGHIJKLMNOPQRSTUPVWYZ123456789\";\n /////////////////////////////////\n System.out.println(\"Convert following text: \"+plaintext);\n \n System.out.println(\"::encodeBase64::\");\n \n byte[] plaindata = plaintext.getBytes();\n byte[] tmp = Base64Encoder.encodeBase64(plaindata);\n this.storeEncoding=new String(tmp);\n System.out.println(storeEncoding);\n System.out.println(\"::decodeBase64::\");\n byte[] base64Message = this.storeEncoding.getBytes();\n byte[] expResult = plaindata;\n byte[] result = Base64Encoder.decodeBase64(base64Message);\n String decodedText=new String(result);\n System.out.println(\"Decoded Text: \"+decodedText);\n assertArrayEquals(expResult, result);\n }",
"@Test(timeout = 4000)\n public void test18() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray0 = new byte[9];\n defaultNucleotideCodec0.toString(byteArray0);\n defaultNucleotideCodec0.decodedLengthOf(byteArray0);\n defaultNucleotideCodec0.decodedLengthOf(byteArray0);\n defaultNucleotideCodec0.getUngappedLength(byteArray0);\n Nucleotide nucleotide0 = Nucleotide.Gap;\n Set<Nucleotide> set0 = nucleotide0.getBasesFor();\n byte[] byteArray1 = defaultNucleotideCodec0.encode((Collection<Nucleotide>) set0);\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec1.decode(byteArray0, 0);\n DefaultNucleotideCodec defaultNucleotideCodec2 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray2 = defaultNucleotideCodec2.encode((Collection<Nucleotide>) set0);\n DefaultNucleotideCodec defaultNucleotideCodec3 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec3.toString(byteArray1);\n DefaultNucleotideCodec defaultNucleotideCodec4 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec4.isGap(byteArray0, 1553);\n defaultNucleotideCodec0.getNumberOfGapsUntil(byteArray2, (-3166));\n DefaultNucleotideCodec defaultNucleotideCodec5 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec5.isGap(byteArray0, 75);\n DefaultNucleotideCodec defaultNucleotideCodec6 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray3 = new byte[0];\n // Undeclared exception!\n try { \n defaultNucleotideCodec6.isGap(byteArray3, (-1));\n fail(\"Expecting exception: BufferUnderflowException\");\n \n } catch(BufferUnderflowException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"java.nio.Buffer\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test047() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null, 122, 122, 122);\n // Undeclared exception!\n try { \n javaCharStream0.FillBuff();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test079() throws Throwable {\n try { \n JavaCharStream.hexval('^');\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test099() throws Throwable {\n try { \n JavaCharStream.hexval('I');\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test133() throws Throwable {\n JavaCharStream javaCharStream0 = null;\n try {\n javaCharStream0 = new JavaCharStream((InputStream) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"java.io.Reader\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test112() throws Throwable {\n try { \n JavaCharStream.hexval('<');\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test092() throws Throwable {\n try { \n JavaCharStream.hexval('Q');\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"@Test void byteLarge() {\n\t\tbyte[] data = new byte[100];\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\tdata[i] = (byte)(100 + i);\n\t\t}\n\t\tAztecCode marker = new AztecEncoder().\n\t\t\t\taddUpper(\"A\").addBytes(data, 1, 99).addLower(\"a\").fixate();\n\n\t\t// clear the old data\n\t\tclearMarker(marker);\n\n\t\tassertTrue(new AztecDecoder().process(marker));\n\n\t\tassertEquals('A', marker.message.charAt(0));\n\t\tfor (int i = 1; i < 100; i++) {\n\t\t\tassertEquals(100 + i, (int)marker.message.charAt(i));\n\t\t}\n\t\tassertEquals('a', marker.message.charAt(100));\n\t}",
"@Test(timeout = 4000)\n public void test100() throws Throwable {\n try { \n JavaCharStream.hexval('H');\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"@Test\n\tpublic void testBytesToHexStringForSrcMode() throws Exception {\n//TODO: Test goes here... \n\t}",
"@Test(timeout = 4000)\n public void test095() throws Throwable {\n String string0 = DBUtil.escape(\"Ucb\");\n assertEquals(\"Ucb\", string0);\n }",
"@Test(timeout = 4000)\n public void test095() throws Throwable {\n try { \n JavaCharStream.hexval('N');\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test085() throws Throwable {\n try { \n JavaCharStream.hexval('X');\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"@Test\n public void defaultEncoding() throws SecureCellException {\n String passphrase = \"\\u6697\\u53F7\";\n SecureCell.Seal cellA = SecureCell.SealWithPassphrase(passphrase);\n SecureCell.Seal cellB = SecureCell.SealWithPassphrase(passphrase.getBytes(StandardCharsets.UTF_8));\n byte[] message = \"All your base are belong to us!\".getBytes(StandardCharsets.UTF_8);\n\n byte[] encrypted = cellA.encrypt(message);\n byte[] decrypted = cellB.decrypt(encrypted);\n\n assertArrayEquals(message, decrypted);\n }",
"@Test(timeout = 4000)\n public void test090() throws Throwable {\n try { \n JavaCharStream.hexval('S');\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test054() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 4096, 69, 64);\n // Undeclared exception!\n try { \n javaCharStream0.ReInit((InputStream) null, 64, 64, 98);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"java.io.Reader\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test010() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 754, 65, 0);\n javaCharStream0.backup((-1));\n try { \n javaCharStream0.readChar();\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test081() throws Throwable {\n try { \n JavaCharStream.hexval('\\\\');\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test009() throws Throwable {\n StringReader stringReader0 = new StringReader(\"kE4X 9\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-1), 66, 1279);\n char char0 = javaCharStream0.readChar();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals('k', char0);\n }",
"@Test\n public void testGetBytes() {\n LOGGER.info(\"testGetBytes\");\n final String s = \"Hello\";\n final byte[] expected = s.getBytes(US_ASCII);\n final AtomString atomString1 = new AtomString(s);\n final byte[] actual = atomString1.getBytes();\n assertArrayEquals(expected, actual);\n }",
"@Test(expected=ProtocolDecoderException.class)\n public void sizeLimitDecodeTextFrameFailEarly1() throws Exception {\n ProtocolCodecSessionEx session = new ProtocolCodecSessionEx();\n IoBufferAllocatorEx<?> allocator = session.getBufferAllocator();\n ProtocolDecoder decoder = new WsDraftHixieFrameDecoder(allocator, 20);\n \n int dataSize = 30;\n StringBuffer data = new StringBuffer(dataSize);\n for ( int i=0; i<(dataSize); i++ ) {\n data.append((i%10));\n }\n IoBufferEx in = allocator.wrap(allocator.allocate(dataSize+1))\n .put((byte)0x00)\n .putString(data.toString(), UTF_8.newEncoder())\n .flip();\n // As soon as we sent part of a message that exceeds the limit it should throw the exception\n decoder.decode(session, (IoBuffer) in, session.getDecoderOutput());\n }",
"@Test(timeout = 4000)\n public void test134() throws Throwable {\n FileDescriptor fileDescriptor0 = new FileDescriptor();\n MockFileInputStream mockFileInputStream0 = new MockFileInputStream(fileDescriptor0);\n StringReader stringReader0 = new StringReader(\"qC2NV{I?oox x04%Fm\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.ReInit((InputStream) mockFileInputStream0);\n assertEquals((-1), javaCharStream0.bufpos);\n }",
"@Test\n\tpublic void testJsonEncoding() throws IOException {\n\t\tvalidateEncodingHandling(\"UTF16BE.json\", Charsets.UTF_16BE, \"The\\uD801\\uDC37 Na\\uD834\\uDD1Em\\uD834\\uDD1Ee\\uD801\\uDC37\");\n\t\tvalidateEncodingHandling(\"ISO8859-1.json\", Charsets.ISO_8859_1, \"³ for ?, ¿ for ?\");\n\t\t// Reading ISO8859-1 as UTF8 will result in mapping errors. This is expected and can't be avoided if the wrong encoding has been specified.\n\t\tvalidateEncodingHandling(\"ISO8859-1.json\", Charsets.UTF_8, \"� for ?, � for ?\");\n\t}",
"@Test(timeout = 4000)\n public void test066() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null, 4087, 122, 682);\n javaCharStream0.backup(4087);\n // Undeclared exception!\n try { \n javaCharStream0.BeginToken();\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -3405\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"private void assertParseBadUtf8(MessageLite defaultInstance, byte[] data) throws Exception {\n try {\n defaultInstance.getParserForType().parseFrom(data);\n assertWithMessage(\"Expected InvalidProtocolBufferException for non UTF-8 byte string.\")\n .fail();\n } catch (InvalidProtocolBufferException exception) {\n assertThat(exception).hasMessageThat().isEqualTo(\"Protocol message had invalid UTF-8.\");\n }\n try {\n defaultInstance.newBuilderForType().mergeFrom(data);\n assertWithMessage(\"Expected InvalidProtocolBufferException for non UTF-8 byte string.\")\n .fail();\n } catch (InvalidProtocolBufferException exception) {\n assertThat(exception).hasMessageThat().isEqualTo(\"Protocol message had invalid UTF-8.\");\n }\n try {\n defaultInstance.getParserForType().parseFrom(new ByteArrayInputStream(data));\n assertWithMessage(\"Expected InvalidProtocolBufferException for non UTF-8 byte string.\")\n .fail();\n } catch (InvalidProtocolBufferException exception) {\n assertThat(exception).hasMessageThat().isEqualTo(\"Protocol message had invalid UTF-8.\");\n }\n try {\n defaultInstance.newBuilderForType().mergeFrom(new ByteArrayInputStream(data));\n assertWithMessage(\"Expected InvalidProtocolBufferException for non UTF-8 byte string.\")\n .fail();\n } catch (InvalidProtocolBufferException exception) {\n assertThat(exception).hasMessageThat().isEqualTo(\"Protocol message had invalid UTF-8.\");\n }\n }",
"@Test(timeout = 4000)\n public void test113() throws Throwable {\n try { \n JavaCharStream.hexval(';');\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test011() throws Throwable {\n EvoSuiteFile evoSuiteFile0 = new EvoSuiteFile(\"|O\");\n FileSystemHandling.appendStringToFile(evoSuiteFile0, \"|O\");\n ErrorHandler errorHandler0 = ErrorHandler.getDefault();\n try { \n DBUtil.runScript(\"|O\", \"f[]zOYE\", '1', (Connection) null, true, errorHandler0);\n fail(\"Expecting exception: UnsupportedEncodingException\");\n \n } catch(UnsupportedEncodingException e) {\n }\n }",
"@Test(timeout = 4000)\n public void test044() throws Throwable {\n BufferedInputStream bufferedInputStream0 = new BufferedInputStream((InputStream) null);\n JavaCharStream javaCharStream0 = new JavaCharStream(bufferedInputStream0, 98, (-5023));\n // Undeclared exception!\n try { \n javaCharStream0.ReInit((InputStream) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"java.io.Reader\", e);\n }\n }",
"@Test\n public void testEndianess() throws Exception {\n runEndiannessTest(new TestImageWriter(), 300);\n runEndiannessTest(new TestMultiImageWriter(), 96);\n }",
"@Test(timeout = 4000)\n public void test050() throws Throwable {\n StringReader stringReader0 = new StringReader(\"#2~BM~:kr?{e\");\n JavaCharStream javaCharStream0 = null;\n try {\n javaCharStream0 = new JavaCharStream(stringReader0, (-458), (-458), (-458));\n fail(\"Expecting exception: NegativeArraySizeException\");\n \n } catch(NegativeArraySizeException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"@Test\n public void testBytes() {\n byte[] bytes = new byte[]{ 4, 8, 16, 32, -128, 0, 0, 0 };\n ParseEncoder encoder = PointerEncoder.get();\n JSONObject json = ((JSONObject) (encoder.encode(bytes)));\n ParseDecoder decoder = ParseDecoder.get();\n byte[] bytesAgain = ((byte[]) (decoder.decode(json)));\n Assert.assertEquals(8, bytesAgain.length);\n Assert.assertEquals(4, bytesAgain[0]);\n Assert.assertEquals(8, bytesAgain[1]);\n Assert.assertEquals(16, bytesAgain[2]);\n Assert.assertEquals(32, bytesAgain[3]);\n Assert.assertEquals((-128), bytesAgain[4]);\n Assert.assertEquals(0, bytesAgain[5]);\n Assert.assertEquals(0, bytesAgain[6]);\n Assert.assertEquals(0, bytesAgain[7]);\n }",
"@Test\n public void testHexAndBytesTransformation() {\n byte[] bytes = ByteUtils.stringToBytes(ByteUtils.bytesToHexString(testBytes));\n assertArrayEquals(testBytes, bytes); \n }",
"@Test(timeout = 4000)\n public void test082() throws Throwable {\n try { \n JavaCharStream.hexval('[');\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test17() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray0 = new byte[9];\n defaultNucleotideCodec0.toString(byteArray0);\n defaultNucleotideCodec0.decodedLengthOf(byteArray0);\n defaultNucleotideCodec0.decodedLengthOf(byteArray0);\n defaultNucleotideCodec0.getUngappedLength(byteArray0);\n Nucleotide nucleotide0 = Nucleotide.Gap;\n Set<Nucleotide> set0 = nucleotide0.getBasesFor();\n byte[] byteArray1 = defaultNucleotideCodec0.encode((Collection<Nucleotide>) set0);\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec1.decode(byteArray0, 0);\n DefaultNucleotideCodec defaultNucleotideCodec2 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray2 = defaultNucleotideCodec2.encode((Collection<Nucleotide>) set0);\n DefaultNucleotideCodec defaultNucleotideCodec3 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec3.toString(byteArray1);\n DefaultNucleotideCodec defaultNucleotideCodec4 = DefaultNucleotideCodec.INSTANCE;\n DefaultNucleotideCodec defaultNucleotideCodec5 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec5.toString(byteArray0);\n DefaultNucleotideCodec defaultNucleotideCodec6 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec6.getNumberOfGapsUntil(byteArray1, 4);\n DefaultNucleotideCodec.values();\n defaultNucleotideCodec1.isGap(byteArray2, 0);\n defaultNucleotideCodec4.getGappedOffsetFor(byteArray1, (-16908803));\n defaultNucleotideCodec0.getNumberOfGapsUntil(byteArray0, 1497825280);\n // Undeclared exception!\n try { \n DefaultNucleotideCodec.valueOf(\"\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.residue.nt.DefaultNucleotideCodec.\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }",
"@Test\n\tpublic void fibonacciEncodingTest() {\n\t\tAssert.assertTrue(ifn.fibonacciEncoding(143).trim().equals(\"01010101011\"));\n\t}",
"@Test\n\tdefault void testAlllowedWriting() {\n\t\tperformStreamTest(stream -> {\n\t\t\tErrorlessTest.run(() -> stream.writeByte((byte) 42, 6));\n\t\t});\n\t}",
"@Test(timeout = 4000)\n public void test093() throws Throwable {\n try { \n JavaCharStream.hexval('P');\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\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}",
"@Test(timeout = 4000)\n public void test126() throws Throwable {\n JavaCharStream javaCharStream0 = null;\n try {\n javaCharStream0 = new JavaCharStream((InputStream) null, (-2365), (-2365));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"java.io.Reader\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test108() throws Throwable {\n try { \n JavaCharStream.hexval('@');\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test124() throws Throwable {\n try { \n JavaCharStream.hexval('/');\n fail(\"Expecting exception: IOException\");\n \n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test014() throws Throwable {\n FileDescriptor fileDescriptor0 = new FileDescriptor();\n MockFileInputStream mockFileInputStream0 = new MockFileInputStream(fileDescriptor0);\n PushbackInputStream pushbackInputStream0 = new PushbackInputStream(mockFileInputStream0);\n JavaCharStream javaCharStream0 = new JavaCharStream(pushbackInputStream0, 0, 0, 0);\n javaCharStream0.ReInit((InputStream) mockFileInputStream0, 4096, 1, 0);\n assertEquals((-1), javaCharStream0.bufpos);\n }",
"@Test(timeout = 4000)\n public void test015() throws Throwable {\n StringReader stringReader0 = new StringReader(\"s\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.FillBuff();\n assertEquals((-1), javaCharStream0.bufpos);\n }",
"protected void reportInvalidInitial(int mask, int outputDecoded) throws IOException\n {\n if (_decodeErrorOffset == 0) {\n if (outputDecoded > 0) {\n _decodeErrorOffset = 1;\n return;\n }\n }\n \n // input (byte) ptr has been advanced by one, by now:\n int bytePos = _byteCount + _inputPtr - 1;\n int charPos = _charCount + outputDecoded + 1;\n\n throw new CharConversionException(String.format(\n \"Invalid UTF-8 start byte 0x%s (at char #%d, byte #%d): check content encoding, does not look like UTF-8\",\n Integer.toHexString(mask), charPos, bytePos));\n }",
"@Test(timeout = 4000)\n public void test139() throws Throwable {\n JavaCharStream javaCharStream0 = null;\n try {\n javaCharStream0 = new JavaCharStream((InputStream) null, (-1057), (-307), (-1057));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"java.io.Reader\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test036() throws Throwable {\n StringReader stringReader0 = new StringReader(\"%%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 6, 1, 6);\n javaCharStream0.backup(4073);\n // Undeclared exception!\n try { \n javaCharStream0.readChar();\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -4067\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"@Test(expected=ProtocolDecoderException.class)\n public void sizeLimitDecodeTextFrameFailEarly2() throws Exception {\n ProtocolCodecSessionEx session = new ProtocolCodecSessionEx();\n IoBufferAllocatorEx<?> allocator = session.getBufferAllocator();\n ProtocolDecoder decoder = new WsDraftHixieFrameDecoder(allocator, 20);\n \n int dataSize = 30;\n StringBuffer data = new StringBuffer(dataSize);\n for ( int i=0; i<(dataSize); i++ ) {\n data.append((i%10));\n }\n IoBufferEx in = allocator.wrap(allocator.allocate(dataSize+1))\n .put((byte)0x00)\n .putString(data.toString(), UTF_8.newEncoder())\n .flip();\n decoder.decode(session, (IoBuffer) in.getSlice(10), session.getDecoderOutput());\n // Now if we send the next 12 bytes that should exceed the limit (first byte is control byte, doesn't count)\n decoder.decode(session, (IoBuffer) in.getSlice(12), session.getDecoderOutput());\n }"
]
| [
"0.6616562",
"0.63718206",
"0.6290098",
"0.6214156",
"0.61656547",
"0.61533695",
"0.61395293",
"0.60663795",
"0.60554016",
"0.60402954",
"0.60177016",
"0.60169655",
"0.60086906",
"0.5975332",
"0.5923769",
"0.59075475",
"0.5884488",
"0.5876406",
"0.58721113",
"0.5868059",
"0.58375484",
"0.5822407",
"0.5812308",
"0.58010846",
"0.5796696",
"0.57657504",
"0.5760962",
"0.5755578",
"0.5748279",
"0.5739828",
"0.5729464",
"0.57214963",
"0.57141864",
"0.57119226",
"0.5696515",
"0.56932527",
"0.5675769",
"0.5674668",
"0.5655384",
"0.5645196",
"0.56361455",
"0.5634649",
"0.5633511",
"0.56301975",
"0.56229705",
"0.56138474",
"0.56096625",
"0.5608981",
"0.5597914",
"0.5591808",
"0.55907977",
"0.5589663",
"0.55874443",
"0.55849355",
"0.55710065",
"0.55686575",
"0.5566801",
"0.5565761",
"0.5565166",
"0.5563759",
"0.5562715",
"0.5559271",
"0.55590373",
"0.5557389",
"0.55511653",
"0.5550778",
"0.55493176",
"0.5547159",
"0.55464",
"0.55457324",
"0.55411446",
"0.55385655",
"0.5537025",
"0.55364877",
"0.5536098",
"0.55338067",
"0.5533759",
"0.5531412",
"0.5515236",
"0.5514721",
"0.5505261",
"0.550472",
"0.5496891",
"0.5495424",
"0.54950523",
"0.54898405",
"0.54870236",
"0.54817605",
"0.5480324",
"0.54788727",
"0.54788727",
"0.54452413",
"0.54322493",
"0.5422721",
"0.5414763",
"0.5414473",
"0.5408431",
"0.5408072",
"0.54033256",
"0.5403159"
]
| 0.71096545 | 0 |
Create a new memory store from the given input file. | public MemoryStore(String filename) throws IOException {
// create a new input stream
FileInputStream input = new FileInputStream(filename);
// create a place to store the words we read in
byte[] b = new byte[4];
// read in the data in the given file
while (input.read(b) != -1) {
if (memory.size() == 1027) {
int foo = 1;
}
// create a word from the 4 bytes
long word = getUnsignedValue(b[0]);
word += getUnsignedValue(b[1]) << 8;
word += getUnsignedValue(b[2]) << 16;
word += getUnsignedValue(b[3]) << 24;
// add the word to our memory store
//memory.add(word);
}
long c;
//00000001 00101010 01000000 00100000
c = (((long) 0x01) << 24) + (((long) 0x2A) << 16) + (((long) 0x40) << 8) + ((long) 0x20);
memory.add(new Long(c));
c = ((long) 0xFC) << 24;
System.out.println(c);
memory.add(new Long(c));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void loadMemory(String inputFile){\n\t\tint pc = 0;\n\t\ttry{\n\t\t\tRandomAccessFile raf = new RandomAccessFile(new File(inputFile),\"rw\");\n\t\t\tString strLine;\n\t\t\tint decimalNumber;\n\t\t\twhile ((strLine = raf.readLine())!=null){\n\t\t\t\tstrLine = strLine.substring(0, 8); //get the first 8 char(hex instruction)\n\t\t\t\tdecimalNumber = new BigInteger(strLine, 16).intValue(); //decode the hex into integer\n\t\t\t\tloadInstructionInMemory(pc, decimalNumber);\n\t\t\t\tpc += 4;\n\t\t\t}\n\t\t\traf.close();\n\t\t}\n\t\tcatch (Exception e){\n\t\t\tSystem.out.println(\"Error:\");\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"public Memory(String file) {\n\t\tfor(int i=0; i < Constants.MEM_SIZE; ++i){\n\t\t\tmemory[i] = 0;\n\t\t}\n\t\tinstructions = new FileProcessor(file).fetchInstructions();\n\t}",
"public static SMFMemoryMeshFilterType create(\n final SMFSchemaIdentifier in_schema,\n final Path in_file)\n {\n return new SMFMemoryMeshFilterMetadataAdd(in_schema, in_file);\n }",
"public static OdbStorage createWithSpecificLocation(final File mvstoreFile) {\n return new OdbStorage(Optional.ofNullable(mvstoreFile), Optional.empty());\n }",
"public InMemoryDictionary(File dictFile) {\n\t\t// TODO: Implement constructor\n\t}",
"public CustomerOrderDataBase(String file) {\r\n this.FILE_NAME = file;\r\n orderInfo = new ArrayList<>(4000000);\r\n console = new Scanner(System.in);\r\n try {\r\n loadFile();\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }",
"private void loadDataFromMemory(String filename){\n shoppingList.clear();\n new ReadFromMemoryAsync(filename, getCurrentContext(), new ReadFromMemoryAsync.AsyncResponse(){\n\n @Override\n public void processFinish(List<ShoppingItem> output) {\n shoppingList.addAll(output);\n sortItems();\n }\n }).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n// for (ShoppingItem item: items) {\n// shoppingList.add(item);\n// }\n// sortItems();\n }",
"Memory() {}",
"static <H, I> TableStore<I, X509Certificate> getTableStore(I localId, X509Certificate localCert, Serializer<I> iSerializer, X509Serializer cSerializer, InputBuffer buf) {\n MyStore<H, I> ret = new MyStore<H, I>();\n ret.put(localId, localCert);\n if (buf != null) {\n // load store from the file\n throw new RuntimeException(\"Persistent version not implemented.\");\n }\n \n return ret;\n }",
"@Override\n protected CheckpointStorageAccess createCheckpointStorage(Path checkpointDir) throws Exception {\n return new MemoryBackendCheckpointStorageAccess(\n new JobID(), checkpointDir, null, DEFAULT_MAX_STATE_SIZE);\n }",
"public static DBMaker openMemory(){\n return new DBMaker();\n }",
"public abstract FlowNodeStorage instantiateStorage(MockFlowExecution exec, File storageDirectory);",
"public InMemoryKeyValueStorage() {\n this(SEGMENT_IDENTIFIER);\n }",
"public static DBMaker openFile(String file){\n DBMaker m = new DBMaker();\n m.location = file;\n return m;\n }",
"protected void loadStore() throws IOException {\n // auto create starting directory if needed\n if (!fileStore.exists()) {\n LOG.debug(\"Creating filestore: {}\", fileStore);\n File parent = fileStore.getParentFile();\n if (parent != null && !parent.exists()) {\n boolean mkdirsResult = parent.mkdirs();\n if (!mkdirsResult) {\n LOG.warn(\"Cannot create the filestore directory at: {}\", parent);\n }\n }\n boolean created = FileUtil.createNewFile(fileStore);\n if (!created) {\n throw new IOException(\"Cannot create filestore: \" + fileStore);\n }\n }\n\n LOG.trace(\"Loading to 1st level cache from state filestore: {}\", fileStore);\n\n cache.clear();\n try (Scanner scanner = new Scanner(fileStore, null, STORE_DELIMITER)) {\n while (scanner.hasNext()) {\n String line = scanner.next();\n int separatorIndex = line.indexOf(KEY_VALUE_DELIMITER);\n String key = line.substring(0, separatorIndex);\n String value = line.substring(separatorIndex + KEY_VALUE_DELIMITER.length());\n cache.put(key, value);\n }\n } catch (IOException e) {\n throw RuntimeCamelException.wrapRuntimeCamelException(e);\n }\n\n LOG.debug(\"Loaded {} to the 1st level cache from state filestore: {}\", cache.size(), fileStore);\n }",
"public InputReader(File file){\n try {\n inputStream = new Scanner(file);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n instantiate();\n assert(invariant());\n }",
"public PlainMemory(String name)\n\t{\n\t\tsuper(name);\n\t\t\t\n\t}",
"public static void createsparse() {\n\t\tmatrix=new int[row][col];\n\t\tString sparseRow=\"\";\n\t\t\n\t\ttry{\n\t Scanner reader = new Scanner(file);\n\t int counter=0;\n\t while(reader.hasNextLine()){\n\t sparseRow=reader.nextLine();\n\t String[] seperatedRow = sparseRow.split(\"\\t\");\n\t for(int i=0;i<seperatedRow.length;i++) {\n\t \t matrix[counter][i]=Integer.parseInt(seperatedRow[i]);\n\t }\n\t counter++;\n\t }\n\t reader.close();\n\t }catch (FileNotFoundException e) {\n\t \t e.printStackTrace();\n\t }\n\t}",
"public static OdbStorage createWithSpecificLocation(\n final NodeDeserializer nodeDeserializer, final File mvstoreFile) {\n return new OdbStorage(Optional.ofNullable(mvstoreFile), Optional.ofNullable(nodeDeserializer));\n }",
"public StorableInput(InputStream stream) {\n Reader r = new BufferedReader(new InputStreamReader(stream));\n fTokenizer = new StreamTokenizer(r);\n fMap = new Vector();\n }",
"public void input(File inputFile){\n instantiateTable();\n try{\n String line = \"\";\n //method to scan certain words between 2 delimiting characters, usually blank lines or white spaces or tabs.\n Scanner read = new Scanner(inputFile).useDelimiter(\"\\\\W+|\\\\n|\\\\r|\\\\t|, \");\n //while there is a next word, keeps reading the file \n while (read.hasNext()){\n line = read.next().toLowerCase();\n LLNodeHash words = new LLNodeHash(line, 1, null);\n add(words);\n }\n read.close();\n }\n catch (FileNotFoundException e){\n System.out.print(\"Not found\");\n e.printStackTrace();\n }\n System.out.println(hashTable.length);\n System.out.println(space());\n System.out.println(loadFactor);\n System.out.println(collisionLength());\n print();\n }",
"public void LoadHexFile(String filename) throws RuntimeException\n {\n int memPtr = 0;\n Yytoken current_token;\n boolean moreLines = true;\n\n int startingAddress;\n String recordType;\n int valueForMemory;\n\n File theFile = new File(filename);\n if (!theFile.exists())\n throw new RuntimeException(Constants.Error(Constants.FILE_NOT_FOUND) + \" \" + filename);\n try\n {\n //Create token stream from input hex-format file\n FileInputStream is = new FileInputStream(theFile);\n Yylex yy = new Yylex(is); //instantiate lexer object\n current_token = yy.yylex(); //advance first token\n while (moreLines)\n {\n if (memPtr >= PROGRAM_MEMORY_SIZE)\n throw new RuntimeException(Constants.Error(Constants.OUT_OF_MEMORY));\n\n if(current_token.m_index == 0)\n {\n //end of file\n moreLines = false;\n }\n else if(current_token.m_index == 1)\n {\n //get starting address\n startingAddress = Integer.parseInt(current_token.m_text);\n current_token = yy.yylex(); //advance lexer\n //get record type information\n if(current_token.m_index != 2)\n {\n //file semantics incorrect (contract breached by assembler)\n throw new RuntimeException(Constants.Error(Constants.INVALID_HEXFILE));\n }\n recordType = current_token.m_text;\n current_token = yy.yylex(); //advance lexer\n\n //depending upon the record type, select record location\n if(recordType.equalsIgnoreCase(\"data record\"))\n {\n //data record: most of the action happens here\n //set memory pointer to startingAddress\n memPtr = startingAddress;\n\n // Load in the current instruction\n valueForMemory = Integer.parseInt(current_token.m_text,16);\n // Swap the nibbles\n valueForMemory = ((valueForMemory & 0xff) << 8) + ((valueForMemory & 0xff00) >> 8);\n this.setProgramMemory(memPtr++,valueForMemory);\n\n current_token = yy.yylex();\n\n //get record and then load record into memory\n while(current_token.m_index == 3)\n {\n //ASSERTION: data records are two bytes long\n //load record into memory\n valueForMemory = Integer.parseInt(current_token.m_text,16);\n // Swap the nibbles\n valueForMemory = ((valueForMemory & 0xff) << 8) + ((valueForMemory & 0xff00) >> 8);\n this.setProgramMemory(memPtr++,valueForMemory);\n current_token = yy.yylex(); //advance lexer\n }\n\n }\n else if(recordType.equalsIgnoreCase(\"end of file record\"))\n {\n //acknowledged end of file approaching\n current_token = yy.yylex(); //advance lexer\n }\n else if(recordType.equalsIgnoreCase(\"extendedSAR\"))\n {\n //extended segment address record\n //limited use in AVR\n current_token = yy.yylex(); //advance lexer\n }\n else if(recordType.equalsIgnoreCase(\"startSAR\"))\n {\n //start of segment address record\n //limited use in AVR\n current_token = yy.yylex(); //advance lexer\n }\n else if(recordType.equalsIgnoreCase(\"extendedLAR\"))\n {\n //extended linear address record\n //use unknown as yet...\n current_token = yy.yylex(); //advance lexer\n }\n else if(recordType.equalsIgnoreCase(\"startLAR\"))\n {\n //start of linear address record\n //use unknown as yet...\n current_token = yy.yylex(); //advance lexer\n }\n }\n else\n {\n //file semantics incorrect (contract breached by assembler)\n throw new RuntimeException(Constants.Error(Constants.INVALID_HEXFILE));\n }\n } // while more lines\n is.close();\n } // try block\n catch (IOException e)\n {\n throw new RuntimeException(Constants.Error(Constants.INVALID_HEXFILE));\n }\n catch (ArrayIndexOutOfBoundsException e)\n {\n //Something VERY BAD happened in the lexer:\n //failed to recognise data in file.\n throw new RuntimeException(Constants.Error(Constants.INVALID_HEXFILE));\n }\n return;\n }",
"MemoryPartition createMemoryPartition();",
"private static Store open(final boolean fragmented) throws DataStoreException {\n final var connector = new StorageConnector(testData());\n if (fragmented) {\n connector.setOption(DataOptionKey.FOLIATION_REPRESENTATION, FoliationRepresentation.FRAGMENTED);\n }\n connector.setOption(OptionKey.GEOMETRY_LIBRARY, GeometryLibrary.ESRI);\n return new Store(null, connector);\n }",
"public MemoryJavaFileManager(M fileManager) {\n super(fileManager);\n classBytes = new HashMap<>();\n }",
"public MemoryEntryInfo createMemoryEntryInfo() {\n\t\tMemoryEntryInfo info = new MemoryEntryInfo(new HashMap<String, Object>(this.info.getProperties()));\n\t\tinfo.getProperties().put(MemoryEntryInfo.FILE_MD5, md5);\n\t\tinfo.getProperties().put(MemoryEntryInfo.FILENAME, fileName);\n\t\tinfo.getProperties().put(MemoryEntryInfo.OFFSET, fileoffs);\n\t\treturn info;\n\t}",
"private void createDeck() {\n FileReader reader = null;\n try {\n try {\n reader = new FileReader(deckInputFile);\n Scanner in = new Scanner(reader);\n \n // read the top line column names of the file\n // e.g. description, size, speed etc.\n String categories = in.nextLine();\n\n // loop through the file line by line, creating a card and adding to the deck\n while (in.hasNextLine()) {\n String values = in.nextLine();\n Card newCard = new Card(categories, values);\n deck.add(newCard);\n }\n } finally {\n if (reader != null) {\n reader.close();\n }\n }\n } catch (IOException e) {\n System.out.print(\"error\");\n }\n }",
"void createNewInstance(String filename)\n {\n iIncomingLobsFactory = new incomingLobsFactory();\n iIncomingLobsFactory.setPackageName(\"com.loadSample\");\n \n // include schemaLocation hint for validation\n iIncomingLobsFactory.setXSDFileName(\"LoadSample.xsd\");\n \n // encoding for output document\n iIncomingLobsFactory.setEncoding(\"UTF8\");\n \n // encoding tag for xml declaration\n iIncomingLobsFactory.setEncodingTag(\"UTF-8\");\n \n // Create the root element in the document using the specified root element name\n iIncomingLobs = (incomingLobs) iIncomingLobsFactory.createRoot(\"incomingLobs\");\n createincomingLobs();\n \n iIncomingLobsFactory.save(filename);\n }",
"public DataBase(String file) throws IOException {\n\t\tdataBase = new RandomAccessFile(file, \"rw\");\n\t\tdataBase.writeBytes(\"FEATURE_ID|FEATURE_NAME|FEATURE_CLASS|STATE_ALPHA|\"\n\t\t\t\t+ \"STATE_NUMERIC|COUNTY_NAME|COUNTY_NUMERIC|PRIMARY_LAT_DMS|PRIM_LONG_DMS|\"\n\t\t\t\t+ \"PRIM_LAT_DEC|PRIM_LONG_DEC|SOURCE_LAT_DMS|SOURCE_LONG_DMS|SOURCE_LAT_DEC|\"\n\t\t\t\t+ \"SOURCE_LONG_DEC|ELEV_IN_M|ELEV_IN_FT|MAP_NAME|DATE_CREATED|DATE_EDITED\\n\");\n\t}",
"public SaveStore(String filename) {\r\n this.filename = filename;\r\n }",
"public static void initializeMemory(){\n\t\tif(memory == null){\n\t\t\tmemory = new TreeMap<String,String>();\n\t\t\tfor(int i=0;i<2048;i++){\n\t\t\t\tmemory.put(Utility.decimalToHex(i, 3), null);\n\t\t\t}\n\t\t\tmemory_fmbv = new int[256];\n\t\t\tfor(int i:memory_fmbv){\n\t\t\t\tmemory_fmbv[i] = 0;\n\t\t\t}\n\t\t}\n\t\tif(diskJobStorage == null){\n\t\t\tdiskJobStorage = new TreeMap<String,DiskSMT>();\n\t\t}\n\t}",
"Object create(File file) throws IOException, SAXException, ParserConfigurationException;",
"@Override\n public StorageOutputStream create(File file) throws IOException {\n\treturn null;\n }",
"public void loadMem(final String filepath) {\r\n loadMem(new File(filepath));\r\n }",
"public MemoryHandler createMemoryHandler ( Handler\t\tdiskFileHandler\r\n\t\t\t\t\t\t\t\t\t\t\t , int \t\trecordNumber\r\n\t\t\t\t\t\t\t\t\t\t\t , Level \tlevelValue\r\n\t\t\t\t\t\t\t\t\t\t\t ) {\r\n\t\t\t\t\r\n\t\tMemoryHandler memoryHandler = null;\r\n\t\t\t\t\r\n\t\ttry {\r\n\t\t\t \t\r\n\t\t\tmemoryHandler = new MemoryHandler(diskFileHandler, recordNumber, levelValue);\r\n\t\t\t\t\t\r\n\t\t} catch (SecurityException e) {\r\n\t\t\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\t \r\n\t\t return memoryHandler;\r\n\t}",
"public void loadMem(final File file) {\r\n TempMem.clearNamdAddresses();\r\n TempMem.setText(Input.loadFile(file));\r\n }",
"public static InputFactory createFileFactory( File uncompressedFile,\n final long offset,\n final long leng )\n throws IOException {\n final File file = uncompressedFile;\n final String logName = file.getName();\n if ( leng <= BlockMappedInput.DEFAULT_BLOCKSIZE * 2 ) {\n logger_.info( \"Will map as single block: \" + logName );\n final int ileng = (int) leng;\n RandomAccessFile raf = new RandomAccessFile( file, \"r\" );\n final FileChannel chan = raf.getChannel();\n return new AbstractInputFactory( true ) {\n public BasicInput createInput( boolean isSeq )\n throws IOException {\n return new SimpleMappedInput( chan, offset, ileng,\n logName );\n }\n };\n }\n else if ( Loader.is64Bit() ) {\n logger_.info( \"Will map as multiple blocks: \" + file );\n RandomAccessFile raf = new RandomAccessFile( file, \"r\" );\n final FileChannel chan = raf.getChannel();\n return new AbstractInputFactory( true ) {\n public BasicInput createInput( boolean isSeq )\n throws IOException {\n return BlockMappedInput\n .createInput( chan, offset, leng, logName, ! isSeq );\n }\n };\n }\n else {\n logger_.info( \"Will read as BufferedFile: \" + file\n + \" (avoid too much mapping on 32-bit OS\" );\n return new AbstractInputFactory( true ) {\n public BasicInput createInput( boolean isSeq )\n throws IOException {\n BufferedFile bf = new BufferedFile( file.getName(), \"r\" );\n return new RandomAccessInput( bf, offset );\n }\n };\n }\n }",
"public Store() {\r\n\t\tsuper();\r\n\t}",
"public PlainMemory(String name,int size)\n\t{\n\t\tsuper(name);\n\t\tsetSize(size);\n\t}",
"@Nonnull\n @Deprecated\n public Store<Raw> open() {\n if (persister == null) {\n persister = new NoopPersister<>();\n }\n InternalStore<Raw, BarCode> internalStore;\n\n if (memCache == null) {\n internalStore = new RealInternalStore<>(fetcher, persister, new NoopParserFunc<Raw, Raw>());\n } else {\n internalStore = new RealInternalStore<>(fetcher, persister, new NoopParserFunc<Raw, Raw>(), memCache);\n }\n return new ProxyStore<>(internalStore);\n\n }",
"public void processMemory()\n {\n try{\n String memory = oReader.readLine();\n int index = 0;\n //adding mememory to and array\n for(int i = 0; i<memory.length()-2; i+=2)\n {\n String hexbyte = memory.substring(i, i+2); //get the byt ein hex\n mem.addEntry(\"0x\"+hexbyte, index, 1);\n index++;\n }\n } catch(IOException e)\n {\n e.printStackTrace();\n }\n }",
"public MyMemory(int size){\n super(size);\n printSize();\n loadMemory(); //loads memory with instructions to be executed during the instruction cycle\n }",
"public Memory() {\n this(false);\n }",
"public void init(String inputFile) \n\t{\t\t\n\t\tif (instance != null)\n\t\t{\n\t\t\ttry {\n\t\t\t\ts = new Scanner(new FileReader(inputFile));\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"\\nnot a valid inputFile\");\n\t\t\t}\n\t\t\t//load mapping of reserved words and special symbols\n\t\t\tLoadCoreValues();\n\t\t\tinstance = new Tokenizer();\n\t\t}\n\t}",
"public RowColStore (int memory_size_in_bytes,String layoutFile)\n\t{\n\t\t/* later -- pass it from paramters */\n\t\tmax_buf_size = memory_size_in_bytes; /* allocated first */\n\n /* create colum Buffer hash table */ \n hybridBufs = new Hashtable<String, String>();\n searchBufs = new Hashtable<String, ByteBuffer>();\n tempBufLong = new Hashtable<String, Long>();\n types = new Hashtable<String, String>();\n\n UndefByte[0] = -1;\n\n /* create buffer first */\n /* read layout file, create each buffer for each line */\n /* key is field_name:type, value is the buf */\n\n try {\n BufferedReader bufferedReader = new BufferedReader(new FileReader(layoutFile));\n String line = bufferedReader.readLine();\n int i = 0;\n while(line !=null){\n String[] keys = line.split(\"\\\\s+\"); //separted by any white space \n if(keys.length == 0) \n continue; // empty line\n ByteBuffer buf = ByteBuffer.allocateDirect(max_buf_size);\n //System.out.println(\"allocate buf \"+max_buf_size +\" for \" + keys);\n for (String k : keys){\n hybridBufs.put(k,line);\n }\n searchBufs.put(line,buf);\n i++;\n line = bufferedReader.readLine();\n }\n } catch (FileNotFoundException e){\n\t\t\tSystem.err.println(\"FileNotFoundException:\"+e.getMessage());\n\t\t\treturn ;\n } catch (IOException e){\n\t\t\tSystem.err.println(\"IOException:\"+e.getMessage());\n\t\t\treturn;\n }\n\t}",
"private void createNewStore(String storeName, Item item) {\n Store storeObj = new Store(storeName, null);\n item.setItemStoreId(storeObj.getStoreId());\n List<Item> itemList = new ArrayList<>();\n itemList.add(item);\n storeObj.setItems(itemList);\n storeList.add(storeObj);\n }",
"private void readFileAndStoreData_(String fileName) {\n In in = new In(fileName);\n int numberOfTeams = in.readInt();\n int teamNumber = 0;\n while (!in.isEmpty()) {\n assignTeam_(in, teamNumber);\n assignTeamInfo_(in, numberOfTeams, teamNumber);\n teamNumber++;\n }\n }",
"LuceneMemoryIndex createLuceneMemoryIndex();",
"public MemoryImpl(int size) {\n\t\tif(size < 1) {\n\t\t\tthrow new IllegalArgumentException(\"Memory size can not be lower than 1!\");\n\t\t}\n\t\tthis.memory = new Object[size];\n\t}",
"public CacheConfig<K, V> setInMemoryFormat(InMemoryFormat inMemoryFormat) {\n this.inMemoryFormat = isNotNull(inMemoryFormat, \"inMemoryFormat\");\n return this;\n }",
"public GridFSInputFile createFile(InputStream in, String filename) {\n\treturn new GridFSInputFile(this, in, filename);\n }",
"public static void populateDB(String fileName) {\n String dataString = Util.readStringFromFile(new File(fileName));\n ParseState parseState = new ParseState(dataString);\n while (parseState.hasMoreLines()) {\n String line = parseState.getNextLine();\n LineParser lineParser = null;\n if (line.matches(\"^objects\\\\s*\\\\{$\")) {\n lineParser = new ObjectLineParser();\n } else if (line.matches(\"^links\\\\s*\\\\{$\")) {\n lineParser = new LinkLineParser();\n } else if (line.matches(\"^attributes\\\\s*\\\\{$\")) {\n lineParser = new AttributeDefLineParser();\n } else if (line.matches(\"^containers\\\\s*\\\\{$\")) {\n lineParser = new ContainerLineParser();\n } else {\n throw new IllegalArgumentException(\"Unknown top-level category: \" + line);\n }\n parseBlock(parseState, lineParser);\n }\n }",
"public Input readFromFile (String fileName) {\n\t\tFileReader fr = null;\n\t\tBufferedReader br = null;\n\t\tString sCurrentLine = \"test\";\n\t\tint numberOfProducts = 0;\n\t\tint numberOfSurveys = 0;\n\t\tList <String> products = new ArrayList<> ();\n\t\tList <String> surveyPrices = new ArrayList<> ();\n\t\tInput input = new Input ();\n\t\t\n\t\ttry {\n\t\t\tfr = new FileReader(fileName);\n\t\t\tbr = new BufferedReader(fr);\n\t\t\tint line = 1;\n\t\t\tboolean isAllProductsAdded = false;\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) {\n\t\t\t\t\n\t\t\t\tif (line == 1 ) {\n\t\t\t\t\tnumberOfProducts = new Integer(sCurrentLine).intValue();\n\t\t\t\t}else {\n\t\t\t\t\tif (products.size() == numberOfProducts) {\n\t\t\t\t\t\tif (numberOfSurveys == 0) {\n\t\t\t\t\t\t\tnumberOfSurveys = new Integer(sCurrentLine).intValue();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsurveyPrices.add(sCurrentLine);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (products.size() < numberOfProducts )\n\t\t\t\t\t\t\tproducts.add(sCurrentLine);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tline++;\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tinput.setNumberOfProducts(numberOfProducts);\n\t\tinput.setNumberofSurveyedPrices(numberOfSurveys);\n\t\tinput.setProducts(products);\n\t\tinput.setSurveys(surveyPrices);\n\t\treturn input;\n\t}",
"public static Graph<Integer,String> fromFile (String fileName) {\n\t\t\r\n\t\tGraph<Integer,String> g = new SparseGraph<Integer,String>();\r\n\t\tFileReader file = null;\r\n\t\ttry {\r\n\t\t\tfile = new FileReader(fileName);\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tSystem.out.print(\"File not found: \" + fileName +\"\\n\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tScanner scan = new Scanner(file);\r\n\r\n\t\twhile (scan.hasNext()){\r\n\t\t\tInteger a = scan.nextInt();\r\n\t\t\tInteger b = scan.nextInt();\r\n\t\t\tg.addEdge(\"e:\"+a+\"-\"+b, a, b);\r\n\t\t}\r\n\t\t\r\n\t\treturn g;\r\n\t}",
"public static KidDatabaseDisk loadFileFromText(String filename, int chunk) {\n\n KidDatabaseDisk result = new KidDatabaseDisk();\n result.fileName = filename;\n try(BufferedReader br = new BufferedReader(new FileReader(filename+\".txt\"))) {\n for (String line; (line = br.readLine()) != null; ) {\n String[] pieces = line.split(\"\\t\");\n result.add(new Kid(pieces[0]));\n result.sequenceLength.add(Integer.parseInt(pieces[1]));\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n result.sequence128db = new RocksDbKlue(filename+\".disk.\"+String.format(\"%02d\", chunk), false);\n return result;\n }",
"public MemoryImpl(int size) {\n\t\tif (size < 0) {\n\t\t\tthrow new IllegalArgumentException(\"The size of the memory should be greater than 0!\");\n\t\t}\n\t\tmemory = new Object[size];\n\t}",
"public Memory() {\r\n init();\n ruletables = new RuleTables(this);\n budgetfunctions = new BudgetFunctions(this);\r\n }",
"public SimpleRuntimeMachine(String fileName) {\n\t\tram = new int[RAM_CAPACITY];\n\t\tprogramStack = new Stack<String>();\n\t\tprocessCommands(fileName);\n\t}",
"private void loadMemory() {\n try {\n File varTmpDir = new File(\"data/\" + brainLocation + \".ser\");\n if (varTmpDir.exists()) {\n FileInputStream fileIn = new FileInputStream(varTmpDir);\n ObjectInputStream in = new ObjectInputStream(fileIn);\n longTermMemory = (HashMap<String, BoardRecord>) in.readObject();\n in.close();\n fileIn.close();\n }\n } catch (IOException i) {\n i.printStackTrace();\n return;\n } catch (ClassNotFoundException c) {\n System.out.println(\"File not found\");\n c.printStackTrace();\n return;\n }\n\n System.out.println(\"RECALLED LONG TERM MEMORIES FROM \" + brainLocation + \": \" + longTermMemory.toString());\n }",
"private void init(String filename){\n // create product cateogries \n // hard coded key-value for this project \n productCategory.addProduct(\"book\", \"books\");\n productCategory.addProduct(\"books\", \"books\");\n productCategory.addProduct(\"chocolate\", \"food\");\n productCategory.addProduct(\"chocolates\", \"food\");\n productCategory.addProduct(\"pills\", \"medical\");\n \n // read input\n parser.readInput(filename);\n \n // addProducts\n try {\n this.addProducts(parser.getRawData());\n } catch (Exception e) {\n System.out.println(\"Check input integrity\");\n }\n \n this.generateReceipt();\n\n }",
"private void load(FileInputStream input) {\n\t\t\r\n\t}",
"private void setUp(String file) {\n unorderedList = new LinkedList<>();\n orderedList = new SortedLinkedList<>();\n\n try {\n input = new Scanner(new BufferedReader(new FileReader(file)));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }",
"public void loadMemory() {\n Converter c = new Converter(); //object to help with binary to decimal conversions and vice-versa\n \n int midpoint = (int) Math.floor(size/2); //divide memory into two haves\n \n //variables that will be needed\n int opcode;\n int address = midpoint;\n int index=0;\n\n //Initial instructions\n opcode = c.convertDecToBin(3); //0011\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //load AC from stdin\n Memory.memloc.set(index, instruction); //saving instruction to memory\n\n opcode = c.convertDecToBin(7); //0111;\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //store AC to stdout\n Memory.memloc.set(index+1, instruction);\n\n opcode = c.convertDecToBin(2); //0010\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //store AC to memory\n Memory.memloc.set(index+2, instruction); //saving instruction to memory\n\n opcode = c.convertDecToBin(3); //0011\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //load AC from stdin\n Memory.memloc.set(index+3, instruction); //saving instruction to memory\n\n opcode = c.convertDecToBin(2); //0010\n instruction = new Instruction(opcode, c.convertDecToBin(address+1)); //store AC to memory\n Memory.memloc.set(index+4, instruction); //saving instruction to memory\n\n\n //The rest of the instructions\n for (int i = 5; i < midpoint; i = i + 6) {\n index = i;\n\n if ((index + 5) < midpoint-1) { //if index + 5 is not greater than the midpoint-1\n\n opcode = c.convertDecToBin(1); //0001\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //load AC from memory\n Memory.memloc.set(index, instruction); //saving instruction to memory\n \n opcode = c.convertDecToBin(5); //0101;\n address++;\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //add to AC from memory\n Memory.memloc.set(index + 1, instruction);\n\n opcode = c.convertDecToBin(7); //0111;\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //store AC to stdout\n Memory.memloc.set(index + 2, instruction);\n\n opcode = c.convertDecToBin(2); //0010;\n address++;\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //store AC to memory\n Memory.memloc.set(index + 3, instruction);\n\n opcode = c.convertDecToBin(4); //0100;\n address--;\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //subtract from AC from memory\n Memory.memloc.set(index + 4, instruction);\n\n opcode = c.convertDecToBin(2); //0010;\n address = address + 2;\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //store AC to memory\n Memory.memloc.set(index + 5, instruction);\n\n address--;\n } \n }\n\n //Loading the final intsruction in memory\n opcode = c.convertDecToBin(15); //1111;\n address++;\n instruction = new Instruction(opcode, c.convertDecToBin(address)); //halt\n Memory.memloc.set(index++, instruction);\n\n\n }",
"public SampleMemory(int size) {\n this.memory = new double[size];\n this.pointer = 0;\n }",
"public MxNDArray create(Pointer handle, SparseFormat fmt) {\n return new MxNDArray(this, handle, fmt);\n }",
"public Store() {\n }",
"public FileDatabase(String filename) throws IOException {\n\t\tdatabase = new File(filename);\n\t\tread();\n\t}",
"public FileStorage(File path) {\n dataFolder = path;\n }",
"public Storage(String filePath) {\n File file = new File(filePath);\n this.file = file;\n }",
"Matrix(File myFile)\n\t{\n\t\tScanner sc = null;\n\t\ttry \n\t\t{\n\t\t\tsc = new Scanner(myFile);\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\trows = Integer.parseInt(sc.nextLine());\n\t\tcols = Integer.parseInt(sc.nextLine());\n\t\tA = new double[rows][cols+1];\n\t\tfor(int i = 0; i < rows; i++)\n\t\t{\n\t\t\tint j = 0;\n\t\t\tfor(j = 0; j < cols; j++)\n\t\t\t{\n\t\t\t\tA[i][j] = sc.nextDouble();\n\t\t\t}\n\t\t\t//A[i][j] = sc.nextDouble();\n\t\t}\n\t\tfor(int i = 0; i < rows; i++)\n\t\t{\n\t\t\tA[i][cols] = sc.nextDouble();\n\t\t}\n\t\tisFree = new boolean[cols];\n\t}",
"public static void store() {\r\n//\t\tSystem.out.println(\"mar\"+readMAR().getStr());\r\n\t\tString mar = new String(readMAR().getStr());\r\n\t\tTraceINF.write(\"Write memory \"+mar);\r\n\t\tFormatstr content = new Formatstr();\r\n\t\t\r\n\t\tcontent = readMBR();\r\n\t\tgetBank(mar)[Integer.parseInt(mar.substring(0, mar.length() - 2), 2)] = content.getStr();\r\n\t\tTraceINF.write(\"Write finished.\");\r\n\t}",
"public PersistReader(final PersistenceLocation location) {\r\n\t\tthis.fileInput = location.createInputStream();\r\n\t\tthis.in = new ReadXML(this.fileInput);\r\n\t}",
"private Memory memory(Expression expression, cat.footoredo.mx.type.Type type) {\n return new Memory(asmType(type), expression);\n }",
"private void setMaze(File inputFile) throws FileNotFoundException{\r\n Scanner readFile= new Scanner(inputFile);\r\n int index=0;\r\n String line;\r\n mazeData= new char[mazeWidth][mazeHeight];\r\n\r\n while(readFile.hasNextLine()){\r\n line= readFile.nextLine();\r\n for(int i=0;i<line.length();i++)\r\n mazeData[i][index] = line.charAt(i);\r\n index++;\r\n }\r\n readFile.close();\r\n }",
"public Maze(File inputFile) throws IllegalStateException\r\n , FileNotFoundException {\r\n\r\n this.checkMaze(inputFile);\r\n this.calculateMaze(inputFile);\r\n this.setMaze(inputFile);\r\n }",
"public MemoryTest()\n {\n }",
"TransactionStore createTransactionStore() throws IOException;",
"public Interpreter(String fileName) throws FileNotFoundException {\n super(fileName);\n instructionsStack.push(new ArrayList<>());\n }",
"private static void populateDataStructures(\r\n final String filename,\r\n final Map<String, List<String>> sessionsFromCustomer,\r\n Map<String, List<View>> viewsFromSessions,\r\n Map<String, List<Buy>> buysFromSessions\r\n\r\n /* add parameters as needed */\r\n )\r\n throws FileNotFoundException\r\n {\r\n try (Scanner input = new Scanner(new File(filename)))\r\n {\r\n processFile(input, sessionsFromCustomer,\r\n viewsFromSessions, buysFromSessions\r\n /* add arguments as needed */ );\r\n }\r\n }",
"public void setMemoryEntries(MemoryEntry[] inMemory);",
"Storage(String filepath) {\n this.filepath = filepath;\n tasks = new ArrayList<>();\n parser = new Parser();\n }",
"public static StoreChunkOperation read(\n\t\tBinaryDataInput in\n\t)\n\t\tthrows IOException\n\t{\n\t\tString collection = in.readString();\n\t\tObject id = in.readId();\n\t\tbyte[] data = in.readByteArray();\n\n\t\treturn new StoreChunkOperation(collection, id, data);\n\t}",
"public Graph load(String filename) throws IOException\n {\n return load(filename, new SparseGraph(), null);\n }",
"private void initializeStoreFromPersistedData() throws IOException\r\n {\r\n loadKeys();\r\n\r\n if (keyHash.isEmpty())\r\n {\r\n dataFile.reset();\r\n }\r\n else\r\n {\r\n final boolean isOk = checkKeyDataConsistency(false);\r\n if (!isOk)\r\n {\r\n keyHash.clear();\r\n keyFile.reset();\r\n dataFile.reset();\r\n log.warn(\"{0}: Corruption detected. Resetting data and keys files.\", logCacheName);\r\n }\r\n else\r\n {\r\n synchronized (this)\r\n {\r\n startupSize = keyHash.size();\r\n }\r\n }\r\n }\r\n }",
"public GridFSInputFile createFile(InputStream in, String filename,\n\t boolean closeStreamOnPersist) {\n\treturn new GridFSInputFile(this, in, filename, closeStreamOnPersist);\n }",
"RawStore(final int m, final int n) {\n\n super();\n\n myNumberOfColumns = n;\n data = new double[m][n];\n }",
"public static Memory getInstance(){\n if (mem == null) mem = new Memory(4000);\n return mem;\n }",
"<K, V> KeyValueStoreReader<K, V> getStore(String storeName) throws IOException;",
"private void createDicts(String inputFile){\n\t\tproductIds = new TreeMap<>();\n\t\ttokenDict = new TreeMap<>();\n\t\treviewIds = new TreeMap<>();\n\n\t\tDataParser dataParser = null;\n\t\ttry {\n\t\t\tdataParser = new DataParser(inputFile);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error occurred while reading the reviews input file.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\tfor (int i = 0; i < dataParser.allReviews.size(); i++) {\n\t\t\taddProductId(dataParser.allReviews.get(i).get(\"productId\"), i + 1);\n\t\t\tint length = addReviewText(dataParser.allReviews.get(i).get(\"text\"), i + 1);\n\t\t\taddReviewId(dataParser.allReviews.get(i), i, length);\n\t\t}\n\t}",
"public static void createHashTable(String inputFileName, String outputFileName){\n File inputFile = new File(inputFileName);\n File outputFile = new File(outputFileName);\n WordCounter h = new WordCounter();\n h.input(inputFile);\n h.output(outputFile);\n }",
"private FileManager()\n {\n bookFile.open(\"bookdata.txt\");\n hisFile.open(\"history.txt\");\n idFile.open(\"idpassword.txt\");\n createIDMap();\n createHisMap(Customer.getInstance());\n }",
"public void testWriteDataInMemory() throws IOException {\n\t\tfinal CachedParserDocument pdoc = new CachedParserDocument(this.tempFilemanager,(int)this.fileSize);\n\t\tassertTrue(pdoc.inMemory());\n\t\tassertEquals(0, pdoc.length());\n\t\tassertFalse(this.outputFile.exists());\n\t\t\n\t\t// copying data\n\t\tthis.writeData(TESTFILE, pdoc);\n\t\t\n\t\t// data must have been kept in memory\n\t\tassertTrue(pdoc.inMemory());\n\t\tassertEquals(this.fileSize, pdoc.length());\n\t\tassertFalse(this.outputFile.exists());\n\t\t\n\t\t// getting a reader without dumping data to disk\n\t\tassertEquals(TESTFILE, pdoc.getTextAsReader());\n\t\tassertFalse(this.outputFile.exists());\n\t\tassertTrue(pdoc.inMemory());\n\t\t\n\t\t// getting a file\n\t\tassertEquals(TESTFILE, pdoc.getTextFile());\n\t\tassertTrue(this.outputFile.exists());\n\t\tassertFalse(pdoc.inMemory());\n\t}",
"private Path createMobStoreFile(String family) throws IOException {\n return createMobStoreFile(HBaseConfiguration.create(), family);\n }",
"public void createDataStore (){\n\t\tcloseActiveStoreData ();\n\t\tif (_usablePersistenceManager){\n\t\t\tclosePersistence ();\n\t\t}\n\t\tsetDatastoreProperties ();\n\t\tthis.pm = DataStoreUtil.createDataStore (getDataStoreEnvironment (), true);\n\t\t_usablePersistenceManager = true;\n\t}",
"private void loadSpaceObjects(String file){\n\t\ttry{\n\t\t\tFileReader fr = new FileReader(file);\n\t\t\tBufferedReader br = new BufferedReader(fr);\n\t\t\tScanner sc = new Scanner(br);\n\t\t\t\n\t\t\tloadFactory(sc);\n\t\t\tloadPlanets(sc);\n\n\t\t\tsc.close();\n\t\t\tbr.close();\n\t\t\tfr.close();\n\t\t\t\t\n\t\t}catch(Exception e){\n\t\t\tSystem.out.println(\"File not found: SpaceProgramPlanets.txt\");\n\t\t}\n\t}",
"public static boolean allocator(FileInputStream f) {\n if(observer != null){\n observer.parser.setCurrentRule(\"allocator\", true);\n }\n CToken t = new CToken();\n t = getUsePeek(f);\n \n if (!t.token.equals(\"new\")) {\n return false;\n }\n \n CScanner.needToUsePeekedToken = false;\n t = CScanner.getNextToken(f);\n if(observer != null){\n observer.parser.setCurrentToken(t);\n }\n if (!t.type.equals(\"Identifier\")) {\n System.err.format(\"Syntax Error: In rule InterfaceDeclaration unexpected token \\\"%s\\\" of type %s on line %d.\\n\", t.token, t.type, t.lineNum);\n System.exit(0);\n } //not identifier\n if(observer != null){\n observer.parser.setCurrentRule(\"allocator\", false);\n }\n return true;\n }",
"static public InputLayer readFromFile(NetworkFileReader nfr) throws IOException {\n\t\t// read in the size and make a new InputLayer of that size\n\t\tint size = nfr.readInt();\n\t\treturn new InputLayer(size);\n\t}",
"public void loadStateFromFile(String fileName)\n\t{\n\t\ttry\n\t\t{\n\t\t\tFile f = new File(fileName);\n\t\t\tScanner input = new Scanner(f);\n\t\t\t_rows = input.nextInt();\n\t\t\t_cols = input.nextInt();\n\t\t\t_puzzle = new int[_rows][_cols];\n\t\t\tfor (int r_idx = 0; r_idx < _rows; r_idx++)\n\t\t\t\tfor (int c_idx = 0; c_idx<_cols; c_idx++)\n\t\t\t\t{\n\t\t\t\t\t_puzzle[r_idx][c_idx] = input.nextInt();\n\t\t\t\t\tif (_puzzle[r_idx][c_idx] == 0){\n\t\t\t\t\t\t_holes.add(new Coordinate(r_idx,c_idx));\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\tSystem.exit(-1);\n\t\t}\n\t}",
"@Override\n public void parse() {\n if (file == null)\n throw new IllegalStateException(\n \"File cannot be null. Call setFile() before calling parse()\");\n\n if (parseComplete)\n throw new IllegalStateException(\"File has alredy been parsed.\");\n\n FSDataInputStream fis = null;\n BufferedReader br = null;\n\n try {\n fis = fs.open(file);\n br = new BufferedReader(new InputStreamReader(fis));\n\n // Go to our offset. DFS should take care of opening a block local file\n fis.seek(readOffset);\n records = new LinkedList<T>();\n\n LineReader ln = new LineReader(fis);\n Text line = new Text();\n long read = readOffset;\n\n if (readOffset != 0)\n read += ln.readLine(line);\n\n while (read < readLength) {\n int r = ln.readLine(line);\n if (r == 0)\n break;\n\n try {\n T record = clazz.newInstance();\n record.fromString(line.toString());\n records.add(record);\n } catch (Exception ex) {\n LOG.warn(\"Unable to instantiate the updateable record type\", ex);\n }\n read += r;\n }\n\n } catch (IOException ex) {\n LOG.error(\"Encountered an error while reading from file \" + file, ex);\n } finally {\n try {\n if (br != null)\n br.close();\n\n if (fis != null)\n fis.close();\n } catch (IOException ex) {\n LOG.error(\"Can't close file\", ex);\n }\n }\n\n LOG.debug(\"Read \" + records.size() + \" records\");\n }",
"public void read(DataInputStream input) throws IOException {\r\n matrixId = input.readInt();\r\n int size = input.readInt();\r\n partMetas = new HashMap<>(size);\r\n for (int i = 0; i < size; i++) {\r\n MatrixPartitionMeta partMeta = new MatrixPartitionMeta();\r\n partMeta.read(input);\r\n partMetas.put(partMeta.getPartId(), partMeta);\r\n }\r\n }"
]
| [
"0.62018305",
"0.61264056",
"0.59863245",
"0.5421059",
"0.53167933",
"0.5271185",
"0.51307106",
"0.50996715",
"0.5083311",
"0.50816375",
"0.50679755",
"0.50427675",
"0.5041025",
"0.5037488",
"0.5008846",
"0.49976528",
"0.49866262",
"0.49676475",
"0.4963089",
"0.49624667",
"0.4956697",
"0.48674792",
"0.48396447",
"0.48275253",
"0.48180056",
"0.48177952",
"0.4816798",
"0.48140627",
"0.48138738",
"0.47991815",
"0.4789328",
"0.47750965",
"0.47712368",
"0.47710586",
"0.4752891",
"0.47477868",
"0.47387797",
"0.4736197",
"0.47321138",
"0.471999",
"0.47128332",
"0.47066423",
"0.467071",
"0.467056",
"0.46638998",
"0.46614477",
"0.46499664",
"0.46487117",
"0.46476072",
"0.4644337",
"0.46351036",
"0.46328405",
"0.46234283",
"0.4616243",
"0.461606",
"0.46160012",
"0.46040776",
"0.4603142",
"0.45889166",
"0.45847517",
"0.4578175",
"0.45755142",
"0.45744422",
"0.45703",
"0.45701262",
"0.45661762",
"0.4563127",
"0.45608056",
"0.45591995",
"0.45550805",
"0.45547158",
"0.45490712",
"0.45487595",
"0.45373976",
"0.45357588",
"0.45315832",
"0.4526088",
"0.45242187",
"0.4520504",
"0.4520373",
"0.45135286",
"0.45070413",
"0.45019877",
"0.4501953",
"0.4497385",
"0.4496075",
"0.44926143",
"0.44829556",
"0.44824436",
"0.44821513",
"0.4479356",
"0.44790876",
"0.44752517",
"0.44692677",
"0.44626892",
"0.44621423",
"0.44621116",
"0.44539177",
"0.44538498",
"0.44527242"
]
| 0.6717654 | 0 |
Get the value at the given location in memory. The given location should be a byte location, but if it isn't wordaligned it will be truncated. | public long getValue(long location) {
// we want to access the memory on a word boundary
long memoryAddress = location >> 2;
// error if we're out of bounds
if (memoryAddress >= memory.size()) {
throw new IllegalArgumentException("Memory address out of bounds");
}
// Return the word we want. Note that it should be safe to
// cast memoryAddress to the int required by ArrayList.get because
// we know that the given location is at most 32 bits long, so shifting
// right two bits should give us a non-negative number every time we
// go to cast it.
return memory.get((int)memoryAddress);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int checkMemLocation(int location) {\n if (location < memory.length && location >= 0) {\n return location;\n }\n throw new MemoryOutOfBounds(memory.length, location);\n }",
"public void storeValue(long location, long value) {\n\t\t// get the word address from the byte address\n\t\tlong memoryAddress = location >> 2;\n\t\t\n\t\t// error if we're out of bounds\n\t\tif (memoryAddress >= memory.size()) {\n\t\t\tthrow new IllegalArgumentException(\"Memory address out of bounds\");\n\t\t}\n\t\t\n\t\t// Set the word we want. Note that it should be safe to\n\t\t// cast memoryAddress to the int required by ArrayList.get because\n\t\t// we know that the given location is at most 32 bits long, so shifting\n\t\t// right two bits should give us a non-negative number every time we\n\t\t// go to cast it.\n\t\tmemory.set((int)memoryAddress, value);\n\t}",
"private short computeLocationValue(TileLocation location) {\n\t\treturn computeLocationValue(location.getRow(), location.getColumn());\n\t}",
"int locationOffset(Location location);",
"String get(int offset, int length) throws BadLocationException;",
"public ByteBuffer read(int location)\n throws DataOrderingException;",
"public int memoryBitOffset ( TypeSpec baseType, int bitOffset, int bitWidth )\n{\n if (LITTLE_ENDIAN)\n return bitOffset;\n else // big endian\n return baseType.width - bitOffset - bitWidth;\n}",
"public Variable getVariableContaining(int offset);",
"public long retrieve(long record) {\n return (record & MASK) >>> OFFSET;\n }",
"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 }",
"@Nonnull\n public Memory read(@Nonnegative long offset, @Nonnegative int length) {\n return this.read(this.resolvePointer(offset), length);\n }",
"public byte get(int addr) {\n return data[addr - start];\n }",
"public final Word getWord(int offset) {\n return words[offset == 0 ? offset : offset - 1];\n }",
"private int getInt(int location) {\n return intArray[location];\n }",
"public int setMemory(int location, String content){\n \n\t\tint status = 0;\n\t\t\n\t\tif(location<memoryLength){\n\t\t\tif(content.length()>=sixteenBitMax){\n\t\t\t\tmemory[location] = content;\t//keep overflow item with status 3\n\t\t\t\tmemoryCounter++;\n\t\t\t\treturn 3;\n\t\t\t}\n\t\t\telse if(location>=0&&location<=5){\n\t\t\t\treturn 2;\t//condition for preserved location\n\t\t\t}\n\t\t\telse{\n\t\t\t\tmemory[location] = content;\n\t\t\t\tmemoryCounter++;\n\t\t\t\tstatus = 0;\n\t\t\t\treturn status;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t\treturn 1;\n\t\t\n\t}",
"private Integer extractByteFromLong(final Long longvalue, final Byte offset) {\n\t\tfinal Long mask = 0xFFL << ((long) offset * 0x8L);\n\t\tfinal Long tmpval = longvalue & mask;\n\t\tfinal Long ret = (tmpval >>> ((long) offset * 0x8L));\n\t\treturn ret.intValue();\n\t}",
"public long getElementAt(int row, int column) {\n\t\treturn _value[(row * _columnCount) + column];\n\t}",
"public byte get(int address) {\n try {\n return direct_read(address);\n } catch (ArrayIndexOutOfBoundsException e) {\n throw new AddressOutOfBoundsException(address);\n }\n }",
"@Override\r\n\tpublic long getLong(int pos) {\n\t\treturn buffer.getLong(pos);\r\n\t}",
"Double getOffset();",
"public Address getValue(Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;",
"public UnsignedByte read(int index) {\n if (index > -1 && index < MEMORY_LENGTH) return memory[index];\n else throw new IndexOutOfBoundsException(\"Index \" + index + \" is out of bounds (0 - \" + MEMORY_LENGTH + \")\");\n }",
"public String findWord(int offset) {\r\n \t\tIRegion wordRegion = findWordRegion(offset);\r\n \t\tString word = null;\r\n \t\ttry {\r\n \t\t\tword = this.get(wordRegion.getOffset(), wordRegion.getLength());\r\n \t\t} catch (BadLocationException e) {\r\n \t\t\te.printStackTrace();\r\n \t\t}\r\n \t\treturn word;\r\n \t}",
"public static byte readByte(final long address) {\n\t\treturn Unsafe.get().getByte(address);\n\t}",
"Location offsetLocation(int offset);",
"public T get(int pos);",
"@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 }",
"public T get(int position) {\n if (this.getSize() > 0) {\n return buffer[position];\n }\n return null;\n }",
"public long readMem(int index) throws Exception{\n\t\tif(index >= 0 && index < Constants.MEM_SIZE)\n\t\t\treturn memory[index];\n\t\telse\n\t\t\tthrow new Exception(\"Illegal memory location, trying to access MEM[\"+index+\"]\");\n\t}",
"public long getLongFromMemory(long number){\n\t\tif (number % 8L != 0L){\n\t\t\tSystem.out.println(\"Wrong number for access in memory\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tlong l1 = 0L;\n\t\ttry{\n\t\t\tint i = memory[((int)number / 4)];\n\t\t\tint j = memory[(((int)number + 4) / 4)];\n\t\t\tlong l3 = i;\n\t\t\tl3 &= 0xFFFFFFFFL; //bitwise AND with FFFFFFFF long\n\t\t\tlong l2 = j; \n\t\t\tl2 <<= 32;\t\t//shift 32 bits to left\n\t\t\tl1 = l2 | l3; \t//bitwise OR to get the result\n\t\t}\n\t\tcatch (Exception e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\tSystem.exit(0);\n\t\t}\n\t\treturn l1;\n\t}",
"char getChar(int offset) throws BadLocationException;",
"double getOffset();",
"Unit findPlace() {\n\t\tif (!availableRegister.isEmpty()) {\n\t\t\tUnit result = availableRegister.firstElement();\n\t\t\tavailableRegister.remove(0);\n\t\t\treturn result;\n\t\t} else {\n\t\t\tint memId = localPos;\n\t\t\tlocalPos++;\n\t\t\treturn new UnitMemory(new String(\"local[\" + String.valueOf(memId) + \"]\"), memId);\n\t\t}\n\t}",
"public Address getValue() throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;",
"@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}",
"public int get(int position) {\n return Integer.MIN_VALUE;\n }",
"public byte getByte(int offset)\n {\n return readMode(offset + 0xA0000);\n }",
"public Integer getOffset();",
"int getWord( int pos){\n\t\treturn data[pos] + (data[pos+1] << 8);\n\t}",
"short getQ( byte[] buffer, short offset );",
"public ByteBuffer getUnboundedValue(T key) {\n int index = evaluator.evaluate(key);\n if (index < 0) {\n return null;\n }\n return mappedBuffer.asReadOnlyBuffer().position(offsets[index]).order(ByteOrder.LITTLE_ENDIAN);\n }",
"public static int offset_reading() {\n return (32 / 8);\n }",
"public Data getDefinedDataAt(Address addr);",
"int getRawOffset();",
"int getOffset();",
"int getOffset();",
"int getOffset();",
"T get(int position);",
"public byte get(int addr) throws ProgramException {\n return getSegment(addr, true).get(addr);\n }",
"public short findAndCopyValue(byte tag,\n byte occurrence,\n short valueOffset,\n byte[] dstBuffer,\n short dstOffset,\n short dstLength) \n throws \tNullPointerException,\n ArrayIndexOutOfBoundsException,\n ToolkitException {\n \t\t\t \n byte[] buffer = getAPDUBuffer();\n short Lc = (short)(buffer[OFFSET_LC] & 0xFF);\n short TLVOffset = getTLVOffset(buffer, tag, Lc, occurrence);\n \n if (TLVOffset >= Lc) {\n // TLV not found\n ToolkitException.throwIt(ToolkitException.UNAVAILABLE_ELEMENT);\n }\n // this is the current TLV\n currentTLVOffset = TLVOffset;\n short length = buffer[(short)(TLVOffset+1)];\n if ((valueOffset < 0) || (short)(valueOffset + dstLength) > length) {\n ToolkitException.throwIt(ToolkitException.OUT_OF_TLV_BOUNDARIES);\n }\n Util.arrayCopy(buffer, (short)(TLVOffset+2+valueOffset), \n dstBuffer, dstOffset, dstLength);\n return (short)(dstOffset + length);\n\n }",
"public int addMemoryRestoreRawWord(int address, int value) {\r\n\t\tbackSteps.push(MEMORY_RESTORE_RAW_WORD, pc(), address, value);\r\n\t\treturn value;\r\n\t}",
"@Override\n public int getValue(byte[] value, int offset) {\n return 0;\n }",
"public long memoryAddress()\r\n/* 143: */ {\r\n/* 144:172 */ throw new UnsupportedOperationException();\r\n/* 145: */ }",
"public byte getValueAt(int position) {\r\n\r\n\t\tif (position >= values.length) {\r\n\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\"Index must be less than \" + values.length);\r\n\t\t}\r\n\r\n\t\treturn values[position];\r\n\t}",
"protected final long getLong(int offset)\n {\n final byte[] tableData = tables.getTablesData();\n return Bytes.getLong(tableData, cursor+offset);\n }",
"byte get(int index);",
"public int value() {\n\t\treturn offset;\n\t}",
"short getP( byte[] buffer, short offset );",
"public String getLong(long offset) throws IOException {\n\t\tdataBase.seek(offset);\n\t\tString[] array = dataBase.readLine().split(\"\\\\|\");\n\t\treturn array[8];\n\t}",
"protected abstract T getValue(ByteBuffer b);",
"Optional<MemoryAddress> lookup(String name);",
"public byte getAt(int fieldNumber) {\n Coordinates c = new Coordinates(fieldNumber);\n return board[c.getRow()][c.getColumn()];\n }",
"public ReportElement getElementAt(Point location)\r\n {\r\n Point p = new Point(getRealDim((int)location.getX()-10)+10,\r\n getRealDim((int)location.getY()-10)+10);\r\n\r\n for (int i=getCrosstabElement().getElements().size()-1; i>=0; --i)\r\n {\r\n ReportElement re = (ReportElement)getCrosstabElement().getElements().elementAt(i);\r\n if ((isDefaultCellMode() == (re.getCell().getType() == CrosstabCell.NODATA_CELL)) && re.intersects(p))\r\n {\r\n return re;\r\n }\r\n }\r\n\r\n return null;\r\n }",
"@Override\r\n\tpublic MemoryConstant toConstant() {\r\n\t\treturn new LocationConstant(getTarget(), getBitSize(),\r\n\t\t\t\tgetAddressStridePolicy());\r\n\t}",
"public int readValue() { \n\t\treturn (port.readRawValue() - offset); \n\t}",
"private void checkLocation(int location) {\n\t\tif (location < 0 || location > memory.length) {\n\t\t\tthrow new IndexOutOfBoundsException(\n\t\t\t\t\"The given location is invalid! Expected values are greater or equal then 0, and less then \"\n\t\t\t\t\t\t+ memory.length + \" but \" + location + \" was given\");\n\t\t}\n\t}",
"private short computeLocationValue(short row, short column) {\n\t\treturn (short) (gridSize * row + column);\n\t}",
"protected final long getUInt(int offset)\n {\n final byte[] tableData = tables.getTablesData();\n return Bytes.getUInt(tableData, cursor+offset);\n }",
"protected final byte getByte(int offset)\n {\n final byte[] tableData = tables.getTablesData();\n return tableData[cursor+offset];\n }",
"public abstract int getRawOffset();",
"public abstract int getRawOffset();",
"public < T > T getMemory ( MemoryKey < T > memoryKey ) {\n\t\treturn extract ( handle -> handle.getMemory ( memoryKey ) );\n\t}",
"public static String readDiskMemory(String address){\n\t\treturn memory.get(address);\n\t}",
"public static int getInnerLocation(int location) {\n switch (location) {\n case Mech.LOC_RT:\n case Mech.LOC_LT:\n return Mech.LOC_CT;\n case Mech.LOC_LLEG:\n case Mech.LOC_LARM:\n return Mech.LOC_LT;\n case Mech.LOC_RLEG:\n case Mech.LOC_RARM:\n return Mech.LOC_RT;\n default:\n return location;\n }\n }",
"private String read(int address)\n {\n return MMU.read(VMA.get( address/RAM.getPageSize()) * RAM.getPageSize() + (address % RAM.getPageSize()));\n }",
"public java.lang.Long getOffset() {\n return offset;\n }",
"public Data getDataAt(Address addr);",
"@VisibleForTesting\n public boolean dialMemory(byte[] address, int location) {\n return dialMemoryNative(address, location);\n }",
"private ByteBuffer tryRead(long address, ByteBuffer destination)\n {\n bouquet.getAddressBoundary().getPageMoveLock().readLock().lock();\n try\n {\n ByteBuffer read = null;\n do\n {\n Dereference dereference = bouquet.getAddressBoundary().dereference(address);\n dereference.getLock().lock();\n try\n {\n BlockPage blocks = dereference.getBlockPage();\n if (blocks != null)\n {\n read = blocks.read(address, destination);\n }\n }\n finally\n {\n dereference.getLock().unlock();\n }\n }\n while (read == null);\n \n return read;\n }\n finally\n {\n bouquet.getAddressBoundary().getPageMoveLock().readLock().unlock();\n }\n }",
"private long readJumpOffset() throws IOException {\n byte[] sec = new byte[4];\n ins.read(sec);\n return convertByteValueToLong(sec);\n }",
"public int get(String parameter, int offset)\n {\n int paramIndex = getAkParamIndex(parameter);\n int i = getAkSettingIndex(paramIndex, offset);\n if (i == -1)\n throw new IllegalArgumentException(\"The parameter and offset combination is not allowed\");\n\n return values_[i];\n }",
"public void getPyalod(byte[] buff, int offset) {\n buffer.position(12);\n buffer.get(buff, offset, buffer.limit() - 12);\n }",
"public Vector3f getPhysicsLocation(Vector3f location) {\n if (location == null) {\n location = new Vector3f();\n }\n rBody.getCenterOfMassTransform(tempTrans);\n return Converter.convert(tempTrans.origin, location);\n }",
"public Unit getUnitAt(Position p);",
"public long get(int i) {\n return read(i);\n }",
"public long getCachedData(int memLoc) {\n\t\tfor (Integer memoryCheck : cacheMap.keySet()) {\n\t\t\tif(memoryCheck == memLoc){\n\t\t\t\treturn cacheMap.get(memoryCheck);\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}",
"public long offset() {\n return offset;\n }",
"private static TileEntityWire getWireAt(WireLocation location, World world) {\r\n\tTileEntity ent = world.getBlockTileEntity(location.x, location.y, location.z);\r\n\tif (ent instanceof TileEntityWire)\r\n\t return (TileEntityWire) ent;\r\n\treturn null;\r\n }",
"public boolean get(int loc)\n\t{\n\t\tif (loc < this.size)\n\t\t{\n\t\t\treturn (bits[loc / BITS_IN_LONG] & (1L << (loc % BITS_IN_LONG))) != 0L;\n\t\t} else\n\t\t{\n\t\t\tthrow new ArrayIndexOutOfBoundsException(\"Exception: tried to set value of BitArray that was out of bounds: \" + loc + \". Size was \" + this.size);\n\t\t}\n\t}",
"public int getMemory(int index) {\n\t\treturn memory.get(index);\n\t}",
"long getMemory();",
"long getMemory();",
"@Nonnegative\n @CheckReturnValue\n public int getOffset() {\n return offset;\n }",
"public long getValue(int index) {\n return value_.getLong(index);\n }",
"public final double getOffset() {\n\t\treturn offset;\n\t}",
"public int get_position(long number) {\n return ptr_buff[(int) (number * POINTER_LENGTH / ptr_parts_size[0])].getInt((int) (number * POINTER_LENGTH % ptr_parts_size[0] + 9));\n }",
"public long get() {\n\t\t\treturn get(1);\n\t\t}",
"public java.lang.Long getOffset() {\n return offset;\n }",
"@Nonnull\n public Pointer resolvePointer(@Nonnegative long offset) {\n Pointer address = this.baseAddress;\n\n for (long deepOffset : this.offsets) {\n address = this.readPointer(address).share(deepOffset);\n }\n\n return address.share(offset);\n }",
"public abstract long read_longlong();"
]
| [
"0.61023724",
"0.60103583",
"0.577216",
"0.5602505",
"0.549024",
"0.54784083",
"0.5475671",
"0.5470703",
"0.5454532",
"0.54521686",
"0.5432233",
"0.53440976",
"0.5324067",
"0.52728724",
"0.5246857",
"0.52203876",
"0.519324",
"0.5190793",
"0.51898795",
"0.5171586",
"0.5164866",
"0.5148841",
"0.51469797",
"0.5108712",
"0.5094095",
"0.50783014",
"0.5069464",
"0.506751",
"0.50630534",
"0.5043959",
"0.5025086",
"0.5019342",
"0.5012227",
"0.50054497",
"0.49842805",
"0.49828526",
"0.49772424",
"0.4969568",
"0.49538422",
"0.49474636",
"0.49412152",
"0.49379963",
"0.49227256",
"0.4920629",
"0.49183586",
"0.49183586",
"0.49183586",
"0.4910128",
"0.49016398",
"0.48990282",
"0.48933",
"0.48881814",
"0.48755044",
"0.48732838",
"0.48649246",
"0.4860887",
"0.48605716",
"0.48535246",
"0.48311445",
"0.48287025",
"0.482531",
"0.48167568",
"0.48005077",
"0.47946292",
"0.47875202",
"0.4785131",
"0.47783932",
"0.47757795",
"0.47691226",
"0.47558892",
"0.47558892",
"0.47465235",
"0.47400194",
"0.47314066",
"0.47195527",
"0.4718959",
"0.47121942",
"0.47102785",
"0.4707585",
"0.46850383",
"0.4681338",
"0.46793377",
"0.4676763",
"0.46708333",
"0.46569607",
"0.46495807",
"0.463355",
"0.4630918",
"0.46230316",
"0.461582",
"0.46037263",
"0.46037263",
"0.46032676",
"0.46006975",
"0.4598844",
"0.4596564",
"0.4583859",
"0.45823807",
"0.45823002",
"0.4572068"
]
| 0.7880801 | 0 |
Store the given value at the given location in memory. The given location should be a byte location, but if it isn't wordaligned it will be truncated. | public void storeValue(long location, long value) {
// get the word address from the byte address
long memoryAddress = location >> 2;
// error if we're out of bounds
if (memoryAddress >= memory.size()) {
throw new IllegalArgumentException("Memory address out of bounds");
}
// Set the word we want. Note that it should be safe to
// cast memoryAddress to the int required by ArrayList.get because
// we know that the given location is at most 32 bits long, so shifting
// right two bits should give us a non-negative number every time we
// go to cast it.
memory.set((int)memoryAddress, value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int setMemory(int location, String content){\n \n\t\tint status = 0;\n\t\t\n\t\tif(location<memoryLength){\n\t\t\tif(content.length()>=sixteenBitMax){\n\t\t\t\tmemory[location] = content;\t//keep overflow item with status 3\n\t\t\t\tmemoryCounter++;\n\t\t\t\treturn 3;\n\t\t\t}\n\t\t\telse if(location>=0&&location<=5){\n\t\t\t\treturn 2;\t//condition for preserved location\n\t\t\t}\n\t\t\telse{\n\t\t\t\tmemory[location] = content;\n\t\t\t\tmemoryCounter++;\n\t\t\t\tstatus = 0;\n\t\t\t\treturn status;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t\treturn 1;\n\t\t\n\t}",
"public long getValue(long location) {\n\t\t// we want to access the memory on a word boundary\n\t\tlong memoryAddress = location >> 2;\n\t\t\n\t\t// error if we're out of bounds\n\t\tif (memoryAddress >= memory.size()) {\n\t\t\tthrow new IllegalArgumentException(\"Memory address out of bounds\");\n\t\t}\n\t\t\n\t\t// Return the word we want. Note that it should be safe to\n\t\t// cast memoryAddress to the int required by ArrayList.get because\n\t\t// we know that the given location is at most 32 bits long, so shifting\n\t\t// right two bits should give us a non-negative number every time we\n\t\t// go to cast it.\n\t\treturn memory.get((int)memoryAddress);\n\t}",
"public int addMemoryRestoreRawWord(int address, int value) {\r\n\t\tbackSteps.push(MEMORY_RESTORE_RAW_WORD, pc(), address, value);\r\n\t\treturn value;\r\n\t}",
"public static void writeWithByte(final long address, final long size, final byte value) {\n\t\tUnsafe.get().setMemory(address, size, value);\n\t}",
"public void insertArrayValueByLocation(int location, int valueToBeInserted) {\n try {\n if(arr[location] == Integer.MIN_VALUE){\n arr[location] = valueToBeInserted;\n System.out.println(\"Successfully Inserted\");\n } else {\n System.out.println(\"Already value is stored\");\n }\n } catch (ArrayIndexOutOfBoundsException e) {\n System.out.println(\"Invalid index to access array!\");\n }\n }",
"public int addMemoryRestoreWord(int address, int value) {\r\n\t\tbackSteps.push(MEMORY_RESTORE_WORD, pc(), address, value);\r\n\t\treturn value;\r\n\t}",
"private int checkMemLocation(int location) {\n if (location < memory.length && location >= 0) {\n return location;\n }\n throw new MemoryOutOfBounds(memory.length, location);\n }",
"public void write(int location, ByteBuffer data)\n throws DataOrderingException;",
"public void setMemory(int nodeLocation) {\n\t\tmemory.add(nodeLocation);\n\t}",
"public void chngm(int loc1, int value) {\n checkMemLocation(loc1);\n memory[loc1] = value;\n }",
"public void write(byte[] data, long offset);",
"public static void write(byte[] buffer, long offset, long length , long value) {\n while(length-- > 0){\n buffer[(int) offset++] = (byte) (value & 0xFF);\n value >>=8;\n }\n }",
"public void put_position(int position, long number) {\n ptr_buff[(int) (number * POINTER_LENGTH / ptr_parts_size[0])].putInt((int) (number * POINTER_LENGTH % ptr_parts_size[0] + 9), position);\n }",
"public static int putLong(byte[] bytes, int offset, long val) {\n if (bytes.length - offset < SIZEOF_LONG) {\n throw new IllegalArgumentException(\"Not enough room to put a long at\"\n + \" offset \" + offset + \" in a \" + bytes.length + \" byte array\");\n }\n\n for(int i = offset + 7; i > offset; i--) {\n bytes[i] = (byte) val;\n val >>>= 8;\n }\n bytes[offset] = (byte) val;\n return offset + SIZEOF_LONG;\n\n }",
"protected void direct_write(int address, byte val) {\n segment_data[address] = val;\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 }",
"private void checkLocation(int location) {\n\t\tif (location < 0 || location > memory.length) {\n\t\t\tthrow new IndexOutOfBoundsException(\n\t\t\t\t\"The given location is invalid! Expected values are greater or equal then 0, and less then \"\n\t\t\t\t\t\t+ memory.length + \" but \" + location + \" was given\");\n\t\t}\n\t}",
"public static int writeLong(byte[] target, int offset, long value) {\n target[offset] = (byte) (value >>> 56);\n target[offset + 1] = (byte) (value >>> 48);\n target[offset + 2] = (byte) (value >>> 40);\n target[offset + 3] = (byte) (value >>> 32);\n target[offset + 4] = (byte) (value >>> 24);\n target[offset + 5] = (byte) (value >>> 16);\n target[offset + 6] = (byte) (value >>> 8);\n target[offset + 7] = (byte) value;\n return Long.BYTES;\n }",
"private void storeSp(int s) {\n UNSAFE.putOrderedInt(this, spOffset, s);\n }",
"private final static void storeLongInPage(final String fileName, final long posInFile, final long value) throws IOException{\n\t\tfinal int defaultPageSize = PageManager.getDefaultPageSize();\n\t\tfinal int pageNumber = (int) (posInFile / defaultPageSize);\n\t\tPageAddress pageAddress = new PageAddress(pageNumber, fileName);\n\t\tbyte[] page = BufferManager.getBufferManager().getPage(defaultPageSize, pageAddress);\n\t\tint posInPage = (int) (posInFile % defaultPageSize);\n\t\tlong toBeStored = value;\n\t\tif(posInPage+7 >= defaultPageSize){\n\t\t\t// the long must be stored over two pages!\n\t\t\tfor(int i=0; i<8; i++){\n\t\t\t\tif(posInPage>=defaultPageSize){\n\t\t\t\t\t// next page is affected!\n\t\t\t\t\tBufferManager.getBufferManager().modifyPage(defaultPageSize, pageAddress, page);\n\t\t\t\t\tpageAddress = new PageAddress(pageAddress.pagenumber+1, pageAddress.filename);\n\t\t\t\t\tpage = BufferManager.getBufferManager().getPage(defaultPageSize, pageAddress);\n\t\t\t\t\tposInPage %= defaultPageSize;\n\t\t\t\t}\n\t\t\t\tpage[posInPage] = (byte)((toBeStored % 256)-128);\n\t\t\t\ttoBeStored/=256;\n\t\t\t\tposInPage++;\n\t\t\t}\n\t\t} else {\n\t\t\t// optimize the normal case!\n\t\t\tpage[posInPage] = (byte)((toBeStored % 256)-128);\n\t\t\ttoBeStored/=256;\n\t\t\tposInPage++;\n\t\t\tpage[posInPage] = (byte)((toBeStored % 256)-128);\n\t\t\ttoBeStored/=256;\n\t\t\tposInPage++;\n\t\t\tpage[posInPage] = (byte)((toBeStored % 256)-128);\n\t\t\ttoBeStored/=256;\n\t\t\tposInPage++;\n\t\t\tpage[posInPage] = (byte)((toBeStored % 256)-128);\n\t\t\ttoBeStored/=256;\n\t\t\tposInPage++;\n\t\t\tpage[posInPage] = (byte)((toBeStored % 256)-128);\n\t\t\ttoBeStored/=256;\n\t\t\tposInPage++;\n\t\t\tpage[posInPage] = (byte)((toBeStored % 256)-128);\n\t\t\ttoBeStored/=256;\n\t\t\tposInPage++;\n\t\t\tpage[posInPage] = (byte)((toBeStored % 256)-128);\n\t\t\ttoBeStored/=256;\n\t\t\tposInPage++;\n\t\t\tpage[posInPage] = (byte)((toBeStored % 256)-128);\n\t\t}\n\n\t\tBufferManager.getBufferManager().modifyPage(defaultPageSize, pageAddress, page);\n\t}",
"public void release(int location)\n throws DataOrderingException;",
"public void setOffset(Location value) {\n\t\tthis.pos = value;\n\t}",
"public static long setByte(long field, int pos, short value) {\n if(pos < 1 || pos > 8) {\n throw new IllegalArgumentException(\"Pos value is not defined between 1 and 8\");\n }\n\n switch(pos) {\n case 1:\n field = field & 0xFFFFFFFFFFFFFF00l;\n break;\n case 2:\n field = field & 0xFFFFFFFFFFFF00FFl;\n break;\n case 3:\n field = field & 0xFFFFFFFFFF00FFFFl;\n break;\n case 4:\n field = field & 0xFFFFFFFF00FFFFFFl;\n break;\n case 5:\n field = field & 0xFFFFFF00FFFFFFFFl;\n break;\n case 6:\n field = field & 0xFFFF00FFFFFFFFFFl;\n break;\n case 7:\n field = field & 0xFF00FFFFFFFFFFFFl;\n break;\n case 8:\n field = field & 0x00FFFFFFFFFFFFFFl;\n break;\n }\n\n return (field | (((long) value) << (8* (pos-1))));\n }",
"private short computeLocationValue(TileLocation location) {\n\t\treturn computeLocationValue(location.getRow(), location.getColumn());\n\t}",
"private void writeByteAt(int pos, int val) {\n dest[pos] = (byte) val;\n }",
"private void storeValue(int source, int destination, double distance,\n DiskBufferDriver output) throws DriverException {\n output.addValues(ValueFactory.createValue(source),\n ValueFactory.createValue(destination),\n ValueFactory.createValue(distance));\n }",
"public static void insertValue(int [] array, int location, int value){\n array[location -1] = value;\n System.out.println(Arrays.toString(array));\n }",
"public void setOffset(Location value) {\n\t\tgfPos = value;\n\t}",
"void writeLong(long value);",
"public void set(int addr, byte b) {\n data[addr - start] = b;\n }",
"@QAInfo(level = QAInfo.Level.NORMAL,\n state = QAInfo.State.IN_DEVELOPMENT,\n author = \"te\",\n comment = \"Windows uses file locking, so this might work bad when overwriting existing files\")\n public void store(File location, String poolName) throws IOException {\n log.debug(String.format(\"Storing pool '%s' to location '%s'\", poolName, location));\n checkLocation(location, poolName);\n File tmpIndex = new File(getIndexFile().toString() + \".tmp\");\n File tmpValues = new File(getValueFile().toString() + \".tmp\");\n remove(tmpIndex, \"previously stored index\");\n remove(tmpValues, \"previously stored values\");\n\n FileOutputStream dataOut = new FileOutputStream(tmpValues);\n BufferedOutputStream dataBuf = new BufferedOutputStream(dataOut);\n\n FileOutputStream indexOut = new FileOutputStream(tmpIndex);\n BufferedOutputStream indexBuf = new BufferedOutputStream(indexOut);\n ObjectOutputStream index = new ObjectOutputStream(indexBuf);\n\n index.writeInt(VERSION);\n index.writeInt(size());\n\n long pos = 0;\n long feedback = Math.max(size() / 100, 1);\n if (!log.isTraceEnabled()) {\n feedback = Integer.MAX_VALUE; // Disable\n }\n Profiler profiler = new Profiler();\n profiler.setExpectedTotal(size());\n for (int i = 0; i < size(); i++) {\n int length = writeValue(dataBuf, get(i));\n index.writeLong(getIndexEntry(pos, length));\n pos += length;\n profiler.beat();\n if (i % feedback == 0) {\n log.trace(\"Stored \" + i + \"/\" + size() + \" values. ETA: \" + profiler.getETAAsString(true));\n }\n }\n index.writeLong(pos); // Index for next logical, but non-existing, value\n log.trace(\"Stored all values for '\" + poolName + \"', closing streams\");\n// data.flush();\n// data.close();\n dataBuf.close();\n dataOut.close();\n index.flush();\n index.close();\n indexBuf.close();\n indexOut.close();\n remove(getIndexFile(), \"old index\");\n log.trace(String.format(\"store: Renaming index '%s' to '%s'\", tmpIndex, getIndexFile()));\n Files.move(tmpIndex, getIndexFile(), true);\n\n remove(getValueFile(), \"old values\");\n log.trace(String.format(\"store: Renaming values '%s' to '%s'\", tmpValues, getValueFile()));\n Files.move(tmpValues, getValueFile(), true);\n log.debug(\"Finished storing pool '\" + poolName + \"' to location '\" + location + \"'\");\n }",
"public int store(int offset) {\n int result = runStack.get(runStack.size()-1);\n runStack.set(framePointers.peek()+offset, runStack.remove(runStack.size()-1));\n return result;\n }",
"@Test\n public void storeSavesBotLocation() {\n BotMemoryRecord record = new BotMemoryRecord();\n record.store(Point.pt(5, 5));\n\n assertThat(record.getLastKnownLocation(), Matchers.is(Point.pt(5, 5)));\n }",
"public int store(int offset){\n return runStack.store(offset);\n }",
"public void loadWord(int address, BitString word) {\n\t\tif (address < 0 || address >= MAX_MEMORY) {\n\t\t\tthrow new IllegalArgumentException(\"Invalid address\");\n\t\t}\n\t\tmMemory[address] = word;\n\t}",
"public void write(int index, UnsignedByte unsignedByte) {\n memory[index] = unsignedByte;\n }",
"public Builder setLocationBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n location_ = value;\n onChanged();\n return this;\n }",
"public int saveLocation(Location location){\n return 0;\n }",
"public void set(int address, byte val) {\n try {\n direct_write(address, val);\n } catch (ArrayIndexOutOfBoundsException e) {\n throw new AddressOutOfBoundsException(address);\n }\n }",
"public Builder setStoreChunkLocation(edu.usfca.cs.dfs.StorageMessages.StoreChunkLocation value) {\n if (storeChunkLocationBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n msg_ = value;\n onChanged();\n } else {\n storeChunkLocationBuilder_.setMessage(value);\n }\n msgCase_ = 7;\n return this;\n }",
"public void putLongInMemory(long number1, long number2){\n\t\tif (number1 % 8L != 0L){\n\t\t\tSystem.out.println(\"Wrong number for access in memory\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\ttry{\n\t\t\tint i = (int)(number2 & 0xFFFFFFFF); //bitwise AND to get the integer\n\t\t\tint j = (int)(number2 >> 32 & 0xFFFFFFFF); //shift 32 bits to right and AND bitwise to get the second integer\n\t\t\t//put the numbers in memory big endian\n\t\t\tmemory[((int)number1 / 4)] = i;\n\t\t\tmemory[(((int)number1 + 4) / 4)] = j;\n\t\t}\n\t\tcatch (Exception e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"public void put(long position, ByteBuffer src);",
"public abstract void writeAsDbl(int offset, double d);",
"public void setSpace(int location, Space space) {\n\t\tboardArray.set(location, space);\n\t}",
"public void store(String operand, Integer direction) throws Exception {\n if (operand.equals(\" \")){\n Integer value = dataMemory.getData(0);\n dataMemory.setData(direction, value);\n }else if (operand.equals(\"*\")){\n Integer value = dataMemory.getData(0);\n Integer newDirection = dataMemory.getData(direction);\n dataMemory.setData(newDirection, value);\n }else {\n throw new IllegalArgumentException(\"No valid operand\");\n }\n }",
"void setBytes(int index, byte[] value) throws SQLException;",
"public int addMemoryRestoreByte(int address, int value) {\r\n\t\tbackSteps.push(MEMORY_RESTORE_BYTE, pc(), address, value);\r\n\t\treturn value;\r\n\t}",
"public void warp(Vector3f location) {\n warp(characterId, location);\n }",
"public void writeUnsafe(UnsafeMemory um) {\n int mySize = getWriteUnsafeSize();\n um.putInt(mySize);\n //serial\n um.putLong(serialVersionUID);\n\n //class member\n um.putString(fileName);\n\n\n //rocksDbKlueFileName\n um.putString(rocksDbKlueFileName);\n //boolean readOnly\n um.putBoolean(readOnly);\n\n um.putInt(last);\n\n //arrays\n um.put(nameIndex, UnsafeMemory.ARRAYLIST_STRING_TYPE);\n um.put(entries, UnsafeMemory.ARRAYLIST_KID_TYPE);\n um.put(kingdoms,UnsafeMemory.HASHMAP_INTEGER_CHARACTER_TYPE);\n\n\n //No longer stored in memory\n //um.put(sequences,UnsafeMemory.ARRAYLIST_DNABITSTRING_TYPE);\n\n\n\n //ArrayList<Integer> sequenceLength = new ArrayList<Integer>();\n um.put(sequenceLength, UnsafeMemory.ARRAYLIST_INT_TYPE);\n //ArrayList<HashMap<Integer,Character>> exceptionsArr;\n\n int total = 0;\n total += UnsafeMemory.SIZE_OF_INT // byte header\n + UnsafeMemory.SIZE_OF_LONG // SerialUID\n + UnsafeMemory.SIZE_OF_INT; // number of entries\n\n for (int z=0; z < exceptionsArr.size(); z++){\n total += UnsafeMemory.getWriteUnsafeSize(exceptionsArr.get(z), UnsafeMemory.HASHMAP_INTEGER_CHARACTER_TYPE);\n }\n\n um.putInt(total);\n um.putLong(serialVersionUID_ArrayListHashMap_INT_CHAR);\n um.putInt(exceptionsArr.size());\n for (int z=0; z < exceptionsArr.size(); z++){\n um.put(exceptionsArr.get(z), UnsafeMemory.HASHMAP_INTEGER_CHARACTER_TYPE);\n }\n\n }",
"private void addRecordToOverflow(byte [] input, int startLocation) {\n try {\n // Writing a field to the overflow file\n RandomAccessFile raf = new RandomAccessFile(this.databaseName + \".overflow\", \"rws\");\n\n raf.getChannel().position(startLocation);\n raf.write(input);\n raf.close();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }",
"@VisibleForTesting\n public boolean dialMemory(byte[] address, int location) {\n return dialMemoryNative(address, location);\n }",
"private void setSpawnLocation(Object packet, Vector location, String xName, String yName, String zName) {\n ReflectUtils.setField(packet, xName, location.getX());\n ReflectUtils.setField(packet, yName, location.getY());\n ReflectUtils.setField(packet, zName, location.getZ());\n }",
"public void setLocation( final double[] location )\n\t{\n\t\tthis.location = location;\n\t}",
"public static int write(final Locator locator, final long at, final byte[] val, final int off, final int length) {\n final ByteBuffer buf = locator.forWrite(at, length);\n final int idx = locator.index(at);\n final int lengthToWrite = Math.min(buf.capacity() - idx, length);\n buf.position(idx);\n buf.put(val, off, lengthToWrite);\n if(lengthToWrite < length) {\n write(locator, at + lengthToWrite, val, off + lengthToWrite, length - lengthToWrite);\n }\n\n return length;\n }",
"private void putVariable(String memVar, int value){\n\t\tram[Integer.parseInt(\n\t\t\t\tCharacter.toString(memVar.charAt(1)))]\n\t\t\t\t= value;\n\t}",
"@Override\n\tpublic void setLocation(long location) {\n\t\t_buySellProducts.setLocation(location);\n\t}",
"public void setDataMemory(int index, int value)\n {\n try \n {\n // If the memory address hasn't changed, don't notify any observers\n if (data_memory[index].intValue() != value)\n {\n data_memory[index].setValue(value); \n this.setChanged();\n notifyObservers(new MemoryChangeDetails(index, HexTableModel.OBSERVE_DATA_MEMORY));\n } \n }\n catch (ArrayIndexOutOfBoundsException OOB) { }\n }",
"@Override\n\tpublic void write(int value) {\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\tCpuMem.getInstance().writeMem(address, value);\n\t}",
"public void storeItemPosition(long position) {\n\t\tmEditor.putLong(\"KEY_DATA_POSITION\", position);\n\t\tmEditor.commit();\n\t}",
"public < T > void setMemory ( MemoryKey < T > memoryKey , T memoryValue ) {\n\t\texecute ( handle -> handle.setMemory ( memoryKey , memoryValue ) );\n\t}",
"public void place(Object animal, Position position) {\n field[position.getRow()][position.getColumn()] = animal;\n }",
"private void normalizeLocation(Point location) {\r\n location.x = location.x / Environment.standardCellLength * Environment.standardCellLength;\r\n location.y = location.y / Environment.standardCellLength * Environment.standardCellLength;\r\n }",
"public static void insert(Any paramAny, ValueMember paramValueMember) {\n/* 49 */ OutputStream outputStream = paramAny.create_output_stream();\n/* 50 */ paramAny.type(type());\n/* 51 */ write(outputStream, paramValueMember);\n/* 52 */ paramAny.read_value(outputStream.create_input_stream(), type());\n/* */ }",
"protected void writeReference(long offset, Object reference) {\n assert referenceMessageSize != 0 : \"References are not in use\";\n // Is there a way to compute the element offset once and just\n // arithmetic?\n UnsafeRefArrayAccess.spRefElement(references, UnsafeRefArrayAccess.calcRefElementOffset(offset), reference);\n }",
"@Override\n\tpublic void setBytes(final long startpos, final byte[] bytes,\n\t\tfinal int offset, final int length)\n\t{\n\t\tcheckWritePos(startpos, startpos + length);\n\t\tfinal int neededCapacity = size + length;\n\t\tensureCapacity(neededCapacity);\n\n\t\t// copy the data\n\t\tbuffer.position((int) startpos);\n\t\tbuffer.put(bytes, offset, length);\n\n\t\t// update the maxpos\n\t\tupdateSize(startpos + length);\n\t}",
"public void write(VirtualPointer value)\r\n {\r\n write(value, false);\r\n }",
"public void setOffset(java.lang.Long value) {\n this.offset = value;\n }",
"void setPosition(Unit unit, MapLocation position);",
"private void setLocation(Location newLocation) {\n\t\tif (location != null) {\n\t\t\tfield.clear(location);\n\t\t}\n\t\tlocation = newLocation;\n\t\tfield.place(this, newLocation);\n\t}",
"private void smem_variable_set(smem_variable_key variable_id, long variable_value) throws SQLException\n {\n final PreparedStatement var_set = db.var_set;\n \n var_set.setLong(1, variable_value);\n var_set.setInt(2, variable_id.ordinal());\n \n var_set.execute();\n }",
"public void insert(char location, Node toInsert)\n {\n if (location >= 'a' && location <= 'z')\n {\n nexts[location - 97] = toInsert;\n }\n if (location >= 'A' && location <= 'Z')\n {\n nexts[location - 10] = toInsert;\n }\n }",
"private void setData(T data, int size, List<? extends T> memory, T type) { }",
"public void memPut(String str, T t) {\n }",
"private void setLittleEndian(int addr, int bytes, long val) throws ProgramException {\n if ((addr & bytes - 1) != 0) {\n throw new ProgramException(ErrorType.ADDRL);\n }\n\n byte[] buff = new byte[bytes];\n for (int i = 0; i < bytes; i++) {\n buff[i] = (byte) (val >> (i * Byte.SIZE));\n }\n\n set(addr, buff);\n }",
"@Override\n public void setLocation(Point3D loc) throws InvalidDataException {\n myMovable.setLocation(loc);\n }",
"public void setLocation(final String locationValue) {\n this.location = locationValue;\n }",
"public void setLocation(final String locationValue) {\n this.location = locationValue;\n }",
"public void setLocation(final String locationValue) {\n this.location = locationValue;\n }",
"public long writeMem(int index, long data) throws Exception{\n\t\tif(index >= 0 && index < Constants.MEM_SIZE){\n\t\t\tmemory[index] = data;\n\t\t} else {\n\t\t\tthrow new Exception(\"Invalid memory location!!\");\n\t\t}\n\t\treturn memory[index];\n\t}",
"protected void writeLoc(IPositionable loc)\n\t{\n\t\twriteD(loc.getX());\n\t\twriteD(loc.getY());\n\t\twriteD(loc.getZ());\n\t}",
"@Override\n public void setLocation(double x, double y, double z) throws InvalidDataException {\n myMovable.setLocation(x, y, z);\n }",
"public void setWidget(Widget widget, String location) {\n \n if (widget == null) {\n return;\n }\n \n // If no given location is found in the layout, and exception is throws\n Element elem = (Element) locationToElement.get(location);\n if (elem == null && hasTemplate()) {\n throw new IllegalArgumentException(\"No location \" + location\n + \" found\");\n }\n \n // Get previous widget\n Widget previous = (Widget) locationToWidget.get(location);\n // NOP if given widget already exists in this location\n if (previous == widget) {\n return;\n }\n remove(previous);\n \n // if template is missing add element in order\n if (!hasTemplate()) {\n elem = getElement();\n }\n \n // Add widget to location\n super.add(widget, elem);\n locationToWidget.put(location, widget);\n }",
"public abstract void put(long position, ByteBuffer src);",
"@Override\n public void writeWord(int offset, int value) throws MemoryAccessException\n {\n switch( offset )\n {\n case 0x2e: // COPCON\n copper.copperDanger = (value & 0b10) != 0; // bit 1 = Copper Danger bit\n return;\n case 0x80: // COP1LCH\n copper.list1Addr = (copper.list1Addr & 0x0000ffff) | ((value & 0xffff) << 16);\n return;\n case 0x82: // COP1LCL\n copper.list1Addr = (copper.list1Addr & 0xffff0000) | (value & 0xffff);\n return;\n case 0x84: // COP2LCH\n copper.list2Addr = (copper.list2Addr & 0x0000ffff) | ((value & 0xffff) << 16);\n return;\n case 0x86: // COP2LCL\n copper.list2Addr = (copper.list2Addr & 0xffff0000) | (value & 0xffff);\n return;\n case 0x88: // COPJMP1\n copper.pc = copper.list1Addr;\n return;\n case 0x8a: // COPJMP2\n copper.pc = copper.list2Addr;\n return;\n case 0x8c: // COPINS\n // TODO: Does writing here have any effect ?\n return;\n case 0x100: bplcon0 = value; return;\n case 0x102: bplcon1 = value; return;\n case 0x104: bplcon2 = value; return;\n case 0x106: bplcon3 = value; return;\n case 0x108: bpl1mod = value & 0xffff; return;\n case 0x10a: bpl2mod = value & 0xffff; return;\n }\n // color registers\n if ( offset >= 0x180 && offset <= 0x1bf) {\n final int idx = (offset-0x180)>>>1;\n colors[idx] = value;\n return;\n }\n // bitplane pointers**\n if ( offset >= 0x0e2 && offset <= 0x0f7) {\n final int idx = (offset-0x0e2)>>>2;\n switch((offset-0x0e2) & 0b10) {\n case 0b00: bplPointers[idx] = (bplPointers[idx] & 0x0000ffff) | ((value<<16) & 0xffff0000); break;\n case 0b10: bplPointers[idx] = (bplPointers[idx] & 0xffff0000) | ((value ) & 0x0000ffff); break;\n default:\n throw new RuntimeException(\"Unreachable code reached\");\n }\n return;\n }\n // bit plane data registers\n if ( offset >= 0x110 && offset <= 0x11b ) {\n final int idx = (offset-0x110)>>>1;\n bpldat[idx] = value;\n return;\n }\n if ( LOG.isInfoEnabled() )\n {\n final RegisterDescription desc = REGISTER_RESOLVER.resolve( 0xdff000 + offset );\n final String regName = (desc == null ? \"\" : desc.name) + \" (\"+Misc.hex( 0xdff000 + offset )+\")\";\n LOG.info( \"VIDEO: Unhandled word write \" + Misc.hex( value ) + \" (\" + Misc.binary16Bit( value ) + \") to \"+regName );\n }\n }",
"public com.babbler.ws.io.avro.model.BabbleValue.Builder setLocation(java.lang.String value) {\n validate(fields()[3], value);\n this.location = value;\n fieldSetFlags()[3] = true;\n return this;\n }",
"@Override\r\n public void store(long key, O object) throws OBException {\n }",
"public void setObjectAtLocation(Point p, Object o);",
"public void setValueAt(Object aValue, int row, int column)\n {\n\n }",
"@Override\n public void put(long position, ByteBuffer src) {\n final ByteBuffer bd = this.getOrCreateBackingBB(position).duplicate();\n final long offset = this.getBackingBBOffset();\n bd.position(NumbersUtils.asInt(position-offset));\n bd.put(src);\n }",
"public void setStorageplace(int newStorageplace) {\n\tstorageplace = newStorageplace;\n}",
"public void setFixed(entity.LocationNamedInsured value);",
"public void internalStore() {\r\n\t\tdata = busInt.get();\r\n\t}",
"ValueType put(long key, ValueType entry);",
"@Override\n\tpublic void setLocation(Point location) throws CannotPlaceUserException {\n\t\tsuper.setLocation(location);\n\t}",
"public final void setLocation(String value) {\n location = value;\n }",
"@Nonnull\n public Win32ProcessMemoryPointer write(@Nonnegative long offset, @Nonnegative int length, @Nonnegative Pointer sourcePointer) {\n Pointer pointer = this.resolvePointer(offset);\n IntByReference bytesWritten = new IntByReference();\n Kernel32.INSTANCE.WriteProcessMemory(this.process.accessHandle, pointer, sourcePointer, length, bytesWritten);\n\n if (bytesWritten.getValue() != length) {\n throw new ProcessMemoryWriteException(String.format(\"Failed to write process memory at address 0x%016X: Expected to write %d bytes but wrote %d bytes\", Pointer.nativeValue(pointer), length, bytesWritten.getValue()));\n }\n\n return this;\n }",
"public native bool kbSetTownLocation(vector location);",
"public Builder setStoreChunkLocation(\n edu.usfca.cs.dfs.StorageMessages.StoreChunkLocation.Builder builderForValue) {\n if (storeChunkLocationBuilder_ == null) {\n msg_ = builderForValue.build();\n onChanged();\n } else {\n storeChunkLocationBuilder_.setMessage(builderForValue.build());\n }\n msgCase_ = 7;\n return this;\n }",
"public boolean store(String address, boolean boo){\r\n return spd(address, boo, 0, 0.0, \"\", ar, ob, false, 0);\r\n }",
"public int insert( byte[] space, int size )\n {\n caller = \"insert\";\n int position = findMemory( size );\n\n // If position = -1, then there is no available freeBlock large enough\n // to\n // Accommodate the space.\n if ( !( position == -1 ) )\n {\n // insert record at position\n for ( int i = 0; i < size; i++ )\n {\n memoryPool[position + i] = space[i];\n }\n\n // update the freeBlockList to match the updated memoryPool.\n updateFreeBlockList( position, size );\n }\n return position;\n }"
]
| [
"0.64279217",
"0.61307806",
"0.564083",
"0.55990636",
"0.54767156",
"0.54739314",
"0.5473845",
"0.5437975",
"0.5410447",
"0.52325636",
"0.5181958",
"0.51698035",
"0.515308",
"0.51498216",
"0.5144274",
"0.51185733",
"0.5093576",
"0.5087543",
"0.50654393",
"0.5035856",
"0.5007616",
"0.49825886",
"0.4944567",
"0.49284333",
"0.49183464",
"0.49153286",
"0.49049246",
"0.48954362",
"0.48639345",
"0.4831194",
"0.4827336",
"0.4826307",
"0.48260725",
"0.48075294",
"0.48053095",
"0.47879204",
"0.4784252",
"0.47839913",
"0.4748879",
"0.47363788",
"0.47361302",
"0.4714218",
"0.47119212",
"0.4698599",
"0.46828008",
"0.4672122",
"0.4671153",
"0.46652806",
"0.4657086",
"0.46559164",
"0.46465454",
"0.46448332",
"0.46382874",
"0.46370032",
"0.46352893",
"0.46336755",
"0.46310896",
"0.46305007",
"0.4620952",
"0.46026644",
"0.4599321",
"0.45897868",
"0.45853794",
"0.45822883",
"0.45779738",
"0.45738557",
"0.45663214",
"0.45647994",
"0.45541045",
"0.45443907",
"0.4538641",
"0.45382932",
"0.45281887",
"0.4526125",
"0.45201364",
"0.45136952",
"0.45136952",
"0.4508484",
"0.45071247",
"0.4503504",
"0.45019552",
"0.45009056",
"0.45008042",
"0.44821537",
"0.44800803",
"0.44775608",
"0.44752297",
"0.44708124",
"0.44679743",
"0.4463521",
"0.44609892",
"0.4457705",
"0.445744",
"0.4454306",
"0.4453025",
"0.4451333",
"0.44511932",
"0.44507253",
"0.44385493",
"0.4434635"
]
| 0.7982262 | 0 |
TODO Autogenerated method stub | @Override
public int increaseUserMakerThemeNumById(UserMakerThemePojo userMakerTheme) {
return userMakerThemeDao.increaseUserMakerThemeNumById(userMakerTheme);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public int decreaseUserMakerThemeNumById(UserMakerThemePojo userMakerTheme) {
return userMakerThemeDao.decreaseUserMakerThemeNumById(userMakerTheme);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
Prepare the FreeMarker configuration; Load templates from the WEBINF/templates directory of the Web app. | public void init()
{ Prepare the FreeMarker configuration;
// - Load templates from the WEB-INF/templates directory of the Web app.
//
cfg = new Configuration();
cfg.setServletContextForTemplateLoading(
getServletContext(),
"WEB-INF/templates"
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void init(){\n\t\tcfg = new Configuration();\r\n\t\tcfg.setServletContextForTemplateLoading(getServletContext(), \"WEB-INF/templates\");\r\n }",
"public void init() {\n\t\tcfg = new Configuration(Configuration.VERSION_2_3_25);\r\n\r\n\t\t// Specify the source where the template files come from.\r\n\t\tcfg.setServletContextForTemplateLoading(getServletContext(), templateDir);\r\n\r\n\t\t// Sets how errors will appear.\r\n\t\t// During web page *development* TemplateExceptionHandler.HTML_DEBUG_HANDLER is better.\r\n\t\t// This handler outputs the stack trace information to the client, formatting it so \r\n\t\t// that it will be usually well readable in the browser, and then re-throws the exception.\r\n\t\t//\t\tcfg.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);\r\n\t\tcfg.setTemplateExceptionHandler(TemplateExceptionHandler.HTML_DEBUG_HANDLER);\r\n\r\n\t\t// Don't log exceptions inside FreeMarker that it will thrown at you anyway:\r\n\t\t// Specifies if TemplateException-s thrown by template processing are logged by FreeMarker or not. \r\n\t\t//\t\tcfg.setLogTemplateExceptions(false);\r\n\t}",
"@Override\n public void crappieInit(ServletContext context) {\n\n Configuration freemarkerConfig = new Configuration();\n freemarkerConfig.setServletContextForTemplateLoading(context, \"\");\n setTemplateEngine(new FreeMarkerEngine(freemarkerConfig));\n }",
"@Before\n public void setup() throws IOException {\n TemplateLoader normalLoader = freemarkerConfig.getConfiguration().getTemplateLoader();\n freemarkerConfig.getConfiguration().setTemplateLoader(new MultiTemplateLoader(new TemplateLoader[] {\n new FileTemplateLoader(new File(\"CommonWeb/web/WEB-INF/freemarker\")),\n normalLoader\n }));\n\n // Setup Spring test in standalone mode\n this.mockMvc = MockMvcBuilders\n .webAppContextSetup(webApplicationContext)\n .build();\n }",
"private static FreeMarkerEngine createEngine() {\n Configuration config = new Configuration();\n File templates = new File(\"src/main/resources/spark/template/freemarker\");\n try {\n config.setDirectoryForTemplateLoading(templates);\n } catch (IOException ioe) {\n System.out.printf(\"ERROR: Unable use %s for template loading.%n\", templates);\n System.exit(1);\n }\n return new FreeMarkerEngine(config);\n }",
"public void loadTemplates()\n {\n for (PageTemplate template : templates.values())\n {\n template.load(pageDirectory);\n }\n }",
"protected final TemplateLoader getTemplateLoader(Configuration config, String themeDir) {\n \n ServletContext context = getServletContext();\n String themeTemplateDir = context.getRealPath(themeDir) + \"/templates\";\n String vitroTemplateDir = context.getRealPath(\"/templates/freemarker\");\n\n try {\n FileTemplateLoader themeFtl = new FileTemplateLoader(new File(themeTemplateDir));\n FileTemplateLoader vitroFtl = new FileTemplateLoader(new File(vitroTemplateDir));\n ClassTemplateLoader ctl = new ClassTemplateLoader(getClass(), \"\");\n TemplateLoader[] loaders = new TemplateLoader[] { themeFtl, vitroFtl, ctl };\n MultiTemplateLoader mtl = new MultiTemplateLoader(loaders);\n return mtl;\n } catch (IOException e) {\n log.error(\"Error loading templates\");\n return null;\n }\n \n }",
"public void init() {\n\n\t\tString rootdir = null;\n\t\ttry {\n\t\t\trootdir = ServletActionContext.getServletContext().getRealPath(\"/\");\n\t\t} catch (Exception ex) {\n\n\t\t}\n\n\t\tif (rootdir == null) {\n\t\t\trootdir = \"/Users/huangic/Documents/jetty-6.1.22/webapps/TransWeb\";\n\t\t}\n\n\t\tlogger.debug(rootdir);\n\t\tString classesdir = rootdir + \"/WEB-INF/classes/\";\n\t\tthis.xmlBatchRule = ReadXML(classesdir\n\t\t\t\t+ \"applicationContext-BatchRule.xml\");\n\t\tthis.xmlDB = ReadXML(classesdir + \"applicationContext-DB.xml\");\n\t\tthis.xmlSystem = ReadXML(classesdir + \"applicationContext-system.xml\");\n\n\t}",
"private static void initJspContext(WebAppContext webapp) throws IOException {\n File tempDir = new File(System.getProperty(\"java.io.tmpdir\"));\n File scratchDir = new File(tempDir.toString(),\"embedded-jetty-jsp\");\n\n if (!scratchDir.exists()) {\n if (!scratchDir.mkdirs()) {\n throw new IOException(\"Unable to create scratch directory: \" + scratchDir);\n }\n }\n\n webapp.setAttribute(\"javax.servlet.context.tempdir\",scratchDir);\n webapp.setAttribute(InstanceManager.class.getName(), new SimpleInstanceManager());\n \n\n //Ensure the jsp engine is initialized correctly\n JettyJasperInitializer sci = new JettyJasperInitializer();\n ServletContainerInitializersStarter sciStarter = new ServletContainerInitializersStarter(webapp);\n ContainerInitializer initializer = new ContainerInitializer(sci, null);\n List<ContainerInitializer> initializers = new ArrayList<ContainerInitializer>();\n initializers.add(initializer);\n\n webapp.setAttribute(\"org.eclipse.jetty.containerInitializers\", initializers);\n webapp.addBean(sciStarter, true);\n\n // Add JSP Servlet (must be named \"jsp\")\n ServletHolder holderJsp = new ServletHolder(\"jsp\",JspServlet.class);\n holderJsp.setInitOrder(0);\n holderJsp.setInitParameter(\"logVerbosityLevel\",\"DEBUG\");\n holderJsp.setInitParameter(\"fork\",\"false\");\n holderJsp.setInitParameter(\"xpoweredBy\",\"false\");\n holderJsp.setInitParameter(\"compilerTargetVM\",\"1.7\");\n holderJsp.setInitParameter(\"compilerSourceVM\",\"1.7\");\n holderJsp.setInitParameter(\"keepgenerated\",\"true\");\n webapp.addServlet(holderJsp,\"*.jsp\");\n //context.addServlet(holderJsp,\"*.jspf\");\n //context.addServlet(holderJsp,\"*.jspx\");\n\t}",
"public void init(ServletConfig config) throws ServletException {\n\t\tsuper.init(config);\r\n \tthis.pageName = getInitParameter(\"pageName\");\r\n \tthis.template = service.templates(pageName); \r\n\r\n\t\t\r\n\t}",
"public static void init(){\n velocityEngine = new VelocityEngine();\n Properties velocityProperties = new Properties();\n velocityProperties.put(\"resource.loader\", \"class\");\n velocityProperties.put(\"class.resource.loader.class\",\n \"org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader\");\n velocityProperties.put(\"class.resource.loader\", \"/WEB-INF/classes/\");\n velocityEngine.init(velocityProperties);\n }",
"@Override\n protected void initializeImpl() {\n // init templates map\n this.httpRequestTemplateMap = new HashMap<String, String>();\n\n String[] templateNames = new String[] {\n FaxJob2HTTPRequestConverterConfigurationConstants.SUBMIT_FAX_JOB_TEMPLATE_PROPERTY_KEY.toString(),\n FaxJob2HTTPRequestConverterConfigurationConstants.SUSPEND_FAX_JOB_TEMPLATE_PROPERTY_KEY.toString(),\n FaxJob2HTTPRequestConverterConfigurationConstants.RESUME_FAX_JOB_TEMPLATE_PROPERTY_KEY.toString(),\n FaxJob2HTTPRequestConverterConfigurationConstants.CANCEL_FAX_JOB_TEMPLATE_PROPERTY_KEY.toString(),\n FaxJob2HTTPRequestConverterConfigurationConstants.GET_FAX_JOB_STATUS_TEMPLATE_PROPERTY_KEY.toString() };\n\n // get templates amount\n int amount = templateNames.length;\n\n // get template encoding value\n String encoding = this.getConfigurationValue(\n FaxJob2HTTPRequestConverterConfigurationConstants.TEMPLATE_ENCODING_PROPERTY_KEY);\n\n String templateName = null;\n String urlStr = null;\n URL url = null;\n String template = null;\n for (int index = 0; index < amount; index++) {\n // get next element\n templateName = templateNames[index];\n\n // get URL string\n urlStr = this.getConfigurationValue(templateName);\n\n if (urlStr != null) {\n try {\n // create URL\n url = new URL(urlStr);\n\n // read template\n InputStream stream = url.openStream();\n Reader reader = IOHelper.createReader(stream, encoding);\n template = IOHelper.readTextStream(reader);\n\n // cache template\n this.httpRequestTemplateMap.put(templateName, template);\n } catch (Throwable throwable) {\n throw new FaxException(\"Unable to load template for URL: \" + urlStr, throwable);\n }\n }\n }\n }",
"public void init( ServletConfig cfg ) throws ServletException {\n super.init( cfg );\n\n String controllerFile = getInitParameter( \"Handler.configFile\" );\n if ( ! ( new File( controllerFile ).exists() ) ) {\n controllerFile = getServletContext().getRealPath( controllerFile );\n }\n String clientContext = this.getInitParameter( \"MapContext.configFile\" );\n if ( ! ( new File( clientContext ).exists() ) ) {\n clientContext = getServletContext().getRealPath( clientContext );\n try {\n File file = new File( clientContext );\n vc = WebMapContextFactory.createViewContext( file.toURL(), null, null );\n appHandler = new MapApplicationHandler( controllerFile, vc );\n } catch(Exception e) {\n e.printStackTrace();\n }\n } \n }",
"protected void initErrorTemplate(ServletConfig config) throws ServletException {\n if (errorTemplateFile == null) {\n errorTemplateFile = config.getInitParameter(\"wings.error.template\");\n }\n }",
"private void setupJspHandler(WebAppContext context) throws IOException {\n JettyJasperInitializer sci = new JettyJasperInitializer();\n\n ServletContainerInitializersStarter sciStarter = new ServletContainerInitializersStarter(context);\n ContainerInitializer initializer = new ContainerInitializer(sci, null);\n List<ContainerInitializer> initializers = new ArrayList<ContainerInitializer>();\n initializers.add(initializer);\n context.setAttribute(\"org.eclipse.jetty.containerInitializers\", initializers);\n context.addBean(sciStarter, true);\n System.setProperty(\"org.apache.jasper.compiler.disablejsr199\",\"false\");\n\n // Set Classloader of Context to be sane (needed for JSTL)\n // JSP requires a non-System classloader, this simply wraps the\n // embedded System classloader in a way that makes it suitable\n // for JSP to use\n ClassLoader jspClassLoader = new URLClassLoader(new URL[0], this.getClass().getClassLoader());\n context.setClassLoader(jspClassLoader);\n\n // Add JSP Servlet (must be named \"jsp\")\n ServletHolder holderJsp = new ServletHolder(\"jsp\", JettyJspServlet.class);\n holderJsp.setInitOrder(0);\n holderJsp.setInitParameter(\"logVerbosityLevel\",\"INFO\");\n holderJsp.setInitParameter(\"fork\",\"false\");\n holderJsp.setInitParameter(\"xpoweredBy\",\"false\");\n holderJsp.setInitParameter(\"compilerTargetVM\",\"1.8\");\n holderJsp.setInitParameter(\"compilerSourceVM\",\"1.8\");\n holderJsp.setInitParameter(\"keepgenerated\",\"true\");\n context.addServlet(holderJsp, \"*.jsp\");\n }",
"public void createModuleJSPPath() {\n\t\tString[] onlyFolderNames = new String[] {\n\t\t\tmInstance.getWebModuleCompileJspPath(),\n\t\t\tmModuleName\n\t\t};\n\t\t\n\t\tmModuleJSPPath = StringUtils.makeFilePath (onlyFolderNames, false);\n\t}",
"private void loadAdditionalTemplateBundles(List<TemplateBundle> templates) {\n\t\t\n\t\tString paths = JaspersoftStudioPlugin.getInstance().getPreferenceStore()\n\t\t\t\t.getString(TemplateLocationsPreferencePage.TPP_TEMPLATES_LOCATIONS_LIST);\n\t\tStringTokenizer st = new StringTokenizer(paths, File.pathSeparator + \"\\n\\r\");\n\t\tArrayList<String> pathsList = new ArrayList<String>();\n\t\twhile (st.hasMoreTokens()) {\n\t\t\tpathsList.add(st.nextToken());\n\t\t}\n\t\t\n\t\tfor (String dir : pathsList) {\n\t\t\tFile[] files = new File(dir).listFiles(new FileFilter() {\n\t\t\t\t@Override\n\t\t\t\tpublic boolean accept(File f) {\n\t\t\t\t\treturn f.getName().endsWith(\".jrxml\"); //$NON-NLS-1$\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (files != null) {\n\t\t\t\tfor (File f : files) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tTemplateBundle bundle = new TableTemplateBunlde(f.toURI().toURL(), true, JasperReportsConfiguration.getDefaultInstance());\n\t\t\t\t\t\tif (bundle != null && tableTemplateKey.equals(bundle.getProperty(BuiltInCategories.ENGINE_KEY))) {\n\t\t\t\t\t\t\ttemplates.add(bundle);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\t\t// Log error but continue...\n\t\t\t\t\t\tJaspersoftStudioPlugin.getInstance().getLog().log(\n\t\t\t\t\t\t\t\tnew Status(IStatus.ERROR,JaspersoftStudioPlugin.PLUGIN_ID,\n\t\t\t\t\t\t\t\t\t\tMessageFormat.format(Messages.DefaultTemplateProvider_TemplateLoadingErr,new Object[]{f.getAbsolutePath()}), ex));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void applyDefaultConfiguration(ServletContext context, Properties properties) {\n // ensure that caching isn't overly aggressive\n\n LOG.debug(\"Load a default resource loader definition if there isn't one present.\");\n if (properties.getProperty(Velocity.RESOURCE_LOADER) == null) {\n properties.setProperty(Velocity.RESOURCE_LOADER, \"strutsfile, strutsclass\");\n }\n\n /*\n * If there's a \"real\" path add it for the strutsfile resource loader.\n * If there's no real path and they haven't configured a loader then we change\n * resource loader property to just use the strutsclass loader\n * Ben Hall (22/08/2003)\n */\n if (context.getRealPath(\"\") != null) {\n properties.setProperty(\"strutsfile.resource.loader.description\", \"Velocity File Resource Loader\");\n properties.setProperty(\"strutsfile.resource.loader.class\", \"org.apache.velocity.runtime.resource.loader.FileResourceLoader\");\n properties.setProperty(\"strutsfile.resource.loader.path\", context.getRealPath(\"\"));\n properties.setProperty(\"strutsfile.resource.loader.modificationCheckInterval\", \"2\");\n properties.setProperty(\"strutsfile.resource.loader.cache\", \"true\");\n } else {\n // remove strutsfile from resource loader property\n String prop = properties.getProperty(Velocity.RESOURCE_LOADER);\n if (prop.contains(\"strutsfile,\")) {\n prop = prop.replace(\"strutsfile,\", \"\");\n } else if (prop.contains(\", strutsfile\")) {\n prop = prop.replace(\", strutsfile\", \"\");\n } else if (prop.contains(\"strutsfile\")) {\n prop = prop.replace(\"strutsfile\", \"\");\n }\n\n properties.setProperty(Velocity.RESOURCE_LOADER, prop);\n }\n\n /*\n * Refactored the Velocity templates for the Struts taglib into the classpath from the web path. This will\n * enable Struts projects to have access to the templates by simply including the Struts jar file.\n * Unfortunately, there does not appear to be a macro for the class loader keywords\n */\n properties.setProperty(\"strutsclass.resource.loader.description\", \"Velocity Classpath Resource Loader\");\n properties.setProperty(\"strutsclass.resource.loader.class\", \"org.apache.struts2.views.velocity.StrutsResourceLoader\");\n properties.setProperty(\"strutsclass.resource.loader.modificationCheckInterval\", \"2\");\n properties.setProperty(\"strutsclass.resource.loader.cache\", \"true\");\n\n // components\n String directives = tagLibraries.stream().map(TagLibraryDirectiveProvider::getDirectiveClasses).flatMap(\n Collection::stream).map(directive -> directive.getName() + \",\").collect(joining());\n\n String userdirective = properties.getProperty(\"userdirective\");\n if (userdirective == null || userdirective.trim().isEmpty()) {\n userdirective = directives;\n } else {\n userdirective = userdirective.trim() + \",\" + directives;\n }\n properties.setProperty(\"userdirective\", userdirective);\n }",
"@Override\r\n\tpublic void init() throws ServletException {\n\t\tProperties prop = new Properties(); \r\n\t\t//InputStream is=getServletContext().getResourceAsStream(\"/WEB-INF/classes/metainfo.properties\");\r\n\t\tInputStream is=this.getClass().getClassLoader().getResourceAsStream(\"metainfo.properties\");\r\n\t\ttry {\r\n\t\t\tprop.load(is);\r\n\t\t\tcreateImagePath(prop);\r\n//\t\t\tContentUtil.FILEPATH=prop.getProperty(\"file.filePath\");\r\n\t\t\tContentUtil.EMAIL_PATH=prop.getProperty(\"system.emailpath\");\r\n\t\t\tContentUtil.EMAILHOST =prop.getProperty(\"system.emailhost\");\r\n\t\t\tContentUtil.EMAILFROM=prop.getProperty(\"system.emailfrom\");\r\n\t\t\tContentUtil.EMAILUSERNAME=prop.getProperty(\"system.emailusername\");\r\n\t\t\tContentUtil.EMAILPASSWORD =prop.getProperty(\"system.emailpassword\");\r\n\t\t\tContentUtil.LOGIN_PATH = prop.getProperty(\"system.loginpath\");\r\n\t\t\tContentUtil.SEND_MESSAGE_URL = prop.getProperty(\"system.sendmessageurl\");\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\tlogger.error(\"配置文件初始化异常\"+e.getMessage());\r\n\t\t} finally{\r\n\t\t\tif(is!=null){\r\n\t\t\t\ttry {\r\n\t\t\t\t\tis.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t}\r\n//\t\tFile file=new File(getServletContext().getRealPath(\"/\")+\"images\");\r\n//\t\tif(!file.exists())\r\n//\t\t\tfile.mkdir();\r\n\t\tsuper.init();\r\n\t}",
"public SpringTemplateLoader(ResourceLoader resourceLoader, String templateLoaderPath)\r\n/* 20: */ {\r\n/* 21:55 */ this.resourceLoader = resourceLoader;\r\n/* 22:56 */ if (!templateLoaderPath.endsWith(\"/\")) {\r\n/* 23:57 */ templateLoaderPath = templateLoaderPath + \"/\";\r\n/* 24: */ }\r\n/* 25:59 */ this.templateLoaderPath = templateLoaderPath;\r\n/* 26:60 */ if (this.logger.isInfoEnabled()) {\r\n/* 27:61 */ this.logger.info(\"SpringTemplateLoader for FreeMarker: using resource loader [\" + this.resourceLoader + \r\n/* 28:62 */ \"] and template loader path [\" + this.templateLoaderPath + \"]\");\r\n/* 29: */ }\r\n/* 30: */ }",
"@Bean\n public SpringResourceTemplateResolver templateResolver() {\n SpringResourceTemplateResolver templateResolver = new SpringResourceTemplateResolver();\n templateResolver.setApplicationContext(applicationContext);\n templateResolver.setPrefix(\"/WEB-INF/views/\");\n templateResolver.setSuffix(\".html\");\n return templateResolver;\n }",
"public static void getFreeMarkerComponentsForJsp(HttpServletRequest request) {\n // We need to create a FreeMarkerHttpServlet object in order to call the instance methods\n // to set up the data model.\n new FreeMarkerComponentGenerator(request);\n }",
"@Bean\n\tpublic SpringResourceTemplateResolver templateResolver() {\n\n\t\tSystem.out.println(\"execution is reaching templateResolver()\");\n\t\tSpringResourceTemplateResolver resolver = new SpringResourceTemplateResolver();\n\t\tresolver.setApplicationContext(applicationContext);\n\t\tresolver.setPrefix(\"/WEB-INF/views/templetes/\");\n\t\tresolver.setSuffix(\".html\");\n\t\tresolver.setTemplateMode(TemplateMode.HTML);\n\t\tresolver.setCacheable(false);\n\t\treturn resolver;\n\t}",
"@Override\n public Integer call() {\n if (properties != null && !properties.isEmpty()) {\n System.getProperties().putAll(properties);\n }\n\n final List<File> templateDirectories = getTemplateDirectories(baseDir);\n\n final Settings settings = Settings.builder()\n .setArgs(args)\n .setTemplateDirectories(templateDirectories)\n .setTemplateName(template)\n .setSourceEncoding(sourceEncoding)\n .setOutputEncoding(outputEncoding)\n .setOutputFile(outputFile)\n .setInclude(include)\n .setLocale(locale)\n .isReadFromStdin(readFromStdin)\n .isEnvironmentExposed(isEnvironmentExposed)\n .setSources(sources != null ? sources : new ArrayList<>())\n .setProperties(properties != null ? properties : new HashMap<>())\n .setWriter(writer(outputFile, outputEncoding))\n .build();\n\n try {\n return new FreeMarkerTask(settings).call();\n } finally {\n if (settings.hasOutputFile()) {\n close(settings.getWriter());\n }\n }\n }",
"private Templates load(URL fileSource) throws Exception {\n return m_factory.newTemplates(new StreamSource(fileSource.openStream()));\n }",
"@Override\n public void init() throws ServletException {\n super.init();\n\n dbConfigResource = getServletContext().getInitParameter(\"dbConfigResource\");\n jspPath = getServletContext().getInitParameter(\"jspPath\");\n }",
"public void init(ServletConfig config) throws ServletException {\n\t\tServletContext context = config.getServletContext();\n\t\tcontact = context.getRequestDispatcher(\"/WEB-INF/jsp/contact.jsp\");\n\n\t}",
"@Override\n\tpublic List<TemplateBundle> getTemplateBundles() {\n\t\tList<TemplateBundle> templates = new ArrayList<TemplateBundle>();\t\n\t\tif (cache == null){\n\t\t\tcache = new ArrayList<TemplateBundle>();\n\t\t\tEnumeration<?> en = JaspersoftStudioPlugin.getInstance().getBundle().findEntries(\"templates/table\", \"*.jrxml\", false); //Doesn't search in the subdirectories\n\t\t\twhile (en.hasMoreElements()) {\n\t\t\t\tURL templateURL = (URL) en.nextElement();\n\t\t\t\ttry {\n\t\t\t\t\tTemplateBundle bundle = new TableTemplateBunlde(templateURL, JasperReportsConfiguration.getDefaultInstance());\n\t\t\t\t\tif (bundle != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tcache.add(bundle);\n\t\t\t\t\t}\t\n\t\t\t\t} catch (Exception ex) \t{\n\t\t\t\t\t// Log error but continue...\n\t\t\t\t\tJaspersoftStudioPlugin.getInstance().getLog().log(\n\t\t\t\t\t\t\tnew Status(IStatus.ERROR,JaspersoftStudioPlugin.PLUGIN_ID,\n\t\t\t\t\t\t\t\t\tMessageFormat.format(Messages.DefaultTemplateProvider_TemplateLoadingErr,new Object[]{templateURL}), ex));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\ttemplates.addAll(cache);\n\t\tloadAdditionalTemplateBundles(templates);\n\t\treturn templates;\n\t}",
"private void enableEmbeddedJspSupport(ServletContextHandler servletContextHandler) throws IOException {\n // Establish Scratch directory for the servlet context (used by JSP compilation)\n File tempDir = new File(System.getProperty(\"java.io.tmpdir\"));\n File scratchDir = new File(tempDir.toString(), \"embedded-jetty-jsp\");\n\n if (!scratchDir.exists()) {\n if (!scratchDir.mkdirs()) {\n throw new IOException(\"Unable to create scratch directory: \" + scratchDir);\n }\n }\n servletContextHandler.setAttribute(\"javax.servlet.context.tempdir\", scratchDir);\n\n // Set Classloader of Context to be sane (needed for JSTL)\n // JSP requires a non-System classloader, this simply wraps the\n // embedded System classloader in a way that makes it suitable\n // for JSP to use\n ClassLoader jspClassLoader = new URLClassLoader(new URL[0], this.getClass().getClassLoader());\n servletContextHandler.setClassLoader(jspClassLoader);\n\n // Manually call JettyJasperInitializer on context startup\n servletContextHandler.addBean(new JspStarter(servletContextHandler));\n\n // Create / Register JSP Servlet (must be named \"jsp\" per spec)\n ServletHolder holderJsp = new ServletHolder(\"jsp\", JettyJspServlet.class);\n holderJsp.setInitOrder(0);\n holderJsp.setInitParameter(\"logVerbosityLevel\", \"DEBUG\");\n holderJsp.setInitParameter(\"fork\", \"false\");\n holderJsp.setInitParameter(\"xpoweredBy\", \"false\");\n holderJsp.setInitParameter(\"compilerTargetVM\", \"1.8\");\n holderJsp.setInitParameter(\"compilerSourceVM\", \"1.8\");\n holderJsp.setInitParameter(\"keepgenerated\", \"true\");\n servletContextHandler.addServlet(holderJsp, \"*.jsp\");\n }",
"public Properties loadConfiguration(ServletContext context) {\n if (context == null) {\n String gripe = \"Error attempting to create a loadConfiguration from a null ServletContext!\";\n LOG.error(gripe);\n throw new IllegalArgumentException(gripe);\n }\n\n Properties properties = new Properties();\n\n // now apply our systemic defaults, then allow user to override\n applyDefaultConfiguration(context, properties);\n\n String defaultUserDirective = properties.getProperty(\"userdirective\");\n\n /*\n if the user has specified an external velocity configuration file, we'll want to search for it in the\n following order\n\n 1. relative to the context path\n 2. relative to /WEB-INF\n 3. in the class path\n */\n String configfile;\n\n if (customConfigFile != null) {\n configfile = customConfigFile;\n } else {\n configfile = \"velocity.properties\";\n }\n configfile = configfile.trim();\n\n InputStream in = null;\n String resourceLocation = null;\n\n try {\n if (context.getRealPath(configfile) != null) {\n // 1. relative to context path, i.e. /velocity.properties\n String filename = context.getRealPath(configfile);\n\n if (filename != null) {\n File file = new File(filename);\n\n if (file.isFile()) {\n resourceLocation = file.getCanonicalPath() + \" from file system\";\n in = new FileInputStream(file);\n }\n\n // 2. if nothing was found relative to the context path, search relative to the WEB-INF directory\n if (in == null) {\n file = new File(context.getRealPath(\"/WEB-INF/\" + configfile));\n\n if (file.isFile()) {\n resourceLocation = file.getCanonicalPath() + \" from file system\";\n in = new FileInputStream(file);\n }\n }\n }\n }\n\n // 3. finally, if there's no physical file, how about something in our classpath\n if (in == null) {\n in = VelocityManager.class.getClassLoader().getResourceAsStream(configfile);\n if (in != null) {\n resourceLocation = configfile + \" from classloader\";\n }\n }\n\n // if we've got something, load 'er up\n if (in != null) {\n LOG.info(\"Initializing velocity using {}\", resourceLocation);\n properties.load(in);\n }\n } catch (IOException e) {\n LOG.warn(\"Unable to load velocity configuration {}\", resourceLocation, e);\n } finally {\n if (in != null) {\n try {\n in.close();\n } catch (IOException ignore) {\n }\n }\n }\n\n // overide with programmatically set properties\n if (velocityProperties != null) {\n for (Object o : velocityProperties.keySet()) {\n String key = (String) o;\n properties.setProperty(key, this.velocityProperties.getProperty(key));\n }\n }\n\n String userdirective = properties.getProperty(\"userdirective\");\n if (userdirective == null || userdirective.trim().isEmpty()) {\n userdirective = defaultUserDirective;\n } else {\n userdirective = userdirective.trim() + \",\" + defaultUserDirective;\n }\n properties.setProperty(\"userdirective\", userdirective);\n\n // for debugging purposes, allows users to dump out the properties that have been configured\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Initializing Velocity with the following properties ...\");\n\n for (Object o : properties.keySet()) {\n String key = (String) o;\n String value = properties.getProperty(key);\n LOG.debug(\" '{}' = '{}'\", key, value);\n }\n }\n\n return properties;\n }",
"protected String getPageTemplateName() {\n return \"page.ftl\";\n }",
"public JspConfig getJspConfig();",
"@Test\n public void testTemplate1() throws Exception {\n TemplateWebApplication webApp = new TemplateWebApplication(\"src/main/template1\");\n webApp.initialize();\n webApp.start();\n\n TemplateHttpServletRequest request = new TemplateHttpServletRequest();\n request.setWebApplication(webApp);\n request.setContextPath(\"\");\n request.setServletPath(\"/faces\");\n request.setPathInfo(\"/notfound.html\");\n\n TemplateHttpServletResponse response = new TemplateHttpServletResponse();\n TemplateServletOutputStream outputStream = new TemplateServletOutputStream();\n response.setOutputStream(outputStream);\n outputStream.setResponse(response);\n\n webApp.service(request, response);\n\n assertEquals(404, response.getStatus());\n }",
"private void loadExtensionResources() {\n\n for (String extensionType : ExtensionMgtUtils.getExtensionTypes()) {\n Path path = ExtensionMgtUtils.getExtensionPath(extensionType);\n if (log.isDebugEnabled()) {\n log.debug(\"Loading default templates from: \" + path);\n }\n\n // Check whether the given extension type directory exists.\n if (!Files.exists(path) || !Files.isDirectory(path)) {\n if (log.isDebugEnabled()) {\n log.debug(\"Default templates directory does not exist: \" + path);\n }\n continue;\n }\n\n ExtensionManagerDataHolder.getInstance().getExtensionStore().addExtensionType(extensionType);\n\n // Load extensions from the given extension type directory.\n try (Stream<Path> directories = Files.list(path).filter(Files::isDirectory)) {\n directories.forEach(extensionDirectory -> {\n try {\n // Load extension info.\n ExtensionInfo extensionInfo = loadExtensionInfo(extensionDirectory);\n if (extensionInfo == null) {\n throw new ExtensionManagementException(\"Error while loading extension info from: \"\n + extensionDirectory);\n }\n extensionInfo.setType(extensionType);\n ExtensionManagerDataHolder.getInstance().getExtensionStore().addExtension(extensionType,\n extensionInfo.getId(), extensionInfo);\n // Load templates.\n JSONObject template = loadTemplate(extensionDirectory);\n if (template != null) {\n ExtensionManagerDataHolder.getInstance().getExtensionStore().addTemplate(extensionType,\n extensionInfo.getId(), template);\n }\n // Load metadata.\n JSONObject metadata = loadMetadata(extensionDirectory);\n if (metadata != null) {\n ExtensionManagerDataHolder.getInstance().getExtensionStore().addMetadata(extensionType,\n extensionInfo.getId(), metadata);\n }\n } catch (ExtensionManagementException e) {\n log.error(\"Error while loading resource files in: \" + extensionDirectory, e);\n }\n });\n } catch (IOException e) {\n log.error(\"Error while loading resource files in: \" + path, e);\n }\n }\n }",
"public Object generateContent(PhpWebEnvironment webEnv)\r\n throws IOException, ServletException {\r\n super.startBlock(\"__wp_admin_upgrade_block1\");\r\n gVars.webEnv = webEnv;\r\n gConsts.setWP_INSTALLING(true);\r\n\r\n if (!FileSystemOrSocket.file_exists(gVars.webEnv, \"../wp-config.php\")) {\r\n System.exit(\r\n \"There doesn\\'t seem to be a <code>wp-config.php</code> file. I need this before we can get started. Need more help? <a href=\\'http://codex.wordpress.org/Installing_WordPress#Step_3:_Set_up_wp-config.php\\'>We got it</a>. You can create a <code>wp-config.php</code> file through a web interface, but this doesn\\'t work for all server setups. The safest way is to manually create the file.</p><p><a href=\\'setup-config.php\\' class=\\'button\\'>Create a Configuration File</a>\");\r\n }\r\n\r\n require(gVars, gConsts, Wp_configPage.class);\r\n getIncluded(Wp_settingsPage.class, gVars, gConsts).timer_start();\r\n\r\n /* Condensed dynamic construct */\r\n requireOnce(gVars, gConsts, UpgradePage.class);\r\n\r\n if (isset(gVars.webEnv._GET.getValue(\"step\"))) {\r\n gVars.step = intval(gVars.webEnv._GET.getValue(\"step\"));\r\n } else {\r\n gVars.step = 0;\r\n }\r\n\r\n Network.header(\r\n gVars.webEnv,\r\n \"Content-Type: \" + getIncluded(FunctionsPage.class, gVars, gConsts).get_option(\"html_type\") + \"; charset=\" + getIncluded(FunctionsPage.class, gVars, gConsts).get_option(\"blog_charset\"));\r\n\r\n /* Start of block */\r\n super.startBlock(\"__wp_admin_upgrade_block2\");\r\n getIncluded(General_templatePage.class, gVars, gConsts).language_attributes(\"html\");\r\n\r\n /* Start of block */\r\n super.startBlock(\"__wp_admin_upgrade_block3\");\r\n getIncluded(General_templatePage.class, gVars, gConsts).bloginfo(\"html_type\");\r\n\r\n /* Start of block */\r\n super.startBlock(\"__wp_admin_upgrade_block4\");\r\n echo(gVars.webEnv, getIncluded(FunctionsPage.class, gVars, gConsts).get_option(\"blog_charset\"));\r\n\r\n /* Start of block */\r\n super.startBlock(\"__wp_admin_upgrade_block5\");\r\n getIncluded(L10nPage.class, gVars, gConsts)._e(\"WordPress › Upgrade\", \"default\");\r\n\r\n /* Start of block */\r\n super.startBlock(\"__wp_admin_upgrade_block6\");\r\n getIncluded(General_templatePage.class, gVars, gConsts).wp_admin_css(\"css/install\");\r\n\r\n /* Start of block */\r\n super.startBlock(\"__wp_admin_upgrade_block7\");\r\n\r\n if (equal(getIncluded(FunctionsPage.class, gVars, gConsts).get_option(\"db_version\"), gVars.wp_db_version)) {\r\n echo(gVars.webEnv, \"\\n<h2>\");\r\n getIncluded(L10nPage.class, gVars, gConsts)._e(\"No Upgrade Required\", \"default\");\r\n echo(gVars.webEnv, \"</h2>\\n<p>\");\r\n getIncluded(L10nPage.class, gVars, gConsts)._e(\"Your WordPress database is already up-to-date!\", \"default\");\r\n echo(gVars.webEnv, \"</p>\\n<h2 class=\\\"step\\\"><a href=\\\"\");\r\n echo(gVars.webEnv, getIncluded(FunctionsPage.class, gVars, gConsts).get_option(\"home\"));\r\n echo(gVars.webEnv, \"/\\\">\");\r\n getIncluded(L10nPage.class, gVars, gConsts)._e(\"Continue\", \"default\");\r\n echo(gVars.webEnv, \"</a></h2>\\n\\n\");\r\n } else {\r\n switch (gVars.step) {\r\n case 0: {\r\n gVars.goback = Strings.stripslashes(gVars.webEnv, getIncluded(FunctionsPage.class, gVars, gConsts).wp_get_referer());\r\n gVars.goback = getIncluded(FormattingPage.class, gVars, gConsts).clean_url(gVars.goback, null, \"url\");\r\n gVars.goback = URL.urlencode(gVars.goback);\r\n echo(gVars.webEnv, \"<h2>\");\r\n getIncluded(L10nPage.class, gVars, gConsts)._e(\"Database Upgrade Required\", \"default\");\r\n echo(gVars.webEnv, \"</h2>\\n<p>\");\r\n getIncluded(L10nPage.class, gVars, gConsts)._e(\"Your WordPress database is out-of-date, and must be upgraded before you can continue.\", \"default\");\r\n echo(gVars.webEnv, \"</p>\\n<p>\");\r\n getIncluded(L10nPage.class, gVars, gConsts)._e(\"The upgrade process may take a while, so please be patient.\", \"default\");\r\n echo(gVars.webEnv, \"</p>\\n<h2 class=\\\"step\\\"><a href=\\\"upgrade.php?step=1&backto=\");\r\n echo(gVars.webEnv, gVars.goback);\r\n echo(gVars.webEnv, \"\\\">\");\r\n getIncluded(L10nPage.class, gVars, gConsts)._e(\"Upgrade WordPress\", \"default\");\r\n echo(gVars.webEnv, \"</a></h2>\\n\");\r\n\r\n break;\r\n }\r\n\r\n case 1: {\r\n (((org.numiton.nwp.wp_admin.includes.UpgradePage) getIncluded(org.numiton.nwp.wp_admin.includes.UpgradePage.class, gVars, gConsts))).wp_upgrade();\r\n\r\n if (empty(gVars.webEnv._GET.getValue(\"backto\"))) {\r\n backto = strval((((org.numiton.nwp.wp_admin.includes.UpgradePage) getIncluded(org.numiton.nwp.wp_admin.includes.UpgradePage.class, gVars, gConsts))).__get_option(\"home\")) + \"/\";\r\n } else {\r\n backto = Strings.stripslashes(gVars.webEnv, URL.urldecode(strval(gVars.webEnv._GET.getValue(\"backto\"))));\r\n backto = getIncluded(FormattingPage.class, gVars, gConsts).clean_url(backto, null, \"url\");\r\n }\r\n\r\n echo(gVars.webEnv, \"<h2>\");\r\n getIncluded(L10nPage.class, gVars, gConsts)._e(\"Upgrade Complete\", \"default\");\r\n echo(gVars.webEnv, \"</h2>\\n\\t<p>\");\r\n getIncluded(L10nPage.class, gVars, gConsts)._e(\"Your WordPress database has been successfully upgraded!\", \"default\");\r\n echo(gVars.webEnv, \"</p>\\n\\t<h2 class=\\\"step\\\"><a href=\\\"\");\r\n echo(gVars.webEnv, backto);\r\n echo(gVars.webEnv, \"\\\">\");\r\n getIncluded(L10nPage.class, gVars, gConsts)._e(\"Continue\", \"default\");\r\n echo(gVars.webEnv, \"</a></h2>\\n\\n<!--\\n<pre>\\n\");\r\n QStrings.printf(gVars.webEnv, getIncluded(L10nPage.class, gVars, gConsts).__(\"%s queries\", \"default\"), gVars.wpdb.num_queries);\r\n echo(gVars.webEnv, \"\\n\");\r\n QStrings.printf(gVars.webEnv, getIncluded(L10nPage.class, gVars, gConsts).__(\"%s seconds\", \"default\"), getIncluded(Wp_settingsPage.class, gVars, gConsts).timer_stop(0, 3));\r\n echo(gVars.webEnv, \"</pre>\\n-->\\n\\n\");\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return DEFAULT_VAL;\r\n }",
"public Object findTemplateSource(String name)\r\n/* 33: */ throws IOException\r\n/* 34: */ {\r\n/* 35:67 */ if (this.logger.isDebugEnabled()) {\r\n/* 36:68 */ this.logger.debug(\"Looking for FreeMarker template with name [\" + name + \"]\");\r\n/* 37: */ }\r\n/* 38:70 */ Resource resource = this.resourceLoader.getResource(this.templateLoaderPath + name);\r\n/* 39:71 */ return resource.exists() ? resource : null;\r\n/* 40: */ }",
"public Preparation(){\n\t\ttry {\n\t\t\t\n\t\t\tValueObjectRetrieve valueObjectRetrieve = new ValueObjectRetrieve(\"StaticData\",new Integer(1),remotehosturi);\n\t\t\tStaticData staticData = (StaticData)valueObjectRetrieve.getValueObject();\n\t\t\tHttpPost httpPost = new HttpPost(\"name\",nameofj2eeproject,null,remotehosturi,\"J2eeProject\");\n\t\t\tSystem.err.println(httpPost.isOk());\n\t\t\t\n\t\t\tFile file = new File(eclipseroot + nameofj2eeproject + \"/mda\");\n\t\t\tfile.mkdir();\n\t\t\t\n\t\t\tFile webxmlfile = new File(eclipseroot + nameofj2eeproject + \"/WEB-INF/web.xml\");\n\t\t\t\n\t\t\tFileDownload fileDownload = new FileDownload(eclipseroot + nameofj2eeproject+\"/templates/base.css\",remotehosturi + \"/base.css\");\n\t\t\t fileDownload = new FileDownload(eclipseroot + nameofj2eeproject+\"/templates/createscheme.bat\",remotehosturi + \"/mda/createscheme.bat\");\n\t\t\t fileDownload = new FileDownload(eclipseroot + nameofj2eeproject+\"/templates/dropscheme.bat\",remotehosturi + \"/mda/dropscheme.bat\");\n\t\t\t fileDownload = new FileDownload(eclipseroot + nameofj2eeproject+\"/templates/h.jsp\",remotehosturi + \"/h.jsp\");\n\t\t\t fileDownload = new FileDownload(eclipseroot + nameofj2eeproject+\"/templates/index.jsp\",remotehosturi + \"/index.jsp\");\n\t\t\t fileDownload = new FileDownload(eclipseroot + nameofj2eeproject+\"/templates/menu.jsp\",remotehosturi + \"/menu.jsp\");\n\t\t\t fileDownload = new FileDownload(eclipseroot + nameofj2eeproject+\"/templates/mysql-connector-java-3.1.12-bin.jar\",remotehosturi + \"/mda/mysql-connector-java-3.1.12-bin.jar\");\n\t\t\t fileDownload = new FileDownload(eclipseroot + nameofj2eeproject+\"/templates/systemheader.jsp\",remotehosturi + \"/systemheader.jsp\");\n\t\t\t fileDownload = new FileDownload(eclipseroot + nameofj2eeproject+\"/templates/web.xml\",remotehosturi + \"/WEB-INF/web.xml\");\n\t\t\t fileDownload = new FileDownload(eclipseroot + nameofj2eeproject+\"/templates/.classpath\",remotehosturi + \"/.classpath\");\n\n\t\t\t \n\t\t\tHttpClient httpClient = new HttpClient(); \n\t\t\tGetMethod getMethod = new GetMethod(\"http://\" + remotehosturi + \"/templates/copycorejar.bat\");\n\t\t\thttpClient.executeMethod(getMethod);\n\t\t\tString contentofcopycorejat_bat = getMethod.getResponseBodyAsString();\n\t\t\tcontentofcopycorejat_bat = contentofcopycorejat_bat.replaceAll(\"nameofj2eeproject\",nameofj2eeproject);\n\t\t\tFile copycorejat_batfile = new File(eclipseroot + nameofj2eeproject + \"/mda/copycorejar.bat\");\n\t\t\tFileWriter writer = new FileWriter(copycorejat_batfile);\n\t\t\twriter.write(contentofcopycorejat_bat);\n\t\t\t\n\t\t\thttpClient = new HttpClient(); \n\t\t\tgetMethod = new GetMethod(\"http://\" + remotehosturi + \"/templates/createscheme.bat\");\n\t\t\thttpClient.executeMethod(getMethod);\n\t\t\tString content = getMethod.getResponseBodyAsString();\n\t\t\tcontent = content.replaceAll(\"nameofj2eeproject\",nameofj2eeproject);\n\t\t\tFile instancefile = new File(eclipseroot + nameofj2eeproject + \"/mda/copycorejar.bat\");\n\t\t\twriter = new FileWriter(instancefile);\n\t\t\twriter.write(contentofcopycorejat_bat);\n//\t\t\tFile base_css = new File(eclipseroot + nameofj2eeproject + \"base.css\");\n\t\t\t\n\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"protected void initVelocityResourceLoader(VelocityEngine velocityEngine,\n\t\t\tString resourceLoaderPath) throws IOException {\n\t\tStringBuilder resolvedPath = new StringBuilder();\n\t\tString[] paths = StringUtils.commaDelimitedListToStringArray(resourceLoaderPath);\n\t\tResourceLoader resourceLoader = (ResourceLoader) this.config.getConfig(FinderConfig.SPRING_RESOURCE_LOADER);\n\t\tfor (int i = 0; i < paths.length; i++) {\n\t\t\tString path = paths[i];\n\t\t\t// .append(LostVelocityLayoutView.DEFAULT_LAYOUT_DO_NOT_USE).append(\",\")\n\n\t\t\tResource resource = resourceLoader.getResource(path);\n\n\t\t\tFile file = resource.getFile(); // will fail if not resolvable\n\t\t\t\t\t\t\t\t\t\t\t// in the file system\n\t\t\tif (file.getAbsolutePath().indexOf(\"layout\") > 0) {\n\t\t\t\tFile defaultLayout = new File(file.getAbsolutePath() + File.separator\n\t\t\t\t\t\t+ LostVelocityLayoutView.DEFAULT_LAYOUT);\n\t\t\t\tif (defaultLayout.exists()) {\n\t\t\t\t\tdefaultLayout.delete();\n\t\t\t\t}\n\t\t\t\tdefaultLayout.createNewFile();\n\n\t\t\t\tOutputStream os = new FileOutputStream(defaultLayout);\n\t\t\t\tInputStream is = resourceLoader.getResource(\n\t\t\t\t\t\t\"classpath:velocity/\" + LostVelocityLayoutView.DEFAULT_LAYOUT).getURL()\n\t\t\t\t\t\t\t\t\t\t\t\t.openStream();\n\t\t\t\tFileUtil.copy(is, os);\n\n\t\t\t\tFile doNotUseLayout = new File(file.getAbsolutePath() + File.separator\n\t\t\t\t\t\t+ LostVelocityLayoutView.DEFAULT_LAYOUT_DO_NOT_USE);\n\t\t\t\tif (doNotUseLayout.exists()) {\n\t\t\t\t\tdoNotUseLayout.delete();\n\t\t\t\t}\n\t\t\t\tdoNotUseLayout.createNewFile();\n\t\t\t\tFileUtil.copy(\n\t\t\t\t\t\tresourceLoader.getResource(\n\t\t\t\t\t\t\t\t\"classpath:velocity/\"\n\t\t\t\t\t\t\t\t\t\t+ LostVelocityLayoutView.DEFAULT_LAYOUT_DO_NOT_USE)\n\t\t\t\t\t\t\t\t\t\t.getURL().openStream(),\n\t\t\t\t\t\tnew FileOutputStream(doNotUseLayout));\n\t\t\t}\n\n\t\t\tlog.debug(\"Resource loader path [{}] resolved to file [{}]\", path,\n\t\t\t\t\tfile.getAbsolutePath());\n\n\t\t\tresolvedPath.append(file.getAbsolutePath());\n\t\t\tif (i < paths.length - 1) {\n\t\t\t\tresolvedPath.append(',');\n\t\t\t}\n\t\t}\n\t\tvelocityEngine.setProperty(RuntimeConstants.RESOURCE_LOADER, \"file\");\n\t\tvelocityEngine.setProperty(RuntimeConstants.FILE_RESOURCE_LOADER_CACHE, \"true\");\n\t\tvelocityEngine.setProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH,\n\t\t\t\tresolvedPath.toString());\n\t\tinitSpringResourceLoader(velocityEngine, resourceLoaderPath, resourceLoader);\n\t}",
"@Bean\n @Description(\"Thymeleaf template resolver serving HTML 5\")\n public ClassLoaderTemplateResolver templateResolver() {\n\n var templateResolver = new ClassLoaderTemplateResolver();\n templateResolver.setPrefix(\"/templates/\");\n templateResolver.setSuffix(\".html\");\n templateResolver.setTemplateMode(\"HTML5\");\n templateResolver.setCharacterEncoding(\"UTF-8\");\n return templateResolver;\n }",
"private TemplateManagerHelper() {\n\n }",
"TemplatesPackage getTemplatesPackage();",
"@Override\n protected InputStream getTemplateSource(String templateSourceName) \n \tthrows IOException {\n \t\n \tString path = mTemplates.get(templateSourceName);\n \treturn mServletContext.getResourceAsStream(path);\n }",
"@Test\n public void testTemplate2() throws Exception {\n TemplateWebApplication webApp = new TemplateWebApplication(\"src/main/template2\");\n webApp.initialize();\n webApp.start();\n\n TemplateHttpServletRequest request = new TemplateHttpServletRequest();\n request.setWebApplication(webApp);\n request.setContextPath(\"\");\n request.setServletPath(\"/index.html\");\n request.setPathInfo(null);\n\n TemplateHttpServletResponse response = new TemplateHttpServletResponse();\n TemplateServletOutputStream outputStream = new TemplateServletOutputStream();\n response.setOutputStream(outputStream);\n outputStream.setResponse(response);\n\n webApp.service(request, response);\n\n assertEquals(200, response.getStatus());\n String responseString = new String(response.getResponseBody());\n assertTrue(responseString.contains(\"Hello Mojarra\"));\n }",
"@Override\n\tpublic void init(ServletConfig config) throws ServletException {\n\t\tsuper.init(config);\n\t\trutaJsp=config.getInitParameter(\"rutaJsp\");\n\t\tSystem.out.println(rutaJsp);\n\t\ttry {\n\t\t\tInitialContext initContext =new InitialContext();\n\t\t\tContext env=(Context)initContext.lookup(\"java:comp/env\");\n\t\t\tds=(DataSource) env.lookup(\"jdbc/DB1LS221\");\n\t\t} catch (NamingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"protected void getInitParameters(ServletConfig cfg) throws ServletException\n {\n alp_install_path_ = cfg.getInitParameter(COUGAAR_INSTALL_PATH_P);\n if (alp_install_path_ == null) {\n throw new ServletException(\"argument 'org.cougaar.install.path' undefined\");\n }\n if (! alp_install_path_.endsWith(File.separator))\n alp_install_path_ = alp_install_path_ + File.separator;\n\n System.setProperty(COUGAAR_INSTALL_PATH_P, alp_install_path_);\n\n String parameters_file = cfg.getInitParameter(SERVLET_PARAMETER_FILE_P);\n if (parameters_file == null)\n throw new ServletException(\"argument '\"+SERVLET_PARAMETER_FILE_P+\"' undefined\");\n\n\n \tparameters_ = ParameterFileReader.getInstance(parameters_file);\n template_tag_prefix_ = parameters_.getParameter(CLASS_NAME, TEMPLATE_TAG_PREFIX_P, \"DELTA_\");\n use_applet_tag_ = parameters_.getParameter(CLASS_NAME, USE_APPLET_TAG_P, false);\n enableTimestamps = parameters_.getParameter(CLASS_NAME, ENABLE_TIMESTAMPS_P, false);\n\n String fs = File.separator;\n template_path_ = alp_install_path_ + ParameterFileReader.concatenate(parameters_.getParameterValues(CLASS_NAME, TEMPLATE_PATH_P), fs, \"\") + fs;\n\n if (template_path_.length() == 0)\n throw new ServletException(\"argument '\"+TEMPLATE_PATH_P+\"' undefined\");\n\n if (! template_path_.endsWith(File.separator))\n template_path_ = template_path_ + File.separator;\n\n }",
"@Override\n\tpublic void setTemplateEngine(TemplateEngine templateEngine) {\n\n\t}",
"public void init() {\n\t\tfilePath = getServletContext().getInitParameter(\"file-upload\");\n\t\tcreateDirIfDoesntExist(filePath);\n\t\ttmpFilePath = getServletContext().getInitParameter(\"tmp-file-upload\");\n\t\tcreateDirIfDoesntExist(tmpFilePath);\n\t}",
"public static void processTemplate(String relativePath,\r\n Map<String, ?> data, Writer writer) throws IOException {\r\n\r\n try {\r\n Template template = AppServlet.configuration\r\n .getTemplate(relativePath);\r\n template.process(data, writer);\r\n writer.flush();\r\n } catch (TemplateException e) {\r\n System.err.println(\"The template\" + relativePath\r\n + \"could not be processed properly.\");\r\n e.printStackTrace();\r\n }\r\n }",
"public FtlConfig() {\n cfg = new Configuration(Configuration.VERSION_2_3_30);\n cfg.setClassLoaderForTemplateLoading(this.getClass().getClassLoader(), \"ftl\");\n cfg.setDefaultEncoding(\"UTF-8\");\n cfg.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);\n cfg.setSharedVariable(\"random\",\n new BeansWrapperBuilder(Configuration.VERSION_2_3_30).build().getStaticModels());\n cfg.setLogTemplateExceptions(false);\n cfg.setWrapUncheckedExceptions(true);\n cfg.setFallbackOnNullLoopVariable(false);\n }",
"private void setTemplateFile() throws IOException, BusinessException, ObjectNotFoundException, JackrabbitException,\n CertitoolsAuthorizationException, BadElementException {\n super.setFolder(folder);\n if (fileTemplate1 != null) {\n String folderPath;\n if (insertFolderFlag) {\n folderPath = folderId + \"/folders/\" + folder.getName();\n } else {\n folderPath = PlanUtils.getParentPath(folderId) + \"/folders/\" + folder.getName();\n }\n\n Template1Diagram template1Diagram = new Template1Diagram(new Resource(\"/\" + fileTemplate1.getFileName(),\n fileTemplate1.getFileName(),\n fileTemplate1.getContentType(), fileTemplate1.getInputStream(),\n \"\" + fileTemplate1.getSize(), true),\n PlanUtils.convertResourceToHTML(folderPath, getContext().getRequest().getContextPath(),\n getModuleTypeFromEnum()));\n if (replaceImageMap == null) {\n replaceImageMap = Boolean.FALSE;\n }\n if (!insertFolderFlag && !replaceImageMap) {\n\n Folder previousVersion =\n planService.findFolder(folderId, true, getUserInSession(), getModuleTypeFromEnum());\n try {\n TemplateWithImage previousTemplate = (TemplateWithImage) previousVersion.getTemplate();\n String htmlContent = template.getImageMap();\n Image newImage = TemplateWithImageUtils.getImage(fileTemplate1.getInputStream());\n Image oldImage = TemplateWithImageUtils.getImage(previousTemplate.getResource().getData());\n\n String unescapedHtml = StringEscapeUtils.unescapeHtml(htmlContent);\n\n String htmlResultContent = TemplateWithImageUtils.resizeImageMap(unescapedHtml, oldImage, newImage);\n\n if(htmlResultContent != null){\n template1Diagram.setImageMap(htmlResultContent);\n }\n } catch (ClassCastException ex) {\n //Do nothing\n }\n }\n super.setTemplateToFolder(template1Diagram);\n\n } else {\n Folder dbFolder = planService.findFolder(folderId, false, getUserInSession(), getModuleTypeFromEnum());\n //User does not changed template\n if (dbFolder.getTemplate().getName().equals(Template.Type.TEMPLATE_DIAGRAM.getName())) {\n Template1Diagram dbTemplate1Diagram = (Template1Diagram) dbFolder.getTemplate();\n //set old resource and update image Map\n super.setTemplateToFolder(\n new Template1Diagram(dbTemplate1Diagram.getResource(), template.getImageMap()));\n } else {\n //User changed template to this one, and do not upload image, so create empty template\n super.setTemplateToFolder(new Template1Diagram());\n }\n }\n }",
"public void makeJnlp(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException \n {\n \t\tServletContext context = getServletContext();\n \t\tresponse.setContentType(JNLP_MIME_TYPE);\n \t\t\n \t try {\n \t\t\tIBindingFactory jc = BindingDirectory.getFactory(Jnlp.class);\n \n \t\t\tJnlp jnlp = null;\n \t\t\t\n \t\t\tString template = getRequestParam(request, TEMPLATE, null);\n \t\t\tif (template == null)\n \t\t\t\tjnlp = new Jnlp();\n \t\t\telse\n \t\t\t{\n \t\t\t\tURL url = context.getResource(template);\n \t\t\t\tInputStream inStream = url.openStream();\n \t\t\t\t\n \t\t\t\tIUnmarshallingContext unmarshaller = jc.createUnmarshallingContext();\n \t\t\t\tjnlp = (Jnlp)unmarshaller.unmarshalDocument(inStream, OUTPUT_ENCODING);\n \t\t\t}\n \t\t\t\n \t\t\tboolean forceScanBundle = !getJnlpFile(request).exists();\n \t\t\tChanges bundleChanged = setupJnlp(jnlp, request, forceScanBundle);\n if (bundleChanged == Changes.UNKNOWN)\n {\n response.sendError(HttpServletResponse.SC_NOT_FOUND); // Return a 'file not found' error\n return;\n }\n \t\t\tif (!forceScanBundle)\n \t\t\t if (bundleChanged == Changes.PARTIAL)\n \t\t\t setupJnlp(jnlp, request, true); // Need to rescan everything\n if (bundleChanged == Changes.NONE)\n { // Note: It may seem better to listen for bundle changes, but actually webstart uses the cached jnlp file\n if (checkCache(request, response, getJnlpFile(request)))\n return; // Returned the cached jnlp or a cache up-to-date response\n }\n // If bundleChanged == Changes.ALL need to return the new jnlp\n \t\t\t\n IMarshallingContext marshaller = jc.createMarshallingContext();\n marshaller.setIndent(4);\n \n File cacheFile = getJnlpFile(request);\n \t\t\tWriter fileWriter = new FileWriter(cacheFile);\n marshaller.marshalDocument(jnlp, OUTPUT_ENCODING, null, fileWriter); // Cache jnlp\n fileWriter.close();\n Date lastModified = new Date(cacheFile.lastModified());\n response.addHeader(LAST_MODIFIED, getHttpDate(lastModified));\n \n PrintWriter writer = response.getWriter();\n marshaller.marshalDocument(jnlp, OUTPUT_ENCODING, null, writer);\n \t\t} catch (JiBXException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t}",
"protected void init()\n {\n context.setConfigured(false);\n ok = true;\n\n if (!context.getOverride())\n {\n processContextConfig(\"context.xml\", false);\n processContextConfig(getHostConfigPath(org.apache.catalina.startup.Constants.HostContextXml), false);\n }\n // This should come from the deployment unit\n processContextConfig(context.getConfigFile(), true);\n }",
"static void freemarkerDo(Map datamodel, String template) throws Exception\n\t{\n\t\tConfiguration cfg = new Configuration();\n\t\tcfg.setDirectoryForTemplateLoading(new File(dirForTemplateLoading));\n\t\tTemplate tpl = cfg.getTemplate(template);\n\t\tOutputStreamWriter output = new OutputStreamWriter(System.out);\n\t\t/*try {\n\t\t BufferedWriter output = new BufferedWriter(new FileWriter(\"outputFile01\"));\n\t\t\ttpl.process(datamodel, output);\n\t\t} catch (IOException e) {\n\t\t}*/\n\n\t\ttpl.process(datamodel, output);\n\t}",
"boolean isDoNotRegenerateJspFiles();",
"public static void setupFiles(FileManagerUtil fm) {\n fileManagerUtil = fm;\n Files.CONFIG.load(fm);\n Files.PERMISSIONS.load(fm);\n Files.DATA.load(fm);\n Files.DEBUG.load(fm);\n Files.MESSAGES.load(fm);\n }",
"public static void generateHtml(Properties vm_app_vars,\r\n\t\t\tString filesReproOnDisc,String globalMacrosFileList, String templateName, OutputStream out)\r\n\t\t\tthrows Exception {\r\n\t\tVelocityEngine ve = new VelocityEngine();\r\n\r\n\t\t// VelocityEngine System Setting\r\n\t\tve.setProperty(\"resource.loader\", \"file\");\r\n\t\tve.setProperty(\"input.encoding\", \"utf-8\");\r\n\r\n\t\tve.setProperty(\"resource.loader\", \"string\");\r\n\t\tve.setProperty(\"string.resource.loader.description\",\r\n\t\t\t\t\"Velocity StringResource loader\");\r\n\t\tve.setProperty(\"string.resource.loader.class\",\r\n\t\t\t\t\"org.apache.velocity.runtime.resource.loader.StringResourceLoader\");\r\n\t\tve.setProperty(\"string.resource.loader.repository.class\",\r\n\t\t\t\t\"org.apache.velocity.runtime.resource.util.StringResourceRepositoryImpl\");\r\n\t\tve.setProperty(\"eventhandler.include.class\",\r\n\t\t\t\t\"com.flanz.apache.velocity.uimocker.IncludeRelativePath\");\r\n\t\tve.setProperty(\"eventhandler.include.class\",\r\n\t\t\t\t\"com.flanz.apache.velocity.uimocker.MyIncludeRelativePath\");\r\n\t\tve.init();\r\n\t\tStringResourceRepository repo = StringResourceLoader.getRepository();\r\n\t\tDiscResourceCollector discResourceCollector = new DiscResourceCollector(\r\n\t\t\t\tfilesReproOnDisc);\r\n\r\n\t\t// TODO move interfaces, to magic\r\n\t\tMacrosCollector mc = new MacrosCollector(discResourceCollector, globalMacrosFileList);\r\n\t\tmc.putMacrosToRepro(discResourceCollector);\r\n\t\tMap<String, String> resolveAll = discResourceCollector.resolveAll();\r\n\r\n\t\tSet<Entry<String, String>> entrySet = resolveAll.entrySet();\r\n\t\tIterator iterator = entrySet.iterator();\r\n\t\t// first handle all VM\r\n\t\twhile (iterator.hasNext()) {\r\n\t\t\tEntry<String, String> entry = (Entry<String, String>) iterator\r\n\t\t\t\t\t.next();\r\n\t\t\tif (entry.getKey().endsWith(\".vm\")) {\r\n\t\t\t\tSystem.out.println(\"GENVM: \" + entry.getKey());\r\n\t\t\t\thandleVmFile(vm_app_vars, ve, repo, resolveAll, entry);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// first handle all JSON\r\n\t\titerator = entrySet.iterator();\r\n\t\twhile (iterator.hasNext()) {\r\n\t\t\tEntry<String, String> entry = (Entry<String, String>) iterator\r\n\t\t\t\t\t.next();\r\n\r\n\t\t\tif (entry.getKey().endsWith(\".json\")\r\n\t\t\t\t\t&& !entry.getKey().startsWith(\"templates/\")) {\r\n\t\t\t\tSystem.out.println(\"GENJSON: \" + entry.getKey());\r\n\t\t\t\thandleJson(vm_app_vars, ve, repo, resolveAll, entry);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"STARTMAIN-TEMPLATE: \" + templateName);\r\n\r\n\t\t/* next, get the Template */\r\n\t\tTemplate t = ve.getTemplate(templateName);\r\n\r\n\t\t/* create a context and add data */\r\n\t\tVelocityContext context = new VelocityContext();\r\n\t\tcontext.put(\"APP\", vm_app_vars);\r\n\t\t/* now render the template into a StringWriter */\r\n\t\tStringWriter writer = new StringWriter();\r\n\t\tt.merge(context, writer);\r\n\t\t/* show the World */\r\n\r\n\t\tString result = writer.toString().toString();\r\n\t\tByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(\r\n\t\t\t\tresult.getBytes(\"UTF-8\"));\r\n\t\tIOUtils.copy(byteArrayInputStream, out);\r\n\r\n\t}",
"@Override\n public void setTplPath(String arg0) {\n\n }",
"private JSONObject loadTemplate(Path extensionResourcePath) throws ExtensionManagementException {\n\n Path templatePath = extensionResourcePath.resolve(TEMPLATE_FILE_NAME);\n if (Files.exists(templatePath) && Files.isRegularFile(templatePath)) {\n return readJSONFile(templatePath);\n }\n return null;\n }",
"private void initResources(ServletContext servletContext) {\n if (pathnames != null) {\n ActionContext ctx = ActionContext.getContext();\n try {\n \n ValidatorResources resources = this.loadResources(servletContext);\n \n \n String prefix = ctx.getActionInvocation().getProxy().getNamespace();\n \n \n servletContext.setAttribute(ValidatorPlugIn.VALIDATOR_KEY + prefix, resources);\n \n servletContext.setAttribute(ValidatorPlugIn.STOP_ON_ERROR_KEY + '.'\n + prefix,\n (this.stopOnFirstError ? Boolean.TRUE : Boolean.FALSE));\n } catch (Exception e) {\n throw new StrutsException(\n \"Cannot load a validator resource from '\" + pathnames + \"'\", e);\n }\n }\n }",
"public void init( ){\n\t filepath = getServletContext().getContextPath();\r\n\tappPath = getServletContext().getRealPath(SAVE_DIR);\r\n\t \r\n\t }",
"protected abstract String getTemplateFilename();",
"public void initEasyJWeb() {\r\n\t\tlogger.info(I18n.getLocaleMessage(\"core.execute.EasyJWeb.initialization.applications\"));\r\n\t\tif (resourceLoader == null) {\r\n\t\t\tif (servletContext != null)\r\n\t\t\t\tresourceLoader = new ServletContextResourceLoader(\r\n\t\t\t\t\t\tservletContext);\r\n\t\t\telse\r\n\t\t\t\tresourceLoader = new FileResourceLoader();\r\n\t\t}\r\n\t\tinitContainer();\r\n\t\tFrameworkEngine.setWebConfig(webConfig);// 初始化框架工具\r\n\t\tFrameworkEngine.setContainer(container);// 在引擎中安装容器\r\n\t\tAjaxUtil.setServiceContainer(new AjaxServiceContainer(container));// 初始化Ajax容器服务\r\n\t\tinitTemplate(); // 初始化模版\r\n\t\tinvokeApps();// 在应用启动的时候启动一些配置好的应用\r\n\t\thaveInitEasyJWeb = true;\r\n\t\tlogger.info(I18n.getLocaleMessage(\"core.EasyJWeb.initialized\"));\r\n\t}",
"public static void populateAndLoadLootList(File capsuleConfigDir, String[] lootTemplatesPaths, Map<String, LootPathData> outLootTemplatesData) {\n for (String path : lootTemplatesPaths) {\r\n LootPathData data = outLootTemplatesData.get(path);\r\n\r\n File templateFolder = new File(capsuleConfigDir.getParentFile().getParentFile(), path);\r\n\r\n if (!templateFolder.exists()) {\r\n templateFolder.mkdirs();\r\n // initial with example capsule the first time\r\n LOGGER.info(\"First load: initializing the loots in \" + path + \". You can change the content of folder with any nbt structure block, schematic, or capsule file. You can remove the folders from capsule.config to remove loots.\");\r\n String assetPath = \"assets/capsule/loot/common\";\r\n if (templateFolder.getPath().contains(\"uncommon\")) assetPath = \"assets/capsule/loot/uncommon\";\r\n if (templateFolder.getPath().contains(\"rare\")) assetPath = \"assets/capsule/loot/rare\";\r\n populateFolder(templateFolder, assetPath);\r\n }\r\n\r\n data.files = new ArrayList<>();\r\n iterateTemplates(templateFolder, templateName -> {\r\n data.files.add(templateName);\r\n });\r\n }\r\n }",
"@StartStep(localName=\"config\", xmlns={\"xmlns:config='http://xchain.org/config/1.0'\"})\n public static void startConfiguration(LifecycleContext context, ConfigDocumentContext configDocContext) \n throws MalformedURLException \n {\n // Read DOM and set values on configContext\n ConfigContext configContext = Lifecycle.getLifecycleContext().getConfigContext();\n Boolean monitor = (Boolean)configDocContext.getValue(\"/config:config/config:monitor\", Boolean.class);\n if( monitor != null ) configContext.setMonitored(monitor);\n Integer catalogCacheSize = (Integer)configDocContext.getValue(\"/config:config/config:catalog-cache-size\", Integer.class);\n if( catalogCacheSize != null ) configContext.setCatalogCacheSize(catalogCacheSize);\n Integer templateCacheSize = (Integer)configDocContext.getValue(\"/config:config/config:templates-cache-size\", Integer.class);\n if( templateCacheSize != null ) configContext.setTemplatesCacheSize(templateCacheSize);\n \n addUrls(configDocContext, \"/config:config/config:resource-base-url/@config:system-id\", configContext.getResourceUrlList());\n addUrls(configDocContext, \"/config:config/config:source-base-url/@config:system-id\", configContext.getSourceUrlList());\n addUrls(configDocContext, \"/config:config/config:webapp-base-url/@config:system-id\", configContext.getWebappUrlList());\n \n // configure the URLFactory for file monitoring if requested\n if( configContext.isMonitored() ) {\n\n if( log.isDebugEnabled() ) {\n log.debug( \"Config: Monitoring is enabled, configuring URL translation strategies...\" );\n }\n\n // configure the resource protocol 'context-class-loader' authority for monitoring\n if( !configContext.getResourceUrlList().isEmpty() ) {\n\n CompositeUrlTranslationStrategy contextClassLoaderStrategy = new CompositeUrlTranslationStrategy();\n \n for( Iterator<URL> it = configContext.getResourceUrlList().iterator(); it.hasNext(); ) {\n URL baseUrl = it.next();\n BaseUrlUrlTranslationStrategy baseUrlStrategy =\n new BaseUrlUrlTranslationStrategy( baseUrl, BaseUrlUrlTranslationStrategy.URL_FACTORY_URL_SOURCE );\n contextClassLoaderStrategy.getTranslatorList().add( baseUrlStrategy );\n if( log.isDebugEnabled() ) {\n log.debug( \" Adding resource URL: \" + baseUrl );\n }\n }\n \n // now add the standard context class loader strategy\n contextClassLoaderStrategy.getTranslatorList().add( new ContextClassLoaderUrlTranslationStrategy() );\n \n // override the standard strategy with the new composite strategy\n ResourceUrlConnection.registerUrlTranslationStrategy( ResourceUrlConnection.CONTEXT_CLASS_LOADER_ATHORITY,\n contextClassLoaderStrategy );\n }\n }\n }",
"private void createJavaWebStartPath() {\n String[] onlyFolderNames = new String[] {\n mInstance.getJavaWebStartPath(),\n mModuleName\n };\n\n mJavaWebStartPath = StringUtils.makeFilePath (onlyFolderNames, false);\n }",
"private void configurate(String name){\r\n\t\tif(viewFolderExists(name)){\r\n\t\t\tString tilesConfigFilePath = \"src/main/resources/spring/config/tiles.xml\";\r\n\t\t\tString messagesConfigFilePath = \"src/main/resources/spring/config/i18n-l10n.xml\";\r\n\t\t\tString fileContent, config, closingTags;\r\n\t\t\tFileManager fileMngr = new FileManager(\"\");\r\n\t\t\t\r\n\t\t\t// Configure i18n&l10n\r\n\t\t\tfileMngr.setFilePath(messagesConfigFilePath);\r\n\t\t\tfileContent = fileMngr.readFile();\r\n\t\t\tconfig = \"<value>/views/\"+name+\"/messages</value>\";\r\n\t\t\tclosingTags = fileContent.substring(fileContent.lastIndexOf(\"</value>\")+8);\r\n\t\t\tfileContent = fileContent.substring(0, fileContent.lastIndexOf(\"</value>\")+8);\r\n\t\t\tfileContent += \"\\n\"+config;\r\n\t\t\tfileContent += closingTags;\r\n\t\t\tfileMngr.writeFile(fileContent);\r\n\t\t\t\r\n\t\t\t// Configure tiles\r\n\t\t\tfileMngr.setFilePath(tilesConfigFilePath);\r\n\t\t\tfileContent = fileMngr.readFile();\r\n\t\t\tconfig = \"<value>/views/\"+name+\"/tiles.xml</value>\";\r\n\t\t\tclosingTags = fileContent.substring(fileContent.lastIndexOf(\"</value>\")+8);\r\n\t\t\tfileContent = fileContent.substring(0, fileContent.lastIndexOf(\"</value>\")+8);\r\n\t\t\tfileContent += \"\\n\"+config;\r\n\t\t\tfileContent += closingTags;\r\n\t\t\tfileMngr.writeFile(fileContent);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tSystem.out.println(\"ERROR: cannot configure folder '\"+name+\"'. It doesn't exists\");\r\n\t\t}\r\n\t}",
"public void initLoadingFileEnviroment() {\n // file init\n try {\n DiskFileItemFactory fileFactory = new DiskFileItemFactory();\n File filepath = new File(DATA_PATH);\n fileFactory.setRepository(filepath);\n this._uploader = new ServletFileUpload(fileFactory);\n\n } catch (Exception ex) {\n System.err.println(\"Error init new file environment. \" + ex.getMessage());\n }\n }",
"public void init() throws ServletException {\n\t\t\r\n\t\tString file = this.getServletContext().getRealPath( this.getInitParameter( \"config1\" ) );\r\n\t\tSystem.out.println( \"actionServlet..file:\"+file );\r\n\t\r\n\t\tIParseXML parser = new ParseXML();\r\n\t\tIActionConfig config = parser.parser(file);\r\n\t\tSystem.out.println( \"config:\"+config );\r\n\t\t\r\n\t\t//获取tomcat中的数据源\r\n\t\ttry {\r\n\t\t\tClass.forName( \"com.commons.ConnTools\" );\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t//实例化业务派发控制器,\r\n\t\tprocessor = new RequestProcessor( config );\r\n\t\t\r\n\t}",
"private static void createProject(final ProjectProperties props, final Path projectDir) throws IOException\n {\n // Create and set the Freemarker configuration\n final Configuration freeMarkerConfig = new Configuration();\n final File templateDir = new File(props.getApiDirectory(), \"templates\");\n freeMarkerConfig.setDirectoryForTemplateLoading(templateDir);\n freeMarkerConfig.setObjectWrapper(new DefaultObjectWrapper());\n\n // Generate the project\n final Injector injector = Guice.createInjector(new UtilInjectionModule(), new LocalInjectionModule());\n final ProjectGenerator projectGen = injector.getInstance(ProjectGenerator.class);\n projectGen.initialize(freeMarkerConfig, OUT_STREAM);\n try\n {\n projectGen.create(props, projectDir.toFile());\n }\n catch (final Exception ex)\n {\n OUT_STREAM.println(\"Error generating the project: \" + ex.getMessage());\n }\n }",
"private Map retrieveTemplateMap() {\n Map templateMap = new TreeMap();\n for (int j=0;j<mRemoteSourceDirs.length;j++) {\n String remoteSource = mRemoteSourceDirs[j];\n if (!remoteSource.endsWith(\"/\")) {\n remoteSource = remoteSource + \"/\";\n }\n \n try {\n HttpClient tsClient = getTemplateServerClient(remoteSource);\n\n HttpClient.Response response = tsClient.setURI(createTemplateServerRequest(remoteSource,null))\n .setPersistent(true).getResponse(); \n\n if (response != null && response.getStatusCode() == 200) {\n\n Reader rin = new InputStreamReader\n (new BufferedInputStream(response.getInputStream()));\n \n StreamTokenizer st = new StreamTokenizer(rin);\n st.resetSyntax();\n st.wordChars('!','{');\n st.wordChars('}','}');\n st.whitespaceChars(0,' ');\n st.parseNumbers();\n st.quoteChar('|');\n st.eolIsSignificant(true);\n String templateName = null; \n int tokenID = 0;\n // ditching the headers by looking for \"\\r\\n\\r\\n\"\n /* \n * no longer needed now that HttpClient is being used but leave\n * in for the moment.\n *\n * while (!((tokenID = st.nextToken()) == StreamTokenizer.TT_EOL \n * && st.nextToken() == StreamTokenizer.TT_EOL) \n * && tokenID != StreamTokenizer.TT_EOF) {\n * }\n */\n while ((tokenID = st.nextToken()) != StreamTokenizer.TT_EOF) {\n if (tokenID == '|' || tokenID == StreamTokenizer.TT_WORD) {\n \n templateName = st.sval;\n }\n else if (tokenID == StreamTokenizer.TT_NUMBER \n && templateName != null) {\n templateName = templateName.substring(1);\n //System.out.println(templateName);\n templateMap.put(templateName.replace('/','.'),\n new TemplateSourceInfo(\n templateName,\n remoteSource,\n (long)st.nval));\n templateName = null;\n }\n }\n }\n }\n catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }\n //System.out.println(\"retrieving templateMap\");\n return templateMap;\n }",
"void parser() throws TemplateException {\n this.config.resolver.outputdir =\n PropertiesParser.parser(this.config.resolver.outputdir);\n this.config.resolver.sourcepackage = \n PropertiesParser.parser(this.config.resolver.sourcepackage);\n this.config.resolver.templatedir = \n PropertiesParser.parser(this.config.resolver.templatedir);\n }",
"@Bean\n public SpringTemplateEngine templateEngine() {\n SpringTemplateEngine templateEngine = new SpringTemplateEngine();\n templateEngine.setTemplateResolver(templateResolver());\n templateEngine.setEnableSpringELCompiler(true);\n return templateEngine;\n }",
"@Bean\n public SpringTemplateEngine templateEngine() {\n SpringTemplateEngine templateEngine = new SpringTemplateEngine();\n templateEngine.setTemplateResolver(templateResolver());\n templateEngine.setEnableSpringELCompiler(true);\n return templateEngine;\n }",
"public void setTemplateFilename(String templateFilename) {\n\t\tthis.templateFilename = StringUtil.replaceExtension(templateFilename, \"html\");\n\t}",
"@Override\n protected void setup(Mapper.Context context) {\n \n String settingsStr = context.getConfiguration().get(ParameterProcessing.SETTINGS_STR);\n Settings settings = Settings.loadFromString(settingsStr);\n Settings.setSettings(settings);\n // System.out.println(\"Mapper setup settings = \" + Settings.getSettings());\n\n String projectStr = context.getConfiguration().get(ParameterProcessing.PROJECT);\n Project project = Project.loadFromString(projectStr);\n \n if (project.isEnvHadoop()) {\n // we need the system check only if we are not in local mode\n OsUtil.systemCheck();\n List <String> status = OsUtil.getSystemSummary();\n for (String stat: status) {\n logger.info(stat);\n }\n Configuration conf = context.getConfiguration();\n String taskId = conf.get(\"mapred.task.id\");\n if (taskId != null) {\n Settings.getSettings().setProperty(\"mapred.task.id\", taskId);\n }\n \n String metadataFileContents = context.getConfiguration().get(EmailProperties.PROPERTIES_FILE);\n try {\n new File(EmailProperties.PROPERTIES_FILE).getParentFile().mkdirs();\n Files.write(metadataFileContents.getBytes(), new File(EmailProperties.PROPERTIES_FILE));\n } catch (IOException e) {\n logger.error(\"Problem writing the email properties file to disk\", e);\n }\n }\n \n if (project.isLuceneIndexEnabled()) {\n luceneIndex = new LuceneIndex(settings.getLuceneIndexDir(),\n project.getProjectCode(), \"\" + context.getTaskAttemptID());\n luceneIndex.init();\n }\n }",
"@Override\n\tpublic void onStartup(ServletContext servletContext)\n\t\t\tthrows ServletException {\n\t\tsuper.onStartup(servletContext);//master line where whole framework works\n\t\t//configure global objects/tasks if required\n\t}",
"@BeforeClass\n\tpublic static void prepare() {\n\t\t final ApplicationContext ctx = new\n\t\t ClassPathXmlApplicationContext(\"file:src/main/webapp/WEB-INF/employee-servlet.xml\");\n\t\temployeeDAO = ctx.getBean(\"employeeDAO\", EmployeeDAO.class);\n\t}",
"public void setTemplateFileName( String templateFileName )\n {\n _strTemplateFileName = templateFileName;\n }",
"public TestGenericWebXmlContextLoader() {\r\n\t\tsuper(\"/src/main/wepapp\", false);\r\n\t}",
"public void init(FilterConfig fConfig) throws ServletException {\n\t\tservletCtxt = fConfig.getServletContext();\r\n\t}",
"public static Map<SOAXSDTemplateSubType, List<SOAConfigTemplate>> getTemplateCategoryFiles() {\r\n\t\ttry {\r\n\t\t\tfinal String organization = GlobalRepositorySystem.instanceOf()\r\n\t\t\t\t\t.getActiveRepositorySystem()\r\n\t\t\t\t\t.getActiveOrganizationProvider().getName();\r\n\t\t\treturn SOAConfigExtensionFactory.getXSDTemplates(organization);\r\n\t\t} catch (SOAConfigAreaCorruptedException e) {\r\n\t\t\tUIUtil.showErrorDialog(e);\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public void init(PageContext context) {\n request = (HttpServletRequest) context.getRequest();\n response = (HttpServletResponse) context.getResponse();\n session = context.getSession();\n application = context.getServletContext();\n out = context.getOut();\n }",
"@Before\n\tpublic static void setup() {\n\t\trenderArgs.put(\"base\", request.getBase());\n\t\tString location = request.getBase() + \"/services/MonitoringService\";\n\t\trenderArgs.put(\"location\", location);\n\t}",
"private void init() {\n\t\tif ( PropertiesConfigurationFilename == null ) {\n\t\t\tlogger.info(\"config.properties is default\");\n\t\t\tconfigProp = createDefaultProperties();\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tlogger.info(\"config.properties is \"+ PropertiesConfigurationFilename.getAbsolutePath());\n\t\t\t\tconfigProp = new PropertiesConfiguration();\n\t\t\t\tconfigProp.load(PropertiesConfigurationFilename);\n\t\t\t} catch (ConfigurationException e) {\n\t\t\t\tlogger.error(\"Unable to open config file: \" + PropertiesConfigurationFilename.getAbsolutePath(), e);\n\t\t\t\tlogger.info(\"config.properties is default\");\n\t\t\t\tconfigProp = createDefaultProperties();\n\t\t\t}\n\t\t}\n\n\n\t\t// Load the locale information\n\t\tString locale = configProp.getString(\"locale\");\n\n\t\tconfigProp.setProperty(\"zmMsg\", ResourceBundle.getBundle(\"ZmMsg\", new Locale(locale)));\n\n\t\tconfigProp.setProperty(\"zhMsg\", ResourceBundle.getBundle(\"ZhMsg\", new Locale(locale)));\n\n\t\tconfigProp.setProperty(\"ajxMsg\", ResourceBundle.getBundle(\"AjxMsg\", new Locale(locale)));\n\n\t\tconfigProp.setProperty(\"i18Msg\", ResourceBundle.getBundle(\"I18nMsg\", new Locale(locale)));\n\n\t\tconfigProp.setProperty(\"zsMsg\", ResourceBundle.getBundle(\"ZsMsg\", new Locale(locale)));\n\n\t}",
"private void initContext() {\n contextId = System.getProperty(CONFIG_KEY_CERES_CONTEXT, DEFAULT_CERES_CONTEXT);\n\n // Initialize application specific configuration keys\n homeDirKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_HOME);\n debugKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_DEBUG);\n configFileKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_CONFIG_FILE_NAME);\n modulesDirKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_MODULES);\n libDirsKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_LIB_DIRS);\n mainClassKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_MAIN_CLASS);\n classpathKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_CLASSPATH);\n applicationIdKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_APP);\n logLevelKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_LOG_LEVEL);\n consoleLogKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_CONSOLE_LOG);\n\n // Initialize default file and directory paths\n char sep = File.separatorChar;\n defaultRelConfigFilePath = String.format(\"%s/%s\", DEFAULT_CONFIG_DIR_NAME, configFileKey).replace('/', sep);\n defaultHomeConfigFilePath = String.format(\"${%s}/%s\", homeDirKey, defaultRelConfigFilePath).replace('/', sep);\n defaultHomeModulesDirPath = String.format(\"${%s}/%s\", homeDirKey, DEFAULT_MODULES_DIR_NAME).replace('/', sep);\n defaultHomeLibDirPath = String.format(\"${%s}/%s\", homeDirKey, DEFAULT_LIB_DIR_NAME).replace('/', sep);\n }",
"public void setTemplateEngine(TemplateEngine engine) {\n queryCreator = engine;\n registerTemplate();\n resetCache();\n }",
"@Override\n public void configureViewResolvers(ViewResolverRegistry registry) {\n \n InternalResourceViewResolver viewResolver = new InternalResourceViewResolver();\n viewResolver.setViewClass(JstlView.class);\n viewResolver.setPrefix(\"/WEB-INF/\");\n viewResolver.setSuffix(\".jsp\");\n registry.viewResolver(viewResolver);\n }",
"private void loadLocalConfig()\n {\n try\n {\n // Load the system config file.\n URL fUrl = Config.class.getClassLoader().getResource( PROP_FILE );\n config.setDelimiterParsingDisabled( true );\n if ( fUrl == null )\n {\n String error = \"static init: Error, null cfg file: \" + PROP_FILE;\n LOG.warn( error );\n }\n else\n {\n LOG.info( \"static init: found from: {} path: {}\", PROP_FILE, fUrl.getPath() );\n config.load( fUrl );\n LOG.info( \"static init: loading from: {}\", PROP_FILE );\n }\n\n URL fUserUrl = Config.class.getClassLoader().getResource( USER_PROP_FILE );\n if ( fUserUrl != null )\n {\n LOG.info( \"static init: found user properties from: {} path: {}\", USER_PROP_FILE, fUserUrl.getPath() );\n config.load( fUserUrl );\n }\n }\n catch ( org.apache.commons.configuration.ConfigurationException ex )\n {\n String error = \"static init: Error loading from cfg file: [\" + PROP_FILE\n + \"] ConfigurationException=\" + ex;\n LOG.error( error );\n throw new CfgRuntimeException( GlobalErrIds.FT_CONFIG_BOOTSTRAP_FAILED, error, ex );\n }\n }",
"private void initializeTemplate(StatefulKnowledgeSession session) throws Exception {\n CamelContext context = configure(session);\n this.template = context.createProducerTemplate();\n context.start();\n }",
"@Override\r\n\tpublic void init(ServletConfig config) throws ServletException {\n\t\tsuper.init(config);\r\n\t\tString realPath = config.getServletContext().getRealPath(\"/\");\r\n\t\tString path = realPath + \"WEB-INF\"+ System.getProperty(\"file.separator\") +\"logs\"+ System.getProperty(\"file.separator\")+\"payments\"+ System.getProperty(\"file.separator\");\r\n\r\n\t\tthis.filePath = path;// this.getInitParameter(\"TMP_PATH\");\r\n\t\tlog.debug(\"Initializing payment log file at loc: \"+ this.filePath);\r\n\t}",
"public SaxTemplates getTemplates() {\n Templates templates = templatesHandler.getTemplates();\n\n // this is where we need a reloading reference.\n return new SaxTemplatesImpl(templates, transformerFactory); \n }",
"private void populateTemplate(String templateFile, BeanDefinition beanDefinition, File outputFile) {\r\n\t\t\r\n\t\tlogger.trace(\"enterCreateBean\");\r\n\t\t\r\n\t\t// set the serial version UID if one has not been specified.\r\n\t\tif (beanDefinition.getSerialVersionUID() == null || beanDefinition.getSerialVersionUID().isEmpty()) {\r\n\t\t\tbeanDefinition.setSerialVersionUID(new Date().getTime() + \"L\");\r\n\t\t}\r\n\t\t\r\n\t\tVelocityContext context = createContext(beanDefinition);\r\n\t\tString populatedTemplate =populateVelocityTemplate (templateFile, context); \r\n\t\t\r\n\t\ttry {\r\n\t\t\tFileWriter fw = new FileWriter(outputFile);\t\t\t\r\n\t\t\tfw.write(populatedTemplate);\r\n\t\t\tfw.flush();\r\n\t\t\tfw.close();\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\tlogger.error(e);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.trace(\"exitCreateBean\");\r\n\r\n\t}",
"@RequestMapping(value = \"index\")\n public String index(ModelMap map){\n map.addAttribute(\"resource\",freemarkerResource);\n return \"freemarker/index\";\n }",
"public TemplateHelper() {\r\t\tsuper();\r\t}",
"protected Configuration(ServletContext ctx) {\r\n ctx.log(\"configuring cewolf app..\");\r\n ctx.setAttribute(KEY, this);\r\n\r\n //retrieve the init config params\r\n ServletConfig config = (ServletConfig) ctx.getAttribute(CewolfRenderer.INIT_CONFIG);\r\n if (config != null)\r\n {\r\n Enumeration initParams = config.getInitParameterNames();\r\n try {\r\n while (initParams.hasMoreElements()) {\r\n String param = (String) initParams.nextElement();\r\n String value = config.getInitParameter(param);\r\n if (\"debug\".equalsIgnoreCase(param)) {\r\n debugged = Boolean.valueOf(value).booleanValue();\r\n } else if (\"overliburl\".equalsIgnoreCase(param)) {\r\n overlibURL = value;\r\n } else if (\"storage\".equalsIgnoreCase(param)) {\r\n storageClassName = value;\r\n } else {\r\n ctx.log(param + \" parameter is ignored.\");\r\n }\r\n parameters.put(param,value);\r\n }\r\n } catch (Throwable t) {\r\n ctx.log(\"Error in Cewolf config.\", t);\r\n } \r\n }\r\n else {\r\n \tctx.log(\"Cewolf Misconfiguration. You should add a <load-on-startup> tag \"\r\n \t\t\t+ \"to your web.xml for the Cewolf rendering servlet.\\n\"\r\n\t\t\t\t\t+ \"A default Configuration will be used if not.\");\r\n }\r\n \r\n\t\ttry {\r\n\t\t\tinitStorage(ctx);\r\n\t\t} catch (CewolfException ex) {\r\n\t\t\tctx.log(\"exception during storage init from class \" + storageClassName);\r\n\t\t\tctx.log(\"using \" + DEFAULT_STORAGE);\r\n\t\t\tstorageClassName = DEFAULT_STORAGE;\r\n\t\t\ttry {\r\n\t\t\t\tinitStorage(ctx);\r\n\t\t\t} catch(CewolfException cwex){\r\n\t\t\t\tcwex.printStackTrace();\r\n\t\t\t\tthrow new RuntimeException(storageClassName + \".init() threw exception.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tctx.log(\"using storage class \" + storageClassName);\r\n\t\tctx.log(\"using overlibURL \" + overlibURL);\r\n\t\tctx.log(\"debugging is turned \" + (debugged ? \"on\" : \"off\"));\r\n\t\tctx.log(\"...done.\");\r\n\t}",
"private MustacheFactory getFactory()\n {\n MustacheFactory factory;\n\n if (Stage.DEVELOPMENT == Stage.current())\n {\n\n // disable caching for development\n factory = new ServletMustacheFactory(servletContext);\n }\n else\n {\n factory = this.factory;\n }\n\n return factory;\n }",
"private static Template template(Configuration configuration, TemplateSource templateSource) {\n switch (templateSource.getOrigin()) {\n case TEMPLATE_LOADER:\n return fromTemplatePath(configuration, templateSource);\n case TEMPLATE_CODE:\n return fromTemplateCode(configuration, templateSource);\n default:\n throw new IllegalArgumentException(\"Don't know how to create a template: \" + templateSource.getOrigin());\n }\n }",
"public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException {\n\n response.setContentType( \"text/html;charset=UTF-8\");\n /* set up the intrinsic variables using the pageContext goober:\n ** session = HttpSession\n ** application = ServletContext\n ** out = JspWriter\n ** page = this\n ** config = ServletConfig\n ** all session/app beans declared in globals.jsa\n */\n PageContext pageContext = JspFactory.getDefaultFactory().getPageContext( this, request, response, null, true, JspWriter.DEFAULT_BUFFER, true);\n // Note: this is not emitted if the session directive == false\n HttpSession session = pageContext.getSession();\n int __jsp_tag_starteval;\n ServletContext application = pageContext.getServletContext();\n JspWriter out = pageContext.getOut();\n _mapclient page = this;\n ServletConfig config = pageContext.getServletConfig();\n\n com.evermind.server.http.JspCommonExtraWriter __ojsp_s_out = (com.evermind.server.http.JspCommonExtraWriter) out;\n try {\n\n\n __ojsp_s_out.write(__oracle_jsp_text[0]);\n __ojsp_s_out.write(__oracle_jsp_text[1]);\n __ojsp_s_out.write(__oracle_jsp_text[2]);\n __ojsp_s_out.write(__oracle_jsp_text[3]);\n __ojsp_s_out.write(__oracle_jsp_text[4]);\n __ojsp_s_out.write(__oracle_jsp_text[5]);\n __ojsp_s_out.write(__oracle_jsp_text[6]);\n mapdemo.MapClientBean mcb;\n synchronized (session) {\n if ((mcb = (mapdemo.MapClientBean) pageContext.getAttribute( \"mcb\", PageContext.SESSION_SCOPE)) == null) {\n mcb = (mapdemo.MapClientBean) new mapdemo.MapClientBean();\n pageContext.setAttribute( \"mcb\", mcb, PageContext.SESSION_SCOPE);\n __ojsp_s_out.write(__oracle_jsp_text[7]);\n mcb.setMapViewerServerURL(OracleJspRuntime.toStr( mcb.determineURL(request)));\n __ojsp_s_out.write(__oracle_jsp_text[8]);\n pageContext.setAttribute( \"mcb\", mcb, PageContext.SESSION_SCOPE);\n }\n }\n __ojsp_s_out.write(__oracle_jsp_text[9]);\n {\n String[] __paramList = request.getParameterValues( \"mapViewerServerURL\");\n if ((__paramList != null) && (__paramList[0] != null) && (__paramList[0].length() > 0)) {\n mcb.setMapViewerServerURL(__paramList[0]);\n }\n }\n __ojsp_s_out.write(__oracle_jsp_text[10]);\n OracleJspRuntime.__jspSetAllParams(request, (Object)mcb, true);\n __ojsp_s_out.write(__oracle_jsp_text[11]);\n \n mcb.processRequest(request);\n \n __ojsp_s_out.write(__oracle_jsp_text[12]);\n out.print(mcb.getMapViewerServerURL());\n __ojsp_s_out.write(__oracle_jsp_text[13]);\n out.print( mcb.getDataSource() );\n __ojsp_s_out.write(__oracle_jsp_text[14]);\n out.print( mcb.getTitle() );\n __ojsp_s_out.write(__oracle_jsp_text[15]);\n out.print( mcb.getBaseMap() );\n __ojsp_s_out.write(__oracle_jsp_text[16]);\n out.print( mcb.getCenterX() );\n __ojsp_s_out.write(__oracle_jsp_text[17]);\n out.print( mcb.getCenterY() );\n __ojsp_s_out.write(__oracle_jsp_text[18]);\n out.print( mcb.getSize() );\n __ojsp_s_out.write(__oracle_jsp_text[19]);\n out.print(mcb.getImageW());\n __ojsp_s_out.write(__oracle_jsp_text[20]);\n if (mcb.getSuccess()) { \n __ojsp_s_out.write(__oracle_jsp_text[21]);\n out.print( mcb.getMapImageURL() );\n __ojsp_s_out.write(__oracle_jsp_text[22]);\n out.print( mcb.getImageW() );\n __ojsp_s_out.write(__oracle_jsp_text[23]);\n out.print( mcb.getImageH() );\n __ojsp_s_out.write(__oracle_jsp_text[24]);\n } else { \n __ojsp_s_out.write(__oracle_jsp_text[25]);\n } \n __ojsp_s_out.write(__oracle_jsp_text[26]);\n out.print( mcb.getImageW() );\n __ojsp_s_out.write(__oracle_jsp_text[27]);\n out.print( mcb.getImageW() );\n __ojsp_s_out.write(__oracle_jsp_text[28]);\n out.print(mcb.getXMLRequest());\n __ojsp_s_out.write(__oracle_jsp_text[29]);\n out.print(mcb.getXMLResponse());\n __ojsp_s_out.write(__oracle_jsp_text[30]);\n \n if(mcb.getErrorMsg()!=null && mcb.getDataSource()!=null)\n {\n \n __ojsp_s_out.write(__oracle_jsp_text[31]);\n out.print(mcb.getErrorMsg());\n __ojsp_s_out.write(__oracle_jsp_text[32]);\n \n }\n \n __ojsp_s_out.write(__oracle_jsp_text[33]);\n\n }\n catch (Throwable e) {\n if (!(e instanceof javax.servlet.jsp.SkipPageException)){\n try {\n if (out != null) out.clear();\n }\n catch (Exception clearException) {\n }\n pageContext.handlePageException(e);\n }\n }\n finally {\n OracleJspRuntime.extraHandlePCFinally(pageContext, true);\n JspFactory.getDefaultFactory().releasePageContext(pageContext);\n }\n\n }",
"protected abstract ViewPreparer getPreparer(String name, WebApplicationContext context) throws TilesException;",
"public static TemplateFactory init()\n {\n try\n {\n TemplateFactory theTemplateFactory = (TemplateFactory)EPackage.Registry.INSTANCE.getEFactory(TemplatePackage.eNS_URI);\n if (theTemplateFactory != null)\n {\n return theTemplateFactory;\n }\n }\n catch (Exception exception)\n {\n EcorePlugin.INSTANCE.log(exception);\n }\n return new TemplateFactoryImpl();\n }"
]
| [
"0.74975413",
"0.68715715",
"0.66320103",
"0.65323335",
"0.6154255",
"0.58940506",
"0.570861",
"0.5562985",
"0.5544688",
"0.5544685",
"0.5504452",
"0.54712814",
"0.5471079",
"0.53378177",
"0.5297258",
"0.52287453",
"0.5184658",
"0.5180167",
"0.51744103",
"0.5151282",
"0.5144695",
"0.51293135",
"0.50701976",
"0.50630045",
"0.49715462",
"0.493361",
"0.49278823",
"0.49212155",
"0.48802906",
"0.48652112",
"0.48330045",
"0.4808352",
"0.47924653",
"0.4775095",
"0.47715944",
"0.4743845",
"0.47421804",
"0.47375378",
"0.473254",
"0.47325286",
"0.47311598",
"0.4722021",
"0.47208023",
"0.47151017",
"0.46995917",
"0.46945986",
"0.46865958",
"0.46784252",
"0.46727988",
"0.4671718",
"0.46702686",
"0.46670407",
"0.46644792",
"0.46632302",
"0.46570343",
"0.46307683",
"0.46240422",
"0.4622097",
"0.45997036",
"0.45991328",
"0.45964763",
"0.45964345",
"0.4587689",
"0.45848605",
"0.4579341",
"0.4578555",
"0.45720354",
"0.45694178",
"0.45620823",
"0.45503476",
"0.45407772",
"0.45363978",
"0.45363978",
"0.4525518",
"0.4522248",
"0.45156357",
"0.4513903",
"0.45077285",
"0.45046687",
"0.4497427",
"0.4489118",
"0.44796476",
"0.44611883",
"0.44607893",
"0.44590572",
"0.4457506",
"0.4421769",
"0.4418949",
"0.44160193",
"0.44141746",
"0.4413291",
"0.44131574",
"0.44125333",
"0.44122708",
"0.4412011",
"0.44113275",
"0.44099957",
"0.44094208",
"0.44014606",
"0.4398965"
]
| 0.83185303 | 0 |
Computes the secrets from the two exchanged messages. | void computeSecrets() {
final Bytes agreedSecret =
signatureAlgorithm.calculateECDHKeyAgreement(ephKeyPair.getPrivateKey(), partyEphPubKey);
final Bytes sharedSecret =
keccak256(
concatenate(agreedSecret, keccak256(concatenate(responderNonce, initiatorNonce))));
final Bytes32 aesSecret = keccak256(concatenate(agreedSecret, sharedSecret));
final Bytes32 macSecret = keccak256(concatenate(agreedSecret, aesSecret));
final Bytes32 token = keccak256(sharedSecret);
final HandshakeSecrets secrets =
new HandshakeSecrets(aesSecret.toArray(), macSecret.toArray(), token.toArray());
final Bytes initiatorMac = concatenate(macSecret.xor(responderNonce), initiatorMsgEnc);
final Bytes responderMac = concatenate(macSecret.xor(initiatorNonce), responderMsgEnc);
if (initiator) {
secrets.updateEgress(initiatorMac.toArray());
secrets.updateIngress(responderMac.toArray());
} else {
secrets.updateIngress(initiatorMac.toArray());
secrets.updateEgress(responderMac.toArray());
}
this.secrets = secrets;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testTest1BC() throws Exception {\n\n PrivateKey privKey = MBouncy.getPrivateKey(PemUtil.getBlockAsString(t1PrivateKey));\n PublicKey publKey = MBouncy.getPublicKey(PemUtil.getBlockAsString(t1PublicKey));\n\n byte[] secure = MBouncy.encryptRsa(MString.toBytes(t1Secret), publKey);\n System.out.println(Base64.encode(secure));\n\n String secret =\n MString.byteToString(\n MBouncy.decryptRsa(secure, privKey, MBouncy.RSA_KEY_SIZE.B1024));\n\n assertEquals(t1Secret, secret);\n }",
"public void testCaesar(){\n int key1 = 23;\n int key2 = 17;\n String encrypted = encrypt(\"At noon be in the conference room with your hat on for a surprise party. YELL LOUD!\", 15);\n System.out.println(\"key is 15\" + \"\\n\" + encrypted);\n String encrypted2 = encryptTwoKeys(\"At noon be in the conference room with your hat on for a surprise party. YELL LOUD!\", 8, 21);\n System.out.println(\"key are 8 and 21\" + \"\\n\" + encrypted2);\n }",
"private static byte[] crossCombined(byte[] privateSalt, byte[] publicSalt) {\r\n\t\tAssert.notNull(privateSalt, \"'privateSalt' must not be null\");\r\n\t\tAssert.notNull(publicSalt, \"'publicSalt' must not be null\");\r\n\t\tint privateSaltLength = privateSalt != null ? privateSalt.length : 0;\r\n\t\tint publicSaltLength = publicSalt != null ? publicSalt.length : 0;\r\n\r\n\t\tint length = privateSaltLength + publicSaltLength;\r\n\t\tif (length <= 0) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tbyte[] combined = new byte[length];\r\n\t\tint i = 0;\r\n\t\tfor (int j = 0, k = 0; j < privateSaltLength || k < publicSaltLength; j++, k++) {\r\n\t\t\tif (j < privateSaltLength) {\r\n\t\t\t\tcombined[i++] = privateSalt[j];\r\n\t\t\t}\r\n\t\t\tif (k < publicSaltLength) {\r\n\t\t\t\tcombined[i++] = publicSalt[k];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn combined;\r\n\t}",
"public String cipher() {\n int[] r1taps = {13, 16, 17, 18};\n int[] r2taps = {20, 21};\n int[] r3taps = {7, 20, 21, 22};\n\n // Set register size and majority bits\n final int R1 = 19;\n final int R1M = 8;\n final int R2 = 22;\n final int R2M = 10;\n final int R3 = 23;\n final int R3M = 10;\n\n // Initialize variables\n String bs = \"\";\n byte[] key = HexStringToBytes(symKey);\n BitSet keySet = new BitSet();\n BitSet keyStream = new BitSet();\n BitSet messageSet = new BitSet();\n\n // Create a byte array length of sample message\n byte[] messageArray = new byte[message.length()];\n\n // Convert the sample message to a byte array\n try {\n messageArray = message.getBytes(\"ISO-8859-1\");\n } catch (Exception e) {\n System.out.println(\"Error: \" + e);\n }\n\n // Convert message sample byte array to string\n String as = \"\";\n for (int i = 0; i < messageArray.length; i++) {\n byte b1 = messageArray[i];\n String s = String.format(\"%8s\", Integer.toBinaryString(b1 & 0xFF))\n .replace(' ', '0');\n as += s;\n }\n\n // Convert string of bits to a BitSet\n messageSet = BitStringToBitSet(as);\n\n // Creates string from key byte array\n for (int i = 0; i < 8; i++) {\n byte b1 = key[i];\n String s = String.format(\"%8s\", Integer.toBinaryString(b1 & 0xFF))\n .replace(' ', '0');\n bs += s;\n }\n\n // Convert string of bits to a BitSet\n keySet = BitStringToBitSet(bs);\n\n // Initialize registers\n BitSet r1 = new BitSet();\n BitSet r2 = new BitSet();\n BitSet r3 = new BitSet();\n\n // Process key into registers\n for (int i = 0; i < 64; i++) {\n r1 = ShiftSet(r1, R1, keySet.get(i) ^ Tap(r1, r1taps));\n r2 = ShiftSet(r2, R2, keySet.get(i) ^ Tap(r2, r2taps));\n r3 = ShiftSet(r3, R3, keySet.get(i) ^ Tap(r3, r3taps));\n }\n\n // Clock additional 100 times for additional security (GSM standard)\n for (int i = 0; i < 100; i++) {\n int maj = 0;\n boolean[] ar = {false, false, false};\n if (r1.get(R1M) == true) {\n ar[0] = true;\n maj += 1;\n }\n if (r2.get(R2M) == true) {\n ar[1] = true;\n maj += 1;\n }\n if (r3.get(R3M) == true) {\n ar[2] = true;\n maj += 1;\n }\n // If majority is false (0 bit)\n if (maj <= 1) {\n if (ar[0] == false) {\n r1 = ShiftSet(r1, R1, Tap(r1, r1taps));\n }\n if (ar[1] == false) {\n r2 = ShiftSet(r2, R2, Tap(r2, r2taps));\n }\n if (ar[2] == false) {\n r3 = ShiftSet(r3, R3, Tap(r3, r3taps));\n }\n // Else majority is true\n } else {\n if (ar[0] == true) {\n r1 = ShiftSet(r1, R1, Tap(r1, r1taps));\n }\n if (ar[1] == true) {\n r2 = ShiftSet(r2, R2, Tap(r2, r2taps));\n }\n if (ar[2] == true) {\n r3 = ShiftSet(r3, R3, Tap(r3, r3taps));\n }\n }\n }\n\n // Create keystream as long as the sample message\n for (int i = 0; i < message.length() * 8; i++) {\n\n // Get keystream bit\n keyStream.set(i, r1.get(R1 - 1) ^ r2.get(R2 - 1) ^ r3.get(R3 - 1));\n\n // Shift majority registers\n int maj = 0;\n boolean[] ar = {false, false, false};\n if (r1.get(R1M) == true) {\n ar[0] = true;\n maj += 1;\n }\n if (r2.get(R2M) == true) {\n ar[1] = true;\n maj += 1;\n }\n if (r3.get(R3M) == true) {\n ar[2] = true;\n maj += 1;\n }\n // If majority is false (0 bit)\n if (maj <= 1) {\n if (ar[0] == false) {\n r1 = ShiftSet(r1, R1, Tap(r1, r1taps));\n }\n if (ar[1] == false) {\n r2 = ShiftSet(r2, R2, Tap(r2, r2taps));\n }\n if (ar[2] == false) {\n r3 = ShiftSet(r3, R3, Tap(r3, r3taps));\n }\n // Else majority is true\n } else {\n if (ar[0] == true) {\n r1 = ShiftSet(r1, R1, Tap(r1, r1taps));\n }\n if (ar[1] == true) {\n r2 = ShiftSet(r2, R2, Tap(r2, r2taps));\n }\n if (ar[2] == true) {\n r3 = ShiftSet(r3, R3, Tap(r3, r3taps));\n }\n }\n\n }\n\n // XOR the message with the created keystream and return as string\n messageSet.xor(keyStream);\n return BitStringToText(ReturnSet(messageSet, message.length() * 8));\n }",
"private static void keyExchange() throws IOException, NoSuchAlgorithmException, NoSuchProviderException, InvalidKeySpecException {\r\n\t\t//receive from server\r\n\t\tPublicKey keyserver = cryptoMessaging.recvPublicKey(auctioneer.getInputStream());\r\n\t\t//receive from clients\r\n\t\tPublicKey keyclients[] = new PublicKey[3];\r\n\t\tbiddersigs = new PublicKey[3];\r\n\t\tInputStream stream;\r\n\t\tfor (int i=0; i < bidders.size(); i++) {\r\n\t\t\tstream=(bidders.get(i)).getInputStream();\r\n\t\t\tkeyclients[i] = cryptoMessaging.recvPublicKey(stream);\r\n\t\t\tbiddersigs[i] = keyclients[i];\r\n\t\t}\r\n\t\t//send to auctioneer\r\n\t\tcryptoMessaging.sendPublicKey(auctioneer.getOutputStream(), keyclients[0]); \r\n\t\tcryptoMessaging.sendPublicKey(auctioneer.getOutputStream(), keyclients[1]); \r\n\t\tcryptoMessaging.sendPublicKey(auctioneer.getOutputStream(), keyclients[2]); \r\n\t\t//send to clients\r\n\t\tcryptoMessaging.sendPublicKey((bidders.get(0)).getOutputStream(), keyserver); \r\n\t\tcryptoMessaging.sendPublicKey((bidders.get(1)).getOutputStream(), keyserver); \r\n\t\tcryptoMessaging.sendPublicKey((bidders.get(2)).getOutputStream(), keyserver); \r\n\t\t\r\n\t\t\r\n\t\t// now receive paillier public keys from bidders and auctioneer\r\n\t\tauctioneer_pk = cryptoMessaging.recvPaillier(auctioneer.getInputStream());\r\n\t\tpk[0] = cryptoMessaging.recvPaillier((bidders.get(0)).getInputStream());\r\n\t\tpk[1] = cryptoMessaging.recvPaillier((bidders.get(1)).getInputStream());\r\n\t\tpk[2] = cryptoMessaging.recvPaillier((bidders.get(2)).getInputStream());\r\n\t}",
"public CaesarCipherTwo(int key1, int key2)\n {\n alphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n shiftedAlphabet1 = alphabet.substring(key1)\n + alphabet.substring(0, key1);\n shiftedAlphabet2 = alphabet.substring(key2)\n + alphabet.substring(0, key2);\n mainKey1 = key1;\n mainKey2 = key2;\n }",
"static String aes256CtrArgon2HMacDecrypt(\n Map<String, String> encryptedMsg, String password) throws Exception {\n byte[] argon2salt = Hex.decode(encryptedMsg.get(\"kdfSalt\"));\n byte[] argon2hash = Argon2Factory.createAdvanced(\n Argon2Factory.Argon2Types.ARGON2id).rawHash(16,\n 1 << 15, 2, password, argon2salt);\n\n // AES decryption: {cipherText + IV + secretKey} -> plainText\n byte[] aesIV = Hex.decode(encryptedMsg.get(\"cipherIV\"));\n IvParameterSpec ivSpec = new IvParameterSpec(aesIV);\n Cipher cipher = Cipher.getInstance(\"AES/CTR/NoPadding\");\n Key secretKey = new SecretKeySpec(argon2hash, \"AES\");\n cipher.init(Cipher.DECRYPT_MODE, secretKey, ivSpec);\n byte[] cipherTextBytes = Hex.decode(encryptedMsg.get(\"cipherText\"));\n byte[] plainTextBytes = cipher.doFinal(cipherTextBytes);\n String plainText = new String(plainTextBytes, \"utf8\");\n\n // Calculate and check the MAC code: HMAC(plaintext, argon2hash)\n Mac mac = Mac.getInstance(\"HmacSHA256\");\n Key macKey = new SecretKeySpec(argon2hash, \"HmacSHA256\");\n mac.init(macKey);\n byte[] hmac = mac.doFinal(plainText.getBytes(\"utf8\"));\n String decodedMac = Hex.toHexString(hmac);\n String cipherTextMac = encryptedMsg.get(\"mac\");\n if (! decodedMac.equals(cipherTextMac)) {\n throw new InvalidKeyException(\"MAC does not match: maybe wrong password\");\n }\n\n return plainText;\n }",
"public static void main(String[] args) throws IOException, CryptoException{\n\t\t\n\t\tSocket proxySocket = null;\n\t\tPrintStream out = null;\n\t\tBufferedInputStream in = null;\n\t\t\n\t\ttry{\n\t\t\tproxySocket = new Socket(\"localhost\",2222);\n\t\t\tout = new PrintStream(proxySocket.getOutputStream(),true);\n\t\t\tin = new BufferedInputStream (proxySocket.getInputStream());\n\t\t}catch (UnknownHostException e){\n\t\t\tSystem.err.println(\"Don't know about the host\");\n\t\t\tSystem.exit(1);\n\t\t}catch (IOException e){\n\t\t\tSystem.err.println(\"Couldn't get I/O for the connection\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"connection setup @ main\");\n\t\n\t\tlong starttime = System.currentTimeMillis();\n\t\tkeyRequest(in,out);\n\t\tlong t1 = System.currentTimeMillis();\n\t\tSystem.out.println(\"Keys@Main: \"+N+\" \"+G+\" \"+H);\n\t\tscm = new Scheme(N,G,H);\t// new encryption scheme generated!\n\t\tSystem.out.println(\"Encryption scheme setup!\");\n\n\t\t\n\t\t//mock computation of similarity without l and w paras\n\t\t/*data that should be stored elsewhere in some database*/\n\t\tBigInteger[] dataA = new BigInteger[500];\n\t\tBigInteger[] dataB = new BigInteger[500];\n\t\tfor(int i=0; i<dataA.length;i++)\n\t\t\tdataA[i]=new BigInteger(2,new Random());\n\t\tfor(int i=0; i<dataB.length;i++)\n\t\t\tdataB[i]=new BigInteger(2,new Random());\n\t\tBigInteger[] sqr_dataA = new BigInteger[500];\n\t\tBigInteger[] sqr_dataB = new BigInteger[500];\n\t\tfor(int i=0; i<dataA.length; i++)\n\t\t\tsqr_dataA[i] = dataA[i].modPow(BigInteger.valueOf(2), N);\n\t\tfor(int i=0; i<dataB.length; i++)\n\t\t\tsqr_dataB[i] = dataB[i].modPow(BigInteger.valueOf(2), N);\n\t\tBigInteger[] Numerator,Denominator,d1,d2;\n\t\tint len = 0;\n\t\t//calculate numerator\n\t\tBigInteger[] temp;\n\t\tlen = dataA.length; //to be modified later\n\t\tBigInteger[] p1,p2;\n\t\tp1 = scm.encrypt(dataA[0]);\n\t\tp2 = scm.encrypt(dataB[0]);\n\t\tNumerator = secureMul(p1,p2,in,out);\n\t\tfor(int i = 1;i<len; i++)\n\t\t{\n\t\t\tp1 = scm.encrypt(dataA[0]);\n\t\t\tp2 = scm.encrypt(dataB[0]);\n\t\t\ttemp = secureMul(p1,p2,in,out);\n\t\t\tNumerator = scm.homo_add(temp,Numerator);\n\t\t}\n\t\tSystem.out.println(\"Numerator got!@Main\");\n\t\t//calculate denominator\n\t\td1 = scm.encrypt(sqr_dataA[0]);\n\t\td2 = scm.encrypt(sqr_dataA[1]);\n\t\tfor (int i =1; i<len; i++)\n\t\t{\n\t\t\td1 = scm.homo_add(d1, scm.encrypt(sqr_dataA[i]));\n\t\t\td1 = scm.homo_add(d1, scm.encrypt(sqr_dataB[i]));\n\t\t}\n\t\tDenominator = secureMul(d1,d2,in,out);\n\t\tSystem.out.println(\"Denominator got!@Main\");\n\t\t//calculate similarity\n\t\tBigInteger[] sim =pro_div(Numerator,Denominator,in,out);\n\t\tSystem.out.println(\"Similarity got!@Main \"+sim);\n\t\tlong stoptime = System.currentTimeMillis();\n\t\tlong totaltime = stoptime-starttime;\n\t\tSystem.out.println(\"Total time: \"+ totaltime + \"Key: \"+ (t1-starttime));\n\t\t\t\t\n\t\tSystem.out.println(\"Close connection @Main\");\n\t\tSystem.out.println(\"Send: \"+sent_overhead+\" Receive: \"+receive_overhead);\n\t\tout.close();\n\t\tin.close();\n\t\tproxySocket.close();\n\t}",
"public String encryptTwoKeys(String input, int key1, int key2) {\n String stringsWithK1 = encrypt(input, key1);\n String stringsWithK2 = encrypt(input, key2);\n String empty = \"\";\n\n for(int i = 0; i < input.length; i++) {\n if(i % 2 == 0) {\n empty = empty + stringsWithK1.charAt(i);\n } else {\n empty = empty + stringsWithK2.charAt(i);\n }\n return empty;\n }\n }",
"void decryptMessage(String Password);",
"public BigInteger keyDiffieHellmanSecond(BigInteger[] numbers) {\r\n\t\tBigInteger A = numbers[1];\r\n\t\tBigInteger g = numbers[2];\r\n\t\tBigInteger p = numbers[3];\r\n\t\tBigInteger B = diffie.generate(diffie.geta(), g, p);\r\n\t\tdiffie.setKey(diffie.generate(diffie.geta(), A, p));\r\n\t\tpresentkey = true;\r\n\t\treturn B;\r\n\t}",
"java.lang.String getServerSecret();",
"public final String a(String str, String str2) {\n try {\n SecretKeyFactory instance = SecretKeyFactory.getInstance(\"PBKDF2WithHmacSHA1\");\n char[] charArray = \"FreeFire_Shopee_20190813\".toCharArray();\n j.a((Object) charArray, \"(this as java.lang.String).toCharArray()\");\n Charset charset = d.h.d.f32688a;\n if (str2 != null) {\n byte[] bytes = str2.getBytes(charset);\n j.a((Object) bytes, \"(this as java.lang.String).getBytes(charset)\");\n SecretKey generateSecret = instance.generateSecret(new PBEKeySpec(charArray, bytes, 1000, BitmapCounterConfig.DEFAULT_MAX_BITMAP_COUNT));\n byte[] bArr = new byte[32];\n byte[] bArr2 = new byte[16];\n j.a((Object) generateSecret, \"secretKey\");\n System.arraycopy(generateSecret.getEncoded(), 0, bArr, 0, 32);\n System.arraycopy(generateSecret.getEncoded(), 32, bArr2, 0, 16);\n SecretKeySpec secretKeySpec = new SecretKeySpec(bArr, \"AES\");\n IvParameterSpec ivParameterSpec = new IvParameterSpec(bArr2);\n Cipher instance2 = Cipher.getInstance(\"AES/CBC/PKCS5PADDING\");\n instance2.init(2, secretKeySpec, ivParameterSpec);\n byte[] doFinal = instance2.doFinal(v.h(str));\n j.a((Object) doFinal, \"decryptResult\");\n return new String(doFinal, d.h.d.f32688a);\n }\n throw new m(\"null cannot be cast to non-null type java.lang.String\");\n } catch (Exception e2) {\n e2.printStackTrace();\n return str;\n }\n }",
"public static void main(String[] args) {\n \n byte[] cadena = null;\n byte[] cadenaEncriptada = null;\n byte[] cadenaDencriptada = null;\n String cadena2=\"Hola, bona tarda!, com estas? qqoepoepoepoepooepoepoepoepoepoe\";\n \n SecretKey key=null;\n \n cadena=cadena2.getBytes();\n key=keygenKeyGeneration(128);\n cadenaEncriptada=encryptData(key,cadena);\n System.out.println(cadena2);\n cadena2=cadenaEncriptada.toString();\n System.out.println(cadena2);\n cadenaDencriptada=dencryptData(key,cadenaEncriptada);\n String misstageDencriptat = new String(cadenaDencriptada);\n System.out.println(misstageDencriptat);\n \n }",
"com.google.protobuf.ByteString getSecretBytes();",
"protected byte[] engineSharedSecret() throws KeyAgreementException {\n return Util.trim(ZZ);\n }",
"public CryptographyKeysCreator() {\n Random random = new Random();\n BigInteger prime1 = BigInteger.probablePrime(256, random);\n BigInteger prime2 = BigInteger.probablePrime(256, random);\n primesMultiplied = prime1.multiply(prime2);\n BigInteger phi = prime1.subtract(BigInteger.ONE).multiply(prime2.subtract(BigInteger.ONE));\n encryptingBigInt = BigInteger.probablePrime(256, random);\n\n while (phi.gcd(encryptingBigInt).compareTo(BigInteger.ONE) > 0 && encryptingBigInt.compareTo(phi) < 0) {\n encryptingBigInt = encryptingBigInt.add(BigInteger.ONE);\n }\n\n decryptingBigInt = encryptingBigInt.modInverse(phi);\n }",
"public static BigInteger server()\n\t{\n\t\tint sMessage;\n\t\tBigInteger tmp1 = null;\n\t\tBigInteger tmp2 = null;\n\t\tBigInteger ed = BigInteger.ONE;\n\t\tBigInteger one = BigInteger.ONE;\n\t\tBigInteger two = one.add(one);\n\n\t\tfor(int i = 0; i<serverMsg.length; i++)\n\t\t{\n\t\t\tsMessage = serverMsg[i];\n\t\t\tsMessage = sMessage*sMessage;\n\t\t\tserverCyphertextSquared[i] =Damgard.Encrypt(BigInteger.valueOf(sMessage),key);\n\t\t\tif(debug) System.out.println(\"y^2 \" + i + \": \" + Damgard.Decrypt(serverCyphertextSquared[i], key));\n\t\t}\n\n\t\tfor(int i = 0; i<serverMsg.length; i++)\n\t\t{\n\t\t\ttmp1 = clientCyphertext[i].modInverse(key.n); //tmp1 = -x\n\t\t\ttmp1 = tmp1.modPow(BigInteger.valueOf(serverMsg[i]),key.n); //tmp1 = -xy\n\t\t\ttmp1 = tmp1.modPow(two, key.n); //tmp1 = -2xy\n\t\t\ttmp2 = clientCyphertextSquared[i].multiply(tmp1).multiply(serverCyphertextSquared[i]); //tmp2= x^2-2xy+y^2\n\t\t\ttmp2 = tmp2.mod(key.n);\n\t\t\ted=ed.multiply(tmp2);\n\t\t\ted= ed.mod(key.n);\n\t\t}\n\t\treturn ed;\n\t\t\n\n\n\n\n\n\t}",
"public String initAll(byte[] privateKeyFragment1, byte[] privateKeyFragment2, byte[] publicKey) throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchPaddingException, InvalidKeyException, Base64DecodingException, UnsupportedEncodingException, DestroyFailedException, DecoderException {\n initRsaOperations(privateKeyFragment1, privateKeyFragment2, publicKey);\n String preSharedKey = initAesOperations();\n initHmacOperations();\n return preSharedKey;\n }",
"public static void main(String[] args) throws Exception\n\t{\n\t\tSecurity.addProvider(new BouncyCastleProvider());\n\t\t//generate pub/prv keys \n\t\trsaGenerator rsa = new rsaGenerator();\n\t\trsa.generateRSAKey(\"server\");\n\n\t\t//Create a socket on port 3000\n\t\tServerSocket ss = new ServerSocket(3000);\t\n\t\tSystem.out.println(\"Waiting for client to connect...\");\n\t\tSocket s = ss.accept(); //Accept client connection \n\t\tSystem.out.println(\"Client connected\");\n\t\tObjectOutputStream dos = new ObjectOutputStream(s.getOutputStream()); //outputstream to send message to client\n\t\tdos.writeObject(\"You are connected\");\n\t\t\t\n\t\tObjectInputStream dis = new ObjectInputStream(s.getInputStream()); //input stream to recieve message from client\n\t\tSystem.out.println();\n\n //Recieve key and message from client\n SecretKey k = (SecretKey) dis.readObject(); //recieves the key\n byte[] iv = (byte[])dis.readObject(); //receives the iv\n byte[] received = (byte[])dis.readObject(); //recieves the encypted hash + message\n \n System.out.println(\"Received: \"+Base64.getEncoder().encodeToString(received));\n System.out.println();\n\n //decrypt the shared key using RSA\n System.out.println(\"Encoded Key: \"+ k);\n SecretKey decKey = rsa.decryptSharedKey(k.getEncoded());\n System.out.println(\"Decoded Key: \"+decKey);\n System.out.println();\n\n //decrypt using shared key \n\t\tbyte[] decryptCompByte = decryptByte(received,decKey,iv);\n System.out.println(\"Decrypted compressed concatenation: \"+Base64.getEncoder().encodeToString(decryptCompByte));\n System.out.println();\n \n //decompress\n String dcomp = decompress(decryptCompByte);\n \n \n //Separating the concatination\n String hash = dcomp.substring(0,dcomp.indexOf(\"|||\"));\n String message = dcomp.substring(dcomp.indexOf(\"|||\")+3);\n System.out.println(\"Encrypted hash: \"+hash);\n System.out.println();\n \n //decrypt hash using rsa\n hash = rsa.decryptHas(Base64.getDecoder().decode(hash));\n System.out.println(\"Decrypted hash: \"+hash);\n System.out.println();\n\n //create own hash to compare for authentication\n String myHash = Hash.hash(message);\n if(hash.equals(myHash))\n {\n System.out.println(\"---Message authenticated---\");\n System.out.println(message);\n System.out.println();\n System.out.println(\"Message received. Goodbye.\");\n }\n else\n {\n System.out.println(\"---Message NOT authenticated---\\nGoodbye.\");\n }\n \n s.close();\n ss.close();\n dos.close();\n dis.close();\n\t\t\t\n\n\t}",
"java.lang.String getSecret();",
"@Test\n public void testComputeForTLS10() throws CryptoException {\n byte[] secret = new byte[0];\n PRFAlgorithm prfAlgorithm = PRFAlgorithm.TLS_PRF_LEGACY;\n String label = \"master secret\";\n byte[] seed = new byte[60];\n int size = 48;\n\n byte[] result1 = TlsUtils.PRF_legacy(secret, label, seed, size);\n byte[] result2 = PseudoRandomFunction.compute(PRFAlgorithm.TLS_PRF_LEGACY, secret, label, seed, size);\n assertArrayEquals(result1, result2);\n\n /*\n * Test case 2: test the whole keyBlock generation process check, if master secret is computed correctly\n */\n DHClientKeyExchangeMessage message = new DHClientKeyExchangeMessage();\n message.setPublicKey(new byte[] { 1 });\n message.prepareComputations();\n message.getComputations().setPremasterSecret(ArrayConverter.hexStringToByteArray(\n \"17631f03fb5f59e65ef9b581bb6494e7304e2eaffb07ff7356cf62db1c44f4e4c15614909a3f2980c1908da2200924a23bc037963c204048cc77b1bcab5e6c9ef2c32928bcbdc0b664535885d46a9d4af4104eba4d7428c5741cf1c74bbd54d8e7ea16eaa126218286639a740fc39173e8989aea7f4b4440e1cad321315911fc4a8135d1217ebada1c70cb4ce99ff11dc8c8ca4ffc3c48a9f3f2143588a8fec147a6c3da4d36df18cf075eb7de187d83c7e3b7fd27124741a4b8809bed4f43ed9a434ce59c6a33277be96d8ef27b8e6a59d70bf6a04a86f04dfc37ab69ad90da53dfc1ea27f60a32ee7608b2197943bf8673dbe68003277bfd40b40d18b1a3bf\"));\n message.getComputations().setClientServerRandom(ArrayConverter.hexStringToByteArray(\n \"c8c9c788adbd9dc72b5dd0635f9e2576e09c87b67e045c026ffa3281069601fd594c07e445947b545a746fcbc094e12427e0286be2199300925a81be02bf5467\"));\n result1 = TlsUtils.PRF_legacy(message.getComputations().getPremasterSecret().getValue(), label,\n message.getComputations().getClientServerRandom().getValue(), size);\n result2 = PseudoRandomFunction.compute(PRFAlgorithm.TLS_PRF_LEGACY,\n message.getComputations().getPremasterSecret().getValue(), label,\n message.getComputations().getClientServerRandom().getValue(), size);\n assertArrayEquals(result1, result2);\n\n /*\n * check, if keyblock is computed correctly TLS_DHE_RSA_WITH_AES_256_CBC_SHA MAC Write Client 20 Bytes Mac Write\n * Server 20 Bytes Enc Write Client 32 Bytes Enc Write Server 32 Bytes IV Write Client 16 Bytes IV Write Server\n * 16 Bytes\n */\n byte[] serverClientRandom = ArrayConverter.hexStringToByteArray(\n \"4a8135d1217ebada1c70cb4ce99ff11dc8c8ca4ffc3c48a9f3f2143588a8fec147a6c3da4d36df18cf075eb7de187d83c7e3b7fd27124741a4b8809bed4f43ed9a434ce59c6a33277be96d8ef27b8e6a59d70bf6a04a86f04dfc37ab69ad90da53dfc1ea27f60a32ee7608b2197943bf8673dbe68003277bfd40b40d18b1a3bf17631f03fb5f59e65ef9b581bb6494e7304e2eaffb07ff7356cf62db1c44f4e4c15614909a3f2980c1908da2200924a23bc037963c204048cc77b1bcab5e6c9ef2c32928bcbdc0b664535885d46a9d4af4104eba4d7428c5741cf1c74bbd54d8e7ea16eaa126218286639a740fc39173e8989aea7f4b4440e1cad321315911fc\");\n result1 = TlsUtils.PRF_legacy(result1, \"key expansion\", serverClientRandom, 136);\n result2 = PseudoRandomFunction.compute(PRFAlgorithm.TLS_PRF_LEGACY, result2, \"key expansion\",\n serverClientRandom, 136);\n assertArrayEquals(result1, result2);\n }",
"@Test\n\tpublic void testSecuirtyConfigsOperations() throws NoSuchAlgorithmException {\n\t\t// Generate and store keys for the first time\n\t\tServerKeyPairs serverKeyPairs1 = new ServerKeyPairs();\n\t\tKeyPair encryptionKeyPair1 = serverKeyPairs1.getEncryptionKeyPair();\n\t\tKeyPair signatureKeyPair1 = serverKeyPairs1.getSignatureKeyPair();\n\n\t\t// Initialize a new serverKeyPairs to test that it will only read\n\t\t// previously generated keys\n\t\tServerKeyPairs serverKeyPairs2 = new ServerKeyPairs();\n\t\tKeyPair encryptionKeyPair2 = serverKeyPairs2.getEncryptionKeyPair();\n\t\tKeyPair signatureKeyPair2 = serverKeyPairs2.getSignatureKeyPair();\n\n\t\tassertEquals(\"Wrong loaded encryption public key modulas parameter\",\n\t\t\t\t((RSAPublicKey) encryptionKeyPair1.getPublic()).getModulus(),\n\t\t\t\t((RSAPublicKey) encryptionKeyPair2.getPublic()).getModulus());\n\n\t\tassertEquals(\"Wrong loaded encryption public key exponent parameter\",\n\t\t\t\t((RSAPublicKey) encryptionKeyPair1.getPublic()).getPublicExponent(),\n\t\t\t\t((RSAPublicKey) encryptionKeyPair2.getPublic()).getPublicExponent());\n\n\t\tassertEquals(\"Wrong loaded encryption private key modulas parameter\",\n\t\t\t\t((RSAPrivateKey) encryptionKeyPair1.getPrivate()).getModulus(),\n\t\t\t\t((RSAPrivateKey) encryptionKeyPair2.getPrivate()).getModulus());\n\n\t\tassertEquals(\"Wrong loaded encryption private key exponent parameter\",\n\t\t\t\t((RSAPrivateKey) encryptionKeyPair1.getPrivate()).getPrivateExponent(),\n\t\t\t\t((RSAPrivateKey) encryptionKeyPair2.getPrivate()).getPrivateExponent());\n\n\t\tassertEquals(\"Wrong loaded signature public key modulas parameter\",\n\t\t\t\t((RSAPublicKey) signatureKeyPair1.getPublic()).getModulus(),\n\t\t\t\t((RSAPublicKey) signatureKeyPair2.getPublic()).getModulus());\n\n\t\tassertEquals(\"Wrong loaded signature public key exponent parameter\",\n\t\t\t\t((RSAPublicKey) signatureKeyPair1.getPublic()).getPublicExponent(),\n\t\t\t\t((RSAPublicKey) signatureKeyPair2.getPublic()).getPublicExponent());\n\n\t\tassertEquals(\"Wrong loaded signature private key modulas parameter\",\n\t\t\t\t((RSAPrivateKey) signatureKeyPair1.getPrivate()).getModulus(),\n\t\t\t\t((RSAPrivateKey) signatureKeyPair2.getPrivate()).getModulus());\n\n\t\tassertEquals(\"Wrong loaded signature private key exponent parameter\",\n\t\t\t\t((RSAPrivateKey) signatureKeyPair1.getPrivate()).getPrivateExponent(),\n\t\t\t\t((RSAPrivateKey) signatureKeyPair2.getPrivate()).getPrivateExponent());\n\t}",
"@Test\n public void setSecretsRequest_identicalSecrets() throws IOException {\n assertThat(this.secretRepository.count()).isEqualTo(2);\n\n final Resource request = new ClassPathResource(\"test-requests/storeSecrets.xml\");\n final Resource expectedResponse = new ClassPathResource(\"test-responses/storeSecrets.xml\");\n //Store secrets\n this.mockWebServiceClient.sendRequest(withPayload(request)).andExpect(ResponseMatchers.noFault()).andExpect(\n ResponseMatchers.payload(expectedResponse));\n //Store identical secrets again\n final String errorMessage = \"Secret is identical to current secret (\" + DEVICE_IDENTIFICATION + \", \"\n + \"E_METER_AUTHENTICATION_KEY)\";\n this.mockWebServiceClient.sendRequest(withPayload(request)).andExpect(\n ResponseMatchers.serverOrReceiverFault(errorMessage));\n }",
"public static void main(String[] args) {\r\n\r\n String message = \"Hello, I'm Alice!\";\r\n // Alice's private and public key\r\n RSA rsaAlice = new RSA();\r\n rsaAlice.generateKeyPair();\r\n // Bob's private and public key\r\n RSA rsaBob = new RSA();\r\n rsaBob.generateKeyPair();\r\n // encrypted message from Alice to Bob\r\n BigInteger cipher = rsaAlice.encrypt(message, rsaBob.pubKey);\r\n // create digital signature by Alice\r\n BigInteger signature = rsaAlice.createSignature(message);\r\n\r\n // Bob decrypt message and verify signature\r\n String plain = rsaBob.decrypt(cipher, rsaBob.pubKey);\r\n boolean isVerify = rsaBob.verifySignature(plain, signature, rsaAlice.pubKey);\r\n\r\n if( isVerify )\r\n {\r\n System.out.println(\"Plain text : \" + plain);\r\n }\r\n\r\n /**\r\n * Part II. Two-part RSA protocol to receive\r\n * session key, with signature\r\n */\r\n\r\n // A's private and public key\r\n RSA rsaA = new RSA();\r\n rsaA.generateKeyPair();\r\n // B's private and public key\r\n RSA rsaB = new RSA();\r\n rsaB.generateKeyPair();\r\n\r\n BigInteger newSessionKey = new BigInteger(\"123456789123465\", 10);\r\n // create message by A\r\n BigInteger S = newSessionKey.modPow(rsaA.getPrivKeyD(), rsaA.pubKey[1]);\r\n BigInteger k1 = newSessionKey.modPow(rsaB.pubKey[0], rsaB.pubKey[1]);\r\n BigInteger S1 = S.modPow(rsaB.pubKey[0], rsaB.pubKey[1]);\r\n\r\n // --------- sending message to B --------- >>>\r\n\r\n // receive message by B and take new session key\r\n BigInteger k = k1.modPow(rsaB.getPrivKeyD(), rsaB.pubKey[1]);\r\n BigInteger Sign = S1.modPow(rsaB.getPrivKeyD(), rsaB.pubKey[1]);\r\n BigInteger verifyK = Sign.modPow(rsaA.pubKey[0], rsaA.pubKey[1]);\r\n\r\n if(verifyK.equals(k))\r\n {\r\n System.out.println(\"B receive new session key from A: \" + k.toString());\r\n }\r\n else\r\n {\r\n System.out.println(\"B receive FAKE session key from A: \" + k.toString());\r\n }\r\n\r\n }",
"private int generateSecret() {\n int secret = secretGenerator.nextInt();\n while (secretToNumber.containsKey(secret)) {\n secret = secretGenerator.nextInt();\n }\n return secret;\n }",
"@Test\n public void testCryptographyNegative()\n {\n byte[] sensitiveBytes = sensitiveString.getBytes();\n byte[] secure = StateUtils.encrypt(sensitiveBytes, externalContext);\n \n secure[secure.length-5] = (byte) 1;\n try\n {\n byte[] insecure = StateUtils.decrypt(secure, externalContext);\n Assertions.assertFalse(Arrays.equals(insecure, sensitiveBytes));\n }\n catch (Exception e)\n {\n // do nothing\n }\n }",
"private static void crypto(String filePath1, String filePath2) {\n\n\t\t// Retrieve the cipher\n\t\tCipher cipher;\n\t\ttry {\n\t\t\tcipher = obtainCipher();\n\n\t\t} catch (InvalidKeyException | InvalidAlgorithmParameterException | NoSuchAlgorithmException\n\t\t\t\t| NoSuchPaddingException e) {\n\t\t\tSystem.out.println(\"Exception while obtaining cypher: \" + e.getMessage());\n\t\t\treturn;\n\t\t}\n\n\t\tPath p = Paths.get(filePath1);\n\t\tPath p2 = Paths.get(filePath2);\n\n\t\t// Open the file input and output stream\n\t\ttry (InputStream is = Files.newInputStream(p); OutputStream os = Files.newOutputStream(p2)) {\n\t\t\tbyte[] buff = new byte[4096];\n\n\t\t\twhile (true) {\n\t\t\t\tint r = is.read(buff);\n\n\t\t\t\tif (r == -1) {\n\t\t\t\t\t// Finishing the cipher\n\t\t\t\t\ttry {\n\t\t\t\t\t\tos.write(cipher.doFinal());\n\t\t\t\t\t} catch (IllegalBlockSizeException | BadPaddingException e) {\n\t\t\t\t\t\tSystem.out.println(\"Exception while finalizaing cipher: \" + e.getMessage());\n\t\t\t\t\t\tSystem.exit(1);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Update cipher and write into new file\n\t\t\t\tos.write(cipher.update(buff, 0, r));\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Exception while opening the file: \" + e.getMessage());\n\t\t\tSystem.exit(1);\n\n\t\t}\n\n\t\tSystem.out.println((encrypt ? \"Encryption\" : \"Decryption\") + \" completed. Generated file \" + filePath2\n\t\t\t\t+ \" based on file \" + filePath1 + \".\");\n\n\t}",
"private void receiveOutbound(ByteBuffer src) {\n\n // recv Y+E(H(X+Y)+tsB, sk, Y[239:255])\n // Read in Y, which is the first part of message #2\n if (_state == State.OB_SENT_X && src.hasRemaining()) {\n int toGet = Math.min(src.remaining(), XY_SIZE - _received);\n src.get(_Y, _received, toGet);\n _received += toGet;\n if (_received < XY_SIZE)\n return;\n\n try {\n _dh.setPeerPublicValue(_Y);\n _dh.getSessionKey(); // force the calc\n if (_log.shouldLog(Log.DEBUG))\n _log.debug(prefix()+\"DH session key calculated (\" + _dh.getSessionKey().toBase64() + \")\");\n changeState(State.OB_GOT_Y);\n _received = 0;\n } catch (DHSessionKeyBuilder.InvalidPublicParameterException e) {\n _context.statManager().addRateData(\"ntcp.invalidDH\", 1);\n fail(\"Invalid X\", e);\n return;\n } catch (IllegalStateException ise) {\n // setPeerPublicValue()\n fail(\"reused keys?\", ise);\n return;\n }\n }\n\n // Read in the rest of message #2\n if (_state == State.OB_GOT_Y && src.hasRemaining()) {\n int toGet = Math.min(src.remaining(), HXY_TSB_PAD_SIZE - _received);\n src.get(_e_hXY_tsB, _received, toGet);\n _received += toGet;\n if (_received < HXY_TSB_PAD_SIZE)\n return;\n\n if (_log.shouldLog(Log.DEBUG)) _log.debug(prefix() + \"received _e_hXY_tsB fully\");\n byte hXY_tsB[] = new byte[HXY_TSB_PAD_SIZE];\n _context.aes().decrypt(_e_hXY_tsB, 0, hXY_tsB, 0, _dh.getSessionKey(), _Y, XY_SIZE-AES_SIZE, HXY_TSB_PAD_SIZE);\n byte XY[] = new byte[XY_SIZE + XY_SIZE];\n System.arraycopy(_X, 0, XY, 0, XY_SIZE);\n System.arraycopy(_Y, 0, XY, XY_SIZE, XY_SIZE);\n byte[] h = SimpleByteCache.acquire(HXY_SIZE);\n _context.sha().calculateHash(XY, 0, XY_SIZE + XY_SIZE, h, 0);\n if (!DataHelper.eq(h, 0, hXY_tsB, 0, HXY_SIZE)) {\n SimpleByteCache.release(h);\n _context.statManager().addRateData(\"ntcp.invalidHXY\", 1);\n fail(\"Invalid H(X+Y) - mitm attack attempted?\");\n return;\n }\n SimpleByteCache.release(h);\n changeState(State.OB_GOT_HXY);\n _received = 0;\n // their (Bob's) timestamp in seconds\n _tsB = DataHelper.fromLong(hXY_tsB, HXY_SIZE, 4);\n long now = _context.clock().now();\n // rtt from sending #1 to receiving #2\n long rtt = now - _con.getCreated();\n // our (Alice's) timestamp in seconds\n _tsA = (now + 500) / 1000;\n _peerSkew = (now - (_tsB * 1000) - (rtt / 2) + 500) / 1000; \n if (_log.shouldLog(Log.DEBUG))\n _log.debug(prefix()+\"h(X+Y) is correct, skew = \" + _peerSkew);\n\n // the skew is not authenticated yet, but it is certainly fatal to\n // the establishment, so fail hard if appropriate\n long diff = 1000*Math.abs(_peerSkew);\n if (!_context.clock().getUpdatedSuccessfully()) {\n // Adjust the clock one time in desperation\n // We are Alice, he is Bob, adjust to match Bob\n _context.clock().setOffset(1000 * (0 - _peerSkew), true);\n _peerSkew = 0;\n if (diff != 0)\n _log.logAlways(Log.WARN, \"NTP failure, NTCP adjusting clock by \" + DataHelper.formatDuration(diff));\n } else if (diff >= Router.CLOCK_FUDGE_FACTOR) {\n _context.statManager().addRateData(\"ntcp.invalidOutboundSkew\", diff);\n _transport.markReachable(_con.getRemotePeer().calculateHash(), false);\n // Only banlist if we know what time it is\n _context.banlist().banlistRouter(DataHelper.formatDuration(diff),\n _con.getRemotePeer().calculateHash(),\n _x(\"Excessive clock skew: {0}\"));\n _transport.setLastBadSkew(_peerSkew);\n fail(\"Clocks too skewed (\" + diff + \" ms)\", null, true);\n return;\n } else if (_log.shouldLog(Log.DEBUG)) {\n _log.debug(prefix()+\"Clock skew: \" + diff + \" ms\");\n }\n\n // now prepare and send our response\n // send E(#+Alice.identity+tsA+padding+S(X+Y+Bob.identHash+tsA+tsB), sk, hX_xor_Bob.identHash[16:31])\n int sigSize = XY_SIZE + XY_SIZE + HXY_SIZE + 4+4;//+12;\n byte preSign[] = new byte[sigSize];\n System.arraycopy(_X, 0, preSign, 0, XY_SIZE);\n System.arraycopy(_Y, 0, preSign, XY_SIZE, XY_SIZE);\n System.arraycopy(_con.getRemotePeer().calculateHash().getData(), 0, preSign, XY_SIZE + XY_SIZE, HXY_SIZE);\n DataHelper.toLong(preSign, XY_SIZE + XY_SIZE + HXY_SIZE, 4, _tsA);\n DataHelper.toLong(preSign, XY_SIZE + XY_SIZE + HXY_SIZE + 4, 4, _tsB);\n // hXY_tsB has 12 bytes of padding (size=48, tsB=4 + hXY=32)\n Signature sig = _context.dsa().sign(preSign, _context.keyManager().getSigningPrivateKey());\n\n byte ident[] = _context.router().getRouterInfo().getIdentity().toByteArray();\n // handle variable signature size\n int min = 2 + ident.length + 4 + sig.length();\n int rem = min % AES_SIZE;\n int padding = 0;\n if (rem > 0)\n padding = AES_SIZE - rem;\n byte preEncrypt[] = new byte[min+padding];\n DataHelper.toLong(preEncrypt, 0, 2, ident.length);\n System.arraycopy(ident, 0, preEncrypt, 2, ident.length);\n DataHelper.toLong(preEncrypt, 2+ident.length, 4, _tsA);\n if (padding > 0)\n _context.random().nextBytes(preEncrypt, 2 + ident.length + 4, padding);\n System.arraycopy(sig.getData(), 0, preEncrypt, 2+ident.length+4+padding, sig.length());\n\n _prevEncrypted = new byte[preEncrypt.length];\n _context.aes().encrypt(preEncrypt, 0, _prevEncrypted, 0, _dh.getSessionKey(),\n _hX_xor_bobIdentHash, _hX_xor_bobIdentHash.length-AES_SIZE, preEncrypt.length);\n\n changeState(State.OB_SENT_RI);\n _transport.getPumper().wantsWrite(_con, _prevEncrypted);\n }\n\n // Read in message #4\n if (_state == State.OB_SENT_RI && src.hasRemaining()) {\n // we are receiving their confirmation\n\n // recv E(S(X+Y+Alice.identHash+tsA+tsB)+padding, sk, prev)\n int off = 0;\n if (_e_bobSig == null) {\n // handle variable signature size\n int siglen = _con.getRemotePeer().getSigningPublicKey().getType().getSigLen();\n int rem = siglen % AES_SIZE;\n int padding;\n if (rem > 0)\n padding = AES_SIZE - rem;\n else\n padding = 0;\n _e_bobSig = new byte[siglen + padding];\n if (_log.shouldLog(Log.DEBUG))\n _log.debug(prefix() + \"receiving E(S(X+Y+Alice.identHash+tsA+tsB)+padding, sk, prev) (remaining? \" +\n src.hasRemaining() + \")\");\n } else {\n off = _received;\n if (_log.shouldLog(Log.DEBUG))\n _log.debug(prefix() + \"continuing to receive E(S(X+Y+Alice.identHash+tsA+tsB)+padding, sk, prev) (remaining? \" +\n src.hasRemaining() + \" off=\" + off + \" recv=\" + _received + \")\");\n }\n while (_state == State.OB_SENT_RI && src.hasRemaining()) {\n _e_bobSig[off++] = src.get();\n _received++;\n\n if (off >= _e_bobSig.length) {\n changeState(State.OB_GOT_SIG);\n byte bobSig[] = new byte[_e_bobSig.length];\n _context.aes().decrypt(_e_bobSig, 0, bobSig, 0, _dh.getSessionKey(),\n _e_hXY_tsB, HXY_TSB_PAD_SIZE - AES_SIZE, _e_bobSig.length);\n // ignore the padding\n // handle variable signature size\n SigType type = _con.getRemotePeer().getSigningPublicKey().getType();\n int siglen = type.getSigLen();\n // we don't need to do this if no padding!\n byte bobSigData[] = new byte[siglen];\n System.arraycopy(bobSig, 0, bobSigData, 0, siglen);\n Signature sig = new Signature(type, bobSigData);\n\n byte toVerify[] = new byte[XY_SIZE + XY_SIZE + HXY_SIZE +4+4];\n int voff = 0;\n System.arraycopy(_X, 0, toVerify, voff, XY_SIZE); voff += XY_SIZE;\n System.arraycopy(_Y, 0, toVerify, voff, XY_SIZE); voff += XY_SIZE;\n System.arraycopy(_context.routerHash().getData(), 0, toVerify, voff, HXY_SIZE); voff += HXY_SIZE;\n DataHelper.toLong(toVerify, voff, 4, _tsA); voff += 4;\n DataHelper.toLong(toVerify, voff, 4, _tsB); voff += 4;\n\n boolean ok = _context.dsa().verifySignature(sig, toVerify, _con.getRemotePeer().getSigningPublicKey());\n if (!ok) {\n _context.statManager().addRateData(\"ntcp.invalidSignature\", 1);\n fail(\"Signature was invalid - attempt to spoof \" + _con.getRemotePeer().calculateHash().toBase64() + \"?\");\n } else {\n if (_log.shouldLog(Log.DEBUG))\n _log.debug(prefix() + \"signature verified from Bob. done!\");\n byte nextWriteIV[] = SimpleByteCache.acquire(AES_SIZE);\n System.arraycopy(_prevEncrypted, _prevEncrypted.length-AES_SIZE, nextWriteIV, 0, AES_SIZE);\n // this does not copy the nextWriteIV, do not release to cache\n // We are Alice, he is Bob, clock skew is Bob - Alice\n // skew in seconds\n _con.finishOutboundEstablishment(_dh.getSessionKey(), _peerSkew, nextWriteIV, _e_bobSig);\n changeState(State.VERIFIED);\n if (src.hasRemaining()) {\n // process \"extra\" data\n // This is fairly common for outbound, where Bob may send his updated RI\n if (_log.shouldInfo())\n _log.info(\"extra data \" + src.remaining() + \" on \" + this);\n _con.recvEncryptedI2NP(src);\n }\n releaseBufs(true);\n // if socket gets closed this will be null - prevent NPE\n InetAddress ia = _con.getChannel().socket().getInetAddress();\n if (ia != null)\n _transport.setIP(_con.getRemotePeer().calculateHash(), ia.getAddress());\n }\n return;\n }\n }\n }\n\n // check for remaining data\n if ((_state == State.VERIFIED || _state == State.CORRUPT) && src.hasRemaining()) {\n if (_log.shouldWarn())\n _log.warn(\"Received unexpected \" + src.remaining() + \" on \" + this, new Exception());\n }\n }",
"public byte[] Tdecryption() {\n int[] plaintext = new int[message.length];\n\n for (int j = 0, k = 1; j < message.length && k < message.length; j = j + 2, k = k + 2) {\n sum = delta << 5;\n l = message[j];\n r = message[k];\n for (int i = 0; i < 32; i++) {\n r = r - (((l << 4) + key[2]) ^ (l + sum) ^ ((l >> 5) + key[3]));\n l = l - (((r << 4) + key[0]) ^ (r + sum) ^ ((r >> 5) + key[1]));\n sum = sum - delta;\n }\n plaintext[j] = l;\n plaintext[k] = r;\n }\n return this.Inttobyte(plaintext);\n }",
"@Test\n @SuppressWarnings(\"ResultOfMethodCallIgnored\")\n public void passphraseIsNotSymmetricKey() {\n SymmetricKey secret = new SymmetricKey();\n SecureCell.Seal cellMK = SecureCell.SealWithKey(secret);\n SecureCell.Seal cellPW = SecureCell.SealWithPassphrase(secret.toByteArray());\n byte[] message = \"All your base are belong to us!\".getBytes(StandardCharsets.UTF_8);\n\n byte[] encryptedMK = cellMK.encrypt(message);\n byte[] encryptedPW = cellPW.encrypt(message);\n\n try {\n cellPW.decrypt(encryptedMK);\n fail(\"expected SecureCellException\");\n }\n catch (SecureCellException ignored) {}\n try {\n cellMK.decrypt(encryptedPW);\n fail(\"expected SecureCellException\");\n }\n catch (SecureCellException ignored) {}\n }",
"private void encryptionAlgorithm() {\n\t\ttry {\n\t\t\t\n\t\t\tFileInputStream fileInputStream2=new FileInputStream(\"D:\\\\program\\\\key.txt\");\n\t\t\tchar key=(char)fileInputStream2.read();\n\t\t\tSystem.out.println(key);\n\t\t\tFileInputStream fileInputStream1=new FileInputStream(\"D:\\\\program\\\\message.txt\");\n\t\t\tint i=0;\n\t\t\t\n\t\t\tStringBuilder message=new StringBuilder();\n\t\t\twhile((i= fileInputStream1.read())!= -1 )\n\t\t\t{\n\t\t\t\tmessage.append((char)i);\n\t\t\t}\n\t\t\tString s=message.toString();\n\t\t\tchar[] letters=new char[s.length()];\n\t\t\tStringBuilder en=new StringBuilder();\n\t\t\tfor(int j = 0;j < letters.length;j++)\n\t\t\t{\n\t\t\t\ten.append((char)(byte)letters[j]+key);\n\t\t\t}\t\t\n\t\t\tFileOutputStream fileoutput=new FileOutputStream(\"D:\\\\program\\\\encryptedfile.txt\");\n\t\t\t\n\t\t\tfileInputStream1.close();\n\t\t\tfileInputStream2.close();\n\t\t\t\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t\n\t}",
"public static void client() \n\t{\n\t\tint cMessage;\n\t\tint cMessageSquared;\n\t\tfor(int i=0; i<serverMsg.length;i++)\n\t\t{\n\t\t\tcMessage = clientMsg[i]; \n\t\t\tcMessageSquared = cMessage*cMessage;\n\t\t\tclientCyphertext[i] = Damgard.Encrypt(BigInteger.valueOf(cMessage),key);\n\t\t\tclientCyphertextSquared[i] = Damgard.Encrypt(BigInteger.valueOf(cMessageSquared),key);\n\t\t\tif(debug) System.out.println(\"x^2 \" + i + \": \" + Damgard.Decrypt(clientCyphertextSquared[i], key));\n\t\t\tif(debug) System.out.println(\"x\" + i + \": \" + Damgard.Decrypt(clientCyphertext[i], key));\n\t\t}\n\t}",
"String getCiphersPassphrase();",
"public static Map<String, String> aes256CtrArgon2HMacEncrypt(\n String plainText, String password) throws Exception {\n SecureRandom rand = new SecureRandom();\n byte[] argon2salt = new byte[16];\n rand.nextBytes(argon2salt); // Generate 128-bit salt\n byte[] argon2hash = Argon2Factory.createAdvanced(\n Argon2Factory.Argon2Types.ARGON2id).rawHash(16,\n 1 << 15, 2, password, argon2salt);\n Key secretKey = new SecretKeySpec(argon2hash, \"AES\");\n\n // AES encryption: {plaintext + IV + secretKey} -> ciphertext\n byte[] aesIV = new byte[16];\n rand.nextBytes(aesIV); // Generate 128-bit IV (salt)\n IvParameterSpec ivSpec = new IvParameterSpec(aesIV);\n Cipher cipher = Cipher.getInstance(\"AES/CTR/NoPadding\");\n cipher.init(Cipher.ENCRYPT_MODE, secretKey, ivSpec);\n byte[] plainTextBytes = plainText.getBytes(\"utf8\");\n byte[] cipherBytes = cipher.doFinal(plainTextBytes);\n\n // Calculate the MAC of the plaintext with the derived argon2hash\n Mac mac = Mac.getInstance(\"HmacSHA256\");\n Key macKey = new SecretKeySpec(argon2hash, \"HmacSHA256\");\n mac.init(macKey);\n byte[] hmac = mac.doFinal(plainText.getBytes(\"utf8\"));\n\n var encryptedMsg = Map.of(\n \"kdf\", \"argon2\",\n \"kdfSalt\", Hex.toHexString(argon2salt),\n \"cipher\", \"aes-256-ctr\",\n \"cipherIV\", Hex.toHexString(aesIV),\n \"cipherText\", Hex.toHexString(cipherBytes),\n \"mac\", Hex.toHexString(hmac)\n );\n return encryptedMsg;\n }",
"public static Tuple<String, String> generateKey() {\r\n\t\t// Get the KeyGenerator\r\n\t\ttry {\r\n\t\t\tKeyGenerator kgen;\r\n\t\t\tkgen = KeyGenerator.getInstance(\"AES\");\r\n\t\t\tkgen.init(256);\r\n\t\t\t// Generate the secret key specs.\r\n\t\t\tSecretKey skey = kgen.generateKey();\r\n\t\t\tbyte[] raw = skey.getEncoded();\r\n\t\t\tString key = new Base64().encodeAsString(raw);\r\n\r\n\t\t\tSecureRandom randomSecureRandom = SecureRandom\r\n\t\t\t\t\t.getInstance(\"SHA1PRNG\");\r\n\t\t\tCipher cipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\r\n\t\t\tbyte[] iv = new byte[cipher.getBlockSize()];\r\n\t\t\trandomSecureRandom.nextBytes(iv);\r\n\t\t\tString ivStr = new Base64().encodeAsString(iv);\r\n\t\t\treturn new Tuple(key, ivStr);\r\n\r\n\t\t} catch (NoSuchAlgorithmException e) {\r\n\t\t\tLogger.error(\"Error while generating key: %s\",\r\n\t\t\t\t\t\"NoSuchAlgorithmException\");\r\n\t\t} catch (NoSuchPaddingException e) {\r\n\t\t\tLogger.error(\"Error while generating key: %s\",\r\n\t\t\t\t\t\"NoSuchPaddingException\");\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"void updateDecrypt() {\r\n\r\n for (int i = 0; i < 56; i++) {\r\n queue.set(i, queue.get(i + 8));\r\n }\r\n\r\n //adding results of plaintext XOR keystream to ciphertext\r\n ciphertext.addAll(xor(plaintext, keystream));\r\n\r\n //takes last 8 bits of ciphertext and copies to right 8 bits in queue \r\n int ciphertextIndexOfLast = ciphertext.size();\r\n\r\n //notice here the bits being pushed into queue are from the ciphertext generated during encryption. although the information\r\n //is stored in a variable named \"plaintext,\" the encrypted ciphertext is what was actually passed into that plaintext variable\r\n //for decryption\r\n for (int i = ciphertextIndexOfLast - 8; i < ciphertextIndexOfLast; i++) {\r\n queue.set((i - ((ciphertextIndexOfLast - 8)) + 56), plaintext.get(i));\r\n }\r\n\r\n //using the new queue, populates registers with new data\r\n resetRegisters(queue);\r\n\r\n }",
"private byte[] digestMsg(byte[][] parsedMsg) {\n\n int a, b, c, d, e, f, g, h;\n int[] hashValues = new int[8];\n\n // Initialize hash values for the first iteration, as per section 5.3.3\n System.arraycopy(H, 0, hashValues, 0, 8);\n\n // Iterate through the input message blocks\n for (int i = 0; i < parsedMsg.length; i++) {\n // 1. Prepare message schedule\n fillWords(parsedMsg[i]);\n\n // 2. Initialize working variables with hash values of previous iteration\n a = hashValues[0];\n b = hashValues[1];\n c = hashValues[2];\n d = hashValues[3];\n e = hashValues[4];\n f = hashValues[5];\n g = hashValues[6];\n h = hashValues[7];\n\n // 3. Compute updated working variables\n for (int t = 0; t < 64; t++) {\n int T1 = h + Sum1(e) + Ch(e, f, g) + K[t] + words[t];\n int T2 = Sum0(a) + Maj(a, b, c);\n h = g;\n g = f;\n f = e;\n e = d + T1;\n d = c;\n c = b;\n b = a;\n a = T1 + T2;\n }\n\n // 4. Update hash values\n hashValues[0] = a + hashValues[0];\n hashValues[1] = b + hashValues[1];\n hashValues[2] = c + hashValues[2];\n hashValues[3] = d + hashValues[3];\n hashValues[4] = e + hashValues[4];\n hashValues[5] = f + hashValues[5];\n hashValues[6] = g + hashValues[6];\n hashValues[7] = h + hashValues[7];\n }\n\n\n // Finalize the hash value\n // Concatenate the hash values to one 256-bit output byte[]\n byte[] digest = new byte[32];\n for (int i = 0; i < 8; i++) {\n System.arraycopy(intToBytes(hashValues[i]), 0, digest, 4 * i, 4);\n }\n\n return digest;\n }",
"public BigInteger getSharedSecret(BigInteger composite)\n {\n return composite.modPow(privateKey, modulus);\n }",
"private static byte[] receiveBobPublicKeyAndSendAliceDigest(byte[] encodedPublicKeyBob)\r\n\t\t\tthrows NoSuchAlgorithmException, InvalidKeyException, IllegalStateException, InvalidKeySpecException,\r\n\t\t\tInvalidAlgorithmParameterException {\r\n\r\n\t\tfinal byte[] encodedPrivateKey = keyPairAlice.getPrivate().getEncoded();\r\n\t\tfinal byte[] sharedSecret = computeSharedSecret(encodedPrivateKey, encodedPublicKeyBob);\r\n\t\tfinal byte[] digestBytes = MessageDigest.getInstance(\"SHA-256\").digest(sharedSecret);\r\n\r\n\t\tSystem.out.printf(\"Alice shared secret length[%d], message digest length[%d]%n\", sharedSecret.length,\r\n\t\t\t\tdigestBytes.length);\r\n\t\treturn digestBytes;\r\n\t}",
"public String decrypt(String input)\n {\n CaesarCipherTwo cipher = new CaesarCipherTwo(26 - mainKey1, 26 - mainKey2);\n return cipher.encrypt(input);\n }",
"@Test\n public void testHashingAvPassord() {\n String passordTilHash = \"passord\";\n String salt = null;\n String salt2 = null;\n try{\n salt = HashPassord.getSalt();\n salt2 = HashPassord.getSalt();\n }catch(NoSuchAlgorithmException | NoSuchProviderException | java.security.NoSuchProviderException e){\n e.printStackTrace();\n }\n String sikkertPassord = getSecurePassword(passordTilHash, salt);\n String sikkertPassord2 = getSecurePassword(passordTilHash, salt2);\n String regenerertPassordVerifisering = getSecurePassword(passordTilHash, salt);\n \n System.out.println( sikkertPassord+ \":\" + salt); //skriver 83ee5baeea20b6c21635e4ea67847f66\n System.out.println( sikkertPassord2+ \":\" + salt2);\n System.out.println(regenerertPassordVerifisering + \":\" + salt); //skriver 83ee5baeea20b6c21635e4ea67847f66\n \n assertEquals(sikkertPassord, regenerertPassordVerifisering);\n assertNotSame(salt, salt2);\n assertNotSame(sikkertPassord, sikkertPassord2);\n System.out.println(\"//TEST//: testHashingAvPassord() = funker!\");\n \n }",
"private static byte[] receiveAlicePublicKeyAndSendBobDigest(byte[] encodedPublicKeyAlice)\r\n\t\t\tthrows NoSuchAlgorithmException, InvalidKeyException, IllegalStateException, InvalidKeySpecException,\r\n\t\t\tInvalidAlgorithmParameterException {\r\n\r\n\t\tfinal byte[] encodedPrivateKey = keyPairBob.getPrivate().getEncoded();\r\n\t\tfinal byte[] sharedSecret = computeSharedSecret(encodedPrivateKey, encodedPublicKeyAlice);\r\n\t\tfinal byte[] digestBytes = MessageDigest.getInstance(\"SHA-256\").digest(sharedSecret);\r\n\r\n\t\tSystem.out.printf(\"Bob shared secret length[%d], message digest length[%d]%n\", sharedSecret.length,\r\n\t\t\t\tdigestBytes.length);\r\n\t\treturn digestBytes;\r\n\t}",
"public static void main(String[] args) \r\n {\n String message1 = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\r\n System.out.println(encrypt (message1, 3));\r\n System.out.println(decrypt (encrypt(message1,3) ,3));\r\n System.out.println(encrypt(message1.toLowerCase(),5));\r\n \r\n System.out.println(decrypt(encrypt(message1.toLowerCase() ,5 ) ,5));\r\n }",
"Encryption encryption();",
"private String calculateHash() {\n\n // Increments the sequence to prevent two transactions from having identical keys.\n sequence++;\n return StringUtil.applySha256(\n StringUtil.getStringFromKey(sender) +\n StringUtil.getStringFromKey(recipient) +\n Float.toString(value) +\n sequence\n );\n }",
"public String Decrypt(String Message, int PrimeNo, String EncoderKeyPath) throws IOException\r\n {\r\n Scanner sc = new Scanner(System.in);\r\n Key key1 = new Key();\r\n char[] msg=new char[Message.length()];\r\n int s, x;\r\n System.out.println(\"Enter Your Secret Key To Decode \");\r\n x=sc.nextInt();\r\n int key = key1.Skey(PrimeNo, x, EncoderKeyPath);\r\n char s1;\r\n int len=Message.length();\r\n int res=0;\r\n\tfor(int i=0;i<len;i++)\r\n\t{\r\n res=i%key;\r\n s=Message.charAt(i);\r\n s-=res;\r\n s1= (char) s;\r\n msg[i]=s1;\t\r\n\t}\r\n String msg1 = new String(msg);\r\n return msg1; \r\n }",
"@Test\n public void testKeyEquivalence() throws Exception {\n ScanResultMatchInfo matchInfo1 = ScanResultMatchInfo.fromWifiConfiguration(mConfig1);\n ScanResultMatchInfo matchInfo1Prime = ScanResultMatchInfo.fromWifiConfiguration(mConfig1);\n ScanResultMatchInfo matchInfo2 = ScanResultMatchInfo.fromWifiConfiguration(mConfig2);\n assertFalse(matchInfo1 == matchInfo1Prime); // Checking assumption\n MacAddress mac1 = MacAddressUtils.createRandomUnicastAddress();\n MacAddress mac2 = MacAddressUtils.createRandomUnicastAddress();\n assertNotEquals(mac1, mac2); // really tiny probability of failing here\n\n WifiCandidates.Key key1 = new WifiCandidates.Key(matchInfo1, mac1, 1);\n\n assertFalse(key1.equals(null));\n assertFalse(key1.equals((Integer) 0));\n // Same inputs should give equal results\n assertEquals(key1, new WifiCandidates.Key(matchInfo1, mac1, 1));\n // Equal inputs should give equal results\n assertEquals(key1, new WifiCandidates.Key(matchInfo1Prime, mac1, 1));\n // Hash codes of equal things should be equal\n assertEquals(key1.hashCode(), key1.hashCode());\n assertEquals(key1.hashCode(), new WifiCandidates.Key(matchInfo1, mac1, 1).hashCode());\n assertEquals(key1.hashCode(), new WifiCandidates.Key(matchInfo1Prime, mac1, 1).hashCode());\n\n // Unequal inputs should give unequal results\n assertFalse(key1.equals(new WifiCandidates.Key(matchInfo2, mac1, 1)));\n assertFalse(key1.equals(new WifiCandidates.Key(matchInfo1, mac2, 1)));\n assertFalse(key1.equals(new WifiCandidates.Key(matchInfo1, mac1, 2)));\n }",
"public void testCaesar(){\n String msg = \"At noon be in the conference room with your hat on for a surprise party. YELL LOUD!\";\n \n /*String encrypted = encrypt(msg, key);\n System.out.println(\"encrypted \" +encrypted);\n \n String decrypted = encrypt(encrypted, 26-key);\n System.out.println(\"decrypted \" + decrypted);*/\n \n \n String encrypted = encrypt(msg, 15);\n System.out.println(\"encrypted \" +encrypted);\n \n }",
"public static byte[] digest(byte[] content1, byte[] content2) {\n return digest(new byte[][] { content1, content2 });\n }",
"String getSecret();",
"public abstract String decryptMsg(String msg);",
"public void generateKeys() {\n\t\t// p and q Length pairs: (1024,160), (2048,224), (2048,256), and (3072,256).\n\t\t// q must be a prime; choosing 160 Bit for q\n\t\tSystem.out.print(\"Calculating q: \");\n\t\tq = lib.generatePrime(160);\n\t\tSystem.out.println(q + \" - Bitlength: \" + q.bitLength());\n\t\t\n\t\t// p must be a prime\n\t\tSystem.out.print(\"Calculating p \");\n\t\tp = calculateP(q);\n\t System.out.println(\"\\np: \" + p + \" - Bitlength: \" + p.bitLength());\n\t System.out.println(\"Test-Division: ((p-1)/q) - Rest: \" + p.subtract(one).mod(q));\n\t \n\t // choose an h with (1 < h < p−1) and try again if g comes out as 1.\n \t// Most choices of h will lead to a usable g; commonly h=2 is used.\n\t System.out.print(\"Calculating g: \");\n\t BigInteger h = BigInteger.valueOf(2);\n\t BigInteger pMinusOne = p.subtract(one);\n\t do {\n\t \tg = h.modPow(pMinusOne.divide(q), p);\n\t \tSystem.out.print(\".\");\n\t }\n\t while (g == one);\n\t System.out.println(\" \"+g);\n\t \n\t // Choose x by some random method, where 0 < x < q\n\t // this is going to be the private key\n\t do {\n\t \tx = new BigInteger(q.bitCount(), lib.getRandom());\n }\n\t while (x.compareTo(zero) == -1);\n\t \n\t // Calculate y = g^x mod p\n\t y = g.modPow(x, p);\n\t \n System.out.println(\"y: \" + y);\n System.out.println(\"-------------------\");\n System.out.println(\"Private key (x): \" + x);\n\t}",
"byte[] generateFinishedMsg(String HashType, byte[] mastersecret, byte[] handshakemessages, byte[] senderID) throws NoSuchAlgorithmException, IOException{\n \r\n MessageDigest hasher = MessageDigest.getInstance(HashType);\r\n \r\n int padsize = 1;\r\n \r\n switch(HashType){\r\n case \"MD5\": \r\n padsize = 48;\r\n break;\r\n case \"SHA-1\":\r\n padsize = 40;\r\n break;\r\n }\r\n \r\n byte[] pad1 = new byte[padsize];\r\n byte[] pad2 = new byte[padsize];\r\n \r\n for (int i = 0; i < padsize; i++){\r\n pad1[i] = (0x36);\r\n pad2[i] = (0x5C);\r\n }\r\n \r\n baos.write(handshakemessages);\r\n baos.write(senderID);\r\n baos.write(mastersecret);\r\n baos.write(pad1);\r\n \r\n byte[] part1_prehash = baos.toByteArray();\r\n byte[] part1 = hasher.digest(part1_prehash);\r\n \r\n baos.reset();\r\n baos.write(mastersecret);\r\n baos.write(pad2);\r\n baos.write(part1);\r\n \r\n byte[] whole_prehash = baos.toByteArray();\r\n byte[] wholehash = hasher.digest(whole_prehash);\r\n \r\n baos.reset();\r\n \r\n System.out.println(\"This is the \" + HashType + \" hash of the finished message: \" + wholehash);\r\n System.out.println(HashType + \" hash size: \" + wholehash.length);\r\n return wholehash;\r\n }",
"void decryptCode() {\n StringBuilder temp = new StringBuilder(\"\");\n\n // go through entire phrase\n for (int i = 0; i < this.getText().length(); ++i) {\n\n // append char to temp if char at i is not a multiple of z\n if (!(i % Character.getNumericValue(this.secretKey.charAt(7)) == 0) || i == 0)\n temp.append(this.getText().charAt(i));\n }\n\n this.setText(temp);\n\n \n // Step 2:\n\n // split phrase up into words\n ArrayList<String> words = new ArrayList<>(Arrays.asList(this.text.toString().split(\" \")));\n\n for (int i = 0; i < words.size(); ++i) {\n\n // if y1x3x4 is at the end of the word, remove it from word\n \n if (words.get(i).substring(words.get(i).length() - 3, words.get(i).length())\n .equals(this.getSecretKey().substring(3, 6)))\n words.set(i, words.get(i).substring(0, words.get(i).length() - 3));\n\n // if x1x2 is at the end of the word\n else {\n // remove x1x2 from end\n words.set(i, words.get(i).substring(0, words.get(i).length() - 2));\n \n // move last char to beginning\n words.set(i, words.get(i).charAt(words.get(i).length() - 1) + words.get(i).substring(0, words.get(i).length() - 1));\n }\n }\n\n temp = new StringBuilder(\"\");\n\n for (String word : words)\n temp.append(word + \" \");\n\n this.setText(temp);\n }",
"public static void main(String[] args)\n {\n\n CaesarCipherTwo cipher = new CaesarCipherTwo( 14, 24);\n //String encrypt = cipher.encrypt(message);\n //System.out.println(\"Encrypted message: \" + encrypt);\n System.out.println();\n String decrypt = cipher.decrypt(\"Hfs cpwewloj loks cd Hoto kyg Cyy.\");\n System.out.println(\"Decrypted message: \" + decrypt);\n\n }",
"@Test\n public void defaultEncoding() throws SecureCellException {\n String passphrase = \"\\u6697\\u53F7\";\n SecureCell.Seal cellA = SecureCell.SealWithPassphrase(passphrase);\n SecureCell.Seal cellB = SecureCell.SealWithPassphrase(passphrase.getBytes(StandardCharsets.UTF_8));\n byte[] message = \"All your base are belong to us!\".getBytes(StandardCharsets.UTF_8);\n\n byte[] encrypted = cellA.encrypt(message);\n byte[] decrypted = cellB.decrypt(encrypted);\n\n assertArrayEquals(message, decrypted);\n }",
"public String decrypt(String message) {\t\n\t\tchar [] letters = new char [message.length()];\n\t\tString newMessage = \"\";\n\n\t\t//create an array of characters from message\n\t\tfor(int i=0; i< message.length(); i++){\n\t\t\tletters[i]= message.charAt(i);\n\t\t}\n\n\t\tfor(int i=0; i<letters.length; i++){\n\t\t\tif(Character.isLetter(letters[i])){ //check to see if letter\n\t\t\t\tif(Character.isUpperCase(letters[i])){ //check to see if it is uppercase\n\t\t\t\t\tnewMessage += letters[i]; //add that character to new string\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//new message is the string that needs to be decrypted now \n\t\t//change the letters into numbers\n\t\tint [] decryptNums = new int[newMessage.length()];\n\t\tString alphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\n\t\tfor(int i=0; i < newMessage.length(); i++){\n\t\t\tchar c = newMessage.charAt(i);\n\t\t\tint x = alphabet.indexOf(c) + 1;\n\t\t\tdecryptNums[i] = x;\n\t\t}\n\n\n\t\t//generate key from those numbers\n\t\tint[] keyNum = new int [decryptNums.length];\n\t\tfor(int i=0; i<decryptNums.length; i++){\n\t\t\tint x = getKey();\n\t\t\tkeyNum[i] = x;\n\t\t}\n\n\t\t//subtract letter number from key number\n\t\tint[] finalNum = new int [keyNum.length];\n\t\tfor(int i=0; i<keyNum.length; i++){\n\t\t\tint x= decryptNums[i]-keyNum[i];\n\t\t\tif(keyNum[i] >=decryptNums[i] ){\n\t\t\t\tx = x+26;\n\t\t\t\tfinalNum[i]=x;\n\t\t\t}else{\n\t\t\t\tfinalNum[i]=x;\n\t\t\t}\n\t\t}\n\n\t\t//now re match the alphabet to it \n\t\tchar[] finalChar = new char [finalNum.length];\n\n\t\tfor(int i=0; i< finalNum.length; i++){\n\t\t\tint x = finalNum[i]-1;\n\t\t\tchar c = alphabet.charAt(x);\n\t\t\tfinalChar[i]=c;\n\t\t}\n\n\t\tString decrypt = \"\";\n\t\tfor(int i=0; i< finalChar.length; i++){\n\t\t\tdecrypt += finalChar[i];\n\t\t}\n\t\t\n\t\treturn decrypt;\n\t}",
"@Test\n\tpublic void testB(){\n\t\tSystem.out.println(\"Test B\");\n\t\tUUID aliceSecret = secretService.storeSecret(\"Alice\", new Secret());\n\t\tsecretService.shareSecret(\"Alice\", aliceSecret, \"Bob\");\n\t\tsecretService.readSecret(\"Bob\", aliceSecret);\n\t}",
"byte[] genKeyBlock(byte[] mastersecret, int[]clientRandom, int[]serverRandom) throws NoSuchAlgorithmException, IOException{\n byte[] part1 = md5andshaprocessing(\"AA\", mastersecret, clientRandom, serverRandom);\r\n byte[] part2 = md5andshaprocessing(\"BB\", mastersecret, clientRandom, serverRandom);\r\n byte[] part3 = md5andshaprocessing(\"CCC\", mastersecret, clientRandom, serverRandom);\r\n byte[] part4 = md5andshaprocessing(\"DDDD\", mastersecret, clientRandom, serverRandom);\r\n byte[] part5 = md5andshaprocessing(\"EEEEE\", mastersecret, clientRandom, serverRandom);\r\n byte[] part6 = md5andshaprocessing(\"FFFFFF\", mastersecret, clientRandom, serverRandom);\r\n \r\n baos.write(part1);\r\n baos.write(part2);\r\n baos.write(part3);\r\n baos.write(part4);\r\n baos.write(part5);\r\n baos.write(part6);\r\n \r\n byte[] keyblock = baos.toByteArray();\r\n baos.reset();\r\n \r\n client_macsecret = new byte[20];\r\n server_macsecret = new byte[20];\r\n client_writekey = new byte[24];\r\n server_writekey = new byte[24];\r\n \r\n System.arraycopy(keyblock, 0, client_macsecret, 0, 20);\r\n System.arraycopy(keyblock, 20, server_macsecret, 0, 20);\r\n System.arraycopy(keyblock, 40, client_writekey, 0, 24);\r\n System.arraycopy(keyblock, 64, server_writekey, 0, 24);\r\n return keyblock;\r\n }",
"public byte[] Tencryption() {\n int[] ciphertext = new int[message.length];\n\n for (int j = 0, k = 1; j < message.length && k < message.length; j = j + 2, k = k + 2) {\n sum = 0;\n l = message[j];\n r = message[k];\n for (int i = 0; i < 32; i++) {\n sum = sum + delta;\n l = l + (((r << 4) + key[0]) ^ (r + sum) ^ ((r >> 5) + key[1]));\n r = r + (((l << 4) + key[2]) ^ (l + sum) ^ ((l >> 5) + key[3]));\n }\n ciphertext[j] = l;\n ciphertext[k] = r;\n }\n return this.Inttobyte(ciphertext);\n\n }",
"@Test\n public void testAesEncryptForInputKey() throws Exception {\n byte[] key = Cryptos.generateAesKey();\n String input = \"foo message\";\n\n byte[] encryptResult = Cryptos.aesEncrypt(input.getBytes(\"UTF-8\"), key);\n String descryptResult = Cryptos.aesDecrypt(encryptResult, key);\n\n System.out.println(key);\n System.out.println(descryptResult);\n }",
"public String decrypt (String input) {\n return new CaesarCipherTwo(ALPHABET_LENGTH-mainKey1, ALPHABET_LENGTH-mainKey2).encrypt(input);\n }",
"public void generate(){\n\t\t//Key Generation\n\t\tint p = 41, q = 67; //two hard-coded prime numbers\n\t\tint n = p * q;\n\t\tint w = (p-1) * (q-1);\n\t\tint d = 83; //hard-coded number relatively prime number to w\n\t\t\n\t\tthis.privatekey = new PrivateKey(d,n); //public key generation completed\n\t\t\n\t\t//Extended Euclid's algorithm\n\t\tint \ta = w, \n\t\t\t\tb = d,\n\t\t\t\tv = a/b;\n\t\tArrayList<Integer> \tx = new ArrayList<Integer>(), \n\t\t\t\t\ty = new ArrayList<Integer>(),\n\t\t\t\t\tr = new ArrayList<Integer>();\n\t\t\n\t\t\n\t\t//Iteration 0\n\t\tint i = 0;\n\t\tx.add(1);\n\t\ty.add(0);\n\t\tr.add(a);\n\t\ti++;\n\t\t//Iteration 1\n\t\tx.add(0);\n\t\ty.add(1);\n\t\tr.add(b);\n\t\ti++;\n\t\t//Iteration 2\n\t\t //iteration counter\n\t\tint e = y.get(i-1);\n\t\tv = r.get(i-2) / r.get(i-1);\n\t\tx.add(x.get(i-2)-v*x.get(i-1));\n\t\ty.add(y.get(i-2) - v*y.get(i-1));\n\t\tr.add(a*(x.get(i-2)-v*x.get(i-1))\n\t\t\t\t+b*(y.get(i-2)-v*y.get(i-1))); \n\t\ti++;\n\t\t\n\t\t//Iterate until r == 0, then get the previous iteration's value of d\n\t\twhile(r.get(i-1) > 0){\n\t\t\te = y.get(i-1);\n\t\t\tv = r.get(i-2) / r.get(i-1);\n\t\t\tx.add(x.get(i-2)-v*x.get(i-1));\n\t\t\ty.add(y.get(i-2) - v*y.get(i-1));\n\t\t\tr.add(a*(x.get(i-2)-v*x.get(i-1))\n\t\t\t\t\t+b*(y.get(i-2) -(v*y.get(i-1))));\n\t\t\ti++;\n\t\t}\n\t\t\n\t\t//if number is negative, add w to keep positive\n\t\tif (e < 0){\n\t\t\te = w+e;\n\t\t}\n\t\tthis.publickey = new PublicKey(e,n); //private key generation completed\n\t\t\n\t\t//print values to console\n\t\tSystem.out.println(\"Value of public key: \" + e + \", private key: \" + d + \", modulus: \" + n);\n\t\tSystem.out.println();\n\t}",
"public static byte[] getSecret()\r\n/* 136: */ {\r\n/* 137: */ try\r\n/* 138: */ {\r\n/* 139:122 */ return getPropertyBytes(\"secret\");\r\n/* 140: */ }\r\n/* 141: */ catch (Exception e)\r\n/* 142: */ {\r\n/* 143:124 */ log.warning(\"Error getting secret: \" + e.getMessage());\r\n/* 144: */ }\r\n/* 145:126 */ return new byte[0];\r\n/* 146: */ }",
"private static String m2380a(byte[] bArr, byte[] bArr2) {\n byte[] bArr3 = new byte[(((bArr.length + 2) / 3) * 4)];\n int length = bArr.length - (bArr.length % 3);\n int i = 0;\n for (int i2 = 0; i2 < length; i2 += 3) {\n int i3 = i + 1;\n bArr3[i] = bArr2[(bArr[i2] & 255) >> 2];\n int i4 = i3 + 1;\n int i5 = i2 + 1;\n bArr3[i3] = bArr2[((bArr[i2] & 3) << 4) | ((bArr[i5] & 255) >> 4)];\n int i6 = i4 + 1;\n int i7 = i2 + 2;\n bArr3[i4] = bArr2[((bArr[i5] & 15) << 2) | ((bArr[i7] & 255) >> 6)];\n i = i6 + 1;\n bArr3[i6] = bArr2[bArr[i7] & 63];\n }\n switch (bArr.length % 3) {\n case 1:\n int i8 = i + 1;\n bArr3[i] = bArr2[(bArr[length] & 255) >> 2];\n int i9 = i8 + 1;\n bArr3[i8] = bArr2[(bArr[length] & 3) << 4];\n int i10 = i9 + 1;\n bArr3[i9] = 61;\n bArr3[i10] = 61;\n break;\n case 2:\n int i11 = i + 1;\n bArr3[i] = bArr2[(bArr[length] & 255) >> 2];\n int i12 = i11 + 1;\n int i13 = length + 1;\n bArr3[i11] = bArr2[((bArr[length] & 3) << 4) | ((bArr[i13] & 255) >> 4)];\n int i14 = i12 + 1;\n bArr3[i12] = bArr2[(bArr[i13] & 15) << 2];\n bArr3[i14] = 61;\n break;\n }\n try {\n return new String(bArr3, \"US-ASCII\");\n } catch (UnsupportedEncodingException e) {\n throw new AssertionError(e);\n }\n }",
"static final SharedSecret convertLinesToSharedSecret(Enumeration lines) {\n if (lines == null) {\n return null;\n }\n String domain = null;\n String secret = null;\n String signature = null;\n Certificate creator = null;\n for (String line = null; lines.hasMoreElements(); ) {\n line = (String) lines.nextElement();\n if (line == null) {\n break;\n }\n final int idx = line.indexOf(FIELD_NAME_TERM);\n if (idx >= 0) {\n final String fieldName = line.substring(0, idx);\n final String fieldValue = line.substring(idx + FIELD_NAME_TERM.length() - 1).trim();\n if (FIELD_DOMAIN_NAME.equals(fieldName)) {\n domain = fieldValue;\n } else if (FIELD_SECRET.equals(fieldName)) {\n secret = fieldValue;\n } else if (FIELD_SIGNATURE.equals(fieldName)) {\n signature = fieldValue;\n } else if (FIELD_CREATOR.equals(fieldName)) {\n String encodedStr = fieldValue;\n byte[] encoded = Hexadecimal.parseSeq(encodedStr);\n creator = com.ibm.aglets.AgletRuntime.getCertificate(encoded);\n } else {\n }\n }\n }\n if ((domain == null) || domain.equals(\"\")) {\n System.err.println(\"Domain name of shared secret is null.\");\n return null;\n }\n if ((secret == null) || secret.equals(\"\")) {\n System.err.println(\"Byte sequence of shared secret is null.\");\n return null;\n }\n if ((signature == null) || signature.equals(\"\")) {\n System.err.println(\"Byte sequence of shared secret is null.\");\n return null;\n }\n if (creator == null) {\n System.err.println(\"Creator of shared secret is null.\");\n return null;\n }\n try {\n SharedSecret sec = new SharedSecret(domain, creator, secret, signature);\n if (sec.verify()) {\n return sec;\n }\n } catch (KeyStoreException ex) {\n ex.printStackTrace();\n return null;\n }\n System.err.println(\"Signature of shared secret is incorrect.\");\n return null;\n }",
"@Test\n @SuppressWarnings({\"ResultOfMethodCallIgnored\", \"deprecation\"})\n public void passphrasesNotCompatibleWithOldAPI() throws SecureCellException {\n SecureCell cellOld = new SecureCell(\"day 56 of the Q\", SecureCell.MODE_SEAL);\n SecureCell.Seal cellNew = SecureCell.SealWithPassphrase(\"day 56 of the Q\", StandardCharsets.UTF_16);\n byte[] message = \"All your base are belong to us!\".getBytes(StandardCharsets.UTF_8);\n\n byte[] encryptedOld = cellOld.protect(\"\", message).getProtectedData();\n byte[] encryptedNew = cellNew.encrypt(message);\n\n try {\n cellNew.decrypt(encryptedOld);\n fail(\"expected SecureCellException\");\n }\n catch (SecureCellException ignored) {}\n try {\n cellOld.unprotect(\"\", new SecureCellData(encryptedNew, null));\n fail(\"expected SecureCellException\");\n }\n catch (SecureCellException ignored) {}\n }",
"public abstract String getSecret();",
"@Test\n\tpublic void testEncryptDecrypt() {\n\t\tfor (int i = 0; i < CONFIDENCE; ++i) {\n\t\t\tP plain = getRandomPlaintext();\n\t\t\tR rnd = getPK().getRandom(getRand());\n\t\t\tC cipher = getPK().encrypt(plain, rnd);\n\t\t\t\n\t\t\tP plain2 = getSK().decrypt(cipher);\n\t\t\t\n\t\t\tassertTrue(\"Decryption didn't work\", plain.equals(plain2));\n\t\t}\n\t}",
"private byte[] handleAuthPt1(byte[] payload) {\n\t\tboolean userIdentified = false;\n\t\tbyte[] supposedUser = null;\n\n//\n\t\tSystem.out.println(\"payload received by SecretServer:\");\n\t\tComMethods.charByChar(payload,true);\n//\n\n\t\tuserNum = -1;\n\t\twhile (userNum < validUsers.length-1 && !userIdentified) {\n\t\t\tuserNum++;\n\t\t\tsupposedUser = validUsers[userNum].getBytes();\n\t\t\tuserIdentified = Arrays.equals(Arrays.copyOf(payload, supposedUser.length), supposedUser);\n\n//\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"\\\"\"+validUsers[userNum]+\"\\\" in bytes:\");\n\t\t\tComMethods.charByChar(validUsers[userNum].getBytes(),true);\n\t\t\tSystem.out.println(\"\\\"Arrays.copyOf(payload, supposedUser.length\\\" in bytes:\");\n\t\t\tComMethods.charByChar(Arrays.copyOf(payload, supposedUser.length),true);\n\t\t\tSystem.out.println();\n//\n\t\t}\n\n\t\tif (!userIdentified) {\n\t\t\tComMethods.report(\"SecretServer doesn't recognize name of valid user.\", simMode);\n\t\t\treturn \"error\".getBytes();\n\t\t} else {\n\t\t\t// Process second half of message, and verify format\n\t\t\tbyte[] secondHalf = Arrays.copyOfRange(payload, supposedUser.length, payload.length);\n//\n\tSystem.out.println(\"secondHalf = \"+secondHalf);\n//\n\t\t\tsecondHalf = ComMethods.decryptRSA(secondHalf, my_n, my_d);\n\n//\n\tSystem.out.println(\"secondHalf = \"+secondHalf);\n//\n\t\t\tComMethods.report(\"SecretServer has decrypted the second half of the User's message using SecretServer's private RSA key.\", simMode);\n\n\t\t\tif (!Arrays.equals(Arrays.copyOf(secondHalf, supposedUser.length), supposedUser)) {\n\t\t\t\t// i.e. plaintext name doesn't match the encrypted bit\n\t\t\t\tComMethods.report(\"ERROR ~ invalid first message in protocol.\", simMode);\t\t\t\t\n\t\t\t\treturn \"error\".getBytes();\n\t\t\t} else {\n\t\t\t\t// confirmed: supposedUser is legit. user\n\t\t\t\tcurrentUser = new String(supposedUser); \n\t\t\t\tuserSet = true;\n\t\t\t\tbyte[] nonce_user = Arrays.copyOfRange(secondHalf, supposedUser.length, secondHalf.length);\n\n\t\t\t\t// Second Message: B->A: E_kA(nonce_A || Bob || nonce_B)\n\t\t\t\tmyNonce = ComMethods.genNonce();\n\t\t\t\tComMethods.report(\"SecretServer has randomly generated a 128-bit nonce_srvr = \"+myNonce+\".\", simMode);\n\t\t\t\n\t\t\t\tbyte[] response = ComMethods.concatByteArrs(nonce_user, \"SecretServer\".getBytes(), myNonce);\n\t\t\t\tbyte[] responsePayload = ComMethods.encryptRSA(response, usersPubKeys1[userNum], BigInteger.valueOf(usersPubKeys2[userNum]));\n\t\t\t\treturn responsePayload;\n\t\t\t}\n\t\t}\n\t}",
"@Test\n public void testCalculateSSLEKM() throws CryptoException {\n context.setMasterSecret(\n ArrayConverter.hexStringToByteArray(\n \"6D7B3B37807AFB5BAFEB46A3BA1AD1BCE0CF31DA68D635EC9A8130CB9A0241C437DF4D988ED2D00D3AC5FECEB056C3C7\"));\n context.setClientRandom(\n ArrayConverter.hexStringToByteArray(\n \"bb34871e6271841dc8fddb4e2ec5fdf92fec4b144434096b98d5a091511f89f0\"));\n context.setServerRandom(\n ArrayConverter.hexStringToByteArray(\n \"15c9f5b1c30fb1e0b87cebf5756200555dba15241c890652d3306e8194858735\"));\n context.setSelectedCipherSuite(CipherSuite.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384);\n context.setSelectedProtocolVersion(ProtocolVersion.TLS12);\n assertArrayEquals(\n ArrayConverter.hexStringToByteArray(\"C2199B4A1CD5404F03DBAAB9B69ECBA607687555\"),\n TokenCalculator.calculateEKM(context.getChooser(), 20));\n }",
"private static void computeKeyPairs() throws NoSuchAlgorithmException, InvalidAlgorithmParameterException {\r\n\r\n\t\tfinal KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"EC\");\r\n\t\tkeyPairGenerator.initialize(new ECGenParameterSpec(\"secp256r1\"), SecureRandom.getInstanceStrong());\r\n\t\tkeyPairAlice = keyPairGenerator.generateKeyPair();\r\n\t\tkeyPairBob = keyPairGenerator.generateKeyPair();\r\n\t}",
"private static byte[] computeSharedSecret(byte[] encodedPrivateKey, byte[] encodedPublicKey)\r\n\t\t\tthrows NoSuchAlgorithmException, InvalidKeyException, IllegalStateException, InvalidKeySpecException {\r\n\r\n\t\tfinal KeyAgreement keyAgreement = KeyAgreement.getInstance(\"ECDH\");\r\n\t\tfinal PrivateKey privateKey = KeyFactory.getInstance(\"EC\")\r\n\t\t\t\t.generatePrivate(new PKCS8EncodedKeySpec(encodedPrivateKey));\r\n\t\tkeyAgreement.init(privateKey);\r\n\t\tfinal PublicKey publicKey = KeyFactory.getInstance(\"EC\")\r\n\t\t\t\t.generatePublic(new X509EncodedKeySpec(encodedPublicKey));\r\n\t\tkeyAgreement.doPhase(publicKey, true);\r\n\t\tfinal byte[] sharedSecret = keyAgreement.generateSecret();\r\n\t\treturn sharedSecret;\r\n\t}",
"private byte[] handleUpdate(byte[] message) {\n\t\tbyte[] newSecretBytes = Arrays.copyOfRange(message, \"update:\".getBytes().length, message.length);\n\n/*\n\t\tSystem.out.println(\"THIS IS A TEST:\");\n\t\tSystem.out.println(\"newSecretBytes:\");\n\t\tComMethods.charByChar(newSecretBytes, true);\n\t\tSystem.out.println(\"newSecretBytes, reversed:\");\n\t\tString toStr = DatatypeConverter.printBase64Binary(newSecretBytes);\n\t\tbyte[] fromStr = DatatypeConverter.parseBase64Binary(toStr);\n\t\tComMethods.charByChar(fromStr, true);\n*/\n\t\tString newSecret = DatatypeConverter.printBase64Binary(newSecretBytes);\n\t\tboolean success = replaceSecretWith(currentUser, newSecret);\n\t\t\n\t\tif (success) {\n\t\t\tComMethods.report(\"SecretServer has replaced \"+currentUser+\"'s secret with \"+newSecret+\".\", simMode);\n\t\t\treturn preparePayload(\"secretupdated\".getBytes());\n\t\t} else {\n\t\t\tComMethods.report(\"SecretServer has FAILED to replace \"+currentUser+\"'s secret with \"+newSecret+\".\", simMode);\n\t\t\treturn preparePayload(\"writingfailure\".getBytes());\n\t\t}\n\t}",
"public static byte[] m24636a(Context context, String str, String str2) {\n if (TextUtils.isEmpty(str)) {\n return null;\n }\n try {\n SecretKeySpec secretKeySpec = new SecretKeySpec(m24635a(context, str2), \"AES\");\n Cipher instance = Cipher.getInstance(\"AES/ECB/NoPadding\");\n instance.init(1, secretKeySpec);\n return instance.doFinal(str.getBytes(\"UTF-8\"));\n } catch (Exception e) {\n C5264a.m21622c(\"ENC\", \"AES cipher error, enc failed\");\n e.printStackTrace();\n return null;\n }\n }",
"public boolean connectAs(String uname) {\n\t\tboolean noProblems = true; // no problems have been encountered\n \n\t\t// First Message: A->B: Alice || E_kB(Alice || nonce_A)\n\t\tbyte[] nonce_user = ComMethods.genNonce();\n\t\tComMethods.report(accountName+\" has randomly generated a 128-bit nonce_user = \"+(new String(nonce_user))+\".\",simMode);\n\n\t\tbyte[] unameBytes = uname.getBytes();\n\t\tbyte[] srvrNameBytes = \"SecretServer\".getBytes();\n\n\t\tbyte[] pload = ComMethods.concatByteArrs(unameBytes, nonce_user);\n\t\tpload = SecureMethods.encryptRSA(pload, serv_n, BigInteger.valueOf(serv_e), simMode);\n\n\t\tbyte[] message1 = ComMethods.concatByteArrs(unameBytes,pload);\n\n\t\tComMethods.report(accountName+\" is sending SecretServer the name \"+uname+\", concatenated with '\"+uname+\" || nonce_user' encrypted under RSA with the SecretServer's public key.\", simMode);\t\t\n\t\tbyte[] response1 = sendServer(message1,false);\n\n\t\tif (!checkError(response1)) {\n\t\t\tresponse1 = SecureMethods.decryptRSA(response1, my_n, my_d, simMode);\n\t\t\tComMethods.report(accountName+\" has decrypted the SecretServer's message using \"+accountName+\"'s private RSA key.\", simMode);\n\t\t} else {\n\t\t\tComMethods.report(accountName+\" has received the SecretServer's error message.\", simMode);\n\t\t}\n\n\t\t// Test for proper formatting of the second message in the protocol\n\t\tif (!Arrays.equals(Arrays.copyOf(response1,nonce_user.length), nonce_user) || !Arrays.equals(Arrays.copyOfRange(response1, nonce_user.length, nonce_user.length+srvrNameBytes.length), srvrNameBytes)) {\n\n\t\t\tnoProblems = false;\n\t\t\tSystem.out.println(\"ERROR ~ something went wrong.\");\n\t\t} else {\n\t\t\tbyte[] nonce_srvr = Arrays.copyOfRange(response1, nonce_user.length + srvrNameBytes.length, response1.length);\n\t\t\tComMethods.report(accountName+\" now has nonce_srvr.\", simMode);\n\n\t\t\t// Third Message: A->B: E_kB(nonce_B || kS)\n\t\t\tsessionKey = ComMethods.genNonce();\n\t\t\tComMethods.report(accountName+\" has generated a random 128-bit session key.\", simMode);\n\t\t\t\n\t\t\tbyte[] message2 = ComMethods.concatByteArrs(nonce_srvr, sessionKey);\n\t\t\tmessage2 = SecureMethods.encryptRSA(message2, serv_n, BigInteger.valueOf(serv_e), simMode);\n\t\t\tComMethods.report(accountName+\" is sending the SecretServer the concatenation of nonce_srvr and the session key, encrypted under RSA using the SecretServer's public key.\", simMode);\n\n\t\t\tbyte[] response2 = sendServer(message2, true);\n\t\t\tif (!checkError(response2)) {\n\t\t\t\tresponse2 = SecureMethods.processPayload(srvrNameBytes, response2, 11, sessionKey, simMode);\n\t\t\t\tComMethods.report(accountName+\" has decrypted the SecretServer's message using the symmetric session key that \"+accountName+\" just generated.\", simMode);\t\t\t\t\n\t\t\t} else {\n\t\t\t\tComMethods.report(accountName+\" has received the SecretServer's error message.\", simMode);\n\t\t\t}\n\n\t\t\t// Test formatting of the 4th message in the protocol\n\t\t\tbyte[] expected = \"understood\".getBytes();\n\t\t\tif (!Arrays.equals(Arrays.copyOf(response2, expected.length), expected)) {\n\t\t\t\tnoProblems = false;\n\t\t\t\tComMethods.report(\"ERROR ~ something went wrong with the fourth message in the Bilateral Authentication Protocol.\", simMode);\n\t\t\t} else {\n\t\t\t\tcounter = 12; // counter to be used in future messages\n\t\t\t}\n\t\t}\n\n\t\tif (noProblems) {\n\t\t\tusername = uname;\n\t\t}\n\n\t\treturn noProblems; \n\t}",
"private BigInteger decrypt(BigInteger encryptedMessage) {\n return encryptedMessage.modPow(d, n);\n }",
"public String encrypt(String message) {\t\n\n\t\tchar [] letters = new char [message.length()];\n\t\tString newMessage = \"\";\n\n\t\t//create an array of characters from message\n\t\tfor(int i=0; i< message.length(); i++){\n\t\t\tletters[i]= message.charAt(i);\n\t\t}\n\n\t\tfor(int i=0; i<letters.length; i++){\n\t\t\tif(Character.isLetter(letters[i])){ //check to see if letter\n\t\t\t\tif(Character.isUpperCase(letters[i])){ //check to see if it is uppercase\n\t\t\t\t\tnewMessage += letters[i]; //add that character to new string\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t//this creates an array with the numbers that are keys \n\t\tint [] numberOfLetters = new int[newMessage.length()];\n\t\tString alphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\n\t\tfor(int i=0; i< newMessage.length(); i++){\n\t\t\tfor(int j=0; j< alphabet.length(); j++){\n\t\t\t\tif(newMessage.charAt(i) == alphabet.charAt(j)){ //if they have the same letter\n\t\t\t\t\tnumberOfLetters[i]=j+1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\n\t\t//creates an array of the keys\n\t\tint [] key = new int[numberOfLetters.length];\n\t\tint keys;\n\t\tfor(int i=0; i< numberOfLetters.length; i++){\n\t\t\tkeys = getKey();\n\t\t\tkey[i] = keys;\n\t\t}\n\t\n\t\t//create an array for what we encrypted \n\t\tint [] encryptNum = new int[key.length];\n\t\tfor(int i=0; i< key.length; i++){\n\t\t\tint value = numberOfLetters[i] + key[i];\n\t\t\tif(value > 26){\n\t\t\t\tvalue = value-26;\n\t\t\t\tencryptNum[i]= value;\n\t\t\t}else{\n\t\t\t\tencryptNum[i]= value;\n\t\t\t}\n\t\t}\n\n\t\t//turn encryption into letters \n\t\tString encrypt = \"\";\n\t\tchar [] let = new char [encryptNum.length];\n\n\t\tfor(int i=0; i< encryptNum.length; i++){\n\t\t\tint x = encryptNum[i]-1;\n\t\t\tlet[i] = alphabet.charAt(x);\n\t\t}\n\n\t\tfor(int j=0; j< let.length; j++){\n\t\t\tencrypt += let[j];\n\t\t}\n\n\t\t// COMPLETE THIS METHOD\n\t\t// THE FOLLOWING LINE HAS BEEN ADDED TO MAKE THE METHOD COMPILE\n\n\t\treturn encrypt;\n\t}",
"@Test\r\n public void testEncryptDecryptPlaintextBadKey() throws SodiumException, CryptoException {\r\n\r\n byte[] data = \"\".getBytes();\r\n byte[] add = \"Random authenticated additional data\".getBytes();\r\n\r\n CryptoService instance = new CryptoService();\r\n Keys keys = instance.createKeys(null);\r\n CryptoDetached result = instance.encryptPlaintext(data, add, keys);\r\n Keys keys1 = instance.createKeys(null);\r\n String message = instance.decryptPlaintext(result, add, keys);\r\n Assertions.assertThrows(SodiumException.class, new Executable() {\r\n @Override\r\n public void execute() throws Throwable {\r\n instance.decryptPlaintext(result, add, keys1);\r\n }\r\n });\r\n }",
"private byte[] deriveKey(String password, byte[] salt, OperationCount operationType, int count) {\n // Handle null arguments\n if (password == null) {\n password = \"\";\n }\n if (salt == null) {\n salt = new byte[0];\n }\n\n // Check that the password doesn't contain any null characters\n if (password.contains(\"\\0\")) {\n String errorMessage = App.getApplicationResources().getString(R.string.password_contains_null);\n throw new IllegalArgumentException(errorMessage);\n }\n\n // Append the null terminating byte to the password (part of the SQRL protocol)\n password += '\\0';\n\n // Set up the required byte arrays\n byte[] key = new byte[32];\n byte[] passwordAsByteArray = password.getBytes(Charset.forName(\"UTF-8\"));\n\n // Perform the chaining of the scrypt operations\n byte[] scryptOutput = salt;\n long startTime = System.currentTimeMillis();\n int numberOfIterationsPerformed = 0;\n while (true) {\n scryptOutput = scryptDeriveKey(passwordAsByteArray, scryptOutput);\n key = xorByteArrays(key, scryptOutput);\n numberOfIterationsPerformed++;\n\n if (operationType.equals(OperationCount.ITERATIONS)) {\n // If we have a listener, we need to give it a progress update\n if (this.mListener != null) {\n int progress = (numberOfIterationsPerformed * 100) / count;\n this.mListener.onPasswordCryptProgressUpdate(progress);\n }\n\n if (numberOfIterationsPerformed == count) {\n break;\n }\n } else if (operationType.equals(OperationCount.SECONDS)) {\n long duration = System.currentTimeMillis() - startTime;\n\n // If we have a listener, we need to give it a progress update\n if (this.mListener != null) {\n int progress = (int)duration / (count * 10);\n this.mListener.onPasswordCryptProgressUpdate(progress);\n }\n\n if (duration >= count * 1000) {\n break;\n }\n }\n }\n\n // Store the number of iterations performed, this will be required by the caller if using deriveKeyFor5Seconds\n this.mIterations = numberOfIterationsPerformed;\n\n return key;\n }",
"public static void main(String[] args) throws IOException, NoSuchAlgorithmException, InvalidKeyException, InvalidKeySpecException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException {\n String message=\"This is a confidential message.\";\n byte[] myMessage =message.getBytes(); //string to byte array as DES works on bytes\n\n //If you want to use your own key\n // SecretKeyFactory MyKeyFactory = SecretKeyFactory.getInstance(\"DES\");\n // String Password = \"My Password\";\n // byte[] mybyte =Password.getBytes();\n // DESKeySpec myMaterial = new DESKeySpec(mybyte);\n // SecretKey myDESKey = MyKeyFactory.generateSecret(myMaterial);\n\n //Generating Key\n KeyGenerator Mygenerator = KeyGenerator.getInstance(\"DES\");\n SecretKey myDesKey = Mygenerator.generateKey();\n\n //initializing crypto algorithm\n Cipher myCipher = Cipher.getInstance(\"DES\");\n\n //setting encryption mode\n myCipher.init(Cipher.ENCRYPT_MODE, myDesKey);\n byte[] myEncryptedBytes=myCipher.doFinal(myMessage);\n \n\n //setting decryption mode\n myCipher.init(Cipher.DECRYPT_MODE, myDesKey);\n byte[] myDecryptedBytes=myCipher.doFinal(myEncryptedBytes);\n\n //print message in byte format\n //System.out.println(Arrays.toString(myEncryptedBytes));\n //System.out.println(Arrays.toString(myDecryptedBytes));\n\n String encrypteddata=new String(myEncryptedBytes);\n String decrypteddata=new String(myDecryptedBytes);\n\n System.out.println(\"Message : \"+ Arrays.toString(myMessage));\n System.out.println(\"Encrypted - \"+ encrypteddata);\n System.out.println(\"Decrypted Message - \"+ decrypteddata);\n }",
"private String calulateHash() {\n\t\tsequence++; // increase the sequence to avoid 2 identical transactions having the same hash\n\t\treturn StringUtil.applySha256(StringUtil.getStringFromKey(sender) + StringUtil.getStringFromKey(reciepient)\n\t\t\t\t+ Float.toString(value) + sequence);\n\t}",
"@Test\n public void blowfish_encryption_with_192_bit_key_size() throws Exception {\n String secretMessage = \"testtest\"; //64-bit string\n /**\n * Create a 64-bit symmetric encryption key\n */\n byte[] encryptionKey192bit = new byte[]{0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01 };\n SecretKey keySpec = new SecretKeySpec(encryptionKey192bit, \"Blowfish\");\n /**\n * Create our Cipher that uses Blowfish algorithim and init\n * the cipher with our encryption key\n */\n Cipher blowfishCipher = Cipher.getInstance(\"Blowfish/ECB/NoPadding\");\n blowfishCipher.init(Cipher.ENCRYPT_MODE, keySpec);\n /**\n * Now use the Cipher to encrypt our message\n */\n byte[] encryptedMessage = blowfishCipher.doFinal(secretMessage.getBytes());\n System.out.println(encryptedMessage);\n assertThat(encryptedMessage, is(notNullValue()));\n }",
"@Override\r\n\tpublic void compute() {\r\n\r\n\t\t// compute s1, s2 secret shares for all the parties\r\n\t\t// s1s2[i] - pair(s1 SecretShare, s2 SecretShare) for party i\r\n\t\tArrayList<ArrayList<SecretShare>> s1s2 = new ArrayList<ArrayList<SecretShare>>();\r\n\t\tfor (GateIO in : this.input) {\r\n\t\t\tArrayList<SecretShare> theShares = new ArrayList<SecretShare>();\r\n\t\t\ttheShares.add(0, in.getValue().get(0)); // s1\r\n\t\t\ttheShares.add(1, in.getValue().get(1)); // s2\r\n\t\t\ts1s2.add(in.getIndex(), theShares);\r\n\t\t\t// System.out.println(\"party \" + in.getIndex());\r\n\t\t\t// System.out.println(\"s1 = \" + in.getValue().get(0));\r\n\t\t\t// System.out.println(\"s2 = \" + in.getValue().get(1));\r\n\r\n\t\t}\r\n\r\n\t\t// compute locally - s1*s2\r\n\t\tArrayList<SecretShare> localMults = new ArrayList<SecretShare>();\r\n\t\tfor (int i = 0; i < s1s2.size(); i++) {\r\n\t\t\tlocalMults.add(i, new SecretShare(s1s2.get(i).get(0).x,\r\n\t\t\t\t\tmodField(s1s2.get(i).get(0).y * s1s2.get(i).get(1).y)));\r\n\t\t\t// System.out.println(new SecretShare(s1s2.get(i).get(0).x,\r\n\t\t\t// modField(s1s2.get(i).get(0).y * s1s2.get(i).get(1).y)));\r\n\t\t}\r\n\r\n\t\t// share the local multiplications between the parties\r\n\t\t// localMultShare[i] - the secrets shares of party i new secret(mult)\r\n\t\tArrayList<ArrayList<SecretShare>> localMultsShare = new ArrayList<ArrayList<SecretShare>>();\r\n\t\tfor (int i = 0; i < localMults.size(); i++) {\r\n\t\t\tlocalMultsShare.add(i, new ArrayList<SecretShare>());\r\n\t\t}\r\n\r\n\t\tfor (SecretShare mult : localMults) {\r\n\t\t\tArrayList<SecretShare> yiShares = Polynomial\r\n\t\t\t\t\t.createShareSecret(mult.y);\r\n\t\t\t// for (int i = 0; i < yiShares.size(); i++) {\r\n\t\t\t// System.out.println(\"i = \" + i + \" y = \" + yiShares.get(i));\r\n\t\t\t// }\r\n\t\t\tfor (int i = 0; i < yiShares.size(); i++) {\r\n\t\t\t\tArrayList<SecretShare> tmp = localMultsShare.get(i);\r\n\t\t\t\ttmp.add(yiShares.get(i));\r\n\t\t\t\tlocalMultsShare.set(i, tmp);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// System.out.println(\"start\");\r\n\t\t// for (int i = 0; i < localMultsShare.size(); i++) {\r\n\t\t// for (int j = 0; j < localMultsShare.get(i).size(); j++) {\r\n\t\t// System.out.println((localMultsShare.get(i)).get(j));\r\n\t\t// }\r\n\t\t// }\r\n\t\t// System.out.println(\"end\");\r\n\r\n\t\t// compute the outPut = Yi * Zi\r\n\t\tthis.result = new ArrayList<GateIO>();\r\n\t\tfor (int i = 0; i < localMultsShare.size(); i++) {\r\n\t\t\tGateIO out = new GateIO(i);\r\n\r\n\t\t\tint outYValue = 0;\r\n\t\t\tfor (int j = 0; j < localMultsShare.get(i).size(); j++) {\r\n\t\t\t\toutYValue += computeZi(j + 1)\r\n\t\t\t\t\t\t* ((localMultsShare.get(i)).get(j)).y;\r\n\t\t\t}\r\n\t\t\tout.value.add(new SecretShare(i + 1, modField(outYValue)));\r\n\t\t\tthis.result.add(out);\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < this.result.size(); i++) {\r\n\t\t\t// System.out.println(this.result.get(i).value.get(0));\r\n\t\t}\r\n\r\n\t}",
"private byte[] pullSaltAndHashFromDatabase(String username) {\n byte[] saltAndHashCombined = new byte[32];\n byte[] saltTakenFromTable = stringToBytes(database.returnSalt(username));\n byte[] hashTakenFromTable = stringToBytes(database.returnHash(username));\n System.arraycopy(saltTakenFromTable, 0, saltAndHashCombined, 0, 16);\n System.arraycopy(hashTakenFromTable, 0, saltAndHashCombined, 16, 16);\n return saltAndHashCombined;\n }",
"public void receive_message(){\n logical_clock++;\n \n decrypt();\n System.out.println(\"Receive Message Clock:\" +logical_clock);\n }",
"@Override\n public long applyAsLong(BytesStore bytes, @NonNegative long length) throws IllegalStateException, BufferUnderflowException {\n long hash;\n long remaining = length;\n long off = bytes.readPosition();\n\n if (remaining >= 32) {\n long v1 = seed + P1 + P2;\n long v2 = seed + P2;\n long v3 = seed;\n long v4 = seed - P1;\n\n do {\n v1 += fetch64(bytes, off) * P2;\n v1 = Long.rotateLeft(v1, 31);\n v1 *= P1;\n\n v2 += fetch64(bytes, off + 8) * P2;\n v2 = Long.rotateLeft(v2, 31);\n v2 *= P1;\n\n v3 += fetch64(bytes, off + 16) * P2;\n v3 = Long.rotateLeft(v3, 31);\n v3 *= P1;\n\n v4 += fetch64(bytes, off + 24) * P2;\n v4 = Long.rotateLeft(v4, 31);\n v4 *= P1;\n\n off += 32;\n remaining -= 32;\n } while (remaining >= 32);\n\n hash = Long.rotateLeft(v1, 1)\n + Long.rotateLeft(v2, 7)\n + Long.rotateLeft(v3, 12)\n + Long.rotateLeft(v4, 18);\n\n v1 *= P2;\n v1 = Long.rotateLeft(v1, 31);\n v1 *= P1;\n hash ^= v1;\n hash = hash * P1 + P4;\n\n v2 *= P2;\n v2 = Long.rotateLeft(v2, 31);\n v2 *= P1;\n hash ^= v2;\n hash = hash * P1 + P4;\n\n v3 *= P2;\n v3 = Long.rotateLeft(v3, 31);\n v3 *= P1;\n hash ^= v3;\n hash = hash * P1 + P4;\n\n v4 *= P2;\n v4 = Long.rotateLeft(v4, 31);\n v4 *= P1;\n hash ^= v4;\n hash = hash * P1 + P4;\n } else {\n hash = seed + P5;\n }\n\n hash += length;\n\n while (remaining >= 8) {\n long k1 = fetch64(bytes, off);\n k1 *= P2;\n k1 = Long.rotateLeft(k1, 31);\n k1 *= P1;\n hash ^= k1;\n hash = Long.rotateLeft(hash, 27) * P1 + P4;\n off += 8;\n remaining -= 8;\n }\n\n if (remaining >= 4) {\n hash ^= fetch32(bytes, off) * P1;\n hash = Long.rotateLeft(hash, 23) * P2 + P3;\n off += 4;\n remaining -= 4;\n }\n\n while (remaining != 0) {\n hash ^= fetch8(bytes, off) * P5;\n hash = Long.rotateLeft(hash, 11) * P1;\n --remaining;\n ++off;\n }\n\n return finishUp(hash);\n }",
"com.google.protobuf.ByteString\n getServerSecretBytes();",
"byte[] generateMasterSecret(String type, byte[]secret, int[]clientRandom, int[]serverRandom) throws NoSuchAlgorithmException, IOException{\n byte[] part1 = md5andshaprocessing(\"AA\", secret, clientRandom, serverRandom);\r\n byte[] part2 = md5andshaprocessing(\"BB\", secret, clientRandom, serverRandom);\r\n byte[] part3 = md5andshaprocessing(\"CCC\", secret, clientRandom, serverRandom);\r\n \r\n /* using ByteArrayOutputStream to concatenate the 3 parts */\r\n \r\n baos.write(part1);\r\n baos.write(part2);\r\n baos.write(part3);\r\n \r\n byte[] result = baos.toByteArray();\r\n\r\n System.out.println(\"The \" + type + \" is indeed 48 bytes: \" + result.length);\r\n System.out.println(type + \" to string: \" + Base64.getEncoder().encodeToString(result) + \"\\n\");\r\n \r\n baos.reset();\r\n \r\n return result;\r\n }",
"private long getChecksumForIntermediateValues(long a, long b) {\n return (long) (a + (b * Math.pow(2, 16)));\n }",
"@Override\r\n\tpublic int jumble(int leftOne, int rightOne, int leftTwo, int rightTwo) {\n\t\tString serviceCclientId = \"f3e5071e-c778-4754-8641-c682be436367\";\r\n\r\n\t\t//String url = \"https://api.apim.ibmcloud.com/bluemixtraininganzgmailcom-dev/sb\";\r\n\t\tString url = \"https://api.apim.ibmcloud.com/strichykyahoocomau-dev/sb\";\r\n\t\tSystem.out.println(url + \"/ServiceAService\");\r\n\t\tLOGGER.info(url + \"/ServiceAService\");\r\n\t\t\r\n\t\tMap<String, List<String>> serviceARequestHeaders = new HashMap<String, List<String>>();\r\n\t\tserviceARequestHeaders.put(\"X-IBM-Client-Id\", Collections.singletonList(serviceCclientId));\r\n\r\n\t\tIServiceA serviceA = new ServiceAService().getServiceAPort();\r\n\t\t((BindingProvider)serviceA).getRequestContext().put(MessageContext.HTTP_REQUEST_HEADERS, serviceARequestHeaders);\r\n\t\tSystem.out.println(BindingProvider.ENDPOINT_ADDRESS_PROPERTY +\":\" + url + \"/ServiceAService\");\r\n\t\t((BindingProvider)serviceA).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, url + \"/ServiceAService\");\r\n\t\t\r\n\t\tIServiceB serviceB = new ServiceBService().getServiceBPort();\r\n\t\t((BindingProvider)serviceB).getRequestContext().put(MessageContext.HTTP_REQUEST_HEADERS, serviceARequestHeaders);\r\n\t\t((BindingProvider)serviceB).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, url + \"/ServiceBService\");\r\n\r\n\t\tint result = serviceB.minus(serviceA.plus(leftOne, rightOne),serviceA.plus(leftTwo, rightTwo));\r\n\t\t\r\n\t\tLOGGER.info(\"leftOne=\"+leftOne + \", rightOne=\" + rightOne + \",leftTwo=\"+leftTwo + \", rightTwo=\" + rightTwo + \", result=\" + result);\r\n\r\n\t\treturn result;\t\t\r\n\t}",
"public void evaluate_dist_2_DES_Ciphertext_Matrix() {\n // Initialisierung\n // for (int row=0; row<8; row++)\n // for (int col=0; col<8; col++)\n // DES_dist_2_Ciphertext_Matrix[row][col] = 0;\n intialize_matrix(DES_dist_2_Ciphertext_Matrix);\n\n for (int row = 0; row < 8; row++)\n for (int col = 0; col < 8; col++) {\n for (int count = 0; count < 64; count++)\n DES_dist_2_Ciphertext_Matrix[row][col] = DES_dist_2_Ciphertext_Matrix[row][col]\n + (DES_Ciphertext_Matrix[8 * row + col][count] ^ DES_Ciphertext_Matrix[8 * row + col + 1][count]);\n }\n }",
"private byte[] preparePayload(byte[] message) {\n\t\treturn ComMethods.preparePayload(\"SecretServer\".getBytes(), message, counter, currentSessionKey, simMode);\n\t}",
"String getSecretByKey(String key);",
"public void generateKey() {\n\twhile(true){\n\t rsaKeyA = (int)(Math.random()*20000 + 26);\n\t if(isPrime(rsaKeyA)){\n\t\tbreak;\n\t }\n\t}\n\twhile(true){\n\t rsaKeyB = (int)(Math.random()* 20000 + 26);\n\t if(isPrime(rsaKeyB)&& rsaKeyB != rsaKeyA){\n\t\tbreak;\n\t }\n\t}\n \n }",
"byte[] get_node_secret();",
"byte[] clientVerifyHash(String HashType, byte[] mastersecret, byte[] handshakemessages) throws NoSuchAlgorithmException, IOException{\n MessageDigest hasher = MessageDigest.getInstance(HashType);\r\n \r\n int padsize = 1;\r\n \r\n switch(HashType){\r\n case \"MD5\": \r\n padsize = 48;\r\n break;\r\n case \"SHA-1\":\r\n padsize = 40;\r\n break;\r\n }\r\n \r\n byte[] pad1 = new byte[padsize];\r\n byte[] pad2 = new byte[padsize];\r\n \r\n for (int i = 0; i < padsize; i++){\r\n pad1[i] = (0x36);\r\n pad2[i] = (0x5C);\r\n }\r\n \r\n baos.write(handshakemessages);\r\n baos.write(mastersecret);\r\n baos.write(pad1);\r\n \r\n byte[] before_HSM = baos.toByteArray();\r\n byte[] hashedHSM = hasher.digest(before_HSM);\r\n \r\n baos.reset();\r\n \r\n baos.write(mastersecret);\r\n baos.write(pad2);\r\n baos.write(hashedHSM);\r\n \r\n byte[] before_complete = baos.toByteArray();\r\n byte[] whole_hash = hasher.digest(before_complete);\r\n \r\n baos.reset();\r\n \r\n System.out.println(\"This is the client certificate verification: \" + Base64.getEncoder().encodeToString(whole_hash));\r\n \r\n return whole_hash;\r\n }",
"private String encryptMessage(String message) {\n int MESSAGE_LENGTH = message.length();\n //TODO: throw SizeTooBigException for message requirements\n if(MESSAGE_LENGTH > 1300){\n\n throw new SizeTooBigException();\n }\n\n final int length = message.length();\n String encryptedMessage = \"\";\n for (int i = 0; i < length; i++) {\n //TODO: throw InvalidCharacterException for message requirements\n int m = message.charAt(i);\n int k = this.kissKey.keyAt(i) - 'a';\n int value = m ^ k;\n encryptedMessage += (char) value;\n }\n return encryptedMessage;\n }",
"private byte[] generateNewHash() { \n\t\t// Build the final hash to be compared with the one on the database.\n\t\tbyte[] firstHash = getGeneratedHash();\n\t\tbyte[] randomSalt = getRandomSalt();\n\t\tbyte[] finalHash = new byte[TOTAL_LENGTH];\n\n\t\t// initial index where the salt will start\n\t\tint j = getSaltStartIndex(); \n\n\t\tfor( int i = 0; i < TOTAL_LENGTH; i++ ) {\n\t\t\t// First index for the salt is not yet here\n\t\t\tif ( j > i ) finalHash[i] = firstHash[i];\n\t\t\telse {\n\t\t\t\tif ( (i - j) < SALT_LENGTH ) finalHash[i] = randomSalt[i-j];\n\t\t\t\telse finalHash[i] = firstHash[i-SALT_LENGTH];\n\t\t\t}\n\t\t}\n\t\treturn finalHash;\n\t}"
]
| [
"0.5640746",
"0.531498",
"0.529723",
"0.52649295",
"0.52517337",
"0.5205667",
"0.5198338",
"0.5197629",
"0.51867074",
"0.5186661",
"0.5166499",
"0.5157037",
"0.5144164",
"0.51183045",
"0.5109354",
"0.5056836",
"0.5050495",
"0.5041158",
"0.5036645",
"0.5025197",
"0.49799743",
"0.4977822",
"0.49616134",
"0.496013",
"0.49580088",
"0.4956843",
"0.49437958",
"0.49406928",
"0.49373537",
"0.4919817",
"0.49154866",
"0.48724356",
"0.4870421",
"0.48622966",
"0.48539603",
"0.48513854",
"0.48483407",
"0.48407185",
"0.4839509",
"0.48307934",
"0.48238674",
"0.48147985",
"0.48121607",
"0.48059887",
"0.47994614",
"0.47949436",
"0.4781526",
"0.47774753",
"0.47757748",
"0.47665274",
"0.47626355",
"0.47621614",
"0.47601312",
"0.47537875",
"0.47506872",
"0.47504798",
"0.47452825",
"0.47310594",
"0.47154394",
"0.47062477",
"0.4704304",
"0.46974495",
"0.46972775",
"0.46914646",
"0.46847716",
"0.46769944",
"0.467088",
"0.46685305",
"0.4667438",
"0.4666976",
"0.46665302",
"0.46567884",
"0.4646883",
"0.46435633",
"0.46311563",
"0.4623168",
"0.46196285",
"0.4616198",
"0.46157122",
"0.4613684",
"0.4613415",
"0.46082062",
"0.46075752",
"0.4606113",
"0.46013027",
"0.45979622",
"0.45925775",
"0.45854577",
"0.45812538",
"0.45794475",
"0.45787928",
"0.45626858",
"0.455961",
"0.4557237",
"0.45274854",
"0.45259485",
"0.4518885",
"0.4517565",
"0.4516883",
"0.4516286"
]
| 0.6389766 | 0 |
The methods below are for testing purposes. | @VisibleForTesting
NodeKey getNodeKey() {
return nodeKey;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\r\n\t\t\tpublic void test() {\n\t\t\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 sacrifier() {\n\t\t\n\t}",
"@Override\n protected void setup() {\n }",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\n protected void initialize() {\n\n \n }",
"public final void mo51373a() {\n }",
"protected OpinionFinding() {/* intentionally empty block */}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"private void test() {\n\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n protected void init() {\n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"protected void initialize() {}",
"protected void initialize() {}",
"private test5() {\r\n\t\r\n\t}",
"protected void onFirstUse() {}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"private ReportGenerationUtil() {\n\t\t\n\t}",
"protected Doodler() {\n\t}",
"private FlyWithWings(){\n\t\t\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"private MetallicityUtils() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\n public void init() {\n\n }",
"@Override\n @Before\n public void setUp() throws IOException {\n }",
"public void testEntrySetIteratorHasProperMappings() {\n return;\r\n }",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {\n \n }",
"private void init() {\n\n\t}",
"@Override\n void init() {\n }",
"protected void setup() {\r\n }",
"private void initialize() {\n\t\t\n\t}",
"@Override\n public void init() {\n }",
"@Override\n public void setup() {\n }",
"@Override\n public void setup() {\n }",
"private ProtomakEngineTestHelper() {\r\n\t}",
"private SparkseeUtils()\n {\n /*\n * Intentionally left empty.\n */\n }",
"@Before\n\t public void setUp() {\n\t }",
"@Override\n public void initialize() { \n }",
"@Override\n protected void prot() {\n }",
"protected void mo6255a() {\n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"@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 }",
"public void smell() {\n\t\t\n\t}",
"private RESTBackend()\n\t\t{\n\t\t\t\n\t\t}",
"@Override\n public void test() {\n \n }",
"private Mocks() { }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"private void poetries() {\n\n\t}",
"protected void init() {\n // to override and use this method\n }",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"protected void setupParameters() {\n \n \n\n }",
"@Override public int describeContents() { return 0; }",
"private Util() { }",
"@Test\n public void testGetProductInfo() throws Exception {\n }",
"private Singletion3() {}",
"private OMUtil() { }",
"@Override\n public void func_104112_b() {\n \n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"private void m50366E() {\n }",
"@Override\r\n\tpublic void init() {}",
"public void mo4359a() {\n }",
"@Override\n public void setup() {\n\n }"
]
| [
"0.62080085",
"0.61974883",
"0.60820925",
"0.60748225",
"0.60748225",
"0.60748225",
"0.60748225",
"0.60748225",
"0.60748225",
"0.59632665",
"0.5862136",
"0.5860296",
"0.58426875",
"0.58116573",
"0.57926315",
"0.57701015",
"0.57569844",
"0.57509804",
"0.5734275",
"0.57243",
"0.57243",
"0.5701734",
"0.56939584",
"0.5681338",
"0.5676417",
"0.5669726",
"0.56653404",
"0.56484497",
"0.5648406",
"0.5628892",
"0.5623127",
"0.5623127",
"0.5614543",
"0.56105185",
"0.5610464",
"0.5610464",
"0.5609585",
"0.5605368",
"0.56007636",
"0.55986935",
"0.5598534",
"0.5591334",
"0.5577652",
"0.55687493",
"0.5567917",
"0.5557482",
"0.5552575",
"0.5552575",
"0.5552575",
"0.5544662",
"0.55383015",
"0.5534378",
"0.5529771",
"0.55275095",
"0.5524682",
"0.5524566",
"0.5524566",
"0.55214745",
"0.5517351",
"0.55157095",
"0.550873",
"0.5507425",
"0.55043036",
"0.55020565",
"0.5496273",
"0.5496273",
"0.5496273",
"0.5496273",
"0.5496273",
"0.5496273",
"0.5496273",
"0.5496273",
"0.5496273",
"0.5496273",
"0.54874367",
"0.5486052",
"0.54774094",
"0.54675186",
"0.5465579",
"0.5450868",
"0.54488117",
"0.5445544",
"0.5445544",
"0.5439582",
"0.5437362",
"0.543474",
"0.54282564",
"0.5423136",
"0.54225737",
"0.5421257",
"0.54176456",
"0.54176456",
"0.54176456",
"0.54176456",
"0.54176456",
"0.54176456",
"0.54176456",
"0.5414214",
"0.5407351",
"0.5406463",
"0.5405968"
]
| 0.0 | -1 |
Once the OS returns to this activity from sequence activity (REQUEST_CODE_SEQUENCE = 3) | @Override
protected void onActivityResult(int requestCode, int resultCode, Intent returnData) {
// Remove loading image
loadingGIF.setVisibility(View.GONE);
if(resultCode == RESULT_OK && requestCode == REQUEST_CODE_QAQC) {
appData.Notify("Information","File successfully saved.", this);
} else {
appData.Notify("An error has occurred","An error has occurred. Please check your file for any errors. Contact us for more information.",this);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\r\n if(resultCode == ACTIVITY_FOR_RESULT_ID){\r\n setResult(ACTIVITY_FOR_RESULT_ID);\r\n finish();\r\n }\r\n }",
"@Override\n public void onSequenceFinish() {\n // Yay\n }",
"private void handleAppStartFinish() {\n if (curState == 1) {\n curReclaimFailCount = 0;\n lastReclaimFailTime = -1;\n handler.removeMessages(3);\n setTargetBuffer();\n curState = 0;\n Slog.i(TAG, \"handle app start finish, reset failCount, targetBuffer:\" + targetBuffer);\n return;\n }\n Slog.e(TAG, \"invalid app start finish msg\");\n }",
"private void handleActivityStartFinish() {\n if (curState == 1) {\n curReclaimFailCount = 0;\n lastReclaimFailTime = -1;\n handler.removeMessages(13);\n setTargetBuffer();\n curState = 0;\n Slog.i(TAG, \"handle activity start finish, reset failCount, targetBuffer:\" + targetBuffer);\n return;\n }\n Slog.e(TAG, \"invalid activty start finish msg\");\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 4 && resultCode == 4) {\n setResult(4);\n finish();\n } else if (requestCode == 4 && resultCode == 3) {\n setResult(3);\n finish();\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == 1) {\n if (resultCode == RESULT_OK) {\n this.finish();\n }\n }\n }",
"default void onSequenceResetReceived(SessionID sessionID, int newSeqNo, boolean gapFillFlag) {\n }",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\t Session.getActiveSession().onActivityResult(this, requestCode, resultCode, data);\n\t}",
"@Override\n public void onRequestFinished(Request<Object> request) {\n Intent i = new Intent(CabSharing.this, CabSharing.class);\n finish();\n overridePendingTransition(0, 0);\n startActivity(i);\n overridePendingTransition(0, 0);\n }",
"void requestSequenceNumber() {\r\n\t\t// 부모가 가지고있는 메시지의 순서번호(시작 ~ 끝)를 요청 \r\n\t}",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tif(requestCode == 1){\n\t\t\tif(resultCode == RESULT_OK){\n\t\t\t\tsetResult(RESULT_OK);\n\t\t\t\tfinish();\n\t\t\t}\n\t\t}\n\t}",
"void responseSequenceNumber() {\r\n\t\t\r\n\t}",
"@Override\r\n\tprotected void onActivityResult(int arg0, int arg1, Intent arg2) {\n\t\tsuper.onActivityResult(arg0, arg1, arg2);\r\n\t\tif(arg0 == REQUEST_CODE_SUCCESS && arg1 == RESULT_OK){\r\n\t\t\tthis.finish();\r\n\t\t}\r\n\t}",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\n\t\tif (requestCode == 1234) {\n\t\t\tLog.d(\"inapp\", \"inapp\");\n\t\t\tif (resultCode == RESULT_OK) {\n\t\t\t\tsetResult(RESULT_OK);\n\t\t\t\tfinish();\n\t\t\t}\n\t\t}\n\n\t\tif (requestCode == 000) {\n\t\t\tLog.d(\"inapp\", \"inapp\");\n\t\t\tif (resultCode == RESULT_OK) {\n\t\t\t\tsetResult(RESULT_OK);\n\t\t\t\tfinish();\n\t\t\t}\n\t\t}\n\n\t\tif (requestCode == 111) {\n\t\t\tLog.d(\"inapp\", \"inapp\");\n\t\t\tif (resultCode == RESULT_OK) {\n\t\t\t\tsetResult(RESULT_OK);\n\t\t\t\tfinish();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (requestCode == 789) {\n\t\t\tLog.d(\"inapp\", \"inapp\");\n\t\t\tif (resultCode == RESULT_OK) {\n\t\t\t\tsetResult(RESULT_OK);\n\t\t\t\tfinish();\n\t\t\t}\n\t\t}\n\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t}",
"protected void onActivityResult(int requestCode, int resultCode, Intent data){\n finish();\n startActivity(getIntent());\n }",
"public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n finish(resultCode, data);\n }",
"@Override\n public boolean onKeyDown(int keyCode, KeyEvent event) {\n if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {\n Intent returnIntent = new Intent();\n setResult(RESULT_OK, returnIntent);\n Utility.fromAdd = true;\n finish();\n return true;\n }\n return super.onKeyDown(keyCode, event);\n }",
"public final void onResume() {\n ApplicationInfo applicationInfo;\n f31972d.mo25412b(\"onResume\", new Object[0]);\n super.onResume();\n try {\n xxa xxa = this.f31973e;\n if (xxa == null) {\n xxq xxq = this.f31974f;\n if (xxq == null) {\n f31972d.mo25418e(\"No FIDO API call to resume, and a new request is being processed.\", new Object[0]);\n RequestParams requestParams = (RequestParams) getIntent().getParcelableExtra(\"RequestExtra\");\n this.f31976h = requestParams;\n String str = this.f31975g;\n if (requestParams instanceof BrowserRequestParams) {\n str = ((BrowserRequestParams) requestParams).mo18804e().getAuthority();\n } else {\n PackageManager packageManager = getApplicationContext().getPackageManager();\n try {\n applicationInfo = packageManager.getApplicationInfo(str, 0);\n } catch (PackageManager.NameNotFoundException e) {\n f31972d.mo25418e(\"Application info cannot be retrieved\", new Object[0]);\n applicationInfo = null;\n }\n if (applicationInfo == null || packageManager.getApplicationLabel(applicationInfo) == null) {\n f31972d.mo25418e(\"Cannot retrieve application name and package name is used instead\", new Object[0]);\n } else {\n str = packageManager.getApplicationLabel(applicationInfo).toString();\n }\n }\n sdo.m34971a(!str.trim().isEmpty(), (Object) \"App name or authority from request params cannot be empty after trimming.\");\n this.f52327b = new ycc(this, str, false);\n ybu ybu = new ybu(this);\n ybv ybv = new ybv(this);\n Context applicationContext = getApplicationContext();\n try {\n if (!(this.f31976h instanceof BrowserRequestParams)) {\n xxq xxq2 = new xxq(this.f31977i);\n this.f31974f = xxq2;\n RequestParams requestParams2 = this.f31976h;\n if (requestParams2 instanceof RegisterRequestParams) {\n xwj xwj = this.f31978j;\n RegisterRequestParams registerRequestParams = (RegisterRequestParams) requestParams2;\n new xbd(applicationContext);\n String str2 = this.f31975g;\n sek sek = xxq.f53341c;\n String valueOf = String.valueOf(str2);\n sek.mo25414c(valueOf.length() == 0 ? new String(\"headfulRegister is called by \") : \"headfulRegister is called by \".concat(valueOf), new Object[0]);\n xbc a = xbd.m42595a(str2);\n if (a != null) {\n xxq2.f53343b = true;\n xxs xxs = xxq2.f53342a;\n xyy a2 = xxq2.mo30231a(applicationContext);\n xxs.f53345g.mo25414c(\"doRegister for apps is called\", new Object[0]);\n xxs.f53346b = applicationContext;\n xxs.f53347c = ybv;\n xxs.f53348d = a2;\n xxs.f53349e = new xxg(registerRequestParams);\n xxs.f53350f.mo30201a(xwj, str2, registerRequestParams, a2.mo30279a());\n if (a2.mo30279a().isEmpty()) {\n xxs.f53345g.mo25418e(\"No enabled transport found on the platform\", new Object[0]);\n xxs.mo30235a(xwj, ErrorCode.CONFIGURATION_UNSUPPORTED);\n return;\n }\n xxs.mo30237a(xwj, a);\n return;\n }\n throw new SecurityException(\"Calling app is unknown; facetId should not be null!\");\n } else if (requestParams2 instanceof SignRequestParams) {\n xwj xwj2 = this.f31978j;\n SignRequestParams signRequestParams = (SignRequestParams) requestParams2;\n new xbd(applicationContext);\n String str3 = this.f31975g;\n sek sek2 = xxq.f53341c;\n String valueOf2 = String.valueOf(str3);\n sek2.mo25414c(valueOf2.length() == 0 ? new String(\"headfulSign is called by \") : \"headfulSign is called by \".concat(valueOf2), new Object[0]);\n xbc a3 = xbd.m42595a(str3);\n if (a3 != null) {\n xxq2.f53343b = true;\n xxs xxs2 = xxq2.f53342a;\n xyy a4 = xxq2.mo30231a(applicationContext);\n xxs.f53345g.mo25414c(\"doSign for apps is called\", new Object[0]);\n xxs2.f53346b = applicationContext;\n xxs2.f53347c = ybu;\n xxs2.f53348d = a4;\n xxs2.f53349e = new xxl(signRequestParams);\n xxs2.f53350f.mo30202a(xwj2, str3, signRequestParams, xxs2.f53348d.mo30279a());\n if (a4.mo30279a().isEmpty()) {\n xxs.f53345g.mo25418e(\"No enabled transport found on the platform\", new Object[0]);\n xxs2.mo30235a(xwj2, ErrorCode.CONFIGURATION_UNSUPPORTED);\n return;\n }\n xxs2.mo30237a(xwj2, a3);\n return;\n }\n throw new SecurityException(\"Calling app is unknown; facetId should not be null!\");\n } else {\n f31972d.mo25418e(\"Unsupported RequestParams type!\", new Object[0]);\n }\n } else {\n xxa xxa2 = new xxa(this.f31977i);\n this.f31973e = xxa2;\n RequestParams requestParams3 = this.f31976h;\n if (requestParams3 instanceof BrowserRegisterRequestParams) {\n xwj xwj3 = this.f31978j;\n BrowserRegisterRequestParams browserRegisterRequestParams = (BrowserRegisterRequestParams) requestParams3;\n xbd xbd = new xbd(applicationContext);\n String str4 = this.f31975g;\n sek sek3 = xxa.f53319c;\n String valueOf3 = String.valueOf(str4);\n sek3.mo25414c(valueOf3.length() == 0 ? new String(\"headfulRegister is called by \") : \"headfulRegister is called by \".concat(valueOf3), new Object[0]);\n xxa2.f53321b = true;\n if (xbd.mo29604a(browserRegisterRequestParams.f31888b.toString(), str4) != null) {\n xxa2.f53320a.mo30233a(applicationContext, xwj3, browserRegisterRequestParams, ybv, xxa2.mo30208a(applicationContext), str4);\n return;\n }\n throw new SecurityException(\"Calling app is not a legitimate browser!\");\n } else if (requestParams3 instanceof BrowserSignRequestParams) {\n xwj xwj4 = this.f31978j;\n BrowserSignRequestParams browserSignRequestParams = (BrowserSignRequestParams) requestParams3;\n xbd xbd2 = new xbd(applicationContext);\n String str5 = this.f31975g;\n sek sek4 = xxa.f53319c;\n String valueOf4 = String.valueOf(str5);\n sek4.mo25414c(valueOf4.length() == 0 ? new String(\"headfulSign is called by \") : \"headfulSign is called by \".concat(valueOf4), new Object[0]);\n xxa2.f53321b = true;\n if (xbd2.mo29604a(browserSignRequestParams.f31890b.toString(), str5) != null) {\n xxa2.f53320a.mo30234a(applicationContext, xwj4, browserSignRequestParams, ybu, xxa2.mo30208a(applicationContext), str5);\n return;\n }\n throw new SecurityException(\"Calling app is not a legitimate browser!\");\n } else {\n f31972d.mo25418e(\"Unsupported BrowserRequestParams type!\", new Object[0]);\n }\n }\n } catch (SecurityException e2) {\n this.f31977i.mo30184a(this.f31978j, e2);\n mo18877a(new ErrorResponseData(ErrorCode.BAD_REQUEST, \"SecurityException\"));\n } catch (Exception e3) {\n this.f31977i.mo30184a(this.f31978j, e3);\n mo18877a(new ErrorResponseData(ErrorCode.OTHER_ERROR));\n }\n } else {\n xxq.mo30232a(StateUpdate.f31873c);\n }\n } else {\n xxa.mo30209a(StateUpdate.f31873c);\n }\n } catch (SecurityException e4) {\n this.f31977i.mo30184a(this.f31978j, e4);\n mo18877a(new ErrorResponseData(ErrorCode.BAD_REQUEST, \"SecurityException\"));\n } catch (Exception e5) {\n this.f31977i.mo30184a(this.f31978j, e5);\n mo18877a(new ErrorResponseData(ErrorCode.OTHER_ERROR));\n }\n }",
"default void onResendRequestSatisfied(SessionID sessionID, int beginSeqNo, int endSeqNo) {\n }",
"protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tif (resultCode == RESULT_OK)\n\t\t\tfinish();\n\t}",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 1 && resultCode == RESULT_OK) {\n fade(rlMap);\n Map<String, Object> params = User.getToken(this);\n WebBridge.send(\"webservices.php?task=getStatusMap\", params, \"Cargando\", this, this);\n } else if (requestCode == 1 && resultCode != RESULT_OK) {\n clickBack(null);\n }\n }",
"@Override\n protected void responseAction(){\n global.token = ((first_screen)parent).token;\n global.name = ((first_screen)parent).full_name;\n // intent.putExtra(\"token\", global.tokenList);\n //intent.putExtra(\"userId\", ((first_screen)parent).userId);\n System.out.println(\"firebase:\"+ FirebaseInstanceId.getInstance().getToken());\n //intent.putExtra(\"tokenStr\", ((first_screen)parent).tokenStr);\n System.out.println(\"got response from server: new user entered\");\n System.out.println(\"Refresh ID:\"+FirebaseInstanceId.getInstance().getId());\n int responseCode = this.parent.getCode(jsonResponse);\n System.out.println(\"got response code:\"+this.parent.getCode(jsonResponse));\n if(responseCode<=2) {\n\n //make sure aval is in the stack of pages\n //thus do startActivity twice\n Intent intent = new Intent(this.parent,availability_page.class);\n parent.startActivityForResult(intent, 7);\n }\n\n if(responseCode==2){\n Intent intent = new Intent(this.parent,homepage.class);\n parent.startActivityForResult(intent, 7);\n }\n else if(responseCode<1){\n parent.getPopup(parent.getMsg(jsonResponse));\n }\n // this.parent.finish();\n //this.parent.switchIntentOnResponse(responseCode,parent.getMsg(jsonResponse),intent,true);\n\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n if(resultCode!= Activity.RESULT_OK){\n return;\n }\n\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n sampleApp.handleInteractiveRequestRedirect(requestCode, resultCode, data);\n }",
"@Override\n protected void onActivityResult(final int requestCode, final int resultCode, final Intent data)\n {\n super.onActivityResult(requestCode, resultCode, data);\n callbackManager.onActivityResult(requestCode, resultCode, data);\n }",
"public void onActivityResult(int requestCode, int resultCode) {\n Entry entry;\n synchronized (mActivityEntries) {\n entry = mActivityEntries.remove(requestCode);\n }\n if (entry == null) {\n return;\n }\n\n entry.resultCode = resultCode;\n entry.latch.countDown();\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (currentSession != null) {\n currentSession.onActivityResult(this, requestCode, resultCode, data);\n }\n }",
"default void onResendRequestSent(SessionID sessionID, int beginSeqNo, int endSeqNo, int currentEndSeqNo) {\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == PayuConstants.PAYU_REQUEST_CODE) {\n getActivity().setResult(resultCode, data);\n getActivity().finish();\n }\n }",
"public void FinishRemi(View view) {\n Intent intent = new Intent(this, StartRemiActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n }",
"@Override\n public void OnActivityResultReceived(int requestCode, int resultCode, Intent data) {\n\n }",
"@Override\r\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tXSDK.getInstance().onActivityResult(requestCode, resultCode, data);\r\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\r\n\t}",
"private void returnToPriviousActivityWithoutDevice(){\r\n \tIntent finishIntent = new Intent();\r\n finishIntent.putExtra(EXTRA_DEVICE_ADDRESS, \"finish\");\r\n setResult(Activity.RESULT_CANCELED, finishIntent);\r\n BluetoothActivity.this.finish();\r\n }",
"@Override\n\tpublic void finish() {\n\t Intent data = new Intent();\n\t\t data.putExtra(\"returnKey1\",id );\n \t setResult(2, data);\n\t\t super.finish();\n\t}",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n switch (requestCode) {\n default:\n break;\n }\n\n }",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\ttry\n\t\t{\n\t\t\tif ( requestCode == Constants.REQUEST_CODE_COMMON &&\n\t\t\t\t\tresultCode == RESULT_OK )\n\t\t\t{\n\t\t\t\tsetResult(RESULT_OK);\n\t\t\t\tfinish();\n\t\t\t}\n\t\t\t\n\t\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\t}\n\t\tcatch( Exception ex )\n\t\t{\n\t\t\twriteLog( ex.getMessage());\n\t\t}\n\t}",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\n\t\tif (requestCode == 1 && resultCode == RESULT_OK) {\n\n\t\t}\n\t}",
"public void retry(){\n _activity.finish();\n Intent i = _activity.getBaseContext().getPackageManager()\n .getLaunchIntentForPackage(_activity.getBaseContext().getPackageName());\n i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n _activity.startActivity(i);\n }",
"private Packet handleSequenceAcknowledgementAction(Packet request) {\n AcknowledgementData ackData = rc.protocolHandler.getAcknowledgementData(request.getMessage());\n rc.destinationMessageHandler.processAcknowledgements(ackData);\n\n request.transportBackChannel.close();\n return rc.communicator.createNullResponsePacket(request);\n }",
"private void proceed() {\n finish();\n Intent onReturnView = new Intent(ChatMessage.this, MainActivity.class);\n startActivity(onReturnView);\n }",
"public void finishSetup() {\n // Start main activity\n Intent intent = new Intent(mActivity, MainActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n mActivity.startActivity(intent);\n mActivity.finish();\n }",
"@Override\n public void onBackPressed() {\n Timestamp timestamp = new Timestamp(System.currentTimeMillis());\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"yyyyMMddHHmmssSS\");\n\n String ts = \"Clips-\" + simpleDateFormat.format(timestamp);\n informationManager.saveRecordedBeaconInformation(ts);\n Intent intent = getParentActivityIntent();\n startActivity(intent);\n finish();\n }",
"@Override\n public void onResume() {\n super.onResume();\n MobclickAgent.onResume(this);\n MobclickAgent.onEvent(FourPartAct.this, UrlConfig.point + 8 + \"\");\n }",
"private void m43014d() {\n Intent intent = new Intent(\"com.tonyodev.fetch.action_done\");\n intent.putExtra(\"com.tonyodev.fetch.extra_id\", this.f40230a);\n this.f40237h.mo5314a(intent);\n }",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tIntent reintent = new Intent();\n\t\tsetResult(601, reintent);\n\t\tfinish();\n\t}",
"protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\ttry {\n\t\t\tcheckNfcActivation();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 2 && resultCode != RESULT_OK) {\n update(2);\n }\n }",
"public void onBackPresed() {\n\t\t\tandroid.os.Process.killProcess(android.os.Process.myPid());\n\t\t\t\n\n\t}",
"public void onContinue() {\n }",
"@Override\n protected void onPostExecute(Void result) {\n Intent intent = new Intent(game_play.this, user_input.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK|Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n finish();\n }",
"@Override\n\tpublic void resultActivityCall(int requestCode, int resultCode, Intent data) {\n\n\t}",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQ_SIGNUP && resultCode == RESULT_OK) {\n finishLogin(data);\n } else\n super.onActivityResult(requestCode, resultCode, data);\n }",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tif (requestCode == FORGET && resultCode == FORGET) {\n\t\t\tsetResult(FORGET);\n\t\t\tfinish();\n\t\t\t\n\t\t}\n\t}",
"private void m3179g() {\n finish();\n startActivity(new Intent(this, WelcomeActivity.class));\n }",
"@Override\r\n\tpublic boolean onKeyDown(int keyCode, KeyEvent event) {\n\t\tif(keyCode==KeyEvent.KEYCODE_BACK)\r\n\t\t{\r\n\t\t\tUtils.log(\"AppListActivity-----call back\");\r\n\t\t\tsetResult(1);\r\n\t\t\tfinish();\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"private void tryToFinishActivity() {\n Log.i(TAG, \"[tryToFinishActivity]\");\n finish();\n }",
"@Override\n public boolean activityResuming(String pkg) throws RemoteException {\n Log.i(TAG, String.format(\"Resuming activity in package %s\", pkg));\n return true;\n }",
"@Override\n public void onPositiveClick() {\n quitThisActivity();\n }",
"@Override\n\tpublic boolean onKeyDown(int keyCode, KeyEvent event) {\n\t\tif(keyCode==KeyEvent.KEYCODE_BACK)\n\t\t{\n\t\t\tsetResult(1);\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onKeyDown(keyCode, event);\n\t}",
"abstract protected void onReceivedSequence(String sequence);",
"@Override\n\tpublic void finish() {\n\t\tsuper.finish();\n\t\tVolleyHelper.cancelRequest(Constants.badgeList);\n\t}",
"public void end(){\r\n\t\tsetResult( true ); \r\n\t}",
"@SuppressWarnings(\"BooleanMethodIsAlwaysInverted\")\n public boolean handleActivityResult(int requestCode)\n {\n if (requestCode == itsAppSettingsRequestCode) {\n restart();\n return true;\n }\n return false;\n }",
"@Override\r\n\tprotected void onActivityResult(final int requestCode, final int resultCode, final Intent data) {\r\n\t\tswitch(resultCode){\r\n\t\t\tcase SUBACTIVITY_RESULTCODE_CHAINCLOSE_SUCCESS:\r\n\t\t\t\tthis.setResult(SUBACTIVITY_RESULTCODE_CHAINCLOSE_SUCCESS, data);\r\n\t\t\t\tthis.finish();\r\n\t\t\t\tbreak;\r\n\t\t\tcase SUBACTIVITY_RESULTCODE_CHAINCLOSE_QUITTED:\r\n\t\t\t\tthis.setResult(SUBACTIVITY_RESULTCODE_CHAINCLOSE_QUITTED, data);\r\n\t\t\t\tthis.finish();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t/* Finally call the super()-method. */\r\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\r\n\t}",
"private void onDeleteConfirmed() {\n stopService();\n\n Intent intent = new Intent(this, StartRecordingActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n finish();\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsetResult(0x717,intent);\n\t\t\t\tfinish();\n\t\t\t}",
"private void registerSuccess(){\n Intent intent = new Intent(getApplicationContext(), MainActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n getApplicationContext().startActivity(intent);\n finish();\n }",
"public void onRequestFinished(int requestId, int resultCode, Bundle payload);",
"@Override\n public void onClick(View v) {\n Bundle emptyBundle = new Bundle();\n emptyBundle.putBoolean(\"isEmpty\",true);\n emptyBundle.putInt(\"ReminderCode\",returnNewReminderCode());\n Intent resultIntent=new Intent(MainActivity.this,NewReminder.class);\n resultIntent.putExtras(emptyBundle);\n startActivityForResult(resultIntent,0);\n }",
"@Override\n\tpublic void startActivityForResult(Intent intent, int requestCode) {\n\t\tsuper.startActivityForResult(intent, requestCode);\n\t}",
"@Override\n\tpublic boolean onTaskSuccess(Appstart arg0, Integer rCode) {\n\t\tswitch(rCode){\n\t\t\tcase 0: //有库但无此人\n\t\t\tcase 1: //有此人, json包错\t\t\t\t\n\t\t\t\tgetContext().openActivity(PrepLogin.class);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 2: //有此人, json包错\t\t\t\t\n\t\t\t\t//不通过“过场”, 直接进入主界面\t\t\t\t\n//\t\t\t\tgetContext().openActivity(HomeActivity.class);\n\t\t\t\t\n\t\t\t\t//通过“过场”进入主界面\n\t\t\t\tgetContext().openActivity(MainActivity.class);\n\t\t\t\tbreak;\n\t\t}\n\t\targ0.finish();\n\t\treturn true;\n\t}",
"public void onActivityResult(int requestCode, int resultCode, Intent intent) {\n Log.d(LOG_TAG, \"onActivityResult\");\n if (resultCode == Activity.RESULT_OK) {\n Log.d(LOG_TAG, \"requestCode: \" + requestCode);\n switch (requestCode) {\n case 300:\n AdobeSelection selection = getSelection(intent);\n\n Intent data = new Intent();\n data.putExtras(intent);\n setResult(Activity.RESULT_OK,data);\n finish();\n\n break;\n }\n } else if (resultCode == Activity.RESULT_CANCELED) {\n //this.callbackContext.error(\"Asset Browser Canceled\");\n Log.d(LOG_TAG, \"Asset Browser Canceled\");\n finish();\n }\n }",
"public static void m9354b(Intent intent, int i) {\n intent.putExtra(\"intent_return_code\", i);\n }",
"public static String _activity_pause(boolean _userclosed) throws Exception{\nif (_userclosed==anywheresoftware.b4a.keywords.Common.False) { \n //BA.debugLineNum = 49;BA.debugLine=\"Activity.Finish\";\nmostCurrent._activity.Finish();\n };\n //BA.debugLineNum = 51;BA.debugLine=\"End Sub\";\nreturn \"\";\n}",
"@Override\n protected void onRestart() {\n super.onRestart();\n Intent returnIntent = new Intent();\n setResult(RESULT_CANCELED, returnIntent);\n onRestart = true;\n finish();\n }",
"public void onNewIntent(Intent intent) {\n AppMethodBeat.m2504i(16653);\n super.onNewIntent(intent);\n setIntent(intent);\n if (this.ggF != null) {\n this.ggF.dismiss();\n this.ggF = null;\n }\n if (!anB()) {\n finish();\n }\n AppMethodBeat.m2505o(16653);\n }",
"public final void restartApp() {\r\n Intent intent = new Intent(getApplicationContext(), SplashActivity.class);\r\n intent.addFlags(32768);\r\n intent.addFlags(268435456);\r\n startActivity(intent);\r\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n // if result code 100\n if (resultCode == 100) {\n // if result code 100 is received\n // means user edited/deleted player\n // reload this screen again\n Intent intent = getIntent();\n finish();\n startActivity(intent);\n }\n\n }",
"public void mo6083c() {\n Intent intent = new Intent(C3720a.this._context, GuidanceMenuActivity.class);\n C3720a.this.finish();\n C3720a.this.startActivity(intent);\n }",
"@Click(R.id.ivReturn)\n\tvoid toReturn() {\n\t\tfinish();\n\t}",
"public void Done(int seq) {\n // Your code here\n }",
"@Override\n public void onSuccess(Map<String, Object> retData) {\n startActivity(intent_main);\n }",
"@Override\n public void Resume() {\n\n }",
"@Override\n public void Resume() {\n\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n activeActivity();\n this.finish();\n }",
"public static String _activity_resume() throws Exception{\nreturn \"\";\n}",
"public static String _activity_resume() throws Exception{\nreturn \"\";\n}",
"public static String _activity_resume() throws Exception{\nreturn \"\";\n}",
"public static String _activity_resume() throws Exception{\nreturn \"\";\n}",
"@Override\n\tpublic void finish() {\n\t\tIntent data = new Intent();\n\t\t// Activity finished ok, return the data\n\t\t\n\t\t// TODO 2 put the data with the id returnValue\n\t\tdata.putExtra(RATING_OPTION, \"\"+rating.getProgress());\n\t\t\n\t\t// TODO 3 use setResult(RESULT_OK, intent);\n\t\t// to return the Intent to the application\n\t\tsetResult(RESULT_OK, data);\n\n\t\tsuper.finish();\n\t}",
"@Override\n public void onFinish(){\n Intent intent = new Intent(getBaseContext(), CodakActivity.class);\n startActivity(intent);\n }",
"@Override\r\n\tpublic void exitRequest() {\n\t\t\r\n\t}",
"@Override\n public void exitFirstRun() {\n FirstRunStatus.setFirstRunSkippedByPolicy(true);\n\n launchPendingIntentAndFinish();\n }",
"@Override\n\t\t\tpublic void onCancel() {\n\t\t\t\tfinish();\n\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tAcknowledgementPresentActivity.this.finish();\n\t\t\t}",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 0 && resultCode == 0) {\n Toast.makeText(context, \"Activity Created!\", Toast.LENGTH_SHORT).show();\n getActivitySessions(3);\n }\n }",
"public final synchronized void mo27290a() {\n if (!this.f24803c) {\n this.f24802b.finish();\n this.f24804d.cancel(false);\n this.f24803c = true;\n }\n }",
"@Override\n\tpublic boolean onKeyDown(int keyCode, KeyEvent event) {\n\t\t if (keyCode == KeyEvent.KEYCODE_BACK) {\n\t\t\t ManagerActivity.getAppManager().finishAllActivity();\n\t\t return true;\n\t\t }\n\t\t return super.onKeyDown(keyCode, event);\n\t}",
"@Override\n public void onBackPressed() {\n exit++;\n System.out.println(\"###############exit\" + exit);\n if (exit == 1) {\n start = System.currentTimeMillis();\n Toast.makeText(this, \"再点击退出\", Toast.LENGTH_SHORT).show();\n return;\n } else {\n end = System.currentTimeMillis();\n if (end - start < 3000) {\n//\t\t\t\tSystem.exit(0);\n//\t\t\t\tAppActivityManager.getAppManager().finishAllActivity();\n finish();\n } else {\n Toast.makeText(this, \"再点击退出\", Toast.LENGTH_SHORT).show();\n start = System.currentTimeMillis();\n return;\n }\n }\n }",
"@Override\n\t\t\tpublic void onComplete(Bundle values) {\n\n\t\t\t\tfinish();\n\t\t\t}",
"@Override\n protected void onRestart() {\n super.onRestart();\n MobclickAgent.onPageStart(\"ACGwenDangActivity\");\n MobclickAgent.onResume(this); // 统计时长\n }"
]
| [
"0.6474376",
"0.63567394",
"0.63173664",
"0.6248258",
"0.6242218",
"0.61979675",
"0.6135138",
"0.6113387",
"0.6091046",
"0.60708714",
"0.60462785",
"0.60086906",
"0.5964917",
"0.59586877",
"0.5919435",
"0.58931786",
"0.5787482",
"0.5787411",
"0.57769346",
"0.5751617",
"0.5738559",
"0.5737675",
"0.5730879",
"0.57191193",
"0.5717263",
"0.57166886",
"0.57051235",
"0.56987935",
"0.56759274",
"0.5666776",
"0.56572956",
"0.5642824",
"0.56404877",
"0.56346434",
"0.56270415",
"0.5625143",
"0.5621414",
"0.5614",
"0.5606892",
"0.55910116",
"0.5589274",
"0.558643",
"0.5586098",
"0.5583171",
"0.5579628",
"0.5566741",
"0.5564908",
"0.5559794",
"0.5544043",
"0.55358875",
"0.553533",
"0.55249566",
"0.5505329",
"0.548982",
"0.54834586",
"0.54710734",
"0.5465427",
"0.54518235",
"0.544973",
"0.54482603",
"0.5437487",
"0.5432807",
"0.5425784",
"0.54196066",
"0.54173684",
"0.5412817",
"0.54070586",
"0.5405681",
"0.54016787",
"0.5388109",
"0.5384447",
"0.5383224",
"0.5382767",
"0.53810906",
"0.5377719",
"0.53771466",
"0.53754723",
"0.53702235",
"0.5365064",
"0.53626865",
"0.53599393",
"0.5359807",
"0.53579414",
"0.53579414",
"0.5357508",
"0.53565115",
"0.53565115",
"0.53565115",
"0.53565115",
"0.5354694",
"0.535433",
"0.5349617",
"0.534672",
"0.53456783",
"0.5344218",
"0.533981",
"0.5335129",
"0.5322504",
"0.53224844",
"0.5320875",
"0.5318213"
]
| 0.0 | -1 |
/ String type = GetControlType(activeView); | public void UpdateTextStyle(ControlStyles style,TextView editText) {
try {
if(editText==null) {
editText = (EditText) base.activeView;
}
EditorControl tag= base.GetControlTag(editText);
if(style==ControlStyles.H1){
if(base.ContainsStyle(tag._ControlStyles, ControlStyles.H1)) {
editText.setTextSize(TypedValue.COMPLEX_UNIT_SP, base.NORMALTEXTSIZE);
tag= base.UpdateTagStyle(tag, ControlStyles.H1, Op.Delete);
tag= base.UpdateTagStyle(tag, ControlStyles.H2, Op.Delete);
tag= base.UpdateTagStyle(tag, ControlStyles.NORMAL, Op.Insert);
}else{
editText.setTextSize(TypedValue.COMPLEX_UNIT_SP, base.H1TEXTSIZE);
tag= base.UpdateTagStyle(tag, ControlStyles.H1, Op.Insert);
tag= base.UpdateTagStyle(tag, ControlStyles.H2, Op.Delete);
tag= base.UpdateTagStyle(tag, ControlStyles.NORMAL, Op.Delete);
}
}
else if(style==ControlStyles.H2){
if(base.ContainsStyle(tag._ControlStyles, ControlStyles.H2)) {
editText.setTextSize(TypedValue.COMPLEX_UNIT_SP, base.NORMALTEXTSIZE);
tag= base.UpdateTagStyle(tag, ControlStyles.H1, Op.Delete);
tag= base.UpdateTagStyle(tag, ControlStyles.H2, Op.Delete);
tag= base.UpdateTagStyle(tag, ControlStyles.NORMAL, Op.Insert);
}else{
editText.setTextSize(TypedValue.COMPLEX_UNIT_SP, base.H2TEXTSIZE);
tag= base.UpdateTagStyle(tag, ControlStyles.H1, Op.Delete);
tag= base.UpdateTagStyle(tag, ControlStyles.H2, Op.Insert);
tag= base.UpdateTagStyle(tag, ControlStyles.NORMAL, Op.Delete);
}
}
else if(style==ControlStyles.NORMAL){
editText.setTextSize(TypedValue.COMPLEX_UNIT_SP, base.NORMALTEXTSIZE);
tag= base.UpdateTagStyle(tag, ControlStyles.H1, Op.Delete);
tag= base.UpdateTagStyle(tag, ControlStyles.H2, Op.Delete);
if(!base.ContainsStyle(tag._ControlStyles, ControlStyles.NORMAL)) {
tag= base.UpdateTagStyle(tag, ControlStyles.NORMAL, Op.Insert);
}
}
else if(style==ControlStyles.BOLD){
if(base.ContainsStyle(tag._ControlStyles, ControlStyles.BOLD)) {
tag= base.UpdateTagStyle(tag, ControlStyles.BOLD, Op.Delete);
editText.setTypeface(null, Typeface.NORMAL);
}else if(base.ContainsStyle(tag._ControlStyles, ControlStyles.BOLDITALIC)){
tag= base.UpdateTagStyle(tag, ControlStyles.BOLDITALIC, Op.Delete);
tag= base.UpdateTagStyle(tag, ControlStyles.ITALIC, Op.Insert);
editText.setTypeface(null, Typeface.ITALIC);
}
else if(base.ContainsStyle(tag._ControlStyles, ControlStyles.ITALIC)){
tag= base.UpdateTagStyle(tag, ControlStyles.BOLDITALIC, Op.Insert);
tag= base.UpdateTagStyle(tag, ControlStyles.ITALIC, Op.Delete);
editText.setTypeface(null, Typeface.BOLD_ITALIC);
}else{
tag= base.UpdateTagStyle(tag, ControlStyles.BOLD, Op.Insert);
editText.setTypeface(null, Typeface.BOLD);
}
}
else if(style==ControlStyles.ITALIC){
if(base.ContainsStyle(tag._ControlStyles, ControlStyles.ITALIC)) {
tag= base.UpdateTagStyle(tag, ControlStyles.ITALIC, Op.Delete);
editText.setTypeface(null, Typeface.NORMAL);
}else if(base.ContainsStyle(tag._ControlStyles, ControlStyles.BOLDITALIC)){
tag= base.UpdateTagStyle(tag, ControlStyles.BOLDITALIC, Op.Delete);
tag= base.UpdateTagStyle(tag, ControlStyles.BOLD, Op.Insert);
editText.setTypeface(null, Typeface.BOLD);
}
else if(base.ContainsStyle(tag._ControlStyles, ControlStyles.BOLD)){
tag= base.UpdateTagStyle(tag, ControlStyles.BOLDITALIC, Op.Insert);
tag= base.UpdateTagStyle(tag, ControlStyles.BOLD, Op.Delete);
editText.setTypeface(null, Typeface.BOLD_ITALIC);
}else{
tag= base.UpdateTagStyle(tag, ControlStyles.ITALIC, Op.Insert);
editText.setTypeface(null, Typeface.ITALIC);
}
}
editText.setTag(tag);
}
catch (Exception e){
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getViewType();",
"Control getControl(String controlType);",
"String getViewClass();",
"public int getViewType()\n {\n return this.viewType;\n }",
"public String type();",
"private String determineViewTag() {\r\n\t\tif (viewTag == null) {\r\n\t\t\tviewTag = ClearCaseUtils.getViewTag(getViewPath(), getProject());\r\n\t\t}\r\n\t\treturn viewTag;\r\n\t}",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"String type();",
"org.landxml.schema.landXML11.TrafficControlType.Enum getControlType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"RunControlType getRunControl();",
"public void _getDiagramType() {\n result = true;\n\n String stype = oObj.getDiagramType();\n log.println(\"Current Diagram Type is \" + stype);\n result = (stype.startsWith(\"com.sun.star.chart.\"));\n\n tRes.tested(\"getDiagramType()\", result);\n }",
"private String getType(){\r\n return type;\r\n }",
"public final native String getType() /*-{\n return this.getType();\n }-*/;",
"int getType(){\n return type;\n }",
"Act getCDAType();",
"int getType();",
"int getType();",
"int getType();",
"int getType();",
"int getType();",
"int getType();",
"int getType();",
"int getType();",
"ComponentTypes.AccessPoint getType();",
"PlotControlType getPlotControl();",
"public int getViewTypeCount()\n {\n return 2;\n }",
"public int getType();",
"public int getType();",
"public int getType();",
"public int getType();",
"public int getType();",
"public int Gettype(){\n\t\treturn type;\n\t}",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public abstract String getType();",
"public abstract String getType();",
"public abstract String getType();",
"public abstract String getType();",
"public abstract String getType();",
"public abstract String getType();",
"public abstract String getType();",
"public abstract String getType();",
"public int getType(){\n return type;\n }",
"public DisplayType getDisplayType();",
"private String getType( )\n\t{\n\t\treturn this.getModuleName( ) + \"$\" + this.getSimpleName( ) + \"$\" + this.getSystem( );\n\t}",
"public ViewObjectImpl gettype1() {\n return (ViewObjectImpl)findViewObject(\"type1\");\n }",
"public int getType() { return type; }"
]
| [
"0.759967",
"0.6998019",
"0.66785645",
"0.6499466",
"0.60153025",
"0.60110015",
"0.5986091",
"0.5986091",
"0.5986091",
"0.5986091",
"0.5986091",
"0.5986091",
"0.5986091",
"0.5986091",
"0.5986091",
"0.5986091",
"0.5986091",
"0.5986091",
"0.5986091",
"0.5986091",
"0.5986091",
"0.5986091",
"0.5986091",
"0.5986091",
"0.5986091",
"0.5986091",
"0.59672016",
"0.5961986",
"0.5961986",
"0.5961986",
"0.5961986",
"0.5961986",
"0.5961986",
"0.5961986",
"0.5961986",
"0.5961986",
"0.5961986",
"0.5961986",
"0.5961986",
"0.5961986",
"0.5961986",
"0.5961986",
"0.5961986",
"0.5961986",
"0.5961986",
"0.5961986",
"0.5961986",
"0.5961986",
"0.5961986",
"0.5961986",
"0.5961986",
"0.5961986",
"0.59465736",
"0.59463924",
"0.59445834",
"0.59359884",
"0.5930044",
"0.5927615",
"0.5916118",
"0.5916118",
"0.5916118",
"0.5916118",
"0.5916118",
"0.5916118",
"0.5916118",
"0.5916118",
"0.5896453",
"0.5878926",
"0.5779121",
"0.57719994",
"0.57719994",
"0.57719994",
"0.57719994",
"0.57719994",
"0.5770338",
"0.5745682",
"0.5745682",
"0.5745682",
"0.5745682",
"0.5745682",
"0.5745682",
"0.5745682",
"0.5745682",
"0.5745682",
"0.5745682",
"0.5745682",
"0.5745682",
"0.5745682",
"0.57387406",
"0.57387406",
"0.57387406",
"0.57387406",
"0.57387406",
"0.57387406",
"0.57387406",
"0.57387406",
"0.5721637",
"0.5715835",
"0.5708276",
"0.57055515",
"0.5697663"
]
| 0.0 | -1 |
/ / Relation with other types / | @Override
public final boolean isReferenceType() {
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface One extends RelationQuantifier\n{\n}",
"RelatedPerson<Person, Person> relatePerson(String person1, String person2, String relation);",
"public interface Type<SomeType extends Type<SomeType, SomeThing>,\n SomeThing extends Thing<SomeThing, SomeType>>\n extends SchemaConcept<SomeType> {\n\n @Deprecated\n @CheckReturnValue\n @Override\n default Type<SomeType, SomeThing> asType() {\n return this;\n }\n\n @Override\n Remote<SomeType, SomeThing> asRemote(GraknClient.Transaction tx);\n\n @Deprecated\n @CheckReturnValue\n @Override\n default boolean isType() {\n return true;\n }\n\n interface Local<\n SomeType extends Type<SomeType, SomeThing>,\n SomeThing extends Thing<SomeThing, SomeType>>\n extends SchemaConcept.Local<SomeType>, Type<SomeType, SomeThing> {\n }\n\n /**\n * A Type represents any ontological element in the graph.\n * Types are used to model the behaviour of Thing and how they relate to each other.\n * They also aid in categorising Thing to different types.\n */\n interface Remote<\n SomeRemoteType extends Type<SomeRemoteType, SomeRemoteThing>,\n SomeRemoteThing extends Thing<SomeRemoteThing, SomeRemoteType>>\n extends SchemaConcept.Remote<SomeRemoteType>, Type<SomeRemoteType, SomeRemoteThing> {\n\n //------------------------------------- Modifiers ----------------------------------\n\n /**\n * Changes the Label of this Concept to a new one.\n *\n * @param label The new Label.\n * @return The Concept itself\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> label(Label label);\n\n /**\n * Sets the Type to be abstract - which prevents it from having any instances.\n *\n * @param isAbstract Specifies if the concept is to be abstract (true) or not (false).\n * @return The concept itself\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> isAbstract(Boolean isAbstract);\n\n /**\n * @param role The Role Type which the instances of this Type are allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> plays(Role role);\n\n /**\n * Creates a RelationType which allows this type and a AttributeType to be linked in a strictly one-to-one mapping.\n *\n * @param attributeType The AttributeType which instances of this type should be allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> key(AttributeType<?> attributeType);\n\n /**\n * Creates a RelationType which allows this type and a AttributeType to be linked.\n *\n * @param attributeType The AttributeType which instances of this type should be allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> has(AttributeType<?> attributeType);\n\n //------------------------------------- Accessors ---------------------------------\n\n /**\n * @return A list of Role Types which instances of this Type can indirectly play.\n */\n Stream<Role.Remote> playing();\n\n /**\n * @return The AttributeTypes which this Type is linked with.\n */\n @CheckReturnValue\n Stream<? extends AttributeType.Remote<?>> attributes();\n\n /**\n * @return The AttributeTypes which this Type is linked with as a key.\n */\n @CheckReturnValue\n Stream<? extends AttributeType.Remote<?>> keys();\n\n /**\n * @return All the the super-types of this Type\n */\n @Override\n Stream<? extends Type.Remote<SomeRemoteType, SomeRemoteThing>> sups();\n\n /**\n * Get all indirect sub-types of this type.\n * The indirect sub-types are the type itself and all indirect sub-types of direct sub-types.\n *\n * @return All the indirect sub-types of this Type\n */\n @Override\n @CheckReturnValue\n Stream<? extends Type.Remote<SomeRemoteType, SomeRemoteThing>> subs();\n\n /**\n * Get all indirect instances of this type.\n * The indirect instances are the direct instances and all indirect instances of direct sub-types.\n *\n * @return All the indirect instances of this type.\n */\n @CheckReturnValue\n Stream<? extends Thing.Remote<SomeRemoteThing, SomeRemoteType>> instances();\n\n /**\n * Return if the type is set to abstract.\n * By default, types are not abstract.\n *\n * @return returns true if the type is set to be abstract.\n */\n @CheckReturnValue\n Boolean isAbstract();\n\n //------------------------------------- Other ----------------------------------\n\n /**\n * Removes the ability of this Type to play a specific Role\n *\n * @param role The Role which the Things of this Type should no longer be allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> unplay(Role role);\n\n /**\n * Removes the ability for Things of this Type to have Attributes of type AttributeType\n *\n * @param attributeType the AttributeType which this Type can no longer have\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> unhas(AttributeType<?> attributeType);\n\n /**\n * Removes AttributeType as a key to this Type\n *\n * @param attributeType the AttributeType which this Type can no longer have as a key\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> unkey(AttributeType<?> attributeType);\n\n @Deprecated\n @CheckReturnValue\n @Override\n default Type.Remote<SomeRemoteType, SomeRemoteThing> asType() {\n return this;\n }\n\n @Deprecated\n @CheckReturnValue\n @Override\n default boolean isType() {\n return true;\n }\n }\n}",
"public interface CollectionField extends RelationField {\n\n}",
"Relation createRelation();",
"public interface PartOfRelation\r\n{\r\n\r\n\t/**\r\n\t * Sets author\r\n\t * \r\n\t * @param author\r\n\t */\r\n\tvoid setAuthor(String author);\r\n\r\n\r\n\t/**\r\n\t * @return Author\r\n\t */\r\n\tString getAuthor();\r\n\r\n\t/**\r\n\t * Sets class type, one typical value is '300'\r\n\t * \r\n\t * @param classType\r\n\t */\r\n\tvoid setClassType(String classType);\r\n\r\n\t/**\r\n\t * @return class type\r\n\t */\r\n\tString getClassType();\r\n\r\n\t/**\r\n\t * Sets object key, for material items this is the product ID.\r\n\t * \r\n\t * @param objectKey\r\n\t */\r\n\tvoid setObjectKey(String objectKey);\r\n\r\n\t/**\r\n\t * @return Object key.\r\n\t */\r\n\tString getObjectKey();\r\n\r\n\t/**\r\n\t * Sets object type, product or an abstract product representative\r\n\t * \r\n\t * @param objectType\r\n\t */\r\n\tvoid setObjectType(String objectType);\r\n\r\n\t/**\r\n\t * @return Object type\r\n\t */\r\n\tString getObjectType();\r\n\r\n\t/**\r\n\t * Sets position in the BOM\r\n\t * \r\n\t * @param posNr\r\n\t */\r\n\tvoid setPosNr(String posNr);\r\n\r\n\t/**\r\n\t * @return Position number\r\n\t */\r\n\tString getPosNr();\r\n\r\n\t/**\r\n\t * Sets parent instance ID\r\n\t * \r\n\t * @param parentInstId\r\n\t */\r\n\tvoid setParentInstId(String parentInstId);\r\n\r\n\t/**\r\n\t * @return Parent instance ID\r\n\t */\r\n\tString getParentInstId();\r\n\r\n\t/**\r\n\t * Sets child instance ID\r\n\t * \r\n\t * @param instId\r\n\t */\r\n\tvoid setInstId(String instId);\r\n\r\n\t/**\r\n\t * @return Child instance ID\r\n\t */\r\n\tString getInstId();\r\n}",
"public interface RelationsType {\n\n int OBSERVERS = 1;\n int FANS = 2;\n int FRIENDS = 3;\n\n}",
"public RelationIsA() {\r\n\t\tsuper();\r\n\t}",
"public static interface Relation {\n\t\t//some relations are read-only\n\t\tpublic boolean isWriteable();\n\n\t\tpublic String getName();\n\n\t\t/**\n\t\t* Get the model for the relation. This will return a blank tuple, which will show\n\t\t* the ordered list of columns and the type for each. This is basically metadata.\n\t\t*/\n\t\tpublic Tuple getModel();\n\n\t\t/**\n\t\t* Get the number of rows (Tuples) in the relation.\n\t\t*/\n\t\tpublic int getRows();\n\n\t\t//----------------------------\n\t\t//operations on a Relation\n\t\t/**\n\t\t* projection narrows the number of columns in a relation.\n\t\t* This is the part of an sql statement that list the columns, e.g.\n\t\t*\tSELECT firstname,lastname FROM contact.\n\t\t* The contact table has a lot columns that these, but we only need these\n\t\t* two.\n\t\t*/\n\t\tpublic Relation project(Tuple t) throws RelationException;\n\n\t\t/**\n\t\t* Select narrows the number of rows returned.\n\t\t*/\n\t\tpublic Relation select(Condition c) throws RelationException;\n\n\t\t/**\n\t\t* Join this relation with another one based on the condition, and give it a name.\n\t\t* The implementation of this is complicated, because it must also create a dynamic\n\t\t* Tuple\n\t\t*/\n\t\tpublic Relation join(Relation r, Condition c, String name) throws RelationException;\n\t\t//-------------------------------\n\n\t\t/**\n\t\t* A cursor is the equivalent of a ResultSet. There may be different types\n\t\t* of Cursors depending on if this is coming directly from the database\n\t\t* or from a derived relation.\n\t\t*/\n\t\tpublic Cursor getCursor() throws RelationException;\n\n\t\t//-------------------------------\n\t\t//change data in the relation\n\t\t//I had this as part of Transaction, but I guess it belongs here.\n\t\t/**\n\t\t* Insert a Tuple into the relation. This may fail for various reasons\n\t\t* including IO problems, invalid transaction state, or constraint violations.\n\t\t* Or if the relation is read-only\n\t\t*/\n\t\tpublic Key insert(Transaction tx,Tuple t) throws RelationException;\n\n\t\t/**\n\t\t* Get the tuple that you just inserted by the Key\n\t\t*/\n\t\tpublic Tuple get(Key k) throws RelationException;\n\n\t\t/**\n\t\t* Update the relation with changed data in the Tuple.\n\t\t* The old data is stored in the _audit table.\n\t\t*/\n\t\tpublic void update(Transaction tx,Tuple old, Tuple nu) throws RelationException;\n\n\t\t/**\n\t\t* Delete the object. Must provide old state of object before doing so, so it\n\t\t* can be audited.\n\t\t*/\n\t\tpublic void delete(Transaction tx,Tuple old) throws RelationException;\n\n\t}",
"@Override\n\t\tpublic Relationship createRelationshipTo(Node otherNode, RelationshipType type) {\n\t\t\treturn null;\n\t\t}",
"public interface HasRelation {\r\n\r\n\tpublic boolean addRelation(Relation relation);\r\n\tpublic boolean removeRelation(Relation relation);\r\n\tpublic List<Relation> getRelations();\r\n}",
"interface Remote<\n SomeRemoteType extends Type<SomeRemoteType, SomeRemoteThing>,\n SomeRemoteThing extends Thing<SomeRemoteThing, SomeRemoteType>>\n extends SchemaConcept.Remote<SomeRemoteType>, Type<SomeRemoteType, SomeRemoteThing> {\n\n //------------------------------------- Modifiers ----------------------------------\n\n /**\n * Changes the Label of this Concept to a new one.\n *\n * @param label The new Label.\n * @return The Concept itself\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> label(Label label);\n\n /**\n * Sets the Type to be abstract - which prevents it from having any instances.\n *\n * @param isAbstract Specifies if the concept is to be abstract (true) or not (false).\n * @return The concept itself\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> isAbstract(Boolean isAbstract);\n\n /**\n * @param role The Role Type which the instances of this Type are allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> plays(Role role);\n\n /**\n * Creates a RelationType which allows this type and a AttributeType to be linked in a strictly one-to-one mapping.\n *\n * @param attributeType The AttributeType which instances of this type should be allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> key(AttributeType<?> attributeType);\n\n /**\n * Creates a RelationType which allows this type and a AttributeType to be linked.\n *\n * @param attributeType The AttributeType which instances of this type should be allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> has(AttributeType<?> attributeType);\n\n //------------------------------------- Accessors ---------------------------------\n\n /**\n * @return A list of Role Types which instances of this Type can indirectly play.\n */\n Stream<Role.Remote> playing();\n\n /**\n * @return The AttributeTypes which this Type is linked with.\n */\n @CheckReturnValue\n Stream<? extends AttributeType.Remote<?>> attributes();\n\n /**\n * @return The AttributeTypes which this Type is linked with as a key.\n */\n @CheckReturnValue\n Stream<? extends AttributeType.Remote<?>> keys();\n\n /**\n * @return All the the super-types of this Type\n */\n @Override\n Stream<? extends Type.Remote<SomeRemoteType, SomeRemoteThing>> sups();\n\n /**\n * Get all indirect sub-types of this type.\n * The indirect sub-types are the type itself and all indirect sub-types of direct sub-types.\n *\n * @return All the indirect sub-types of this Type\n */\n @Override\n @CheckReturnValue\n Stream<? extends Type.Remote<SomeRemoteType, SomeRemoteThing>> subs();\n\n /**\n * Get all indirect instances of this type.\n * The indirect instances are the direct instances and all indirect instances of direct sub-types.\n *\n * @return All the indirect instances of this type.\n */\n @CheckReturnValue\n Stream<? extends Thing.Remote<SomeRemoteThing, SomeRemoteType>> instances();\n\n /**\n * Return if the type is set to abstract.\n * By default, types are not abstract.\n *\n * @return returns true if the type is set to be abstract.\n */\n @CheckReturnValue\n Boolean isAbstract();\n\n //------------------------------------- Other ----------------------------------\n\n /**\n * Removes the ability of this Type to play a specific Role\n *\n * @param role The Role which the Things of this Type should no longer be allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> unplay(Role role);\n\n /**\n * Removes the ability for Things of this Type to have Attributes of type AttributeType\n *\n * @param attributeType the AttributeType which this Type can no longer have\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> unhas(AttributeType<?> attributeType);\n\n /**\n * Removes AttributeType as a key to this Type\n *\n * @param attributeType the AttributeType which this Type can no longer have as a key\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> unkey(AttributeType<?> attributeType);\n\n @Deprecated\n @CheckReturnValue\n @Override\n default Type.Remote<SomeRemoteType, SomeRemoteThing> asType() {\n return this;\n }\n\n @Deprecated\n @CheckReturnValue\n @Override\n default boolean isType() {\n return true;\n }\n }",
"public interface RelationTypeExtractor {\n String getType(RelationEval e, boolean isActual);\n}",
"public Relationship createRelationshipTo( Node otherNode, \n \t\tRelationshipType type );",
"@Override\r\n\tpublic Relation accept(Visitor v)\t\t{ return v.visit(this);\t\t\t\t\t\t\t}",
"public interface IRelationship<A extends IAttribute> extends IErdNode\n{\n\n /**\n * check the relationship, if the two connected entities are the same\n *\n * @return recursive\n */\n boolean isRecursive();\n\n /**\n * check if this relationship is a weak relationship\n * -> one of the entities is weak\n *\n * @return weak\n */\n boolean isWeakRelationship();\n\n /**\n * return the description of the relationship\n *\n * @return description\n */\n String getDescription();\n\n /**\n * create new attribute to relationship\n *\n * @param p_id name of the attribute\n * @param p_property of the attribute\n * @return self-reference\n */\n A createAttribute( @NonNull final String p_id, @Nonnull final String p_property );\n\n /**\n * get all connected attributes from the relationship in a map\n *\n * @return map with all attributes\n */\n Map<String, IAttribute> getConnectedAttributes();\n\n /**\n * connect entity incl. cardinality to the relationship\n *\n * @param p_entity name of the entity\n * @param p_cardinality cardinality\n * @return self-reference\n */\n IEntity<A> connectEntity( @NonNull final IEntity<IAttribute> p_entity, @NonNull final String p_cardinality );\n\n /**\n * return the connected entities in a map\n *\n * @return connected entities\n */\n Map<String, Collection<String>> getConnectedEntities();\n\n}",
"public abstract RelationDeclaration getRelation();",
"public interface IRelation {\n\n\t/**\n\t * Gets the negation of the relation.\n\t */\n\tRelation getNegation();\n}",
"public <E extends cn.vertxup.atom.domain.tables.interfaces.IMRelation> E into(E into);",
"public void addInheritanceRelation(InheritanceRelation relation);",
"EReference getRelationReference();",
"Type1Equivalent getType1Equivalent();",
"LinkRelation createLinkRelation();",
"public void addRelations(T model);",
"@Override\n\t\tpublic boolean hasRelationship(RelationshipType... types) {\n\t\t\treturn false;\n\t\t}",
"public void from(cn.vertxup.atom.domain.tables.interfaces.IMRelation from);",
"public void addRelation(String value) {\n/* 262 */ addStringToBag(\"relation\", value);\n/* */ }",
"Mapper<T, T2> relate(Customizable customizable);",
"@Override\n public Set<Edge<PhysicalObject>> getRelationBetweenObjects() {\n assert false : \"shouldn't call this method\";\n return null;\n }",
"public boolean assignableTo(Type other) throws LookupException;",
"ContextRelation getContextRelation();",
"@DISPID(1610940428) //= 0x6005000c. The runtime will prefer the VTID if present\n @VTID(34)\n Relations relations();",
"@Ignore\r\n @Test\r\n public void testSetType() {\r\n System.out.println(\"testSetType()\");\r\n Relation instance = new Relation(null, null);\r\n instance.setDirection(Relation.OUT);\r\n instance.setType(\"singer\");\r\n }",
"@Override\n\t\tpublic Iterable<RelationshipType> getRelationshipTypes() {\n\t\t\treturn null;\n\t\t}",
"public void setRelation(Relation<L, Tr, T> r) {\n this.relation = r;\n }",
"@NotNull\n DfType join(@NotNull DfType other);",
"public String toStringWithRelation();",
"public CaseClassRelation (scala.collection.Seq<A> data, scala.reflect.api.TypeTags.TypeTag<A> evidence$3) { throw new RuntimeException(); }",
"public Set<RelationType> getRelationTypes();",
"public void onRelationshipChanged();",
"@Override\n public void addRelationshipBetweenPhysicalAndPhysical(PhysicalObject physicalObjectA,\n PhysicalObject physicalObjectB, double weight) {\n assert false : \"shouldn't call this method\";\n }",
"public interface Equality extends Clause {}",
"public String getType() {\n return relationshipName;\n }",
"@Override\n public abstract boolean isAssignableBy(TypeUsage other);",
"boolean hasRelation();",
"private void mapValuesUpdateRelationship(EntityRelationshipType entityRelationshipType,\n\t\t\tEntityRelationshipType relation) {\n\t\tentityRelationshipType.setEntityRelationshiptypeId(relation.getEntityRelationshiptypeId());\n\t\tentityRelationshipType.setEntityId1(relation.getEntityId1());\n\t\tentityRelationshipType.setEntityId2(relation.getEntityId2());\n\t}",
"public void addRelation(AS otherAS, int myRelationToThem) {\n if (myRelationToThem == AS.PROVIDER_CODE) {\n this.customers.add(otherAS);\n otherAS.providers.add(this);\n } else if (myRelationToThem == AS.PEER_CODE) {\n this.peers.add(otherAS);\n otherAS.peers.add(this);\n } else if (myRelationToThem == AS.CUSTOMER_CODE) {\n this.providers.add(otherAS);\n otherAS.customers.add(this);\n } else if (myRelationToThem == 3) {\n // ignore\n } else {\n System.err.println(\"WTF bad relation: \" + myRelationToThem);\n System.exit(-1);\n }\n this.trafficOverNeighbors.put(otherAS.asn, 0.0);\n otherAS.trafficOverNeighbors.put(this.asn, 0.0);\n this.volatileTraffic.put(otherAS.asn, 0.0);\n otherAS.volatileTraffic.put(this.asn, 0.0);\n this.botTraffic.put(otherAS.asn, 0.0);\n otherAS.botTraffic.put(this.asn, 0.0);\n this.currentVolatileTraffic.put(otherAS.asn, 0.0);\n otherAS.currentVolatileTraffic.put(this.asn, 0.0);\n this.linkCapacities.put(otherAS.asn, new HashMap<Double, Double>());\n otherAS.linkCapacities.put(this.asn, new HashMap<Double, Double>());\n }",
"Relationship createRelationship();",
"void relationshipCreate( long id, int typeId, long startNodeId,\n long endNodeId );",
"public ResultMap<BaseNode> queryRelatives(QName type, Direction direction, ObjectNode query);",
"@Test\n\tpublic void testInternalEntityRelatedTypes() {\n\t\tlogger.info(\"Run testInternalEntityRelatedTypes\");\n\t\tfinal IntrospectionResult introspection = getIntrospection();\n\n\t\t// Entity1InputType\n\t\tfinal IntrospectionFullType entity1InputType = getFullType(introspection,\n\t\t\t\tEntity1.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix());\n\t\tAssert.assertEquals(27, entity1InputType.getInputFields().size());\n\n\t\tassertInputField(entity1InputType, \"id\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t\tassertInputField(entity1InputType, \"intAttr\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLInt.getName());\n\t\tassertInputField(entity1InputType, \"longAttr\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLLong.getName());\n\t\tassertInputField(entity1InputType, \"doubleAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLFloat.getName());\n\t\tassertInputField(entity1InputType, \"stringAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLString.getName());\n\t\tassertInputField(entity1InputType, \"booleanAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLBoolean.getName());\n\t\tassertInputField(entity1InputType, \"bigIntAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLBigInteger.getName());\n\t\tassertInputField(entity1InputType, \"bigDecimalAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLBigDecimal.getName());\n\t\tassertInputField(entity1InputType, \"bytesAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLByte.getName());\n\t\tassertInputField(entity1InputType, \"shortAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLShort.getName());\n\t\tassertInputField(entity1InputType, \"charAttr\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLChar.getName());\n\t\tassertInputField(entity1InputType, \"dateAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tGQLJavaScalars.GraphQLDate.getName());\n\t\tassertInputField(entity1InputType, \"fileAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tGQLJavaScalars.GraphQLFile.getName());\n\t\tassertInputField(entity1InputType, \"localDateAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tGQLJavaScalars.GraphQLLocalDate.getName());\n\t\tassertInputField(entity1InputType, \"localDateTimeAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tGQLJavaScalars.GraphQLLocalDateTime.getName());\n\t\tassertInputField(entity1InputType, \"instantAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tGQLJavaScalars.GraphQLInstant.getName());\n\n\t\tassertInputField(entity1InputType, \"stringList\", IntrospectionTypeKindEnum.LIST,\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\t\tassertInputField(entity1InputType, \"stringSet\", IntrospectionTypeKindEnum.LIST,\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\n\t\tassertInputField(entity1InputType, \"stringList\", IntrospectionTypeKindEnum.LIST,\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\t\tassertInputField(entity1InputType, \"stringSet\", IntrospectionTypeKindEnum.LIST,\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\n\t\tassertInputField(entity1InputType, \"enumAttr\", IntrospectionTypeKindEnum.ENUM, Enum1.class.getSimpleName());\n\n\t\tassertInputField(entity1InputType, \"enumList\", IntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.ENUM,\n\t\t\t\tEnum1.class);\n\t\tassertInputField(entity1InputType, \"enumSet\", IntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.ENUM,\n\t\t\t\tEnum1.class);\n\n\t\tassertInputField(entity1InputType, \"entity2\" + schemaConfig.getAttributeIdSuffix(),\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t\tassertInputField(entity1InputType, \"entity3\" + schemaConfig.getAttributeIdPluralSuffix(),\n\t\t\t\tIntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t\tassertInputField(entity1InputType, \"entity4\" + schemaConfig.getAttributeIdPluralSuffix(),\n\t\t\t\tIntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\n\t\tassertInputField(entity1InputType, \"embeddedData1\", IntrospectionTypeKindEnum.INPUT_OBJECT,\n\t\t\t\tEmbeddedData1.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix());\n\t\tassertInputField(entity1InputType, \"embeddedData1s\", IntrospectionTypeKindEnum.LIST,\n\t\t\t\tIntrospectionTypeKindEnum.INPUT_OBJECT,\n\t\t\t\tEmbeddedData1.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix());\n\n\t\t// Entity1LoadResult\n\t\tfinal IntrospectionFullType entity1LoadResult = getFullType(introspection,\n\t\t\t\tEntity1.class.getSimpleName() + schemaConfig.getQueryGetListOutputTypeNameSuffix());\n\t\tAssert.assertEquals(3, entity1LoadResult.getFields().size());\n\n\t\tassertField(entity1LoadResult, \"data\", IntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.OBJECT,\n\t\t\t\tEntity1.class.getSimpleName());\n\t\tassertField(entity1LoadResult, \"orderBy\", IntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.OBJECT,\n\t\t\t\tgetOrderByOutputTypeName());\n\t\tassertField(entity1LoadResult, \"paging\", IntrospectionTypeKindEnum.OBJECT, getPagingOutputTypeName());\n\n\t\t// Entity2InputType\n\t\tfinal IntrospectionFullType entity2InputType = getFullType(introspection,\n\t\t\t\tEntity2.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix());\n\t\tAssert.assertEquals(2, entity2InputType.getInputFields().size());\n\n\t\tassertInputField(entity2InputType, \"id\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t\tassertInputField(entity2InputType, \"entity1\" + schemaConfig.getAttributeIdPluralSuffix(),\n\t\t\t\tIntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\n\t\t// Entity2LoadResult\n\t\tfinal IntrospectionFullType entity2LoadResult = getFullType(introspection,\n\t\t\t\tEntity2.class.getSimpleName() + schemaConfig.getQueryGetListOutputTypeNameSuffix());\n\t\tAssert.assertEquals(3, entity2LoadResult.getFields().size());\n\n\t\tassertField(entity2LoadResult, \"data\", IntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.OBJECT,\n\t\t\t\tEntity2.class.getSimpleName());\n\t\tassertField(entity2LoadResult, \"orderBy\", IntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.OBJECT,\n\t\t\t\tgetOrderByOutputTypeName());\n\t\tassertField(entity2LoadResult, \"paging\", IntrospectionTypeKindEnum.OBJECT, getPagingOutputTypeName());\n\n\t\t// Entity3InputType\n\t\tfinal IntrospectionFullType entity3InputType = getFullType(introspection,\n\t\t\t\tEntity3.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix());\n\t\tAssert.assertEquals(2, entity3InputType.getInputFields().size());\n\n\t\tassertInputField(entity3InputType, \"id\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t\tassertInputField(entity3InputType, \"entity1\" + schemaConfig.getAttributeIdSuffix(),\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\n\t\t// Entity4InputType\n\t\tfinal IntrospectionFullType entity4InputType = getFullType(introspection,\n\t\t\t\tEntity4.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix());\n\t\tAssert.assertEquals(2, entity4InputType.getInputFields().size());\n\n\t\tassertInputField(entity4InputType, \"id\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t\tassertInputField(entity4InputType, \"entity1\" + schemaConfig.getAttributeIdPluralSuffix(),\n\t\t\t\tIntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t}",
"public Relation(String relationString, EnumSet<Aspects> fixes,\n MinecraftObject obj, ImmutableList<MinecraftObject> otherob) {\n this.fixes = fixes;\n this.relationString = relationString;\n this.obj = obj;\n this.otherobj = otherob;\n }",
"public interface IEntry extends IRelation {\r\n\r\n String getJoinColumnName();\r\n\r\n\r\n void setJoinColumnName(String joinColumnName);\r\n\r\n\r\n String getJoinAttributeName();\r\n\r\n\r\n void setJoinAttributeName(String joinAttributeName);\r\n\r\n\r\n String getJoinEntityIdentifier();\r\n\r\n\r\n void setJoinEntityIdentifier(String joinEntityIdentifier);\r\n\r\n \r\n Entity getJoinEntity();\r\n}",
"public Rule typeAndOrId()\n \t{\n \t\treturn firstOf(sequence(type(), id()), type()/*, id()*/);\n \t}",
"@Override\n\t\tpublic boolean hasRelationship(RelationshipType type, Direction dir) {\n\t\t\treturn false;\n\t\t}",
"public void relate(HNode id, Object o);",
"@Override\n\t\tpublic Relationship getSingleRelationship(RelationshipType type, Direction dir) {\n\t\t\treturn null;\n\t\t}",
"public RelationObject(String relation, EVAnnotation relatum) {\n\t\tthis.relation = relation;\n\t\tthis.relatum = relatum;\n\t}",
"public interface EffectFullType extends Type\n{\n}",
"void addRelation(IViewRelation relation);",
"public void addRelationship(String fm_field, String fm_symbol_str, boolean fm_typed,\n String to_field, String to_symbol_str, boolean to_typed, \n String style_str, boolean ignore_ns, boolean built_in) {\n addRelationship(fm_field, fm_symbol_str, fm_typed, to_field, to_symbol_str, to_typed, style_str, ignore_ns, built_in, null); }",
"public T caseSubtypeRelationshipDefinition(SubtypeRelationshipDefinition object) {\n\t\treturn null;\n\t}",
"public SpatialRelationBlock(int addr, TOP_Type type) {\n\t\tsuper(addr, type);\n\t\treadObject();\n\t}",
"public Relation(String relationString, MinecraftObject obj,\n ImmutableList<MinecraftObject> otherob) {\n this(relationString, EnumSet.noneOf(Aspects.class), obj, otherob);\n }",
"Relationship(final String id, final String type, final String target) {\r\n this.id = id;\r\n this.type = type;\r\n this.target = target;\r\n }",
"protected void fillValueInOneToManyRel(Object value)\r\n\t{\r\n\t}",
"@rdf(SIOC.USERACCOUNT)\npublic interface User extends Thing {\n @rdf(SIOC.ID)\n String getId();\n\n void setId(String id);\n\n @rdf(SIOC.ACCOUNT_OF)\n Agent getAccountOf();\n\n void setAccountOf(Agent accountOf);\n}",
"Relations getGroupOfRelations();",
"public interface Generic extends Reference\n{\n}",
"public abstract void setType();",
"protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) {\r\n }",
"public abstract String getObjectType();",
"public static boolean isRelationshipElementType(IElementType type) {\r\n\t\tboolean result = false;\r\n\t\tEClass eclass = type.getEClass();\r\n\t\tif (UMLPackage.Literals.RELATIONSHIP.isSuperTypeOf(eclass)\r\n\t\t\t\t|| UMLPackage.Literals.CONNECTOR.isSuperTypeOf(eclass)) {\r\n\t\t\tresult = true;\r\n\t\t}\r\n\t\t\r\n\t\treturn result;\r\n\t}",
"public interface RoadRailVehicle extends RailVehicle, RoadVehicle {\n\n\n\n}",
"TypeAssociation getEstRapporteeParRapport();",
"@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic Iterable<Relationship> getRelationships(RelationshipType... types) {\n\t\t\treturn null;\n\t\t}",
"private void toRent() {\n }",
"@Override\r\n public void accept(IPropertyValueVisitor visitor) {\r\n // relations\r\n _acceptList(cleon.architecturemethods.systemarc42.metamodel.spec._08_concepts.services.javamodel.IPortService.class, cleon.architecturemethods.systemarc42.metamodel.spec._08_concepts.access.AccessPackage.AccessCommunicationType_servicesForAccess, visitor);\r\n _acceptSingle(ch.actifsource.core.javamodel.IClass.class, ch.actifsource.core.CorePackage.Resource_typeOf, visitor);\r\n }",
"Object getROIs();",
"public T caseRelationAdded(RelationAdded object) {\n\t\treturn null;\n\t}",
"@Override\n\t\tpublic Iterable<Relationship> getRelationships(RelationshipType type, Direction dir) {\n\t\t\treturn null;\n\t\t}",
"String getReferenceType();",
"public Iterable<Relationship> getRelationships( RelationshipType... type );",
"public interface DerivedType extends EObject {\r\n}",
"public T caseRegularRelationshipDefinition(RegularRelationshipDefinition object) {\n\t\treturn null;\n\t}",
"boolean isOneToMany();",
"public interface Facet extends Linkable {\r\n public String getId();\r\n public String getLabel();\r\n public List<FacetValue> getValues();\r\n}",
"public static void main(String[] args) {\n\n A ab = new B();\n A ac = new C();\n C c = new C();\n C2 c2 = new C2();\n// ab = (C) ab;\n// ac = (B) ac;\n\n }",
"public interface DataMatchmaker {\n \n /**\n * Handles a {@link Data} instance that is not in an relationship.\n * @param data {@link Data}\n */\n void bachelor(Data data);\n \n /**\n * Matches a {@link Data} instance that wants to be in a relationship.\n * @param data {@link DataRelationship}\n */\n void match(DataRelationship data);\n \n /**\n * Handles legal issues when data instances hop from one relationship to another.\n * @param oldVows {@link DataRelationship}\n * @param newVows {@link DataRelationship}\n */\n void revow(DataRelationship oldVows, DataRelationship newVows);\n \n /**\n * Handles ugly break-ups when a relationship dies.\n * @param data {@link DataRelationship}\n */\n void separate(DataRelationship data);\n\n}",
"public interface RuleRefableBase extends org.semanticwb.model.Referensable\r\n{\r\n /**\r\n * Referencia a un objeto de tipo Rule \r\n */\r\n public static final org.semanticwb.platform.SemanticClass swb_RuleRef=org.semanticwb.SWBPlatform.getSemanticMgr().getVocabulary().getSemanticClass(\"http://www.semanticwebbuilder.org/swb4/ontology#RuleRef\");\r\n public static final org.semanticwb.platform.SemanticProperty swb_hasRuleRef=org.semanticwb.SWBPlatform.getSemanticMgr().getVocabulary().getSemanticProperty(\"http://www.semanticwebbuilder.org/swb4/ontology#hasRuleRef\");\r\n public static final org.semanticwb.platform.SemanticProperty swb_notInheritRuleRef=org.semanticwb.SWBPlatform.getSemanticMgr().getVocabulary().getSemanticProperty(\"http://www.semanticwebbuilder.org/swb4/ontology#notInheritRuleRef\");\r\n public static final org.semanticwb.platform.SemanticProperty swb_andEvalRuleRef=org.semanticwb.SWBPlatform.getSemanticMgr().getVocabulary().getSemanticProperty(\"http://www.semanticwebbuilder.org/swb4/ontology#andEvalRuleRef\");\r\n /**\r\n * Interfaz que define propiedades para elementos que pueden referencia a reglas \r\n */\r\n public static final org.semanticwb.platform.SemanticClass swb_RuleRefable=org.semanticwb.SWBPlatform.getSemanticMgr().getVocabulary().getSemanticClass(\"http://www.semanticwebbuilder.org/swb4/ontology#RuleRefable\");\r\n\r\n public org.semanticwb.model.GenericIterator<org.semanticwb.model.RuleRef> listRuleRefs();\r\n public boolean hasRuleRef(org.semanticwb.model.RuleRef value);\r\n public org.semanticwb.model.GenericIterator<org.semanticwb.model.RuleRef> listInheritRuleRefs();\r\n\r\n /**\r\n * Adds the RuleRef\r\n * @param value An instance of org.semanticwb.model.RuleRef\r\n */\r\n public void addRuleRef(org.semanticwb.model.RuleRef value);\r\n\r\n /**\r\n * Remove all the values for the property RuleRef\r\n */\r\n public void removeAllRuleRef();\r\n\r\n /**\r\n * Remove a value from the property RuleRef\r\n * @param value An instance of org.semanticwb.model.RuleRef\r\n */\r\n public void removeRuleRef(org.semanticwb.model.RuleRef value);\r\n\r\n/**\r\n* Gets the RuleRef\r\n* @return a instance of org.semanticwb.model.RuleRef\r\n*/\r\n public org.semanticwb.model.RuleRef getRuleRef();\r\n\r\n public boolean isNotInheritRuleRef();\r\n\r\n public void setNotInheritRuleRef(boolean value);\r\n\r\n public boolean isAndEvalRuleRef();\r\n\r\n public void setAndEvalRuleRef(boolean value);\r\n}",
"public T caseRelationshipDefinition(RelationshipDefinition object) {\n\t\treturn null;\n\t}",
"public RelationIsA(int id, Concept child, Concept parent) {\r\n\t\tsuper();\r\n\t\tm_id = id;\r\n\t\tm_name = IS_A;\r\n\t\tm_domain = child;\r\n\t\tm_range = parent;\r\n\t}",
"private Long getEntityRelationId(EntityRelationshipType eachRelation) {\n\t\treturn getRelationTypeId(eachRelation);\n\t}",
"public interface EHR_Entity extends Data_Entity {\r\n\r\n // Property http://www.owl-ontologies.com/unnamed.owl#agent_id\r\n String getAgent_id();\r\n\r\n RDFProperty getAgent_idProperty();\r\n\r\n boolean hasAgent_id();\r\n\r\n void setAgent_id(String newAgent_id);\r\n\r\n // Property http://www.owl-ontologies.com/unnamed.owl#object_ids\r\n Collection getObject_ids();\r\n\r\n RDFProperty getObject_idsProperty();\r\n\r\n boolean hasObject_ids();\r\n\r\n Iterator listObject_ids();\r\n\r\n void addObject_ids(String newObject_ids);\r\n\r\n void removeObject_ids(String oldObject_ids);\r\n\r\n void setObject_ids(Collection newObject_ids);\r\n\r\n // Property http://www.owl-ontologies.com/unnamed.owl#type\r\n String getType();\r\n\r\n RDFProperty getTypeProperty();\r\n\r\n boolean hasType();\r\n\r\n void setType(String newType);\r\n}",
"public abstract String getBelongsToPersonOrDepartment();",
"public interface LinkOpt extends Link {\n\n}",
"@Override\n public void addRelationshipBetweenCentralAndPhysical(PhysicalObject physicalObject,\n double weight) {\n assert false : \"shouldn't call this method\";\n }",
"TypeAssociationEXT getEstPourTypeMateriel();"
]
| [
"0.65695983",
"0.63555735",
"0.6136966",
"0.61128265",
"0.6022414",
"0.60143036",
"0.6001801",
"0.5980642",
"0.59744734",
"0.595658",
"0.58694524",
"0.58355534",
"0.5830556",
"0.57885104",
"0.5758969",
"0.57583815",
"0.5749657",
"0.5747971",
"0.5734713",
"0.5727795",
"0.57061374",
"0.5671284",
"0.5663565",
"0.5574776",
"0.5526113",
"0.54856026",
"0.5457059",
"0.54470277",
"0.544195",
"0.5409718",
"0.53787315",
"0.5355538",
"0.5338421",
"0.53158313",
"0.53125864",
"0.52984774",
"0.5290905",
"0.52827847",
"0.5258987",
"0.52336776",
"0.5228994",
"0.52142346",
"0.5211306",
"0.5203491",
"0.51940054",
"0.5187117",
"0.51797974",
"0.51784754",
"0.5175379",
"0.51750106",
"0.5161157",
"0.5156434",
"0.51539445",
"0.5151278",
"0.5147833",
"0.51457286",
"0.51423055",
"0.51415855",
"0.51252216",
"0.5122387",
"0.511139",
"0.51073426",
"0.5098389",
"0.5096819",
"0.50904864",
"0.50875086",
"0.5065438",
"0.5061706",
"0.505894",
"0.5057726",
"0.5051431",
"0.50468165",
"0.5046424",
"0.50394124",
"0.5039409",
"0.503395",
"0.503395",
"0.503395",
"0.5030374",
"0.50295216",
"0.50263584",
"0.50261754",
"0.5026051",
"0.50154907",
"0.501114",
"0.49980092",
"0.49876964",
"0.49815828",
"0.49674687",
"0.49645376",
"0.4963461",
"0.49573818",
"0.49551708",
"0.49536029",
"0.4950627",
"0.49495926",
"0.49494544",
"0.4948773",
"0.49458823",
"0.49425867",
"0.49415103"
]
| 0.0 | -1 |
/ / Downcasting / | @Override
public ResolvedReferenceType asReferenceType() {
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void cast() {\n\r\n\t}",
"@Override\n\tpublic void VisitCastNode(BunCastNode Node) {\n\n\t}",
"public static void main(String[] args) {\n\n// ChildPrint childPrint = new ChildPrint();\n// childPrint.printName();\n\n// ChildOverridingPrivate child = new ChildOverridingPrivate();\n// child.printName();\n\n ParentCasting parent = new ParentCasting();\n ChildCasting child = new ChildCasting();\n\n ParentCasting obj1 = new ChildCasting();\n ChildCasting obj2 = (ChildCasting) new ParentCasting();\n\n\n }",
"public void resetCastling() {\n this.castling = false;\n }",
"public static void main(String[] args) {\n\n A ab = new B();\n A ac = new C();\n C c = new C();\n C2 c2 = new C2();\n// ab = (C) ab;\n// ac = (B) ac;\n\n }",
"public Casts(){\n\t\t\n\t}",
"private void toRent() {\n }",
"@Override\n\tpublic void visit(CastExpression arg0) {\n\t\t\n\t}",
"public void removeAllcast() {\n\t\tif(this.cast != null)\n\t\t\tthis.cast.clear();\n\t}",
"public static void main(String[] args) {Car c = new Car();\n//\t\t\n//\t\tSystem.out.println(c.doors);\n//\t\tSystem.out.println(c.model);\n//\t\t\n\t\tSystem.out.println(\"=============================================\");\n\t\t\n\t\t\n\t\tCar c2 = new Car(5, 7, \"model x\", \"black\");\n\t\t\n\t\tSystem.out.println(c2.doors);\n\t\tSystem.out.println(c2.color);\n\t\t\n\t\tSystem.out.println(\"=============================================\");\n\t\t\n\t\tSportsCar s = new SportsCar(); \n\t\t\n\t\ts.drive();\n\t\tSystem.out.println(s.color);\n\t\t\n\t\tSportsCar s2 = new SportsCar(6, 9, \"RX-8\", \"Hot Pink\");\n\t\t\n\t\t\n\t\tSystem.out.println(s2.color);\n\t\t\n\t\tSystem.out.println(\"=============================================\");\n\t\t\n\t\tMustang m = new Mustang(2, \"gt\", \"yellow\");\n\t\t\n\t\t//this shows overriding.\n\t\ts.drive();\n\t\tm.drive();\n\t\t\n\t\t//Static methods can be called directly from the class. \n\t\tSportsCar.honk();\n\t\tMustang.honk();\n\t\t\n\t\tSystem.out.println(\"=============================================\");\n\t\t\n\t\t//Example of upcasting. \n\t\tSportsCar sc = new Mustang(4, \"gt\", \"Green\"); \n\t\t\n\t\tsc.drive();\n\t\t\n\t\tm.showOff();\n\t\t\n\t\tSystem.out.println(\"=============================================\");\n\t\t//I can not do this because the method does not exist in the declared type: SportsCar\n\t\t//sc.showOff();\n\t\t\n\n\t\t//This is downcasting\n\t\t\n\t\tMustang mu = (Mustang) sc;\n\t\t\n\t\tmu.showOff();\n\t\t\n\t\t// this downcast does the same thing it just does not assign it to a variable for later use. \n\t\t((Mustang) sc).showOff();\n\n\t\t\n\t\tSystem.out.println(\"=============================================\");\n\t\t\n\t\t//This will not work at runtime because sc is not actually a Mustang. It will however compile. \n//\t\tsc = new SportsCar(4, 5, \"test\", \"test\");\n//\t\t\t\t\n//\t\tmu = (Mustang) sc;\n\t\t\n\t\t\n\t}",
"boolean getIsBcast();",
"@Override\r\n\tpublic void visit(CastExpression castExpression) {\n\r\n\t}",
"InstCast createInstCast();",
"public static void main(String[] args){\n\n int a = (int) 3.14;\n System.out.println(a);\n //Outputs 3\n\n // The code above is casting the value 3.14 to an integer, with 3 as the resulting value.\n\n double b = 42.571;\n int c = (int) b;\n System.out.println(c);\n//Outputs 42\n\n /*\n Java supports automatic type casting of integers to floating points, since there is no loss of precision.\nOn the other hand, type casting is mandatory when assigning floating point values to integer variables.\n */\n\n // downcasting\n\n /*\n Why is upcasting automatic, downcasting manual?\n Well, upcasting can never fail.\n But if you have a group of different Animals and want to downcast them all to a Cat,\n then there's a chance that some of these Animals are actually Dogs, so the process fails.\n */\n\n /*Upcasting*/\n\n// You can cast an instance of a subclass to its superclass.\n\n// Consider the following example, assuming that Cat is a subclass of Animal.\n// Animal a = new Cat();\n//\n// Java automatically upcasted the Cat type variable to the Animal type.\n//\n /*Downcasting */\n\n// Casting an object of a superclass to its subclass is called downcasting.\n// Example:\n\n// Animal a = new Animal();\n// ((Cat)a).makeSound();\n//\n// This will try to cast the variable a to the Cat type and call its makeSound() method.\n\n\n }",
"Target convert(Source source, Target target);",
"public static void main(String[] args) {\n\t\t\n\t\tTypecasting t=new Typecasting();\n\t\tt.typeCasting();\n\n\t}",
"@Override\n public Object convert(Object dest, Object source, Class<?> aClass, Class<?> aClass1) {\n return null;\n\n }",
"public void anycast(Set<P2PUser> dests, Object msg);",
"private Expr upcast(Expr a, Type fType) {\n if (Types.baseType(fType) instanceof FunctionType) {\n return upcastToFunctionType(a, (FunctionType)Types.baseType(fType), false);\n } else if (!ts.typeDeepBaseEquals(fType, a.type(), context)) {\n Position pos = a.position();\n return makeCast(a.position(), a, fType);\n } else {\n return a;\n }\n }",
"public static void main(String[] args) {\n\t\tFirst ob1=new First();\n\t\tSecond obj2=new Second();\n\t\t\n\t\tFirst f1=(First)obj2;\n\t\tf1.show();\n\t\t\n\t\tFirst f2=(Second)obj2;//derived object can be casted to base class\n\t\tf2.show();\n\t\t\n// \tSecond f3=(Second)ob1;//base object cannot be casted to derived object\n// \t\tf3.show();\n\t}",
"@Override\n\tprotected void flowThrough(Object in, Object d, Object out) {\n\t\t\n\t}",
"public <T> T cast();",
"@Test\n public void createRightTypeCastTypeCast() throws Exception {\n //\n boolean inLeftTree = false;\n PreparationData prepData = prepareCastedPartOfFaultVar(inLeftTree);\n //\n MapperSwingTreeModel rightTreeModel = prepData.bmm.getRightTreeModel();\n TreePath baseTypeElementPath = BpelMapperTestUtils.findInTree(prepData.treeNode,\n rightTreeModel, \"baseTypeElem\"); // NOI18N\n assertNotNull(baseTypeElementPath);\n //\n // Find global type and cast the left item to it\n GlobalComplexType targetGType = BpelMapperTestUtils.getGlobalTypeByName(\n mBpelModel, \"http://xml.netbeans.org/schema/Synchronous\",\n \"DerivedComplexType\", GlobalComplexType.class); // NOI18N\n assertNotNull(targetGType);\n //\n // Create a new cast\n TreePath castedPartPath = new BpelCastManager().addCastCmd(\n targetGType, baseTypeElementPath, inLeftTree, prepData.tcContext);\n assertNotNull(castedPartPath);\n //\n // Find the attrStr attribute inside of the new Pseudo Element.\n TreePath rightPinPath = BpelMapperTestUtils.findInTree(\n prepData.treeNode, rightTreeModel,\n \"(DerivedComplexType)baseTypeElem/strAttrA\"); // NOI18N\n assertNotNull(rightPinPath);\n //\n MapperSwingTreeModel leftTreeModel = prepData.bmm.getLeftTreeModel();\n TreePath leftPinPath = BpelMapperTestUtils.findInTree(\n leftTreeModel, \"/Variables/SimpleTargetVar/strAttr1\"); // NOI18N\n assertNotNull(leftPinPath);\n //\n BpelMapperTestUtils.addTransitLink(prepData.bmm, leftPinPath, rightPinPath);\n //\n Element peer = prepData.testAssign.getPeer();\n String assignText = new SimpleDomSerializer().serializeNode(peer);\n String snapshot = TestProperties.getMessage(FaultVarLSMsCreationTest.class,\n \"MAPPER_SNAPSHOT_FAULT_RT_CREATE_CAST_CAST\"); // NOI18N\n assertEquals(assignText, snapshot);\n }",
"public static void main(String[] args) {\n\t\tD a1=new E();\n\t\ta1.run();\n\t\t//downcasting\n\t\tE e1=(E)a1;\n\t\te1.run();\n\t\te1.wish();\n\n}",
"public List<Cast> getcast() {\n\t\treturn this.cast;\n\t}",
"Target convert(Source source);",
"public void setCast(Cast cast) {\n\t\tthis.cast = cast;\n\t}",
"private void indirectAssociations_DeriveIndirectInheritance() {\n try{\n \tList<FamixAssociation> indirectInheritanceAssociations = new ArrayList<FamixAssociation>();\n\t for (FamixAssociation directAssociation : theModel.associations) {\n if (directAssociation.to == null || directAssociation.from == null || directAssociation.to.equals(\"\") || directAssociation.from.equals(\"\")){ \n \tnumberOfNotConnectedWaitingAssociations ++;\n }\n else if (directAssociation instanceof FamixInheritanceDefinition){ \n \t\t\t\tindirectInheritanceAssociations.addAll(indirectAssociations_AddIndirectInheritanceAssociation(directAssociation.from, directAssociation.to, directAssociation.lineNumber));\n\t\t\t\t}\n\t\t\t}\n\t for (FamixAssociation indirectInheritanceAssociation : indirectInheritanceAssociations) {\n\t \taddToModel(indirectInheritanceAssociation);\n\t }\n } catch (Exception e) {\n\t this.logger.debug(new Date().toString() + \" \" + e);\n\t e.printStackTrace();\n }\n }",
"public void relinkUD()\n {\n this.U.D = this.D.U = this;\n }",
"@Override\n int convertBackward(int unused) {\n throw new UnsupportedOperationException();\n }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"public void afterUnmarshal(Object target, Object parent) {\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tTags obj=null;\t\t\t \r\n\t\t\t\tif(target instanceof Node){\r\n\t\t\t\t\tobj = (Node) target;\r\n\t\t\t\t\tcheckGraphIndoor(obj);\r\n\t\t\t\t\t//System.out.println(((Node)obj).getId());\r\n\t\t\t\t}else if (target instanceof Way){\r\n\t\t\t\t\tobj = (Way) target;\t\t\r\n\t\t\t\t\tcheckGraphIndoor(obj);\r\n\t\t\t\t\t//System.out.println(((Way)obj).getId());\r\n\t\t\t\t}else if (target instanceof Relation){\t\t\r\n\t\t\t\t\t//System.out.println(((Relation)target).getId());\r\n\t\t\t\t\touterBeforeInner((Relation) target); //Workaround for MongoDB 2.6.x\r\n\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t \t\t\t\t\t\r\n\t\t\t\t\r\n\t\t}",
"static <R, T extends R> R upcast(T fv) {\n return fv;\n }",
"@Override\n\t\t\t\tpublic void downget(String arg0) {\n\t\t\t\t}",
"public Object getDestination() { return this.d; }",
"public abstract Barrier inverseKnockType();",
"String getDest_typ();",
"public boolean getCastling() {\n return this.castling;\n }",
"public void Mirror() {\n\t\t\r\n\t}",
"TypeDec getTarget();",
"public void setcast(List<Cast> v) {\n\t\tthis.cast = new ArrayList<Cast>(v);\n\t}",
"public static void main(String[] args) {\n\n Dog dog = new Dog();\n Cat cat = new Cat();\n System.out.println(\"The dog's age is \"+ dog.getAge());\n System.out.println(\"The cat's age is \"+ cat.getAge());\n cat.meow();\n dog.ruff();\n dog.eat();\n cat.eat();\n dog.run();\n cat.prance();\n\n System.out.println();\n System.out.println();\n dog.eat();\n cat.eat();\n\n System.out.println();\n System.out.println();\n cat.sleep();\n dog.sleep();\n\n //Converting from a super to a sub\n //Animal billy = new Dog();\n\n // Casting\n Object doggie = new Dog();\n Dog realDog = (Dog) doggie;\n realDog.ruff();\n\n Object str = \"est\";\n String realS = (String) str;\n realS.getBytes();\n\n // What happens when...\n\n Dog doggy = new Dog();\n if (dog instanceof Animal){\n Animal animal = (Animal) doggy;\n animal.sleep();\n }\n doggy.sleep();\n\n }",
"@Override\r\n\tpublic boolean visit(CastExpression node) {\r\n\t\toperator(node,node.getClass().toString());\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic VType getTarget() {\n\t\t// TODO: Add your code here\n\t\treturn super.to;\n\t}",
"@Override\n\t\tpublic void down() {\n\t\t\t\n\t\t}",
"private void handleCastling() {\n GameState gameState = gameService.getCurrentGameState();\n gameState.setCastling(false);\n }",
"public Cast(Class<O> rCastType)\n\t{\n\t\tsuper(rCastType, Cast.class.getSimpleName());\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\n public void recibirDesconectar(long source, long target) {\n }",
"public T caseRealCast(RealCast object) {\n\t\treturn null;\n\t}",
"@Override\n public void updete(Object obj) {\n\n }",
"@Test\n public void test_cast() {\n \n\n }",
"public void sendAnycast(String msg) {\n\t}",
"public static void main(String[] args) {\n int a=10;\n byte b=(byte)a; //explicit casting\n System.out.println(b);\n\n double DecimalNumber=10.5;\n float FloatNumber=(float) DecimalNumber;\n System.out.println(FloatNumber);\n\n double DecimalNumber2=10.5;\n float FloatNumber2=(int) DecimalNumber;//double>float\n System.out.println(FloatNumber2);\n\n long LongNum=300L;\n int IntNum=(short)LongNum;\n System.out.println(IntNum);\n\n //implicit casting: small size data to larger size of data...\n byte ByteNum=100;\n int IntNum2=ByteNum;\n System.out.println(IntNum2);\n\n\n short ShortNum=100;\n long LongNum2=ShortNum;\n\n\n \n }",
"String directsTo();",
"public void DIRECT()//TODO rececheck!\n {\n ea = IMMBYTE();\n ea |= konami.dp << 8;\n }",
"public void unlinkUD()\n {\n this.U.D = this.D;\n this.D.U = this.U;\n }",
"public CastMember()\n\t\t{\n\t\t\tname = null;\n\t\t\tcharacterName = null;\n\t\t}",
"void transit();",
"public static void main(String[] args) {\n Employee employee = new GovernmentEmployee();\n\n GovernmentEmployee employee2 = (GovernmentEmployee) employee;\n employee.commonMethod();\n \n GovernmentEmployee governmentEmployee = new GovernmentEmployee();\n Employee governmentEmployee1 = governmentEmployee;\n\n\n }",
"public static void main(String[] args) {\n\t\tBeta x = new Beta();\r\n\t\t// insert code here\r\n\t\tAlpha a = x;\r\n\t\tFoo f = (Delta)x; // No proper casting, as Delta just an extended implementation of Alpha\r\n\t\tFoo f2 = (Alpha)x; // Alpha implements Foo\r\n\t\tBeta b = (Beta)(Alpha)x; // x is casted to be Alpha and then Beta again\r\n\t}",
"public OrglRoot unTransformedBy(Dsp externalDsp) {\n\tthrow new SubclassResponsibilityException();\n/*\nudanax-top.st:9734:OrglRoot methodsFor: 'operations'!\n{OrglRoot} unTransformedBy: externalDsp {Dsp}\n\t\"Return a copy with externalDsp removed from the receiver's dsp.\"\n\tself subclassResponsibility!\n*/\n}",
"private Class<?> unedge(Class<?> cls) {\n if (!Edge.class.isAssignableFrom(cls)) return cls;\n ParameterizedType edge = getEdgeType(cls);\n return getEdgeTypeArgument(edge);\n }",
"@Override\n public String visit(CastExpr n, Object arg) {\n return null;\n }",
"public void visitCheckCast(Quad obj) {\n if (TRACE_INTRA) out.println(\"Visiting: \"+obj);\n Register dest_r = CheckCast.getDest(obj).getRegister();\n Operand src = CheckCast.getSrc(obj);\n if (src instanceof RegisterOperand) {\n Register src_r = ((RegisterOperand)src).getRegister();\n Object s = getRegister(src_r);\n if (!include_cast_ops) {\n setRegister(dest_r, s);\n return;\n }\n CheckCastNode n = (CheckCastNode)nodeCache.get(obj);\n if (n == null) {\n n = CheckCastNode.get(CheckCast.getType(obj).getType(), \n new QuadProgramLocation(method, obj));\n nodeCache.put(obj, n);\n }\n Collection from = (s instanceof Collection) ? (Collection)s : Collections.singleton(s);\n Iterator i = from.iterator();\n while (i.hasNext()) {\n Node fn = (Node)i.next();\n Pair key = new Pair(fn, obj);\n if (castMap.put(key, n) == null)\n castPredecessors.add(fn);\n }\n setRegister(dest_r, n);\n } else {\n Node n = handleConst((ConstOperand) src, new QuadProgramLocation(method, obj));\n setRegister(dest_r, n);\n }\n }",
"@Override\npublic void processDirection() {\n\t\n}",
"@Test\n public void createLeftTypeCastTypeCast() throws Exception {\n //\n boolean inLeftTree = true;\n PreparationData prepData = prepareCastedPartOfFaultVar(inLeftTree);\n //\n MapperSwingTreeModel leftTreeModel = prepData.bmm.getLeftTreeModel();\n TreePath baseTypeElementPath = BpelMapperTestUtils.findInTree(prepData.treeNode,\n leftTreeModel, \"baseTypeElem\"); // NOI18N\n assertNotNull(baseTypeElementPath);\n //\n // Find global type and cast the left item to it\n GlobalComplexType targetGType = BpelMapperTestUtils.getGlobalTypeByName(\n mBpelModel, \"http://xml.netbeans.org/schema/Synchronous\",\n \"DerivedComplexType\", GlobalComplexType.class); // NOI18N\n assertNotNull(targetGType);\n //\n // Create a new cast\n TreePath castedPartPath = new BpelCastManager().addCastCmd(\n targetGType, baseTypeElementPath, inLeftTree, prepData.tcContext);\n assertNotNull(castedPartPath);\n //\n // Find the attrStr attribute inside of the new Pseudo Element.\n TreePath leftPinPath = BpelMapperTestUtils.findInTree(\n prepData.treeNode, leftTreeModel,\n \"(DerivedComplexType)baseTypeElem/strAttrA\"); // NOI18N\n assertNotNull(leftPinPath);\n //\n MapperSwingTreeModel rightTreeModel = prepData.bmm.getRightTreeModel();\n TreePath rightPinPath = BpelMapperTestUtils.findInTree(\n rightTreeModel, \"/Variables/SimpleTargetVar/strAttr1\"); // NOI18N\n assertNotNull(rightPinPath);\n //\n BpelMapperTestUtils.addTransitLink(prepData.bmm, leftPinPath, rightPinPath);\n //\n Element peer = prepData.testAssign.getPeer();\n String assignText = new SimpleDomSerializer().serializeNode(peer);\n String snapshot = TestProperties.getMessage(FaultVarLSMsCreationTest.class,\n \"MAPPER_SNAPSHOT_FAULT_LT_CREATE_CAST_CAST\"); // NOI18N\n assertEquals(assignText, snapshot);\n }",
"private void flowRemovedRfwd(FlowEntry entry) {\n\n //Log\n ipfixManager.log.trace(\"Flow Removed from Reactive Forwarding, id={}, device={}, selector={}, treatment={}\",\n entry.id(), entry.deviceId(), entry.selector(), entry.treatment());\n\n // Exporters\n IpAddress exporterIpv4 = IpAddress.valueOf(ipfixManager.deviceService.getDevice(\n entry.deviceId()).annotations().toString().split(\"=\")[2].split(\":\")[0]);\n\n long dpid = Dpid.dpid(entry.deviceId().uri()).value();\n byte[] byteExporterIpv6 = new byte[16];\n System.arraycopy(Longs.toByteArray(0), 0, byteExporterIpv6, 0, 8);\n System.arraycopy(Longs.toByteArray(dpid), 0, byteExporterIpv6, 8, 8);\n Ip6Address exporterIpv6 = Ip6Address.valueOf(byteExporterIpv6);\n\n // Timestamps, octets, packets\n long start = System.currentTimeMillis() - (1000 * entry.life());\n long end = System.currentTimeMillis();\n long octets = entry.bytes();\n long packets = entry.packets();\n\n // Input and Output ports\n PortCriterion portCrit = (PortCriterion) entry.selector().getCriterion(Type.IN_PORT);\n int intfIn = (portCrit == null) ? 0 : (int) portCrit.port().toLong();\n List<Instruction> instructions = entry.treatment().allInstructions();\n int intfOut = 0;\n for (Instruction instruction : instructions) {\n if (instruction.type() == Instruction.Type.OUTPUT) {\n OutputInstruction outputInstruction = (OutputInstruction) instruction;\n intfOut = (outputInstruction == null) ? 0 : (int) outputInstruction.port().toLong();\n }\n }\n\n // Ethernet MACs, Ethertype and VLAN\n EthCriterion ethCrit;\n ethCrit = (EthCriterion) entry.selector().getCriterion(Type.ETH_SRC);\n MacAddress srcMac = (ethCrit == null) ? MacAddress.valueOf(\"00:00:00:00:00:00\") : ethCrit.mac();\n ethCrit = (EthCriterion) entry.selector().getCriterion(Type.ETH_DST);\n MacAddress dstMac = (ethCrit == null) ? MacAddress.valueOf(\"00:00:00:00:00:00\") : ethCrit.mac();\n\n EthTypeCriterion ethTypeCrit = (EthTypeCriterion) entry.selector().getCriterion(Type.ETH_TYPE);\n Short ethType = (ethTypeCrit == null) ? 0x0000 : ethTypeCrit.ethType().toShort();\n\n VlanIdCriterion vlanCrit = (VlanIdCriterion) entry.selector().getCriterion(Type.VLAN_VID);\n Short vlan = (vlanCrit == null) ? 0x0000 : vlanCrit.vlanId().toShort();\n\n // IP Criterion check\n IPCriterion srcIpCrit = (IPCriterion) entry.selector().getCriterion(Type.IPV4_SRC);\n IPCriterion dstIpCrit = (IPCriterion) entry.selector().getCriterion(Type.IPV4_DST);\n IPCriterion srcIp6Crit = (IPCriterion) entry.selector().getCriterion(Type.IPV6_SRC);\n IPCriterion dstIp6Crit = (IPCriterion) entry.selector().getCriterion(Type.IPV6_DST);\n\n // If IP criterions are null send MAC Data Record, else send IPv4 or IPv6 Data Record\n if (srcIpCrit == null && dstIpCrit == null && srcIp6Crit == null && dstIp6Crit == null) {\n DataRecordRfwdMac record = new DataRecordRfwdMac(\n exporterIpv4, exporterIpv6,\n start, end,\n octets, packets,\n intfIn, intfOut,\n srcMac, dstMac,\n ethType, vlan);\n List<DataRecord> recordList = new ArrayList<DataRecord>();\n recordList.add(record);\n ipfixManager.ipfixSender.sendRecords(DataRecordRfwdMac.getTemplateRecord(),\n recordList, dpid, IpfixManager.collectorIp, IpfixManager.collectorPort);\n } else {\n // Checking IPv4 and IPv6 criterions\n IPProtocolCriterion protocolCrit = (IPProtocolCriterion) entry.selector().getCriterion(Type.IP_PROTO);\n byte ipProtocol = (protocolCrit == null) ? (byte) 0xff : (byte) protocolCrit.protocol();\n\n IPDscpCriterion dscpCrit = (IPDscpCriterion) entry.selector().getCriterion(Type.IP_DSCP);\n byte dscp = (dscpCrit == null) ? 0x00 : dscpCrit.ipDscp();\n IPEcnCriterion ecnCrit = (IPEcnCriterion) entry.selector().getCriterion(Type.IP_ECN);\n byte ecn = (ecnCrit == null) ? 0x00 : ecnCrit.ipEcn();\n byte tos = (byte) ((byte) (dscp << 2) | ecn);\n\n IPv6FlowLabelCriterion flowLabelCrit =\n (IPv6FlowLabelCriterion) entry.selector().getCriterion(Type.IPV6_FLABEL);\n int flowLabelIpv6 = (flowLabelCrit == null) ? 0 : flowLabelCrit.flowLabel();\n\n int srcPort = 0;\n int dstPort = 0;\n if (ipProtocol == IPv4.PROTOCOL_TCP) {\n TcpPortCriterion tcpCrit;\n tcpCrit = (TcpPortCriterion) entry.selector().getCriterion(Type.TCP_SRC);\n srcPort = (tcpCrit == null) ? 0 : tcpCrit.tcpPort().toInt();\n tcpCrit = (TcpPortCriterion) entry.selector().getCriterion(Type.TCP_DST);\n dstPort = (tcpCrit == null) ? 0 : tcpCrit.tcpPort().toInt();\n } else if (ipProtocol == IPv4.PROTOCOL_UDP) {\n UdpPortCriterion udpCrit;\n udpCrit = (UdpPortCriterion) entry.selector().getCriterion(Type.UDP_SRC);\n srcPort = (udpCrit == null) ? 0 : udpCrit.udpPort().toInt();\n udpCrit = (UdpPortCriterion) entry.selector().getCriterion(Type.UDP_DST);\n dstPort = (udpCrit == null) ? 0 : udpCrit.udpPort().toInt();\n } else if (ipProtocol == IPv4.PROTOCOL_ICMP) {\n IcmpTypeCriterion icmpTypeCrit = (IcmpTypeCriterion) entry.selector().getCriterion(Type.ICMPV4_TYPE);\n Short icmpType = (icmpTypeCrit == null) ? 0 : icmpTypeCrit.icmpType();\n IcmpCodeCriterion icmpCodeCrit = (IcmpCodeCriterion) entry.selector().getCriterion(Type.ICMPV4_CODE);\n Short icmpCode = (icmpCodeCrit == null) ? 0 : icmpCodeCrit.icmpCode();\n dstPort = 256 * icmpType + icmpCode;\n } else if (ipProtocol == IPv6.PROTOCOL_ICMP6) {\n Icmpv6TypeCriterion icmpv6TypeCrit =\n (Icmpv6TypeCriterion) entry.selector().getCriterion(Type.ICMPV6_TYPE);\n Short icmpType = (icmpv6TypeCrit == null) ? 0 : icmpv6TypeCrit.icmpv6Type();\n Icmpv6CodeCriterion icmpv6CodeCrit =\n (Icmpv6CodeCriterion) entry.selector().getCriterion(Type.ICMPV6_CODE);\n Short icmpCode = (icmpv6CodeCrit == null) ? 0 : icmpv6CodeCrit.icmpv6Code();\n dstPort = 256 * icmpType + icmpCode;\n }\n // If IPv4 than send IPv4 Data record\n if ((srcIpCrit != null || dstIpCrit != null) && ethType == Ethernet.TYPE_IPV4) {\n IpAddress srcIp = (srcIpCrit == null) ? IpAddress.valueOf(0) : srcIpCrit.ip().address();\n IpAddress dstIp = (dstIpCrit == null) ? IpAddress.valueOf(0) : dstIpCrit.ip().address();\n DataRecordRfwdIpv4 record = new DataRecordRfwdIpv4(\n exporterIpv4, exporterIpv6,\n start, end,\n octets, packets,\n intfIn, intfOut,\n srcMac, dstMac,\n ethType, vlan,\n srcIp, dstIp,\n ipProtocol, tos,\n (short) srcPort, (short) dstPort);\n List<DataRecord> recordList = new ArrayList<DataRecord>();\n recordList.add(record);\n ipfixManager.ipfixSender.sendRecords(DataRecordRfwdIpv4.getTemplateRecord(),\n recordList, dpid, IpfixManager.collectorIp, IpfixManager.collectorPort);\n }\n // If IPv6 than send IPv6 Data record\n if ((srcIp6Crit != null || dstIp6Crit != null) && ethType == Ethernet.TYPE_IPV6) {\n Ip6Address srcIp6 = (srcIp6Crit == null) ?\n Ip6Address.valueOf(\"0:0:0:0:0:0:0:0\") : srcIp6Crit.ip().address().getIp6Address();\n Ip6Address dstIp6 = (dstIp6Crit == null) ?\n Ip6Address.valueOf(\"0:0:0:0:0:0:0:0\") : dstIp6Crit.ip().address().getIp6Address();\n DataRecordRfwdIpv6 record = new DataRecordRfwdIpv6(\n exporterIpv4, exporterIpv6,\n start, end,\n octets, packets,\n intfIn, intfOut,\n srcMac, dstMac,\n ethType, vlan,\n srcIp6, dstIp6,\n flowLabelIpv6,\n ipProtocol, tos,\n (short) srcPort, (short) dstPort);\n List<DataRecord> recordList = new ArrayList<DataRecord>();\n recordList.add(record);\n ipfixManager.ipfixSender.sendRecords(DataRecordRfwdIpv6.getTemplateRecord(),\n recordList, dpid, IpfixManager.collectorIp, IpfixManager.collectorPort);\n }\n }\n }",
"public void test_der_01() {\n OntModel m = ModelFactory.createOntologyModel(OntModelSpec.RDFS_MEM_TRANS_INF, null);\n Resource a = m.createResource(\"http://example.org#A\");\n Resource b = m.createResource(\"http://example.org#B\");\n OntClass A = new OntClassImpl(a.getNode(), (EnhGraph) m) {\n protected boolean hasSuperClassDirect(Resource cls) {\n throw new RuntimeException(\"did not find direct reasoner\");\n }\n };\n \n // will throw an exception if the wrong code path is taken\n A.hasSuperClass(b, true);\n }",
"public void remTargetObjectClass(){\n rem(DmpDMSAG.__targetObjectClass);\n }",
"public static void main(String[] args) {\n List<Rodent> all = new ArrayList<>();\n all.add(new Mouse());\n all.add(new Gerbil());\n all.add(new Mouse());\n all.add(new Hamster());\n all.add(new Gerbil());\n for (Rodent rodent : all) {\n System.out.println(rodent.eat());\n }\n\n //Exercise 10: (3) Create a base class with two methods. In the first method,\n // call the second method. Inherit a class and override the second method.\n // Create an object of the derived class, upcast it to the base type,\n // and call the first method. Explain what happens.\n Rodent r = new Mouse();\n r.sleep();\n\n //Exercise 17: (2) Using the Cycle hierarchy from Exercise 1, add a balance( ) method\n // to Unicycle and Bicycle, but not to Tricycle.\n // Create instances of all three types and upcast them to an array of Cycle.\n // Try to call balance( ) on each element of the array and observe the results.\n // Downcast and call balance( ) and observe what happens.\n Unicycle unicycle = new Unicycle();\n Bicycle bicycle = new Bicycle();\n Tricycle tricycle = new Tricycle();\n Cycle[] cycles = new Cycle[3];\n cycles[0] = unicycle;\n cycles[1] = bicycle;\n cycles[2] = tricycle;\n// for(int i = 0; i < cycles.length; i++){\n// //cycles[i].balance(0); cannot find the method\n// }\n ((Unicycle) cycles[0]).balance();\n ((Bicycle) cycles[1]).balance();\n// ((Tricycle)cycles[2]).balance(); cannot find the method\n\n\n }",
"@Override\r\n\t\tpublic void normalize()\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}",
"public void removeCast(Cast cast) {\n\t\tif(this.cast != null)\n\t\t\tthis.cast.remove(cast);\n\t}",
"public abstract String getDnForPerson(String inum);",
"public abstract void drop();",
"void reverseDirection();",
"public static void main(String[] args) {\n\t\tAnimal a = new Animal(); \n\t\ta.sleep();\n\t\ta.eat();\n\t\t\n\t\t//creating object of child class\n\t\tCat cat = new Cat(); \n\t\tcat.eat(); //from parent\n\t\tcat.meow(); //from child\n\t\tcat.sleep();//from child\n\t\t\n\t\t\n\t\t// Widening/implicit\n\t\tdouble d = 90; \n\t\t\n\t\t// Narrowing/Explicit\n\t\tint i = (int)1.99; \n\t\tSystem.out.println(\"*********************************\");\n\t\t// Non Primitive Type Casting, down casting & up casting\n\t\t// widening --> Creating an object of the child class \n\t\t// and giving reference to the Parent class.\n\t\t/* When you create an object of the Cat class with reference to Animal Class,\n\t\t * you will only be able to access the methods in the parent class (Animal)\n\t\t * if you have the same methods in the child class (Cat) they will override \n\t\t * the methods in the parent class as seen in the below code\n\t\t */\n\t\tAnimal obj = new Cat(); \n\t\tobj.eat(); //method from parent class\n\t\tobj.sleep(); // this method will come from child class --> runtime polymorphism\n\t\t//obj.meow(); --> method won't be available\n\t\t\n\t\t// narrowing\n\t\t// Cat obj2 = new Animal(); --> JVM Error: Cannot convert from animal to cat\n\t\n\t}",
"private Decoded assign(Decoded target, Decoded source){\n if(source.type != null){\n target.type = source.type;\n }\n if(source.error != null){\n target.error = source.error;\n }\n if(source.barcode != null){\n target.barcode = source.barcode;\n }\n if(source.labelerId != null){\n target.labelerId = source.labelerId;\n }\n if(source.check != null){\n target.check = source.check;\n }\n if(source.link != null){\n target.link = source.link;\n }\n if(source.property != null){\n target.property = source.property;\n if(source.propertyValue != null){\n target.propertyValue = source.propertyValue;\n }\n }\n if(source.date != null){\n target.date = source.date;\n }\n if(source.uom != null){\n target.uom = source.uom;\n }\n if(source.quantity != null){\n target.quantity = source.quantity;\n }\n if(source.product != null){\n target.product = source.product;\n }\n\n return target;\n }",
"public static void main(String[] args) {\n\t\tBMW b= new BMW();\r\n\t\tb.start();\r\n\t\tb.stop();\r\n\t b.refuel();\r\n\t\tb.thfesafty();\r\n\t\tb.engine();\r\n\t\t\r\n\t\tSystem.out.println(\"--------\");\r\n\t\t\r\n\t\tcar c= new car();\r\n\t\tc.start();\r\n\t\tc.stop();\r\n\t\tc.refuel();\r\n\t\tc.engine();\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"---------\");\r\n\t\t\r\n\t\t\r\n\t\t//top casting \r\n\t\tcar c1= new BMW(); \r\n// child class obj can be refs byparent class ref..(or) var.. is called dynamic polymorphism \r\n\t\tc1.start();\r\n\t\tc1.stop();\r\n\t\tc1.refuel();\r\n\t\t\r\n\t\t\r\n\t\t//dowm casting\r\n\t\t\r\n\t\t//BMW B =(BMW) new car();\t\r\n\t\t}",
"private Expr boxingUpcastIfNeeded(Expr a, Type fType) {\n if (a instanceof NullLit_c) {\n return makeCast(a.position(), a, fType);\n }\n \n if (Types.baseType(fType) instanceof FunctionType) {\n return upcastToFunctionType(a, (FunctionType)Types.baseType(fType), true);\n }\n \n if (ts.isObjectType(a.type(), context) && ts.isObjectType(fType, context)) {\n // implicit C++ level upcast is good enough (C++ and X10 have same class hierarchy structure)\n return a;\n }\n \n if (!ts.typeDeepBaseEquals(fType, a.type(), context)) {\n Position pos = a.position();\n return makeCast(a.position(), a, fType);\n } else {\n return a;\n }\n }",
"public boolean isDirect()\r\n/* 76: */ {\r\n/* 77:111 */ return false;\r\n/* 78: */ }",
"@Override\n public PgCast getCast(final String name) {\n return casts.get(name);\n }",
"public static void main(String[] args){\n\t\t//casting ( object -> parent)\n\t\tAnimal animal1 = new Human(\"Joy\");\n\t\tanimal1.die();\n\t\t\n\t\t//casting to interface\n\t\tFlyable flyable = (Human)animal1;\n\t\tflyable.fly();\n\t}",
"public Object copy_from(Object src) {\n\n GuestScienceData typedSrc = (GuestScienceData) src;\n GuestScienceData typedDst = this;\n super.copy_from(typedSrc);\n /** Full name of apk */\n typedDst.apkName = typedSrc.apkName;\n /** Type of data being sent */\n typedDst.type = (rapid.ext.astrobee.GuestScienceDataType) typedDst.type.copy_from(typedSrc.type);\n /** String to classify the kind of data */\n typedDst.topic = typedSrc.topic;\n /** Data from the apk */\n typedDst.data = (rapid.OctetSequence2K) typedDst.data.copy_from(typedSrc.data);\n\n return this;\n }",
"private static void LessonBoxUnboxCast() {\n int x = 10;\n Object o = x;\n //System.out.println(o + o); //since o is an object you can't uses the + operator\n //LessonReflectionAndGenerics(o.getClass());\n\n // Example Unboxing (this is casting, explicit casting)\n int y = (int) o;\n System.out.println(y);\n\n // Example Implicit casting you can go from smaller data type to a bigger data type\n //But not the other way around unless you use explicit casting\n int i = 100;\n double d = i;\n System.out.println(d);\n\n // Example of tryin to cast a bigger data type into a smaller data type\n double a = 1.92;\n //int b = a; //gets and error\n //need to be explicit\n int b = (int) a;\n System.out.println(b);\n }",
"public default EnumCastingError getCastingState(LivingEntity casterIn, ItemStack scrollIn){ return EnumCastingError.CASTABLE; }",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void downLoadBegin() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}",
"public static void main(String[] args) {\n\t\tPerson p = new Student();\r\n\t\tPerson p2 = new Student(10);\r\n\t\t\r\n//\t\tStudent s = new Student();\r\n//\t\tPerson p3 = s; 두개가 아래와 같다.\r\n\t\tPerson p3 = new Student();\r\n\t\t\r\n\t\tStudent s = (Student)p3; //down casting 명시적(explicit) 캐스팅을 해야 한다.\r\n\t\t//같은 객체일때만 가능하다.\r\n\t\t\r\n\t\tPerson p4 = s; //up casting 암시적(implicit) 캐스팅을 안해줘도 된다.\r\n\t\t\r\n\t\t\r\n\t}",
"public void down()\n {\n if (this.index >= 0 && this.index < this.morphs.size())\n {\n MorphType type = this.morphs.get(this.index);\n\n if (type.morphs.size() > 1)\n {\n type.down();\n this.resetTime();\n }\n }\n }",
"@Override\n\tprotected void copy(Object source, Object dest) {\n\t\t\n\t}",
"public void directionRestriction(){\n \t\n }",
"public abstract void disconnectInDirection(N n1, N n2);",
"PToP.S2BRelay getS2BRelay();",
"String getFromDual();",
"public SyncMessage recoit ( Door d ) {\n\nSyncMessage sm = (SyncMessage)receive( d );\nreturn sm;\n}",
"boolean transfer(Recycler.Stack<?> dst)\r\n/* 302: */ {\r\n/* 303:328 */ Link head = this.head;\r\n/* 304:329 */ if (head == null) {\r\n/* 305:330 */ return false;\r\n/* 306: */ }\r\n/* 307:333 */ if (head.readIndex == Recycler.LINK_CAPACITY)\r\n/* 308: */ {\r\n/* 309:334 */ if (head.next == null) {\r\n/* 310:335 */ return false;\r\n/* 311: */ }\r\n/* 312:337 */ this.head = (head = head.next);\r\n/* 313: */ }\r\n/* 314:340 */ int srcStart = head.readIndex;\r\n/* 315:341 */ int srcEnd = head.get();\r\n/* 316:342 */ int srcSize = srcEnd - srcStart;\r\n/* 317:343 */ if (srcSize == 0) {\r\n/* 318:344 */ return false;\r\n/* 319: */ }\r\n/* 320:347 */ int dstSize = dst.size;\r\n/* 321:348 */ int expectedCapacity = dstSize + srcSize;\r\n/* 322:350 */ if (expectedCapacity > dst.elements.length)\r\n/* 323: */ {\r\n/* 324:351 */ int actualCapacity = dst.increaseCapacity(expectedCapacity);\r\n/* 325:352 */ srcEnd = Math.min(srcStart + actualCapacity - dstSize, srcEnd);\r\n/* 326: */ }\r\n/* 327:355 */ if (srcStart != srcEnd)\r\n/* 328: */ {\r\n/* 329:356 */ Recycler.DefaultHandle[] srcElems = head.elements;\r\n/* 330:357 */ Recycler.DefaultHandle[] dstElems = dst.elements;\r\n/* 331:358 */ int newDstSize = dstSize;\r\n/* 332:359 */ for (int i = srcStart; i < srcEnd; i++)\r\n/* 333: */ {\r\n/* 334:360 */ Recycler.DefaultHandle element = srcElems[i];\r\n/* 335:361 */ if (Recycler.DefaultHandle.access$1500(element) == 0) {\r\n/* 336:362 */ Recycler.DefaultHandle.access$1502(element, Recycler.DefaultHandle.access$1100(element));\r\n/* 337:363 */ } else if (Recycler.DefaultHandle.access$1500(element) != Recycler.DefaultHandle.access$1100(element)) {\r\n/* 338:364 */ throw new IllegalStateException(\"recycled already\");\r\n/* 339: */ }\r\n/* 340:366 */ srcElems[i] = null;\r\n/* 341:368 */ if (!dst.dropHandle(element))\r\n/* 342: */ {\r\n/* 343:372 */ Recycler.DefaultHandle.access$502(element, dst);\r\n/* 344:373 */ dstElems[(newDstSize++)] = element;\r\n/* 345: */ }\r\n/* 346: */ }\r\n/* 347:376 */ if ((srcEnd == Recycler.LINK_CAPACITY) && (head.next != null))\r\n/* 348: */ {\r\n/* 349:378 */ reclaimSpace(Recycler.LINK_CAPACITY);\r\n/* 350: */ \r\n/* 351:380 */ this.head = head.next;\r\n/* 352: */ }\r\n/* 353:383 */ head.readIndex = srcEnd;\r\n/* 354:384 */ if (dst.size == newDstSize) {\r\n/* 355:385 */ return false;\r\n/* 356: */ }\r\n/* 357:387 */ dst.size = newDstSize;\r\n/* 358:388 */ return true;\r\n/* 359: */ }\r\n/* 360:391 */ return false;\r\n/* 361: */ }",
"private WarPlayer castPlayer (Player player) {\n return (WarPlayer)player;\n }",
"public LWTRTPdu disConnectAcpt() throws IncorrectTransitionException;"
]
| [
"0.64567935",
"0.64567935",
"0.64567935",
"0.63371485",
"0.63297313",
"0.58973217",
"0.5734317",
"0.5700421",
"0.55037636",
"0.5433851",
"0.54149145",
"0.54065776",
"0.540465",
"0.5402964",
"0.5398336",
"0.5385751",
"0.53761184",
"0.5315571",
"0.5264846",
"0.5245687",
"0.5171051",
"0.5165094",
"0.5137806",
"0.5118274",
"0.5113363",
"0.507837",
"0.50691324",
"0.5049695",
"0.50329584",
"0.5026515",
"0.5018282",
"0.50144625",
"0.50080436",
"0.5004913",
"0.4998853",
"0.4994308",
"0.49769032",
"0.4962655",
"0.49531433",
"0.49474406",
"0.4946864",
"0.49433383",
"0.49384043",
"0.49261183",
"0.49233764",
"0.4923189",
"0.4918872",
"0.49105904",
"0.4906955",
"0.48961565",
"0.48912236",
"0.48905194",
"0.48792526",
"0.4878853",
"0.48596254",
"0.48582435",
"0.48548076",
"0.4831358",
"0.48260894",
"0.48131138",
"0.48110664",
"0.47932956",
"0.47928396",
"0.4772064",
"0.47707742",
"0.47687188",
"0.47574237",
"0.4747888",
"0.47418204",
"0.47376415",
"0.47369817",
"0.4733946",
"0.4727816",
"0.47226277",
"0.47090954",
"0.47068566",
"0.47003746",
"0.46992886",
"0.46985358",
"0.46946853",
"0.46923164",
"0.4692155",
"0.4688431",
"0.468754",
"0.46869057",
"0.46832135",
"0.46828374",
"0.46797565",
"0.4672343",
"0.46670178",
"0.4659848",
"0.46449575",
"0.46427074",
"0.46373406",
"0.463108",
"0.4627338",
"0.46268773",
"0.4624949",
"0.4622781",
"0.46169454",
"0.46154267"
]
| 0.0 | -1 |
/ / Naming / | @Override
public String describe() {
StringBuilder sb = new StringBuilder();
if (hasName()) {
sb.append(typeDeclaration.getQualifiedName());
} else {
sb.append("<anonymous class>");
}
if (!typeParametersMap().isEmpty()) {
sb.append("<");
sb.append(String.join(", ", typeDeclaration.getTypeParameters().stream().map(tp -> typeParametersMap().getValue(tp).describe()).collect(Collectors.toList())));
sb.append(">");
}
return sb.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract String name ();",
"String getName() ;",
"String getName( );",
"protected abstract String getName();",
"abstract String getName();",
"public String getName ();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();"
]
| [
"0.72020066",
"0.71768385",
"0.7075813",
"0.70290655",
"0.69878167",
"0.6985899",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633",
"0.69809633"
]
| 0.0 | -1 |
/ / TypeParameters / Execute a transformation on all the type parameters of this element. | public abstract ResolvedType transformTypeParameters(ResolvedTypeTransformer transformer); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public TypeParameterListNode getTypeParameters()throws ClassCastException;",
"Collection<Parameter> getTypedParameters();",
"public void setTypeParameters(TypeParameterListNode typeParameters);",
"void applyParameters(ReaderContext context, Operation operation, Type type, Annotation[] annotations);",
"List<Type> getTypeParameters();",
"public List<ResolvedType> typeParametersValues() {\n return this.typeParametersMap.isEmpty() ? Collections.emptyList() : typeDeclaration.getTypeParameters().stream().map(tp -> typeParametersMap.getValue(tp)).collect(Collectors.toList());\n }",
"public Vector transformTypes(Vector old_concepts, Vector parameters)\n {\n Vector old_types = (Vector)((Concept)old_concepts.elementAt(0)).types.clone();\n return old_types;\n }",
"public void buildTypeParamInfo() {\n\t\twriter.writeTypeParamInfo();\n\t}",
"public SmooksTransformModel setTransformType(String type);",
"public final void mT__172() throws RecognitionException {\n try {\n int _type = T__172;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:172:8: ( 'OutputParametersType1' )\n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:172:10: 'OutputParametersType1'\n {\n match(\"OutputParametersType1\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"private void processTypes(Node root) {\n\t\tfinal boolean newContext =\n\t\t\t(root instanceof Block || root instanceof ForLoop);\n\n\t\tif (newContext) {\n\t\t\tthis.variableMaps\n\t\t\t\t.push(new VariableTypeMap(this.variableMaps.peek()));\n\t\t}\n\n\t\tif (!root.getChildren().isEmpty()) {\n\t\t\tfor (int i = 0; i < root.getChildren().size(); ++i) {\n\t\t\t\tNode child = root.getChildren().get(i);\n\t\t\t\tif (root instanceof Call call && (!call.isPrimary() && i == 0\n\t\t\t\t\t|| call.isPrimary() && i == 1)) {\n\t\t\t\t\t// Skip the method name lookup\n\t\t\t\t\tchild.setType(Type.unknownType());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tthis.processTypes(child);\n\t\t\t}\n\t\t}\n\t\troot.process(this);\n\n\t\tif (newContext) {\n\t\t\tthis.variableMaps.pop();\n\t\t}\n\t}",
"public String getTransformType();",
"void clearTypedParameters();",
"public final void typeParameters() throws RecognitionException {\n int typeParameters_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"typeParameters\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(233, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 11) ) { return ; }\n // Java.g:234:5: ( '<' typeParameter ( ',' typeParameter )* '>' )\n dbg.enterAlt(1);\n\n // Java.g:234:9: '<' typeParameter ( ',' typeParameter )* '>'\n {\n dbg.location(234,9);\n match(input,40,FOLLOW_40_in_typeParameters516); if (state.failed) return ;\n dbg.location(234,13);\n pushFollow(FOLLOW_typeParameter_in_typeParameters518);\n typeParameter();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(234,27);\n // Java.g:234:27: ( ',' typeParameter )*\n try { dbg.enterSubRule(20);\n\n loop20:\n do {\n int alt20=2;\n try { dbg.enterDecision(20);\n\n int LA20_0 = input.LA(1);\n\n if ( (LA20_0==41) ) {\n alt20=1;\n }\n\n\n } finally {dbg.exitDecision(20);}\n\n switch (alt20) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:234:28: ',' typeParameter\n \t {\n \t dbg.location(234,28);\n \t match(input,41,FOLLOW_41_in_typeParameters521); if (state.failed) return ;\n \t dbg.location(234,32);\n \t pushFollow(FOLLOW_typeParameter_in_typeParameters523);\n \t typeParameter();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop20;\n }\n } while (true);\n } finally {dbg.exitSubRule(20);}\n\n dbg.location(234,48);\n match(input,42,FOLLOW_42_in_typeParameters527); if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 11, typeParameters_StartIndex); }\n }\n dbg.location(235, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"typeParameters\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }",
"public void fromTransformations(Transformations transformations);",
"public void doTransformation(final Element element) {\n final ViewElementDefinition viewDef = operation.getView().getElement(element.getGroup());\n if (nonNull(viewDef)) {\n transform(element, viewDef.getTransformer());\n }\n }",
"public ITypeInfo[] getParameters();",
"public interface Transform<T> {\n\n public void transform(T transform);\n}",
"public interface Transformer {\n\t/**\n\t * Transform a source object dynamically.\n\t * \n\t * This iteratively calls {@link #transform(Object, Class) transform}\n\t * \n\t * @param <S>\n\t * the source type.\n\t * @param <T>\n\t * the target type.\n\t * @param source\n\t * The source object.\n\t * @return The target object or <em>null</em> if no applicable rule has been\n\t * found.\n\t * @see #getTransformationRules()\n\t */\n\tpublic <S, T> T transform(S source);\n\n\t/**\n\t * Transform a source object using a specific type of rule.\n\t * \n\t * @param <S>\n\t * the source type.\n\t * @param <T>\n\t * the target type.\n\t * @param source\n\t * The source object.\n\t * @param with\n\t * The type of rule to be used.\n\t * @return The target object or <em>null</em> if no applicable rule has been\n\t * found.\n\t */\n\tpublic <S, T> T transform(S source, Class<? extends Rule<S, T>> with);\n\n\t/**\n\t * Get the list of rule definitions related to this transformation instance.\n\t * \n\t * @return An ordered collection of transformation rule definitions.\n\t */\n\tpublic Set<Class<? extends Rule<?, ?>>> getTransformationRules();\n\n\t/**\n\t * \n\t * @return\n\t */\n\tpublic Context getContext();\n}",
"public FunctionTypeNode typeParameters(List<TypeParamNode> typeParams) {\n \t\tFunctionTypeNode_c n = (FunctionTypeNode_c) copy();\n \t\tn.typeParams = TypedList.copyAndCheck(typeParams, TypeParamNode.class, true);\n \t\treturn n;\n \t}",
"public List<TypeDefinition> getParameters() {\n\t\treturn parameters;\n\t}",
"public DataTypeDescriptor[] getParameterTypes() {\r\n return parameterTypes;\r\n }",
"private void handleParameters(Node node, ParamType paramType) {\n\n Parameters parameters = new Parameters();\n parameters.setName(node.attributes().get(\"name\").toString());\n Map<String, Object> parameter = new HashMap<String, Object>();\n\n Iterator<Node> itr = node.childNodes();\n while (itr.hasNext()) {\n Node childNode = itr.next();\n String key = childNode.attributes().get(\"name\").toString();\n String value = childNode.attributes().get(\"value\").toString();\n parameter.put(key, value);\n }\n parameters.setParameter(parameter);\n switch (paramType) {\n\n case TESTSUITE:\n testSuite.addParameters(parameters);\n break;\n case TESTCASE:\n currentTestCase.addParameters(parameters);\n break;\n case TESTSTEP:\n currentTestStep.addParameters(parameters);\n break;\n case PERMUTATION:\n currentPermutation.addParameters(parameters);\n break;\n }\n\n }",
"public interface Transform<INPUT, OUTPUT> {\n\n\tOUTPUT transform(INPUT input);\n\t\n}",
"protected void processTypes()\n {\n wsdl.setWsdlTypes(new XSModelTypes());\n }",
"public final void mT__171() throws RecognitionException {\n try {\n int _type = T__171;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:171:8: ( 'InputParametersType1' )\n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:171:10: 'InputParametersType1'\n {\n match(\"InputParametersType1\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"protected boolean onlyUsesTheseParameters(Set<TypeParameter> parameters) {\n if (isParameterized()) {\n if (isFullyInstantiated()) return true;\n\n for (ModifiedType modifiedType : getTypeParameters()) {\n Type parameter = modifiedType.getType();\n if (parameter instanceof TypeParameter typeParameter) {\n if (!parameters.contains(typeParameter)) return false;\n } else if (!parameter.onlyUsesTheseParameters(parameters)) return false;\n }\n }\n\n return true;\n }",
"public void performFieldTransformations(List<AccountingLineFieldRenderingTransformation> fieldTransformations, AccountingLine accountingLine, Map unconvertedValues) {\n int count = 0;\n for (AccountingLineViewField field : fields) {\n for (AccountingLineFieldRenderingTransformation transformation : fieldTransformations) {\n transformation.transformField(accountingLine, field.getField(), field.getDefinition(), unconvertedValues);\n }\n }\n }",
"private static void applyTransformations(DataFrame dataFrame) {\n // apply all transformations of every column\n for (GenericColumn column : dataFrame.getColumns()) {\n try {\n for (Transformer transformer : column.getTransformers()) {\n dataFrame.transformColumn(column, transformer);\n }\n } catch (Exception e) {\n throw AnchorTabularBuilderException.transformationException(column, e);\n }\n }\n }",
"void apply(T input);",
"public ParameterType getType();",
"@Test\n public void testParameterType() throws Exception {\n ArrayList<Type> typeList = Lists.newArrayList();\n typeList.add(String.class);\n typeList.addAll(getBothParameters(ParamToListParam.class));\n typeList.add(getFirstTypeParameter(StringListSink.class));\n PipelineRegisterer.validateTypes(typeList);\n }",
"List<LightweightTypeReference> getTypeArguments();",
"public final void apply(Transformation<?> transformation){\n if (appliesTo(transformation)) {\n action(transformation);\n }\n }",
"@Override // kotlin.jvm.functions.Function1\n public Sequence<? extends TypeParameterDescriptor> invoke(DeclarationDescriptor declarationDescriptor) {\n DeclarationDescriptor declarationDescriptor2 = declarationDescriptor;\n Intrinsics.checkNotNullParameter(declarationDescriptor2, \"it\");\n List<TypeParameterDescriptor> typeParameters = ((CallableDescriptor) declarationDescriptor2).getTypeParameters();\n Intrinsics.checkNotNullExpressionValue(typeParameters, \"it as CallableDescriptor).typeParameters\");\n return CollectionsKt___CollectionsKt.asSequence(typeParameters);\n }",
"public final native void transform(String transform, Element node) /*-{ this.transform(transform, node) }-*/;",
"public void setTransform(Transform transform);",
"public final IClass[]\r\n getParameterTypes() throws CompileException {\r\n if (this.parameterTypesCache != null) return this.parameterTypesCache;\r\n return (this.parameterTypesCache = this.getParameterTypes2());\r\n }",
"void processType(@Observes ProcessAnnotatedType<?> pat) throws InvalidAnnotationException {\n par.checkAnnotatedType(pat);\n MvcExtension.processAnnotatedType(pat);\n }",
"@Generated(value={\"edu.jhu.cs.bsj.compiler.utils.generator.SourceGenerator\"})\npublic interface TypeParameterNode extends Node, TypeNameBindingNode\n{\n /**\n * Gets the base type name for the parameter.\n * @return The base type name for the parameter.\n * @throws ClassCastException If the value of this property is a special node.\n */\n public IdentifierNode getIdentifier()throws ClassCastException;\n \n /**\n * Gets the union object for the base type name for the parameter.\n * @return A union object representing The base type name for the parameter.\n */\n public NodeUnion<? extends IdentifierNode> getUnionForIdentifier();\n \n /**\n * Changes the base type name for the parameter.\n * @param identifier The base type name for the parameter.\n */\n public void setIdentifier(IdentifierNode identifier);\n \n /**\n * Changes the base type name for the parameter.\n * @param identifier The base type name for the parameter.\n * @throws NullPointerException If the provided value is <code>null</code>.\n * Node union values may have <code>null</code>\n * contents but are never <code>null</code>\n * themselves.\n */\n public void setUnionForIdentifier(NodeUnion<? extends IdentifierNode> identifier) throws NullPointerException;\n \n /**\n * Gets the bounds over the base type.\n * @return The bounds over the base type.\n * @throws ClassCastException If the value of this property is a special node.\n */\n public DeclaredTypeListNode getBounds()throws ClassCastException;\n \n /**\n * Gets the union object for the bounds over the base type.\n * @return A union object representing The bounds over the base type.\n */\n public NodeUnion<? extends DeclaredTypeListNode> getUnionForBounds();\n \n /**\n * Changes the bounds over the base type.\n * @param bounds The bounds over the base type.\n */\n public void setBounds(DeclaredTypeListNode bounds);\n \n /**\n * Changes the bounds over the base type.\n * @param bounds The bounds over the base type.\n * @throws NullPointerException If the provided value is <code>null</code>.\n * Node union values may have <code>null</code>\n * contents but are never <code>null</code>\n * themselves.\n */\n public void setUnionForBounds(NodeUnion<? extends DeclaredTypeListNode> bounds) throws NullPointerException;\n \n /**\n * Generates a deep copy of this node.\n * @param factory The node factory to use to create the deep copy.\n * @return The resulting deep copy node.\n */\n @Override\n public TypeParameterNode deepCopy(BsjNodeFactory factory);\n \n}",
"private static HashMap resolveParameters(String type,String parametersXML, Map parameters)throws Exception{\n\t\tlogger.debug(\"IN\");\n\t\tDataSetParametersList dsList=new DataSetParametersList(parametersXML);\n\n\t\tHashMap usedParameters=null;\n\t\t// if in query case\n\t\tif(type.equals(\"1\")){\n\n\t\t\tusedParameters=new HashMap();\n\t\t\t// if in query case I must do conversion of parameter value conforming to their type\n\t\t\tfor (Iterator iterator = dsList.getItems().iterator(); iterator.hasNext();) {\n\t\t\t\tDataSetParameterItem item= (DataSetParameterItem) iterator.next();\n\t\t\t\tString name=item.getName();\n\t\t\t\tString typePar=item.getType();\n\n\t\t\t\tString value=(String)parameters.get(name);\n\t\t\t\tboolean singleValue=true;\n\t\t\t\tif(value==null){\n\t\t\t\t\tthrow new Exception();\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(typePar.equalsIgnoreCase(\"String\")&& !value.startsWith(\"'\")){\n\t\t\t\t\t\tvalue=\"'\"+value+\"'\";\n\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse if(typePar.equalsIgnoreCase(\"Number\")){\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t StringTokenizer st = new StringTokenizer(value);\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t String numTemp = \"\";\n\t\t\t\t\t\t\t Double doubleValue = null;\n\t\t\t\t\t\t\t value = \"\";\n\t\t\t\t\t\t\t while(st.hasMoreTokens()){\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t numTemp = st.nextToken(\"'\");\n\t\t\t\t\t\t\t\t if(numTemp.equals(\",\")){\n\t\t\t\t\t\t\t\t\t continue;\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t doubleValue=new Double(Double.parseDouble(numTemp));\n\t\t\t\t\t\t\t\t value = value + doubleValue.toString();\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t if(st.hasMoreTokens()){\n\t\t\t\t\t\t\t\t\t value = value + \",\";\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 } catch (NumberFormatException e) {\n\t\t\t \t\t \t throw new Exception();\n\t\t\t \t\t }\n\t\t\t\t\t}\n\t\t\t\t\telse if(typePar.equalsIgnoreCase(\"Date\")){\n\t\t\t\t\t\tvalue=value;\n\t\t\t\t\t}\n\t\t\t\t\tusedParameters.put(name, value);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\tlogger.debug(\"OUT\");\n\t\treturn usedParameters;\n\t}",
"@Override\r\n\tpublic void transform(ClassNode cn) {\n\t\t\r\n\t}",
"public void processTreeTypes(@NonNull CompilationUnit ast) {\n\t\tVariableTypeMap variables = new VariableTypeMap();\n\t\tthis.variableMaps.clear();\n\n\t\tthis.variableMaps.push(variables);\n\t\tLabelPass labels = new LabelPass(variables);\n\t\tlabels.processLabels(ast);\n\n\t\tthis.processTypes(ast);\n\t}",
"public interface DataTransformation {\n /**\n * Provide a data transformation on the supplied feed data. The type of processing is arbitrary and based on the context\n * in which the method is invoked.\n * @param data for the parameters in the given time range\n * @param startTime for the data request, this may not correspond to any times in the data set.\n * @param endTime for the data request, this may not correspond to any times in the data set.\n */\n void transform(Map<String, List<Map<String,String>>> data, long startTime, long endTime);\n }",
"void setTransforms(Transforms transforms);",
"@Override\n public List<KParameter> getParameters() {\n return getReflected().getParameters();\n }",
"public interface Transformation {\n\n\t/**\n\t * @return A description of the transformation this class performs.\n\t */\n\tpublic String getDescription();\n\n\t/**\n\t * @return the {@link FileType} for which this transformer can be used.\n\t */\n\tpublic Set<FileType> getSupportedFileTypes();\n\n /**\n * Determines when this Transformation has to be build\n * \n * @return the priority when to execute this transformation.\n */\n public int getBuildOrderPriority();\n // XXX(leo;20.11.2011) add uniform transform statement or two! so that the\n // sub transformation interfaces can be merged to one\n\n}",
"public T transform(T item) {\n T result = item;\n for (SimpleTransformation<T> transformation : transformations) {\n result = transformation.transform(result);\n }\n\n return result;\n }",
"public abstract Object getTypedParams(Object params);",
"@Test\n public void testGenericParameterType() throws Exception {\n ArrayList<Type> typeList = Lists.newArrayList();\n typeList.add(String[].class);\n typeList.addAll(getBothParameters(ArrayToListArray.class));\n typeList.addAll(getBothParameters(ParamToListParam.class));\n typeList.add(getFirstTypeParameter(NoOpSink.class));\n PipelineRegisterer.validateTypes(typeList);\n }",
"@Override\n\tprotected final void performModifyTypes( final ManagerEJB manager, Map params ) throws JaloBusinessException\n\t{\n\t\t// performModifyTypes\n\t\n\n\t\n\t\n\t\t\t\tsingle_createattr_RandomImageParagraphComponent_topic();\n\t\t\t\n\t\t\t\tsingle_createattr_RandomImageParagraphComponent_width();\n\t\t\t\n\t\t\t\tsingle_createattr_RandomImageParagraphComponent_height();\n\t\t\t\n\t\t\t\tsingle_createattr_RandomImageParagraphComponent_text();\n\t\t\t\n\n\t}",
"public DataType[] getParameters() {\n return parameters;\n }",
"public abstract boolean appliesTo(Transformation<?> transformation);",
"public ActionParameterTypes getParametersTypes() {\n\t\treturn this.signature;\n\t}",
"public boolean isParameterizedType()\n {\n\n return _typeParams != null && _typeParams.length > 0;\n }",
"public void transform(AffineTransform Tx)\r\n\t{\r\n\t\t// System.out.println(\"transform\");\r\n\t}",
"TypeInfo[] typeParams();",
"Iterable<ActionParameterTypes> getParameterTypeAlternatives();",
"public void getAllAttributeTypes(List<IAttributeType<?>> all, ItemFilter<IAttributeType<?>> filter);",
"void setParameters(IParameterCollection parameters);",
"public void setParameterType(java.lang.Integer parameterType) {\r\n this.parameterType = parameterType;\r\n }",
"List<InferredStandardParameter> getOriginalParameterTypes();",
"@Override\n protected void internalTransform(String arg0, Map arg1) {\n for (SootClass c : Scene.v().getApplicationClasses()) {\n //if (c.getName().startsWith(\"com\"))//TODO\n // if(c.getName().start)\n try {\n transform(c);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n\n }\n }",
"public void mapParameters(PreparedStatement preparedStatement, BoundParameters boundParameters) throws SQLException {\n Class cls;\n int i = 0;\n while (i < boundParameters.count()) {\n Expression expressionAt = boundParameters.expressionAt(i);\n Object valueAt = boundParameters.valueAt(i);\n if (expressionAt instanceof Attribute) {\n Attribute attribute = (Attribute) expressionAt;\n if (attribute.isAssociation()) {\n valueAt = Attributes.replaceKeyReference(valueAt, attribute);\n }\n }\n if (valueAt == null) {\n cls = null;\n } else {\n cls = valueAt.getClass();\n }\n if (cls != null && this.model.containsTypeOf(cls)) {\n Attribute singleKeyAttribute = this.model.typeOf(cls).getSingleKeyAttribute();\n if (singleKeyAttribute != null) {\n valueAt = singleKeyAttribute.getProperty().get(valueAt);\n expressionAt = (Expression) singleKeyAttribute;\n }\n }\n i++;\n this.configuration.getMapping().write(expressionAt, preparedStatement, i, valueAt);\n }\n }",
"public static LambdaExpression lambda(Class type, Expression body, Iterable<ParameterExpression> parameters) { throw Extensions.todo(); }",
"void addTypedParameter(Parameter typedParameter);",
"public void getAllAttributeTypes(List<IAttributeType<?>> all);",
"private Object invokeCommonXmlTransf(Class<?> transformerClass, Map<String, Object> parameters, String service, String methodWS, String type, String version) throws TransformersException {\n\t\tClass<?>[ ] constrParamClasses, methodParamClasses;\n\t\tConstructor<?> constructor;\n\t\tMethod method;\n\t\tObject object;\n\t\tObject[ ] constrParamObjects, methodParamObjects;\n\t\tString res;\n\n\t\tres = null;\n\n\t\ttry {\n\t\t\t// Instanciamos un objeto transformardor\n\t\t\tconstrParamClasses = new Class[PARAM_NUMBERS];\n\t\t\tconstrParamClasses[0] = Class.forName(String.class.getName());\n\t\t\tconstrParamClasses[1] = Class.forName(String.class.getName());\n\t\t\tconstrParamClasses[2] = Class.forName(String.class.getName());\n\t\t\tconstrParamClasses[NumberConstants.INT_3] = Class.forName(String.class.getName());\n\n\t\t\tconstructor = transformerClass.getConstructor(constrParamClasses);\n\t\t\tconstrParamObjects = new Object[PARAM_NUMBERS];\n\t\t\tconstrParamObjects[0] = service;\n\t\t\tconstrParamObjects[1] = methodWS;\n\t\t\tconstrParamObjects[2] = type;\n\t\t\tconstrParamObjects[NumberConstants.INT_3] = version;\n\t\t\tobject = constructor.newInstance(constrParamObjects);\n\n\t\t\t// Obtenemos el método que creara la cadena xml que contiene el\n\t\t\t// parametro esperado por @firma\n\t\t\tmethodParamClasses = new Class[1];\n\t\t\tmethodParamClasses[0] = Class.forName(\"java.lang.Object\");\n\t\t\tmethod = transformerClass.getMethod(\"transform\", methodParamClasses);\n\n\t\t\t// Invocamos el método transformador\n\t\t\tmethodParamObjects = new Object[1];\n\t\t\tmethodParamObjects[0] = parameters;\n\n\t\t\tres = (String) method.invoke(object, methodParamObjects);\n\t\t} catch (Exception e) {\n\t\t\tString errorMsg = CaibEsbLanguage.getResIntegra(ILogConstantKeys.TF_LOG001);\n\t\t\tLOGGER.error(errorMsg, e);\n\t\t\tthrow new TransformersException(errorMsg, e);\n\t\t}\n\n\t\treturn res;\n\t}",
"public void addTargetParameterType(Class<?> type) {\n this.targetParameterTypes.add(type);\n }",
"public void transform() {\n final var bounds = getParentBounds();\n transform( bounds.width, bounds.height );\n }",
"public void transform() {\n\t\tOrganism newOrg;\n\t\t\n\t\tfor (int i=0; i < 1; i++) {\n\t\t\tnewOrg = new Organism(_world);\n\t\t\tif (newOrg.inheritTransformation(this, i==0)) {\n\t\t\t\t// It can be created\n\t\t\t\t_world.addOrganism(newOrg,this);\n\t\t\t}\n\t\t}\n\t}",
"@org.junit.Test(timeout = 10000)\n public void annotatedArgumentOfParameterizedType_cf927() {\n java.lang.String expected = (\"java.util.List<@\" + (com.squareup.javapoet.AmplAnnotatedTypeNameTest.NN)) + \" java.lang.String>\";\n com.squareup.javapoet.TypeName type = com.squareup.javapoet.TypeName.get(java.lang.String.class).annotated(NEVER_NULL);\n com.squareup.javapoet.ClassName list = com.squareup.javapoet.ClassName.get(java.util.List.class);\n java.lang.String actual = com.squareup.javapoet.ParameterizedTypeName.get(list, type).toString();\n // AssertGenerator replace invocation\n boolean o_annotatedArgumentOfParameterizedType_cf927__10 = // StatementAdderMethod cloned existing statement\n type.isBoxedPrimitive();\n // AssertGenerator add assertion\n org.junit.Assert.assertFalse(o_annotatedArgumentOfParameterizedType_cf927__10);\n org.junit.Assert.assertEquals(expected, actual);\n }",
"TypeDescription resolve(TypeDescription instrumentedType, TypeDescription.Generic parameterType);",
"@jdk.Exported\npublic interface TypeParameterTree extends Tree {\n Name getName();\n List<? extends Tree> getBounds();\n\n /**\n * Return annotations on the type parameter declaration.\n *\n * Annotations need Target meta-annotations of\n * {@link java.lang.annotation.ElementType#TYPE_PARAMETER} or\n * {@link java.lang.annotation.ElementType#TYPE_USE}\n * to appear in this position.\n *\n * @return annotations on the type parameter declaration\n * @since 1.8\n */\n List<? extends AnnotationTree> getAnnotations();\n}",
"public List<Pair<ResolvedTypeParameterDeclaration, ResolvedType>> getTypeParametersMap() {\n List<Pair<ResolvedTypeParameterDeclaration, ResolvedType>> typeParametersMap = new ArrayList<>();\n if (!isRawType()) {\n for (int i = 0; i < typeDeclaration.getTypeParameters().size(); i++) {\n typeParametersMap.add(new Pair<>(typeDeclaration.getTypeParameters().get(i), typeParametersValues().get(i)));\n }\n }\n return typeParametersMap;\n }",
"protected boolean onlyUsesTypeParametersFrom(Type type) {\n if (type.isParameterized() && isParameterized() && !isFullyInstantiated()) {\n Set<TypeParameter> parameters = new HashSet<>();\n\n for (ModifiedType modifiedType : type.getTypeParameters()) {\n Type parameter = modifiedType.getType();\n if (parameter instanceof TypeParameter) parameters.add((TypeParameter) parameter);\n }\n\n return onlyUsesTheseParameters(parameters);\n }\n\n return false;\n }",
"protected abstract String transform(final String xmlContent, final Map<String, Object> params) throws YFormProcessorException;",
"private InstantiateTransformer(Class[] paramTypes, Object[] args) {\n super();\n if (((paramTypes == null) && (args != null))\n || ((paramTypes != null) && (args == null))\n || ((paramTypes != null) && (args != null) && (paramTypes.length != args.length))) {\n throw new IllegalArgumentException(\"InstantiateTransformer: The parameter types must match the arguments\");\n }\n if ((paramTypes == null) && (args == null)) {\n iParamTypes = null;\n iArgs = null;\n } else {\n iParamTypes = (Class[]) paramTypes.clone();\n iArgs = (Object[]) args.clone();\n }\n }",
"private Parameter[] processParameters(int parameterCount, Object[] parameters) {\n Parameter[] pars = new Parameter[parameterCount];\n // Parameter parsing needed, object is not serializable\n int i = 0;\n for (int npar = 0; npar < parameterCount; ++npar) {\n DataType type = (DataType) parameters[i + 1];\n Direction direction = (Direction) parameters[i + 2];\n Stream stream = (Stream) parameters[i + 3];\n String prefix = (String) parameters[i + 4];\n\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(\" Parameter \" + (npar + 1) + \" has type \" + type.name());\n }\n\n switch (type) {\n case FILE_T:\n try {\n String fileName = (String) parameters[i];\n String originalName = new File(fileName).getName();\n DataLocation location = createLocation((String) parameters[i]);\n pars[npar] = new FileParameter(direction, stream, prefix, location, originalName);\n } catch (Exception e) {\n LOGGER.error(ERROR_FILE_NAME, e);\n ErrorManager.fatal(ERROR_FILE_NAME, e);\n }\n\n break;\n\n case PSCO_T:\n case OBJECT_T:\n pars[npar] = new ObjectParameter(direction, stream, prefix, parameters[i], oReg.newObjectParameter(parameters[i]));\n break;\n\n case EXTERNAL_OBJECT_T:\n String id = (String) parameters[i];\n pars[npar] = new ExternalObjectParameter(direction, stream, prefix, id, externalObjectHashcode(id));\n break;\n\n default:\n /*\n * Basic types (including String). The only possible direction is IN, warn otherwise\n */\n if (direction != Direction.IN) {\n LOGGER.warn(WARN_WRONG_DIRECTION + \"Parameter \" + npar + \" is a basic type, therefore it must have IN direction\");\n }\n pars[npar] = new BasicTypeParameter(type, Direction.IN, stream, prefix, parameters[i]);\n break;\n }\n i += 5;\n }\n\n return pars;\n }",
"@Test\n public void testSourceParamType() throws Exception {\n ArrayList<Type> typeList = Lists.newArrayList();\n typeList.add(getFirstTypeParameter(ParamToListParam.class));\n typeList.addAll(getBothParameters(ParamToListParam.class));\n typeList.add(getFirstTypeParameter(ParamToListParam.class));\n PipelineRegisterer.validateTypes(typeList);\n }",
"void generateWriteParam2ContentValues(Builder methodBuilder, SQLiteModelMethod method, String paramName, TypeName paramType, ModelProperty property);",
"@Test\r\n public void testParamterizedWithComplexTypeParameters()\r\n {\r\n test(Types.create(Map.class)\r\n .withSubtypeOf(Number.class)\r\n .withSupertypeOf(Comparable.class)\r\n .build());\r\n }",
"public static LambdaExpression lambda(Class type, Expression body, String name, Iterable<ParameterExpression> parameters) { throw Extensions.todo(); }",
"public void action(Transformation<?> transformation) {\n // Empty by design\n }",
"public synchronized void transform() {\n Iterator<String> it = entity_to_wxy.keySet().iterator();\n while (it.hasNext()) {\n String entity = it.next();\n double wx = entity_to_wxy.get(entity).getX(),\n wy = entity_to_wxy.get(entity).getY();\n int sx, sy;\n entity_to_sxy.put(entity, (sx = wxToSx(wx)) + BundlesDT.DELIM + (sy = wyToSy(wy)));\n entity_to_sx.put(entity, sx); entity_to_sy.put(entity, sy);\n }\n transform_id++;\n }",
"public boolean isParameterized() {\n\t\treturn this.typeSignatures != null && this.typeArguments != null;\n\t}",
"public void SetInputParameters(AbstractParameterDictionary params) throws Exception {\n\t\t//String paramsClass = params.getClass().getSimpleName();\n\t\t\n\t\tthis.inputParameters = params;\n\t}",
"protected void sequence_Parameters(ISerializationContext context, Parameters semanticObject) {\r\n\t\tgenericSequencer.createSequence(context, semanticObject);\r\n\t}",
"@Deprecated public List<TypeParamDef> getParameters(){\n return build(parameters);\n }",
"public interface DataConverter<JAVATYPE,METATYPE extends FieldDefinition> {\n /** Method invoked for a single JAVATYPE */\n JAVATYPE convert(JAVATYPE oldValue, final METATYPE meta);\n\n /** Method invoked for a JAVATYPE List. This can be used to alter the list length / add / remove elements after processing.\n * Please note that the converter is only invoked on the list itself, not on the individual elements. */\n List <JAVATYPE> convertList(List<JAVATYPE> oldList, final METATYPE meta);\n\n /** Method invoked for a JAVATYPE Set. This can be used to alter the set size / add / remove elements after processing.\n * Please note that the converter is only invoked on the list itself, not on the individual elements. */\n Set <JAVATYPE> convertSet(Set<JAVATYPE> oldSet, final METATYPE meta);\n\n /** Method invoked for an array of JAVATYPEs. This can be used to alter the list length / add / remove elements after processing.\n * Please note that the converter is only invoked on the array itself, not on the individual elements. */\n JAVATYPE [] convertArray(JAVATYPE [] oldArray, final METATYPE meta);\n\n /** Map-type methods. The tree walker converses the value parts of the map only. */\n public <K> Map<K, JAVATYPE> convertMap(Map<K, JAVATYPE> oldMap, final METATYPE meta);\n}",
"private void handleProductionElementParameter(GrammarCollectionBox box, ITypeHandler typeHandler,\n\t ParameterDSLInformation parameterInfo) {\n\tString param = \"P\" + parameterInfo.getIndex() + \"{\" + this.parameterCounter.getAndIncrement() + \"}\";\n\tICategory<String> parameterCategory = new Category(param, false);\n\tbox.rhsMethodCategory.add(parameterCategory);\n\n\tMap<ConfigurationOptions, String> parameterOptions = parameterInfo.getConfigurationOptions();\n\tICategory<String> parameterMapping = typeHandler.handle(parameterInfo.getType(), parameterOptions);\n\tRule rule = new Rule(parameterCategory, parameterMapping);\n\n\tICategory<String> typeCategory = new Category(CategoryNames.PARAMETERTYPE_CATEGORY, false);\n\tRule typeRule = new Rule(parameterMapping, typeCategory);\n\t// XXX(Leo_Roos;Nov 9, 2011) This annotation has been added by Pablo to\n\t// avoid interpretation of DSL key words as groovy keywords if they are\n\t// parsed mixed with groovy grammer.\n\n\ttypeRule.addAnnotation(new AvoidAnnotation());\n\n\tbox.addRule(rule);\n\tbox.addRule(typeRule);\n\tbox.addCategory(parameterMapping);\n\n }",
"@ReflectiveMethod(name = \"t_\", types = {})\n public void t_(){\n NMSWrapper.getInstance().exec(nmsObject);\n }",
"void accept(TmxElementVisitor visitor);",
"@Test\r\n public void testParamterized()\r\n {\r\n test(Types.create(List.class).withType(Number.class).build());\r\n }",
"public String getParameterType() { return parameterType; }",
"protected abstract Content getTypeParameterLinks(LinkInfo linkInfo);",
"private static void doTransform(Tree t) {\n\n if (t.value().startsWith(\"QP\")) {\n //look at the children\n List<Tree> children = t.getChildrenAsList();\n if (children.size() >= 3 && children.get(0).isPreTerminal()) {\n //go through the children and check if they match the structure we want\n String child1 = children.get(0).value();\n String child2 = children.get(1).value();\n String child3 = children.get(2).value();\n if((child3.startsWith(\"CD\") || child3.startsWith(\"DT\")) &&\n (child1.startsWith(\"RB\") || child1.startsWith(\"JJ\") || child1.startsWith(\"IN\")) &&\n (child2.startsWith(\"IN\") || child2.startsWith(\"JJ\"))) {\n transformQP(t);\n }\n }\n /* --- to be written or deleted\n } else if (t.value().startsWith(\"NP\")) {\n //look at the children\n List<Tree> children = t.getChildrenAsList();\n if (children.size() >= 3) {\n\n }\n ---- */\n } else if (t.isPhrasal()) {\n for (Tree child : t.getChildrenAsList()) {\n doTransform(child);\n }\n }\n }",
"public List<Class<?>> getSourceParameterTypes() {\n return parameterTypes;\n }",
"private static <T> void inject(final Node root, final T structure)\n throws XPathExpressionException {\n for (final Field field : structure.getClass().getDeclaredFields()) {\n XInject annotation = field.getAnnotation( XInject.class );\n if (annotation == null)\n continue;\n\n try {\n Class<?> valueType = field.getType();\n field.setAccessible( true );\n\n logger.dbg( \"Setting (%s) '%s' to '%s' (xpath: %s)\", valueType.getSimpleName(), field.getName(),\n xmlpath.getString( root, annotation.value() ), annotation.value() );\n\n Object value;\n if (Byte.class.isAssignableFrom( valueType ) || Byte.TYPE.isAssignableFrom( valueType ))\n value = xmlpath.getNumber( root, annotation.value() ).byteValue();\n\n else if (Double.class.isAssignableFrom( valueType ) || Double.TYPE.isAssignableFrom( valueType ))\n // noinspection UnnecessaryUnboxing\n value = xmlpath.getNumber( root, annotation.value() ).doubleValue();\n\n else if (Float.class.isAssignableFrom( valueType ) || Float.TYPE.isAssignableFrom( valueType ))\n value = xmlpath.getNumber( root, annotation.value() ).floatValue();\n\n else if (Integer.class.isAssignableFrom( valueType ) || Integer.TYPE.isAssignableFrom( valueType ))\n value = xmlpath.getNumber( root, annotation.value() ).intValue();\n\n else if (Long.class.isAssignableFrom( valueType ) || Long.TYPE.isAssignableFrom( valueType ))\n value = xmlpath.getNumber( root, annotation.value() ).longValue();\n\n else if (Short.class.isAssignableFrom( valueType ) || Short.TYPE.isAssignableFrom( valueType ))\n value = xmlpath.getNumber( root, annotation.value() ).shortValue();\n\n else if (Boolean.class.isAssignableFrom( valueType ) || Boolean.TYPE.isAssignableFrom( valueType ))\n value = xmlpath.getBoolean( root, annotation.value() );\n\n else\n value = xmlpath.getString( root, annotation.value() );\n\n field.set( structure, value );\n }\n\n // In case data to the field goes wrong (shouldn't).\n catch (final IllegalArgumentException e) {\n logger.err( e, \"Unexpected data type.\" );\n }\n catch (final IllegalAccessException e) {\n logger.err( e, \"Field not accessible.\" );\n }\n }\n\n // Look for XAfterInject methods.\n for (final Method method : structure.getClass().getDeclaredMethods())\n if (method.getAnnotation( XAfterInject.class ) != null)\n try {\n method.setAccessible( true );\n method.invoke( structure );\n }\n\n catch (final IllegalArgumentException e) {\n logger.err( e, \"XAfterInject method shouldn't take any arguments.\" );\n }\n catch (final IllegalAccessException e) {\n logger.err( e, \"XAfterInject method must be accessible.\" );\n }\n catch (final InvocationTargetException e) {\n logger.err( e, \"XAfterInject method throw an exception.\" );\n }\n }",
"public Node visitChildren(NodeVisitor v) {\n \t\tList<TypeParamNode> typeParams = this.visitList(this.typeParams, v);\n \t\tList<Formal> formals = this.visitList(this.formals, v);\n \t\tDepParameterExpr guard = (DepParameterExpr) this.visitChild(this.guard, v);\n \t\tTypeNode returnType = (TypeNode) this.visitChild(this.returnType, v);\n \t\treturn reconstruct(typeParams, formals, guard, returnType);\n \t}"
]
| [
"0.5429784",
"0.5398278",
"0.5394009",
"0.5164384",
"0.51478004",
"0.5059371",
"0.49639896",
"0.4960842",
"0.49027902",
"0.48804545",
"0.48789388",
"0.48215607",
"0.4790237",
"0.4785873",
"0.47835687",
"0.47034186",
"0.4661573",
"0.46592516",
"0.46288097",
"0.4623426",
"0.4605476",
"0.45963818",
"0.4560134",
"0.4554291",
"0.4553999",
"0.45526806",
"0.4539469",
"0.45365334",
"0.4511634",
"0.44996363",
"0.44983554",
"0.4491506",
"0.44711405",
"0.4462597",
"0.44505617",
"0.44424826",
"0.44350347",
"0.4427404",
"0.442396",
"0.44148934",
"0.44107115",
"0.44098356",
"0.44069704",
"0.44065177",
"0.43974754",
"0.43971032",
"0.43829483",
"0.43826693",
"0.4381977",
"0.43724892",
"0.43666843",
"0.4363221",
"0.43547976",
"0.43341652",
"0.4329807",
"0.4325068",
"0.43199706",
"0.43194056",
"0.4310657",
"0.4299743",
"0.4287635",
"0.42874444",
"0.42749864",
"0.42746848",
"0.42737696",
"0.42728522",
"0.42678168",
"0.4264132",
"0.42569834",
"0.42554379",
"0.4249148",
"0.4247289",
"0.4246366",
"0.4241972",
"0.4241856",
"0.42395818",
"0.4238338",
"0.42329887",
"0.4228869",
"0.42245132",
"0.42199314",
"0.42094982",
"0.42006743",
"0.41979903",
"0.419316",
"0.41882667",
"0.4185328",
"0.41802013",
"0.41770828",
"0.4172936",
"0.4171753",
"0.4170246",
"0.41645083",
"0.41574717",
"0.41560748",
"0.41466555",
"0.41395655",
"0.4138721",
"0.41350335",
"0.4122439"
]
| 0.67760116 | 0 |
/ / Assignability / This method checks if ThisType t = new OtherType() would compile. | @Override
public abstract boolean isAssignableBy(ResolvedType other); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public abstract boolean isAssignableBy(TypeUsage other);",
"public static boolean canAssign(ITypeBinding typeToAssign, ITypeBinding definedType) {\n TypeEnvironment typeEnvironment = new TypeEnvironment(false, true);\n TType defined = typeEnvironment.create(definedType);\n TType toAssign = typeEnvironment.create(typeToAssign);\n return toAssign.canAssignTo(defined);\n }",
"public MJType typeCheck() throws TypeCheckerException {\n\t\t\n\t\tthis.getType().typeCheck();\n\t\t\n\t\tif (!(this.init instanceof MJNoExpression)) {\n\t\t\tMJType initType = this.init.typeCheck();\n\t\t\t\n\t\t\tif (!MJType.isAssignable(initType, this.getType())) {\n\t\t\t\tthrow new TypeCheckerException(\"Initialized with incorrect type!\");\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn MJType.getVoidType();\n\t}",
"public boolean assignableTo(Type other) throws LookupException;",
"@Override\n public void checkEq(Type lt, Type t, ASTNode<?> origin) {\n NullableType lnt = getNullableTypeDefault(lt);\n NullableType rnt = getNullableTypeDefault(t);\n checkAssignable(lnt, rnt, origin);\n checkAssignable(rnt, lnt, origin);\n }",
"public TypeCheck() {\n\tsuper();\n\tinst = this;\n\tnew rcc.tc.PrepTypeDeclaration();\n }",
"@Override\n public Node typeCheck(TypeChecker tc) throws SemanticException {\n return this;\n }",
"public void visitNEW(NEW o){\n\t\t//visitCPInstruction(CPInstruction) has been called before.\n\t\t//visitLoadClass(LoadClass) has been called before.\n\t\t\n\t\tType t = o.getType(cpg);\n\t\tif (! (t instanceof ReferenceType)){\n\t\t\tthrow new AssertionViolatedException(\"NEW.getType() returning a non-reference type?!\");\n\t\t}\n\t\tif (! (t instanceof ObjectType)){\n\t\t\tconstraintViolated(o, \"Expecting a class type (ObjectType) to work on. Found: '\"+t+\"'.\");\n\t\t}\n\t\tObjectType obj = (ObjectType) t;\n\n\t\t//e.g.: Don't instantiate interfaces\n\t\tif (! obj.referencesClass()){\n\t\t\tconstraintViolated(o, \"Expecting a class type (ObjectType) to work on. Found: '\"+obj+\"'.\");\n\t\t}\t\t\n\t}",
"@Override\n boolean doIsAssignableFromNonUnionType(SoyType srcType) {\n return false;\n }",
"@Override\n public final boolean isReferenceType() {\n return true;\n }",
"MJType typeCheck() throws TypeCheckerException {\n\t\tMJVariable var;\n\t\tString name = this.name;\n\t\t\n\t\tif (this.name == \"this\" && IR.currentMethod.isStatic()) {\n\t\t\tthrow new TypeCheckerException(\"this encountered in static method.\");\n\t\t}\n\n\t\tif (this.name == \"super\") {\n\t\t\tif (IR.currentMethod.isStatic()) {\n\t\t\t\tthrow new TypeCheckerException(\"super encountered in static method.\");\n\t\t\t}\n\t\t\tname = \"this\";\n\t\t}\n\t\t\n\t\t\n\n\t\ttry {\n\t\t\tvar = IR.find(name);\n\t\t} catch (VariableNotFound e) {\n\t\t\tthrow new TypeCheckerException(\"Unkown identifier \" + this.name);\n\t\t}\n\n\t\tif (this.name != \"super\") {\n\t\t\t// remember the declaration\n\t\t\n\t\t\tthis.decl = var;\n\n\t\t\t// and use the type\n\t\t\tthis.type = var.getType();\n\t\t} else {\n\t\t\t\n\t\t\t// super can only occur in selectors, and there the declaration of the object does not matter\n\t\t\tthis.decl = null;\n\t\t\tthis.type = var.getType().getDecl().getSuperClass();\n\t\t}\n\t\t\n\t\treturn this.type;\n\t}",
"@Override\n protected void commonAssignmentCheck(AnnotatedTypeMirror varType,\n AnnotatedTypeMirror valueType, Tree valueTree, String errorKey) {\n if (valueType.getAnnotation(DependentPermissions.class) == null\n && varType.getAnnotation(DependentPermissions.class) == null) {\n return;\n } else {\n super.commonAssignmentCheck(varType, valueType, valueTree, errorKey);\n }\n }",
"protected boolean checkAssignable(ErrorList errlist)\n throws CompilerException\n {\n return true;\n }",
"public static Object ensureType(Object o, int nType, PofContext ctx)\n {\n Class clz = getClass(nType, ctx);\n if (clz == null)\n {\n throw new IllegalArgumentException(\n \"Unknown or ambiguous type: \" + nType);\n }\n if (!clz.isAssignableFrom(o.getClass()))\n {\n throw new ClassCastException(o.getClass().getName() +\n \" is not assignable to \"\n + clz.getName());\n }\n return o;\n }",
"@Override\n public Operator visitAssign(Assign operator)\n {\n throw new AssertionError();\n }",
"private void referenceTypeIsInitialized(Instruction o, ReferenceType r){\n\t\tif (r instanceof UninitializedObjectType){\n\t\t\tconstraintViolated(o, \"Working on an uninitialized object '\"+r+\"'.\");\n\t\t}\n\t}",
"public BoundType a() {\n throw new AssertionError(\"this statement should be unreachable\");\n }",
"protected GEDCOMType() {/* intentionally empty block */}",
"public ConsistentVariable(String name, Class<V> type, V initValue) {\n this(name, type, initValue, 0);\n }",
"public abstract boolean isAssignable();",
"@Test\n public void testAssignment() {\n try {\n Lexer lexer = new Lexer(new StringReader(\"n = 0;\"));\n Parser parser = new Parser(lexer);\n RootNode node = parser.program();\n AssignNode assignment = (AssignNode) node.get(0);\n assertTrue(assignment.getClass() == AssignNode.class);\n } catch (IOException e) {\n fail(e.getMessage());\n }\n }",
"@Test\n public void testTypeOf() throws ValueDoesNotMatchTypeException {\n TestEvaluationContext context = new TestEvaluationContext();\n DecisionVariableDeclaration decl = new DecisionVariableDeclaration(\"x\", IntegerType.TYPE, null);\n ConstantValue c0 = new ConstantValue(ValueFactory.createValue(IntegerType.TYPE, 0));\n ConstraintSyntaxTree cst = new OCLFeatureCall(\n new Variable(decl), IntegerType.LESS_EQUALS_INTEGER_INTEGER.getName(), c0);\n EvaluationAccessor cValue = Utils.createValue(ConstraintType.TYPE, context, cst);\n Utils.testTypeOf(context, ConstraintType.TYPE_OF, cValue);\n cValue.release();\n }",
"@Override\r\n public void setupTypeCheck() {\n ITypesCalculator derLit = new DeriveSymTypeOfCombineExpressionsWithSIUnitTypesDelegator();\r\n\r\n // other arguments not used (and therefore deliberately null)\r\n setTypeCheck(new TypeCheck(null, derLit));\r\n }",
"public boolean isAssignable(Class<?> type);",
"default void assignFrom(Any other) {}",
"public abstract boolean isTypeCorrect();",
"@Test\n public void constructorComplete() {\n final String NAME = \"name\";\n final String PICTURE = \"pic\";\n final Integer POSITION = 5;\n final Integer STATUS = 1;\n final CourseType courseType = new CourseType(NAME, PICTURE, POSITION, STATUS);\n\n assertNull(courseType.getId());\n assertSame(NAME, courseType.getName());\n assertSame(PICTURE, courseType.getPicture());\n assertSame(POSITION, courseType.getPosition());\n assertSame(STATUS, courseType.getStatus());\n assertNull(courseType.getCourses());\n assertNull(courseType.getAllowedDishes());\n }",
"public boolean IsAssignable(AST lhs)\n {\n return (lhs instanceof IdExpr ||\n lhs instanceof VarDcl ||\n lhs instanceof ListIndexExpr ||\n lhs instanceof StructCompSelectExpr);\n }",
"public boolean isAssignment() {\n\t\treturn true;\n\t}",
"public static void check18 (IR.Node node){\n if (node == null) return; \n if (node instanceof AssignmentStatement){\n if ((((AssignmentStatement)node).assignExpr) != null){\n String s1 = ((AssignmentStatement)node).loc.getType(); \n String s2 = ((AssignmentStatement)node).assignExpr.getType();\n if (!(s1.equals(\"any\") || s2.equals(\"any\"))){\n if (!(((AssignmentStatement)node).loc.getType().equals(((AssignmentStatement)node).assignExpr.getType()))){\n throw new IllegalStateException (\"Bad assignment.\"); \n }\n }\n\n }\n if ((((AssignmentStatement)node).op.type == Op.Type.minusequals) || (((AssignmentStatement)node).op.type == Op.Type.plusequals)){\n String s1 = ((AssignmentStatement)node).loc.getType(); \n String s2 = ((AssignmentStatement)node).assignExpr.getType();\n if (!(s1.equals(\"any\") || s2.equals(\"any\"))){\n if (!(((AssignmentStatement)node).loc.getType().equals(\"int\"))){\n throw new IllegalStateException (\"Bad assignment.\"); \n }\n if (!(((AssignmentStatement)node).assignExpr.getType().equals(\"int\"))){\n throw new IllegalStateException (\"Bad assignment.\"); \n }\n }\n }\n if ((((AssignmentStatement)node).op.type == Op.Type.increment) || (((AssignmentStatement)node).op.type == Op.Type.decrement)){\n if (!(((AssignmentStatement)node).loc.getType().equals(\"int\"))){\n if (!(((AssignmentStatement)node).loc.getType().equals(\"any\"))){\n throw new IllegalStateException (\"Bad assignment.\");\n } \n }\n }\n }\n if (node instanceof ForStatement){\n if (((ForStatement)node).initLoc == null || ((ForStatement)node).initExpr == null){\n throw new IllegalStateException (\"Bad assignment.\"); \n }\n if (!(((ForStatement)node).initLoc.getType().equals(((ForStatement)node).initExpr.getType()))){\n throw new IllegalStateException (\"Bad assignment.\"); \n } \n }\n List <IR.Node> children = node.getChildren(); \n if (children == null) return; \n\n for (int child=0; child<children.size(); child++){\n check18 (children.get(child)); \n }\n }",
"void checkReconstructible() throws InvalidObjectException {\n // subclasses can override\n }",
"public boolean typeCheck(){\n\treturn myDeclList.typeCheck();\n }",
"@Test(timeout = 10000)\n public void equalsAndHashCodeTypeVariableName_sd7_sd119_failAssert0() {\n // AssertGenerator generate try/catch block with fail statement\n try {\n TypeVariableName.get(Object.class);\n TypeVariableName.get(Object.class);\n TypeVariableName typeVar1 = TypeVariableName.get(\"T\", Comparator.class, Serializable.class);\n TypeVariableName typeVar2 = TypeVariableName.get(\"T\", Comparator.class, Serializable.class);\n // StatementAdd: generate variable from return value\n TypeName __DSPOT_invoc_9 = // StatementAdd: add invocation of a method\n typeVar1.withoutAnnotations();\n // StatementAdd: add invocation of a method\n __DSPOT_invoc_9.unbox();\n org.junit.Assert.fail(\"equalsAndHashCodeTypeVariableName_sd7_sd119 should have thrown UnsupportedOperationException\");\n } catch (UnsupportedOperationException eee) {\n }\n }",
"public void testCopyConstructor(){\r\n \r\n Token copy;\r\n //The copy constructor should throw a ParserException if the token\r\n //to be copied is null.\r\n try{\r\n copy = new Token(null);\r\n assertTrue(false);\r\n }catch(AssertionError e){\r\n assertTrue(true);\r\n };\r\n\r\n try{ //to catch the expception that should never be thrown\r\n //Test copy of EOF\r\n token = new Token(TokenType.EOF, \"\", 1);\r\n copy = new Token(token);\r\n assertTrue(token.getTokenType() == copy.getTokenType());\r\n assertTrue(token.getValue().equals(copy.getValue()));\r\n assertTrue(token.getValue() != copy.getValue());\r\n assertTrue(token.getLineNumber() == copy.getLineNumber());\r\n\r\n //Test copy of STRING\r\n token = new Token(TokenType.STRING, \"\", 2);\r\n copy = new Token(token);\r\n assertTrue(token.getTokenType() == copy.getTokenType());\r\n assertTrue(token.getValue().equals(copy.getValue()));\r\n assertTrue(token.getValue() != copy.getValue());\r\n assertTrue(token.getLineNumber() == copy.getLineNumber());\r\n\r\n token = new Token(TokenType.STRING, \"'\", 2);\r\n copy = new Token(token);\r\n assertTrue(token.getTokenType() == copy.getTokenType());\r\n assertTrue(token.getValue().equals(copy.getValue()));\r\n assertTrue(token.getValue() != copy.getValue());\r\n assertTrue(token.getLineNumber() == copy.getLineNumber());\r\n\r\n token = new Token(TokenType.STRING, \"'a'\", 2);\r\n copy = new Token(token);\r\n assertTrue(token.getTokenType() == copy.getTokenType());\r\n assertTrue(token.getValue().equals(copy.getValue()));\r\n assertTrue(token.getValue() != copy.getValue());\r\n assertTrue(token.getLineNumber() == copy.getLineNumber());\r\n\r\n //Test copy of IDENTIFIER\r\n token = new Token(TokenType.ID, \"a\", 2);\r\n copy = new Token(token);\r\n assertTrue(token.getTokenType() == copy.getTokenType());\r\n assertTrue(token.getValue().equals(copy.getValue()));\r\n assertTrue(token.getValue() != copy.getValue());\r\n assertTrue(token.getLineNumber() == copy.getLineNumber());\r\n\r\n token = new Token(TokenType.ID, \"a1b2\", 2);\r\n copy = new Token(token);\r\n assertTrue(token.getTokenType() == copy.getTokenType());\r\n assertTrue(token.getValue().equals(copy.getValue()));\r\n assertTrue(token.getValue() != copy.getValue());\r\n assertTrue(token.getLineNumber() == copy.getLineNumber());\r\n\r\n //Test copy of SCHEMES (we assume if this works it works for\r\n //FACTS, RULES, and QUERIES\r\n token = new Token(TokenType.SCHEMES, \"schemes\", 2);\r\n copy = new Token(token);\r\n assertTrue(token.getTokenType() == copy.getTokenType());\r\n assertTrue(token.getValue().equals(copy.getValue()));\r\n assertTrue(token.getValue() != copy.getValue());\r\n assertTrue(token.getLineNumber() == copy.getLineNumber());\r\n\r\n //Test copy of COLON_DASH\r\n token = new Token(TokenType.COLON_DASH, \":-\", 2);\r\n copy = new Token(token);\r\n assertTrue(token.getTokenType() == copy.getTokenType());\r\n assertTrue(token.getValue().equals(copy.getValue()));\r\n assertTrue(token.getValue() != copy.getValue());\r\n assertTrue(token.getLineNumber() == copy.getLineNumber());\r\n\r\n //Test copy of COLON\r\n token = new Token(TokenType.COLON, \":\", 2);\r\n copy = new Token(token);\r\n assertTrue(token.getTokenType() == copy.getTokenType());\r\n assertTrue(token.getValue().equals(copy.getValue()));\r\n assertTrue(token.getValue() != copy.getValue());\r\n assertTrue(token.getLineNumber() == copy.getLineNumber());\r\n\r\n //Test copy of COMMA\r\n token = new Token(TokenType.COMMA, \",\", 2);\r\n copy = new Token(token);\r\n assertTrue(token.getTokenType() == copy.getTokenType());\r\n assertTrue(token.getValue().equals(copy.getValue()));\r\n assertTrue(token.getValue() != copy.getValue());\r\n assertTrue(token.getLineNumber() == copy.getLineNumber());\r\n\r\n //Test copy of PERIOD\r\n token = new Token(TokenType.PERIOD, \".\", 2);\r\n copy = new Token(token);\r\n assertTrue(token.getTokenType() == copy.getTokenType());\r\n assertTrue(token.getValue().equals(copy.getValue()));\r\n assertTrue(token.getValue() != copy.getValue());\r\n assertTrue(token.getLineNumber() == copy.getLineNumber());\r\n\r\n //Test copy of LEFT_PAREN\r\n token = new Token(TokenType.LEFT_PAREN, \"(\", 2);\r\n copy = new Token(token);\r\n assertTrue(token.getTokenType() == copy.getTokenType());\r\n assertTrue(token.getValue().equals(copy.getValue()));\r\n assertTrue(token.getValue() != copy.getValue());\r\n assertTrue(token.getLineNumber() == copy.getLineNumber());\r\n\r\n //Test copy of RIGHT_PAREN\r\n token = new Token(TokenType.RIGHT_PAREN, \")\", 2);\r\n copy = new Token(token);\r\n assertTrue(token.getTokenType() == copy.getTokenType());\r\n assertTrue(token.getValue().equals(copy.getValue()));\r\n assertTrue(token.getValue() != copy.getValue());\r\n assertTrue(token.getLineNumber() == copy.getLineNumber());\r\n\r\n //Test copy of Q_MARK\r\n token = new Token(TokenType.Q_MARK, \"?\", 2);\r\n copy = new Token(token);\r\n assertTrue(token.getTokenType() == copy.getTokenType());\r\n assertTrue(token.getValue().equals(copy.getValue()));\r\n assertTrue(token.getValue() != copy.getValue());\r\n assertTrue(token.getLineNumber() == copy.getLineNumber());\r\n\r\n }catch(ParserException e){\r\n System.err.println(\"In TokenTest::testCopyConstructor()\\n\" +\r\n \"the following error should not occur\\n\" +\r\n e.getMessage());\r\n };\r\n }",
"public static NewExpression new_(Class type) { throw Extensions.todo(); }",
"private void checkAssignment(Assignment node) {\n String nodeName = node.name.name;\n boolean error = false;\n\n // check whether assignment would cause a loop\n if (node.value instanceof ConstantReference) {\n ConstantReference reference = ((ConstantReference) node.value);\n if (reference.name.equals(nodeName)) {\n node.setError(\"You can't assign a constant to itself.\");\n error = true;\n } else {\n isCircularReference(reference);\n }\n }\n // if assignment is an operation, check the operation\n if (node.value instanceof Operation) {\n checkOperation((Operation) node.value);\n }\n\n // if no error has been found add it to symboltable.\n if (!error) {\n symboltable.put(nodeName, node.value);\n }\n }",
"protected ChildType() {/* intentionally empty block */}",
"protected void _checkInvalidCopy(Class<?> exp)\n/* */ {\n/* 335 */ if (getClass() != exp) {\n/* 336 */ throw new IllegalStateException(\"Failed copy(): \" + getClass().getName() + \" (version: \" + version() + \") does not override copy(); it has to\");\n/* */ }\n/* */ }",
"abstract protected boolean checkType(String myType);",
"@SuppressWarnings(\"unchecked\")\n private BooleanFormula makeAssignment(Formula pFormula1, Formula pFormula2) {\n FormulaType<?> pType = mgr.getFormulaType(pFormula1);\n assertWithMessage(\n \"Trying to equalize two formulas %s and %s of different types %s and %s\",\n pFormula1, pFormula2, pType, mgr.getFormulaType(pFormula2))\n .that(mgr.getFormulaType(pFormula1).equals(mgr.getFormulaType(pFormula2)))\n .isTrue();\n if (pType.isBooleanType()) {\n return bmgr.equivalence((BooleanFormula) pFormula1, (BooleanFormula) pFormula2);\n } else if (pType.isIntegerType()) {\n return imgr.equal((IntegerFormula) pFormula1, (IntegerFormula) pFormula2);\n } else if (pType.isRationalType()) {\n return rmgr.equal((RationalFormula) pFormula1, (RationalFormula) pFormula2);\n } else if (pType.isBitvectorType()) {\n return bvmgr.equal((BitvectorFormula) pFormula1, (BitvectorFormula) pFormula2);\n } else if (pType.isFloatingPointType()) {\n return fpmgr.assignment((FloatingPointFormula) pFormula1, (FloatingPointFormula) pFormula2);\n } else if (pType.isArrayType()) {\n @SuppressWarnings(\"rawtypes\")\n ArrayFormula f2 = (ArrayFormula) pFormula2;\n return amgr.equivalence((ArrayFormula<?, ?>) pFormula1, f2);\n }\n throw new IllegalArgumentException(\n \"Cannot make equality of formulas with type \" + pType + \" in the Solver!\");\n }",
"boolean replacementfor(Type o);",
"private boolean isPossibleTokenTypeForNullnessAnnotations(final int tokenType) {\n return tokenType == TokenTypes.CLASS_DEF || tokenType == TokenTypes.INTERFACE_DEF\n || tokenType == TokenTypes.METHOD_DEF || tokenType == TokenTypes.CTOR_DEF\n || tokenType == TokenTypes.ENUM_DEF;\n }",
"@Override\n\tpublic boolean checkTypes() {\n\t\treturn false;\n\t}",
"public TypeUndefined() { super(\"undefined\"); }",
"abstract void assignOne();",
"private static boolean isOriginalTsType(TsType type) {\n if (type instanceof TsType.BasicType) {\n TsType.BasicType basicType = (TsType.BasicType)type;\n return !(basicType.name.equals(\"null\") || basicType.name.equals(\"undefined\"));\n }\n return true;\n }",
"protected void checkSubclass() {\n }",
"protected void checkSubclass() {\n }",
"protected void checkSubclass() {\n }",
"public getType_result(getType_result other) {\n __isset_bitfield = other.__isset_bitfield;\n this.success = other.success;\n }",
"public boolean canConvert(Object o) {\n // Initializes an instance of T\n Class<T> type = (Class<T>) ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[0];\n return type.isInstance(o);\n\n }",
"public TYPE SemantMe() {\n\t\tSYM_TABLE sym_table = SYM_TABLE.getInstance();\n\t\t\n\t\t// Lookup the name\n\t\tTYPE t = sym_table.find(this.type);\n\t\t// Check it\n\t\tif (t == null || !t.isTypeName())\n\t\t {\n\t\t\t// Code bug -- type given does not exist in table or just is not a name a of a type\n\t\t\treport_error();\n\t\t }\n\t\t\t// Its fine, declare it\n\t\treturn new TYPE_VAR_DEC(t.name,this.name);\n }",
"@Override\n\tpublic boolean isObjectTypeExpected() {\n\t\treturn false;\n\t}",
"public boolean testsSubtypeSensitiveVars()\n/* */ {\n/* 100 */ return (this.runtimeTest != null) && \n/* 101 */ (new SubtypeSensitiveVarTypeTestVisitor(null).testsSubtypeSensitiveVars(this.runtimeTest));\n/* */ }",
"public boolean equals(AssignOpType t) {\n\t\treturn this.toString().equals(t.toString());\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"@Override\r\n\tprotected void checkSubclass() {\n\t}",
"private ConsistentVariable(String name, Class<V> type, V initValue, long initVersion) {\n super(name, type);\n versionedValue = new AtomicReference<>(new VersionedValue<>(initVersion, initValue));\n }",
"protected void checkSubclass() {\n }",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"@Override\n\tprotected void checkSubclass() {\n\t}",
"private void assertType(String snippet, Class<? extends Object> type) {\n try {\n Lexer lexer = new Lexer(new StringReader(snippet));\n Parser parser = new Parser(lexer);\n RootNode node = parser.program();\n AssignNode assignment = (AssignNode) node.get(0);\n assertTrue(assignment.getRight().getClass() == type);\n } catch (IOException e) {\n fail(e.getMessage());\n }\n }",
"TIAssignment createTIAssignment();",
"Type(int lnum) {\n\t\tsuper(lnum);\n\t}",
"public void typeCheck(/*@NotNull*/ ExpressionVisitor visitor) throws XPathException {\n Expression value = getSelectExpression();\n if (value != null) {\n value.checkForUpdatingSubexpressions();\n if (value.isUpdatingExpression()) {\n throw new XPathException(\n \"Initializing expression for global variable must not be an updating expression\", \"XUST0001\");\n }\n RoleDiagnostic role = new RoleDiagnostic(\n RoleDiagnostic.VARIABLE, getVariableQName().getDisplayName(), 0);\n ContextItemStaticInfo cit = new ContextItemStaticInfo(AnyItemType.getInstance(), true);\n Expression value2 = TypeChecker.strictTypeCheck(\n value.simplify().typeCheck(visitor, cit),\n getRequiredType(), role, visitor.getStaticContext());\n value2 = value2.optimize(visitor, cit);\n setSelectExpression(value2);\n // the value expression may declare local variables\n SlotManager map = getConfiguration().makeSlotManager();\n int slots = ExpressionTool.allocateSlots(value2, 0, map);\n if (slots > 0) {\n setContainsLocals(map);\n }\n\n if (getRequiredType() == SequenceType.ANY_SEQUENCE && !(this instanceof GlobalParam)) {\n // no type was declared; try to deduce a type from the value\n try {\n final ItemType itemType = value.getItemType();\n final int cardinality = value.getCardinality();\n setRequiredType(SequenceType.makeSequenceType(itemType, cardinality));\n GroundedValue constantValue = null;\n if (value2 instanceof Literal) {\n constantValue = ((Literal) value2).getValue();\n }\n for (BindingReference reference : references) {\n if (reference instanceof VariableReference) {\n ((VariableReference) reference).refineVariableType(\n itemType, cardinality, constantValue, value.getSpecialProperties());\n }\n }\n } catch (Exception err) {\n // exceptions can happen because references to variables and functions are still unbound\n }\n }\n\n\n }\n }",
"public AssignExpr assign_expr() {\n if (lexer.token != Symbol.IDENT) {\n error.signal(\"Expecting identifier at assign expression\");\n }\n \n String type = symbolTable.getVariable(lexer.getStringValue());\n if(type == null){\n error.show(\"Tried to assign a value to a variable (\"+lexer.getStringValue()+\") that hasn't been declared.\");\n } else {\n if(type.equals(\"STRING\")){\n error.show(\"Tried to assign a value to a declared string variable (\"+lexer.getStringValue()+\")\");\n }\n }\n \n Ident id = new Ident(lexer.getStringValue());\n \n lexer.nextToken();\n if (lexer.token != Symbol.ASSIGN) {\n error.signal(\"Expecting assign symbol at assign expression\");\n }\n lexer.nextToken();\n Expr e = expr();\n\n if(type != null && type.toLowerCase().equals(\"int\") && e.getType(symbolTable) != null && e.getType(symbolTable).toLowerCase().equals(\"float\"))\n error.show(\"Trying to assign a \"+e.getType(symbolTable)+\" to a \"+type);\n else if (type != null && e.getType(symbolTable) != null && !type.equals(e.getType(symbolTable)))\n error.warning(\"Trying to assign a \"+e.getType(symbolTable)+\" to a \"+type);\n \n return new AssignExpr(id, e);\n }",
"public void check()\n {\n typeDec.check();\n }",
"public void checkNotPolymorphicOrUnknown() {\n if (isPolymorphic())\n throw new AnalysisException(\"Unexpected polymorphic value!\");\n if (isUnknown())\n throw new AnalysisException(\"Unexpected 'unknown' value!\");\n }",
"static boolean test(Type t0)\r\n {\r\n String s0 = Types.stringFor(t0);\r\n TypeParser typeParser = TypeParsers.create();\r\n typeParser.addTypeVariableName(\"E\");\r\n Type t1 = null;\r\n try\r\n {\r\n t1 = typeParser.parse(s0);\r\n } \r\n catch (ClassNotFoundException e)\r\n {\r\n fail(e.getMessage());\r\n }\r\n \r\n String message = \"\";\r\n message += \"Input \" + s0 + \"\\n\";\r\n message += \"should be \" + t0 + \"\\n\";\r\n message += \"was parsed to \" + t1 + \"\\n\";\r\n \r\n boolean passed = TypesEquivalent.areEquivalent(t0, t1);\r\n if (!passed || DEBUG)\r\n {\r\n PrintStream ps = System.out;\r\n if (!passed)\r\n {\r\n ps = System.err;\r\n }\r\n String detailedMessage = \"\";\r\n detailedMessage += \"Input \" + s0 + \"\\n\";\r\n detailedMessage += \"should be \" + t0 + \" \" \r\n + \"(Detailed: \" + Types.debugStringFor(t0) + \")\" + \"\\n\";\r\n detailedMessage += \"was parsed to \" + t1 + \" \" \r\n + \"(Detailed: \" + Types.debugStringFor(t1) + \")\" + \"\\n\";\r\n ps.print(detailedMessage);\r\n }\r\n assertTrue(message, passed);\r\n return passed;\r\n }",
"private void checkInstanceOf(Set<FlowAbstraction> in, Unit d, Set<FlowAbstraction> out) {\n if (d instanceof AbstractDefinitionStmt) {\n AbstractDefinitionStmt def = (AbstractDefinitionStmt) d;\n Value leftSide = def.getLeftOp();\n Value rightSide = def.getRightOp();\n if(leftSide instanceof Local && rightSide instanceof AbstractInstanceOfExpr) {\n AbstractInstanceOfExpr expr = (AbstractInstanceOfExpr) rightSide;\n FlowAbstraction taint = isInTaintedSet(expr.getOp(), in);\n if(taint != null) {\n \t\n taint(leftSide, d, out);\n \n }\n }\n }\n }",
"public org.python.types.Type __new__(org.python.types.Type cls);",
"@Test\n public void noEqualsName() {\n final CourseType courseType1 = new CourseType(\"N\", \"Pic\", 5, 1);\n courseType1.setId(\"ID\");\n courseType1.setCourses(List.of(new Course(\"C1\"), new Course(\"C2\")));\n courseType1.setAllowedDishes(List.of(new Dish(\"D1\"), new Dish(\"D2\")));\n final CourseType courseType2 = new CourseType(\"N2\", \"Pic\", 5, 1);\n courseType2.setId(\"ID\");\n courseType2.setCourses(List.of(new Course(\"C1\"), new Course(\"C2\")));\n courseType2.setAllowedDishes(List.of(new Dish(\"D1\"), new Dish(\"D2\")));\n final CourseType courseTypeNull = new CourseType(null, \"Pic\", 5, 1);\n courseTypeNull.setId(\"ID\");\n courseTypeNull.setCourses(List.of(new Course(\"C1\"), new Course(\"C2\")));\n courseTypeNull.setAllowedDishes(List.of(new Dish(\"D1\"), new Dish(\"D2\")));\n\n assertNotEquals(courseType1, courseType2);\n assertNotEquals(courseType1, courseTypeNull);\n assertNotEquals(courseTypeNull, courseType1);\n }",
"public boolean uniSameAs(Type other, TypeFixer fixer) throws LookupException;"
]
| [
"0.56861794",
"0.5677495",
"0.5670954",
"0.56514144",
"0.55909634",
"0.53877413",
"0.53046757",
"0.52084583",
"0.5164717",
"0.5150835",
"0.50789315",
"0.5053764",
"0.50512725",
"0.5007693",
"0.49112165",
"0.4906606",
"0.48636672",
"0.4837636",
"0.48277938",
"0.48247334",
"0.4792589",
"0.47837412",
"0.4770163",
"0.47476792",
"0.4738029",
"0.4728487",
"0.47254446",
"0.47188798",
"0.4713716",
"0.4702618",
"0.469505",
"0.46833742",
"0.46794307",
"0.4672322",
"0.46594602",
"0.4651381",
"0.46473777",
"0.46354726",
"0.4630247",
"0.4626755",
"0.4626649",
"0.46247667",
"0.46097016",
"0.46056834",
"0.45805854",
"0.45702574",
"0.4563807",
"0.4563807",
"0.4563807",
"0.45526794",
"0.45490673",
"0.45484447",
"0.45458785",
"0.4545318",
"0.45430186",
"0.453734",
"0.453734",
"0.453734",
"0.453734",
"0.453734",
"0.453734",
"0.453734",
"0.453734",
"0.453734",
"0.453734",
"0.453734",
"0.453734",
"0.453734",
"0.453734",
"0.45287275",
"0.45249316",
"0.45202935",
"0.45202935",
"0.45202935",
"0.45202935",
"0.45202935",
"0.45202935",
"0.45202935",
"0.45202935",
"0.45202935",
"0.45202935",
"0.45202935",
"0.45202935",
"0.45202935",
"0.45202935",
"0.45202935",
"0.45202935",
"0.45202935",
"0.45178246",
"0.45159692",
"0.451069",
"0.4505993",
"0.45045355",
"0.44927183",
"0.4489361",
"0.44871747",
"0.44844788",
"0.4476145",
"0.44725943",
"0.44710058"
]
| 0.54455274 | 5 |
Return direct ancestors, that means the superclasses and interfaces implemented directly. This list should include Object if the class has no other superclass or the interface is not extending another interface. There is an exception for Object itself. | public abstract List<ResolvedReferenceType> getDirectAncestors(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.util.List getOrderedAncestors();",
"private static HashSet<Class<?>> getInstrumentedAncestors(Class<?> cls) {\n HashSet<Class<?>> ancestors = new HashSet<>();\n\n for (Method m : cls.getDeclaredMethods()) {\n if (m.getName().startsWith(\"yGet_\")) {\n ancestors.add(cls);\n // If the current class is instrumented, check for its super classes.\n ancestors.addAll(getInstrumentedAncestors(cls.getSuperclass()));\n return ancestors;\n }\n }\n\n return ancestors;\n }",
"public List getParents()\n {\n \tList result = new ArrayList();\n \tModelFacade instance = ModelFacade.getInstance(this.refOutermostPackage().refMofId());\n\n \tif (instance != null)\n \t{\n \t if (instance.isRepresentative(this.refMofId())&&\n \t instance.hasRefObject(this.refMofId()))\n \t {\n \t if (getGeneralization().isEmpty() && !(this instanceof Interface) && !(this instanceof Enumeration))\n \t {\n \t \tresult.add(OclLibraryHelper.getInstance(this).\n \t\t\t\t\t\t\t\t\t\t\tgetAny());\n \t return result;\n \t \t }\n \t } \t \n \t \n\t \tif (equals(OclLibraryHelper.getInstance(this).getVoid()))\n\t \t{\n\t \t\tModel topPackage = ModelHelper.\n\t \t\t\t\t\t\t \t\tgetInstance(\n\t \t\t\t\t\t\t \t\t\t\t(Uml15Package) this.refOutermostPackage()).\n\t \t\t\t\t\t\t \t\t\t\t\t\tgetTopPackage();\n\t \t\tresult.addAll(((NamespaceImpl)topPackage).getAllClassesWithoutSpez());\n\t \t\treturn result;\n\t \t}\n \t} \n \tIterator it = getGeneralization().iterator();\n\n \twhile(it.hasNext())\n \t{\n \t Generalization g = (Generalization)it.next(); \n \t result.add(g.getParent());\n \t}\n \treturn result;\n }",
"public List getAncestors() {\n\t\tif (this.ancestors == null) {\n\t\t\tancestors = new ArrayList();\n\t\t\tTeachersDomainStandardsNode myParent = parent;\n\t\t\twhile (myParent != null && myParent.getLevel() > 0) {\n\t\t\t\tancestors.add(myParent);\n\t\t\t\tmyParent = myParent.getParent();\n\t\t\t}\n\t\t}\n\t\treturn ancestors;\n\t}",
"public ArrayList<String> getAncestorClasses() {\n\t\treturn ancestorClasses;\n\t}",
"public List getAncestors() {\n\t\treturn new ArrayList();\n\t}",
"Liste<? extends Binarbre<E>> ancestors();",
"public List<AlfClass> getParents() {\t\r\n\t\tList<AlfClass> parents = new ArrayList<AlfClass>(this.strongParents);\r\n\t\tparents.addAll(this.weakParents);\r\n\t\treturn Collections.unmodifiableList(parents);\r\n\t}",
"public interface Ancestors extends Serializable, Comparable<Ancestors> {\n\n\t/**\n\t * @return the tree path of the node. This contains the path in the form of indexes. e.g. 50.1.2.2\n\t */\n\tTreePath getTreePath();\n\n\t/**\n\t * @return the ancestor matrices. This contains all path matrix from root path matrix to this path matrix.\n\t */\n\tList<PathMatrix> getAncestorMatrices();\n\n\t/**\n\t * @return the reference path matrix\n\t */\n\tPathMatrix getPathMatrix();\n}",
"public Iterator<IEventType<T>> getDeepSuperTypes();",
"@JsonIgnore\n public List<String> getAncestorTypeNames() {\n if(ancestorDefs != null && !ancestorDefs.isEmpty()) {\n return ancestorDefs.values().stream().map(type -> type.asTypeString()).collect(Collectors.toList());\n } else if (ancestors != null) {\n return ancestors;\n } else {\n return new ArrayList<>();\n }\n }",
"java.util.List<org.mojolang.mojo.lang.NominalType> \n getInheritsList();",
"public Set<JavaType.ClassJavaType> superTypes() {\n ImmutableSet.Builder<JavaType.ClassJavaType> types = ImmutableSet.builder();\n JavaType.ClassJavaType superClassType = (JavaType.ClassJavaType) this.superClass();\n types.addAll(this.interfacesOfType());\n while (superClassType != null) {\n types.add(superClassType);\n TypeJavaSymbol superClassSymbol = superClassType.getSymbol();\n types.addAll(superClassSymbol.interfacesOfType());\n superClassType = (JavaType.ClassJavaType) superClassSymbol.superClass();\n }\n return types.build();\n }",
"protected List getAllowedAncestors() {\n return ALLOWED_ANCESTORS;\n }",
"java.util.List<? extends org.mojolang.mojo.lang.NominalTypeOrBuilder> \n getInheritsOrBuilderList();",
"@SuppressWarnings(\"unchecked\")\n public static Stream<String> supers(ClassNode node) {\n if (node.superName == null) { // Object, no interfaces or superclass\n return Stream.empty();\n }\n return Stream.concat(\n Stream.of(node.superName),\n ((List<String>) node.interfaces).stream()\n );\n }",
"XClass getSuperclass();",
"java.util.List<? extends org.jetbrains.r.classes.S4ClassInfo.S4SuperClassOrBuilder> \n getSuperClassesOrBuilderList();",
"java.util.List<org.jetbrains.r.classes.S4ClassInfo.S4SuperClass> \n getSuperClassesList();",
"public Set<AlfClass> getStrongParents()\r\n\t{\treturn Collections.unmodifiableSet(this.strongParents);\t}",
"public static Set<AnnotatedDeclaredType> getSuperTypes(AnnotatedDeclaredType type) {\n\n Set<AnnotatedDeclaredType> supertypes = new LinkedHashSet<>();\n if (type == null) {\n return supertypes;\n }\n\n // Set up a stack containing the type mirror of subtype, which\n // is our starting point.\n Deque<AnnotatedDeclaredType> stack = new ArrayDeque<>();\n stack.push(type);\n\n while (!stack.isEmpty()) {\n AnnotatedDeclaredType current = stack.pop();\n\n // For each direct supertype of the current type, if it\n // hasn't already been visited, push it onto the stack and\n // add it to our supertypes set.\n for (AnnotatedDeclaredType supertype : current.directSuperTypes()) {\n if (!supertypes.contains(supertype)) {\n stack.push(supertype);\n supertypes.add(supertype);\n }\n }\n }\n\n return Collections.<AnnotatedDeclaredType>unmodifiableSet(supertypes);\n }",
"public Set<JmiClassVertex> getAllSuperclassVertices(JmiClassVertex vertex)\n {\n return getClassAttributes(vertex).allSuperclassVertices;\n }",
"public final List<Integer> getHierarchyGaps() {\r\n\t\tList<Integer> gaps = new ArrayList<Integer>();\r\n\t\tgaps.add(0);\r\n\t\tHeaderItem root = header.getFirstRoot();\r\n\t\tif(root == null)\r\n\t\t\treturn gaps;\r\n\t\twhile(root.hasRootsInNextLevel()) {\r\n\t\t\troot = root.getFirstRootInNextLevel();\r\n\t\t\tgaps.add(header.getWidgetTop(root));\r\n\t\t}\r\n\t\treturn gaps;\r\n\t}",
"public List<ClassOrInterfaceDeclaration> getInterfaces() {\n return this.clsOrInterfDeclrs;\n }",
"public default List<Type> getProperDirectSuperTypes() throws LookupException {\n\t\tList<Type> result = Lists.create();\n\t\tfor(InheritanceRelation element:inheritanceRelations()) {\n\t\t\tType type = element.superType();\n\t\t\tif (type!=null) {\n\t\t\t\tresult.add(type);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"Set<Interface> getInterfaces();",
"public String[] getInterfaces() {\n return m_classBuilder.getInterfaces();\n }",
"public static Set findAllImplementedInterfaces(Class clazz) {\n Set s = new HashSet();\n Class[] interfaces = clazz.getInterfaces();\n for (int i = 0; i < interfaces.length; i++) {\n s.add(interfaces[i]);\n }\n Class superclass = clazz.getSuperclass();\n if (superclass != null) {\n s.addAll(findAllImplementedInterfaces(superclass));\n }\n return s;\n }",
"private static <T> Collection<Class<?>> getClassHierarchy(T instance) {\n Collection<Class<?>> hierarchy = new LinkedList<>();\n Class<?> clazz = (Class<?>) instance;\n while (clazz != null) {\n hierarchy.add(clazz);\n clazz = clazz.getSuperclass();\n }\n return hierarchy;\n }",
"public String getInvitedAncestorIds() {\n return invitedAncestorIds;\n }",
"public Set<Category> getAncestors(Annotatable ann, Set<String> categories);",
"int getInheritsCount();",
"public default List<InheritanceRelation> inheritanceRelations() throws LookupException {\n return nonMemberInheritanceRelations();\n }",
"Set<Concept> getSuperclasses(Concept concept);",
"public Set<AlfClass> getWeakParents()\r\n\t{\treturn Collections.unmodifiableSet(this.weakParents);\t}",
"public List <RMShape> getShapesToAncestor(RMShape aShape)\n{\n // Iterate and add up this shape and parents until given ancestor is added (or we run out)\n List ancestors = new ArrayList();\n for(RMShape shape=this; shape!=null; shape=shape.getParent()) {\n ancestors.add(shape);\n if(shape==aShape)\n break;\n }\n \n // Return ancestors\n return ancestors;\n}",
"public Collection<Interface> getInterfaces() {\n\t\treturn this.interfaces;\n\t}",
"public Vector<HibernateEntity> getEntitiesAllowedAsParent() {\n\t\tVector<HibernateEntity> result = new Vector<HibernateEntity>();\n\t\tfor (HibernateEntity entity : getHibernateModel().getEntities()) {\n\t\t\tif (entity != this && entity.getFather() == null) {\n\t\t\t\tresult.add(entity);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}",
"public Collection<ClassTranslator> getInterfaces();",
"public Hierarchy[] getHierarchies() {\r\n return axis.getHierarchies();\r\n }",
"public List<TempTableHeader> getParents() {\r\n\t\t\treturn parents;\r\n\t\t}",
"public List<Category> getParents() {\n\t\treturn parents;\n\t}",
"public IEventType<T>[] getSuperTypes();",
"public ArrayList<InterfaceType> getAllInterfaces() {\n HashSet<InterfaceType> set = new HashSet<>();\n ArrayList<InterfaceType> list = new ArrayList<>();\n\n for (InterfaceType interfaceType : getInterfaces()) {\n for (InterfaceType type : interfaceType.getAllInterfaces()) {\n if (set.add(type)) list.add(type);\n }\n }\n\n return list;\n }",
"default List<TypeInfo> allTypes() {\n List<TypeInfo> allTypes = new LinkedList<>();\n allTypes.add(this);\n allTypes.addAll(Arrays.asList(interfaces()));\n allTypes.addAll(superClass().stream().flatMap(s -> s.allTypes().stream()).collect(Collectors.toList()));\n return allTypes;\n }",
"@SuppressWarnings(\"rawtypes\")\n\tpublic List getInterfaces(){\n\t\treturn targetClass.interfaces;\n\t}",
"public Enumeration getPropertyNames()\n {\n final EnumerationUnion eu = new EnumerationUnion();\n if( properties != null )\n {\n eu.add( properties.keys() );\n }\n if( ancestors != null )\n {\n final int size = ancestors.size();\n for( int i = 0; i < size; i++ )\n {\n final ScriptingClass clazz = (ScriptingClass)\n ancestors.elementAt( i );\n eu.add( clazz.getPropertyNames() );\n }\n }\n try\n {\n final ScriptingClass object = getClassLoader().load( \"object\" );\n eu.add( object.getPropertyNames() );\n }\n catch( ScriptingClassNotFoundException e )\n {\n }\n return eu;\n }",
"public String getSuperclass() {\n\t\treturn null;\n\t}",
"@Override\n @Nullable\n public JavaType getSuperclass() {\n return null;\n }",
"public ArrayList<BackupImage> getAncestors(BackupInfo backupInfo, TableName table)\n throws IOException {\n ArrayList<BackupImage> ancestors = getAncestors(backupInfo);\n ArrayList<BackupImage> tableAncestors = new ArrayList<>();\n for (BackupImage image : ancestors) {\n if (image.hasTable(table)) {\n tableAncestors.add(image);\n if (image.getType() == BackupType.FULL) {\n break;\n }\n }\n }\n return tableAncestors;\n }",
"public ClassTranslator getSuperclass();",
"public static Set<Class<?>> getInterfaceClosure(Class<?> clazz) {\n Set<Class<?>> result = new HashSet<>();\n for (Class<?> classToDiscover = clazz; classToDiscover != null; classToDiscover = classToDiscover.getSuperclass()) {\n addInterfaces(classToDiscover, result);\n }\n return result;\n }",
"public Set<Profile> getRelatives() {\n\t\tSet<Profile> parents = new HashSet<>();\n\t\tparents.add(_parent1);\n\t\tparents.add(_parent2);\n\t\treturn parents;\n\t}",
"org.mojolang.mojo.lang.NominalType getInherits(int index);",
"org.jetbrains.r.classes.S4ClassInfo.S4SuperClass getSuperClasses(int index);",
"public Collection getAncestorClasses(OWLClass aClass, ReasonerTaskListener taskListener) throws DIGReasonerException;",
"int getSuperClassesCount();",
"public TypeData getSuperClass() {\n return m_superClass;\n }",
"private static void getClassHierarchy(Class clazz) {\n List<String> classNames = new ArrayList<>();\n while (clazz != null) {\n classNames.add(clazz.getName());\n clazz = clazz.getSuperclass();\n }\n for (int i = classNames.size() - 1; i >= 0; i--) {\n System.out.println(classNames.get(i));\n if (i > 0) {\n System.out.println(\" ^\");\n System.out.println(\" |\");\n }\n }\n }",
"public org.exolab.castor.mapping.ClassDescriptor getExtends()\n {\n return null;\n }",
"public org.exolab.castor.mapping.ClassDescriptor getExtends()\n {\n return null;\n }",
"public org.exolab.castor.mapping.ClassDescriptor getExtends()\n {\n return null;\n }",
"public List<Class<?>> getAllSuperTypes(Class<?> aClass) {\n\t\tList<Class<?>> result = new ArrayList<Class<?>>();\n\n\t\tthis.getAllSuperTypes(aClass, result);\n\t\tthis.getAllInterfaces(aClass, result);\n\n\t\treturn result;\n\t}",
"public Iterator<String> listRootClasses()\r\n\t{\r\n\t\treturn new ToStringIterator<String>(ONT_MODEL.listHierarchyRootClasses().filterDrop( new Filter() {\r\n public boolean accept( Object o ) {\r\n return ((Resource) o).isAnon();\r\n }} )\r\n );\t\t\r\n\t}",
"private static Stream<Class<?>> superTypes(Class<?> type) {\n Class<?>[] interfaces = type.getInterfaces();\n return Stream.concat(\n Arrays.stream(interfaces).flatMap(SqlObjectFactory::superTypes),\n Arrays.stream(interfaces));\n }",
"protected static List<SymbolTable> getParentTables(Traversable obj) {\n List<SymbolTable> ret = new ArrayList<SymbolTable>();\n Traversable p = obj.getParent();\n while (p != null) {\n if (p instanceof SymbolTable) {\n ret.add((SymbolTable)p);\n }\n p = p.getParent();\n }\n return ret;\n }",
"HashMap<String, Set<URI>> getExternalSuperClasses();",
"@Override\n public List<JavaType> getInterfaces() {\n return ImmutableList.of();\n }",
"public List<Class<?>> getSuperClasses(Class<?> aClass) {\n\t\treturn ModelClasses.getAllSuperClasses(aClass);\n\t}",
"public ArrayList<BackupImage> getAncestors(BackupInfo backupInfo) throws IOException {\n LOG.debug(\"Getting the direct ancestors of the current backup {}\", backupInfo.getBackupId());\n\n ArrayList<BackupImage> ancestors = new ArrayList<>();\n\n // full backup does not have ancestor\n if (backupInfo.getType() == BackupType.FULL) {\n LOG.debug(\"Current backup is a full backup, no direct ancestor for it.\");\n return ancestors;\n }\n\n // get all backup history list in descending order\n ArrayList<BackupInfo> allHistoryList = getBackupHistory(true);\n for (BackupInfo backup : allHistoryList) {\n\n BackupImage.Builder builder = BackupImage.newBuilder();\n\n BackupImage image = builder.withBackupId(backup.getBackupId()).withType(backup.getType())\n .withRootDir(backup.getBackupRootDir()).withTableList(backup.getTableNames())\n .withStartTime(backup.getStartTs()).withCompleteTime(backup.getCompleteTs()).build();\n\n // Only direct ancestors for a backup are required and not entire history of backup for this\n // table resulting in verifying all of the previous backups which is unnecessary and backup\n // paths need not be valid beyond the lifetime of a backup.\n //\n // RootDir is way of grouping a single backup including one full and many incremental backups\n if (!image.getRootDir().equals(backupInfo.getBackupRootDir())) {\n continue;\n }\n\n // add the full backup image as an ancestor until the last incremental backup\n if (backup.getType().equals(BackupType.FULL)) {\n // check the backup image coverage, if previous image could be covered by the newer ones,\n // then no need to add\n if (!BackupManifest.canCoverImage(ancestors, image)) {\n ancestors.add(image);\n }\n } else {\n // found last incremental backup, if previously added full backup ancestor images can cover\n // it, then this incremental ancestor is not the dependent of the current incremental\n // backup, that is to say, this is the backup scope boundary of current table set.\n // Otherwise, this incremental backup ancestor is the dependent ancestor of the ongoing\n // incremental backup\n if (BackupManifest.canCoverImage(ancestors, image)) {\n LOG.debug(\"Met the backup boundary of the current table set:\");\n for (BackupImage image1 : ancestors) {\n LOG.debug(\" BackupID={}, BackupDir={}\", image1.getBackupId(), image1.getRootDir());\n }\n } else {\n Path logBackupPath =\n HBackupFileSystem.getBackupPath(backup.getBackupRootDir(), backup.getBackupId());\n LOG.debug(\n \"Current backup has an incremental backup ancestor, \"\n + \"touching its image manifest in {}\" + \" to construct the dependency.\",\n logBackupPath.toString());\n BackupManifest lastIncrImgManifest = new BackupManifest(conf, logBackupPath);\n BackupImage lastIncrImage = lastIncrImgManifest.getBackupImage();\n ancestors.add(lastIncrImage);\n\n LOG.debug(\"Last dependent incremental backup image: {BackupID={}\" + \"BackupDir={}}\",\n lastIncrImage.getBackupId(), lastIncrImage.getRootDir());\n }\n }\n }\n LOG.debug(\"Got {} ancestors for the current backup.\", ancestors.size());\n return ancestors;\n }",
"public static List<Class> getLocalRemoteInterfaces(Class toAnalyse) {\r\n\t\tfinal List<Class> back = new ArrayList<Class>();\r\n\t\tif (toAnalyse != null) {\r\n\t\t\tClass[] interfaces = toAnalyse.getInterfaces();\r\n\t\t\tif (interfaces != null) {\r\n\t\t\t\tfor (Class<Object> interf : interfaces) {\r\n\t\t\t\t\tif (interf.getAnnotation(Local.class) != null\r\n\t\t\t\t\t\t\t|| interf.getAnnotation(Remote.class) != null) {\r\n\t\t\t\t\t\tback.add(interf);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn back;\r\n\t}",
"public Set<Class<?>> getUntestedInterfaces() {\n\t\tfinal Set<Class<?>> retval = new TreeSet<Class<?>>(\n\t\t\t\tCLASS_NAME_COMPARATOR);\n\n\t\tfor (final InterfaceInfo info : getInterfaceInfoMap().values()) {\n\t\t\t// no test and has methods\n\t\t\tif (info.getTests().isEmpty() && info.getName().getDeclaredMethods().length > 0) {\n\t\t\t\tretval.add(info.getName());\n\t\t\t}\n\t\t}\n\t\treturn retval;\n\t}",
"TypeInfo[] interfaces();",
"Iterator getAncestorOrSelfAxisIterator(Object contextNode) throws UnsupportedAxisException;",
"default List<SemanticRegion<T>> children() {\n List<SemanticRegion<T>> result = new LinkedList<>();\n for (SemanticRegion<T> r : this) {\n if (equals(r.parent())) {\n result.add(r);\n }\n }\n return result;\n }",
"public Enumeration getMethodNames()\n {\n final EnumerationUnion eu = new EnumerationUnion();\n if( methods != null )\n {\n eu.add( methods.keys() );\n }\n if( ancestors != null )\n {\n final int size = ancestors.size();\n for( int i = 0; i < size; i++ )\n {\n final ScriptingClass clazz = (ScriptingClass)\n ancestors.elementAt( i );\n eu.add( clazz.getMethodNames() );\n }\n }\n try\n {\n final ScriptingClass object = getClassLoader().load( \"object\" );\n eu.add( object.getMethodNames() );\n }\n catch( ScriptingClassNotFoundException e )\n {\n }\n return eu;\n }",
"public Object[] getImplementations() {\n\t\tObject[] res = { HackProjectLearner.class };\n\t\treturn res;\n\t}",
"public int getAncestorCount() { return _parent!=null? getParent().getAncestorCount() + 1 : 0; }",
"public Set<Class<?>> getAllInterfaces(Class<?> clazz) {\n\t\tSet<Class<?>> result = new HashSet<Class<?>>();\n\t\tgetAllInterfaces(result, clazz);\n\t\treturn result;\n\t}",
"@Override\n public Set<LocationHierarchy> findEnclosingLocationHierarchies(LocationHierarchyLevel entity) {\n Set<LocationHierarchy> onLevel = new HashSet<>();\n onLevel.addAll(locationHierarchyService.findByLevel(entity));\n return onLevel;\n }",
"@Override\r\n\tpublic TypeWrapper getSuperClass() {\n\t\treturn null;\r\n\t}",
"Iterator getAncestorAxisIterator(Object contextNode) throws UnsupportedAxisException;",
"public abstract List<AbstractNodeTypeImplementation> getImplementations();",
"public String hierarchy();",
"<T> IList<T> getImplementingObjects(Class<T> interfaceType);",
"public static Set<Class<?>> getAllInterfacesForClassAsSet(\n Class<?> clazz, @Nullable ClassLoader classLoader) {\n Assert.notNull(clazz, \"Class must not be null\");\n\n if (clazz.isInterface() && isVisible(clazz, classLoader)) {\n return Collections.singleton(clazz);\n }\n\n Set<Class<?>> interfaces = new LinkedHashSet<>();\n Class<?> currentClass = clazz;\n\n while (currentClass != null) {\n Class<?>[] interfaceArray = currentClass.getInterfaces();\n for (Class<?> cl : interfaceArray) {\n if (isVisible(cl, classLoader)) {\n interfaces.add(cl);\n }\n }\n currentClass = currentClass.getSuperclass();\n }\n\n return interfaces;\n }",
"public static List m149887a(Class cls) {\n if (cls == null) {\n return null;\n }\n ArrayList arrayList = new ArrayList();\n while (cls != null) {\n Class[] interfaces = cls.getInterfaces();\n for (int i = 0; i < interfaces.length; i++) {\n if (!arrayList.contains(interfaces[i])) {\n arrayList.add(interfaces[i]);\n }\n for (Class cls2 : m149887a(interfaces[i])) {\n if (!arrayList.contains(cls2)) {\n arrayList.add(cls2);\n }\n }\n }\n cls = cls.getSuperclass();\n }\n return arrayList;\n }",
"public ClassDescriptor getExtends() {\n return _extends;\n }",
"public List<ResourceReference> origins() {\n return this.innerProperties() == null ? null : this.innerProperties().origins();\n }",
"@VisibleForTesting\n List<ExecNode<?>> calculatePipelinedAncestors(ExecNode<?> node) {\n List<ExecNode<?>> ret = new ArrayList<>();\n AbstractExecNodeExactlyOnceVisitor ancestorVisitor =\n new AbstractExecNodeExactlyOnceVisitor() {\n @Override\n protected void visitNode(ExecNode<?> node) {\n boolean hasAncestor = false;\n\n if (!boundaries.contains(node)) {\n List<InputProperty> inputProperties = node.getInputProperties();\n for (int i = 0; i < inputProperties.size(); i++) {\n // we only go through PIPELINED edges\n if (inputProperties\n .get(i)\n .getDamBehavior()\n .stricterOrEqual(safeDamBehavior)) {\n continue;\n }\n hasAncestor = true;\n node.getInputEdges().get(i).getSource().accept(this);\n }\n }\n\n if (!hasAncestor) {\n ret.add(node);\n }\n }\n };\n node.accept(ancestorVisitor);\n return ret;\n }",
"public List<BaseClass> baseClasses() {\r\n\t\treturn this.baseClasses;\r\n\t}",
"public Iterator<String> listIntersectionClasses()\r\n\t{\r\n\t\treturn new ToStringIterator<String>(ONT_MODEL.listIntersectionClasses().filterDrop( new Filter() {\r\n public boolean accept( Object o ) {\r\n return ((Resource) o).isAnon();\r\n }} )\r\n );\r\n\t}",
"public static VSOPClass commonAncestor(VSOPClass c1, VSOPClass c2) {\n\t\tStack<VSOPClass> s1 = new Stack<>();\n\t\twhile (c1 != null) {\n\t\t\ts1.push(c1);\n\t\t\tc1 = c1.superClass;\n\t\t}\n\n\t\tStack<VSOPClass> s2 = new Stack<>();\n\t\twhile (c2 != null) {\n\t\t\ts2.push(c2);\n\t\t\tc2 = c2.superClass;\n\t\t}\n\n\t\tVSOPClass common = null;\n\t\twhile (!s1.isEmpty() && !s2.isEmpty() && s1.peek() == s2.peek()) {\n\t\t\tcommon = s1.pop();\n\t\t\ts2.pop();\n\t\t}\n\n\t\treturn common;\n\t}",
"public Integer getSuperclass() {\n return superclass;\n }",
"public int[] getInterfaces() {\n return interfaces;\n }",
"org.jetbrains.r.classes.S4ClassInfo.S4SuperClassOrBuilder getSuperClassesOrBuilder(\n int index);",
"public IAstTopLevelNode[] getTopLevelNodes();",
"Object getParent();",
"public static Set<Class<?>> getAllInterfacesAsSet(Object instance) {\n Assert.notNull(instance, \"Instance must not be null\");\n\n return getAllInterfacesForClassAsSet(instance.getClass());\n }",
"private Set<ExecutableElement> getHookMethodsFromInterfaces() {\n return component\n .getInterfaces()\n .stream()\n .map(DeclaredType.class::cast)\n .map(DeclaredType::asElement)\n .map(TypeElement.class::cast)\n .flatMap(typeElement -> ElementFilter\n .methodsIn(typeElement.getEnclosedElements())\n .stream())\n .filter(method -> hasAnnotation(method, HookMethod.class))\n .peek(this::validateHookMethod)\n .collect(Collectors.toSet());\n }"
]
| [
"0.65921986",
"0.6508026",
"0.6506479",
"0.64868313",
"0.6442258",
"0.64275074",
"0.6366407",
"0.61656976",
"0.6140753",
"0.60767925",
"0.6029633",
"0.60043794",
"0.5890394",
"0.5774846",
"0.5769164",
"0.57042825",
"0.56005347",
"0.55674237",
"0.5563204",
"0.5427849",
"0.54158145",
"0.5412053",
"0.54064333",
"0.5365555",
"0.53589094",
"0.5342809",
"0.5334227",
"0.53199476",
"0.53141564",
"0.5288882",
"0.5218718",
"0.5213885",
"0.52083933",
"0.52073604",
"0.5177024",
"0.5149184",
"0.5148175",
"0.5137972",
"0.5135789",
"0.51233196",
"0.51186943",
"0.510847",
"0.5102903",
"0.5089606",
"0.50689065",
"0.5065919",
"0.5060117",
"0.5060016",
"0.5052746",
"0.5041309",
"0.50302935",
"0.50216883",
"0.4989351",
"0.4981678",
"0.497184",
"0.49678487",
"0.4967705",
"0.4966749",
"0.49634638",
"0.49557838",
"0.49557838",
"0.49557838",
"0.4949198",
"0.49475527",
"0.49444127",
"0.49419302",
"0.49394754",
"0.49342752",
"0.4933833",
"0.49098015",
"0.48991117",
"0.48966622",
"0.48892036",
"0.48824427",
"0.48818648",
"0.4873417",
"0.48702276",
"0.4857986",
"0.48567313",
"0.4838561",
"0.4824848",
"0.48172635",
"0.48125097",
"0.48073533",
"0.4806541",
"0.4802625",
"0.47947827",
"0.4781405",
"0.47788754",
"0.47755548",
"0.47737038",
"0.47720033",
"0.47709605",
"0.47652388",
"0.47547394",
"0.47470793",
"0.47380298",
"0.47313207",
"0.47290814",
"0.47285855"
]
| 0.6915651 | 0 |
/ / Type parameters / Get the type associated with the type parameter with the given name. It returns Optional.empty unless the type declaration declares a type parameter with the given name. | public Optional<ResolvedType> getGenericParameterByName(String name) {
for (ResolvedTypeParameterDeclaration tp : typeDeclaration.getTypeParameters()) {
if (tp.getName().equals(name)) {
return Optional.of(this.typeParametersMap().getValue(tp));
}
}
return Optional.empty();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Optional<TypeUsage> getGenericParameterByName(String name) {\n int i = 0;\n for (TypeParameter tp : typeDeclaration.getTypeParameters()) {\n if (tp.getName().equals(name)) {\n return Optional.of(this.typeParameters.get(i));\n }\n i++;\n }\n return Optional.empty();\n }",
"Type<?> get(String name);",
"public Optional<ResolvedType> getFieldType(String name) {\n if (!typeDeclaration.hasField(name)) {\n return Optional.empty();\n }\n ResolvedType type = typeDeclaration.getField(name).getType();\n type = useThisTypeParametersOnTheGivenType(type);\n return Optional.of(type);\n }",
"public ParameterType getType();",
"public Optional<TypeUsage> getFieldType(String name) {\n if (!typeDeclaration.hasField(name)) {\n return Optional.empty();\n }\n TypeUsage typeUsage = typeDeclaration.getField(name).getType();\n typeUsage = replaceTypeParams(typeUsage);\n return Optional.of(typeUsage);\n }",
"public Type type(String name);",
"public String TypeOf(String name) {\n\t\tValues tmp = currScope.get(name);\n\t\t\n\t\tif(tmp != null)\n\t\t\treturn tmp.getType();\n\t\t\n\t\tif(currScope != classScope) {\n\t\t\ttmp = classScope.get(name);\n\t\t\tif(tmp != null)\n\t\t\t\treturn tmp.getType();\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public Optional<Type<?>> findFieldTypeOpt(final String name) {\n return Optional.empty();\n }",
"public static Type findType(String name) {\n if (MZTabUtils.isEmpty(name)) {\n throw new IllegalArgumentException(\"Modification type name should not be empty!\");\n }\n\n Type type;\n try {\n type = Type.valueOf(name.trim().toUpperCase());\n } catch (IllegalArgumentException e) {\n type = null;\n }\n\n return type;\n }",
"protected Class getType(Class k,String paramName) {\n\t\ttry {\n\t\t\tField f=k.getField(paramName);\n\t\t\tf.setAccessible(true);\n\t\t\treturn f.getType();\n\t\t} catch (Exception x) {\n\t\t\tx.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}",
"public TypeDescriptor getSingleTypeParameter() {\n if (typeParameters.isEmpty()) {\n throw new Validator4jException(String.format(\"'%s' is not generic\", name));\n }\n\n final var typeParamsCount = typeParameters.size();\n if (typeParamsCount > 1) {\n throw new Validator4jException(String.format(\"'%s' parameterized with %d types\", name, typeParamsCount));\n }\n\n return typeParameters.iterator().next();\n }",
"public TypeDefinition findInternalType(DefinitionName name){\n \treturn(internalTypeDefs.get(name));\n }",
"protected Class<?> getOptionalElementType(String optionalName) {\n try {\n Method m = type.getMethod(optionalName);\n return m.getReturnType();\n } catch (NoSuchMethodException ex) {\n return null;\n }\n }",
"String provideType();",
"Class<? extends JavaTypeMapping> getMappingType(String javaTypeName);",
"Type getType();",
"Type getType();",
"Type getType();",
"Type getType();",
"Type getType();",
"Type getType();",
"Type getType();",
"Type getType();",
"Type getType();",
"Type getType();",
"Type getType();",
"public Parameter getTypeParameter(StratmasObject object)\n {\n // Find youngest base type with a mapping\n for (Type walker = object.getType(); \n walker != null; walker = walker.getBaseType()) {\n ParameterFactory parameterFactory = (ParameterFactory) getTypeMapping().get(walker);\n if (parameterFactory != null) {\n return parameterFactory.getParameter(object);\n }\n }\n\n return null;\n }",
"Class<?> getType();",
"Class<?> getType();",
"Class<?> getType();",
"Type type();",
"Type type();",
"public static byte findTypeByName(String name) {\n if (name == null) return NULL;\n else if (\"boolean\".equalsIgnoreCase(name)) return BOOLEAN;\n else if (\"byte\".equalsIgnoreCase(name)) return BYTE;\n else if (\"int\".equalsIgnoreCase(name)) return INTEGER;\n else if (\"biginteger\".equalsIgnoreCase(name)) return BIGINTEGER;\n else if (\"bigdecimal\".equalsIgnoreCase(name)) return BIGDECIMAL;\n else if (\"long\".equalsIgnoreCase(name)) return LONG;\n else if (\"float\".equalsIgnoreCase(name)) return FLOAT;\n else if (\"double\".equalsIgnoreCase(name)) return DOUBLE;\n else if (\"datetime\".equalsIgnoreCase(name)) return DATETIME;\n else if (\"bytearray\".equalsIgnoreCase(name)) return BYTEARRAY;\n else if (\"bigchararray\".equalsIgnoreCase(name)) return BIGCHARARRAY;\n else if (\"chararray\".equalsIgnoreCase(name)) return CHARARRAY;\n else if (\"map\".equalsIgnoreCase(name)) return MAP;\n else if (\"internalmap\".equalsIgnoreCase(name)) return INTERNALMAP;\n else if (\"tuple\".equalsIgnoreCase(name)) return TUPLE;\n else if (\"bag\".equalsIgnoreCase(name)) return BAG;\n else if (\"generic_writablecomparable\".equalsIgnoreCase(name)) return GENERIC_WRITABLECOMPARABLE;\n else return UNKNOWN;\n }",
"NamedType createNamedType();",
"private @Nullable Type resolveType(@NotNull String typeName) {\n QnTypeRef typeRef = new QnTypeRef(Qn.fromDotSeparated(typeName));\n return (Type) typesResolver.resolve(typeRef);\n }",
"public static Class<?> getActualTypeArgument(Type genericType) {\n Class<? extends Type> genericTypeClass = genericType.getClass();\n if (!ParameterizedType.class.isAssignableFrom(genericTypeClass)) return Void.class;\n \n ParameterizedType parameterizedType = (ParameterizedType) genericType;\n try {\n return (Class<?>) parameterizedType.getActualTypeArguments()[0];\n }\n catch (ClassCastException ex) {\n return Void.class;\n }\n }",
"public TypeDefinition isType(String name){\n return((TypeDefinition)typeDefs.get(getDefName(name)));\n }",
"<T> PropertyType<T> getPropertyTypeByName(String propertyTypeName);",
"Class<T> getType();",
"Class<T> getType();",
"public final static ScopeType getScopeTypeByName(String name) {\n if (name != null && !(name = name.replace(\" \", \"\")).isEmpty()) {\n for (ScopeType scopeType : ScopeType.values()) {\n if (scopeType.getName().equalsIgnoreCase(name)) {\n return scopeType;\n }\n }\n }\n return null;\n }",
"@NotNull\n abstract public Type getType();",
"protected Type getPokemonTypeByName(String typeName) {\n Optional<Type> type = typeDao.getTypeByName(typeName);\n if (!type.isPresent()) {\n throw new TypeNotFoundException(typeName);\n }\n return type.get();\n }",
"public Optional<TypeDefId> getType() {\n\t\treturn type;\n\t}",
"Class<?> type();",
"public FactType getFactType(String name) {\r\n return typeRepository.getFactType(name);\r\n }",
"public TypeConstraint getTypeArgument() {\n if (type.getKind() != TypeKind.DECLARED) {\n return new TypeConstraint(environment.getTypeUtils().getNoType(TypeKind.NONE));\n }\n DeclaredType declared = (DeclaredType) type;\n List<? extends TypeMirror> arguments = declared.getTypeArguments();\n if (arguments.isEmpty()) {\n return new TypeConstraint(environment.getTypeUtils().getNoType(TypeKind.NONE));\n }\n return new TypeConstraint(arguments.get(0));\n }",
"public String getType(String xmlName)\n {\n int index = getIndex(xmlName);\n \n if (index < 0)\n {\n return null;\n }\n return getType(index);\n }",
"public Type getType();",
"public static int getType(String name) {\n if (name == null)\n return UNKNOWN_TYPE;\n Integer i = (Integer) TYPE_MAP.get(name);\n if (i != null) {\n return i.intValue();\n } else {\n return UNKNOWN_TYPE;\n }\n }",
"public static Type forSymbol( String symbol ) {\n CheckArg.isNotNull(symbol, \"symbol\");\n return TYPE_BY_SYMBOL.get(symbol.toUpperCase().trim());\n }",
"public abstract Type getSpecializedType(Type type);",
"Type getParameterType(Type[] types, String path);",
"public Optional<TypeDefId> getType() {\n\t\t\treturn type;\n\t\t}",
"public Value<?> getParameter(String name) {\n\t\tfor (Value<?> parameter : parameters) {\n\t\t\tif (parameter.getName().equals(name)) {\n\t\t\t\treturn parameter;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public String getParameterType() { return parameterType; }",
"public Class getType();",
"List<Type> getTypeParameters();",
"@TestMethod(value=\"testGetParameterType_String\")\n public Object getParameterType(String name) {\n \tif (\"maxIterations\".equals(name)) return Integer.MAX_VALUE;\n \tif (\"lpeChecker\".equals(name)) return Boolean.TRUE;\n \tif (\"maxResonStruc\".equals(name)) return Integer.MAX_VALUE;\n return null;\n }",
"public Optional<String> getType() {\n\t\treturn Optional.ofNullable(_type);\n\t}",
"public Class getType();",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Type.cpp\", line = 545,\n FQN=\"llvm::Module::getTypeByName\", NM=\"_ZNK4llvm6Module13getTypeByNameENS_9StringRefE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Type.cpp -nm=_ZNK4llvm6Module13getTypeByNameENS_9StringRefE\")\n //</editor-fold>\n public StructType /*P*/ getTypeByName(StringRef Name) /*const*/ {\n return getContext().pImpl.NamedStructTypes.lookup(new StringRef(Name));\n }",
"@TestMethod(value=\"testGetParameterType_String\")\n public Object getParameterType(String name) {\n \tif (\"maxIterations\".equals(name)) return Integer.MAX_VALUE;\n return null;\n }",
"@Generated(value={\"edu.jhu.cs.bsj.compiler.utils.generator.SourceGenerator\"})\npublic interface TypeParameterNode extends Node, TypeNameBindingNode\n{\n /**\n * Gets the base type name for the parameter.\n * @return The base type name for the parameter.\n * @throws ClassCastException If the value of this property is a special node.\n */\n public IdentifierNode getIdentifier()throws ClassCastException;\n \n /**\n * Gets the union object for the base type name for the parameter.\n * @return A union object representing The base type name for the parameter.\n */\n public NodeUnion<? extends IdentifierNode> getUnionForIdentifier();\n \n /**\n * Changes the base type name for the parameter.\n * @param identifier The base type name for the parameter.\n */\n public void setIdentifier(IdentifierNode identifier);\n \n /**\n * Changes the base type name for the parameter.\n * @param identifier The base type name for the parameter.\n * @throws NullPointerException If the provided value is <code>null</code>.\n * Node union values may have <code>null</code>\n * contents but are never <code>null</code>\n * themselves.\n */\n public void setUnionForIdentifier(NodeUnion<? extends IdentifierNode> identifier) throws NullPointerException;\n \n /**\n * Gets the bounds over the base type.\n * @return The bounds over the base type.\n * @throws ClassCastException If the value of this property is a special node.\n */\n public DeclaredTypeListNode getBounds()throws ClassCastException;\n \n /**\n * Gets the union object for the bounds over the base type.\n * @return A union object representing The bounds over the base type.\n */\n public NodeUnion<? extends DeclaredTypeListNode> getUnionForBounds();\n \n /**\n * Changes the bounds over the base type.\n * @param bounds The bounds over the base type.\n */\n public void setBounds(DeclaredTypeListNode bounds);\n \n /**\n * Changes the bounds over the base type.\n * @param bounds The bounds over the base type.\n * @throws NullPointerException If the provided value is <code>null</code>.\n * Node union values may have <code>null</code>\n * contents but are never <code>null</code>\n * themselves.\n */\n public void setUnionForBounds(NodeUnion<? extends DeclaredTypeListNode> bounds) throws NullPointerException;\n \n /**\n * Generates a deep copy of this node.\n * @param factory The node factory to use to create the deep copy.\n * @return The resulting deep copy node.\n */\n @Override\n public TypeParameterNode deepCopy(BsjNodeFactory factory);\n \n}",
"Class<S> getType();",
"public static Type getByHttpName(String httpName) {\n/* 126 */ if (httpName == null) return null; \n/* 127 */ return byName.get(httpName.toUpperCase(Locale.ROOT));\n/* */ }",
"type getType();",
"public String getType() {\n\t\tString type = C;\n\t\t// Modify if constrained\n\t\tParameterConstraint constraint = this.constraint;\n\t\tif (constraint != null) type = \"Constrained\" + type;\n\t\treturn type;\n\t}",
"public static SettingType getTypeByName(String typeName) {\n\t\tfor (SettingType type : SettingType.values()) {\n\t\t\tif (type.getShortName().equals(typeName)) {\n\t\t\t\treturn type;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public TypeDefinition tdef(String n){\n TypeDefinition rc = isType(n);\n if (rc == null){\n return(null);\n }\n else\n return(rc);\n }",
"public Optional<String> getType() {\n return Optional.ofNullable(type);\n }",
"@jdk.Exported\npublic interface TypeParameterTree extends Tree {\n Name getName();\n List<? extends Tree> getBounds();\n\n /**\n * Return annotations on the type parameter declaration.\n *\n * Annotations need Target meta-annotations of\n * {@link java.lang.annotation.ElementType#TYPE_PARAMETER} or\n * {@link java.lang.annotation.ElementType#TYPE_USE}\n * to appear in this position.\n *\n * @return annotations on the type parameter declaration\n * @since 1.8\n */\n List<? extends AnnotationTree> getAnnotations();\n}",
"public Type getType(String f)\n {\n return getFieldTypMap().get(f);\n }",
"TypeRef getType();",
"@Override\n public TypeImpl getType(String typeName) {\n return typeName2TypeImpl.get(typeName);\n }",
"private String getTypeName(Type node) {\n\t\tif (node.isArrayType()) {\n\t\t\tArrayType type = (ArrayType) node;\n\t\t\treturn getTypeName(type.getComponentType());\n\t\t}\n\t\t//if it's parameterized, get the argument type and continue judgment\n\t\telse if (node.isParameterizedType()) {\n\t\t\tParameterizedType type = (ParameterizedType) node;\n\t\t\tfor (Object o: type.typeArguments()) {\n\t\t\t\tType t = (Type)o;\n\t\t\t\treturn getTypeName(t);\n\t\t\t}\n\t\t}\n\t\t//if it's a simple type\n\t\telse if (node.isSimpleType()) {\n\t\t\treturn node.toString();\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"<T> T resolve(String name, Class<T> type);",
"public static JdbcTypeType getByName(String name) {\r\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\r\n\t\t\tJdbcTypeType result = VALUES_ARRAY[i];\r\n\t\t\tif (result.getName().equals(name)) {\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"default Class<?> getType(String key) {\n Object v = get(key);\n return v == null ? null : v.getClass();\n }",
"public IAttributeType<?> getAttributeType(String name);",
"TypeElement getTypeElement();",
"Type getGenericType(Injectable injectable);",
"public TypeConstraint getParameterType(int index) {\n List<? extends VariableElement> parameters = executable.getParameters();\n if (index >= parameters.size()) {\n return new TypeConstraint(environment.getTypeUtils().getNoType(TypeKind.NONE));\n }\n return new TypeConstraint(parameters.get(index).asType());\n }",
"public Field findField(final String name) {\r\n\t\tGeneratorHelper.checkJavaFieldName(\"parameter:name\", name);\r\n\r\n\t\tField found = null;\r\n\r\n\t\tfinal Iterator<Field> iterator = this.getFields().iterator();\r\n\r\n\t\twhile (iterator.hasNext()) {\r\n\t\t\tfinal Field field = iterator.next();\r\n\t\t\tif (field.getName().equals(name)) {\r\n\t\t\t\tfound = field;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn found;\r\n\t}",
"public Optional<ActionTypeParameter> getActionTypeParameter(String actionTypeName, String actionTypeParameterName) {\n return Optional.ofNullable(MetadataActionTypesConfiguration.getInstance().getActionType(actionTypeName)\n .orElseThrow(() -> new RuntimeException(\"action type \" + actionTypeName + \" not found\"))\n .getParameters().get(actionTypeParameterName));\n }",
"public static byte findType(Type t) {\n if (t == null) {\n return NULL;\n }\n\n // Try to put the most common first\n if (t == DataByteArray.class) {\n return BYTEARRAY;\n } else if (t == String.class) {\n return CHARARRAY;\n } else if (t == Integer.class) {\n return INTEGER;\n } else if (t == Long.class) {\n return LONG;\n } else if (t == Float.class) {\n return FLOAT;\n } else if (t == Double.class) {\n return DOUBLE;\n } else if (t == Boolean.class) {\n return BOOLEAN;\n } else if (t == Byte.class) {\n return BYTE;\n } else if (t == BigInteger.class) {\n return BIGINTEGER;\n } else if (t == BigDecimal.class) {\n return BIGDECIMAL;\n } else if (t == DateTime.class) {\n return DATETIME;\n } else if (t == InternalMap.class) {\n return INTERNALMAP;\n } else {\n // Might be a tuple or a bag, need to check the interfaces it\n // implements\n if (t instanceof Class) {\n return extractTypeFromClass(t);\n }else if (t instanceof ParameterizedType){\n ParameterizedType impl=(ParameterizedType)t;\n Class c=(Class)impl.getRawType();\n return extractTypeFromClass(c);\n }\n return ERROR;\n }\n }",
"QName getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();"
]
| [
"0.7659571",
"0.7034616",
"0.7026398",
"0.64597577",
"0.6457592",
"0.6385397",
"0.63063043",
"0.6138754",
"0.6061112",
"0.59354025",
"0.5888816",
"0.58801985",
"0.585182",
"0.5840892",
"0.57927275",
"0.5737798",
"0.5737798",
"0.5737798",
"0.5737798",
"0.5737798",
"0.5737798",
"0.5737798",
"0.5737798",
"0.5737798",
"0.5737798",
"0.5737798",
"0.56856817",
"0.56672007",
"0.56672007",
"0.56672007",
"0.5638244",
"0.5638244",
"0.56293815",
"0.560805",
"0.55808204",
"0.5577606",
"0.55513597",
"0.5530898",
"0.55069196",
"0.55069196",
"0.54990494",
"0.5497674",
"0.54644567",
"0.5451548",
"0.5450238",
"0.54439694",
"0.5438636",
"0.5437247",
"0.5430372",
"0.54142267",
"0.5413935",
"0.5400432",
"0.53946644",
"0.53925157",
"0.5370778",
"0.5346048",
"0.53434336",
"0.5328604",
"0.53185576",
"0.53136176",
"0.53104866",
"0.53005683",
"0.527448",
"0.5267447",
"0.5256693",
"0.5235465",
"0.5229183",
"0.5223496",
"0.5220948",
"0.521937",
"0.52131665",
"0.5207139",
"0.51956517",
"0.51703095",
"0.51626706",
"0.5149339",
"0.51344496",
"0.512857",
"0.5128349",
"0.5127072",
"0.5116416",
"0.510761",
"0.5078122",
"0.50691664",
"0.50666773",
"0.50595623",
"0.505729",
"0.5044761",
"0.5044761",
"0.5044761",
"0.5044761",
"0.5044761",
"0.5044761",
"0.5044761",
"0.5044761",
"0.5044761",
"0.5044761",
"0.5044761",
"0.5044761",
"0.5044761"
]
| 0.79051316 | 0 |
Get the values for all type parameters declared on this type. The list can be empty for raw types. | public List<ResolvedType> typeParametersValues() {
return this.typeParametersMap.isEmpty() ? Collections.emptyList() : typeDeclaration.getTypeParameters().stream().map(tp -> typeParametersMap.getValue(tp)).collect(Collectors.toList());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<TypeDefinition> getParameters() {\n\t\treturn parameters;\n\t}",
"public List<Pair<ResolvedTypeParameterDeclaration, ResolvedType>> getTypeParametersMap() {\n List<Pair<ResolvedTypeParameterDeclaration, ResolvedType>> typeParametersMap = new ArrayList<>();\n if (!isRawType()) {\n for (int i = 0; i < typeDeclaration.getTypeParameters().size(); i++) {\n typeParametersMap.add(new Pair<>(typeDeclaration.getTypeParameters().get(i), typeParametersValues().get(i)));\n }\n }\n return typeParametersMap;\n }",
"Collection<Parameter> getTypedParameters();",
"List<Type> getTypeParameters();",
"public DataTypeDescriptor[] getParameterTypes() {\r\n return parameterTypes;\r\n }",
"public ITypeInfo[] getParameters();",
"public List<Ref<? extends Type>> typeVariables();",
"public DataType[] getParameters() {\n return parameters;\n }",
"public List<TypeArgument> getTypeArguments() {\n return typeArguments;\n }",
"public List<Class<?>> getSourceParameterTypes() {\n return parameterTypes;\n }",
"TypeInfo[] typeParams();",
"public Set<TypeDescriptor> getAllRelatedTypes() {\n final var types = getTypeParameters().stream()\n .flatMap(type -> type.getAllRelatedTypes().stream())\n .collect(Collectors.toCollection(HashSet::new));\n\n types.add(this);\n return types;\n }",
"@Deprecated public List<TypeParamDef> getParameters(){\n return build(parameters);\n }",
"public String getParamDefs() {\n return super.getParamDefs() + \", \" + PlainValueFunction.paramNameTypes;\n }",
"public final IClass[]\r\n getParameterTypes() throws CompileException {\r\n if (this.parameterTypesCache != null) return this.parameterTypesCache;\r\n return (this.parameterTypesCache = this.getParameterTypes2());\r\n }",
"public List getParameterValues() {\r\n\t\treturn parameterValues;\r\n\t}",
"public Parameter[] getParameters() {\n return values;\n }",
"public List<String> totestParametizedTypes()\n {\n return null;\n }",
"@Override\n\tpublic Collection<Parameter<?>> getParameters() {\n\t\treturn null;\n\t}",
"public List<Parameter> parameters() {\n if (_params != null && !_params.isEmpty()) {\n return new ArrayList<Parameter>(_params.values());\n }\n return null;\n }",
"public Collection<SPParameter> getParameters(){\n return mapOfParameters.values();\n }",
"public List<__Type> getTypes() {\n return (List<__Type>) get(\"types\");\n }",
"java.util.List<? extends com.google.cloud.commerce.consumer.procurement.v1.ParameterOrBuilder>\n getParametersOrBuilderList();",
"public List<TypeArg> typeArgs()\n {\n return typeArgs;\n }",
"public List<ParameterDefinition> parameters() {\n return this.innerProperties() == null ? null : this.innerProperties().parameters();\n }",
"public ArrayList<JavaScope> getArguments() {\n\t\tArrayList<JavaScope> ret = new ArrayList<JavaScope>();\n\t\tfor (TypeContainer t : this.sig)\n\t\t\tret.add(t.item);\n\t\t\n\t\treturn ret;\n\t}",
"public String getParamDefs() {\r\n return super.getParamDefs() + \", \" + SampledPolicy.paramNameTypes;\r\n }",
"@Override\n public List<KParameter> getParameters() {\n return getReflected().getParameters();\n }",
"public ActionParameterTypes getParametersTypes() {\n\t\treturn this.signature;\n\t}",
"public SortedSet<String> getAvailableParameters() {\n if (allAvailableParameters == null) {\n allAvailableParameters = new TreeSet<String>();\n\n try {\n List<String> dataTypeList = new ArrayList<String>();\n dataTypeList.add(dataType);\n Set<String> parameters = DataDeliveryHandlers\n .getParameterHandler()\n .getNamesByDataTypes(dataTypeList);\n if (parameters != null) {\n allAvailableParameters.addAll(parameters);\n }\n } catch (RegistryHandlerException e) {\n statusHandler.handle(Priority.PROBLEM,\n \"Unable to retrieve the parameter list.\", e);\n }\n }\n return allAvailableParameters;\n }",
"public Collection<ParameterClass> getAllParameters()\n\t{\n\t\tif( this.parent == null )\n\t\t{\n\t\t\treturn this.getDeclaredParameters();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tCollection<ParameterClass> inherited = new HashSet<>( this.parameters.values() );\n\t\t\t\n\t\t\t// loop through each parent and get their parameters - creates many fewer collections\n\t\t\t// doing it this way compared to recursing up\n\t\t\tInteractionClass currentParent = this.parent;\n\t\t\twhile( currentParent != null )\n\t\t\t{\n\t\t\t\tinherited.addAll( currentParent.parameters.values() );\n\t\t\t\tcurrentParent = currentParent.parent;\n\t\t\t}\n\t\t\t\n\t\t\t// return the complete set\n\t\t\treturn inherited;\n\t\t}\n\t}",
"public String[] getParamTypeNames()\n/* */ {\n/* 353 */ return this.parameterTypeNames;\n/* */ }",
"List<LightweightTypeReference> getTypeArguments();",
"public Vector<TypeConstant> getAllTypeConstants() {\n\t\tVector<TypeConstant> constants = HUtils.getUniqueElements(typeConstantHash);\n\t\treturn constants;\n\t}",
"DefinedValuesType getDefinedValues();",
"public CParam[] getParameters() {\r\n\t\treturn parameters.toArray(new CParamImpl[parameters.size()]);\r\n\t}",
"private Collection<TypeDeclaration> getAllTypes() {\n if (allTypes != null) {\n return allTypes;\n }\n allTypes = new ArrayList<TypeDeclaration>();\n for (Symbol s : getMembers(false)) {\n allTypes.add(env.declMaker.getTypeDeclaration((ClassSymbol) s));\n }\n return allTypes;\n }",
"public static Collection<DataType> values() {\n return values(DataType.class);\n }",
"List<List<Class<?>>> getConstructorParametersTypes();",
"java.util.List<? extends org.tensorflow.proto.framework.FullTypeDefOrBuilder> \n getArgsOrBuilderList();",
"java.util.List<datawave.webservice.query.QueryMessages.QueryImpl.Parameter> getParametersList();",
"@java.lang.Override\n public java.util.List<? extends com.google.cloud.dialogflow.cx.v3beta1.Intent.ParameterOrBuilder>\n getParametersOrBuilderList() {\n return parameters_;\n }",
"public List<ConstraintParameter> getParameters() {\n\t\t// TODO send out a copy..not the reference to our actual data\n\t\treturn m_parameters;\n\t}",
"@java.lang.Override\n public java.util.List<com.google.cloud.dialogflow.cx.v3beta1.Intent.Parameter>\n getParametersList() {\n return parameters_;\n }",
"java.util.List<com.google.cloud.commerce.consumer.procurement.v1.Parameter> getParametersList();",
"public List<Object> getImplicitParameters() {\n return Collections.unmodifiableList(implicitParameters);\n }",
"@java.lang.Override\n public java.util.List<com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter> getParametersList() {\n return parameters_;\n }",
"public Map getValues() {\r\n return this.params;\r\n }",
"public List<TypeInfo> getTypes() {\r\n return types;\r\n }",
"public java.util.List<datawave.webservice.query.QueryMessages.QueryImpl.Parameter> getParametersList() {\n return java.util.Collections.unmodifiableList(parameters_);\n }",
"public String[] getTypes() {\n return impl.getTypes();\n }",
"java.util.List<org.tensorflow.proto.framework.FullTypeDef> \n getArgsList();",
"public java.util.List<? extends datawave.webservice.query.QueryMessages.QueryImpl.ParameterOrBuilder> getParametersOrBuilderList() {\n return parameters_;\n }",
"public java.util.List<datawave.webservice.query.QueryMessages.QueryImpl.Parameter> getParametersList() {\n return parameters_;\n }",
"private String[] getParameterTypeNames(MethodNode method) {\n GenericsMapper mapper = null;\n ClassNode declaringClass = method.getDeclaringClass();\n if (declaringClass.getGenericsTypes() != null && declaringClass.getGenericsTypes().length > 0) {\n if (!mappers.containsKey(declaringClass)) {\n ClassNode thiz = getClassNode();\n mapper = GenericsMapper.gatherGenerics(findResolvedType(thiz, declaringClass), declaringClass);\n } else {\n mapper = mappers.get(declaringClass);\n }\n }\n Parameter[] parameters = method.getParameters();\n String[] paramTypeNames = new String[parameters.length];\n for (int i = 0; i < paramTypeNames.length; i++) {\n ClassNode paramType = parameters[i].getType();\n if (mapper != null && paramType.getGenericsTypes() != null && paramType.getGenericsTypes().length > 0) {\n paramType = VariableScope.resolveTypeParameterization(mapper, VariableScope.clone(paramType));\n }\n paramTypeNames[i] = paramType.getName();\n if (paramTypeNames[i].startsWith(\"[\")) {\n int cnt = Signature.getArrayCount(paramTypeNames[i]);\n String sig = Signature.getElementType(paramTypeNames[i]);\n String qualifier = Signature.getSignatureQualifier(sig);\n String simple = Signature.getSignatureSimpleName(sig);\n StringBuilder sb = new StringBuilder();\n if (qualifier.length() > 0) {\n sb.append(qualifier).append(\".\");\n }\n sb.append(simple);\n for (int j = 0; j < cnt; j++) {\n sb.append(\"[]\");\n }\n paramTypeNames[i] = sb.toString();\n }\n }\n return paramTypeNames;\n }",
"List<InferredStandardParameter> getOriginalParameterTypes();",
"public List getTypeSpecifiers() {\n return member.getTypeSpecifiers();\n }",
"@NonNull\n public Map<String, Object> getParameters() {\n return parameters;\n }",
"public static Collection<RoleDefinitionType> values() {\n return values(RoleDefinitionType.class);\n }",
"public java.util.List<\n ? extends com.google.cloud.dialogflow.cx.v3beta1.Intent.ParameterOrBuilder>\n getParametersOrBuilderList() {\n if (parametersBuilder_ != null) {\n return parametersBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(parameters_);\n }\n }",
"@java.lang.Override\n public java.util.List<? extends com.google.cloud.dialogflow.cx.v3beta1.Form.ParameterOrBuilder>\n getParametersOrBuilderList() {\n return parameters_;\n }",
"public List<IGeneratorParameter> getParameters() {\n return null;\n }",
"public ParameterList getParameters() {\n\t\treturn _parameters;\n\t}",
"public ArrayList getParameters() {\n return parameters;\n }",
"@LabeledParameterized.Parameters\n public static List<Object[]> parameters() {\n List<Object[]> modes = Lists.newArrayList();\n for (TypeOfEventStore typeOfEventStore : TypeOfEventStore.values()) {\n modes.add(Objects.o(typeOfEventStore));\n }\n return modes;\n }",
"IParameterCollection getParameters();",
"public static Collection<JobInputType> values() {\n return values(JobInputType.class);\n }",
"public List<TypeMetadata> getTypeMetadata() {\n return types;\n }",
"public String[] getParameters() {\r\n return scope != null? scope.getParameters() : null;\r\n }",
"DefiningValuesType getDefiningValues();",
"@Override\n public List<Param<?>> params() {\n return this.settings;\n }",
"public Map<String, Class<?>> getArgumentTypes() {\n return argumentTypes;\n }",
"default List<TypeInfo> allTypes() {\n List<TypeInfo> allTypes = new LinkedList<>();\n allTypes.add(this);\n allTypes.addAll(Arrays.asList(interfaces()));\n allTypes.addAll(superClass().stream().flatMap(s -> s.allTypes().stream()).collect(Collectors.toList()));\n return allTypes;\n }",
"public Type[] getArgumentTypes() {\n/* 236 */ return Type.getArgumentTypes(this.desc);\n/* */ }",
"public java.util.List<com.google.cloud.dialogflow.cx.v3beta1.Intent.Parameter>\n getParametersList() {\n if (parametersBuilder_ == null) {\n return java.util.Collections.unmodifiableList(parameters_);\n } else {\n return parametersBuilder_.getMessageList();\n }\n }",
"public ArrayList<String> getParameterValues() { return this.params; }",
"public Object parameters() {\n return this.parameters;\n }",
"public Map<String, List<String>> getParameters() {\n\t\t\treturn parameters;\n\t\t}",
"@Override\n public Class<?>[] getParameterTypes() {\n return null;\n }",
"public Set<Class<?>> getTypes() {\r\n\t\treturn dataTypes;\r\n\t}",
"public Set<Class<?>> getTypes() {\r\n\t\treturn dataTypes;\r\n\t}",
"public Set<Class<?>> getTypes() {\r\n\t\treturn dataTypes;\r\n\t}",
"public com.isat.catalist.oms.order.OOSOrderLineItemParamType[] getParametersArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n java.util.List targetList = new java.util.ArrayList();\n get_store().find_all_element_users(PARAMETERS$16, targetList);\n com.isat.catalist.oms.order.OOSOrderLineItemParamType[] result = new com.isat.catalist.oms.order.OOSOrderLineItemParamType[targetList.size()];\n targetList.toArray(result);\n return result;\n }\n }",
"public Set<Class<?>> getTypes() {\n\t\treturn dataTypes;\n\t}",
"public Set<Class<?>> getTypes() {\n\t\treturn dataTypes;\n\t}",
"public List allVariables() {\r\n\t\tArrayList vars = new ArrayList();\r\n\t\tfor (int i = 0; i < elements.size(); ++i) {\r\n\t\t\tObject ob = elements.get(i);\r\n\t\t\tif (ob instanceof Variable) {\r\n\t\t\t\tvars.add(ob);\r\n\t\t\t} else if (ob instanceof FunctionDef) {\r\n\t\t\t\tExpression[] params = ((FunctionDef) ob).getParameters();\r\n\t\t\t\tfor (int n = 0; n < params.length; ++n) {\r\n\t\t\t\t\tvars.addAll(params[n].allVariables());\r\n\t\t\t\t}\r\n\t\t\t} else if (ob instanceof TObject) {\r\n\t\t\t\tTObject tob = (TObject) ob;\r\n\t\t\t\tif (tob.getTType() instanceof TArrayType) {\r\n\t\t\t\t\tExpression[] exp_list = (Expression[]) tob.getObject();\r\n\t\t\t\t\tfor (int n = 0; n < exp_list.length; ++n) {\r\n\t\t\t\t\t\tvars.addAll(exp_list[n].allVariables());\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 vars;\r\n\t}",
"public List<Parameter> getParamters() {\r\n return this.lstParameters;\r\n }",
"@Override\n\t\tpublic Object[] getParameters() {\n\t\t\treturn null;\n\t\t}",
"static String[] getAllTypeNames()\n\t{\n\t\treturn new String[] {\"String\", \"int\", \"double\", \"long\", \"boolean\", \"String[]\", \"int[]\", \"double[]\", \"long[]\"};\n\t}",
"java.util.List<? extends godot.wire.Wire.ValueOrBuilder> \n getArgsOrBuilderList();",
"public TypeParameterListNode getTypeParameters()throws ClassCastException;",
"public java.util.List<com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter>\n getParametersList() {\n if (parametersBuilder_ == null) {\n return java.util.Collections.unmodifiableList(parameters_);\n } else {\n return parametersBuilder_.getMessageList();\n }\n }",
"public List<Class<?>> getTargetParameterTypes() {\n return targetParameterTypes;\n }",
"public String[] getParameters() {\n return parameters;\n }",
"Map<ActionParameterTypes, List<InferredStandardParameter>> getInferredParameterTypes();",
"java.util.List<com.lesen.rpc.protobuf.LesenRPCProto.LesenRPCParameter> \n getParamsList();",
"public List<Map> getAllParameters() {\n List<Map> allProductParameters = new ArrayList<Map>();\n if (processorParametres != null) allProductParameters.add(processorParametres);\n if (sellerParametres != null) allProductParameters.add(sellerParametres);\n if (storageParametres != null) allProductParameters.add(storageParametres);\n\n return allProductParameters;\n }",
"public Map<String, List<String>> parameters() {\n return parameters;\n }",
"public List<Type> getAll();",
"public String[] getParameters() {\r\n return parameters;\r\n }"
]
| [
"0.7157551",
"0.71570486",
"0.7034647",
"0.70105535",
"0.6734968",
"0.6552923",
"0.6453037",
"0.6377815",
"0.63168365",
"0.62935454",
"0.6278625",
"0.62769014",
"0.6258542",
"0.6193568",
"0.6153472",
"0.6109667",
"0.60926676",
"0.60918474",
"0.6053729",
"0.60464996",
"0.603119",
"0.6011116",
"0.5974034",
"0.5972012",
"0.594838",
"0.5920524",
"0.5905893",
"0.5895909",
"0.5867166",
"0.58382434",
"0.5833046",
"0.5825308",
"0.58027333",
"0.57797146",
"0.57783324",
"0.57722294",
"0.5766347",
"0.5758913",
"0.57408065",
"0.57262677",
"0.56824255",
"0.56788963",
"0.5651318",
"0.5650739",
"0.56468177",
"0.5631866",
"0.56161284",
"0.56143165",
"0.5605381",
"0.56038517",
"0.5598311",
"0.55898345",
"0.55838084",
"0.55801207",
"0.5571614",
"0.555716",
"0.55541146",
"0.5553807",
"0.5553622",
"0.5549829",
"0.5543213",
"0.5513512",
"0.55098",
"0.5503038",
"0.5502803",
"0.550034",
"0.5499252",
"0.54987055",
"0.54949737",
"0.54874164",
"0.5482881",
"0.5481209",
"0.54798627",
"0.54787683",
"0.5471704",
"0.54650885",
"0.5427578",
"0.5425359",
"0.5419114",
"0.5405802",
"0.5405802",
"0.5405802",
"0.5403598",
"0.5397474",
"0.5397474",
"0.5391598",
"0.53802705",
"0.5376636",
"0.5375292",
"0.5363216",
"0.5362289",
"0.5359081",
"0.53507143",
"0.53497994",
"0.5345301",
"0.5340454",
"0.53399855",
"0.5338695",
"0.5334631",
"0.53333896"
]
| 0.8234382 | 0 |
Get the values for all type parameters declared on this type. In case of raw types the values correspond to TypeVariables. | public List<Pair<ResolvedTypeParameterDeclaration, ResolvedType>> getTypeParametersMap() {
List<Pair<ResolvedTypeParameterDeclaration, ResolvedType>> typeParametersMap = new ArrayList<>();
if (!isRawType()) {
for (int i = 0; i < typeDeclaration.getTypeParameters().size(); i++) {
typeParametersMap.add(new Pair<>(typeDeclaration.getTypeParameters().get(i), typeParametersValues().get(i)));
}
}
return typeParametersMap;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<ResolvedType> typeParametersValues() {\n return this.typeParametersMap.isEmpty() ? Collections.emptyList() : typeDeclaration.getTypeParameters().stream().map(tp -> typeParametersMap.getValue(tp)).collect(Collectors.toList());\n }",
"public List<Ref<? extends Type>> typeVariables();",
"List<Type> getTypeParameters();",
"Collection<Parameter> getTypedParameters();",
"public ITypeInfo[] getParameters();",
"TypeInfo[] typeParams();",
"public List<TypeDefinition> getParameters() {\n\t\treturn parameters;\n\t}",
"public DataTypeDescriptor[] getParameterTypes() {\r\n return parameterTypes;\r\n }",
"public List<TypeArgument> getTypeArguments() {\n return typeArguments;\n }",
"public Set<TypeDescriptor> getAllRelatedTypes() {\n final var types = getTypeParameters().stream()\n .flatMap(type -> type.getAllRelatedTypes().stream())\n .collect(Collectors.toCollection(HashSet::new));\n\n types.add(this);\n return types;\n }",
"public String getParamDefs() {\n return super.getParamDefs() + \", \" + PlainValueFunction.paramNameTypes;\n }",
"@Override\n public List<KParameter> getParameters() {\n return getReflected().getParameters();\n }",
"public List<Class<?>> getSourceParameterTypes() {\n return parameterTypes;\n }",
"List<LightweightTypeReference> getTypeArguments();",
"public DataType[] getParameters() {\n return parameters;\n }",
"public final IClass[]\r\n getParameterTypes() throws CompileException {\r\n if (this.parameterTypesCache != null) return this.parameterTypesCache;\r\n return (this.parameterTypesCache = this.getParameterTypes2());\r\n }",
"public List<TypeArg> typeArgs()\n {\n return typeArgs;\n }",
"private String[] getParameterTypeNames(MethodNode method) {\n GenericsMapper mapper = null;\n ClassNode declaringClass = method.getDeclaringClass();\n if (declaringClass.getGenericsTypes() != null && declaringClass.getGenericsTypes().length > 0) {\n if (!mappers.containsKey(declaringClass)) {\n ClassNode thiz = getClassNode();\n mapper = GenericsMapper.gatherGenerics(findResolvedType(thiz, declaringClass), declaringClass);\n } else {\n mapper = mappers.get(declaringClass);\n }\n }\n Parameter[] parameters = method.getParameters();\n String[] paramTypeNames = new String[parameters.length];\n for (int i = 0; i < paramTypeNames.length; i++) {\n ClassNode paramType = parameters[i].getType();\n if (mapper != null && paramType.getGenericsTypes() != null && paramType.getGenericsTypes().length > 0) {\n paramType = VariableScope.resolveTypeParameterization(mapper, VariableScope.clone(paramType));\n }\n paramTypeNames[i] = paramType.getName();\n if (paramTypeNames[i].startsWith(\"[\")) {\n int cnt = Signature.getArrayCount(paramTypeNames[i]);\n String sig = Signature.getElementType(paramTypeNames[i]);\n String qualifier = Signature.getSignatureQualifier(sig);\n String simple = Signature.getSignatureSimpleName(sig);\n StringBuilder sb = new StringBuilder();\n if (qualifier.length() > 0) {\n sb.append(qualifier).append(\".\");\n }\n sb.append(simple);\n for (int j = 0; j < cnt; j++) {\n sb.append(\"[]\");\n }\n paramTypeNames[i] = sb.toString();\n }\n }\n return paramTypeNames;\n }",
"public String[] getParamTypeNames()\n/* */ {\n/* 353 */ return this.parameterTypeNames;\n/* */ }",
"public abstract Object getTypedParams(Object params);",
"public Vector<TypeConstant> getAllTypeConstants() {\n\t\tVector<TypeConstant> constants = HUtils.getUniqueElements(typeConstantHash);\n\t\treturn constants;\n\t}",
"public Map<String, Class<?>> getArgumentTypes() {\n return argumentTypes;\n }",
"public Type[] getArgumentTypes() {\n/* 236 */ return Type.getArgumentTypes(this.desc);\n/* */ }",
"public ActionParameterTypes getParametersTypes() {\n\t\treturn this.signature;\n\t}",
"public ArrayList<JavaScope> getArguments() {\n\t\tArrayList<JavaScope> ret = new ArrayList<JavaScope>();\n\t\tfor (TypeContainer t : this.sig)\n\t\t\tret.add(t.item);\n\t\t\n\t\treturn ret;\n\t}",
"public String getParamDefs() {\r\n return super.getParamDefs() + \", \" + SampledPolicy.paramNameTypes;\r\n }",
"static String[] getAllTypeNames()\n\t{\n\t\treturn new String[] {\"String\", \"int\", \"double\", \"long\", \"boolean\", \"String[]\", \"int[]\", \"double[]\", \"long[]\"};\n\t}",
"private Collection<TypeDeclaration> getAllTypes() {\n if (allTypes != null) {\n return allTypes;\n }\n allTypes = new ArrayList<TypeDeclaration>();\n for (Symbol s : getMembers(false)) {\n allTypes.add(env.declMaker.getTypeDeclaration((ClassSymbol) s));\n }\n return allTypes;\n }",
"public Parameter[] getParameters() {\n return values;\n }",
"List<List<Class<?>>> getConstructorParametersTypes();",
"DefinedValuesType getDefinedValues();",
"@Deprecated public List<TypeParamDef> getParameters(){\n return build(parameters);\n }",
"public List<__Type> getTypes() {\n return (List<__Type>) get(\"types\");\n }",
"public TypeParameterListNode getTypeParameters()throws ClassCastException;",
"public String[] getTypes() {\n return impl.getTypes();\n }",
"@Override\n\tpublic Object[] getParameterizedFieldsValues()\n\t{\n\t\tGAZRecordDataModel dataModel = getMyDataModel();\n\n\t\tObject[] object = new Object[] { dataModel.getOptionId(), dataModel.getFieldId(), dataModel.getPvId(), dataModel.getType(),\n\t\t\t\t\t\tdataModel.getClassName(), dataModel.getClassByte(), };\n\t\treturn object;\n\t}",
"char[][] getTypeParameterNames();",
"List<InferredStandardParameter> getOriginalParameterTypes();",
"public List<String> totestParametizedTypes()\n {\n return null;\n }",
"public static Class<?>[] getConstructorParamTypes() {\n\t\tfinal Class<?>[] out = { RabbitMQService.class, String.class, RentMovementDAO.class, RPCClient.class, RPCClient.class, IRentConfiguration.class };\n\t\treturn out;\n\t}",
"Map<ActionParameterTypes, List<InferredStandardParameter>> getInferredParameterTypes();",
"@Override\n\tpublic Collection<Parameter<?>> getParameters() {\n\t\treturn null;\n\t}",
"public Collection<SPParameter> getParameters(){\n return mapOfParameters.values();\n }",
"public List allVariables() {\r\n\t\tArrayList vars = new ArrayList();\r\n\t\tfor (int i = 0; i < elements.size(); ++i) {\r\n\t\t\tObject ob = elements.get(i);\r\n\t\t\tif (ob instanceof Variable) {\r\n\t\t\t\tvars.add(ob);\r\n\t\t\t} else if (ob instanceof FunctionDef) {\r\n\t\t\t\tExpression[] params = ((FunctionDef) ob).getParameters();\r\n\t\t\t\tfor (int n = 0; n < params.length; ++n) {\r\n\t\t\t\t\tvars.addAll(params[n].allVariables());\r\n\t\t\t\t}\r\n\t\t\t} else if (ob instanceof TObject) {\r\n\t\t\t\tTObject tob = (TObject) ob;\r\n\t\t\t\tif (tob.getTType() instanceof TArrayType) {\r\n\t\t\t\t\tExpression[] exp_list = (Expression[]) tob.getObject();\r\n\t\t\t\t\tfor (int n = 0; n < exp_list.length; ++n) {\r\n\t\t\t\t\t\tvars.addAll(exp_list[n].allVariables());\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 vars;\r\n\t}",
"public Collection<ParameterClass> getAllParameters()\n\t{\n\t\tif( this.parent == null )\n\t\t{\n\t\t\treturn this.getDeclaredParameters();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tCollection<ParameterClass> inherited = new HashSet<>( this.parameters.values() );\n\t\t\t\n\t\t\t// loop through each parent and get their parameters - creates many fewer collections\n\t\t\t// doing it this way compared to recursing up\n\t\t\tInteractionClass currentParent = this.parent;\n\t\t\twhile( currentParent != null )\n\t\t\t{\n\t\t\t\tinherited.addAll( currentParent.parameters.values() );\n\t\t\t\tcurrentParent = currentParent.parent;\n\t\t\t}\n\t\t\t\n\t\t\t// return the complete set\n\t\t\treturn inherited;\n\t\t}\n\t}",
"public Set<Object> getVariables() {\n return new HashSet<>(constraints.keySet());\n }",
"DefiningValuesType getDefiningValues();",
"public IAttributeType<?>[] getAllAttributeTypes();",
"public List getParameterValues() {\r\n\t\treturn parameterValues;\r\n\t}",
"public static Type[] getFieldTypeArguments(Field field) {\n return getTypeArguments(field.getGenericType());\n }",
"public static Collection<DataType> values() {\n return values(DataType.class);\n }",
"List<IVariableDef> getVariables();",
"public Map getValues() {\r\n return this.params;\r\n }",
"@Override\n\t\tpublic Object getTypedParams(Object params) {\n\t\t\treturn null;\n\t\t}",
"@Override\n\t\tpublic Object getTypedParams(Object params) {\n\t\t\treturn null;\n\t\t}",
"public ParameterType getType();",
"@NonNull\n public Map<String, Object> getParameters() {\n return parameters;\n }",
"public Variable[] getParameters();",
"public List getTypeSpecifiers() {\n return member.getTypeSpecifiers();\n }",
"public abstract ResolvedType transformTypeParameters(ResolvedTypeTransformer transformer);",
"@Override\n public ImmutableList<String> getTypeParts() {\n return types.toImmutable();\n }",
"java.util.List<? extends org.tensorflow.proto.framework.FullTypeDefOrBuilder> \n getArgsOrBuilderList();",
"public Map<String, Object> getNamedParameterValues() {\r\n \treturn namedParameterValues;\r\n }",
"public List<VariableID<?>> getVariables()\n\t{\n\t\tList<VariableID<?>> vars = get(VARIABLES);\n\t\tif (vars == null)\n\t\t{\n\t\t\tvars = Collections.emptyList();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvars = new ArrayList<>(vars);\n\t\t}\n\t\treturn vars;\n\t}",
"public CParam[] getParameters() {\r\n\t\treturn parameters.toArray(new CParamImpl[parameters.size()]);\r\n\t}",
"public List<ParameterDefinition> parameters() {\n return this.innerProperties() == null ? null : this.innerProperties().parameters();\n }",
"IParameterCollection getParameters();",
"public Object parameters() {\n return this.parameters;\n }",
"public NodeUnion<? extends TypeParameterListNode> getUnionForTypeParameters();",
"public static Collection<RoleDefinitionType> values() {\n return values(RoleDefinitionType.class);\n }",
"@Override\n public ImmutableList<ImmutableSetMultimap<TypeVariableImpl<X, ?>, Constraint<X>>> getConstraints() {\n return ImmutableList.of(constraints);\n }",
"String getClassTypeVariables() {\n final StringBuilder sb = new StringBuilder();\n if (classTypes.size() > 0) {\n sb.append(\"<\");\n for (int i = 0; i < classTypes.size(); i++) {\n final Class<?> c = classTypes.get(i);\n if (c != null) {\n sb.append(getShortClassName(c));\n if (i < classTypes.size() - 1) {\n sb.append(\", \");\n }\n }\n }\n sb.append(\">\");\n }\n return sb.toString();\n }",
"@GET\n @Path(\"/values\")\n public Collection<RESTValueType> getAllValueTypes(@HeaderParam(\"Accept-Language\") String language) {\n return localizationHelper.generateValueTypes(definitionsService.getAllValueTypes(), language);\n }",
"public TypeElement<?>[] getTypeElements() {\n\t\t\treturn (this.TypeElements.size() == 0)\n\t\t\t\t\t?EmptyTypeElements\n\t\t\t\t\t:this.TypeElements.values().toArray(EmptyTypeElements);\n\t\t}",
"public VarTypeNative getFieldVarType();",
"public List<AtomVariable> getAllBodyVariables(){\r\n\t\tList<AtomVariable> allVars = new ArrayList<AtomVariable>();\r\n\t\tSet<String> allVarNames = new HashSet<String> ();\r\n\r\n\t\tfor (Atom atom : getBody())\r\n\t\t\tif(!atom.isSkolem()){\r\n\t\t\t\tfor(AtomArgument val : atom.getValues())\r\n\t\t\t\t{\r\n\t\t\t\t\t//\t\t\t\t\tignore constants ... and there shouldn't be any skolems in the body anyway\r\n\t\t\t\t\tif (val instanceof AtomVariable && !allVarNames.contains(val.toString())) { \r\n\t\t\t\t\t\tallVars.add((AtomVariable) val.deepCopy());\r\n\t\t\t\t\t\tallVarNames.add (val.toString());\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tif (val instanceof AtomSkolem)\r\n\t\t\t\t\t\t\tassert false : \"THERE SHOULD'NT BE ANY SKOLEM IN THE BODY FOR THIS FIRST IMPLEMENTATION\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\treturn allVars;\r\n\t}",
"@Override\r\n\tpublic Vector<Integer> getTypes() {\n\t\treturn this.types;\r\n\t}",
"java.util.List<org.tensorflow.proto.framework.FullTypeDef> \n getArgsList();",
"public List<TypeInfo> getTypes() {\r\n return types;\r\n }",
"@LabeledParameterized.Parameters\n public static List<Object[]> parameters() {\n List<Object[]> modes = Lists.newArrayList();\n for (TypeOfEventStore typeOfEventStore : TypeOfEventStore.values()) {\n modes.add(Objects.o(typeOfEventStore));\n }\n return modes;\n }",
"public List<Parameter> parameters() {\n if (_params != null && !_params.isEmpty()) {\n return new ArrayList<Parameter>(_params.values());\n }\n return null;\n }",
"@Pure\n\tpublic JvmTypeParameter getJvmTypeParameter() {\n\t\treturn this.parameter;\n\t}",
"UsedTypes getTypes();",
"public SortedSet<String> getAvailableParameters() {\n if (allAvailableParameters == null) {\n allAvailableParameters = new TreeSet<String>();\n\n try {\n List<String> dataTypeList = new ArrayList<String>();\n dataTypeList.add(dataType);\n Set<String> parameters = DataDeliveryHandlers\n .getParameterHandler()\n .getNamesByDataTypes(dataTypeList);\n if (parameters != null) {\n allAvailableParameters.addAll(parameters);\n }\n } catch (RegistryHandlerException e) {\n statusHandler.handle(Priority.PROBLEM,\n \"Unable to retrieve the parameter list.\", e);\n }\n }\n return allAvailableParameters;\n }",
"public XtypeGrammarAccess.JvmTypeParameterElements getJvmTypeParameterAccess() {\r\n\t\treturn gaXtype.getJvmTypeParameterAccess();\r\n\t}",
"@Generated(value={\"edu.jhu.cs.bsj.compiler.utils.generator.SourceGenerator\"})\npublic interface TypeParameterNode extends Node, TypeNameBindingNode\n{\n /**\n * Gets the base type name for the parameter.\n * @return The base type name for the parameter.\n * @throws ClassCastException If the value of this property is a special node.\n */\n public IdentifierNode getIdentifier()throws ClassCastException;\n \n /**\n * Gets the union object for the base type name for the parameter.\n * @return A union object representing The base type name for the parameter.\n */\n public NodeUnion<? extends IdentifierNode> getUnionForIdentifier();\n \n /**\n * Changes the base type name for the parameter.\n * @param identifier The base type name for the parameter.\n */\n public void setIdentifier(IdentifierNode identifier);\n \n /**\n * Changes the base type name for the parameter.\n * @param identifier The base type name for the parameter.\n * @throws NullPointerException If the provided value is <code>null</code>.\n * Node union values may have <code>null</code>\n * contents but are never <code>null</code>\n * themselves.\n */\n public void setUnionForIdentifier(NodeUnion<? extends IdentifierNode> identifier) throws NullPointerException;\n \n /**\n * Gets the bounds over the base type.\n * @return The bounds over the base type.\n * @throws ClassCastException If the value of this property is a special node.\n */\n public DeclaredTypeListNode getBounds()throws ClassCastException;\n \n /**\n * Gets the union object for the bounds over the base type.\n * @return A union object representing The bounds over the base type.\n */\n public NodeUnion<? extends DeclaredTypeListNode> getUnionForBounds();\n \n /**\n * Changes the bounds over the base type.\n * @param bounds The bounds over the base type.\n */\n public void setBounds(DeclaredTypeListNode bounds);\n \n /**\n * Changes the bounds over the base type.\n * @param bounds The bounds over the base type.\n * @throws NullPointerException If the provided value is <code>null</code>.\n * Node union values may have <code>null</code>\n * contents but are never <code>null</code>\n * themselves.\n */\n public void setUnionForBounds(NodeUnion<? extends DeclaredTypeListNode> bounds) throws NullPointerException;\n \n /**\n * Generates a deep copy of this node.\n * @param factory The node factory to use to create the deep copy.\n * @return The resulting deep copy node.\n */\n @Override\n public TypeParameterNode deepCopy(BsjNodeFactory factory);\n \n}",
"public Set<Class<?>> getTypes() {\r\n\t\treturn dataTypes;\r\n\t}",
"public Set<Class<?>> getTypes() {\r\n\t\treturn dataTypes;\r\n\t}",
"public Set<Class<?>> getTypes() {\r\n\t\treturn dataTypes;\r\n\t}",
"public List<TypeMetadata> getTypeMetadata() {\n return types;\n }",
"public Parameters getParameters();",
"public Set<Class<?>> getTypes() {\n\t\treturn dataTypes;\n\t}",
"public Set<Class<?>> getTypes() {\n\t\treturn dataTypes;\n\t}",
"public int[] getTypes(){\n int[] types={TYPE_STRING,TYPE_STRING,TYPE_STRING,TYPE_INT};\n return types;\n }",
"public List<ConstraintParameter> getParameters() {\n\t\t// TODO send out a copy..not the reference to our actual data\n\t\treturn m_parameters;\n\t}",
"public ImmutableList<Variable> getVariables() {\n return ImmutableList.copyOf(members);\n }",
"public void getAllAttributeTypes(List<IAttributeType<?>> all);",
"@jdk.Exported\npublic interface TypeParameterTree extends Tree {\n Name getName();\n List<? extends Tree> getBounds();\n\n /**\n * Return annotations on the type parameter declaration.\n *\n * Annotations need Target meta-annotations of\n * {@link java.lang.annotation.ElementType#TYPE_PARAMETER} or\n * {@link java.lang.annotation.ElementType#TYPE_USE}\n * to appear in this position.\n *\n * @return annotations on the type parameter declaration\n * @since 1.8\n */\n List<? extends AnnotationTree> getAnnotations();\n}",
"public List<Class<?>> getTargetParameterTypes() {\n return targetParameterTypes;\n }",
"public Parameters getParameters() {\r\n return params;\r\n }"
]
| [
"0.76912063",
"0.6786304",
"0.66243374",
"0.66123426",
"0.630753",
"0.6307197",
"0.6208264",
"0.6108501",
"0.5954966",
"0.59046715",
"0.58018214",
"0.5778264",
"0.5729708",
"0.57289976",
"0.57037926",
"0.5701471",
"0.56880945",
"0.56608385",
"0.5618203",
"0.5499199",
"0.54936755",
"0.5479086",
"0.54724836",
"0.545671",
"0.5438314",
"0.5433018",
"0.54225224",
"0.5390981",
"0.5367396",
"0.5364512",
"0.53534263",
"0.5323241",
"0.5314514",
"0.5300613",
"0.5299136",
"0.5283679",
"0.5270438",
"0.52593434",
"0.5240125",
"0.52395886",
"0.5229739",
"0.52222544",
"0.5222097",
"0.52195954",
"0.52059484",
"0.5179818",
"0.5158606",
"0.5147204",
"0.5142544",
"0.5134186",
"0.51289624",
"0.512627",
"0.50977254",
"0.5096785",
"0.5096785",
"0.50891507",
"0.50625265",
"0.5057077",
"0.50530773",
"0.50519",
"0.50352985",
"0.50344235",
"0.50227976",
"0.50171626",
"0.5011759",
"0.49661383",
"0.49639186",
"0.4963415",
"0.4963217",
"0.49624035",
"0.49608448",
"0.49563566",
"0.49371165",
"0.49367714",
"0.49330524",
"0.49217814",
"0.4920173",
"0.49052158",
"0.48894066",
"0.48726115",
"0.4870042",
"0.48700047",
"0.48601437",
"0.48573902",
"0.48540267",
"0.48534358",
"0.48479548",
"0.48479548",
"0.48479548",
"0.4846097",
"0.48401746",
"0.48345554",
"0.48345554",
"0.48319173",
"0.48262206",
"0.48216054",
"0.4816731",
"0.48151493",
"0.4810001",
"0.48069748"
]
| 0.7083974 | 1 |
/ / Other methods introduced by ReferenceType / Corresponding TypeDeclaration | public final ResolvedReferenceTypeDeclaration getTypeDeclaration() {
return typeDeclaration;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"PSObject getTypeReference();",
"String getReferenceType();",
"TypeReference getTypeReference();",
"ResolvedReferenceTypeDeclaration declaringType();",
"public abstract byte getReferenceKind();",
"@Pure\n\tprotected TypeReferences getTypeReferences() {\n\t\treturn this.typeReferences;\n\t}",
"@Override\n public final boolean isReferenceType() {\n return true;\n }",
"int getReferenceKind();",
"public interface Generic extends Reference\n{\n}",
"TypeRef getType();",
"ReferenceKind getKind();",
"@Deprecated\n private void addTypeArgumentsToTypeSymbol(ViewComponentSymbolReference typeReference, ASTType astType) {\n if (astType instanceof ASTSimpleReferenceType) {\n ASTSimpleReferenceType astSimpleReferenceType = (ASTSimpleReferenceType) astType;\n if (!astSimpleReferenceType.getTypeArguments().isPresent()) {\n return;\n }\n setActualTypeArguments(typeReference, astSimpleReferenceType.getTypeArguments().get().getTypeArguments());\n }\n else if (astType instanceof ASTComplexReferenceType) {\n ASTComplexReferenceType astComplexReferenceType = (ASTComplexReferenceType) astType;\n for (ASTSimpleReferenceType astSimpleReferenceType : astComplexReferenceType.getSimpleReferenceTypes()) {\n // TODO\n /* ASTComplexReferenceType represents types like class or interface types which always have\n * ASTSimpleReferenceType as qualification. For example: a.b.c<Arg>.d.e<Arg> */\n }\n }\n\n }",
"Type_use getType_use();",
"public IDatatype getReference() { \n\t\treturn myReference;\n\t}",
"public ReferenceType(Name name) {\n super(name.line, name.byteOffset);\n this.name = name;\n }",
"public interface Type extends DeclarationContainer, DeclarationWithType {\n\n public default boolean newSubtypeOf(Type other) throws LookupException {\n return sameAs(other);\n }\n\n @Override\n default SelectionResult<Declaration> updatedTo(Declaration declaration) {\n return DeclarationWithType.super.updatedTo(declaration);\n }\n\n @Override\n default List<? extends DeclarationContainerRelation> relations() throws LookupException {\n \treturn inheritanceRelations();\n }\n\n public default void accumulateSuperTypeJudge(SuperTypeJudge judge) throws LookupException {\n judge.add(this);\n List<Type> temp = getProperDirectSuperTypes();\n for(Type type:temp) {\n Type existing = judge.get(type);\n if(existing == null) {\n type.accumulateSuperTypeJudge(judge);\n }\n }\n }\n\n\n /**\n * Find the super type with the same base type as the given type.\n * \n * @param type The type with the same base type as the requested super type.\n * @return A super type of this type that has the same base type as the given\n * type. If there is no such super type, null is returned.\n * @throws LookupException\n */\n public default Type getSuperTypeWithSameBaseTypeAs(Type type) throws LookupException {\n return superTypeJudge().get(type);\n }\n\n public SuperTypeJudge superTypeJudge() throws LookupException;\n\n public void accumulateAllSuperTypes(Set<Type> acc) throws LookupException;\n\n public void newAccumulateAllSuperTypes(Set<Type> acc) throws LookupException;\n\n public void newAccumulateSelfAndAllSuperTypes(Set<Type> acc) throws LookupException;\n\n\n public Set<Type> getSelfAndAllSuperTypesView() throws LookupException;\n\n public abstract List<InheritanceRelation> explicitNonMemberInheritanceRelations();\n\n public <I extends InheritanceRelation> List<I> explicitNonMemberInheritanceRelations(Class<I> kind);\n\n public List<InheritanceRelation> implicitNonMemberInheritanceRelations();\n\n public default void reactOnDescendantAdded(Element element) {}\n\n public default void reactOnDescendantRemoved(Element element) {}\n\n public default void reactOnDescendantReplaced(Element oldElement, Element newElement) {}\n\n /**\n * Return the fully qualified name.\n * @throws LookupException \n */\n /*@\n\t @ public behavior\n\t @\n\t @ getPackage().getFullyQualifiedName().equals(\"\") ==> \\result == getName();\n\t @ ! getPackage().getFullyQualifiedName().equals(\"\") == > \\result.equals(getPackage().getFullyQualifiedName() + getName());\n\t @*/\n public String getFullyQualifiedName();\n\n /*******************\n * LEXICAL CONTEXT \n *******************/\n\n @Override\n public LocalLookupContext<?> targetContext() throws LookupException;\n\n @Override\n public LookupContext localContext() throws LookupException;\n\n /**\n * If the given element is an inheritance relation, the lookup must proceed to the parent. For other elements,\n * the context is a lexical context connected to the target context to perform a local search.\n * @throws LookupException \n */\n @Override\n public LookupContext lookupContext(Element element) throws LookupException;\n\n public List<ParameterBlock<?>> parameterBlocks();\n\n public <P extends Parameter> ParameterBlock<P> parameterBlock(Class<P> kind);\n\n public void addParameterBlock(ParameterBlock<?> block);\n\n public void removeParameterBlock(ParameterBlock<?> block);\n\n public <P extends Parameter> List<P> parameters(Class<P> kind);\n\n /**\n * Indices start at 1.\n */\n public <P extends Parameter> P parameter(Class<P> kind, int index);\n\n public <P extends Parameter> int nbTypeParameters(Class<P> kind);\n\n public <P extends Parameter> void addParameter(Class<P> kind,P parameter);\n\n public <P extends Parameter> void addAllParameters(Class<P> kind,Collection<P> parameter);\n\n public <P extends Parameter> void replaceParameter(Class<P> kind, P oldParameter, P newParameter);\n\n public <P extends Parameter> void replaceAllParameters(Class<P> kind, List<P> newParameters);\n\n /************************\n * BEING A TYPE ELEMENT *\n ************************/\n\n public List<Declaration> getIntroducedMembers();\n\n /**********\n * ACCESS *\n **********/\n\n /**\n * Add the given element to this type.\n * \n * @throws ChameleonProgrammerException\n * The given element could not be added. E.g when you try to add\n * an element to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre element != null;\n\t @\n\t @ post directlyDeclaredElements().contains(element);\n\t @*/\n public void add(Declarator element) throws ChameleonProgrammerException;\n\n /**\n * Remove the given element to this type.\n * \n * @throws ChameleonProgrammerException\n * The given element could not be added. E.g when you try to add\n * an element to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre element != null;\n\t @\n\t @ post ! directlyDeclaredElements().contains(element);\n\t @*/\n public void remove(Declarator element) throws ChameleonProgrammerException;\n\n /**\n * Add all type elements in the given collection to this type.\n * @param elements\n * @throws ChameleonProgrammerException\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre elements != null;\n\t @ pre !elements.contains(null);\n\t @\n\t @ post directlyDeclaredElements().containsAll(elements);\n\t @*/\n public default void addAll(Collection<? extends Declarator> elements) {\n \telements.forEach(e -> add(e));\n }\n\n /**************\n * SUPERTYPES *\n **************/\n\n /**\n * Return the proper direct super types of this type. A proper super type is a super type\n * that is not equal to this type. A direct super type is a super type that is specified\n * by an inheritance relation of this type, or this type.\n * \n * @return A list containing the direct super types of this type.\n * @throws LookupException The type of an inheritance relation could not be resolved.\n */\n public default List<Type> getProperDirectSuperTypes() throws LookupException {\n\t\tList<Type> result = Lists.create();\n\t\tfor(InheritanceRelation element:inheritanceRelations()) {\n\t\t\tType type = element.superType();\n\t\t\tif (type!=null) {\n\t\t\t\tresult.add(type);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n public Set<Type> getAllSuperTypes() throws LookupException;\n\n public default boolean contains(Type other, TypeFixer trace) throws LookupException {\n return sameAs(other, trace);\n }\n \n public default boolean subtypeOf(Type other) throws LookupException {\n return subtypeOf(other, new TypeFixer());\n }\n\n public default boolean subtypeOf(Type other, TypeFixer trace) throws LookupException {\n TypeFixer clone = trace.clone();\n boolean result = sameAs(other,clone);\n if(! result) {\n clone = trace.clone();\n result = uniSubtypeOf(other,clone);\n if(! result) {\n result = other.uniSupertypeOf(this, trace);\n }\n }\n return result;\n }\n\n public default boolean uniSupertypeOf(Type type, TypeFixer trace) throws LookupException {\n return false;\n }\n\n public default boolean uniSubtypeOf(Type other, TypeFixer trace) throws LookupException {\n Type sameBase = getSuperTypeWithSameBaseTypeAs(other);\n return sameBase != null && sameBase.compatibleParameters(other, trace);\n }\n\n /**\n * Check if this type is assignable to another type.\n * \n * @param other\n * @return\n * @throws LookupException\n */\n /*@\n\t @ public behavior\n\t @\n\t @ post \\result == equals(other) || subTypeOf(other);\n\t @*/\n public boolean assignableTo(Type other) throws LookupException;\n\n /**\n * Return the inheritance relations of this type.\n * \n * @throws LookupException \n */\n /*@\n\t @ public behavior\n\t @\n\t @ post \\result != null;\n\t @*/\n public default List<InheritanceRelation> inheritanceRelations() throws LookupException {\n return nonMemberInheritanceRelations();\n }\n\n public List<InheritanceRelation> nonMemberInheritanceRelations();\n\n public <I extends InheritanceRelation> List<I> nonMemberInheritanceRelations(Class<I> kind);\n\n /**\n * Add the give given inheritance relation to this type.\n * @param relation The relation to add. Cannot be null.\n * @throws ChameleonProgrammerException\n * It is not possible to add the given type. E.g. you cannot\n * add an inheritance relation to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre relation != null;\n\t @ post inheritanceRelations().contains(relation);\n\t @*/\n public void addInheritanceRelation(InheritanceRelation relation);\n\n public void addAllInheritanceRelations(Collection<InheritanceRelation> relations);\n /**\n * Remove the give given inheritance relation from this type.\n * @param relation\n * @throws ChameleonProgrammerException\n * It is not possible to remove the given type. E.g. you cannot\n * remove an inheritance relation to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre relation != null;\n\t @ post ! inheritanceRelations().contains(relation);\n\t @*/\n public void removeNonMemberInheritanceRelation(InheritanceRelation relation) throws ChameleonProgrammerException;\n\n public void removeAllNonMemberInheritanceRelations();\n\n /**\n * Return the members of the given kind directly declared by this type.\n * @return\n * @throws LookupException \n * @throws \n */\n public <T extends Declaration> List<T> localMembers(final Class<T> kind) throws LookupException;\n\n /**\n * Return the members that are implicitly part of this type, such as default constructors and destructors.\n * @return\n */\n public List<Declaration> implicitMembers();\n\n public <M extends Declaration> List<M> implicitMembers(Class<M> kind);\n\n /**\n * Return the members directly declared by this type. The order of the elements in the list is the order in which they\n * are written in the type.\n * @return\n * @throws LookupException \n */\n public List<Declaration> localMembers() throws LookupException;\n\n public <T extends Declaration> List<T> directlyDeclaredMembers(Class<T> kind);\n\n public <T extends Declaration> List<T> directlyDeclaredMembers(Class<T> kind, ChameleonProperty property);\n\n public List<Declaration> directlyDeclaredMembers();\n\n public <D extends Declaration> List<SelectionResult<D>> members(DeclarationSelector<D> selector) throws LookupException;\n\n public <D extends Declaration> List<? extends SelectionResult<D>> localMembers(DeclarationSelector<D> selector) throws LookupException;\n\n public List<Declaration> members() throws LookupException;\n\n /**\n * Return the members of this class.\n * @param <M>\n * @param kind\n * @return\n * @throws LookupException\n */\n public <M extends Declaration> List<M> members(final Class<M> kind) throws LookupException;\n\n /**\n * DO NOT CONFUSE THIS METHOD WITH localMembers(). This method does not\n * transform type elements into members.\n * \n * FIXME: rename to localDeclarators()\n * \n * @return\n */\n public List<? extends Declarator> directlyDeclaredElements();\n\n public <T extends Declarator> List<T> directlyDeclaredElements(Class<T> kind);\n\n @Override\n public List<? extends Declaration> declarations() throws LookupException;\n\n public Type alias(String name);\n\n public Type intersection(Type type) throws LookupException;\n\n public Type intersectionDoubleDispatch(Type type) throws LookupException;\n\n public Type intersectionDoubleDispatch(IntersectionType type) throws LookupException;\n\n public void replace(Declarator oldElement, Declarator newElement);\n\n public Type baseType();\n\n public default boolean compatibleParameters(Type other, TypeFixer trace) throws LookupException {\n int size = nbTypeParameters(TypeParameter.class);\n boolean result = true;\n for(int i=0; i< size && result;i++) {\n TypeParameter otherParameter = other.parameter(TypeParameter.class, i);\n TypeParameter myParameter = parameter(TypeParameter.class,i);\n result = otherParameter.contains(myParameter, trace.clone());\n }\n return result;\n }\n\n\n public Type union(Type lowerBound) throws LookupException;\n\n public Type unionDoubleDispatch(Type type) throws LookupException;\n\n public Type unionDoubleDispatch(UnionType type) throws LookupException;\n\n public default boolean sameAs(Type other, TypeFixer trace) throws LookupException {\n if(other == this || trace.contains(other, this)) {\n return true;\n }\n TypeFixer newTrace = trace.clone();\n newTrace.add(other, this);\n boolean result = uniSameAs(other,newTrace);\n if(! result) {\n newTrace = trace.clone();\n newTrace.add(other, this);\n result = other.uniSameAs(this,newTrace);\n }\n return result;\n }\n\n /**\n * Check if this type is equal to the given type, taking\n * recursive types into account. If a loop is encountered,\n * that branch of the check will return true: it did not\n * encounter a problem.\n * \n * @param other The type of which we want to check if it is the same as this type.\n * @param fixer The object that will ensure that we can do a fixed point computation.\n * @return\n * @throws LookupException\n */\n public boolean uniSameAs(Type other, TypeFixer fixer) throws LookupException;\n\n /**\n * <p>Return the lower bound of this type.</p>\n * \n * <p> By <b>default</b>, the current object is returned.\n * \n * @return A type representing the lower bound of this type, when consider as an interval.\n * @throws LookupException\n */\n /*@\n @ post \\result != null;\n @ post \\result.subtypeOf(this);\n @*/\n public default Type lowerBound() throws LookupException {\n return this;\n }\n\n /**\n * <p>Return the upper bound of this type.</p>\n * \n * <p> By <b>default</b>, the current object is returned.\n * \n * @return A type representing the upper bound of this type, when consider as an interval.\n * @throws LookupException\n */\n /*@\n @ post \\result != null;\n @ post subtypeOf(\\result);\n @*/\n public default Type upperBound() throws LookupException {\n return this;\n }\n\n /**\n * A name that is strictly for debugging purposes.\n * \n * @return The result is not null.\n */\n public String infoName();\n\n /**\n * Verify whether the this type is a subtype of the given other type. \n * If that is the case, then a valid verification result is returned.\n * Otherwise, a problem is reported. The message of the problem is \n * constructed using the descriptions of the meaning of\n * each type as determined by the arguments.\n * \n * @param type The type for which the subtype relation is verified.\n * @param meaningThisType A textual description of the meaning of this type.\n * @param meaningOtherType A textual description of the meaning of the other type.\n * @param cause The element in which the verification is done.\n * @return\n */\n public Verification verifySubtypeOf(Type type, String meaningThisType, String meaningOtherType, Element cause);\n\n\n /**\n * @return\n */\n public default boolean isWildCard() {\n return false;\n }\n\n}",
"Symbol getRef();",
"NonElement<T,C> getTypeInfo(Ref<T,C> ref);",
"@Override\r\n\tpublic void visit(TypedefDefinition typedefDefinition) {\n\r\n\t}",
"public void methodReferences() {\n\t\t// Write sample for below\n\n\t\t// Static method\n\t\t// Instance method on parameter objects\n\t\t// Instance method\n\t\t// Constructor\n\t}",
"@Override\n protected void onTypeRef(SourceTypeBinding referencedType,\n CompilationUnitDeclaration unitOfReferrer) {\n result.add(String.valueOf(referencedType.getFileName()));\n }",
"public String getRefType() {\n return refType;\n }",
"public interface FType {\n boolean isPointer();\n boolean isDimension();\n String getCanonicalText();\n FTypeParamValue getKind();\n}",
"List<LightweightTypeReference> getTypeArguments();",
"public interface ResolvedMethodLikeDeclaration extends ResolvedDeclaration, ResolvedTypeParametrizable, HasAccessSpecifier {\n\n /**\n * The package name of the declaring type.\n */\n default String getPackageName() {\n return declaringType().getPackageName();\n }\n\n /**\n * The class(es) wrapping the declaring type.\n */\n default String getClassName() {\n return declaringType().getClassName();\n }\n\n /**\n * The qualified name of the method composed by the qualfied name of the declaring type\n * followed by a dot and the name of the method.\n */\n default String getQualifiedName() {\n return declaringType().getQualifiedName() + \".\" + this.getName();\n }\n\n /**\n * The signature of the method.\n */\n default String getSignature() {\n StringBuilder sb = new StringBuilder();\n sb.append(getName());\n sb.append(\"(\");\n for (int i = 0; i < getNumberOfParams(); i++) {\n if (i != 0) {\n sb.append(\", \");\n }\n sb.append(getParam(i).describeType());\n }\n sb.append(\")\");\n return sb.toString();\n }\n\n /**\n * The qualified signature of the method. It is composed by the qualified name of the declaring type\n * followed by the signature of the method.\n */\n default String getQualifiedSignature() {\n return declaringType().getId() + \".\" + this.getSignature();\n }\n\n /**\n * The type in which the method is declared.\n */\n ResolvedReferenceTypeDeclaration declaringType();\n\n /**\n * Number of params.\n */\n int getNumberOfParams();\n\n /**\n * Get the ParameterDeclaration at the corresponding position or throw IllegalArgumentException.\n */\n ResolvedParameterDeclaration getParam(int i);\n\n /**\n * Utility method to get the last ParameterDeclaration. It throws UnsupportedOperationException if the method\n * has no parameters.\n * The last parameter can be variadic and sometimes it needs to be handled in a special way.\n */\n default ResolvedParameterDeclaration getLastParam() {\n if (getNumberOfParams() == 0) {\n throw new UnsupportedOperationException(\"This method has no typeParametersValues, therefore it has no a last parameter\");\n }\n return getParam(getNumberOfParams() - 1);\n }\n\n /**\n * Has the method or construcor a variadic parameter?\n * Note that when a method has a variadic parameter it should have an array type.\n */\n default boolean hasVariadicParameter() {\n if (getNumberOfParams() == 0) {\n return false;\n } else {\n return getParam(getNumberOfParams() - 1).isVariadic();\n }\n }\n\n @Override\n default Optional<ResolvedTypeParameterDeclaration> findTypeParameter(String name) {\n for (ResolvedTypeParameterDeclaration tp : this.getTypeParameters()) {\n if (tp.getName().equals(name)) {\n return Optional.of(tp);\n }\n }\n return declaringType().findTypeParameter(name);\n }\n\n /**\n * Number of exceptions listed in the throws clause.\n */\n int getNumberOfSpecifiedExceptions();\n\n /**\n * Type of the corresponding entry in the throws clause.\n *\n * @throws IllegalArgumentException if the index is negative or it is equal or greater than the value returned by\n * getNumberOfSpecifiedExceptions\n * @throws UnsupportedOperationException for those types of methods of constructor that do not declare exceptions\n */\n ResolvedType getSpecifiedException(int index);\n\n default List<ResolvedType> getSpecifiedExceptions() {\n if (getNumberOfSpecifiedExceptions() == 0) {\n return Collections.emptyList();\n } else {\n List<ResolvedType> exceptions = new LinkedList<>();\n for (int i = 0; i < getNumberOfSpecifiedExceptions(); i++) {\n exceptions.add(getSpecifiedException(i));\n }\n return exceptions;\n }\n }\n}",
"@Test\n void rawType_rawType() {\n var ref = new TypeRef<String>() {};\n assertEquals(String.class, ref.rawType());\n }",
"@Test\n public void complexPointerTypeParameters() {\n demangle(null, \"_Z14pointerAliasesPPvS_PS0_PPi\", null, ident(\"pointerAliases\"), null, Pointer.class, Pointer.class, Pointer.class, Pointer.class);\n demangle(null, \"_Z14pointerAliasesPPvS_PS0_PPi\", null, ident(\"pointerAliases\"), null, \"**Void\", \"*Void\", \"***Void\", \"**Integer\");\n }",
"PrimitiveTypeSourceReference createPrimitiveTypeSourceReference();",
"abstract public Type type();",
"private JavaType(C_PTR primitivePointerType) {\n this.primitivePointerType = primitivePointerType;\n }",
"@Override\n\tpublic void type() {\n\t\t\n\t}",
"public interface Type {\n}",
"interface TypeMap {\n\n\tCompiledFieldReference makeFieldReference(CollectedItem original, Getter inputGetter, CompiledGetterSetterCache cache) throws CompileException;\n\n}",
"public List<Ref<? extends Type>> typeVariables();",
"@Override\n public Optional<TypeContext<Reference>> typeContext() {\n return wrappedSerializationContext.typeContext();\n }",
"public TypeLiteralElements getTypeLiteralAccess() {\r\n\t\treturn pTypeLiteral;\r\n\t}",
"public final boolean isReference() {\n \treturn !isPrimitive();\n }",
"public Type resolveReferenceType( Object name ) {\n throw new UnsupportedOperationException( Messages.getErrorString( \"PMSFormulaContext.ERROR_0001_INVALID_USE\" ) ); //$NON-NLS-1$\n }",
"public ReferenceHelper getReferenceHelper();",
"ReferenceBound(ReferenceType boundType) {\n this.boundType = boundType;\n }",
"public interface EffectFullType extends Type\n{\n}",
"@Deprecated\n private void addTypeArgumentsToTypeSymbol(MCTypeReference<? extends MCTypeSymbol> typeReference, ASTType astType) {\n if (astType instanceof ASTSimpleReferenceType) {\n ASTSimpleReferenceType astSimpleReferenceType = (ASTSimpleReferenceType) astType;\n if (!astSimpleReferenceType.getTypeArguments().isPresent()) {\n return;\n }\n List<ActualTypeArgument> actualTypeArguments = new ArrayList<>();\n for (ASTTypeArgument astTypeArgument : astSimpleReferenceType.getTypeArguments().get().getTypeArguments()) {\n addActualTypeArguments(astTypeArgument, actualTypeArguments, typeReference);\n typeReference.setActualTypeArguments(actualTypeArguments);\n }\n }\n else if (astType instanceof ASTComplexReferenceType) {\n ASTComplexReferenceType astComplexReferenceType = (ASTComplexReferenceType) astType;\n for (ASTSimpleReferenceType astSimpleReferenceType : astComplexReferenceType.getSimpleReferenceTypes()) {\n // TODO\n /* ASTComplexReferenceType represents types like class or interface types which always have\n * ASTSimpleReferenceType as qualification. For example: a.b.c<Arg>.d.e<Arg> */\n }\n }\n else if (astType instanceof ASTComplexArrayType) {\n ASTComplexArrayType astComplexArrayType = (ASTComplexArrayType) astType;\n // references to types with dimension>0, e.g., String[]\n addTypeArgumentsToTypeSymbol(typeReference, astComplexArrayType.getComponentType());\n int dimension = astComplexArrayType.getDimensions();\n typeReference.setDimension(dimension);\n }\n }",
"HxType createReference(final HxType resolvedType);",
"type getType();",
"@DerivedProperty\n\t\nSet<CtTypeReference<?>> getReferencedTypes();",
"public interface Type {\n\n}",
"private PTypeRefSkel() {}",
"abstract public Type getType();",
"public int getType() {\n/* 50 */ return this.type;\n/* */ }",
"Decl getWhole();",
"public void printType() {\n System.out.println(\"Type: \" + objRef.getClass().getName());\n }",
"public interface GosuTypeArgumentList extends IGosuPsiElement\n{\n GosuTypeElement[] getTypeArgumentElements();\n}",
"public abstract BoundType a();",
"interface Bank<T>{\t\t\t// here Singapore is considered as Type<T>: Bank<T>.\n\tvoid bankInfo(T ref);\t// ref is local variable of Singapore Type\n}",
"FieldRefType createFieldRefType();",
"UsedTypes getTypes();",
"void visitReferenceValue(ReferenceValue referenceValue);",
"public interface StandardTypesLocalService {\n BigInteger getNewBigInteger(BigInteger bi);\n BigInteger[] getNewBigIntegerArray(BigInteger[] bia);\n \n BigDecimal getNewBigDecimal(BigDecimal bd);\n BigDecimal[] getNewBigDecimalArray(BigDecimal[] bda);\n\n Calendar getNewCalendar(Calendar c);\n Calendar[] getNewCalendarArray(Calendar[] ca);\n \n Date getNewDate(Date d);\n Date[] getNewDateArray(Date[] da);\n\n QName getNewQName(QName qname);\n QName[] getNewQNameArray(QName[] qnames);\n \n URI getNewURI(URI uri);\n URI[] getNewURIArray(URI[] uris);\n \n XMLGregorianCalendar getNewXMLGregorianCalendar(XMLGregorianCalendar xgcal);\n XMLGregorianCalendar[] getNewXMLGregorianCalendarArray(XMLGregorianCalendar[] xgcal);\n \n Duration getNewDuration(Duration d);\n Duration[] getNewDurationArray(Duration[] da);\n \n Object getNewObject(Object obj);\n Object[] getNewObjectArray(Object[] objs);\n \n Image getNewImage(Image img);\n Image[] getNewImageArray(Image[] imgs);\n \n DataHandler getNewDataHandler(DataHandler dh);\n DataHandler[] getNewDataHandlerArray(DataHandler[] dha);\n\n Source getNewSource(Source src);\n Source[] getNewSourceArray(Source[] srcs);\n \n UUID getNewUUID(UUID uuid);\n UUID[] getNewUUIDArray(UUID[] uuids);\n}",
"ComponentTypes.AccessPoint getType();",
"int getOneof1009();",
"int getType();",
"int getType();",
"int getType();",
"int getType();",
"int getType();",
"int getType();",
"int getType();",
"int getType();",
"public void testSelfReferencesSimple()\n {\n TypeResolver typeResolver = new TypeResolver();\n MemberResolver memberResolver = new MemberResolver(typeResolver);\n ResolvedType type = typeResolver.resolve(MyComparable.class);\n ResolvedMethod[] resolvedMethods = memberResolver.resolve(type, null, null).getMemberMethods();\n\n assertEquals(1, resolvedMethods.length);\n assertEquals(Comparable.class, resolvedMethods[0].getReturnType().getErasedType());\n }",
"public int getType() throws PDFNetException {\n/* 466 */ return GetType(this.a);\n/* */ }",
"protected void method_6194(class_1583 var1) {\r\n super.method_6194(var1);\r\n String[] var10001 = field_5882;\r\n var1.method_8667(\"Type\", this.field_5880);\r\n }",
"private MCTypeReference<? extends MCTypeSymbol> initTypeRefGeneralType(ASTPort node, StringBuilder typeName, ASTType astType) {\n MCTypeReference<? extends MCTypeSymbol> typeRef = null;\n typeName.append(ArcTypePrinter.printTypeWithoutTypeArgumentsAndDimension(astType));\n //Log.debug(astType.toString(),\"TYPE:\");\n //Log.debug(typeName,\"TYPEName:\");\n typeRef = new CommonMCTypeReference<MCTypeSymbol>(typeName.toString(), MCTypeSymbol.KIND, currentScope().get());\n typeRef.setDimension(TypesHelper.getArrayDimensionIfArrayOrZero(astType));\n addTypeArgumentsToTypeSymbol(typeRef, astType);\n return typeRef;\n }",
"public final JavaliParser.type_return type() throws RecognitionException {\n\t\tJavaliParser.type_return retval = new JavaliParser.type_return();\n\t\tretval.start = input.LT(1);\n\n\t\tObject root_0 = null;\n\n\t\tParserRuleReturnScope primitiveType114 =null;\n\t\tParserRuleReturnScope referenceType115 =null;\n\n\n\t\ttry {\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:551:2: ( primitiveType | referenceType )\n\t\t\tint alt38=2;\n\t\t\tswitch ( input.LA(1) ) {\n\t\t\tcase 92:\n\t\t\t\t{\n\t\t\t\tint LA38_1 = input.LA(2);\n\t\t\t\tif ( (LA38_1==Identifier) ) {\n\t\t\t\t\talt38=1;\n\t\t\t\t}\n\t\t\t\telse if ( (LA38_1==84) ) {\n\t\t\t\t\talt38=2;\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 38, 1, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 90:\n\t\t\t\t{\n\t\t\t\tint LA38_2 = input.LA(2);\n\t\t\t\tif ( (LA38_2==Identifier) ) {\n\t\t\t\t\talt38=1;\n\t\t\t\t}\n\t\t\t\telse if ( (LA38_2==84) ) {\n\t\t\t\t\talt38=2;\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 38, 2, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 86:\n\t\t\t\t{\n\t\t\t\tint LA38_3 = input.LA(2);\n\t\t\t\tif ( (LA38_3==Identifier) ) {\n\t\t\t\t\talt38=1;\n\t\t\t\t}\n\t\t\t\telse if ( (LA38_3==84) ) {\n\t\t\t\t\talt38=2;\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 38, 3, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase Identifier:\n\t\t\t\t{\n\t\t\t\talt38=2;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 38, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\t\t\tswitch (alt38) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:551:4: primitiveType\n\t\t\t\t\t{\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\n\n\t\t\t\t\tpushFollow(FOLLOW_primitiveType_in_type2602);\n\t\t\t\t\tprimitiveType114=primitiveType();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tadaptor.addChild(root_0, primitiveType114.getTree());\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:552:4: referenceType\n\t\t\t\t\t{\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\n\n\t\t\t\t\tpushFollow(FOLLOW_referenceType_in_type2607);\n\t\t\t\t\treferenceType115=referenceType();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tadaptor.addChild(root_0, referenceType115.getTree());\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\tretval.stop = input.LT(-1);\n\n\t\t\tretval.tree = (Object)adaptor.rulePostProcessing(root_0);\n\t\t\tadaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n\t\t}\n\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\tthrow re;\n\t\t}\n\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn retval;\n\t}",
"public void ref() {\n\n\t}",
"public Type[] getArgumentTypes() {\n/* 236 */ return Type.getArgumentTypes(this.desc);\n/* */ }",
"protected abstract String getType();",
"@Override\n public int getType() {\n return 0x1c;\n }",
"public abstract R createReference(T type, Object value);",
"TypedObjectDecl createTypedObjectDecl();",
"public abstract Type getType();",
"public interface InterpolationMethodBaseType extends CodeType {\r\n}",
"int getOneof2339();",
"public boolean canBeReferencedByIDREF() {\n/* 171 */ return false;\n/* */ }",
"TypeImport createTypeImport();",
"@Override\n\tpublic int getType() {\n\t\treturn 1;\n\t}",
"public interface C11962p<T> {\n /* renamed from: a */\n void mo30271a(C11961o<T> oVar) throws Exception;\n}",
"public abstract ForceType getForceType();",
"private MCTypeReference<? extends MCTypeSymbol> initTypeRef(ASTPort node, StringBuilder typeName, ASTType astType) {\n if (node.getType().get() instanceof ASTRange) {\n return initTypeRefASTRange(node, typeName, (ASTRange) astType);\n }\n else if (node.getType().get() instanceof ASTRanges) {\n return initTypeRefASTRanges(node, typeName, (ASTRanges) astType);\n }\n Log.debug(node.getName().isPresent() ? node.getName().get() : \"unnamed port\" + \" \" + astType.toString(), \"info\");\n return initTypeRefGeneralType(node, typeName, astType);\n }",
"public interface C45946d {\n @C6457h\n /* renamed from: a */\n C12466b<TypedInput> mo111267a(@C6450ac String str, @C6461l List<C12461b> list);\n\n @C6468s\n /* renamed from: a */\n C12466b<TypedInput> mo111268a(@C6450ac String str, @C6461l List<C12461b> list, @C6451b TypedByteArray typedByteArray);\n}",
"public void visit(BinCITypesDefStatement x) {\n }",
"public abstract jq_Type getDeclaredType();",
"public static TypeReference newFormalParameterReference(int paramIndex) {\n/* 268 */ return new TypeReference(0x16000000 | paramIndex << 16);\n/* */ }",
"public interface C0939c {\n }",
"int getOneof2090();",
"int getOneof2946();",
"public interface C13719g {\n}",
"int getOneof1109();",
"LineReferenceType getLineReference();",
"final int getNodeType0() {\n return EXPRESSION_METHOD_REFERENCE;\n }",
"public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}",
"PrimitiveTypesLibrary createPrimitiveTypesLibrary();"
]
| [
"0.69636446",
"0.6939604",
"0.6690757",
"0.66161656",
"0.64950234",
"0.6439051",
"0.62945634",
"0.6144512",
"0.61062557",
"0.6031725",
"0.60078686",
"0.5999423",
"0.59933925",
"0.59587145",
"0.5950855",
"0.58931816",
"0.58911115",
"0.5855441",
"0.5844932",
"0.58321124",
"0.5830886",
"0.58261603",
"0.57773167",
"0.5765778",
"0.57548165",
"0.57538295",
"0.5731788",
"0.57315695",
"0.57246387",
"0.5712798",
"0.57025546",
"0.5696115",
"0.56941855",
"0.5688829",
"0.56811124",
"0.567542",
"0.567417",
"0.56737924",
"0.56177664",
"0.5616789",
"0.56159604",
"0.5608219",
"0.55810577",
"0.55692005",
"0.55683637",
"0.5567674",
"0.5566021",
"0.55515116",
"0.5547421",
"0.5539944",
"0.55323803",
"0.55167264",
"0.55082285",
"0.5506778",
"0.55062366",
"0.5482654",
"0.5473204",
"0.5456487",
"0.544208",
"0.5437772",
"0.5432463",
"0.5432463",
"0.5432463",
"0.5432463",
"0.5432463",
"0.5432463",
"0.5432463",
"0.5432463",
"0.5424158",
"0.5413356",
"0.5404554",
"0.539373",
"0.53841794",
"0.53805584",
"0.53755784",
"0.5371917",
"0.5368147",
"0.5367983",
"0.53657603",
"0.5365118",
"0.5362846",
"0.53573513",
"0.5354787",
"0.5352333",
"0.5349391",
"0.534422",
"0.534379",
"0.53436875",
"0.5340879",
"0.53395724",
"0.53323305",
"0.5330971",
"0.5330189",
"0.53253675",
"0.53234416",
"0.53221977",
"0.5318828",
"0.5310824",
"0.53059906",
"0.5300605",
"0.5293955"
]
| 0.0 | -1 |
The type of the field could be different from the one in the corresponding FieldDeclaration because type variables would be solved. | public Optional<ResolvedType> getFieldType(String name) {
if (!typeDeclaration.hasField(name)) {
return Optional.empty();
}
ResolvedType type = typeDeclaration.getField(name).getType();
type = useThisTypeParametersOnTheGivenType(type);
return Optional.of(type);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic boolean visit(FieldDeclaration node) {\n\t\treturn super.visit(node);\r\n\t}",
"@Test\n\t@Ignore\n\tpublic void field() throws Exception {\n\t\tTypeDescriptor desc = new TypeDescriptor(getClass().getField(\"field\"));\n\t\tassertEquals(Integer.class, desc.getMapKeyTypeDescriptor().getElementType());\n\t\tassertEquals(Long.class, desc.getMapValueTypeDescriptor().getElementType());\n\t}",
"FieldsType createFieldsType();",
"FieldRefType createFieldRefType();",
"public VarTypeNative getFieldVarType();",
"static String varType(Field field)\r\n {\r\n switch(field.type)\r\n {\r\n case Field.BYTE:\r\n return \"BYTE\";\r\n case Field.SHORT:\r\n return \"SHORT\";\r\n case Field.INT:\r\n case Field.SEQUENCE:\r\n case Field.LONG:\r\n return \"LONG\";\r\n case Field.CHAR:\r\n case Field.ANSICHAR:\r\n return \"CHAR(\"+String.valueOf(field.length)+\")\";\r\n case Field.DATE:\r\n case Field.DATETIME:\r\n case Field.TIME:\r\n case Field.TIMESTAMP:\r\n return \"DATETIME\";\r\n case Field.FLOAT:\r\n case Field.DOUBLE:\r\n if (field.scale != 0)\r\n return \"DOUBLE(\"+String.valueOf(field.precision)+\", \"+String.valueOf(field.scale)+\")\";\r\n else if (field.precision != 0)\r\n return \"DOUBLE(\"+String.valueOf(field.precision)+\")\";\r\n return \"DOUBLE\";\r\n case Field.BLOB:\r\n return \"LONGBINARY\";\r\n case Field.TLOB:\r\n return \"LONGTEXT\";\r\n case Field.MONEY:\r\n return \"DOUBLE(15,2)\";\r\n case Field.USERSTAMP:\r\n return \"VARCHAR(16)\";\r\n case Field.IDENTITY:\r\n return \"<not supported>\";\r\n }\r\n return \"unknown\";\r\n }",
"java.lang.String getField1646();",
"@Override\r\n\tpublic void visit(FieldDeclNode fieldDeclNode) {\n\t\tfieldDeclNode.getType().accept(this);\r\n\t\t\r\n\t\t//Only visit declared variables, not the type!\r\n\t\tVarDeclListNode vars = fieldDeclNode.getDeclaredVariables();\r\n\t\tfor(VarDeclNode v : vars){\r\n\t\t\t\r\n\t\t\t//Set cur field\r\n\t\t\tVariable fieldBefore = curField;\r\n\t\t\tcurField = v.getName().getSemantics();\r\n\t\t\t\r\n\t\t\t//Accept\r\n\t\t\tv.accept(this);\r\n\t\t\t\r\n\t\t\t//Reset cur field\r\n\t\t\tcurField = fieldBefore;\r\n\t\t}\r\n\t}",
"FieldRuleType createFieldRuleType();",
"java.lang.String getField1338();",
"java.lang.String getField1334();",
"java.lang.String getField1734();",
"java.lang.String getField1834();",
"public int getFieldType(String strFieldName) {\n\treturn 0;\n}",
"java.lang.String getField1792();",
"void printFieldType(AField f) {\n\t\tif (f.garbage) {\n\t\t\t// ignore fields which do not appear in lemmas\n\t\t\treturn;\n\t\t}\n\n\t\t// get the type of the field\n\t\tType t = f.getType();\n\n\t\t// ignore double and long field\n\t\tif (t.getTag() == Type.T_DOUBLE || t.getTag() == Type.T_LONG)\n\t\t\treturn;\n\n\t\t// ignore static final fields that are expanded\n\t\tif (f.isExpanded())\n\t\t\treturn;\n\n\t\tstream.print(\",\\n\" + f.getBName());\n\t}",
"java.lang.String getField1732();",
"Field_decl getField();",
"java.lang.String getField1007();",
"java.lang.String getField1764();",
"java.lang.String getField1336();",
"java.lang.String getField1337();",
"java.lang.String getField1713();",
"java.lang.String getField1731();",
"java.lang.String getField1843();",
"FieldDefinition createFieldDefinition();",
"java.lang.String getField1009();",
"public void testField1() throws JavaModelException {\n\t\tASTNode node = buildAST(\n\t\t\t\"public class X {\\n\" +\n\t\t\t\" Object /*start*/field/*end*/;\\n\" +\n\t\t\t\"}\"\n\t\t);\n\t\tIBinding binding = ((VariableDeclaration) node).resolveBinding();\n\t\tassertNotNull(\"No binding\", binding);\n\t\tIJavaElement element = binding.getJavaElement();\n\t\tassertElementEquals(\n\t\t\t\"Unexpected Java element\",\n\t\t\t\"field [in X [in [Working copy] X.java [in <default> [in <project root> [in P]]]]]\",\n\t\t\telement\n\t\t);\n\t\tassertTrue(\"Element should exist\", element.exists());\n\t}",
"@Override\n\tpublic void VisitGetFieldNode(GetFieldNode Node) {\n\n\t}",
"java.lang.String getField1339();",
"InstrumentedType withField(FieldDescription.Token token);",
"public void testField2() throws JavaModelException {\n\t\tASTNode node = buildAST(\n\t\t\t\"public class X {\\n\" +\n\t\t\t\" Object foo() {\\n\" +\n\t\t\t\" return new Object() {\\n\" +\n\t\t\t\" Object /*start*/field/*end*/;\\n\" +\n\t\t\t\" };\\n\" +\n\t\t\t\" }\\n\" +\n\t\t\t\"}\"\n\t\t);\n\t\tIBinding binding = ((VariableDeclaration) node).resolveBinding();\n\t\tassertNotNull(\"No binding\", binding);\n\t\tIJavaElement element = binding.getJavaElement();\n\t\tassertElementEquals(\n\t\t\t\"Unexpected Java element\",\n\t\t\t\"field [in <anonymous #1> [in foo() [in X [in [Working copy] X.java [in <default> [in <project root> [in P]]]]]]]\",\n\t\t\telement\n\t\t);\n\t\tassertTrue(\"Element should exist\", element.exists());\n\t}",
"java.lang.String getField1727();",
"java.lang.String getField1406();",
"java.lang.String getField1742();",
"java.lang.String getField1879();",
"java.lang.String getField1610();",
"java.lang.String getField1702();",
"java.lang.String getField1892();",
"java.lang.String getField1766();",
"java.lang.String getField1839();",
"java.lang.String getField1711();",
"java.lang.String getField1729();",
"java.lang.String getField1866();",
"java.lang.String getField1873();",
"public abstract FieldType getTargetFieldType();",
"java.lang.String getField1894();",
"java.lang.String getField1831();",
"java.lang.String getField1823();",
"java.lang.String getField1863();",
"java.lang.String getField1881();",
"java.lang.String getField1779();",
"java.lang.String getField1829();",
"java.lang.String getField1782();",
"java.lang.String getField1822();",
"java.lang.String getField1723();",
"java.lang.String getField1887();",
"java.lang.String getField1534();",
"java.lang.String getField1835();",
"java.lang.String getField1733();",
"java.lang.String getField1744();",
"java.lang.String getField1003();",
"java.lang.String getField1877();",
"java.lang.String getField1728();",
"java.lang.String getField1722();",
"java.lang.String getField1878();",
"java.lang.String getField1134();",
"public Class<?> getType(){\n return field.getType();\n }",
"java.lang.String getField1335();",
"java.lang.String getField1743();",
"java.lang.String getField1217();",
"java.lang.String getField1031();",
"java.lang.String getField1715();",
"java.lang.String getField1026();",
"java.lang.String getField1777();",
"java.lang.String getField1341();",
"java.lang.String getField1342();",
"java.lang.String getField1844();",
"java.lang.String getField1718();",
"java.lang.String getField1741();",
"java.lang.String getField1773();",
"java.lang.String getField1781();",
"java.lang.String getField1813();",
"java.lang.String getField1716();",
"java.lang.String getField1837();",
"java.lang.String getField1616();",
"java.lang.String getField1893();",
"java.lang.String getField1841();",
"java.lang.String getField1739();",
"java.lang.String getField1763();",
"java.lang.String getField1889();",
"java.lang.String getField1527();",
"void putField(String fieldName, Type type, NQJVarDecl field);",
"java.lang.String getField1582();",
"java.lang.String getField1218();",
"java.lang.String getField1317();",
"java.lang.String getField1869();",
"java.lang.String getField1721();",
"java.lang.String getField1789();",
"java.lang.String getField1838();",
"java.lang.String getField1392();"
]
| [
"0.64402395",
"0.6408996",
"0.636585",
"0.6315031",
"0.63124794",
"0.6270042",
"0.626126",
"0.6243553",
"0.62178916",
"0.6209338",
"0.62025213",
"0.617124",
"0.6147993",
"0.6146944",
"0.6134087",
"0.61334604",
"0.613234",
"0.6123818",
"0.612315",
"0.6117688",
"0.61079377",
"0.60996526",
"0.6099535",
"0.6096935",
"0.6093843",
"0.6092238",
"0.608976",
"0.6089351",
"0.60885763",
"0.60819304",
"0.6081894",
"0.60798126",
"0.6069342",
"0.6062691",
"0.6060525",
"0.6058314",
"0.6056559",
"0.6054132",
"0.60503435",
"0.60502225",
"0.6048645",
"0.6044103",
"0.60430014",
"0.6040674",
"0.6035839",
"0.6032553",
"0.6030956",
"0.6028141",
"0.60266477",
"0.6025565",
"0.6023497",
"0.6022984",
"0.6022526",
"0.6022465",
"0.60220337",
"0.6020544",
"0.6019371",
"0.6019266",
"0.6019217",
"0.6018917",
"0.60186285",
"0.601805",
"0.6015812",
"0.6015507",
"0.60152483",
"0.6013972",
"0.6013785",
"0.6012772",
"0.60125154",
"0.6012397",
"0.6012393",
"0.6011976",
"0.6011768",
"0.60105944",
"0.60100925",
"0.6008834",
"0.6008602",
"0.6007645",
"0.60074383",
"0.60059196",
"0.60049635",
"0.6003769",
"0.6003164",
"0.6002387",
"0.60014164",
"0.60007423",
"0.600062",
"0.59964436",
"0.59947133",
"0.5994587",
"0.5994486",
"0.5994465",
"0.5993422",
"0.5993406",
"0.5993238",
"0.5993194",
"0.59931856",
"0.5989461",
"0.59878653",
"0.598786",
"0.5986943"
]
| 0.0 | -1 |
Has the TypeDeclaration a name? Anonymous classes do not have one. | public boolean hasName() {
return typeDeclaration.hasName();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static boolean declarationType(FileInputStream f){\n if(observer != null){\n observer.parser.setCurrentRule(\"declarationType\", true);\n }\n CToken t = new CToken();\n\n //DataType\n if(!dataType(f)){\n return false;\n }\n if(observer != null){\n observer.parser.setCurrentRule(\"declarationType\", true);\n }\n t = CScanner.getNextToken(f);\n if(observer != null){\n observer.parser.setCurrentToken(t);\n }\n //Identifier\n if (!t.type.equals(\"Identifier\")) {\n System.err.format(\"Syntax Error: In rule DeclarationType unexpected token \\\"%s\\\" of type %s on line %d.\\n\", t.token, t.type, t.lineNum);\n System.exit(0);\n }\n if(observer != null){\n observer.parser.setCurrentRule(\"declarationType\", false);\n }\n return true;\n }",
"public TypeDefinition isType(String name){\n return((TypeDefinition)typeDefs.get(getDefName(name)));\n }",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"public boolean visit(\n \t\tTypeDeclaration localTypeDeclaration,\n \t\tBlockScope scope) {\n \t\treturn false;\n \t}",
"boolean hasClassname();",
"public final boolean isSimpleName() {\n return (_names.length == 1);\n }",
"private boolean isDeclaration() throws IOException\n\t{\t\n\t\treturn isGlobalDeclaration();\n\t}",
"public ContainsNamedTypeChecker(String name) {\n myNames.add(name);\n }",
"static Identifier makeTypeClass(final QualifiedName name) {\r\n if (name == null) {\r\n return null;\r\n } else {\r\n return new Identifier(Category.TYPE_CLASS, name);\r\n }\r\n }",
"public boolean hasType() {\n return fieldSetFlags()[0];\n }",
"public boolean isDocTypeDeclaration() {\r\n\t\treturn name==Tag.DOCTYPE_DECLARATION;\r\n\t}",
"public boolean isTypeInitialized() {\n return type_is_initialized; \n }",
"public void testAnonymousType() throws JavaModelException {\n\t\tASTNode node = buildAST(\n\t\t\t\"public class X {\\n\" +\n\t\t\t\" Object foo() {\\n\" +\n\t\t\t\" return new Object() /*start*/{\\n\" +\n\t\t\t\" }/*end*/;\\n\" +\n\t\t\t\" }\\n\" +\n\t\t\t\"}\"\n\t\t);\n\t\tIBinding binding = ((AnonymousClassDeclaration) node).resolveBinding();\n\t\tassertNotNull(\"No binding\", binding);\n\t\tIJavaElement element = binding.getJavaElement();\n\t\tassertElementEquals(\n\t\t\t\"Unexpected Java element\",\n\t\t\t\"<anonymous #1> [in foo() [in X [in [Working copy] X.java [in <default> [in <project root> [in P]]]]]]\",\n\t\t\telement\n\t\t);\n\t\tassertTrue(\"Element should exist\", element.exists());\n\t}",
"public static boolean isAnonymousInnerClass(String clsName){\r\n if(clsName.contains(\"$\")){\r\n String[] splits = clsName.split(\"\\\\$\");\r\n String end = splits[splits.length-1];\r\n try{\r\n Integer.parseInt(end);\r\n return true;\r\n } catch(java.lang.NumberFormatException e){\r\n return false;\r\n }\r\n }\r\n return false;\r\n }",
"@Override\n public String nameAndType() {\n\t String n = \"noname\";\n\t if (name != null) {\n\t\t n=name;\n\t }\n\t return \"if \"+n+\":\";\n }",
"boolean hasStoredType();",
"private static boolean shouldRunTypeCompletionOnly(PsiElement position, JetSimpleNameReference jetReference) {\n JetTypeReference typeReference = PsiTreeUtil.getParentOfType(position, JetTypeReference.class);\n if (typeReference != null) {\n JetSimpleNameExpression firstPartReference = PsiTreeUtil.findChildOfType(typeReference, JetSimpleNameExpression.class);\n return firstPartReference == jetReference.getExpression();\n }\n\n return false;\n }",
"public boolean typeCheck(){\n\treturn myDeclList.typeCheck();\n }",
"public Type type(String name);",
"private JavaType(String name) {\n this.name = name;\n }",
"public boolean isType() {\n return type;\n }",
"public boolean isThisType(String name) {\n // Since we can't always determine it from the name alone (blank\n // extensions), we open the file and call the block verifier.\n long len = new File(name).length();\n int count = len < 16384 ? (int) len : 16384;\n byte[] buf = new byte[count];\n try {\n FileInputStream fin = new FileInputStream(name);\n int read = 0;\n while (read < count) {\n read += fin.read(buf, read, count-read);\n }\n fin.close();\n return isThisType(buf);\n }\n catch (IOException e) {\n return false;\n }\n }",
"private boolean isTypeExists(Context context, String typeName) throws Exception\r\n {\r\n boolean typeExists = false;\r\n //String command = \"temp query bus '\" + typeName + \"' * *\";\r\n String command = \"temp query bus $1 $2 $3\";\r\n\r\n String result = MqlUtil.mqlCommand(context, command,typeName,\"*\",\"*\");\r\n if (result != null && !result.isEmpty())\r\n {\r\n typeExists = true;\r\n }\r\n return typeExists;\r\n }",
"public void testLocalType() throws JavaModelException {\n\t\tASTNode node = buildAST(\n\t\t\t\"public class X {\\n\" +\n\t\t\t\" void foo() {\\n\" +\n\t\t\t\" /*start*/class Y {\\n\" +\n\t\t\t\" }/*end*/\\n\" +\n\t\t\t\" }\\n\" +\n\t\t\t\"}\"\n\t\t);\n\t\tIBinding binding = ((TypeDeclarationStatement) node).resolveBinding();\n\t\tassertNotNull(\"No binding\", binding);\n\t\tIJavaElement element = binding.getJavaElement();\n\t\tassertElementEquals(\n\t\t\t\"Unexpected Java element\",\n\t\t\t\"Y [in foo() [in X [in [Working copy] X.java [in <default> [in <project root> [in P]]]]]]\",\n\t\t\telement\n\t\t);\n\t\tassertTrue(\"Element should exist\", element.exists());\n\t}",
"private boolean isTypeMark() throws IOException\n\t{\n\t\t// Initialize return value to false.\n\t\tboolean isValid = false;\n\t\t\n\t\t// Check if current token is of \"type mark\" type.\n\t\tswitch(theCurrentToken.TokenType)\n\t\t{\n\t\t\tcase INTEGER: case BOOL: case FLOAT: case CHAR: case STRING:\n\t\t\t\tisValid = true;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tisValid = false;\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn isValid;\n\t}",
"protected void checkIsFunctionType(){\n List<Name> names = new ArrayList<Name>();\n for( Definition definition : definitions ){\n if( !definition.typedef ){\n Field field = definition.getField();\n if( field != null ){\n FieldModelNode node = field.asNode();\n if( node != null && (node.getTags().contains( Tag.USES ) || node.getTags().contains( Tag.PROVIDES ))){\n\n Type type = definition.type();\n if( type == null || type.asFunctionType() == null ){\n names.add( definition.getName() );\n }\n }\n }\n }\n }\n \n if( names.size() > 0 ){\n error( \"'\" + name + \"' must have a function type\", names );\n }\n }",
"public boolean hasType() {\n return ((bitField0_ & 0x00000020) == 0x00000020);\n }",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"public String TypeOf(String name) {\n\t\tValues tmp = currScope.get(name);\n\t\t\n\t\tif(tmp != null)\n\t\t\treturn tmp.getType();\n\t\t\n\t\tif(currScope != classScope) {\n\t\t\ttmp = classScope.get(name);\n\t\t\tif(tmp != null)\n\t\t\t\treturn tmp.getType();\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public boolean existsClass(String name)\r\n\t{\r\n\t\treturn obtainOntClass(name) != null;\r\n\t}",
"public boolean visit(VariableDeclarationStatement node) {\n\t\tASTNode parent = node.getParent();\r\n\t\twhile (!(parent instanceof TypeDeclaration)) {\r\n\t\t\tparent = parent.getParent();\r\n\t\t}\r\n\t\tTypeDeclaration td = (TypeDeclaration) parent;\r\n\t\tString target = getTypeFullValid(node.getType().toString());\r\n\t\tString origin = getTypeFullValid(td.getName().toString());\r\n\t\tif (origin != null && target != null && !origin.equals(target)) {\r\n\t\t\tputInMap(origin, target, mapDependency);\r\n\t\t}\r\n\t\treturn false; // do not continue to avoid usage info\r\n\t}",
"abstract public boolean isTyped();",
"@Override\n public String describe() {\n StringBuilder sb = new StringBuilder();\n if (hasName()) {\n sb.append(typeDeclaration.getQualifiedName());\n } else {\n sb.append(\"<anonymous class>\");\n }\n if (!typeParametersMap().isEmpty()) {\n sb.append(\"<\");\n sb.append(String.join(\", \", typeDeclaration.getTypeParameters().stream().map(tp -> typeParametersMap().getValue(tp).describe()).collect(Collectors.toList())));\n sb.append(\">\");\n }\n return sb.toString();\n }",
"public boolean hasType() {\n return ((bitField0_ & 0x00000020) == 0x00000020);\n }",
"public boolean hasType() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public boolean hasType() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public boolean hasType() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }"
]
| [
"0.66018933",
"0.65875775",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.65159494",
"0.63764733",
"0.6335237",
"0.6300916",
"0.6166728",
"0.60040826",
"0.5945962",
"0.5918311",
"0.58647436",
"0.5856463",
"0.57873577",
"0.5754372",
"0.57414895",
"0.57246846",
"0.57140225",
"0.5688659",
"0.56598765",
"0.5644552",
"0.5634302",
"0.5613417",
"0.56121224",
"0.55584323",
"0.55399626",
"0.55213284",
"0.55189043",
"0.55105627",
"0.55105627",
"0.55105627",
"0.55105627",
"0.55105627",
"0.55105627",
"0.55105627",
"0.55105627",
"0.55105627",
"0.55105627",
"0.55105627",
"0.55105627",
"0.55105627",
"0.55105627",
"0.55105627",
"0.55105627",
"0.55105627",
"0.55105627",
"0.55105627",
"0.55105627",
"0.55105627",
"0.55105627",
"0.55105627",
"0.5502946",
"0.5498785",
"0.54970294",
"0.549421",
"0.5494091",
"0.5471554",
"0.5435131",
"0.54316294",
"0.54316294"
]
| 0.78576636 | 0 |
Qualified name of the declaration. | public String getQualifiedName() {
return typeDeclaration.getQualifiedName();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"default String getQualifiedName() {\n return declaringType().getQualifiedName() + \".\" + this.getName();\n }",
"public String getQualifiedName();",
"String getQualifiedName();",
"String qualifiedName();",
"public String qualifiedName() {\n return this.qualifiedName;\n }",
"public String getFullyQualifiedName();",
"public abstract String getQualifiedName();",
"default String getQualifiedSignature() {\n return declaringType().getId() + \".\" + this.getSignature();\n }",
"public String qualifiedDocName() { return \"\"; }",
"public String getQualifiedName()\n {\n return name + \".\" + type;\n }",
"public String getQualifiedName () {\n return rawName;\n }",
"String getDeclare();",
"@Override\n public String getName() {\n return getDeclaringClass().getName();\n }",
"public String getName()\n {\n return definition.getName();\n }",
"declaration getDeclaration();",
"public String getName() {\n return definition.getName();\n }",
"public String getFullyQualifiedName() {\n\t\treturn this.getPackageName() + \".\" + this.getClassName();\n\t}",
"@Override\n public String getQualifiedName() {\n if (specClassDecl != null && specClassDecl.getDeclarationModel() != null) {\n// return specClassDecl.getDeclarationModel().getQualifiedNameString();\n } else if (stub != null) {\n return stub.getQualifiedName();\n }\n\n // bad workaround for the previous to do\n return getName();\n }",
"public final String getOwnerName() {\n return ElementUtils.getDeclaringClassName(node);\n }",
"public String getDeclaration() {\n\t\tStringBuilder sb = new StringBuilder(\"\");\n\t\tsb.append(myName+\" \"+myType);\n\t\tfor(String arg : myArgs) {\n\t\t\tsb.append(\" \" + arg);\n\t\t}\n\t\treturn sb.toString();\n\t}",
"String getSchemaName();",
"String getSchemaName();",
"private static String getFullyQualifiedImport(\n\t\t\tImportDeclaration importDeclaration) {\n\t\tNameExpr nameExpr = importDeclaration.getName();\n\n\t\tString buf = nameExpr.getName();\n\n\t\twhile (nameExpr instanceof QualifiedNameExpr) {\n\t\t\tnameExpr = ((QualifiedNameExpr) nameExpr).getQualifier();\n\t\t\tbuf = nameExpr.getName() + \".\" + buf;\n\t\t}\n\n\t\treturn buf;\n\t}",
"public String getUnqualifiedName() { return unqualifiedName; }",
"default String getClassName() {\n return declaringType().getClassName();\n }",
"public QName getQName() {\r\n return new QName(getNamespace(), getName());\r\n }",
"public final String getOwnerNameWithoutPackage() {\n return ElementUtils.getDeclaringClassNameWithoutPackage(node);\n }",
"public String getLocalName()\n/* */ {\n/* 346 */ return this.name;\n/* */ }",
"@Override\n\tpublic String getName() {\n\t\tfinal String name = super.getName();\n\t\ttry {\n\t\t\treturn name.substring(namespace.length()+1);\n\t\t} catch (Exception e) {\n\t\t\treturn name;\n\t\t}\n\t}",
"public String getFieldDeclarerName() {\n int index = getFieldIndex();\n if (index == 0)\n return null;\n\n ComplexEntry entry = (ComplexEntry) getPool().getEntry(index);\n String name = getProject().getNameCache().getExternalForm(entry.\n getClassEntry().getNameEntry().getValue(), false);\n if (name.length() == 0)\n return null;\n return name;\n }",
"public String getName()\r\n \t{\n \t\treturn (explicit ? (module.length() > 0 ? module + \"`\" : \"\") : \"\")\r\n \t\t\t\t+ name + (old ? \"~\" : \"\"); // NB. No qualifier\r\n \t}",
"public String getQualifiedName() {\n if (probe.getHost() != null) {\n return probe.getHost().getName() + \"/\" + getName();\n } else {\n return \"/\" + getName();\n }\n }",
"public String getQualifiedTableName();",
"@Converted(kind = Converted.Kind.MANUAL_SEMANTIC,\n source = \"${LLVM_SRC}/llvm/tools/clang/include/clang/AST/DeclarationName.h\", line = 427,\n FQN=\"clang::DeclarationNameLoc::DeclarationNameLoc\", NM=\"_ZN5clang18DeclarationNameLocC1Ev\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.ast/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/AST/DeclarationName.cpp -nm=_ZN5clang18DeclarationNameLocC1Ev\")\n //</editor-fold>\n public DeclarationNameLoc() {\n// memset(reinterpret_cast(Object/*void P*/ .class, this), 0, sizeof(/*Deref*/this));\n }",
"public String getNameForm()\n {\n return schema.getNameForm();\n }",
"public javax.xml.namespace.QName getQName() {\n return localQName;\n }",
"public java.lang.String getName(){\r\n return localName;\r\n }",
"public java.lang.String getName(){\r\n return localName;\r\n }",
"public java.lang.String getName(){\r\n return localName;\r\n }",
"public String getQualifiedName() {\n if(probe.getHost() != null) {\n return probe.getHost().getName() + \"/\" + getName();\n } else {\n return \"/\" + getName();\n }\n }",
"public String getQualifiedId()\n {\n return null;\n }",
"public QName getQName() {\n if (m_named) {\n return ((INamed)m_item.getSchemaComponent()).getQName();\n } else {\n return null;\n }\n }",
"private String getQualifiedSrcDsTableName() {\n return sourceDB + \".\" + DATASET_TABLE_NAME;\n }",
"public AnnotatedElement getQualifiedElement()\n/* */ {\n/* 241 */ return this.qualifiedElement;\n/* */ }",
"@Override\n\t\tpublic String getLocalName() {\n\t\t\treturn null;\n\t\t}",
"public String getType() {\n // or only getDeclaringType().getName()\n // return getDeclaringType().getFullName();\n if(getNamespace() != null && getNamespace().length() > 0) {\n // when using getDeclareType().getName() some objects return lowercase\n // names, hence we capitalize (using getDeclaringType().getFullName() does\n // not exhibit this behavior but has the issue that it might return names\n // that include generic types and their mappings, which cause issues in\n // the code elements that use this method\n return getNamespace()+\".\"+Utilities.capitalize(getDeclaringType().getName());\n }\n return Utilities.capitalize(getDeclaringType().getName());\n }",
"public QName getName()\n {\n return name;\n }",
"public String getFullName() {\n return getNamespace().getFullName();\n }",
"public String getSchemaName() { return schemaName; }",
"public java.lang.String shortName () { throw new RuntimeException(); }",
"public static String externalClassDecl()\n {\n read_if_needed_();\n \n return _external_class_decl;\n }",
"public String getDefinitionName() {\n return null;\n }",
"ResolvedReferenceTypeDeclaration declaringType();",
"public String schema() {\n return schemaName;\n }",
"public String schema() {\n return schemaName;\n }",
"public String getDefinedName() {\n return definedName;\n }",
"@Override\r\n\t\tpublic String getLocalName()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}",
"public final void qualifiedName() throws RecognitionException {\n int qualifiedName_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"qualifiedName\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(501, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 66) ) { return ; }\n // Java.g:502:5: ( Identifier ( '.' Identifier )* )\n dbg.enterAlt(1);\n\n // Java.g:502:9: Identifier ( '.' Identifier )*\n {\n dbg.location(502,9);\n match(input,Identifier,FOLLOW_Identifier_in_qualifiedName2534); if (state.failed) return ;\n dbg.location(502,20);\n // Java.g:502:20: ( '.' Identifier )*\n try { dbg.enterSubRule(86);\n\n loop86:\n do {\n int alt86=2;\n try { dbg.enterDecision(86);\n\n int LA86_0 = input.LA(1);\n\n if ( (LA86_0==29) ) {\n int LA86_2 = input.LA(2);\n\n if ( (LA86_2==Identifier) ) {\n alt86=1;\n }\n\n\n }\n\n\n } finally {dbg.exitDecision(86);}\n\n switch (alt86) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:502:21: '.' Identifier\n \t {\n \t dbg.location(502,21);\n \t match(input,29,FOLLOW_29_in_qualifiedName2537); if (state.failed) return ;\n \t dbg.location(502,25);\n \t match(input,Identifier,FOLLOW_Identifier_in_qualifiedName2539); if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop86;\n }\n } while (true);\n } finally {dbg.exitSubRule(86);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 66, qualifiedName_StartIndex); }\n }\n dbg.location(503, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"qualifiedName\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }",
"public String getFQN(){\n\t\treturn this.tsApp.getFQN()+\"_\"+this.tsName;\n\t}",
"public String getStartName() {// TODO remove\n\t\treturn this.getClass().getSimpleName();\n\t}",
"public String getLocalAquiferName() {\n\t\treturn localAquiferName;\n\t}",
"public String getPackageName() {\n JavaType.FullyQualified fq = TypeUtils.asFullyQualified(qualid.getType());\n if (fq != null) {\n return fq.getPackageName();\n }\n String typeName = getTypeName();\n int lastDot = typeName.lastIndexOf('.');\n return lastDot < 0 ? \"\" : typeName.substring(0, lastDot);\n }",
"@Override\n\tpublic String getLocalName() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getLocalName() {\n\t\treturn null;\n\t}",
"public static String relationDecl(String multiplicity)\n {\n read_if_needed_();\n \n return _rel_decl[UmlSettings.multiplicity_column(multiplicity)];\n }",
"public String getName() {\r\n return getDef().getName();\r\n }",
"final public String QualifiedFunction() throws ParseException {\n Token t1;StringBuffer s=new StringBuffer(); log.trace(\"Entering QualifiedFunction\");\n t1 = jj_consume_token(IDENTIFIER);\n s.append(t1.image);\n label_25:\n while (true) {\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case 88:\n case 98:\n ;\n break;\n default:\n jj_la1[106] = jj_gen;\n break label_25;\n }\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case 88:\n jj_consume_token(88);\n t1 = IdentifierOrReserved();\n s.append(\".\" + t1.image);\n break;\n case 98:\n jj_consume_token(98);\n t1 = IdentifierOrReserved();\n s.append(\"$\" + t1.image);\n break;\n default:\n jj_la1[107] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n }\n log.debug(\"QualifiedFunction: \" + s.toString());\n log.trace(\"Exiting QualifiedFunction\");\n {if (true) return s.toString();}\n throw new Error(\"Missing return statement in function\");\n }",
"public java.lang.String getName() {\r\n return localName;\r\n }",
"public String shortName() {\r\n\t\treturn \"F\";\r\n\t}",
"String getNameSpace();",
"public Identifier getName();",
"public final void typeName() throws RecognitionException {\n int typeName_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"typeName\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(432, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 52) ) { return ; }\n // Java.g:433:5: ( qualifiedName )\n dbg.enterAlt(1);\n\n // Java.g:433:9: qualifiedName\n {\n dbg.location(433,9);\n pushFollow(FOLLOW_qualifiedName_in_typeName2039);\n qualifiedName();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 52, typeName_StartIndex); }\n }\n dbg.location(434, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"typeName\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }",
"public QualifiedNameElements getQualifiedNameAccess() {\n\t\treturn pQualifiedName;\n\t}",
"public QualifiedNameElements getQualifiedNameAccess() {\n\t\treturn pQualifiedName;\n\t}",
"EPREFIX_TYPE getName();",
"public QName getName()\r\n {\r\n return mName;\r\n }",
"public java.lang.String getFormalName() {\n return formalName;\n }",
"@Override\n public String getName() {\n final String name = getClass().getName();\n final int lastDollar = name.lastIndexOf('$');\n return name.substring(lastDollar + 1);\n }",
"public java.lang.String getName() {\r\n return localName;\r\n }",
"@Override\n public ClassTree declaration() {\n return null;\n }",
"public String getNameSpace() {\n return nameSpace;\n }",
"String getSymbolicName();",
"@Import(\"name\")\n\tString getName();",
"SimpleName getName();",
"public String getLocalName()\n\t{\n\t\treturn name;\n\t}",
"public String createFullQualifiedTypeAsString(AST ast,\r\n\t\t\tString fullQualifiedUmlTypeName, String sourceDirectoryPackageName) {\r\n\t\tString typeName = packageHelper.getFullPackageName(\r\n\t\t\t\tfullQualifiedUmlTypeName, sourceDirectoryPackageName);\r\n\r\n\t\treturn typeName;\r\n\t}",
"public java.lang.String getName() {\n return localName;\n }",
"public java.lang.String getName() {\n return localName;\n }",
"public java.lang.String getName() {\n return localName;\n }",
"private String importDeclaration()\r\n {\r\n String handle;\r\n\r\n matchKeyword(Keyword.IMPORTSY);\r\n handle = nextToken.string;\r\n matchKeyword(Keyword.IDENTSY);\r\n handle = qualifiedImport(handle);\r\n matchKeyword(Keyword.SEMICOLONSY);\r\n\r\n return handle;\r\n }",
"public abstract String shortName();",
"@Override\n\tpublic String getSymbolName()\n\t{\n\t\tVariableDeclarationContext ctx = getContext();\n\t\tNameContextExt nameContextExt = (NameContextExt)getExtendedContext(ctx.name());\n\t\treturn nameContextExt.getFormattedText();\n\t}",
"String getSimpleName();",
"String getSimpleName();",
"public String toString() {\n return getQualifiedName();\n }",
"public String getNameSpace() {\n return this.namespace;\n }",
"public final String entryRuleQualifiedName() throws RecognitionException {\r\n String current = null;\r\n\r\n AntlrDatatypeRuleToken iv_ruleQualifiedName = null;\r\n\r\n\r\n try {\r\n // InternalNestDsl.g:414:53: (iv_ruleQualifiedName= ruleQualifiedName EOF )\r\n // InternalNestDsl.g:415:2: iv_ruleQualifiedName= ruleQualifiedName EOF\r\n {\r\n newCompositeNode(grammarAccess.getQualifiedNameRule()); \r\n pushFollow(FOLLOW_1);\r\n iv_ruleQualifiedName=ruleQualifiedName();\r\n\r\n state._fsp--;\r\n\r\n current =iv_ruleQualifiedName.getText(); \r\n match(input,EOF,FOLLOW_2); \r\n\r\n }\r\n\r\n }\r\n\r\n catch (RecognitionException re) {\r\n recover(input,re);\r\n appendSkippedTokens();\r\n }\r\n finally {\r\n }\r\n return current;\r\n }",
"@Override\n public String simpleName() {\n if (this == class_) {\n return \"class\";\n }\n return name();\n }",
"public Name createFullQualifiedTypeAsName(AST ast,\r\n\t\t\tString fullQualifiedUmlTypeName, String sourceDirectoryPackageName) {\r\n\t\tString typeName = packageHelper.getFullPackageName(\r\n\t\t\t\tfullQualifiedUmlTypeName, sourceDirectoryPackageName);\r\n\t\tName name = ast.newName(typeName);\r\n\r\n\t\treturn name;\r\n\t}",
"public String schemaName() {\n return this.schemaName;\n }"
]
| [
"0.76003957",
"0.7245304",
"0.71928686",
"0.7142326",
"0.7066319",
"0.6917072",
"0.68716186",
"0.6814112",
"0.66310847",
"0.6591695",
"0.6516732",
"0.6265023",
"0.62632954",
"0.6231073",
"0.6190422",
"0.61842835",
"0.61487746",
"0.6104805",
"0.60933125",
"0.60896385",
"0.6070186",
"0.6070186",
"0.60315156",
"0.59894997",
"0.59152406",
"0.5900203",
"0.58883303",
"0.5857718",
"0.5852369",
"0.5834654",
"0.58135355",
"0.5806131",
"0.5776922",
"0.57602453",
"0.5756954",
"0.5747639",
"0.5741129",
"0.5741129",
"0.5741129",
"0.5726085",
"0.57225245",
"0.57164687",
"0.57120305",
"0.5696589",
"0.5684907",
"0.5683245",
"0.56745255",
"0.5672609",
"0.56237596",
"0.56208473",
"0.56065893",
"0.5592398",
"0.5586635",
"0.5586516",
"0.5586516",
"0.5578436",
"0.5578286",
"0.55571693",
"0.55360496",
"0.5533743",
"0.55329776",
"0.5530372",
"0.55297387",
"0.55297387",
"0.5521081",
"0.55005366",
"0.5488172",
"0.5479865",
"0.5471986",
"0.54693645",
"0.5469106",
"0.54625434",
"0.54574746",
"0.54574746",
"0.5456876",
"0.5454857",
"0.54540765",
"0.54507357",
"0.5449235",
"0.54488623",
"0.5444939",
"0.54430336",
"0.5437568",
"0.54357326",
"0.5432642",
"0.5423754",
"0.54230917",
"0.54230917",
"0.54230917",
"0.5419339",
"0.54158515",
"0.54011106",
"0.5400976",
"0.5400976",
"0.5393105",
"0.5392637",
"0.5391605",
"0.53911567",
"0.5390486",
"0.5387465"
]
| 0.7207826 | 2 |
Id of the declaration. It corresponds to the qualified name, unless for local classes. | public String getId() {
return typeDeclaration.getId();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getQualifiedId()\n {\n return null;\n }",
"public int getId() {\n\t\treturn definition.get().getId();\n\t}",
"Identifier getId();",
"@Override\n\tpublic int getId() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic int getId() {\n\t\treturn 0;\n\t}",
"public int getId() {\n\t\t\treturn 0;\n\t\t}",
"@Override\n\t\tpublic long getId() {\n\t\t\treturn 0;\n\t\t}",
"public String getIdTypeName() {\n\t\treturn this.getIdType(this.currentClass()).getSimpleName();\n\t}",
"public String id() {\n return definition.getString(ID);\n }",
"@XmlElement(name = \"identifier\", namespace = Namespaces.SRV)\n final String getIdentifier() {\n if (LEGACY_XML) {\n final ScopedName name = getScopedName();\n if (name != null) {\n return name.tip().toString();\n }\n }\n return null;\n }",
"@Override\n\t\tpublic String getId() {\n\t\t\treturn null;\n\t\t}",
"@Override\r\n\tpublic String getId() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic String getId() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic String getId() {\n\t\treturn null;\r\n\t}",
"public int identifier();",
"@Override\r\n\t\tpublic String getId()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}",
"@Override\n public int getId() {\n return 0;\n }",
"public String getNamedId();",
"public String idName() {\n return entityType().getSimpleName().toLowerCase() + \"id\";\n }",
"AtomID ID();",
"@Override\n\tpublic int getId() {\n\t\treturn ID;\n\t}",
"int getIdentifier();",
"java.lang.String getIdentifier();",
"private ASTVariableDeclaratorId getDeclaration(ASTLocalVariableDeclaration node) {\n ASTType type = node.getTypeNode();\n if (type != null) {\n if (MAP_CLASSES.keySet().contains(type.getTypeImage())) {\n return node.getFirstDescendantOfType(ASTVariableDeclaratorId.class);\n }\n }\n return null;\n }",
"@Override\n\tpublic String getId() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getId() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getId() {\n\t\treturn null;\n\t}",
"@NonNull String identifier();",
"@Override\n public String getDefinitionSetId() {\n throw new RuntimeException( \"Not yet implemented.\" );\n }",
"public abstract String getIdPrefix();",
"@Public\n @Stable\n public abstract int getId();",
"@Override\r\n\tpublic Object getId() {\n\t\treturn null;\r\n\t}",
"@Import(\"id\")\n\tint getId();",
"public String getId() {\n return this.getClass().getSimpleName() + \"@\" + this.hashCode();\n }",
"Short getId();",
"public Object getId() {\n\t\treturn null;\r\n\t}",
"public FactIdentifier getIdentifier() {\r\n return localIdentifier;\r\n }",
"@Override\r\n public int getId() {\n return id;\r\n }",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"default String getQualifiedSignature() {\n return declaringType().getId() + \".\" + this.getSignature();\n }",
"public java.lang.String getId() {\n return localId;\n }",
"public java.lang.String getId() {\n return localId;\n }",
"int getClassID();",
"public int getIdentifier();",
"@Override\r\n\tpublic int id() {\n\t\treturn 4;\r\n\t}",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();"
]
| [
"0.6701789",
"0.6480464",
"0.64689183",
"0.6314487",
"0.6314487",
"0.63126755",
"0.6254346",
"0.61565536",
"0.6151571",
"0.61106825",
"0.6098235",
"0.608344",
"0.608344",
"0.608344",
"0.6078183",
"0.6077787",
"0.60693246",
"0.6040003",
"0.6027135",
"0.6025549",
"0.60179293",
"0.6013254",
"0.6001901",
"0.5996753",
"0.5984808",
"0.5984808",
"0.5984808",
"0.5981508",
"0.5965511",
"0.59528273",
"0.5951167",
"0.59495777",
"0.5946851",
"0.59450066",
"0.59303135",
"0.59276795",
"0.5923518",
"0.5916916",
"0.59150434",
"0.59150434",
"0.59150434",
"0.59150434",
"0.59150434",
"0.59150434",
"0.59150434",
"0.59150434",
"0.59150434",
"0.59150434",
"0.59150434",
"0.59150434",
"0.59150434",
"0.59150434",
"0.59150434",
"0.59150434",
"0.59150434",
"0.59150434",
"0.59150434",
"0.5907548",
"0.59048927",
"0.59048927",
"0.5898534",
"0.5887576",
"0.5885337",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278",
"0.587278"
]
| 0.6882873 | 0 |
Methods declared on this type. | public abstract Set<MethodUsage> getDeclaredMethods(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Methods() {\n // what is this doing? -PMC\n }",
"@Override\n\tpublic String[] getMethods() {\n\t\treturn null;\n\t}",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public void myPublicMethod() {\n\t\t\n\t}",
"protected abstract MethodDescription accessorMethod();",
"public interface METHODS {\n public static int TIME = 0;\n public static int DISTANCE= 1;\n public static int STEPS = 2;\n public static int ACHIEVEMENTS = 3;\n }",
"@Override\n protected void prot() {\n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\r\n\tpublic void method() {\n\t\r\n\t}",
"List<MethodNode> getMethods() {\n return this.classNode.methods;\n }",
"public void methodReferences() {\n\t\t// Write sample for below\n\n\t\t// Static method\n\t\t// Instance method on parameter objects\n\t\t// Instance method\n\t\t// Constructor\n\t}",
"public void method(){}",
"@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void type() {\n\t\t\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"public String[] getMethods() {\n\t\treturn methods;\n\t}",
"@Override\r\n\tpublic void member() {\n\t\t\r\n\t}",
"@Override\n public int getMethodCount()\n {\n return 1;\n }",
"Operations operations();",
"@Override\n protected void getExras() {\n }",
"@Override\n\tpublic void myMethod() {\n\t\t\n\t}",
"private CommonMethods() {\n }",
"@Override\n\tpublic void dosomething() {\n\t\t\n\t}",
"@Override\n public void memoria() {\n \n }",
"public Set<Method> getMethods() {\r\n \t\t// We will only consider private methods in the declared class\r\n \t\tif (forceAccess)\r\n \t\t\treturn setUnion(source.getDeclaredMethods(), source.getMethods());\r\n \t\telse\r\n \t\t\treturn setUnion(source.getMethods());\r\n \t}",
"public static void thisMethod() {\n }",
"@Override\r\n\tpublic void Method1() {\n\t\t\r\n\t}",
"public Enumeration getMethods()\n {\n ensureLoaded();\n return m_tblMethod.elements();\n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"protected abstract Set method_1559();",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n public void get() {}",
"public static MethodClass getMethods (){\n\t\treturn methods;\n\t}",
"@Override\r\npublic int method() {\n\treturn 0;\r\n}",
"abstract protected Set<Method> createMethods();",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"public Set<AbstractProgramData<?>> getMethods()\n {\n return this.methods;\n }",
"public MethodDeclaration[] getMethods() {\n return m_classBuilder.getMethods();\n }",
"public void registerClassMethods()\n {\n }",
"@Override\n\tvoid methodabstract() {\n\t\t\n\t}",
"@Override\n\t\tpublic String getMethod() {\n\t\t\treturn null;\n\t\t}",
"ISourceMethod[] getMethods();",
"static void add() {\r\n\t\tSystem.out.println(\"Overloading Method\");\r\n\t}",
"@Override\n\tpublic void VisitMethodCallNode(MethodCallNode Node) {\n\n\t}",
"@Override\n\tpublic void buildMethods(JDefinedClass cls) {\n\n\t}",
"public java.util.Enumeration elements () {\r\n methods = super.elements ();\r\n same_name_methods_index = 0;\r\n return this;\r\n }",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"private void someUtilityMethod() {\n }",
"private void someUtilityMethod() {\n }",
"@Override\n public MethodDescriptor[] getMethodDescriptors() {\n return getMdescriptor();\n }",
"public ArrayList<Method> getMethods() {\n\t\treturn arrayMethods;\n\t}",
"@Override\n public String getMethod() {\n return METHOD_NAME;\n }",
"public Methods() { // ini adalah sebuah construktor kosong tidak ada parameternya\n System.out.println(\"Ini adalah Sebuah construktor \");\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"private ExtendedOperations(){}",
"protected Set<String> supportedMethods() {\n return SUPPORTED_METHODS;\n }",
"protected Map method_1552() {\n return super.method_1552();\n }",
"private stendhal() {\n\t}",
"@Override\r\n\tpublic void Method3() {\n\t\t\r\n\t}",
"@Override\n\tpublic void classroom() {\n\t\t\n\t}",
"public /* bridge */ /* synthetic */ void mo55094a() {\n super.mo55094a();\n }",
"public List<IMethod> getMethods();",
"public List<IMethod> getMethods();",
"@Override\n\tpublic void verkaufen() {\n\t}",
"@Override\n\tpublic void function() {\n\t\t\n\t}",
"public List<MethodInfo> getMethods() { \n return lstMethodInfo;\n }",
"public void my_method();",
"protected Collection method_1554() {\n return this.method_1559();\n }",
"@Override\n\tpublic void getStatus() {\n\t\t\n\t}",
"@Override\n\tpublic void doYouWantTo() {\n\n\t}",
"protected void method_2665() {\r\n super.method_2427(awt.field_4171);\r\n this.method_2440(true);\r\n this.method_2521(class_872.field_4244);\r\n }",
"MethodType getMethodType();",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@SuppressWarnings(\"rawtypes\")\n\tpublic ArrayList getMethodStructures(){\n\t\treturn methodStructures;\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}",
"public abstract void MussBeDefined();",
"@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"List<Method> getAllMethods();",
"public interface Methods {\n\n /**\n * List all static methods for a given content model.\n *\n * @param cmpid Pid of the content model.\n * @param asOfTime Use the methods defined at this time (unix time in ms), or null for now.\n *\n * @return List of methods defined.\n * @throws BackendInvalidCredsException If current credentials provided are invalid.\n * @throws BackendMethodFailedException If communicating with Fedora failed.\n * @throws BackendInvalidResourceException\n * If content model doesn't exist.\n */\n public List<Method> getStaticMethods(String cmpid,\n Long asOfTime)\n throws\n BackendInvalidCredsException,\n BackendMethodFailedException,\n BackendInvalidResourceException;\n\n /**\n * List all dynamic methods for a given object.\n *\n * @param objpid Pid of the object.\n * @param asOfTime Use the methods defined at this time (unix time in ms), or null for now.\n *\n * @return List of methods defined.\n * @throws BackendInvalidCredsException If current credentials provided are invalid.\n * @throws BackendMethodFailedException If communicating with Fedora failed.\n * @throws BackendInvalidResourceException\n * If object doesn't exist.\n */\n public List<Method> getDynamicMethods(String objpid,\n Long asOfTime)\n throws\n BackendInvalidCredsException,\n BackendMethodFailedException,\n BackendInvalidResourceException;\n\n /**\n * Invoke a given method with the given parameters.\n *\n * @param pid The pid of the content model or object defining the method.\n * @param methodName The name of the method.\n * @param parameters Parameters for the method, as a map from name list of values.\n * @param asOfTime Use the methods defined at this time (unix time in ms), or null for now.\n *\n * @return Result of calling method.\n * @throws BackendInvalidCredsException If current credentials provided are invalid.\n * @throws BackendMethodFailedException If communicating with Fedora failed.\n * @throws BackendInvalidResourceException\n * If object, content model or method doesn't exist.\n */\n public String invokeMethod(String pid,\n String methodName,\n Map<String, List<String>> parameters,\n Long asOfTime)\n throws\n BackendInvalidCredsException,\n BackendMethodFailedException,\n BackendInvalidResourceException;\n}",
"@Override\r\n\tpublic void Method2() {\n\t\t\r\n\t}",
"public void get() {\n }",
"@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:33:59.809 -0500\", hash_original_method = \"AC0A5CAC5D79A50D0A1A1A7D60109A25\", hash_generated_method = \"DDCD510819A32FF7BD9558A5CE176D29\")\n \nprivate ContactMethods() {}",
"private PropertyAccess() {\n\t\tsuper();\n\t}",
"void method();",
"void method();",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"public interface Meta {\r\n\r\n\t/**\r\n\t * Lists method names exposed by endpoint.\r\n\t *\r\n\t * @return method name list\r\n\t */\r\n\t@XRMethod(value = \"system.listMethods\", help = \"List all method names available\")\r\n\tList<String> listMethods();\r\n\r\n\t/**\r\n\t * Provides help/usage information for a method.\r\n\t *\r\n\t * @param methodName\r\n\t * name of the method\r\n\t * @return help/usage information for a method\r\n\t */\r\n\t@XRMethod(value = \"system.help\", help = \"Returns usage information for a method\")\r\n\tString help(String methodName);\r\n\r\n\t// @XRMethod(\"system.multicall\")\r\n\t// List multicall(List calls);\r\n\r\n\t/**\r\n\t * Checks if method is supported by endpoint or not.\r\n\t *\r\n\t * @param methodName\r\n\t * name of the method\r\n\t * @return true if method is supported by endpoint, false otherwise\r\n\t */\r\n\t@XRMethod(value = \"system.supports\", help = \"Returns true if method is supported, false otherwise\")\r\n\tboolean supports(String methodName);\r\n}",
"public void method() {\n\t\t\r\n\t\t\r\n\t\tnew Inter() {\t\t\t\t\t\t\t//实现Inter接口\r\n\t\t\tpublic void print() {\t\t\t\t//重写抽象方法\r\n\t\t\t\tSystem.out.println(\"print\");\r\n\t\t\t}\r\n\t\t}.print();\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tvoid methodAbstractAndSubclassIsAbstract() {\n\t\t\n\t}",
"protected void method_3848() {\r\n super.method_3848();\r\n }",
"private Add() {}"
]
| [
"0.68588245",
"0.6552257",
"0.6475275",
"0.6388321",
"0.6388321",
"0.6282822",
"0.6260645",
"0.6234007",
"0.6220869",
"0.6198526",
"0.61058766",
"0.6019107",
"0.5982349",
"0.5976331",
"0.5924132",
"0.59042925",
"0.58914274",
"0.58863854",
"0.585976",
"0.5849469",
"0.5840371",
"0.5839592",
"0.5832036",
"0.5826934",
"0.5810499",
"0.5810329",
"0.5802001",
"0.5798217",
"0.5761548",
"0.5758081",
"0.575638",
"0.575038",
"0.57501435",
"0.5745145",
"0.57350236",
"0.57333535",
"0.57135105",
"0.57116306",
"0.57110465",
"0.5701512",
"0.5699526",
"0.5692412",
"0.56886244",
"0.5683159",
"0.5682879",
"0.567742",
"0.56639004",
"0.56635857",
"0.56464916",
"0.5640176",
"0.5629394",
"0.56286067",
"0.56286067",
"0.56155777",
"0.56098896",
"0.56028956",
"0.5593022",
"0.5591564",
"0.55811393",
"0.55667764",
"0.55502546",
"0.55500716",
"0.5542391",
"0.55421156",
"0.5540052",
"0.55391586",
"0.55391586",
"0.5536474",
"0.5534153",
"0.5533227",
"0.552842",
"0.55206823",
"0.55196357",
"0.55182666",
"0.5511651",
"0.5502817",
"0.54990214",
"0.5496553",
"0.54898345",
"0.54898345",
"0.5484921",
"0.5479162",
"0.5477785",
"0.5477725",
"0.5476882",
"0.54722834",
"0.54699636",
"0.54693896",
"0.54679585",
"0.54596436",
"0.5457325",
"0.5454979",
"0.5454979",
"0.54527193",
"0.5450163",
"0.54489475",
"0.5448766",
"0.5448525",
"0.5447652",
"0.5446665"
]
| 0.5880154 | 18 |
Fields declared on this type. | public abstract Set<ResolvedFieldDeclaration> getDeclaredFields(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tprotected void initializeFields() {\n\n\t}",
"@Override public final DeclContext$Fields $DeclContext$Fields() { return DeclContext$Flds; }",
"@Override public final Redeclarable$Fields $Redeclarable$Fields() { return Redeclarable$Flds; }",
"public HashMap<String, String> getFields() {\r\n \t\treturn fields;\r\n \t}",
"protected void createFields()\n {\n createEffectiveLocalDtField();\n createDiscontinueLocalDtField();\n createScanTypeField();\n createContractNumberField();\n createContractTypeField();\n createProductTypeField();\n createStatusIndicatorField();\n createCivilMilitaryIndicatorField();\n createEntryUserIdField();\n createLastUpdateUserIdField();\n createLastUpdateTsField();\n }",
"@Override\n\tprotected String getFields()\n\t{\n\t\tString fields = \" GAZOID, GAZFLD, GAZPVN, GAZTYP, GAZCLN, GAZCLS \";\n\t\treturn fields;\n\t}",
"Fields fields();",
"public FieldDeclaration[] getFields() {\n return m_classBuilder.getFields();\n }",
"public String getFields() {\n return fields;\n }",
"public Map<String, Object> getFields() {\n\t\treturn fields;\n\t}",
"@SuppressWarnings(\"rawtypes\")\n\tpublic List getFields(){\n\t\treturn targetClass.fields;\n\t}",
"private void findFields() {\n for(Class<?> clazz=getObject().getClass();clazz != null; clazz=clazz.getSuperclass()) {\r\n\r\n Field[] fields=clazz.getDeclaredFields();\r\n for(Field field:fields) {\r\n ManagedAttribute attr=field.getAnnotation(ManagedAttribute.class);\r\n Property prop=field.getAnnotation(Property.class);\r\n boolean expose_prop=prop != null && prop.exposeAsManagedAttribute();\r\n boolean expose=attr != null || expose_prop;\r\n\r\n if(expose) {\r\n String fieldName = Util.attributeNameToMethodName(field.getName());\r\n String descr=attr != null? attr.description() : prop.description();\r\n boolean writable=attr != null? attr.writable() : prop.writable();\r\n\r\n MBeanAttributeInfo info=new MBeanAttributeInfo(fieldName,\r\n field.getType().getCanonicalName(),\r\n descr,\r\n true,\r\n !Modifier.isFinal(field.getModifiers()) && writable,\r\n false);\r\n\r\n atts.put(fieldName, new FieldAttributeEntry(info, field));\r\n }\r\n }\r\n }\r\n }",
"public Map<String, String> getFields() {\n return fields;\n }",
"@Override\n public java.util.List<Field> getFieldsList() {\n return fields_;\n }",
"@Override\n public java.util.List<? extends FieldOrBuilder>\n getFieldsOrBuilderList() {\n return fields_;\n }",
"public Set<Field> getFields() {\r\n \t\t// We will only consider private fields in the declared class\r\n \t\tif (forceAccess)\r\n \t\t\treturn setUnion(source.getDeclaredFields(), source.getFields());\r\n \t\telse\r\n \t\t\treturn setUnion(source.getFields());\r\n \t}",
"public Set<FieldInfo> getFieldInfos() {\n return new LinkedHashSet<FieldInfo>(_atts);\n }",
"private void init() {\n FieldWrapper id = new FieldWrapper();\n id.fieldDescription = new HashMap<String, Object>();\n id.fieldDescription.put(\"fullName\", \"Id\");\n id.fieldDescription.put(\"type\", \"Text\");\n\n FieldWrapper name = new FieldWrapper();\n name.fieldDescription = new HashMap<String, Object>();\n name.fieldDescription.put(\"fullName\", \"Name\");\n\n FieldWrapper createdBy = new FieldWrapper();\n createdBy.fieldDescription = new HashMap<String, Object>();\n createdBy.fieldDescription.put(\"fullName\", \"CreatedBy\");\n createdBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper lastModifiedBy = new FieldWrapper();\n lastModifiedBy.fieldDescription = new HashMap<String, Object>();\n lastModifiedBy.fieldDescription.put(\"fullName\", \"LastModifiedBy\");\n lastModifiedBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper owner = new FieldWrapper();\n owner.fieldDescription = new HashMap<String, Object>();\n owner.fieldDescription.put(\"fullName\", \"Owner\");\n owner.fieldDescription.put(\"type\", \"Lookup\");\n\n fieldDescribe = new HashMap<String, FieldWrapper>();\n\n fieldDescribe.put((String) id.fieldDescription.get(\"fullName\"), id);\n fieldDescribe.put((String) name.fieldDescription.get(\"fullName\"), name);\n fieldDescribe.put((String) createdBy.fieldDescription.get(\"fullName\"), createdBy);\n fieldDescribe.put((String) lastModifiedBy.fieldDescription.get(\"fullName\"), lastModifiedBy);\n fieldDescribe.put((String) owner.fieldDescription.get(\"fullName\"), owner);\n }",
"@Override\n public int getFieldsCount() {\n return fields_.size();\n }",
"public FieldsImpl() {\r\n logger.entering(CLASS_NAME, \"FieldsImpl()\");\r\n }",
"protected Vector collectFields() {\n Vector fields = new Vector(1);\n fields.addElement(this.getField());\n return fields;\n }",
"private FieldInfo() {\r\n\t}",
"public Map<String, String> getFields() {\n return null;\n }",
"List<FieldNode> getFields() {\n return this.classNode.fields;\n }",
"private List getMappingFieldsInternal() {\n if (fields == null) {\n fields = new ArrayList();\n }\n\n return fields;\n }",
"@Override\n public List<MappedField<?>> getAttributes() {\n return attributes;\n }",
"public Vector getAttributeFields() {\n\treturn attributeFields;\n }",
"@Override\n public void visit(FieldDeclaration n, Object arg) {\n \tArrayList<String> field = new ArrayList<String>();\n \tif(n.getJavaDoc()!=null){\n \t\tString declare = n.toString();\n \t\tdeclare = declare.replaceAll(\"(?s)(.*)private\", \"private\");\n \t\tdeclare = declare.replaceAll(\"(?s)=(.*)\", \"\");\n \t\tfield.add(declare.trim());\n\t \tString comment = n.getJavaDoc().getContent();\n\t \tcomment = comment.replaceAll(\"\\\\* @param (.*)\",\"\");\n\t \tcomment = comment.replaceAll(\"\\\\* @return (.*)\",\"\");\n\t \tcomment = comment.replaceAll(\"\\\\* @throws (.*)\",\"\");\n\t \tcomment = comment.replaceAll(\"\\\\* \",\"\");\n\t \tfield.add(comment.trim()); \n\t \tfields.add(field);\n \t}\n \t}",
"private FundInfo() {\n initFields();\n }",
"public List<AliasedField> getFields() {\r\n return fields;\r\n }",
"protected void createJoinPointSpecificFields() {\n String[] fieldNames = null;\n // create the field argument field\n Type fieldType = Type.getType(m_calleeMemberDesc);\n fieldNames = new String[1];\n String fieldName = ARGUMENT_FIELD + 0;\n fieldNames[0] = fieldName;\n m_cw.visitField(ACC_PRIVATE, fieldName, fieldType.getDescriptor(), null, null);\n m_fieldNames = fieldNames;\n\n m_cw.visitField(\n ACC_PRIVATE + ACC_STATIC,\n SIGNATURE_FIELD_NAME,\n FIELD_SIGNATURE_IMPL_CLASS_SIGNATURE,\n null,\n null\n );\n }",
"public void setupFields()\n {\n FieldInfo field = null;\n field = new FieldInfo(this, \"ID\", Constants.DEFAULT_FIELD_LENGTH, null, null);\n field.setDataClass(Integer.class);\n field.setHidden(true);\n field = new FieldInfo(this, \"LastChanged\", Constants.DEFAULT_FIELD_LENGTH, null, null);\n field.setDataClass(Date.class);\n field.setHidden(true);\n field = new FieldInfo(this, \"Deleted\", 10, null, new Boolean(false));\n field.setDataClass(Boolean.class);\n field.setHidden(true);\n field = new FieldInfo(this, \"Description\", 25, null, null);\n field = new FieldInfo(this, \"CurrencyCode\", 3, null, null);\n field = new FieldInfo(this, \"LastRate\", 10, null, null);\n field.setDataClass(Double.class);\n field.setScale(-1);\n field = new FieldInfo(this, \"RateChangedDate\", 12, null, null);\n field.setDataClass(Date.class);\n field.setScale(Constants.DATE_ONLY);\n field = new FieldInfo(this, \"RateChangedBy\", 16, null, null);\n field.setDataClass(Integer.class);\n field = new FieldInfo(this, \"CostingRate\", 10, null, null);\n field.setDataClass(Double.class);\n field.setScale(-1);\n field = new FieldInfo(this, \"CostingChangedDate\", 12, null, null);\n field.setDataClass(Date.class);\n field.setScale(Constants.DATE_ONLY);\n field = new FieldInfo(this, \"CostingChangedBy\", 16, null, null);\n field.setDataClass(Integer.class);\n field = new FieldInfo(this, \"RoundAt\", 1, null, null);\n field.setDataClass(Short.class);\n field = new FieldInfo(this, \"IntegerDesc\", 20, null, \"Dollar\");\n field = new FieldInfo(this, \"FractionDesc\", 20, null, null);\n field = new FieldInfo(this, \"FractionAmount\", 10, null, new Integer(100));\n field.setDataClass(Integer.class);\n field = new FieldInfo(this, \"Sign\", 3, null, \"$\");\n field = new FieldInfo(this, \"LanguageID\", Constants.DEFAULT_FIELD_LENGTH, null, null);\n field.setDataClass(Integer.class);\n field = new FieldInfo(this, \"NaturalInteger\", 20, null, null);\n field = new FieldInfo(this, \"NaturalFraction\", 20, null, null);\n }",
"@Override\n public int getFieldCount() {\n return 0;\n }",
"@Override\n\tprotected String getFields()\n\t{\n\t\tString fields = \" HBLNM, HBCFR, HBCFL, HBRNM, HBDLM \";\n\t\treturn fields;\n\t}",
"@Override\n\tpublic int getFieldCount() {\n\t\treturn 0;\n\t}",
"@Override\r\n\tprotected List<String> getFieldOrder() {\r\n\t\treturn Arrays.asList(\"n\", \"nalloc\", \"refcount\", \"x\", \"y\");\r\n\t}",
"com.google.protobuf.ByteString\n getField1066Bytes();",
"java.lang.String getFields();",
"com.google.protobuf.ByteString\n getFieldsBytes();",
"com.google.protobuf.Struct getMetadataFields();",
"@Override\n\t\t\tpublic void visit(ConstructorDeclaration arg0, Object arg1) {\n\t\t\t\tif((arg0.getModifiers() & Modifier.PUBLIC) > 0)\n\t\t\t\t\tfields.add(\"+\" + arg0.getDeclarationAsString(false, false));\n\t\t\t\tsuper.visit(arg0, arg1);\n\t\t\t}",
"private void initFields() {\n\n tipPercent = 0.0;\n noPersons = 1;\n totalPay = 0.0;\n totalTip = 0.0;\n totalPerPerson = 0.0;\n\n }",
"@Override\n\tpublic String[] getFieldName() {\n\t\treturn new String[]{\"编码\",\"名称\",\"属性\"};\n\t}",
"@Override\r\n protected void setFieldValues (Object ... fields)\r\n {\n \r\n }",
"public int numberOfFields() { return fld_count; }",
"public FieldInfo() {\r\n \t// No implementation required\r\n }",
"public EAdList<EAdField<?>> getFields() {\r\n\t\treturn fields;\r\n\t}",
"@Override\n public String toString() {\n return \"Class \" + className + \":\\n\" +\n \"\\tFields: \" + fields;\n }",
"public List<Field<T>> getFields()\r\n/* 63: */ {\r\n/* 64:84 */ return this.fields;\r\n/* 65: */ }",
"public boolean isUseFields()\n {\n return (isPragma() && getModule().toKeyword().isFieldsKeyword());\n }",
"com.google.protobuf.ByteString\n getField1818Bytes();",
"protected void initDataFields() {\r\n //this module doesn't require any data fields\r\n }",
"public void testFields()\n {\n TestUtils.testNoAddedFields(getTestedClass(), null);\n }",
"private TigerData() {\n initFields();\n }",
"Map<String, FieldInfo> getFieldMap() {\n return fieldMap;\n }",
"public FieldList()\n\t{\n\t\tfields = new ArrayList<AbstractField>();\n\t}",
"private void buildFields() {\r\n buildField(txtPizzaName, GUIResource.getLabel(DIALOG, NAME_PIZZA), 0);\r\n buildField(txtCustomerName, GUIResource.getLabel(DIALOG, NAME_CUSTOMER), 1);\r\n buildField(txtPhone, GUIResource.getLabel(DIALOG, PHONE), 2);\r\n buildField(txtEmail, GUIResource.getLabel(DIALOG, EMAIL), 3);\r\n }",
"private void initFields(){\n labels.put(\"patientID\", new JLabel(\"Patient ID:\"));\n labels.put(\"newOwed\", new JLabel(\"New Owed:\"));\n \n fields.put(\"patientID\", new JTextField());\n fields.put(\"newOwed\", new JTextField());\n }",
"@Override\n\tprotected String getParameterizedFields()\n\t{\n\t\tString fields = \" GAZOID=?, GAZFLD=?, GAZPVN=?, GAZTYP=?, GAZCLN=?, GAZCLS=? \";\n\t\treturn fields;\n\t}",
"public void printFields(){\n\t\tif(this.returnValueType==null){\n\t\t\tthis.returnValueType=\"\";\n\t\t}\n\t\tif(this.returnValueType==null){\n\t\t\tthis.className=\"\";\n\t\t}\n\t\tif(this.returnValueType==null){\n\t\t\tthis.methodName=\"\";\n\t\t}\n\t\tSystem.out.print(\"\t\"+this.address+\"\t\"+this.returnValueType+\" \"+this.className+\".\"+this.methodName+\" \");\n\t\tSystem.out.print(\"(\");\n\t\tif(this.hasParameter()){\n\t\t\t\n\t\t\tfor(int j=0;j<this.parameterType.length;j++){\n\t\t\t\tSystem.out.print(this.parameterType[j]);\n\t\t\t\tif(j!=(this.parameterType.length-1)){\n\t\t\t\t\tSystem.out.print(\", \");\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t}\n\t\tSystem.out.println(\")\");\n\n\t}",
"com.google.protobuf.ByteString\n getField1848Bytes();",
"com.google.protobuf.ByteString\n getField1078Bytes();",
"com.google.protobuf.ByteString\n getField1843Bytes();",
"private Hashtable<String, ?> declareSpaceProps() {\n\t\tfinal Hashtable<String, Object> props = new Hashtable<String, Object>();\n\n\t\tprops.put(\"sapere.rdf-based\", Boolean.TRUE);\n\t\tprops.put(\"sapere.acid-transactions\", Boolean.FALSE);\n\t\tprops.put(\"sapere.lsa-space.with-reasoner\", Boolean.TRUE);\n\n\t\treturn props;\n\t}",
"public void formatFields() {\r\n\t}",
"public void checkFields(){\n }",
"@ConstructorProperties({\"fieldDeclaration\"})\n public Identity( Fields fieldDeclaration )\n {\n super( fieldDeclaration ); // don't need to set size, default is ANY\n\n this.types = fieldDeclaration.getTypes();\n }",
"@JsonAnyGetter\n public Map<String, String> otherFields() {\n return unknownFields;\n }",
"public List<String> showFields() {\n Client client = new Client();\n Class<?> objFields = client.getClass();\n List<String> list = new ArrayList<>();\n for (Field field : objFields.getDeclaredFields()) {\n list.add(field.getName());\n }\n return list;\n }",
"public FieldObject() {\n super(\"fields/\");\n setEnterable(true);\n }",
"private Map<String,Field> getAllFields(Class clazz) {\n return this.getAllFields(clazz, false);\n }",
"@External(readonly = true)\n\tpublic List<String> get_metadata_fields(){\n\t\t\n\t\treturn this.METADATA_FIELDS;\n\t}",
"public abstract List<String> requiredFields();",
"public ComponentDescriptor() {\r\n\t\t// initialize empty collections\r\n\t\tconstructorParametersTypes = new LinkedList<List<Class<?>>>();\r\n//\t\trequiredProperties = new HashMap<String, MetaProperty>();\r\n//\t\toptionalProperties = new HashMap<String, MetaProperty>();\r\n\t}",
"@Override\r\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\r\n\t}",
"com.google.protobuf.ByteString\n getField1846Bytes();",
"@Override\n\tpublic void consumeFields(Schema schema) {\n\n\t}",
"public int getNumFields()\n {\n return getFieldTypMap().size();\n }",
"@Override\r\n\tprotected List<String> getFieldOrder() {\r\n\t\treturn Arrays.asList(\"nalloc\", \"ptra\");\r\n\t}",
"@Override\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void declareOutputFields(OutputFieldsDeclarer arg0) {\n\t\t\n\t}",
"@Override\n protected void initializeFields() {\n \tsuper.initializeFields();\n\n \taddField(new DcField(DcMediaObject._A_TITLE, getIndex(), \"Title\", \n false, true, false, true, \n 255, ComponentFactory._SHORTTEXTFIELD, getIndex(), DcRepository.ValueTypes._STRING,\n \"Title\"));\n addField(new DcField(DcMediaObject._B_DESCRIPTION, getIndex(), \"Description\", \n false, true, false, true, \n 0, ComponentFactory._LONGTEXTFIELD, getIndex(), DcRepository.ValueTypes._STRING,\n \"Description\"));\n addField(new DcField(DcMediaObject._C_YEAR, getIndex(), \"Year\", \n false, true, false, true, \n 4, ComponentFactory._NUMBERFIELD, getIndex(), DcRepository.ValueTypes._LONG,\n \"Year\"));\n\n if (getIndex() != DcModules._IMAGE && !isAbstract())\n addField(new DcField(DcMediaObject._D_LANGUAGE, getIndex(), \"Languages\", \n true, true, false, true, \n 255, ComponentFactory._REFERENCESFIELD, DcModules._LANGUAGE, DcRepository.ValueTypes._DCOBJECTCOLLECTION,\n \"Languages\"));\n \n addField(new DcField(DcMediaObject._E_RATING, getIndex(), \"Rating\", \n false, true, false, true, \n 255, ComponentFactory._RATINGCOMBOBOX, getIndex(), DcRepository.ValueTypes._LONG,\n \"Rating\"));\n addField(new DcField(DcMediaObject._F_COUNTRY, getIndex(), \"Countries\", \n true, true, false, true, \n 255, ComponentFactory._REFERENCESFIELD, DcModules._COUNTRY, DcRepository.ValueTypes._DCOBJECTCOLLECTION,\n \"Countries\")); \n }",
"public Map<String, Object> allFields() {\n Map<String, Object> map = new HashMap<>();\n properties.forEach((key, value) -> map.put(key, value.value()));\n return map;\n }",
"@Override\n\tpublic void declareOutputFields(OutputFieldsDeclarer declarer) {\n\t\t\n\t}",
"private void initialize()\n {\n aggregatedFields = new Fields(fieldToAggregator.keySet());\n }",
"@Override\n\tpublic void declareOutputFields(OutputFieldsDeclarer declarer) {\n\t}",
"public int getFieldCount() {\n\treturn 0;\n}",
"@Nullable\n public com.commercetools.api.models.type.FieldContainer getFields() {\n return this.fields;\n }",
"public void readFields(DataInput dataInput) throws IOException {\n }",
"public int nHeaderFields() {\n return nHeaderFields;\n }",
"com.google.protobuf.ByteString\n getField1046Bytes();",
"com.google.protobuf.ByteString\n getField1946Bytes();",
"public Field() {\r\n\t}",
"@Override\n\tpublic void VisitGetFieldNode(GetFieldNode Node) {\n\n\t}",
"public interface Columns {\r\n public static final String USERNAME = \"username\";\r\n public static final String EMAIL = \"email\";\r\n public static final String PW = \"password\";\r\n public static final String TIME = \"create_time\";\r\n public static final String AUTHORITY = \"authority_id\";\r\n }",
"com.google.protobuf.ByteString\n getField1943Bytes();",
"com.google.protobuf.ByteString\n getField1246Bytes();",
"synchronized public Set<String> getFields() {\n return Collections.unmodifiableSet(new HashSet<>(fields));\n }",
"private FundList() {\n initFields();\n }",
"@Override\n\tpublic void declareOutputFields(OutputFieldsDeclarer declarer) {\n\n\t}"
]
| [
"0.69200945",
"0.68097126",
"0.67399096",
"0.65967035",
"0.6563624",
"0.6544445",
"0.65411925",
"0.6504623",
"0.64746076",
"0.6398794",
"0.6389783",
"0.63291943",
"0.62947154",
"0.6267467",
"0.6243918",
"0.6236268",
"0.6228983",
"0.62238944",
"0.62199205",
"0.6212719",
"0.6210917",
"0.6185554",
"0.61855394",
"0.61844975",
"0.611283",
"0.6093995",
"0.6087501",
"0.60063547",
"0.60016775",
"0.5965602",
"0.5958307",
"0.59458405",
"0.5927874",
"0.5916643",
"0.5904642",
"0.5886902",
"0.5844521",
"0.58423585",
"0.58378166",
"0.5815645",
"0.5805095",
"0.578895",
"0.57670474",
"0.5730716",
"0.57297695",
"0.57183707",
"0.5709543",
"0.57031834",
"0.5691815",
"0.56871873",
"0.56783295",
"0.5668458",
"0.5666472",
"0.564786",
"0.5644393",
"0.56390965",
"0.56339955",
"0.5633138",
"0.5631565",
"0.5625445",
"0.56193507",
"0.5613553",
"0.56075686",
"0.56065685",
"0.560515",
"0.55986387",
"0.55975515",
"0.55974936",
"0.55912787",
"0.5585637",
"0.5577999",
"0.55753434",
"0.5575137",
"0.5571815",
"0.55513555",
"0.5537862",
"0.55364364",
"0.55286235",
"0.55244976",
"0.55191237",
"0.55191237",
"0.5517859",
"0.5508306",
"0.5505758",
"0.5505072",
"0.5502861",
"0.55026174",
"0.55015045",
"0.54872864",
"0.54865366",
"0.5483721",
"0.5480969",
"0.5480411",
"0.5474482",
"0.54708785",
"0.54690653",
"0.54665446",
"0.5465135",
"0.5462169",
"0.5461174"
]
| 0.6510376 | 7 |
Get a list of all the methods available on this type. This list includes methods declared in this type and methods inherited. This list includes methods of all sort of visibility. However it does not include methods that have been overwritten. | public List<ResolvedMethodDeclaration> getAllMethods() {
List<ResolvedMethodDeclaration> allMethods = new LinkedList<>(this.getTypeDeclaration().getDeclaredMethods());
getDirectAncestors().forEach(a -> allMethods.addAll(a.getAllMethods()));
return allMethods;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Set<Method> getMethods() {\r\n \t\t// We will only consider private methods in the declared class\r\n \t\tif (forceAccess)\r\n \t\t\treturn setUnion(source.getDeclaredMethods(), source.getMethods());\r\n \t\telse\r\n \t\t\treturn setUnion(source.getMethods());\r\n \t}",
"public abstract Set<MethodUsage> getDeclaredMethods();",
"public List<IMethod> getMethods();",
"public List<IMethod> getMethods();",
"List<Method> getAllMethods();",
"public Enumeration getMethods()\n {\n ensureLoaded();\n return m_tblMethod.elements();\n }",
"public MethodDeclaration[] getMethods() {\n return m_classBuilder.getMethods();\n }",
"public List<MethodInfo> getMethods() { \n return lstMethodInfo;\n }",
"public String[] getMethods() {\n\t\treturn methods;\n\t}",
"public Enumeration getMethodNames()\n {\n final EnumerationUnion eu = new EnumerationUnion();\n if( methods != null )\n {\n eu.add( methods.keys() );\n }\n if( ancestors != null )\n {\n final int size = ancestors.size();\n for( int i = 0; i < size; i++ )\n {\n final ScriptingClass clazz = (ScriptingClass)\n ancestors.elementAt( i );\n eu.add( clazz.getMethodNames() );\n }\n }\n try\n {\n final ScriptingClass object = getClassLoader().load( \"object\" );\n eu.add( object.getMethodNames() );\n }\n catch( ScriptingClassNotFoundException e )\n {\n }\n return eu;\n }",
"List<MethodNode> getMethods() {\n return this.classNode.methods;\n }",
"@XRMethod(value = \"system.listMethods\", help = \"List all method names available\")\r\n\tList<String> listMethods();",
"public static MethodClass getMethods (){\n\t\treturn methods;\n\t}",
"public List<ServiceMethod> getMethodList()\n {\n return Collections.unmodifiableList(methods);\n }",
"@Override\n\tpublic String[] getMethods() {\n\t\treturn null;\n\t}",
"public Set<AbstractProgramData<?>> getMethods()\n {\n return this.methods;\n }",
"java.util.List<org.mojolang.mojo.lang.FuncDecl> \n getMethodsList();",
"public ArrayList<Method> getMethods() {\n\t\treturn arrayMethods;\n\t}",
"ISourceMethod[] getMethods();",
"public static List<Method> getMethods( Class<?> klass )\r\n {\r\n return Arrays.asList( org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods( klass ) );\r\n }",
"java.util.List<? extends org.mojolang.mojo.lang.FuncDeclOrBuilder> \n getMethodsOrBuilderList();",
"public static Method[] getPublicMethods(Class<?> paramClass) {\n/* 107 */ if (System.getSecurityManager() == null) {\n/* 108 */ return paramClass.getMethods();\n/* */ }\n/* 110 */ HashMap<Object, Object> hashMap = new HashMap<>();\n/* 111 */ while (paramClass != null) {\n/* 112 */ boolean bool = getInternalPublicMethods(paramClass, (Map)hashMap);\n/* 113 */ if (bool) {\n/* */ break;\n/* */ }\n/* 116 */ getInterfaceMethods(paramClass, (Map)hashMap);\n/* 117 */ paramClass = paramClass.getSuperclass();\n/* */ } \n/* 119 */ return (Method[])hashMap.values().toArray((Object[])new Method[hashMap.size()]);\n/* */ }",
"public List<Method> getMethod_list() {\n\t\treturn arrayMethods;\n\t}",
"public TreeMap<String,CheckOutMethod>\n getMethods()\n {\n TreeMap<String,CheckOutMethod> methods = new TreeMap<String,CheckOutMethod>();\n for(String name : pVersionFields.keySet()) {\n JCollectionField field = pMethodFields.get(name);\n methods.put(name, CheckOutMethod.values()[field.getSelectedIndex()]);\n }\n return methods;\n }",
"public MethodDescriptor[] getMethodDescriptors() {\n return getMdescriptor();\n }",
"public\tList<JsClass.Method>\tgetAddedMethods() {\n\t\t\n\t\treturn\tCollections.unmodifiableList(this.addedMethods);\n\t}",
"@Override\n public MethodDescriptor[] getMethodDescriptors() {\n return getMdescriptor();\n }",
"public static Method[] getAllMethods(Class forClass) {\r\n\t\tfinal List<Method> methods = new ArrayList<Method>();\r\n\t\tClass aktClass = forClass;\r\n\t\twhile (!aktClass.equals(Object.class)) {\r\n\t\t\tMethod[] tmp = aktClass.getDeclaredMethods();\r\n\t\t\tfor (Method akt : tmp) {\r\n\t\t\t\tmethods.add(akt);\r\n\t\t\t}\r\n\t\t\taktClass = aktClass.getSuperclass();\r\n\t\t}\r\n\t\treturn methods.toArray(new Method[methods.size()]);\r\n\t}",
"public List<MethodDeclaration> getMethodDeclarations() {\n return methodDeclarations;\n }",
"public java.beans.MethodDescriptor[] getMethodDescriptors() {\n\ttry {\n\t\tjava.beans.MethodDescriptor aDescriptorList[] = {\n\t\t\tclearMethodDescriptor()\n\t\t\t,main_javalangString__MethodDescriptor()\n\t\t\t,toggleVisibilityMethodDescriptor()\n\t\t};\n\t\treturn aDescriptorList;\n\t} catch (Throwable exception) {\n\t\thandleException(exception);\n\t};\n\treturn null;\n}",
"public ArrayList<String> getNullMethods() {\n\t\treturn methods;\n\t}",
"public Set<String> getValidMethods() {\n\t\treturn this.validMethods.keySet();\n\t}",
"private Set<Method> getVirtualMethods()\n {\n return this.getContainer().getVirtualMethods();\n }",
"public\tList<JsClass.Method>\tgetRemovedMethods() {\n\t\t\n\t\treturn\tCollections.unmodifiableList(this.removedMethods);\n\t}",
"@Override\r\n\tpublic String[] getMethodNames() {\n\t\treturn this.methodNames;\r\n\t\t//未实现\r\n\t}",
"public java.util.List getColumnNamesMethods() {\n\t\treturn Arrays.asList(columnNamesMethodsTable);\n\t}",
"private Map<String, MethodNode> getMethods(ClassNode cls) {\n Map<String, MethodNode> methods = new HashMap<String, MethodNode>();\n\n Map<String, Node> allAttrs = cls.getMembers();\n Iterator allAttrs_it = allAttrs.entrySet().iterator();\n while(allAttrs_it.hasNext()) {\n Map.Entry attr_entry = (Map.Entry)allAttrs_it.next();\n if(attr_entry.getValue() instanceof MethodNode) {\n String methodName = (String)attr_entry.getKey();\n MethodNode method = (MethodNode)attr_entry.getValue();\n methods.put(methodName, method);\n }\n }\n return methods;\n }",
"public static Collection<Method> findAnnotatedMethods(\n Class<?> type,\n Class<? extends Annotation> annotation\n ) {\n\n List<Method> result = new ArrayList<>();\n\n // gather all publicly available methods\n // this returns everything, even if it's declared in a parent\n for (Method method : type.getMethods()) {\n // skip methods that are used internally by the vm for implementing covariance, etc\n if (method.isSynthetic() || method.isBridge() || isStatic(method.getModifiers())) {\n continue;\n }\n\n // look for annotations recursively in super-classes or interfaces\n Method managedMethod = findAnnotatedMethod(\n type,\n annotation,\n method.getName(),\n method.getParameterTypes()\n );\n if (managedMethod != null) {\n result.add(managedMethod);\n }\n }\n\n return result;\n }",
"public abstract String[] getMethodNames();",
"private void findMethods() {\n List<Method> methods = new ArrayList<Method>(Arrays.asList(getObject().getClass().getMethods()));\r\n List<Method> objectMethods = new ArrayList<Method>(Arrays.asList(Object.class.getMethods()));\r\n methods.removeAll(objectMethods);\r\n \r\n for(Method method:methods) {\r\n //does method have @ManagedAttribute annotation?\r\n if(method.isAnnotationPresent(ManagedAttribute.class) || method.isAnnotationPresent(Property.class)) {\r\n exposeManagedAttribute(method);\r\n }\r\n //or @ManagedOperation\r\n else if (method.isAnnotationPresent(ManagedOperation.class) || isMBeanAnnotationPresentWithExposeAll()){\r\n exposeManagedOperation(method); \r\n } \r\n }\r\n }",
"public static Method[] getMethodsInClassHierarchy(Class<?> clazz) {\n Method[] methods = {};\n while (clazz != null) {\n methods = (Method[]) ArrayUtils.addAll(methods, clazz.getDeclaredMethods());\n clazz = clazz.getSuperclass();\n }\n return methods;\n }",
"protected Set<String> supportedMethods() {\n return SUPPORTED_METHODS;\n }",
"public List<ResourceMethod> getResourceMethods() {\n return resourceMethods;\n }",
"public Collection<Method> getRemoveMethods() {\n Set<Method> removeMethods = new HashSet<Method>();\n\n if( ejbDesc.getType().equals(EjbSessionDescriptor.TYPE) ) {\n EjbSessionDescriptor sessionDesc = (EjbSessionDescriptor) ejbDesc;\n if( sessionDesc.isStateful() && sessionDesc.hasRemoveMethods() ) {\n\n for(EjbRemovalInfo next : sessionDesc.getAllRemovalInfo()) {\n\n MethodDescriptor mDesc = next.getRemoveMethod();\n Method m = mDesc.getMethod(ejbDesc);\n if( m == null ) {\n throw new IllegalStateException(\"Can't resolve remove method \" +\n mDesc + \" For EJB \" + sessionDesc.getName());\n }\n removeMethods.add(m);\n\n }\n\n }\n }\n\n return removeMethods;\n\n }",
"public List<String> getMethodList() throws CallError, InterruptedException {\n return (List<String>)service.call(\"getMethodList\").get();\n }",
"private Set<ExecutableElement> getHookMethodsFromInterfaces() {\n return component\n .getInterfaces()\n .stream()\n .map(DeclaredType.class::cast)\n .map(DeclaredType::asElement)\n .map(TypeElement.class::cast)\n .flatMap(typeElement -> ElementFilter\n .methodsIn(typeElement.getEnclosedElements())\n .stream())\n .filter(method -> hasAnnotation(method, HookMethod.class))\n .peek(this::validateHookMethod)\n .collect(Collectors.toSet());\n }",
"default List<TypeInfo> allTypes() {\n List<TypeInfo> allTypes = new LinkedList<>();\n allTypes.add(this);\n allTypes.addAll(Arrays.asList(interfaces()));\n allTypes.addAll(superClass().stream().flatMap(s -> s.allTypes().stream()).collect(Collectors.toList()));\n return allTypes;\n }",
"private Collection<TypeDeclaration> getAllTypes() {\n if (allTypes != null) {\n return allTypes;\n }\n allTypes = new ArrayList<TypeDeclaration>();\n for (Symbol s : getMembers(false)) {\n allTypes.add(env.declMaker.getTypeDeclaration((ClassSymbol) s));\n }\n return allTypes;\n }",
"public AuthMethod[] getAuthMethods() {\n\t\treturn authMethods.clone();\n\t}",
"public\tList<ChangedJsMethod>\tgetChangedMethods() {\n\t\t\n\t\treturn\tCollections.unmodifiableList(this.changedMethods);\n\t}",
"public static Method[] getInstanceMethods(Class<?> cls) {\n List<Method> instanceMethods = new ArrayList<>();\n for (Class<?> c = cls; c != null; c = c.getSuperclass()) {\n Method[] methods = c.getDeclaredMethods();\n for (Method method : methods)\n if (!Modifier.isStatic(method.getModifiers()))\n instanceMethods.add(method);\n }\n Method[] ims = new Method[instanceMethods.size()];\n for (int j = 0; j < instanceMethods.size(); j++)\n ims[j] = instanceMethods.get(j);\n return ims;\n }",
"@SuppressWarnings(\"rawtypes\")\n\tpublic ArrayList getMethodStructures(){\n\t\treturn methodStructures;\n\t}",
"private static Method[] retrieveAllMethods(final Object object) {\r\n\t\tMethod[] methodsArray = null;\r\n\r\n\t\t// - Retrieve methods array from cache if exists.\r\n\t\tif (KerAnnotation.methodsCache.containsKey(object.getClass())) {\r\n\t\t\tmethodsArray = KerAnnotation.methodsCache.get(object.getClass());\r\n\t\t}\r\n\t\t// - Else get methods and cache them.\r\n\t\telse {\r\n\t\t\t// - Aggregate all annotated methods (declared, inherited, etc.).\r\n\t\t\tfinal Set<Method> methods = new HashSet<Method>();\r\n\r\n\t\t\tfor (final Method method : object.getClass().getMethods()) {\r\n\t\t\t\tif (method.getAnnotations().length > 0) {\r\n\t\t\t\t\tmethods.add(method);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (final Method method : object.getClass().getDeclaredMethods()) {\r\n\t\t\t\tif (method.getAnnotations().length > 0) {\r\n\t\t\t\t\tmethods.add(method);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// - Convert set to array.\r\n\t\t\tmethodsArray = methods.toArray(new Method[0]);\r\n\r\n\t\t\t// - Cache array.\r\n\t\t\tKerAnnotation.methodsCache.put(object.getClass(), methodsArray);\r\n\t\t}\r\n\r\n\t\treturn methodsArray;\r\n\t}",
"org.mojolang.mojo.lang.FuncDecl getMethods(int index);",
"public List<String> getMethodList() throws DynamicCallException, ExecutionException {\n return (List<String>)call(\"getMethodList\").get();\n }",
"static Method[] getAllDeclaredMethods(String testsClassName) {\n\n Class<?> testsClazz = getClassObject(testsClassName);\n\n //Get all methods from file\n Method[] methods = testsClazz.getDeclaredMethods();\n\n\n if (methods.length != 0) {\n return methods;\n } else {\n log.error(\"В классе {} нет ни одного метода !\", testsClazz);\n return new Method[0];\n }\n\n\n }",
"@Override\r\n\tpublic List<Method> getMethods(File f) {\n\t\tEolModule module = new EolModule();\r\n\t\treturn this.getMethods(f, module);\r\n\t}",
"public static List<Method> getAnnotadedMethods(Class<?> clazz, Class<? extends Annotation> annotationClazz)\r\n\t{\r\n\t\tList<Method> methods = new ArrayList<Method>();\r\n\t\t\r\n\t\tdo\r\n\t\t{\r\n\t\t\tmethods.addAll(Arrays.asList(clazz.getDeclaredMethods())\r\n\t\t\t\t\t.stream()\r\n\t\t\t\t\t.filter(f -> f.isAnnotationPresent(annotationClazz))\r\n\t\t\t\t\t.collect(Collectors.toList()));\r\n\r\n\t\t\tclazz = clazz.getSuperclass();\r\n\t\t} while ( clazz != null );\r\n\t\t\r\n\t\treturn ( methods );\r\n\t}",
"@Override\n public ServiceResponse listMethods(final ServiceRequest request) throws SOAPException {\n return this.soapClient.listMethods(request, this.getTargetUrl());\n }",
"public List<WjrMethodItem> getMethodItems() {\r\n return new ArrayList<WjrMethodItem>(methodItems.values());\r\n }",
"public static Map<Method, Method> findManagedMethods(Class<?> clazz)\n {\n Map<Method, Method> result = new HashMap<>();\n\n // gather all publicly available methods\n // this returns everything, even if it's declared in a parent\n for (Method method : clazz.getMethods()) {\n // skip methods that are used internally by the vm for implementing covariance, etc\n if (method.isSynthetic() || method.isBridge()) {\n continue;\n }\n\n // look for annotations recursively in superclasses or interfaces\n Method managedMethod = findManagedMethod(clazz, method.getName(), method.getParameterTypes());\n if (managedMethod != null) {\n result.put(method, managedMethod);\n }\n }\n\n return result;\n }",
"@GetMapping(\"/methods\")\n @Timed\n public List<MethodsDTO> getAllMethods() {\n log.debug(\"REST request to get all Methods\");\n return methodsService.findAll();\n }",
"public HashSet<SootMethod> getMethodsToExplore(int invocationLevel){\n\t\tHashSet<SootMethod> methodsToExplore = new HashSet<SootMethod>();\r\n\t\t\r\n\t\tfor (SootMethod method : tadaMethods) {\r\n\t\t\tHashSet<SootMethod> invokingMethods = getMethodsInvokingAtLevel(method, invocationLevel);\r\n\t\t\tmethodsToExplore.addAll(invokingMethods);\r\n\t\t}\r\n\t\treturn methodsToExplore;\r\n\t}",
"public String enumerateMethods(){\n Class c = EvaluatingStudent.class; // replace this with your choice, e.g. CreatingStudent.class\n Method[] methods = c.getMethods();\n String result = \"\";\n for(int i = 0; i < methods.length; i++) {\n result += methods[i].toString() + '\\n';\n }\n return result;\n }",
"public List<MethodCall> searchMethods( final MethodsFilter aFilter ) {\n\t\t// Get the methods\n\t\tfinal MonitoringLogService monitoringLogService = getService( MonitoringLogService.class );\n\t\tfinal List<MethodCall> methods = monitoringLogService.getMethods( );\n\n\t\t// Filter the methods\n\t\tfinal FilterService filterService = getService( FilterService.class );\n\t\treturn methods\n\t\t\t\t.parallelStream( )\n\t\t\t\t.filter( filterService.getStringPredicate( MethodCall::getHost, aFilter.getHost( ), aFilter.isUseRegExpr( ) ) )\n\t\t\t\t.filter( filterService.getStringPredicate( MethodCall::getClazz, aFilter.getClazz( ), aFilter.isUseRegExpr( ) ) )\n\t\t\t\t.filter( filterService.getStringPredicate( MethodCall::getMethod, aFilter.getMethod( ), aFilter.isUseRegExpr( ) ) )\n\t\t\t\t.filter( filterService.getStringPredicate( MethodCall::getException, aFilter.getException( ), aFilter.isUseRegExpr( ) ) )\n\t\t\t\t.filter( filterService.getLongPredicate( MethodCall::getTraceId, aFilter.getTraceId( ) ) )\n\t\t\t\t.filter( getSearchTypePredicate( aFilter.getSearchType( ) ) )\n\t\t\t\t.filter( filterService.getAfterTimePredicate( MethodCall::getTimestamp, aFilter.getLowerDate( ), aFilter.getLowerTime( ) ) )\n\t\t\t\t.filter( filterService.getBeforeTimePredicate( MethodCall::getTimestamp, aFilter.getUpperDate( ), aFilter.getUpperTime( ) ) )\n\t\t\t\t.collect( Collectors.toList( ) );\n\t}",
"protected Collection<Method> getAnnotatedMethods(Class<?> clazz, Class<? extends Annotation> annotationType) {\n\t\tMap<String, Method> methods = new TreeMap<String, Method>();\n\t\tfor(Method m: clazz.getMethods()) {\n\t\t\tAnnotation ann = m.getAnnotation(annotationType);\n\t\t\tif(ann==null) continue;\n\t\t\tmethods.put(getMethodDescriptor(m), m);\n\t\t}\n\t\tfor(Method m: clazz.getDeclaredMethods()) {\n\t\t\tAnnotation ann = m.getAnnotation(annotationType);\n\t\t\tif(ann==null) continue;\n\t\t\tmethods.put(getMethodDescriptor(m), m);\n\t\t}\n\t\treturn methods.values();\n\t}",
"public Collection<ResourceMethod> getMethodsForPath(\n RemainingPath remainingPath) {\n // NICE results may be chached, if any method is returned.\n // The 404 case will be called rarely and produce a lot of cached data.\n final List<ResourceMethod> resourceMethods = new ArrayList<ResourceMethod>();\n for (final ResourceMethod method : this.resourceMethods) {\n final PathRegExp methodPath = method.getPathRegExp();\n if (remainingPath.isEmptyOrSlash()) {\n if (methodPath.isEmptyOrSlash()) {\n resourceMethods.add(method);\n }\n } else {\n if (methodPath.matchesWithEmpty(remainingPath)) {\n resourceMethods.add(method);\n }\n }\n }\n return resourceMethods;\n }",
"public List<CoinbasePaymentMethod> getCoinbasePaymentMethods() throws IOException {\n\n String path = \"/v2/payment-methods\";\n String apiKey = exchange.getExchangeSpecification().getApiKey();\n BigDecimal timestamp = coinbase.getTime(Coinbase.CB_VERSION_VALUE).getData().getEpoch();\n String signature = getSignature(timestamp, path);\n showCurl(apiKey, timestamp, signature, path);\n\n return coinbase.getPaymentMethods(Coinbase.CB_VERSION_VALUE, apiKey, signature, timestamp).getData();\n }",
"public static List<Map<String, Object>> getMethods(Map<String, Object> model) {\n @SuppressWarnings(\"unchecked\")\n List<Map<String, Object>> methods = (List<Map<String, Object>>) getRoot(model).get(ModelConstant.METHODS);\n return methods;\n }",
"public List<String> getMethodsToSkip()\n {\n return methodsToSkip;\n }",
"private void readMethodsAnnotations() {\n Method[] methods = clazz.getDeclaredMethods();\n for (Method method : methods) {\n Annotation[] annotations = method.getDeclaredAnnotations();\n for (Annotation a : annotations) {\n Class<? extends Annotation> aType = a.annotationType();\n List<Entry<Annotation>> list = entries.get(aType);\n if (list == null) {\n list = new ArrayList();\n entries.put(aType, list);\n }\n list.add(new Entry<>(method, a));\n }\n }\n }",
"private RubyArray instance_methods(IRubyObject[] args, final Visibility visibility, boolean not, boolean useSymbols) {\n boolean includeSuper = args.length > 0 ? args[0].isTrue() : true;\n Ruby runtime = getRuntime();\n RubyArray ary = runtime.newArray();\n Set<String> seen = new HashSet<String>();\n \n populateInstanceMethodNames(seen, ary, visibility, not, useSymbols, includeSuper);\n \n return ary;\n }",
"public List getMethodLines() {\n return methodLines;\n }",
"Collection<HttpMethod> getMinimalSupportedHttpMethods();",
"public List<ResourceMethod> getSubResourceMethods() {\n return subResourceMethods;\n }",
"public Set<ObjectLabel> getGetters() {\n if (getters == null)\n return Collections.emptySet();\n if (Options.get().isDebugOrTestEnabled())\n return Collections.unmodifiableSet(getters);\n return getters;\n }",
"public Future<List<String>> getMethodList() throws DynamicCallException, ExecutionException {\n return call(\"getMethodList\");\n }",
"@Override\n public List<Method> getAllUssdMethodes(String className) {\n\n Class klass = null;\n\n try {\n klass = Class.forName(className);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n List<Method> resultMethods = new ArrayList<Method>();\n if (klass == null)\n return resultMethods;\n Method[] methods = klass.getDeclaredMethods();\n\n\n for (Method method : methods) {\n method.setAccessible(true);\n if (method.isAnnotationPresent(UssdMethod.class)) {\n resultMethods.add(method);\n }\n }\n\n return resultMethods;\n }",
"public Collection<IFunction> getAllFunctions()\r\n\t{\r\n\t\treturn expressionRegistry.getAllFunctions();\r\n\t}",
"public List<BrainTreePaymentInfo> getPaymentMethods()\n\t{\n\t\treturn getPaymentMethods( getSession().getSessionContext() );\n\t}",
"@Override\n public List<JavaType> getInterfaces() {\n return ImmutableList.of();\n }",
"@JsonIgnore\n public java.lang.reflect.Method getMethod() {\n return this.method;\n }",
"abstract protected Set<Method> createMethods();",
"public List<PaymentEntity> getPaymentMethods() {\n return entityManager.createNamedQuery(\"getAllPaymentMethods\", PaymentEntity.class).getResultList();\n\n }",
"public List<__Type> getTypes() {\n return (List<__Type>) get(\"types\");\n }",
"public final List<BuilderMethod> methods() throws RecognitionException {\n List<BuilderMethod> methods = null;\n\n\n BuilderMethod method17 = null;\n\n methods = Lists.newArrayList();\n try {\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:246:3: ( ^( I_METHODS ( method )* ) )\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:246:5: ^( I_METHODS ( method )* )\n {\n match(input, I_METHODS, FOLLOW_I_METHODS_in_methods349);\n if (input.LA(1) == Token.DOWN) {\n match(input, Token.DOWN, null);\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:247:7: ( method )*\n loop6:\n while (true) {\n int alt6 = 2;\n int LA6_0 = input.LA(1);\n if ((LA6_0 == I_METHOD)) {\n alt6 = 1;\n }\n\n switch (alt6) {\n case 1:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:247:8: method\n {\n pushFollow(FOLLOW_method_in_methods358);\n method17 = method();\n state._fsp--;\n\n\n methods.add(method17);\n\n }\n break;\n\n default:\n break loop6;\n }\n }\n\n match(input, Token.UP, null);\n }\n\n }\n\n } catch (RecognitionException re) {\n reportError(re);\n recover(input, re);\n } finally {\n // do for sure before leaving\n }\n return methods;\n }",
"org.mojolang.mojo.lang.FuncDeclOrBuilder getMethodsOrBuilder(\n int index);",
"public List<?> getAllFuncs() throws DataAccessException {\n\t\treturn (List<?>) mapper.getAllFuncs();\r\n\t}",
"public List<Type> getAll();",
"public static Multimap<String, Method> getMethodsMultimap( Class<?> klass )\r\n {\r\n Multimap<String, Method> methods = ArrayListMultimap.create();\r\n getMethods( klass ).forEach( method -> methods.put( method.getName(), method ) );\r\n return methods;\r\n }",
"public CachetActionList getActions() {\n throw new RuntimeException(\"Method not implemented.\");\n }",
"public String[] getMethods(String url) throws RemoteException{\n\t\ttry{\n\t\t//reading wsdl here...\n String wsdlFile = url+\"?wsdl\";\n \n WSDLParser parser = new WSDLParser(wsdlFile);\n\t\treturn parser.getAllMethodNames();\n\t\t}catch(Exception e){\n\t\t\tSystem.err.println(e.getMessage());\t\n\t\t}\n\n\t\treturn null;\n\t}",
"private Set<Method> expectedMethods() {\n new HashSet<>();\n Set<Method> methodsWithMetadata =\n Arrays.stream(testAdviceWithMetadata.getClass().getDeclaredMethods()).collect(Collectors.toSet());\n Set<Method> methodsWithOutMetadata =\n Arrays.stream(testAdviceWithOutMetadata.getClass().getDeclaredMethods()).collect(Collectors.toSet());\n Set<Method> methodsForInheritedExceptions =\n Arrays.stream(testAdviceForInheritedExceptions.getClass().getDeclaredMethods())\n .collect(Collectors.toSet());\n\n return Stream.of(methodsWithMetadata, methodsWithOutMetadata, methodsForInheritedExceptions)\n .flatMap(Collection::stream)\n .filter(method -> method.isAnnotationPresent(GrpcExceptionHandler.class))\n .collect(Collectors.toSet());\n }",
"@Override\r\n\t\tpublic final MethodDescriptor[] getMethodDescriptors()\r\n\t\t{\n\t\t\tfinal Class<?> c = PolygonWrapper.class;\r\n\t\t\tfinal MethodDescriptor[] mds =\r\n\t\t\t{ method(c, \"exportThis\", null, \"Export Shape\"),\r\n\t\t\t\t\tmethod(c, \"addNode\", null, \"Add node\") };\r\n\t\t\treturn mds;\r\n\t\t}",
"public HashMap<String, HashMap<String, Object>> getResultsForMethods() {\n return resultsForMethods;\n }",
"private static boolean getInternalPublicMethods(Class<?> paramClass, Map<Signature, Method> paramMap) {\n/* 143 */ Method[] arrayOfMethod = null;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ try {\n/* 150 */ if (!Modifier.isPublic(paramClass.getModifiers())) {\n/* 151 */ return false;\n/* */ }\n/* 153 */ if (!ReflectUtil.isPackageAccessible(paramClass)) {\n/* 154 */ return false;\n/* */ }\n/* */ \n/* 157 */ arrayOfMethod = paramClass.getMethods();\n/* 158 */ } catch (SecurityException securityException) {\n/* 159 */ return false;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 168 */ boolean bool = true; byte b;\n/* 169 */ for (b = 0; b < arrayOfMethod.length; b++) {\n/* 170 */ Class<?> clazz = arrayOfMethod[b].getDeclaringClass();\n/* 171 */ if (!Modifier.isPublic(clazz.getModifiers())) {\n/* 172 */ bool = false;\n/* */ \n/* */ break;\n/* */ } \n/* */ } \n/* 177 */ if (bool) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* 182 */ for (b = 0; b < arrayOfMethod.length; b++) {\n/* 183 */ addMethod(paramMap, arrayOfMethod[b]);\n/* */ \n/* */ }\n/* */ \n/* */ }\n/* */ else {\n/* */ \n/* 190 */ for (b = 0; b < arrayOfMethod.length; b++) {\n/* 191 */ Class<?> clazz = arrayOfMethod[b].getDeclaringClass();\n/* 192 */ if (paramClass.equals(clazz)) {\n/* 193 */ addMethod(paramMap, arrayOfMethod[b]);\n/* */ }\n/* */ } \n/* */ } \n/* 197 */ return bool;\n/* */ }",
"@Override public Iterable<JflowModel.Method> getStartMethods()\n{\n Vector<JflowModel.Method> v = new Vector<JflowModel.Method>();\n\n for (JflowMethod cm : model_master.getStartMethods()) {\n ModelMethod cs = complete_calls.get(cm);\n if (cs != null) v.add(cs);\n }\n\n return v;\n}",
"public List<Function> getFunctions(){\n\t\t\n\t\treturn null;\n\t}",
"public List<ResolvedFieldDeclaration> getAllFieldsVisibleToInheritors() {\n List<ResolvedFieldDeclaration> res = new LinkedList<>(this.getDeclaredFields().stream().filter(f -> f.accessSpecifier() != AccessSpecifier.PRIVATE).collect(Collectors.toList()));\n getDirectAncestors().forEach(a -> res.addAll(a.getAllFieldsVisibleToInheritors()));\n return res;\n }",
"public List<MethodInfo> getMethod(String methodName) {\n List<MethodInfo> matchedMethodInfo = new ArrayList<MethodInfo>();\n for (MethodInfo method : this.lstMethodInfo) {\n if (methodName.equals(method.getName())) {\n matchedMethodInfo.add(method);\n }\n }\n \n return matchedMethodInfo;\n }"
]
| [
"0.78712356",
"0.7819361",
"0.78060687",
"0.78060687",
"0.7742499",
"0.7704275",
"0.7675751",
"0.75726694",
"0.74602747",
"0.734508",
"0.7341876",
"0.73382354",
"0.733742",
"0.7116084",
"0.7103241",
"0.70742273",
"0.69783545",
"0.69579",
"0.68887454",
"0.6867015",
"0.6860142",
"0.6829224",
"0.68191844",
"0.68015844",
"0.6798198",
"0.67952573",
"0.66583127",
"0.6617339",
"0.6555099",
"0.65398175",
"0.6494332",
"0.6440212",
"0.6414009",
"0.6348364",
"0.6291918",
"0.62639356",
"0.6212814",
"0.6195742",
"0.6182897",
"0.6144843",
"0.61435217",
"0.61315155",
"0.6126156",
"0.609776",
"0.60929346",
"0.6080184",
"0.6045391",
"0.60355604",
"0.60009176",
"0.5986832",
"0.5964016",
"0.595436",
"0.5944543",
"0.591938",
"0.5897606",
"0.5864191",
"0.5859562",
"0.58577657",
"0.58572894",
"0.5853582",
"0.5794594",
"0.5792135",
"0.578501",
"0.5771261",
"0.57639885",
"0.57500696",
"0.5744923",
"0.57445717",
"0.57186085",
"0.5714266",
"0.5694634",
"0.5675091",
"0.5670304",
"0.56700677",
"0.5639235",
"0.56343216",
"0.5616269",
"0.5614518",
"0.5590166",
"0.55831313",
"0.55735517",
"0.55716133",
"0.5551228",
"0.55491346",
"0.5547244",
"0.54991895",
"0.5495019",
"0.5480815",
"0.54791766",
"0.5478813",
"0.54744977",
"0.5462363",
"0.54526705",
"0.5447232",
"0.5423507",
"0.5423033",
"0.54050165",
"0.540041",
"0.5384518",
"0.5381478"
]
| 0.8110969 | 0 |
Fields which are visible to inheritors. They include all inherited fields which are visible to this type plus all declared fields which are not private. | public List<ResolvedFieldDeclaration> getAllFieldsVisibleToInheritors() {
List<ResolvedFieldDeclaration> res = new LinkedList<>(this.getDeclaredFields().stream().filter(f -> f.accessSpecifier() != AccessSpecifier.PRIVATE).collect(Collectors.toList()));
getDirectAncestors().forEach(a -> res.addAll(a.getAllFieldsVisibleToInheritors()));
return res;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Set<Field> getFields() {\r\n \t\t// We will only consider private fields in the declared class\r\n \t\tif (forceAccess)\r\n \t\t\treturn setUnion(source.getDeclaredFields(), source.getFields());\r\n \t\telse\r\n \t\t\treturn setUnion(source.getFields());\r\n \t}",
"private void findFields() {\n for(Class<?> clazz=getObject().getClass();clazz != null; clazz=clazz.getSuperclass()) {\r\n\r\n Field[] fields=clazz.getDeclaredFields();\r\n for(Field field:fields) {\r\n ManagedAttribute attr=field.getAnnotation(ManagedAttribute.class);\r\n Property prop=field.getAnnotation(Property.class);\r\n boolean expose_prop=prop != null && prop.exposeAsManagedAttribute();\r\n boolean expose=attr != null || expose_prop;\r\n\r\n if(expose) {\r\n String fieldName = Util.attributeNameToMethodName(field.getName());\r\n String descr=attr != null? attr.description() : prop.description();\r\n boolean writable=attr != null? attr.writable() : prop.writable();\r\n\r\n MBeanAttributeInfo info=new MBeanAttributeInfo(fieldName,\r\n field.getType().getCanonicalName(),\r\n descr,\r\n true,\r\n !Modifier.isFinal(field.getModifiers()) && writable,\r\n false);\r\n\r\n atts.put(fieldName, new FieldAttributeEntry(info, field));\r\n }\r\n }\r\n }\r\n }",
"public static List<Field> getInheritedPrivateFields(Class<?> type)\r\n {\r\n List<Field> result = new ArrayList<Field>();\r\n \r\n Class<?> i = type;\r\n while (i != null && i != Object.class) {\r\n for (Field field : i.getDeclaredFields()) {\r\n if (!field.isSynthetic()) {\r\n result.add(field);\r\n }\r\n }\r\n i = i.getSuperclass();\r\n }\r\n \r\n return result;\r\n }",
"private static HashSet<Field> getAllFields(Class<?> cls) {\n // First, let's get all the super classes.\n HashSet<Class<?>> ancestors = getInstrumentedAncestors(cls);\n\n // Then, let's get all the fields of these classes.\n HashSet<Field> allFields = new HashSet<>();\n for (Class<?> ancestor : ancestors) {\n Collections.addAll(allFields, ancestor.getDeclaredFields());\n }\n return allFields;\n }",
"@JsonAnyGetter\n public Map<String, String> otherFields() {\n return unknownFields;\n }",
"protected Vector getUnmappedFields() {\r\n Vector fields = new Vector(1);\r\n if (isStoredInCache()) {\r\n fields.addElement(getWriteLockField());\r\n }\r\n return fields;\r\n }",
"@SuppressWarnings(\"rawtypes\")\n\tpublic List getFields(){\n\t\treturn targetClass.fields;\n\t}",
"@Override\n public java.util.List<? extends FieldOrBuilder>\n getFieldsOrBuilderList() {\n return fields_;\n }",
"private List getMappingFieldsInternal() {\n if (fields == null) {\n fields = new ArrayList();\n }\n\n return fields;\n }",
"public void printInheritedValuesWithoutGetters() {\n log.info(phone);\n log.info(lastName);\n log.info(firstName);\n }",
"public Set<FieldInfo> getFieldInfos() {\n return new LinkedHashSet<FieldInfo>(_atts);\n }",
"@Override\n public java.util.List<Field> getFieldsList() {\n return fields_;\n }",
"public FieldDeclaration[] getFields() {\n return m_classBuilder.getFields();\n }",
"public static boolean canAccessFieldsDirectly(){\n return false; //TODO codavaj!!\n }",
"public abstract Set<ResolvedFieldDeclaration> getDeclaredFields();",
"public List<String> showFields() {\n Client client = new Client();\n Class<?> objFields = client.getClass();\n List<String> list = new ArrayList<>();\n for (Field field : objFields.getDeclaredFields()) {\n list.add(field.getName());\n }\n return list;\n }",
"@Override\n\t/**\n\t * returns the visibility modifiers for the specific class\n\t * \n\t * @return visibility modifiers \n\t */\n\tpublic String getVisability() {\n\t\treturn visability;\n\t}",
"public void printSuperValuesWithoutGetters() {\n log.info(super.phone);\n log.info(super.lastName);\n log.info(super.firstName);\n }",
"public List<AccountingLineViewField> getFields() {\n return fields;\n }",
"public Map<String, Object> getFields() {\n\t\treturn fields;\n\t}",
"public HashMap<String, String> getFields() {\r\n \t\treturn fields;\r\n \t}",
"@Override\n\tprotected String getFields()\n\t{\n\t\tString fields = \" GAZOID, GAZFLD, GAZPVN, GAZTYP, GAZCLN, GAZCLS \";\n\t\treturn fields;\n\t}",
"@Override public final Redeclarable$Fields $Redeclarable$Fields() { return Redeclarable$Flds; }",
"List<FieldNode> getFields() {\n return this.classNode.fields;\n }",
"public String getFields() {\n return fields;\n }",
"public List<String> getNotExportedSearchableFields() {\n return Collections.unmodifiableList(notExportedSearchableFields);\n }",
"public Map<String, String> getFields() {\n return fields;\n }",
"@Override public final DeclContext$Fields $DeclContext$Fields() { return DeclContext$Flds; }",
"public List<Field<T>> getFields()\r\n/* 63: */ {\r\n/* 64:84 */ return this.fields;\r\n/* 65: */ }",
"public List<AliasedField> getFields() {\r\n return fields;\r\n }",
"EmulatedFields emulatedFields() {\n return emulatedFields;\n }",
"@JsonAnyGetter\n public Map<String, Object[]> otherFields() {\n return disciplineFields;\n }",
"public static boolean fieldsDeclaredPrivate(//String file,\r\n\t\t\tClass c) {\n\t\tField[] fields = c.getDeclaredFields();\r\n\t\tfor (Field f : fields) {\r\n\t\t\tif (!Modifier.isPrivate(f.getModifiers())) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public void setFieldReadAccess() {\n\n\t\tif (!AccessManager.canReadPersonnelIdentification())\n\t\t\tpersonnel_nomFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.canReadCentreDiagTraitDescription())\n\t\t\tcdt_nomFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.canReadCandidatureFormationRegionApprobation())\n\t\t\tapprouveeRegionFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.canReadCandidatureFormationGtcApprobation())\n\t\t\tapprouveeGTCFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.canReadDistrictSanteDescription())\n\t\t\tdistrictsante_nomFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.isAdmin())\n\t\t\tdeletedEntityBoxFilterBox.setVisible(false);\n\t}",
"public Map<String, String> getFields() {\n return null;\n }",
"private Map<String,Field> getAllFields(Class clazz) {\n return this.getAllFields(clazz, false);\n }",
"synchronized public Set<String> getFields() {\n return Collections.unmodifiableSet(new HashSet<>(fields));\n }",
"@RegionEffects(\"writes publicField; reads defaultField\")\n private void someButNotAll() {\n publicField = privateField;\n protectedField = defaultField;\n }",
"public static void getFields (Class<?> clazz, List<Field> addTo)\n {\n // first get the fields of the superclass\n Class<?> pclazz = clazz.getSuperclass();\n if (pclazz != null && !pclazz.equals(Object.class)) {\n getFields(pclazz, addTo);\n }\n \n // then reflect on this class's declared fields\n Field[] fields;\n try {\n fields = clazz.getDeclaredFields();\n } catch (SecurityException se) {\n System.err.println(\"Unable to get declared fields of \" + clazz.getName() + \": \" + se);\n fields = new Field[0];\n }\n \n // override the default accessibility check for the fields\n try {\n AccessibleObject.setAccessible(fields, true);\n } catch (SecurityException se) {\n // ah well, only publics for us\n }\n \n for (Field field : fields) {\n int mods = field.getModifiers();\n if (Modifier.isStatic(mods) || Modifier.isTransient(mods)) {\n continue; // skip static and transient fields\n }\n addTo.add(field);\n }\n }",
"public Map<Field, String> getAuditableFields();",
"@SuppressWarnings(\"unchecked\")\n\tprivate Set<Field> getPersistenceFields(Class<?> clz) {\n\t\tSet fields = new HashSet();\n\t\tfor (Field f : clz.getDeclaredFields()) {\n\t\t\tif (f.isAnnotationPresent(Persistence.class)) {\n\t\t\t\tf.setAccessible(true);\n\t\t\t\tfields.add(f);\n\t\t\t}\n\t\t}\n\t\treturn fields;\n\t}",
"public Boolean isAccessible() {\n return this.isAccessible;\n }",
"public void printPrivateVariables() {\n NestedTest outerClass = new NestedTest();\n System.out.println(outerClass.private_member_variable);\n //System.out.println(private_member_variable);\n //System.out.println(private_member_variable);\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 boolean isAccessible() {\n return false;\n }",
"EmulatedFieldsForDumping(ObjectStreamClass streamClass) {\n super();\n emulatedFields = new EmulatedFields(streamClass.fields(),\n (ObjectStreamField[]) null);\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public entity.APDExposureField[] getFields();",
"protected Vector collectFields() {\n Vector fields = new Vector(1);\n fields.addElement(this.getField());\n return fields;\n }",
"public Vector getAttributeFields() {\n\treturn attributeFields;\n }",
"private <T> Map<String, Field> getFields(final Class<T> destinationClass) {\n final Map<String, Field> mappedFields = new HashMap<>();\n logger.trace(\"Retrieving all declared fields for class: {}\", destinationClass);\n final List<Field> declaredFields = getFields(new ArrayList<>(), destinationClass);\n\n for (Field field : declaredFields) {\n if (!field.isAnnotationPresent(Ignore.class)) {\n mapFieldName(mappedFields, field);\n }\n }\n\n return mappedFields;\n }",
"Fields fields();",
"public EAdList<EAdField<?>> getFields() {\r\n\t\treturn fields;\r\n\t}",
"@Override\r\n\tpublic Field[] getExcludedFields() {\n\t\treturn null;\r\n\t}",
"public Map<String,String> getAllCustomFields()\n\t{\n\t\treturn getAllCustomFields( getSession().getSessionContext() );\n\t}",
"public boolean isPrintHiddenFields()\n\t{\n\t\treturn printHiddenFields;\n\t}",
"@Override\n public boolean isPrivate() {\n return true;\n }",
"public Boolean getIgnorePublicAcls() {\n return this.ignorePublicAcls;\n }",
"public static List<Field> getAllFieldsFromAncestor(Class<?> clazz) {\n List<Field> fields = new ArrayList<>();\n for(Class<?> now = clazz; null != now; now = now.getSuperclass()) {\n Field[] nowFields = now.getDeclaredFields();\n // add from last to head\n for(int i = nowFields.length - 1; i >= 0; i--) {\n fields.add(nowFields[i]);\n }\n }\n // remember to reverse the fields got\n Collections.reverse(fields);\n return fields;\n }",
"@Override\n public List<MappedField<?>> getAttributes() {\n return attributes;\n }",
"public interface ScopedField {\n\n /**\n * @return whether or not this field is for internal use only\n */\n boolean isInternal();\n\n /**\n * @return whether or not this field can be used to create reports\n */\n boolean isInReportMaker();\n}",
"private List<Field> getFields(List<Field> fields, Class<?> type) {\n logger.trace(\"Adding all declared fields from class {}\", type);\n fields.addAll(Arrays.asList(type.getDeclaredFields()));\n\n if (type.getSuperclass() != null) {\n logger.trace(\"Retrieving declared fields from class {}\", type);\n getFields(fields, type.getSuperclass());\n }\n\n return fields;\n }",
"public interface IField {\n\t\n\t/**\n\t * Sets the access/visibility.\n\t *\n\t * @param fieldAccessType\n\t */\n\tpublic void setAccess(String fieldAccessType);\n\t\n\t/**\n\t * Sets the field name.\n\t *\n\t * @param fieldName\n\t */\n\tpublic void setFieldName(String fieldName);\n\t\n\t/**\n\t * Sets the type of the field (String, boolean...)\n\t *\n\t * @param fieldReturnType the new type\n\t */\n\tpublic void setType(String fieldReturnType);\n\t\n\t/**\n\t * Gets the access/visibility of the field.\n\t *\n\t * @return the access\n\t */\n\tpublic String getAccess();\n\t\n\t/**\n\t * Gets the field name.\n\t *\n\t * @return the field name\n\t */\n\tpublic String getFieldName();\n\t\n\t/**\n\t * Gets the type of the field\n\t *\n\t * @return the type\n\t */\n\tpublic String getType();\n\t\n\t//TODO: Jason\n\t/**\n\t * Gets the base types.\n\t *\n\t * @return the base types\n\t */\n\tSet<String> getBaseTypes();\n}",
"public Fields getNonAggregatedFields()\n {\n return nonAggregatedFields;\n }",
"public boolean isHideFields() {\n\t\treturn hideFields;\n\t}",
"public void setPrivate()\n {\n ensureLoaded();\n m_flags.setPrivate();\n setModified(true);\n }",
"@Override\n\tpublic Map<String,Object> getChildren(Boolean includeInheritedFields)\n\t{\n\t\tMap<String,Object> fields = new HashMap<String,Object>();\n\t\tif(includeInheritedFields)\n\t\t{\n\t\t\tfields.putAll(super.getChildren(includeInheritedFields));\n\t\t}\n\t\treturn fields;\n\t}",
"@Override\n public int getFieldsCount() {\n return fields_.size();\n }",
"@Override\n\tprotected String getFields()\n\t{\n\t\tString fields = \" HBLNM, HBCFR, HBCFL, HBRNM, HBDLM \";\n\t\treturn fields;\n\t}",
"public Map<String, String> getOriginalFields() {\r\n return Collections.unmodifiableMap(originalFields);\r\n }",
"com.google.protobuf.ByteString\n getFieldsBytes();",
"public java.util.List<? extends FieldOrBuilder>\n getFieldsOrBuilderList() {\n if (fieldsBuilder_ != null) {\n return fieldsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(fields_);\n }\n }",
"@Override\n\tpublic int getAccessible() {\n\t\treturn _userSync.getAccessible();\n\t}",
"private boolean isPublic(FieldBinding fieldBinding) {\n \t\tif (fieldBinding instanceof InterTypeFieldBinding) return true;\n \t\treturn fieldBinding.isPublic();\n \t}",
"public Enumeration getFields()\n {\n ensureLoaded();\n return m_tblField.elements();\n }",
"public FieldModifierPropertyEditor() {\n super(Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE | Modifier.STATIC |\n Modifier.FINAL | Modifier.TRANSIENT | Modifier.VOLATILE);\n }",
"@Nullable\n public com.commercetools.api.models.type.FieldContainer getFields() {\n return this.fields;\n }",
"public static Field[] getAllFields (Class c)\n\t{\n\t\tList l = new ArrayList();\n\t\taddDeclaredFields(l, c);\n\t\t\n\t\tField[] fields = new Field[l.size()];\n\t\tfields = (Field[]) l.toArray(fields);\n\t\treturn fields;\n\t}",
"public void setFieldReadAccess() {\n\n\t\tif (!AccessManager.canReadSmsPredefiniDescription())\n\t\t\ttypeFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.canReadSmsPredefiniDescription())\n\t\t\tobjetFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.canReadSmsPredefiniDescription())\n\t\t\tmessageFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.isAdmin())\n\t\t\tdeletedEntityBoxFilterBox.setVisible(false);\n\t}",
"public Map<String, AllowableFieldEntry> getFieldMap() {\n return fieldMap;\n }",
"public Map<String, List<String>> getHeaderFields() {\n/* 262 */ return this.delegate.getHeaderFields();\n/* */ }",
"@Schema(description = \"Details about any restrictions in the visibility of the worklog. Optional when creating or updating a worklog.\")\n public AllOfWorklogVisibility getVisibility() {\n return visibility;\n }",
"public FieldsImpl() {\r\n logger.entering(CLASS_NAME, \"FieldsImpl()\");\r\n }",
"@Test\n\tpublic void serializePrivateFieldsWithoutAnyGetterSetter() throws JsonProcessingException\n\t{\n\t\t// We do not have setter method in POJO class so can not set any value.\n\t\tEmployee_PrivateFieldsWithoutAnyGetterSetterMethods employee_PrivateFieldsWithoutAnyGetterSetterMethods = \n\t\t\t\tnew Employee_PrivateFieldsWithoutAnyGetterSetterMethods();\n\t\tObjectMapper objectMapper = new ObjectMapper();\n\t\tString serializedJson = objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(employee_PrivateFieldsWithoutAnyGetterSetterMethods);\n\t\tSystem.out.println(serializedJson);\t\t\n\t}",
"public List<Fw> getAllFields(final Class<?> aClass) {\n\t\tList<Fw> result = new ArrayList<>();\n\t\tresult.addAll(this.getSpecialFields(aClass));\n\t\tList<Field> classFields = Arrays.asList(aClass.getDeclaredFields());\n\t\tfor (Field fld : this.getAllTheFields(aClass)) {\n\t\t\tboolean isSuperField = !classFields.contains(fld);\n\t\t\tresult.add(this.makeFw(fld, aClass, isSuperField));\n\t\t}\n\n\t\tthis.removeDoubleIdField(result);\n\t\treturn this.sortAllFields(result);\n\t}",
"public ConfigurationBuilder onlyFields() {\n\t\tconfigurationBuilder.setAccessStrategy(AccessStrategy.ONLY_FIELDS);\n\t\treturn configurationBuilder;\n\t}",
"boolean isPublic()\n {\n return this.visibility.equals(Visibility.PUBLIC);\n //|| this.visibility.equals(Visibility.INHERIT_FROM_SCOPE) && getTokenRef().findToken().getEnclosingScope().isDefaultVisibilityPrivate() == false;\n }",
"@Override\n\tprotected void initializeFields() {\n\n\t}",
"public void testFields()\n {\n TestUtils.testNoAddedFields(getTestedClass(), null);\n }",
"protected Builder<?> addLocalFieldsToBuilder(Builder<? extends Builder<?>> b) {\n this.members.forEach(m -> b.addMemberVariable(m.toBuilder()));\n return (Builder<?>) super.addLocalFieldsToBuilder(b);\n }",
"@Override\n public boolean isVisible(Field field) {\n return true;\n }",
"List<Field> getFields();",
"public Map<String, Object> allFields() {\n Map<String, Object> map = new HashMap<>();\n properties.forEach((key, value) -> map.put(key, value.value()));\n return map;\n }",
"@JsonIgnore\n public Boolean isPrivate()\n {\n return isPrivate;\n }",
"@External(readonly = true)\n\tpublic List<String> get_metadata_fields(){\n\t\t\n\t\treturn this.METADATA_FIELDS;\n\t}",
"protected java.util.Vector getFieldVector() throws Exception {\n java.util.Vector fieldVector = new java.util.Vector();\n Class c = getClass();\n while (c != Class.forName(\"java.lang.Object\")) {\n Field[] fields = c.getDeclaredFields();\n for (int i = fields.length - 1; i >= 0; i--) {\n fieldVector.add(0, fields[i]);\n }\n c = c.getSuperclass();\n }\n return fieldVector;\n }",
"public boolean isUseFields()\n {\n return (isPragma() && getModule().toKeyword().isFieldsKeyword());\n }",
"public List<StatefullComponent> getFields() {\n\t\treturn null;\r\n\t}",
"protected void createJoinPointSpecificFields() {\n String[] fieldNames = null;\n // create the field argument field\n Type fieldType = Type.getType(m_calleeMemberDesc);\n fieldNames = new String[1];\n String fieldName = ARGUMENT_FIELD + 0;\n fieldNames[0] = fieldName;\n m_cw.visitField(ACC_PRIVATE, fieldName, fieldType.getDescriptor(), null, null);\n m_fieldNames = fieldNames;\n\n m_cw.visitField(\n ACC_PRIVATE + ACC_STATIC,\n SIGNATURE_FIELD_NAME,\n FIELD_SIGNATURE_IMPL_CLASS_SIGNATURE,\n null,\n null\n );\n }",
"java.lang.String getFields();",
"Map<String, FieldInfo> getFieldMap() {\n return fieldMap;\n }"
]
| [
"0.6685469",
"0.61087114",
"0.6093685",
"0.5966524",
"0.5964821",
"0.582759",
"0.5818144",
"0.58123255",
"0.5803648",
"0.57853514",
"0.57355416",
"0.5726803",
"0.5724085",
"0.5712729",
"0.5696611",
"0.56548494",
"0.5649377",
"0.5646131",
"0.5614792",
"0.56147474",
"0.56124854",
"0.5588918",
"0.55829227",
"0.55625015",
"0.55613273",
"0.5540226",
"0.5491601",
"0.54889977",
"0.54449576",
"0.54402107",
"0.5432898",
"0.5413758",
"0.5411045",
"0.54029256",
"0.53744406",
"0.53491616",
"0.5347185",
"0.53405434",
"0.5315319",
"0.5308972",
"0.52956885",
"0.5282153",
"0.5279071",
"0.5270388",
"0.526976",
"0.5261033",
"0.5257443",
"0.5255568",
"0.5251856",
"0.52475125",
"0.5242433",
"0.5238852",
"0.5235257",
"0.5214437",
"0.5209778",
"0.51771563",
"0.5162112",
"0.51599956",
"0.51598495",
"0.5147637",
"0.51457775",
"0.5140938",
"0.51352364",
"0.5135069",
"0.5134886",
"0.5133457",
"0.51310974",
"0.5130388",
"0.5119312",
"0.5105962",
"0.51012105",
"0.5091105",
"0.50727487",
"0.5060513",
"0.5059759",
"0.50586796",
"0.504856",
"0.504453",
"0.50384897",
"0.5035277",
"0.5034669",
"0.5034332",
"0.5032095",
"0.5029334",
"0.5028213",
"0.5014411",
"0.50143766",
"0.5004558",
"0.5003431",
"0.5001072",
"0.4998413",
"0.49966514",
"0.4994756",
"0.49915928",
"0.4984817",
"0.49798176",
"0.49624702",
"0.49600595",
"0.4955073",
"0.49519455"
]
| 0.823297 | 0 |
Starting point of the simulation. | private void run() {
//Create the store object
Store store = new Store();
//Populate the array of people
for (int i = 0; i < 20; i++) {
people.add(new Viewer(store));
if (i < 6) { //Add buyers
people.add(new Buyer(store));
}
}
//Make a thread pool according to the size of people
this.threadPoolExecutor =
(ThreadPoolExecutor) Executors.newFixedThreadPool(people.size());
//Start the life of every person
for (Person person : this.people) {
threadPoolExecutor.execute(person);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void start(){\n\t\t//System.out.println(\"SimulationTime.start\");\n\t\tthis.running\t\t\t= true;\n\t\tthis.pause\t\t\t\t= false;\n\t}",
"public void startSimulation();",
"public void start( )\n {\n // Implemented by student.\n }",
"public void start() {\n\t\tSystem.out.println(\"BMW Slef-----start\");\n\t}",
"public void start() {\r\n if (ticks != 0) {\r\n if (uiCreator.isPresent()) {\r\n uiCreator.get().createUI(simulator);\r\n } else {\r\n simulator.start();\r\n }\r\n }\r\n }",
"public void start()\r\n\t{\n\tSystem.out.println(\"normal start method\");\r\n\t}",
"void start() {\n \tm_e.step(); // 1, 3\n }",
"@Override\n\tpublic void start()\n\t{\n\t\tarena = \"scenarios/boxpushing/arena/pioneer.controller.arena.txt\"; \n\n\t\t\n\t\tschedule.reset();\n\n\t\tsuper.start();\n\n\t\tresetBehavior();\n\n\t}",
"public void start() {\n System.out.println(\"This vehicle starts\");\n }",
"public void starting();",
"public void start() {\n\t\tSystem.out.println(\"BMW.........start!!!.\");\n\t}",
"public void simulationStarted() {\n\t\t// Stop following the mouse while the simulation is running\n\t\tremoveMouseListener(mouseFollower);\n\t\t// Ensure display is up-to-date\n\t\trepaint();\n\t\t// Send repaint messages at regular intervals using the autoUpdater Timer object\n\t\tautoUpdater.restart();\n\t}",
"public void ratCrewStart() {\n printStatus();\n ratCrewGo();\n madeTheRun = true;\n printStatus();\n }",
"public void start() {\n startTime = System.currentTimeMillis();\n }",
"public void startSimulation() {\n\t\t// process the inputs\n\t\ttry {\n\t\t\tthis.numberOfServers = Integer.parseInt(frame.getNumberOfQueues());\n\t\t\tthis.minProcessingTime = Integer.parseInt(frame.getMinServiceTime());\n\t\t\tthis.maxProcessingTime = Integer.parseInt(frame.getMaxServiceTime());\n\t\t\tthis.numberOfClients = Integer.parseInt(frame.getNumberOfClients());\n\t\t\tthis.timeLimit = Integer.parseInt(frame.getSimulationInterval());\n\t\t\tthis.selectionPolicy = frame.getSelectionPolicy();\n\t\t\tthis.minArrivingTime = Integer.parseInt(frame.getMinArrivingTime());\n\t\t\tthis.maxArrivingTime = Integer.parseInt(frame.getMaxArrivingTime());\n\t\t\tthis.maxTasksPerServer = Integer.parseInt(frame.getTasksPerServer());\n\t\t\tthis.simulationSpeed = Integer.parseInt(frame.getSimulationSpeed());\n\t\t} catch (NumberFormatException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tgenerateNRandomTasks();\n\t\tscheduler = new Scheduler(this.numberOfServers, this.maxTasksPerServer, this);\n\t\tscheduler.changeStrategy(this.selectionPolicy);\n\t\tscheduler.setMaxTasksPerServer(this.maxTasksPerServer);\n\t\t// initialise emptyQueueTime\n\t\temptyQueueTime = new int[this.numberOfServers];\n\t\tfor (int i = 0; i < this.numberOfServers; i++)\n\t\t\tthis.emptyQueueTime[i] = 0;\n\n\t\tThread th = new Thread(this);\n\t\tth.start();\n\t}",
"public void start(){\n\t\tstarted = true;\n\t\tlastTime = System.nanoTime();\n\t}",
"public void start() {\n System.out.println(\"start\");\n }",
"public void start() {\n startTime = System.currentTimeMillis();\n }",
"@Override\r\n public void initialRun(){\r\n tProcess = parser.nextSimProcessTime();\r\n System.out.println();\r\n boolean goRun=true;\r\n while(goRun){\r\n\r\n if(currentTime == tProcess){\r\n mc = parser.simProcess(mc);\r\n tProcess = parser.nextSimProcessTime();\r\n }\r\n mc.doOneStep();\r\n\r\n if(makeVideo){\r\n if(currentTime%FrameRate ==0){\r\n\r\n vid.addLatticeFrame(mc.getSimSystem().getSystemImg());\r\n makeVideo = vid.isWritten();\r\n }\r\n }\r\n\r\n if((currentTime % 10) ==0){System.out.println(\"t:\"+currentTime+\" M:\"+mc.getM());}\r\n currentTime++;\r\n\r\n\r\n goRun = !(mc.nucleated());\r\n if(mc.getM()<0 && currentTime> 300){goRun=false;}\r\n if(currentTime > maxT){goRun= false;}\r\n }\r\n\r\n if(makeVideo){\r\n vid.writeVideo();\r\n }\r\n }",
"public void start() {\n \tthis.currentState = this.initialState;\n \tstop=false; //indica que el juego no se ha detenido\n \tnotifyObservers(new GameEvent<S, A>(EventType.Start,null,currentState,\n \t\t\t\t\tnull,\"The game started\"));\n\n }",
"public void start() {\n notifyStart();\n simloop();\n notifyStop();\n }",
"@Override\n\tpublic void start() {\n\t\tSystem.out.println(\"BMW -- start\");\n\t}",
"public void start() {\n \t\tzCalc.start();\n \t}",
"@Override\r\n\tpublic void tellStarting() {\r\n\t\t// TODO Auto-generated method stub\r\n\r\n\t\t// Not used here\r\n\t}",
"public void start() {\n\t\t\n\t}",
"public void start() {\n\t\t\n\t}",
"private void gameStart(){\n\t\tRandom randomGenerator = new Random();\n\t\tint ranNum = randomGenerator.nextInt(teamNum);\n\t\tSystem.out.println(\"The team to go first will be \" + teams[ranNum].getName());\n\t\tgameHelper(ranNum); //process all 25 questions until it's over\n\t\tfinalRound();\n\t\tprintFinalWinner();\n\t\t\n\t\t\n\t}",
"protected void initialize() {\n \t\n \tstart_time = System.currentTimeMillis();\n \t\n \tgoal = start_time + duration;\n }",
"@Override\n\tpublic void start() {\n\t\t\tSystem.out.println(\"BMW --- strart\");\n\t}",
"public void simulationStarted( SimulationEvent evt )\r\n {\r\n assert sim == evt.getSimulator();\r\n \r\n simTimeSinceUpdate = 0;\r\n repaint();\r\n }",
"void start() \r\n {\r\n while (controller.clock <= controller.totalBurstTime) {\r\n this.clock();\r\n }\r\n }",
"public void start()\n {\n }",
"protected void setup() {\n\t\t\n\n\n\t\tif(PropertiesLoaderImpl.IS_MAIN_SIMULATION_NODE)addBehaviour(new HandleClockBehaviour(this, TimeRateControl));\n\t\telse addBehaviour(new SlaveNodeClockBehaviour(this, TimeRateControl));\n\t\t\n\t\tif(PropertiesLoaderImpl.DEBUG) System.out.println(this.getName() +\" alive!!!!!!!!!!\\nStarting the simulation time\");\n\t\t\n\t\n\t\t\tSimulationClock.getInstance().setSimulationStarted(true);\n\t\n\t}",
"public void begin() {\n if (!checkParams()) return;\n\n buildModel();\n buildSchedule();\n buildDisplay();\n\n displaySurf.display();\n populationPlot.display();\n }",
"public void start() {\n\n\t}",
"public void start() {\n\t\tSystem.out.println(\"BMW start method\");\n\t}",
"public void start() {}",
"public void start() {}",
"public void start() {\n \t\tgui.initialize();\n \t\t// DEBUG mode\n\t\tbman.get(0).boostSpeed(2);\n \n \t\tloop();\n \t}",
"private void start() {\n\n\t}",
"public static void beginStep() {\n\t\tTestNotify.log(STEP_SEPARATOR);\n\t TestNotify.log(GenLogTC() + \"is being tested ...\");\n\t}",
"public void start() {\n\t\tSystem.out.println(\"parent method\");\n\t}",
"public void moveStart(\n )\n {\n index = StartIndex;\n if(state == null)\n {\n if(parentLevel == null)\n {state = new GraphicsState(this);}\n else\n {state = parentLevel.state.clone(this);}\n }\n else\n {\n if(parentLevel == null)\n {state.initialize();}\n else\n {parentLevel.state.copyTo(state);}\n }\n\n notifyStart();\n\n refresh();\n }",
"public void startExecuting()\n {\n field_46102_e = 40 + field_46105_a.getRNG().nextInt(40);\n }",
"@Override\n public void start() {\n runtime.reset();\n\n telemetry.addData(\"Instructions:\", \"To increase or decrease the shooter speed, use A button to decrease\" +\n \"speed and B button to increase speed. Use the right and left bumper to control the intake. To change \" +\n \"the intake speed, use d-pad down to decrease the speed and dpad up to increase the speed. The normal driving \" +\n \"should work as normal. Both speeds are initialized to .5, and you should be able to read that in the telemetry \" +\n \"once you start the program :) buena suerte\");\n telemetry.update();\n }",
"public void start(float delta) {\n\t\t\n\t}",
"public void start() {\n\t\tthis.startTime = System.nanoTime();\n\t\tthis.running = true;\n\t}",
"public void goToStart() {\n\t\tsetPosition(0);\n\t}",
"private void setStart()\n {\n for(int i = 0; i < cities.size(); i++)\n System.out.println(\"Location: \"+i+\" \"+cities.get(i).getSourceName());\n \n System.out.println(\"Which city would you like to start at? Enter the location number\"); \n computePaths(cities.get(input.nextInt()));\n printMenu(); \n }",
"void start () {\n System.out.println(\"Starting the game\");\n score = 0;\n updateScore();\n stepDelay = startingSpeed;\n isFalling = false;\n gameOver = false;\n board.clear();\n board.clearTemp();\n setNormalSpeed();\n spawnNewPiece();\n updateView();\n resetLoop();\n }",
"public void start(){\n\t\tthis.lastUpdate = System.currentTimeMillis();\n\t\tthis.millisIntoFrame=0;\n\t\tthis.currentFrame=0;\n\t}",
"public void startup() {\n\t\tstart();\n }",
"public void start() {\r\n\t\tdiscoverTopology();\r\n\t\tsetUpTimer();\r\n\t}",
"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 }",
"public void start() {\r\n\t\tSystem.out.println(\"start the car\");\r\n\t}",
"@Override\n\tvoid start() {\n\t\tSystem.out.println(\"starts\");\n\t}",
"public void start()\n {}",
"private void initSimulation()\r\n {\r\n int mark = rn.nextInt(2);\r\n if(mark == 0)\r\n {\r\n computer.setMarker(Marker.cross);\r\n marker = computer.getMarker();\r\n computer2.setMarker(Marker.circle);\r\n computer.makeMove(this);\r\n turn = 2;\r\n }\r\n else\r\n {\r\n computer.setMarker(Marker.circle);\r\n computer2.setMarker(Marker.cross);\r\n marker = computer2.getMarker();\r\n computer2.makeMove(this);\r\n turn = 1;\r\n }\r\n bh.setBoard(this);\r\n simtime.start();\r\n }",
"public FirstRun( ) {\n\t\t// TODO Auto-generated constructor stub\n\t\t\n\t}",
"public void startGame() {\n \t\ttimeGameStarted = System.nanoTime();\n \t\tisStarted = true;\n \n \t}",
"Start createStart();",
"public void start() {\n }",
"@Override\r\n\tpublic void start() {\n\t\t\r\n\t}",
"public static void start() { \r\n\t\ttempo_inicial = System.nanoTime(); \r\n\t\ttempo_final = 0; \r\n\t\tdiftempo = 0; \r\n\t}",
"public void start() {\n\t\tthis.controller.run();\n\t}",
"@Override\r\n\tpublic double getCurrentStepStart() {\n\t\treturn 0;\r\n\t}",
"@Override\r\n public void start() {\r\n }",
"public void setStart(){\n\t\tthis.isStart=true;\n\t}",
"private void start(){\n\t\tMetricData metric = new MetricData();\n\t\tmetric.getName();\n\t\tmetric.getValue();\n\t\tmetric.setValue(2);\n\t}",
"public start() {\n\t\tsuper();\n\t}",
"public void start() {\n while (true) {\n for (GameStep gameStep : gameStepList) {\n gameStep.performStep();\n }\n }\n }",
"@RequiresApi(api = Build.VERSION_CODES.N)\n public void StartInitial() {\n model.StartInitial();\n\n // Add any code required\n\n }",
"public void start() {\n initGUI();\n initDemo();\n\n float target = 1000 / 60.0f;\n float frameAverage = target;\n long lastFrame = System.currentTimeMillis();\n float yield = 10000f;\n float damping = 0.1f;\n\n while (running) {\n // adaptive timing loop from Master Onyx\n long timeNow = System.currentTimeMillis();\n frameAverage = (frameAverage * 10 + (timeNow - lastFrame)) / 11;\n lastFrame = timeNow;\n\n yield += yield * ((target / frameAverage) - 1) * damping + 0.05f;\n\n for (int i = 0; i < yield; i++) {\n Thread.yield();\n }\n\n update();\n\n // render\n Graphics2D g = (Graphics2D) strategy.getDrawGraphics();\n g.setColor(background);\n g.fillRect(0, 0, 500, 500);\n\n draw(g);\n renderGUI(g);\n g.dispose();\n strategy.show();\n }\n }",
"@Override\n public void start() {\n robot.shooterPower(1);\n runtime.reset();\n }",
"public void start(){\n\t\ttimer = new Timer();\n\t\ttimer.schedule(this, 0, (long)66.6);\n\t}",
"private void startingScreen() {\n screenWithGivenValues(-1,-2,1,2,3,-1,0);\n }",
"public void startGame() {\n\t\tif (chordImpl.getPredecessorID().compareTo(chordImpl.getID()) > 0) {\n\t\t\tGUIMessageQueue.getInstance().addMessage(\"I Start!\");\n\t\t\tshoot();\n\t\t}\n\t}",
"public void quickSimulation() {\n\t\tnew SimulationControleur();\n\t}",
"Sample start();",
"@Override\n protected void Start() {\n }",
"public void start(){\n return;\n }",
"@Override\n\tpublic void start() {\n\t\t\n\t}",
"@Override\n\tpublic void start() {\n\t\t\n\t}",
"@Override\n\tpublic void start() {\n\t\t\n\t}",
"@Override\n\tpublic void start() {\n\t\t\n\t}",
"public void requestStart(){\r\n\t\t\r\n\t\tIterator <NavigationObserver> navOb = this.navega.iterator();\r\n\t\twhile ( navOb.hasNext()){\r\n\t\t\tnavOb.next().initNavigationModule(this.navega.getCurrentPlace(), this.direction);\r\n\t\t}\r\n\t\tIterator <RobotEngineObserver> robOb = this.iterator();\r\n\t\twhile (robOb.hasNext()){\r\n\t\t\trobOb.next().robotUpdate(fuel, recycledMaterial);\r\n\t\t}\r\n\t}",
"public void start()\r\n\t{\r\n\t\tcurrentstate = TIMER_START;\r\n\t\tstarttime = Calendar.getInstance();\r\n\t\tamountOfPause = 0;\r\n\t\trunningTime = 0;\r\n\t\tlastRunningTime = 0;\r\n\t\tpassedTicks = 0;\r\n\t}",
"@Override public void start() {\n }",
"public void start() {\n System.out.println(\"Machine started.\");\n }",
"public void start() {\n\t\t// doctors start waiting at OPEN_TIME\n\t\tfor (int i = 0; i < _doctors.length; ++i) {\n\t\t\t_doctors[i].startWaiting();\n\t\t}\n\t\t_xrayDoctor.startWaiting();\n\t\tprintTimer();\n\t\tprint(\"Start of simulation.\");\n\t\tprint(\"All doctors start waiting.\");\n\n\t\t// recurse on all events\n\t\twhile (_eventQueue.hasMoreElements()) {\n\t\t\tEvent e = (Event) _eventQueue.nextElement();\n\t\t\tprocessEvent(e);\n\t\t}\n\n\t\t// doctors stop waiting at CLOSE_TIME, or when the last patient left.\n\t\ttime = Math.max(time, CLOSE_TIME);\n\t\tfor (int i = 0; i < _doctors.length; ++i) {\n\t\t\t_doctors[i].stopWaiting();\n\t\t}\n\t\t_xrayDoctor.stopWaiting();\n\t\tprintTimer();\n\t\tprint(\"All doctors stop waiting.\");\n\t\tprint(\"End of simulation.\");\n\t}",
"public void start() {\n\t\tthis.obstacleController.start();\n\t}",
"private void start() {\r\n\t\t// Clear the log file.\r\n\t\tBPCC_Logger.clearLogFile();\r\n\t\t\r\n\t\t// Initialize BPCC_Util static fields.\r\n\t\tBPCC_Util.initStaticFields();\r\n\t\t\r\n\t\t// Set logging level desired for test.\r\n\t\tBPCC_Util.setLogLevel(LogLevelEnum.DEBUG);\r\n\t\t\r\n\t\t// Initialize class global variables.\r\n\t\tinitVars();\r\n\t\t\r\n\t\tcreateAndShowGUI();\r\n\t}",
"@Override\n public void start() { }",
"public void start() {\n\n }",
"protected void start(Location m) {\r\n \r\n gameState = GameStateModel.STARTED;\r\n \r\n startHandle(m);\r\n \r\n if (supports3BV()) {\r\n \tcalculate3BV();\r\n }\r\n \r\n startTS = System.currentTimeMillis();\r\n \r\n }",
"public void setStartX(float startX) {this.startX = startX;}",
"public void initial() {\r\n Timer timer;\r\n setPreferredSize(new Dimension(this.model.maxX() + 50, this.model.maxY() + 50));\r\n setLocation(this.model.getXBounds(), this.model.getYBounds());\r\n timer = new Timer(1000 / this.ticksMultiplier, this);\r\n timer.setInitialDelay(0);\r\n timer.start();\r\n }",
"@Override\n public void startClock() {\n state = ClockState.RUNNING;\n /*\n * Used as scaling factor for workload and virtual machine power --> Need to\n * scale output as well\n */\n double scalingFactor = this.clockTicksTillWorkloadChange*this.intervalDurationInMilliSeconds;\n clockEventPublisher.fireStartSimulationEvent(0, intervalDurationInMilliSeconds, scalingFactor);\n\n while (clockTickCount <= experimentDurationInClockTicks) {\n fireEvents();\n clockTickCount++;\n\n }\n clockEventPublisher.fireFinishSimulationEvent(clockTickCount, intervalDurationInMilliSeconds);\n\n }",
"@Override\n public void start() {\n }",
"@Override\n public void start() {\n }",
"@Override\n public void start() {\n }"
]
| [
"0.76346856",
"0.7501158",
"0.6862147",
"0.67996866",
"0.67986375",
"0.6789401",
"0.678803",
"0.67004824",
"0.66855824",
"0.6671762",
"0.6646747",
"0.6629607",
"0.65696055",
"0.65523434",
"0.65435725",
"0.65434843",
"0.65388954",
"0.6522443",
"0.6512497",
"0.65109926",
"0.65001327",
"0.6493181",
"0.64899504",
"0.6487307",
"0.64709353",
"0.64709353",
"0.6440832",
"0.6438937",
"0.64311415",
"0.6430333",
"0.6414125",
"0.6413303",
"0.6410943",
"0.6409175",
"0.6389706",
"0.638626",
"0.6376168",
"0.6376168",
"0.6367965",
"0.63596237",
"0.6353192",
"0.635251",
"0.63508546",
"0.6337304",
"0.6323206",
"0.63226926",
"0.6317864",
"0.6299546",
"0.62978363",
"0.628822",
"0.628757",
"0.6287054",
"0.6285731",
"0.6283805",
"0.62777966",
"0.62730324",
"0.6263516",
"0.625991",
"0.62566596",
"0.6245369",
"0.6212859",
"0.62116593",
"0.62113786",
"0.62058395",
"0.6202485",
"0.6195633",
"0.61892414",
"0.61850935",
"0.61842805",
"0.61630327",
"0.6145707",
"0.6139866",
"0.6125718",
"0.61230683",
"0.6116855",
"0.6116645",
"0.61104286",
"0.6108738",
"0.61085606",
"0.610798",
"0.610636",
"0.6100201",
"0.6100201",
"0.6100201",
"0.6100201",
"0.6098398",
"0.6097438",
"0.6093609",
"0.6093297",
"0.6087807",
"0.6083301",
"0.6078224",
"0.60754853",
"0.6060052",
"0.605607",
"0.60521036",
"0.60500944",
"0.60485524",
"0.6048045",
"0.6048045",
"0.6048045"
]
| 0.0 | -1 |
method that reads the content in the file, builds mane MonitoredData objects and adds the to a list. | public static ArrayList<MonitoredData> readFileData(){
ArrayList<MonitoredData> data = new ArrayList<>();
List<String> lines = new ArrayList<>();
try (Stream<String> stream = Files.lines(Paths.get("Activities.txt"))) {
lines = stream
.flatMap((line->Stream.of(line.split("\t\t"))))
.collect(Collectors.toList());
for(int i=0; i<lines.size()-2; i+=3){
MonitoredData md = new MonitoredData(lines.get(i), lines.get(i+1), lines.get(i+2));
data.add(md);
}
} catch (IOException e) {
e.printStackTrace();
}
//data.forEach(System.out::println);
return data;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public List<Object> readFile(File file) {\n Scanner scanner = createScanner(file);\n if (Objects.isNull(scanner)) {\n return Collections.emptyList();\n }\n List<Object> readingDTOList = new ArrayList<>();\n scanner.nextLine();\n List<List<String>> allLines = new ArrayList<>();\n while (scanner.hasNext()) {\n List<String> line = parseLine((scanner.nextLine()));\n if (!line.isEmpty()) {\n allLines.add(line);\n }\n }\n if (!allLines.isEmpty()) {\n for (List<String> line : allLines) {\n String sensorId = line.get(0);\n String dateTime = line.get(1);\n String value = line.get(2);\n String unit = line.get(3);\n LocalDateTime readingDateTime;\n if (sensorId.contains(\"RF\")) {\n LocalDate readingDate = LocalDate.parse(dateTime, DateTimeFormatter.ofPattern(\"dd/MM/uuuu\"));\n readingDateTime = readingDate.atStartOfDay();\n } else {\n ZonedDateTime zonedDateTime = ZonedDateTime.parse(dateTime);\n readingDateTime = zonedDateTime.toLocalDateTime();\n }\n double readingValue = Double.parseDouble(value);\n ReadingDTO readingDTO = ReadingMapper.mapToDTOwithIDandUnits(sensorId, readingDateTime, readingValue, unit);\n readingDTOList.add(readingDTO);\n }\n }\n return readingDTOList;\n }",
"public List<List<String>> read () {\n List<List<String>> information = new ArrayList<>();\n try (BufferedReader br = new BufferedReader(new FileReader(path))) {\n int aux = 0;\n while ((line = br.readLine()) != null) {\n String[] data = line.split(split_on);\n List<String> helper = new ArrayList<>();\n helper.add(data[0]);\n helper.add(data[1]);\n information.add(helper);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (br != null) {\n try {\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return information;\n }",
"static void read()\n\t\t{\n\n\n\t\t\tString content=new String();\n\t\t\ttry {\n\t\t\t\tFile file=new File(\"Dic.txt\");\n\t\t\t\tScanner scan=new Scanner(file);\n\t\t\t\twhile(scan.hasNextLine()) {\n\t\t\t\t\tcontent=scan.nextLine();\n\t\t\t\t//\tSystem.out.println(content);\n\n\t\t\t\t//\tString [] array=content.split(\" \");\n\t\t\t\t\tlist.add(content.trim());\n\n\t\t\t\t}\n\t\t\t\tscan.close(); \n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(e);\n\t\t\t}\n\n\n\t\t}",
"@Override\n public void run() {\n try (BufferedReader reader = new BufferedReader(new FileReader(file.getAbsoluteFile()))) {\n String lineFromFile = reader.readLine();\n String[] splitLine;\n String userName;\n String url;\n long time;\n while ((lineFromFile = reader.readLine()) != null) {\n splitLine = lineFromFile.split(\";\");\n userName = splitLine[3];\n url = splitLine[1];\n time = Long.parseLong(splitLine[2]);\n if (userNamesAndCorrespondingContent.containsKey(userName)) {\n Content content = userNamesAndCorrespondingContent.get(userName);\n if (content.getUrlAndCorrespondingTime().containsKey(url)) {\n content.updateTimeForCorrespondingUrl(url, time);\n } else {\n content.updateUrlAndTimeInfoForCorrespondingUsername(url, time);\n }\n } else {\n Map<String, Long> newUrlAndTime = new ConcurrentSkipListMap<>();\n newUrlAndTime.put(url, time);\n userNamesAndCorrespondingContent.put(userName, new Content(newUrlAndTime));\n }\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private static ArrayList<Message> ReadFile(Scanner sc) {\t\n\t\tArrayList<Message> messageList = new ArrayList<Message>();\n\t\t\n\t\t/* Iterating over each string in file and creating\n\t\t * Message object with file contents\n\t\t*/\n\t\twhile (sc.hasNextLine()) {\n\t\t\tString line = sc.nextLine();\n\t\t\tScanner lineScanner = new Scanner(line);\n\t\t\twhile (lineScanner.hasNext()) {\n\t\t\t\ttry {\n\t\t\t\t\tString received = lineScanner.next(); \n\t\t\t\t\tString sent = lineScanner.next();\n\t\t\t\t\tString node1 = lineScanner.next();\n\t\t\t\t\tString notification = lineScanner.next();\n\t\t\t\t\tString node2 = null;\n\t\t\t\t\tif (lineScanner.hasNext()) {\n\t\t\t\t\t\tnode2 = lineScanner.next();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlong receivedVal = Long.parseLong(received);\n\t\t\t\t\tlong sentVal = Long.parseLong(sent);\n\t\t\t\t\tMessage message = new Message(receivedVal, sentVal, node1,\n\t\t\t\t\t\t\tnotification, node2);\n\t\t\t\t\t\n\t\t\t\t\tmessageList.add(message);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tlineScanner.close();\n\t\t}\n\t\treturn messageList;\n\t}",
"public List<Event> fillArrayList()\r\n {\r\n List<Event> list1=new ArrayList<>();\r\n FileReader fr=null;\r\n \r\n try{\r\n \r\n fr=new FileReader(\"./event.txt\");\r\n BufferedReader bf=new BufferedReader(fr);\r\n String s;\r\n \r\n while((s=bf.readLine())!=null)\r\n {\r\n Event event=new Event();\r\n String s1[]=new String[7];\r\n for(int i=0;i<s1.length;i++)\r\n {\r\n s1=s.split(\",\");\r\n \r\n event.setId(Integer.parseInt(s1[0]));\r\n \r\n event.setName(s1[1]);\r\n \r\n event.setOrganizer(s1[2]);\r\n \r\n Date date=Date.valueOf(s1[3]);\r\n \r\n event.setDate(date);\r\n \r\n event.setFees(Double.parseDouble(s1[4]));\r\n \r\n } \r\n list1.add(event);\r\n }\r\n \r\n bf.close();\r\n \r\n }catch(Exception e){e.printStackTrace();}\r\n return list1;\r\n\r\n }",
"private void processLog(File log) {\n BufferedReader in = null;\r\n ArrayList<String> list = new ArrayList<String>();\r\n String lastFrom = \"\";\r\n try {\r\n in = new BufferedReader(new FileReader(log));\r\n String line;\r\n while((line = in.readLine()) != null) {\r\n // lineNum++;\r\n if(line.contains(\"FROM\")) {\r\n // Start over at each FROM, leaving the last one and what\r\n // follows\r\n list.clear();\r\n list.add(line);\r\n lastFrom = line;\r\n } else if(line.contains(\"TO\")) {\r\n list.add(line);\r\n }\r\n }\r\n in.close();\r\n Data data = new Data(log.getName(), lastFrom);\r\n results.add(data);\r\n System.out.printf(\"%s\\n\", log.getName());\r\n for(String item : list) {\r\n System.out.printf(\" %s\\n\", item);\r\n }\r\n } catch(Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }",
"public static List<String> readLogRec(File file)throws Exception{\n\t\tBufferedReader br = null;\n\t\ttry {\n\t\t\tbr = new BufferedReader(\n\t\t\t\tnew InputStreamReader(new FileInputStream(file))\t\n\t\t\t);\n\t\t\tList<String> list \n\t\t\t\t= new ArrayList<String>();\n\t\t\t\n\t\t\tString line = null;\n\t\t\twhile((line=br.readLine())!=null){\n\t\t\t\tlist.add(line);\n\t\t\t}\n\t\t\treturn list;\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow e;\n\t\t} finally{\n\t\t\tif(br != null){\n\t\t\t\tbr.close();\n\t\t\t}\n\t\t}\n\t}",
"public ArrayList<Task> loadData() throws IOException {\n DateTimeFormatter validFormat = DateTimeFormatter.ofPattern(\"MMM dd yyyy HH:mm\");\n ArrayList<Task> orderList = new ArrayList<>();\n\n try {\n File dataStorage = new File(filePath);\n Scanner s = new Scanner(dataStorage);\n while (s.hasNext()) {\n String curr = s.nextLine();\n String[] currTask = curr.split(\" \\\\| \");\n assert currTask.length >= 3;\n Boolean isDone = currTask[1].equals(\"1\");\n switch (currTask[0]) {\n case \"T\":\n orderList.add(new Todo(currTask[2], isDone));\n break;\n case \"D\":\n orderList.add(new Deadline(currTask[2],\n LocalDateTime.parse(currTask[3], validFormat), isDone));\n break;\n case \"E\":\n orderList.add(new Event(currTask[2],\n LocalDateTime.parse(currTask[3], validFormat), isDone));\n break;\n }\n }\n } catch (FileNotFoundException e) {\n if (new File(\"data\").mkdir()) {\n System.out.println(\"folder data does not exist yet.\");\n } else if (new File(filePath).createNewFile()) {\n System.out.println(\"File duke.txt does not exist yet.\");\n }\n }\n return orderList;\n\n }",
"protected void parse() throws ParseException {\n String s;\n try {\n s=getFullText();\n } catch (IOException ioe) {\n if (ioe instanceof FileNotFoundException) {\n throw new DataNotFoundException (\"Could not find log file.\", ioe);\n } else {\n throw new ParseException (\"Error getting log file text.\", new File (getFileName()));\n }\n }\n StringTokenizer sk = new StringTokenizer(s);\n ArrayList switches = new ArrayList(10);\n while (sk.hasMoreElements()) {\n String el =sk.nextToken().trim();\n if (el.startsWith(\"-J\")) {\n if (!(el.equals(\"-J-verbose:gc\"))) {\n if (!(el.startsWith(\"-J-D\"))) {\n JavaLineswitch curr = new JavaLineswitch(el.substring(2));\n addElement (curr); \n }\n }\n }\n }\n }",
"public void parseFile(){\n try{\n BufferedReader br = new BufferedReader(new FileReader(\"ElevatorConfig.txt\"));\n \n String fileRead;\n \n totalSimulatedTime = 1000;\n Integer.parseInt(br.readLine());\n simulatedSecondRate = 30;\n Integer.parseInt(br.readLine());\n \n for (int onFloor = 0; onFloor< 5; onFloor++){\n \n fileRead = br.readLine(); \n String[] tokenize = fileRead.split(\";\");\n for (int i = 0; i < tokenize.length; i++){\n String[] floorArrayContent = tokenize[i].split(\" \");\n \n int destinationFloor = Integer.parseInt(floorArrayContent[1]);\n int numPassengers = Integer.parseInt(floorArrayContent[0]);\n int timePeriod = Integer.parseInt(floorArrayContent[2]);\n passengerArrivals.get(onFloor).add(new PassengerArrival(numPassengers, destinationFloor, timePeriod));\n }\n }\n \n br.close();\n \n } catch(FileNotFoundException e){ \n System.out.println(e);\n } catch(IOException ioe){\n ioe.printStackTrace();\n }\n\n }",
"private void buildMovementData(File crinkleViewerFile) {\n\t\t// read from a file\n\t\tScanner sc;\n\t\ttry {\n\t\t\tsc = new Scanner(crinkleViewerFile);\n\t\t\twhile (sc.hasNextLine()) {\n\t\t\t\trecieve(sc.nextLine());\n\t\t\t}\n\t\t\tsc.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t}",
"public void readFile() {\n try\n {\n tasksList.clear();\n\n FileInputStream file = new FileInputStream(\"./tasksList.txt\");\n ObjectInputStream in = new ObjectInputStream(file);\n\n boolean cont = true;\n while(cont){\n Task readTask = null;\n try {\n readTask = (Task)in.readObject();\n } catch (Exception e) {\n }\n if(readTask != null)\n tasksList.add(readTask);\n else\n cont = false;\n }\n\n if(tasksList.isEmpty()) System.out.println(\"There are no todos.\");\n in.close();\n file.close();\n }\n\n catch(IOException ex)\n {\n ex.printStackTrace();\n }\n }",
"private ArrayList<String> parseFile(String file_name){ // extract each line from file AS string (stopList)\r\n ArrayList<String> list = new ArrayList<>();\r\n Scanner scanner = null;\r\n try{\r\n scanner = new Scanner(new BufferedReader(new FileReader(file_name)));\r\n while (scanner.hasNextLine())\r\n {\r\n list.add(scanner.nextLine());\r\n }\r\n }\r\n catch (Exception e ){ System.out.println(\"Error reading file -> \"+e.getMessage()); }\r\n finally {\r\n if(scanner != null ){scanner.close();} // close the file\r\n }\r\n return list;\r\n }",
"public void readDataFromFile(){\n try {\n weatherNow.clear();\n // Open File\n Scanner scan = new Scanner(context.openFileInput(fileSaveLoc));\n\n // Find all To Do items\n while (scan.hasNextLine()) {\n String line = scan.nextLine();\n\n // if line is not empty it is data, add item.\n if (!line.isEmpty()) {\n // first is the item name and then the item status.\n String[] readList = line.split(\",\");\n String city = readList[0];\n String countryCode = readList[1];\n double temp = Double.parseDouble(readList[2]);\n String id = readList[3];\n String description = readList[4];\n\n weatherNow.add(new WeatherNow(city,countryCode, temp, id, description));\n }\n }\n\n // done\n scan.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void parse() {\n if (file == null)\n throw new IllegalStateException(\n \"File cannot be null. Call setFile() before calling parse()\");\n\n if (parseComplete)\n throw new IllegalStateException(\"File has alredy been parsed.\");\n\n FSDataInputStream fis = null;\n BufferedReader br = null;\n\n try {\n fis = fs.open(file);\n br = new BufferedReader(new InputStreamReader(fis));\n\n // Go to our offset. DFS should take care of opening a block local file\n fis.seek(readOffset);\n records = new LinkedList<T>();\n\n LineReader ln = new LineReader(fis);\n Text line = new Text();\n long read = readOffset;\n\n if (readOffset != 0)\n read += ln.readLine(line);\n\n while (read < readLength) {\n int r = ln.readLine(line);\n if (r == 0)\n break;\n\n try {\n T record = clazz.newInstance();\n record.fromString(line.toString());\n records.add(record);\n } catch (Exception ex) {\n LOG.warn(\"Unable to instantiate the updateable record type\", ex);\n }\n read += r;\n }\n\n } catch (IOException ex) {\n LOG.error(\"Encountered an error while reading from file \" + file, ex);\n } finally {\n try {\n if (br != null)\n br.close();\n\n if (fis != null)\n fis.close();\n } catch (IOException ex) {\n LOG.error(\"Can't close file\", ex);\n }\n }\n\n LOG.debug(\"Read \" + records.size() + \" records\");\n }",
"private void getDataLists(String path)\n\t{\n\t\ttry\n\t\t{\n\t\t\tFile file = new File(path);\n\t\t\tfile.createNewFile();\n\t\t\tBufferedReader fileReader = new BufferedReader(new FileReader(file));\n\t\t\t\n\t\t\tString str = null;\n\t\t\twhile((str = fileReader.readLine()) != null)\n\t\t\t{\n\t\t\t\tthis.dataList.push(str);\n\t\t\t}\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tSystem.out.println(\"Failed : data list read\");\n\t\t}\n\t}",
"List<LoggingEvent> parse(InputStream is) throws ParseException;",
"public static List<Server> readFile() {\n String fileName = \"servers.txt\";\n\n List<Server> result = new LinkedList<>();\n try (Scanner sc = new Scanner(createFile(fileName))) {\n\n while (sc.hasNextLine()) {\n String line = sc.nextLine();\n result.add(lineProcessing(line));\n\n }\n\n } catch (FileNotFoundException e) {\n System.out.println(\"File is not found\");\n } catch (MyException e) {\n System.out.println(\"File is corrupted\");\n }\n return result;\n }",
"private void loadFromFile() {\n try {\n /* Load in the data from the file */\n FileInputStream fIn = openFileInput(FILENAME);\n BufferedReader inRead = new BufferedReader(new InputStreamReader(fIn));\n\n /*\n * access from the GSON file\n * Taken from lonelyTwitter lab code\n */\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Counter>>() {}.getType();\n counters = gson.fromJson(inRead, listType);\n\n } catch (FileNotFoundException e) {\n counters = new ArrayList<Counter>();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"private void loadFromFile() {\n try {\n FileInputStream fis = openFileInput(FILENAME);\n InputStreamReader isr = new InputStreamReader(fis);\n BufferedReader reader = new BufferedReader(isr);\n Gson gson = new Gson();\n Type listFeelingType = new TypeToken<ArrayList<Feeling>>(){}.getType();\n recordedFeelings.clear();\n ArrayList<Feeling> tmp = gson.fromJson(reader, listFeelingType);\n recordedFeelings.addAll(tmp);\n fis.close();\n\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n recordedFeelings = new ArrayList<Feeling>();\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }",
"public TaskList openFile() throws MonicaException {\n File file = new File(path);\n\n if (!file.exists()) {\n try {\n file.getParentFile().mkdir();\n file.createNewFile();\n } catch (IOException e) {\n throw new MonicaException(\"File cannot be created.\");\n }\n }\n\n try {\n Scanner sc = new Scanner(file);\n while (sc.hasNext()) {\n String txtLine = sc.nextLine();\n Task task = processContent(txtLine);\n taskList.addTask(task);\n }\n return taskList;\n } catch (FileNotFoundException e) {\n throw new MonicaException(\"File cannot be found.\");\n }\n }",
"public MonitoredData() {}",
"public ArrayList<Task> loadData() throws FileNotFoundException {\n ArrayList<Task> dukeList = new ArrayList<>();\n Scanner sc = new Scanner(file);\n Task t;\n while (sc.hasNextLine()) {\n String line = sc.nextLine();\n String[] splitBySpace = line.split(\" \");\n String[] splitBySlash;\n String command = splitBySpace[0];\n\n if (command.equals(\"D\")) {\n splitBySlash = line.split(\"/\");\n\n //Splits String the second time to get the description of deadline task\n String[] splitBySpace2 = splitBySlash[0].split(\" \");\n String getDesc = \"\";\n for (int i = 2; i < splitBySpace2.length; i++) {\n getDesc = getDesc + splitBySpace2[i] + \" \";\n }\n\n t = new Deadline(getDesc.trim(), splitBySlash[1]);\n if (splitBySpace[1].equals(\"1\")) {\n t.markAsDone();\n }\n dukeList.add(t);\n } else if (command.equals(\"E\")) {\n splitBySlash = line.split(\"/\");\n\n //Splits String the second time to get the description of event task\n String[] splitBySpace2 = splitBySlash[0].split(\" \");\n String getDesc = \"\";\n for (int i = 2; i < splitBySpace2.length; i++) {\n getDesc = getDesc + splitBySpace2[i] + \" \";\n }\n\n t = new Event(getDesc.trim(), splitBySlash[1]);\n if (splitBySpace[1].equals(\"1\")) {\n t.markAsDone();\n }\n dukeList.add(t);\n } else {\n String getDesc = \"\";\n for (int i = 2; i < splitBySpace.length; i++) {\n getDesc = getDesc + splitBySpace[i] + \" \";\n }\n\n t = new ToDo(getDesc.trim());\n if (splitBySpace[1].equals(\"1\")) {\n t.markAsDone();\n }\n dukeList.add(t);\n }\n }\n\n return dukeList;\n }",
"@Override\n\tpublic void run() {\n\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(file)));\n\t\t\tString line = null;\n\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tString[] record = line.trim().split(\"@\");\n\t\t\t\tif (record.length != 2)\n\t\t\t\t\tcontinue;\n\t\t\t\tparse(record[0], record[1]);\n\n\t\t\t}\n\t\t\t// close buffer reader\n\t\t\tbr.close();\n\t\t\t// Debug catch An exception\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\n\t\t}\n\t}",
"public void readFile() {\n ArrayList<Movement> onetime = new ArrayList<Movement>(); \n Movement newone = new Movement(); \n String readLine; \n\n File folder = new File(filefolder); \n File[] listOfFiles = folder.listFiles(); \n for (File file : listOfFiles) {\n if (file.isFile()&& file.getName().contains(\"200903\")) {\n try {\n onetime = new ArrayList<Movement>(); \n newone = new Movement(); \n BufferedReader br = new BufferedReader(new FileReader(filefolder+\"\\\\\"+file.getName())); \n readLine = br.readLine (); \n String[] previouline = readLine.split(\",\"); \n int previousint = Integer.parseInt(previouline[7]); \n while ( readLine != null) {\n String[] currentline = readLine.split(\",\"); \n if (Integer.parseInt(currentline[7]) == previousint)\n {\n newone.addRecord(currentline[0], currentline[1], currentline[2], currentline[4], currentline[5], currentline[6]); \n newone.ID = Integer.parseInt(currentline[7]); \n newone.filedate = file.getName();\n } else\n { \n onetime.add(newone); \n newone = new Movement(); \n newone.addRecord(currentline[0], currentline[1], currentline[2], currentline[4], currentline[5], currentline[6]);\n }\n previousint = Integer.parseInt(currentline[7]); \n readLine = br.readLine ();\n }\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n rawdata.add(onetime);\n } \n }\n println(rawdata.size());\n}",
"public static List<BasicPhoneCall> parseLog() throws FileNotFoundException {\n List<BasicPhoneCall> phoneCalls = new ArrayList<>();\n Scanner fileScanner = new Scanner(new File(logFilePath));\n while (fileScanner.hasNextLine()){\n String nextCall = fileScanner.nextLine();\n if (nextCall.equals(\"\")){\n continue;\n }\n List<String> callInfo = Arrays.asList(nextCall.split(\",\"));\n BasicPhoneCall phoneCall = new BasicPhoneCall(\n callInfo.get(0),\n callInfo.get(1),\n callInfo.get(2),\n callInfo.get(3),\n callInfo.get(4));\n phoneCalls.add(phoneCall);\n mapCall(phoneCall);\n }\n Collections.reverse(phoneCalls);\n return phoneCalls;\n }",
"public ArrayList<Task> load() throws DukeException {\n ArrayList<Task> tasks = new ArrayList<>();\n try {\n File f = new File(filePath);\n if (f.exists()) {\n Scanner sc = new Scanner(f);\n while (sc.hasNext()) {\n String next = sc.nextLine();\n Task t = parseLine(next);\n tasks.add(t);\n }\n sc.close();\n } else {\n if (!f.getParentFile().exists()) {\n f.getParentFile().mkdir();\n }\n }\n f.createNewFile();\n } catch (IOException e) {\n throw new DukeException(\"Error retrieving/reading from data file, creating new file instead.\");\n }\n return tasks;\n }",
"@Override\n public void run() {\n\n\n try {\n WatchService watchService = FileSystems.getDefault().newWatchService();\n Path path = Paths.get(INPUT_FILES_DIRECTORY);\n\n path.register( watchService, StandardWatchEventKinds.ENTRY_CREATE); //just on create or add no modify?\n\n WatchKey key;\n while ((key = watchService.take()) != null) {\n for (WatchEvent<?> event : key.pollEvents()) {\n\n String fileName = event.context().toString();\n notifyController.processDetectedFile(fileName);\n\n }\n key.reset();\n }\n\n } catch (Exception e) {\n //Logger.getGlobal().setUseParentHandlers(false);\n //Logger.getGlobal().log(Level.SEVERE, e.toString(), e);\n\n }\n }",
"private ArrayList<CallLogsData> getCallLogEntry() {\n ArrayList<CallLogsData> calllogsList = new ArrayList<CallLogsData>();\n try {\n File file = new File(mParentFolderPath + File.separator + ModulePath.FOLDER_CALLLOG\n + File.separator + ModulePath.NAME_CALLLOG);\n BufferedReader buffreader = new BufferedReader(new InputStreamReader(\n new FileInputStream(file)));\n String line = null;\n CallLogsData calllogData = null;\n while ((line = buffreader.readLine()) != null) {\n if (line.startsWith(CallLogsData.BEGIN_VCALL)) {\n calllogData = new CallLogsData();\n// MyLogger.logD(CLASS_TAG,\"startsWith(BEGIN_VCALL)\");\n }\n if (line.startsWith(CallLogsData.ID)) {\n calllogData.id = Integer.parseInt(getColonString(line));\n// MyLogger.logD(CLASS_TAG,\"startsWith(ID) = \" +calllogData.id);\n }\n\n if (line.startsWith(CallLogsData.SIMID)) {\n calllogData.simid = Utils.slot2SimId(Integer.parseInt(getColonString(line)),\n mContext);\n }\n if (line.startsWith(CallLogsData.NEW)) {\n calllogData.new_Type = Integer.parseInt(getColonString(line));\n// MyLogger.logD(CLASS_TAG,\"startsWith(NEW) = \" +calllogData.new_Type);\n }\n if (line.startsWith(CallLogsData.TYPE)) {\n calllogData.type = Integer.parseInt(getColonString(line));\n// MyLogger.logD(CLASS_TAG,\"startsWith(TYPE) = \" +calllogData.type);\n }\n if (line.startsWith(CallLogsData.DATE)) {\n String time = getColonString(line);\n// Date date = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\").parse(time);\n// calllogData.date = date.getTime();\n\n calllogData.date = Utils.unParseDate(time);\n\n MyLogger.logD(CLASS_TAG, \"startsWith(DATE) = \" + calllogData.date);\n }\n if (line.startsWith(CallLogsData.NAME)) {\n calllogData.name = getColonString(line);\n// MyLogger.logD(CLASS_TAG,\"startsWith(NAME) = \" +calllogData.name);\n }\n if (line.startsWith(CallLogsData.NUMBER)) {\n calllogData.number = getColonString(line);\n// MyLogger.logD(CLASS_TAG,\"startsWith(NUMBER) = \"+calllogData.number);\n }\n if (line.startsWith(CallLogsData.DURATION)) {\n calllogData.duration = Long.parseLong(getColonString(line));\n// MyLogger.logD(CLASS_TAG,\"startsWith(DURATION) = \"+calllogData.duration);\n }\n if (line.startsWith(CallLogsData.NMUBER_TYPE)) {\n calllogData.number_type = Integer.parseInt(getColonString(line));\n// MyLogger.logD(CLASS_TAG,\"startsWith(NMUBER_TYPE) = \"+calllogData.number_type);\n }\n if (line.startsWith(CallLogsData.END_VCALL)) {\n// MyLogger.logD(CLASS_TAG,calllogData.toString());\n calllogsList.add(calllogData);\n MyLogger.logD(CLASS_TAG, \"startsWith(END_VCALL)\");\n }\n }\n buffreader.close();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n MyLogger.logE(CLASS_TAG, \"init failed\");\n }\n return calllogsList;\n }",
"private static void AddFileMonitor(MemoryCacheMetaInfo meta) throws IOException {\n // if(meta.CacheType == MemoryCacheType.File)\n // {\n // Path myDir = Paths.get(meta.FilePath);\n // WatchService watcher = myDir.getFileSystem().newWatchService();\n // while (true)\n // {\n // try {\n // WatchKey watchKey = myDir.register(watcher,StandardWatchEventKinds.ENTRY_MODIFY) ;\n // for (WatchEvent<?> event : watchKey.pollEvents()) {\n // WatchEvent<Path> watchEvent = (WatchEvent<Path>) event;\n // WatchEvent.Kind<Path> kind = watchEvent.kind();\n //\n // System.out.println(watchEvent.context() + \", count: \" +\n // watchEvent.count() + \", event: \" + watchEvent.kind());\n // // prints (loop on the while twice)\n // // servers.cfg, count: 1, event: ENTRY_MODIFY\n // // servers.cfg, count: 1, event: ENTRY_MODIFY\n //\n // switch (kind.name()) {\n // case \"ENTRY_MODIFY\":\n // //handleModify(watchEvent.context()); // reload configuration class\n // break;\n // case \"ENTRY_DELETE\":\n // //handleDelete(watchEvent.context()); // do something else\n // break;\n // default:\n // System.out.println(\"Event not expected \" + event.kind().name());\n // }\n // }\n // }\n // catch (IOException e) {\n // e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n // }\n // }\n // }\n }",
"public ArrayList<String> readFile() {\n data = new ArrayList<>();\n String line = \"\";\n boolean EOF = false;\n\n try {\n do {\n line = input.readLine();\n if(line == null) {\n EOF = true;\n } else {\n data.add(line);\n }\n } while(!EOF);\n } catch(IOException io) {\n System.out.println(\"Error encountered.\");\n }\n return data;\n }",
"public void readFromFile() {\n //reading text from file\n\n try {\n Scanner scanner = new Scanner(openFileInput(\"myTextFile.txt\"));\n\n while(scanner.hasNextLine()){\n\n String line = scanner.nextLine();\n\n String[] lines = line.split(\"\\t\");\n\n System.out.println(lines[0] + \" \" + lines[1]);\n\n toDoBean newTask = new toDoBean(lines[0], lines[1], 0);\n // System.out.println(line);\n sendList.add(newTask);\n\n }\n\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void fileReadGameHistory(String filename)\n {\n \t//ArrayList<GameObject> gameObject = new ArrayList<>();\n\t\tFileReader file = null;\n\t\ttry {\n\t\t\tfile = new FileReader(filename);\n\t\t} catch (FileNotFoundException e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(filename);\n\t\tBufferedReader br = new BufferedReader(file);\n\t\tString s = \"\";\n\t\ttry\n\t\t{\n\t\t\twhile((s = br.readLine()) != null )\n\t\t\t{\n\t\t\t\tString[] prop1 = s.split(\"#\");\n\t\t\t\tSystem.out.println(prop1[0] + \" fgdfsgfds \" + prop1[1]);\n\t\t\t\tString indexOfList = prop1[0];\n\t\t\t\tString[] prop2 = prop1[1].split(\",\");\n\t\t\t\tString[] prop3;\n\t\t\t\tString[] prop4 = indexOfList.split(\";\");\n\t\t\t\t//gameObject.add(new GameObject(indexOfList));\n\t\t\t\tcount = count +1;\n\t\t\t\texistCount = existCount + 1;\n\t\t\t\tif (indexOfList.charAt(0) == 's')//when this line is data of a swimming game\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(prop4[0]);\n\t\t\t\t\tgames.add(new Swimming(prop4[1],\"Swimming\",prop4[0]));\n\t\t\t\t\tfor(int i = 0; i < Array.getLength(prop2); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tprop3 = prop2[i].split(\":\");\n\t\t\t\t\t\tgames.get(count - 1).addParticipant(prop3[0], Integer.parseInt(prop3[1]), 0);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setId(prop3[0]);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setRe(Integer.parseInt(prop3[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (indexOfList.charAt(0) == 'c')//when this line is data of a cycling game\n\t\t\t\t{\n\t\t\t\t\tgames.add(new Cycling(prop4[1],\"Cycling\",prop4[0]));\n\t\t\t\t\tfor(int i = 0; i < Array.getLength(prop2); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tprop3 = prop2[i].split(\":\");\n\t\t\t\t\t\tgames.get(count - 1).addParticipant(prop3[0], Integer.parseInt(prop3[1]), 0);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setId(prop3[0]);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setRe(Integer.parseInt(prop3[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (indexOfList.charAt(0) == 'r')//when this line is data of a running game\n\t\t\t\t{\n\t\t\t\t\tgames.add(new Running(prop4[1],\"Running\",prop4[0]));\n\t\t\t\t\tfor(int i = 0; i < Array.getLength(prop2); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tprop3 = prop2[i].split(\":\");\n\t\t\t\t\t\tgames.get(count - 1).addParticipant(prop3[0], Integer.parseInt(prop3[1]), 0);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setId(prop3[0]);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setRe(Integer.parseInt(prop3[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}catch (NumberFormatException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n }",
"@Override\n public void loadDataFromFile(File file) {\n Gson gson = new Gson();\n try {\n Scanner scanner = new Scanner(file);\n while (scanner.hasNextLine()){\n IndividualCustomer customer =\n gson.fromJson(scanner.nextLine(),IndividualCustomer.class);\n customerList.add(customer);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n }",
"public void readUserFile (){\n try {\n FileReader reader = new FileReader(fileName);\n BufferedReader bufferedReader = new BufferedReader(reader);\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n Scanner s = new Scanner(line); //use of a scanner to parse the line and assign its tokens to different variables\n//each line corresponds to the values of a User object\n while(s.hasNext()){\n String usrname = s.next();\n String pass = s.next();\n User u = new User(usrname,pass);\n userlist.add(u);//added to the list\n }\n \n }\n reader.close();\n \n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void readFile() {\n try (BufferedReader br = new BufferedReader(new FileReader(\"../CS2820/src/production/StartingInventory.txt\"))) {\n String line = br.readLine();\n while (line != null) {\n line = br.readLine();\n this.items.add(line);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void readListFromFile() {\n // clear existing list\n if (listArr == null || listArr.size() > 0) {\n listArr = new ArrayList<>();\n }\n\n try {\n Scanner scan = new Scanner(openFileInput(LIST_FILENAME));\n\n while (scan.hasNextLine()) {\n String line = scan.nextLine();\n listArr.add(line);\n }\n\n if (listAdapter != null) {\n listAdapter.notifyDataSetChanged();\n }\n\n } catch (IOException ioe) {\n Log.e(\"ReadListFromFile\", ioe.toString());\n }\n\n }",
"@SuppressWarnings(\"AccessingNonPublicFieldOfAnotherObject\")\n\t// Accessing final fields of a private inner class that is not exported\n\tprivate void processFile(boolean initial)\n\t{\n\t\tlog(Level.INFO, \"Processing MOTD file \" + f.getPath());\n\t\tBufferedReader in = null;\n\t\tMessage curr = null;\n\t\tfinal LinkedList<Message> stack = new LinkedList<Message>();\n\n\t\ttry\n\t\t{\n\t\t\tin = new BufferedReader(new FileReader(f));\n\n\t\t\twhile (in.ready())\n\t\t\t{\n\t\t\t\tString line = in.readLine().trim();\n\n\t\t\t\tif (line.charAt(0) == '#') continue;\n\t\t\t\tif (line.equals(\"[Message]\"))\n\t\t\t\t{\n\t\t\t\t\tif (curr != null) stack.push(curr);\n\t\t\t\t\tcurr = new Message();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (curr == null) continue;\n\t\t\t\tint div = line.indexOf('=');\n\t\t\t\tif (div == -1) continue;\n\n\t\t\t\tString field = line.substring(0,div).toLowerCase();\n\t\t\t\tString value = line.substring(div+1);\n\n\t\t\t\tif (field.equals(\"id\"))\n\t\t\t\t{\n\t\t\t\t\tcurr.id = Integer.parseInt(value);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (initial) continue; // We only care for ids in initial pass\n\t\t\t\tif (field.equals(\"active\"))\n\t\t\t\t{\n\t\t\t\t\tcurr.active = Boolean.valueOf(value);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (field.equals(\"title\"))\n\t\t\t\t{\n\t\t\t\t\tcurr.title = value;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (field.equals(\"short\"))\n\t\t\t\t{\n\t\t\t\t\tcurr.mshort = value;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (field.equals(\"long\"))\n\t\t\t\t{\n\t\t\t\t\tcurr.mlong = value;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (field.equals(\"from\"))\n\t\t\t\t{\n//\t\t\t\t\tcurr.from = new Date(value).getTime();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (field.equals(\"to\"))\n\t\t\t\t{\n//\t\t\t\t\tcurr.to = new Date(value).getTime();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (field.equals(\"posterid\"))\n\t\t\t\t{\n\t\t\t\t\tcurr.poster_uid = value;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (field.equals(\"postername\"))\n\t\t\t\t{\n\t\t\t\t\tcurr.poster_name = value;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (field.equals(\"showunix\")) continue;\n\n\t\t\t\tlog(Level.WARNING, \"Unknown Field '\" + field + \"'\");\n\t\t\t}\n\t\t}\n\t\tcatch (IOException ex)\n\t\t{\n\t\t\tlog(Level.WARNING, ex);\n\t\t}\n\t\tcatch (Throwable ex)\n\t\t{\n\t\t\tlog(Level.SEVERE, ex.getMessage());\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tin.close();\n\t\t\t}\n\t\t\tcatch (IOException ex)\n\t\t\t{\n\t\t\t}\n\t\t}\n\n\t\tif (curr != null) stack.push(curr);\n\t\tlastModified = f.lastModified();\n\n\t\tif (initial)\n\t\t{\n\t\t\tif (stack.size() > 0) lastId = stack.getLast().id;\n\t\t\treturn;\n\t\t}\n\t\tfor (Message m : stack)\n\t\t{\n\t\t\tif (m.id > lastId)\n\t\t\t{\n\t\t\t\tlog(Level.INFO, \"Sending MOTD Notice #\" + m.id);\n\t\t\t\tgetInstance().message(channel, m.toString());\n\t\t\t\tlastId = m.id;\n\t\t\t}\n\t\t}\n\t}",
"public void readPatientListFromFile()\r\n\t{\n\t\tnextPatientLocation = 0;\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Makes file reader objects and passes filename\r\n\t\t\tFileReader fr = new FileReader(patientMasterfile);\r\n\t\t\tBufferedReader br = new BufferedReader(fr);\r\n\r\n\t\t\t//reads first line and makes a blank patient \r\n\t\t\tString aReadLine = br.readLine();\r\n\t\t\tPatient tempRead = new Patient();\r\n\t\t\t//loops through all lines in the file\r\n\t\t\twhile(aReadLine != null)\r\n\t\t\t{\r\n\t\t\t\t//resets patient to null\r\n\t\t\t\ttempRead = new Patient();\r\n\t\t\t\t//Splits the read in data and assigns that data to the appropriate attribute \r\n\t\t\t\tString[] splitPatientData = aReadLine.split(\"~~\");\r\n\r\n\t\t\t\ttempRead.patientID = splitPatientData[0];\r\n\t\t\t\ttempRead.forename = splitPatientData[1];\r\n\t\t\t\ttempRead.surname = splitPatientData[2];\r\n\t\t\t\ttempRead.username = splitPatientData[3];\r\n\t\t\t\ttempRead.password = splitPatientData[4];\r\n\t\t\t\ttempRead.houseNumber = splitPatientData[5];\r\n\t\t\t\ttempRead.postcode = splitPatientData[6];\r\n\t\t\t\ttempRead.telephoneNumber = splitPatientData[7];\r\n\t\t\t\ttempRead.dob = splitPatientData[8];\r\n\t\t\t\ttempRead.mode = splitPatientData[9];\r\n\t\t\t\t//adds patient to list and gets the next line\r\n\t\t\t\taddPatientToList(tempRead);\r\n\t\t\t\taReadLine = br.readLine();\r\n\t\t\t}\t\r\n\t\t}\r\n\t\t//catches any exceptions trown by reading \r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Error reading file, \");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public ArrayList<SessionLog> readLogFile(){\n ArrayList<SessionLog> sessionLogList = new ArrayList<>();\n try {\n FileInputStream inputStream = getApplicationContext().openFileInput(logFileName);\n BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));\n\n while(true){\n String line = reader.readLine();\n if (line != null){\n String[] data = line.split(\",\");\n Log.i(LOG_TAG, \" - \"+ Arrays.toString(data));\n SessionLog item = new SessionLog(\n Long.parseLong(data[0]),\n new LatLng(Double.parseDouble(data[1]), Double.parseDouble(data[2])),\n data[3].equals(\"true\")\n );\n sessionLogList.add(item);\n }\n else{\n Log.i(LOG_TAG, \"Reached end of file\");\n break; // No more lines to read\n }\n }\n }\n catch (Exception e){\n Log.i(LOG_TAG, \"Problem reading from current session log file...\");\n e.printStackTrace();\n }\n return sessionLogList;\n }",
"public synchronized void readLog() {\n MemoryCache instance = MemoryCache.getInstance();\n try (Stream<String> stream = Files.lines(Paths.get(path)).skip(instance.getSkipLine())) {\n stream.forEach(s -> {\n Result result = readEachLine(s);\n instance.putResult(result);\n instance.setSkipLine(instance.getSkipLine() + 1);\n });\n } catch (IOException e) {\n logger.error(\"error during reading file \" + e.getMessage());\n }\n }",
"public static List<List<String>> readFile() {\r\n List<List<String>> out = new ArrayList<>();\r\n File dir = new File(\"./tmp/data\");\r\n dir.mkdirs();\r\n File f = new File(dir, \"storage.txt\");\r\n try {\r\n f.createNewFile();\r\n Scanner s = new Scanner(f);\r\n while (s.hasNext()) {\r\n String[] tokens = s.nextLine().split(\"%%%\");\r\n List<String> tokenss = new ArrayList<>(Arrays.asList(tokens));\r\n out.add(tokenss);\r\n }\r\n return out;\r\n } catch (IOException e) {\r\n throw new Error(\"Something went wrong: \" + e.getMessage());\r\n }\r\n }",
"private void readFile() {\r\n\t\tcsvEntrys = new ArrayList<>();\r\n\t\tString line = \"\";\r\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(new File(filepath)))) {\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\tif (!line.contains(\"id\")) {\r\n\t\t\t\t\tcsvEntrys.add(line);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public static ArrayList<Medicine> readMedicine()\n {\n ArrayList<Medicine> newMedicine = new ArrayList<>();\n \n \n try\n {\n FileReader fread = new FileReader(\"Medicine.txt\");\n BufferedReader bread = new BufferedReader(fread);\n \n String Med = \"1\";\n\n while ((Med = bread.readLine()) != null) {\n \n Medicine user = new Medicine(Med);\n newMedicine.add(user); \n }\n bread.close();\n fread.close(); \n } \n catch(Exception error)\n {\n System.out.println(\"Error\" + error);\n }\n \n return (newMedicine);\n }",
"private static List<Event> parseCustomerEventInfo(final String filename){\n List<Event> customerEvents = new ArrayList<>();\n if (filename != null && filename.trim().length() > 0) {\n File inputFile = new File(filename);\n\n try (BufferedReader br = new BufferedReader(new FileReader(inputFile))) {\n String line;\n while ((line = br.readLine()) != null) {\n if(line .startsWith(\"C\") || line.startsWith(\"c\"))\n {\n // 1. SPLIT THE LINE DATA BASED ON WHITE SPACE\n String [] custData = line.split(\" \");\n\n // 2. CONVERT THE TIME STRING TO LOCAL TIME\n String [] timeInfo = custData[1].split(\":\");\n LocalTime arrivalTime = LocalTime.of(Integer.parseInt(timeInfo[0]), Integer.parseInt(timeInfo[1]));\n\n // 3. CREATE A CUSTOMER EVENT BASED ON THE LINE PROVIDED\n customerEvents.add(new Event(custData[0], arrivalTime, Integer.parseInt(custData[2])));\n }\n }\n }\n catch(IOException | NumberFormatException e) {\n exitOnError(ERROR_MSG);\n }\n } else {\n exitOnError(PROVIDE_FILE);\n }\n\n return customerEvents;\n }",
"public ArrayList<Client> toReadJobsFaileds(File fichero) throws Exception{\n \n ControlDateJobs controlDateJobs = ControlDateJobs.getInstance();\n \n ArrayList<Client> clients = new ArrayList();\n int i;\n boolean isNewClient;\n String clientName = null;\n String saveSetName = null;\n String groupStartTime = null;\n String saveType = null;\n String level = null;\n \n try{\n Scanner sc=new Scanner(fichero);\n String line=sc.nextLine();\n while(line.indexOf(\"Client Name,\")==-1){\n line=sc.nextLine();\n }\n while(sc.hasNextLine()){\n line=sc.nextLine();\n \n i=line.indexOf(\",\");\n clientName=line.substring(0, i);\n line=line.substring(i+1); \n\n i=line.indexOf(\",\");\n saveSetName=line.substring(0, i);\n line=line.substring(i+2);\n\n i=line.indexOf(\",\");\n groupStartTime =line.substring(0, i);\n line=line.substring(i+1);\n\n i=line.indexOf(\",\");\n saveType=line.substring(0, i);\n line=line.substring(i+1);\n\n i=line.indexOf(\",\");\n level =line.substring(0, i);\n\n isNewClient = true;\n \n i=0;\n \n while(i < clients.size() && isNewClient){\n if(clients.get(i).getName().equals(clientName)){\n ReportErrors reportError = new ReportErrors(saveSetName, groupStartTime, saveType, level, \"failed\");\n clients.get(i).addReportError(reportError);\n controlDateJobs.eventUpdateDateLastDayJobsExecuted(groupStartTime);\n isNewClient = false;\n }else{\n ++i;\n }\n }\n if(isNewClient == true){\n Client client = new Client(clientName);\n clients.add(client);\n ReportErrors reportError = new ReportErrors(saveSetName, groupStartTime, saveType, level, \"failed\");\n clients.get(i).addReportError(reportError);\n controlDateJobs.eventUpdateDateLastDayJobsExecuted(groupStartTime);\n }\n } \n }catch(FileNotFoundException e){\n throw new Exception(\"Error de lectura\");\n } \n return clients;\n }",
"private List<Task> getTasksFromFile() throws FileNotFoundException{\n List<Task> loadedTasks = new ArrayList<>();\n Ui a=new Ui();\n try {\n List<String> lines = getLine() ;\n for (String line : lines) {\n if (line.trim().isEmpty()) { //ignore empty lines\n continue;\n }\n loadedTasks.add(createTask(line)); //convert the line to a task and add to the list\n }\n System.out.println(\"File successfully loaded\");\n } catch (DukeException e1) {\n System.out.println(\"☹ OOPS!!! Problem encountered while loading data: \" +e1.getMessage());\n }\n return loadedTasks;\n }",
"public List<Double> processFile() throws AggregateFileInitializationException {\n \t\t \n \t\tint maxTime = 0;\n \t\tHashMap<String, List<Double>> data = new HashMap<String,List<Double>>();\n \t\ttry {\n \t String record; \n \t String header;\n \t int recCount = 0;\n \t List<String> headerElements = new ArrayList<String>();\n \t FileInputStream fis = new FileInputStream(scenarioData); \n \t BufferedReader d = new BufferedReader(new InputStreamReader(fis));\n \t \n \t //\n \t // Read the file header\n \t //\n \t if ( (header=d.readLine()) != null ) { \n \t \t\n \t\t StringTokenizer st = new StringTokenizer(header );\n \t\t \n \t\t while (st.hasMoreTokens()) {\n \t\t \t String val = st.nextToken(\",\");\n \t\t \t headerElements.add(val.trim());\n \t\t }\n \t } // read the header\n \t /////////////////////\n \t \n \t // set up the empty lists\n \t int numColumns = headerElements.size();\n \t for (int i = 0; i < numColumns; i ++) {\n \t \tString key = headerElements.get(i);\n \t \t if(validate(key)) {\n \t \t\tdata.put(key, new ArrayList<Double>());\n \t\t }\n \t \t\n \t }\n \t \n \t // Here we check the type of the data file\n \t // by checking the header elements\n \t \n \t \n \t \n \t //////////////////////\n // Read the data\n //\n while ( (record=d.readLine()) != null ) { \n recCount++; \n \n StringTokenizer st = new StringTokenizer(record );\n int tcount = 0;\n \t\t\t\twhile (st.hasMoreTokens()) {\n \t\t\t\t\tString val = st.nextToken(\",\");\n \t\t\t\t\tString key = headerElements.get(tcount);\n \t\t\t\t\tif(validate(key)) {\n \t\t\t\t\t\tidSet.add(key);\n \t\t\t\t\t\tList<Double> dataList = data.get(key);\n \t\t\t\t\t\ttry {\n \t\t\t\t\t\t\tDouble dVal = new Double(val.trim());\n \t\t\t\t\t\t\tdataList.add(dVal);\n \t\t\t\t\t\t\tif (dataList.size() >= maxTime) maxTime = dataList.size();\n \t\t\t\t\t\t\tdata.put(key,dataList);\n \t\t\t\t\t\t} catch(NumberFormatException nfe) {\n \t\t\t\t\t\t\tdata.remove(key);\n \t\t\t\t\t\t\tidSet.remove(key);\n \t\t\t\t\t\t\tActivator.logInformation(\"Not a valid number (\"+val+\") ... Removing key \"+key, null);\n \t\t\t\t\t\t}\n \t\t\t\t\t}\t\t\t\n \t\t\t\t\ttcount ++;\n \t\t\t\t}\n \t\t\t} // while file has data\n } catch (IOException e) { \n // catch io errors from FileInputStream or readLine()\n \t Activator.logError(\" IOException error!\", e);\n \t throw new AggregateFileInitializationException(e);\n }\n \n List<Double> aggregate = new ArrayList<Double>();\n for (int i = 0; i < maxTime; i ++) {\n \t aggregate.add(i, new Double(0.0));\n }\n // loop over all location ids\n Iterator<String> iter = idSet.iterator();\n while((iter!=null)&&(iter.hasNext())) {\n \t String key = iter.next();\n \t List<Double> dataList = data.get(key);\n \t for (int i = 0; i < maxTime; i ++) {\n \t\t double val = aggregate.get(i).doubleValue();\n \t\t val += dataList.get(i).doubleValue();\n \t aggregate.set(i,new Double(val));\n }\n }\n \n return aggregate;\n \t }",
"@PostConstruct\n private void loadFiles() {\n \n\n File dir = new File(Constants.DIR_PATH);\n File[] files = dir.listFiles(); //stores list of files in given paths\n String line=\"\";\n\n for(File file : files){\n try {\n br = new BufferedReader(new FileReader(file));\n br.readLine();\n while((line=br.readLine())!=null){\n\n String []token=line.split(Constants.DELIMETER);\n String fileName=file.getName().toUpperCase();\n\n FlightData newflight = new FlightData(fileName.substring(0,fileName.lastIndexOf(\".\")),token[0],token[1],token[2],token[3],token[4],token[5],Double.parseDouble(token[6]),token[7],token[8]);\n flightDataDao.insertFlightData(newflight);\n }\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n }",
"private void process(String file, LinkedList<String> ll) {\r\n \ttry {\r\n \t\tFile currFile = openFile(file);\r\n \t\tStringBuilder sb;\r\n\r\n \t\tif (currFile == null) {\r\n \t\t\treturn;\r\n \t\t}\r\n\r\n \t\tBufferedReader br = new BufferedReader(new FileReader(currFile));\r\n \t\tString line = null;\r\n \t\twhile ((line = br.readLine()) != null) {\r\n \t\t\tint length = line.length();\r\n \t\t\tif (length == 0) {\r\n \t\t\t\tcontinue;\r\n \t\t\t}\r\n \t\t\tint index = 0;\r\n \t\t\tLinkedList<String> newLL;\r\n \t\t\twhile (index < length && line.charAt(index) == ' ') {\r\n \t\t\t\t++index;\r\n \t\t\t}\r\n \t\t\tif (index > length-8 || line.substring(index, index+8).compareTo(\"#include\") != 0) {\r\n \t\t\t\tcontinue;\r\n \t\t\t}\r\n \t\t\tindex += 8;\r\n \t\t\twhile (line.charAt(index) == ' ') {\r\n \t\t\t\t++index;\r\n \t\t\t}\r\n \t\t\tif (line.charAt(index) != '\"') {\r\n \t\t\t\tcontinue;\r\n \t\t\t}\r\n \t\t\tindex++;\r\n \t\t\tint len = line.length();\r\n \t\t\tsb = new StringBuilder();\r\n \t\t\twhile (index < len) {\r\n \t\t\t\tif (line.charAt(index) == '\"') {\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t}\r\n \t\t\t\tsb.append(line.charAt(index));\r\n \t\t\t\t++index;\r\n \t\t\t}\r\n \t\t\tString currName = sb.toString();\r\n \t\t\tll.add(currName);\r\n \t\t\tif (hashM.containsKey(currName)) {\r\n \t\t\t\tcontinue;\r\n \t\t\t}\r\n \t\t\tnewLL = new LinkedList<String>();\r\n \t\t\thashM.put(currName, newLL);\r\n \t\t\tworkQueue.add(currName);\r\n \t\t}\r\n \t}\r\n \tcatch (Exception x) {\r\n \t\tx.printStackTrace();\r\n \t}\r\n }",
"ArrayList<WordListItem> addDataFromFile(){\n BufferedReader br;\n InputStream inputStream = context.getResources().openRawResource(R.raw.animal_list);\n br = new BufferedReader(\n new InputStreamReader(inputStream, Charset.forName(\"UTF-8\"))\n );\n String currentLine;\n ArrayList<WordListItem> wordListItems = new ArrayList<WordListItem>();\n try {\n while ((currentLine = br.readLine()) != null) {\n String[] tokens = currentLine.split(\";\");\n\n String word = tokens[0];\n String pronunciation = tokens[1];\n String description = tokens[2];\n\n WordListItem wordItem = new WordListItem(word, pronunciation, description);\n wordItem.setImgResNbr(setImgResFromWord(wordItem.getWord().toLowerCase()));\n wordListItems.add(wordItem);\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (br != null) br.close();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n\n return wordListItems;\n }",
"private static Wine[] read() {\r\n\t\t// We can add files we would like to parse in the following array. We use an array list\r\n\t\t// because it allows us to add dynamically.\r\n\t\tString[] file_adr = { \"data/winemag-data_first150k.txt\", \"data/winemag-data-130k-v2.csv\" };\r\n\t\tArrayList<Wine> arr_list = new ArrayList<Wine>();\r\n\t\t\r\n\t\tint k = 0;\r\n\t\twhile (k < file_adr.length) {\r\n\t\t\tboolean flag = false;\r\n\t\t\tif (file_adr[k].endsWith(\".csv\")) {\r\n\t\t\t\tflag = true;\r\n\t\t\t}\r\n\t\t\tFile f = new File(file_adr[k]);\r\n\t\t\tScanner sc = null;\r\n\t\t\ttry {\r\n\t\t\t\tsc = new Scanner(f, \"UTF-8\");\r\n\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tsc.nextLine();\r\n\t\t\tInteger id_count = 0;\r\n\t\t\tif(!flag) {\r\n\t\t\t\twhile (sc.hasNextLine()) {\r\n\t\t\t\t\tString scanned = sc.nextLine();\r\n\t\t\t\t\t// if there is a blank line, skip it before a fail.\r\n\t\t\t\t\tif (scanned.isEmpty()) {\r\n\t\t\t\t\t\tscanned = sc.nextLine();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// use this instead of StringTokenizer because it won't skip empty fields.\r\n\t\t\t\t\tString[] st = scanned.split(\",\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* was put here to make sure all fields show up.\r\n\t\t\t\t\tString toString = \"\";\r\n\t\t\t\t\tfor (int i = 0; i < st.length; i++) {\r\n\t\t\t\t\t\ttoString += st[i] + \", \";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\r\n\t\t\t\t\tString country = st[1];\r\n\t\t\t\t\tString description = \"\";\r\n\t\t\t\t\t// This piece grabs our entire description! this paragraph has our delimiters so it gets split.\r\n\t\t\t\t\tint count = 0;\r\n\t\t\t\t\tfor (int i = 2; i < (st.length - 10) + 2; i++) {\r\n\t\t\t\t\t\tif (st[i].endsWith(\"\\\"\")) {\r\n\t\t\t\t\t\t\tdescription += st[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tdescription += st[i] + \", \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tString designation = st[count+2];\r\n\t\t\t\t\t\r\n\t\t\t\t\t// next two fields will fail if the field is empty, so make sure we assign it something.\r\n\t\t\t\t\tInteger points = !(st[count+3].isEmpty()) ? Integer.parseInt(st[count+3]) : -1;\r\n\t\t\t\t\t\r\n\t\t\t\t\tDouble price = !(st[count+4].isEmpty()) ? Double.parseDouble(st[count+4]) : -1.0;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString province = st[count+5];\r\n\t\t\t\t\tString[] region = {\r\n\t\t\t\t\t\t\tst[count+6],\r\n\t\t\t\t\t\t\tst[count+7]\r\n\t\t\t\t\t};\r\n\t\t\t\t\tString variety = st[count+8];\r\n\t\t\t\t\tString winery = st[count+9];\r\n\t\t\t\t\t//System.out.println(id_count);\r\n\t\t\t\t\t// unique ID system because some wine bottles have empty names.\r\n\t\t\t\t\tInteger unique_id = id_count++;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] items = {\r\n\t\t\t\t\t\t\tcountry,\r\n\t\t\t\t\t\t\tdescription,\r\n\t\t\t\t\t\t\tdesignation,\r\n\t\t\t\t\t\t\tprovince,\r\n\t\t\t\t\t\t\twinery,\r\n\t\t\t\t\t\t\tvariety\r\n\t\t\t\t\t};\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] reviewer = {\r\n\t\t\t\t\t\t\t\"\",\r\n\t\t\t\t\t\t\t\"\"\r\n\t\t\t\t\t};\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] taste = {};\r\n\t\t\t\t\t// Object constructor.\r\n\t\t\t\t\tWine curr_obj = new Wine(items, taste, region, points, unique_id, price, reviewer);\r\n\t\t\t\t\t\r\n\t\t\t\t\tarr_list.add(curr_obj);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tk++;\r\n\t\t\t\tsc.close();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\twhile (sc.hasNextLine()) {\r\n\t\t\t\t\tString scanned = sc.nextLine();\r\n\t\t\t\t\t// if there is a blank line, skip it before a fail.\r\n\t\t\t\t\tif (scanned.isEmpty()) {\r\n\t\t\t\t\t\tscanned = sc.nextLine();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// use this instead of StringTokenizer because it won't skip empty fields.\r\n\t\t\t\t\tString[] st = scanned.split(\",\");\r\n\t\t\t\t\t//System.out.println(arr_list.size());\r\n\t\t\t\t\tid_count = arr_list.size();\r\n\t\t\t\t\t/* was put here to make sure all fields show up.\r\n\t\t\t\t\tString toString = \"\";\r\n\t\t\t\t\tfor (int i = 0; i < st.length; i++) {\r\n\t\t\t\t\t\ttoString += st[i] + \", \";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\t\t\t\t//System.out.println(st[0]);\r\n\t\t\t\t\t/*if(Integer.parseInt(st[0]) == 30350) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\t\t\t\tString country = st[1];\r\n\t\t\t\t\tString description = \"\";\r\n\t\t\t\t\t// This piece grabs our entire description! this paragraph has our delimiters so it gets split.\r\n\t\t\t\t\tint count = 0;\r\n\t\t\t\t\tfor (int i = 2; i < (st.length - 12) + 2; i++) {\r\n\t\t\t\t\t\tif (st[i].endsWith(\"\\\"\")) {\r\n\t\t\t\t\t\t\tdescription += st[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tdescription += st[i] + \", \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tString designation = st[count+2];\r\n\t\t\t\t\t\r\n\t\t\t\t\t// next two fields will fail if the field is empty, so make sure we assign it something.\r\n\t\t\t\t\tInteger points = !(st[count+3].isEmpty()) ? Integer.parseInt(st[count+3]) : -1;\r\n\t\t\t\t\t\r\n\t\t\t\t\tDouble price = !(st[count+4].isEmpty()) ? Double.parseDouble(st[count+4]) : -1.0;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString province = st[count+5];\r\n\t\t\t\t\tString[] region = {\r\n\t\t\t\t\t\t\tst[count+6],\r\n\t\t\t\t\t\t\tst[count+7]\r\n\t\t\t\t\t};\r\n\t\t\t\t\tString taster_name = st[count+8];\r\n\t\t\t\t\tString taster_handle = st[count+9];\r\n\t\t\t\t\tString variety = st[count+10];\r\n\t\t\t\t\tString winery = st[count+11];\r\n\t\t\t\t\t//System.out.println(id_count);\r\n\t\t\t\t\t// unique ID system because some wine bottles have empty names.\r\n\t\t\t\t\tInteger unique_id = id_count++;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] items = {\r\n\t\t\t\t\t\t\tcountry,\r\n\t\t\t\t\t\t\tdescription,\r\n\t\t\t\t\t\t\tdesignation,\r\n\t\t\t\t\t\t\tprovince,\r\n\t\t\t\t\t\t\twinery,\r\n\t\t\t\t\t\t\tvariety\r\n\t\t\t\t\t};\r\n\t\t\t\t\tString[] reviewer = {\r\n\t\t\t\t\t\t\ttaster_name,\r\n\t\t\t\t\t\t\ttaster_handle\r\n\t\t\t\t\t};\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] taste = {};\r\n\t\t\t\t\t// Object constructor.\r\n\t\t\t\t\tWine curr_obj = new Wine(items, taste, region, points, unique_id, price, reviewer);\r\n\t\t\t\t\t\r\n\t\t\t\t\tarr_list.add(curr_obj);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tk++;\r\n\t\t\t\tsc.close();\r\n\t\t\t}\r\n\t\t}\r\n\t\t// We no longer need an array list. we have our size required. Put into an array.\r\n\t\tWine[] array_wines = new Wine[arr_list.size()];\r\n\t\tarray_wines = arr_list.toArray(array_wines);\r\n\t\t\r\n\t\treturn array_wines;\r\n\t\r\n\t}",
"@Override\n public ArrayList<RunnerThread> getRunners() {\n \tArrayList<RunnerThread> runners = new ArrayList<RunnerThread>();\n \ttry {\n \t\tString line = data.readLine();\n \t\twhile(line != null) {\n \t\t\tRunnerThread runner = getData(line);\n \t\t\trunners.add(runner); \n \t\t\tline = data.readLine();\n \t\t}\n \t}\n \tcatch (IOException e) {\n \t\tSystem.out.println(\"The following error occured while reading the file.\");\n \t\te.printStackTrace();\n \t\tSystem.exit(3);\n \t}\n\t\treturn runners;\n \t}",
"public void run(){\n\t\tFileFeeder fileFeeder = new FileFeeder(mySQLConnection,logWindow, fileIssueList, true);\n\t\tThread feederThread = new Thread(fileFeeder);\n\t\tfeederThread.start();\n\t\twhile (moreFilesComing || !fileList.isEmpty()){ //if more data still to process or more data coming\n\t\t\tDataFile dataFile;\n\t\t\tif ((dataFile = fileList.poll()) != null){ //something to actually write\n\t\t\t\tsynchronized(fileList){\n\t\t\t\t\tfileList.notify();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlogWindow.println(\"Processing data from file: \"+dataFile.fileName+\"...\");\n\t\t\t\t\n\t\t\t\tBufferedReader inputStream = null;\n\t\t\t\ttry {\n\t\t\t\t\tinputStream = new BufferedReader(new FileReader(dataFile.file));\n\t\n\t\t\t\t\tString fileDateFormat = getFileInfo(dataFile,inputStream);\n\t\t\t\t\t\n\t\t\t\t\tif (dataFile.frequency!=0 && !dataFile.meterSerial.equals(\"\")){ //if got valid info\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\tString fileExistsSQL = \"SELECT * FROM files WHERE site_id = \"+dataFile.siteID+\" AND source_id = \"+dataFile.sourceID+\" AND file_name = '\"+dataFile.fileName+\"' AND meter_sn = '\"+dataFile.meterSerial+\"' AND frequency = \"+dataFile.frequency;\n\t\t\t\t\t\t\tResultSet fileExistsQuery = dbConn.createStatement().executeQuery(fileExistsSQL);\n\t\t\t\t\t\t\tif (fileExistsQuery.next()==false){ //if no files with same site,source,filename,meterserial and frequency exist\n\n\t\t\t\t\t\t\t\tgetValidData(dataFile,fileDateFormat,inputStream);\n\n\t\t\t\t\t\t\t\tif (dataFile.dataList.size()>0){\n\t\t\t\t\t\t\t\t\tlogWindow.println(\"Processing of data complete.\");\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t/*try{\n\t\t\t\t\t\t\t\t\t\tString fetchRangeLimitsSQL = \"SELECT min,max FROM ranges WHERE source_id = \"+dataFile.sourceID+\" AND site_id = \"+dataFile.siteID;\n\t\t\t\t\t\t\t\t\t\tResultSet fetchRangeLimitsRS = dbConn.createStatement().executeQuery(fetchRangeLimitsSQL);\n\n\t\t\t\t\t\t\t\t\t\tif (fetchRangeLimitsRS.next()){\n\t\t\t\t\t\t\t\t\t\t\tdataFile.rangeMin = fetchRangeLimitsRS.getDouble(\"min\");\n\t\t\t\t\t\t\t\t\t\t\tdataFile.rangeMax = fetchRangeLimitsRS.getDouble(\"max\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\tlogWindow.println(\"No range limits found for \"+dataFile.sourceID+\" or site \"+dataFile.siteID+\". Adding defaults now...\");\t\n\n\t\t\t\t\t\t\t\t\t\t\tdataFile.rangeMin = Source.getRangeMin(dataFile.sourceType,dataFile.measurementType);\n\t\t\t\t\t\t\t\t\t\t\tdataFile.rangeMax = Source.getRangeMax(dataFile.sourceType,dataFile.measurementType,dataFile.frequency);\n\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\tString setRangeLimitsSQL = \"INSERT INTO ranges (site_id,source_id,min,max) VALUES(\"+dataFile.siteID+\",\"+dataFile.sourceID+\",\"+dataFile.rangeMin+\",\"+dataFile.rangeMax+\")\";\n\t\t\t\t\t\t\t\t\t\t\t\tdbConn.createStatement().executeUpdate(setRangeLimitsSQL);\n\t\t\t\t\t\t\t\t\t\t\t}catch(SQLException sE){ //NON FATAL\n\t\t\t\t\t\t\t\t\t\t\t\tsE.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t\tlogWindow.println(\"Warning: could not write range limits to database for file \"+dataFile.fileName+\".\");\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\n\t\t\t\t\t\t\t\t\t\tSimpleDateFormat dateFormatter = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t\t\t\t\t\t\t\tdateFormatter.setTimeZone(TimeZone.getTimeZone(\"GMT+10\"));\n\t\t\t\t\t\t\t\t\t\tdataFile.startDate = dateFormatter.format(dataFile.dataList.get(0).dateTime);\n\t\t\t\t\t\t\t\t\t\tdataFile.endDate = dateFormatter.format(dataFile.dataList.get(dataFile.dataList.size()-1).dateTime);*/\n\n\t\t\t\t\t\t\t\t\t\tfileFeeder.addFile(dataFile); //Send file to feeder\n\n\t\t\t\t\t\t\t\t\t/*} catch (SQLException sE){\n\t\t\t\t\t\t\t\t\t\tsE.printStackTrace();\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\telse{\n\t\t\t\t\t\t\t\t\tlogWindow.println(\"Ignored file \"+dataFile.fileName+\". No Data found in file.\");\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\telse{\n\t\t\t\t\t\t\t\tlogWindow.println(\"Ignored file \"+dataFile.fileName+\". This file already exists for source \"+dataFile.sourceID+\" at site \"+dataFile.siteID+\".\");\t\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} catch(SQLException sE){\n\t\t\t\t\t\t\t//TODO need error here\n\t\t\t\t\t\t\tsE.printStackTrace();\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\tlogWindow.println(dataFile.frequency+\" \"+dataFile.meterSerial);\n\t\t\t\t\t\tlogWindow.println(\"Ignored file \"+dataFile.fileName+\". Could not determine essential file information.\");\t\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t} catch (IOException err){\n\t\t\t\t\tdataFile.dataList.clear();\n\t\t\t\t\tlogWindow.println(\"Unable to read from file: \"+dataFile.fileName+\"\\r\\nNo data will be written from this file.\");\n\t\t\t\t\tSystem.err.println(\"IOException: \"+err.getMessage());\n\t\t\t\t} finally {\n\t\t\t\t\tif (inputStream != null){\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tinputStream.close();\n\t\t\t\t\t\t} catch (IOException err) {\n\t\t\t\t\t\t\tSystem.err.println(\"IOException: \"+err.getMessage());\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\ttry{\n\t\t\t\tsynchronized(fileList){ //waiter\n\t\t\t\t\twhile (moreFilesComing && fileList.isEmpty()){\n\t\t\t\t\t\tfileList.notify(); //notify adder just in case things got stuck\n\t\t\t\t\t\tfileList.wait(); //wait for a file to be added to file List.\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tsynchronized(fileFeeder.fileList){\n\t\t\tfileFeeder.moreFilesComing = false;\n\t\t\tfileFeeder.fileList.notify();\n\t\t}\n\t\ttry {\n\t\t\tfeederThread.join();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//Date endTime = new Date();\n\t\t//logWindow.println(\"Finished sending file(s) to writer for source: \"+sourceID);\n\t\t//logWindow.println(\"Time taken: \"+getTimeString(endTime.getTime()-startTime.getTime()));\n\t}",
"public static ArrayList<Medicine> readMedicineRequest()\n {\n ArrayList<Medicine> newMedicine = new ArrayList<>();\n \n \n try\n {\n FileReader fread = new FileReader(\"MedicineRequest.txt\");\n BufferedReader bread = new BufferedReader(fread);\n \n String Med = \"1\";\n\n while ((Med = bread.readLine()) != null) {\n \n Medicine user = new Medicine(Med);\n newMedicine.add(user); \n }\n bread.close();\n fread.close(); \n } \n catch(Exception error)\n {\n System.out.println(\"Error\" + error);\n }\n \n return (newMedicine);\n }",
"private static ArrayList<Node> getNodes(File path)\n {\n //log the event happining\n Start.log(\"Getting Nodes\");\n ArrayList<Node> tempNodes = new ArrayList<Node>();\n ArrayList<String> file = getFile(path);\n for (int i =0; i < file.size();i++)\n {\n //use scanner to pharse the string into the relivant bits for getting the node data\n Scanner parse = new Scanner(file.get(i));\n tempNodes.add(new Node(parse.nextInt(),CPType.valueOf(parse.next())));\n }\n return tempNodes;\n }",
"public void readFile() {\r\n\t\tBufferedReader br = null;\r\n\r\n\t\ttry {\r\n\r\n\t\t\tString currentLine;\r\n\r\n\t\t\tbr = new BufferedReader(new FileReader(fileName));\r\n\r\n\t\t\twhile ((currentLine = br.readLine()) != null) {\r\n\r\n\t\t\t\tif (!currentLine.equals(\"\")) {\r\n\t\t\t\t\tString[] paragraphs = currentLine.split(\"\\\\n\\\\n\");\r\n\r\n\t\t\t\t\tfor (String paragraphEntry : paragraphs) {\r\n\t\t\t\t\t\t//process(paragraphEntry);\r\n\t\t\t\t\t\t//System.out.println(\"Para:\"+paragraphEntry);\r\n\t\t\t\t\t\tParagraph paragraph = new Paragraph();\r\n\t\t\t\t\t\tparagraph.process(paragraphEntry);\r\n\t\t\t\t\t\tthis.paragraphs.add(paragraph);\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} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (br != null)br.close();\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"public static ArrayList create_history(String file) throws IOException {\n todos.clear();\n file_reader = new FileReader(file);\n buffered_reader = new BufferedReader(file_reader);\n String line;\n String todo_string = \"\";\n\n while ((line = buffered_reader.readLine()) != null){\n if (!line.equals(\";\")){\n todo_string += line;\n }\n else{\n parse_todo(todo_string);\n todo_string = \"\";\n }\n }\n return todos;\n }",
"private static List<Restaurant> analyzedContent(List<String> fileContent) {\n recommendationsList = new ArrayList<>();\n\n for (String str : fileContent) {\n ArrayList<String> strComponents = split(str);\n recommendationsList.add(analyzedRestaurant(strComponents));\n }\n return recommendationsList;\n }",
"@Override\n public ArrayList parseFile(String pathToFile) {\n\n Scanner scanner = null;\n try {\n scanner = new Scanner(new File(pathToFile));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n ArrayList<String> data = new ArrayList<>();\n while (scanner.hasNext()) {\n data.add(scanner.next());\n }\n scanner.close();\n\n return data;\n }",
"TraceList read(File file) throws IOException;",
"private void takeInFile() {\n System.out.println(\"Taking in file...\");\n //Reads the file\n String fileName = \"messages.txt\";\n String line = null;\n try {\n FileReader fileReader = new FileReader(fileName);\n \n BufferedReader bufferedReader = new BufferedReader(fileReader);\n\n //Adds each line to the ArrayList\n int i = 0;\n while ((line = bufferedReader.readLine()) != null) {\n lines.add(line);\n //System.out.println(line);\n i++;\n }\n \n bufferedReader.close();\n } catch (FileNotFoundException ex) {\n System.out.println(\"Unable to open file '\" + fileName + \"'\");\n } catch (IOException ex) {\n System.out.println(\"Error reading file '\" + fileName + \"'\");\n }\n System.out.println(\"Done taking in file...\");\n }",
"public ArrayList<Task> load() throws FileNotFoundException {\n Scanner sc = new Scanner(file);\n String currLine;\n ArrayList<Task> tasks = new ArrayList<>();\n while (sc.hasNextLine()) {\n currLine = sc.nextLine();\n String taskDescription = currLine.substring(5);\n boolean isDone = currLine.charAt(2) == '1';\n String[] arr = taskDescription.split(Pattern.quote(\"|\"));\n String description = arr[0];\n if (currLine.charAt(0) == 'T') {\n Todo todo = new Todo(description);\n todo.setState(isDone);\n tasks.add(todo);\n } else if (currLine.charAt(0) == 'E') {\n Event event = new Event(description, (arr.length == 1 ? \" \" : arr[1]));\n event.setState(isDone);\n tasks.add(event);\n } else {\n Deadline deadline = new Deadline(description, (arr.length == 1 ? \" \" : arr[1]));\n deadline.setState(isDone);\n tasks.add(deadline);\n }\n }\n return tasks;\n }",
"protected abstract List<O> parseFileForObservations(Scanner scn);",
"@Override\n public void buildListDevices(final String fileName) {\n XMLStreamReader reader;\n String name;\n try (FileInputStream inputStream\n = new FileInputStream(new File(fileName))) {\n reader = inputFactory.createXMLStreamReader(inputStream);\n\n while (reader.hasNext()) {\n int type = reader.next();\n if (type == XMLStreamConstants.START_ELEMENT) {\n name = reader.getLocalName();\n parseSpecificDevice(name, reader);\n }\n }\n\n LOGGER.info(\"Parsing by DOM parser was successfully done!\");\n } catch (XMLStreamException ex) {\n LOGGER.error(\"StAX parsing error!\");\n } catch (FileNotFoundException ex) {\n LOGGER.error(\"File \" + fileName + \" not found!\");\n } catch (ParsingException e) {\n LOGGER.error(e.getMessage());\n } catch (IOException e) {\n LOGGER.error(\"Exception with file.\");\n }\n }",
"@Override\n public Map<String, List<Sensor>> getDeviceSchemaList() {\n Path path = Paths.get(config.getFILE_PATH(), Constants.SCHEMA_PATH);\n if (!Files.exists(path) || !Files.isRegularFile(path)) {\n LOGGER.error(\"Failed to find schema file in \" + path.getFileName().toString());\n System.exit(0);\n }\n Map<String, List<Sensor>> result = new HashMap<>();\n try {\n List<String> schemaLines = Files.readAllLines(path);\n for (String schemaLine : schemaLines) {\n if (schemaLine.trim().length() != 0) {\n String line[] = schemaLine.split(\" \");\n String deviceName = line[0];\n if (!result.containsKey(deviceName)) {\n result.put(deviceName, new ArrayList<>());\n }\n Sensor sensor = new Sensor(line[1], SensorType.getType(Integer.parseInt(line[2])));\n result.get(deviceName).add(sensor);\n }\n }\n } catch (IOException exception) {\n LOGGER.error(\"Failed to init register\");\n }\n return result;\n }",
"public static void readObject() {\r\n try {\r\n if (new File(FILE).exists()) {\r\n LoggingService.getInstance().serverLog(\"Reading cron table.\");\r\n ChunkedCharBuffer buf = new ChunkedCharBuffer();\r\n buf.append(new InputStreamReader(new FileInputStream(FILE)));\r\n String contents = buf.toString();\r\n String[] lines = contents.split(\"[\\n\\r]+\");\r\n for (String line : lines) {\r\n String[] splitLine = line.split(\"\\\\|\");\r\n int index = 0;\r\n scheduleJob(\r\n new CronJob(\r\n splitLine[index++], //identifier\r\n Long.valueOf(splitLine[index++]), //interval\r\n new Date(Long.valueOf(splitLine[index++]).longValue()), //start time\r\n splitLine[index++], //command string\r\n splitLine[index++], //user\r\n splitLine[index++] //user service\r\n )\r\n );\r\n }\r\n } else {\r\n LoggingService.getInstance().serverLog(\"No cron table\");\r\n }\r\n } catch (Exception e) {\r\n LoggingService.getInstance().serverLog(\"Error reading cron table: \" + e);\r\n }\r\n }",
"private void loadAlarms() {\n\n try {\n if (!Files.exists(Paths.get(alarmsFile))) {\n\n System.out.println(\"Alarms file not found attemping to create default\");\n Files.createFile(Paths.get(alarmsFile));\n\n } else {\n List<String> fileLines = Files.readAllLines(Paths.get(alarmsFile));\n\n for (int i = 0; i < fileLines.size() - 1; i += 4) {\n int hour = Integer.parseInt(fileLines.get(i));\n int minute = Integer.parseInt(fileLines.get(i + 1));\n int period = Integer.parseInt(fileLines.get(i + 2));\n String name = fileLines.get(i + 3);\n\n System.out.println(\"Adding new alarm from file. \" + name);\n addEntry(hour, minute, period, name);\n }\n }\n } catch (UnsupportedEncodingException ex) {\n Logger.getLogger(AlarmsEditPanel.class.getName()).log(Level.SEVERE, null, ex);\n } catch (FileNotFoundException ex) {\n Logger.getLogger(AlarmsEditPanel.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(AlarmsEditPanel.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public void setClientList(String filePath) throws FileNotFoundException {\n Scanner scan = new Scanner(new File(filePath));\n while (scan.hasNextLine()) { // while there's another line in the file\n String line = scan.nextLine();\n if (line == \"\") { // if the next line is empty, stop the loop\n break;\n }\n int i = 0; // to keep track of the iterator placement in the line\n int n = 0; // to keep track of information in store\n String email = new String();\n String[] newInformation = new String[5];\n while (i < line.length()) { // checks every character in the line\n String store = \"\";\n while (i < line.length() && line.charAt(i) != ',') {\n store += line.charAt(i);\n i++;\n }\n i++;\n n++;\n switch (n) { // stores area into appropriate place for user\n case 1:\n newInformation[0] = store;\n break;\n case 2:\n newInformation[1] = store;\n break;\n case 3:\n email = store;\n break;\n case 4:\n newInformation[2] = store;\n break;\n case 5:\n newInformation[3] = store;\n break;\n case 6:\n newInformation[4] = store;\n break;\n }\n }\n boolean b = false;\n for (Client c: this.clientList) {\n if (c.getEmail().equals(email)) {\n b = true;\n c.setLastName(newInformation[0]);\n c.setFirstNames(newInformation[1]);\n c.setAddress(newInformation[2]);\n c.setCreditCardNumber(newInformation[3]);\n c.setExpiryDate(newInformation[4]);\n }\n }\n if (!b) {\n this.clientList.add(new Client(email, newInformation[0], newInformation[1], newInformation[2], newInformation[3], newInformation[4]));\n }\n }\n scan.close();\n flightSystem.setClientList(this.clientList); // updates FlightSystem\n setChanged();\n notifyObservers(clientList);\n }",
"private void parse() throws IOException {\n\n\t\tStats statsObject = new Stats();\n\n\t\tstatsObject.setProcessName(process);\n\n\t\tList<String> lines = Files.readAllLines(Paths.get(filename), Charset.defaultCharset());\n\n\t\tPattern timePattern = Pattern.compile(\"((\\\\d+)-)*(\\\\d+)\\\\W((\\\\d+):)*(\\\\d+)\\\\.(\\\\d+)\");\n\n\t\tSystem.out.println(filename+\" \"+lines.get(0));\n\t\tMatcher matcher = timePattern.matcher(lines.get(0));\n\t\twhile (matcher.find()) {\n\t\t\tstatsObject.setStartTime(matcher.group(0));\n\t\t\tbreak;\n\t\t}\n\n\t\tmatcher = timePattern.matcher(lines.get(lines.size() - 1));\n\t\twhile (matcher.find()) {\n\t\t\tstatsObject.setEndTime(matcher.group(0));\n\t\t\tbreak;\n\t\t}\n\t\tString error = new String();\n\t\tfor (String line : lines) {\n\n\t\t\tif (line.startsWith(\"[\")) {\n\t\t\t\tif (!error.isEmpty()) {\n\t\t\t\t\tstatsObject.addError(error);\n\t\t\t\t\terror = \"\";\n\t\t\t\t}\n\n\t\t\t\tif (line.contains(\"Number of records processed: \")) {\n\n\t\t\t\t\tPattern numberPattern = Pattern.compile(\"\\\\d+\");\n\t\t\t\t\tmatcher = numberPattern.matcher(line);\n\t\t\t\t\t\n\t\t\t\t\tString numberOfRecordsProcessed = \"N/A\";\n\t\t\t\t\t\n\t\t\t\t\twhile (matcher.find()) {\n\t\t\t\t\t\tnumberOfRecordsProcessed = matcher.group();\n\t\t\t\t\t}\n\t\t\t\t\tstatsObject.setRecordsProcessed(numberOfRecordsProcessed);\n\n\t\t\t\t}\n\n\t\t\t\telse if (line.contains(\"WARNING\")) {\n\t\t\t\t\tif (line.contains(\"MISSING Property\")) {\n\t\t\t\t\t\tstatsObject.incrementErrorCounter();\n\t\t\t\t\t\tstatsObject.addError(line);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstatsObject.incrementWarningCounter();\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else if (line.contains(\"Exception\") || (line.contains(\"Error\"))) {\n\t\t\t\tif (!error.isEmpty()) {\n\t\t\t\t\tstatsObject.addError(error);\n\t\t\t\t\terror = \"\";\n\t\t\t\t}\n\t\t\t\tstatsObject.incrementErrorCounter();\n\t\t\t\terror = error + line;\n\t\t\t} else {\n\t\t\t\terror = error + line ;\n\t\t\t}\n\n\t\t}\n\t\t// reader.close();\n\t\tif (statsObject.getErrorCounter() > 0) {\n\t\t\tstatsObject.setStatus(\"Failure\");\n\t\t}\n\n\t\tPattern pattern = Pattern.compile(\"\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\");\n\t\tmatcher = pattern.matcher(filename);\n\t\tString date = null;\n\t\twhile (matcher.find()) {\n\t\t\tdate = matcher.group(0);\n\t\t\tbreak;\n\t\t}\n\t\tboolean saveSuccessful = OutputManipulator.addToStatFile(username, process, date, statsObject);\n\n\t\tif (saveSuccessful) {\n\t\t\tFileParseScheduler.addSuccessfulParsedFileName(username, process, filename);\n\t\t}\n\n\t\tFileParseScheduler.removeLatestKilledThreads(process + filename);\n\t}",
"public static final List<SignalEntry> read(File file) {\r\n List<SignalEntry> result = new ArrayList<SignalEntry>();\r\n LineNumberReader reader = null;\r\n try {\r\n reader = new LineNumberReader(new FileReader(file));\r\n String line;\r\n do {\r\n line = reader.readLine();\r\n if (\"Entry:\".equals(line)) {\r\n String algorithm = unquote(reader.readLine());\r\n String parameterName = unquote(reader.readLine());\r\n String parameterValue = unquote(reader.readLine());\r\n result.add(new SignalEntry(algorithm, parameterName, parameterValue));\r\n }\r\n } while (null != line);\r\n reader.close();\r\n } catch (IOException e) {\r\n if (null != reader) {\r\n try {\r\n reader.close();\r\n } catch (IOException e1) {\r\n }\r\n }\r\n }\r\n return result;\r\n }",
"@NonNull\n static ChangeRecords load(File file) throws IOException {\n ChangeRecords changeRecords = new ChangeRecords();\n List<String> rawRecords = Files.readLines(file, Charsets.UTF_8);\n for (String rawRecord : rawRecords) {\n StringTokenizer st = new StringTokenizer(rawRecord, \",\");\n if (st.countTokens() != 2) {\n throw new IOException(\"Invalid incremental change record : \" + rawRecord);\n }\n changeRecords.add(Status.valueOf(st.nextToken()), st.nextToken());\n }\n return changeRecords;\n }",
"public void read() {\n String line = \"\";\n int counter = 0;\n try {\n input = new BufferedReader(new FileReader(file));\n while (line != null) {\n if (!(line.equals(\"arglebargle\"))) {//not a default\n names.add(line);\n }\n }\n input.close();\n }\n catch (IOException e) {\n }\n }",
"private ArrayList loadfile(String file_path) throws Exception{\n\t\tFileInputStream fis = null;\n\t\tBufferedReader br = null;\n\t\tArrayList filedata = new ArrayList();\n\t\ttry {\n\t\t\tFile file = new File(file_path);\n\t\t\tfis = new FileInputStream(file);\n\t\t\tbr = new BufferedReader(new InputStreamReader(fis, charset));\n\t\t\tint i = 0;\n\t\t\twhile (br.ready()) {\n\t\t\t\tString line_data = br.readLine();\n\t\t\t\tif (line_data == null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tnode_line_data nd = new node_line_data(line_data, i++);\n\t\t\t\tfiledata.add(nd);\n\t\t\t}\n\t\t\treturn filedata;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new Exception(e.getMessage());\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (br != null)\n\t\t\t\t\tbr.close();\n\t\t\t\tif (fis != null)\n\t\t\t\t\tfis.close();\n\t\t\t}\n\t\t\tcatch (IOException ex) {\n\t\t\t}\n\t\t}\n\t}",
"public void uploadDataFromFile()\n {\n String jobSeekerFile = (\"JobSeeker.txt\");\n String jobRecruiterFile = (\"JobRecruiter.txt\");\n String jobFile = (\"Job.txt\");\n String notificationFile = (\"Notification.txt\");\n \n String jobSeekerLines = readFile(jobSeekerFile);\n String jobRecruiterLines = readFile(jobRecruiterFile);\n String jobLines = readFile(jobFile);\n String notificationLines = readFile(notificationFile);\n \n storeJobSeekersToJobSeekerList(jobSeekerLines);\n storeJobRecruitersToJobRecruiterList(jobRecruiterLines);\n storeJobsToJobList(jobLines);\n storeNotificationsToNotificationList(notificationLines);\n \n }",
"private void readItems() {\n // open file\n File file = getFilesDir();\n File todoFile = new File(file, \"scores.txt\");\n // try to find items to add\n try {\n items = new ArrayList<>(FileUtils.readLines(todoFile));\n } catch (IOException e) {\n items = new ArrayList<>();\n }\n }",
"public void getDataFromFile(){\n\n try\n {\n File file = new File( fileName );\n FileInputStream fis = new FileInputStream( file );\n DataInputStream in = new DataInputStream(fis);\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\n String message = \"\", eachLine = \"\";\n\n while ((eachLine = br.readLine()) != null) {\n message += eachLine;\n }\n\n //System.out.println(message);\n StringTokenizer tokens = new StringTokenizer(message);\n\n //to set the coordination and demand of each customer\n size = Integer.parseInt(tokens.nextToken());\n processingTime = new double[size][size];\n\n for(int i = 0 ; i < size ; i ++ ){\n for(int j = 0 ; j < size ; j ++ ){\n processingTime[i][j] = Double.parseDouble(tokens.nextToken());\n }\n }\n } //end try\n catch( Exception e )\n {\n e.printStackTrace();\n System.out.println(e.toString());\n } // end catch\n //System.out.println( \"done\" );\n }",
"public static List<String> getLogFromFile(String filePath) {\n List<String> logData = new ArrayList<>();\n File file = new File(filePath);\n try {\n Scanner sc = new Scanner(file);\n while (sc.hasNextLine()) {\n logData.add(sc.nextLine());\n }\n sc.close();\n } catch (FileNotFoundException e) {\n Logger.log(e.getMessage());\n }\n return logData;\n }",
"private List<Task> readFromFile() {\n if (file.exists()) {\n try {\n return objectmapper.readValue(file,TaskList.class);\n } catch (IOException e) {\n throw new IllegalStateException(e);\n }\n } else {\n return new ArrayList<>();\n }\n }",
"public void data() {\n\n BufferedReader br = null;\n try {\n br = new BufferedReader(new FileReader(\"/Users/macbook_user/Desktop/OOP Project/List.txt\"));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n return;\n }\n\n String[] columnName\n = {\"Id\", \"Name\", \"Amount\", \"Shelf#\", \"Position\"};\n int i, index;\n String line;\n try {\n br.readLine();\n while ((line = br.readLine()) != null) {\n index = 0;\n String[] se = line.split(\" \");\n Map<String, Object> item = new HashMap<>();\n for (i = 0; i < se.length; i++) {\n if (\"\".equals(se[i])) {\n continue;\n }\n if (index >= columnName.length) {\n continue;\n }\n item.put(columnName[index], se[i]);\n index++;\n }\n\n //get the amount of the item from the list\n int amount = Integer.parseInt((String) item\n .get(columnName[2]));\n\n // if amount greater than 0, Existence is Y, else N\n if (amount > 0) {\n item.put(\"Existence\", \"Y\");\n } else {\n item.put(\"Existence\", \"N\");\n }\n\n inventory.add(item);// add item to ArrayList\n }\n br.close();\n\n outPutFile();\n } catch (IOException e) {\n }\n\n }",
"@PostConstruct\n private List<String> loadFortunesFile() {\n System.out.println(\">> FileFortuneService: inside method 'loadFortunesFile'.\");\n\n try {\n String fileName = \"src/com/luv2code/springdemo/fortune_data.txt\";\n BufferedReader reader = new BufferedReader(new FileReader(fileName));\n String line = null;\n while ( (line = reader.readLine()) != null) {\n fortunes.add(line);\n }\n } catch (IOException e) {\n System.out.println(\"An error occurred during file-stream: \");\n e.printStackTrace();\n }\n return fortunes;\n\n }",
"public List<Task> readFile() throws FileNotFoundException, DukeException {\n List<Task> output = new ArrayList<>();\n Scanner sc = new Scanner(file);\n while (sc.hasNext()) {\n output.add(readTask(sc.nextLine()));\n }\n return output;\n }",
"private void loadFromFile() {\n\t\ttry {\n\t\t\tFileInputStream fis = openFileInput(FILENAME);\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(fis));\n\t\t\tString line = in.readLine();\n\t\t\tGson gson = new Gson();\n\t\t\twhile (line != null) {\n\t\t\t\tCounterModel counter = gson.fromJson(line, CounterModel.class);\n\t\t\t\tif (counterModel.getCounterName().equals(counter.getCounterName())) {\n\t\t\t\t\tcounterListModel.addCounterToList(counterModel);\n\t\t\t\t\tcurrentCountTextView.setText(Integer.toString(counterModel.getCount()));\n\t\t\t\t} else {\n\t\t\t\t\tcounterListModel.addCounterToList(counter);\n\t\t\t\t}\n\t\t\t\tline = in.readLine();\n\t\t\t} \n\t\t\tfis.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public ArrayList<DeliveryVehicle> getVehiclesFromFile() throws java.io.IOException {\n \n DeliveryVehicleController controller = new DeliveryVehicleController();\n \n //reading the file and adding all lines to the list\n List<String> lines = Files.readAllLines(Paths.get(_filePath));\n String[] lineTokens;\n List<String> fileLines = Files.readAllLines(Paths.get(_filePath));\n\n for(String line : fileLines) {\n lineTokens = line.split(\" \");\n \n //Possible to change if statement case statement instead\n // [0] = Bike Used to check what type (never going to change)\n // [1] = RegNumber\n // [2] = EngineSize\n // [3] = DaysInService\n // [4] = MilesCovered\n // [5] = Deliverys\n\n if (lineTokens[0].equalsIgnoreCase(\"Bike\")){\n // System.out.print(lineTokens[1] + \"THISSHOULD BE REG NUMBER\");\n controller.addBike( lineTokens[1] , Integer.parseInt(lineTokens[2]), Integer.parseInt(lineTokens[3] ), Double.parseDouble(lineTokens[4] ), Integer.parseInt(lineTokens[5]) );\n // return _vehicleList;\n // System.out.print(_vehicleList);\n }\n\n else if (lineTokens[0].equalsIgnoreCase(\"Car\")){\n controller.addCar( lineTokens[1] , Integer.parseInt(lineTokens[2]), Integer.parseInt(lineTokens[3] ), Double.parseDouble(lineTokens[4] ), Integer.parseInt(lineTokens[5]) );\n // return _vehicleList;\n }\n\n else if (lineTokens[0].equalsIgnoreCase(\"Scooter\")){\n // _vehicleList.add(new DeliveryScooter( lineTokens[1] , Integer.parseInt(lineTokens[2]), Integer.parseInt(lineTokens[3] ), Double.parseDouble(lineTokens[4] ), Integer.parseInt(lineTokens[5]) ));\n controller.addScooter( lineTokens[1] , Integer.parseInt(lineTokens[2]), Integer.parseInt(lineTokens[3] ), Double.parseDouble(lineTokens[4] ), Integer.parseInt(lineTokens[5]) );\n // return _vehicleList;\n }\n } \n \n return controller.getVehiclesList();\n \n }",
"public List<WatchRecord> getWatchList() throws Exception {\r\n List<WatchRecord> watchList = new Vector<WatchRecord>();\r\n List<WatchRecordXML> chilluns = this.getChildren(\"watch\", WatchRecordXML.class);\r\n for (WatchRecordXML wr : chilluns) {\r\n watchList.add(new WatchRecord(wr.getPageKey(), wr.getLastSeen()));\r\n }\r\n return watchList;\r\n }",
"private void setUp(String file) {\n unorderedList = new LinkedList<>();\n orderedList = new SortedLinkedList<>();\n\n try {\n input = new Scanner(new BufferedReader(new FileReader(file)));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }",
"public List<Task> load() throws DukeException {\n List<Task> tasks = new ArrayList<>();\n\n try {\n BufferedReader reader = new BufferedReader(new FileReader(filePath));\n\n String line;\n while ((line = reader.readLine()) != null) {\n String[] tokens = line.split(\"\\\\|\");\n\n Task task = StorageSerializer.deserialize(tokens);\n tasks.add(task);\n }\n\n reader.close();\n } catch (FileNotFoundException e) {\n throw new IoDukeException(\"Error opening task file for reading\");\n } catch (IOException e) {\n throw new IoDukeException(\"Error closing file reader\");\n } catch (ParseException e) {\n throw new IoDukeException(\"Error parsing date in task file\");\n }\n\n return tasks;\n }",
"private ClientInfo getClientInfo(String clientID){\n\n ClientInfo clientInfo = new ClientInfo((clientID));\n\n String clientFile_name = clientID +\".txt\";\n\n File clientFile = new File(ServerInfoDir.CLIENTS_INFO_DIR, clientFile_name);\n\n try{\n //Create object of FileReader\n FileReader inputFile = new FileReader(clientFile);\n\n //Instantiate the BufferedReader Class\n BufferedReader bufferReader = new BufferedReader(inputFile);\n\n //Variable to hold the one line data\n String line = null, groupID = null, postname = null;\n String parts[], posts[];\n\n while ((line = bufferReader.readLine()) != null) {\n parts = line.split(\":\");\n\n clientInfo.subscribe(parts[0]);\n\n if(parts.length > 1) {\n posts = parts[1].split(\",\"); /*Get what the client has read in a group*/\n\n for (String str : posts)\n clientInfo.readPost(parts[0], str);\n }\n\n }\n\n bufferReader.close();\n }catch(Exception e){\n System.out.println(\"Error while reading file:\" + e.getMessage());\n }\n\n\n return clientInfo;\n }",
"public static void readFile() {\n\t\tbufferedReader = null;\n\t\ttry {\n\t\t\tFileReader fileReader = new FileReader(\"/home/bridgeit/Desktop/number.txt\");\n\t\t\tbufferedReader = new BufferedReader(fileReader);\n\n\t\t\tString line;\n\t\t\twhile ((line = bufferedReader.readLine()) != null) {\n\t\t\t\tString[] strings = line.split(\" \");\n\t\t\t\tfor (String integers : strings) {\n\t\t\t\t\thl.add(Integer.parseInt(integers));\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"File Not Found...\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\tbufferedReader.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public ArrayList<Message> readMessages() throws FileNotFoundException {\n\t\tArrayList<Message> allMessages = new ArrayList<Message>();\n\t\tScanner keyboardIn = new Scanner(new File(filePath));\n\t\tkeyboardIn.useDelimiter(\"/n\");\n\t\twhile (keyboardIn.hasNextLine()) {\n\t\t\tString[] messageDataInArray = keyboardIn.nextLine().split(\"\\t\");\n\t\t\tString messageName = messageDataInArray[0];\n\t\t\tString messageDescription = messageDataInArray[1];\n\t\t\tMessage message = new Message(messageName,messageDescription);\n\t\t\tallMessages.add(message);\t\t\n\t\t}\n\t\tkeyboardIn.close();\t\t\n\t\treturn allMessages;\n\t}",
"private List<String> init(Path path) throws Exception {\n List<String> lines = Files.readAllLines(path);\n if (lines.size() != 0) {\n int numberOfFields = Integer.parseInt(lines.get(0));\n fillFieldsList(lines, numberOfFields);\n fillPlayersList(lines, numberOfFields);\n } else {\n throw new FileEmptyException();\n }\n return lines;\n }",
"public List<String> readFile() {\n \n try {\n ensureFileExists();\n return Files.readAllLines(filePath);\n } catch (FileNotFoundException ex) {\n return new ArrayList<>();\n } catch (IOException ex) {\n ex.printStackTrace();\n return new ArrayList<>();\n }\n }",
"public static void loadArrayList() throws IOException\n\t{\n\t\tString usersXPFile = \"UsersXP.txt\";\n\t\t\n\t\tFile file = new File(usersXPFile);\n\t\t\n\t\tScanner fileReader;\n\t\t\n\t\tif(file.exists())\n\t\t{\n\t\t\tfileReader = new Scanner(file);\n\t\t\twhile(fileReader.hasNext())\n\t\t\t\tuserDetail1.add(userData.addNewuser(fileReader.nextLine().trim()));\n\t\t\tfileReader.close();\n\t\t}\n\t\telse overwriteFile(usersXPFile, \"\");\n\t\t\n\t\t\n\t}",
"public void parseDumpstateFile(String filePath) {\n\t\tif (filePath == null || \"\".equals(filePath)) {\n\t\t\treturn;\n\t\t}\n\t\tFile file = new File(filePath);\n\t\tif (!file.exists()) {\n\t\t\treturn;\n\t\t}\n\t\tSystem.gc();\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(file);\n\t\t\tBufferedReader br = new BufferedReader(fr);\n\t\t\tList<String> linesListMain = new ArrayList<String>();\n\t\t\tList<String> linesListEvents = new ArrayList<String>();\n\t\t\tList<String> linesListRadio = new ArrayList<String>();\n\t\t\tint state = 0;\n\t\t\tboolean finish = false;\n\t\t\twhile (br.ready()) {\n\t\t\t\tString strLine = br.readLine().trim();\n\t\t\t\tswitch (state) {\n\t\t\t\tcase 0:\n\t\t\t\t\tif (strLine.startsWith(\"------ SYSTEM LOG (logcat -v threadtime\")) {\n\t\t\t\t\t\tstate = 1;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:// main\n\t\t\t\t\tif (strLine.startsWith(\"------ EVENT LOG (logcat -b events -v threadtime\")) {\n\t\t\t\t\t\tstate = 2;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tlinesListMain.add(strLine);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:// events\n\t\t\t\t\tif (strLine.startsWith(\"------ RADIO LOG (logcat -b radio -v threadtime\")) {\n\t\t\t\t\t\tstate = 3;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tlinesListEvents.add(strLine);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:// radio\n\t\t\t\t\tif (strLine.startsWith(\"[logcat:\")) {\n\t\t\t\t\t\tstate = 4;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tlinesListRadio.add(strLine);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:// finish\n\t\t\t\t\tfinish = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tassert (false);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (finish) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (linesListMain.size() > 0) {\n\t\t\t\tList<LogCatMessage> logMessageMain = process_LOGCAT_V_THREADTIME(linesListMain);\n\t\t\t\tsendMessageReceivedEvent(logMessageMain, UIThread.PANEL_ID_MAIN, file);\n\t\t\t}\n\n\t\t\tif (linesListEvents.size() > 0) {\n\t\t\t\tList<LogCatMessage> logMessageEvents = process_LOGCAT_V_THREADTIME(linesListEvents);\n\t\t\t\tsendMessageReceivedEvent(logMessageEvents, UIThread.PANEL_ID_EVENTS, file);\n\t\t\t}\n\n\t\t\tif (linesListRadio.size() > 0) {\n\t\t\t\tList<LogCatMessage> logMessageRadio = process_LOGCAT_V_THREADTIME(linesListRadio);\n\t\t\t\tsendMessageReceivedEvent(logMessageRadio, UIThread.PANEL_ID_RADIO, file);\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public void stockLoad() {\n try {\n File file = new File(stockPath);\n Scanner scanner = new Scanner(file);\n while (scanner.hasNextLine()) {\n String data = scanner.nextLine();\n String[] userData = data.split(separator);\n Stock stock = new Stock();\n stock.setProductName(userData[0]);\n int stockCountToInt = Integer.parseInt(userData[1]);\n stock.setStockCount(stockCountToInt);\n float priceToFloat = Float.parseFloat(userData[2]);\n stock.setPrice(priceToFloat);\n stock.setBarcode(userData[3]);\n\n stocks.add(stock);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }",
"private Candle[] read(String file) throws Exception {\r\n Scanner sc = new Scanner(new File(file));\r\n String[] spl;\r\n String s;\r\n Candle[] candles = new Candle[32 * 24 * 60];\r\n int i = 0;\r\n while(sc.hasNextLine()){\r\n spl = sc.nextLine().split(\",\");\r\n candles[i] = new Candle(spl[0] + \" \" + spl[1], spl[2], spl[3], spl[4], spl[5]);\r\n i++;\r\n\r\n }\r\n Candle[] newCandles = new Candle[i];\r\n System.arraycopy(candles, 0, newCandles, 0, i);\r\n sc.close();\r\n return newCandles;\r\n \r\n }",
"public void read(){\n assert(inputStream.hasNext());\n\n while(inputStream.hasNextLine()){\n String line = inputStream.nextLine();\n String[] fields = line.split(\";\");\n\n //If Line is address line\n if(fields.length >= 4){\n Address adr = new Address(fields[0], fields[1], fields[2], fields[3]);\n if(fields.length == 5){\n parseGroups(fields[4], adr);\n }\n inputAddressList.add(adr);\n }\n\n //If Line is Group Line\n else if(fields.length <=3){\n Group group = new Group(fields[0], Integer.parseInt(fields[1]));\n if(fields.length == 3){\n parseGroups(fields[2], group);\n }\n inputGroupList.add(group);\n }\n }\n compose();\n assert(invariant());\n }",
"public static List read(String file){\n\t\tLinkedList<String> data =\tnew LinkedList<String>();\n\t\tString dataRow;\n\t\t\n\t\ttry {\n\t\t\t\n\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\t\n\t\twhile((dataRow = br.readLine())!=null);{\t\n\t\t\tString[] dataRecord = dataRow.split(\",\");\n\t\t\tdata.addAll(dataRecord);\n\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Could not found file\");\n\t\t\te.printStackTrace();\n\t\t}catch (IOException e) {\n\t\tSystem.out.println(\"Could Not read file\");\n\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}",
"public ArrayList<String> read_file() {\n prog = new ArrayList<>();\n //Read file\n try {\n\n File myObj = new File(\"in3.txt\");\n Scanner myReader = new Scanner(myObj);\n while (myReader.hasNextLine()) {\n String data = myReader.nextLine();\n if (data.charAt(0) != '.') {\n// System.out.println(data);\n prog.add(data);\n } else {\n continue;\n// data = data.substring(1);\n// System.out.println(\"{{ \" + data + \" }}\");\n }\n\n }\n myReader.close();\n\n } catch (FileNotFoundException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n\n return prog;\n }"
]
| [
"0.5923623",
"0.58460563",
"0.58128184",
"0.577719",
"0.5672325",
"0.5621164",
"0.55874926",
"0.55705154",
"0.55568993",
"0.555032",
"0.5540503",
"0.55291355",
"0.55286145",
"0.55153084",
"0.5511262",
"0.54870456",
"0.54832226",
"0.54700726",
"0.54663074",
"0.5456652",
"0.5449701",
"0.544601",
"0.5444965",
"0.5443591",
"0.54389787",
"0.5436089",
"0.54187995",
"0.54079705",
"0.5401269",
"0.5398232",
"0.53858066",
"0.53745365",
"0.5374154",
"0.536939",
"0.5365447",
"0.5358599",
"0.5348825",
"0.5342932",
"0.534041",
"0.5339923",
"0.53385997",
"0.53283197",
"0.53130305",
"0.5309196",
"0.53080106",
"0.5307424",
"0.5266914",
"0.5254161",
"0.523334",
"0.52327967",
"0.5232063",
"0.5228425",
"0.52202743",
"0.5198093",
"0.519773",
"0.51839626",
"0.51830477",
"0.51829225",
"0.5181669",
"0.5176213",
"0.5167545",
"0.5166746",
"0.5161239",
"0.5155878",
"0.515492",
"0.51483274",
"0.5144579",
"0.5136163",
"0.5132739",
"0.5123973",
"0.5122533",
"0.5114653",
"0.5112277",
"0.510396",
"0.5103442",
"0.5080595",
"0.507891",
"0.5066407",
"0.50511557",
"0.50453347",
"0.50354695",
"0.5032505",
"0.5030736",
"0.5028813",
"0.50212455",
"0.502114",
"0.5019666",
"0.50141025",
"0.49988502",
"0.4993434",
"0.49883345",
"0.49860993",
"0.49831748",
"0.49713248",
"0.49699405",
"0.4967876",
"0.49659404",
"0.4964198",
"0.49630144",
"0.4954986"
]
| 0.7106632 | 0 |
method that returns the number of distinct days | public static int countDays(List<MonitoredData> data){
System.out.println("3) How many times has appeared each activity for each day: ");
long result = 0;
ArrayList<String> days = new ArrayList<>();
ArrayList<MonitoredData> dataTrunc = new ArrayList<>();
for (int i=0; i<data.size(); i++){
String day = "";
day += data.get(i).getStartTime().charAt(8);
day += data.get(i).getStartTime().charAt(9);
days.add(day);
}
for (int i=0; i<data.size(); i++){
dataTrunc.add(data.get(i));
if (i<days.size()-1){
if (!days.get(i+1).equals(days.get(i))){
System.out.println(" Day " + days.get(i) + " ::: " + countActivitiesWholePeriod(dataTrunc));
dataTrunc.clear();
}
}else{
System.out.println(" Day " + days.get(i) + " ::: " + countActivitiesWholePeriod(dataTrunc));
}
}
Stream<String> daysStream = days.stream();
result = daysStream
.distinct()
.count();
return (int)result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getNumberDays();",
"public int getDistinctDays(List<MonitoredData> timeline) {\n return (int) timeline\n .stream()\n .map(\n m -> m.getStart_time().getDayOfYear())\n .distinct()\n .count();\n }",
"private int getDays() {\n\t\tlong arrival = arrivalDate.toEpochDay();\n\t\tlong departure = departureDate.toEpochDay();\n\t\tint days = (int) Math.abs(arrival - departure);\n\n\t\treturn days;\n\t}",
"public int getNumDaysForComponent(Record record);",
"public static int getNumberOfDays() {\n\t\treturn numberOfDays;\n\t}",
"public int getTotalDays() {\r\n int totalDays = 0;\r\n for (int d = 0; d < 5; d++) {\r\n for (int h = 0; h < 13; h++) {\r\n if (weekData[d][h] != 0) {\r\n totalDays += 1;\r\n break;\r\n }\r\n }\r\n }\r\n return totalDays;\r\n }",
"public int getNumberOfDays() {\n return numberOfDays;\n }",
"public int getNumDays() {\n\t\treturn numDays;\n\t}",
"private int calculateNumberOfDaysOfWeek (DayOfWeek dayOfWeek) {\n LocalDate dateIterator = startDate.with(nextOrSame(dayOfWeek));\n if (dateIterator.isAfter(endDate)) {\n return 0;\n }\n\n int numberOfDayOfWeek = 1;\n\n while (dateIterator.isBefore(endDate)) {\n dateIterator = dateIterator.with(next(dayOfWeek));\n if (dateIterator.isBefore(endDate) || dateIterator.isEqual(endDate)) {\n numberOfDayOfWeek++;\n }\n }\n\n return numberOfDayOfWeek;\n }",
"public java.lang.Integer getNoOfDays () {\n\t\treturn noOfDays;\n\t}",
"public java.lang.Integer getNoOfDays () {\n\t\treturn noOfDays;\n\t}",
"@Override\n\tpublic int ddayCount(String memberNo) {\n\t\treturn dDao.ddayCount(sqlSession, memberNo);\n\t}",
"Integer getDaysSpanned();",
"long getTermDays();",
"public int days() {\n if (isInfinite()) {\n return 0;\n }\n Period p = new Period(asInterval(), PeriodType.days());\n return p.getDays();\n }",
"public int getUDays() {\n return uDays;\n }",
"public DayCount getDayCount() {\n return dayCount;\n }",
"private long dateDiffInNumberOfDays(LocalDate startDate, LocalDate endDate) {\n\n return ChronoUnit.DAYS.between(startDate, endDate);\n }",
"int getUniqueNumbersCount();",
"public int getSignupByDayCount(int day) {\r\n\t\treturn signupByDayCountList.get(day);\r\n\r\n\t}",
"public Integer getTotalDays()\r\n/* 68: */ {\r\n/* 69:67 */ return this.totalDays;\r\n/* 70: */ }",
"public long getDays() {\r\n \treturn days;\r\n }",
"public int daysOverdue(int today);",
"@Override\r\n\tpublic int[] getDayPeople() {\n\t\tint[] result = new int[7];\r\n\t\tDate date = DateUtil.getCurrentDate();\r\n\t\tresult[0] = cinemaConditionDao.getDayCount(date);\r\n\t\tfor(int i=0;i<6;i++){\r\n\t\t\tdate = DateUtil.getDayBefore(date);\r\n\t\t\tresult[i+1] = cinemaConditionDao.getDayCount(date);\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public abstract int daysInMonth(DMYcount DMYcount);",
"private int getDifferenceDays(Date d1, Date d2) {\n int daysdiff = 0;\n long diff = d2.getTime() - d1.getTime();\n long diffDays = diff / (24 * 60 * 60 * 1000) + 1;\n daysdiff = (int) diffDays;\n return daysdiff;\n }",
"public int getLBR_CollectionReturnDays();",
"public int getNumberOfDays()\r\n {\r\n int mn = theMonthNumber;\r\n if (mn == 1 || mn == 3 || mn == 5 || mn == 7 || mn == 8 || mn == 10 || mn == 12)\r\n {return 31;}\r\n if (mn == 4 || mn == 6 || mn == 9 || mn == 11)\r\n {return 30;}\r\n else\r\n {return 28;}\r\n }",
"public int getDays(){\r\n\t\treturn days;\r\n\t}",
"@Override\r\n\tpublic int getDayCount(Date date) {\n\t\tString hql = \"select cc.count from cinema_condition cc where cc.date = ?\";\r\n\t\tQuery query = this.getCurrentSession().createQuery(hql);\r\n\t\tquery.setParameter(0, date);\r\n\t\tif(query.uniqueResult()==null){\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tint resutl = (Integer) query.uniqueResult();\r\n\t\treturn resutl;\r\n\t}",
"public static long getDayNumber() {\n return getSecondsSinceEpoch() / SECS_TO_DAYS;\n }",
"public int getDays() {\n return this.days;\n }",
"public int getDublicatesCount() {\n int res = 0;\n for (Integer integer : gramma.keySet()) {\n if (integer > 1) {\n res += gramma.get(integer);\n }\n }\n return res;\n }",
"public int getHowManyInPeriod();",
"public int getNumberOfDates() {\n return dateList.size();\n }",
"int countByExample(AoD5e466WorkingDayExample example);",
"public int trimestre(LocalDate d);",
"public double getPer_day(){\n\t\tdouble amount=this.num_of_commits/365;\n\t\treturn amount;\n\t}",
"public static int countDiffDay(Calendar c1, Calendar c2) {\n int returnInt = 0;\n while (!c1.after(c2)) {\n c1.add(Calendar.DAY_OF_MONTH, 1);\n returnInt++;\n }\n\n if (returnInt > 0) {\n returnInt = returnInt - 1;\n }\n\n return (returnInt);\n }",
"public Integer getDayVisitCount() {\n return dayVisitCount;\n }",
"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}",
"@Override\n\tpublic List<?> getNumberOfPatientPerDay() {\n\t\treturn ar.findAppointmentCount();\n\t}",
"public int getUpDays() {\n return (int)(_uptime / 86400000);\n }",
"public int getNumberOfVisibleDays() {\n return config.numberOfVisibleDays;\n }",
"public BigDecimal getNO_OF_DAYS() {\r\n return NO_OF_DAYS;\r\n }",
"long countByExample(UvStatDayExample example);",
"public int calcDays() {\n\t\tint days = day-1;\r\n\t\tdays += ((month-1)*30);\r\n\t\tdays += ((year -2000) * (12*30));\r\n\t\treturn days;\r\n\t}",
"public static int getNumberOfDays(Date first, Date second)\n {\n Calendar c = Calendar.getInstance();\n int result = 0;\n int compare = first.compareTo(second);\n if (compare > 0) return 0;\n if (compare == 0) return 1;\n\n c.setTime(first);\n int firstDay = c.get(Calendar.DAY_OF_YEAR);\n int firstYear = c.get(Calendar.YEAR);\n int firstDays = c.getActualMaximum(Calendar.DAY_OF_YEAR);\n\n c.setTime(second);\n int secondDay = c.get(Calendar.DAY_OF_YEAR);\n int secondYear = c.get(Calendar.YEAR);\n\n // if dates in the same year\n if (firstYear == secondYear)\n {\n result = secondDay-firstDay+1;\n }\n\n // different years\n else\n {\n // days from the first year\n result += firstDays - firstDay + 1;\n\n // add days from all years between the two dates years\n for (int i = firstYear+1; i< secondYear; i++)\n {\n c.set(i,0,0);\n result += c.getActualMaximum(Calendar.DAY_OF_YEAR);\n }\n\n // days from last year\n result += secondDay;\n }\n\n return result;\n }",
"public int getNumberOfDays()\n\t{\n\t\treturn m_calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\n\n\t}",
"int getNumberOfDetectedDuplicates();",
"public static int numberOfSegs() {\n String sql = \"SELECT COUNT(*) FROM corpus1;\";\n\n int notDistinctCount = 0;\n int distinctCount = 0;\n\n try (Connection conn = DatabaseOperations.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql)) {\n\n notDistinctCount = rs.getInt(1);\n } catch (SQLException e) {\n System.out.println(\"count: \" + e.getMessage());\n }\n\n sql = \"SELECT COUNT(DISTINCT id) FROM corpus1;\";\n try (Connection conn = DatabaseOperations.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql)) {\n\n distinctCount = rs.getInt(1);\n } catch (SQLException e) {\n System.out.println(\"count: \" + e.getMessage());\n }\n\n if (distinctCount != notDistinctCount) {\n System.out.println(distinctCount + \", \" + notDistinctCount);\n }\n\n return distinctCount;\n }",
"private int sizeForHashTable()\n {\n String compare=\"\";\n int numberOfdates = 0;\n for (int i=0; i <= hourly.size();i++)\n {\n if (i==0)\n {\n numberOfdates +=1;\n compare = data.get(i).getFCTTIME().getPretty();\n }else if(compare != data.get(i).getFCTTIME().getPretty())\n {\n numberOfdates+=1;\n compare = data.get(i).getFCTTIME().getPretty();\n }\n }\n return numberOfdates;\n }",
"public int betweenDates() {\n return Period.between(arrivalDate, departureDate).getDays();\n }",
"public int getTotalNumberOfWorkingDays(List<LocalDate> dateList) {\n\n int cont = 0;\n for (LocalDate date : dateList) {\n\n if (dateDiffOfWeekend(date)) {\n\n cont++;\n }\n }\n\n return cont;\n }",
"@DISPID(52)\r\n\t// = 0x34. The runtime will prefer the VTID if present\r\n\t@VTID(50)\r\n\tint actualCPUTime_Days();",
"private static long getQtdDias(String dataAniversario){\n DateTimeFormatter data = DateTimeFormatter.ofPattern(\"dd/MM/yyyy\");\n LocalDateTime now = LocalDateTime.now();\n String dataHoje = data.format(now);\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\", Locale.ENGLISH);\n try {\n Date dtAniversario = sdf.parse(dataAniversario);\n Date hoje = sdf.parse(dataHoje);\n //Date hoje = sdf.parse(\"51515/55454\");\n long diferenca = Math.abs(hoje.getTime() - dtAniversario.getTime());\n long qtdDias = TimeUnit.DAYS.convert(diferenca, TimeUnit.MILLISECONDS);\n return qtdDias;\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return 0;\n }",
"int getTotalDepositCount();",
"public int getNumberOfLastDayEvents() {\n int counter = 0;\n long currentTimeSeconds = getCurrentTimeInSeconds();\n for (int i = 0; i < records.length; i++) {\n synchronized (records[i]) {\n if (currentTimeSeconds - records[i].getLastTimeReset() < SECONDS_IN_DAY) {\n counter += records[i].getCount();\n }\n }\n }\n\n return counter;\n }",
"@Override\n public final long daysInEffect(final LocalDate comparison) {\n return ChronoUnit.DAYS.between(this.getStartDate(), comparison);\n }",
"@DISPID(67)\r\n\t// = 0x43. The runtime will prefer the VTID if present\r\n\t@VTID(65)\r\n\tint averageCPUTime_Days();",
"public int getLengthDays() {\r\n\t\treturn diffDays(imageList.get(0).cal, getLast().cal);\r\n\t}",
"@Override\n\tpublic int datecount() throws Exception {\n\t\treturn dao.datecount();\n\t}",
"static long getDaysPart(Duration d) {\n long t = d.getSeconds() / 60 / 60 / 24;\n return t;\n }",
"public int daysBetween(Day day)\n\t{\n\t\tlong millisBetween = Math.abs(this.getDayStart(TimeZoneEx.GMT).getTime() - day.getDayStart(TimeZoneEx.GMT).getTime());\n\t\treturn (int) Math.round((float) millisBetween / (1000F * 60F * 60F * 24F));\n\t}",
"public long calculateNumberOfDaysAbsentInclusive(LocalDate startDate, LocalDate endDate) {\n\t\tlong businessDays = 0;\n\t\tlong numDaysBetween = ChronoUnit.DAYS.between(startDate, endDate);\n\t\t\t\t\n\t\tif(numDaysBetween > 0) {\n\t\t\tbusinessDays = IntStream.iterate(0, i -> i + 1).limit(numDaysBetween).mapToObj(startDate::plusDays)\n\t\t\t\t.filter(d -> Stream.of(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY)\n\t\t\t\t.anyMatch(d.getDayOfWeek()::equals)).count() + 1;\n\t\t}\n\t\treturn businessDays;\n\t}",
"@Override\n\tpublic List<String> countDate() {\n\t\treturn controlA.countDate();\n\t}",
"public static long getCountOfUniqueActivitiesOfSchool(){\r\n\t\treturn StudentRepository.getStudents()\r\n\t\t\t.stream() // Stream<Student>\r\n\t\t\t.map(Student :: getActivities) // Stream<List<String>>\r\n\t\t\t// want to pass a List and get back a stream of that list\r\n\t\t\t.flatMap(List :: stream) // Stream<String>\r\n\t\t\t.distinct()\r\n\t\t\t.count();\r\n\t}",
"public ArrayList<String> getCountStatics() {\n\t\tint countsPerMinute = 0;\n\t\tint countsPerHour = 0;\n\t\tint countsPerDay = 0;\n\t\tint countsPerWeek = 0;\n\t\tint countsPerMonth = 0;\n\n\t\t// get a comparison time and start comparing the times against it\n\t\tArrayList<String> myArrayString = new ArrayList<String>();\n\t\tCalendar currDate = Calendar.getInstance();\n\t\tfor (int i = 0; i < clickerCountObject.getClickerTimestamps().size(); i++) {\n\t\t\tSystem.out.println(clickerCountObject.getClickerTimestamps().get(i)\n\t\t\t\t\t.get(Calendar.MINUTE) <= currDate.get(Calendar.MINUTE));\n\t\t\tif (currDate.get(Calendar.MINUTE) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MINUTE)\n\t\t\t\t\t&& currDate.get(Calendar.MINUTE) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MINUTE)) {\n\t\t\t\tcountsPerMinute += 1;\n\t\t\t}\n\t\t\tif (currDate.get(Calendar.HOUR_OF_DAY) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.HOUR_OF_DAY)\n\t\t\t\t\t&& currDate.get(Calendar.HOUR_OF_DAY) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i)\n\t\t\t\t\t\t\t.get(Calendar.HOUR_OF_DAY)) {\n\t\t\t\tcountsPerHour += 1;\n\t\t\t}\n\t\t\tif ((currDate.get(Calendar.DAY_OF_MONTH) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.DAY_OF_MONTH))\n\t\t\t\t\t&& (currDate.get(Calendar.DAY_OF_MONTH) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i)\n\t\t\t\t\t\t\t.get(Calendar.DAY_OF_MONTH))) {\n\t\t\t\tcountsPerDay += 1;\n\t\t\t}\n\t\t\tif ((currDate.get(Calendar.WEEK_OF_MONTH) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.WEEK_OF_MONTH))\n\t\t\t\t\t&& (currDate.get(Calendar.WEEK_OF_MONTH) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i)\n\t\t\t\t\t\t\t.get(Calendar.WEEK_OF_MONTH))) {\n\t\t\t\tcountsPerWeek += 1;\n\t\t\t}\n\t\t\tif ((currDate.get(Calendar.MONTH) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MONTH))\n\t\t\t\t\t&& (currDate.get(Calendar.MONTH) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MONTH))) {\n\t\t\t\tcountsPerMonth += 1;\n\t\t\t}\n\t\t}\n\t\tmyArrayString.add(\"Counts per Minute \"\n\t\t\t\t+ Integer.toString(countsPerMinute));\n\t\tmyArrayString.add(\"Counts per Hour \" + Integer.toString(countsPerHour));\n\t\tmyArrayString.add(\"Counts per Day \" + Integer.toString(countsPerDay));\n\t\tmyArrayString.add(\"Counts per Week \" + Integer.toString(countsPerWeek));\n\t\tmyArrayString.add(\"Counts per Month \"\n\t\t\t\t+ Integer.toString(countsPerMonth));\n\n\t\tSystem.out.println(myArrayString);\n\t\treturn myArrayString;\n\t}",
"public int getCantidadCalles();",
"public static int \tdayCounter (String duration) {\n\n\t\tlogger.finer(\"Day Counter used\");\n\n\t\tint x = 0 ;\n\t\tif(duration.equalsIgnoreCase(\"DAY\")) {\n\t\t\tx = 1; \n\t\t}\n\t\tif(duration.equalsIgnoreCase(\"WEEK\")) {\n\t\t\tx = 7;\n\t\t}\n\t\tif(duration.equalsIgnoreCase(\"MONTH\")) {\n\t\t\tx = 30;\n\t\t}\n\t\treturn x;\n\t}",
"long getUnjoinedEventsCount();",
"@Generated\n @Selector(\"daysSinceOnsetOfSymptoms\")\n @NInt\n public native long daysSinceOnsetOfSymptoms();",
"public int[] getDataMsgPerDay() {\n\t\tint[] result = new int[24];\n\t\tint it = 0;\n\t\tfor (LocalTime hour = LocalTime.now().with(LocalTime.MIN); hour\n\t\t\t\t.isBefore(LocalTime.now().with(LocalTime.MAX).minusHours(1)); hour = hour.plusHours(1)) {\n\t\t\tLocalTime hourOfDay = hour;\n\t\t\tcontador = 0;\n\t\t\tcurrentUser.getContacts().forEach(contact -> {\n\t\t\t\tcontador += contact.getMessages().stream()\n\t\t\t\t\t\t.filter(m -> (m.getTime().toLocalTime().getHour() == hourOfDay.getHour())\n\t\t\t\t\t\t\t\t&& (m.getSpeaker() == currentUser.getId()))\n\t\t\t\t\t\t.count();\n\t\t\t});\n\t\t\tresult[it] = contador;\n\t\t\tit++;\n\t\t}\n\t\treturn result;\n\t}",
"double getAgeDays();",
"public int getLBR_ProtestDays();",
"public static int getNoOfDaysBetweenDates(Date fromDate, Date toDate) {\n\t\tint noOfDays = 0;\n\t\tif(fromDate.compareTo(toDate)>0){\n\t\tnoOfDays = fromDate.subtract(toDate);\n\t\tnoOfDays = -(noOfDays + 1);\n\t\t}else if(fromDate.compareTo(toDate)==0){\n\t\t\tnoOfDays = fromDate.subtract(toDate);\n\t\t\tnoOfDays = noOfDays + 1;\n\t\t}else{\n\t\t\tnoOfDays = toDate.subtract(fromDate);\n\t\t\tnoOfDays = noOfDays + 1;\n\t\t}\n\t\treturn noOfDays;\n\t}",
"public static Long countActivities(){\n List<String> activities = distinctActivities();\n Long count = activities.stream().count();\n return count;\n }",
"@SuppressWarnings(\"deprecation\")\n\t@RequestMapping(value = \"get_number_of_registred_users\", method = { RequestMethod.GET })\n\tpublic int getNumberOfRegistredUsers(@RequestParam(\"days\") int days) throws IOException {\n\t\tSystem.out.println(days + \"\");\n\t\tint result = 0;\n\t\tMongoClient mongoClient = null;\n\t\ttry {\n\t\t\t// Create the date before n days\n\t\t\tDate startDate = new Date();\n\t\t\tstartDate.setDate(startDate.getDate() - days);\n\t\t\tstartDate.setHours(0);\n\t\t\tstartDate.setMinutes(0);\n\t\t\tstartDate.setSeconds(0);\n\n\t\t\t// Create Mongo client\n\t\t\tmongoClient = new MongoClient(\"localhost\", 27017);\n\t\t\tMongoDatabase db = mongoClient.getDatabase(\"projectDB\");\n\n\t\t\t// Create Users collection\n\t\t\tMongoCollection<Document> collection = db.getCollection(\"USERS\");\n\n\t\t\t// Get all user before n days\n\t\t\tFindIterable<Document> iterDoc = collection.find(gt(\"RegistrationDate\", startDate));\n\t\t\tIterator it = iterDoc.iterator();\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tit.next();\n\t\t\t\tresult++;\n\t\t\t}\n\n\t\t\t// Close DB connection\n\t\t\tmongoClient.close();\n\n\t\t} catch (Exception e) {\n\t\t\tmongoClient.close();\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\treturn result;\n\n\t}",
"public int determineDayRandomly() {\n\t\treturn 0;\r\n\t}",
"public static long getDiffDays(Date date1,Date date2) {\n Calendar calendar1= Calendar.getInstance();\n Calendar calendar2 = Calendar.getInstance();\n\n calendar1.setTime(date1);\n calendar2.setTime(date2);\n\n long msDiff = calendar1.getTimeInMillis()-calendar2.getTimeInMillis();\n long daysDiff = TimeUnit.MILLISECONDS.toDays(msDiff);\n Log.e(\"Amarneh\",\"diffDays>>\"+daysDiff);\n return daysDiff;\n }",
"public static int numOfWorkingDays(PublicHolidayRepository phRep, LocalDate start, LocalDate end) {\r\n\t\t\r\n\t\tint count = 0;\r\n\t\tArrayList<Date> phDates1 = phRep.findAllPublicHolidayDates();\r\n\t\tArrayList<LocalDate> phDates=new ArrayList<LocalDate>();\r\n\t\tfor(Date d:phDates1)\r\n\t\t{\r\n\t\t\tphDates.add(d.toLocalDate());\r\n\t\t}\r\n\t\tfor(LocalDate date = start; date.isBefore(end.plusDays(1)); date = date.plusDays(1)) {\r\n\t\t\tSystem.out.println(date.getDayOfWeek());\r\n\t\t\tif(date.getDayOfWeek() == DayOfWeek.SATURDAY)\r\n\t\t\t\tcontinue;\r\n\t\t\tif(date.getDayOfWeek() == DayOfWeek.SUNDAY)\r\n\t\t\t\tcontinue;\r\n\t\t\tif(phDates.contains(date))\r\n\t\t\t\tcontinue;\r\n\t\t\tcount++;\r\n\t\t}\r\n\t\treturn count;\r\n\t}",
"public long days(Date date2) {\n\t\tlong getDaysDiff =0;\n\t\t DateFormat simpleDateFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\n\n\t\t Date currentDate = new Date();\n\t\t Date date1 = null;\n\t\t Date date3 = null;\n\n\t\t\n\n\t\t try {\n\t\t String startDate = simpleDateFormat.format(date2);\n\t\t String endDate = simpleDateFormat.format(currentDate);\n\n\t\t date1 = simpleDateFormat.parse(startDate);\n\t\t date3 = simpleDateFormat.parse(endDate);\n\n\t\t long getDiff = date3.getTime() - date1.getTime();\n\n\t\t getDaysDiff = getDiff / (24 * 60 * 60 * 1000);\n\t\t \n\t\t \n\t\t \n\t\t } catch (Exception e) {\n\t\t e.printStackTrace();\n\t\t }\n\t\t return getDaysDiff;\n\n}",
"@Override\n public int size() {\n if (date2 != Long.MIN_VALUE) return 2;\n if (date1 != Long.MIN_VALUE) return 1;\n return 0;\n }",
"public abstract int getDeviation(\n CalendarDate calendarDay,\n TZID tzid\n );",
"private static int getNumDates() {\n Scanner input = new Scanner(System.in);\n\n System.out.print(\"Enter number of dates (1 or 2): \");\n\n int numDates = input.nextInt();\n while (numDates != 1 && numDates != 2) {\n System.out.print(\"Enter number of dates (1 or 2): \");\n numDates = input.nextInt();\n }\n return numDates;\n }",
"int getEducationsCount();",
"private int jobLength(){\n LocalDate completedLocalDate = LocalDate.of(this.dateCompleted.getYear(), \n this.dateCompleted.getMonth(), this.dateCompleted.getDay());\n \n LocalDate startedLocalDate = LocalDate.of(this.dateStarted.getYear(), \n this.dateStarted.getMonth(), this.dateStarted.getDay());\n \n return startedLocalDate.until(completedLocalDate).getDays();\n }",
"public static long CountDaysBetween(String D1, String D2) {\n\t\tfinal DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy/MM/dd\");\n\t\tfinal LocalDate firstDate = LocalDate.parse(D1, formatter);\n\t\tfinal LocalDate secondDate = LocalDate.parse(D2, formatter);\n\t\tfinal long days = ChronoUnit.DAYS.between(firstDate, secondDate);\n\t\t// System.out.println(\"Days between: \" + days);\n\t\treturn days;\n\t}",
"public Number getDaysPerMonth()\r\n {\r\n return (m_daysPerMonth);\r\n }",
"public int getDayDistance() {\n\t\treturn dayDistance;\n\t}",
"public int getDaysAdded() {\n return daysAdded;\n }",
"public int getDaysSinceStartOfEpoch() {\r\n long millis = new GregorianCalendar(year, month - 1, day).getTimeInMillis();\r\n return (int) (millis / MILLIS_PER_DAY);\r\n\r\n }",
"Integer countAll();",
"public int getDistanceInDays(DMYcount DMYcount) {\r\n tmp.set(cur);\r\n int distance = 0;\r\n while (tmp.compare(DMYcount) < 0) {\r\n DMYcount d1 = new DMYcount(0,0,0);\r\n d1.set(tmp);\r\n nextWeek();\r\n distance += daysInWeek;\r\n if (tmp.compare(DMYcount) > 0) {\r\n tmp.set(d1);\r\n nextDay();\r\n distance -= daysInWeek - 1;\r\n }\r\n }\r\n while (tmp.compare(DMYcount) > 0) {\r\n DMYcount d1 = new DMYcount(0,0,0);\r\n d1.set(tmp);\r\n previousWeek();\r\n distance -= daysInWeek;\r\n if (tmp.compare(DMYcount) < 0) {\r\n tmp.set(d1);\r\n previousDay();\r\n distance += daysInWeek - 1;\r\n }\r\n }\r\n if (distance <= 0){\r\n return -distance;\r\n }\r\n return distance;\r\n }",
"List<Day> getDays(String userName);",
"public static int diasQADescanso(LocalDate start, LocalDate end) {\r\n List<DayOfWeek> ignore = new ArrayList<>();\r\n ignore.add(DayOfWeek.SATURDAY);\r\n ignore.add(DayOfWeek.SUNDAY);\r\n int r = 0;\r\n while (end.isAfter(start) || end.equals(start)) {\r\n if (ignore.contains(start.getDayOfWeek())) {\r\n r++;\r\n }\r\n // TODO faltan los asueto\r\n start = start.plusDays(1);\r\n }\r\n return r;\r\n }",
"public int activeDays() {return activeDay;}",
"int getFundsCount();",
"int getFundsCount();",
"public int getKeepLogDays() {\n\t\tInteger ii = (Integer) get_Value(\"KeepLogDays\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}"
]
| [
"0.72968304",
"0.69044954",
"0.6676252",
"0.65981734",
"0.6581831",
"0.6480256",
"0.6396942",
"0.63338006",
"0.6290713",
"0.627737",
"0.627737",
"0.62320715",
"0.61852413",
"0.6174623",
"0.6161131",
"0.61208946",
"0.61204165",
"0.60992134",
"0.6076923",
"0.6070818",
"0.60366654",
"0.6005247",
"0.5979843",
"0.59444445",
"0.5900834",
"0.5880965",
"0.5870601",
"0.58501506",
"0.58495164",
"0.58336866",
"0.5817287",
"0.5806353",
"0.5805175",
"0.5798123",
"0.57926184",
"0.57814103",
"0.5781168",
"0.5769521",
"0.5761271",
"0.57387394",
"0.56992424",
"0.5683214",
"0.5661697",
"0.5652778",
"0.56484187",
"0.56436485",
"0.56391877",
"0.5620966",
"0.5609481",
"0.5606196",
"0.55976725",
"0.5575942",
"0.5565152",
"0.5536491",
"0.5530298",
"0.55255395",
"0.5515797",
"0.55153984",
"0.5505638",
"0.5479391",
"0.5478228",
"0.54617923",
"0.5452849",
"0.5446991",
"0.5446322",
"0.54461944",
"0.5445419",
"0.54445297",
"0.5416328",
"0.54108334",
"0.5409988",
"0.5405272",
"0.5403554",
"0.53975266",
"0.53928876",
"0.53926396",
"0.53913844",
"0.5391261",
"0.5378964",
"0.5372637",
"0.5371243",
"0.5366339",
"0.536586",
"0.5364033",
"0.53614724",
"0.5352053",
"0.5291202",
"0.5283976",
"0.527293",
"0.5272408",
"0.5267942",
"0.5266425",
"0.5263252",
"0.5262365",
"0.5262326",
"0.52546",
"0.52496344",
"0.5235825",
"0.5235825",
"0.52340853"
]
| 0.689855 | 2 |
method that counts how many times has each activity appeared over the entire period | public static Map<String, Long> countActivitiesWholePeriod(List<MonitoredData> data){
ArrayList<String> activities = new ArrayList<>();
for(int i=0; i<data.size(); i++){
activities.add(data.get(i).getActivity());
}
Map<String, Long> counts =
activities.stream().collect(Collectors.groupingBy(e -> e, Collectors.counting()));
return counts;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int countDays(List<MonitoredData> data){\n System.out.println(\"3) How many times has appeared each activity for each day: \");\n long result = 0;\n ArrayList<String> days = new ArrayList<>();\n ArrayList<MonitoredData> dataTrunc = new ArrayList<>();\n for (int i=0; i<data.size(); i++){\n String day = \"\";\n day += data.get(i).getStartTime().charAt(8);\n day += data.get(i).getStartTime().charAt(9);\n days.add(day);\n }\n for (int i=0; i<data.size(); i++){\n dataTrunc.add(data.get(i));\n if (i<days.size()-1){\n if (!days.get(i+1).equals(days.get(i))){\n System.out.println(\" Day \" + days.get(i) + \" ::: \" + countActivitiesWholePeriod(dataTrunc));\n dataTrunc.clear();\n }\n }else{\n System.out.println(\" Day \" + days.get(i) + \" ::: \" + countActivitiesWholePeriod(dataTrunc));\n }\n }\n Stream<String> daysStream = days.stream();\n result = daysStream\n .distinct()\n .count();\n return (int)result;\n }",
"public static Long countActivities(){\n List<String> activities = distinctActivities();\n Long count = activities.stream().count();\n return count;\n }",
"public abstract void countLaunchingActivities(int num);",
"public int getNumberOfActivitesOnActivityFeed(Identity ownerIdentity);",
"public ArrayList<String> getCountStatics() {\n\t\tint countsPerMinute = 0;\n\t\tint countsPerHour = 0;\n\t\tint countsPerDay = 0;\n\t\tint countsPerWeek = 0;\n\t\tint countsPerMonth = 0;\n\n\t\t// get a comparison time and start comparing the times against it\n\t\tArrayList<String> myArrayString = new ArrayList<String>();\n\t\tCalendar currDate = Calendar.getInstance();\n\t\tfor (int i = 0; i < clickerCountObject.getClickerTimestamps().size(); i++) {\n\t\t\tSystem.out.println(clickerCountObject.getClickerTimestamps().get(i)\n\t\t\t\t\t.get(Calendar.MINUTE) <= currDate.get(Calendar.MINUTE));\n\t\t\tif (currDate.get(Calendar.MINUTE) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MINUTE)\n\t\t\t\t\t&& currDate.get(Calendar.MINUTE) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MINUTE)) {\n\t\t\t\tcountsPerMinute += 1;\n\t\t\t}\n\t\t\tif (currDate.get(Calendar.HOUR_OF_DAY) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.HOUR_OF_DAY)\n\t\t\t\t\t&& currDate.get(Calendar.HOUR_OF_DAY) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i)\n\t\t\t\t\t\t\t.get(Calendar.HOUR_OF_DAY)) {\n\t\t\t\tcountsPerHour += 1;\n\t\t\t}\n\t\t\tif ((currDate.get(Calendar.DAY_OF_MONTH) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.DAY_OF_MONTH))\n\t\t\t\t\t&& (currDate.get(Calendar.DAY_OF_MONTH) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i)\n\t\t\t\t\t\t\t.get(Calendar.DAY_OF_MONTH))) {\n\t\t\t\tcountsPerDay += 1;\n\t\t\t}\n\t\t\tif ((currDate.get(Calendar.WEEK_OF_MONTH) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.WEEK_OF_MONTH))\n\t\t\t\t\t&& (currDate.get(Calendar.WEEK_OF_MONTH) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i)\n\t\t\t\t\t\t\t.get(Calendar.WEEK_OF_MONTH))) {\n\t\t\t\tcountsPerWeek += 1;\n\t\t\t}\n\t\t\tif ((currDate.get(Calendar.MONTH) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MONTH))\n\t\t\t\t\t&& (currDate.get(Calendar.MONTH) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MONTH))) {\n\t\t\t\tcountsPerMonth += 1;\n\t\t\t}\n\t\t}\n\t\tmyArrayString.add(\"Counts per Minute \"\n\t\t\t\t+ Integer.toString(countsPerMinute));\n\t\tmyArrayString.add(\"Counts per Hour \" + Integer.toString(countsPerHour));\n\t\tmyArrayString.add(\"Counts per Day \" + Integer.toString(countsPerDay));\n\t\tmyArrayString.add(\"Counts per Week \" + Integer.toString(countsPerWeek));\n\t\tmyArrayString.add(\"Counts per Month \"\n\t\t\t\t+ Integer.toString(countsPerMonth));\n\n\t\tSystem.out.println(myArrayString);\n\t\treturn myArrayString;\n\t}",
"int getQualifiedActivityCount(long studentId, Date start, Date end);",
"@Override\r\n\tpublic Map<String, Integer> getActivityStatistic() {\n\t\tMap<String, Integer> result = new HashMap<String, Integer>();\r\n\t\tList<Activity> activities = activityDao.getAllActivities();\r\n\t\tfor(Activity activity:activities){\r\n\t\t\tresult.put(activity.getName(), activityRecordDao.getAttendCountById(activity.getId()));\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public Map<Integer, Map<String, Integer>> activityPerDay(List<MonitoredData> timeline) {\n return timeline\n .stream()\n .collect(\n Collectors\n .groupingBy(\n m -> m.getStart_time().getDayOfYear(),\n Collectors\n .groupingBy(\n m -> m.getActivity_label(),\n Collectors\n .collectingAndThen(Collectors.counting(), Long::intValue))));\n }",
"public int getHowManyInPeriod();",
"public int getNumberOfNewerOnActivityFeed(Identity ownerIdentity, Long sinceTime);",
"public int getNumberOfNewerOnSpaceActivities(Identity spaceIdentity, Long sinceTime);",
"@Override\n\tprotected int getActiveCount(long units) {\n\t\treturn units % period == 0 ? 1 : 0;\n\t}",
"public Map<String, Integer> nrActivities(List<MonitoredData> timeline) {\n return timeline\n .stream()\n .map(\n m -> m.getActivity_label())\n .collect(\n Collectors.groupingBy(\n m -> m,\n Collectors\n .collectingAndThen(Collectors.counting(), Long::intValue)));\n }",
"public int getNumberOfNewerOnActivityFeed(Identity ownerIdentity, ExoSocialActivity baseActivity);",
"public int getNumberOfNewerOnUserSpacesActivities(Identity ownerIdentity, ExoSocialActivity baseActivity);",
"public Integer excerciseStateCount(Activity activity, ExerciseState state);",
"public int getNumberOfNewerOnSpaceActivities(Identity spaceIdentity,\n ExoSocialActivity baseActivity);",
"int countByExample(ScheduleCriteria example);",
"public int getNumberOfNewerOnUserActivities(Identity ownerIdentity, ExoSocialActivity baseActivity);",
"public int getTotalActivitySwitches() {\n return (int) neurons.stream().filter(n -> n.getValueRange() > 0).count();\n }",
"private void appointmentReport() {\n Set<String> types = new HashSet<>();\n Set<Month> months = new HashSet<>();\n HashMap<String, Integer> numberByType = new HashMap<>();\n HashMap<Month, Integer> numberByMonth = new HashMap<>();\n\n for (Appointment appointment: Data.getAppointments()) {\n months.add(appointment.getStart().toLocalDateTime().getMonth());\n types.add(appointment.getType());\n }\n\n for (String type: types) {\n int count = 0;\n for (Appointment appointment: Data.getAppointments()) {\n\n if (type.equals(appointment.getType())) {\n count++;\n }\n numberByType.put(type, count);\n }\n }\n for (Month month: months) {\n int count = 0;\n for (Appointment appointment: Data.getAppointments()) {\n if (month.equals(appointment.getStart().toLocalDateTime().getMonth())) {\n count++;\n }\n numberByMonth.put(month, count);\n }\n }\n\n reportText.appendText(\"Report of the number of appointments by type:\\n\\n\");\n reportText.appendText(\"Count \\t\\tType\\n\");\n numberByType.forEach((k,v) -> reportText.appendText(v + \"\\t\\t\" + k + \"\\n\"));\n reportText.appendText(\"\\n\\n\\nReport of the number of appointments by Month:\\n\\n\");\n reportText.appendText(\"Count \\t\\tMonth\\n\");\n numberByMonth.forEach((k,v) -> reportText.appendText(v + \"\\t\\t\" + k + \"\\n\"));\n\n }",
"int getTransitFlightsCount();",
"long countWorkflows();",
"long countByExample(UvStatDayExample example);",
"long countByExample(ActivityHongbaoPrizeExample example);",
"public int getNumTimes();",
"long getUnjoinedEventsCount();",
"private int count_events(List<Integer> events, int start_ts) {\n int l = 0, r = events.size() - 1;\n if (r == -1)\n return 0;\n if (events.get(r) < start_ts)\n return 0;\n int b = 0;\n while (l + 1 < r) {\n int mid = (l+r) / 2;\n if (events.get(mid) >= start_ts) {\n r = mid;\n } else {\n l = mid;\n }\n }\n if (events.get(r) >= start_ts) {\n b = r;\n }\n if (events.get(l) >= start_ts) {\n b = l;\n }\n int cnt = events.size() - 1 - b + 1;\n // System.out.println(cnt);\n return cnt;\n\t\t}",
"int countByExample(QtActivitytypeExample example);",
"public int getNumberOfNewerOnUserActivities(Identity ownerIdentity, Long sinceTime);",
"long countByExample(FactRoomLogExample example);",
"Long getRunningCount();",
"public int getNumberOfOlderOnActivityFeed(Identity ownerIdentity, Long sinceTime);",
"long countByExample(EventsWaitsSummaryByInstanceExample example);",
"public int getNumberOfNewerOnUserSpacesActivities(Identity ownerIdentity, Long sinceTime);",
"public int getNumberOfSpaceActivities(Identity spaceIdentity);",
"public int getNumberOfOlderOnUserSpacesActivities(Identity ownerIdentity, ExoSocialActivity baseActivity);",
"public int getNumberOfOlderOnActivityFeed(Identity ownerIdentity, ExoSocialActivity baseActivity);",
"@Override\n\tpublic int periodAllcount() throws Exception {\n\t\treturn dao.periodAllcount();\n\t}",
"public int getNumberOfOlderOnUserActivities(Identity ownerIdentity, ExoSocialActivity baseActivity);",
"long getJoinedEventsCount();",
"int getActAmountCount();",
"int getResumesCount();",
"public int getNumberOfActivitesOnActivityFeedForUpgrade(Identity ownerIdentity);",
"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}",
"long countByExample(FinMonthlySnapModelExample example);",
"public int getNumberOfNewerOnActivitiesOfConnections(Identity ownerIdentity, ExoSocialActivity baseActivity);",
"int getStatsCount();",
"int getStatsCount();",
"int getStatsCount();",
"int getTimeInstants();",
"public int getNumberOfOlderOnSpaceActivities(Identity spaceIdentity,\n ExoSocialActivity baseActivity);",
"private void reactMain_region_digitalwatch_Time_counting_Counting() {\n\t\tif (timeEvents[0]) {\n\t\t\tnextStateIndex = 0;\n\t\t\tstateVector[0] = State.$NullState$;\n\n\t\t\ttimer.unsetTimer(this, 0);\n\n\t\t\ttimer.setTimer(this, 0, 1 * 1000, false);\n\n\t\t\tsCILogicUnit.operationCallback.increaseTimeByOne();\n\n\t\t\tnextStateIndex = 0;\n\t\t\tstateVector[0] = State.main_region_digitalwatch_Time_counting_Counting;\n\t\t}\n\t}",
"int getDeliveredCount();",
"int getAoisCount();",
"default int countExecutions(ZonedDateTime startDate, ZonedDateTime endDate) {\n return getExecutionDates(startDate, endDate).size();\n }",
"public void makeSampleActivityMoments() {\n\t\tdouble sumActivity = 0;\n\t\tfor (int i = 0; i < SubjectsList.size(); i ++) {\n\t\t\tdouble ca = SubjectsList.get(i).getSubjectActivityCount();\n\t\t\tsumActivity += ca;\n\t\t}\n\t\t//System.out.println(sumActivity/sampleSize);\n\t}",
"public int getNumberOfUserActivities(Identity owner) throws ActivityStorageException;",
"@Override\n\tpublic List<?> getNumberOfPatientPerDay() {\n\t\treturn ar.findAppointmentCount();\n\t}",
"public int periodCount() {\n\t\treturn message.getPeriodCount();\n\t}",
"public int numberOfOccorrence();",
"public int getActiveRunwaysCount();",
"long countByExample(BpmInstanciaHistoricaExample example);",
"long getReceivedEventsCount();",
"int getEventMetadataCount();",
"int getTimesCombatActionsCalled();",
"private int getNumberOfEventsByMinuteOrHour(boolean isByMinute) {\n int counter = 0;\n long currentTimeSeconds = getCurrentTimeInSeconds();\n long currentTimeIndex = (currentTimeSeconds - startTime) % SECONDS_IN_DAY;\n int timePeriod = isByMinute ? SECONDS_IN_MINUTE : SECONDS_IN_HOUR;\n\n if (currentTimeIndex + 1 - timePeriod >= 0) {\n for (int i = (int) currentTimeIndex; i > currentTimeIndex - timePeriod; i--) {\n synchronized (records[i]) {\n if (currentTimeSeconds - records[i].getLastTimeReset() < SECONDS_IN_DAY) {\n counter += records[i].getCount();\n }\n }\n }\n } else {\n for (int i = (int) currentTimeIndex; i >= 0; i--) {\n synchronized (records[i]) {\n if (currentTimeSeconds - records[i].getLastTimeReset() < SECONDS_IN_DAY) {\n counter += records[i].getCount();\n }\n }\n }\n\n for (int i = records.length - 1; i > records.length + currentTimeIndex - timePeriod; i--) {\n synchronized (records[i]) {\n if (currentTimeSeconds - records[i].getLastTimeReset() < SECONDS_IN_DAY) {\n counter += records[i].getCount();\n }\n }\n }\n }\n\n return counter;\n }",
"int getRepeatCount();",
"@GetMapping(\"/activity\")\n Stats all() {\n Stats stats = new Stats();\n log.info(\"getting daily activity by default\");\n List<Activity> allActivity = repository.findAll();\n log.info(\"allActivity: \" + allActivity);\n Collections.sort(allActivity);\n Map<String, Integer> stepsByCategory = new TreeMap<String, Integer>();\n for (Activity activity : allActivity) {\n Calendar cal = Calendar.getInstance();\n cal.setTime(activity.getUntilTime());\n int day = cal.get(Calendar.DAY_OF_YEAR);\n int year = cal.get(Calendar.YEAR);\n String dayOfYear = DAY + day + OF_YEAR + year;\n Integer steps = stepsByCategory.get(dayOfYear);\n if (steps == null) {\n steps = activity.getSteps();\n } else {\n steps += activity.getSteps();\n }\n stepsByCategory.put(dayOfYear, steps);\n }\n stats.setCategory(StatsCategory.DAILY);\n List<Details> details = new ArrayList<Stats.Details>();\n if(stepsByCategory != null) {\n for (Entry entry : stepsByCategory.entrySet()) {\n Details stat = stats.new Details();\n stat.key = entry.getKey().toString();\n stat.steps = entry.getValue().toString();\n details.add(stat);\n }\n stats.setDetails(details);\n }\n //stats.setStepsByCategory(stepsByCategory);\n return stats;\n }",
"int getActionLogCount();",
"public void makeSampleActivitySum() {\n\t\tdouble sumActivity = 0;\n\t\tfor (int i = 0; i < SubjectsList.size(); i ++) {\n\t\t\tdouble ca = SubjectsList.get(i).getSubjectActivitySum();\n\t\t\tsumActivity += ca;\n\t\t}\n\t\t//System.out.println(sumActivity/sampleSize);\n\t}",
"public int getNumberOfOlderOnActivitiesOfConnections(Identity ownerIdentity, ExoSocialActivity baseActivity);",
"public int getNumberOfComments(ExoSocialActivity existingActivity);",
"int getSeasonShareCount();",
"int getMetricsCount();",
"int getCurrentTermActivityCount(long studentId, long universityId);",
"int getTotalCount();",
"public int getNumberOfOlderOnSpaceActivities(Identity ownerIdentity, Long sinceTime);",
"int getSeenInfoCount();",
"int countByExample(AoD5e466WorkingDayExample example);",
"public static void count(int[] counts){\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\tint number; // holds user input\r\n\t\tdo {\r\n\t\t\tnumber = input.nextInt();\r\n\t\t\tif (number >= 1 && number <= 100)\t\r\n\t\t\t\tcounts[number - 1]++;\r\n\t\t} while (number != 0);\r\n\t\t\r\n\t}",
"void reportCount(long ts, double factor) {\n\t\tthis.counter.reportCount(ts, factor);\n\t}",
"private int jobLength(){\n LocalDate completedLocalDate = LocalDate.of(this.dateCompleted.getYear(), \n this.dateCompleted.getMonth(), this.dateCompleted.getDay());\n \n LocalDate startedLocalDate = LocalDate.of(this.dateStarted.getYear(), \n this.dateStarted.getMonth(), this.dateStarted.getDay());\n \n return startedLocalDate.until(completedLocalDate).getDays();\n }",
"public Integer getCount(Class<?> type) {\n return events.containsKey(type) ? events.get(type).size() : 0;\n }",
"public int getNumberOfNewerOnActivitiesOfConnections(Identity ownerIdentity, Long sinceTime);",
"public int countByTodoDateTime(Date todoDateTime);",
"int getTaskDetailsCount();",
"Integer getNumberOfUserActivity() {\n return daoInterface.getNumberOfUserActivity();\n }",
"Map<StateT, Map<ConditionT, Long>> getNumExecutions();",
"int getStatusCount();",
"int getDataCount();",
"int getDataCount();",
"int getDataCount();",
"int getDataCount();",
"int getDataCount();",
"public int getNumberOfOlderOnUserActivities(Identity ownerIdentity, Long sinceTime);",
"public int getNumberOfUpdatedOnSpaceActivities(Identity owner, ActivityUpdateFilter filter);",
"public int getNumberOfNewerComments(ExoSocialActivity existingActivity, Long sinceTime);",
"public int getNumberOfUpdatedOnActivityFeed(Identity owner, ActivityUpdateFilter filter);",
"long countByExample(PineAlarmExample example);"
]
| [
"0.69762367",
"0.68396",
"0.65635884",
"0.64446175",
"0.64343023",
"0.62966657",
"0.6296562",
"0.6263043",
"0.61734045",
"0.6172995",
"0.61703616",
"0.6119458",
"0.6091675",
"0.60696435",
"0.60496974",
"0.6038217",
"0.6026862",
"0.59976345",
"0.59959704",
"0.5974821",
"0.5973841",
"0.59584767",
"0.59551084",
"0.59282476",
"0.59108394",
"0.5877746",
"0.58695614",
"0.5857687",
"0.58540845",
"0.5837618",
"0.5825135",
"0.58186114",
"0.58098036",
"0.5807947",
"0.5802095",
"0.5784838",
"0.57844555",
"0.5780447",
"0.57678455",
"0.57336795",
"0.56908506",
"0.56832147",
"0.567172",
"0.56646764",
"0.5660116",
"0.5658133",
"0.5635525",
"0.5633208",
"0.5633208",
"0.5633208",
"0.5632104",
"0.56075263",
"0.560241",
"0.56010497",
"0.5590872",
"0.55899096",
"0.5587958",
"0.558467",
"0.558064",
"0.55778646",
"0.55747813",
"0.5568849",
"0.5567997",
"0.5565772",
"0.55597353",
"0.55547947",
"0.5549765",
"0.5539068",
"0.55359197",
"0.5533466",
"0.5528767",
"0.5526022",
"0.5517988",
"0.55151933",
"0.55139834",
"0.55122167",
"0.5505991",
"0.5504592",
"0.55027133",
"0.549355",
"0.54888076",
"0.54866534",
"0.5484667",
"0.54736036",
"0.54635876",
"0.54625213",
"0.54615945",
"0.5459781",
"0.54575217",
"0.5457472",
"0.54530317",
"0.54530317",
"0.54530317",
"0.54530317",
"0.54530317",
"0.54520965",
"0.5450592",
"0.54489934",
"0.5446204",
"0.5443936"
]
| 0.6831025 | 2 |
3) count how many times has appeared each activity for each day DONE in the countDays method above. :) 4) For each line from the file map for the activity label the duration recorded on that line (end time start time) | public static Map<String, Long> eachLineDuration(List<MonitoredData> data){
Map<String, String> hash = new HashMap<>();
Map<String, Long> hashWithMillis = new HashMap<>();
for (int i=0; i<data.size(); i++){
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.ENGLISH);
try {
String startTime = data.get(i).getStartTime();
Date firstDate = sdf.parse(startTime);
String endTime = data.get(i).getEndTime();
Date secondDate = sdf.parse(endTime);
long diffInMillies = Math.abs(secondDate.getTime() - firstDate.getTime());
DateFormat df = new SimpleDateFormat("HH 'hours', mm 'mins,' ss 'seconds'");
df.setTimeZone(TimeZone.getTimeZone("GMT+0"));
String difference = df.format(new Date(diffInMillies));
hash.put(data.get(i).getActivity(), difference);
System.out.println(" " + data.get(i).getActivity() + " ::: " + hash.get(data.get(i).getActivity()));
//-----For each activity compute the entire duration over the monitoring period
String acti = data.get(i).getActivity();
if (activityHasValue.containsKey(data.get(i).getActivity())){
long index = hashWithMillis.get(acti);
hashWithMillis.put(data.get(i).getActivity(), diffInMillies + index);
}else{
hashWithMillis.put(data.get(i).getActivity(), diffInMillies);
activityHasValue.put(data.get(i).getActivity(), diffInMillies);
}
}catch(Exception e){
e.printStackTrace();
}
}
System.out.print("\n\n5) Each activity duration over the whole period: \n");
System.out.println(hashWithMillis);
return hashWithMillis;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args){\n String filename = \"\";\n if (args.length >= 1){\n filename = args[0];\n } else {\n return;\n }\n\n int abs = 0;\n int diectic = 0;\n int timeOfDay = 0;\n\n Pattern absPattern = Pattern.compile(absoluteDateRegex);\n //Pattern absPattern = Pattern.compile(mmddyyyy);\n //Pattern absPattern = Pattern.compile(holidays);\n Pattern diecticPattern = Pattern.compile(diecticDateRegex);\n Pattern timeOfDayPattern = Pattern.compile(timeOfDayRegex);\n\n Matcher absMatcher = null;\n Matcher diecticMatcher = null;\n Matcher timeOfDayMatcher = null;\n\n //System.out.println(absoluteDateRegex + \"\\n\");\n //System.out.println(diecticDateRegex + \"\\n\");\n //System.out.println(timeOfDayRegex + \"\\n\");\n\n HashMap <String, Integer> absMap = new HashMap<>();\n HashMap <String, Integer> diecticMap = new HashMap<>();\n HashMap <String, Integer> timeOfDayMap = new HashMap<>();\n\n String tmp = \"\";\n\n try{\n BufferedReader reader = new BufferedReader(\n new FileReader(filename));\n String line;\n while ((line = reader.readLine()) != null){\n absMatcher = absPattern.matcher(line);\n diecticMatcher = diecticPattern.matcher(line);\n timeOfDayMatcher = timeOfDayPattern.matcher(line);\n\n while (absMatcher.find()){\n abs++;\n tmp = absMatcher.group();\n //System.out.println(tmp);\n\n if (absMap.containsKey(tmp)){\n absMap.put(tmp, absMap.get(tmp) + 1);\n } else {\n absMap.put(tmp, 1);\n }\n }\n while (diecticMatcher.find()){\n diectic++;\n tmp = diecticMatcher.group();\n\n if (diecticMap.containsKey(tmp)){\n diecticMap.put(tmp, diecticMap.get(tmp) + 1);\n } else {\n diecticMap.put(tmp, 1);\n }\n //System.out.println(diecticMatcher.group());\n }\n while (timeOfDayMatcher.find()){\n timeOfDay++;\n tmp = timeOfDayMatcher.group();\n\n if (timeOfDayMap.containsKey(tmp)){\n timeOfDayMap.put(tmp, timeOfDayMap.get(tmp) + 1);\n } else {\n timeOfDayMap.put(tmp, 1);\n }\n //System.out.println(timeOfDayMatcher.group());\n }\n }\n reader.close();\n\n /*\n System.out.println(\"Absolute dates = \" + abs);\n System.out.println(\"Diectic dates = \" + diectic);\n System.out.println(\"Both dates = \" + (abs + diectic));\n System.out.println(\"time-of-day expressions = \" + timeOfDay);\n */\n\n System.out.println(\"2.4: Absolute\");\n printOutMap(absMap, abs);\n\n System.out.println(\"\\n2.5: Absolute && Diectic\");\n HashMap<String, Integer>datesMap = new HashMap<>();\n datesMap.putAll(absMap);\n datesMap.putAll(diecticMap);\n printOutMap(datesMap, diectic+abs);\n\n System.out.println(\"\\n2.6: Time Of Day\");\n printOutMap(timeOfDayMap, timeOfDay);\n\n System.out.println(\"\\nAll RegExs combined\");\n HashMap<String, Integer> allMap = new HashMap<>();\n allMap.putAll(datesMap);\n allMap.putAll(timeOfDayMap);\n printOutMap(allMap, timeOfDay + diectic + abs);\n } catch (Exception e){\n System.err.format(\"Exception occurred trying to read '%s'.\",\n filename);\n e.printStackTrace();\n return;\n }\n }",
"public Map<Integer, Map<String, Integer>> activityPerDay(List<MonitoredData> timeline) {\n return timeline\n .stream()\n .collect(\n Collectors\n .groupingBy(\n m -> m.getStart_time().getDayOfYear(),\n Collectors\n .groupingBy(\n m -> m.getActivity_label(),\n Collectors\n .collectingAndThen(Collectors.counting(), Long::intValue))));\n }",
"public Map<String, Integer> totalDuration(List<MonitoredData> timeline) {\n return timeline\n .stream()\n .collect(\n Collectors\n .groupingBy(\n m -> m.getActivity_label(),\n Collectors\n .summingInt(\n MonitoredData::computeDuration)));\n }",
"public static int countDays(List<MonitoredData> data){\n System.out.println(\"3) How many times has appeared each activity for each day: \");\n long result = 0;\n ArrayList<String> days = new ArrayList<>();\n ArrayList<MonitoredData> dataTrunc = new ArrayList<>();\n for (int i=0; i<data.size(); i++){\n String day = \"\";\n day += data.get(i).getStartTime().charAt(8);\n day += data.get(i).getStartTime().charAt(9);\n days.add(day);\n }\n for (int i=0; i<data.size(); i++){\n dataTrunc.add(data.get(i));\n if (i<days.size()-1){\n if (!days.get(i+1).equals(days.get(i))){\n System.out.println(\" Day \" + days.get(i) + \" ::: \" + countActivitiesWholePeriod(dataTrunc));\n dataTrunc.clear();\n }\n }else{\n System.out.println(\" Day \" + days.get(i) + \" ::: \" + countActivitiesWholePeriod(dataTrunc));\n }\n }\n Stream<String> daysStream = days.stream();\n result = daysStream\n .distinct()\n .count();\n return (int)result;\n }",
"public static Map<String, Long> countActivitiesWholePeriod(List<MonitoredData> data){\n ArrayList<String> activities = new ArrayList<>();\n for(int i=0; i<data.size(); i++){\n activities.add(data.get(i).getActivity());\n }\n Map<String, Long> counts =\n activities.stream().collect(Collectors.groupingBy(e -> e, Collectors.counting()));\n return counts;\n }",
"public void processForDays(){\r\n\t\tboolean inDaySection = false;\r\n\t\tint dataSize;\r\n\t\tfor(int i=0; i<Constant.dataList.size(); i++){\r\n\t\t\tString line = Constant.dataList.get(i);\r\n\t\t\tString[] linesplit = line.split(\",\");\r\n\t\t\tdataSize = linesplit.length;\r\n\t\t\t\r\n\t\t\tif (i==0) {\r\n//\t\t\t\tConstant.dataList.set(i, \"Days,Dummy,\" + line);\r\n\t\t\t\tConstant.dayDataList.add(\"Days,Dummy,\"+linesplit[0]+\",\"+linesplit[1]+\",\"+\"Day00\");\r\n\t\t\t}\r\n\t\t\telse if(linesplit[1].equals(\"PM10\")){\r\n\t\t\t\tString m,a,e,n;\r\n//\t\t\t\tm = \"M,1000,\"+linesplit[0]+\"m,\"+linesplit[1];\r\n//\t\t\t\ta = \"A,1000,\"+linesplit[0]+\"a,\"+linesplit[1];\r\n//\t\t\t\te = \"E,1000,\"+linesplit[0]+\"e,\"+linesplit[1];\r\n//\t\t\t\tn = \"N,1000,\"+linesplit[0]+\"n,\"+linesplit[1];\r\n\t\t\t\t//morning,afternoon,evening\r\n\t\t\t\tfor(int j=0; j<4; j++){\r\n\t\t\t\t\tfor(int k=0; k<2; k++){\r\n\t\t\t\t\t\tif(j==0){\r\n\t\t\t\t\t\t\tif(k+7<dataSize){\r\n//\t\t\t\t\t\t\t\tm = m + \",\" + linesplit[k+7];\r\n\t\t\t\t\t\t\t\tm = \"Morning,1000,\"+linesplit[0]+\"m-\"+k+\",\"+linesplit[1]+\",\"+linesplit[k+7];\r\n\t\t\t\t\t\t\t\tConstant.dayDataList.add(m);\r\n\t\t\t\t\t\t\t}\r\n//\t\t\t\t\t\t\telse{\r\n//\t\t\t\t\t\t\t\tm = m + \",\";\r\n//\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if(j==1){\r\n\t\t\t\t\t\t\tif(k+13<dataSize){\r\n//\t\t\t\t\t\t\t\ta = a + \",\" + linesplit[k+13];\r\n\t\t\t\t\t\t\t\ta = \"Afternoon,1000,\"+linesplit[0]+\"a-\"+k+\",\"+linesplit[1]+\",\"+linesplit[k+13];\r\n\t\t\t\t\t\t\t\tConstant.dayDataList.add(a);\r\n\t\t\t\t\t\t\t}\r\n//\t\t\t\t\t\t\telse{\r\n//\t\t\t\t\t\t\t\ta = a + \",\";\r\n//\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if(j==2){\r\n\t\t\t\t\t\t\tif(k+19<dataSize){\r\n//\t\t\t\t\t\t\t\te = e + \",\" + linesplit[k+19];\r\n\t\t\t\t\t\t\t\te = \"Evening,1000,\"+linesplit[0]+\"e-\"+k+\",\"+linesplit[1]+\",\"+linesplit[k+19];\r\n\t\t\t\t\t\t\t\tConstant.dayDataList.add(e);\r\n\t\t\t\t\t\t\t}\r\n//\t\t\t\t\t\t\telse{\r\n//\t\t\t\t\t\t\t\te = e + \",\";\r\n//\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\tif(k<1){\r\n\t\t\t\t\t\t\t\tif(k+25<dataSize){\r\n//\t\t\t\t\t\t\t\t\tn = n + \",\" +linesplit[k+25];\r\n\t\t\t\t\t\t\t\t\tn = \"Night,1000,\"+linesplit[0]+\"n-\"+k+\",\"+linesplit[1]+\",\"+linesplit[k+25];\r\n\t\t\t\t\t\t\t\t\tConstant.dayDataList.add(n);\r\n\t\t\t\t\t\t\t\t}\r\n//\t\t\t\t\t\t\t\telse{\r\n//\t\t\t\t\t\t\t\t\tn = n + \",\";\r\n//\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\t\tif(k+1<dataSize){\r\n//\t\t\t\t\t\t\t\t\tn = n + \",\" +linesplit[k+1];\r\n\t\t\t\t\t\t\t\t\tn = \"Night,1000,\"+linesplit[0]+\"n-\"+k+\",\"+linesplit[1]+\",\"+linesplit[k+1];\r\n\t\t\t\t\t\t\t\t\tConstant.dayDataList.add(n);\r\n\t\t\t\t\t\t\t\t}\r\n//\t\t\t\t\t\t\t\telse{\r\n//\t\t\t\t\t\t\t\t\tn = n + \",\";\r\n//\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n//\t\t\t\t\tif(j==0){\r\n//\t\t\t\t\t\tConstant.dayDataList.add(m);\r\n//\t\t\t\t\t}\r\n//\t\t\t\t\telse if(j==1){\r\n//\t\t\t\t\t\tConstant.dayDataList.add(a);\r\n//\t\t\t\t\t}\r\n//\t\t\t\t\telse if(j==2){\r\n//\t\t\t\t\t\tConstant.dayDataList.add(e);\r\n//\t\t\t\t\t}\r\n//\t\t\t\t\telse{\r\n//\t\t\t\t\t\tConstant.dayDataList.add(n);\r\n//\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t}\r\n\t}",
"public String printActivityPatterns()\n\t{\n\t\tStringBuilder toReturn = new StringBuilder();\n\n\t\ttoReturn.append(\"ACTIVITY PATTERNS\\n\");\n\t\ttoReturn.append(\" Activity in one-hour segments - Species (Number of pictures in one hour segments/Total number of pics)\\n\");\n\n\t\tfor (Species species : analysis.getAllImageSpecies())\n\t\t{\n\t\t\tStringBuilder toAdd = new StringBuilder();\n\t\t\tList<ImageEntry> imagesWithSpecies = new ImageQuery().speciesOnly(species).query(analysis.getImagesSortedByDate());\n\t\t\tInteger totalImages = imagesWithSpecies.size();\n\t\t\t// Activity / All\n\t\t\ttoAdd.append(\" All months Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec\\n\");\n\t\t\ttoAdd.append(\" Hour Number Frequency Number Frequency Number Frequency Number Frequency Number Frequency Number Frequency Number Frequency Number Frequency Number Frequency Number Frequency Number Frequency Number Frequency Number Frequency\\n\");\n\n\t\t\tint[] totals = new int[13];\n\t\t\tint[] totalActivities = new int[13];\n\n\t\t\t// 12 months + all months\n\t\t\tfor (int i = -1; i < 12; i++)\n\t\t\t{\n\t\t\t\tInteger activity;\n\t\t\t\t// -1 = all months\n\t\t\t\tif (i == -1)\n\t\t\t\t\tactivity = analysis.activityForImageList(imagesWithSpecies);\n\t\t\t\telse\n\t\t\t\t\tactivity = analysis.activityForImageList(new ImageQuery().monthOnly(i).query(imagesWithSpecies));\n\t\t\t\ttotalActivities[i + 1] = activity;\n\t\t\t}\n\n\t\t\t// 24 hrs\n\t\t\tfor (int i = 0; i < 24; i++)\n\t\t\t{\n\t\t\t\tList<ImageEntry> imagesWithSpeciesAtTime = new ImageQuery().timeFrame(i, i + 1).query(imagesWithSpecies);\n\t\t\t\ttoAdd.append(String.format(\"%02d:00-%02d:00 \", i, i + 1));\n\t\t\t\t// 12 months\n\t\t\t\tfor (int j = -1; j < 12; j++)\n\t\t\t\t{\n\t\t\t\t\tInteger activity;\n\t\t\t\t\t// -1 = all months\n\t\t\t\t\tif (j == -1)\n\t\t\t\t\t\tactivity = analysis.activityForImageList(imagesWithSpeciesAtTime);\n\t\t\t\t\telse\n\t\t\t\t\t\tactivity = analysis.activityForImageList(new ImageQuery().monthOnly(j).query(imagesWithSpeciesAtTime));\n\n\t\t\t\t\tif (activity != 0)\n\t\t\t\t\t\ttoAdd.append(String.format(\"%6d %10.3f\", activity, (double) activity / totalActivities[j + 1]));\n\t\t\t\t\telse\n\t\t\t\t\t\ttoAdd.append(\" \");\n\t\t\t\t\ttotals[j + 1] = totals[j + 1] + activity;\n\t\t\t\t}\n\t\t\t\ttoAdd.append(\"\\n\");\n\t\t\t}\n\n\t\t\ttoAdd.append(\"Total \");\n\n\t\t\tfor (int total : totals) toAdd.append(String.format(\"%6d 100.000\", total));\n\n\t\t\ttoAdd.append(\"\\n\");\n\n\t\t\t// Print the header first\n\t\t\ttoReturn.append(String.format(\"%-28s (%6d/ %6d)\\n\", species.getName(), totals[0], totalImages));\n\n\t\t\ttoReturn.append(toAdd);\n\n\t\t\ttoReturn.append(\"\\n\");\n\t\t}\n\n\t\treturn toReturn.toString();\n\t}",
"public void getCounts() {\t\r\n\t\t\r\n\t\tfor(int i = 0; i < 4; i++)\r\n\t\t\tfor(int j = 0; j < 3; j++)\r\n\t\t\t\tthecounts[i][j] = 0;\r\n\t\t\r\n\t\tfor(int i=0;i<maps.length-1;i++) {\r\n\t\t\tif(maps.Array1.charAt(i) == 'H' && maps.Array1.charAt(i+1) == 'E')\r\n\t\t\t\tthecounts[0][0]++;\r\n\t\t\telse if(maps.Array1.charAt(i) == 'E' && maps.Array1.charAt(i+1) =='-') \r\n\t\t\t\tthecounts[0][1]++;\r\n\t\t\telse if(maps.Array1.charAt(i) == '-' && maps.Array1.charAt(i+1) == 'H')\r\n\t\t\t\tthecounts[0][2]++;\r\n\t\t\tif(maps.Array2.charAt(i) == 'H' && maps.Array2.charAt(i+1) == 'E')\r\n\t\t\t\tthecounts[1][0]++;\r\n\t\t\telse if(maps.Array2.charAt(i) == 'E' && maps.Array2.charAt(i+1) == '-') \r\n\t\t\t\tthecounts[1][1]++;\r\n\t\t\telse if(maps.Array2.charAt(i) == '-' && maps.Array2.charAt(i+1) == 'H')\r\n\t\t\t\tthecounts[1][2]++;\r\n\t\t\tif(maps.Array3.charAt(i) == 'H' && maps.Array3.charAt(i+1) == 'E')\r\n\t\t\t\tthecounts[2][0]++;\r\n\t\t\telse if(maps.Array3.charAt(i) == 'E' && maps.Array3.charAt(i+1) == '-') \r\n\t\t\t\tthecounts[2][1]++;\r\n\t\t\telse if(maps.Array3.charAt(i) == '-' && maps.Array3.charAt(i+1) == 'H')\r\n\t\t\t\tthecounts[2][2]++;\r\n\t\t\tif(maps.Array4.charAt(i) == 'H' && maps.Array4.charAt(i+1) == 'E')\r\n\t\t\t\tthecounts[3][0]++;\r\n\t\t\telse if(maps.Array4.charAt(i) == 'E'&&maps.Array4.charAt(i+1) == '-') \r\n\t\t\t\tthecounts[3][1]++;\r\n\t\t\telse if(maps.Array4.charAt(i) == '-' && maps.Array1.charAt(i+1) == 'H')\r\n\t\t\t\tthecounts[3][2]++;\r\n\t\t}\r\n\t\t\r\n\t\t//Getting transition value between 1 and 0\r\n\t\tfor(int i=0;i<4;i++) {\r\n\t\t\tfor(int j=0;j<3;j++) {\r\n\t\t\t\tthecounts[i][j]/=maps.length;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Displaying the obtained values\r\n\t\tSystem.out.println(\"\\nTRANSITION\");\r\n\t\tSystem.out.println(\"HYDROPHOBICITY: 1->2: \" + thecounts[0][0] + \" 2->3: \" + thecounts[0][1] + \" 3->1: \" + thecounts[0][2]);\r\n\t\tSystem.out.println(\"POLARIZABILITY: 1->2: \" + thecounts[1][0] + \" 2->3: \" + thecounts[1][1] + \" 3-1: \" + thecounts[1][2]);\r\n\t\tSystem.out.println(\"POLARITY: 1->2: \" + thecounts[2][0] + \" 2->3: \" + thecounts[2][1] + \" 3->1: \" + thecounts[2][2]);\r\n\t\tSystem.out.println(\"VAN DER WALLS VOLUME: 1->2: \" + thecounts[3][0] + \" 2->3: \" + thecounts[3][1] + \" 3->1: \" + thecounts[3][2]);\r\n\t\t\r\n\t}",
"private void appointmentReport() {\n Set<String> types = new HashSet<>();\n Set<Month> months = new HashSet<>();\n HashMap<String, Integer> numberByType = new HashMap<>();\n HashMap<Month, Integer> numberByMonth = new HashMap<>();\n\n for (Appointment appointment: Data.getAppointments()) {\n months.add(appointment.getStart().toLocalDateTime().getMonth());\n types.add(appointment.getType());\n }\n\n for (String type: types) {\n int count = 0;\n for (Appointment appointment: Data.getAppointments()) {\n\n if (type.equals(appointment.getType())) {\n count++;\n }\n numberByType.put(type, count);\n }\n }\n for (Month month: months) {\n int count = 0;\n for (Appointment appointment: Data.getAppointments()) {\n if (month.equals(appointment.getStart().toLocalDateTime().getMonth())) {\n count++;\n }\n numberByMonth.put(month, count);\n }\n }\n\n reportText.appendText(\"Report of the number of appointments by type:\\n\\n\");\n reportText.appendText(\"Count \\t\\tType\\n\");\n numberByType.forEach((k,v) -> reportText.appendText(v + \"\\t\\t\" + k + \"\\n\"));\n reportText.appendText(\"\\n\\n\\nReport of the number of appointments by Month:\\n\\n\");\n reportText.appendText(\"Count \\t\\tMonth\\n\");\n numberByMonth.forEach((k,v) -> reportText.appendText(v + \"\\t\\t\" + k + \"\\n\"));\n\n }",
"public void countByCharacter() {\n if (super.getInput() == null) {\n return;\n }\n FileInputStream is;\n try {\n is = new FileInputStream(super.getInput());\n NxParser nxp = new NxParser();\n System.out.println(\"Parsing \" + super.getInput() + \"...\");\n nxp.parse(is);\n for (Node[] nx : nxp) {\n String nodeid = nx[0].toString();\n String predicate = nx[1].getLabel();\n if (!PredicateUtils.isSchemaOrgEvent(predicate)) {\n continue;\n }\n predicate = PredicateUtils.fixSchemaOrg(predicate);\n if (!ATTR.equalsIgnoreCase(PredicateUtils.getEventProperty(predicate))) {\n continue;\n }\n String obj = nx[2].getLabel();\n int length = obj.length();\n Integer count = mapEvents.get(nodeid);\n mapEvents.put(nodeid, (count == null ? length : count + length));\n Integer countLength = mapLengths.get(String.valueOf(length));\n mapLengths.put(String.valueOf(length), (countLength == null ? 1 : countLength + 1));\n }\n System.out.println(\"The total number of lines: \" + nxp.lineNumber());\n System.out.println(\"The total number of events: \" + mapEvents.size());\n System.out.println(\"Start sorting mapEvents...\");\n Map<String, Integer> mapEvent = VectorUtils.sortByValue(mapEvents, VectorUtils.SortBy.DESC);\n FileUtils.writeMapdataToFile(this.getOutput(\"event\"), mapEvent);\n System.out.println(\"Start sorting mapLengths...\");\n Map<String, Integer> mapLength = VectorUtils.sortByValue(mapLengths, VectorUtils.SortBy.DESC);\n FileUtils.writeMapdataToFile(this.getOutput(\"length\"), mapLength);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }",
"private int totalTime()\n\t{\n\t\t//i'm using this varaible enough that I should write a separate method for it\n\t\tint totalTime = 0;\n\t\tfor(int i = 0; i < saveData.size(); i++)//for each index of saveData\n\t\t{\n\t\t\t//get the start time\n\t\t\tString startTime = saveData.get(i).get(\"startTime\");\n\t\t\t//get the end time\n\t\t\tString endTime = saveData.get(i).get(\"endTime\");\n\t\t\t//****CONTINUE\n\t\t\t//total time in minutes\n\t\t}\n\t}",
"public Map<String, Integer> nrActivities(List<MonitoredData> timeline) {\n return timeline\n .stream()\n .map(\n m -> m.getActivity_label())\n .collect(\n Collectors.groupingBy(\n m -> m,\n Collectors\n .collectingAndThen(Collectors.counting(), Long::intValue)));\n }",
"public void countByAlpha() {\n if (super.getInput() == null) {\n return;\n }\n FileInputStream is;\n try {\n is = new FileInputStream(super.getInput());\n NxParser nxp = new NxParser();\n System.out.println(\"Parsing \" + super.getInput() + \"...\");\n nxp.parse(is);\n for (Node[] nx : nxp) {\n String nodeid = nx[0].toString();\n String predicate = nx[1].getLabel();\n if (!PredicateUtils.isSchemaOrgEvent(predicate)) {\n continue;\n }\n predicate = PredicateUtils.fixSchemaOrg(predicate);\n if (!ATTR.equalsIgnoreCase(PredicateUtils.getEventProperty(predicate))) {\n continue;\n }\n String obj = nx[2].getLabel();\n obj = NGramUtils.removePunctuaion(obj);\n int length = obj.length();\n Integer count = mapEvents.get(nodeid);\n mapEvents.put(nodeid, (count == null ? length : count + length));\n Integer countLength = mapLengths.get(String.valueOf(length));\n mapLengths.put(String.valueOf(length), (countLength == null ? 1 : countLength + 1));\n }\n System.out.println(\"The total number of lines: \" + nxp.lineNumber());\n System.out.println(\"The total number of events: \" + mapEvents.size());\n System.out.println(\"Start sorting mapEvents...\");\n Map<String, Integer> mapEvent = VectorUtils.sortByValue(mapEvents, VectorUtils.SortBy.DESC);\n FileUtils.writeMapdataToFile(this.getOutput(\"event\"), mapEvent);\n System.out.println(\"Start sorting mapLengths...\");\n Map<String, Integer> mapLength = VectorUtils.sortByValue(mapLengths, VectorUtils.SortBy.DESC);\n FileUtils.writeMapdataToFile(this.getOutput(\"length\"), mapLength);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }",
"public List<String> activityDuration(List<MonitoredData> timeline) {\n return timeline\n .stream()\n .collect(\n Collectors\n .groupingBy(\n MonitoredData::getActivity_label,\n Collectors\n .mapping(\n MonitoredData::computeDuration,\n Collectors\n .averagingDouble(duration -> (duration / 60) < 5 ? 1 : 0))))\n .entrySet()\n .stream()\n .filter(md -> md.getValue() > 0.9)\n .collect(\n Collectors\n .toMap(\n md -> md.getKey(),\n md -> md.getValue()))\n .keySet()\n .stream()\n .collect(\n Collectors\n .toList());\n }",
"public void printNumberOfTeamTypes(String csvName, String trajFileName, double speedThreshold, double timeThreshold) {\n Scanner csv = null;\n try {\n csv = new Scanner(new File(csvName)); //csv of answer list\n HashMap<String, ArrayList<AnswerTrajectory>> csvTraj = new HashMap<String, ArrayList<AnswerTrajectory>>(); //hash map that keys on trajectory id, storing all answer list trajectories in an array list\n HashMap<String, ArrayList<Trajectory>> trajectories = readTrajectories(trajFileName); //load the trajectory data into a hash map keyed by ID\n\n csv.nextLine();\n String currentId = \"\";\n ArrayList<AnswerTrajectory> anstj = new ArrayList<AnswerTrajectory>();\n ArrayList<String> Ids = new ArrayList<String>();\n\n\n while (csv.hasNextLine()) { //go through each answer entry and add trajectories of the answer list for each unique device id\n String[] line = csv.nextLine().split(\",\");\n if (currentId.equals(\"\")) {\n currentId = line[12];\n } else if (!currentId.equals(line[12])) {\n csvTraj.put(currentId, anstj);\n Ids.add(currentId); //if the id is new, then add it to the list of all known ids\n anstj = new ArrayList<AnswerTrajectory>();\n currentId = line[12];\n }\n anstj.add(new AnswerTrajectory(Double.parseDouble(line[13]), Double.parseDouble(line[14]), line[12], Double.parseDouble(line[9]), Integer.parseInt(line[0]), Integer.parseInt(line[16])));\n\n }\n\n HashMap<Integer, ArrayList<AnswerTrajectory>> teams = new HashMap<Integer, ArrayList<AnswerTrajectory>>(); //hash map that keys on trajectory id, storing all answer list trajectories in an array list\n\n int serious = 0;\n int giow = 0;\n int hurried = 0;\n int lazy = 0;\n System.out.println(\"Total IDS: \" + Ids.size());\n\n for (String s : Ids) {\n anstj = csvTraj.get(s); //get the hashmap arraylist that holds all trajectories for this device\n/*\n if (anstj == null)\n System.out.println(\"Could not find data for deviceId: \" + s);\n*/\n {\n Collections.sort(anstj, AnswerTrajectory.TSComparator); //sort answer list data by time\n double startTime = (anstj.get(0).getTimeStamp() - 1377334800000.0) / 1000.0;\n double speed = determineAverageSpeed(trajectories, anstj.get(0).getId());\n //System.out.println(speed+\" \"+startTime);\n if (speed != -1) // ensure the trajectory data exists for this ID\n {\n //classify the team type\n int teamType = 0;\n\n if (startTime < timeThreshold) {\n if (speed > speedThreshold) {// serious\n teamType = 1;\n serious++;\n } else {\n teamType = 2;// get it over with\n giow++;\n }\n } else {\n if (speed > speedThreshold) { // hurried\n teamType = 3;\n hurried++;\n } else {\n teamType = 4; //lazy\n lazy++;\n }\n }\n if (teams.get(teamType) == null) {\n System.out.println(\"first team type for: \" + teamType);\n teams.put(teamType, new ArrayList<AnswerTrajectory>(anstj));\n } else {\n teams.get(teamType).addAll(anstj);\n }\n }\n }\n }\n System.out.println(\"Serious: \" + serious + \"\\nGIOW: \" + giow + \"\\nHurried: \" + hurried + \"\\nLazy: \" + lazy);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n if (csv != null)\n csv.close();\n\n\n }\n }",
"static String timeCount_1(List<String> Arr){\n int timeHH = 0;\n int timeMI = 0;\n int timeSS = 0;\n \n String r_hh = \"\";\n String r_mi = \"\";\n String r_ss = \"\";\n\n for(int i = 0; i < Arr.size(); i++ ){\n \n if (Pattern.matches(\"\\\\d{2}:\\\\d{2}:\\\\d{2}\", Arr.get(i))){\n \n String[] s = Arr.get(i).split(\":\");\n int hh = Integer.parseInt(s[0]);\n int mi = Integer.parseInt(s[1]);\n int ss = Integer.parseInt(s[2]);\n \n timeHH += hh;\n timeMI += mi;\n timeSS += ss;\n \n }\n else{\n continue;\n }\n }\n \n timeMI += timeSS / 60;\n timeSS %= 60;\n \n timeHH += timeMI / 60;\n timeMI %= 60; \n\n \n if (timeHH < 10){\n r_hh = \"0\" + timeHH;\n }\n else{\n r_hh = Integer.toString(timeHH);\n }\n \n if (timeMI < 10){\n r_mi = \"0\" + timeMI;\n }\n else{\n r_mi = Integer.toString(timeMI);\n }\n \n if (timeSS < 10){\n r_ss = \"0\" + timeSS;\n }\n else{\n r_ss = Integer.toString(timeSS);\n }\n \n \n \n String result = r_hh + \":\" + r_mi + \":\" + r_ss;\n //String result = timeHH + \":\" + timeMI + \":\" + timeSS;\n \n return result;\n }",
"public final long countRecords(\tfinal String fileName, \n\t\t\t\t\t\t\t\t\tMap<String, Object> map) {\n\t\tlong counter = -1L;\n\t\t\n\t\tif( fileName != null ) {\n\t\t\tBufferedReader reader = null;\n\t\t\t\t\n\t\t\ttry {\n\t\t\t\tFileInputStream fis = new FileInputStream(fileName);\n\t\t\t\treader = new BufferedReader(new InputStreamReader(fis));\n\t\t\t\tString newLine = null;\n\t\t\t\tString extractedKeyword = null;\n\t\t\t\t\t\n\t\t\t\twhile ((newLine = reader.readLine()) != null) {\n\t\t\t\t\textractedKeyword = extractLabel(newLine);\n\t\t\t\t\tif( extractedKeyword != null ) {\n\t\t\t\t\t\tif( map != null ) {\n\t\t\t\t\t\t\tmap.put(extractedKeyword, null);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcounter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch( IOException e) {\n\t\t\t\tCLogger.error(\"CExtractor.countRecords: \" + e.toString());\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tif( reader != null ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treader.close();\n\t\t\t\t\t}\n\t\t\t\t\tcatch( IOException e) {\n\t\t\t\t\t\tCLogger.error(\"CExtractor.countRecords: \" + e.toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn counter;\n\t}",
"private void exportData() throws Exception{\n logger.info(\"Beginning export task...\");\n // Set up some maps to hold summary data\n Map<String, Integer> mostCommonCodeFirst = new HashMap<>();\n Map<String, Integer> mostCommonCodeSecond= new HashMap<>();\n Map<String, Integer> mostCommonCodeThird = new HashMap<>();\n\n // Get the delimiters\n StillFaceCode delim1 = null;\n StillFaceCode delim2 = null;\n\n for(StillFaceCode c : StillFaceModel.getCodeList()){\n if(c.getDelimiterIndex() == 1){\n delim1 = c;\n }\n else if(c.getDelimiterIndex() == 2){\n delim2 = c;\n }\n }\n\n // Collect the summary data\n int delimiterIndex = 0;\n for(StillFaceData data : StillFaceModel.getInstance().getVisibleDataList()){\n // Code stats\n String codeName = data.getCode().getName();\n if(data.getCode().getDelimiterIndex() > delimiterIndex){\n delimiterIndex = data.getCode().getDelimiterIndex();\n }\n // Get the common code counts for each video segment\n switch(delimiterIndex){\n case 0:\n if(mostCommonCodeFirst.containsKey(codeName)){\n int count = mostCommonCodeFirst.get(codeName);\n mostCommonCodeFirst.put(codeName, count + 1);\n }\n else{\n mostCommonCodeFirst.put(codeName, 1);\n }\n break;\n\n case 1:\n if(mostCommonCodeSecond.containsKey(codeName)){\n int count = mostCommonCodeSecond.get(codeName);\n mostCommonCodeSecond.put(codeName, count + 1);\n }\n else{\n mostCommonCodeSecond.put(codeName, 1);\n }\n break;\n\n case 2:\n if(mostCommonCodeThird.containsKey(codeName)){\n int count = mostCommonCodeThird.get(codeName);\n mostCommonCodeThird.put(codeName, count + 1);\n }\n else{\n mostCommonCodeThird.put(codeName, 1);\n }\n break;\n\n\n }\n\n }\n // Count everything up\n List<StillFaceCodeCount> firstCounts = new ArrayList<>();\n List<StillFaceCodeCount> secondCounts = new ArrayList<>();\n List<StillFaceCodeCount> thirdCounts = new ArrayList<>();\n for(Map.Entry<String, Integer> entry : mostCommonCodeFirst.entrySet()){\n firstCounts.add(new StillFaceCodeCount(entry.getKey(), entry.getValue()));\n }\n for(Map.Entry<String, Integer> entry : mostCommonCodeSecond.entrySet()){\n secondCounts.add(new StillFaceCodeCount(entry.getKey(), entry.getValue()));\n }\n for(Map.Entry<String, Integer> entry : mostCommonCodeThird.entrySet()){\n thirdCounts.add(new StillFaceCodeCount(entry.getKey(), entry.getValue()));\n }\n // Sort the counts\n Collections.sort(firstCounts);\n Collections.sort(secondCounts);\n Collections.sort(thirdCounts);\n // Write them to a file\n StillFaceCSVParser parser = new StillFaceCSVParser();\n List<List<StillFaceCodeCount>> summaryList = new ArrayList<>();\n summaryList.add(firstCounts);\n summaryList.add(secondCounts);\n summaryList.add(thirdCounts);\n boolean success = parser.serializeToCSVFromCodedVideoData(\n new StillFaceVideoData(StillFaceModel.getInstance().getVisibleDataList()), this.filepath)\n && parser.serializeSummaryToCSVFromLists(delim1, delim2, summaryList, this.summaryFilepath);\n if(!success){\n logger.warning(\"Export failed\");\n throw new Exception(\"Failed to export data. See log for more information.\");\n }\n }",
"public void parseLineAndCountTransitions(String line){\n\t\tString[] words=line.split(\" \");\n\t\t\n\t\tassert(words.length>0&&words.length%2==0);\n\t\t\n\t\t//add the first start_symbol to the state count map\n\t\t{\n\t\t\tif(!transition_map.containsKey(padding_word)){\n\t\t\t\ttransition_map.put(padding_word,new TransitionUnit());\n\t\t\t}\n\t\t\tHashMap<String,DataUnit> state_transition_map=transition_map.get(padding_word).state_transition;\n\t\t\tif(!state_transition_map.containsKey(words[1])){\n\t\t\t\tstate_transition_map.put(words[1],new DataUnit());\n\t\t\t}\n\t\t\tstate_transition_map.get(words[1]).count++;\n\t\t}\n\t\t//count each (y,x) and (y,y') pair\n\t\tfor(int i=0;i<words.length/2;i++){\n\t\t\t\n\t\t\t//each x is at position 2*i and each y is at position 2*i+1\n\t\t\tString xWord=words[2*i],yWord=words[2*i+1];\n\t\t\t\n\t\t\t//add each word to unknown_set if it doesn't contain this word\n\t\t\t//but if it already contains this word, remove from unknown_set\n\t\t\tif(unknown_set.contains(xWord)){\n\t\t\t\tunknown_set.remove(xWord);\n\t\t\t\tpopular_set.add(xWord);\n\t\t\t}else if(!popular_set.contains(xWord)){\n\t\t\t\tunknown_set.add(xWord);\n\t\t\t}\n\t\t\t\n\t\t\tif(!transition_map.containsKey(yWord)){\n\t\t\t\ttransition_map.put(yWord,new TransitionUnit());\n\t\t\t}\n\t\t\tTransitionUnit transitionSubMap=transition_map.get(yWord);\n\t\t\tString nextY=((i==words.length/2-1)?padding_word:words[2*i+3]);\n\t\t\tif(!transitionSubMap.state_transition.containsKey(nextY)){\n\t\t\t\ttransitionSubMap.state_transition.put(nextY,new DataUnit());\n\t\t\t}\n\t\t\ttransitionSubMap.state_transition.get(nextY).count++;\n\t\t\tif(!transitionSubMap.terminal_transition.containsKey(xWord)){\n\t\t\t\ttransitionSubMap.terminal_transition.put(xWord,new DataUnit());\n\t\t\t}\n\t\t\ttransitionSubMap.terminal_transition.get(xWord).count++;\n\t\t}\n\t\t\n\t}",
"private static int computeOccurrences(String filename, Map< String, Integer> occurrences) {\n // Since we can't change a local variable inside a lambda expression\n // we can't just do \"int count = 0;\". This is simply not possible inside\n // a lamda. Therefore we create a class counter like we have seen before\n // to store the count for each method call. We then return the int value\n // of this counter.\n Counter counter = new Counter();\n try {\n Files.lines(Paths.get(filename))\n .flatMap(Words::extractWords)\n .map(s -> {\n if (s.startsWith(\"L\")) {\n counter.increment();\n }\n return s.toLowerCase();\n })\n .forEach(s -> {\n synchronized (occurrences) {\n occurrences.merge(s, 1, Integer::sum);\n }\n });\n } catch (IOException e) {\n e.printStackTrace();\n }\n return counter.getValue();\n }",
"private void getHamStatistics() throws IOException{\n System.out.println(\"Getting ham statistics\"); \n File hamFile = new File(HamPath);\n // Find all words from the ham emails\n for(File file: hamFile.listFiles()){\n try { \n BufferedReader b = new BufferedReader(new FileReader(file));\n Scanner scanner = null; \n String line = b.readLine(); \n while(line != null){\n scanner = new Scanner(line);\n while(scanner.hasNext()){\n String next = scanner.next(); \n if(WordCountHam.get(next) != null){\n WordCountHam.put(next, WordCountHam.get(next)+1); \n }\n }\n line = b.readLine(); \n }\n } catch (FileNotFoundException ex) {\n System.err.println(ex.toString());\n }\n }\n }",
"public ArrayList<String> getCountStatics() {\n\t\tint countsPerMinute = 0;\n\t\tint countsPerHour = 0;\n\t\tint countsPerDay = 0;\n\t\tint countsPerWeek = 0;\n\t\tint countsPerMonth = 0;\n\n\t\t// get a comparison time and start comparing the times against it\n\t\tArrayList<String> myArrayString = new ArrayList<String>();\n\t\tCalendar currDate = Calendar.getInstance();\n\t\tfor (int i = 0; i < clickerCountObject.getClickerTimestamps().size(); i++) {\n\t\t\tSystem.out.println(clickerCountObject.getClickerTimestamps().get(i)\n\t\t\t\t\t.get(Calendar.MINUTE) <= currDate.get(Calendar.MINUTE));\n\t\t\tif (currDate.get(Calendar.MINUTE) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MINUTE)\n\t\t\t\t\t&& currDate.get(Calendar.MINUTE) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MINUTE)) {\n\t\t\t\tcountsPerMinute += 1;\n\t\t\t}\n\t\t\tif (currDate.get(Calendar.HOUR_OF_DAY) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.HOUR_OF_DAY)\n\t\t\t\t\t&& currDate.get(Calendar.HOUR_OF_DAY) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i)\n\t\t\t\t\t\t\t.get(Calendar.HOUR_OF_DAY)) {\n\t\t\t\tcountsPerHour += 1;\n\t\t\t}\n\t\t\tif ((currDate.get(Calendar.DAY_OF_MONTH) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.DAY_OF_MONTH))\n\t\t\t\t\t&& (currDate.get(Calendar.DAY_OF_MONTH) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i)\n\t\t\t\t\t\t\t.get(Calendar.DAY_OF_MONTH))) {\n\t\t\t\tcountsPerDay += 1;\n\t\t\t}\n\t\t\tif ((currDate.get(Calendar.WEEK_OF_MONTH) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.WEEK_OF_MONTH))\n\t\t\t\t\t&& (currDate.get(Calendar.WEEK_OF_MONTH) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i)\n\t\t\t\t\t\t\t.get(Calendar.WEEK_OF_MONTH))) {\n\t\t\t\tcountsPerWeek += 1;\n\t\t\t}\n\t\t\tif ((currDate.get(Calendar.MONTH) - 1 <= clickerCountObject\n\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MONTH))\n\t\t\t\t\t&& (currDate.get(Calendar.MONTH) >= clickerCountObject\n\t\t\t\t\t\t\t.getClickerTimestamps().get(i).get(Calendar.MONTH))) {\n\t\t\t\tcountsPerMonth += 1;\n\t\t\t}\n\t\t}\n\t\tmyArrayString.add(\"Counts per Minute \"\n\t\t\t\t+ Integer.toString(countsPerMinute));\n\t\tmyArrayString.add(\"Counts per Hour \" + Integer.toString(countsPerHour));\n\t\tmyArrayString.add(\"Counts per Day \" + Integer.toString(countsPerDay));\n\t\tmyArrayString.add(\"Counts per Week \" + Integer.toString(countsPerWeek));\n\t\tmyArrayString.add(\"Counts per Month \"\n\t\t\t\t+ Integer.toString(countsPerMonth));\n\n\t\tSystem.out.println(myArrayString);\n\t\treturn myArrayString;\n\t}",
"static String timeCount_2(List<String> Arr){\n int timeHH = 0;\n int timeMI = 0;\n int timeSS = 0;\n \n int timeSum_second = 0;\n \n String r_hh = \"\";\n String r_mi = \"\";\n String r_ss = \"\";\n\n for(int i = 0; i < Arr.size(); i++ ){\n \n if (Pattern.matches(\"\\\\d{2}:\\\\d{2}:\\\\d{2}\", Arr.get(i))){\n \n String[] s = Arr.get(i).split(\":\");\n int hh = Integer.parseInt(s[0]);\n int mi = Integer.parseInt(s[1]);\n int ss = Integer.parseInt(s[2]);\n\n timeSum_second += hh*60*60 + mi*60 + ss;\n \n }\n else{\n continue;\n }\n }\n \n timeHH = timeSum_second/60/60;\n timeMI = (timeSum_second%(60*60))/60;\n timeSS = timeSum_second%60;\n \n if (timeHH < 10){\n r_hh = \"0\" + timeHH;\n }\n else{\n r_hh = Integer.toString(timeHH);\n }\n \n if (timeMI < 10){\n r_mi = \"0\" + timeMI;\n }\n else{\n r_mi = Integer.toString(timeMI);\n }\n \n if (timeSS < 10){\n r_ss = \"0\" + timeSS;\n }\n else{\n r_ss = Integer.toString(timeSS);\n }\n \n String result = r_hh + \":\" + r_mi + \":\" + r_ss;\n \n return result;\n }",
"@Override\n\t\tpublic void map(Key key, Value value, Context context)\n\t\t\t\tthrows IOException, InterruptedException {\n\t\t\tSortedMap<Key,Value> entries = WholeRowIterator.decodeRow(key, value);\n\t\t\t\n\t\t\t// If we have counts for the given ngram for both time periods, we will have 2 Entrys that look like\n\t\t\t// RowId: ngram\n\t\t\t// CQ: Date Granularity (ex. DAY, HOUR)\n\t\t\t// CF: Date Value (ex. 20120102, 2012010221)\n\t\t\t// Value: count\n\t\t\t// We know the entries are sorted by Key, so the first entry will have the earlier date value \n\t\t\tif ( entries.size() == 2 ) {\n\t\t\t\t\n\t\t\t\t// Read the Entrys and pull out the two counts\n\t\t\t\tlong [] counts = new long[2];\n\t\t\t\tint index = 0;\n\t\t\t\tfor ( Entry<Key,Value> entry : entries.entrySet() ) {\n\t\t\t\t\tcounts[index++] = LongCombiner.VAR_LEN_ENCODER.decode( entry.getValue().get());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Generate a trending score for this ngram\n\t\t\t\tint score = calculateTrendingScore( counts, context );\n\t\t\t\t\n\t\t\t\t// If we have a valid score, write out the score to Accumulo\n\t\t\t\tif ( score > 0 ) {\n\t\t\t\t\t\n\t\t\t\t\tint sortableScore = Integer.MAX_VALUE - score;\n\t\t\t\t\t\n\t\t\t\t\t// RowId is the time we are calculating trends for, i.e. DAY:20120102\n\t\t\t\t\t// CF is Integer.MAX_VALUE - trending score so that we sort the highest scores first\n\t\t\t\t\t// CQ is the ngram\n\t\t\t\t\t// Value is empty\n\t\t\t\t\tString rowId = context.getConfiguration().get(\"rowId\");\n\t\t\t\t\tMutation mutation = new Mutation( rowId );\n\t\t\t\t\tmutation.put( new Text( String.valueOf(sortableScore)), entries.firstKey().getRow(), emptyValue );\n\t\t\t\t\tcontext.write( null, mutation );\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public static void main(String[] args) {\n\t\tint[] i = new int[100];\n\t\tint unique = 0;\n\t\tfloat ratio = 0;\n\t\tList<String> inputWords = new ArrayList<String>();\n\t\tMap<String,List<String>> wordcount = new HashMap<String,List<String>>();\n\t\ttry{\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"/Users/huziyi/Documents/NLP file/Assignment1/Twitter messages.txt\"));\n\t\t\tString str;\n\t\t\twhile((str = in.readLine())!=null){\n\t\t\t\tstr = str.toLowerCase();\n\t\t\t\t\n\t\t\t\tString[] words = str.split(\"\\\\s+\");\n\t\t\t\t\n\t\t\t//\tSystem.out.println(words);\n\t\t\t//\tSystem.out.println(\"1\");\n\t\t\t\tfor(String word:words){\n\t\t\t\t\t\n\t\t\t//\t\tString word = new String();\n\t\t\t\t\t\n\t\t\t\t\tword = word.replaceAll(\"[^a-zA-Z]\", \"\");\n\t\t\t\t\tinputWords.add(word);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\tfor(int k=0;k<inputWords.size()-1;k++){\n\t\t\tString thisWord = inputWords.get(k);\n\t\t\tString nextWord = inputWords.get(k+1);\n\t\t\tif(!wordcount.containsKey(thisWord)){\n\t\t\t\twordcount.put(thisWord, new ArrayList<String>());\n\t\t\t}\n\t\t\twordcount.get(thisWord).add(nextWord);\n\t\t}\n\t\t for(Entry e : wordcount.entrySet()){\n\t// System.out.println(e.getKey());\n\t\tMap<String, Integer>count = new HashMap<String, Integer>();\n List<String>words = (List)e.getValue();\n for(String s : words){\n if(!count.containsKey(s)){\n count.put(s, 1);\n }\n else{\n count.put(s, count.get(s) + 1);\n }\n }\n \t\n // for(Entry e1 : wordcount.entrySet()){\n for(Entry f : count.entrySet()){\n \n // \tint m = 0;\n //\tint[] i = new int[100];\n //\ti[m] = (Integer) f.getValue();\n \tint n = (Integer) f.getValue();\n \tn = (Integer) f.getValue();\n // \tList<String> values = new ArrayList<String>();\n \t\t// values.addAll(count.g());\n \tif(n>=120){\n \tif(!(e.getKey().equals(\"\"))&&!(f.getKey().equals(\"\"))){\n //\t\t int a = (Integer) f.getValue();\n //\t\t Arrays.sort(a);\n System.out.println(e.getKey()+\" \"+f.getKey() + \" : \" + f.getValue());\n \n \t}\n \t}\n //\tm++;\n \t }\n\t\t }\n\t\t \n\t\n\t\t \n\t\t// Arrays.sort(i);\n\t\t //System.out.println(i[0]+i[1]);\n/*\n\t\t ArrayList<String> values = new ArrayList<String>();\n\t\t values.addAll(count.values());\n\n\t\t Collections.sort(values, Collections.reverseOrder());\n\n\t\t int last_i = -1;\n\n\t\t for (Integer i : values.subList(0, 99)) { \n\t\t if (last_i == i) \n\t\t continue;\n\t\t last_i = i;\n\n\n\n\n\t\t for (String s : wordcount.keySet()) { \n\n\t\t if (wordcount.get(s) == i)\n\t\t \n\t\t \tSystem.out.println(s+ \" \" + i);\n\n\t\t }\n\t\t \n\t\t\t}*/\n\t}",
"public static void main(String[] args) throws IOException {\n Path path = Paths.get(\"C:\\\\Users\\\\Pixie Waffle\\\\Desktop\\\\adventofcode2020\\\\adventofcode2020\\\\textfiles\\\\day6.txt\");\n String file = Files.readString(path);\n\n //The sum of the counts\n int yesPerGroup = 0;\n\n //Split the paragraphs into groups\n List<String> groups = Arrays.asList(file.split(\"\\n\\n\"));\n\n //The Hashset does not accept duplicates so we can check each group\n //by adding it to the hashset and clearing after we have counted the\n //unique characters\n Set set = new HashSet<>();\n for (int i = 0; i < groups.size(); i++){\n char[] group = groups.get(i).replace(\"\\n\", \"\").toCharArray();\n for (int j = 0; j < group.length; j++){\n if(set.add(group[j])){\n yesPerGroup++;\n }\n }\n set.clear();\n }\n System.out.println(yesPerGroup);\n }",
"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 }",
"@Override\r\n\tpublic Map<String, Integer> getActivityStatistic() {\n\t\tMap<String, Integer> result = new HashMap<String, Integer>();\r\n\t\tList<Activity> activities = activityDao.getAllActivities();\r\n\t\tfor(Activity activity:activities){\r\n\t\t\tresult.put(activity.getName(), activityRecordDao.getAttendCountById(activity.getId()));\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public static int \tdayCounter (String duration) {\n\n\t\tlogger.finer(\"Day Counter used\");\n\n\t\tint x = 0 ;\n\t\tif(duration.equalsIgnoreCase(\"DAY\")) {\n\t\t\tx = 1; \n\t\t}\n\t\tif(duration.equalsIgnoreCase(\"WEEK\")) {\n\t\t\tx = 7;\n\t\t}\n\t\tif(duration.equalsIgnoreCase(\"MONTH\")) {\n\t\t\tx = 30;\n\t\t}\n\t\treturn x;\n\t}",
"public HashMap<String,Double> getAverageActivityDuration(Population population) {\r\n\t\tHashMap<String,Double>actDurations=new HashMap<>();\r\n\t\tHashMap<String,Tuple<Double,Integer>> activities=new HashMap<>();\r\n\t\tfor(Person p:population.getPersons().values()) {\r\n\t\t\tfor(PlanElement pe:p.getSelectedPlan().getPlanElements()) {\r\n\t\t\t\tif(pe instanceof Activity) {\r\n\t\t\t\t\tActivity a=(Activity)pe;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(a.getStartTime()!=Double.NEGATIVE_INFINITY && a.getEndTime()!=Double.NEGATIVE_INFINITY) {\r\n//\t\t\t\t\t\tif(a.getStartTime()>a.getEndTime()) {\r\n//\t\t\t\t\t\t\ta.setEndTime(24*3600);\r\n//\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdouble duration=a.getEndTime()-a.getStartTime();\r\n\t\t\t\t\t\tif(duration<0) {\r\n\t\t\t\t\t\t\tthrow new IllegalArgumentException(\"duration can not be negative\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(activities.containsKey(a.getType())) {\r\n\t\t\t\t\t\t\tTuple<Double,Integer> oldActDetails=activities.get(a.getType());\r\n\t\t\t\t\t\t\tTuple<Double,Integer> newActDetails=new Tuple<>((oldActDetails.getFirst()*oldActDetails.getSecond()+duration)/(oldActDetails.getSecond()+1)\r\n\t\t\t\t\t\t\t\t\t,oldActDetails.getSecond()+1);\r\n\t\t\t\t\t\t\tactivities.put(a.getType(), newActDetails);\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tTuple<Double,Integer> newActDetails=new Tuple<>(duration,1);\r\n\t\t\t\t\t\t\tactivities.put(a.getType(), newActDetails);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(String s:activities.keySet()) {\r\n\t\t\tactDurations.put(s,activities.get(s).getFirst());\r\n\t\t}\r\n\t\tthis.activityDuration=actDurations;\r\n\t\treturn actDurations;\r\n\t}",
"int getNumberOfTasksDeterminingBuildDuration();",
"public static void main(String[] args) {\n\t\tFile f= new File(\"E://workplace/BigFileRead/src/data/itcont.txt\");\r\n\t\ttry {\r\n\t\t\tBufferedReader b=new BufferedReader(new FileReader(f));\r\n\t\t\tString readLine=\"\";\r\n\t\t\t\r\n\t\t\t//得到总行数\r\n\t\t\tInstant lineCountStart=Instant.now();//当前时间\r\n\t\t\tint lines=0;\r\n\t\t\tInstant nameStart=Instant.now();\r\n\t\t\tArrayList<String> names=new ArrayList<String>();\r\n\t\t\t//得到第432个和第43243个名字\r\n\t\t\tArrayList<Integer> indexs=new ArrayList<>();\r\n\t\t\t\r\n\t\t\tindexs.add(1);\r\n\t\t\tindexs.add(433);\r\n\t\t\tindexs.add(43244);\r\n\t\t\t//计算每个月的捐赠量\r\n\t\t\tInstant donationsStart=Instant.now();\r\n\t\t\tArrayList<String> dates=new ArrayList<String>();\r\n\t\t\t//计算每一个名字的出现次数\r\n\t\t\tInstant commonNamesStart=Instant.now();\r\n\t\t\tArrayList<String> firstNames=new ArrayList<String>();\r\n\t\t\tSystem.out.println(\"start read file using input stream!\");\r\n\t\t\ttry {\r\n\t\t\t\twhile((readLine=b.readLine())!=null){\r\n\t\t\t\tlines++;\r\n\t\t\t\t//得到所有的名字\r\n\t\t\t\tString array1[]=readLine.split(\"\\\\s*\\\\|s*\");\r\n\t\t\t\tString name=array1[7];\r\n\t\t\t\tnames.add(name);\r\n\t\t\t\tif(indexs.contains(lines)){\r\n\t\t\t\t\tSystem.out.println(\"names:\"+names.get(lines-1)+\"at index: \"+(lines-1));\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tif (name.contains(\", \")){\r\n\t\t\t\t\tString array2[]=(name.split(\",\"));\r\n\t\t\t\t\tString firstHalfOfName=array2[1].trim();\r\n\t\t\t\t\tif(firstHalfOfName!=\"undefined\"||!firstHalfOfName.isEmpty()){\r\n\t\t\t\t\t\tif(firstHalfOfName.contains(\" \")){\r\n\t\t\t\t\t\t\tString array3[]=(name.split(\" \"));\r\n\t\t\t\t\t\t\tString firstName=array3[0].trim();\r\n\t\t\t\t\t\t\tfirstNames.add(firstName);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\tfirstNames.add(firstHalfOfName);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tString rawDate=array1[4];\r\n\t\t\t\tString year=rawDate.substring(0,4);\r\n\t\t\t\tString month=rawDate.substring(4,6);\r\n\t\t\t\tString formatDate=month+\"-\"+year;\r\n\t\t\t\tdates.add(formatDate);\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tInstant namesEnd=Instant.now();\r\n\t\t\tlong timeElapseNames=Duration.between(nameStart, namesEnd).toMillis();\r\n\t\t\tSystem.out.println(\"names time :\"+timeElapseNames+\"ms\");\r\n\t\t\tSystem.out.println(\"total lines :\"+lines);\r\n\t\t\t\r\n\t\t\tInstant lineCountsEnd=Instant.now();\r\n\t\t\tlong timeElapselineCounts=Duration.between(lineCountStart, lineCountsEnd).toMillis();\r\n\t\t\tSystem.out.println(\"lines time :\"+timeElapseNames+\"ms\");\r\n\t\t\t\r\n\t\t\tHashMap<String, Integer> dateMap=new HashMap<String, Integer>();\r\n\t\t\tfor(String date:dates){\r\n\t\t\t\tInteger count =dateMap.get(date);\r\n\t\t\t\tif(count==null){\r\n\t\t\t\t\tdateMap.put(date, 1);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tdateMap.put(date, count+1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (Map.Entry<String, Integer> entry :dateMap.entrySet()){\r\n\t\t\t\tString key=entry.getKey();\r\n\t\t\t\tInteger value=entry.getValue();\r\n\t\t\t\tSystem.out.println(\"Donations per month and year: \"+key+\" and donation count: \"+value);\r\n\t\t\t}\r\n\t\t\tInstant donationEnd=Instant.now();\r\n\t\t\tlong timeElapsedDonations=Duration.between(donationsStart, donationEnd).toMillis();\r\n\t\t\tSystem.out.println(\"Donation time: \"+timeElapsedDonations+\" ms\");\r\n\t\t\t\t\r\n\t\t\tHashMap<String, Integer> map=new HashMap<String, Integer>();\r\n\t\t\tfor(String name : firstNames){\r\n\t\t\t\tInteger count =dateMap.get(name);\r\n\t\t\t\tif(count==null){\r\n\t\t\t\t\tmap.put(name, 1);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tmap.put(name, count+1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tLinkedList<Entry<String, Integer>> list =new LinkedList<>(map.entrySet());\r\n\t\t\t\r\n\t\t\tCollections.sort(list,new Comparator<Map.Entry<String, Integer>>() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic int compare(Map.Entry<String, Integer> o1, Map.Entry<String, Integer> o2) {\r\n\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\treturn (o2.getValue()).compareTo(o1.getValue());\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"The most Common first name is: \"+list.get(0).getKey()+\" and it occurs: \"+list.get(0).getValue()+\" time.\");\r\n\t\t\tInstant commonNameEnd=Instant.now();\r\n\t\t\tlong timeElapseCommonName =Duration.between(commonNamesStart, commonNameEnd).toMillis();\r\n\t\t\tSystem.out.println(\"most common name time: \"+timeElapseCommonName+\" ms\");\r\n\t\t} catch (FileNotFoundException e) { \r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"private void traverseLine(String str) {\n\t\tFrequencyCount f ;\r\n\t\tint prev = 0;\r\n\t\tString docid = \"\";\r\n\t\tint flag = 0,flag1 = 0;\r\n\t\tfor(int k = 0;k<str.length();k++)\r\n\t\t{\r\n\t\t\t//System.out.print(str.charAt(k));\r\n\t\t\tif(str.charAt(k) == ':'){\r\n\t\t\t\tflag = 1;k++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(flag == 1){\r\n\t\t\t\tint indexid;\r\n\t\t\t\tif(flag1 == 0){\r\n\t\t\t\t\tcounter = \"\";\r\n\t\t\t\t\tindexid = str.indexOf(':', k);\r\n\t\t\t\t\tcounter = str.substring(k, indexid);\r\n\t\t\t\t\tk = indexid+1;\r\n\t\t\t\t\tflag1 = 1;\r\n\t\t\t\t}\r\n\t\t\t\tindexid = str.indexOf('#', k);\r\n\t\t\t\tdocid = String.valueOf(Integer.parseInt(str.substring(k, indexid))+prev);\r\n\t\t\t\tprev = Integer.parseInt(docid);\r\n\t\t\t\t\r\n\t\t\t\tf = new FrequencyCount(docid);\r\n\t\t\t\tk = indexid+1;\r\n\t\t\t\twhile(str.charAt(k) != '|'){\r\n\t\t\t\t\tif(k+1 == str.length()){\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(str.charAt(k) == '#') {k++;continue;}\r\n\t\t\t\t\tint flagop = 0;\r\n\t\t\t\t\t\r\n\t\t\t\t\tswitch(str.charAt(k)){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tcase 't' : flagop = 1;\r\n\t\t\t\t\t\t\t\t\t break;\r\n\t\t\t\t\t\tcase 'i' : flagop = 2;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'b' : flagop = 3;\r\n\t\t\t\t \t\t \t\t\tbreak;\r\n\t\t\t\t\t\tcase 'r' : flagop = 6;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'L' : flagop = 5;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'c' : flagop = 4;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'l' : flagop = 7;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tdefault : flagop = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(flagop != 0){\r\n\t\t\t\t\t\tindexid = Math.min(str.indexOf('#', k), str.indexOf('|', k));\r\n\t\t\t\t\t\tif(indexid == -1){\r\n\t\t\t\t\t\t\tindexid = str.indexOf('|', k);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\tint count = Integer.parseInt(str.substring(k+1, indexid));\r\n\t\t\t\t\t\t//System.out.print(count +\" \");\r\n\t\t\t\t\t\tfor(int j = 0;j<count;j++)\r\n\t\t\t\t\t\t\tf.incrementCounter(flagop);\r\n\t\t\t\t\t\tk = indexid;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcatch(Exception e){e.printStackTrace();\r\n\t\t\t\t\t\t\tSystem.out.println(\"EXCEPTION : \"+e.getMessage());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tfc.add(f);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tword = word+str.charAt(k);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}",
"private static void wordCountWithMap() throws FileNotFoundException {\n Map<String, Integer> wordCounts = new HashMap<String, Integer>();\n\n Scanner input = new Scanner(new File(fileLocation));\n while (input.hasNext()) {\n String word = input.next();\n if (!wordCounts.containsKey(word)) {\n wordCounts.put(word, 1);\n } else {\n int oldValue = wordCounts.get(word);\n wordCounts.put(word, oldValue + 1);\n }\n }\n\n String term = \"test\";\n System.out.println(term + \" occurs \" + wordCounts.get(term));\n\n // loop over the map\n for (String word : wordCounts.keySet()) {\n int count = wordCounts.get(word);\n if (count >= 500) {\n System.out.println(word + \", \" + count + \" times\");\n }\n }\n\n }",
"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 }",
"public static void main(String[] args) {\n ArrayList<String> lines = new ArrayList<String>();\r\n String line;\r\n try {\r\n // Create buffered reader to read input file.\r\n BufferedReader br = new BufferedReader(new FileReader(\"day6.txt\"));\r\n while ((line = br.readLine()) != null) {\r\n lines.add(line);\r\n }\r\n // Add blank line to the end, so that final group count gets calculated (part one).\r\n lines.add(\"\");\r\n // Close the buffered reader once finished.\r\n br.close();\r\n\r\n System.out.println(\"Part one results: \" + partOne(lines));\r\n System.out.println(\"Part two results: \" + partTwo(lines));\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"public static void main(String args[]) throws Exception\r\n {\r\n System.out.println(\"start\");\r\n final Map<String, LogData> timeInHoursMinsAndLogDataMap = new LinkedHashMap();\r\n final Scanner input = new Scanner(System.in);\r\n int totalRecords = 0;\r\n final List<String> keysToRemove = new ArrayList<>(2);\r\n Set<String> processed = new HashSet<>();\r\n\r\n while (input.hasNext())\r\n {\r\n System.out.println(\"while\");\r\n Long time = Long.parseLong(input.next());\r\n Double processingTime = Double.parseDouble(input.next());\r\n\r\n boolean process = true;\r\n final Date date = new Date(time * 1000);\r\n final String key = String.valueOf(date.getHours()) + \":\" + String.valueOf(date.getMinutes());\r\n if (processed.contains(key))\r\n continue;\r\n if (timeInHoursMinsAndLogDataMap.size() > 0)\r\n {\r\n keysToRemove.clear();\r\n for (Map.Entry<String, LogData> entry : timeInHoursMinsAndLogDataMap.entrySet())\r\n {\r\n final int diffSeconds = getDiffBetweenCurrentAndMapSeconds(key, entry.getKey(), date.getSeconds(),\r\n entry.getValue().maxSeconds);\r\n if (diffSeconds > 60)\r\n {\r\n System.out.println(entry.getValue().getResult());\r\n keysToRemove.add(entry.getKey());\r\n processed.add(entry.getKey());\r\n }\r\n else if (diffSeconds < -60)\r\n {\r\n process = false;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (!process)\r\n continue;\r\n\r\n removeKeyFromMap(timeInHoursMinsAndLogDataMap, keysToRemove);\r\n\r\n LogData logData = timeInHoursMinsAndLogDataMap.get(key);\r\n if (logData == null)\r\n {\r\n logData = new LogData();\r\n logData.setTimeStamp(time);\r\n }\r\n logData.updateBuckets(processingTime);\r\n logData.updateMaxSeconds(date.getSeconds());\r\n timeInHoursMinsAndLogDataMap.put(key, logData);\r\n\r\n }\r\n\r\n for (Map.Entry<String, LogData> entry : timeInHoursMinsAndLogDataMap.entrySet())\r\n {\r\n System.out.println(entry.getValue().getResult());\r\n }\r\n \r\n System.out.println(\"end\");\r\n }",
"private static void writeExecutionTime() {\n \t\n \tendMs = System.currentTimeMillis();\n \tlong elapsed = endMs - startMs;\n \tlong hours = elapsed / 3600000;\n long minutes = (elapsed % 3600000) / 60000;\n long seconds = ((elapsed % 3600000) % 60000) / 1000;\n \n try {\n \t\n \tFileSystem fs = FileSystem.get(Mediator.getConfiguration());\n \tPath outputPath = new Path(Mediator.getHDFSLocation()+\"/\"+Mediator.getLearnerOutputPath()+\"/time.txt\");\n \tOutputStream os = fs.create(outputPath);\n \tBufferedWriter bw = new BufferedWriter(new OutputStreamWriter(os));\n \t\n \t/**\n \t * Write total execution time\n \t */\n \tbw.write(\"Total execution time (hh:mm:ss): \"+String.format(\"%02d\",hours)+\":\"+String.format(\"%02d\",minutes)+\":\"+\n \t\t\tString.format(\"%02d\",seconds)+\" (\"+(elapsed/1000)+\" seconds)\\n\");\n \t\n \t/**\n \t * Write Mappers execution time avg.\n \t */\n \tPath inputPath = new Path(Mediator.getHDFSLocation()+\"/\"+Mediator.getLearnerOutputPath()+\"/\"+Mediator.TIME_STATS_DIR);\n \tFileStatus[] status = fs.listStatus(inputPath);\n \tBufferedReader br = null;\n \tString buffer;\n \tlong sumMappers = 0;\n \tint numMappers = 0;\n \tfor (FileStatus fileStatus:status){\n \t\t// Read Stage 1\n \t\tif (fileStatus.getPath().getName().contains(\"mapper\")){\n \t\t\tnumMappers ++;\n \t\t\tbr=new BufferedReader(new InputStreamReader(fs.open(fileStatus.getPath())));\n \t\t\tbuffer = br.readLine();\n \t\t\tsumMappers += Long.parseLong(buffer.substring(buffer.indexOf(\":\")+1).trim());\n \t\t}\n \t\tbr.close();\n \t}\n \t// Write AVG\n \telapsed = sumMappers / numMappers;\n \thours = elapsed / 3600;\n minutes = (elapsed % 3600) / 60;\n seconds = (elapsed % 3600) % 60;\n bw.write(\"Mappers avg. execution time (hh:mm:ss): \"+String.format(\"%02d\",hours)+\":\"+String.format(\"%02d\",minutes)+\":\"+\n \t\t\tString.format(\"%02d\",seconds)+\" (\"+elapsed+\" seconds)\\n\");\n \t\n \tbw.close();\n \tos.close();\n \t\n \t// Remove time stats directory\n \tfs.delete(inputPath,true);\n \t\n }\n catch(Exception e){\n \tSystem.err.println(\"\\nERROR WRITING EXECUTION TIME\");\n\t\t\te.printStackTrace();\n }\n \t\n }",
"public static void main(String[] args) {\n\t\ttry {\n\t\t\tFile file = new File(\"input.txt\");\n\t\t\tScanner scan = new Scanner(file);\n\t\t\twhile (scan.hasNext()) {\n\t\t\t\tString line = scan.nextLine();\n\t\t\t\tString[] tokens = line.split(\" \");\n\t\t\t\tString key = null;\n\t\t\t\tint flag1 = 0;\n\t\t\t\tString date = tokens[1];\n\t\t\t\tDayLog currentday = null;\n\t\t\t\tint flag = 0;\n\t\t\t\tfor (int i = 0; i < daylog.size(); i++) {\n\t\t\t\t\tif (date.equals(daylog.get(i).getDate())) {\n\t\t\t\t\t\tcurrentday = daylog.get(i);\n\t\t\t\t\t\tflag = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (daylog.size() == 0 || flag == 0) {\n\t\t\t\t\tDayLog day = new DayLog(date);\n\t\t\t\t\tdaylog.add(day);\n\t\t\t\t\tcurrentday = day;\n\t\t\t\t}\n\n\t\t\t\tswitch (tokens[0]) {\n\t\t\t\tcase \"food\" :\n\t\t\t\t\tcurrentday.addFood(tokens[2]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"water\" :\n\t\t\t\t\tcurrentday.addWater(tokens[2]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"activity\" :\n\t\t\t\t\tcurrentday.addActivity(tokens[2]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"weight\" :\n\t\t\t\t\tcurrentday.addWeight(tokens[2]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"sleep\" :\n\t\t\t\t\tcurrentday.addSleep(tokens[2]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"foodLog\":\n\t\t\t\t\tcurrentday.foodLog();\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"waterLog\":\n\t\t\t\t\tcurrentday.waterLog();\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"activityLog\":\n\t\t\t\t\tcurrentday.activityLog();\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"sleepLog\":\n\t\t\t\t\tcurrentday.sleepLog();\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"weightLog\":\n\t\t\t\t\tcurrentday.weightLog();\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"print\" :\n\t\t\t\t\tcurrentday.printLog();\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t} catch (IOException io) {\n\t\t\tSystem.out.println(\"File not found\");\n\t\t}\n\t}",
"private void updateDDCount(HashMap<String, Integer> countMap, Path p) {\n if (p.size() <= 1)\n return;\n HashMap<GroumNode, String> labelMap = p.getLabelMap();\n GroumNode end = p.get(p.size() - 1);\n for (int i = 0; i < p.size() - 1; i++) {\n GroumNode start = p.get(i);\n String lable = labelMap.get(start) + Path.API_SPLIT + labelMap.get(end);\n Integer count = hasDataDependency(start, end) ? 1 : 0;\n if (countMap.containsKey(lable)) {\n count += countMap.get(lable);\n }\n countMap.put(lable, count);\n }\n }",
"public void readFileToTransitionMap(String fileName){\n\t\ttry {\n\t\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(new FileInputStream(fileName),\"ISO-8859-1\"));\n\t\t\tString line=null;\n\t\t\t//each time we read a line, count its words\n\t\t\twhile((line=reader.readLine())!=null){\n\t\t\t\tparseLineAndCountTransitions(line);\n\t\t\t}\n\t\t\t//close the buffered reader\n\t\t\treader.close();\n\t\t\tupdateTransitionMap();\n\t\t\t\n\t\t}catch(IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"public void reviewExtractorPeriodicity() {\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"YYYY-MM-dd hh:mm:ss\");\r\n Iterator<String> it = ExtractorManager.hmExtractor.keySet().iterator();\r\n while (it.hasNext()) { //\r\n String next = it.next();\r\n DataObject dobj = null;\r\n\r\n try {\r\n \tdobj = ExtractorManager.datasource.fetchObjById(next);\r\n } catch (IOException ioex) {\r\n \tlog.severe(\"Error getting extractor definition\");\r\n }\r\n\r\n if (null == dobj) {\r\n \tExtractorManager.hmExtractor.remove(next);\r\n } else {\r\n \tPMExtractor extractor = ExtractorManager.hmExtractor.get(next);\r\n\r\n \tif (null != extractor && extractor.canStart()) {\r\n\t String lastExec = dobj.getString(\"lastExecution\");\r\n\t Date nextExecution = null;\r\n\t boolean extractorStarted = false;\r\n\r\n\t // Revisando si tiene periodicidad\r\n\t if (dobj.getBoolean(\"periodic\")) {\r\n\t \t\ttry {\r\n\t \t\t\tif (null != lastExec && !lastExec.isEmpty()) nextExecution = sdf.parse(lastExec);\r\n\t\t } catch (ParseException psex) {\r\n\t\t \t\tlog.severe(\"Error parsing execution date\");\r\n\t\t }\r\n\t\t \t\r\n\t\t \tif (null == nextExecution) {\r\n\t\t \t\textractor.start();\r\n\t\t \t\textractorStarted = true;\r\n\t\t \t} else {\r\n\t\t \t\ttry {\r\n\t\t\t \t\tlong tiempo = dobj.getLong(\"timer\");\r\n\t\t\t \tString unidad = dobj.getString(\"unit\");\r\n\t\t\t \tlong unitmilis = 0l;\r\n\t\r\n\t\t\t \tswitch(unidad) {\r\n\t\t\t \t\tcase \"min\":\r\n\t\t\t \t\t\tunitmilis = tiempo * 60 * 1000;\r\n\t\t\t \t\t\tbreak;\r\n\t\t\t \t\tcase \"h\":\r\n\t\t\t \t\t\tunitmilis = tiempo * 60 * 60 * 1000;\r\n\t\t\t \t\t\tbreak;\r\n\t\t\t \t\tcase \"d\":\r\n\t\t\t \t\t\tunitmilis = tiempo * 24 * 60 * 60 * 1000;\r\n\t\t\t \t\t\tbreak;\r\n\t\t\t \t\tcase \"m\":\r\n\t\t\t \t\t\tunitmilis = tiempo * 30 * 24 * 60 * 60 * 1000;\r\n\t\t\t \t\t\tbreak;\r\n\t\t\t \t}\r\n\t\r\n\t\t\t \tif (unitmilis > 0) {\r\n\t\t\t \t\tunitmilis = unitmilis + nextExecution.getTime();\r\n\t\t\t \t\tif(new Date().getTime() > unitmilis) {\r\n\t\t\t extractor.start();\r\n\t\t\t extractorStarted = true;\r\n\t\t\t }\r\n\t\t\t \t}\r\n\t\t \t\t} catch (Exception ex) { //NFE\r\n\t\t \t\t\tlog.severe(\"Error getting extractor config data\");\r\n\t\t \t\t}\r\n\t\t \t}\r\n\t\r\n\t\t \tif (extractorStarted) {\r\n\t\t \t\tdobj.put(\"lastExecution\", sdf.format(new Date()));\r\n\t\t \t\ttry {\r\n\t\t \t\t\tExtractorManager.datasource.updateObj(dobj);\r\n\t\t \t\t} catch(IOException ioex) {\r\n\t\t \t\t\tlog.severe(\"Error trying to update last execution date\");\r\n\t\t \t\t}\r\n\t\t \t}\r\n\t }\r\n\t }\r\n\t }\r\n }\r\n }",
"private void loadDataMap() throws IOException {\n\t\tDaySleepDurationMap.getInstance().clear();\n\n\t\t// List of entries\n\t\tList<SleepEntry> entries = new ArrayList<SleepEntry>();\n\t\t\n\t\t// Get CSV file\n\t\tBufferedReader br = new BufferedReader(new FileReader(new File(DATA_LOCATION)));\n\t\tString line = \"\";\n\n\t\t// Ignore the first line (CSV header)\n\t\tbr.readLine();\n\n\t\twhile (((line = br.readLine()) != null)){\n\t\t\t// Convert the line from CSV to a SleepEntry\n\t\t\tSleepEntry se = SleepEntry.parseFromCSV(line);\n\t\t\t// Add it to the entry list\n\t\t\tentries.add(se);\n\t\t}\n\t\t\n\t\tfor (SleepEntry se : entries){\n\t\t\t// Add data from list to the map\n\t\t\tDaySleepDurationMap.getInstance().addToDay(se.getEffectiveDate(), se.getDuration());\n\t\t}\n\t\t\n\n\t\tbr.close();\n\t\t\n\t}",
"public void analyzeHourlyData()\n {\n while(reader.hasNext()) {\n LogEntry entry = reader.next();\n int hour = entry.getHour();\n hourCounts[hour]++;\n }\n }",
"@Override\n protected void reduce(Text key, Iterable<Text> values, Context context) throws IOException, InterruptedException {\n StringBuffer sb1 = new StringBuffer();\n Map<String, Integer> map1 = new HashMap<String, Integer>();\n for(Text value:values){\n sb1 = new StringBuffer();\n String[] temp = sb1.append(value.toString()).reverse().toString().split(\":\"); // 倒转 防止前面有冒号\n String path = new StringBuffer(temp[1].split(\"/\")[0]).reverse().toString();\n int count = Integer.valueOf(temp[0]);\n System.out.println(\"readucepath!!!\"+path);\n System.out.println(count);\n if (map1.containsKey(path)){\n map1.put(path, map1.get(path) + count);\n }else{\n map1.put(path, count);\n }\n }\n sb1.delete(0, sb1.length() - 1);\n for(Map.Entry<String,Integer> entry :map1.entrySet()){\n sb1.append(entry.getKey()).append(\":\").append(entry.getValue());\n }\n outvalue.set(new Text(sb1.toString()));\n context.write(key,outvalue);\n }",
"public static void main(String[] args) {\n\t\tMap<String, Integer> map = new HashMap<>();\r\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(new File(\"story.txt\")))) {\r\n\t\t\tString line = null;\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\tString tokens[] = line.split(\" \");\r\n\t\t\t\tfor (String token : tokens) {\r\n\t\t\t\t\tif (map.containsKey(token)) {\r\n\t\t\t\t\t\tInteger freq = map.get(token);\r\n\t\t\t\t\t\tmap.put(token, ++freq);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tmap.put(token, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\r\n\t\tSet<Entry<String, Integer>> entry = map.entrySet();\r\n\t\tfor (Entry<String, Integer> entryset : entry) {\r\n\t\t\tSystem.out.println(entryset.getKey() + \" : \" + entryset.getValue());\r\n\t\t}\r\n\t}",
"public void printNumberOfAnswerTypes(String csvName, String trajFileName, String questionLocationsName, double meters, double speedThreshold, double timeThreshold) {\n Scanner csv = null;\n Scanner ql = null;\n try {\n csv = new Scanner(new File(csvName)); //csv of answer list\n ql = new Scanner(new File(questionLocationsName));\n HashMap<String, ArrayList<AnswerTrajectory>> csvTraj = new HashMap<String, ArrayList<AnswerTrajectory>>(); //hash map that keys on trajectory id, storing all answer list trajectories in an array list\n HashMap<String, ArrayList<Trajectory>> trajectories = readTrajectories(trajFileName); //load the trajectory data into a hash map keyed by ID\n\n csv.nextLine();\n String currentId = \"\";\n ArrayList<AnswerTrajectory> anstj = new ArrayList<AnswerTrajectory>();\n ArrayList<String> Ids = new ArrayList<String>();\n\n ArrayList<Point2D.Double> questionLocations = new ArrayList<Point2D.Double>();\n\n while (ql.hasNextLine()) {\n questionLocations.add(new Point2D.Double(ql.nextDouble(), ql.nextDouble()));\n }\n\n while (csv.hasNextLine()) { //go through each answer entry and add trajectories of the answer list for each unique device id\n String[] line = csv.nextLine().split(\",\");\n if (currentId.equals(\"\")) {\n currentId = line[12];\n } else if (!currentId.equals(line[12])) {\n csvTraj.put(currentId, anstj);\n Ids.add(currentId); //if the id is new, then add it to the list of all known ids\n anstj = new ArrayList<AnswerTrajectory>();\n currentId = line[12];\n }\n anstj.add(new AnswerTrajectory(Double.parseDouble(line[13]), Double.parseDouble(line[14]), line[12], Double.parseDouble(line[9]), Integer.parseInt(line[0]), Integer.parseInt(line[16])));\n }\n\n HashMap<Integer, ArrayList<AnswerTrajectory>> teams = new HashMap<Integer, ArrayList<AnswerTrajectory>>(); //hash map that keys on trajectory id, storing all answer list trajectories in an array list\n\n for (String s : Ids) {\n anstj = csvTraj.get(s); //get the hashmap arraylist that holds all trajectories for this device\n\n if (anstj == null)\n System.out.println(\"Could not find data for deviceId: \" + s);\n\n else {\n Collections.sort(anstj, AnswerTrajectory.TSComparator); //sort answer list data by time\n double startTime = (anstj.get(0).getTimeStamp() - 1377334800000.0) / 1000.0;//converts the time stamp to time after the event started\n double speed = determineAverageSpeed(trajectories, anstj.get(0).getId());\n //System.out.println(speed+\" \"+startTime);\n if (speed != -1) // ensure the trajectory data exists for this ID\n {\n //classify the team type\n int teamType = 0;\n\n if (startTime < timeThreshold) {\n if (speed > speedThreshold) // serious\n teamType = 1;\n else\n teamType = 2;// get it over with\n } else {\n if (speed > speedThreshold) // hurried\n teamType = 3;\n else\n teamType = 4; //lazy\n }\n if (teams.get(teamType) == null) {\n System.out.println(\"first team type for: \" + teamType);\n teams.put(teamType, new ArrayList<AnswerTrajectory>(anstj));\n } else {\n teams.get(teamType).addAll(anstj);\n }\n }\n }\n }\n int totalcc = 0;\n int totalcd = 0;\n int totalic = 0;\n int totalid = 0;\n for (int i = 1; i < 5; i++) {\n ArrayList<AnswerTrajectory> trajs = teams.get(i);\n int cc = 0;\n int cd = 0;\n int ic = 0;\n int id = 0;\n\n for (AnswerTrajectory at : trajs) {\n int question = at.getQuestion();\n double qX = questionLocations.get(question - 1).getX(); //question location x and y\n double qY = questionLocations.get(question - 1).getY();\n\n double aX = at.getX(); //location when question was answered\n double aY = at.getY();\n\n double distToAnswer = Math.sqrt((aX - qX) * (aX - qX) + (aY - qY) * (aY - qY)); //distance from answer to answer location\n\n int correct = 0;\n if (at.getAnswer() == 1 || at.getAnswer() == 2)\n correct = 1;\n\n if (distToAnswer <= meters) {\n if (correct == 1)\n cc++;\n\n if (correct == 0)\n ic++;\n } else {\n if (correct == 1)\n cd++;\n\n if (correct == 0)\n id++;\n }\n\n }\n totalcc += cc;\n totalcd += cd;\n totalic += ic;\n totalid += id;\n\n }\n System.out.println(\"Answer Type Totals\\n\" + \"CC: \" + totalcc + \"\\nCD: \" + totalcd + \"\\nIC: \" + totalic + \"\\nID: \" + totalid);\n\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n if (csv != null)\n csv.close();\n\n if (ql != null)\n ql.close();\n\n }\n }",
"private void addTimes(File path,ArrayList<Node> nodes,ArrayList<Entrant> entrants)\n {\n Start.log(\"Getting Times\");\n ArrayList<String> file = getFile(path);\n for (int i = 0; i < file.size();i++)\n {\n Scanner scan = new Scanner(file.get(i));\n CheckPointType cpt = CheckPointType.valueOf(scan.next());\n int nodeno = scan.nextInt(), entrant = scan.nextInt();\n Node node = null;\n //rebuild the time objects\n for (int j = 0; j < nodes.size();j++)\n if (nodes.get(j).getNode() == nodeno)\n node = nodes.get(j);\n //add them to the relevant entrants\n for (int j = 0; j < entrants.size();j++)\n if (entrants.get(j).getEntrantNo() == entrant)\n entrants.get(j).addTime(new Time(cpt,node,scan.next()));\n }\n }",
"public static void main(String[] args) throws IOException {\n\n String file = \"C:/Java Projects/java-web-dev-exercises/src/exercises/CountingCharsSentence.txt\";\n Path path = Paths.get(file);\n List<String> lines = Files.readAllLines(path);\n Object[] string = lines.toArray();\n String string2 = Arrays.toString(string);\n\n String[] wordsInString = string2.toLowerCase().split(\"\\\\W+\");\n String rejoinedString = String.join(\"\", wordsInString);\n char[] charactersInString = rejoinedString.toCharArray();\n\n HashMap<Character, Integer> letterMap = new HashMap<>();\n\n\n for (char letter : charactersInString) {\n if (!letterMap.containsKey(letter)) {\n int letterCount = 1;\n letterMap.put(letter, letterCount);\n } else if (letterMap.containsKey(letter)) {\n letterMap.put(letter, letterMap.get(letter) + 1);\n }\n }\n\n\n System.out.println(letterMap);\n }",
"private static void ProcessFile(File fileEntry) throws FileNotFoundException {\n \n\t wordCount(fileEntry) ;\n\t\t\n countVowels(fileEntry);\n\t\n\t\t\n}",
"public int countAlarm()throws IOException{\n String content = readFile();\n int length = \"countalarm\".length();\n return Integer.parseInt(content.substring(length+3,length+4));\n }",
"public void map(Object key, Text value, Context context) throws IOException, InterruptedException {\n word.set(value);\n String line = word.toString();\n String[] col_vals = line.split(\",\");\n\n Text total_Passenger_key = new Text(\"_Passenger\");\n Text total_Trip_key = new Text(\"_Trip\");\n\n if (!col_vals[0].trim().isEmpty()) {\n DateTimeFormatter format = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss\");\n\n try {\n \n // changing the type of first column to date value\n LocalDateTime date = LocalDateTime.parse(col_vals[1], format);\n\n // getting week days\n DayOfWeek days_of_week = date.getDayOfWeek();\n\n // For weekend - mention weekend\n if (days_of_week.toString() == \"SATURDAY\" || days_of_week.toString() == \"SUNDAY\") {\n\n context.write(new Text(date.getHour() + \"Weekend_\" + total_Passenger_key),\n new IntWritable(Integer.parseInt(col_vals[3])));\n context.write(new Text(date.getHour() + \"Weekend_\" + total_Trip_key), one);\n }\n // For weekday - mention weekday\n else {\n\n context.write(new Text(date.getHour() + \"Weekday_\" + total_Passenger_key),\n new IntWritable(Integer.parseInt(col_vals[3])));\n context.write(new Text(date.getHour() + \"Weekday_\" + total_Trip_key), one);\n\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }",
"public static void main(String args[]) throws Exception{\n Pattern patron = Pattern.compile(\"\\\\s+\");\n\n //leer todas las lineas del archivo\n Stream<String> lineas = Files.lines(Paths.get(\"./data/alicia.txt\"),StandardCharsets.ISO_8859_1);\n\n //eliminamos signos de puntuacion\n Stream<String> lineasProcesadas = lineas.map(linea -> linea.replaceAll(\"(?!')\\\\p{Punct}\", \"\"));\n\n //trocear las lineas para tratar con palabras\n\n Stream<String> palabras = lineasProcesadas.flatMap(linea -> patron.splitAsStream(linea));\n\n //filtrar palabras vacias\n\n Stream<String> sinVacias = palabras.filter(palabra -> !palabra.isEmpty());\n\n // generar un diccionario con entradas tipo <palabra, numero de ocurrencias>\n // queremos que el diccionario sea tipo TreeMap\n\n TreeMap<String,Long> mapa = sinVacias.collect(Collectors.groupingBy(String::toLowerCase, TreeMap::new,Collectors.counting()));\n\n\n //Ahora todo compactado\n\n TreeMap<String,Long> mapa2 = Files.lines(Paths.get(\"./data/alicia.txt\"),StandardCharsets.ISO_8859_1).\n map(linea -> linea.replaceAll(\"(?!')\\\\p{Punct}\", \"\")).\n flatMap(linea -> patron.splitAsStream(linea)).\n filter(palabra -> !palabra.isEmpty()).\n collect(Collectors.groupingBy(String::toLowerCase, TreeMap::new,Collectors.counting()));\n\n\n mapa2.forEach(\n (palabra, numero) -> System.out.println(palabra + \" : \" + numero)\n );\n\n //Con esto pedo crear un stream\n //mapa2.entrySet().stream().forEach();\n\n\n //agrupamiento por inicales, todas las palabras con dicha inicial y contadores\n\n TreeMap<Character, List<Map.Entry<String,Long>>> mapa3 = mapa2.\n entrySet().\n stream().\n collect(Collectors.groupingBy(entrada -> entrada.getKey().charAt(0),TreeMap::new,Collectors.toList()));\n\n mapa3.forEach((inicial,listaPalabras) -> {\n System.out.printf(\"%n%c%n\", inicial);\n listaPalabras.stream().forEach( entrada -> {\n System.out.printf(\"%13s: %d%n\", entrada.getKey(), entrada.getValue());\n });\n });\n\n\n\n\n }",
"public static void main(String[] args) {\n\r\n\t\t\r\n\t\ttry {\r\n\t\t\tin = new FileReader(\"Pride & Prejudice.txt\");\r\n\t\t\treader = new BufferedReader(in);\r\n\r\n\t\t\twhile(reader.readLine()!=null){\r\n\t\t\t\tline=reader.readLine().split(\" \");\r\n\t\t\t\tfor(int index=0;index<line.length;index++){\r\n\t\t\t\t\tif(map.containsKey(line[index])){\r\n\t\t\t\t\t\tint value= map.get(line[index])+1;\r\n\t\t\t\t\t\tmap.put(line[index],value);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tmap.put(line[index],1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tfor(String key: map.keySet()){\r\n\t\t\tSystem.out.println(\"The word \"+key+\" occurs \"+map.get(key)+\" times\");\r\n\t\t}\r\n\t}",
"public static HashMap<String, HashMap<String, Double>> fileToObv(String wordsPathName, String posPathName) throws IOException{\n //initialize BufferedReaders and ap to put observations in\n BufferedReader wordsInput = null;\n BufferedReader posInput = null;\n HashMap<String, HashMap<String, Double>> observations = new HashMap<String, HashMap<String, Double>>();\n try{\n //try to open files\n posInput = new BufferedReader(new FileReader(posPathName));\n wordsInput = new BufferedReader(new FileReader(wordsPathName));\n String posLine = posInput.readLine();\n String wordsLine = wordsInput.readLine();\n //While there are more lines in each of the given files\n while (wordsLine != null && posLine != null){\n //Lowercase the sentence file, and split both on white space\n wordsLine = wordsLine.toLowerCase();\n //posLine = posLine.toLowerCase();\n String[] wordsPerLine = wordsLine.split(\" \");\n String[] posPerLine = posLine.split(\" \");\n //Checks for the '#' character, if it's already in the map,\n //checks if the first word in the sentence is already in the inner map\n //if it is, then add 1 to the integer value associated with it, if not,\n //add it to the map with an integer value of 1.0\n if (observations.containsKey(\"#\")){\n HashMap<String, Double> wnc = new HashMap<String, Double>();\n wnc = observations.get(\"#\");\n if (wnc.containsKey(wordsPerLine[0])){\n Double num = wnc.get(wordsPerLine[0]) +1;\n wnc.put(wordsPerLine[0], num);\n observations.put(\"#\", wnc);\n }\n else{\n wnc.put(wordsPerLine[0], 1.0);\n observations.put(\"#\", wnc);\n }\n }\n else{\n HashMap<String, Double> map = new HashMap<String, Double>();\n map.put(wordsPerLine[0], 1.0);\n observations.put(\"#\", map);\n }\n //for each word in line of the given string\n for (int i = 0; i < wordsPerLine.length-1; i ++){\n HashMap<String, Double> wordsAndCounts = new HashMap<String, Double>();\n //if the map already contains the part of speech\n if (observations.containsKey(posPerLine[i])){\n //get the inner map associated with that part of speech\n wordsAndCounts = observations.get(posPerLine[i]);\n //if that inner map contains the associated word\n //add 1 to the integer value\n if (wordsAndCounts.containsKey(wordsPerLine[i])){\n Double num = wordsAndCounts.get(wordsPerLine[i]) + 1;\n wordsAndCounts.put(wordsPerLine[i], num);\n }\n //else, add the word to the inner map with int value of 1\n else{\n wordsAndCounts.put(wordsPerLine[i], 1.0);\n }\n }\n //else, add the word to an empty map with the int value of 1\n else{\n wordsAndCounts.put(wordsPerLine[i], 1.0);\n }\n //add the part of speech and associated inner map to the observations map.\n observations.put(posPerLine[i], wordsAndCounts);\n }\n //read the next lines in each of the files\n posLine = posInput.readLine();\n wordsLine = wordsInput.readLine();\n }\n }\n //Catch exceptions\n catch (IOException e){\n e.printStackTrace();\n }\n //close files\n finally{\n wordsInput.close();\n posInput.close();\n }\n //return created map\n return observations;\n }",
"public void split_daily_data(String path) {\n\n\t\t/**\n\t\t * Hashtable<UserID, Hashtable<Week Day, Observation Sequence>> obstable\n\t\t */\n\t\tHashtable<Integer, Hashtable<String, Obs>> obstable = new Hashtable<>();\n\t\tString subpath = path.substring(0, path.lastIndexOf('.'));\n\n\t\t// splitted data ..\n\t\tHashtable<String, List<String>> datasets = new Hashtable<>();\n\n\t\tBufferedReader reader;\n\t\ttry {\n\t\t\treader = new BufferedReader(new FileReader(path));\n\n\t\t\tString line;\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tString[] seg = line.split(CLM);\n\t\t\t\tString day = seg[1].split(\" \")[0];\n\t\t\t\tif (datasets.containsKey(day)) {\n\t\t\t\t\tList<String> data = datasets.get(day);\n\t\t\t\t\tdata.add(line);\n\t\t\t\t\tdatasets.replace(day, data);\n\t\t\t\t} else {\n\t\t\t\t\tList<String> data = new ArrayList<>();\n\t\t\t\t\tdata.add(line);\n\t\t\t\t\tdatasets.put(day, data);\n\t\t\t\t}\n\t\t\t\t//\n\t\t\t}\n\n\t\t} catch (FileNotFoundException ex) {\n\t\t\tLogger.getLogger(ObsTripsBuilder.class.getName()).log(Level.SEVERE, null, ex);\n\t\t} catch (IOException ex) {\n\t\t\tLogger.getLogger(ObsTripsBuilder.class.getName()).log(Level.SEVERE, null, ex);\n\t\t}\n\n\t\tfor (Map.Entry<String, List<String>> entry : datasets.entrySet()) {\n\t\t\tString day = entry.getKey();\n\t\t\tList<String> data = entry.getValue();\n\t\t\tString output = subpath + \"_Day_\" + day + \".CSV\";\n\t\t\tFile day_file = new File(output);\n\t\t\ttry {\n\t\t\t\tif (!day_file.exists()) {\n\t\t\t\t\tday_file.createNewFile();\n\t\t\t\t}\n\t\t\t\tFileWriter day_writer = new FileWriter(day_file.getAbsoluteFile());\n\t\t\t\tBufferedWriter day_bw = new BufferedWriter(day_writer);\n\t\t\t\tfor (Iterator<String> iterator = data.iterator(); iterator.hasNext();) {\n\t\t\t\t\tString l = iterator.next();\n\t\t\t\t\tday_bw.append(l);\n\t\t\t\t\tday_bw.newLine();\n\t\t\t\t}\n\t\t\t\tday_bw.close();\n\t\t\t\tday_writer.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}",
"public static void main(String[] args) {\n String timestamp;\n TrafficSnapshotHolder counter = new TrafficSnapshotHolder();\n try (FileReader fr = new FileReader(\"data/traffic1.txt\");\n BufferedReader br = new BufferedReader(fr)) {\n while ((timestamp = br.readLine()) != null) {\n counter.add(extractInfo(timestamp));\n }\n }\n catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n if(counter.isEmpty()){\n System.out.println(\"File at location is empty, please check file\");\n System.exit(0);\n }\n counter.processSnapshots();\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}",
"public static void main(String... args) {\n try{ //this makes it so that all the console output will be printed to a file\n //PrintStream out = new PrintStream(new FileOutputStream(WORD_COUNT_TABLE_FILE.toString()));\n //System.setOut(out);\n }\n catch (Exception e){\n e.printStackTrace();\n }\n\n long start = System.currentTimeMillis();\n\n\n\n Map<String, List<Integer>> allWords = new ConcurrentHashMap<>(); //the HashMap that will contain all the words and list of occurrences\n List<String> listOfFiles = getFilesFromDirectory(); //the list of files from the given folder\n List<Thread> threadList = new LinkedList<>();\n\n runWithThreads(allWords, listOfFiles, NUMBER_OF_THREADS);\n\n TreeMap<String, List<Integer>> sortedMap = new TreeMap<>(allWords);\n Set<Entry<String, List<Integer>>> sortedEntries = sortedMap.entrySet();\n\n long end = System.currentTimeMillis();\n\n System.out.print(Table.makeTable(sortedEntries, listOfFiles));\n System.out.println(\"\\nTime: \" + (end-start));\n\n\n\n }",
"public void count(String dataFile) {\n\t\tScanner fileReader;\n\t\ttry {\n\t\t\tfileReader= new Scanner(new File(dataFile));\n\t\t\twhile(fileReader.hasNextLine()) {\n\t\t\t\tString line= fileReader.nextLine().trim(); \n\t\t\t\tString[] data= line.split(\"[\\\\W]+\");\n\t\t\t\tfor(String word: data) {\n\t\t\t\t\tthis.wordCounter= map.get(word);\n\t\t\t\t\tthis.wordCounter= (this.wordCounter==null)?1: ++this.wordCounter;\n\t\t\t\t\tmap.put(word, this.wordCounter);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfileReader.close();\n\t\t}\n\t\tcatch(FileNotFoundException fnfe) {\n\t\t\tSystem.out.println(\"File\" +dataFile+ \"can not be found.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}",
"public static void main (String [] args) throws IOException {\n\t\tBufferedReader f = new BufferedReader(new FileReader(\"lifeguards.in\"));\n\t\t// input file name goes above\n\t\tPrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"lifeguards.out\")));\n\t\t\n\t\tList<TimeSpan> timeSpanList = new Vector<TimeSpan>();\n\t\tint n = Integer.parseInt(f.readLine().trim());\n\t\tfor(int i = 0 ; i < n ; i++) {\n\t\t\tString[] p = f.readLine().trim().split(\" \");\n\t\t\tint s = Integer.parseInt(p[0]);\n\t\t\tint e = Integer.parseInt(p[1]);\n\t\t\tTimeSpan m = new TimeSpan(s, e);\n\t\t\ttimeSpanList.add(m);\n\t\t}\n\n\t\tCollections.sort(timeSpanList, TimeComparator);\n\t\t\n\t\tint total_coverage = 0;\n\t\tint min_reduce = 999999999;\n\t\tint cur_start = 0;\n\t\tint cur_end = 0;\n\t\tfor(int i = 0 ; i < timeSpanList.size(); i++) {\n\t\t\tif(i == 0){\n\t\t\t\tcur_start = timeSpanList.get(i).start;\n\t\t\t\tcur_end = timeSpanList.get(i).end;\n\t\t\t}else {\n\t\t\t\tif(timeSpanList.get(i).start > cur_end) {\n\t\t\t\t\ttotal_coverage += cur_end-cur_start;\n\t\t\t\t\tcur_start = timeSpanList.get(i).start;\n\t\t\t\t\tcur_end = timeSpanList.get(i).end;\n\t\t\t\t}else {\n\t\t\t\t\tif(timeSpanList.get(i).end > cur_end) {\n\t\t\t\t\t\tcur_end = timeSpanList.get(i).end;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//For the last\n\t\t\tint overlap = 0;\n\t\t\tif(i == timeSpanList.size()-1) {\n\t\t\t\ttotal_coverage += cur_end-cur_start;\n\t\t\t}\n\t\t\t\n\t\t\t//Find overlap comparing to prev and next\n\t\t\t//First case = only compare to next\n\t\t\tif(i == 0) {\n\t\t\t\t//Single size input\n\t\t\t\tif(n == 1) {\n\t\t\t\t\toverlap = 0;\n\t\t\t\t}else {\n\t\t\t\t\tif(timeSpanList.get(i+1).start < timeSpanList.get(i).end) {\n\t\t\t\t\t\toverlap = Math.min(timeSpanList.get(i).end,timeSpanList.get(i+1).end) - \n\t\t\t\t\t\t\t\ttimeSpanList.get(i+1).start; \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Last case = only compare to prev\n\t\t\telse if(i == timeSpanList.size()-1) {\n\t\t\t\tif(timeSpanList.get(i-1).end > timeSpanList.get(i).start) {\n\t\t\t\t\toverlap = timeSpanList.get(i-1).end - \n\t\t\t\t\t\t\tMath.max(timeSpanList.get(i).start, timeSpanList.get(i-1).start); \n\t\t\t\t}\n\t\t\t}\n\t\t\t//Otherwise = compare to prev and next\n\t\t\telse {\n\t\t\t\t//Prev\n\t\t\t\tif(timeSpanList.get(i-1).end > timeSpanList.get(i).start) {\n\t\t\t\t\toverlap += timeSpanList.get(i-1).end - \n\t\t\t\t\t\t\tMath.max(timeSpanList.get(i).start, timeSpanList.get(i-1).start); \n\t\t\t\t}\n\t\t\t\t//Next\n\t\t\t\tif(timeSpanList.get(i+1).start < timeSpanList.get(i).end) {\n\t\t\t\t\toverlap += Math.min(timeSpanList.get(i).end,timeSpanList.get(i+1).end)\n\t\t\t\t\t\t\t- timeSpanList.get(i+1).start; \n\t\t\t\t}\n\t\t\t}\n\t\t\t//System.out.println(overlap);\n\t\t\tint reduced_day = timeSpanList.get(i).end - timeSpanList.get(i).start - overlap;\n\t\t\tif(min_reduce > reduced_day)\n\t\t\t\tmin_reduce = reduced_day;\n\t\t\t\n\t\t}\n\t\t\n\t\t//System.out.println(total_coverage-min_reduce);\n\t\tout.println(total_coverage-min_reduce);\n\t\t// output result\n\t\tout.close(); // close the output file\n\t}",
"private int countTimeLineMatches(RenderContext myrc, Line2D line, boolean mask[], long ts0, long resolution) {\n int matches = 0;\n Iterator<Bundle> it = myrc.line_to_bundles.get(line).iterator();\n while (it.hasNext()) {\n Bundle bundle = it.next();\n if (bundle.hasTime()) { \n int i0 = (int) ((bundle.ts0() - ts0)/resolution), i1 = (int) ((bundle.ts1() - ts0)/resolution);\n\tfor (int i=i0;i<=i1;i++) if (mask[i]) matches++;\n }\n }\n return matches;\n }",
"public static void readFileToMap(Map<String, List<Integer>> hashMap, String path, int numFiles, int thisFileNum){\n try{\n FileReader file = new FileReader(path);\n BufferedReader textFile = new BufferedReader(file);\n\n String fileLine = \"\";\n String[] wordsInLine;\n List<Integer> occurences;\n List<Integer> temp;\n\n while((fileLine = textFile.readLine()) != null){\n wordsInLine = fileLine.split(\" \");\n cleanLine(wordsInLine);\n //add them to map\n for(String word : wordsInLine){\n\n if(word.length() > Table.maxWordLength){ //keeps track of the longest character\n Table.setMaxWordLength(word.length());\n }\n\n if(!hashMap.containsKey(word)){\n occurences = new ArrayList<>(); //creating a new value makes it so that one change wont affect every HashMap element\n occurences = setZerosList(numFiles);\n occurences.set(thisFileNum, 1);\n hashMap.put(word, occurences);\n }\n else{\n temp = hashMap.get(word); //this code makes a new list, and increments the word appearance by 1\n temp.set(thisFileNum, temp.get(thisFileNum)+1);\n hashMap.put(word, temp );\n }\n }\n }\n }\n catch (Exception e){\n //e.printStackTrace();\n return;\n }\n }",
"public int[] findTime(String startDate, String endDate) {\n //read data from crime csv\n Path questionPath = Paths.get(\"CrimeLatLonXY1990.csv\");\n File questionFile = questionPath.toFile();\n FileReader reader;\n BufferedReader br;\n String startTime = null, endTime = null;\n int[] res = new int[2];\n String columns[] = null;\n try {\n reader = new FileReader(questionFile);\n br = new BufferedReader(reader);\n String str = null;\n try {\n while ((str = br.readLine()) != null) {\n columns = str.split(\"\\\\,\");\n try {\n // get data and time info from file\n String date = columns[5].trim();\n String time = columns[2].trim();\n // get corresponding time info according to date\n if (date.equals(startDate)) {\n startTime = time;\n }\n if (date.equals(endDate)) {\n endTime = time;\n }\n // if finished find, return found value\n if (startTime != null && endTime != null) {\n res[0] = Integer.parseInt(startTime);\n res[1] = Integer.parseInt(endTime);\n return res;\n }\n } catch (NumberFormatException e) {\n //skip the first line\n continue;\n }\n\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n\n }\n } catch (FileNotFoundException ex) {\n ex.printStackTrace();\n }\n return null;\n }",
"private int readFlatFile(String expositionDirPath, String flatFilename, int expoYear){\n String badgeID, expoValue, line = \"\";\n int lineCounter = 0, idx = 0, expoMonth = 0;\n\n try{\n // set up a logger\n Logger.setOutputFile(expositionDirPath+\"/\"+flatFilename.substring(0,flatFilename.length()-4)+\".log\");\n Logger.setAppend(false);\n\n // exposite -> expoSiteId\n String expoSite = flatFilename.substring(0,3);\n int expoSiteId = 0;\n if(expoSite.equalsIgnoreCase(\"DOE\")) expoSiteId = 1;\n else if(expoSite.equalsIgnoreCase(\"TIH\")) expoSiteId = 2;\n else if(expoSite.equalsIgnoreCase(\"IRE\")) expoSiteId = 3;\n else if(expoSite.equalsIgnoreCase(\"OTH\")) expoSiteId = 4;\n\n openInputFile(expositionDirPath+\"/\"+flatFilename);\n\n // run thru lines in file\n while((line = lineNumberReader.readLine()) != null){\n lineCounter++;\n idx = 0;\n\n if(line.length() > 0){\n badgeID = line.substring(idx,idx+BADGEID_LEN).trim(); idx+=BADGEID_LEN;\n expoMonth = Integer.parseInt(line.substring(idx,idx+BADGEID_LEN).trim()); idx+=EXPOMONTH_LEN+5; // 5 = redundant chars\n expoValue = line.substring(idx).trim();\n\n // date range in which the expositions took place (1 whole month)\n Calendar expoDate = new GregorianCalendar(expoYear,expoMonth-1,1,0,0,0);\n Date expoDateBegin = expoDate.getTime();\n expoDate.add(Calendar.MONTH,1);\n Date expoDateEnd = expoDate.getTime();\n\n if(Debug.enabled){\n Debug.println(\"\\n###### [\"+badgeID+\", \"+expoMonth+\", \"+expoValue+\"] ######\");\n Debug.println(\"expoDateBegin : \"+dateFormat.format(expoDateBegin));\n Debug.println(\"expoDateEnd : \"+dateFormat.format(expoDateEnd)+\"\\n\");\n }\n\n saveExpositionInDB(badgeID,expoSiteId,expoMonth,expoYear,expoDateBegin,expoDateEnd,expoValue);\n }\n else{\n Logger.log(\"Empty line in flatfile '\"+flatFilename+\"'.\",Logger.ERROR_LEVEL_INFO,\"\"+lineCounter);\n }\n }\n }\n catch(Exception e){\n e.printStackTrace();\n }\n finally{\n Logger.close();\n\n try{\n closeInputFile();\n }\n catch(IOException ioe){\n ioe.printStackTrace();\n }\n }\n\n if(Debug.enabled) Debug.println(\"\\n=======================================================\");\n if(Debug.enabled) Debug.println(\"flat file '\"+flatFilename+\"' read.\\n\\n\");\n\n return lineCounter;\n }",
"public static HashMap<String, HashMap<String, Double>> fileToTrans(String pathName) throws IOException{\n BufferedReader input = null;\n HashMap<String, HashMap<String, Double>> transitions = new HashMap<String, HashMap<String, Double>>();\n\n try{\n //Read in file of parts of speech\n input = new BufferedReader(new FileReader(pathName));\n String line = input.readLine();\n //While the next line is not null,\n while (line != null){\n //line = line.toLowerCase();\n //Split on white space\n String[] states = line.split(\" \");\n //for each part of speech in the line\n for (int i = 0; i < states.length-1; i ++){\n //if it's the first POS in the line\n if (i == 0){\n //Checks for the '#' character, if it's already in the map,\n //checks if the first POS in the sentence is already in the inner map\n //if it is, then add 1 to the integer value associated with it, if not,\n //add it to the map with an integer value of 1.0\n if (transitions.containsKey(\"#\")){\n HashMap<String, Double> current = transitions.get(\"#\");\n if (current.containsKey(states[0])){\n double newval = current.get(states[0]) + 1;\n current.put(states[0], newval);\n transitions.put(\"#\", current);\n }\n else{\n current.put(states[0], 1.0);\n transitions.put(\"#\", current);\n }\n }\n else{\n HashMap<String, Double> val = new HashMap<String, Double>();\n val.put(states[0], 1.0);\n transitions.put(\"#\", val);\n }\n }\n //set nextState = to the next state in line\n String nextState = states[i+1];\n //if the transitions map already as the given part of speech\n if (transitions.containsKey(states[i])){\n //set current = to the inner map\n HashMap<String, Double> current = transitions.get(states[i]);\n //if the inner map has the next part of speech, add one to the int value\n if (current.containsKey(nextState)){\n current.put(nextState, current.get(nextState) + 1);\n transitions.put(states[i], current);\n }\n //else, add it to the inner map\n //then put that inner map into the transitions map\n else{\n current.put(nextState, 1.0);\n transitions.put(states[i], current);\n }\n }\n //else, create a new map, add the next state with a value of 1\n //add it to the transitions map\n else{\n HashMap<String, Double> val = new HashMap<String, Double>();\n val.put(nextState, 1.0);\n transitions.put(states[i], val);\n }\n }\n line = input.readLine();\n }\n }\n //catch exceptions\n catch (IOException e){\n e.printStackTrace();\n }\n //close the file\n finally{\n input.close();\n }\n //return the map\n return transitions;\n }",
"public static void main(String[] args) {\n FilesParser filesParser = new FilesParser();\r\n ArrayList<Double> time = filesParser.get_timeList();\r\n Map<Double, ArrayList<Double>> expFile = new HashMap<>();\r\n ArrayList<Map<Double, ArrayList<Double>>> theorFiles = new ArrayList<>();\r\n\r\n try {\r\n expFile = filesParser.trimStringsAndGetData(0,\r\n filesParser.getDirectories()[0],\r\n filesParser.get_expFiles()[2]);\r\n List<String> fileList = filesParser.get_theorFileList();\r\n for (int i = 0; i < fileList.size(); i++) {\r\n theorFiles.add(filesParser.trimStringsAndGetData(1,\r\n filesParser.getDirectories()[1],\r\n filesParser.get_theorFileList().get(i)));\r\n }\r\n //System.out.println(expFile.get(0.00050));\r\n //System.out.println(expFile.get(-0.25));\r\n //System.out.println(expFile);\r\n //System.out.println(theorFiles.get(0.00050));\r\n //System.out.println(theorFiles);\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n /*for (int i = 0; i < theorFiles.size(); i++) {\r\n Map<Double, ArrayList<Double>> theorFile = theorFiles.get(i);\r\n for (int ik = 0; ik < time.size(); ik++) {\r\n ArrayList<Double> theorFileLine = theorFile.get(time.get(ik));\r\n if (theorFileLine != null) {\r\n for (int j = 0; j < theorFileLine.size(); j++) {\r\n double theord = theorFileLine.get(j);\r\n for (int k = 0; k < expFile.size(); k++) {\r\n ArrayList<Double> expFileLine = expFile.get(time.get(ik));\r\n if (expFileLine != null) {\r\n for (int l = 0; l < expFileLine.size(); l++) {\r\n double expd = expFileLine.get(l);\r\n\r\n double div = expd / theord;\r\n if (div == 1) System.out.println(i);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }*/\r\n\r\n }",
"public ArrayList<Task> loadData() throws FileNotFoundException {\n ArrayList<Task> dukeList = new ArrayList<>();\n Scanner sc = new Scanner(file);\n Task t;\n while (sc.hasNextLine()) {\n String line = sc.nextLine();\n String[] splitBySpace = line.split(\" \");\n String[] splitBySlash;\n String command = splitBySpace[0];\n\n if (command.equals(\"D\")) {\n splitBySlash = line.split(\"/\");\n\n //Splits String the second time to get the description of deadline task\n String[] splitBySpace2 = splitBySlash[0].split(\" \");\n String getDesc = \"\";\n for (int i = 2; i < splitBySpace2.length; i++) {\n getDesc = getDesc + splitBySpace2[i] + \" \";\n }\n\n t = new Deadline(getDesc.trim(), splitBySlash[1]);\n if (splitBySpace[1].equals(\"1\")) {\n t.markAsDone();\n }\n dukeList.add(t);\n } else if (command.equals(\"E\")) {\n splitBySlash = line.split(\"/\");\n\n //Splits String the second time to get the description of event task\n String[] splitBySpace2 = splitBySlash[0].split(\" \");\n String getDesc = \"\";\n for (int i = 2; i < splitBySpace2.length; i++) {\n getDesc = getDesc + splitBySpace2[i] + \" \";\n }\n\n t = new Event(getDesc.trim(), splitBySlash[1]);\n if (splitBySpace[1].equals(\"1\")) {\n t.markAsDone();\n }\n dukeList.add(t);\n } else {\n String getDesc = \"\";\n for (int i = 2; i < splitBySpace.length; i++) {\n getDesc = getDesc + splitBySpace[i] + \" \";\n }\n\n t = new ToDo(getDesc.trim());\n if (splitBySpace[1].equals(\"1\")) {\n t.markAsDone();\n }\n dukeList.add(t);\n }\n }\n\n return dukeList;\n }",
"public static void calculatePeakActivity(String path) {\n List<String> visits = CsvParser.parseCsv(path);\n\n Map<Integer, Integer> minuteFrames = fillInFrames(visits);\n\n Map<Integer, Integer> peakFrames = maxValueEntries(minuteFrames);\n\n displayResult(peakFrames);\n }",
"public String[] buildEntries(String a) {\n try {\n File file = new File(a);\n Scanner input = new Scanner(file);\n while (input.hasNextLine()) {\n String line=input.nextLine();\n String name=line.substring(line.indexOf(\"\\t\"));\n name=name.substring(0,name.lastIndexOf(\"H\"));\n name=name.substring(0,name.lastIndexOf(\"\\t\"));\n int entries=Integer.parseInt(line.substring(line.lastIndexOf(\"\\t\")+1,line.lastIndexOf(\"E\")));\n while (entries>0) {\n entryList.add(name);\n entries--;\n System.out.println(\"Added: \"+name);\n }\n}\n return drawBE(entryList,a);\n }\n catch(FileNotFoundException b) {\n System.out.println(\"Error, no entries\"); \n String ret[] = new String[6];\n ret[0]=\"NOFILE\";\n return ret;\n }\n }",
"private int sizeForHashTable()\n {\n String compare=\"\";\n int numberOfdates = 0;\n for (int i=0; i <= hourly.size();i++)\n {\n if (i==0)\n {\n numberOfdates +=1;\n compare = data.get(i).getFCTTIME().getPretty();\n }else if(compare != data.get(i).getFCTTIME().getPretty())\n {\n numberOfdates+=1;\n compare = data.get(i).getFCTTIME().getPretty();\n }\n }\n return numberOfdates;\n }",
"private void parse() throws IOException {\n\n\t\tStats statsObject = new Stats();\n\n\t\tstatsObject.setProcessName(process);\n\n\t\tList<String> lines = Files.readAllLines(Paths.get(filename), Charset.defaultCharset());\n\n\t\tPattern timePattern = Pattern.compile(\"((\\\\d+)-)*(\\\\d+)\\\\W((\\\\d+):)*(\\\\d+)\\\\.(\\\\d+)\");\n\n\t\tSystem.out.println(filename+\" \"+lines.get(0));\n\t\tMatcher matcher = timePattern.matcher(lines.get(0));\n\t\twhile (matcher.find()) {\n\t\t\tstatsObject.setStartTime(matcher.group(0));\n\t\t\tbreak;\n\t\t}\n\n\t\tmatcher = timePattern.matcher(lines.get(lines.size() - 1));\n\t\twhile (matcher.find()) {\n\t\t\tstatsObject.setEndTime(matcher.group(0));\n\t\t\tbreak;\n\t\t}\n\t\tString error = new String();\n\t\tfor (String line : lines) {\n\n\t\t\tif (line.startsWith(\"[\")) {\n\t\t\t\tif (!error.isEmpty()) {\n\t\t\t\t\tstatsObject.addError(error);\n\t\t\t\t\terror = \"\";\n\t\t\t\t}\n\n\t\t\t\tif (line.contains(\"Number of records processed: \")) {\n\n\t\t\t\t\tPattern numberPattern = Pattern.compile(\"\\\\d+\");\n\t\t\t\t\tmatcher = numberPattern.matcher(line);\n\t\t\t\t\t\n\t\t\t\t\tString numberOfRecordsProcessed = \"N/A\";\n\t\t\t\t\t\n\t\t\t\t\twhile (matcher.find()) {\n\t\t\t\t\t\tnumberOfRecordsProcessed = matcher.group();\n\t\t\t\t\t}\n\t\t\t\t\tstatsObject.setRecordsProcessed(numberOfRecordsProcessed);\n\n\t\t\t\t}\n\n\t\t\t\telse if (line.contains(\"WARNING\")) {\n\t\t\t\t\tif (line.contains(\"MISSING Property\")) {\n\t\t\t\t\t\tstatsObject.incrementErrorCounter();\n\t\t\t\t\t\tstatsObject.addError(line);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstatsObject.incrementWarningCounter();\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else if (line.contains(\"Exception\") || (line.contains(\"Error\"))) {\n\t\t\t\tif (!error.isEmpty()) {\n\t\t\t\t\tstatsObject.addError(error);\n\t\t\t\t\terror = \"\";\n\t\t\t\t}\n\t\t\t\tstatsObject.incrementErrorCounter();\n\t\t\t\terror = error + line;\n\t\t\t} else {\n\t\t\t\terror = error + line ;\n\t\t\t}\n\n\t\t}\n\t\t// reader.close();\n\t\tif (statsObject.getErrorCounter() > 0) {\n\t\t\tstatsObject.setStatus(\"Failure\");\n\t\t}\n\n\t\tPattern pattern = Pattern.compile(\"\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\\\\d\");\n\t\tmatcher = pattern.matcher(filename);\n\t\tString date = null;\n\t\twhile (matcher.find()) {\n\t\t\tdate = matcher.group(0);\n\t\t\tbreak;\n\t\t}\n\t\tboolean saveSuccessful = OutputManipulator.addToStatFile(username, process, date, statsObject);\n\n\t\tif (saveSuccessful) {\n\t\t\tFileParseScheduler.addSuccessfulParsedFileName(username, process, filename);\n\t\t}\n\n\t\tFileParseScheduler.removeLatestKilledThreads(process + filename);\n\t}",
"@Override\n public void reduce(Text key, Iterable<Text> values, Context context) throws IOException, InterruptedException {\n ArrayList<String> cache = new ArrayList<String>();\n String groupId = \"\";\n String earlist = \"\";\n int earlistTime = 999999;\n int latestTime = 0;\n for (Text e : values) {\n cache.add(e.toString());\n String[] input = e.toString().split(\",\");\n int time = Integer.parseInt(input[1]);\n //find the eaelistTime and latestTime of Typhoon\n if (time < earlistTime)\n earlistTime = time;\n if (time > latestTime)\n latestTime = time;\n }\n\n for (String e : cache) {\n String[] input1 = e.split(\",\");\n if (Integer.parseInt(input1[1]) == earlistTime) {\n String[] coordE = input1[2].trim().split(\"\\\\s+\");\n double tyLatE = Double.parseDouble(coordE[0]);\n double tyLngE = Double.parseDouble(coordE[2]);\n //if the start point of typhoon is west of 123E, then it may be group 2 or group 3\n if (tyLngE < 123) {\n for (String s : cache) {\n String[] input2 = s.split(\",\");\n if (Integer.parseInt(input2[1]) == latestTime) {\n String[] coordL = input2[2].trim().split(\"\\\\s+\");\n double tyLatL = Double.parseDouble(coordL[0]);\n double tyLngL = Double.parseDouble(coordL[2]);\n //if the end point of typhoon is west of 115E, then it belongs to group 3\n if (tyLngL < 115)\n groupId = \"3\";\n //if the end point of typhoon is east of 115E, then it belongs to group 2\n if (tyLngL > 115)\n groupId = \"2\";\n }\n }\n }\n //if the start point of typhoon is east of 123E, then it may be group 2 or group 3\n if (tyLngE > 123)\n groupId = \"1\";\n }\n }\n for (String e : cache) {\n context.write(null, new Text(groupId + \",\" + e));\n }\n\n }",
"private void writePauseCSV(Date start_time, Date end_time, double duration, String file_path) throws IOException {\n CSVWriter pause_csv_writer = null;\n List<String[]> read_all = new ArrayList<String[]>();\n List<String[]> write_all = new ArrayList<String[]>();\n String total_write_line[] = new String[6];\n String next_write_line[] = new String[3];\n double total_time_paused = 0;\n int number_of_pauses = 0;\n double average_pause_duration = 0;\n\n CSVReader pause_reader = null;\n\n try {\n pause_reader = new CSVReader(new FileReader(file_path), ',', '\"', 0);\n\n } catch (FileNotFoundException ex) {\n\n }\n\n if (pause_reader != null) {\n\n read_all = pause_reader.readAll();\n\n //remove the total line because this will be recalculated\n read_all.remove(read_all.size() - 1);\n\n //add the components to the read_all object\n next_write_line[0] = start_time.toString();\n next_write_line[1] = end_time.toString();\n next_write_line[2] = String.valueOf(duration);\n\n //add the new line to the read_all object\n read_all.add(next_write_line);\n\n int i = 1;\n\n //loop through the read_all object to recalculate the totals\n while (i < read_all.size()) {\n number_of_pauses++;\n total_time_paused = total_time_paused + Double.parseDouble(read_all.get(i)[2]);\n i++;\n }\n\n average_pause_duration = (Double) total_time_paused / number_of_pauses;\n\n total_write_line[0] = \"Number of Pauses:\";\n total_write_line[1] = String.valueOf(number_of_pauses);\n total_write_line[2] = \"Total Time Spent Paused:\";\n total_write_line[3] = String.valueOf(total_time_paused);\n total_write_line[4] = \"Average Pause Duration:\";\n total_write_line[5] = String.valueOf(average_pause_duration);\n\n read_all.add(total_write_line);\n\n pause_csv_writer = new CSVWriter(new FileWriter(file_path));\n pause_csv_writer.writeAll(read_all);\n pause_csv_writer.close();\n\n } else {\n pause_csv_writer = new CSVWriter(new FileWriter(file_path));\n\n //this code will only run after the first pause is recorded for the\n // activity so the first line and the total line will be equal\n next_write_line[0] = \"Pause Start Time\";\n next_write_line[1] = \"Pause End Time\";\n next_write_line[2] = \"Pause Duration\";\n pause_csv_writer.writeNext(next_write_line);\n\n next_write_line[0] = start_time.toString();\n next_write_line[1] = end_time.toString();\n next_write_line[2] = String.valueOf(duration);\n pause_csv_writer.writeNext(next_write_line);\n\n total_write_line[0] = \"Number of Pauses:\";\n total_write_line[1] = \"1\";\n total_write_line[2] = \"Total Time Spent Paused:\";\n total_write_line[3] = String.valueOf(duration);\n total_write_line[4] = \"Average Pause Duration:\";\n total_write_line[5] = String.valueOf(duration);\n\n // write the two initial lines to the csv\n pause_csv_writer.writeNext(total_write_line);\n pause_csv_writer.flush();\n pause_csv_writer.close();\n }\n\n }",
"public static void readDirectory(String dir){\n\t\tMap<Integer,Integer> catemap = new HashMap<Integer, Integer>();\r\n\t\tFile[] names = null;\r\n\t\tFile file = new File(dir);\r\n\t\tif(file.isFile())\r\n\t\t\tnames = new File[]{file};\r\n\t\telse\r\n\t\t\tnames = new File(dir).listFiles();\r\n\t\tList<String> lines = null;\r\n\t\tList<String> strs = null;\r\n\t\tList<Integer> keys = new ArrayList<Integer>();\r\n\t\tList<Integer> values = new ArrayList<Integer>();\r\n\t\tint v = 0;\r\n\t\tif(null!=names&&names.length>0){\r\n\t\t\tfor(File f:names){\r\n\t\t\t\tif(null!=lines)\r\n\t\t\t\t\tlines.clear();\r\n\t\t\t\tlines = readFile(f,\"utf-8\");\r\n\t\t\t\tif(null!=lines){\r\n\t\t\t\t\tint j = 0;\r\n\t\t\t\t\tint k=0;\r\n\t\t\t\t\tfor(String line:lines){\r\n\t\t\t\t\t\tstrs = parseStr2List(line, \"\\\\t\");\r\n//\t\t\t\t\t\tif(null!=strs&&strs.size()==7){\r\n//\t\t\t\t\t\t\tv = getPerValue(strs.get(3));\r\n//\t\t\t\t\t\t\tmaxmap.put(v, 1+DataFormat.parseInt(maxmap.get(v)));\r\n//\t\t\t\t\t\t\tv = getPerValue(strs.get(5));\r\n//\t\t\t\t\t\t\tcatemap.put(v, 1+DataFormat.parseInt(catemap.get(v)));\r\n//\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(null!=strs&&strs.size()==2){\r\n\t\t\t\t\t\t\tv = DataFormat.parseInt(strs.get(0));\r\n//\t\t\t\t\t\t\tif(v<=500){\r\n//\t\t\t\t\t\t\t\tv = j/5+1;\r\n//\t\t\t\t\t\t\t\tj = j+1;\r\n//\t\t\t\t\t\t\t}else{\r\n//\t\t\t\t\t\t\t\tv = 101;\r\n//\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(k>500) break;\r\n\t\t\t\t\t\t\tk++;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(j<20){\r\n\t\t\t\t\t\t\t\tkeys.add(v);\r\n\t\t\t\t\t\t\t\tvalues.add(DataFormat.parseInt(strs.get(1)));\r\n\t\t\t\t\t\t\t\tj++;\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tj=0;\r\n\t\t\t\t\t\t\t\tSystem.out.println(Arrays.toString(keys.toArray(new Integer[]{})));\r\n\t\t\t\t\t\t\t\tSystem.out.println(Arrays.toString(values.toArray(new Integer[]{})));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n//\t\t\t\t\t\t\tcatemap.put(v, DataFormat.parseInt(strs.get(1))+DataFormat.parseInt(catemap.get(v)));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n//\t\tfor(Entry<Integer, Integer> entry:maxmap.entrySet()){\r\n//\t\t\tUtils.appendToFile(\"/vol/user_log/maxmap.txt\", entry.getKey()+\"\\t\"+entry.getValue());\r\n//\t\t}\r\n//\t\tfor(Entry<Integer, Integer> entry:catemap.entrySet()){\r\n//\t\t\tUtils.appendToFile(\"C:\\\\Program Files\\\\SecureCRT\\\\download\\\\map.txt\", entry.getKey()+\"\\t\"+entry.getValue());\r\n//\t\t}\r\n\t}",
"public static void main(String[] args) throws FileNotFoundException \r\n\t\t{\r\n\t\t\r\n\t\t\tdouble timestamp_difference ; \r\n\t\t{\r\n\t\t\ttry (BufferedReader br = new BufferedReader (new FileReader(\"C:\\\\mslog.txt\"))) \r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\" Captured Summary of the Microservices Log file located at C:\\\\mslog.txt is as below : \" );\r\n\t\t\t\t\tSystem.out.println(\" ************ Start of Log file Summary ************* \");\r\n\t\t\t\t\tSystem.out.println(\" Sr.No 1 - \" ); \r\n\t\t\t\t\t\r\n\t\t\t\t\tString sCurrentLine;\r\n\t\t\t \r\n\t\t\t String Search=\"(addClient:97900)\";\r\n\t\t\t while ((sCurrentLine = br.readLine()) != null) \r\n\t\t\t {\t \t\r\n\t\t\t \t \r\n\t\t\t \tif(sCurrentLine.contains(Search))\r\n\t\t\t {\t\t \r\n\t\t\t System.out.println(\" (addClient:97900) string found in log file where Name of service is = addClient & Request id is = 97900 \" ) ;\r\n\t\t\t }\r\n\t\t\t \t\r\n\t\t\t \t\r\n\t\t\t }\r\n\t\t\t { \r\n\t\t\t \t\tint count = 0;\r\n\t\t\t for (int i = 0; i <= 1 ; i++) {\r\n\t\t\t count++;\r\n\t\t\t \r\n\t\t\t }\r\n\t\t\t System.out.println( \" Sr.No 2 - Number of requests made to the service are = \" + count);\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t\t\r\n\r\n\t\t\t }\t\r\n\t\t\t\r\n\r\n\t\t\t \r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t \r\n\t\t\t\t\r\n\t\t\t\tcatch (IOException e) {\r\n\t\t\t e.printStackTrace();\r\n\t\t\t }\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\ttry (BufferedReader br1 = new BufferedReader (new FileReader(\"C:\\\\mslog.txt\"))) \r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t{\r\n\t\t\t String sCurrentLine;\r\n\t\t\t String Search1=\"2015-10-28T12:24:33,903\";\r\n\t\t\t while ((sCurrentLine = br1.readLine()) != null) \r\n\t\t\t {\r\n\t\t\t if(sCurrentLine.contains(Search1))\r\n\t\t\t {\r\n\t\t\t System.out.println(\" Sr.No 3 - Entry time stamp of Add Client Request (id-97900) found in logfile is = \" + Search1 );\r\n\t\t\t }\r\n\t\t\t \r\n\r\n\t\t\t }\r\n\t\t\t \r\n\r\n\t\t\t \r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\t \r\n\t\t\t\t\r\n\t\t\t\tcatch (IOException e) {\r\n\t\t\t e.printStackTrace();\r\n\t\t\t }\r\n\t\t\t\t \r\n\t\t\t\r\n\t\t\ttry (BufferedReader br2 = new BufferedReader (new FileReader(\"C:\\\\mslog.txt\"))) \r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t{\r\n\t\t\t String sCurrentLine;\r\n\t\t\t String Search2=\"2015-10-28T12:24:34,002\";\r\n\t\t\t while ((sCurrentLine = br2.readLine()) != null) \r\n\t\t\t {\r\n\t\t\t if(sCurrentLine.contains(Search2))\r\n\t\t\t {\r\n\t\t\t System.out.println(\" Sr.No 4 - Exit time stamp of Add Client Request (id-97900) found in logfile is = \" + Search2 );\r\n\t\t\t }\r\n\t\t\t \r\n\r\n\t\t\t }\r\n\t\t\t \r\n\r\n\t\t\t \r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\t \r\n\t\t\t\t\r\n\t\t\t\tcatch (IOException e) {\r\n\t\t\t e.printStackTrace();\r\n\t\t\t }\r\n\t\t\t\r\n\t\t\ttry (BufferedReader br3 = new BufferedReader (new FileReader(\"C:\\\\mslog.txt\"))) \r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t{\r\n\t\t\t String sCurrentLine;\r\n\t\t\t String Search3=\"33,903\";\t\t \r\n\t\t\t while ((sCurrentLine = br3.readLine()) != null) \r\n\t\t\t {\r\n\t\t\t if(sCurrentLine.contains(Search3))\r\n\t\t\t {\r\n\t\t\t System.out.println(\" Sr.No 5 - Entry time stamp (in seconds) of Add Client Request (id-97900) found in logfile is = \" + Search3 );\r\n\t\t\t //double secexit = Integer.parseInt(Search3);\r\n\t\t\t }\r\n\t\t\t \r\n\r\n\t\t\t }\r\n\r\n\t\t\t \r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\t \r\n\t\t\t\t\r\n\t\t\t\tcatch (IOException e) {\r\n\t\t\t e.printStackTrace();\r\n\t\t\t }\r\n\t\t\t\r\n\t\t\t\r\n\t\t\ttry (BufferedReader br4 = new BufferedReader (new FileReader(\"C:\\\\mslog.txt\"))) \r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t{\r\n\t\t\t String sCurrentLine;\r\n\t\t\t String Search4=\"34,002\";\t\t \r\n\t\t\t while ((sCurrentLine = br4.readLine()) != null) \r\n\t\t\t {\r\n\t\t\t if(sCurrentLine.contains(Search4))\r\n\t\t\t {\r\n\t\t\t System.out.println(\" Sr.No 6 - Exit time stamp (in seconds) of Add Client Request (id-97900) found in logfile is = \" + Search4 );\r\n\t\t\t //double secentry = Integer.parseInt(Search4);\r\n\t\t\t }\r\n\t\t\t \r\n\r\n\t\t\t }\r\n\t\t\t \r\n\r\n\t\t\t \r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\t \r\n\t\t\t\t\r\n\t\t\t\tcatch (IOException e) {\r\n\t\t\t e.printStackTrace();\r\n\t\t\t }\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\ttimestamp_difference = ( 34002 - 33903 ) * 0.0001 ;\r\n\t\t\tSystem.out.println(\" Sr.No 7 - Maximum time required for Add Client request execution ( in seconds ) is = \" + timestamp_difference );\r\n\t\t\t\r\n\t\t\tSystem.out.println(\" ************ End of Log file Summary ************* \");\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"public Hashtable<String,Integer> CalculateAnnotationsDeltas(Statement s)\r\n\t{\r\n\t\tHashtable<String,Integer> developerCount = new Hashtable<String,Integer>();\r\n\t\ttry \r\n\t\t{\r\n\t\t\tResultSet set = s.executeQuery(annotationsQuery());\r\n\t\t\tHashtable<String,Integer> fileCount = new Hashtable<String,Integer>();\r\n\r\n\r\n\t\t\twhile( set.next() )\r\n\t\t\t{\r\n\t\t\t\tString project = set.getString(\"revisions.project\");\r\n\t\t\t\tString module = set.getString(\"revisions.module\");\r\n\t\t\t\tString file = set.getString(\"revisions.filename\");\r\n\t\t\t\tString userId = set.getString(\"revisions.userId\");\r\n\t\t\t\tString state = set.getString(\"revisions.state\");\r\n\t\t\t\t\r\n\t\t\t\tString key = project + \".\" + module + \".\" + file;\r\n\t\t\t\t\r\n\t\t\t\tint last = 0;\r\n\t\t\t\tif( fileCount.containsKey(key) )\r\n\t\t\t\t{\r\n\t\t\t\t\tlast = fileCount.get(key);\r\n\t\t\t\t}\r\n\t\t\t\tint delta = set.getInt(\"num\") - last;\r\n\t\t\t\tif( state.equals(\"deleted\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tdelta = -set.getInt(\"num\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tint lastDev = 0;\r\n\t\t\t\tif( developerCount.containsKey(project+\"^_^\"+userId))\r\n\t\t\t\t{\r\n\t\t\t\t\tlastDev = developerCount.get(project+\"^_^\"+userId);\r\n\t\t\t\t}\r\n\t\t\t\tdeveloperCount.put(project+\"^_^\"+userId, lastDev + delta);\r\n\t\t\t\tfileCount.put(key, set.getInt(\"num\"));\r\n\t\t\t}\r\n\t\t} \r\n\t\tcatch (SQLException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn developerCount;\r\n\t}",
"static String getTimeAndSizeFromLog(String fileName){\n\t\tString res = \"\";\n\t\t\n//\t\tFile logFile = new File(\"R:/Eclipse/Partitionner/out/log_atl2_AllRanges_1000_30_20_20150629-1640.log\");\n//\t\tArrayList<ArrayList<String>> fileNames = Utils.extractModelsFromLogFile(logFile);\n\t\tArrayList<String> listNames = new ArrayList<>();\n\t\t\n\t\tString l = \"\", listModels = \"\", timeElapsed = \"\", checkRates = \"\";\n\t\t\n\t\tFile f = new File(Config.DIR_OUT+fileName);\n\t\t\n\t\tSystem.out.println(\"Reading '\"+f.getAbsolutePath()+\"'...\\t\");\n\t\ttry {\n\t\t\tPattern p=Pattern.compile(\"\\\\{.*\\\\}\");\n\t\t\tScanner scanner = new Scanner(f);\n while (scanner.hasNextLine()) { \n l = scanner.nextLine();\n if(l.trim().startsWith(\"Time\")){//Time elapsed : 5:28:19:125\n\t\t\t\t\tMatcher ma=Pattern.compile(\"\\\\:.*\").matcher(l);\n\t\t\t\t\t while(ma.find()) \n\t\t\t\t\t\t timeElapsed = ma.group().substring(1, ma.group().length()-1).trim();\n\t\t\t\t}\n if(l.trim().startsWith(\"Best\")){//Time elapsed : 5:28:19:125\n\t\t\t\t\tMatcher ma=Pattern.compile(\"Best\\\\:[\\\\S]*,{1}\").matcher(l);\n\t\t\t\t\t while(ma.find()) \n\t\t\t\t\t\t checkRates = ma.group().substring(\"Best:\".length(), ma.group().length()-1).trim();\n\t\t\t\t}\n \n\t\t\t\tif(l.trim().startsWith(\"Best\")){//Best:0.89...8,0.96...4,10 (MS15386:10 Models):(COV:89,DIS:96) rd(0,0)\t 10{model_00581.xmi,mo[...]8551.xmi}\n\t\t\t\t\tMatcher ma=p.matcher(l);\n\t\t\t\t\t while(ma.find()) \n\t\t\t listModels = ma.group().substring(1, ma.group().length()-1);\n\t\t\t\t}\n\t\t\t}\n scanner.close();\n listNames = Utils.extractModelsFromList(Config.DIR_INSTANCES+Config.METAMODEL_NAME+File.separator, \n \t\t\t\tlistModels\t\t\t\t\n \t\t\t\t,\",\");\n\n \t\tModelSet ms = new ModelSet(listNames);\n \t\tint totalClasses = 0, totalProperties = 0;\n \t\tfor (Model m : ms.getModels()) {\n \t\t\ttotalClasses += m.getNbClasses();\n \t\t\ttotalProperties += m.getNbProperties();\n \t\t}\n \t\tfloat avgClasses = (float)totalClasses / ms.size();\n \t\tfloat avgProperties = (float)totalProperties / ms.size();\n \t\tres= \";\"+timeElapsed+\";\"+avgClasses+\";\"+avgProperties;\n \t\tSystem.out.println(\" Average model size : \"+checkRates+\"..\\t\"+res);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"WARNING : Could not process file '\"+f.getAbsolutePath()+\"'\");\n//\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t\n\n\t\treturn res;\n\t}",
"public Breakdown generateDiurnalReport(Date startDate, String[] demoArr) {\n\n Breakdown result = new Breakdown();\n AppUsageDAO auDAO = new AppUsageDAO();\n Date startHour = startDate;\n SimpleDateFormat sdf = new SimpleDateFormat(\"HH:00\");\n //for each hour (for 24 loop)\n for (int i = 0; i < 24; i++) {\n\n HashMap<String, Breakdown> miniMap = new HashMap<String, Breakdown>();\n result.addInList(miniMap);\n\n Date endHour = new Date(startHour.getTime() + 1000 * 60 * 60);\n miniMap.put(\"period\", new Breakdown(sdf.format(startHour) + \"-\" + sdf.format(endHour)));\n\n //get number of targetted users\n Date endDate = new Date(startDate.getTime() + 1000 * 60 * 60 * 24);\n ArrayList<User> targetList = auDAO.retrieveUserByDemo(startDate, endDate, demoArr);\n int targetCount = targetList.size();\n //get userList for this hour, filtered by demo\n ArrayList<User> userList = auDAO.retrieveUserByDemo(startHour, endHour, demoArr);\n double secondsThisHour = 0;\n\n //for each user\n for (User user : userList) {\n\n //retrieve appUsageList\n ArrayList<AppUsage> auList = auDAO.retrieveByUserHourly(user.getMacAddress(), startHour, endHour);\n\n Date oldTime = null;\n if (auList.size() > 0) {\n oldTime = auList.get(0).getDate();\n }\n\n //For each appusage in appUsageList\n for (int j = 1; j < auList.size(); j++) {\n Date newTime = auList.get(j).getDate();\n\n //calculate usageTime and add to secondsThisHour\n //difference between app usage timing\n long difference = Utility.secondsBetweenDates(oldTime, newTime);\n\n //If difference less than/equal 2 minutes\n if (difference <= 2 * 60) {\n // add difference to totalSeconds if <= 2 mins\n secondsThisHour += difference;\n } else {\n // add 10sec to totalSeconds if > 2 mins\n secondsThisHour += 10;\n }\n\n oldTime = newTime;\n\n }\n //Add 10 seconds for the last appusage in the list\n if (auList.size() > 0) {\n Date lastTime = auList.get(auList.size() - 1).getDate();\n\n long difference = Utility.secondsBetweenDates(lastTime, endHour);\n\n if (difference > 10) {\n difference = 10;\n }\n secondsThisHour += difference;\n\n }\n\n }\n //divide by all users in this hour to get average usage time in this hour\n if (targetCount > 0) {\n secondsThisHour /= targetCount;\n\n }\n\n //store in breakdown\n long time = Math.round(secondsThisHour);\n miniMap.put(\"duration\", new Breakdown(\"\" + time));\n\n startHour = endHour;\n }\n\n return result;\n }",
"private void reactMain_region_digitalwatch_Time_counting_Counting() {\n\t\tif (timeEvents[0]) {\n\t\t\tnextStateIndex = 0;\n\t\t\tstateVector[0] = State.$NullState$;\n\n\t\t\ttimer.unsetTimer(this, 0);\n\n\t\t\ttimer.setTimer(this, 0, 1 * 1000, false);\n\n\t\t\tsCILogicUnit.operationCallback.increaseTimeByOne();\n\n\t\t\tnextStateIndex = 0;\n\t\t\tstateVector[0] = State.main_region_digitalwatch_Time_counting_Counting;\n\t\t}\n\t}",
"@Override\n public void report() {\n\n try {\n File mFile = new File(\"/usr/local/etc/flink-remote/bm_files/metrics_logs/metrics.txt\");\n File eFile = new File(\"/usr/local/etc/flink-remote/bm_files/metrics_logs/latency_throughput.txt\");\n if (!mFile.exists()) {\n mFile.createNewFile();\n }\n if (!eFile.exists()) {\n eFile.createNewFile();\n }\n\n FileOutputStream mFileOut = new FileOutputStream(mFile, true);\n FileOutputStream eFileOut = new FileOutputStream(eFile, true);\n\n StringBuilder builder = new StringBuilder((int) (this.previousSize * 1.1D));\n StringBuilder eBuilder = new StringBuilder((int) (this.previousSize * 1.1D));\n\n// Instant now = Instant.now();\n LocalDateTime now = LocalDateTime.now();\n\n builder.append(lineSeparator).append(lineSeparator).append(now).append(lineSeparator);\n eBuilder.append(lineSeparator).append(lineSeparator).append(now).append(lineSeparator);\n\n builder.append(lineSeparator).append(\"---------- Counters ----------\").append(lineSeparator);\n eBuilder.append(lineSeparator).append(\"---------- records counter ----------\").append(lineSeparator);\n for (Map.Entry metric : counters.entrySet()) {\n builder.append(metric.getValue()).append(\": \").append(((Counter) metric.getKey()).getCount()).append(lineSeparator);\n if (( (String)metric.getValue()).contains(\"numRecords\")) {\n eBuilder.append(metric.getValue()).append(\": \").append(((Counter) metric.getKey()).getCount()).append(lineSeparator);\n }\n }\n\n builder.append(lineSeparator).append(\"---------- Gauges ----------\").append(lineSeparator);\n for (Map.Entry metric : gauges.entrySet()) {\n builder.append(metric.getValue()).append(\": \").append(((Gauge) metric.getKey()).getValue()).append(lineSeparator);\n }\n\n builder.append(lineSeparator).append(\"---------- Meters ----------\").append(lineSeparator);\n eBuilder.append(lineSeparator).append(\"---------- throughput ----------\").append(lineSeparator);\n for (Map.Entry metric : meters.entrySet()) {\n builder.append(metric.getValue()).append(\": \").append(((Meter) metric.getKey()).getRate()).append(lineSeparator);\n if (((String) metric.getValue()).contains(\"numRecords\")) {\n eBuilder.append(metric.getValue()).append(\": \").append(((Meter) metric.getKey()).getRate()).append(lineSeparator);\n }\n }\n\n builder.append(lineSeparator).append(\"---------- Histograms ----------\").append(lineSeparator);\n eBuilder.append(lineSeparator).append(\"---------- lantency ----------\").append(lineSeparator);\n for (Map.Entry metric : histograms.entrySet()) {\n HistogramStatistics stats = ((Histogram) metric.getKey()).getStatistics();\n builder.append(metric.getValue()).append(\": mean=\").append(stats.getMean()).append(\", min=\").append(stats.getMin()).append(\", p5=\").append(stats.getQuantile(0.05D)).append(\", p10=\").append(stats.getQuantile(0.1D)).append(\", p20=\").append(stats.getQuantile(0.2D)).append(\", p25=\").append(stats.getQuantile(0.25D)).append(\", p30=\").append(stats.getQuantile(0.3D)).append(\", p40=\").append(stats.getQuantile(0.4D)).append(\", p50=\").append(stats.getQuantile(0.5D)).append(\", p60=\").append(stats.getQuantile(0.6D)).append(\", p70=\").append(stats.getQuantile(0.7D)).append(\", p75=\").append(stats.getQuantile(0.75D)).append(\", p80=\").append(stats.getQuantile(0.8D)).append(\", p90=\").append(stats.getQuantile(0.9D)).append(\", p95=\").append(stats.getQuantile(0.95D)).append(\", p98=\").append(stats.getQuantile(0.98D)).append(\", p99=\").append(stats.getQuantile(0.99D)).append(\", p999=\").append(stats.getQuantile(0.999D)).append(\", max=\").append(stats.getMax()).append(lineSeparator);\n eBuilder.append(metric.getValue()).append(\": mean=\").append(stats.getMean()).append(\", min=\").append(stats.getMin()).append(\", p5=\").append(stats.getQuantile(0.05D)).append(\", p10=\").append(stats.getQuantile(0.1D)).append(\", p20=\").append(stats.getQuantile(0.2D)).append(\", p25=\").append(stats.getQuantile(0.25D)).append(\", p30=\").append(stats.getQuantile(0.3D)).append(\", p40=\").append(stats.getQuantile(0.4D)).append(\", p50=\").append(stats.getQuantile(0.5D)).append(\", p60=\").append(stats.getQuantile(0.6D)).append(\", p70=\").append(stats.getQuantile(0.7D)).append(\", p75=\").append(stats.getQuantile(0.75D)).append(\", p80=\").append(stats.getQuantile(0.8D)).append(\", p90=\").append(stats.getQuantile(0.9D)).append(\", p95=\").append(stats.getQuantile(0.95D)).append(\", p98=\").append(stats.getQuantile(0.98D)).append(\", p99=\").append(stats.getQuantile(0.99D)).append(\", p999=\").append(stats.getQuantile(0.999D)).append(\", max=\").append(stats.getMax()).append(lineSeparator);\n }\n\n mFileOut.write(builder.toString().getBytes());\n eFileOut.write(eBuilder.toString().getBytes());\n mFileOut.flush();\n eFileOut.flush();\n mFileOut.close();\n eFileOut.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"@Override\r\n public Map getData(String fileName) {\r\n Map<String, Integer> map = new HashMap<>();\r\n \r\n File file = new File(fileName);\r\n \r\n try (BufferedReader bufferedReader =\r\n new BufferedReader(new FileReader(file))) {\r\n \r\n String line;\r\n while ((line = bufferedReader.readLine()) != null) {\r\n \r\n //if the word have already been in the map,\r\n //increases the number of occurances,\r\n //otherwise sets this number to 1\r\n //and puts a new value to the map\r\n String[] words = line.split(\" \");\r\n for (String word : words) {\r\n Integer value = map.get(word);\r\n if (value == null) {\r\n value = 1;\r\n } else {\r\n value++;\r\n }\r\n map.put(word, value);\r\n }\r\n }\r\n } catch(IOException e) {\r\n System.out.println(e.getMessage());\r\n return null;\r\n }\r\n \r\n return map;\r\n }",
"public static void main(String[] args) throws Exception\n\t{\n\n\n\t\tSystem.out.println(\"hi\");\n\t\tString imdb_movies = \"IMDB/IMDb movies.csv\";\n\t\tString imdb_ratings = \"IMDB/IMDb ratings.csv\";\n\n\t\tBufferedReader alReader = new BufferedReader(new FileReader(imdb_movies));\n\t\tArrayList<String[]> movies = new ArrayList<String[]>();\n\t\tString line;\n\t\tString[] alTuple;\n\t\tMap<String, Integer> actor_pop = new HashMap<>();\n\n\t\tString regex = \",(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\";\n\n\t\talReader.readLine();\n\t\t//alReader.readLine();\n\t\twhile ((line = alReader.readLine()) != null) {\n\t\t\talTuple = line.split(regex, -1);\n\t\t\tif(alTuple[3].equals(\"1894\")){\n\t\t\t\talTuple[4] = \"10/9/94\";\n\t\t\t}\n\n\t\t\tif(alTuple[0].equals(\"tt0002199\")){\n\t\t\t\talTuple[4] = \"1/1/13\";\n\t\t\t}\n\n\t\t\talTuple[5] = alTuple[5].replaceAll(\"\\\"\", \"\");\n\t\t\talTuple[7] = alTuple[7].replaceAll(\"\\\"\", \"\");\n\t\t\talTuple[9] = alTuple[9].replaceAll(\"\\\"\", \"\");\n\t\t\talTuple[10] = alTuple[10].replaceAll(\"\\\"\", \"\");\n\t\t\tmovies.add(alTuple);\n\t\t\tString actors = alTuple[12];\n\t\t\tactors = actors.replaceAll(\"\\\"\", \"\");\n\t\t\tString[] actor_list = actors.split(\",\");\n\t\t\tfor (String actor : actor_list) {\n\t\t\t\tif(!actor.equals(\"\")){\n\t\t\t\tif(actor_pop.containsKey(actor)) {\n\t\t\t\t\tactor_pop.replace(actor, actor_pop.get(actor) + 1);\n\t\t\t\t} else {\n\t\t\t\t\tactor_pop.put(actor, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t//create data for movie --> number of popular actors\n\t\tList<Integer> movieActorPop = new ArrayList<>();\n\t\tfor (String[] movie: movies) {\n\n\t\t\tint countPopActors = 0;\n\n\t\t\tString actors = movie[12];\n\t\t\tactors = actors.replaceAll(\"\\\"\", \"\");\n\t\t\tString[] actor_list = actors.split(\",\");\n\n\t\t\tif(actor_list.length > 0){\n\t\t\t\tfor(String actor: actor_list) {\n\t\t\t\t\tif(!actor.equals(\"\")){\n\t\t\t\t\tif(actor_pop.get(actor) >= POP_THRESHOLD){\n\t\t\t\t\t\tcountPopActors += 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t\tmovieActorPop.add(countPopActors);\n\t\t}\n\n\n\t\tBufferedReader apReader = new BufferedReader(new FileReader(imdb_ratings));\n\n\t\tapReader.readLine();\n\t\tArrayList<String[]> ratings = new ArrayList<String[]>();\n\t\tString[] tempTuple; // temporary tuple to receive information from csv\n\t\twhile ((line = apReader.readLine()) != null) {\n\t\t\ttempTuple = line.split(regex, -1);\n\t\t\tratings.add(tempTuple);\n\t\t}\n\n\t\t// initialize the connection to the database\n\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\tString DB_FILE = \"movies.db\";\n\t\tConnection conn = DriverManager.getConnection(\"jdbc:sqlite:\" + DB_FILE);\n\n\t\t// enable FOREIGN KEY constraint checking\n\t\tStatement stat = conn.createStatement();\n\t\tstat.executeUpdate(\"PRAGMA foreign_keys = OFF;\");\n\n\t\t// speed up INSERTs\n\t\tstat.executeUpdate(\"PRAGMA synchronous = OFF;\");\n\t\tstat.executeUpdate(\"PRAGMA journal_mode = MEMORY;\");\n\n\t\t// DELETE statement to overwrite any existing data in the database\n\t\tstat.executeUpdate(\"DROP TABLE IF EXISTS movies;\");\n\t\tstat.executeUpdate(\"DROP TABLE IF EXISTS ratings;\");\n\t\tstat.executeUpdate(\"DROP TABLE IF EXISTS actors;\");\n\n\t\tstat.executeUpdate(\"PRAGMA foreign_keys = ON;\");\n\n\t\t// CREATE the mvoies table with the schema:\n\t\tstat.executeUpdate(\"CREATE TABLE movies \"\n\t\t\t\t+ \"(id CHAR(9) NOT NULL PRIMARY KEY,\"\n\t\t\t\t+ \"title VARCHAR(150) NOT NULL,\"\n\t\t\t\t+ \"original_title VARCHAR NOT NULL,\"\n\t\t\t\t+ \"year INTEGER NOT NULL,\"\n\t\t\t\t+ \"month_published INTEGER NOT NULL,\"\n\t\t\t + \"genre VARCHAR(150) NOT NULL,\"\n\t\t\t + \"duration INTEGER NOT NULL,\"\n\t\t\t\t+ \"country VARCHAR(200) NOT NULL,\"\n\t\t\t\t+ \"language VARCHAR(200) NOT NULL,\"\n\t\t\t\t+ \"director VARCHAR(200) NOT NULL,\"\n\t\t\t\t+ \"writer VARCHAR(200) NOT NULL,\"\n\t\t\t\t+ \"production_company VARCHAR(200) NOT NULL, \"\n\t\t\t\t+ \"popular_actors INTEGER NOT NULL);\");\n\n\t\t// CREATE the actors table with the schema:\n\t\tstat.executeUpdate(\"CREATE TABLE actors \"\n\t\t\t\t+ \"(actor_name VARCHAR(150) PRIMARY KEY NOT NULL, \"\n\t\t\t\t+ \"num_movies INTEGER NOT NULL);\");\n\n\t\t// CREATE the ratings table with the schema\n\t\tstat.executeUpdate(\"CREATE TABLE ratings \"\n\t\t\t\t+ \"(id CHAR(9) NOT NULL,\"\n\t\t\t\t+ \"weighted_avg_vote REAL NOT NULL, \"\n\t\t\t\t+ \"total_votes INTEGER NOT NULL, \"\n\t\t\t + \"mean_vote REAL NOT NULL, \"\n\t\t\t\t+ \"median_vote INTEGER NOT NULL, \"\n\t\t\t\t+ \"votes_10 INTEGER NOT NULL, \"\n\t\t\t + \"votes_9 INTEGER NOT NULL, \"\n\t\t\t + \"votes_8 INTEGER NOT NULL, \"\n\t\t \t+ \"votes_7 INTEGER NOT NULL, \"\n\t\t \t+ \"votes_6 INTEGER NOT NULL, \"\n\t\t \t+ \"votes_5 INTEGER NOT NULL, \"\n\t\t\t + \"votes_4 INTEGER NOT NULL, \"\n\t\t \t+ \"votes_3 INTEGER NOT NULL, \"\n\t\t \t+ \"votes_2 INTEGER NOT NULL, \"\n\t\t \t+ \"votes_1 INTEGER NOT NULL, \"\n\t\t \t+ \"us_voter_rating REAL NOT NULL, \"\n\t\t \t+ \"us_voter_count INTEGER NOT NULL, \"\n\t\t\t\t+ \"foreign_voter_rating REAL NOT NULL, \"\n\t\t\t\t+ \"foreign_voter_count INTEGER NOT NULL, \"\n\t\t\t\t+ \"male_avg_vote REAL NOT NULL,\"\n\t\t\t\t+ \"male_votes INTEGER NOT NULL,\"\n\t\t\t\t+ \"female_avg_vote REAL NOT NULL,\"\n\t\t\t\t+ \"female_votes INTEGER NOT NULL,\"\n\t\t\t\t+ \"PRIMARY KEY (id),\"\n\t\t\t\t+ \"FOREIGN KEY (id) references movies(id) ON DELETE CASCADE);\");\n\n\t\tPreparedStatement prepAl = conn.prepareStatement(\"INSERT OR IGNORE INTO \"\n\t\t\t\t+ \"movies (id, title, original_title, year, month_published, genre, duration, country, language, \" +\n\t\t\t\"director, writer, production_company, popular_actors) VALUES (?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?)\");\n\n\t\tint count = 0;\n\t\tfor (String[] tuple : movies) {\n\t\t\t\tprepAl.setString(1, tuple[0]); //id\n\t\t\t\tprepAl.setString(2, tuple[1]); //title\n\t\t\t\tprepAl.setString(3, tuple[2]); //original_title\n\n\t\t\t\tprepAl.setInt(4, Integer.parseInt(tuple[3])); //year\n\n\t\t\t\t//month published\n\t\t\t\tPattern pattern = Pattern.compile(\".+?(?=/)\");\n\t\t\t\tMatcher matcher = pattern.matcher(tuple[4]);\n\t\t\t\tString month;\n\t\t\t\tif(matcher.find() == false) {\n\t\t\t\t\tmonth = \"0\";\n\t\t\t\t} else{\n\t\t\t\t\tmonth = matcher.group();\n\t\t\t\t}\n\n\t\t\t\tprepAl.setInt(5, Integer.parseInt(month)); //month\n\t\t\t\tprepAl.setString(6, tuple[5]); //genre\n\t\t\t\tprepAl.setInt(7, Integer.parseInt(tuple[6])); //duration\n\t\t\t\tprepAl.setString(8, tuple[7]); //country\n\t\t\t\tif(tuple[8].equals(\"\")){\n\t\t\t\t\ttuple[8] = \"None\";\n\t\t\t\t}\n\t\t\t\tprepAl.setString(9, tuple[8]); //language\n\t\t\t\tprepAl.setString(10, tuple[9]); //director\n\t\t\t\tprepAl.setString(11, tuple[10]); //writer\n\t\t\t\tprepAl.setString(12, tuple[11]);\n\t\t\t\tprepAl.setInt(13, movieActorPop.get(count));\n\t\t\t\tprepAl.addBatch();\n\t\t\t\tcount += 1;\n\t\t}\n\n\t\tconn.setAutoCommit(false);\n\t\tprepAl.executeBatch();\n\t\tconn.setAutoCommit(true);\n\n\t\tPreparedStatement prepAp = conn.prepareStatement(\"INSERT OR IGNORE INTO \"\n\t\t\t\t+ \"actors (actor_name, num_movies) VALUES (?,?)\");\n\t\tfor (String tuple : actor_pop.keySet()) {\n\n\t\t\t\tprepAp.setString(1, tuple);\n\t\t\t\tprepAp.setInt(2, actor_pop.get(tuple));\n\t\t\t\tprepAp.addBatch();\n\n\t\t}\n\n\t\tconn.setAutoCommit(false);\n\t\tprepAp.executeBatch();\n\t\tconn.setAutoCommit(true);\n\n\t\t// populate flights\n\t\tPreparedStatement prepFl = conn.prepareStatement(\"INSERT OR IGNORE INTO ratings (id, weighted_avg_vote, \" +\n\t\t\t\"total_votes, mean_vote, median_vote, votes_10, votes_9, votes_8, votes_7, votes_6, \"\n\t\t\t+ \"votes_5, votes_4, votes_3, votes_2, votes_1, male_avg_vote, male_votes, female_avg_vote, female_votes, us_voter_rating, us_voter_count, foreign_voter_rating,\" +\n\t\t\t\"foreign_voter_count) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, ?, ?, ?, ?, ?, ?, ?, ?)\");\n\t\tfor (String[] tuple : ratings) {\n\n\t\t\t// only after all constraints have been checked and passed: add the tuple's info\n\t\t\t// into the relation\n\t\t\tprepFl.setString(1, tuple[0]); // id\n\t\t\tprepFl.setDouble(2, Double.parseDouble(tuple[1])); //weighted ag\n\t\t\tprepFl.setInt(3, Integer.parseInt(tuple[2])); // total_votes\n\t\t\tprepFl.setDouble(4, Double.parseDouble(tuple[3])); // mean_vote\n\t\t\ttry {\n\t\t\t\tprepFl.setInt(5, Integer.parseInt(tuple[4])); // median vote\n\t\t\t} catch(Exception e) {\n\t\t\t\tprepFl.setInt(5, (int) Double.parseDouble(tuple[4])); // median vote\n\t\t\t}\n\n\t\t\tprepFl.setInt(6, Integer.parseInt(tuple[5]));\n\t\t\tprepFl.setInt(7, Integer.parseInt(tuple[6]));\n\t\t\tprepFl.setInt(8, Integer.parseInt(tuple[7]));\n\t\t\tprepFl.setInt(9, Integer.parseInt(tuple[8]));\n\t\t\tprepFl.setInt(10, Integer.parseInt(tuple[9]));\n\t\t\tprepFl.setInt(11, Integer.parseInt(tuple[10]));\n\t\t\tprepFl.setInt(12, Integer.parseInt(tuple[11]));\n\t\t\tprepFl.setInt(13, Integer.parseInt(tuple[12]));\n\t\t\tprepFl.setInt(14, Integer.parseInt(tuple[13]));\n\t\t\tprepFl.setInt(15, Integer.parseInt(tuple[14]));\n\n\n\t\t\t// avg male vote\n\t\t\ttry {\n\t\t\t\tprepFl.setDouble(16, Double.parseDouble(tuple[23]));\n\t\t\t} catch(Exception e) {\n\t\t\t\tif(tuple[23].equals(\"\")){\n\t\t\t\t\tcontinue;\n\t\t\t\t} else{\n\t\t\t\t\tprepFl.setDouble(16, (double)Integer.parseInt(tuple[23]));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttry{\n\t\t\t\tprepFl.setInt(17, Integer.parseInt(tuple[24]));\n\t\t\t} catch(Exception e) {\n\t\t\t\tif(tuple[24].equals(\"\")){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\n\n\t\t\t// avg female vote\n\t\t\ttry{\n\t\t\t\tprepFl.setDouble(18, Double.parseDouble(tuple[33]));\n\t\t\t} catch(Exception e) {\n\t\t\t\tif(tuple[33].equals(\"\")){\n\t\t\t\t\tcontinue;\n\t\t\t\t} else{\n\t\t\t\t\tprepFl.setDouble(18, (double)Integer.parseInt(tuple[33]));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttry{\n\t\t\t\tprepFl.setInt(19, Integer.parseInt(tuple[34]));\n\t\t\t} catch(Exception e){\n\t\t\t\tif (tuple[34].equals(\"\")){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// us/foreign\n\t\t\ttry {\n\t\t\t\tprepFl.setDouble(20, Double.parseDouble(tuple[45]));\n\t\t\t} catch(Exception e) {\n\t\t\t\tif(tuple[45].equals(\"\")){\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\tprepFl.setDouble(20, (double)Integer.parseInt(tuple[45]));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tprepFl.setInt(21, Integer.parseInt(tuple[46]));\n\t\t\t} catch (Exception e) {\n\t\t\t\tif(tuple[46].equals(\"\")){\n\t\t\t\t\tcontinue;\n\t\t\t\t} else{\n\t\t\t\t\tprepFl.setInt(21, (int)Double.parseDouble(tuple[46]));\n\t\t\t\t}\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tprepFl.setDouble(22, Double.parseDouble(tuple[47]));\n\t\t\t} catch(Exception e) {\n\t\t\t\tif(tuple[47].equals(\"\")){\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\tprepFl.setDouble(22, (double)Integer.parseInt(tuple[47]));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttry{\n\t\t\t\tprepFl.setInt(23, Integer.parseInt(tuple[48]));\n\t\t\t} catch(Exception e){\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// add the batch\n\t\t\tprepFl.addBatch();\n\n\t\t}\n\n\t\tconn.setAutoCommit(false);\n\t\tprepFl.executeBatch();\n\t\tconn.setAutoCommit(true);\n\n\t}",
"public void ArtistAndSource() throws IOException{\r\n List<String> ArrangersAndTheirSongs=new ArrayList<>();\r\n HashMap <String,Integer> SongCountMap= new HashMap<>();\r\n String allsongs=\"\";\r\n String sourcesong=\"\";\r\n for(int id: ArrangersMap.keySet()){\r\n String ArrangerName=ArrangersMap.get(id);\r\n for(String song:ArrangerLinesList){\r\n String perform[];\r\n perform=song.split(\"/\");\r\n int arrangeid=Integer.parseInt(perform[1]);\r\n if(id==arrangeid){\r\n int songid= Integer.parseInt(perform[0]);\r\n String songname=test.getsongName(songid);\r\n sourcesong=test.SongToSource(songname);\r\n allsongs+=sourcesong+\",\";\r\n if (SongCountMap.get(sourcesong) !=null){ \r\n SongCountMap.put(sourcesong, SongCountMap.get(sourcesong)+1);\r\n }\r\n else{\r\n SongCountMap.put(sourcesong, 1);\r\n }\r\n } \r\n }\r\n for(String song:SongCountMap.keySet()){\r\n //System.out.println(song);\r\n }\r\n HashMap <String,Integer> SortedMap= sortByValues(SongCountMap);\r\n SongCountMap.clear();\r\n String allsongs2=\"\";\r\n for(String song:SortedMap.keySet()){\r\n //System.out.println(\"Number\"+SortedMap.get(song)+\"The song is\"+song);\r\n allsongs2+=\"#occurences:\"+SortedMap.get(song)+\"The song is\"+song+\"\\n\";\r\n //System.out.println(\"Number of times:\"+SortedMap.get(song)+\"The song is\"+song);\r\n }\r\n //System.out.println(allsongs2);\r\n // ArrangersAndTheirSongs.add(\"The Arrangers Name is:\"+ArrangerName+ \" Their songs are:\"+allsongs);\r\n ArrangersAndTheirSongs.add(\"The Arrangers Name is:\"+ArrangerName+ \" Their songs are: \"\r\n + \"\"+allsongs2);\r\n allsongs=\"\";\r\n SortedMap.clear();\r\n allsongs2=\"\";\r\n }\r\n //method is broken\r\n writeListToTextFile(\"d:\\\\documents\\\\textfiles\\\\ArrangersAndTheirSources.txt\",ArrangersAndTheirSongs);\r\n System.out.println(\"The size of the list is:\"+ArrangersAndTheirSongs.size());\r\n System.out.println(\"Artist and Their Source Complete\");\r\n }",
"public abstract java.util.Map<java.lang.String, java.lang.Integer> idiosyncraticEventIncidenceCountMap();",
"public abstract java.util.Map<java.lang.String, java.lang.Integer> systemicEventIncidenceCountMap();",
"private static void wordCount(File fileEntry) throws FileNotFoundException {\n\t\tScanner sc = new Scanner(new FileInputStream(fileEntry));\n\t\t int count=0;\n\t\t while(sc.hasNext()){\n\t\t sc.next();\n\t\t count++;\n\t\t }\n\t\tSystem.out.println(\"Number of words: \" + count);\n\t\t\n\t\t\n\t}",
"public static ArrayList<MonitoredData> readFileData(){\n ArrayList<MonitoredData> data = new ArrayList<>();\n List<String> lines = new ArrayList<>();\n try (Stream<String> stream = Files.lines(Paths.get(\"Activities.txt\"))) {\n lines = stream\n .flatMap((line->Stream.of(line.split(\"\\t\\t\"))))\n .collect(Collectors.toList());\n for(int i=0; i<lines.size()-2; i+=3){\n MonitoredData md = new MonitoredData(lines.get(i), lines.get(i+1), lines.get(i+2));\n data.add(md);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n //data.forEach(System.out::println);\n return data;\n }",
"public void mergefiles()\n {\n LinkedHashMap<String, Integer> count = new LinkedHashMap<>();\n for(int i=0;i<files_temp.size();i++)\n {\n \t\t\n //System.out.println(\"here in merge files for\");\n \t//int index = files_temp.get(i).lastIndexOf(\"\\\\\");\n\t\t\t//System.out.println(index);\n \tSystem.out.println(files_temp.get(i));\n File file = new File(files_temp.get(i)+\"op.txt\");\n Scanner sc;\n try {\n //System.out.println(\"here in merge files inside try\");\n sc = new Scanner(file);\n sc.useDelimiter(\" \");\n while(sc.hasNextLine())\n {\n //System.out.println(\"Inwhile \");\n List<String> arr = new ArrayList<String>();\n arr=Arrays.asList(sc.nextLine().replaceAll(\"[{} ]\", \"\").replaceAll(\"[=,]\", \" \").split(\" \"));\n //System.out.println(arr.get(0));\n for(int j=0;j<arr.size()-1;j=j+2) \n {\n System.out.println(arr.get(j));\n if(arr.get(j).length()!=0 && arr.get(j+1).length()!=0)\n {\n if (count.containsKey(arr.get(j))) \n {\n int c = count.get(arr.get(j));\n count.remove(arr.get(j));\n count.put(arr.get(j),c + Integer.valueOf(arr.get(j+1)));\n }\n else \n {\n count.put(arr.get(j),Integer.valueOf(arr.get(j+1)));\n }\n }\n }\n }\n }\n catch(Exception E) \n {\n System.out.println(E);\n }\n }\n //System.out.println(count);\n count.entrySet()\n .stream()\n .sorted(Map.Entry.comparingByValue(Comparator.reverseOrder()))\n .forEachOrdered(x -> sorted.put(x.getKey(), x.getValue()));\n System.out.println(sorted);\n PrintWriter writer;\n\t\ttry {\n\t\t\twriter = new PrintWriter(\"results.txt\", \"UTF-8\");\n\t\t\tIterator it = sorted.entrySet().iterator();\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tMap.Entry pairs = (Map.Entry) it.next();\n\t\t\t\t\twriter.println(pairs.getValue() + \" : \" + pairs.getKey());\n\t\t\t\t\tthis.result.println(pairs.getValue() + \" : \" + pairs.getKey());\n\t\t\t}\n\t\t writer.close();\n\t\t}\n catch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e);\n\t\t}\n }",
"@Test\n void BasicTestCase_largeNoOfEntries() {\n Solution solObj = new Solution();\n\n\n //Input Dictionary has year as 2100 and more entries\n Map<String, Integer> input1 = Stream.of(new Object[][]{\n {\"2100-02-01\", 1}, {\"2100-02-02\", 2}, {\"2100-02-03\", 3}, {\"2100-02-04\", 10}, {\"2100-02-05\", 11}, {\"2100-02-06\", 12}, {\"2100-02-07\", 13}, {\"2100-02-08\", 7}, {\"2100-02-09\", 8}, {\"2100-02-10\", 9}, {\"2100-02-11\", 10}, {\"2100-02-12\", 11}, {\"2100-02-13\", 12}, {\"2100-02-14\", 13},\n {\"2100-02-15\", 7}, {\"2100-02-16\", 8}, {\"2100-02-17\", 9}, {\"2100-02-18\", 10}, {\"2100-02-19\", 11}, {\"2100-02-20\", 12}, {\"2100-02-21\", 13}, {\"2100-02-22\", 7}, {\"2100-02-23\", 8}, {\"2100-02-24\", 9}, {\"2100-02-25\", 10}, {\"2100-02-26\", 11}, {\"2100-02-27\", 12}, {\"2100-02-28\", 13}\n }).collect(Collectors.toMap(data -> (String) data[0], data -> (Integer) data[1]));\n //output\n Map<String, Integer> expected1 = Stream.of(new Object[][]{\n {\"Mon\", 22}, {\"Tue\", 26}, {\"Wed\", 30}, {\"Thu\", 40}, {\"Fri\", 44}, {\"Sat\", 48}, {\"Sun\", 52}\n }).collect(Collectors.toMap(data -> (String) data[0], data -> (Integer) data[1]));\n\n\n LinkedHashMap<String, Integer> result = solObj.dateToDay(input1);\n assertEquals(expected1, result);\n\n }",
"public static void fcfs(List<String> taskList) {\n\n Collections.sort(taskList, new Comparator<String>() {\n @Override\n public int compare(String task1, String task2) {\n int arrivalTime1 = Integer.parseInt(task1.split(\" \")[1]);\n int arrivalTime2 = Integer.parseInt(task2.split(\" \")[1]);\n\n if(arrivalTime1 < arrivalTime2) {\n return -1;\n } else if(arrivalTime1 > arrivalTime2) {\n return 1;\n } else {\n return 0;\n }\n }\n });\n // \"TaskName arTime priority burstTime compTime\"\n //\n int i = 0;\n\n double totalTurnaround = 0;\n double totalWaitingTime = 0;\n\n for(String task : taskList) {\n\n String[] taskArray = new String[5];\n int j = 0;\n for(String str : task.split(\" \")) {\n taskArray[j] = str;\n j++;\n }\n //write task to a file\n try {\n FileWriter myWriter = new FileWriter(\"output.txt\", true);\n myWriter.write(\"Will run Name: \" + taskArray[0] + \"\\n\");\n myWriter.write(\"Priority: \" + taskArray[2] + \"\\n\");\n myWriter.write(\"Burst: \" + taskArray[3] + \"\\n\\n\");\n myWriter.write(\"Finished \" + taskArray[0] + \"\\n\\n\");\n myWriter.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n int arivalTime = Integer.parseInt(taskArray[1]);\n int burstTime = Integer.parseInt(taskArray[3]);\n if(i==0) {\n //completion time\n taskArray[4] = Integer.toString(arivalTime + burstTime);\n } else {\n int prevCompTime = Integer.parseInt(taskList.get(i-1).split(\" \")[4]);\n if(arivalTime > prevCompTime) {\n taskArray[4] = Integer.toString(arivalTime + burstTime);\n } else {\n taskArray[4] = Integer.toString(prevCompTime + burstTime);\n }\n }\n //\n int turnaround = Integer.parseInt(taskArray[4]) - arivalTime;\n totalTurnaround += turnaround;\n int waitingTime = turnaround - burstTime;\n totalWaitingTime += waitingTime;\n\n taskList.set(i, String.join(\" \", taskArray));\n i++;\n }\n\n totalTurnaround = totalTurnaround / taskList.size();\n totalWaitingTime = totalWaitingTime / taskList.size();\n\n System.out.println(\"Average turnaround: \" + totalTurnaround);\n System.out.println(\"Average waiting: \" + totalWaitingTime);\n\n }",
"public void updateCounts() {\n\n Map<Feel, Integer> counts_of = new HashMap<>();\n\n for (Feel feeling : Feel.values()) {\n counts_of.put(feeling, 0);\n }\n\n for (FeelingRecord record : this.records) {\n counts_of.put(record.getFeeling(), counts_of.get(record.getFeeling()) + 1);\n }\n\n this.angry_count.setText(\"Anger: \" + counts_of.get(Feel.ANGER).toString());\n this.fear_count.setText(\"Fear: \" + counts_of.get(Feel.FEAR).toString());\n this.joyful_count.setText(\"Joy: \" + counts_of.get(Feel.JOY).toString());\n this.love_count.setText(\"Love: \" + counts_of.get(Feel.LOVE).toString());\n this.sad_count.setText(\"Sad:\" + counts_of.get(Feel.SADNESS).toString());\n this.suprise_count.setText(\"Suprise: \" + counts_of.get(Feel.SURPRISE).toString());\n }",
"public static ArrayList<Integer> getWorkoutClimbMonthCount(Calendar day, Context mContext) {\n DatabaseHelper handler = new DatabaseHelper(mContext);\n SQLiteDatabase database = handler.getWritableDatabase();\n\n long dayLength = 86400000;\n\n day.set(Calendar.HOUR, 0);\n day.set(Calendar.MINUTE, 0);\n day.set(Calendar.SECOND, 0);\n day.set(Calendar.MILLISECOND, 0);\n\n long monthStart = day.getTimeInMillis();\n long monthEnd = monthStart + dayLength * 42;\n Log.i(LOG_TAG, \"Month Start: \" + monthStart + \" | Month End: \" + monthEnd);\n\n ArrayList<Integer> eventsList = new ArrayList<>(42);\n for (int i = 0; i < 42; i++) {\n eventsList.add(0);\n }\n\n //grade type\n String[] projection = {\n DatabaseContract.CalendarTrackerEntry._ID,\n DatabaseContract.CalendarTrackerEntry.COLUMN_DATE,\n DatabaseContract.CalendarTrackerEntry.COLUMN_ISCLIMB};\n String whereClause = DatabaseContract.CalendarTrackerEntry.COLUMN_ISCLIMB + \"=? AND \" + DatabaseContract.CalendarTrackerEntry.COLUMN_DATE + \" BETWEEN ? AND ?\";\n String[] whereValue = {String.valueOf(DatabaseContract.IS_GYMCLIMB), String.valueOf(monthStart), String.valueOf(monthEnd)};\n Cursor cursor = database.query(DatabaseContract.CalendarTrackerEntry.TABLE_NAME,\n projection,\n whereClause,\n whereValue,\n null,\n null,\n null);\n\n int idColumnOutput = cursor.getColumnIndex(DatabaseContract.CalendarTrackerEntry.COLUMN_DATE);\n\n int cursorCount = cursor.getCount();\n Log.i(LOG_TAG, \"idColumnOutput: \" + idColumnOutput + \" | cursorCount: \" + cursorCount);\n\n if (cursorCount != 0) {\n //cursor.moveToFirst();\n while (cursor.moveToNext()) {\n long outputDate = cursor.getLong(idColumnOutput);\n long outputDay = (outputDate - monthStart) / dayLength;\n Log.i(LOG_TAG, \"outputDate: \" + outputDate + \" | outputDay: \" + outputDay);\n eventsList.set((int) outputDay, 1);\n }\n }\n\n try {\n return eventsList;\n } finally {\n cursor.close();\n database.close();\n handler.close();\n }\n }",
"public int getNumberOfPaths(){ \r\n HashMap<FlowGraphNode, Integer> number = new HashMap<>();\r\n LinkedList<FlowGraphNode> queue = new LinkedList<>();\r\n HashMap<FlowGraphNode, Integer> label = new HashMap<>();\r\n \r\n label.put(start,1);\r\n queue.add(start);\r\n do{\r\n FlowGraphNode node = queue.pop();\r\n for(FlowGraphNode child : node.to){\r\n int count = number.getOrDefault(child, child.inDeg()) -1;\r\n if(count == 0){\r\n queue.add(child);\r\n number.remove(child);\r\n //label\r\n int sum = 0;\r\n for(FlowGraphNode anc : child.from){\r\n sum += label.get(anc);\r\n }\r\n label.put(child,sum);\r\n }else{\r\n number.put(child, count);\r\n }\r\n }\r\n }while(!queue.isEmpty());\r\n \r\n if(!number.isEmpty()){\r\n //there has to be a loop in the graph\r\n return -1;\r\n }\r\n \r\n return label.get(end);\r\n }",
"public void readFileToTransitionMapSmooth(String fileName){\n\t\ttry {\n\t\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(new FileInputStream(fileName),\"ISO-8859-1\"));\n\t\t\tString line=null;\n\t\t\t//each time we read a line, count its words\n\t\t\twhile((line=reader.readLine())!=null){\n\t\t\t\tparseLineAndCountTransitions(line);\n\t\t\t}\n\t\t\t//close the buffered reader\n\t\t\treader.close();\n\t\t\tupdateTransitionMapSmooth();\n\t\t\t\n\t\t}catch(IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}",
"@Test\r\n\tpublic void ifWordsAreGivenShouldReturnTheCountOfEachWord() throws FileNotFoundException\r\n\t{\n\t\t\r\n\t\t\r\n\t\tMap<String, Long> words = new HashMap<String, Long>();\r\n\t\t\r\n\t\tList<String> list = new ArrayList<String>(Arrays.asList(\"Hi,\",\"How\",\"are\",\"you.\",\"Hope\",\"you\",\"are\",\"fine.\"));\r\n\t\t\r\n\t\tMap<String, Long> vwords=new HashMap<String, Long>();\r\n\t\t\r\n\t\tvwords.put(\"Hi,\", 1L);\r\n\t\tvwords.put(\"How\", 1L);\r\n\t\tvwords.put(\"are\", 2L);\r\n\t\tvwords.put(\"you.\", 1L);\r\n\t\tvwords.put(\"Hope\", 1L);\r\n\t\tvwords.put(\"you\", 1L);\r\n\t\tvwords.put(\"fine.\", 1L);\r\n\t\t\r\n\t\twords=CountOfWords.CountEachWords(list);\r\n\t\t\r\n\t\tassertThat(vwords, is(words));\r\n\t\t\r\n//\t\tvwords.equals(new File(\"C:\\\\Users\\\\Nimmy\\\\OneDrive\\\\Desktop\\\\Java Program\\\\demo.txt\")); \r\n\t\r\n\r\n\r\n}",
"public void makeSampleActivityMoments() {\n\t\tdouble sumActivity = 0;\n\t\tfor (int i = 0; i < SubjectsList.size(); i ++) {\n\t\t\tdouble ca = SubjectsList.get(i).getSubjectActivityCount();\n\t\t\tsumActivity += ca;\n\t\t}\n\t\t//System.out.println(sumActivity/sampleSize);\n\t}",
"public void caltotaltraveltime()\n {\n \t\n \t switch(this.mLegs.size())\n \t {\n \t case 0:\n \t {\n \t\t this.mTravelTime=0;\n \t\t break;\n \t }\n \t case 1:\n \t { \n \t\t this.mTravelTime=this.mLegs.get(0).flighttime();\n \t\t break;\n \t }\n \t case 2:\n \t {\n \t\t Date arrivalt = this.mLegs.get(1).arrivaldate();\n \t\t Date departt = this.mLegs.get(0).departuredate();\n \t\t long diff = (arrivalt.getTime() - departt.getTime())/60000;\n \t\t this.mTravelTime=diff;\n \t\t break;\n \t }\n \t case 3:\n \t {\n \t Date arrivalt = this.mLegs.get(2).arrivaldate();\n \t Date departt = this.mLegs.get(0).departuredate();\n \t long diff = (arrivalt.getTime() - departt.getTime())/60000;\n \t this.mTravelTime=diff;\n \t break;\n \t }\n \t }\n }",
"public static long countEntries(IOService fileIO) {\n if (fileIO.equals(IOService.FILE_IO)) {\n return new EmployeePayrollFileIOService().countEntries();\n }\n return 0;\n }",
"public ArrayList<WordMap> countWordOccurrences(String filePaths, WordMap corpus,\n Word.Polarity polarity) {\n\n Scanner sc1, sc2;\n ArrayList<WordMap> wordMaps = new ArrayList<WordMap>();\n\n // Where the training texts are located\n String subFolder;\n if (polarity == Word.Polarity.POSITIVE) subFolder = FOLDER_POSITIVE;\n else if (polarity == Word.Polarity.NEGATIVE) subFolder = FOLDER_NEGATIVE;\n else subFolder = FOLDER_NEUTRAL;\n\n try {\n String previousWord = \"\";\n\n sc1 = new Scanner(new File(filePaths));\n\n //For each training file\n while (sc1.hasNextLine()) {\n // Contains one filename per row\n String currentFile = FOLDER_TXT + subFolder + sc1.nextLine();\n\n sc2 = new Scanner(new File(currentFile));\n WordMap textMap = new WordMap(); // Map for this text\n\n while (sc2.hasNextLine()) {\n String[] words = sc2.nextLine().split(\" \");\n\n for (int j = 0; j < words.length; j++){\n //Replaces all characters which might cause us to miss the key\n String word = words[j].replaceAll(\"\\\\W\", \"\");\n\n //For each word, if it is in the WordMap increment the count\n if (corpus.has(word)) {\n // Store a new word if it has not been created\n if (!textMap.has(words[j])) {\n Word objWord = copyWord(corpus.get(word));\n textMap.put(word, objWord);\n }\n\n //If the words are negated, flip the count\n if (polarity == Word.Polarity.POSITIVE &&\n negations.contains(previousWord)) { // Negate\n textMap.addCountNegative(word);\n } else if (polarity == Word.Polarity.POSITIVE) {\n textMap.addCountPositive(word);\n } else if (polarity == Word.Polarity.NEGATIVE &&\n negations.contains(previousWord)) { // Negate\n textMap.addCountPositive(word);\n } else if (polarity == Word.Polarity.NEGATIVE) {\n textMap.addCountNegative(word);\n } else { // Neutral, don't negate\n textMap.addCountNeutral(word);\n }\n }\n\n previousWord = word;\n }\n }\n\n wordMaps.add(textMap);\n\n sc2.close();\n }\n\n sc1.close();\n } catch (Exception e) {\n System.err.println(\"Error in countWordOccurences\");\n System.err.println(e.getMessage());\n e.printStackTrace();\n return null;\n }\n\n return wordMaps;\n }"
]
| [
"0.6439433",
"0.6251962",
"0.6213954",
"0.6043612",
"0.577869",
"0.56412655",
"0.55183434",
"0.5479363",
"0.5458668",
"0.5455003",
"0.54339904",
"0.5430119",
"0.54208",
"0.5322414",
"0.5294533",
"0.527282",
"0.52563715",
"0.5254568",
"0.5247924",
"0.51950294",
"0.5193717",
"0.51928914",
"0.51894975",
"0.5183523",
"0.5168011",
"0.5150578",
"0.51457816",
"0.51353675",
"0.5111665",
"0.51016706",
"0.50961626",
"0.50945485",
"0.50931007",
"0.5092379",
"0.5078629",
"0.50576556",
"0.5047393",
"0.5018364",
"0.4998591",
"0.49866396",
"0.4972025",
"0.497036",
"0.49594146",
"0.4938823",
"0.49306506",
"0.49222937",
"0.4908557",
"0.49068975",
"0.48940763",
"0.48903275",
"0.48790902",
"0.48742315",
"0.48626077",
"0.48502156",
"0.48457903",
"0.48400792",
"0.4826172",
"0.4825498",
"0.48126167",
"0.48023504",
"0.4791285",
"0.47723657",
"0.47707623",
"0.4768613",
"0.47671577",
"0.47648925",
"0.47624183",
"0.47620022",
"0.47612086",
"0.47596005",
"0.47556362",
"0.47416046",
"0.47406214",
"0.47287554",
"0.47279936",
"0.47226447",
"0.4714987",
"0.47120354",
"0.4706179",
"0.47059846",
"0.47041944",
"0.47041222",
"0.4696437",
"0.46853614",
"0.46824482",
"0.4680749",
"0.46722725",
"0.46703166",
"0.46700728",
"0.4667335",
"0.46643963",
"0.4659013",
"0.46560153",
"0.46424675",
"0.4640973",
"0.46401235",
"0.46349108",
"0.4630855",
"0.46286535",
"0.46150914"
]
| 0.6542462 | 0 |
5) For each activity compute the entire duration over the monitoring period Done in eachLineDuration method above. :) | public String getStartTime() {
return startTime;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Map<String, Long> eachLineDuration(List<MonitoredData> data){\n Map<String, String> hash = new HashMap<>();\n Map<String, Long> hashWithMillis = new HashMap<>();\n for (int i=0; i<data.size(); i++){\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\", Locale.ENGLISH);\n try {\n String startTime = data.get(i).getStartTime();\n Date firstDate = sdf.parse(startTime);\n String endTime = data.get(i).getEndTime();\n Date secondDate = sdf.parse(endTime);\n long diffInMillies = Math.abs(secondDate.getTime() - firstDate.getTime());\n DateFormat df = new SimpleDateFormat(\"HH 'hours', mm 'mins,' ss 'seconds'\");\n df.setTimeZone(TimeZone.getTimeZone(\"GMT+0\"));\n String difference = df.format(new Date(diffInMillies));\n hash.put(data.get(i).getActivity(), difference);\n System.out.println(\" \" + data.get(i).getActivity() + \" ::: \" + hash.get(data.get(i).getActivity()));\n //-----For each activity compute the entire duration over the monitoring period\n String acti = data.get(i).getActivity();\n if (activityHasValue.containsKey(data.get(i).getActivity())){\n long index = hashWithMillis.get(acti);\n hashWithMillis.put(data.get(i).getActivity(), diffInMillies + index);\n }else{\n hashWithMillis.put(data.get(i).getActivity(), diffInMillies);\n activityHasValue.put(data.get(i).getActivity(), diffInMillies);\n }\n }catch(Exception e){\n e.printStackTrace();\n }\n }\n System.out.print(\"\\n\\n5) Each activity duration over the whole period: \\n\");\n System.out.println(hashWithMillis);\n return hashWithMillis;\n }",
"public List<String> activityDuration(List<MonitoredData> timeline) {\n return timeline\n .stream()\n .collect(\n Collectors\n .groupingBy(\n MonitoredData::getActivity_label,\n Collectors\n .mapping(\n MonitoredData::computeDuration,\n Collectors\n .averagingDouble(duration -> (duration / 60) < 5 ? 1 : 0))))\n .entrySet()\n .stream()\n .filter(md -> md.getValue() > 0.9)\n .collect(\n Collectors\n .toMap(\n md -> md.getKey(),\n md -> md.getValue()))\n .keySet()\n .stream()\n .collect(\n Collectors\n .toList());\n }",
"public Map<String, Integer> totalDuration(List<MonitoredData> timeline) {\n return timeline\n .stream()\n .collect(\n Collectors\n .groupingBy(\n m -> m.getActivity_label(),\n Collectors\n .summingInt(\n MonitoredData::computeDuration)));\n }",
"int getRunningDuration();",
"private void drawCallDurations(GC gc) {\n if (mCalls == null || mCalls.size() < mEndCallIndex) {\n return;\n }\n\n gc.setBackground(mDurationLineColor);\n\n int callUnderScan = mPositionHelper.getCallUnderScanValue();\n for (int i = mStartCallIndex; i < mEndCallIndex; i += callUnderScan) {\n boolean resetColor = false;\n GLCall c = mCalls.get(i);\n\n long duration = c.getWallDuration();\n\n if (c.hasErrors()) {\n gc.setBackground(mGlErrorColor);\n resetColor = true;\n\n // If the call has any errors, we want it to be visible in the minimap\n // regardless of how long it took.\n duration = mPositionHelper.getMaxDuration();\n } else if (c.getFunction() == Function.glDrawArrays\n || c.getFunction() == Function.glDrawElements\n || c.getFunction() == Function.eglSwapBuffers) {\n gc.setBackground(mGlDrawColor);\n resetColor = true;\n\n // render all draw calls & swap buffer at max length\n duration = mPositionHelper.getMaxDuration();\n }\n\n Rectangle bounds = mPositionHelper.getDurationBounds(\n i - mStartCallIndex,\n c.getContextId(),\n duration);\n gc.fillRectangle(bounds);\n\n if (resetColor) {\n gc.setBackground(mDurationLineColor);\n }\n }\n }",
"private int getDurationInBlocks(long duration) {\n\t\tlong minute = 1000 * 60;\n\t\t// If the duration is less than a single block, return 1\n\t\tif (duration < MINUTES_PER_BLOCK * minute) {\n\t\t\treturn 1;\n\t\t}\n\t\tlong hour = 60 * minute;\n\t\tlong day = 24 * hour;\n\t\tlong week = 7 * day;\n\t\tint blocks = 0;\n\n\t\tif (duration > week) {\n\t\t\tblocks += (duration / week) * 7 * 24 * BLOCKS_IN_HOUR;\n\t\t\tduration = duration % week;\n\t\t}\n\t\tif (duration > day) {\n\t\t\tblocks += (duration / day) * 24 * BLOCKS_IN_HOUR;\n\t\t\tduration = duration % day;\n\t\t}\n\t\tif (duration > hour) {\n\t\t\tblocks += (duration / hour) * BLOCKS_IN_HOUR;\n\t\t\tduration = duration % hour;\n\t\t}\n\t\tif (duration > minute) {\n\t\t\tblocks += (duration / minute) / MINUTES_PER_BLOCK;\n\t\t}\n\t\treturn blocks;\n\t}",
"private void updateDuration() {\n duration = ((double) endTimeCalendar.getTime().getTime() - (startTimeCalendar.getTime().getTime())) / (1000 * 60 * 60.0);\n int hour = (int) duration;\n String hourString = dfHour.format(hour);\n int minute = (int) Math.round((duration - hour) * 60);\n String minuteString = dfMinute.format(minute);\n String textToPut = \"duration: \" + hourString + \" hours \" + minuteString + \" minutes\";\n eventDuration.setText(textToPut);\n }",
"private static void writeExecutionTime() {\n \t\n \tendMs = System.currentTimeMillis();\n \tlong elapsed = endMs - startMs;\n \tlong hours = elapsed / 3600000;\n long minutes = (elapsed % 3600000) / 60000;\n long seconds = ((elapsed % 3600000) % 60000) / 1000;\n \n try {\n \t\n \tFileSystem fs = FileSystem.get(Mediator.getConfiguration());\n \tPath outputPath = new Path(Mediator.getHDFSLocation()+\"/\"+Mediator.getLearnerOutputPath()+\"/time.txt\");\n \tOutputStream os = fs.create(outputPath);\n \tBufferedWriter bw = new BufferedWriter(new OutputStreamWriter(os));\n \t\n \t/**\n \t * Write total execution time\n \t */\n \tbw.write(\"Total execution time (hh:mm:ss): \"+String.format(\"%02d\",hours)+\":\"+String.format(\"%02d\",minutes)+\":\"+\n \t\t\tString.format(\"%02d\",seconds)+\" (\"+(elapsed/1000)+\" seconds)\\n\");\n \t\n \t/**\n \t * Write Mappers execution time avg.\n \t */\n \tPath inputPath = new Path(Mediator.getHDFSLocation()+\"/\"+Mediator.getLearnerOutputPath()+\"/\"+Mediator.TIME_STATS_DIR);\n \tFileStatus[] status = fs.listStatus(inputPath);\n \tBufferedReader br = null;\n \tString buffer;\n \tlong sumMappers = 0;\n \tint numMappers = 0;\n \tfor (FileStatus fileStatus:status){\n \t\t// Read Stage 1\n \t\tif (fileStatus.getPath().getName().contains(\"mapper\")){\n \t\t\tnumMappers ++;\n \t\t\tbr=new BufferedReader(new InputStreamReader(fs.open(fileStatus.getPath())));\n \t\t\tbuffer = br.readLine();\n \t\t\tsumMappers += Long.parseLong(buffer.substring(buffer.indexOf(\":\")+1).trim());\n \t\t}\n \t\tbr.close();\n \t}\n \t// Write AVG\n \telapsed = sumMappers / numMappers;\n \thours = elapsed / 3600;\n minutes = (elapsed % 3600) / 60;\n seconds = (elapsed % 3600) % 60;\n bw.write(\"Mappers avg. execution time (hh:mm:ss): \"+String.format(\"%02d\",hours)+\":\"+String.format(\"%02d\",minutes)+\":\"+\n \t\t\tString.format(\"%02d\",seconds)+\" (\"+elapsed+\" seconds)\\n\");\n \t\n \tbw.close();\n \tos.close();\n \t\n \t// Remove time stats directory\n \tfs.delete(inputPath,true);\n \t\n }\n catch(Exception e){\n \tSystem.err.println(\"\\nERROR WRITING EXECUTION TIME\");\n\t\t\te.printStackTrace();\n }\n \t\n }",
"long duration();",
"public List<Pair<String, Integer>> getDurationPerInstruction() {\n List<Pair<String, Integer>> durations = new ArrayList<>();\n var query = jooq.selectFrom(GAME_LOGS)\n .where(GAME_LOGS.GAMEID.equal(gameId))\n .orderBy(GAME_LOGS.ID.asc());\n String oldInstruction = null;\n LocalDateTime oldTimestamp = null;\n for (GameLogsRecord record: query) {\n if (record.getDirection().equals(GameLogsDirection.PassToClient)\n && record.getMessageType().equals(\"TextMessage\")) {\n JsonObject messageJson = JsonParser.parseString(record.getMessage()).getAsJsonObject();\n if (! messageJson.has(\"text\")) {\n continue;\n }\n\n if (\"SuccessfullyFinished\".equals(messageJson.get(\"newGameState\").getAsString())) {\n // we are done, record last timing and get out\n int duration = (int) oldTimestamp.until(record.getTimestamp(), MILLIS);\n durations.add(new Pair<>(oldInstruction, duration));\n break;\n }\n\n String newInstruction = messageJson.get(\"text\").getAsString();\n \n if (! newInstruction.startsWith(\"{\")) {\n // ignore messages that have no structured information\n // those are e.g. welcome messages etc.\n continue;\n }\n\n JsonObject instructionJson = JsonParser.parseString(newInstruction).getAsJsonObject();\n \n // also contains the \"message\" field but we do not need that here\n boolean isNew = instructionJson.get(\"new\").getAsBoolean();\n String tree = instructionJson.get(\"tree\").getAsString();\n\n if (isNew) {\n if (oldInstruction == null) {\n // first instruction, just save and continue\n oldInstruction = tree;\n oldTimestamp = record.getTimestamp();\n continue;\n }\n int duration = (int) oldTimestamp.until(record.getTimestamp(), MILLIS);\n durations.add(new Pair<>(oldInstruction, duration));\n oldInstruction = tree;\n oldTimestamp = record.getTimestamp();\n }\n }\n }\n return durations;\n }",
"public int getDuration()\r\n/* 70: */ {\r\n/* 71: 71 */ return this.duration;\r\n/* 72: */ }",
"private void UpdateTimeLines(RadioPlayer player)\n {\n String start = player.getStartTime();\n String end = player.getEndTime();\n\n //Not live, playing mp3 file. Calc progress from file progress instead\n if (isAdded()) {\n if (player.getUrl() != getString(R.string.url_live_radio)) {\n float pct = player.getProgress();\n int duration = player.getDuration();\n timeline.setProgress(pct);\n smallTimeLine.setProgress(pct);\n timeLineSeekBar.setProgress(pct);\n\n //start and end times\n int past = (int) (pct * duration);\n int left = duration - past;\n\n int s0 = (int) (past / 1000) % 60;\n int m0 = (int) ((past / (1000 * 60)) % 60);\n int s1 = (int) (left / 1000) % 60;\n int m1 = (int) ((left / (1000 * 60)) % 60);\n\n String elapsed = String.format(\"%02d\", m0) + \":\" + String.format(\"%02d\", s0);\n String remaining = \"-\" + String.format(\"%02d\", m1) + \":\" + String.format(\"%02d\", s1);\n\n startTimeLabel.setText(elapsed);\n endTimeLabel.setText(remaining);\n\n return;\n }\n }\n\n Date now = new Date();\n SimpleDateFormat sdfr = new SimpleDateFormat(\"HH:mm\");\n Date curr = DateUtils.timeStringToDate(sdfr.format(now));\n\n Date startDate = DateUtils.timeStringToDate(start);\n Date endDate = DateUtils.timeStringToDate(end);\n\n startTimeLabel.setText(start);\n endTimeLabel.setText(end);\n\n if(startDate != null && endDate != null && curr != null)\n {\n long t0 = startDate.getTime();\n long t1 = endDate.getTime();\n long t = curr.getTime();\n\n float duration = t1 - t0;\n float time = t - t0;\n\n //if(duration == 0)\n if(Math.signum(duration) == 0)\n {\n timeline.setProgress(0);\n smallTimeLine.setProgress(0);\n timeLineSeekBar.setProgress(0);\n }\n\n float pct = time/duration;\n\n //TODO: If we've reached pct = 1 (or something like 0.9999), then start checking for new live content\n //Log.i(\"PS\", \"UpdateTimeLines, pct: \"+pct);\n /*\n if(player.isLive())\n {\n Log.i(\"PS\",\"Live radio @ \"+pct);\n if(pct >= 1.0 && liveReloadCallback == null)//!isLoadingNewContent)\n {\n //isLoadingNewContent = true;//Set to false on backend respons IF content is updated\n reloadBroadcastData();\n }\n }\n */\n\n timeline.setProgress(pct);\n smallTimeLine.setProgress(pct);\n timeLineSeekBar.setProgress(pct);\n }\n }",
"public int getDuration() { return duration; }",
"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}",
"long getDuration();",
"private void alignRefreshInterval() {\n int totalCampaignDuration = 0;\n int externalCampaignDuration = 0;\n for (int i=0; i<tozAdCampaign.size(); i++) {\n totalCampaignDuration += tozAdCampaign.get(i).mAdDuration;\n if (i >= numInternalChildren) externalCampaignDuration += tozAdCampaign.get(i).mAdDuration;\n }\n AppyAdService.getInstance().debugOut(TAG,\"Current ad campaign has external ad duration of \"+externalCampaignDuration+\". Total total campaign duration is \"+totalCampaignDuration);\n\n if ((tozAdCampaignRetrievalInterval != null) && (tozAdCampaignRetrievalInterval > 0)) {\n int minRefresh = Math.max(totalCampaignDuration,AppyAdService.getInstance().MINIMUM_REFRESH_TIME);\n if (tozAdCampaignRetrievalInterval < minRefresh) {\n AppyAdService.getInstance().debugOut(TAG,\"Adjusting refresh interval upward to \"+minRefresh);\n tozAdCampaignRetrievalInterval = minRefresh;\n }\n if (tozAdCampaignRetrievalInterval > AppyAdService.getInstance().MAXIMUM_REFRESH_TIME) {\n AppyAdService.getInstance().debugOut(TAG,\"Adjusting refresh interval downward to \"+AppyAdService.getInstance().MAXIMUM_REFRESH_TIME);\n tozAdCampaignRetrievalInterval = AppyAdService.getInstance().MAXIMUM_REFRESH_TIME;\n }\n }\n }",
"DurationTracker timeSpentTaskWait();",
"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 }",
"public int getDuration() {return this.duration;}",
"public double getTime() { return duration; }",
"public void Times() \n {\n if(status.getStatus_NUM() == 1 || status.getStatus_NUM() == 2 || status.getStatus_NUM() == 3)\n { //Waiting Time\n startWaitingTime = System.nanoTime();\n if(status.getStatus_NUM() != 1 || status.getStatus_NUM() != 2 || status.getStatus_NUM() != 3)\n {\n endWaitingTime = System.nanoTime();\n }\n \n totalWaitingTime += endWaitingTime - startWaitingTime;\n }\n //When it is running status \n else if(status.getStatus_NUM() == 0)\n {\n //Running Time\n startRunningTime = System.nanoTime();\n //Add a process\n if(status.getStatus_NUM() != 0)\n {\n endRunningTime = System.nanoTime();\n }\n \n totalRunningTime += endRunningTime - startRunningTime;\n }\n //When it is terminated\n else\n {\n System.out.println(\"Terminated\");\n System.out.println(\"Total Running Time : \" + totalRunningTime);\n System.out.println(\"Total Waiting Time : \" + totalWaitingTime);\n }\n }",
"public HashMap<String,Double> getAverageActivityDuration(Population population) {\r\n\t\tHashMap<String,Double>actDurations=new HashMap<>();\r\n\t\tHashMap<String,Tuple<Double,Integer>> activities=new HashMap<>();\r\n\t\tfor(Person p:population.getPersons().values()) {\r\n\t\t\tfor(PlanElement pe:p.getSelectedPlan().getPlanElements()) {\r\n\t\t\t\tif(pe instanceof Activity) {\r\n\t\t\t\t\tActivity a=(Activity)pe;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(a.getStartTime()!=Double.NEGATIVE_INFINITY && a.getEndTime()!=Double.NEGATIVE_INFINITY) {\r\n//\t\t\t\t\t\tif(a.getStartTime()>a.getEndTime()) {\r\n//\t\t\t\t\t\t\ta.setEndTime(24*3600);\r\n//\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdouble duration=a.getEndTime()-a.getStartTime();\r\n\t\t\t\t\t\tif(duration<0) {\r\n\t\t\t\t\t\t\tthrow new IllegalArgumentException(\"duration can not be negative\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(activities.containsKey(a.getType())) {\r\n\t\t\t\t\t\t\tTuple<Double,Integer> oldActDetails=activities.get(a.getType());\r\n\t\t\t\t\t\t\tTuple<Double,Integer> newActDetails=new Tuple<>((oldActDetails.getFirst()*oldActDetails.getSecond()+duration)/(oldActDetails.getSecond()+1)\r\n\t\t\t\t\t\t\t\t\t,oldActDetails.getSecond()+1);\r\n\t\t\t\t\t\t\tactivities.put(a.getType(), newActDetails);\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tTuple<Double,Integer> newActDetails=new Tuple<>(duration,1);\r\n\t\t\t\t\t\t\tactivities.put(a.getType(), newActDetails);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(String s:activities.keySet()) {\r\n\t\t\tactDurations.put(s,activities.get(s).getFirst());\r\n\t\t}\r\n\t\tthis.activityDuration=actDurations;\r\n\t\treturn actDurations;\r\n\t}",
"public String printActivityPatterns()\n\t{\n\t\tStringBuilder toReturn = new StringBuilder();\n\n\t\ttoReturn.append(\"ACTIVITY PATTERNS\\n\");\n\t\ttoReturn.append(\" Activity in one-hour segments - Species (Number of pictures in one hour segments/Total number of pics)\\n\");\n\n\t\tfor (Species species : analysis.getAllImageSpecies())\n\t\t{\n\t\t\tStringBuilder toAdd = new StringBuilder();\n\t\t\tList<ImageEntry> imagesWithSpecies = new ImageQuery().speciesOnly(species).query(analysis.getImagesSortedByDate());\n\t\t\tInteger totalImages = imagesWithSpecies.size();\n\t\t\t// Activity / All\n\t\t\ttoAdd.append(\" All months Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec\\n\");\n\t\t\ttoAdd.append(\" Hour Number Frequency Number Frequency Number Frequency Number Frequency Number Frequency Number Frequency Number Frequency Number Frequency Number Frequency Number Frequency Number Frequency Number Frequency Number Frequency\\n\");\n\n\t\t\tint[] totals = new int[13];\n\t\t\tint[] totalActivities = new int[13];\n\n\t\t\t// 12 months + all months\n\t\t\tfor (int i = -1; i < 12; i++)\n\t\t\t{\n\t\t\t\tInteger activity;\n\t\t\t\t// -1 = all months\n\t\t\t\tif (i == -1)\n\t\t\t\t\tactivity = analysis.activityForImageList(imagesWithSpecies);\n\t\t\t\telse\n\t\t\t\t\tactivity = analysis.activityForImageList(new ImageQuery().monthOnly(i).query(imagesWithSpecies));\n\t\t\t\ttotalActivities[i + 1] = activity;\n\t\t\t}\n\n\t\t\t// 24 hrs\n\t\t\tfor (int i = 0; i < 24; i++)\n\t\t\t{\n\t\t\t\tList<ImageEntry> imagesWithSpeciesAtTime = new ImageQuery().timeFrame(i, i + 1).query(imagesWithSpecies);\n\t\t\t\ttoAdd.append(String.format(\"%02d:00-%02d:00 \", i, i + 1));\n\t\t\t\t// 12 months\n\t\t\t\tfor (int j = -1; j < 12; j++)\n\t\t\t\t{\n\t\t\t\t\tInteger activity;\n\t\t\t\t\t// -1 = all months\n\t\t\t\t\tif (j == -1)\n\t\t\t\t\t\tactivity = analysis.activityForImageList(imagesWithSpeciesAtTime);\n\t\t\t\t\telse\n\t\t\t\t\t\tactivity = analysis.activityForImageList(new ImageQuery().monthOnly(j).query(imagesWithSpeciesAtTime));\n\n\t\t\t\t\tif (activity != 0)\n\t\t\t\t\t\ttoAdd.append(String.format(\"%6d %10.3f\", activity, (double) activity / totalActivities[j + 1]));\n\t\t\t\t\telse\n\t\t\t\t\t\ttoAdd.append(\" \");\n\t\t\t\t\ttotals[j + 1] = totals[j + 1] + activity;\n\t\t\t\t}\n\t\t\t\ttoAdd.append(\"\\n\");\n\t\t\t}\n\n\t\t\ttoAdd.append(\"Total \");\n\n\t\t\tfor (int total : totals) toAdd.append(String.format(\"%6d 100.000\", total));\n\n\t\t\ttoAdd.append(\"\\n\");\n\n\t\t\t// Print the header first\n\t\t\ttoReturn.append(String.format(\"%-28s (%6d/ %6d)\\n\", species.getName(), totals[0], totalImages));\n\n\t\t\ttoReturn.append(toAdd);\n\n\t\t\ttoReturn.append(\"\\n\");\n\t\t}\n\n\t\treturn toReturn.toString();\n\t}",
"public int getDuration();",
"public Timeline createPartLineAnimation(int duration, int stop_duration, ArrayList<Coordinate> affected_points, int slow_duration, int slow_stop_duration, Circle vehicle, ArrayList<Coordinate> line_coordinates_part, EventHandler<MouseEvent> handler, boolean detour_delay)\r\n {\r\n Timeline affected_timeline = new Timeline();\r\n int original_duration = duration;\r\n int original_stop_duration = stop_duration;\r\n addLineVehicles(vehicle);\r\n vehicle.setOnMouseClicked(handler);\r\n\r\n // add all keyframes to timeline - one keyframe means path from one coordinate to another coordinate\r\n // vehicle waits in stop for 1 seconds and go to another coordinate for 2 seconds (in default mode)\r\n int delta_time = 0;\r\n KeyFrame waiting_in_stop = null;\r\n\r\n //int affected_stops_count = 0;\r\n for (int i = 0; i < line_coordinates_part.size() - 1; i++) {\r\n // if we go through street affected by slow traffic\r\n if (line_coordinates_part.get(i).isInArray(affected_points) && line_coordinates_part.get(i+1).isInArray(affected_points))\r\n {\r\n // duration between coordinates and duration of waiting in stop is different\r\n duration = slow_duration;\r\n stop_duration = slow_stop_duration;\r\n }\r\n else\r\n {\r\n // else use default duration\r\n duration = original_duration;\r\n stop_duration = original_stop_duration;\r\n }\r\n\r\n for (Stop s : this.getStopsMap()) {\r\n // if we are in stop, we wait 'stop_duration' time\r\n if (line_coordinates_part.get(i).getX() == s.getCoordinate().getX() && line_coordinates_part.get(i).getY() == s.getCoordinate().getY()) {\r\n waiting_in_stop = new KeyFrame(Duration.seconds(delta_time + stop_duration), // this means waiting in stop for some time\r\n new KeyValue(vehicle.centerXProperty(), line_coordinates_part.get(i).getX()),\r\n new KeyValue(vehicle.centerYProperty(), line_coordinates_part.get(i).getY()));\r\n\r\n delta_time = delta_time + stop_duration;\r\n\r\n break;\r\n }\r\n }\r\n // we travelled for 'duration' time\r\n KeyFrame end = new KeyFrame(Duration.seconds(delta_time + duration), // this means that the path from one coordinate to another lasts 2 seconds\r\n new KeyValue(vehicle.centerXProperty(), line_coordinates_part.get(i + 1).getX()),\r\n new KeyValue(vehicle.centerYProperty(), line_coordinates_part.get(i + 1).getY()));\r\n\r\n if (waiting_in_stop != null) {\r\n affected_timeline.getKeyFrames().addAll(end, waiting_in_stop);\r\n } else {\r\n affected_timeline.getKeyFrames().addAll(end);\r\n }\r\n\r\n delta_time = delta_time + duration;\r\n }\r\n\r\n this.setLineMovement(affected_timeline); // set movement of specified line\r\n\r\n if (detour_delay == false)\r\n {\r\n this.setDelay(duration, slow_duration, affected_points.size());\r\n }\r\n else\r\n {\r\n this.delay = this.detour_streets.size() * duration - duration;\r\n }\r\n\r\n\r\n return affected_timeline;\r\n }",
"int getDuration();",
"int getDuration();",
"Double getActualDuration();",
"private void drawTimeLineForLine(Graphics2D g2d, RenderContext myrc, Line2D line, \n Composite full, Composite trans,\n int tl_x0, int tl_x1, int tl_w, int tl_y0, int tl_h, \n long ts0, long ts1) {\n g2d.setComposite(full); \n\t// Parametric formula for line\n double dx = line.getX2() - line.getX1(), dy = line.getY2() - line.getY1();\n\tdouble len = Utils.length(dx,dy);\n\tif (len < 0.001) len = 0.001; dx = dx/len; dy = dy/len; double pdx = dy, pdy = -dx;\n\tif (pdy < 0.0) { pdy = -pdy; pdx = -pdx; } // Always point down\n double gather_x = line.getX1() + dx*len/2 + pdx*40, gather_y = line.getY1() + dy*len/2 + pdy*40;\n\n\t// Find the bundles, for this with timestamps, construct the timeline\n\tSet<Bundle> set = myrc.line_to_bundles.get(line);\n\tIterator<Bundle> itb = set.iterator(); double x_sum = 0.0; int x_samples = 0;\n while (itb.hasNext()) {\n\t Bundle bundle = itb.next();\n\t if (bundle.hasTime()) { x_sum += (int) (tl_x0 + (tl_w*(bundle.ts0() - ts0))/(ts1 - ts0)); x_samples++; }\n }\n\tif (x_samples == 0) return;\n\tdouble x_avg = x_sum/x_samples;\n ColorScale timing_marks_cs = RTColorManager.getTemporalColorScale();\n itb = set.iterator();\n\twhile (itb.hasNext()) { \n\t Bundle bundle = itb.next();\n\n\t if (bundle.hasTime()) {\n double ratio = ((double) (bundle.ts0() - ts0))/((double) (ts1 - ts0));\n\t g2d.setColor(timing_marks_cs.at((float) ratio));\n\n\t int xa = (int) (tl_x0 + (tl_w*(bundle.ts0() - ts0))/(ts1 - ts0));\n // g2d.setComposite(full); \n g2d.draw(line);\n\t if (bundle.hasDuration()) {\n int xb = (int) (tl_x0 + (tl_w*(bundle.ts1() - ts0))/(ts1 - ts0)); \n double r = (tl_h-2)/2;\n g2d.fill(new Ellipse2D.Double(xa-r,tl_y0-tl_h/2-r,2*r,2*r));\n g2d.fill(new Ellipse2D.Double(xb-r,tl_y0-tl_h/2-r,2*r,2*r));\n if (xa != xb) g2d.fill(new Rectangle2D.Double(xa, tl_y0-tl_h/2-r, xb-xa, 2*r));\n\t if (xa != xb) { g2d.drawLine(xa,tl_y0-tl_h,xb,tl_y0); g2d.drawLine(xa,tl_y0, xb,tl_y0); }\n\t }\n\t g2d.drawLine(xa,tl_y0-tl_h,xa,tl_y0); // Make it slightly higher at the start\n double x0 = line.getX1() + dx * len * 0.1 + dx * len * 0.8 * ratio,\n\t y0 = line.getY1() + dy * len * 0.1 + dy * len * 0.8 * ratio;\n\t g2d.draw(new CubicCurve2D.Double(x0, y0, \n x0 + pdx*10, y0 + pdy*10,\n gather_x - pdx*10, gather_y - pdy*10,\n gather_x, gather_y));\n g2d.draw(new CubicCurve2D.Double(gather_x, gather_y, \n\t gather_x + pdx*40, gather_y + pdy*40,\n\t\t\t\t\t x_avg, tl_y0 - 10*tl_h, \n\t x_avg, tl_y0 - 8*tl_h));\n g2d.draw(new CubicCurve2D.Double(x_avg, tl_y0 - 8*tl_h,\n (x_avg+xa)/2, tl_y0 - 6*tl_h,\n xa, tl_y0 - 2*tl_h,\n xa, tl_y0 - tl_h/2));\n }\n\t}\n }",
"private long getDuration() throws Exception {\n\treturn dtEnd.getTime() - dtStart.getTime();\n }",
"private void writePauseCSV(Date start_time, Date end_time, double duration, String file_path) throws IOException {\n CSVWriter pause_csv_writer = null;\n List<String[]> read_all = new ArrayList<String[]>();\n List<String[]> write_all = new ArrayList<String[]>();\n String total_write_line[] = new String[6];\n String next_write_line[] = new String[3];\n double total_time_paused = 0;\n int number_of_pauses = 0;\n double average_pause_duration = 0;\n\n CSVReader pause_reader = null;\n\n try {\n pause_reader = new CSVReader(new FileReader(file_path), ',', '\"', 0);\n\n } catch (FileNotFoundException ex) {\n\n }\n\n if (pause_reader != null) {\n\n read_all = pause_reader.readAll();\n\n //remove the total line because this will be recalculated\n read_all.remove(read_all.size() - 1);\n\n //add the components to the read_all object\n next_write_line[0] = start_time.toString();\n next_write_line[1] = end_time.toString();\n next_write_line[2] = String.valueOf(duration);\n\n //add the new line to the read_all object\n read_all.add(next_write_line);\n\n int i = 1;\n\n //loop through the read_all object to recalculate the totals\n while (i < read_all.size()) {\n number_of_pauses++;\n total_time_paused = total_time_paused + Double.parseDouble(read_all.get(i)[2]);\n i++;\n }\n\n average_pause_duration = (Double) total_time_paused / number_of_pauses;\n\n total_write_line[0] = \"Number of Pauses:\";\n total_write_line[1] = String.valueOf(number_of_pauses);\n total_write_line[2] = \"Total Time Spent Paused:\";\n total_write_line[3] = String.valueOf(total_time_paused);\n total_write_line[4] = \"Average Pause Duration:\";\n total_write_line[5] = String.valueOf(average_pause_duration);\n\n read_all.add(total_write_line);\n\n pause_csv_writer = new CSVWriter(new FileWriter(file_path));\n pause_csv_writer.writeAll(read_all);\n pause_csv_writer.close();\n\n } else {\n pause_csv_writer = new CSVWriter(new FileWriter(file_path));\n\n //this code will only run after the first pause is recorded for the\n // activity so the first line and the total line will be equal\n next_write_line[0] = \"Pause Start Time\";\n next_write_line[1] = \"Pause End Time\";\n next_write_line[2] = \"Pause Duration\";\n pause_csv_writer.writeNext(next_write_line);\n\n next_write_line[0] = start_time.toString();\n next_write_line[1] = end_time.toString();\n next_write_line[2] = String.valueOf(duration);\n pause_csv_writer.writeNext(next_write_line);\n\n total_write_line[0] = \"Number of Pauses:\";\n total_write_line[1] = \"1\";\n total_write_line[2] = \"Total Time Spent Paused:\";\n total_write_line[3] = String.valueOf(duration);\n total_write_line[4] = \"Average Pause Duration:\";\n total_write_line[5] = String.valueOf(duration);\n\n // write the two initial lines to the csv\n pause_csv_writer.writeNext(total_write_line);\n pause_csv_writer.flush();\n pause_csv_writer.close();\n }\n\n }",
"private int totalTime()\n\t{\n\t\t//i'm using this varaible enough that I should write a separate method for it\n\t\tint totalTime = 0;\n\t\tfor(int i = 0; i < saveData.size(); i++)//for each index of saveData\n\t\t{\n\t\t\t//get the start time\n\t\t\tString startTime = saveData.get(i).get(\"startTime\");\n\t\t\t//get the end time\n\t\t\tString endTime = saveData.get(i).get(\"endTime\");\n\t\t\t//****CONTINUE\n\t\t\t//total time in minutes\n\t\t}\n\t}",
"void realTimeProcess(){\n //For red list\n if(redList.get(redList.size()-1).getYPos() < redList.get(redList.size()-2).getYPos() && !steppedOnceRed && redGreenLine){\n realTimeIncreaseRed = true;\n }\n else if(redList.get(redList.size()-1).getYPos() > redList.get(redList.size()-2).getYPos() && realTimeIncreaseRed && !steppedOnceRed && redGreenLine){\n stepCount++;\n stepTimeStamp.add(System.nanoTime());\n updateStepCoordiantes();\n steppedOnceRed =true;\n System.out.println(\"STEP: \" + redList.get(redList.size()-1).getYPos());\n realTimeIncreaseRed = false;\n }\n //for blue list\n if(blueList.get(blueList.size()-1).getYPos() < blueList.get(blueList.size()-2).getYPos() && !steppedOnceBlue && blueGreenLine){\n realTimeIncreaseBlue = true;\n }\n else if(blueList.get(blueList.size()-1).getYPos() > blueList.get(blueList.size()-2).getYPos() && realTimeIncreaseBlue && !steppedOnceBlue && blueGreenLine){\n stepCount++;\n stepTimeStamp.add(System.nanoTime());\n updateStepCoordiantes();\n steppedOnceBlue = true;\n System.out.println(\"STEP: \" + blueList.get(blueList.size()-1).getYPos());\n realTimeIncreaseBlue = false;\n }\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n stepText.setText(USER_NAME + \"'s step length: \" + String.format(\"%.3f\", STEP_LENGTH) + \"m\" + \"\\n\" + \"Number of Steps: \" + stepCount +\"\\n\" + \"Coordinates: \" +\"\\n\" + String.format(\"%.8f\", displayLat) + \", \" + String.format(\"%.8f\",dispalyLon));\n }\n });\n Log.i(\"NUMBER OF STEPS\", Double.toString(totalNumSteps));\n if(stepCount >= totalNumSteps){\n processScanCoordinates(blueFootTimeStamp, \"blue\");\n processScanCoordinates(redFootTimeStamp, \"red\");\n processScanCoordinates(magTimeStamps, \"mag\");\n processScanCoordinates(gyroTimeStamp, \"gyro\");\n processScanCoordinates(accelTimeStamp, \"accel\");\n postProcessData();\n\n }\n }",
"public void ActivitySplitter(Population population,Config config, String activityType,Double timeGapInSecond,boolean shouldAddearliestEndTimeAndLatestStartTime) {\r\n\t\tHashMap<String,Tuple<Double,Double>> activities=new HashMap<>();\r\n\t\tHashMap<String,Integer> activityCounter=new HashMap<>();\r\n\t\tHashMap<String,Double> activityDurationSum=new HashMap<>();\r\n\t\tHashMap<String,ArrayList<Double>> activityStartTime=new HashMap<>();\r\n\t\tHashMap<String,ArrayList<Double>> activityEndTime=new HashMap<>();\r\n\t\tdouble startTime=3*3600;\r\n\t\tdouble endTime=27*3600;\r\n\t\tfor(double d=startTime;d<endTime;d=d+timeGapInSecond) {\r\n\t\t\tactivities.put(activityType+\"_\"+d, new Tuple<>(d,d+timeGapInSecond));\r\n\t\t\tactivityCounter.put(activityType+\"_\"+d, 0);\r\n\t\t\tactivityDurationSum.put(activityType+\"_\"+d, 0.);\r\n\t\t\tactivityStartTime.put(activityType+\"_\"+d,new ArrayList<>());\r\n\t\t\tactivityEndTime.put(activityType+\"_\"+d, new ArrayList<>());\r\n\t\t}\r\n\r\n\t\tfor(Person p:population.getPersons().values()) {\r\n\t\t\tfor(PlanElement pe:p.getSelectedPlan().getPlanElements()) {\r\n\t\t\t\tif(pe instanceof Activity) {\r\n\t\t\t\t\tActivity a=(Activity)pe;\r\n\t\t\t\t\tif(a.getType().equals(activityType)) {\r\n\t\t\t\t\t\tfor(Tuple<Double,Double>t:activities.values()) {\r\n\t\t\t\t\t\t\tif(a.getStartTime()>=t.getFirst()&&a.getStartTime()<t.getSecond()&&a.getStartTime()!=Double.NEGATIVE_INFINITY) {\r\n\t\t\t\t\t\t\t\ta.setType(activityType+\"_\"+t.getFirst());\r\n\t\t\t\t\t\t\t\tactivityCounter.put(activityType+\"_\"+t.getFirst(),activityCounter.get(activityType+\"_\"+t.getFirst())+1);\r\n\t\t\t\t\t\t\t\tactivityDurationSum.put(activityType+\"_\"+t.getFirst(),activityDurationSum.get(activityType+\"_\"+t.getFirst())+(a.getEndTime()-a.getStartTime()));\r\n\t\t\t\t\t\t\t\tactivityStartTime.get(activityType+\"_\"+t.getFirst()).add(a.getStartTime());\r\n\t\t\t\t\t\t\t\tactivityEndTime.get(activityType+\"_\"+t.getFirst()).add(a.getEndTime());\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tActivityParams aParams=config.planCalcScore().getActivityParams(activityType);\r\n\t\tfor(String s:activityCounter.keySet()) {\r\n\t\t\tif(activityCounter.get(s)!=0) {\r\n\t\t\t\tActivityParams ap=new ActivityParams(s);\r\n\t\t\t\tif(activityDurationSum.get(s)/activityCounter.get(s)!=0) {\r\n\t\t\t\t\tap.setTypicalDuration(activityDurationSum.get(s)/activityCounter.get(s));\r\n\t\t\t\t}else {\r\n\t\t\t\t\tap.setTypicalDuration(activityDurationSum.get(s)/activityCounter.get(s)+300);\r\n\t\t\t\t}\r\n\t\t\t\tap.setClosingTime(Math.ceil((this.calcAverage(activityEndTime.get(s))+this.calcSD(activityEndTime.get(s)))/1800)*1800);\r\n\t\t\t\tif(shouldAddearliestEndTimeAndLatestStartTime) {\r\n\t\t\t\t\tap.setLatestStartTime(Math.floor(this.calcAverage(activityStartTime.get(s))/900)*900);\r\n\t\t\t\t\tap.setEarliestEndTime(Math.ceil(this.calcAverage(activityEndTime.get(s))/900)*900);\r\n\t\t\t\t}\r\n\t\t\t\tap.setOpeningTime(Math.floor((this.calcAverage(activityStartTime.get(s))-this.calcSD(activityStartTime.get(s)))/1800)*1800);\r\n\t\t\t\tconfig.planCalcScore().addActivityParams(ap);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private static void testDuration() {\n LocalTime time1 = LocalTime.of(15, 20, 38);\n LocalTime time2 = LocalTime.of(21, 8, 49);\n\n LocalDateTime dateTime1 = time1.atDate(LocalDate.of(2014, 5, 27));\n LocalDateTime dateTime2 = time2.atDate(LocalDate.of(2015, 9, 15));\n\n Instant i1 = Instant.ofEpochSecond(1_000_000_000);\n Instant i2 = Instant.now();\n\n // create duration between two points\n Duration d1 = Duration.between(time1, time2);\n Duration d2 = Duration.between(dateTime1, dateTime2);\n Duration d3 = Duration.between(i1, i2);\n Duration d4 = Duration.between(time1, dateTime2);\n\n // create duration from some random value\n Duration threeMinutes;\n threeMinutes = Duration.ofMinutes(3);\n threeMinutes = Duration.of(3, ChronoUnit.MINUTES);\n }",
"public void findavgTime(){\n findWaitingTime(ProcessesNumber, ProcessesNumber.length, BurestTime, WaitingTime, quantum);\n \n // Function to find turn around time \n findTurnAroundTime(ProcessesNumber, ProcessesNumber.length, BurestTime, WaitingTime, TurnaroundTime);\n \n \n System.out.println(\"Processes \" + \" Burst time \" +\n \" Waiting time \" + \" Turn around time\");\n \n \n // around time\n for (int i=0; i<ProcessesNumber.length; i++)\n {\n Total_WaitingTime = Total_WaitingTime + WaitingTime[i];\n Total_TurnaroundTime = Total_TurnaroundTime + TurnaroundTime[i];\n System.out.println(\" \" + (i+1) + \"\\t\\t\" + BurestTime[i] +\"\\t \" +\n WaitingTime[i] +\"\\t\\t \" + TurnaroundTime[i]);\n }\n \n Average_WaitingTime = (float)Total_WaitingTime / (float)ProcessesNumber.length ;\n Average_TurnaroundTime = (float)Total_TurnaroundTime / (float)ProcessesNumber.length ;\n \n System.out.println(\"Average waiting time = \" + (float)Average_WaitingTime);\n System.out.println(\"Average turn around time = \" + (float)Average_TurnaroundTime);\n \n\n//for ( int k = 0; k < ProcessMoved[k].length; k++) {\n// \n// for (int j = 0; j < ProcessMoved.length; j++) {\n//\n// System.out.println(ProcessMoved[j][k]);\n// }\n//\n// }\n \n Gantt_Chart_Pre per = new Gantt_Chart_Pre(ProcessMoved ,endtime ,WaitingTime , TurnaroundTime , Names ,ProcessesNumber ,Total_WaitingTime,Average_WaitingTime,Total_TurnaroundTime,Average_TurnaroundTime);\n per.setTitle(\"Solution !!\");\n per.setSize(1000,700);\n per.setLocationRelativeTo(null);\n per.setVisible(true);\n }",
"public void reviewExtractorPeriodicity() {\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"YYYY-MM-dd hh:mm:ss\");\r\n Iterator<String> it = ExtractorManager.hmExtractor.keySet().iterator();\r\n while (it.hasNext()) { //\r\n String next = it.next();\r\n DataObject dobj = null;\r\n\r\n try {\r\n \tdobj = ExtractorManager.datasource.fetchObjById(next);\r\n } catch (IOException ioex) {\r\n \tlog.severe(\"Error getting extractor definition\");\r\n }\r\n\r\n if (null == dobj) {\r\n \tExtractorManager.hmExtractor.remove(next);\r\n } else {\r\n \tPMExtractor extractor = ExtractorManager.hmExtractor.get(next);\r\n\r\n \tif (null != extractor && extractor.canStart()) {\r\n\t String lastExec = dobj.getString(\"lastExecution\");\r\n\t Date nextExecution = null;\r\n\t boolean extractorStarted = false;\r\n\r\n\t // Revisando si tiene periodicidad\r\n\t if (dobj.getBoolean(\"periodic\")) {\r\n\t \t\ttry {\r\n\t \t\t\tif (null != lastExec && !lastExec.isEmpty()) nextExecution = sdf.parse(lastExec);\r\n\t\t } catch (ParseException psex) {\r\n\t\t \t\tlog.severe(\"Error parsing execution date\");\r\n\t\t }\r\n\t\t \t\r\n\t\t \tif (null == nextExecution) {\r\n\t\t \t\textractor.start();\r\n\t\t \t\textractorStarted = true;\r\n\t\t \t} else {\r\n\t\t \t\ttry {\r\n\t\t\t \t\tlong tiempo = dobj.getLong(\"timer\");\r\n\t\t\t \tString unidad = dobj.getString(\"unit\");\r\n\t\t\t \tlong unitmilis = 0l;\r\n\t\r\n\t\t\t \tswitch(unidad) {\r\n\t\t\t \t\tcase \"min\":\r\n\t\t\t \t\t\tunitmilis = tiempo * 60 * 1000;\r\n\t\t\t \t\t\tbreak;\r\n\t\t\t \t\tcase \"h\":\r\n\t\t\t \t\t\tunitmilis = tiempo * 60 * 60 * 1000;\r\n\t\t\t \t\t\tbreak;\r\n\t\t\t \t\tcase \"d\":\r\n\t\t\t \t\t\tunitmilis = tiempo * 24 * 60 * 60 * 1000;\r\n\t\t\t \t\t\tbreak;\r\n\t\t\t \t\tcase \"m\":\r\n\t\t\t \t\t\tunitmilis = tiempo * 30 * 24 * 60 * 60 * 1000;\r\n\t\t\t \t\t\tbreak;\r\n\t\t\t \t}\r\n\t\r\n\t\t\t \tif (unitmilis > 0) {\r\n\t\t\t \t\tunitmilis = unitmilis + nextExecution.getTime();\r\n\t\t\t \t\tif(new Date().getTime() > unitmilis) {\r\n\t\t\t extractor.start();\r\n\t\t\t extractorStarted = true;\r\n\t\t\t }\r\n\t\t\t \t}\r\n\t\t \t\t} catch (Exception ex) { //NFE\r\n\t\t \t\t\tlog.severe(\"Error getting extractor config data\");\r\n\t\t \t\t}\r\n\t\t \t}\r\n\t\r\n\t\t \tif (extractorStarted) {\r\n\t\t \t\tdobj.put(\"lastExecution\", sdf.format(new Date()));\r\n\t\t \t\ttry {\r\n\t\t \t\t\tExtractorManager.datasource.updateObj(dobj);\r\n\t\t \t\t} catch(IOException ioex) {\r\n\t\t \t\t\tlog.severe(\"Error trying to update last execution date\");\r\n\t\t \t\t}\r\n\t\t \t}\r\n\t }\r\n\t }\r\n\t }\r\n }\r\n }",
"float getDuration() throws InterruptedException, ConnectionLostException;",
"float getDurationBuffered() throws InterruptedException, ConnectionLostException;",
"public Duration toDuration() {\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[23]++;\r\n long durMillis = toDurationMillis();\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[24]++;\nint CodeCoverConditionCoverageHelper_C9;\r\n if ((((((CodeCoverConditionCoverageHelper_C9 = 0) == 0) || true) && (\n(((CodeCoverConditionCoverageHelper_C9 |= (2)) == 0 || true) &&\n ((durMillis == 0) && \n ((CodeCoverConditionCoverageHelper_C9 |= (1)) == 0 || true)))\n)) && (CodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.conditionCounters[9].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C9, 1) || true)) || (CodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.conditionCounters[9].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C9, 1) && false)) {\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.branches[17]++;\r\n return Duration.ZERO;\n\r\n } else {\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.branches[18]++;\r\n return new Duration(durMillis);\r\n }\r\n }",
"private void parseCPUSpeedTimes(){\n\t\tString str = parser.readFile(SYS_CPU_SPEED_STEPS, 512);\n\t\tif(str == null)\n\t\t\treturn;\n\t\t\n\t\tString[] vals;\n\t\tint index = 0;\n\t\tlong time;\n\t\t\n\t\tfor(String token : str.split(\"\\n\")){\n\t\t\tif(str.trim().length() == 0) continue;\n\t\t\ttry{\n\t\t\t\tvals = token.split(\" \");\n\t\t\t\ttime = Long.valueOf(vals[1]);\n\t\t\t\tmRelCpuSpeedTimes[index] = time - mBaseCpuSpeedTimes[index];\n\t\t\t\tmBaseCpuSpeedTimes[index] = time;\n\t\t\t}catch (NumberFormatException nfe){\n\t\t\t\tnfe.printStackTrace();\n\t\t\t}finally{\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void run(){\n\t\tLog.v(\"measure\",\"Thread started\");\n\t\t\n\t\twhile(mRun){\n try { \t\n \tsynchronized(this){wait(500);}\n \t\n \t\t\tfor(int i=0;i<numMeasurements;i++){\n \t\t\t\tfloat val=0;\n \t\t\t\tfloat diff=0;\n \t\t\t\tint timeDiv = measurementArray[i].mSource.getTimeDiv();\n \t\t\t\tint voltDiv = measurementArray[i].mSource.getVoltDiv();\n \t\t\t\tString result=null;\n \t\t\t\tMessage msg = new Message();\n \tmsg.what=MSG_MEASUREMENTS;\n \tmsg.arg1=-1;\n \tmsg.arg2=-1;\n \tBundle msgData = new Bundle();\n \t\t\t\t\n \t// Check measurement type, set correct result\n \t\t\t\tswitch(measurementArray[i].mType){\n \t\t\t\tcase 0: \t//delta-T measurement\n \t\t\t\t\tdiff = curt2.getPos()-curt1.getPos();//reversed, because of coordinate system on tablet\n \t\t\t\t\tval = diff/scrnWidth*mTimeConversion[timeDiv]; \n \t\t\t\t\t\n \t\t\t\t\tif(timeDiv<2)\n \t\t\t\t\t\tresult=String.format(\"%.2f\",val) + \" ns\";\n \t\t\t\t\tif(timeDiv>=2 && timeDiv<=10)\n \t\t\t\t\t\tresult=String.format(\"%.2f\",val) + \" us\";\n \t\t\t\t\tif(timeDiv>=11 && timeDiv<=19)\n \t\t\t\t\t\tresult=String.format(\"%.2f\",val) + \" ms\";\n \t\t\t\t\tif(timeDiv>19)\n \t\t\t\t\t\tresult=String.format(\"%.2f\", val) + \" s\";\n \t\t\t\t\t\n \t\t\t\t\tbreak;\n \t\t\t\tcase 1: \t//delta-V measurement\n \t\t\t\t\tdiff = curv2.getPos()-curv1.getPos(); //reversed, because of coordinate system on tablet \n \t\t\t\t\tval = diff/scrnHeight*mVoltConversion[voltDiv];\n \t\t\t\t\t\n \t\t\t\t\tif(voltDiv<6)\n \t\t\t\t\t\tresult = String.format(\"%.2f\", val) + \" mV\";\n \t\t\t\t\tif(voltDiv>=6)\n \t\t\t\t\t\tresult=String.format(\"%.2f\", val) + \" V\";\n \t\t\t\t\t\n \t\t\t\t\tbreak;\n \t\t\t\tcase 2: \t//maximum\t\n \t\t\t\t\tsynchronized(measurementArray[i].mSource){\n \t\t\t\t\t\tval = measurementArray[i].mSource.getMaximum();\n\t \t\t\t\t\t}\n \t\t\t\t\tval = val/255*mVoltConversion[voltDiv];\n \t\t\t\t\tif(voltDiv<6)\n \t\t\t\t\t\tresult = String.format(\"%.2f\", val) + \" mV\";\n \t\t\t\t\tif(voltDiv>=6)\n \t\t\t\t\t\tresult=String.format(\"%.2f\", val) + \" V\";\n \t\t\t\t\t\n \t\t\t\t\tbreak;\n \t\t\t\tcase 3: \t//minimum\n \t\t\t\t\tsynchronized(measurementArray[i].mSource){\n \t\t\t\t\t\tval = measurementArray[i].mSource.getMinimum();\n\t \t\t\t\t\t}\n \t\t\t\t\tval = val/255*mVoltConversion[voltDiv];\n \t\t\t\t\tif(voltDiv<6)\n \t\t\t\t\t\tresult = String.format(\"%.2f\", val) + \" mV\";\n \t\t\t\t\tif(voltDiv>=6)\n \t\t\t\t\t\tresult=String.format(\"%.2f\", val) + \" V\";\n \t\t\t\t\tbreak;\n \t\t\t\tcase 4:\t\t//Pk-Pk\n \t\t\t\t\tsynchronized(measurementArray[i].mSource){\n \t\t\t\t\t\tval = measurementArray[i].mSource.getPkPk();\n\t \t\t\t\t\t}\n \t\t\t\t\tval = val/255*mVoltConversion[voltDiv];\n \t\t\t\t\tif(voltDiv<6)\n \t\t\t\t\t\tresult = String.format(\"%.2f\", val) + \" mV\";\n \t\t\t\t\tif(voltDiv>=6)\n \t\t\t\t\t\tresult=String.format(\"%.2f\", val) + \" V\";\n \t\t\t\t\tbreak;\n \t\t\t\tcase 5:\t\t//Frequency\t\t\t\t\n \t\t\t\t\tval = measurementArray[i].mSource.getFreq();\n \t\t\t\t\tString append =\" Hz\";\n \t\t\t\t\tif(val/1000<1){\n \t\t\t\t\t\tappend = \" Hz\";\n \t\t\t\t\t\tresult=String.format(\"%.2f\",val) + append;\n \t\t\t\t\t} else if (val/1000000<1){\n \t\t\t\t\t\tval=val/1000;\n \t\t\t\t\t\tappend = \" kHz\";\n \t\t\t\t\t\tresult=String.format(\"%.2f\",val) + append;\n \t\t\t\t\t} else if(val/1000000>1){\n \t\t\t\t\t\tval=val/1000000;\n \t\t\t\t\t\tappend = \" MHz\";\n \t\t\t\t\t\tresult=String.format(\"%.2f\",val) + append;\n \t\t\t\t\t} else {\n \t\t\t\t\t\tappend=\" Hz\";\n \t\t\t\t\t\tresult=String.format(\"%.2f\", val)+append;\n \t\t\t\t\t}\n \t\t\t\t\tbreak;\n \t\t\t\tcase 6:\t\t//Average\n \t\t\t\t\tval = measurementArray[i].mSource.getAverage();\n \t\t\t\t\tval = val/255*mVoltConversion[voltDiv];\n \t\t\t\t\tif(voltDiv<6)\n\t\t\t\t\t\tresult = String.format(\"%.2f\", val) + \" mV\";\n \t\t\t\t\tif(voltDiv>=6)\n\t\t\t\t\t\tresult=String.format(\"%.2f\", val) + \" V\";\n \t\t\t\t\tbreak;\n \t\t\t\tdefault:\n \t\t\t\t\tresult=\"...\";\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tsynchronized(measurementArray[i].mSource){\n\t\t\t\t\t\tmsg.arg1= measurementArray[i].mType;\n\t\t\t\t\t\tmsg.arg2=i;\n\t\t\t\t\t\t\n \t\t\t\t\tmsgData.putString(MEASUREMENT_RESULT, result);\n \t\t\t\t\tmsgData.putInt(SOURCE, measurementArray[i].mChan);\n \t\t\t\t}\n \t\t\t\tmsg.setData(msgData);\n \t\t\tif(msg.arg1!=-1)\n \t\t\t\tmHandler.sendMessage(msg);\n \t\t\t} \t\n }catch(Exception e){Log.e(TAG,e.toString());}\n\t\t}\n\t}",
"Posn getDuration();",
"public String duration(){\n long duration =beginTime.getTime()-endTime.getTime();\n long diffMinutes = duration / (60 * 1000) % 60;\n long diffHours = duration / (60 * 60 * 1000);\n if(diffHours ==0)\n return -1*diffMinutes + \" minutes\";\n else\n return \" \"+-1*diffHours+\":\"+ -1*diffMinutes +\"min\";\n }",
"@Override\n public void report() {\n\n try {\n File mFile = new File(\"/usr/local/etc/flink-remote/bm_files/metrics_logs/metrics.txt\");\n File eFile = new File(\"/usr/local/etc/flink-remote/bm_files/metrics_logs/latency_throughput.txt\");\n if (!mFile.exists()) {\n mFile.createNewFile();\n }\n if (!eFile.exists()) {\n eFile.createNewFile();\n }\n\n FileOutputStream mFileOut = new FileOutputStream(mFile, true);\n FileOutputStream eFileOut = new FileOutputStream(eFile, true);\n\n StringBuilder builder = new StringBuilder((int) (this.previousSize * 1.1D));\n StringBuilder eBuilder = new StringBuilder((int) (this.previousSize * 1.1D));\n\n// Instant now = Instant.now();\n LocalDateTime now = LocalDateTime.now();\n\n builder.append(lineSeparator).append(lineSeparator).append(now).append(lineSeparator);\n eBuilder.append(lineSeparator).append(lineSeparator).append(now).append(lineSeparator);\n\n builder.append(lineSeparator).append(\"---------- Counters ----------\").append(lineSeparator);\n eBuilder.append(lineSeparator).append(\"---------- records counter ----------\").append(lineSeparator);\n for (Map.Entry metric : counters.entrySet()) {\n builder.append(metric.getValue()).append(\": \").append(((Counter) metric.getKey()).getCount()).append(lineSeparator);\n if (( (String)metric.getValue()).contains(\"numRecords\")) {\n eBuilder.append(metric.getValue()).append(\": \").append(((Counter) metric.getKey()).getCount()).append(lineSeparator);\n }\n }\n\n builder.append(lineSeparator).append(\"---------- Gauges ----------\").append(lineSeparator);\n for (Map.Entry metric : gauges.entrySet()) {\n builder.append(metric.getValue()).append(\": \").append(((Gauge) metric.getKey()).getValue()).append(lineSeparator);\n }\n\n builder.append(lineSeparator).append(\"---------- Meters ----------\").append(lineSeparator);\n eBuilder.append(lineSeparator).append(\"---------- throughput ----------\").append(lineSeparator);\n for (Map.Entry metric : meters.entrySet()) {\n builder.append(metric.getValue()).append(\": \").append(((Meter) metric.getKey()).getRate()).append(lineSeparator);\n if (((String) metric.getValue()).contains(\"numRecords\")) {\n eBuilder.append(metric.getValue()).append(\": \").append(((Meter) metric.getKey()).getRate()).append(lineSeparator);\n }\n }\n\n builder.append(lineSeparator).append(\"---------- Histograms ----------\").append(lineSeparator);\n eBuilder.append(lineSeparator).append(\"---------- lantency ----------\").append(lineSeparator);\n for (Map.Entry metric : histograms.entrySet()) {\n HistogramStatistics stats = ((Histogram) metric.getKey()).getStatistics();\n builder.append(metric.getValue()).append(\": mean=\").append(stats.getMean()).append(\", min=\").append(stats.getMin()).append(\", p5=\").append(stats.getQuantile(0.05D)).append(\", p10=\").append(stats.getQuantile(0.1D)).append(\", p20=\").append(stats.getQuantile(0.2D)).append(\", p25=\").append(stats.getQuantile(0.25D)).append(\", p30=\").append(stats.getQuantile(0.3D)).append(\", p40=\").append(stats.getQuantile(0.4D)).append(\", p50=\").append(stats.getQuantile(0.5D)).append(\", p60=\").append(stats.getQuantile(0.6D)).append(\", p70=\").append(stats.getQuantile(0.7D)).append(\", p75=\").append(stats.getQuantile(0.75D)).append(\", p80=\").append(stats.getQuantile(0.8D)).append(\", p90=\").append(stats.getQuantile(0.9D)).append(\", p95=\").append(stats.getQuantile(0.95D)).append(\", p98=\").append(stats.getQuantile(0.98D)).append(\", p99=\").append(stats.getQuantile(0.99D)).append(\", p999=\").append(stats.getQuantile(0.999D)).append(\", max=\").append(stats.getMax()).append(lineSeparator);\n eBuilder.append(metric.getValue()).append(\": mean=\").append(stats.getMean()).append(\", min=\").append(stats.getMin()).append(\", p5=\").append(stats.getQuantile(0.05D)).append(\", p10=\").append(stats.getQuantile(0.1D)).append(\", p20=\").append(stats.getQuantile(0.2D)).append(\", p25=\").append(stats.getQuantile(0.25D)).append(\", p30=\").append(stats.getQuantile(0.3D)).append(\", p40=\").append(stats.getQuantile(0.4D)).append(\", p50=\").append(stats.getQuantile(0.5D)).append(\", p60=\").append(stats.getQuantile(0.6D)).append(\", p70=\").append(stats.getQuantile(0.7D)).append(\", p75=\").append(stats.getQuantile(0.75D)).append(\", p80=\").append(stats.getQuantile(0.8D)).append(\", p90=\").append(stats.getQuantile(0.9D)).append(\", p95=\").append(stats.getQuantile(0.95D)).append(\", p98=\").append(stats.getQuantile(0.98D)).append(\", p99=\").append(stats.getQuantile(0.99D)).append(\", p999=\").append(stats.getQuantile(0.999D)).append(\", max=\").append(stats.getMax()).append(lineSeparator);\n }\n\n mFileOut.write(builder.toString().getBytes());\n eFileOut.write(eBuilder.toString().getBytes());\n mFileOut.flush();\n eFileOut.flush();\n mFileOut.close();\n eFileOut.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"public void setDuration(int val){this.duration = val;}",
"protected void processTimer(){\n if(timer != null){\n timer.cancel();\n timer = null;\n }\n // Verificamos si el partido esta en progreso\n if(match.status == Match.STATUS_PENDING || match.status == Match.STATUS_ENDED){\n return;\n }\n // Creamos temporizador 90 * 60 * 1000 = 5.400.000\n timer = new CountDownTimer(5400000, 1000) {\n @Override\n public void onTick(long l) {\n // Calcular los segundos que pasaron\n long seconds = (new Date().getTime() - matchDayLong) / 1000;\n // Calcular los minutos del partido\n long minutes = seconds / 60;\n //long minutes = TimeUnit.MILLISECONDS.toMinutes(uptime);\n if(minutes < 0){\n minutes = 0;\n seconds = 0;\n statusMedium.setText(\"PT\");\n }if(minutes > 45 && minutes < 60){\n minutes = 45;\n seconds = 60;\n }else if(minutes > 90){\n minutes = 90;\n seconds = 60;\n statusMedium.setText(\"ST\");\n }else if(minutes >= 60){\n minutes -= 15;\n statusMedium.setText(\"ST\");\n }else{\n statusMedium.setText(\"PT\");\n }\n\n statusTime.setText(String.format(\"%02d:%02d\", minutes, (seconds%60)));\n }\n\n @Override\n public void onFinish() {\n\n }\n }.start();\n }",
"public void calcTimeTrace() \r\n\t{\r\n\t\t\r\n\t\t\r\n\t\tRandom generator = new Random ();\t\r\n \r\n for (int i=1; i<numFrames;i++){\r\n\t\t\tIJ.showProgress(i, numFrames);\r\n\t\t\tfor (int j=0;j<numParticles;j++){\r\n\t\t\t\tdouble changeState=generator.nextDouble();\r\n\t\t\t\tif (timeTrace[i-1][j]==1){\r\n\t\t\t\t\tif (changeState<switchOff) timeTrace[i][j]=0;\r\n\t\t\t\t\telse timeTrace[i][j]=1;\t\t\r\n\t\t\t\t}\r\n\t\t\t\tif (timeTrace[i-1][j]==0){\r\n\t\t\t\t\tif (changeState<switchOn) timeTrace[i][j]=1;\r\n\t\t\t\t\telse timeTrace[i][j]=0;\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n }\t\r\n\t}",
"public static void duration(){\n Instant instant1 = Instant.ofEpochSecond(3);\n Instant instant2 = Instant.ofEpochSecond(3, 0);\n\n// Duration d1 = Duration.between(time1, time2);\n// Duration d2 = Duration.between(dateTime1, dateTime2);\n Duration d3 = Duration.between(instant1, instant2);\n }",
"private Duration getDurationFromTimeView() {\n String text = timeView.getText().toString();\n String[] values = text.split(\":\");\n\n int hours = Integer.parseInt(values[0]);\n int minutes = Integer.parseInt(values[1]);\n int seconds = Integer.parseInt(values[2]);\n\n return Utils.hoursMinutesSecondsToDuration(hours, minutes, seconds);\n }",
"java.lang.String getFlightLegDuration();",
"public long getDuration()\n {\n return duration;\n }",
"long getTasksDeterminingBuildDurationMs();",
"public double getDuration () {\n return duration;\n }",
"public void setDuration(int duration){\n this.duration = duration;\n }",
"public void makeSampleActivityMoments() {\n\t\tdouble sumActivity = 0;\n\t\tfor (int i = 0; i < SubjectsList.size(); i ++) {\n\t\t\tdouble ca = SubjectsList.get(i).getSubjectActivityCount();\n\t\t\tsumActivity += ca;\n\t\t}\n\t\t//System.out.println(sumActivity/sampleSize);\n\t}",
"private void reportTime(final DeviceUI.ReportKind kind, final int duration) {\n\t\tif (compositeUnderDisplay != null\n\t\t\t\t&& !compositeUnderDisplay.isDisposed()) {\n\t\t\tfinal Display display = top.getDisplay();\n\t\t\tif (display != null && !display.isDisposed()) {\n\t\t\t\tdisplay.asyncExec(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * since this method is run asynchronously, check that\n\t\t\t\t\t\t * the composite was not disposed in the meanwhile\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif (!compositeUnderDisplay.isDisposed()) {\n\t\t\t\t\t\t\tfinal DeviceUI ui = (DeviceUI) compositeUnderDisplay;\n\t\t\t\t\t\t\tui.updateTimers(deviceUnderDisplay, kind, duration);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}",
"public void makeSampleActivitySum() {\n\t\tdouble sumActivity = 0;\n\t\tfor (int i = 0; i < SubjectsList.size(); i ++) {\n\t\t\tdouble ca = SubjectsList.get(i).getSubjectActivitySum();\n\t\t\tsumActivity += ca;\n\t\t}\n\t\t//System.out.println(sumActivity/sampleSize);\n\t}",
"public int getDuration( ) {\nreturn numberOfPayments / MONTHS;\n}",
"public void duration() {\n\t\tDuration daily = Duration.of(1, ChronoUnit.DAYS);\n\t\tDuration hourly = Duration.of(1, ChronoUnit.HOURS);\n\t\tDuration everyMinute = Duration.of(1, ChronoUnit.MINUTES);\n\t\tDuration everyTenSeconds = Duration.of(10, ChronoUnit.SECONDS);\n\t\tDuration everyMilli = Duration.of(1, ChronoUnit.MILLIS);\n\t\tDuration everyNano = Duration.of(1, ChronoUnit.NANOS);\n\n\t\tLocalDate date = LocalDate.of(2015, 5, 25);\n\t\tPeriod period = Period.ofDays(1);\n\t\tDuration days = Duration.ofDays(1);\n\t\tSystem.out.println(date.plus(period)); // 2015–05–26\n\t\t// System.out.println(date.plus(days)); // Unsupported unit: Seconds\n\t}",
"int getNumberOfTasksDeterminingBuildDuration();",
"private void aggregateStats() {\n\t\tfor (Map.Entry<Integer, ProcStats> entry : procStats.entrySet()) {\n\t\t\tfor (Map.Entry<Instant, Instant> startEndPair : entry.getValue().csStartAndEndTime)\n\t\t\t\taggStats.add(new HashMap.SimpleEntry(entry.getKey(), startEndPair));\n\t\t\ttotalWaitTime += entry.getValue().waitTime;\n\t\t\tnTotalReceived += entry.getValue().nReceived;\n\t\t\tnTotalSent += entry.getValue().nSent;\n\t\t}\n\t\tCollections.sort(aggStats, new SortByStartTime());\n\t\tint nTotalCS = aggStats.size();\n\t\tSystem.out.println(String.format(\"Total no. of CSs executed : %d\", nTotalCS));\n\t\tfor (Map.Entry<Integer, Map.Entry<Instant, Instant>> entry : aggStats)\n\t\t\tSystem.out.println(entry);\n\t\t\n\t\tfor (int i = 1; i < aggStats.size(); i++)\n\t\t\ttotalSyncDelay += Duration.between(aggStats.get(i - 1).getValue().getValue(), aggStats.get(i).getValue().getKey()).toNanos();\n\t\t\n\t\tSystem.out.println(String.format(\"\\nTotal synchronization delay in nanoseconds : %d\", totalSyncDelay));\n\t\tSystem.out.println(String.format(\"Average synchronization delay in nanoseconds : %f\\n\", (double)totalSyncDelay/(double)(nTotalCS - 1)));\n\t\t\n\t\tSystem.out.println(String.format(\"\\nTotal wait time in milliseconds : %d\", totalWaitTime));\n\t\tSystem.out.println(String.format(\"Average wait time in milliseconds : %f\\n\", (double)totalWaitTime/(double)nTotalCS));\n\t\t\n\t\tSystem.out.println(String.format(\"Total messages received : %d\", nTotalReceived));\n\t\tSystem.out.println(String.format(\"Average messages received : %f\\n\", (double)nTotalReceived/(double)nTotalCS));\n\t\t\n\t\tSystem.out.println(String.format(\"Total messages sent : %d\", nTotalSent));\n\t\tSystem.out.println(String.format(\"Average messages sent : %f\\n\", (double)nTotalSent/(double)nTotalCS));\n\t}",
"@Test\n public void durationTest() {\n // TODO: test duration\n }",
"java.lang.String getTransitFlightDuration();",
"private String buildDuration(CalendarEntry entry)\r\n {\r\n StringBuffer duration = new StringBuffer();\r\n duration.append(\"P\");\r\n \r\n long timeDiff = entry.getEnd().getTime() - entry.getStart().getTime();\r\n \r\n int weeks = (int)Math.floor(timeDiff / DURATION_WEEK);\r\n if (weeks > 0)\r\n {\r\n duration.append(weeks);\r\n duration.append(\"W\");\r\n timeDiff -= weeks * DURATION_WEEK;\r\n }\r\n \r\n int days = (int)Math.floor(timeDiff / DURATION_DAY);\r\n if (days > 0)\r\n {\r\n duration.append(days);\r\n duration.append(\"D\");\r\n timeDiff -= days * DURATION_DAY;\r\n }\r\n \r\n duration.append(\"T\");\r\n \r\n int hours = (int)Math.floor(timeDiff / DURATION_HOUR);\r\n if (hours > 0)\r\n {\r\n duration.append(hours);\r\n duration.append(\"H\");\r\n timeDiff -= hours * DURATION_HOUR;\r\n }\r\n \r\n int minutes = (int)Math.floor(timeDiff / DURATION_MINUTE);\r\n if (minutes > 0)\r\n {\r\n duration.append(minutes);\r\n duration.append(\"M\");\r\n timeDiff -= minutes * DURATION_MINUTE;\r\n }\r\n \r\n int seconds = (int)Math.floor(timeDiff / DURATION_SECOND);\r\n if (seconds > 0)\r\n {\r\n duration.append(seconds);\r\n timeDiff -= minutes * DURATION_MINUTE;\r\n }\r\n \r\n return duration.toString();\r\n }",
"private void createPauseAnalysisCSV(String file_path, CSVReader reader, String user_id, String min_acceleration, String pause_window) throws IOException, ParseException {\n String path_to_csv;\n path_to_csv = initialFileSetup(file_path, user_id);\n CSVReader pause_reader;\n CSVWriter pause_csv_writer;\n String nextReadLine[];\n String nextWriteLine[];\n String total_write_line[] = new String[6];\n boolean previous_was_paused = false;\n int consecutive_count = 0;\n boolean pause_recorded = false;\n\n //variables to record the timing from each row and determine duration of pauses\n SimpleDateFormat date_format = new SimpleDateFormat(\"HH:mm:ss\");\n Date start_time = null;\n Date end_time;\n double duration;\n double diffInSeconds;\n final double milliseconds_between_readings = 33.3333333333;\n\n //components of acceleration\n double x_acceleration = 0;\n double y_acceleration = 0;\n double z_acceleration = 0;\n //the magnitude of acceleration at a given moment\n double magnitude_of_acceleration = 0;\n double minimum_magnitude;\n double minimum_consecutive_pause = 0;\n\n if (min_acceleration != null) {\n minimum_magnitude = Double.parseDouble(min_acceleration);\n } else {\n try(FileWriter fw = new FileWriter(\"Errors.txt\", true);\n BufferedWriter bw = new BufferedWriter(fw);\n PrintWriter out = new PrintWriter(bw))\n{\n out.println(\"No minimum magnitude provided for Pause analysis. Analysis could not be performed.\\n\");\n //more code\n} catch (IOException e) {\n //exception handling left as an exercise for the reader\n}\n\n return;\n }\n\n if (pause_window != null) {\n minimum_consecutive_pause = Double.parseDouble(pause_window);\n } else {\n try(FileWriter fw = new FileWriter(\"Errors.txt\", true);\n BufferedWriter bw = new BufferedWriter(fw);\n PrintWriter out = new PrintWriter(bw))\n{\n out.println(\"No number of paused moments provided for Pause analysis. Analysis could not be performed.\\n\");\n //more code\n} catch (IOException e) {\n //exception handling left as an exercise for the reader\n}\n return;\n }\n\n reader.readNext();\n\n while ((nextReadLine = reader.readNext()) != null) {\n\n x_acceleration = Double.parseDouble(nextReadLine[5]);\n y_acceleration = Double.parseDouble(nextReadLine[6]);\n z_acceleration = Double.parseDouble(nextReadLine[7]);\n\n magnitude_of_acceleration = calculateMagnitude(x_acceleration, y_acceleration, z_acceleration);\n\n // action to take if magnitude does not meet the minimum\n if (magnitude_of_acceleration < minimum_magnitude) {\n\n //Need to track how many consecutive readings showed low acceleration\n if (!previous_was_paused) {\n //record the timing of the first moment of low acceleration\n start_time = date_format.parse(nextReadLine[0]);\n previous_was_paused = true;\n consecutive_count = 1;\n } else {\n consecutive_count++;\n }\n } else if (previous_was_paused && consecutive_count >= minimum_consecutive_pause) {\n end_time = date_format.parse(nextReadLine[0]);\n duration = consecutive_count * milliseconds_between_readings;\n\n writePauseCSV(start_time, end_time, duration, path_to_csv);\n\n previous_was_paused = false;\n consecutive_count = 0;\n pause_recorded = true;\n } else {\n //reset the consecutive pause checks\n previous_was_paused = false;\n consecutive_count = 0;\n\n }\n\n }\n\n if (!pause_recorded) {\n pause_csv_writer = new CSVWriter(new FileWriter(path_to_csv));\n\n total_write_line[0] = \"Number of Pauses:\";\n total_write_line[1] = \"0\";\n total_write_line[2] = \"Total Time Spent Paused:\";\n total_write_line[3] = \"0\";\n total_write_line[4] = \"Average Pause Duration:\";\n total_write_line[5] = \"0\";\n\n pause_csv_writer.writeNext(total_write_line);\n pause_csv_writer.close();\n\n }\n \n MCIAnaylsis.pause_utilized = true;\n\n }",
"public long duration() {\n\t\treturn end - start;\n\t}",
"private void process () {\r\n\r\n ArrayList<String> anomaly;\r\n ArrayList<DataInfo> tmp = new ArrayList<>();\r\n int appState, screenState, screenOrientation, closeToObject, opID;\r\n long permissionCount;\r\n double scanDuration;\r\n String packageName, permission, accessTime;\r\n\r\n // get the data in the given scope (from offset, limit rows)\r\n Cursor cursor = sqliteDBHelper.get_data(\"SELECT \" + SqliteDBStructure.PACKAGE_NAME + \", \"\r\n + SqliteDBStructure.PERMISSION + \", \"\r\n + SqliteDBStructure.DATA_AGGREGATE + \".\" + SqliteDBStructure.ACCESS_TIME + \", \"\r\n + SqliteDBStructure.APP_STATE + \", \"\r\n + SqliteDBStructure.SCREEN_STATE + \", \"\r\n + SqliteDBStructure.SCREEN_ORIENTATION + \", \"\r\n + SqliteDBStructure.CLOSE_TO_OBJECT\r\n + \" FROM \" + SqliteDBStructure.DATA_AGGREGATE\r\n + \" JOIN \" + SqliteDBStructure.INFO_AT_ACCESSTIME + \" ON \"\r\n + SqliteDBStructure.DATA_AGGREGATE + \".\" + SqliteDBStructure.ACCESS_TIME + \" = \" + SqliteDBStructure.INFO_AT_ACCESSTIME + \".\" + SqliteDBStructure.ACCESS_TIME\r\n + \" LIMIT \" + limit + \" OFFSET \" + offset);\r\n\r\n try {\r\n if (cursor != null) {\r\n cursor.moveToFirst();\r\n\r\n while (!cursor.isAfterLast()) {\r\n packageName = cursor.getString(cursor.getColumnIndexOrThrow(SqliteDBStructure.PACKAGE_NAME));\r\n opID = cursor.getInt(cursor.getColumnIndexOrThrow(SqliteDBStructure.PERMISSION));\r\n permission = Permission.opIDToName(opID);\r\n accessTime = cursor.getString(cursor.getColumnIndexOrThrow(SqliteDBStructure.ACCESS_TIME));\r\n appState = cursor.getInt(cursor.getColumnIndexOrThrow(SqliteDBStructure.APP_STATE));\r\n screenState = cursor.getInt(cursor.getColumnIndexOrThrow(SqliteDBStructure.SCREEN_STATE));\r\n screenOrientation = cursor.getInt(cursor.getColumnIndexOrThrow(SqliteDBStructure.SCREEN_ORIENTATION));\r\n closeToObject = cursor.getInt(cursor.getColumnIndexOrThrow(SqliteDBStructure.CLOSE_TO_OBJECT));\r\n\r\n permissionCount = DatabaseUtils.longForQuery(sqliteDBHelper.getReadableDatabase(), \"SELECT COUNT(*) FROM \" + SqliteDBStructure.DATA_AGGREGATE + \" WHERE \" + SqliteDBStructure.PACKAGE_NAME + \" = '\" + packageName + \"' \" + \" AND \" + SqliteDBStructure.PERMISSION + \" = '\" + opID + \"';\", null);\r\n\r\n //Scan duration in Minutes\r\n scanDuration = (((double) stop_scan_time.getTime() + (double) start_scan_time.getTime()) / 1000 )/ 60;\r\n //check for anomaly by ruleset class\r\n anomaly = RuleSet.checkForAnomaly(packageName, permission, permissionCount, appState, screenState, screenOrientation, closeToObject, scanDuration, context);\r\n\r\n //Send data to server or save it locally, if no valid internet connection is available\r\n if (networking) {\r\n sendRawData(packageName, permission, accessTime, appState, screenState, screenOrientation, closeToObject);\r\n if (anomaly.get(0).equals(\"1\"))\r\n MyClient.POST_Anomaly(packageName, permission, anomaly.get(1), \"0\");\r\n } else {\r\n saveRawData(packageName, permission, accessTime, appState, screenState, screenOrientation, closeToObject);\r\n if (anomaly.get(0).equals(\"1\"))\r\n saveAnomaliesImage(packageName, permission, anomaly.get(1), 0);\r\n }\r\n\r\n // create a info object which holds all the necessary information about that data block and store it temporarily in a list\r\n DataInfo info = new DataInfo(packageName, Permission.opIDToDescription(opID), accessTime, permissionCount, anomaly.get(0), anomaly.get(1), scanTime, 0);\r\n tmp.add(info);\r\n\r\n // should the size of the temporary list exceeds MaxBatchSize, write list to the local DB and clear the temp list afterwards \r\n // technically this cannot happen but we are working with threads here so better be safe than sorry\r\n // temp list should not be to big, because we have have to hold task amount of temp list, with each containing around MaxBatchSize entries, in memory at the same time\r\n if (tmp.size() > MaxBatchSize) {\r\n bulkInsertIntoDataAnalyzing(tmp);\r\n tmp.clear();\r\n }\r\n\r\n cursor.moveToNext();\r\n }\r\n\r\n }\r\n } finally {\r\n if (cursor != null) {\r\n cursor.close();\r\n }\r\n }\r\n\r\n // write the data stored in the temp list to the local DB \r\n if (tmp.size() > 0) {\r\n bulkInsertIntoDataAnalyzing(tmp);\r\n tmp.clear();\r\n }\r\n // inform the progress dialog that a task has been finished\r\n updateProgressDialog();\r\n // decrease the amount of ongoing tasks by 1\r\n decreaseTasks();\r\n }",
"java.lang.String getDuration();",
"private void totalWaitingTime(){\n int totalWaitingTime =0;\r\n for (Ride ride : rides) {\r\n totalWaitingTime += ride.getWaitingTime();\r\n }\r\n System.out.println(\"\\nTotal waiting time of the entire park is \" + totalWaitingTime / 60 + \" hours\");\r\n }",
"private void incrementDuration(TestResult result) {\n long currentTime = System.currentTimeMillis();\n result.setDuration((float) (currentTime - lastTime) / (float) 1000);\n lastTime = currentTime;\n totalDuration += result.getDuration();\n totalTunitDurations += result.getDuration();\n }",
"public void calculateFlightDuration() {\r\n\t\tthis.flightDuration = getArrivalTime() - getDepartureTime();\r\n\t\tdetailsRoute[2] = Integer.toString(this.flightDuration);\r\n\t}",
"public List<Integer> getBlockPlacedDurations() {\n Result<Record1<LocalDateTime>> result = jooq.select(GAME_LOGS.TIMESTAMP)\n .from(GAME_LOGS)\n .where(GAME_LOGS.GAMEID.equal(gameId))\n .and(GAME_LOGS.MESSAGE_TYPE.equal(\"BlockPlacedMessage\"))\n .orderBy(GAME_LOGS.ID.asc())\n .fetch();\n\n List<Integer> durations = new ArrayList<>();\n if (result.isNotEmpty()) {\n // add duration until first block placed\n durations.add((int) getStartTime().until(result.getValue(0, GAME_LOGS.TIMESTAMP), MILLIS));\n for (int i = 1; i < result.size(); i++) {\n durations.add((int) result.getValue(i - 1, GAME_LOGS.TIMESTAMP)\n .until(result.getValue(i, GAME_LOGS.TIMESTAMP), MILLIS));\n }\n }\n return durations;\n }",
"public int getDuration() {\n return duration;\n }",
"public int getDuration() {\n return duration;\n }",
"public int getDuration() {\n return duration;\n }",
"void setDuration(int duration);",
"private int normalizeTime() {\n int currentTimeSeconds = (int) (System.currentTimeMillis() / 1000);\n\n // The graphing interval in minutes\n // TODO not hardcoded :3\n int interval = 30;\n\n // calculate the devisor denominator\n int denom = interval * 60;\n\n return (int) Math.round((currentTimeSeconds - (denom / 2d)) / denom) * denom;\n }",
"@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tout.append(\" time is taken from start connection to receive replay from server is\"+\",\"+String.valueOf(diff)+\"ms\"+\",\"+Scenario);\n\t\t\t\t\t\t\t\t out.newLine();\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t}",
"public int getDuration() {\n\t\treturn (int) ((endTime.getTime()-startTime.getTime())/1000) + 1;\n\t}",
"public void setDuration(int duration) {\n this.duration = duration;\n }",
"public void setDuration(int duration) {\n this.duration = duration;\n }",
"public void setDuration( Long duration );",
"Duration subsystemFreezeDuration();",
"public String durationInMinutesAndSeconds( ){\n\t\t\n\t\tString time = \"\";\n\t\t\n\t\tint duration = totalTime();\n\n\t\tint minutes = 0;\n\n\t\tint seconds = 0;\n\n\t\tminutes = (int) (duration/60);\n\n\t\tseconds = (int) (duration- (minutes*60));\n\n\t\ttime = minutes + \":\" + seconds +\"\";\n\t\treturn time;\n\t\t\n\t}",
"@SneakyThrows public void modifyTempflyDuration(TempflyTask type, long duration) {\n switch (type) {\n case ADD:\n tempflyTimer.addTimeLeft(duration);\n break;\n case REMOVE:\n tempflyTimer.addElapsedTime(duration);\n break;\n case SET:\n tempflyTimer.setTotalTime(duration);\n break;\n case DISABLE:\n tempflyTimer.reset();\n break;\n default:\n break;\n }\n\n // Start if always running/currently flying\n if (type != TempflyTask.REMOVE\n && (Timer.alwaysDecrease\n || getPlayer().isFlying())) {\n tempflyTimer.start();\n }\n\n // Prevent NPE for data migration\n if (data != null) {\n data.set(\"tempfly\", tempflyTimer.getTimeLeft());\n data.save(dataFile);\n }\n }",
"public void setDuration(long duration) {\n this.duration = duration;\n }",
"public void setDuration(long duration) {\n this.duration = duration;\n }",
"public void timePasses() {\r\n\t\tfor(Meter a: appMeters){\r\n\t\t\t//incremnts electric use each timepPasses as the fridge is always on\r\n\t\t\tif (a.getType().equals(\"Electric\")){\r\n\t\t\t\ta.incrementConsumed();\r\n\t\t}\r\n\t}\r\n\t}",
"static String timeCount_1(List<String> Arr){\n int timeHH = 0;\n int timeMI = 0;\n int timeSS = 0;\n \n String r_hh = \"\";\n String r_mi = \"\";\n String r_ss = \"\";\n\n for(int i = 0; i < Arr.size(); i++ ){\n \n if (Pattern.matches(\"\\\\d{2}:\\\\d{2}:\\\\d{2}\", Arr.get(i))){\n \n String[] s = Arr.get(i).split(\":\");\n int hh = Integer.parseInt(s[0]);\n int mi = Integer.parseInt(s[1]);\n int ss = Integer.parseInt(s[2]);\n \n timeHH += hh;\n timeMI += mi;\n timeSS += ss;\n \n }\n else{\n continue;\n }\n }\n \n timeMI += timeSS / 60;\n timeSS %= 60;\n \n timeHH += timeMI / 60;\n timeMI %= 60; \n\n \n if (timeHH < 10){\n r_hh = \"0\" + timeHH;\n }\n else{\n r_hh = Integer.toString(timeHH);\n }\n \n if (timeMI < 10){\n r_mi = \"0\" + timeMI;\n }\n else{\n r_mi = Integer.toString(timeMI);\n }\n \n if (timeSS < 10){\n r_ss = \"0\" + timeSS;\n }\n else{\n r_ss = Integer.toString(timeSS);\n }\n \n \n \n String result = r_hh + \":\" + r_mi + \":\" + r_ss;\n //String result = timeHH + \":\" + timeMI + \":\" + timeSS;\n \n return result;\n }",
"private void updateCompletionTime()\n\t{\n\t\tfor (Map.Entry<Tab, Set<FarmingPatch>> tab : farmingWorld.getTabs().entrySet())\n\t\t{\n\t\t\tlong extremumCompletionTime = config.preferSoonest() ? Long.MAX_VALUE : 0;\n\t\t\tboolean allUnknown = true;\n\t\t\tboolean allEmpty = true;\n\n\t\t\tfor (FarmingPatch patch : tab.getValue())\n\t\t\t{\n\t\t\t\tPatchPrediction prediction = predictPatch(patch);\n\t\t\t\tif (prediction == null || prediction.getProduce().getItemID() < 0)\n\t\t\t\t{\n\t\t\t\t\tcontinue; // unknown state\n\t\t\t\t}\n\n\t\t\t\tallUnknown = false;\n\n\t\t\t\tif (prediction.getProduce() != Produce.WEEDS && prediction.getProduce() != Produce.SCARECROW)\n\t\t\t\t{\n\t\t\t\t\tallEmpty = false;\n\n\t\t\t\t\t// update max duration if this patch takes longer to grow\n\t\t\t\t\tif (config.preferSoonest())\n\t\t\t\t\t{\n\t\t\t\t\t\textremumCompletionTime = Math.min(extremumCompletionTime, prediction.getDoneEstimate());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\textremumCompletionTime = Math.max(extremumCompletionTime, prediction.getDoneEstimate());\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfinal SummaryState state;\n\t\t\tfinal long completionTime;\n\n\t\t\tif (allUnknown)\n\t\t\t{\n\t\t\t\tstate = SummaryState.UNKNOWN;\n\t\t\t\tcompletionTime = -1L;\n\t\t\t}\n\t\t\telse if (allEmpty)\n\t\t\t{\n\t\t\t\tstate = SummaryState.EMPTY;\n\t\t\t\tcompletionTime = -1L;\n\t\t\t}\n\t\t\telse if (extremumCompletionTime <= Instant.now().getEpochSecond())\n\t\t\t{\n\t\t\t\tstate = SummaryState.COMPLETED;\n\t\t\t\tcompletionTime = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tstate = SummaryState.IN_PROGRESS;\n\t\t\t\tcompletionTime = extremumCompletionTime;\n\t\t\t}\n\t\t\tsummaries.put(tab.getKey(), state);\n\t\t\tcompletionTimes.put(tab.getKey(), completionTime);\n\t\t}\n\t}",
"public Timeline createLineAnimation(AnchorPane anchor_pane_map, int duration, int stop_duration, ArrayList<Coordinate> affected_points, int slow_duration, int slow_stop_duration, EventHandler<MouseEvent> handler, boolean detour_delay)\r\n {\r\n // coordinates of path for vehicle on transportline\r\n ArrayList<Coordinate> line_coordinates = this.transportLinePath();\r\n // ids of coordinates of path for vehicle on transportline\r\n ArrayList<String> line_coordinates_ids = this.transportLinePathIDs();\r\n // all stops for transportline\r\n List<Stop> line_stops = this.getStopsMap();\r\n // create vehicle for line (circle)\r\n Circle vehicle = new Circle(this.getStopsMap().get(0).getCoordinate().getX(), this.getStopsMap().get(0).getCoordinate().getY(), 10);\r\n vehicle.setStroke(Color.AZURE);\r\n vehicle.setFill(this.getTransportLineColor());\r\n vehicle.setStrokeWidth(5);\r\n addLineVehicles(vehicle);\r\n vehicle.setOnMouseClicked(handler);\r\n\r\n Timeline timeline = new Timeline();\r\n int original_duration = duration;\r\n int original_stop_duration = stop_duration;\r\n\r\n // add all keyframes to timeline - one keyframe means path from one coordinate to another coordinate\r\n // vehicle waits in stop for 1 seconds and go to another coordinate for 2 seconds (in default mode)\r\n int delta_time = 0;\r\n KeyFrame waiting_in_stop = null;\r\n for (int i = 0; i < line_coordinates.size() - 1; i++) {\r\n // if we go through street affected by slow traffic\r\n if (line_coordinates.get(i).isInArray(affected_points) && line_coordinates.get(i+1).isInArray(affected_points))\r\n {\r\n // duration between coordinates and duration of waiting in stop is different\r\n duration = slow_duration;\r\n stop_duration = slow_stop_duration;\r\n }\r\n else\r\n {\r\n // else use default duration\r\n duration = original_duration;\r\n stop_duration = original_stop_duration;\r\n }\r\n\r\n for (Stop s : line_stops) {\r\n // if we are in stop, we wait 'stop_duration' time\r\n if (line_coordinates.get(i).getX() == s.getCoordinate().getX() && line_coordinates.get(i).getY() == s.getCoordinate().getY()) {\r\n waiting_in_stop = new KeyFrame(Duration.seconds(delta_time + stop_duration), // this means waiting in stop for some time\r\n new KeyValue(vehicle.centerXProperty(), line_coordinates.get(i).getX()),\r\n new KeyValue(vehicle.centerYProperty(), line_coordinates.get(i).getY()));\r\n\r\n delta_time = delta_time + stop_duration;\r\n break;\r\n }\r\n }\r\n // we travelled for 'duration' time\r\n KeyFrame end = new KeyFrame(Duration.seconds(delta_time + duration), // this means that the path from one coordinate to another lasts 2 seconds\r\n new KeyValue(vehicle.centerXProperty(), line_coordinates.get(i + 1).getX()),\r\n new KeyValue(vehicle.centerYProperty(), line_coordinates.get(i + 1).getY()));\r\n\r\n if (waiting_in_stop != null) {\r\n timeline.getKeyFrames().addAll(end, waiting_in_stop);\r\n } else {\r\n timeline.getKeyFrames().addAll(end);\r\n }\r\n\r\n delta_time = delta_time + duration;\r\n }\r\n\r\n timeline.setCycleCount(Timeline.INDEFINITE); // infinity number of repetitions\r\n anchor_pane_map.getChildren().add(vehicle);\r\n\r\n if (detour_delay == false)\r\n {\r\n this.setDelay(duration, slow_duration, affected_points.size());\r\n }\r\n else\r\n {\r\n this.delay = this.detour_streets.size() * duration - duration;\r\n }\r\n\r\n return timeline;\r\n }",
"public long getDuration() {\n return duration;\n }",
"org.apache.xmlbeans.GDuration getDuration();",
"public Long getDuration()\r\n {\r\n return duration;\r\n }",
"int getRecurrenceDuration();",
"public void setDuration(long duration) {\n this.duration = duration;\n }",
"public ActivityDurationCalculator getActivityDurationCalculator() {\n return activityDurationCalculator;\n }",
"public Breakdown generateDiurnalReport(Date startDate, String[] demoArr) {\n\n Breakdown result = new Breakdown();\n AppUsageDAO auDAO = new AppUsageDAO();\n Date startHour = startDate;\n SimpleDateFormat sdf = new SimpleDateFormat(\"HH:00\");\n //for each hour (for 24 loop)\n for (int i = 0; i < 24; i++) {\n\n HashMap<String, Breakdown> miniMap = new HashMap<String, Breakdown>();\n result.addInList(miniMap);\n\n Date endHour = new Date(startHour.getTime() + 1000 * 60 * 60);\n miniMap.put(\"period\", new Breakdown(sdf.format(startHour) + \"-\" + sdf.format(endHour)));\n\n //get number of targetted users\n Date endDate = new Date(startDate.getTime() + 1000 * 60 * 60 * 24);\n ArrayList<User> targetList = auDAO.retrieveUserByDemo(startDate, endDate, demoArr);\n int targetCount = targetList.size();\n //get userList for this hour, filtered by demo\n ArrayList<User> userList = auDAO.retrieveUserByDemo(startHour, endHour, demoArr);\n double secondsThisHour = 0;\n\n //for each user\n for (User user : userList) {\n\n //retrieve appUsageList\n ArrayList<AppUsage> auList = auDAO.retrieveByUserHourly(user.getMacAddress(), startHour, endHour);\n\n Date oldTime = null;\n if (auList.size() > 0) {\n oldTime = auList.get(0).getDate();\n }\n\n //For each appusage in appUsageList\n for (int j = 1; j < auList.size(); j++) {\n Date newTime = auList.get(j).getDate();\n\n //calculate usageTime and add to secondsThisHour\n //difference between app usage timing\n long difference = Utility.secondsBetweenDates(oldTime, newTime);\n\n //If difference less than/equal 2 minutes\n if (difference <= 2 * 60) {\n // add difference to totalSeconds if <= 2 mins\n secondsThisHour += difference;\n } else {\n // add 10sec to totalSeconds if > 2 mins\n secondsThisHour += 10;\n }\n\n oldTime = newTime;\n\n }\n //Add 10 seconds for the last appusage in the list\n if (auList.size() > 0) {\n Date lastTime = auList.get(auList.size() - 1).getDate();\n\n long difference = Utility.secondsBetweenDates(lastTime, endHour);\n\n if (difference > 10) {\n difference = 10;\n }\n secondsThisHour += difference;\n\n }\n\n }\n //divide by all users in this hour to get average usage time in this hour\n if (targetCount > 0) {\n secondsThisHour /= targetCount;\n\n }\n\n //store in breakdown\n long time = Math.round(secondsThisHour);\n miniMap.put(\"duration\", new Breakdown(\"\" + time));\n\n startHour = endHour;\n }\n\n return result;\n }",
"public void timePasses(){\n crtClock++;\n if(crtClock==25)crtClock=1; // If end of day, reset to 1\n if(crtClock<=opHours)tellMeterToConsumeUnits(unitsPerHr);\n }",
"public void setDuration(Long duration)\r\n {\r\n this.duration = duration;\r\n }"
]
| [
"0.7231841",
"0.63373804",
"0.57368636",
"0.5731403",
"0.5599162",
"0.53844535",
"0.53746027",
"0.53736496",
"0.53533095",
"0.5350386",
"0.53036624",
"0.52958184",
"0.52748317",
"0.52680963",
"0.5264069",
"0.52470857",
"0.5218736",
"0.5209151",
"0.5204236",
"0.51919144",
"0.5190521",
"0.51886934",
"0.5168743",
"0.51662743",
"0.5166093",
"0.51648104",
"0.51648104",
"0.51546323",
"0.5145836",
"0.51405233",
"0.51247853",
"0.51165247",
"0.509746",
"0.508836",
"0.5075606",
"0.5046485",
"0.5045149",
"0.502728",
"0.5021182",
"0.5018206",
"0.5011504",
"0.4982781",
"0.49688607",
"0.49617827",
"0.49592474",
"0.49573743",
"0.4954083",
"0.49465516",
"0.4940967",
"0.4931326",
"0.49308804",
"0.4929036",
"0.49289495",
"0.49163795",
"0.4894178",
"0.48802885",
"0.4873944",
"0.48563004",
"0.4854031",
"0.4849853",
"0.4849304",
"0.48459724",
"0.48356348",
"0.48347136",
"0.4831464",
"0.4823318",
"0.48201105",
"0.48175284",
"0.48036924",
"0.47997442",
"0.47983733",
"0.4789829",
"0.4785741",
"0.47808582",
"0.47808582",
"0.47808582",
"0.4777612",
"0.4777245",
"0.47685817",
"0.4761188",
"0.47589123",
"0.47589123",
"0.4758872",
"0.47583425",
"0.47565663",
"0.4748689",
"0.47402272",
"0.47402272",
"0.47391766",
"0.47353846",
"0.4730237",
"0.47267935",
"0.4721662",
"0.4720513",
"0.47178084",
"0.47151458",
"0.47127518",
"0.47126827",
"0.47107014",
"0.47105464",
"0.4708311"
]
| 0.0 | -1 |
Creates new form SearchPanel | public SearchPanel(PonyUi ponyUi) {
initComponents();
ListManager.AbstractToDefaultListModelConverter(sp_RelatedQueriesList);
this.ponyUi = ponyUi;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private DynamicForm createSearchBox() {\r\n\t\tfinal DynamicForm filterForm = new DynamicForm();\r\n\t\tfilterForm.setNumCols(4);\r\n\t\tfilterForm.setAlign(Alignment.LEFT);\r\n\t\tfilterForm.setAutoFocus(false);\r\n\t\tfilterForm.setWidth(\"59%\"); //make it line up with sort box\r\n\t\t\r\n\t\tfilterForm.setDataSource(SmartGWTRPCDataSource.getInstance());\r\n\t\tfilterForm.setOperator(OperatorId.OR);\r\n\t\t\r\n\t\t//Visible search box\r\n\t\tTextItem nameItem = new TextItem(\"name\", \"Search\");\r\n\t\tnameItem.setAlign(Alignment.LEFT);\r\n\t\tnameItem.setOperator(OperatorId.ICONTAINS); // case insensitive\r\n\t\t\r\n\t\t//The rest are hidden and populated with the contents of nameItem\r\n\t\tfinal HiddenItem companyItem = new HiddenItem(\"company\");\r\n\t\tcompanyItem.setOperator(OperatorId.ICONTAINS);\r\n\t\tfinal HiddenItem ownerItem = new HiddenItem(\"ownerNickName\");\r\n\t\townerItem.setOperator(OperatorId.ICONTAINS);\r\n\r\n\t\tfilterForm.setFields(nameItem,companyItem,ownerItem);\r\n\t\t\r\n\t\tfilterForm.addItemChangedHandler(new ItemChangedHandler() {\r\n\t\t\tpublic void onItemChanged(ItemChangedEvent event) {\r\n\t\t\t\tString searchTerm = filterForm.getValueAsString(\"name\");\r\n\t\t\t\tcompanyItem.setValue(searchTerm);\r\n\t\t\t\townerItem.setValue(searchTerm);\r\n\t\t\t\tif (searchTerm==null) {\r\n\t\t\t\t\titemsTileGrid.fetchData();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tCriteria criteria = filterForm.getValuesAsCriteria();\r\n\t\t\t\t\titemsTileGrid.fetchData(criteria);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn filterForm;\r\n\t}",
"public SearchResultPanel()\n\t{\n\t\tcreateComponents();\n\t\tdesignComponents();\n\t\taddComponents();\n\t}",
"public DisputeSearchPanel() {\n initComponents();\n }",
"private SearchBar() {\n controller = FilterController.getInstance();\n initComponents();\n createNewQueryPanel();\n }",
"public void createSearchForPatientPanel() {\n\n\t\tsearchPatientPanel = new JPanel();\n\t\tsearchPatientPanel.setSize(700, 430);\n\t\tsearchPatientPanel.setLocation(0, 70);\n\t\tsearchPatientPanel.setLayout(null);\n\n\t\tJPanel topSearchPanel = new JPanel(new FlowLayout());\n\t\ttopSearchPanel.setSize(500, 30);\n\t\ttopSearchPanel.setLocation(100, 0);\n\t\ttopSearchPanel.add(new JLabel(\"Enter Patiets Name/ID:\"));\n\t\tsearchPatientTF = new JTextField(20);\n\t\ttopSearchPanel.add(searchPatientTF);\n\t\tsearchButton = new JButton(\"Find Patient\");\n\n\t\tsearchButton.addActionListener(this);\n\n\t\ttopSearchPanel.add(searchButton);\n\t\tsearchPatientPanel.add(topSearchPanel);\n\n\t\t// searched patients details labels\n\t\tJPanel searchedPatientDetailsPanel = new JPanel(new GridLayout(4, 2));\n\t\tsearchedPatientDetailsPanel.setLocation(40, 60);\n\t\tsearchedPatientDetailsPanel.setSize(250, 200);\n\t\tsearchedPatientDetailsPanel.setBackground(Color.WHITE);\n\n\t\tl1 = new JLabel(\"Name:\");\n\t\tsearchLabel1 = new JLabel(\"\");\n\t\tl2 = new JLabel(\"Address:\");\n\t\tsearchLabel2 = new JLabel(\"\");\n\t\tl3 = new JLabel(\"Phone Number:\");\n\t\tsearchLabel3 = new JLabel(\"\");\n\t\tl4 = new JLabel(\"DOB:\");\n\t\tsearchLabel4 = new JLabel(\"\");\n\n\t\tsearchedPatientDetailsPanel.add(l1);\n\t\tsearchedPatientDetailsPanel.add(searchLabel1);\n\t\tsearchedPatientDetailsPanel.add(l2);\n\t\tsearchedPatientDetailsPanel.add(searchLabel2);\n\t\tsearchedPatientDetailsPanel.add(l3);\n\t\tsearchedPatientDetailsPanel.add(searchLabel3);\n\t\tsearchedPatientDetailsPanel.add(l4);\n\t\tsearchedPatientDetailsPanel.add(searchLabel4);\n\n\t\tsearchPatientPanel.add(searchedPatientDetailsPanel);\n\n\t\t// update button\n\t\tJPanel updateButtonPanel = new JPanel();\n\t\tupdateButtonPanel.setSize(200, 40);\n\t\tupdateButtonPanel.setLocation(40, 300);\n\n\t\tupdatePatientPanel = new JPanel();\n\t\tupdatePatientButton = new JButton(\"Upadate Current Patient\");\n\t\tupdatePatientButton.setVisible(false);\n\n\t\tupdatePatientButton.addActionListener(this);\n\t\tupdateButtonPanel.add(updatePatientButton);\n\t\tsearchPatientPanel.add(updateButtonPanel);\n\n\t\tJPanel updateAddNewHistoryButtonPanel = new JPanel();\n\t\tupdateAddNewHistoryButtonPanel.setSize(200, 40);\n\t\tupdateAddNewHistoryButtonPanel.setLocation(40, 350);\n\n\t\taddNewHistoryButton = new JButton(\"Add New History\");\n\t\taddNewHistoryButton.addActionListener(this);\n\t\taddNewHistoryButton.setVisible(false);\n\n\t\tupdateAddNewHistoryButtonPanel.add(addNewHistoryButton);\n\t\tsearchPatientPanel.add(updateAddNewHistoryButtonPanel);\n\n\t\t// searched patients history text area\n\t\tJPanel patientsHistoryPanel = new JPanel();\n\t\tpatientsHistoryPanel.setSize(350, 300);\n\t\tpatientsHistoryPanel.setLocation(330, 50);\n\n\t\tpatientsHistoryReport = new JTextArea(17, 30);\n\t\tJScrollPane sp2 = new JScrollPane(patientsHistoryReport);\n\t\tpatientsHistoryPanel.add(sp2);\n\t\tpatientsHistoryReport.setEditable(false);\n\t\tpatientsHistoryReport.setLineWrap(true);\n\t\tpatientsHistoryReport.setWrapStyleWord(true);\n\t\tpatientsHistoryReport.setWrapStyleWord(true);\n\n\t\tsearchPatientPanel.add(patientsHistoryPanel);\n\n\t\ttotalGUIPanel.add(searchPatientPanel);\n\t}",
"private void addSearchFieldAndButton() {\n\t\tsearchButton = new EAdSimpleButton(EAdSimpleButton.SimpleButton.SEARCH);\n\t\tsearchButton.setEnabled(false);\n searchField = new JTextField(20);\n searchField.setEnabled(false);\n\t\tsearchField.setToolTipText(\"Search...\");\n\t\ttoolPanel.add(searchField);\n\t\ttoolPanel.add(searchButton);\n\n ActionListener queryListener = new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tString query = searchField.getText();\n controller.getViewController().addView(\"query\", \"q\"+query, false);\n\t\t\t}\n\t\t};\n\n searchField.addActionListener(queryListener);\n\t\tsearchButton.addActionListener(queryListener);\n }",
"public SearchByName() {\n initComponents();\n }",
"public insearch() {\n initComponents();\n }",
"public SearchPanel(\r\n\t\t\tSearchHandler handlerRef, \r\n\t\t\tRecordListView li, \r\n\t\t\tCategoryHandler<IncomeRecord> inCatHandRef, \r\n\t\t\tCategoryHandler<ExpenseRecord> exCatHandRef) {\r\n\t\tsuper(new BorderLayout());\r\n\t\tthis.handler = handlerRef;\r\n\t\t\r\n\t\tpanCtrls = new JPanel();\r\n\t\tpanCtrls.setLayout(new BorderLayout());\r\n\t\t\r\n\t\tpanForm = new SearchFormPanel(this, this, inCatHandRef, exCatHandRef);\r\n\t\tpanCtrls.add(panForm, BorderLayout.CENTER);\r\n\t\tpanCtrls.setPreferredSize(new Dimension(DEFAULT_WIDTH, SIMPLE_HEIGHT)); // SIMPLE SEARCH EXPERIMENTATION\r\n\t\t\r\n\t\tpanBtns = new JPanel();\r\n\t\t\r\n\t\tpanForm.addListenerToTextFields(new ActionListener(){\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tperformSearch();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tbtnAdvance = new JButton(\"More Options\");\r\n\t\tbtnAdvance.addActionListener(new ActionListener(){\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tswitchMode();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\tpanBtns.setLayout(new BoxLayout(panBtns, BoxLayout.X_AXIS));\r\n\t\t\r\n\t\tJButton btnSearch = new JButton(\"Find\");\r\n\t\tpanBtns.add(btnSearch);\r\n\t\tpanBtns.add(Box.createVerticalGlue());\r\n\t\t\r\n\t\tpanBtns.add(btnAdvance);\r\n\t\t\r\n\t\tbtnSearch.addActionListener(new ActionListener(){\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tperformSearch();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\t\r\n\t\tpanCtrls.add(panBtns, BorderLayout.EAST);\r\n\t\t\r\n\t\tthis.add(panCtrls, BorderLayout.NORTH);\r\n\t\t\r\n\r\n\t\tlist = li;\r\n\t\tthis.panResult = new JScrollPane(list);\r\n\t\tthis.add(this.panResult, BorderLayout.CENTER);\r\n\r\n\t\t// InfoPanel\r\n\t\tpanInfo = new InfoPanel();\r\n\t\tthis.add(panInfo, BorderLayout.SOUTH);\r\n\t}",
"public SearchResultPanel(String name)\n\t{\n\t\tthis.setName(name);\n\t\tcreateComponents();\n\t\tdesignComponents();\n\t\taddComponents();\n\t}",
"public GUISearch() {\n initComponents();\n }",
"public FlightSearchPanel() {\n initComponents();\n \n setLayout(new BorderLayout());\n \n textPane = new JTextPane();\n textPane.setFont(new Font(\"Tahoma\", Font.ITALIC, 18));\n textPane.setText(\"No search results to display\");\n textPane.setFocusable(false);\n textPane.setEditable(false);\n textPane.setOpaque(false);\n \n \n add(textPane);\n \n searchResultsPanel = new SearchResultsPanel();\n //add(searchResultsPanel);\n \n expandedFlightPanel = new ExpandedFlightPanel();\n //this.add(searchResultsPanel);\n \n }",
"private void addSearchInventory() { \t\r\n \tsearchButton = new JButton (\"Search\");\r\n \tsearchText = new JTextField (5);\r\n \t\r\n \tidRadio = new JRadioButton (\"id\");\r\n \tnameRadio = new JRadioButton (\"name\");\r\n \tButtonGroup group = new ButtonGroup();\r\n group.add(idRadio);\r\n group.add(nameRadio);\r\n \r\n listModel = new DefaultListModel<String>();\r\n inventoryField = new JList<String> (listModel);\r\n inventoryField.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r\n \r\n scrollPane = new JScrollPane(inventoryField);\r\n scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\r\n \r\n \r\n \tadd (searchButton);\r\n \tadd (searchText);\r\n add (idRadio);\r\n add (nameRadio);\r\n add (scrollPane);\r\n \r\n \tsearchButton.setBounds (275, 200, 100, 25);\r\n\t\tsearchText.setBounds (95, 200, 160, 25);\r\n\t idRadio.setBounds (100, 160, 50, 25);\r\n\t nameRadio.setBounds (150, 160, 100, 25);\r\n\t scrollPane.setBounds (90, 245, 415, 415);\r\n }",
"public JPanel getSearchJPanel(){\n\t\treturn searchResults;//Return the search results\n\t}",
"public JPanel getSearchResultPanel(){return searchResultPanel;}",
"public SearchPanel() {\n\t\t\t fs = new Font [3];\n\t\t\t fs[0] = new Font(\"Lato\", Font.BOLD, 36);\n\t\t\t fs[1] = new Font(\"Open Sans\", 0 , 20);\n\t\t\t fs[2] = new Font(\"Open Sans\", 0 , 12);\n\t\t\t enterSB = new JButton(\"Search\");\n\t\t\t backB = new JButton(\"Return\");\n\t\t\t menuL = new JLabel (\"Search Feature\");\n\t\t\t tF = new JTextField ();\n\t\t\t tA = new JTextArea ();\n\t\t\t enterSB.setFont(fs[1]);\n\t\t\t backB.setFont(fs[2]);\n\t\t\t menuL.setFont(fs[0]);\n\t\t\t tF.setPreferredSize(new Dimension( 200, 24 ));\n\t\t\t //tA.setPreferredSize(new Dimension( 200, 24 ));\n\t\t\t tA.setEditable(false);\n\t\t\t tA.setLineWrap(true);\n\t\t\t \n\t\t\t // loads UI elements in view\n\t\t\t add(menuL, BorderLayout.PAGE_START);\n\t\t\t add(tF, BorderLayout.LINE_START);\n\t\t\t add(enterSB, BorderLayout.CENTER);\t \n\t\t\t add(tA, BorderLayout.LINE_END);\n\t\t\t add(backB, BorderLayout.PAGE_END);\n\t\t\t enterSB.addActionListener( new ActionListener()\n\t\t\t {\n\t\t\t @Override\n\t\t\t public void actionPerformed(ActionEvent e) // if search is clicked\n\t\t\t {\n\t\t\t \t tA.setText(\"Loading...\");\n\t\t\t \t City city = Search.search(Main.cities, tF.getText()); // search the city by name\n\t\t\t \t \n\t\t\t \t if (city == null){\n\t\t\t \t\t tA.setText(\"Couldn't find city!\");\n\t\t\t \t }\n\t\t\t \t else{\n\t\t\t \t\t tA.setText(mainGui.toString(city.getCond()));\n\t\t\t \t }\n\t\t\t }\n\t\t\t });\n\t\t\t backB.addActionListener( new ActionListener() // if back is clicked\n\t\t\t {\n\t\t\t @Override\n\t\t\t public void actionPerformed(ActionEvent e)\n\t\t\t {\n\t\t\t mainGui.paneSwitch(0); // go back to main menu\n\t\t\t }\n\t\t\t });\n\t\t }",
"private void initSearchComponents()\n {\n searchPaneWrapper = new JPanel(new CardLayout());\n logoLabel = new JLabel(new ImageIcon(searchBackgroundImage));\n searchBar = new JTextField();\n webSearchButton = new JButton(\"Search web\");\n imageSearchButton = new JButton(\"Search images\");\n \n logoLabel.setBorder(BorderFactory.createEmptyBorder(70, 0, 0, 0));\n PromptSupport.setPrompt(\" Search...\", searchBar);\n searchBar.setPreferredSize(new Dimension(400, 35));\n searchBar.setBorder(BorderFactory.createMatteBorder(1, 1, 1, 1, Color.LIGHT_GRAY));\n \n webSearchButton.addActionListener(this);\n imageSearchButton.addActionListener(this);\n \n searchPane.add(logoLabel);\n searchPane.add(Box.createRigidArea(new Dimension(searchPane.getPreferredSize().width, 20)));\n searchPane.add(searchBar);\n searchPane.add(Box.createRigidArea(new Dimension(searchPane.getPreferredSize().width, 10)));\n searchPane.add(webSearchButton);\n searchPane.add(imageSearchButton);\n searchPane.setBackground(Color.WHITE);\n searchPaneWrapper.add(searchPane, SEARCH_PANE_VIEW);\n \n viewPane.add(crawlPane);\n viewPane.add(searchPaneWrapper);\n \n viewPaneWrapper.add(viewPane, VIEW_PANE);\n viewPaneWrapper.add(transitionPane, TRANS_PANE_VIEW);\n \n JLabel crawlerTab = new JLabel(\"Crawler\", JLabel.CENTER);\n JLabel searchTab = new JLabel(\"Search\", JLabel.CENTER);\n crawlerTab.setIcon(new ImageIcon(spiderImage));\n searchTab.setIcon(new ImageIcon(searchIconDark));\n viewPane.setTabComponentAt(0, crawlerTab);\n viewPane.setTabComponentAt(1, searchTab); \n }",
"private void createSearchPanel(Composite comp) {\n\t\tComposite searchPanel = new Composite(comp, SWT.NONE);\n\t\tGridLayout layout = new GridLayout(6, false);\n\t\tlayout.verticalSpacing = layout.horizontalSpacing = 0;\n\t\tlayout.marginHeight = 0;\n\t\tsearchPanel.setLayout(layout);\n\t\tsearchPanel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n\n\t\tLabel label = new Label(searchPanel, SWT.LEFT);\n\t\tlabel.setText(Messages.HexEditorControl_17);\n\t\tfindText = new Text(searchPanel, SWT.LEFT | SWT.BORDER);\n\t\tfindText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n\n\t\tToolBar bar1 = new ToolBar(searchPanel, SWT.HORIZONTAL | SWT.FLAT);\n\t\tfinal ToolItem findHex = new ToolItem(bar1, SWT.CHECK);\n\t\tfindHex.setText(\"0x\"); //$NON-NLS-1$\n\t\tfindHex.setToolTipText(Messages.HexEditorControl_19);\n\t\tfinal ToolItem next = new ToolItem(bar1, SWT.PUSH);\n\t\tnext.setText(Messages.HexEditorControl_20);\n\t\tfinal ToolItem prev = new ToolItem(bar1, SWT.PUSH | SWT.FLAT);\n\t\tprev.setText(Messages.HexEditorControl_21);\n\t\tfinal ToolItem matchCase = new ToolItem(bar1, SWT.CHECK);\n\t\tmatchCase.setText(Messages.HexEditorControl_22);\n\t\tfinal ToolItem wrap = new ToolItem(bar1, SWT.CHECK);\n\t\twrap.setText(Messages.HexEditorControl_23);\n\n\t\treplaceText = new Text(searchPanel, SWT.LEFT | SWT.BORDER);\n\t\treplaceText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n\n\t\tToolBar bar2 = new ToolBar(searchPanel, SWT.HORIZONTAL | SWT.FLAT);\n\t\tfinal ToolItem replaceHex = new ToolItem(bar2, SWT.CHECK);\n\t\treplaceHex.setText(\"0x\"); //$NON-NLS-1$\n\t\treplaceHex.setToolTipText(Messages.HexEditorControl_25);\n\t\tfinal ToolItem replace = new ToolItem(bar2, SWT.PUSH | SWT.FLAT);\n\t\treplace.setText(Messages.HexEditorControl_26);\n\t\tfinal ToolItem replaceFind = new ToolItem(bar2, SWT.PUSH | SWT.FLAT);\n\t\treplaceFind.setText(Messages.HexEditorControl_27);\n\t\tfinal ToolItem replaceAll = new ToolItem(bar2, SWT.PUSH);\n\t\treplaceAll.setText(Messages.HexEditorControl_28);\n\n\t\tListener replaceListener = new Listener() {\n\t\t\t@Override\n public void handleEvent(Event event) {\n\t\t\t\treplace(findText.getText(), findHex.getSelection(), replaceText.getText(), replaceHex.getSelection(),\n\t\t\t\t true, matchCase.getSelection(), wrap.getSelection(),\n\t\t\t\t event.widget == replaceFind, event.widget == replaceAll);\n\t\t\t}\n\t\t};\n\t\treplace.addListener(SWT.Selection, replaceListener);\n\t\treplaceFind.addListener(SWT.Selection, replaceListener);\n\t\treplaceAll.addListener(SWT.Selection, replaceListener);\n\n\t\tclass UpdateActions {\n\t\t\tboolean validateAndUpdate() {\n\t\t\t\tboolean findValid = validate(findHex, findText);\n\t\t\t\tboolean replaceValid = validate(replaceHex, replaceText);\n\t\t\t\thexEditor.getEditorSite().getActionBars()\n\t\t\t\t.getStatusLineManager().setMessage(findValid && replaceValid ? null : Messages.HexEditorControl_29);\n\t\t\t\tboolean hasText = findText.getText().length() > 0;\n\t\t\t\tnext.setEnabled(hasText && findValid);\n\t\t\t\tprev.setEnabled(hasText && findValid);\n\t\t\t\treplace.setEnabled(hasText && findValid && replaceValid);\n\t\t\t\treplaceFind.setEnabled(hasText && findValid && replaceValid);\n\t\t\t\treplaceAll.setEnabled(hasText && findValid && replaceValid);\n\t\t\t\treturn findValid && replaceValid;\n\t\t\t}\n\n\t\t\tprivate boolean validate(ToolItem item, Text text) {\n\t\t\t\tboolean valid = item.getSelection() && HexUtils.isValidHexString(text.getText(), true) || !item.getSelection();\n//\t\t\t\ttext.setBackground(PropertyChangeListener.getColor(valid ? new RGB(255, 255, 255) : new RGB(255, 0, 0)));\n\t\t\t\treturn valid;\n\t\t\t}\n\t\t}\n\n\t\tfinal UpdateActions updateActions = new UpdateActions();\n\n\t\tListener findListener = new Listener() {\n\t\t\t@Override\n public void handleEvent(Event event) {\n\t\t\t\tif (!updateActions.validateAndUpdate())\n\t\t\t\t\treturn;\n\t\t\t\tboolean forward = event.widget != prev;\n\t\t\t\tHexTablePointer position = getCursorPosition();\n\t\t\t\tif (event.type == SWT.DefaultSelection || event.widget == next)\n\t\t\t\t\tposition.move(1);\n\t\t\t\telse if (event.widget == prev)\n\t\t\t\t\tposition.move(-1);\n\t\t\t\tsearch(position, findText.getText(), findHex.getSelection(), forward, matchCase.getSelection(), wrap.getSelection());\n\t\t\t}\n\t\t};\n\t\tfindText.addListener(SWT.Modify, findListener);\n\t\tfindText.addListener(SWT.DefaultSelection, findListener);\n\t\tnext.addListener(SWT.Selection, findListener);\n\t\tprev.addListener(SWT.Selection, findListener);\n\n\t\tListener validateListener = new Listener() {\n\t\t\t@Override\n public void handleEvent(Event event) {\n\t\t\t\tupdateActions.validateAndUpdate();\n\t\t\t}\n\t\t};\n\t\tfindHex.addListener(SWT.Selection, validateListener);\n\t\treplaceHex.addListener(SWT.Selection, validateListener);\n\t\treplaceText.addListener(SWT.Modify, validateListener);\n\n\t\tKeyAdapter keyListener = new KeyAdapter() {\n\t\t\t@Override\n public void keyReleased(KeyEvent e) {\n\t\t\t\tif (e.keyCode == SWT.ESC) {\n\t\t\t\t\tsetRulerVisible(false);\n\t\t\t\t\tselectFindResult(true);\n\t\t\t\t\ttable.updateVisibleTable(false, true, false);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tfindText.addKeyListener(keyListener);\n\t\treplaceText.addKeyListener(keyListener);\n\n\t\tListener savePropertiesListener = new Listener() {\n\t\t\t@Override\n public void handleEvent(Event event) {\n\t\t\t\tActivator.getDefault().getPreferenceStore().setValue(HexEditorConstants.PROPERTY_FIND_HEX, findHex.getSelection());\n\t\t\t\tActivator.getDefault().getPreferenceStore().setValue(HexEditorConstants.PROPERTY_REPLACE_HEX, replaceHex.getSelection());\n\t\t\t\tActivator.getDefault().getPreferenceStore().setValue(HexEditorConstants.PROPERTY_MATCH_CASE, matchCase.getSelection());\n\t\t\t\tActivator.getDefault().getPreferenceStore().setValue(HexEditorConstants.PROPERTY_WRAP, wrap.getSelection());\n\t\t\t}\n\t\t};\n\t\tfindHex.addListener(SWT.Selection, savePropertiesListener);\n\t\treplaceHex.addListener(SWT.Selection, savePropertiesListener);\n\t\tmatchCase.addListener(SWT.Selection, savePropertiesListener);\n\t\twrap.addListener(SWT.Selection, savePropertiesListener);\n\n\t\tfindHex.setSelection(Activator.getDefault().getPreferenceStore().getBoolean(HexEditorConstants.PROPERTY_FIND_HEX));\n\t\treplaceHex.setSelection(Activator.getDefault().getPreferenceStore().getBoolean(HexEditorConstants.PROPERTY_REPLACE_HEX));\n\t\tmatchCase.setSelection(Activator.getDefault().getPreferenceStore().getBoolean(HexEditorConstants.PROPERTY_MATCH_CASE));\n\t\twrap.setSelection(Activator.getDefault().getPreferenceStore().getBoolean(HexEditorConstants.PROPERTY_WRAP));\n\n\t\tupdateActions.validateAndUpdate();\n\t}",
"private void makeSearchButton() {\n searchButton = new JButton();\n searchButton.setBorder(new CompoundBorder(\n BorderFactory.createMatteBorder(4, 0, 4, 7, DrawAttribute.lightblue),\n BorderFactory.createRaisedBevelBorder()));\n searchButton.setBackground(new Color(36, 45, 50));\n searchButton.setIcon(new ImageIcon(MapIcon.iconURLs.get(\"searchIcon\")));\n searchButton.setFocusable(false);\n searchButton.setBounds(320, 20, 43, 37);\n searchButton.setActionCommand(\"search\");\n }",
"public Controller(FrameSearch frameSearch) {\n this.frameSearch = frameSearch;\n this.criteria = new Criteria();\n search = new Search();\n getCriteriaSaved();\n frameSearch.getTpDataBase().getBtLoad().addMouseListener(new MouseAdapter() {\n public void mouseClicked(MouseEvent evt) {\n buttonEventClicked(evt);\n }\n });\n }",
"public Form getSearchForm() throws PublicationTemplateException;",
"public abstract Search create(String search, SearchBuilder builder);",
"private JPanel createPanelStoredServices() {\n\t\t// Fabriken holen\n\t\tGridBagConstraintsFactory gbcf = GridBagConstraintsFactory.getInstance();\n\t\tWidgetFactory wf = WidgetFactory.getInstance();\n\t\t// Widgets erzeugen\n\t\tJPanel panel = wf.getPanel(\"PanelStoredServices\");\n\t\tserviceAbbreviationFilter = wf.getTextField(\"FieldServiceAbbreviation\");\n\t\tserviceAbbreviationFilter.addKeyListener(new KeyListener() {\n\n\t\t\t@Override\n\t\t\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\t\t\t\tupdateSearch();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t}\n\n\t\t});\n\t\tserviceAbbreviationFilterCaseSensitive = wf\n\t\t\t\t.getCheckBox(\"CheckBoxServiceAbbreviationFilterCaseSensitive\");\n\t\tserviceAbbreviationFilterCaseSensitive.addItemListener(new ItemListener() {\n\t\t\t@Override\n\t\t\tpublic void itemStateChanged(ItemEvent event) {\n\t\t\t\tupdateSearch();\n\t\t\t}\n\t\t});\n\t\tserviceAbbreviationFilterAsRegex = wf.getCheckBox(\"CheckBoxServiceAbbreviationFilterAsRegex\");\n\t\tserviceAbbreviationFilterAsRegex.addItemListener(new ItemListener() {\n\t\t\t@Override\n\t\t\tpublic void itemStateChanged(ItemEvent event) {\n\t\t\t\tupdateSearch();\n\t\t\t}\n\t\t});\n\t\tregexContainsErrors = wf.getLabel(\"LabelRegexContainsErrors\");\n\t\tregexContainsErrors.setForeground(Color.RED);\n\t\ttableModelStoredServices = new StoredServicesTableModel(((PswGenCtl) ctl).getServices().getServices(),\n\t\t\t\tnew String[] { ctl.getGuiText(\"LabelServiceAbbreviation\"),\n\t\t\t\t\t\tctl.getGuiText(\"LabelAdditionalInfo\"), ctl.getGuiText(\"LabelUseOldPassphrase\"),\n\t\t\t\t\t\tctl.getGuiText(\"LabelLoginUrl\") });\n\t\ttableStoredServices = wf.getTable(\"TableStoredServices\", tableModelStoredServices);\n\t\ttableStoredServices.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\t\ttableRowSorter = new TableRowSorter<StoredServicesTableModel>(tableModelStoredServices);\n\t\ttableRowSorter.setComparator(StoredServicesTableModel.COL_ADDITIONAL_INFO, new Comparator<String>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(String leftString, String rightString) {\n\t\t\t\ttry {\n\t\t\t\t\tDate leftDate = CoreConstants.DATE_FORMAT_de_DE.parse(leftString);\n\t\t\t\t\tDate rightDate = CoreConstants.DATE_FORMAT_de_DE.parse(rightString);\n\t\t\t\t\treturn leftDate.compareTo(rightDate);\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\treturn leftString.compareTo(rightString);\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\t\ttableStoredServices.setRowSorter(tableRowSorter);\n\t\t// Ask to be notified of selection changes.\n\t\tListSelectionModel rowSM = tableStoredServices.getSelectionModel();\n\t\trowSM.addListSelectionListener(new ListSelectionListener() {\n\t\t\t@Override\n\t\t\tpublic void valueChanged(ListSelectionEvent event) {\n\t\t\t\tif (event.getValueIsAdjusting()) {// Ignore extra messages.\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tListSelectionModel lsm = (ListSelectionModel) event.getSource();\n\t\t\t\tif (!lsm.isSelectionEmpty()) { // Ist überhaupt eine Zeile ausgewählt?\n\t\t\t\t\tint selectedRow = lsm.getMinSelectionIndex();\n\t\t\t\t\tint modelRow = tableStoredServices.convertRowIndexToModel(selectedRow);\n\t\t\t\t\tString serviceAbbreviation = tableModelStoredServices.getServiceInfoAt(modelRow)\n\t\t\t\t\t\t\t.getServiceAbbreviation();\n\t\t\t\t\t((PswGenCtl) ctl).valueChangedLoadServiceFromList(me, serviceAbbreviation);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tscrollableTableStoredServices = new JScrollPane(tableStoredServices);\n\t\t// tableStoredServices.setFillsViewportHeight(true);\n\t\t// Widgets zufügen, erste Zeile\n\t\tint row = 0;\n\t\tpanel.add(serviceAbbreviationFilter, gbcf.getFieldConstraints(0, row, 4, 1));\n\t\t// Nächste Zeile zum einfügen von Groß-/Kleinschreibung\n\t\trow++;\n\t\tpanel.add(serviceAbbreviationFilterCaseSensitive, gbcf.getFieldConstraints(0, row, 2, 1));\n\t\t// Nächste Zeile zum einfügen der Regex-Suche\n\t\trow++;\n\t\tpanel.add(serviceAbbreviationFilterAsRegex, gbcf.getFieldConstraints(0, row, 2, 1));\n\t\tpanel.add(regexContainsErrors, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 2, 1));\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tpanel.add(scrollableTableStoredServices, gbcf.getTableConstraints(0, row, 4, 1));\n\n\t\t// Anzeige des regex-errors deaktivieren\n\t\tshowRegexErrorMessage(false);\n\n\t\t// Panel zurückgeben\n\t\treturn panel;\n\t}",
"public SearchEntry() {\n initComponents();\n }",
"public static void SearchBox() {\r\n\tJFrame Search = new JFrame(\"Search\");\r\n\tSearch.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\tSearch.setSize(700,500);\r\n\tSearch.getContentPane();\r\n\tSearch.setVisible(true);\r\n\r\n\te7.setFont(f);\r\n\r\n\t\r\n\r\n\tSearch.getContentPane().add(GUI2Panel);\r\n\tGUI2Panel.add(e7);\r\n\tGUI2Panel.add(SearchField);\r\n\r\n\tGUI2Panel.add(SearchButton2);\r\n}",
"void searchUI();",
"public DirectSearchPanel(OntologyClass myOntologyClass) {\n this.myOntologyClass = myOntologyClass;\n initComponents();\n\n buildList();\n\n //Add key listener to the textfield\n searchField.addKeyListener(new KeyAdapter() {\n public void keyReleased(KeyEvent e) {\n //If the user delete by pressing backspace\n if (searchFieldLength > searchField.getText().length()) {\n componentsList.setModel(ingredientsListModel);\n filterList();\n } else {\n filterList();\n }\n }\n\n public void keyPressed(KeyEvent e) {\n searchFieldLength = searchField.getText().length();\n }\n });\n }",
"abstract GridPane createSearchDashBoard();",
"public SearchGUI(){\n\t\t\n\t\tsuper(\"Search GUI\");\n\t\tsetSize(600,500);\n\t\tsetResizable(false);\n\t\tsetLocationRelativeTo(null);\n\t\tsetLayout(new BorderLayout());\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\t\n\t\tpanelPro = new JPanel(new GridBagLayout());\n\t\tadd(panelPro, BorderLayout.NORTH);\t\n\t\tgrid = new GridBagConstraints();\n\t\tgrid.fill=GridBagConstraints.HORIZONTAL;\n\t\tgrid.insets = new Insets(2,2,2,2);\n\t\t\n\t}",
"public SearchableTreePanel() {\n super();\n initialize();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n panelAddSearch = new javax.swing.JPanel();\n labelNameSearch = new javax.swing.JLabel();\n nameSearch = new javax.swing.JTextField();\n buttonAddSearch = new javax.swing.JButton();\n tabbedPaneSearch = new javax.swing.JTabbedPane();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"FlexibleFileFinder\");\n setName(\"FlexibleFileFinder\"); // NOI18N\n\n panelAddSearch.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));\n\n labelNameSearch.setFont(new java.awt.Font(\"Monospaced\", 0, 12)); // NOI18N\n labelNameSearch.setText(\"Name Search:\");\n\n nameSearch.setFont(new java.awt.Font(\"Monospaced\", 0, 12)); // NOI18N\n\n buttonAddSearch.setFont(new java.awt.Font(\"Monospaced\", 0, 12)); // NOI18N\n buttonAddSearch.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/org/bz/filefinder/usedPictures/AddSearch.png\"))); // NOI18N\n buttonAddSearch.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buttonAddSearchActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout panelAddSearchLayout = new javax.swing.GroupLayout(panelAddSearch);\n panelAddSearch.setLayout(panelAddSearchLayout);\n panelAddSearchLayout.setHorizontalGroup(\n panelAddSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelAddSearchLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(labelNameSearch)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(nameSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 256, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(buttonAddSearch)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n panelAddSearchLayout.setVerticalGroup(\n panelAddSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelAddSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)\n .addComponent(labelNameSearch)\n .addComponent(nameSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(buttonAddSearch))\n );\n\n tabbedPaneSearch.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(tabbedPaneSearch)\n .addGroup(layout.createSequentialGroup()\n .addComponent(panelAddSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 772, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(panelAddSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(tabbedPaneSearch, javax.swing.GroupLayout.DEFAULT_SIZE, 563, Short.MAX_VALUE))\n );\n\n pack();\n }",
"public search_user() {\n initComponents();\n }",
"public search_package() {\n initComponents();\n }",
"public SearchUI() {\n initComponents();\n initComponents2();\n }",
"public SearchPage() {\n\t\tdoRender();\n\t}",
"private void findPopMenuItemActionPerformed(java.awt.event.ActionEvent evt) {\n if (sdd == null) {\n sdd = new SearchDialog(this);\n }\n sdd.setVisible(true);\n }",
"public SearchDataView() {\n initComponents();\n }",
"protected abstract ITitleAndSearchPanelFilter instantiateHeaderAndSearchFilter ( ) ;",
"private Search() {}",
"private void initComponents(int number) {\n\t\tSearchPage = new JPanel();\n\t\tTitle = new JLabel();\n\t\tPeopleLB = new JLabel();\n\t\tRecipeLB = new JLabel();\n\t\tPeopleSeach = new JTextField();\n\t\tRecipeSearch = new JTextField();\n\t\tSearchPP = new JButton();\n\t\tSearchRP = new JButton();\n\t\t//SearchScroll = new JScrollPane();\n\t\t//SeachPanel = new JPanel();\n\n\n\n\t\t//======== SearchPage ========\n\t\t{\n\n\t\t\t//======== SearchScroll ========\n\n\t\t\t//---- Title ----\n\t\t\tTitle.setText(\"Search Page\");\n\t\t\tTitle.setHorizontalAlignment(SwingConstants.CENTER);\n\t\t\tTitle.setFont(Title.getFont().deriveFont(Title.getFont().getStyle() | Font.BOLD, Title.getFont().getSize() + 13f));\n\t\t\tTitle.setForeground(Color.red);\n\n\t\t\t//---- PeopleLB ----\n\t\t\tPeopleLB.setText(\"People\");\n\t\t\tPeopleLB.setFont(PeopleLB.getFont().deriveFont(PeopleLB.getFont().getStyle() | Font.BOLD));\n\n\t\t\t//---- RecipeLB ----\n\t\t\tRecipeLB.setText(\"Recipe\");\n\t\t\tRecipeLB.setFont(RecipeLB.getFont().deriveFont(RecipeLB.getFont().getStyle() | Font.BOLD));\n\n\t\t\t//---- SearchPP ----\n\t\t\tSearchPP.setText(\"Search\");\n\t\t\tSearchPP.addActionListener(new ActionListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tSearchPPActionPerformed(e);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t//---- SearchRP ----\n\t\t\tSearchRP.setText(\"Seach\");\n\t\t\tSearchRP.addActionListener(new ActionListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tSearchRPActionPerformed(e);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tGroupLayout SearchPageLayout = new GroupLayout(SearchPage);\n\t\t\tSearchPage.setLayout(SearchPageLayout);\n\t\t\tSearchPageLayout.setHorizontalGroup(\n\t\t\t\t\tSearchPageLayout.createParallelGroup()\n\t\t\t\t\t.addGroup(SearchPageLayout.createSequentialGroup()\n\t\t\t\t\t\t\t.addGap(106, 106, 106)\n\t\t\t\t\t\t\t.addComponent(Title, GroupLayout.PREFERRED_SIZE, 251, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t.addContainerGap())\n\t\t\t\t\t\t\t.addGroup(GroupLayout.Alignment.TRAILING, SearchPageLayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t.addContainerGap(80, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t.addGroup(SearchPageLayout.createParallelGroup()\n\t\t\t\t\t\t\t\t\t\t\t.addGroup(SearchPageLayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(PeopleLB, GroupLayout.PREFERRED_SIZE, 49, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(PeopleSeach, GroupLayout.PREFERRED_SIZE, 196, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(SearchPP, GroupLayout.PREFERRED_SIZE, 100, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(SearchPageLayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(RecipeLB, GroupLayout.PREFERRED_SIZE, 49, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(RecipeSearch, GroupLayout.PREFERRED_SIZE, 196, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(SearchRP, GroupLayout.PREFERRED_SIZE, 100, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(62, 62, 62))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(SearchPageLayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(SearchScroll, GroupLayout.DEFAULT_SIZE, 450, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addContainerGap())\n\t\t\t\t\t);\n\t\t\tSearchPageLayout.setVerticalGroup(\n\t\t\t\t\tSearchPageLayout.createParallelGroup()\n\t\t\t\t\t.addGroup(GroupLayout.Alignment.TRAILING, SearchPageLayout.createSequentialGroup()\n\t\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t\t.addComponent(Title)\n\t\t\t\t\t\t\t.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t.addGroup(SearchPageLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)\n\t\t\t\t\t\t\t\t\t.addComponent(PeopleLB, GroupLayout.PREFERRED_SIZE, 23, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t.addComponent(PeopleSeach, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t.addComponent(SearchPP))\n\t\t\t\t\t\t\t\t\t.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t.addGroup(SearchPageLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t.addComponent(RecipeLB, GroupLayout.PREFERRED_SIZE, 23, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t.addComponent(RecipeSearch, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t.addComponent(SearchRP))\n\t\t\t\t\t\t\t\t\t\t\t.addGap(18, 18, 18)\n\t\t\t\t\t\t\t\t\t\t\t.addComponent(SearchScroll, GroupLayout.PREFERRED_SIZE, 413, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t.addContainerGap())\n\t\t\t\t\t);\n\t\t}\n\t\t// JFormDesigner - End of component initialization //GEN-END:initComponents\n\t}",
"public SearchPage() {\n\t\tPageFactory.initElements(driver, this);\n\t\t\n\t}",
"TSearchResults createSearchResults(TSearchQuery searchQuery);",
"public final QueryPanel createNewQueryPanel() {\n\n QueryPanel cp = new QueryPanel(nextQueryID++);\n queryPanelContainer.add(cp);\n queryPanels.add(cp);\n\n refreshSubPanels();\n\n return cp;\n }",
"private void initializeSearchTab() {\r\n\r\n searchTab = new JPanel(new GridBagLayout());\r\n searchTab.setBackground(MainGUI.backgroundColor);\r\n searchTab.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));\r\n searchTabConstraints = new GridBagConstraints();\r\n\r\n // search\r\n search_searchDirectionLabel = new JLabel(\"Search for Patient using Last Name & First Name\");\r\n search_lNameLabel = new JLabel(\"Last Name:\");\r\n search_fNameLabel = new JLabel(\"First Name:\");\r\n\r\n search_searchDirectionLabel.setFont(new java.awt.Font(search_searchDirectionLabel.getFont().getFontName(), Font.PLAIN, 30));\r\n search_searchDirectionLabel.setForeground(MainGUI.fontColor);\r\n search_lNameLabel.setForeground(MainGUI.fontColor);\r\n search_fNameLabel.setForeground(MainGUI.fontColor);\r\n\r\n\r\n search_fNameField = new JTextField(12);\r\n search_lNameField = new JTextField(12);\r\n\r\n search_searchButton = new JButton(\"Search\");\r\n search_searchButton.setForeground(MainGUI.fontColor);\r\n\r\n // add components to Search tab\r\n\r\n // add search directions label\r\n searchTabConstraints.gridx = 10;\r\n searchTabConstraints.gridy = 10;\r\n searchTabConstraints.weighty = 0.2;\r\n searchTabConstraints.anchor = GridBagConstraints.NORTH;\r\n searchTabConstraints.insets = new Insets(30, 0, 0, 0);\r\n searchTab.add(search_searchDirectionLabel, searchTabConstraints);\r\n\r\n // add last name search label\r\n searchTabConstraints.gridx = 10;\r\n searchTabConstraints.gridy = 20;\r\n searchTabConstraints.anchor = GridBagConstraints.CENTER;\r\n searchTabConstraints.insets = new Insets(0, 0, 0, 120);\r\n searchTab.add(search_lNameLabel, searchTabConstraints);\r\n\r\n // add last name search textfield\r\n searchTabConstraints.insets = new Insets(0, 110, 0, 0);\r\n searchTab.add(search_lNameField, searchTabConstraints);\r\n\r\n // add first name search label\r\n searchTabConstraints.anchor = GridBagConstraints.NORTH;\r\n searchTabConstraints.gridy = 30;\r\n searchTabConstraints.insets = new Insets(0, 0, 0, 120);\r\n searchTab.add(search_fNameLabel, searchTabConstraints);\r\n\r\n // add first name search textfield\r\n searchTabConstraints.insets = new Insets(0, 110, 0, 0);\r\n searchTab.add(search_fNameField, searchTabConstraints);\r\n\r\n // add search button\r\n searchTabConstraints.gridy = 40;\r\n searchTabConstraints.ipadx = 30;\r\n searchTabConstraints.weighty = 1;\r\n searchTabConstraints.ipady = 10;\r\n searchTabConstraints.insets = new Insets(0, 0, 0, 0);\r\n searchTab.add(search_searchButton, searchTabConstraints);\r\n\r\n }",
"private void makeComponents() {\n Font font = new Font(\"Open Sans\", Font.PLAIN, 14);\n\n //Create The buttons and configure their visual design.\n searchArea.setFont(font);\n searchArea.setBorder(new CompoundBorder(BorderFactory.createMatteBorder(4, 7, 4, 7, DrawAttribute.lightblue), BorderFactory.createRaisedBevelBorder()));\n searchArea.setBounds(20, 20, 300, 37);\n searchArea.setActionCommand(\"searchAreaInput\");\n\n makeFrontGUIButtons();\n }",
"public LookUpPanel() {\n initComponents(); \n }",
"private void visitToSearch() {\n if (search_Attendance==null) {\n search_Attendance=new Search_Attendance();\n search_Attendance.setVisible(true);\n } else {\n search_Attendance.setVisible(true);\n }\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n MainPanel = new javax.swing.JPanel();\n SearchPanel = new javax.swing.JPanel();\n lblSearchName = new javax.swing.JLabel();\n txtSearch = new javax.swing.JTextField();\n RecordPanel = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n tblHistory = new javax.swing.JTable();\n btnReset = new javax.swing.JButton();\n btnDone = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"History - Diaz Dental Clinic System\");\n setUndecorated(true);\n\n MainPanel.setBackground(new java.awt.Color(17, 24, 42));\n MainPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 255, 255), 2));\n\n SearchPanel.setBackground(new java.awt.Color(17, 24, 42));\n SearchPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Search for User\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Tahoma\", 1, 14), new java.awt.Color(255, 255, 255))); // NOI18N\n SearchPanel.setForeground(new java.awt.Color(255, 255, 255));\n\n lblSearchName.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n lblSearchName.setForeground(new java.awt.Color(255, 255, 255));\n lblSearchName.setText(\"Search for Record : \");\n\n txtSearch.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n txtSearchKeyPressed(evt);\n }\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtSearchKeyTyped(evt);\n }\n });\n\n javax.swing.GroupLayout SearchPanelLayout = new javax.swing.GroupLayout(SearchPanel);\n SearchPanel.setLayout(SearchPanelLayout);\n SearchPanelLayout.setHorizontalGroup(\n SearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(SearchPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(lblSearchName)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 171, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n SearchPanelLayout.setVerticalGroup(\n SearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(SearchPanelLayout.createSequentialGroup()\n .addGap(23, 23, 23)\n .addGroup(SearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblSearchName)\n .addComponent(txtSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(31, Short.MAX_VALUE))\n );\n\n RecordPanel.setBackground(new java.awt.Color(17, 24, 42));\n RecordPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Users Record\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Tahoma\", 1, 14), new java.awt.Color(255, 255, 255))); // NOI18N\n\n tblHistory.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\"\n }\n ));\n jScrollPane1.setViewportView(tblHistory);\n\n javax.swing.GroupLayout RecordPanelLayout = new javax.swing.GroupLayout(RecordPanel);\n RecordPanel.setLayout(RecordPanelLayout);\n RecordPanelLayout.setHorizontalGroup(\n RecordPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(RecordPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 695, Short.MAX_VALUE)\n .addContainerGap())\n );\n RecordPanelLayout.setVerticalGroup(\n RecordPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(RecordPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 269, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n btnReset.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n btnReset.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/com/recordmanagement/assets/Delete.png\"))); // NOI18N\n btnReset.setText(\"Reset\");\n btnReset.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnResetActionPerformed(evt);\n }\n });\n\n btnDone.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n btnDone.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/com/recordmanagement/assets/check.png\"))); // NOI18N\n btnDone.setText(\"Done\");\n btnDone.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnDoneActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout MainPanelLayout = new javax.swing.GroupLayout(MainPanel);\n MainPanel.setLayout(MainPanelLayout);\n MainPanelLayout.setHorizontalGroup(\n MainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(MainPanelLayout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addGroup(MainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(MainPanelLayout.createSequentialGroup()\n .addComponent(RecordPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(22, Short.MAX_VALUE))\n .addGroup(MainPanelLayout.createSequentialGroup()\n .addComponent(SearchPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(MainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(btnReset, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnDone, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(41, 41, 41))))\n );\n MainPanelLayout.setVerticalGroup(\n MainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(MainPanelLayout.createSequentialGroup()\n .addGroup(MainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(MainPanelLayout.createSequentialGroup()\n .addGap(27, 27, 27)\n .addComponent(SearchPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, MainPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(btnReset)\n .addGap(18, 18, 18)\n .addComponent(btnDone)\n .addGap(32, 32, 32)))\n .addComponent(RecordPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(MainPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(MainPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n\n pack();\n }",
"private SearchUI()\n\t{\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n sp_searchPolicies = new javax.swing.ButtonGroup();\n sp_relatedQueriesPanel = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n sp_RelatedQueriesList = new javax.swing.JList();\n jPanel1 = new javax.swing.JPanel();\n sp_searchInput = new javax.swing.JTextField();\n sp_opaki = new javax.swing.JRadioButton();\n sp_vector = new javax.swing.JRadioButton();\n sp_searchButton = new javax.swing.JButton();\n sp_searchEntriesWrapper = new javax.swing.JScrollPane();\n sp_searchEntries = new javax.swing.JPanel();\n sp_searchPolicyLabel = new javax.swing.JLabel();\n\n setMaximumSize(new java.awt.Dimension(895, 32767));\n\n sp_relatedQueriesPanel.setMinimumSize(new java.awt.Dimension(383, 226));\n\n jLabel1.setFont(new java.awt.Font(\"SansSerif\", 0, 16)); // NOI18N\n jLabel1.setText(\"Related Queries\");\n\n sp_RelatedQueriesList.setFont(new java.awt.Font(\"SansSerif\", 0, 12)); // NOI18N\n sp_RelatedQueriesList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n sp_RelatedQueriesList.addListSelectionListener(new javax.swing.event.ListSelectionListener() {\n public void valueChanged(javax.swing.event.ListSelectionEvent evt) {\n onRelatedQueryClicked(evt);\n }\n });\n jScrollPane1.setViewportView(sp_RelatedQueriesList);\n\n javax.swing.GroupLayout sp_relatedQueriesPanelLayout = new javax.swing.GroupLayout(sp_relatedQueriesPanel);\n sp_relatedQueriesPanel.setLayout(sp_relatedQueriesPanelLayout);\n sp_relatedQueriesPanelLayout.setHorizontalGroup(\n sp_relatedQueriesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(sp_relatedQueriesPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(sp_relatedQueriesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 363, Short.MAX_VALUE)\n .addGroup(sp_relatedQueriesPanelLayout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 352, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n sp_relatedQueriesPanelLayout.setVerticalGroup(\n sp_relatedQueriesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(sp_relatedQueriesPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 172, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n\n sp_searchInput.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n sp_sp_searchInputActionPerformed(evt);\n }\n });\n\n sp_searchPolicies.add(sp_opaki);\n sp_opaki.setFont(new java.awt.Font(\"SansSerif\", 0, 11)); // NOI18N\n sp_opaki.setText(\"Okapi BM25\");\n sp_opaki.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n onopakiPolicySelected(evt);\n }\n });\n\n sp_searchPolicies.add(sp_vector);\n sp_vector.setFont(new java.awt.Font(\"SansSerif\", 0, 11)); // NOI18N\n sp_vector.setSelected(true);\n sp_vector.setText(\"Vector Space Model\");\n sp_vector.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n onVectorSpacePolicySelected(evt);\n }\n });\n\n sp_searchButton.setFont(new java.awt.Font(\"SansSerif\", 0, 14)); // NOI18N\n sp_searchButton.setText(\"Search\");\n sp_searchButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n onSearchButtonClicked(evt);\n }\n });\n\n sp_searchEntriesWrapper.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);\n\n sp_searchEntries.setLayout(new javax.swing.BoxLayout(sp_searchEntries, javax.swing.BoxLayout.Y_AXIS));\n sp_searchEntriesWrapper.setViewportView(sp_searchEntries);\n\n sp_searchPolicyLabel.setFont(new java.awt.Font(\"SansSerif\", 0, 12)); // NOI18N\n sp_searchPolicyLabel.setText(\"Search policy\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(sp_searchEntriesWrapper)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(sp_searchInput)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(sp_searchButton, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(sp_searchPolicyLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(sp_vector)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(sp_opaki)\n .addGap(0, 214, Short.MAX_VALUE)))\n .addContainerGap())))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(sp_searchInput, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(sp_searchButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(sp_searchEntriesWrapper, javax.swing.GroupLayout.PREFERRED_SIZE, 533, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(sp_searchPolicyLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(sp_vector)\n .addComponent(sp_opaki))\n .addContainerGap())\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(sp_relatedQueriesPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(12, 12, 12))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addGap(55, 55, 55)\n .addComponent(sp_relatedQueriesPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n }",
"private FormMediator() {\n queryViews = new LinkedList<QueryView>();\n searchAction = Actions.SEARCH_ACTION;\n }",
"@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\tpublic void createListPatientsPanel() {\n\n\t\tlistPatientsPanel = new JPanel();\n\t\tlistPatientsPanel.setSize(700, 430);\n\t\tlistPatientsPanel.setLocation(0, 70);\n\t\tlistPatientsPanel.setLayout(new GridLayout(1, 1));\n\t\t// textArea\n\t\tpatientList = new JList(getDoctor(tempDoctorId).getPList().toArray());\n\t\tpatientList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\t\tpatientList.addMouseListener(new MouseListener() {\n\t\t\t@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t}\n\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t}\n\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t}\n\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t}\n\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tif (e.getClickCount() == 2) {\n\t\t\t\t\tPatient p = (Patient) patientList.getSelectedValue();\n\t\t\t\t\ttempPatientId = p.getPId();\n\t\t\t\t\tupdateSearchPatientPanel();\n\t\t\t\t\tsearchPatientPanel.setVisible(true);\n\t\t\t\t\tlistPatientsPanel.setVisible(false);\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\n\t\tJScrollPane sp1 = new JScrollPane(patientList);\n\t\tlistPatientsPanel.add(sp1);\n\t\ttotalGUIPanel.add(listPatientsPanel);\n\t\tlistPatientsPanel.setVisible(false);\n\t}",
"private JComponent buildUserFilter() {\n JPanel panel = new JPanel(new BorderLayout(5, 0));\n panel.add(Labels.create(IconFactory.get().create(\"fa:search\")), BorderLayout.WEST);\n panel.add(Inputs.text()\n .preferredSize(new Dimension(100, 25))\n .subscribeValue((val) -> updateList(val)));\n panel.setBorder(BorderFactory.createEmptyBorder(2, 3, 2, 3));\n return panel;\n }",
"public search() {\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n java.awt.GridBagConstraints gridBagConstraints;\n\n searchLabel = new javax.swing.JLabel();\n searchButton = new javax.swing.JButton();\n\n setLayout(new java.awt.GridBagLayout());\n\n searchLabel.setText(\"This is the Test Panel\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.gridheight = 3;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;\n add(searchLabel, gridBagConstraints);\n\n java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle(\"nyagua/Bundle\"); // NOI18N\n searchButton.setText(bundle.getString(\"Search\")); // NOI18N\n searchButton.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n searchButtonMouseClicked(evt);\n }\n });\n searchButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n searchButtonActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 4;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.gridheight = 3;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;\n gridBagConstraints.insets = new java.awt.Insets(6, 18, 5, 20);\n add(searchButton, gridBagConstraints);\n }",
"public CSearchUserPanel() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\t}",
"private void search()\n {\n JTextField searchField = (currentSearchView.equals(SEARCH_PANE_VIEW))? searchBar : resultsSearchBar;\n String searchTerm = searchField.getText();\n \n showTransition(2000);\n \n currentPage = 1;\n showResultsView(true);\n paginate(1, getResultsPerPage());\n\n if(searchWeb) showResultsTableView(WEB_RESULTS_PANE);\n else showResultsTableView(IMAGE_RESULTS_PANE);\n\n \n showSearchView(RESULTS_PANE_VIEW);\n resultsSearchBar.setText(searchTerm);\n }",
"void searchView(String name);",
"public SearchFrame(){//The main search frame which calls other methods\n\t\t/*Calling the methods intitialiseGUI and buildGUI*/\n\t\tintitialiseGUI();\n\t\tbuildGUI();\n\t}",
"private JButton createSearchButton() {\n\t\tfinal JButton searchButton = new JButton(\"Search\");\n\n\t\tsearchButton.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(final ActionEvent e) {\n\t\t\t\ttry{\n\t\t\t\t\tupdateTable(nameSearchBar.getText(), locationSearchBar.getText());\n\t\t\t\t}catch(final BookingServiceException bse){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, bse.getMessage());\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}catch(final ServiceUnavailableException sue){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, sue.getMessage());\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn searchButton;\n\t}",
"public SearchWindow()\n {\n // call parent and set layout\n super();\n this.setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS));\n TextFieldListener tfl = new TextFieldListener();\n model = new DefaultListModel<String>();\n lsl = new SelectionListener();\n\n radioText = new JLabel(\"Combine Terms Using:\");\n\n // create and add the radio buttons and the clear button\n topButtons = new JPanel();\n topButtons.setLayout(new BoxLayout(topButtons, BoxLayout.LINE_AXIS));\n topButtons.add(Box.createRigidArea(new Dimension(20, 0)));\n\n // can be accessed by pressing A plus Alt (or whatever the users look-and-feel is)\n andRadio = new JRadioButton(\"And\");\n andRadio.setMnemonic(KeyEvent.VK_A);\n\n // can be accessed by pressing O plus Alt\n orRadio = new JRadioButton(\"Or\");\n orRadio.setMnemonic(KeyEvent.VK_O);\n\n // associate the buttons\n radioButtons = new ButtonGroup();\n radioButtons.add(andRadio);\n radioButtons.add(orRadio);\n orRadio.setSelected(true); // default setting\n\n // Listener to perform search if radio buttons are changed (UID req. 2.1)\n ChangeRadioListener crl = new ChangeRadioListener();\n orRadio.addActionListener(crl);\n andRadio.addActionListener(crl);\n\n // create Clear All Terms button with action listener\n clear = new JButton(\"Clear All Terms\");\n clear.setEnabled(false);\n ClearButtonListener cbl = new ClearButtonListener();\n clear.addActionListener(cbl);\n\n // add everything to our top panel\n topButtons.add(radioText);\n topButtons.add(Box.createRigidArea(new Dimension(20, 0)));\n topButtons.add(orRadio);\n topButtons.add(andRadio);\n topButtons.add(Box.createHorizontalGlue());\n topButtons.add(clear);\n topButtons.add(Box.createRigidArea(new Dimension(20, 0)));\n topButtons\n .setMaximumSize(new Dimension(Integer.MAX_VALUE, topButtons.getPreferredSize().height));\n topButtons\n .setMaximumSize(new Dimension(Integer.MAX_VALUE, topButtons.getPreferredSize().height));\n\n // add text fields for search terms\n highSearchPane = new JPanel();\n highSearchPane.setLayout(new BoxLayout(highSearchPane, BoxLayout.LINE_AXIS));\n highWeight = new JLabel(\"High Weight Search Terms:\");\n highTerms = new JTextField();\n highTerms.addKeyListener(tfl);\n highSearchPane.add(Box.createRigidArea(new Dimension(20, 0)));\n highSearchPane.add(highWeight);\n highSearchPane.add(Box.createRigidArea(new Dimension(20, 0)));\n highSearchPane.add(highTerms);\n highSearchPane.add(Box.createRigidArea(new Dimension(20, 0)));\n highSearchPane\n .setMaximumSize(new Dimension(Integer.MAX_VALUE, highSearchPane.getPreferredSize().height));\n lowSearchPan = new JPanel();\n lowSearchPan.setLayout(new BoxLayout(lowSearchPan, BoxLayout.LINE_AXIS));\n lowWeight = new JLabel(\"Low Weight Search Terms:\");\n lowTerms = new JTextField();\n lowTerms.addKeyListener(tfl);\n lowTerms.setMaximumSize(new Dimension(Integer.MAX_VALUE, lowTerms.getPreferredSize().height));\n lowSearchPan.add(Box.createRigidArea(new Dimension(20, 0)));\n lowSearchPan.add(lowWeight);\n lowSearchPan.add(Box.createRigidArea(new Dimension(20, 0)));\n lowSearchPan.add(lowTerms);\n lowSearchPan.add(Box.createRigidArea(new Dimension(20, 0)));\n\n // Create short form panel\n\n shortFormList = new JList<String>(model);\n shortFormList.addListSelectionListener(lsl);\n shortFormList.setFont(new Font(\"LabelStyle\", Font.BOLD, 15));\n shortFormList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n shortFormList.setModel(model);\n shortFormList.setLayoutOrientation(JList.VERTICAL);\n\n shortPane = new JPanel();\n shortPane.setLayout(new BoxLayout(shortPane, BoxLayout.LINE_AXIS));\n shortScroll = new JScrollPane(shortFormList);\n shortPane.add(Box.createRigidArea(new Dimension(20, 0)));\n shortPane.add(shortScroll);\n shortPane.setPreferredSize(new Dimension(Integer.MAX_VALUE, 3000));\n shortPane.add(Box.createRigidArea(new Dimension(20, 0)));\n\n // create books retrieved JTextField\n reviewedField = new JTextField();\n reviewedField.setOpaque(false);\n reviewedField\n .setMaximumSize(new Dimension(Integer.MAX_VALUE, reviewedField.getPreferredSize().height));\n reviewedField.setBorder(BorderFactory.createEmptyBorder());\n reviewedField.setFont(new Font(\"LabelStyle\", Font.BOLD, 12));\n\n // create long form panel\n\n longPane = new JPanel();\n longPane.setLayout(new BoxLayout(longPane, BoxLayout.LINE_AXIS));\n longForm = new JTextPane();\n longScroll = new JScrollPane(longForm);\n longForm.setEditable(false);\n longForm.setFont(new Font(\"LabelStyle\", Font.BOLD, 15));\n longPane.add(Box.createRigidArea(new Dimension(20, 0)));\n longPane.add(longScroll);\n longPane.setPreferredSize(new Dimension(Integer.MAX_VALUE, 3000));\n longPane.add(Box.createRigidArea(new Dimension(20, 0)));\n\n this.add(Box.createRigidArea(new Dimension(0, 10)));\n this.add(topButtons);\n this.add(Box.createRigidArea(new Dimension(0, 10)));\n this.add(highSearchPane);\n this.add(Box.createRigidArea(new Dimension(0, 10)));\n this.add(lowSearchPan);\n this.add(Box.createRigidArea(new Dimension(0, 20)));\n this.add(shortPane);\n this.add(Box.createRigidArea(new Dimension(0, 5)));\n this.add(reviewedField);\n this.add(Box.createRigidArea(new Dimension(0, 5)));\n this.add(longPane);\n this.add(Box.createRigidArea(new Dimension(0, 10)));\n }",
"private void fillSearchFields() {\n view.setMinPrice(1);\n view.setMaxPrice(10000);\n view.setMinSQM(1);\n view.setMaxSQM(10000);\n view.setBedrooms(1);\n view.setBathrooms(1);\n view.setFloor(1);\n view.setHeating(false);\n view.setLocation(\"Athens\");\n }",
"public abstract void addSelectorForm();",
"private void buildIngrePanel(){\n\n ingreToolBar = new JToolBar();\n ingreToolBar.setFloatable(false);\n\n ingreSearchTF = new SelfClearingTextField(\"Search\", 60);\n\n ingreSearchTF.addKeyListener(new KeyListener() {\n @Override\n public void keyTyped(KeyEvent e) {\n\n }\n\n @Override\n public void keyPressed(KeyEvent e) {\n\n }\n\n @Override\n public void keyReleased(KeyEvent e) {\n String search = ingreSearchTF.getText().toUpperCase();\n filter(search);\n }\n });\n\n ingreAddB =new JButton(\"Add\");\n\n ingrePurchaseB =new JButton(\"Purchase\");\n\n ingreRemoveB = new JButton(\"Remove\");\n ingreUseB = new JButton(\"Use\"); //TODO think of better name!!\n\n\n ingreSearchTF.setColumns(12);\n\n //The following code builds toolbar;\n {\n\n\n\n ingreToolBar.add(ingreSearchTF);\n ingreToolBar.add(ingreUseB);\n\n if(IM.getAccount().isManPriv() || IM.getAccount().isAdminPriv()) {\n ingreToolBar.add(ingreAddB);\n ingreToolBar.add(ingrePurchaseB);\n\n ingreToolBar.add(ingreRemoveB);\n }\n\n }\n\n // The following code adds the listener to the Buttons.\n {\n\n\n ingreAddB.addActionListener(this);\n ingrePurchaseB.addActionListener(this);\n ingreRemoveB.addActionListener(this);\n ingreUseB.addActionListener(this);\n\n }\n\n\n\n\n\n\n\n}",
"public static AssessmentSearchForm openFillSearchForm(Assessment assm) {\n openCreationSearchForm(Roles.STAFF, WingsTopMenu.WingsStaffMenuItem.P_ASSESSMENTS, Popup.Search);\n\n Logger.getInstance().info(\"Fill out some search criteria fields with any data\");\n AssessmentSearchForm searchPage = new AssessmentSearchForm();\n searchPage.fillSearchForm(assm);\n\n return new AssessmentSearchForm();\n }",
"public QueryInvoiceForm() {\n\t\tTimeZone.setDefault(TimeZone.getTimeZone(\"UTC\"));\n\t\tgetQuery();\n\t\tJLabel topicLabel = new JLabel(\"Query Invoice Table \");\n\t\tJButton addButton = new JButton(\"Create\");\n\t\tJButton updateButton = new JButton(\"Update\");\n\t\tJButton deleteButton = new JButton(\"Delete\");\n\n\t\taddButtonHandler addHandler = new addButtonHandler();\n\t\taddButton.addActionListener(addHandler);\n\t\tupdateButtonHandler updateHandler = new updateButtonHandler();\n\t\tupdateButton.addActionListener(updateHandler);\n\t\tdeleteButtonHandler deleteHandler = new deleteButtonHandler();\n\t\tdeleteButton.addActionListener(deleteHandler);\n\n\t\t// set up table search bar and sorter\n\t\tfinal TableRowSorter<TableModel> sorter = new TableRowSorter<TableModel>(model);\n\t\tjtable.setRowSorter(sorter);\n\n\t\tsearchBarField = new JTextField(\n\t\t\t\t\"Enter query here (Click on the field to clear it, then press Enter to clear query)\");\n\t\tsearchBarField.setHorizontalAlignment(JTextField.CENTER);\n\t\tsearchBarField.setPreferredSize(new Dimension(500, 40));\n\n\t\tsearchBarField.addKeyListener(new KeyListener() {\n\t\t\tString query;\n\n\t\t\t@Override\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyPressed(KeyEvent event) {\n\t\t\t\tif (event.getKeyCode() == KeyEvent.VK_ENTER) {\n\t\t\t\t\tquery = searchBarField.getText();\n\t\t\t\t\tif (query.length() == 0) {\n\t\t\t\t\t\tsorter.setRowFilter(null);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsorter.setRowFilter(RowFilter.regexFilter(query));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t}\n\t\t});\n\n\t\tClearFieldHandler clickClear = new ClearFieldHandler();\n\t\tsearchBarField.addMouseListener(clickClear);\n\n\t\ttopPadding = BorderFactory.createEmptyBorder(-15, 0, 0, 0);\n\t\ttopPanel.setLayout(new BorderLayout());\n\t\ttopPanel.setBorder(topPadding);\n\t\t\n\t\t/* add components */\n\t\ttopPanel.add(topicLabel);\n\t\ttopPanel.add(searchBarField);\n\t\tpanel.add(jtablePanel);\n\t\tbottomPanel.add(addButton);\n\t\tbottomPanel.add(new JLabel(\" \"));\n\t\tbottomPanel.add(updateButton);\n\t\tbottomPanel.add(new JLabel(\" \"));\n\t\tbottomPanel.add(deleteButton);\n\t\tqueryInvoiceFormPanel.add(topPanel);\n\t\tqueryInvoiceFormPanel.add(panel);\n\t\tqueryInvoiceFormPanel.add(bottomPanel);\n\n\t\t/* set Style */\n\t\tFont topicFont = new Font(\"Calibri\", Font.BOLD, 25);\n\t\tFont buttonFont = new Font(\"Calibri\", Font.BOLD, 15);\n\t\tBorder formBorder = BorderFactory.createLineBorder(Color.LIGHT_GRAY, 3);\n\t\tDimension buttonSize = new Dimension(200, 50);\n\n\t\ttopicLabel.setFont(topicFont);\n\t\t\n\t\taddButton.setFont(buttonFont);\n\t\tupdateButton.setFont(buttonFont);\n\t\tdeleteButton.setFont(buttonFont);\n\t\t\n\t\taddButton.setBackground(Color.lightGray);\n\t\tupdateButton.setBackground(Color.lightGray);\n\t\tdeleteButton.setBackground(Color.lightGray);\n\t\t\n\t\taddButton.setPreferredSize(buttonSize);\n\t\tupdateButton.setPreferredSize(buttonSize);\n\t\tdeleteButton.setPreferredSize(buttonSize);\n\t\t\n\t\tjtablePanel.setPreferredSize(new Dimension(1260, 500));\n\t\tjtablePanel.setBorder(formBorder);\n\t\ttopPanel.setLayout(new FlowLayout(1, 0, 30));\n\t\ttopPanel.setPreferredSize(new Dimension(1260, 100));\n\t\ttopPanel.setOpaque(false);\n\t\tpanel.setPreferredSize(new Dimension(1280, 520));\n\t\tpanel.setOpaque(false);\n\t\tbottomPanel.setLayout(new FlowLayout(1, 0, 10));\n\t\tbottomPanel.setPreferredSize(new Dimension(1260, 80));\n\t\tbottomPanel.setOpaque(false);\n\t\tqueryInvoiceFormPanel.setBackground(Color.WHITE);\n\t}",
"private void buildAnalyzePanel(){\n //Create the buttonPanel\n analyzePanel = new JPanel();\n\n //Create the button\n analyzeButton = new JButton(\"Analyze\");\n\n // Add an action listener to the button\n analyzeButton.addActionListener(new ButtonListener());\n\n //Add the button to the panel\n analyzePanel.add(analyzeButton);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n SearchBoxPanel = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n searchField = new javax.swing.JTextField();\n ingredientsPanel = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n componentsList = new javax.swing.JList();\n\n setPreferredSize(new java.awt.Dimension(260, 507));\n setLayout(new java.awt.BorderLayout());\n\n jLabel1.setText(\"Search:\");\n\n searchField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n searchFieldActionPerformed(evt);\n }\n });\n searchField.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n searchFieldKeyTyped(evt);\n }\n });\n\n javax.swing.GroupLayout SearchBoxPanelLayout = new javax.swing.GroupLayout(SearchBoxPanel);\n SearchBoxPanel.setLayout(SearchBoxPanelLayout);\n SearchBoxPanelLayout.setHorizontalGroup(\n SearchBoxPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, SearchBoxPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(SearchBoxPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(searchField, javax.swing.GroupLayout.DEFAULT_SIZE, 224, Short.MAX_VALUE))\n .addGap(26, 26, 26))\n );\n SearchBoxPanelLayout.setVerticalGroup(\n SearchBoxPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(SearchBoxPanelLayout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(searchField)\n .addGap(16, 16, 16))\n );\n\n add(SearchBoxPanel, java.awt.BorderLayout.PAGE_START);\n\n ingredientsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Ingredients\"));\n\n jScrollPane1.setViewportView(componentsList);\n\n javax.swing.GroupLayout ingredientsPanelLayout = new javax.swing.GroupLayout(ingredientsPanel);\n ingredientsPanel.setLayout(ingredientsPanelLayout);\n ingredientsPanelLayout.setHorizontalGroup(\n ingredientsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(ingredientsPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 238, Short.MAX_VALUE))\n );\n ingredientsPanelLayout.setVerticalGroup(\n ingredientsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(ingredientsPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 389, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n add(ingredientsPanel, java.awt.BorderLayout.CENTER);\n }",
"Search getSearch();",
"public SearchSupplierFrm(Staff s) {\n super(\"Tìm kiếm Nhà cung cấp \");\n this.s = s;\n initComponents();\n listSupplier = new ArrayList<>();\n \n\n }",
"@SuppressWarnings(\"unchecked\")\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\"> \r\n private void initComponents() {\r\n\r\n jButton1 = new javax.swing.JButton();\r\n jTextField1 = new javax.swing.JTextField();\r\n\r\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\r\n\r\n jButton1.setText(\"Search\");\r\n jButton1.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jButton1ActionPerformed(evt);\r\n }\r\n });\r\n\r\n jTextField1.setText(\"Type Here\");\r\n\r\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\r\n getContentPane().setLayout(layout);\r\n layout.setHorizontalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGap(122, 122, 122))\r\n .addGroup(layout.createSequentialGroup()\r\n .addGap(38, 38, 38)\r\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 336, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addContainerGap(26, Short.MAX_VALUE))\r\n );\r\n layout.setVerticalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addGap(61, 61, 61)\r\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGap(29, 29, 29)\r\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addContainerGap(137, Short.MAX_VALUE))\r\n );\r\n\r\n pack();\r\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">\n private void initComponents() {\n\n pnlSearch = new javax.swing.JPanel();\n txtSearch = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n cmbSearch = new javax.swing.JComboBox();\n btnSearch = new javax.swing.JButton();\n pnlFunction = new javax.swing.JPanel();\n btnAddContact = new javax.swing.JButton();\n btnEdite = new javax.swing.JButton();\n btnDelete = new javax.swing.JButton();\n pnlTable = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n tblContacts = new javax.swing.JTable();\n tblContacts.setCellSelectionEnabled(true);\n btnPrevious = new javax.swing.JButton();\n javax.swing.JButton btnNext = new javax.swing.JButton();\n btnPrint = new javax.swing.JButton();\n jMenuBar1 = new javax.swing.JMenuBar();\n jMenu1 = new javax.swing.JMenu();\n jMenu2 = new javax.swing.JMenu();\n jMenu3 = new javax.swing.JMenu();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n this.setResizable(false);\n\n pnlSearch.setBorder(javax.swing.BorderFactory.createTitledBorder(\" Search \"));\n\n \n\n jLabel5.setText(\"Search By\");\n\n cmbSearch.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"First Name\",\"Last Name\",\"Phone Nummber\",\"Email Address\" }));\n\n btnSearch.setText(\"Search\");\n\n javax.swing.GroupLayout gl_pnlSearch = new javax.swing.GroupLayout(pnlSearch);\n pnlSearch.setLayout(gl_pnlSearch);\n gl_pnlSearch.setHorizontalGroup(\n gl_pnlSearch.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(gl_pnlSearch.createSequentialGroup()\n .addGap(9, 9, 9)\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(cmbSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtSearch, javax.swing.GroupLayout.DEFAULT_SIZE, 157, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n gl_pnlSearch.setVerticalGroup(\n gl_pnlSearch.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(gl_pnlSearch.createSequentialGroup()\n .addGroup(gl_pnlSearch.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(cmbSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5)\n .addComponent(btnSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pnlFunction.setBorder(javax.swing.BorderFactory.createTitledBorder(\" Main Functions \"));\n\n btnAddContact.setText(\"Add Contact\");\n\n btnEdite.setText(\"Edit\");\n\n btnDelete.setText(\"Delete\");\n\n javax.swing.GroupLayout gl_pnlFunction = new javax.swing.GroupLayout(pnlFunction);\n pnlFunction.setLayout(gl_pnlFunction);\n gl_pnlFunction.setHorizontalGroup(\n gl_pnlFunction.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(gl_pnlFunction.createSequentialGroup()\n .addContainerGap()\n .addComponent(btnAddContact, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnEdite, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnDelete, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n gl_pnlFunction.setVerticalGroup(\n gl_pnlFunction.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(gl_pnlFunction.createSequentialGroup()\n .addGroup(gl_pnlFunction.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnAddContact, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnEdite, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnDelete, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pnlTable.setBorder(javax.swing.BorderFactory.createTitledBorder(\" E-mail \"));\n\n tblContacts.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Frist Name\", \"Last Name\", \"Fax\",\"Mobile Nummber\", \"Email Address\",\"Details\"\n }\n ));\n jScrollPane1.setViewportView(tblContacts);\n\n javax.swing.GroupLayout gl_pnlTable = new javax.swing.GroupLayout(pnlTable);\n pnlTable.setLayout(gl_pnlTable);\n gl_pnlTable.setHorizontalGroup(\n gl_pnlTable.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1)\n );\n gl_pnlTable.setVerticalGroup(\n gl_pnlTable.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, gl_pnlTable.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 275, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(160, 160, 160))\n );\n\n btnPrevious.setText(\"Previous\");\n\n btnNext.setText(\"Next\");\n\n btnPrint.setText(\"Print\");\n\n jMenu1.setText(\"File\");\n jMenuBar1.add(jMenu1);\n\n jMenu2.setText(\"Edit\");\n jMenuBar1.add(jMenu2);\n\n jMenu3.setText(\"Help\");\n jMenuBar1.add(jMenu3);\n\n setJMenuBar(jMenuBar1);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(btnPrevious, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnNext, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(201, 201, 201)\n .addComponent(btnPrint, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(34, 34, 34))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(pnlTable, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(pnlSearch, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(pnlFunction, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(22, 22, 22))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(pnlSearch, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(pnlFunction, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(pnlTable, javax.swing.GroupLayout.DEFAULT_SIZE, 330, Short.MAX_VALUE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnNext, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnPrevious, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnPrint, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n\n pnlFunction.getAccessibleContext().setAccessibleName(\"name\");\n\n pack();\n }",
"private FactoryViewPanel buildBasicPanel()\r\n {\r\n FactoryViewPanel panel = new FactoryViewPanel();\r\n JComponent pathComponent = addField(panel, myDataSourceModel.getPath());\r\n if (pathComponent instanceof JTextComponent)\r\n {\r\n ((JTextComponent)pathComponent).setEditable(false);\r\n }\r\n addField(panel, myDataSourceModel.getSourceName());\r\n return panel;\r\n }",
"private JPanel createPanelKeywordt() {\n\n JPanel panel2 = new JPanel(new BorderLayout());\n panel2.setBorder(PADDING_BORDER);\n\n JPanel panelButton = new JPanel(new FlowLayout(FlowLayout.CENTER));\n panelButton.add(createButtonAddKeyword());\n\n panel2.add(createScrollPaneKeyWords(), BorderLayout.NORTH);\n panel2.add(panelButton, BorderLayout.CENTER);\n panel2.add(createConfirmButtonsPanel(), BorderLayout.SOUTH);\n return panel2;\n }",
"private void initComponents() {\n java.awt.GridBagConstraints gridBagConstraints;\n\n buttonGroupSearch = new javax.swing.ButtonGroup();\n buttonGroup2 = new javax.swing.ButtonGroup();\n buttonGroupReplace = new javax.swing.ButtonGroup();\n buttonGroupSearchState = new javax.swing.ButtonGroup();\n jPanel1 = new javax.swing.JPanel();\n m_searchLabel = new javax.swing.JLabel();\n m_searchField = new javax.swing.JComboBox<String>();\n m_replaceLabel = new javax.swing.JLabel();\n m_replaceField = new javax.swing.JComboBox<String>();\n m_searchButton = new javax.swing.JButton();\n m_panelSearch = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n m_searchExactSearchRB = new javax.swing.JRadioButton();\n filler3 = new javax.swing.Box.Filler(new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 32767));\n m_searchKeywordSearchRB = new javax.swing.JRadioButton();\n filler4 = new javax.swing.Box.Filler(new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 32767));\n m_searchRegexpSearchRB = new javax.swing.JRadioButton();\n filler14 = new javax.swing.Box.Filler(new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 32767));\n m_resultsLabel = new javax.swing.JLabel();\n filler2 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0));\n jPanel3 = new javax.swing.JPanel();\n m_searchCase = new javax.swing.JCheckBox();\n filler29 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767));\n m_searchSpaceMatchNbsp = new javax.swing.JCheckBox();\n filler5 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767));\n m_searchSource = new javax.swing.JCheckBox();\n filler17 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767));\n m_searchTranslation = new javax.swing.JCheckBox();\n filler6 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767));\n m_searchNotesCB = new javax.swing.JCheckBox();\n filler24 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767));\n m_searchCommentsCB = new javax.swing.JCheckBox();\n filler23 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0));\n jPanel12 = new javax.swing.JPanel();\n m_searchTranslatedUntranslated = new javax.swing.JRadioButton();\n filler27 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767));\n m_searchTranslated = new javax.swing.JRadioButton();\n filler28 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767));\n m_searchUntranslated = new javax.swing.JRadioButton();\n filler8 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767));\n m_displayLabel = new javax.swing.JLabel();\n m_allResultsCB = new javax.swing.JCheckBox();\n m_fileNamesCB = new javax.swing.JCheckBox();\n filler26 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0));\n m_panelReplace = new javax.swing.JPanel();\n jPanel5 = new javax.swing.JPanel();\n m_replaceExactSearchRB = new javax.swing.JRadioButton();\n filler19 = new javax.swing.Box.Filler(new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 32767));\n m_replaceRegexpSearchRB = new javax.swing.JRadioButton();\n filler20 = new javax.swing.Box.Filler(new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 32767));\n m_resultsLabel1 = new javax.swing.JLabel();\n filler21 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0));\n jPanel11 = new javax.swing.JPanel();\n m_replaceCase = new javax.swing.JCheckBox();\n filler22 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767));\n m_replaceSpaceMatchNbsp = new javax.swing.JCheckBox();\n filler30 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767));\n m_replaceUntranslated = new javax.swing.JCheckBox();\n filler11 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0));\n m_SearchInPane = new javax.swing.JPanel();\n jPanel13 = new javax.swing.JPanel();\n m_SearchInProjectPane = new javax.swing.JPanel();\n m_rbProject = new javax.swing.JRadioButton();\n m_cbSearchInMemory = new javax.swing.JCheckBox();\n m_cbSearchInTMs = new javax.swing.JCheckBox();\n m_cbSearchInGlossaries = new javax.swing.JCheckBox();\n jPanel9 = new javax.swing.JPanel();\n filler25 = new javax.swing.Box.Filler(new java.awt.Dimension(15, 0), new java.awt.Dimension(15, 0), new java.awt.Dimension(15, 32767));\n jSeparator1 = new javax.swing.JSeparator();\n filler9 = new javax.swing.Box.Filler(new java.awt.Dimension(15, 0), new java.awt.Dimension(15, 0), new java.awt.Dimension(15, 32767));\n m_SearchInDirPane = new javax.swing.JPanel();\n jPanel10 = new javax.swing.JPanel();\n m_rbDir = new javax.swing.JRadioButton();\n filler15 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0));\n m_recursiveCB = new javax.swing.JCheckBox();\n m_dirLabel = new javax.swing.JLabel();\n m_dirField = new javax.swing.JTextField();\n m_dirButton = new javax.swing.JButton();\n m_advancedVisiblePane = new javax.swing.JPanel();\n m_authorCB = new javax.swing.JCheckBox();\n m_authorField = new org.omegat.gui.search.MFindField();\n m_authorField.setDefaultText(OStrings.getString(\"TF_CUR_SEGMENT_UNKNOWN_AUTHOR\"));\n m_dateFromCB = new javax.swing.JCheckBox();\n m_dateFromButton = new javax.swing.JButton();\n m_dateToCB = new javax.swing.JCheckBox();\n m_dateToButton = new javax.swing.JButton();\n m_numberLabel = new javax.swing.JLabel();\n m_numberOfResults = new javax.swing.JSpinner();\n m_dateFromSpinner = new javax.swing.JSpinner();\n m_dateToSpinner = new javax.swing.JSpinner();\n filler7 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0));\n m_excludeOrphans = new javax.swing.JCheckBox();\n m_fullHalfWidthInsensitive = new javax.swing.JCheckBox();\n jPanel4 = new javax.swing.JPanel();\n m_advancedButton = new javax.swing.JButton();\n filler10 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0));\n jScrollPane1 = new javax.swing.JScrollPane();\n m_viewer = new EntryListPane();\n jPanel8 = new javax.swing.JPanel();\n filler13 = new javax.swing.Box.Filler(new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 32767));\n jPanel7 = new javax.swing.JPanel();\n m_autoSyncWithEditor = new javax.swing.JCheckBox();\n m_backToInitialSegment = new javax.swing.JCheckBox();\n filler12 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0));\n m_replaceAllButton = new javax.swing.JButton();\n filler18 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767));\n m_replaceButton = new javax.swing.JButton();\n filler16 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767));\n m_filterButton = new javax.swing.JButton();\n filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767));\n m_dismissButton = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n getContentPane().setLayout(new java.awt.GridBagLayout());\n\n jPanel1.setLayout(new java.awt.GridBagLayout());\n\n org.openide.awt.Mnemonics.setLocalizedText(m_searchLabel, OStrings.getString(\"SW_SEARCH_TEXT\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n jPanel1.add(m_searchLabel, gridBagConstraints);\n\n m_searchField.setEditable(true);\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 10);\n jPanel1.add(m_searchField, gridBagConstraints);\n\n org.openide.awt.Mnemonics.setLocalizedText(m_replaceLabel, OStrings.getString(\"SW_REPLACE_TEXT\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n jPanel1.add(m_replaceLabel, gridBagConstraints);\n\n m_replaceField.setEditable(true);\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 10);\n jPanel1.add(m_replaceField, gridBagConstraints);\n\n org.openide.awt.Mnemonics.setLocalizedText(m_searchButton, OStrings.getString(\"BUTTON_SEARCH\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 0;\n jPanel1.add(m_searchButton, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);\n getContentPane().add(jPanel1, gridBagConstraints);\n\n m_panelSearch.setLayout(new java.awt.GridLayout(3, 0));\n\n jPanel2.setLayout(new javax.swing.BoxLayout(jPanel2, javax.swing.BoxLayout.LINE_AXIS));\n\n buttonGroupSearch.add(m_searchExactSearchRB);\n m_searchExactSearchRB.setSelected(true);\n org.openide.awt.Mnemonics.setLocalizedText(m_searchExactSearchRB, OStrings.getString(\"SW_EXACT_SEARCH\")); // NOI18N\n jPanel2.add(m_searchExactSearchRB);\n jPanel2.add(filler3);\n\n buttonGroupSearch.add(m_searchKeywordSearchRB);\n org.openide.awt.Mnemonics.setLocalizedText(m_searchKeywordSearchRB, OStrings.getString(\"SW_WORD_SEARCH\")); // NOI18N\n jPanel2.add(m_searchKeywordSearchRB);\n jPanel2.add(filler4);\n\n buttonGroupSearch.add(m_searchRegexpSearchRB);\n org.openide.awt.Mnemonics.setLocalizedText(m_searchRegexpSearchRB, OStrings.getString(\"SW_REGEXP_SEARCH\")); // NOI18N\n jPanel2.add(m_searchRegexpSearchRB);\n jPanel2.add(filler14);\n jPanel2.add(m_resultsLabel);\n jPanel2.add(filler2);\n\n m_panelSearch.add(jPanel2);\n\n jPanel3.setLayout(new javax.swing.BoxLayout(jPanel3, javax.swing.BoxLayout.LINE_AXIS));\n\n m_searchCase.setSelected(true);\n org.openide.awt.Mnemonics.setLocalizedText(m_searchCase, OStrings.getString(\"SW_CASE_SENSITIVE\")); // NOI18N\n jPanel3.add(m_searchCase);\n jPanel3.add(filler29);\n\n org.openide.awt.Mnemonics.setLocalizedText(m_searchSpaceMatchNbsp, OStrings.getString(\"SW_SEARCH_SPACE_MATCH_NBSP\")); // NOI18N\n jPanel3.add(m_searchSpaceMatchNbsp);\n jPanel3.add(filler5);\n\n m_searchSource.setSelected(true);\n org.openide.awt.Mnemonics.setLocalizedText(m_searchSource, OStrings.getString(\"SW_SEARCH_SOURCE\")); // NOI18N\n jPanel3.add(m_searchSource);\n jPanel3.add(filler17);\n\n m_searchTranslation.setSelected(true);\n org.openide.awt.Mnemonics.setLocalizedText(m_searchTranslation, OStrings.getString(\"SW_SEARCH_TRANSLATION\")); // NOI18N\n jPanel3.add(m_searchTranslation);\n jPanel3.add(filler6);\n\n m_searchNotesCB.setSelected(true);\n org.openide.awt.Mnemonics.setLocalizedText(m_searchNotesCB, OStrings.getString(\"SW_SEARCH_NOTES\")); // NOI18N\n jPanel3.add(m_searchNotesCB);\n jPanel3.add(filler24);\n\n org.openide.awt.Mnemonics.setLocalizedText(m_searchCommentsCB, OStrings.getString(\"SW_SEARCH_COMMENTS\")); // NOI18N\n jPanel3.add(m_searchCommentsCB);\n jPanel3.add(filler23);\n\n m_panelSearch.add(jPanel3);\n\n jPanel12.setLayout(new javax.swing.BoxLayout(jPanel12, javax.swing.BoxLayout.LINE_AXIS));\n\n buttonGroupSearchState.add(m_searchTranslatedUntranslated);\n m_searchTranslatedUntranslated.setSelected(true);\n org.openide.awt.Mnemonics.setLocalizedText(m_searchTranslatedUntranslated, OStrings.getString(\"SW_SEARCH_TRANSLATEDUNTRANSLATED\")); // NOI18N\n jPanel12.add(m_searchTranslatedUntranslated);\n jPanel12.add(filler27);\n\n buttonGroupSearchState.add(m_searchTranslated);\n org.openide.awt.Mnemonics.setLocalizedText(m_searchTranslated, OStrings.getString(\"SW_SEARCH_TRANSLATED\")); // NOI18N\n jPanel12.add(m_searchTranslated);\n jPanel12.add(filler28);\n\n buttonGroupSearchState.add(m_searchUntranslated);\n org.openide.awt.Mnemonics.setLocalizedText(m_searchUntranslated, OStrings.getString(\"SW_SEARCH_UNTRANSLATED\")); // NOI18N\n jPanel12.add(m_searchUntranslated);\n jPanel12.add(filler8);\n\n m_displayLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n org.openide.awt.Mnemonics.setLocalizedText(m_displayLabel, OStrings.getString(\"SW_DISPLAY_LABEL\")); // NOI18N\n jPanel12.add(m_displayLabel);\n\n m_allResultsCB.setSelected(true);\n org.openide.awt.Mnemonics.setLocalizedText(m_allResultsCB, OStrings.getString(\"SW_ALL_RESULTS\")); // NOI18N\n jPanel12.add(m_allResultsCB);\n\n org.openide.awt.Mnemonics.setLocalizedText(m_fileNamesCB, OStrings.getString(\"SW_FILE_NAMES\")); // NOI18N\n jPanel12.add(m_fileNamesCB);\n jPanel12.add(filler26);\n\n m_panelSearch.add(jPanel12);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);\n getContentPane().add(m_panelSearch, gridBagConstraints);\n\n m_panelReplace.setLayout(new java.awt.GridLayout(2, 0));\n\n jPanel5.setLayout(new javax.swing.BoxLayout(jPanel5, javax.swing.BoxLayout.LINE_AXIS));\n\n buttonGroupReplace.add(m_replaceExactSearchRB);\n m_replaceExactSearchRB.setSelected(true);\n org.openide.awt.Mnemonics.setLocalizedText(m_replaceExactSearchRB, OStrings.getString(\"SW_EXACT_SEARCH\")); // NOI18N\n jPanel5.add(m_replaceExactSearchRB);\n jPanel5.add(filler19);\n\n buttonGroupReplace.add(m_replaceRegexpSearchRB);\n org.openide.awt.Mnemonics.setLocalizedText(m_replaceRegexpSearchRB, OStrings.getString(\"SW_REGEXP_SEARCH\")); // NOI18N\n jPanel5.add(m_replaceRegexpSearchRB);\n jPanel5.add(filler20);\n jPanel5.add(m_resultsLabel1);\n jPanel5.add(filler21);\n\n m_panelReplace.add(jPanel5);\n\n jPanel11.setLayout(new javax.swing.BoxLayout(jPanel11, javax.swing.BoxLayout.LINE_AXIS));\n\n m_replaceCase.setSelected(true);\n org.openide.awt.Mnemonics.setLocalizedText(m_replaceCase, OStrings.getString(\"SW_CASE_SENSITIVE\")); // NOI18N\n jPanel11.add(m_replaceCase);\n jPanel11.add(filler22);\n\n org.openide.awt.Mnemonics.setLocalizedText(m_replaceSpaceMatchNbsp, OStrings.getString(\"SW_SEARCH_SPACE_MATCH_NBSP\")); // NOI18N\n jPanel11.add(m_replaceSpaceMatchNbsp);\n jPanel11.add(filler30);\n\n org.openide.awt.Mnemonics.setLocalizedText(m_replaceUntranslated, OStrings.getString(\"SW_REPLACE_UNTRANSLATED\")); // NOI18N\n jPanel11.add(m_replaceUntranslated);\n jPanel11.add(filler11);\n\n m_panelReplace.add(jPanel11);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);\n getContentPane().add(m_panelReplace, gridBagConstraints);\n\n m_SearchInPane.setBorder(javax.swing.BorderFactory.createTitledBorder(OStrings.getString(\"SW_SEARCH_IN_BOX\"))); // NOI18N\n m_SearchInPane.setLayout(new java.awt.BorderLayout());\n\n jPanel13.setLayout(new java.awt.BorderLayout());\n\n m_SearchInProjectPane.setLayout(new java.awt.GridBagLayout());\n\n buttonGroup2.add(m_rbProject);\n org.openide.awt.Mnemonics.setLocalizedText(m_rbProject, OStrings.getString(\"SW_PROJECT_SEARCH\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.gridwidth = 3;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n m_SearchInProjectPane.add(m_rbProject, gridBagConstraints);\n\n m_cbSearchInMemory.setSelected(true);\n org.openide.awt.Mnemonics.setLocalizedText(m_cbSearchInMemory, OStrings.getString(\"SW_SEARCH_IN_MEMORY\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);\n m_SearchInProjectPane.add(m_cbSearchInMemory, gridBagConstraints);\n\n m_cbSearchInTMs.setSelected(true);\n org.openide.awt.Mnemonics.setLocalizedText(m_cbSearchInTMs, OStrings.getString(\"SW_SEARCH_IN_TMS\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);\n m_SearchInProjectPane.add(m_cbSearchInTMs, gridBagConstraints);\n\n m_cbSearchInGlossaries.setSelected(true);\n org.openide.awt.Mnemonics.setLocalizedText(m_cbSearchInGlossaries, OStrings.getString(\"SW_SEARCH_IN_GLOSSARIES\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);\n m_SearchInProjectPane.add(m_cbSearchInGlossaries, gridBagConstraints);\n\n jPanel13.add(m_SearchInProjectPane, java.awt.BorderLayout.WEST);\n\n jPanel9.setLayout(new java.awt.BorderLayout());\n jPanel9.add(filler25, java.awt.BorderLayout.WEST);\n\n jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL);\n jPanel9.add(jSeparator1, java.awt.BorderLayout.CENTER);\n jPanel9.add(filler9, java.awt.BorderLayout.EAST);\n\n jPanel13.add(jPanel9, java.awt.BorderLayout.EAST);\n\n m_SearchInPane.add(jPanel13, java.awt.BorderLayout.WEST);\n\n m_SearchInDirPane.setLayout(new java.awt.GridBagLayout());\n\n jPanel10.setOpaque(false);\n jPanel10.setLayout(new javax.swing.BoxLayout(jPanel10, javax.swing.BoxLayout.LINE_AXIS));\n\n buttonGroup2.add(m_rbDir);\n org.openide.awt.Mnemonics.setLocalizedText(m_rbDir, OStrings.getString(\"SW_DIR_SEARCH\")); // NOI18N\n jPanel10.add(m_rbDir);\n jPanel10.add(filler15);\n\n m_recursiveCB.setSelected(true);\n org.openide.awt.Mnemonics.setLocalizedText(m_recursiveCB, OStrings.getString(\"SW_DIR_RECURSIVE\")); // NOI18N\n m_recursiveCB.setEnabled(false);\n jPanel10.add(m_recursiveCB);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.gridwidth = 3;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 1.0;\n m_SearchInDirPane.add(jPanel10, gridBagConstraints);\n\n org.openide.awt.Mnemonics.setLocalizedText(m_dirLabel, OStrings.getString(\"SW_LOCATION\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);\n m_SearchInDirPane.add(m_dirLabel, gridBagConstraints);\n\n m_dirField.setEditable(false);\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);\n m_SearchInDirPane.add(m_dirField, gridBagConstraints);\n\n org.openide.awt.Mnemonics.setLocalizedText(m_dirButton, OStrings.getString(\"SW_BROWSE\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);\n m_SearchInDirPane.add(m_dirButton, gridBagConstraints);\n\n m_SearchInPane.add(m_SearchInDirPane, java.awt.BorderLayout.CENTER);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n getContentPane().add(m_SearchInPane, gridBagConstraints);\n\n m_advancedVisiblePane.setLayout(new java.awt.GridBagLayout());\n\n org.openide.awt.Mnemonics.setLocalizedText(m_authorCB, OStrings.getString(\"SW_AUTHOR\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n m_advancedVisiblePane.add(m_authorCB, gridBagConstraints);\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.gridwidth = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n m_advancedVisiblePane.add(m_authorField, gridBagConstraints);\n\n org.openide.awt.Mnemonics.setLocalizedText(m_dateFromCB, OStrings.getString(\"SW_CHANGED_AFTER\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n m_advancedVisiblePane.add(m_dateFromCB, gridBagConstraints);\n\n org.openide.awt.Mnemonics.setLocalizedText(m_dateFromButton, OStrings.getString(\"SW_NOW\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 1;\n m_advancedVisiblePane.add(m_dateFromButton, gridBagConstraints);\n\n org.openide.awt.Mnemonics.setLocalizedText(m_dateToCB, OStrings.getString(\"SW_CHANGED_BEFORE\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n m_advancedVisiblePane.add(m_dateToCB, gridBagConstraints);\n\n org.openide.awt.Mnemonics.setLocalizedText(m_dateToButton, OStrings.getString(\"SW_NOW\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 2;\n m_advancedVisiblePane.add(m_dateToButton, gridBagConstraints);\n\n org.openide.awt.Mnemonics.setLocalizedText(m_numberLabel, OStrings.getString(\"SW_NUMBER\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 4;\n m_advancedVisiblePane.add(m_numberLabel, gridBagConstraints);\n\n m_numberOfResults.setModel(new javax.swing.SpinnerNumberModel());\n m_numberOfResults.setMinimumSize(new java.awt.Dimension(100, 28));\n m_numberOfResults.setPreferredSize(new java.awt.Dimension(100, 28));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 5;\n m_advancedVisiblePane.add(m_numberOfResults, gridBagConstraints);\n\n m_dateFromSpinner.setModel(new javax.swing.SpinnerDateModel());\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n m_advancedVisiblePane.add(m_dateFromSpinner, gridBagConstraints);\n\n m_dateToSpinner.setModel(new javax.swing.SpinnerDateModel());\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n m_advancedVisiblePane.add(m_dateToSpinner, gridBagConstraints);\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 1.0;\n m_advancedVisiblePane.add(filler7, gridBagConstraints);\n\n org.openide.awt.Mnemonics.setLocalizedText(m_excludeOrphans, OStrings.getString(\"SW_EXCLUDE_ORPHANS\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 4;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n m_advancedVisiblePane.add(m_excludeOrphans, gridBagConstraints);\n\n org.openide.awt.Mnemonics.setLocalizedText(m_fullHalfWidthInsensitive, OStrings.getString(\"SW_FULLHALFWIDTH_INSENSITIVE\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 4;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n m_advancedVisiblePane.add(m_fullHalfWidthInsensitive, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);\n getContentPane().add(m_advancedVisiblePane, gridBagConstraints);\n\n jPanel4.setLayout(new javax.swing.BoxLayout(jPanel4, javax.swing.BoxLayout.LINE_AXIS));\n\n org.openide.awt.Mnemonics.setLocalizedText(m_advancedButton, OStrings.getString(\"SW_SHOW_ADVANCED_OPTIONS\")); // NOI18N\n jPanel4.add(m_advancedButton);\n jPanel4.add(filler10);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);\n getContentPane().add(jPanel4, gridBagConstraints);\n\n m_viewer.setText(OStrings.getString(\"SW_VIEWER_TEXT\")); // NOI18N\n jScrollPane1.setViewportView(m_viewer);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.weighty = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);\n getContentPane().add(jScrollPane1, gridBagConstraints);\n\n jPanel8.setLayout(new javax.swing.BoxLayout(jPanel8, javax.swing.BoxLayout.LINE_AXIS));\n jPanel8.add(filler13);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);\n getContentPane().add(jPanel8, gridBagConstraints);\n\n jPanel7.setLayout(new javax.swing.BoxLayout(jPanel7, javax.swing.BoxLayout.LINE_AXIS));\n\n org.openide.awt.Mnemonics.setLocalizedText(m_autoSyncWithEditor, OStrings.getString(\"SW_AUTO_SYNC\")); // NOI18N\n m_autoSyncWithEditor.setFocusable(false);\n m_autoSyncWithEditor.setMinimumSize(new java.awt.Dimension(105, 21));\n jPanel7.add(m_autoSyncWithEditor);\n\n org.openide.awt.Mnemonics.setLocalizedText(m_backToInitialSegment, OStrings.getString(\"SW_BACK_TO_INITIAL_SEGMENT\")); // NOI18N\n m_backToInitialSegment.setFocusable(false);\n m_backToInitialSegment.setMinimumSize(new java.awt.Dimension(105, 21));\n jPanel7.add(m_backToInitialSegment);\n jPanel7.add(filler12);\n\n org.openide.awt.Mnemonics.setLocalizedText(m_replaceAllButton, OStrings.getString(\"BUTTON_REPLACE_ALL\")); // NOI18N\n m_replaceAllButton.setEnabled(false);\n jPanel7.add(m_replaceAllButton);\n jPanel7.add(filler18);\n\n org.openide.awt.Mnemonics.setLocalizedText(m_replaceButton, OStrings.getString(\"BUTTON_REPLACE\")); // NOI18N\n m_replaceButton.setEnabled(false);\n jPanel7.add(m_replaceButton);\n jPanel7.add(filler16);\n\n org.openide.awt.Mnemonics.setLocalizedText(m_filterButton, OStrings.getString(\"BUTTON_FILTER\")); // NOI18N\n m_filterButton.setEnabled(false);\n jPanel7.add(m_filterButton);\n jPanel7.add(filler1);\n\n org.openide.awt.Mnemonics.setLocalizedText(m_dismissButton, OStrings.getString(\"BUTTON_CLOSE\")); // NOI18N\n jPanel7.add(m_dismissButton);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);\n getContentPane().add(jPanel7, gridBagConstraints);\n\n pack();\n }",
"public SearchWindowForm() {\n OmegaTIcons.setIconImages(this);\n initComponents();\n }",
"public InterpolationSearchFrame()\n {\n super(\"Simulasi Interpolation Search\");\n statusInput=true;\n statusSearch=true;\n statusKeyword=true;\n node[0]=new Node();\n node[1]=new Node();\n node[2]=new Node();\n node[3]=new Node();\n node[4]=new Node();\n node[5]=new Node();\n input.setToolTipText(\"Input data\");\n search.setToolTipText(\"Search data\");\n reset.setToolTipText(\"Hapus semua data\");\n keyword.setToolTipText(\"Keyword data\");\n help.setToolTipText(\"Petunjuk penggunaan\");\n setLayout(tampilan);\n \n add(panel,BorderLayout.NORTH);\n \n input.addActionListener(new h());\n search.addActionListener(new h());\n reset.addActionListener(new h());\n keyword.addActionListener(new h());\n help.addActionListener(new h());\n buttonPanel.setLayout(new FlowLayout());\n buttonPanel.add(input);\n buttonPanel.add(keyword);\n buttonPanel.add(search);\n buttonPanel.add(reset);\n buttonPanel.add(help);\n add(buttonPanel,BorderLayout.SOUTH);\n }",
"private void createActionListener() {\n this.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n SearchBox source = (SearchBox) e.getSource();\n searchLinker.doSearch(source.getText());\n }\n });\n }",
"public SearchDataView(JFrame parent) {\n \tthis.parentObject = parent;\n \taction = new SearchDataAction(this);\n initComponents();\n prepareComponents();\n }",
"public Search() {\n try {\n initComponents();\n jPanel8.setVisible(false);\n jPanel5.setVisible(false);\n jPanel7.setVisible(false);\n jPanel6.setVisible(false);\n\n DefaultComboBoxModel dcbm = new DefaultComboBoxModel();\n ILopHocDAO lopHocDao = (ILopHocDAO) Class.forName(\"LopHoc.LopHocDAO\").newInstance();\n allClass = lopHocDao.getAll();\n for (LopHoc lh : allClass) {\n dcbm.addElement(lh.getMalop());\n }\n jcblop2.setModel(dcbm);\n\n //Load Cb Mon Hoc\n dcbmMaMH = new DefaultComboBoxModel();\n IMonHocDAO monHocDAO = (IMonHocDAO) Class.forName(\"MonHoc.MonHocDAO\").newInstance();\n listmh = monHocDAO.getAll();\n for (MonHoc mh : listmh) {\n dcbmMaMH.addElement(mh.getMamh());\n }\n jcbMaMH.setModel(dcbmMaMH);\n\n //Load Ma Lop\n dcbmMaLop = new DefaultComboBoxModel();\n ILopHocDAO lopHocDAO = (ILopHocDAO) Class.forName(\"LopHoc.LopHocDAO\").newInstance();\n listML = lopHocDAO.getAll();\n for (LopHoc lopHoc : listML) {\n dcbmMaLop.addElement(lopHoc.getMalop());\n }\n jcbMaLop.setModel(dcbmMaLop);\n\n //load ma sv\n dcbmMaSV = new DefaultComboBoxModel();\n ISinhVienDAO sinhVienDAO = (ISinhVienDAO) Class.forName(\"SinhVien.SinhVienDAO\").newInstance();\n listsv = sinhVienDAO.getAll();\n // dcbmMaSV.removeAllElements();\n for (SinhVien sv : listsv) {\n dcbmMaSV.addElement(sv.getMasv());\n }\n jcbMasv.setModel(dcbmMaSV);\n\n //Load Lan Thi\n dcbmLanThi = new DefaultComboBoxModel();\n dcbmLanThi.addElement(\"0\");\n dcbmLanThi.addElement(\"1\");\n dcbmLanThi.addElement(\"2\");\n dcbmLanThi.addElement(\"3\");\n dcbmLanThi.addElement(\"4\");\n dcbmLanThi.addElement(\"5\");\n dcbmLanThi.addElement(\"6\");\n jcbLanthi.setModel(dcbmLanThi);\n\n //Load He So\n dcbmHS = new DefaultComboBoxModel();\n dcbmHS.addElement(\"0\");\n dcbmHS.addElement(\"1\");\n dcbmHS.addElement(\"2\");\n dcbmHS.addElement(\"3\");\n dcbmHS.addElement(\"4\");\n jcbHeSo.setModel(dcbmHS);\n\n //TIm kiem sinh vien theo ma lop\n dtm = new DefaultTableModel();\n\n dtm.addColumn(\"ID\");\n dtm.addColumn(\"Họ Tên\");\n dtm.addColumn(\"ID Lớp\");\n dtm.addColumn(\"Hệ ĐT\");\n dtm.addColumn(\"Ngày Sinh\");\n dtm.addColumn(\"Địa Chỉ\");\n dtm.addColumn(\"Giới Tính\");\n dtm.addColumn(\"Số ĐT\");\n jtbTTSV.setModel(dtm);\n\n //TIm Kiem diem theo ma sv\n dtmMark = new DefaultTableModel();\n dtmMark.addColumn(\"Mã Sinh Viên\");\n dtmMark.addColumn(\"Mã Môn Học\");\n dtmMark.addColumn(\"Lần Thi\");\n dtmMark.addColumn(\"Hệ Số\");\n dtmMark.addColumn(\"Điểm\");\n dtmMark.addColumn(\"Trạng Thái\");\n jtbbangdiem.setModel(dtmMark);\n } catch (InstantiationException ex) {\n Logger.getLogger(Search.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n Logger.getLogger(Search.class.getName()).log(Level.SEVERE, null, ex);\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(Search.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }",
"public void createControl(Composite parent) {\n Composite main = new Composite(parent, SWT.NONE);\n GridLayout layout = new GridLayout();\n layout.numColumns = 1;\n main.setLayout(layout);\n if (parent.getLayout() instanceof GridLayout) {\n // This is necessary otherwise Eclipse does not properly layout\n // the main control. Really the parent Composite should be doing\n // this but this seems to be how Eclipse expects search dialogs\n // to be layed out see\n // org.eclipse.search.internal.ui.text.TextSearchPage.\n main.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n }\n\n Label label = new Label(main, SWT.LEFT);\n label.setText(SearchMessages.getString(RESOURCE_PREFIX +\n \"searchStringCombo.text\"));\n\n Composite innerComposite = new Composite(main, SWT.NONE);\n innerComposite.setLayoutData(new GridData(GridData.FILL_BOTH));\n layout = new GridLayout();\n layout.numColumns = 2;\n layout.marginHeight = 0;\n layout.marginWidth = 0;\n innerComposite.setLayout(layout);\n\n Composite comboComposite = new Composite(innerComposite, SWT.NONE);\n comboComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n layout = new GridLayout();\n layout.numColumns = 1;\n layout.marginHeight = 0;\n layout.marginWidth = 0;\n comboComposite.setLayout(layout);\n\n searchStringCombo = new Combo(comboComposite, SWT.DROP_DOWN);\n searchStringCombo.setItems(historyManager.getHistory());\n GridData data = new GridData(GridData.FILL_BOTH);\n searchStringCombo.setLayoutData(data);\n\n searchStringCombo.addModifyListener(new ModifyListener() {\n public void modifyText(ModifyEvent event) {\n getContainer().setPerformActionEnabled(!searchStringCombo.\n getText().equals(\"\"));\n }\n });\n Composite checkBoxComposite = new Composite(innerComposite, SWT.NONE);\n layout = new GridLayout();\n layout.numColumns = 1;\n layout.marginHeight = 0;\n layout.marginWidth = 0;\n\n checkBoxComposite.setLayout(layout);\n\n caseButton = new Button(checkBoxComposite, SWT.CHECK);\n caseButton.setText(SearchMessages.getString(RESOURCE_PREFIX +\n \"caseSensitive.text\"));\n caseButton.setSelection(dialogSettings.\n getBoolean(caseButton.getText()));\n\n regExpButton = new Button(checkBoxComposite, SWT.CHECK);\n regExpButton.setText(SearchMessages.getString(RESOURCE_PREFIX +\n \"regularExpression.text\"));\n regExpButton.setSelection(dialogSettings.\n getBoolean(regExpButton.getText()));\n\n final Label hint = new Label(comboComposite, SWT.LEFT);\n hint.setText(SearchMessages.getString(RESOURCE_PREFIX +\n \"nonRegExp.hint.label\"));\n hint.setVisible(!regExpButton.getSelection());\n\n\t\tregExpButton.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\thint.setVisible(!regExpButton.getSelection());\n\t\t\t}\n\t\t});\n\n Group searchGroup = new Group(main, SWT.SHADOW_ETCHED_IN);\n data = new GridData(GridData.FILL_HORIZONTAL);\n searchGroup.setLayoutData(data);\n searchGroup.setText(SearchMessages.getString(RESOURCE_PREFIX +\n \"searchGroup.text\"));\n searchGroup.setLayout(new FillLayout());\n\n deviceNameSearch = new Button(searchGroup, SWT.RADIO);\n deviceNameSearch.setText(SearchMessages.getString(RESOURCE_PREFIX +\n \"deviceNameSearch.text\"));\n deviceNameSearch.setSelection(dialogSettings.\n getBoolean(deviceNameSearch.getText()));\n\n devicePatternsSearch = new Button(searchGroup, SWT.RADIO);\n devicePatternsSearch.setText(SearchMessages.getString(RESOURCE_PREFIX +\n \"devicePatternsSearch.text\"));\n devicePatternsSearch.setSelection(dialogSettings.\n getBoolean(devicePatternsSearch.getText()));\n\n if(!devicePatternsSearch.getSelection() &&\n !deviceNameSearch.getSelection()) {\n deviceNameSearch.setSelection(true); // default\n }\n setControl(main);\n getContainer().setPerformActionEnabled(false);\n }",
"public SearchPanel(ie.gmit.java2.parser.LinesMap lines) {\n //initialize components\n initComponents();\n //Create a new processor\n this.processor = new Processor();\n //Add the lines to the processor\n this.processor.setLines(lines);\n \n //Bind the event listeners to the check boxes(Too lazy to add one by one. Plus i can change it here rather then many different places)\n for(Component component:this.jLayeredPaneResultsChooser.getComponents()){\n //Check if it is a check box\n if(component instanceof javax.swing.JCheckBox){\n //If it is a check box then bind the event listener\n ((javax.swing.JCheckBox)component).addActionListener((java.awt.event.ActionEvent evt) -> {\n //Check if the button can be enabled or not\n searchButtonEnabler();\n });\n }\n }\n }",
"private void createSearchViewModel() {\n SearchChampionViewModelFactory searchChampionViewModelFactory =\n new SearchChampionViewModelFactory(Injection.provideChampionsRepository(this));\n\n // Create ViewModel\n searchChampionViewModel = ViewModelProviders\n .of(this, searchChampionViewModelFactory)\n .get(SearchChampionViewModel.class);\n }",
"public SearchCard() {\n initComponents();\n }",
"private SearchServiceFactory() {}",
"private void searchMenu(){\n\t\t\n\t}",
"private void btnNewActionPerformed(java.awt.event.ActionEvent evt) {\n\n initPanel();\n }",
"public void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == searchbtn) {\n\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));\n\t\t\tswitch (state) {\n\t\t\tcase 0:\n\t\t\t\tremove(resultlistScroll);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tremove(moviedisplay);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tremove(persondisplay);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tremove(companydisplay);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tremove(randompanel);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmodel.clear();\n\t\t\tresultlist = new JList(model);\n\t\t\tresultlistScroll = new JScrollPane(resultlist);\n\t\t\tresultlistScroll.setPreferredSize(new Dimension(560, 370));\n\t\t\td = resultlistScroll.getPreferredSize();\n\t\t\tresultlistScroll.setBounds(insets.left + 50, insets.top + 75,\n\t\t\t\t\td.width, d.height);\n\t\t\tadd(resultlistScroll);\n\t\t\tsetPreferredSize(new Dimension(650, 490));\n\t\t\trepaint();\n\t\t\trevalidate();\n\t\t\tswitch (getState()) {\n\t\t\tcase 1: {\n\t\t\t\tmovielist = databasemanager\n\t\t\t\t\t\t.SimpleMovieSearch(getSearchCommand());\n\t\t\t\tpersonlist = new LinkedList();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 2: {\n\t\t\t\tpersonlist = databasemanager\n\t\t\t\t\t\t.SimplePersonSearch(getSearchCommand());\n\t\t\t\tmovielist = new LinkedList();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 3: {\n\t\t\t\tmovielist = databasemanager\n\t\t\t\t\t\t.SimpleMovieSearch(getSearchCommand());\n\t\t\t\tpersonlist = databasemanager\n\t\t\t\t\t\t.SimplePersonSearch(getSearchCommand());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t}\n\t\t\tfor (int i = 0; i < movielist.size(); i++) {\n\t\t\t\tMovie movie = (Movie) movielist.get(i);\n\t\t\t\tmodel.add(i, movie.getName());\n\t\t\t}\n\t\t\tfor (int i = 0; i < personlist.size(); i++) {\n\t\t\t\tPerson person = (Person) personlist.get(i);\n\t\t\t\tmodel.add(movielist.size() + i, person.getName());\n\t\t\t}\n\t\t\t// add result scrollpane to panel\n\t\t\tstate = 0;\n\t\t\tupdateListener();\n\t\t\tsetCursor(null);\n\t\t}\n\t}",
"private JPanel renderFilterPanel()\n\t{\n\t\t//filterPanel will hold all of the filtering options\n\t\tJPanel\t\tfilterPanel = new JPanel(new GridLayout(1, 4));\n\t\tfilterPanel.setBorder(new EmptyBorder(5, 50, 5, 50));\n\t\t//filter by fav option\n\t\tJCheckBox\tfavoritesBox = new JCheckBox();\n\t\tfavoritesBox.setHorizontalAlignment(JCheckBox.RIGHT);\n\t\tJLabel\t\tfavoritesLabel = new JLabel(\"Favorites\");\n\t\t//filters by what is in stock\n\t\tJCheckBox\tinStockBox = new JCheckBox();\n\t\tinStockBox.setHorizontalAlignment(JCheckBox.RIGHT);\n\t\tJLabel\t\tinStockLabel = new JLabel(\"In Stock\");\n\t\t//add all options to the main filter panel\n\t\tfilterPanel.add(favoritesBox);\n\t\tfilterPanel.add(favoritesLabel);\n\t\tfilterPanel.add(inStockBox);\n\t\tfilterPanel.add(inStockLabel);\n\t\t//mid is then used to center the filterPanel\n\t\tJPanel\tmid = new JPanel(new BorderLayout());\n\t\tmid.add(filterPanel, BorderLayout.CENTER);\n\t\treturn mid;\n\t}",
"public SOASearchPage() {\r\n\t\tsuper();\r\n\t}",
"public SearchingFrame(javax.swing.JFrame previousWindow) {\n initComponents();\n this.previousWindow = previousWindow;\n searchTypes.add(DAO.SearchType.LINEAR);\n searchTypes.add(DAO.SearchType.BINARY);\n searchTypes.add(DAO.SearchType.HASHING);\n selectRadioButton(\"numElements\", 0);\n }",
"public JPanel getPanelConsulta(){\n\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setLayout(new GridLayout(5, 1, 50, 10));\n\n\t\tpanel.add(new JLabel(\"Fecha inicio:\"));\n\t\tcampoInicio = new JTextField(\"yyyy-mm-dd\");\n\t\tcampoInicio.setForeground(new Color(111,111,111));\n\t\tcampoInicio.addFocusListener(control);\n\t\tcampoInicio.setActionCommand(\"fecahaInicio\");\n\n\t\tpanel.add(campoInicio);\n\n\t\tpanel.add(new JLabel(\"Fecha final:\"));\n\t\tcampoFinal = new JTextField(\"yyyy-mm-dd\");\n\t\tcampoFinal.setForeground(new Color(111,111,111));\n\t\tcampoFinal.addFocusListener(control);\n\t\tcampoFinal.setActionCommand(\"fecahaFinal\");\n\t\n\t\tpanel.add(campoFinal);\n\n\t\tpanel.setBorder(BorderFactory.createTitledBorder(\"Datos Reporte\"));\n\n\t\tJButton consulta = new JButton(\"Consultar\");\n\t\tconsulta.addActionListener(control);\n\t\tconsulta.setActionCommand(\"consulta\");\n\t\tpanel.add(consulta);\n\t\tpanel.setPreferredSize(new Dimension(190, 250));\n\n\t\treturn panel;\n\n\t}",
"public SearchBar(JTextField textFieldSearch, JButton buttonSearch) {\n getPanel().setLayout(new MigLayout(\"insets 5 0 5 0\")); // top left bottom right\n\n /* logo */\n String logoImageName = \"logo.png\";\n\n JLabel labelLogo = new JLabel();\n ImageIcon logo = new ImageIcon(InPath.getResourceDirectory(logoImageName));\n labelLogo.setIcon(new ImageIcon(logo.getImage().getScaledInstance(250, 125, Image.SCALE_DEFAULT)));\n labelLogo.setAlignmentX(Component.CENTER_ALIGNMENT);\n getPanel().add(labelLogo, \"span, align 50%\");\n\n /* search bar */\n textFieldSearch.setForeground(Color.GRAY);\n textFieldSearch.setHorizontalAlignment(JTextField.CENTER);\n inFont.setBaseFont(textFieldSearch);\n getPanel().add(textFieldSearch, \"push, grow\");\n\n /* search button */\n String searchImageName = \"search.png\";\n try {\n File file = new File(InPath.getResourceDirectory(searchImageName));\n BufferedImage searchIcon = ImageIO.read(file);\n buttonSearch.setIcon(new ImageIcon(searchIcon));\n buttonSearch.setMargin(new Insets(5,12,5,12));\n buttonSearch.setBackground(new Color(29, 116, 117));\n buttonSearch.setBorderPainted(false);\n getPanel().add(buttonSearch);\n } catch (IOException e) {\n System.out.println(\"failed to find \" + searchImageName);\n }\n }",
"private HorizontalPanel createContent() {\n\t\tfinal HorizontalPanel panel = new HorizontalPanel();\n\t\tfinal VerticalPanel form = new VerticalPanel();\n\t\tpanel.add(form);\n\t\t\n\t\tfinal Label titleLabel = new Label(CONSTANTS.actorLabel());\n\t\ttitleLabel.addStyleName(AbstractField.CSS.cbtAbstractPopupLabel());\n\t\tform.add(titleLabel);\n\t\t\n\t\tfinal Label closeButton = new Label();\n\t\tcloseButton.addClickHandler(new ClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tActorPopup.this.hide();\n\t\t\t}\n\t\t});\n\t\tcloseButton.addStyleName(AbstractField.CSS.cbtAbstractPopupClose());\n\t\tform.add(closeButton);\n\t\t\n\t\t//-----------------------------------------------\n\t\t// Party field\n\t\t//-----------------------------------------------\n\t\tpartyField = new SuggestField(this, null,\n\t\t\t\tnew NameIdAction(Service.PARTY),\n\t\t\t\tCONSTANTS.partynameLabel(),\n\t\t\t\t20,\n\t\t\t\ttab++);\n\t\tpartyField.setReadOption(Party.CREATED, true);\n\t\tpartyField.setDoubleclickable(true);\n\t\tpartyField.setHelpText(CONSTANTS.partynameHelp());\n\t\tform.add(partyField);\n\n\t\t//-----------------------------------------------\n\t\t// Email Address field\n\t\t//-----------------------------------------------\n\t\temailaddressField = new TextField(this, null,\n\t\t\t\tCONSTANTS.emailaddressLabel(),\n\t\t\t\ttab++);\n\t\temailaddressField.setMaxLength(100);\n\t\temailaddressField.setHelpText(CONSTANTS.emailaddressHelp());\n\t\tform.add(emailaddressField);\n\n\t\t//-----------------------------------------------\n\t\t// Password field\n\t\t//-----------------------------------------------\n\t\tpasswordField = new PasswordField(this, null,\n\t\t\t\tCONSTANTS.passwordLabel(),\n\t\t\t\ttab++);\n\t\tpasswordField.setSecure(true);\n\t\tpasswordField.setHelpText(CONSTANTS.passwordHelp());\n\t\tform.add(passwordField);\n\n\t\t//-----------------------------------------------\n\t\t// Check Password field\n\t\t//-----------------------------------------------\n\t\tcheckpasswordField = new PasswordField(this, null,\n\t\t\t\tCONSTANTS.checkpasswordLabel(),\n\t\t\t\ttab++);\n\t\tcheckpasswordField.setSecure(true);\n\t\tcheckpasswordField.setHelpText(CONSTANTS.checkpasswordHelp());\n\t\tform.add(checkpasswordField);\n\n\t\t//-----------------------------------------------\n\t\t// Date Format field\n\t\t//-----------------------------------------------\n\t\tformatdateField = new ListField(this, null,\n\t\t\t\tNameId.getList(Party.DATE_FORMATS, Party.DATE_FORMATS),\n\t\t\t\tCONSTANTS.formatdateLabel(),\n\t\t\t\tfalse,\n\t\t\t\ttab++);\n\t\tformatdateField.setDefaultValue(Party.MM_DD_YYYY);\n\t\tformatdateField.setFieldHalf();\n\t\tformatdateField.setHelpText(CONSTANTS.formatdateHelp());\n\t\t\n\t\t//-----------------------------------------------\n\t\t// Phone Format field\n\t\t//-----------------------------------------------\n\t\tformatphoneField = new TextField(this, null,\n\t\t\t\tCONSTANTS.formatphoneLabel(),\n\t\t\t\ttab++);\n\t\tformatphoneField.setMaxLength(25);\n\t\tformatphoneField.setFieldHalf();\n\t\tformatphoneField.setHelpText(CONSTANTS.formatphoneHelp());\n\n\t\tHorizontalPanel ff = new HorizontalPanel();\n\t\tff.add(formatdateField);\n\t\tff.add(formatphoneField);\n\t\tform.add(ff);\n\t\t\n\t\t//-----------------------------------------------\n\t\t// Roles option selector\n\t\t//-----------------------------------------------\n\t\trolesField = new OptionField(this, null,\n\t\t\t\tAbstractRoot.hasPermission(AccessControl.AGENCY) ? getAgentroles() : getOrganizationroles(),\n\t\t\t\tCONSTANTS.roleLabel(),\n\t\t\t\ttab++);\n\t\trolesField.setHelpText(CONSTANTS.roleHelp());\n\t\tform.add(rolesField);\n\n\t\tform.add(createCommands());\n\t\t\n\t\tonRefresh();\n\t\tonReset(Party.CREATED);\n\t\treturn panel;\n\t}",
"@Override\n\tprotected JComponent buildPanel() {\n\t\tcategory.setModel(new ListComboBoxModel(categoryService.getAll()));\n\t\t// Add auto-completion to author combo, limit max results to 1000 and order data by surname\n\t\tFilterAutoCompletionListener acl = new FilterAutoCompletionListener(author, 1000, \"surname\");\n\t\tacl.setPersistentService(authorService);\n\t\tauthor.setEditable(true);\n\t\t// Create a Box with author combo and add button\n\t\tBox authorBox = Box.createHorizontalBox();\n\t\tauthorBox.add(author);\n\t\tauthorBox.add(Box.createHorizontalStrut(5));\n\t\tauthorBox.add(new JButton(new AddAuthorAction(FormUtils.getIcon(ADD_ICON))));\n\t\t// Build Form with a BoxFormBuilder\n\t\tBoxFormBuilder fb = new BoxFormBuilder();\n\t\tfb.add(getMessage(\"Title\"), name);\n\t\tfb.row();\n\t\tfb.add(getMessage(\"Author\"), authorBox);\t\n\t\tfb.row();\n\t\tfb.add(getMessage(\"ISBN\"), isbn);\n\t\tfb.row();\n\t\tfb.add(getMessage(\"PublishedDate\"), publishedDate);\n\t\tfb.row();\n\t\tfb.add(getMessage(\"Category\"), category);\n\t\t\n\t\tJComponent form = fb.getForm();\n\t\tform.setBorder(FormUtils.createTitledBorder(getMessage(\"Book\")));\n\t\treturn form;\n\t}",
"private void showSearch() {\n\t\tonSearchRequested();\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jTextFieldSearchWord = new javax.swing.JTextField();\n TextPrompt tsearch7 = new TextPrompt(\"Word tor search for\", this.jTextFieldSearchWord);\n jButtonSearch = new javax.swing.JButton();\n jLayeredPaneResultsChooser = new javax.swing.JLayeredPane();\n jCheckBoxLastIndex = new javax.swing.JCheckBox();\n jCheckBoxContains = new javax.swing.JCheckBox();\n jCheckBoxAllIndeces = new javax.swing.JCheckBox();\n jCheckBoxFirstIndex = new javax.swing.JCheckBox();\n jCheckBoxOccurrences = new javax.swing.JCheckBox();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextAreaResult = new javax.swing.JTextArea();\n\n setMaximumSize(new java.awt.Dimension(491, 267));\n setMinimumSize(new java.awt.Dimension(491, 267));\n setPreferredSize(new java.awt.Dimension(491, 267));\n\n jTextFieldSearchWord.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseReleased(java.awt.event.MouseEvent evt) {\n jTextFieldSearchWordMouseReleased(evt);\n }\n });\n jTextFieldSearchWord.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n jTextFieldSearchWordKeyReleased(evt);\n }\n });\n\n jButtonSearch.setMnemonic('r');\n jButtonSearch.setText(\"Search\");\n jButtonSearch.setToolTipText(\"\");\n jButtonSearch.setEnabled(false);\n jButtonSearch.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonSearchActionPerformed(evt);\n }\n });\n\n jLayeredPaneResultsChooser.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Results to show\"));\n\n jCheckBoxLastIndex.setMnemonic('L');\n jCheckBoxLastIndex.setText(\"Last Index\");\n jCheckBoxLastIndex.setName(\"getLastIndex\"); // NOI18N\n\n jCheckBoxContains.setMnemonic('C');\n jCheckBoxContains.setSelected(true);\n jCheckBoxContains.setText(\"Contains\");\n jCheckBoxContains.setName(\"contains\"); // NOI18N\n\n jCheckBoxAllIndeces.setMnemonic('A');\n jCheckBoxAllIndeces.setText(\"All Indeces\");\n jCheckBoxAllIndeces.setName(\"getAllIndices\"); // NOI18N\n\n jCheckBoxFirstIndex.setMnemonic('F');\n jCheckBoxFirstIndex.setText(\"First Index\");\n jCheckBoxFirstIndex.setName(\"getFirstIndex\"); // NOI18N\n\n jCheckBoxOccurrences.setMnemonic('O');\n jCheckBoxOccurrences.setText(\"Occurrences\");\n jCheckBoxOccurrences.setName(\"countOccurrences\"); // NOI18N\n\n jLayeredPaneResultsChooser.setLayer(jCheckBoxLastIndex, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jLayeredPaneResultsChooser.setLayer(jCheckBoxContains, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jLayeredPaneResultsChooser.setLayer(jCheckBoxAllIndeces, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jLayeredPaneResultsChooser.setLayer(jCheckBoxFirstIndex, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jLayeredPaneResultsChooser.setLayer(jCheckBoxOccurrences, javax.swing.JLayeredPane.DEFAULT_LAYER);\n\n javax.swing.GroupLayout jLayeredPaneResultsChooserLayout = new javax.swing.GroupLayout(jLayeredPaneResultsChooser);\n jLayeredPaneResultsChooser.setLayout(jLayeredPaneResultsChooserLayout);\n jLayeredPaneResultsChooserLayout.setHorizontalGroup(\n jLayeredPaneResultsChooserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jLayeredPaneResultsChooserLayout.createSequentialGroup()\n .addComponent(jCheckBoxContains)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jCheckBoxOccurrences)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jCheckBoxFirstIndex)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jCheckBoxLastIndex)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jCheckBoxAllIndeces)\n .addContainerGap(72, Short.MAX_VALUE))\n );\n jLayeredPaneResultsChooserLayout.setVerticalGroup(\n jLayeredPaneResultsChooserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jLayeredPaneResultsChooserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jCheckBoxOccurrences)\n .addComponent(jCheckBoxFirstIndex)\n .addComponent(jCheckBoxContains))\n .addGroup(jLayeredPaneResultsChooserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jCheckBoxLastIndex)\n .addComponent(jCheckBoxAllIndeces))\n );\n\n jTextAreaResult.setColumns(20);\n jTextAreaResult.setRows(5);\n jTextAreaResult.setDisabledTextColor(new java.awt.Color(0, 0, 0));\n jTextAreaResult.setEnabled(false);\n jScrollPane1.setViewportView(jTextAreaResult);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLayeredPaneResultsChooser)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jTextFieldSearchWord)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButtonSearch))\n .addComponent(jScrollPane1))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButtonSearch, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jTextFieldSearchWord, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLayeredPaneResultsChooser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 197, Short.MAX_VALUE)\n .addContainerGap())\n );\n }",
"@Execute\n public HtmlResponse index(final SearchForm form) {\n return search(form);\n }",
"private void setUpSearchButton()\n {\n searchButton.setCaption(\"Go\");\n searchButton.addClickListener(new Button.ClickListener() {\n public void buttonClick(Button.ClickEvent event)\n {\n //Grab the data from the database base on the search text\n //Assume all search is author name for now\n String searchValue = searchText.getValue();\n \n //Remove all values in the table\n bookTable.removeAllItems();\n \n //Grab Data from database\n List<Book> books = collectDataFromDatabase(searchValue);\n \n //Put the data into the table\n allBooksBean.addAll(books);\n //putDataIntoTable(books);\n }\n });\n }",
"public FrmSearchBox(JInternalFrame internalFrame) {\r\n initComponents();\r\n this.setModal(true);\r\n this.setInternalFrame(internalFrame);\r\n productDAO = new ProductDAO();\r\n }"
]
| [
"0.7593687",
"0.7368357",
"0.70750993",
"0.7065314",
"0.6963673",
"0.6823653",
"0.68223274",
"0.67666984",
"0.67544204",
"0.6727159",
"0.6654476",
"0.6571504",
"0.6567254",
"0.6523185",
"0.6519291",
"0.6435892",
"0.6271765",
"0.626021",
"0.6243215",
"0.6239778",
"0.6218613",
"0.6207514",
"0.6205169",
"0.61881334",
"0.61491716",
"0.6120494",
"0.6101367",
"0.6093009",
"0.6050351",
"0.603664",
"0.60192394",
"0.59763664",
"0.5974314",
"0.59703773",
"0.5959212",
"0.594878",
"0.5945882",
"0.5923195",
"0.59020835",
"0.5887829",
"0.5885862",
"0.5877919",
"0.5874895",
"0.5874875",
"0.5853618",
"0.5850865",
"0.582162",
"0.5811581",
"0.57913893",
"0.57789433",
"0.5767519",
"0.5760466",
"0.5758822",
"0.57551",
"0.57425755",
"0.57369137",
"0.5732226",
"0.571857",
"0.5711106",
"0.57087576",
"0.570435",
"0.568988",
"0.5685535",
"0.5680723",
"0.5675791",
"0.5673222",
"0.56730705",
"0.56589705",
"0.5652168",
"0.5633611",
"0.56140953",
"0.56139296",
"0.561186",
"0.5610886",
"0.5609755",
"0.55942076",
"0.5594106",
"0.55930835",
"0.5591378",
"0.5588852",
"0.55838734",
"0.5580716",
"0.5576997",
"0.55729467",
"0.5568141",
"0.55622125",
"0.55526716",
"0.55422574",
"0.55373114",
"0.55317914",
"0.5521985",
"0.5513175",
"0.551283",
"0.5509012",
"0.5495884",
"0.5486566",
"0.5483008",
"0.5477523",
"0.54730946",
"0.545913"
]
| 0.64569837 | 15 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
sp_searchPolicies = new javax.swing.ButtonGroup();
sp_relatedQueriesPanel = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jScrollPane1 = new javax.swing.JScrollPane();
sp_RelatedQueriesList = new javax.swing.JList();
jPanel1 = new javax.swing.JPanel();
sp_searchInput = new javax.swing.JTextField();
sp_opaki = new javax.swing.JRadioButton();
sp_vector = new javax.swing.JRadioButton();
sp_searchButton = new javax.swing.JButton();
sp_searchEntriesWrapper = new javax.swing.JScrollPane();
sp_searchEntries = new javax.swing.JPanel();
sp_searchPolicyLabel = new javax.swing.JLabel();
setMaximumSize(new java.awt.Dimension(895, 32767));
sp_relatedQueriesPanel.setMinimumSize(new java.awt.Dimension(383, 226));
jLabel1.setFont(new java.awt.Font("SansSerif", 0, 16)); // NOI18N
jLabel1.setText("Related Queries");
sp_RelatedQueriesList.setFont(new java.awt.Font("SansSerif", 0, 12)); // NOI18N
sp_RelatedQueriesList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
sp_RelatedQueriesList.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
onRelatedQueryClicked(evt);
}
});
jScrollPane1.setViewportView(sp_RelatedQueriesList);
javax.swing.GroupLayout sp_relatedQueriesPanelLayout = new javax.swing.GroupLayout(sp_relatedQueriesPanel);
sp_relatedQueriesPanel.setLayout(sp_relatedQueriesPanelLayout);
sp_relatedQueriesPanelLayout.setHorizontalGroup(
sp_relatedQueriesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(sp_relatedQueriesPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(sp_relatedQueriesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 363, Short.MAX_VALUE)
.addGroup(sp_relatedQueriesPanelLayout.createSequentialGroup()
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 352, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE)))
.addContainerGap())
);
sp_relatedQueriesPanelLayout.setVerticalGroup(
sp_relatedQueriesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(sp_relatedQueriesPanelLayout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 172, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
sp_searchInput.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
sp_sp_searchInputActionPerformed(evt);
}
});
sp_searchPolicies.add(sp_opaki);
sp_opaki.setFont(new java.awt.Font("SansSerif", 0, 11)); // NOI18N
sp_opaki.setText("Okapi BM25");
sp_opaki.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
onopakiPolicySelected(evt);
}
});
sp_searchPolicies.add(sp_vector);
sp_vector.setFont(new java.awt.Font("SansSerif", 0, 11)); // NOI18N
sp_vector.setSelected(true);
sp_vector.setText("Vector Space Model");
sp_vector.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
onVectorSpacePolicySelected(evt);
}
});
sp_searchButton.setFont(new java.awt.Font("SansSerif", 0, 14)); // NOI18N
sp_searchButton.setText("Search");
sp_searchButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
onSearchButtonClicked(evt);
}
});
sp_searchEntriesWrapper.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
sp_searchEntries.setLayout(new javax.swing.BoxLayout(sp_searchEntries, javax.swing.BoxLayout.Y_AXIS));
sp_searchEntriesWrapper.setViewportView(sp_searchEntries);
sp_searchPolicyLabel.setFont(new java.awt.Font("SansSerif", 0, 12)); // NOI18N
sp_searchPolicyLabel.setText("Search policy");
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(sp_searchEntriesWrapper)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(sp_searchInput)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(sp_searchButton, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(sp_searchPolicyLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(sp_vector)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(sp_opaki)
.addGap(0, 214, Short.MAX_VALUE)))
.addContainerGap())))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(sp_searchInput, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(sp_searchButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(sp_searchEntriesWrapper, javax.swing.GroupLayout.PREFERRED_SIZE, 533, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(sp_searchPolicyLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(sp_vector)
.addComponent(sp_opaki))
.addContainerGap())
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(sp_relatedQueriesPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(12, 12, 12))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())
.addGroup(layout.createSequentialGroup()
.addGap(55, 55, 55)
.addComponent(sp_relatedQueriesPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n initComponents();\n }",
"public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }",
"public FormListRemarking() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n \n }",
"public FormPemilihan() {\n initComponents();\n }",
"public GUIForm() { \n initComponents();\n }",
"public FrameForm() {\n initComponents();\n }",
"public TorneoForm() {\n initComponents();\n }",
"public FormCompra() {\n initComponents();\n }",
"public muveletek() {\n initComponents();\n }",
"public Interfax_D() {\n initComponents();\n }",
"public quanlixe_form() {\n initComponents();\n }",
"public SettingsForm() {\n initComponents();\n }",
"public Soru1() {\n initComponents();\n }",
"public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }",
"public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }",
"public soal2GUI() {\n initComponents();\n }",
"public EindopdrachtGUI() {\n initComponents();\n }",
"public MechanicForm() {\n initComponents();\n }",
"public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }",
"public quotaGUI() {\n initComponents();\n }",
"public BloodDonationGUI() {\n initComponents();\n }",
"public PatientUI() {\n initComponents();\n }",
"public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }",
"public Oddeven() {\n initComponents();\n }",
"public myForm() {\n\t\t\tinitComponents();\n\t\t}",
"public intrebarea() {\n initComponents();\n }",
"public Magasin() {\n initComponents();\n }",
"public RadioUI()\n {\n initComponents();\n }",
"public NewCustomerGUI() {\n initComponents();\n }",
"public ZobrazUdalost() {\n initComponents();\n }",
"public FormUtama() {\n initComponents();\n }",
"public p0() {\n initComponents();\n }",
"public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }",
"public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }",
"public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }",
"public form2() {\n initComponents();\n }",
"public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}",
"public kunde() {\n initComponents();\n }",
"public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"public MusteriEkle() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }",
"public frmMain() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public DESHBORDPANAL() {\n initComponents();\n }",
"public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }",
"public frmVenda() {\n initComponents();\n }",
"public Botonera() {\n initComponents();\n }",
"public FrmMenu() {\n initComponents();\n }",
"public OffertoryGUI() {\n initComponents();\n setTypes();\n }",
"public JFFornecedores() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }",
"public vpemesanan1() {\n initComponents();\n }",
"public EnterDetailsGUI() {\n initComponents();\n }",
"public Kost() {\n initComponents();\n }",
"public UploadForm() {\n initComponents();\n }",
"public frmacceso() {\n initComponents();\n }",
"public FormHorarioSSE() {\n initComponents();\n }",
"public HW3() {\n initComponents();\n }",
"public Managing_Staff_Main_Form() {\n initComponents();\n }",
"public sinavlar2() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"public P0405() {\n initComponents();\n }",
"public MiFrame2() {\n initComponents();\n }",
"public IssueBookForm() {\n initComponents();\n }",
"public Choose1() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }",
"public GUI_StudentInfo() {\n initComponents();\n }",
"public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }",
"public JFrmPrincipal() {\n initComponents();\n }",
"public bt526() {\n initComponents();\n }",
"public Pemilihan_Dokter() {\n initComponents();\n }",
"public Ablak() {\n initComponents();\n }",
"@Override\n\tprotected void initUi() {\n\t\t\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}",
"public Pregunta23() {\n initComponents();\n }",
"public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }",
"public AvtekOkno() {\n initComponents();\n }",
"public busdet() {\n initComponents();\n }",
"public ViewPrescriptionForm() {\n initComponents();\n }",
"public Ventaform() {\n initComponents();\n }",
"public Kuis2() {\n initComponents();\n }",
"public POS1() {\n initComponents();\n }",
"public CreateAccount_GUI() {\n initComponents();\n }",
"public Carrera() {\n initComponents();\n }",
"public EqGUI() {\n initComponents();\n }",
"public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }",
"public nokno() {\n initComponents();\n }",
"public dokter() {\n initComponents();\n }",
"public ConverterGUI() {\n initComponents();\n }",
"public hitungan() {\n initComponents();\n }",
"public Modify() {\n initComponents();\n }",
"public frmAddIncidencias() {\n initComponents();\n }",
"public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }"
]
| [
"0.7320782",
"0.72918797",
"0.72918797",
"0.72918797",
"0.728645",
"0.72498447",
"0.7214492",
"0.720934",
"0.7197145",
"0.71912014",
"0.71852076",
"0.7160113",
"0.71487373",
"0.70943654",
"0.70820624",
"0.7058153",
"0.69883204",
"0.6978216",
"0.69558746",
"0.6955715",
"0.69455403",
"0.6944223",
"0.6936588",
"0.6933016",
"0.6929512",
"0.6925853",
"0.6925524",
"0.6912182",
"0.6912122",
"0.6895022",
"0.6894088",
"0.68921435",
"0.68919635",
"0.6889464",
"0.6884104",
"0.6883508",
"0.6882322",
"0.6879773",
"0.6876671",
"0.68755716",
"0.6872437",
"0.6860746",
"0.68575454",
"0.6857284",
"0.68563104",
"0.6854648",
"0.68544936",
"0.68532896",
"0.68532896",
"0.68444484",
"0.68380433",
"0.6837678",
"0.68299913",
"0.6828643",
"0.6828147",
"0.6825278",
"0.6823024",
"0.68182456",
"0.68178964",
"0.681216",
"0.6809752",
"0.6809671",
"0.6809534",
"0.6808423",
"0.6803337",
"0.6794699",
"0.67944574",
"0.6793996",
"0.6792107",
"0.67904186",
"0.67898226",
"0.67888504",
"0.6782858",
"0.67673683",
"0.67670184",
"0.6765726",
"0.6757476",
"0.67573047",
"0.6753978",
"0.6752576",
"0.674217",
"0.67403704",
"0.6738196",
"0.67374873",
"0.67351323",
"0.6728453",
"0.67277855",
"0.6722282",
"0.6716617",
"0.67165154",
"0.67154175",
"0.6709239",
"0.67077744",
"0.6703873",
"0.67028135",
"0.6702373",
"0.6700207",
"0.67000616",
"0.6695769",
"0.6691885",
"0.6690232"
]
| 0.0 | -1 |
End of variables declaration//GENEND:variables | public void clearResultEntries() {
sp_searchEntries.removeAll();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}",
"public void mo38117a() {\n }",
"@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}",
"private void assignment() {\n\n\t\t\t}",
"private void kk12() {\n\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"public void mo21779D() {\n }",
"public final void mo51373a() {\n }",
"protected boolean func_70041_e_() { return false; }",
"public void mo4359a() {\n }",
"public void mo21782G() {\n }",
"private void m50366E() {\n }",
"public void mo12930a() {\n }",
"public void mo115190b() {\n }",
"public void method_4270() {}",
"public void mo1403c() {\n }",
"public void mo3376r() {\n }",
"public void mo3749d() {\n }",
"public void mo21793R() {\n }",
"protected boolean func_70814_o() { return true; }",
"public void mo21787L() {\n }",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo21780E() {\n }",
"public void mo21792Q() {\n }",
"public void mo21791P() {\n }",
"public void mo12628c() {\n }",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"public void mo97908d() {\n }",
"public void mo21878t() {\n }",
"public void mo9848a() {\n }",
"public void mo21825b() {\n }",
"public void mo23813b() {\n }",
"public void mo3370l() {\n }",
"public void mo21879u() {\n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"public void mo21785J() {\n }",
"public void mo21795T() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void m23075a() {\n }",
"public void mo21789N() {\n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"public void mo21794S() {\n }",
"public final void mo12688e_() {\n }",
"@Override\r\n\tvoid func04() {\n\t\t\r\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"public void mo6944a() {\n }",
"public static void listing5_14() {\n }",
"public void mo1405e() {\n }",
"public final void mo91715d() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"public void mo9137b() {\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"public void func_70295_k_() {}",
"void mo57277b();",
"public void mo21877s() {\n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"public void Tyre() {\n\t\t\r\n\t}",
"void berechneFlaeche() {\n\t}",
"public void mo115188a() {\n }",
"public void mo21880v() {\n }",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"public void mo21784I() {\n }",
"private stendhal() {\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"public void mo56167c() {\n }",
"public void mo44053a() {\n }",
"public void mo21781F() {\n }",
"public void mo2740a() {\n }",
"public void mo21783H() {\n }",
"public void mo1531a() {\n }",
"double defendre();",
"private zzfl$zzg$zzc() {\n void var3_1;\n void var2_-1;\n void var1_-1;\n this.value = var3_1;\n }",
"public void stg() {\n\n\t}",
"void m1864a() {\r\n }",
"private void poetries() {\n\n\t}",
"public void skystonePos4() {\n }",
"public void mo2471e() {\n }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"private void yy() {\n\n\t}",
"@Override\n\tpublic void verkaufen() {\n\t}",
"@AnyLogicInternalCodegenAPI\n private void setupPlainVariables_Main_xjal() {\n }",
"static void feladat4() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"public void init() { \r\n\t\t// TODO Auto-generated method\r\n\t }",
"public void furyo ()\t{\n }",
"public void verliesLeven() {\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"protected void mo6255a() {\n }"
]
| [
"0.6359434",
"0.6280371",
"0.61868024",
"0.6094568",
"0.60925734",
"0.6071678",
"0.6052686",
"0.60522056",
"0.6003249",
"0.59887564",
"0.59705925",
"0.59680873",
"0.5967989",
"0.5965816",
"0.5962006",
"0.5942372",
"0.5909877",
"0.5896588",
"0.5891321",
"0.5882983",
"0.58814824",
"0.5854075",
"0.5851759",
"0.58514243",
"0.58418584",
"0.58395296",
"0.5835063",
"0.582234",
"0.58090156",
"0.5802706",
"0.5793836",
"0.57862717",
"0.5784062",
"0.5783567",
"0.5782131",
"0.57758564",
"0.5762871",
"0.5759349",
"0.5745087",
"0.57427835",
"0.573309",
"0.573309",
"0.573309",
"0.573309",
"0.573309",
"0.573309",
"0.573309",
"0.57326084",
"0.57301426",
"0.57266665",
"0.57229686",
"0.57175463",
"0.5705802",
"0.5698347",
"0.5697827",
"0.569054",
"0.5689405",
"0.5686434",
"0.56738997",
"0.5662217",
"0.56531453",
"0.5645255",
"0.5644223",
"0.5642628",
"0.5642476",
"0.5640595",
"0.56317437",
"0.56294966",
"0.56289655",
"0.56220204",
"0.56180173",
"0.56134313",
"0.5611337",
"0.56112075",
"0.56058615",
"0.5604383",
"0.5602629",
"0.56002104",
"0.5591573",
"0.55856615",
"0.5576992",
"0.55707216",
"0.5569681",
"0.55570376",
"0.55531484",
"0.5551123",
"0.5550893",
"0.55482954",
"0.5547471",
"0.55469507",
"0.5545719",
"0.5543553",
"0.55424106",
"0.5542057",
"0.55410767",
"0.5537739",
"0.55269134",
"0.55236584",
"0.55170715",
"0.55035424",
"0.55020875"
]
| 0.0 | -1 |
Update the current record and add it to the array | private void updateRecord() {
int empId = -1;
boolean hasError = false;
try {
empId = Integer.parseInt(employeeYearsOfWorkJTextField.getText());
} catch (NumberFormatException e) {
hasError = true;
JOptionPane.showMessageDialog(this, "Employee id must be integer");
}
String telephone = employeeNumberJTextField.getText();
String name = employeeNameJTextField.getText();
int years = -1;
try {
years = Integer.parseInt(employeeYearsOfWorkJTextField.getText());
} catch (NumberFormatException e) {
hasError = true;
JOptionPane.showMessageDialog(this, "Years of works must be an integer");
}
if (!hasError) {
records.add(new Record(empId, telephone, name, years));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void update(){\r\n\t\tthis.loadRecords();\r\n\t}",
"public void updateRecord(Record object);",
"void committed() {\n\t\t\tfor (Entry<Integer, Object> entry : newData.entrySet())\n\t\t\t\toriginalData.put(entry.getKey(), entry.getValue());\n\t\t\treset();\n\t\t\taction = RowAction.UPDATE;\n\t\t}",
"@Override\r\n\tpublic Integer updateByPrimaryKey(Wt_collection record) {\n\t\treturn 0;\r\n\t}",
"public void updateData() {}",
"private static void updateRecords() {\n for (Team t: Main.getTeams()){\n //If the team already exists\n if (SqlUtil.doesTeamRecordExist(c,TABLE_NAME,t.getIntValue(Team.NUMBER_KEY))){\n //Update team record\n updateTeamRecord(t);\n } else {\n //Create a new row in database\n addNewTeam(t);\n\n }\n }\n\n }",
"int updateByPrimaryKey(Collect record);",
"public void updateRecord() throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tgetBackground();\n\t\ttry\n\t\t{\n\t\t\tmyData.record.update(background.getClient());\n\t\t}\n\t\tcatch (LDBException e) { setStatus(e); }\n\t}",
"private void updateDatabase() {\n\t\tAbstractSerializer serializer = new CineplexSerializer();\n\t\tArrayList<String> updatedRecords = serializer.serialize(records);\n\t\tDatabaseHandler.writeToDatabase(DATABASE_NAME, updatedRecords);\n\t}",
"@Override\r\n\tpublic int updateByPrimaryKey(PayRecord record) {\n\t\treturn 0;\r\n\t}",
"private void updateRecord(){\r\n\t\tgameStats.setVictory(victory);\r\n\t\tgameStats.setDays(days);\r\n\t\tgameStats.setBuildings(buildingCount);\r\n\t\tgameStats.setResources(wood + stone + food);\r\n\t}",
"private void updateRecords() throws Exception {\n if (records==null){\n records = new ArrayList<>();\n if (shp!=null){\n Iterator<Record> it = getRecords();\n while (it.hasNext()){\n records.add(it.next());\n numShapes++;\n }\n }\n }\n }",
"@Override\n\tpublic int updateByPrimaryKey(Checkingin record) {\n\t\treturn 0;\n\t}",
"@Override\r\n\tpublic void updateData() {\n\t\t\r\n\t}",
"int updateByPrimaryKey(ParkCurrent record);",
"public void update(){\n\t\tif ( crm.addedNewStudent()){\n\t\t\tList<Student> students = crm.getStudents();\n\t\t\tStudent newest = students.get(students.size()-1);\n\t\t\tint ID = newest.ID();\n\t\t\tString name = newest.name();\n\t\t\tint GradYear = newest.GradYear();\n\t\t\tsv.addStudent(ID, name, GradYear);\n\t\t}\n\t}",
"@Override\r\n\tpublic boolean updateRecord(Cosmatics cosmatics) {\n\t\treturn false;\r\n\t}",
"int updateAllComponents(RecordSet inputRecords);",
"void update(Subscriber record);",
"int updateByPrimaryKey(TBBearPer record);",
"public R onUpdate(final R record) {\n // can be overridden.\n return record;\n }",
"@Override\r\n\tpublic int updateByPrimaryKey(Byip record) {\n\t\treturn 0;\r\n\t}",
"@Override\n\tpublic int updateByPrimaryKey(Cell record) {\n\t\treturn 0;\n\t}",
"protected void updateRecord() throws DAOException {\r\n\t\t// Prepara para actualizar\r\n\t\tobject.prepareToUpdate();\r\n\t\t// Actualiza objeto\r\n\t\tobjectDao.update(object);\r\n\t\t// Actualiza relaciones\r\n\t\tfor (Sedrelco relco : object.getRelcos()) {\r\n\t\t\tsedrelcoDao.update(relco);\r\n\t\t}\r\n\t}",
"@Override\n\tpublic int update(RotateBID record) {\n\t\tBigDecimal total = new BigDecimal(0);\n\t\tif(\"招标采购\".equals(record.getBidType())) {\n\t\t\tList<RotateBIDPurchase> purchaseList=record.getPurchaseList();\n\t\t\tfor(RotateBIDPurchase purchase:purchaseList) {\n\t\t\t\tif(null==purchase.getId()||\"\".equals(purchase.getId()))\n\t\t\t\t\tpurchase.setId(UUID.randomUUID().toString().replaceAll(\"-\", \"\"));\n\t\t\t\ttotal = total.add(purchase.getQuantity());\n\t\t\t}\n\t\t}else {\n\t\t\tList<RotateBIDSale> saleList=record.getSaleList();\n\t\t\tfor(RotateBIDSale sale:saleList) {\n\t\t\t\tif(null==sale.getId()||\"\".equals(sale.getId()))\n\t\t\t\t\tsale.setId(UUID.randomUUID().toString().replaceAll(\"-\", \"\"));\n\t\t\t\ttotal= total.add(sale.getTotal());\n\t\t\t}\n\t\t}\n\t\trecord.setTotal(total);\n\t\trecord.setModifyDate(new Date());\n//\t\trecord.setModifier(TokenManager.getToken().getName());\n\t\treturn dao.update(record);\n\t}",
"@Override\n\tpublic int updateByPrimaryKey(Contract record) {\n\t\treturn contractMapper.updateByPrimaryKey(record);\n\t}",
"int updateByPrimaryKey(SPerms record);",
"void updateData();",
"@Override\r\n\tpublic Integer updateByPrimaryKeySelective(Wt_collection record) {\n\t\treturn 0;\r\n\t}",
"int updateByPrimaryKeySelective(cskaoyan_mall_order_goods record);",
"void updateNotes(Note arr[]){\n\n }",
"@Override\n\tpublic int updateByPrimaryKeySelective(Cart record) {\n\t\tSystem.out.println(record);\n\t\treturn cartDao.updateByPrimaryKey(record);\n\t}",
"int updateByPrimaryKey(Basicinfo record);",
"int updateByPrimaryKey(IceApp record);",
"int updateByPrimaryKey(Orderall record);",
"int updateByPrimaryKeySelective(Collect record);",
"int updateByPrimaryKey(Abum record);",
"int updateByPrimaryKey(Yqbd record);",
"int updateByPrimaryKey(AccuseInfo record);",
"public abstract void updateBlockRecord();",
"int updateByPrimaryKey(Sequipment record);",
"int updateByPrimaryKey(VoteList record);",
"int updateByPrimaryKey(RecordLike record);",
"int updateByPrimaryKey(Storage record);",
"int updateByPrimaryKey(Storage record);",
"int updateByPrimaryKey(BPBatchBean record);",
"public boolean update(Object[] obj) {\n\t\treturn false;\n\t}",
"int updateByPrimaryKey(JzAct record);",
"int updateByPrimaryKey(IntegralBook record);",
"private void refreshData() {\n\r\n\t SfJdRecordFileModel model = (SfJdRecordFileModel) listCursor.getCurrentObject();\r\n\r\n\t if (model != null && !\"\".equals(ZcUtil.safeString(model.getModelId()))) {//列表页面双击进入\r\n\r\n\t this.pageStatus = ZcSettingConstants.PAGE_STATUS_BROWSE;\r\n\r\n\t model = getModel(model.getModelId());\r\n\t listCursor.setCurrentObject(model);\r\n\t this.setEditingObject(model);\r\n\t } else {//新增按钮进入\r\n\r\n\t this.pageStatus = ZcSettingConstants.PAGE_STATUS_NEW;\r\n\r\n\t model = new SfJdRecordFileModel();\r\n\t \r\n\t setDefaultValue(model);\r\n\r\n\t listCursor.getDataList().add(model);\r\n\r\n\t listCursor.setCurrentObject(model);\r\n\r\n\t this.setEditingObject(model);\r\n\r\n\t }\r\n\r\n\t refreshSubData();\r\n\t \r\n\t setOldObject();\r\n\r\n\t setButtonStatus();\r\n\r\n\t updateFieldEditorsEditable();\r\n\r\n\t }",
"int updateByPrimaryKeySelective(FinMonthlySnapModel record);",
"@Override\n\tpublic void update(StockDataRecord bo) throws SQLException {\n\t\t\n\t}",
"int updateByPrimaryKey(DataSync record);",
"int updateByPrimaryKey(FinMonthlySnapModel record);",
"int updateByPrimaryKey(YzStiveExplosion record);",
"@Writer\n int updateByPrimaryKey(LuckyBag record);",
"int updateByPrimaryKey(cskaoyan_mall_order_goods record);",
"int updateByPrimaryKey(TbComEqpModel record);",
"@Writer\n int updateByPrimaryKeySelective(LuckyBag record);",
"int updateByPrimaryKey(ClOrderInfo record);",
"int updateByPrimaryKeySelective(ParkCurrent record);",
"public int addRecord (DatabaseRecord r) //add a record to the end of the array\r\n\t{\r\n\t\tdataRecord[length] = r;\t\t//add new record to the next available position in the array;\r\n\t\tlength++;\t\t\t\t\t//update length, which holds the amount of positions filled\r\n\t\treturn (length - 1);\t\t//returns location where 'r' was added\r\n\t}",
"int updateByPrimaryKey(CartDO record);",
"int updateByPrimaryKey(Massage record);",
"int updateByPrimaryKey(ClinicalData record);",
"int updateByPrimaryKey(BookInfo record);",
"int updateByPrimaryKey(PrhFree record);",
"int updateByPrimaryKey(Forumpost record);",
"int updateByPrimaryKey(AccessModelEntity record);",
"void update ( priorizedListObject v ) throws DAOException;",
"int updateByPrimaryKey(ActivityHongbaoPrize record);",
"int updateByPrimaryKey(RepStuLearning record);",
"int updateByPrimaryKey(Model record);",
"int updateByPrimaryKeySelective(AlertQueue record);",
"@Override\n public int updateByPrimaryKeySelective(BorrowDO record){\n return borrowExtMapper.updateByPrimaryKeySelective(record);\n }",
"int updateByPrimaryKey(PayLogInfoPo record);",
"int updateByPrimaryKeySelective(TbComEqpModel record);",
"int updateByPrimaryKeySelective(IceApp record);",
"int updateByPrimaryKey(Online record);",
"@Override\r\n\tpublic Integer updateByPrimaryKey(Filtering record) {\n\t\treturn filteringMapper.updateByPrimaryKey(record);\r\n\t}",
"@Override\n\tpublic int updateByPrimaryKey(GasRemind record) {\n\t\treturn 0;\n\t}",
"int updateByPrimaryKeySelective(Abum record);",
"int updateByPrimaryKey(SupplyNeed record);",
"int updateByPrimaryKey(Access record);",
"int updateByPrimaryKey(WizardValuationHistoryEntity record);",
"@Override\r\n\tpublic int updateByPrimaryKeySelective(PayRecord record) {\n\t\treturn 0;\r\n\t}",
"public void updateMultipleRecord(){\n MongoCollection<Document> table = db.getCollection(\"user\");\n Document document = new Document();\n document.put(\"userName\", \"FreeUser\");\n document.put(\"status\", true);\n\n Document updateDocument=new Document(\"$set\", document);\n\n\n table.updateMany(eq(\"userType\", \"Free\"), updateDocument);\n }",
"int updateByPrimaryKey(GirlInfo record);",
"int updateByPrimaryKey(EvaluationRecent record);",
"int updateByPrimaryKey(CraftAdvReq record);",
"public void update(){\r\n\t\tList<Point> list = new ArrayList<Point>();\r\n\t\t\r\n\t\tlist.addAll(Arrays.asList(points));\r\n\t\t\r\n\t\tsetPoints(list);\r\n\t}",
"int updateByPrimaryKey(ProSchoolWare record);",
"int updateByPrimaryKeySelective(TBBearPer record);",
"int updateByPrimaryKeySelective(JzAct record);",
"int updateByPrimaryKey(PmKeyDbObj record);",
"int updateByPrimaryKey(FinancialManagement record);",
"int updateByPrimaryKeySelective(Yqbd record);",
"int updateByPrimaryKeySelective(CartDO record);",
"int updateByPrimaryKey(ExamRoom record);",
"int updateByPrimaryKey(Tourst record);"
]
| [
"0.69695073",
"0.6468808",
"0.6069701",
"0.6033951",
"0.5999814",
"0.59724283",
"0.5924663",
"0.59031963",
"0.5886289",
"0.58559734",
"0.5842692",
"0.5830338",
"0.5825713",
"0.58056384",
"0.5804877",
"0.57762176",
"0.5753718",
"0.57349503",
"0.57296556",
"0.57268083",
"0.57234126",
"0.5721758",
"0.5712591",
"0.56908387",
"0.5671292",
"0.56673354",
"0.564457",
"0.56407917",
"0.56251794",
"0.56202024",
"0.5616576",
"0.5606809",
"0.56060565",
"0.56029636",
"0.55991644",
"0.5595838",
"0.5595494",
"0.5591537",
"0.5587946",
"0.55829746",
"0.5581432",
"0.55800855",
"0.5570616",
"0.55701494",
"0.55701494",
"0.55643106",
"0.5563685",
"0.5560215",
"0.5551163",
"0.5546233",
"0.5540223",
"0.55391544",
"0.55360806",
"0.5535337",
"0.5534446",
"0.5533164",
"0.5531441",
"0.5524077",
"0.5520202",
"0.55181646",
"0.55164677",
"0.55161536",
"0.55156404",
"0.55155325",
"0.5513178",
"0.5511202",
"0.55109125",
"0.55098933",
"0.5505754",
"0.5503712",
"0.5503694",
"0.5497349",
"0.54964954",
"0.5495006",
"0.54943985",
"0.5490661",
"0.54903775",
"0.5486535",
"0.54856443",
"0.5483144",
"0.5480628",
"0.5479894",
"0.5478672",
"0.54713386",
"0.5470924",
"0.54684305",
"0.54678124",
"0.54662424",
"0.54657716",
"0.54648393",
"0.54646826",
"0.5461831",
"0.5460685",
"0.5459619",
"0.5459254",
"0.5458001",
"0.54566455",
"0.5453713",
"0.54536355",
"0.5451529"
]
| 0.5810401 | 13 |
Created by oldflame on 2017/4/6. | public interface Filter {
void doFilter();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"private void m50366E() {\n }",
"public void mo38117a() {\n }",
"private void poetries() {\n\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"protected boolean func_70814_o() { return true; }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n public int describeContents() { return 0; }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"public void mo4359a() {\n }",
"@Override\n public void init() {\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\n\tpublic void anular() {\n\n\t}",
"@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\tpublic void one() {\n\t\t\n\t}",
"public void gored() {\n\t\t\n\t}",
"private void kk12() {\n\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n void init() {\n }",
"private void init() {\n\n\t}",
"private void strin() {\n\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\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n public void init() {}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {}",
"public void mo6081a() {\n }",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n protected void init() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tprotected void doF8() {\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 protected void getExras() {\n }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"public abstract void mo70713b();",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\n\tpublic void init() {\n\t}",
"public void m23075a() {\n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo21877s() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"public void method_4270() {}",
"@Override\n public int retroceder() {\n return 0;\n }",
"static void feladat4() {\n\t}",
"public void mo12628c() {\n }",
"private void m50367F() {\n }",
"private MetallicityUtils() {\n\t\t\n\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"protected void mo6255a() {\n }",
"@Override\n\t\tpublic void init() {\n\t\t}"
]
| [
"0.59859735",
"0.5845303",
"0.58078015",
"0.57509106",
"0.57437044",
"0.5711291",
"0.5711291",
"0.5697734",
"0.56348187",
"0.5617914",
"0.5603921",
"0.55910647",
"0.555648",
"0.55534476",
"0.55316687",
"0.55040985",
"0.5486937",
"0.5485932",
"0.5482874",
"0.5465263",
"0.54592454",
"0.54517776",
"0.5445079",
"0.54368293",
"0.5434921",
"0.54294837",
"0.54294837",
"0.54294837",
"0.54294837",
"0.54294837",
"0.5424839",
"0.5421482",
"0.54213065",
"0.5417713",
"0.5411208",
"0.54101676",
"0.540766",
"0.54051495",
"0.5397294",
"0.53867084",
"0.53728276",
"0.53728276",
"0.53728276",
"0.53728276",
"0.53728276",
"0.53728276",
"0.5371694",
"0.53550345",
"0.5351391",
"0.53499705",
"0.5345723",
"0.53434193",
"0.5329635",
"0.53281945",
"0.53275937",
"0.5324648",
"0.5324648",
"0.5324648",
"0.5324648",
"0.5324648",
"0.5324648",
"0.5324648",
"0.5317454",
"0.5317454",
"0.5307276",
"0.5303221",
"0.5303221",
"0.5303221",
"0.5299748",
"0.52951366",
"0.52951366",
"0.52891624",
"0.52827895",
"0.52820194",
"0.52820194",
"0.52813995",
"0.52803504",
"0.52803504",
"0.52803504",
"0.52785254",
"0.5270604",
"0.5267612",
"0.52641964",
"0.52641964",
"0.52641964",
"0.52424085",
"0.5239483",
"0.5234518",
"0.5227127",
"0.5224491",
"0.5224261",
"0.52231914",
"0.5219883",
"0.52190983",
"0.52175546",
"0.52122414",
"0.5210739",
"0.5207077",
"0.5206137",
"0.5196749",
"0.5190239"
]
| 0.0 | -1 |
TODO Autogenerated method stub | private void cargaListeners() {
btnGuardar.addActionListener(this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | private String[] cargaComboRol() {
comboRol = new JComboBox();
for (RolDTO rolDTO : top) {
comboRol.addItem(rolDTO.getDescripcion());
}
String[] arr = new String[top.size()];
for (int i = 0; i < top.size(); i++) {
arr[i] = top.get(i).getDescripcion();
}
return arr;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | private void cargaComboTipoDocumento() {
comboTipoDoc = new JComboBox();
for (TipoDocumentoDTO tipoDocumentoDTO : tip) {
comboTipoDoc.addItem(tipoDocumentoDTO.getAbreviacion());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void actionPerformed(ActionEvent e) {
if (e.getSource() == btnGuardar) {
altaUsuario();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
Called just before this Command runs the first time | protected void initialize() {
if (dumper.isLimitSwitchPressed()){
dumper.stop();
state = STATE_SUCCESS;
}
else {
startPosition = dumper.getPosition();
desiredPosition = startPosition + increment;
dumper.backward();
state = STATE_SEEK_LEFT;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void preRun() {\n super.preRun();\n }",
"protected void preRun() {\r\n\t\tthis.preparePairs();\r\n\t}",
"@Override\n public void beforeFirstLogic() {\n }",
"public void prePerform() {\n // nothing to do by default\n }",
"protected void onFirstUse() {}",
"@Override\n\t\t\tprotected void onPreExecute()\n\t\t\t{\n\n\t\t\t}",
"@Override\n public void beforeStart() {\n \n }",
"protected void initialize() {\n\t\tRobot.firstAutonomousCommandDone = true;\n\t}",
"@Override\n\t\t\t\tprotected void onPreExecute()\n\t\t\t\t{\n\t\t\t\t\tsuper.onPreExecute();\n\t\t\t\t}",
"public void preExecution() throws CommandListenerException;",
"public void initDefaultCommand() {\n\t\t// Don't do anything\n }",
"@Override\n\t\tprotected void onPreExecute() {\n\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}",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}",
"protected void onFirstTimeLaunched() {\n }",
"@Override\n\t\t\tprotected void onPreExecute() {\n\t\t\t\tsuper.onPreExecute();\n\t\t\t}",
"@Override\n\t\t\tprotected void onPreExecute() {\n\t\t\t\tsuper.onPreExecute();\n\t\t\t}",
"@Override\r\n\t\t\t\tpublic void autInitProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void autInitProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}",
"protected void runBeforeStep() {}",
"@Override\n protected void onPreExecute() {\n\n }",
"@Override\n protected void onPreExecute() {\n\n }",
"@Override\n protected void onPreExecute() {\n\n }",
"@Override\n protected void onPreExecute() {\n\n }",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}",
"@Override\r\n\t\tprotected void onPreExecute() {\n\t\t}",
"@Override\r\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\r\n\r\n\t\t}",
"@Override\n protected void onStart() {\n checkUserStatus();\n\n super.onStart();\n }",
"void PrepareRun() {\n }",
"@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t}",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t}",
"@Override\n\t\tprotected void onPreExecute() \n\t\t{\n\t\t}",
"@Override\r\n\t\t\tprotected void onPreExecute() {\n\t\t\t\tsuper.onPreExecute();\r\n\t\t\t}",
"public void autonomousInit() {\n if (autonomousCommand != null) autonomousCommand.start();\n }",
"protected void onPreExecute() {\n\t\t}",
"@Override\n protected void onStart() {\n checkUserStatus();\n super.onStart();\n }",
"protected void initDefaultCommand() {\n \t\t\n \t}",
"@Override\n protected void onPreExecute() {\n }",
"@Override\n protected void onPreExecute() {\n }",
"@Override\n protected void onPreExecute() {\n }",
"@Override\n protected void onPreExecute() {\n }",
"@Override\n protected void onPreExecute() {\n }",
"@Override\n\t protected void onPreExecute() {\n\t }",
"public void initDefaultCommand() {\n \n }",
"@Override\n\t\t\t\t\tprotected void onPreExecute() {\n\t\t\t\t\t\tsuper.onPreExecute();\n\t\t\t\t\t}",
"public void autonomousInit() {\n\t\tautonomousCommand.start();\r\n\t}",
"@Override\n\t\t\t\t\tpublic void onStart() {\n\n\t\t\t\t\t}",
"@Override\r\n\tprotected void doPre() {\n\t\t\r\n\t}",
"@Override\n\t\t\tpublic void onPreExecute() {\n\t\t\t\t\n\t\t\t}",
"@Override\r\n\tprotected void initDefaultCommand() {\n\t\t\r\n\t}",
"@Override\n public void initDefaultCommand() {\n }",
"@Override\n public void initDefaultCommand() {\n }",
"@Override\n public void initDefaultCommand() {\n }",
"@Override\n public void initDefaultCommand() {\n }",
"@Override\n public void initDefaultCommand() {\n }",
"@Override\n public void initDefaultCommand() {\n }",
"@Override\n public void initDefaultCommand() {\n }",
"protected abstract void preRun();",
"@Override\n public void initDefaultCommand() {\n\n }",
"private Command() {\n initFields();\n }",
"public void initDefaultCommand() {\n \n }",
"@RequiresApi(api = Build.VERSION_CODES.N)\n public void StartInitial() {\n model.StartInitial();\n\n // Add any code required\n\n }",
"public void onStart() {\n /* do nothing - stub */\n }",
"@Override\n protected void startUp() {\n }",
"@Override\r\n\tprotected void onPreExecute() {\n\t}",
"@Override\n public void initDefaultCommand() \n {\n }",
"@Override\n protected void onPreExecute()\n {\n super.onPreExecute();\n }",
"@Override\n protected void onPreExecute() {\n\n super.onPreExecute();\n\n }",
"@Override\r\n protected void onPreExecute() {\n super.onPreExecute();\r\n }",
"@Override\r\n\tpublic void preCheck(CheckCommand checkCommand) throws Exception {\n\r\n\t}",
"public void preInstallHook() {\n }",
"public void startup() {\n neutral();\n }",
"public void initDefaultCommand() {\n\t}",
"@Override\n\tprotected void onPreExecute() {\n\t\tsuper.onPreExecute();\n\t}",
"@Override\n\tprotected void onPreExecute() {\n\t\tsuper.onPreExecute();\n\t}",
"@Override\n\tprotected void onPreExecute() {\n\t\tsuper.onPreExecute();\n\t}",
"@Override\n\tprotected void onPreExecute() {\n\t\tsuper.onPreExecute();\n\n\t}",
"@Override\n\tprotected void onPreExecute() {\n\t\tsuper.onPreExecute();\n\n\t}",
"public void onStart() {\n super.onStart();\n getStockVerification();\n }",
"@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t\tsuper.onStart();\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t\tsuper.onStart();\n\t\t\t\t}",
"@Override\n public void onStart() {\n \n }",
"@Override\n public void onStart() {\n \n }",
"@Override\n public void preStart() {\n Reaper.watchWithDefaultReaper(this);\n }"
]
| [
"0.7113986",
"0.6542487",
"0.64347786",
"0.6433418",
"0.64082474",
"0.6353506",
"0.6309701",
"0.62537354",
"0.62473047",
"0.62407833",
"0.6167777",
"0.6163407",
"0.6129232",
"0.6129232",
"0.6129232",
"0.6129232",
"0.6129232",
"0.61080366",
"0.608483",
"0.608483",
"0.60805327",
"0.60805327",
"0.6068528",
"0.60680324",
"0.60680324",
"0.60680324",
"0.60680324",
"0.6061779",
"0.6061779",
"0.6061779",
"0.6061779",
"0.6061779",
"0.6061779",
"0.6061779",
"0.6061779",
"0.6061779",
"0.6061779",
"0.6061779",
"0.6061779",
"0.6061779",
"0.6061779",
"0.6061779",
"0.60580724",
"0.6044969",
"0.6041834",
"0.603989",
"0.6035691",
"0.60305667",
"0.60298306",
"0.6012218",
"0.60053056",
"0.6002687",
"0.59965384",
"0.59901303",
"0.5988611",
"0.5988611",
"0.5988611",
"0.5988611",
"0.5988611",
"0.5977599",
"0.59622574",
"0.5961238",
"0.59496737",
"0.59461665",
"0.59449667",
"0.5909627",
"0.5907129",
"0.59067136",
"0.59067136",
"0.59067136",
"0.59067136",
"0.59067136",
"0.59067136",
"0.59067136",
"0.59065974",
"0.5906112",
"0.5902859",
"0.5901146",
"0.5892453",
"0.58864474",
"0.5884274",
"0.58823276",
"0.58756584",
"0.5870505",
"0.5860054",
"0.5857494",
"0.58513945",
"0.5844433",
"0.58421814",
"0.5840623",
"0.5837147",
"0.5837147",
"0.5837147",
"0.58352405",
"0.58352405",
"0.5834613",
"0.58340293",
"0.58340293",
"0.58284307",
"0.58284307",
"0.58276254"
]
| 0.0 | -1 |
Called repeatedly when this Command is scheduled to run | protected void execute() {
if (dumper.isLimitSwitchPressed()) {
dumper.stop();
state = STATE_SUCCESS;
}
if (increment >= maxSeek) {
dumper.stop();
state = STATE_FAILURE;
}
switch (state) {
case STATE_SEEK_LEFT:
if (dumper.getPosition() >= desiredPosition) {
desiredPosition = startPosition - increment;
dumper.foward();
state = STATE_SEEK_RIGHT;
}
break;
case STATE_SEEK_RIGHT:
if (dumper.getPosition() <= desiredPosition) {
increment += 0.05;
desiredPosition = startPosition + increment;
dumper.backward();
state = STATE_SEEK_LEFT;
}
break;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\tvoid runCommand() {\n\t\t\ttrigger.execute();\n\t\t}",
"@Override\n public void run() {\n schedule();\n }",
"@Override\n public void autonomousPeriodic() {\n \n Scheduler.getInstance().run();\n \n }",
"public void run() {\n\t\texecuteCommand( client, false );\n\t}",
"@Override\n public void periodic() {\n // This method will be called once per scheduler run\n }",
"@Override\n\tpublic void execute() {\n\t\tsuper.execute();\n\n\t\t// TBD Needs rewrite for multi tenant\n\t\ttry {\t\n\t\t\tif (async == null || !async)\n\t\t\t\tupdated = Crosstalk.getInstance().refresh(customer);\n\t\t\telse {\n\t\t\t\tfinal Long id = random.nextLong();\n\t\t\t\tfinal ApiCommand theCommand = this;\n\t\t\t\tThread thread = new Thread(new Runnable() {\n\t\t\t\t @Override\n\t\t\t\t public void run(){\n\t\t\t\t \ttry {\n\t\t\t\t\t\t\tupdated = Crosstalk.getInstance().refresh(customer);\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\terror = true;\n\t\t\t\t\t\t\tmessage = e.toString();\n\t\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t\t});\n\t\t\t\tthread.start();\n\t\t\t\tasyncid = \"\" + id;\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}",
"@Override\n public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }",
"protected void runEachMinute() {\n \n }",
"@Override\n public void execute() {\n Time.sleep(3000);\n Starting.execute();\n }",
"@Override\r\n public void robotPeriodic() {\r\n // Runs the Scheduler. This is responsible for polling buttons, adding newly-scheduled\r\n // commands, running already-scheduled commands, removing finished or interrupted commands,\r\n // and running subsystem periodic() methods. This must be called from the robot's periodic\r\n // block in order for anything in the Command-based framework to work.\r\n CommandScheduler.getInstance().run();\r\n }",
"@Override\n public void robotPeriodic() {\n // Runs the Scheduler. This is responsible for polling buttons, adding newly-scheduled\n // commands, running already-scheduled commands, removing finished or interrupted commands,\n // and running subsystem periodic() methods. This must be called from the robot's periodic\n // block in order for anything in the Command-based framework to work.\n CommandScheduler.getInstance().run();\n }",
"@Override\n public void autonomousPeriodic()\n {\n Scheduler.getInstance().run();\n }",
"public void autonomousPeriodic() {\r\n Scheduler.getInstance().run();\r\n }",
"private void scheduleJob() {\n\n }",
"@Override\n\tpublic void execute() {\n\t\tcmdReceiver.send();\n\t}",
"public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }",
"protected void run() throws IOException {\n\t\tif (lastTime + interval > Time.now())\n\t\t\treturn;\n\t\texitCode = 0; // reset for next run\n\t\trunCommand();\n\t}",
"protected void execute() {\n \tclimber.setCLimberSpeed(0);\n }",
"@Override\n public void teleopPeriodic()\n {\n Scheduler.getInstance().run();\n }",
"private void doCommand() {\n try {\n TimeUnit.SECONDS.sleep(2L);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"protected void waitUntilCommandFinished() {\n }",
"public void autonomousPeriodic() \n {\n Scheduler.getInstance().run();\n }",
"@Override\n public void teleopPeriodic() {\n Scheduler.getInstance().run();\n \n }",
"private void schedule() {\n service.scheduleDelayed(task, schedulingInterval);\n isScheduled = true;\n }",
"public void autonomousPeriodic() {\r\n\t\tScheduler.getInstance().run();\r\n\t}",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}",
"@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}",
"@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}",
"@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}",
"@Override\n\tprotected void run() {\n\t\tUtils.executeAndWaitForCommand(this.getHMetisExec());\n\t}",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\t\n\t}",
"@Override\n public void autonomousPeriodic() {\n \n }",
"public void intialRun() {\n }",
"@Override\n public void periodic() {\n UpdateDashboard();\n }",
"public void teleopPeriodic() {\r\n\t\tScheduler.getInstance().run();\r\n\t}",
"@Override\n\tprotected void postRun() {\n\n\t}",
"protected void execute() {\n \t\n \tcurrent_time = System.currentTimeMillis();\n \t\n \tlift.liftDown(LIFT_SPEED);\n }",
"@Override\n\tpublic void teleopPeriodic() //runs the teleOp part of the code, repeats every 20 ms\n\t{\n\t\tScheduler.getInstance().run(); //has to be here, I think that this is looping the method\n\t\tSmartDashboard.putNumber(\"Encoder Left: \", RobotMap.encoderLeft.getRaw()); //putting the value of the left encoder to the SmartDashboard\n\t\tSmartDashboard.putNumber(\"Encoder Right: \", RobotMap.encoderRight.getRaw()); //putting the value of the right encoder to the smartDashboard\n\t\tSmartDashboard.putNumber(\"Ultrasonic sensor\", ultrasonic.getDistanceIn()); //putting the value of the ultrasonic sensor to the smartDashboard\n//\t\tSmartDashboard.putBoolean(\"allOK\", Robot.driveFar.ultrasonicOK);\n\t\tdriveExecutor.execute(); //running the execute method in driveExecutor\n\t\tgrab.execute(); //running the execute() method in GearGrab_Command (should run without this but this is ensuring us that it is on)\n\t}",
"public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void run() {\n\t\t\t\tIMSScheduleManager.super.startCron();\r\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\n\t\t\t}",
"@Override\n public void autonomousPeriodic() {\n\n }",
"@Override\n public void autonomousPeriodic() \n {\n Scheduler.getInstance().run();\n log();\n }",
"@Override\n\tpublic void postRun() {\n\t}",
"public void autonomousPeriodic() {\n // RobotMap.helmsman.trackPosition();\n Scheduler.getInstance().run();\n }",
"private void beginSchedule(){\n\t\tDivaApp.getInstance().submitScheduledTask(new RandomUpdater(this), RandomUpdater.DELAY, RandomUpdater.PERIOD);\n\t}",
"protected void runEachSecond() {\n \n }",
"@Override\n protected void execute() {\n Robot.toteLifterSubsystem.setEjectorState(EjectorState.EXTENDING, ramper.process(1.0));\n }",
"protected void execute() {\n\t\t_xboxControllerToRumble.setRumble(_rumbleType, _rumbleValue);\n\t\t_timesRumbled++;\n\t\tSystem.out.println(\"Rumbling \" + _timesRumbled);\n\t}",
"private void runPeriodic() {\n boolean ok = ScheduledFutureTask.super.runAndReset();\n boolean down = isShutdown();\n // Reschedule if not cancelled and not shutdown or policy allows\n if (ok && !down) {\n updateNextExecutionTime();\n MeasurableScheduler.super.getQueue().add(this);\n }\n // This might have been the final executed delayed\n // task. Wake up threads to check.\n else if (down)\n interruptIdleWorkers();\n }",
"public void execute() {\n\t\tlaunch();\n\t}",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\tpublic void run() {\n\t\tif (this.isRunning == true) {\n\t\t\treturn;\n\t\t}\n\t\tthis.isRunning = true;\n\t\t// 写入一条日志\n\t\t\n\t\t// 详细运行参数\n\t\ttry {\n\t\t\tthis.taskRun();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tthis.isRunning = false;\n\t\tthis.addHistory(new Date());\n\t\tif(this.once) {\n\t\t\tthis.cancel();\n\t\t}\n\t}",
"@Override\n public void run() {\n systemTurn();\n }",
"@Override\n public void run() {\n systemTurn();\n }",
"@Override\n public void run() {\n systemTurn();\n }",
"@Override\n public void run() {\n systemTurn();\n }",
"@Override\n public void run() {\n systemTurn();\n }",
"@Override\n public void run() {\n systemTurn();\n }",
"@Override\n public void run() {\n systemTurn();\n }",
"@Override\n public void run() {\n systemTurn();\n }",
"@Override\n public void run() {\n systemTurn();\n }",
"@Override\n public void autonomousPeriodic() {\n }",
"@Override\n public void autonomousPeriodic() {\n }",
"@Override\n public void autonomousPeriodic() {\n }",
"@Override\n public void taskStarting() {\n\n }",
"@Override\n public void teleopPeriodic() {\n Scheduler.getInstance().run();\n log();\n }",
"@PostConstruct\n public void postConstruct() {\n execService = Executors.newScheduledThreadPool(1);\n scheduledFuture = execService.scheduleAtFixedRate(this, 0, PUSH_REPEAT_DELAY, TimeUnit.MILLISECONDS);\n }",
"protected void run() {\r\n\t\t//\r\n\t}",
"@Override\n\tpublic void run() {\n\t\tautomatischDurchAlleRouten();\n\n\t\t\n\t}",
"public void autonomousPeriodic()\n\t{\n\t\tScheduler.getInstance().run();\n\t}",
"@Override\n public void execute() {\n if (System.currentTimeMillis() - currentMs >= timeMs) {\n // Delay has passed so initialize object11\n super.initialize();\n }\n }",
"@Override\n\tprotected void execute() {\n\t\tRobot.collector.setMawOpen(Robot.oi.getCollectorOpen());\n\t\tRobot.collector.setIntakeSpeed(Robot.oi.getCollectorSpeed());\n\t\tRobot.collector.setWristStageOneRetracted(Robot.oi.getWristStageOneRetracted());\n\t\tRobot.collector.setWristStageTwoRetracted(Robot.oi.getWristStageTwoRetracted());\n\t}",
"protected void execute() {\n \tRobot.chassisSubsystem.shootHighM.set(0.75);\n \tif(timeSinceInitialized() >= 1.25){\n \t\tRobot.chassisSubsystem.liftM.set(1.0);\n \t}\n }",
"protected void execute() {\n command.start();\n }",
"@Override\n public void autonomousPeriodic() {\n }",
"@Override\n public void autonomousPeriodic() {\n\t// updateDiagnostics();9\n\tScheduler.getInstance().run();\n }",
"@Override\n public void run()\n {\n //Log.d(TAG ,\"==========>Task Run In!\");\n updateDroneLocation();\n }",
"public void teleopPeriodic()\n\t{\n\t\tScheduler.getInstance().run();\n\t}",
"public void execute() {\n setExecuted(true);\n }",
"@Override\n public void teleopPeriodic() {\n\tupdateDiagnostics();\n\tScheduler.getInstance().run();\n }",
"public void execute() {\n\t\t\n\t\tdrivetrain.updateAnglePID();\n\t\t\n//\t\tif (drivetrain.currentControl()) {\n//\t\t\tdrivetrain.shiftGears();\n//\t\t}\n\t}",
"protected void execute() {\n\t\tshooter.runShooter(power);\n\t}",
"@Override\r\n public void run() {}",
"@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n }",
"protected void execute() {\n \tshooterWheel.shooterWheelSpeedControllerAft.Pause();\n \tshooterWheel.shooterWheelSpeedControllerFwd.Pause();\n \t\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"public void run() {\n ui.printStartingMessage();\n boolean isExit = false;\n\n while (!isExit) {\n isExit = parser.determineCommand();\n }\n\n storage.saveToFile(taskList);\n }"
]
| [
"0.6689458",
"0.6631115",
"0.6566414",
"0.65512514",
"0.6530515",
"0.6488629",
"0.64019585",
"0.6380878",
"0.637645",
"0.6363615",
"0.63557744",
"0.6330997",
"0.6295938",
"0.6275704",
"0.6268897",
"0.62656784",
"0.62656784",
"0.62656784",
"0.62656784",
"0.62656784",
"0.62656784",
"0.6255461",
"0.624429",
"0.6241397",
"0.62090397",
"0.6183934",
"0.6178626",
"0.61670285",
"0.614122",
"0.6137012",
"0.6132416",
"0.6132416",
"0.6132416",
"0.6132416",
"0.61313075",
"0.61313075",
"0.61313075",
"0.6120398",
"0.61091226",
"0.61073244",
"0.610631",
"0.610404",
"0.6101818",
"0.61014",
"0.6099132",
"0.6093559",
"0.6092883",
"0.6092883",
"0.6092883",
"0.6092883",
"0.60926527",
"0.60926485",
"0.6077805",
"0.6074907",
"0.606528",
"0.6062541",
"0.60580474",
"0.6056443",
"0.60554063",
"0.6054432",
"0.60539037",
"0.60538137",
"0.60505164",
"0.60505164",
"0.604125",
"0.6029588",
"0.6029588",
"0.6029588",
"0.6029588",
"0.6029588",
"0.6029588",
"0.6029588",
"0.6029588",
"0.6029588",
"0.6027496",
"0.6027496",
"0.6027496",
"0.60272455",
"0.6009362",
"0.6006723",
"0.59990466",
"0.59985226",
"0.59967",
"0.5994757",
"0.5985855",
"0.59771705",
"0.5973198",
"0.5970597",
"0.59701514",
"0.5965313",
"0.5964212",
"0.596267",
"0.59585357",
"0.5954102",
"0.595137",
"0.5949223",
"0.5946874",
"0.5942587",
"0.59406763",
"0.59406763",
"0.59366745"
]
| 0.0 | -1 |
Make this return true when this Command no longer needs to run execute() | protected boolean isFinished() {
if (state == STATE_SUCCESS) {
// Success
return true;
}
if (state == STATE_FAILURE) {
// Failure
return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean execute() {\n return false;\n }",
"@Override\n public boolean execute() {\n return false;\n }",
"public boolean execute(){\n return false;\n }",
"@Override\n\tpublic boolean Unexecute() \n\t{\n\t\treturn false;\n\t}",
"protected boolean onExecute(String command)\n {\n return false;\n }",
"@Override\n\tpublic boolean execute() {\n\t\treturn false;\n\t}",
"@Override\n\t\tpublic boolean shouldContinueExecuting() {\n\t\t\treturn false;\n\t\t}",
"public boolean shouldExecute() {\n\t\treturn true;\n\t}",
"protected void execute() {\n \t// literally still do nothing\n }",
"@Override\n public boolean canExecute() {\n return true;\n }",
"protected void execute() {\n finished = true;\n }",
"@Override\r\n\tpublic void unexecute() {\n\t\t\r\n\t}",
"public Command() {\n this.executed = false;\n }",
"@Override\n public void stopExecute() {\n\n }",
"public boolean shouldExecute()\n {\n if (this.runDelay <= 0)\n {\n if (!this.theRaider.world.getGameRules().getBoolean(\"mobGriefing\"))\n {\n return false;\n }\n\n this.currentTask = -1;\n this.wantsToReapStuff = true;\n }\n\n return super.shouldExecute();\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n public void execute() {\n if(!manipulatorController.getRawButton(button)){\n shooter.shooterMotorsOff();\n hopper.hopperMotorOff();\n isDone = true;\n end(false);\n }\n\n }",
"public void unExecute()\n\t{\n\t}",
"@Override\r\n protected boolean isFinished() {\n return false;\r\n }",
"@Override\r\n public void executeCommand() {\r\n shell.stopRunning();\r\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished()\n {\n return false;\n }",
"@Override\r\n\tprotected boolean isFinished() {\r\n\t\treturn false;\r\n\t}",
"@Override\r\n\tprotected boolean isFinished() {\r\n\t\treturn false;\r\n\t}",
"@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\t\t\n\t}",
"@Override\n protected boolean isFinished() \n {\n return false;\n }",
"@Override\r\n\tprotected boolean isFinished() {\n\t\treturn false;\r\n\t}",
"@Override\r\n\tprotected boolean isFinished() {\n\t\treturn false;\r\n\t}",
"@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}",
"@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}",
"@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}",
"@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}",
"@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}",
"@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}",
"@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}",
"@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}",
"@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}",
"@Override\n boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\r\n return false;\r\n }",
"protected boolean isFinished() {\r\n return false;\r\n }",
"public boolean shouldContinueExecuting() {\n return (this.shouldExecute() || !this.entity.getNavigator().noPath()) && this.isBowInMainhand();\n }",
"public void prepareExecuteNoSelect() {\n setCallFromStatement();\n // The statement is no longer require so can be released.\n clearStatement();\n\n super.prepareExecuteNoSelect();\n }",
"public boolean shouldExecute() {\n return this.goalOwner.getTeam() == null ? false : super.shouldExecute();\n }",
"protected void waitUntilCommandFinished() {\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"@Override\n\tprotected boolean isFinished()\n\t{\n\t\treturn false;\n\t}",
"@Override\n public boolean isFinished() {\n return false;\n }",
"@Override\n public boolean isFinished() {\n return false;\n }",
"@Override\n public boolean isFinished() {\n return false;\n }",
"@Override\n public boolean isFinished() {\n return false;\n }",
"@Override\n public boolean isFinished() {\n return false;\n }",
"protected void executionSuccess() {\n this.isUndoable = true;\n }",
"protected boolean isFinished() {\n return false;\n \n }",
"boolean redoLastCommand() throws Exception;",
"@Override\n public boolean isFinished() {\n return false;\n }",
"public boolean shouldContinueExecuting() {\n return this.currentTask >= 0 && super.shouldContinueExecuting();\n }",
"@Override\r\n public void execute()\r\n {\r\n printInvalidCommandMessage();\r\n }"
]
| [
"0.77304816",
"0.77304816",
"0.76760596",
"0.764923",
"0.75952446",
"0.7550453",
"0.68742687",
"0.67432994",
"0.67265856",
"0.668",
"0.65859616",
"0.6567678",
"0.6496604",
"0.6387659",
"0.6370114",
"0.63563305",
"0.63563305",
"0.63515383",
"0.6344155",
"0.63286215",
"0.6327433",
"0.63183534",
"0.63183534",
"0.63183534",
"0.63183534",
"0.63183534",
"0.63183534",
"0.63183534",
"0.63183534",
"0.63183534",
"0.63183534",
"0.63183534",
"0.63183534",
"0.63183534",
"0.63183534",
"0.63183534",
"0.63149667",
"0.63092095",
"0.63092095",
"0.62971926",
"0.6274604",
"0.627375",
"0.627375",
"0.62493956",
"0.62493956",
"0.62493956",
"0.62493956",
"0.62493956",
"0.62493956",
"0.62493956",
"0.62493956",
"0.62493956",
"0.6211426",
"0.620859",
"0.620859",
"0.6207548",
"0.6204079",
"0.6204041",
"0.61942303",
"0.61844873",
"0.61844873",
"0.61844873",
"0.61844873",
"0.61844873",
"0.61844873",
"0.61844873",
"0.61844873",
"0.61844873",
"0.61844873",
"0.61844873",
"0.61844873",
"0.61844873",
"0.61844873",
"0.61844873",
"0.61844873",
"0.61844873",
"0.61844873",
"0.61844873",
"0.61844873",
"0.61844873",
"0.61844873",
"0.61844873",
"0.61844873",
"0.61844873",
"0.61844873",
"0.61844873",
"0.61844873",
"0.61844873",
"0.61844873",
"0.6169737",
"0.61609185",
"0.61609185",
"0.61609185",
"0.61609185",
"0.61609185",
"0.6156985",
"0.61524516",
"0.61493033",
"0.6145587",
"0.6141461",
"0.6140292"
]
| 0.0 | -1 |
Called once after isFinished returns true | protected void end() {
// stop motor, reset position on the dumper, enable closed loop
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected boolean isFinished() {\n return true;\n }",
"@Override\n protected boolean isFinished() {\n return true;\n }",
"@Override\n public boolean isFinished() {\n return true;\n }",
"@Override\r\n\tprotected boolean isFinished() {\n\t\treturn true;\r\n\t}",
"@Override\r\n\tprotected boolean isFinished() {\n\t\treturn true;\r\n\t}",
"@Override\n protected boolean isFinished()\n {\n return false;\n }",
"@Override\n protected boolean isFinished() \n {\n return false;\n }",
"@Override\n public boolean isFinished() {\n return true;\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n boolean isFinished() {\n return false;\n }",
"@Override\r\n protected boolean isFinished() {\n return false;\r\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished(){\r\n return true;\r\n }",
"protected boolean isFinished() {\n return true;\n }",
"protected boolean isFinished() {\n return true;\n }",
"protected boolean isFinished() {\n return true;\n }",
"protected boolean isFinished() {\n return true;\n }",
"protected boolean isFinished() {\n return true;\n }",
"protected boolean isFinished() {\n return true;\n }",
"@Override\n public boolean isFinished() {\n return false;\n }",
"@Override\r\n\tprotected boolean isFinished() {\r\n\t\treturn false;\r\n\t}",
"@Override\r\n\tprotected boolean isFinished() {\r\n\t\treturn false;\r\n\t}",
"@Override\n public boolean isFinished() {\n return false;\n }",
"@Override\n public boolean isFinished() {\n return false;\n }",
"@Override\n public boolean isFinished() {\n return false;\n }",
"@Override\n public boolean isFinished() {\n return false;\n }",
"@Override\n public boolean isFinished() {\n return false;\n }",
"@Override\n public boolean isFinished() {\n return false;\n }",
"@Override\n public boolean isFinished() {\n return false;\n }",
"@Override\n public boolean isFinished() {\n return false;\n }",
"@Override\n public boolean isFinished() {\n return false;\n }",
"@Override\n public boolean isFinished() {\n return false;\n }",
"@Override\n public boolean isFinished() {\n return false;\n }",
"@Override\n public boolean isFinished() {\n return false;\n }",
"@Override\n public boolean isFinished() {\n return false;\n }",
"@Override\n public boolean isFinished() {\n return false;\n }",
"@Override\n public boolean isFinished() {\n return false;\n }",
"@Override\n public boolean isFinished() {\n return false;\n }",
"@Override\n public boolean isFinished() {\n return false;\n }",
"@Override\n public boolean isFinished() {\n return false;\n }",
"@Override\n public boolean isFinished() {\n return false;\n }",
"@Override\n protected boolean isFinished() {\n return isFinished;\n }",
"@Override\n public boolean isFinished() {\n return false;\n }",
"@Override\n public boolean isFinished() {\n return false;\n }",
"@Override\n public boolean isFinished() {\n return false;\n }",
"@Override\n public boolean isFinished() {\n return false;\n }",
"@Override\n public boolean isFinished() {\n return false;\n }",
"@Override\r\n\tprotected boolean isFinished() {\n\t\treturn false;\r\n\t}",
"@Override\r\n\tprotected boolean isFinished() {\n\t\treturn false;\r\n\t}",
"@Override\n\tprotected boolean isFinished()\n\t{\n\t\treturn false;\n\t}",
"@Override\r\n protected boolean isFinished() {\n if (super.isFinished()) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }",
"@Override\n protected boolean isFinished() {\n return finished;\n }",
"protected boolean isFinished()\n\t{\n\t\treturn true;\n\t}",
"protected boolean isFinished() {\n\t\treturn true;\n\t}",
"protected boolean isFinished() {\n\t\treturn true;\n\t}",
"protected boolean isFinished() {\n\t\treturn true;\n\t}",
"@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}",
"@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}",
"@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}",
"@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}",
"@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}",
"@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}",
"@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}",
"@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}",
"@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }",
"protected boolean isFinished() {\n return false;\n }"
]
| [
"0.85854495",
"0.85395205",
"0.83341306",
"0.83313096",
"0.83313096",
"0.83068",
"0.8305024",
"0.8298836",
"0.8277644",
"0.8277644",
"0.8277644",
"0.8277644",
"0.8277644",
"0.8277644",
"0.8277644",
"0.8277644",
"0.8277644",
"0.8277644",
"0.8277644",
"0.8277644",
"0.8277644",
"0.8277644",
"0.8277644",
"0.82765675",
"0.8268994",
"0.8237624",
"0.8237624",
"0.82293963",
"0.82061803",
"0.82061803",
"0.82061803",
"0.82061803",
"0.82061803",
"0.82061803",
"0.8163012",
"0.81589365",
"0.81589365",
"0.8152044",
"0.8152044",
"0.8152044",
"0.8152044",
"0.8152044",
"0.8152044",
"0.8152044",
"0.8152044",
"0.8152044",
"0.8152044",
"0.8152044",
"0.8152044",
"0.8152044",
"0.8152044",
"0.8152044",
"0.8152044",
"0.8152044",
"0.8152044",
"0.8152044",
"0.81458783",
"0.81380373",
"0.81380373",
"0.81380373",
"0.81380373",
"0.81380373",
"0.8125088",
"0.8125088",
"0.81129867",
"0.8111655",
"0.808855",
"0.8083022",
"0.8040255",
"0.8040255",
"0.8040255",
"0.8032732",
"0.8032732",
"0.8032732",
"0.8032732",
"0.8032732",
"0.8032732",
"0.8032732",
"0.8032732",
"0.8032732",
"0.8026885",
"0.8026885",
"0.8026885",
"0.8026885",
"0.8026885",
"0.8026885",
"0.8026885",
"0.8026885",
"0.8026885",
"0.8026885",
"0.8026885",
"0.8026885",
"0.8026885",
"0.8026885",
"0.8026885",
"0.8026885",
"0.8026885",
"0.8026885",
"0.8026885",
"0.8026885",
"0.8026885"
]
| 0.0 | -1 |
Called when another command which requires one or more of the same subsystems is scheduled to run | protected void interrupted() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public AutonomousCommand(LiftSubsystem m_lift, ArmSubsystem m_arm, Shooter m_shooter, DriveSubsystem m_drive,\n HopperSubsystem m_hopper, Intake m_intake) {\n // Add your commands in the super() call, e.g.\n // super(new FooCommand(), new BarCommand());\n // alongwith- birlikte çalıştırmak için // withtimeout-- girdigin sure kadar\n // yapar\n // (new RunShooter(m_shooter, 1).withTimeout(0.75),new RunLift(m_lift,\n // 0.5).raceWith(new RunHopper(m_hopper, 0.8)),\n // new AutonomousDrive(m_drive, 0.8, 300).withTimeout(3));\n\n super(new RunShooter(m_shooter, 0.8).withTimeout(0.75),\n new RunShooter(m_shooter, 0.8).raceWith(new RunHopper(m_hopper, 0.8)).withTimeout(2.5),\n new AutonomousDrive(m_drive, -0.8, -300).raceWith(new RunIntake(m_intake, 0.8)\n .raceWith(new RunHopper(m_hopper, 0.8).raceWith(new RunShooter(m_shooter, 0.3),\n new AutonomousDrive(m_drive, 0.8, 300), new RunShooter(m_shooter, 0.8).withTimeout(0.75),\n new RunShooter(m_shooter, 0.8).raceWith(new RunHopper(m_hopper, 0.8).withTimeout(2.5))))));\n\n }",
"@Override\n /**\n * Set the default command for a subsystem here\n */\n public void initDefaultCommand() \n {\n // Set the default command for a subsystem here.\n // setDefaultCommand(new MySpecialCommand());\n }",
"private void registerCommands() {\n\t\tCommandRegistry.INSTANCE.register(false, (dispatcher) -> dispatcher.register(\n\t\t\t\tCommandManager.literal(\"arrecurtick\")\n\t\t\t\t\t\t.then(argument(\"Number of Ticks Between Sends\", integer())\n\t\t\t\t\t\t\t\t.executes(c -> {\n\t\t\t\t\t\t\t\t\tconfig.timeBetween = getInteger(c, \"Number of Ticks Between Sends\");\n\t\t\t\t\t\t\t\t\tConfigManager.saveConfig(config, \"AutoReplyConfigFile\");\n\t\t\t\t\t\t\t\t\tc.getSource().sendFeedback(new StringTextComponent(\"Recurring message will be sent every \" + getInteger(c, \"Number of Ticks Between Sends\") + \" ticks.\"), false);\n\t\t\t\t\t\t\t\t\treturn Command.SINGLE_SUCCESS;\n\t\t\t\t\t\t\t\t}))\n\t\t));\n\t\t//arrecurphrase [Recurring Phrase]\n\t\tCommandRegistry.INSTANCE.register(false, (dispatcher) -> dispatcher.register(\n\t\t\t\tCommandManager.literal(\"arrecurphrase\")\n\t\t\t\t\t\t.then(argument(\"Recurring Phrase\", string())\n\t\t\t\t\t\t\t\t.executes(c -> {\n\t\t\t\t\t\t\t\t\tconfig.persistentPhrase = getString(c, \"Recurring Phrase\");\n\t\t\t\t\t\t\t\t\tConfigManager.saveConfig(config, \"AutoReplyConfigFile\");\n\t\t\t\t\t\t\t\t\tc.getSource().sendFeedback(new StringTextComponent(\"Recurring message set to \\\"\" + getString(c, \"Recurring Phrase\") + \"\\\".\"), false);\n\t\t\t\t\t\t\t\t\treturn Command.SINGLE_SUCCESS;\n\t\t\t\t\t\t\t\t}))\n\t\t));\n\t\t//arrecurtoggle\n\t\tCommandRegistry.INSTANCE.register(false, (dispatcher) -> dispatcher.register(\n\t\t\t\tCommandManager.literal(\"arrecurtoggle\")\n\t\t\t\t\t\t.executes(c -> {\n\t\t\t\t\t\t\tconfig.persistentChat = !config.persistentChat;\n\t\t\t\t\t\t\tConfigManager.saveConfig(config, \"AutoReplyConfigFile\");\n\t\t\t\t\t\t\tc.getSource().sendFeedback(new StringTextComponent(\"Recurring message has been turned \" + (config.persistentChat ? \"on\" : \"off\") + \".\"), false);\n\t\t\t\t\t\t\treturn Command.SINGLE_SUCCESS;\n\t\t\t\t\t\t})\n\t\t));\n\t\t//arrecur [Enabled?]\n\t\tCommandRegistry.INSTANCE.register(false, (dispatcher) -> dispatcher.register(\n\t\t\t\tCommandManager.literal(\"arrecur\")\n\t\t\t\t\t\t.then(argument(\"Enabled?\", bool())\n\t\t\t\t\t\t\t\t.executes(c -> {\n\t\t\t\t\t\t\t\t\tconfig.persistentChat = getBool(c, \"Enabled?\");\n\t\t\t\t\t\t\t\t\tConfigManager.saveConfig(config, \"AutoReplyConfigFile\");\n\t\t\t\t\t\t\t\t\tc.getSource().sendFeedback(new StringTextComponent(\"Recurring message set to \\\"\" + (config.persistentChat ? \"on\" : \"off\") + \"\\\".\"), false);\n\t\t\t\t\t\t\t\t\treturn Command.SINGLE_SUCCESS;\n\t\t\t\t\t\t\t\t}))\n\t\t));\n\t\t//aradditem [Item Name] [Trigger Term]\n\t\tCommandRegistry.INSTANCE.register(false, (dispatcher) -> dispatcher.register(\n\t\t\t\tCommandManager.literal(\"araddterm\")\n\t\t\t\t\t\t.then(argument(\"Item Name\", string())\n\t\t\t\t\t\t\t\t.then(argument(\"Trigger Term\", string())\n\t\t\t\t\t\t\t\t.executes(c -> {\n\t\t\t\t\t\t\t\t\tconfig.terms.add(getString(c, \"Trigger Term\") + \"|\" + getString(c, \"Item Name\"));\n\t\t\t\t\t\t\t\t\tConfigManager.saveConfig(config, \"AutoReplyConfigFile\");\n\t\t\t\t\t\t\t\t\tHelper.setupChatMessages();\n\t\t\t\t\t\t\t\t\tc.getSource().sendFeedback(new StringTextComponent(\"Added term \\\"\" + getString(c, \"Trigger Term\") + \"\\\" to item \\\"\" + getString(c, \"Item Name\") + \"\\\".\"), false);\n\t\t\t\t\t\t\t\t\treturn Command.SINGLE_SUCCESS;\n\t\t\t\t\t\t\t\t})))\n\t\t));\n\t\t//araddin [In Phrase]\n\t\tCommandRegistry.INSTANCE.register(false, (dispatcher) -> dispatcher.register(\n\t\t\t\tCommandManager.literal(\"araddin\")\n\t\t\t\t\t\t.then(argument(\"In Phrase\", string())\n\t\t\t\t\t\t\t\t.executes(c -> {\n\t\t\t\t\t\t\t\t\tconfig.ins.add(getString(c, \"In Phrase\"));\n\t\t\t\t\t\t\t\t\tConfigManager.saveConfig(config, \"AutoReplyConfigFile\");\n\t\t\t\t\t\t\t\t\tc.getSource().sendFeedback(new StringTextComponent(\"Added in-phrase \\\"\" + getString(c, \"In Phrase\") + \"\\\".\"), false);\n\t\t\t\t\t\t\t\t\treturn Command.SINGLE_SUCCESS;\n\t\t\t\t\t\t\t\t}))\n\t\t));\n\t\t//araddout [Out Phrase]\n\t\tCommandRegistry.INSTANCE.register(false, (dispatcher) -> dispatcher.register(\n\t\t\t\tCommandManager.literal(\"araddout\")\n\t\t\t\t\t\t.then(argument(\"Out Phrase\", string())\n\t\t\t\t\t\t\t\t.executes(c -> {\n\t\t\t\t\t\t\t\t\tconfig.outs.add(getString(c, \"Out Phrase\"));\n\t\t\t\t\t\t\t\t\tConfigManager.saveConfig(config, \"AutoReplyConfigFile\");\n\t\t\t\t\t\t\t\t\tc.getSource().sendFeedback(new StringTextComponent(\"Added out-phrase \\\"\" + getString(c, \"Out Phrase\") + \"\\\".\"), false);\n\t\t\t\t\t\t\t\t\treturn Command.SINGLE_SUCCESS;\n\t\t\t\t\t\t\t\t}))\n\t\t));\n\t\t//arreload\n\t\tCommandRegistry.INSTANCE.register(false, (dispatcher) -> dispatcher.register(\n\t\t\t\tCommandManager.literal(\"arreload\")\n\t\t\t\t\t\t.executes(c -> {\n\t\t\t\t\t\t\tarreload();\n\t\t\t\t\t\t\tc.getSource().sendFeedback(new StringTextComponent(\"AutoReply config reloaded.\"), false);\n\t\t\t\t\t\t\treturn Command.SINGLE_SUCCESS;\n\t\t\t\t\t\t})\n\t\t));\n\t\t//araddshopitem [Item Name] [Quantity] [Price]\n\t\tCommandRegistry.INSTANCE.register(false, (dispatcher) -> dispatcher.register(\n\t\t\t\tCommandManager.literal(\"araddshopitem\")\n\t\t\t\t\t\t.then(argument(\"Item Name\", string()).then(argument(\"Quantity\", string()).then(argument(\"Price\", string())\n\t\t\t\t\t\t.executes(c -> {\n\t\t\t\t\t\t\tconfig.shopItems.add(getString(c, \"Item Name\") + \"|\" + getString(c, \"Quantity\") + \"|$\" + getString(c, \"Price\"));\n\t\t\t\t\t\t\tConfigManager.saveConfig(config, \"AutoReplyConfigFile\");\n\t\t\t\t\t\t\tc.getSource().sendFeedback(new StringTextComponent(\"Added \" + getString(c, \"Item Name\") + \" to shop stock.\"), false);\n\t\t\t\t\t\t\treturn Command.SINGLE_SUCCESS;\n\t\t\t\t\t\t}))))\n\t\t));\n\t}",
"@Override\n\t\tpublic void subTask(String arg0) {\n\n\t\t}",
"public InstantCommand(Runnable toRun, Subsystem... requirements) {\n\t\trequireNonNull(toRun);\n\t\tm_toRun = toRun;\n\t\taddRequirements(requirements);\n\t}",
"private void registerCommands() {\n }",
"protected void runSubCommand(int num) {\n subCommands[num].execute();\n }",
"public static void twoClientSetupProcesses() {\n\n\tList<String> aClientTags=TagsFactory.getAssignmentTags().getTwoClientClientTags();\n\tList<String> aServerTags=TagsFactory.getAssignmentTags().getTwoClientServerTags();\n\n\ttwoClientSetupProcesses(aClientTags, aServerTags);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setProcessTeams(Arrays.asList(\"RegistryBasedDistributedProgram\"));\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setTerminatingProcesses(\"RegistryBasedDistributedProgram\", Arrays.asList(\"Client_0\", \"Client_1\"));\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setProcesses(\"RegistryBasedDistributedProgram\", Arrays.asList(\"Registry\", \"Server\", \"Client_0\", \"Client_1\"));\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Registry\", Arrays.asList(\"Registry\"));\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Server\", aServerTags);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Client_0\", aClientTags);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Client_1\", aClientTags);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Registry\", FlexibleStaticArgumentsTestCase.TEST_REGISTRY_ARGS);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Server\", FlexibleStaticArgumentsTestCase.TEST_SERVER_ARGS);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Client_0\", FlexibleStaticArgumentsTestCase.TEST_CLIENT_0_ARGS);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Client_1\", FlexibleStaticArgumentsTestCase.TEST_CLIENT_1_ARGS);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setSleepTime(\"Registry\", 500);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setSleepTime(\"Server\", 2000);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setSleepTime(\"Client_0\", 5000);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setSleepTime(\"Client_1\", 5000);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().getProcessTeams().forEach(team -> System.out.println(\"### \" + team));\n}",
"@Override\r\n\tpublic void subTask(String name) {\n\t}",
"@Override\n\t\t\tpublic void subTask(String name) {\n\t\t\t\t\n\t\t\t}",
"void beginPeriodic() {\n\t\t// if some subsystems need to get called in all modes at the beginning\n\t\t// of periodic, do it here\n\n\t\t// don't need to do anything\n\t}",
"@Override\n public void configureTasks( ScheduledTaskRegistrar registrar ) {\n registrar.setScheduler( rhizomeScheduler() );\n }",
"private void isCommandInstance() throws SystemException {\r\n\t\tif (commandInstance != null) return;\r\n\t\tif (commandResponder != null) SystemException.softwareProblem(\"This was not a command instance. There is a bug. Either the super for the command is not well formed or it called a method it shouldn't.\");\r\n\t\tinstantiateCommand();\r\n\t}",
"public PnuematicSubsystem() {\n\n }",
"public void TurnCommand() {\n\n requires(Robot.driveSubsystem);\n\n }",
"public void performOtherTasks() {\n\t\t\tSystem.out.println(\"performing tasks other than servicing\");\n\t\t\t// do whatever you want to do in the servicing package\n\t\t}",
"public void act() {\n\t\tfor (Manager manager : managers.values())\n\t\t\tmanager.act();\n\t\t\n\t\tif (hasPriority == Priority.ARMY && armyQueue.size() > 0) {\n\t\t\t//Tell ArmyManager to build top unit in queue\n\t\t}\n\t\telse if (hasPriority == Priority.BUILDINGS && buildingQueue.size() > 0) {\n\t\t\t//Tell BuildManager to build top building in queue\n\t\t}\n\t\telse if (hasPriority == Priority.WORKERS) {\n\t\t\t//ResourceManager has requested more workers\n\t\t}\n\t}",
"@SystemAPI\npublic interface ScheduleEvent extends IOperation {\n\t/**\n\t * \n\t * @return\tDe duur van de planbare actie (in Millis)\n\t */\n\tpublic TimeDuration getDuration();\n\t\n\t/**\n\t * \n\t * @return\tDe periode waarop de actie gescheduled is\n\t * \t\t\tDit wordt ingesteld door de Scheduler\n\t */\n\t@SystemAPI\n\tpublic TimePeriod getScheduledPeriod(); \n\t\n\t/**\n\t * Als de schedulable specifieke resources nodig heeft, bv. een bepaalde \n\t * dokter of verpleegster, dan komen deze in de onderstaande List.\n\t * @return\t\tDe lijst met specifieke resources die nodig zijn.\n\t */\n\tpublic List<ScheduleResource> neededSpecificResources();\n\t\n\t/**\n\t * \n\t * @return\tEen lijst met de nodige resources.\n\t */\n\tpublic List<ResourceType> neededResources();\n\t\n\t/**\n\t * Zet de periode wanneer de actie gescheduled is.\n\t * @param scheduledPeriod\tDe nieuwe geplande periode\n\t * @param usesResources\tDe resources die gebruikt worden bij het plannen\n\t * @param campus De campus die gebruikt wordt bij het plannen\n\t * @throws SchedulingException Als er niet gepland kan worden\n\t */\n\tpublic void schedule(TimePeriod scheduledPeriod, List<ScheduleResource> usesResources, Campus campus) throws SchedulingException;\n\t\t\n\t/**\n\t * Een methode om te controleren of de events behorende bij een warenhuis gepland kunnen worden.\n\t * @param warehouse\n\t * \t\t Het warenhuis waar gepland moet worden\n\t * @return true\n\t * \t\t Als er gepland kan worden\n\t * @return false\n\t * \t\t Als er niet gepland kan worden\n\t */\n\tpublic boolean canBeScheduled(Warehouse warehouse) ;\n\t\n\t/**\n\t * Een methode om een warehuis te updaten. Met de booleanse waarde\n\t * kan de actie ongedaan gemaakt worden.\n\t * \n\t * @param warehouse\n\t * \t\t Het warenhuis geupdate moet worden\n\t * @param inverse\n\t * \t\t De soort update\n\t */\n\tpublic void updateWarehouse(Warehouse warehouse, boolean inverse) ;\n\t\n\t/**\n\t * Een methode om de prioriteit op te vragen.\n\t * @return\n\t */\n\tpublic Priority getPriority() ;\t\n\t\n\t/**\n\t * Methode die de campus waarop deze actie wordt uitgevoerd opslaat, zodat\n\t * ze later kan gereproduceerd worden wanneer er geannuleerd werd.\n\t * @param \tcampus\n\t * \t\t\tDe CampusId van de campus die moet opgeslagen worden\n\t */\n\tpublic void setHandlingCampus(CampusId campus) ;\n\t\n\t/**\n\t * Methode die de opgeslagen campus terug opvraagt.\n\t * @return\tDe opgeslagen campus\n\t */\n\tpublic CampusId getHandlingCampus();\n\t\n\t/**\n\t * \n\t * @return event type\n\t */\n\t@SystemAPI\n\tpublic EventType getEventType();\n\t\n\t/**\n\t * @return start event\n\t */\n\tpublic Event getStart();\n\t\n\t/**\n\t * \n\t * @return stop event\n\t */\n\tpublic Event getStop();\n}",
"@Override\n protected int run() throws Exception {\n if (User.current() == null) {\n stderr.println(\"Must be logged in before executing...\");\n return 1;\n }\n\n // First check to see if they exist\n Jenkins instance = Jenkins.getInstance();\n AbstractProject project1 = instance.getItemByFullName(first, AbstractProject.class);\n if (project1 == null) {\n throw new CmdLineException(null, \"Project: \" + first + \" does not exist\");\n }\n AbstractProject project2 = instance.getItemByFullName(second, AbstractProject.class);\n if (project2 == null) {\n throw new CmdLineException(null, \"Project: \" + second + \" does not exist\");\n }\n\n // Make sure user has permission to build.\n if (!project1.hasPermission(Item.BUILD) &&\n !project2.hasPermission(Item.BUILD)) {\n throw new CmdLineException(null, \"You do not have permission to execute these jobs.\");\n }\n\n // Let's build both projects.\n project1.scheduleBuild2(0);\n project2.scheduleBuild2(0);\n return 0;\n }",
"@Override\n public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n // setDefaultCommand(new MySpecialCommand());\n setDefaultCommand(new tankDrive());\n }",
"@Scheduled(cron = \"${toil1.schedule2}\")\n\tpublic void toiL1Schedule2() {\n\t\tlog.info(\"Running toiL1Schedule2\");\n\t\trunToiL1Schedule();\n\t\trunToiBlogsL1Schedule();\n\t}",
"private void commandCheck() {\n\t\t//add user command\n\t\tif(cmd.getText().toLowerCase().equals(\"adduser\")) {\n\t\t\t/*\n\t\t\t * permissions check: if user is an admin, proceed. If not, error with a permission error.\n\t\t\t * There will be more user level commands added in version 2, like changing rename to allow a\n\t\t\t * user to rename themselves, but not any other user. Admins can still rename all users.\n\t\t\t */\n\t\t\tif(type.equals(\"admin\")) {\n\t\t\t\taddUser();\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(PERMISSIONS);\n\t\t\t}\n\t\t}\n\t\t//delete user command\n\t\telse if(cmd.getText().toLowerCase().equals(\"deluser\")) {\n\t\t\t//permissions check: if user is an admin, proceed. If not, error with a permission error.\n\t\t\tif(type.equals(\"admin\")) {\n\t\t\t\tdelUser();\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(PERMISSIONS);\n\t\t\t};\n\t\t}\n\t\t//rename user command\n\t\telse if(cmd.getText().toLowerCase().equals(\"rename\")) {\n\t\t\t//permissions check: if user is an admin, allow the user o chose a user to rename.\n\t\t\t//If not, allow the user to rename themselves only.\n\t\t\tif(type.equals(\"admin\")) {\n\t\t\t\trename(ALL);\n\t\t\t}\n\t\t\telse {\n\t\t\t\trename(SELF);\n\t\t\t}\n\t\t}\n\t\t//promote user command\n\t\telse if(cmd.getText().toLowerCase().equals(\"promote\")) {\n\t\t\t//permissions check: if user is an admin, proceed. If not, error with a permission error.\n\t\t\tif(type.equals(\"admin\")) {\n\t\t\t\tpromote();\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(PERMISSIONS);\n\t\t\t}\n\t\t}\n\t\t//demote user command\n\t\telse if(cmd.getText().toLowerCase().equals(\"demote\")) {\n\t\t\t//permissions check: if user is an admin, proceed. If not, error with a permission error.\n\t\t\tif(type.equals(\"admin\")) {\n\t\t\t\tdemote();\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(PERMISSIONS);\n\t\t\t}\n\t\t}\n\t\t//the rest of the commands are user level, no permission checking\n\t\telse if(cmd.getText().toLowerCase().equals(\"ccprocess\")) {\n\t\t\tccprocess();\n\t\t}\n\t\telse if(cmd.getText().toLowerCase().equals(\"cprocess\")) {\n\t\t\tcprocess();\n\t\t}\n\t\telse if(cmd.getText().toLowerCase().equals(\"opentill\")) {\n\t\t\topenTill();\n\t\t}\n\t\telse if(cmd.getText().toLowerCase().equals(\"closetill\")) {\n\t\t\tcloseTill();\n\t\t}\n\t\telse if(cmd.getText().toLowerCase().equals(\"opendrawer\")) {\n\t\t\topenDrawer();\n\t\t}\n\t\telse if(cmd.getText().toLowerCase().equals(\"sale\")) {\n\t\t\tsale();\n\t\t}\n\t\t//if the command that was entered does not match any command, return an error.\n\t\telse {\n\t\t\terror(CMD_NOT_FOUND);\n\t\t}\n\t}",
"public void verifyAndRegister() {\n // All top level commands are supposed to be registered in the command manager\n this.internalTree.children.stream().map(Node::getValue).forEach(commandArgument -> {\n if (!(commandArgument instanceof StaticArgument)) {\n throw new IllegalStateException(\"Top level command argument cannot be a variable\");\n }\n });\n\n this.checkAmbiguity(this.internalTree);\n\n // Verify that all leaf nodes have command registered\n this.getLeaves(this.internalTree).forEach(leaf -> {\n if (leaf.getOwningCommand() == null) {\n throw new NoCommandInLeafException(leaf);\n } else {\n final Command<C> owningCommand = leaf.getOwningCommand();\n this.commandManager.getCommandRegistrationHandler().registerCommand(owningCommand);\n }\n });\n\n // Register command permissions\n this.getLeavesRaw(this.internalTree).forEach(node -> {\n // noinspection all\n final CommandPermission commandPermission = node.getValue().getOwningCommand().getCommandPermission();\n /* All leaves must necessarily have an owning command */\n node.nodeMeta.put(\"permission\", commandPermission);\n // Get chain and order it tail->head then skip the tail (leaf node)\n List<Node<CommandArgument<C, ?>>> chain = this.getChain(node);\n Collections.reverse(chain);\n chain = chain.subList(1, chain.size());\n // Go through all nodes from the tail upwards until a collision occurs\n for (final Node<CommandArgument<C, ?>> commandArgumentNode : chain) {\n final CommandPermission existingPermission = (CommandPermission) commandArgumentNode.nodeMeta\n .get(\"permission\");\n\n CommandPermission permission;\n if (existingPermission != null) {\n permission = OrPermission.of(Arrays.asList(commandPermission, existingPermission));\n } else {\n permission = commandPermission;\n }\n\n /* Now also check if there's a command handler attached to an upper level node */\n if (commandArgumentNode.getValue() != null && commandArgumentNode\n .getValue()\n .getOwningCommand() != null) {\n final Command<C> command = commandArgumentNode.getValue().getOwningCommand();\n if (this\n .getCommandManager()\n .getSetting(CommandManager.ManagerSettings.ENFORCE_INTERMEDIARY_PERMISSIONS)) {\n permission = command.getCommandPermission();\n } else {\n permission = OrPermission.of(Arrays.asList(permission, command.getCommandPermission()));\n }\n }\n\n commandArgumentNode.nodeMeta.put(\"permission\", permission);\n }\n });\n }",
"void legalCommand();",
"@Override\n\tpublic void teleopInit() {\n\n\t\tSystem.out.println(\"Teleop init\");\n\t\tif (autonomousCommand != null)\n\t\t\tautonomousCommand.cancel();\n\t\tScheduler.getInstance().add(new DriveCommand());\n\n\t\t\n\t}",
"public void registerCommand(BaseCommand baseCommand) throws Exception {\n baseCommand.setShard(shard);\n Command botCommand = baseCommand.botCommand;\n for (BaseCommand cmd : baseCommands) {\n if (StringUtils.stripAccents(cmd.getCommandIdentifier()).equalsIgnoreCase(StringUtils.stripAccents\n (botCommand.getCommandIdentifier())))\n {\n System.out.println(\"Multiple baseCommands cannot be registered under the same name. Ignoring new \" +\n \"instance\" +\n \".\\n\" +\n \"Name: \" + baseCommand.toString());\n return;\n }\n }\n botCommand.setupSubcommands();\n baseCommands.add(baseCommand);\n commandUsages.put(baseCommand.commandIdentifier, (long) 0);\n System.out.println(\"Successfully registered \" + baseCommand.toString());\n }",
"public abstract void checkingCommand(String nameOfCommand, ArrayList<Unit> units);",
"@Test\n public void testSubsystem1_1() throws Exception {\n KernelServices servicesA = super.createKernelServicesBuilder(createAdditionalInitialization())\n .setSubsystemXml(readResource(\"keycloak-1.1.xml\")).build();\n Assert.assertTrue(\"Subsystem boot failed!\", servicesA.isSuccessfulBoot());\n ModelNode modelA = servicesA.readWholeModel();\n super.validateModel(modelA);\n }",
"@Override\n public void adjustStartEventSubscriptions(ProcessDefinitionEntity newLatestProcessDefinition, ProcessDefinitionEntity oldLatestProcessDefinition) {\n super.adjustStartEventSubscriptions(newLatestProcessDefinition, oldLatestProcessDefinition);\n\n LOG.debug(\"Adding start event simulation timers.\");\n removeObsoleteStartEventSimulationJobs(newLatestProcessDefinition);\n addStartEventSimulationJobs(newLatestProcessDefinition);\n }",
"private static void performRoomManagement() {\n\t\t\r\n\t\t\r\n\r\n\t}",
"public void testRunnableWithOtherRule() {\n \t\tISchedulingRule rule = new ISchedulingRule() {\n \t\t\tpublic boolean contains(ISchedulingRule rule) {\n \t\t\t\treturn rule == this;\n \t\t\t}\n \t\t\tpublic boolean isConflicting(ISchedulingRule rule) {\n \t\t\t\treturn rule == this;\n \t\t\t}\n \t\t};\n \t\ttry {\n \t\t\tgetWorkspace().run(new IWorkspaceRunnable() {\n \t\t\t\tpublic void run(IProgressMonitor monitor) {\n \t\t\t\t\t//noop\n \t\t\t\t}\n \t\t\t}, rule, IResource.NONE, getMonitor());\n \t\t} catch (CoreException e) {\n \t\t\tfail(\"1.99\", e);\n \t\t}\n \t}",
"private void loadRegistredCommands() {\n ServiceLoader<Command> loader = ServiceLoader.load(Command.class);\n for (Command command : loader) {\n addCommand(command);\n }\n }",
"public void autonomousInit(){\n\t \t//resetAndDisableSystems();\n\t\t \n\t \tautonomousCommand = (Command) autoChooser.getSelected();\n\t \tautonomousCommand.start();\n\t \t\n\t \t\n\t }",
"private void scheduleOrExecuteJob() {\n try {\n for (TaskScheduler entry : this.schedulers.values()) {\n StandardTaskScheduler scheduler = (StandardTaskScheduler) entry;\n // Maybe other thread close&remove scheduler at the same time\n synchronized (scheduler) {\n this.scheduleOrExecuteJobForGraph(scheduler);\n }\n }\n } catch (Throwable e) {\n LOG.error(\"Exception occurred when schedule job\", e);\n }\n }",
"private void registerCommands() {\n CommandSpec showBanpoints = CommandSpec.builder().permission(\"dtpunishment.banpoints.show\")\r\n .description(Text.of(\"Show how many Banpoints the specified player has \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))))\r\n .executor(childInjector.getInstance(CommandBanpointsShow.class)).build();\r\n\r\n CommandSpec addBanpoints = CommandSpec.builder().permission(\"dtpunishment.banpoints.add\")\r\n .description(Text.of(\"Add a specified amount of Banpoints to a player \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))),\r\n GenericArguments.onlyOne(GenericArguments.integer(Text.of(\"amount\"))))\r\n .executor(childInjector.getInstance(CommandBanpointsAdd.class)).build();\r\n\r\n CommandSpec removeBanpoints = CommandSpec.builder().permission(\"dtpunishment.banpoints.remove\")\r\n .description(Text.of(\"Remove a specified amount of Banpoints to a player \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))),\r\n GenericArguments.onlyOne(GenericArguments.integer(Text.of(\"amount\"))))\r\n .executor(childInjector.getInstance(CommandBanpointsRemove.class)).build();\r\n\r\n CommandSpec banpoints = CommandSpec.builder().permission(\"dtpunishment.banpoints\")\r\n .description(Text.of(\"Show the Banpoints help menu\")).arguments(GenericArguments.none())\r\n .child(showBanpoints, \"show\").child(addBanpoints, \"add\").child(removeBanpoints, \"remove\").build();\r\n\r\n Sponge.getCommandManager().register(this, banpoints, \"banpoints\", \"bp\");\r\n\r\n CommandSpec showMutepoints = CommandSpec.builder().permission(\"dtpunishment.mutepoints.show\")\r\n .description(Text.of(\"Show how many Mutepoints the specified player has \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))))\r\n .executor(childInjector.getInstance(CommandMutepointsShow.class)).build();\r\n\r\n CommandSpec addMutepoints = CommandSpec.builder().permission(\"dtpunishment.mutepoints.add\")\r\n .description(Text.of(\"Add a specified amount of Mutepoints to a player \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))),\r\n GenericArguments.onlyOne(GenericArguments.integer(Text.of(\"amount\"))))\r\n .executor(childInjector.getInstance(CommandMutepointsAdd.class)).build();\r\n\r\n CommandSpec removeMutepoints = CommandSpec.builder().permission(\"dtpunishment.mutepoints.add\")\r\n .description(Text.of(\"Add a specified amount of Mutepoints to a player \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))),\r\n GenericArguments.onlyOne(GenericArguments.integer(Text.of(\"amount\"))))\r\n .executor(childInjector.getInstance(CommandMutepointsRemove.class)).build();\r\n\r\n CommandSpec mutepoints = CommandSpec.builder().permission(\"dtpunishment.mutepoints\")\r\n .description(Text.of(\"Show the Mutepoints help menu\")).arguments(GenericArguments.none())\r\n .child(showMutepoints, \"show\").child(addMutepoints, \"add\").child(removeMutepoints, \"remove\").build();\r\n\r\n Sponge.getCommandManager().register(this, mutepoints, \"mutepoints\", \"mp\");\r\n\r\n CommandSpec playerInfo = CommandSpec.builder().permission(\"dtpunishment.playerinfo\")\r\n .description(Text.of(\"Show your info \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.optionalWeak(GenericArguments.requiringPermission(\r\n GenericArguments.user(Text.of(\"player\")), \"dtpunishment.playerinfo.others\"))))\r\n .executor(childInjector.getInstance(CommandPlayerInfo.class)).build();\r\n\r\n Sponge.getCommandManager().register(this, playerInfo, \"pinfo\", \"playerinfo\");\r\n\r\n CommandSpec addWord = CommandSpec.builder().permission(\"dtpunishment.word.add\")\r\n .description(Text.of(\"Add a word to the list of banned ones \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.string(Text.of(\"word\"))))\r\n .executor(childInjector.getInstance(CommandWordAdd.class)).build();\r\n\r\n Sponge.getCommandManager().register(this, addWord, \"addword\");\r\n\r\n CommandSpec unmute = CommandSpec.builder().permission(\"dtpunishment.mutepoints.add\")\r\n .description(Text.of(\"Unmute a player immediately (removing all mutepoints)\"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))))\r\n .executor(childInjector.getInstance(CommandUnmute.class)).build();\r\n\r\n CommandSpec reloadConfig = CommandSpec.builder().permission(\"dtpunishment.admin.reload\")\r\n .description(Text.of(\"Reload configuration from disk\"))\r\n .executor(childInjector.getInstance(CommandReloadConfig.class)).build();\r\n\r\n CommandSpec adminCmd = CommandSpec.builder().permission(\"dtpunishment.admin\")\r\n .description(Text.of(\"Admin commands for DTPunishment\")).child(reloadConfig, \"reload\")\r\n .child(unmute, \"unmute\").build();\r\n\r\n Sponge.getCommandManager().register(this, adminCmd, \"dtp\", \"dtpunish\");\r\n }",
"@Command\n\tpublic void buscar() {\n\t}",
"private void doCommand() {\n try {\n TimeUnit.SECONDS.sleep(2L);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n // setDefaultCommand(new MySpecialCommand());\n }",
"@Override\n public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n // setDefaultCommand(new MySpecialCommand());\n }",
"private void registerCommands(){\n getCommand(\"mineregion\").setExecutor(new MineRegionCommand());\n getCommand(\"cellblock\").setExecutor(new CellBlockCommand());\n getCommand(\"cell\").setExecutor(new CellCommand());\n getCommand(\"prisonblock\").setExecutor(new PrisonBlockCommand());\n getCommand(\"rankup\").setExecutor(new RankUpCommand());\n getCommand(\"portal\").setExecutor(new PortalCommand());\n }",
"private static void executeTask02() {\n }",
"public void teleopPeriodic() \r\n {\r\n Watchdog.getInstance().feed();\r\n Scheduler.getInstance().run();\r\n \r\n //Polls the buttons to see if they are active, if they are, it adds the\r\n //command to the Scheduler.\r\n if (mecanumDriveTrigger.get()) \r\n Scheduler.getInstance().add(new MechanumDrive());\r\n \r\n else if (tankDriveTrigger.get())\r\n Scheduler.getInstance().add(new TankDrive());\r\n \r\n else if (OI.rightJoystick.getRawButton(2))\r\n Scheduler.getInstance().add(new PolarMechanumDrive());\r\n \r\n resetGyro.get();\r\n \r\n //Puts the current command being run by DriveTrain into the SmartDashboard\r\n SmartDashboard.putData(DriveTrain.getInstance().getCurrentCommand());\r\n \r\n SmartDashboard.putString(ERRORS_TO_DRIVERSTATION_PROP, \"Test String\");\r\n \r\n \r\n }",
"public void subTask(String name) {\n\r\n\t}",
"void cronScheduledProcesses();",
"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 }",
"private static void setSubsystems()\n {\n //Components\n //Talons\n frontLeftTalon.setName(\"DrivetrainSubsystem\", \"FrontLeftDriveTalon\");\n frontRightTalon.setName(\"DrivetrainSubsystem\", \"FrontRightDriveTalon\");\n rearLeftTalon.setName(\"DrivetrainSubsystem\", \"RearLeftDriveTalon\");\n rearRightTalon.setName(\"DrivetrainSubsystem\", \"RearRightDriveTalon\");\n //Sensors\n //navX.setName(\"SensorSubsystem\", \"NavX\");\n System.out.print(pigeon.getAbsoluteCompassHeading());\n \n //Subsystems\n drivetrainSubsystem.setName(\"DrivetrainSubsystem\", \"DrivetrainSubsystem\");\n sensorSubsystem.setName(\"SensorSubsystem\", \"SensorSubsystem\");\n }",
"@Override\n public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n setDefaultCommand(new HatchExtend());\n setDefaultCommand(new HatchRetract());\n }",
"private void scheduleJob() {\n\n }",
"@Override\r\n public void robotPeriodic() {\r\n // Runs the Scheduler. This is responsible for polling buttons, adding newly-scheduled\r\n // commands, running already-scheduled commands, removing finished or interrupted commands,\r\n // and running subsystem periodic() methods. This must be called from the robot's periodic\r\n // block in order for anything in the Command-based framework to work.\r\n CommandScheduler.getInstance().run();\r\n }",
"@Test\n\tpublic void testAddCommand1() {\n\t\tString task1 = \"normal task\";\n\t\tString task2 = \"priority task\";\n\t\tString label = testData.getCurrLabel();\n\t\t\n\t\tAddCommand comd = new AddCommand(task1, new TDTDateAndTime(), false);\n\t\tassertEquals(String.format(AddCommand.MESSAGE_ADD_FEEDBACK, label), comd.execute(testData));\n\t\t\n\t\tcomd = new AddCommand(task2, new TDTDateAndTime(), true);\n\t\tassertEquals(String.format(AddCommand.MESSAGE_ADD_FEEDBACK, label), comd.execute(testData));\n\t\t\n\t\tArrayList<Task> taskList = testData.getTaskListFromLabel(label);\n\t\tassertEquals(2, taskList.size());\n\t\tassertTrue(task2.equals(taskList.get(0).getDetails()));\n\t\tassertTrue(taskList.get(0).isHighPriority());\n\t\tassertTrue(task1.equals(taskList.get(1).getDetails()));\n\t\tassertFalse(taskList.get(1).isHighPriority());\n\t}",
"protected void execute() {\n\t\tif(RobotMap.gearDoorExtended)\n\t\t\tgearSubsystem.retractPiston();\n\t\telse\n\t\t\tif(Robot.oi.getRightStick().getTrigger() || auton)\n\t\t\t\tgearSubsystem.extendPiston();\n\t\t\n\t}",
"@Override\n\tpublic void autonomousInit() {\n\t\tif (autonomousCommand != null)\n\t\t\tlowGearCommand.start();\n\t\tautonomousCommand.start();\n\t}",
"public void subTask(String tr) {\n\t\t\n\t}",
"public void initDefaultCommand() {\r\n // Set the default command for a subsystem here.\r\n //setDefaultCommand\r\n }",
"private void processWTBy(WasTriggeredBy dep) {\n\n\t}",
"@Override\n public void autonomousInit() {\n\tgameData.readGameData();\n\tautonomousCommand = (Command) chooserMode.getSelected();\n\tdriveSubsystem.resetEncoders();\n\televatorSubsystem.resetEncoder();\n\t// schedule the autonomous command\n\tif (autonomousCommand != null) {\n\t // SmartDashboard.putString(\"i\", \"nit\");\n\t autonomousCommand.start();\n\t}\n }",
"@Override\n public void run() {\n CuratorLocker locker = new CuratorLocker(schedulerBuilder.getServiceSpec());\n\n Runtime.getRuntime().addShutdownHook(new Thread(() -> {\n LOGGER.info(\"Shutdown initiated, releasing curator lock\");\n locker.unlock();\n }));\n locker.lock();\n\n SchedulerConfig schedulerConfig = SchedulerConfig.fromEnv();\n Metrics.configureStatsd(schedulerConfig);\n AbstractScheduler scheduler = schedulerBuilder.build();\n scheduler.start();\n Optional<Scheduler> mesosScheduler = scheduler.getMesosScheduler();\n if (mesosScheduler.isPresent()) {\n SchedulerApiServer apiServer = new SchedulerApiServer(schedulerConfig, scheduler.getResources());\n apiServer.start(new AbstractLifeCycle.AbstractLifeCycleListener() {\n @Override\n public void lifeCycleStarted(LifeCycle event) {\n scheduler.markApiServerStarted();\n }\n });\n\n runScheduler(\n scheduler.frameworkInfo,\n mesosScheduler.get(),\n schedulerBuilder.getServiceSpec(),\n schedulerBuilder.getSchedulerConfig(),\n schedulerBuilder.getStateStore());\n } else {\n /**\n * If no MesosScheduler is provided this scheduler has been deregistered and should report itself healthy\n * and provide an empty COMPLETE deploy plan so it may complete its UNINSTALL.\n *\n * See {@link UninstallScheduler#getMesosScheduler()}.\n */\n Plan emptyDeployPlan = new Plan() {\n @Override\n public List<Phase> getChildren() {\n return Collections.emptyList();\n }\n\n @Override\n public Strategy<Phase> getStrategy() {\n return new SerialStrategy<>();\n }\n\n @Override\n public UUID getId() {\n return UUID.randomUUID();\n }\n\n @Override\n public String getName() {\n return Constants.DEPLOY_PLAN_NAME;\n }\n\n @Override\n public List<String> getErrors() {\n return Collections.emptyList();\n }\n };\n\n PlanManager emptyPlanManager = DefaultPlanManager.createProceeding(emptyDeployPlan);\n PlansResource emptyPlanResource = new PlansResource();\n emptyPlanResource.setPlanManagers(Arrays.asList(emptyPlanManager));\n\n schedulerBuilder.getStateStore().clearAllData();\n\n SchedulerApiServer apiServer = new SchedulerApiServer(\n schedulerConfig,\n Arrays.asList(\n emptyPlanResource,\n new HealthResource()));\n apiServer.start(new AbstractLifeCycle.AbstractLifeCycleListener() {\n @Override\n public void lifeCycleStarted(LifeCycle event) {\n LOGGER.info(\"Started trivially healthy API server.\");\n }\n });\n }\n }",
"protected abstract void scheduler_init();",
"private void processCommand(String command) {\n if (command.equals(\"a\")) {\n doAddTask();\n } else if (command.equals(\"r\")) {\n doRemoveTask();\n } else if (command.equals(\"c\")) {\n doMarkTaskAsCompleted();\n } else if (command.equals(\"m\")) {\n doModifyTask();\n } else if (command.equals(\"v\")) {\n doViewAllTasks();\n } else if (command.equals(\"ct\")) {\n doViewAllCompletedTasks();\n } else if (command.equals(\"s\")) {\n saveTasks();\n } else {\n System.out.println(\"Invalid selection, kindly select from the options available.\");\n }\n }",
"@Override\n public void robotPeriodic() {\n // Runs the Scheduler. This is responsible for polling buttons, adding newly-scheduled\n // commands, running already-scheduled commands, removing finished or interrupted commands,\n // and running subsystem periodic() methods. This must be called from the robot's periodic\n // block in order for anything in the Command-based framework to work.\n CommandScheduler.getInstance().run();\n }",
"@Override\n\tprotected ArrayList<String> getCommandsToExecute() {\n\t\treturn null;\n\t}",
"public void noSuchCommand() {\n }",
"public void registerCommands() {\n\t CommandSpec cmdCreate = CommandSpec.builder()\n\t .arguments(\n\t onlyOne(GenericArguments.string(Text.of(\"type\"))),\n\t onlyOne(GenericArguments.string(Text.of(\"id\"))))\n\t .executor(CmdCreate.getInstance())\n\t .permission(\"blockyarena.create\")\n\t .build();\n\n\t CommandSpec cmdRemove = CommandSpec.builder()\n\t .arguments(\n\t onlyOne(GenericArguments.string(Text.of(\"type\"))),\n\t onlyOne(GenericArguments.string(Text.of(\"id\"))))\n\t .executor(CmdRemove.getInstance())\n\t .permission(\"blockyarena.remove\")\n\t .build();\n\n\t CommandSpec cmdJoin = CommandSpec.builder()\n\t .arguments(\n\t onlyOne(GenericArguments.string(Text.of(\"mode\")))\n\t )\n\t .executor(CmdJoin.getInstance())\n\t .build();\n\n\t CommandSpec cmdQuit = CommandSpec.builder()\n\t .executor(CmdQuit.getInstance())\n\t .build();\n\n\t CommandSpec cmdEdit = CommandSpec.builder()\n\t .arguments(\n\t onlyOne(GenericArguments.string(Text.of(\"id\"))),\n\t onlyOne(GenericArguments.string(Text.of(\"type\"))),\n\t GenericArguments.optional(onlyOne(GenericArguments.string(Text.of(\"param\"))))\n\t )\n\t .executor(CmdEdit.getInstance())\n\t .permission(\"blockyarena.edit\")\n\t .build();\n\n\t CommandSpec cmdKit = CommandSpec.builder()\n\t .arguments(onlyOne(GenericArguments.string(Text.of(\"id\"))))\n\t .executor(CmdKit.getInstance())\n\t .build();\n\n\t CommandSpec arenaCommandSpec = CommandSpec.builder()\n\t .child(cmdEdit, \"edit\")\n\t .child(cmdCreate, \"create\")\n\t .child(cmdRemove, \"remove\")\n\t .child(cmdJoin, \"join\")\n\t .child(cmdQuit, \"quit\")\n\t .child(cmdKit, \"kit\")\n\t .build();\n\n\t Sponge.getCommandManager()\n\t .register(BlockyArena.getInstance(), arenaCommandSpec, \"blockyarena\", \"arena\", \"ba\");\n\t }",
"@Override\n public void run() {\n\n\n\n System.out.println(\"run scheduled jobs.\");\n\n\n checkBlackOutPeriod();\n\n\n\n checkOfficeActionPeriod1();\n\n checkAcceptedFilings();\n\n checkNOAPeriod();\n checkFilingExtensions();\n\n\n\n }",
"public void mainCommands() {\n\t\tint inputId = taskController.getInt(\"Please input the number of your option: \", \"You must input an integer!\");\n\t\tswitch (inputId) {\n\t\tcase 1:\n\t\t\tthis.taskController.showTaskByTime();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tthis.taskController.filterAProject();\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tthis.taskController.addTask();\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tthis.taskController.EditTask();\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tthis.taskController.removeTask();\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tthis.taskController.saveTaskList();\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tSystem.out.println(\"Thank you for coming, Bye!\");\n\t\t\tthis.exit = true;\n\t\t\t// save the task list before exit all the time.\n\t\t\tthis.taskController.saveTaskList();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"This is not a valid option, please input 1 ~ 7.\");\n\t\t\tbreak;\n\t\t}\n\n\t}",
"@Override\n\t\tvoid runCommand() {\n\t\t\ttrigger.execute();\n\t\t}",
"@Override\n protected void execute() {\n Robot.toteLifterSubsystem.setEjectorState(EjectorState.EXTENDING, ramper.process(1.0));\n }",
"@Override\r\n\tpublic void doInitialSchedules() {\n\t}",
"@Override\n public void autonomousPeriodic() {\n\t// updateDiagnostics();9\n\tScheduler.getInstance().run();\n }",
"private static void CLIapplication() {\n\n\t\tboolean done = false;\n\t\tdo {\n\t\t\tint choice = HQmenu();\n\t\t\tSite newSite;\n\n\t\t\tswitch(choice) {\n\t\t\tcase 1:\n\t\t\t\tSystem.out.println(\"Register exchange office\");\n\t\t\t\tnewSite = createNewSite();\n\t\t\t\tif(sites.containsKey(newSite.getSiteName())) {\n\t\t\t\t\tSystem.out.println(\"Site already registred!1\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tsites.putIfAbsent(newSite.getSiteName(), newSite);\t\t\t\t\t\n\t\t\t\t\twriteNewSiteToConfigFile(newSite.getSiteName());\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tif(sites.isEmpty()) {\n\t\t\t\t\tSystem.out.println(\"You need to register site(s) first.\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tCLIHelper.menuInput();\n\t\t\t\tbreak;\n\t\t\tcase 0:\n\t\t\t\tdone = true;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Not a valid menu choice!\");\n\t\t\t}\n\t\t\tlogger.info(\"-------Task_Done-------\\n\");\n\t\t}while(!done);\n\t}",
"@Override\n\tpublic void teleopPeriodic() {\n\t\tSmartDashboard.putString(\"DT Current Command\", \" \");\n\t\tSmartDashboard.putString(\"SHOOTER Current Command\", \" \");\n\t\tSmartDashboard.putString(\"SHOOTERPIVOT Current Command\", \" \");\n\t\tSmartDashboard.putString(\"INTAKE Current Command\", \" \");\n\t\t\n\t\tScheduler.getInstance().run();\n//\t\t\n//\t\tRobot.drivetrain.leftLED.set(true);\n//\t\tRobot.drivetrain.rightLED.set(false);\n\n\t\tif(!autoAiming) {\n\t\t\tnew DriveForwardRotate(correctForDeadZone(oi.driver.getForward()), correctForDeadZone(oi.driver.getRotation())).start();\n\t\t}\n\t\t//new DriveForwardRotate(oi.driver.getForward(), oi.driver.getRotation()).start();\n\t\t\n\t\tif(oi.autoAim() && !prevStateAutoAim){\n\t\t\t//new SetPivotPosition(PivotPID.AUTO_CAMERA_AIM_POSITION).start(\n//\t\t\tnew AutoAim().start();\n\t\t\tnew AutoAim(TurnConstants.AIM_VELOCITY).start(); //this is a press and hold button 3 on joystick\n\t\t\t\n\t\t}\n\t\t\n\t\tif (readyToShoot && oi.operator.shootBallFlywheels() && oi.operator.shoot()){\n//\t\t\tSystem.out.println(\"SHOOT THE SHOOTER -- ready to shoot\");\n\t\t\tnew ShootTheShooter().start();\n\t\t}\n\t\t\n\t\t\n\t\t//INTAKE ------2 button\n\t\tif (oi.operator.intakeUp() && !prevStateIntakeUp){\n\t\t\tnew SetIntakePosition(IntakeSubsystem.UP).start();\n\t\t}\n\t\tif (oi.operator.intakeDeploy() && !prevStateIntakeDeployed){\n\t\t\tnew SetIntakePosition(!IntakeSubsystem.UP).start();\n\t\t}\n\t\t\n\t\t//CAMERA PISTON\n\t\t\n\t\t//move up\n\t\tif (oi.driver.isCameraUpPressed()){\n\t\t\tnew SetCameraPiston(CameraSubsystem.CAM_UP).start();\n\t\t}\n\t\telse{\n\t\t\tnew SetCameraPiston(!CameraSubsystem.CAM_UP).start();\n\t\t}\n\t\t\n//\t\tif (oi.driver.isCameraUpPressed() && !prevStateCameraUp){\n//\t\t\tnew SetCameraPiston(cameraUp ? !CameraSubsystem.CAM_UP : CameraSubsystem.CAM_UP).start();\n//\t\t\tcameraUp = !cameraUp;\n//\t\t}\n//\t\telse{\n//\t\t\tnew SetCameraPiston(cameraUp ? CameraSubsystem.CAM_UP : !CameraSubsystem.CAM_UP).start();\n//\t\t}\n\t\t\n\t\t\n\t\tif (oi.operator.isSemiAutonomousIntakePressed() && !prevStateSemiAutoIntake){\n\t\t\tnew SemiAutoLoadBall().start();\n\t\t}\n//\t\t\n\t\t\n\t\t//pivot state\n//\t\tif (oi.operator.pivotShootState() && !prevStatePivotUp){\n//\t\t\tnew SetPivotState(ShooterPivotSubsystem.PivotPID.FAR_SHOOT_STATE).start();\n//\t\t}\n//\t\telse if(oi.operator.resetPivot() && !prevStateResetButton) {\n//\t\t\t new ResetPivot().start();\n//\t\t}\n//\t\telse if (oi.operator.pivotStoreState() && !prevStatePivotMiddle){\n//\t\t\tnew SetPivotState(ShooterPivotSubsystem.PivotPID.STORING_STATE).start();\n//\t\t}\n\t\t\n\t\t//PIVOT\n\t\t\n\t\t//if going up\n\t\tif (oi.operator.pivotCloseShot() && !prevStatePivotCloseShot){\n\t\t\tnew SetPivotState(ShooterPivotSubsystem.PivotPID.CLOSE_SHOOT_STATE).start();\t\t\n\t\t}\n\t\t//if going down\n\t\telse if(oi.operator.pivotFarShot() && !prevStatePivotFarShot) {\n\t\t\tnew SetPivotState(ShooterPivotSubsystem.PivotPID.FAR_SHOOT_STATE).start();\n\t\t}\n\t\telse if (oi.operator.pivotStoreState()&& !prevStateStore){\n\t\t\tnew SetPivotState(ShooterPivotSubsystem.PivotPID.STORING_STATE).start();\n\t\t}\n\t\telse if (oi.operator.pivotReset() && !prevStateResetSafety){\n\t\t\tnew ResetPivot().start();\n\t\t}\n\t\telse if (oi.driver.isDefenseShot() && prevStateDefenseShot){\n\t\t\tnew SetPivotPosition(ShooterPivotSubsystem.PivotPID.ANTI_DEFENSE_POSITION).start();\n\t\t}\n\t\n\t\t\n\t\tif (!semiAutoIsRunning){\n//\t\t\n\t\t\t//intake purging/running\n\t\t\tif(oi.operator.purgeIntake()) {\n\t\t\t\t//new SetIntakeSpeed(IntakeSubsystem.FORWARD_ROLLER_PURGE_SPEED, IntakeSubsystem.CENTERING_MODULE_PURGE_SPEED).start(); \n\t\t\t\tnew RunAllRollers(ShooterSubsystem.OUT, !ShooterSubsystem.UNTIL_IR).start();\n\t\t\t\tallIntakeRunning = true;\n\t\t\t} else if (oi.operator.runIntake()) {\n\t\t\t\t//new SetIntakeSpeed(IntakeSubsystem.FORWARD_ROLLER_INTAKE_SPEED, IntakeSubsystem.CENTERING_MODULE_INTAKE_SPEED).start();\n\t\t\t\tnew RunAllRollers(ShooterSubsystem.IN, ShooterSubsystem.UNTIL_IR).start();\n//\t\t\t\tnew SemiAutoLoadBall().start();\n\t\t\t\tallIntakeRunning = true;\n\t\t\t} else {\n\t\t\t\t//just the intakes off here to avoid conflicts\n\t\t\t\tnew SetIntakeSpeed(IntakeSubsystem.INTAKE_OFF_SPEED, IntakeSubsystem.INTAKE_OFF_SPEED).start();\n\t\t\t\t//new EndSemiAuto(true).start();\n\t\t\t\t//new RunAllRollers(ShooterSubsystem.OFF, !ShooterSubsystem.UNTIL_IR).start();\n\t\t\t\tallIntakeRunning = false;\n\t\t\t}\n\t\t\t\n\t\t\t//flywheel control\n\t\t\tif (!allIntakeRunning){\n//\t\t\t\tif(oi.operator.loadBallFlywheels()){\n//\t\t\t\t\tnew SetFlywheels(ShooterSubsystem.FLYWHEEL_INTAKE_POWER, -ShooterSubsystem.FLYWHEEL_INTAKE_POWER).start();;\n//\t\t\t\t\tflywheelShootRunning = true;\n//\t\t\t\t} else \n\t\t\t\tif(oi.operator.shootBallFlywheels()) {\n\t\t\t\t\t//new SetFlywheels(0.7, -0.7).start();\n\t\t\t\t\tnew BangBangFlywheels(true).start();\n\t\t\t\t\tflywheelShootRunning = true;\n\t\t\t\t} else {\n\t\t\t\t\t//new SetFlywheels(0, 0).start();//BangBangFlywheels(false).start();\n\t\t\t\t\tflywheelShootRunning = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n//\t\t\tif(oi.operator.shoot()){\n//\t\t\t\tnew ShooterSet(DoubleSolenoid.Value.kForward).start();\n//\t\t\t} else {\n//\t\t\t\tnew ShooterSet(DoubleSolenoid.Value.kReverse).start();\n//\t\t\t}\n//\t\t\t\n\t\t\tif (!allIntakeRunning && !flywheelShootRunning){\n\t\t\t\tnew SetFlywheels(0, 0).start();\n\t\t\t}\n\t\t\t\n\t\t\t//DEFENSE STATE\n\t\t\tif (oi.operator.isDefenseState() && !prevStateDefenseMode){\n\t\t\t\tnew SetDefenseMode().start();\n\t\t\t}\n\t\t}\n\t\t//tells us if bang bang works\n\t\treadyToShoot = ((Math.abs(shooter.getRightFlywheelRPM() - ShooterSubsystem.flywheelTargetRPM) < ShooterSubsystem.flywheelTolerance)\n\t\t\t\t&& (Math.abs(shooter.getLeftFlywheelRPM() - ShooterSubsystem.flywheelTargetRPM) < ShooterSubsystem.flywheelTolerance));\n\t\t\n\t\t\n\t\tif (oi.operator.isManualFirePiston() && !prevStateManualFirePiston){\n//\t\t\tSystem.out.println(\"SHOOT THE SHOOTER -- manual\");\n\t\t\tnew ShootTheShooter().start();\n\t\t}\n\t\t\n\t\t\n\t\tif(oi.driver.isDrivetrainHighGearButtonPressed()){\n\t\t\tdrivetrain.shift(DrivetrainSubsystem.HIGH_GEAR);\n\t\t\tcurrentGear = DrivetrainSubsystem.HIGH_GEAR;\n\t\t} else {\n\t\t\tdrivetrain.shift(!DrivetrainSubsystem.HIGH_GEAR);\n\t\t\tcurrentGear = !DrivetrainSubsystem.HIGH_GEAR;\n\t\t}\n\t\t\n\t\tisManualPressed = oi.operator.isManualOverrideOperator();\n\t\t\n\t\tif (!shooterPIDIsRunning){\n\t\t\tif(isManualPressed) {\n\t\t\t\tdouble pivotPower = oi.operator.getManualPower()/2.0;\n\t\t\t\t//shooterPivot.engageBrake(false);\n\t\t\t\tif (pivotPower > 0 && shooterPivot.pastMax() || pivotPower < 0 && shooterPivot.lowerLimitsTriggered()){\n\t\t\t\t\tpivotPower = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tnew SetPivotPower(pivotPower).start();\n\t\t\t}\n\t\t\telse{\n\t\t\t\tnew SetPivotPower(0).start();\n\t\t\t}\n\t\t}\n\t\t\n//\t\tSystem.out.println(\"Left: \" + Robot.drivetrain.motors[2].get() + \", Right: \" + (-Robot.drivetrain.motors[0].get()));\n//\t\tSystem.out.println(\"Left V: \" + Robot.drivetrain.leftEncoder.getRate() + \", Right V: \" + Robot.drivetrain.rightEncoder.getRate());\n//\t\tSystem.out.println(\"Accel z: \" + Robot.drivetrain.accel.getZ());\n\t\t\n\t\t\n\t\t//PREV STATES\n\t\tprevStateIntakeUp = oi.operator.intakeUp();\n\t\tprevStateIntakeDeployed = oi.operator.intakeDeploy();\n\t\tprevStateDriveShifter = oi.driver.isDrivetrainHighGearButtonPressed();\n\t\tprevStateShootButton = oi.operator.shoot();\n\t\t\n\t\tprevStatePivotCloseShot = oi.operator.pivotCloseShot();\n\t\tprevStatePivotFarShot = oi.operator.pivotFarShot();\n\t\tprevStateStore = oi.operator.pivotStoreState();\n\t\tprevStateResetSafety = oi.operator.pivotReset();\n\t\t\n\t\tprevStateSemiAutoIntake = oi.operator.isSemiAutonomousIntakePressed();\n\t\tprevStateDefenseMode = oi.operator.isDefenseState();\n\t\t\n\t\tprevStateManualFirePiston = oi.operator.isManualFirePiston();\n\t\tprevStateCameraUp = oi.driver.isCameraUpPressed();\n\t\tprevStateAutoAim = oi.autoAim();\n\t\tprevStateDefenseShot = oi.driver.isDefenseShot();\n\n\t\t\n\t\t//********updating subsystem*******//\n\t\t\n\t\t//shooter hal effect counter\n\t\t//shooterPivot.updateHalEffect();\n\t\t\n\t\t//update the flywheel speed constants\n\t\tshooter.updateShooterConstants();\n\t\t\n\t\t\n\t\t//brake\n\t\tif (!isManualPressed){ //if manual override isn't running\n\t\t\tif (!shooterPIDIsRunning && shooterPivot.motorLeft.get() < DEAD_ZONE_TOLERANCE && shooterPivot.motorRight.get() < DEAD_ZONE_TOLERANCE){\n\t\t\t\t\n\t\t\t\tif (pivotTimer.get() > MIN_STOPPED_TIME){\n\t\t\t\t\tnew EngageBrakes().start();\n\t\t\t\t}\n\t\t\t\t//if motor is 0 for the first time, start the timer\n\t\t\t\tif (!prevStateMotorPowerIs0){\n\t\t\t\t\tpivotTimer.reset();\n\t\t\t\t\tpivotTimer.start();\n\t\t\t\t}\n\t\t\t\t//keep this at the end\n\t\t\t\tprevStateMotorPowerIs0 = true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tshooterPivot.engageBrake(false);\n\t\t\t\t//keep this at the end\n\t\t\t\tpivotTimer.reset();\n\t\t\t\tprevStateMotorPowerIs0 = false;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tshooterPivot.engageBrake(false);\n\t\t\tpivotTimer.reset();\n\t\t}\n\t\t//System.out.println(shooterPivot.motorLeft.get());\n\t\t\n\t\t//LOGGING AND DASHBOARD\n\t\tlogAndDashboard();\n\t}",
"private void updateDiagnostics() {\n\t// driveSubsystem.updateDiagnostics();\n\t// elevatorSubsystem.updateDiagnostics();\n\t// cubeSubsystem.updateDiagnostics();\n\t// cubeVision.updateDiagnostics();\n }",
"public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n //setDefaultCommand(new MySpecialCommand());\n \tsetDefaultCommand(new DriveWithJoyStickCommand()); // TBD for Commandbased programming\n }",
"abstract boolean shouldTaskActivate();",
"public void doInitialSchedules() {\n ravenna.schedule();\n milan.schedule();\n venice.schedule();\n\n //Scheduling the public transportaton\n ravenna_milan.activate();\n milan_venice.activate();\n venice_ravenna.activate();\n }",
"private void submitCollectSysTrafficTask() {\n\t\tL.i(this.getClass(), \"CollectSysTrafficTask()...\");\n\t\taddTask(new CollectSysTrafficTask());\n\t}",
"@Override\n public void autonomousInit()\n {\n autonomousCommand = chooser.getSelected();\n \n /*\n * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n * = new MyAutoCommand(); break; case \"Default Auto\": default:\n * autonomousCommand = new ExampleCommand(); break; }\n */\n \n // schedule the autonomous command (example)\n if (autonomousCommand != null) \n {\n autonomousCommand.start();\n }\n }",
"private synchronized void syncTypeChefAnalyzes() {\r\n\t\tif (threadInExecId.isEmpty()) {\r\n\t\t\tProjectConfigurationErrorLogger.getInstance().clearLogList();\r\n\t\t\trunTypeChefAnalyzes(featureProject.getSourceFolder());\r\n\t\t}\r\n\t\tthreadInExecId.add(Thread.currentThread().getId());\r\n\t}",
"void execute() throws Exception {\n\n\t\tif (getSystemState(db) != SYSTEM_STATE_CREATED_COULD_BE_EXACTLY_ONE) {\n\t\t\tInteger ss = getSystemState(db);\n\t\t\tshutDown();\n\t\t\tthrow new Exception(\"System in wrong state for this task: \" + ss);\n\t\t}\n\n\t\tloadExecutionEngine(db);\n\t\tperformUpdate();\n\t\tshutDown();\n\t}",
"@Override\n\tpublic boolean combine(EHICommand anotherCommand) {\n\t\treturn false;\n\t}",
"public void execute() {\n if (valid()) {\n // behavior of the concrete command\n this.target_territory numArmies += to_deploy;\n }\n }",
"@Override\n public void initDefaultCommand() {\n Robot.driveTrain.setDefaultCommand(new xboxDrive());\n // Set the default command for a subsystem here.\n // setDefaultCommand(new MySpecialCommand());\n }",
"@Override\r\n\tprotected void beforeSendCommands(String cmds) {\n\r\n\t}",
"@Override\r\n\tpublic void execute() \r\n\t\t{\n\t\tsourceArcs = parent.getSourceArcsFromID(child.getServerName());\r\n\t\ttargetArcs = parent.getTargetArcsFromID(child.getServerName());\r\n\t\tredo();\r\n\t\t}",
"private void registToWX() {\n }",
"public synchronized void initializeCommands() {\n/* 101 */ Set<String> ignoredPlugins = new HashSet<String>(this.yaml.getIgnoredPlugins());\n/* */ \n/* */ \n/* 104 */ if (ignoredPlugins.contains(\"All\")) {\n/* */ return;\n/* */ }\n/* */ \n/* */ \n/* 109 */ label61: for (Command command : this.server.getCommandMap().getCommands()) {\n/* 110 */ if (commandInIgnoredPlugin(command, ignoredPlugins)) {\n/* */ continue;\n/* */ }\n/* */ \n/* */ \n/* 115 */ for (Class c : this.topicFactoryMap.keySet()) {\n/* 116 */ if (c.isAssignableFrom(command.getClass())) {\n/* 117 */ HelpTopic t = ((HelpTopicFactory)this.topicFactoryMap.get(c)).createTopic(command);\n/* 118 */ if (t != null) { addTopic(t); continue label61; }\n/* */ continue label61;\n/* */ } \n/* 121 */ if (command instanceof PluginCommand && c.isAssignableFrom(((PluginCommand)command).getExecutor().getClass())) {\n/* 122 */ HelpTopic t = ((HelpTopicFactory)this.topicFactoryMap.get(c)).createTopic(command);\n/* 123 */ if (t != null) addTopic(t);\n/* */ \n/* */ } \n/* */ } \n/* 127 */ addTopic((HelpTopic)new GenericCommandHelpTopic(command));\n/* */ } \n/* */ \n/* */ \n/* 131 */ for (Command command : this.server.getCommandMap().getCommands()) {\n/* 132 */ if (commandInIgnoredPlugin(command, ignoredPlugins)) {\n/* */ continue;\n/* */ }\n/* 135 */ for (String alias : command.getAliases()) {\n/* */ \n/* 137 */ if (this.server.getCommandMap().getCommand(alias) == command) {\n/* 138 */ addTopic(new CommandAliasHelpTopic(\"/\" + alias, \"/\" + command.getLabel(), this));\n/* */ }\n/* */ } \n/* */ } \n/* */ \n/* */ \n/* 144 */ Collection<HelpTopic> filteredTopics = Collections2.filter(this.helpTopics.values(), Predicates.instanceOf(CommandAliasHelpTopic.class));\n/* 145 */ if (!filteredTopics.isEmpty()) {\n/* 146 */ addTopic((HelpTopic)new IndexHelpTopic(\"Aliases\", \"Lists command aliases\", null, filteredTopics));\n/* */ }\n/* */ \n/* */ \n/* 150 */ Map<String, Set<HelpTopic>> pluginIndexes = new HashMap<String, Set<HelpTopic>>();\n/* 151 */ fillPluginIndexes(pluginIndexes, this.server.getCommandMap().getCommands());\n/* */ \n/* 153 */ for (Map.Entry<String, Set<HelpTopic>> entry : pluginIndexes.entrySet()) {\n/* 154 */ addTopic((HelpTopic)new IndexHelpTopic(entry.getKey(), \"All commands for \" + (String)entry.getKey(), null, entry.getValue(), \"Below is a list of all \" + (String)entry.getKey() + \" commands:\"));\n/* */ }\n/* */ \n/* */ \n/* 158 */ for (HelpTopicAmendment amendment : this.yaml.getTopicAmendments()) {\n/* 159 */ if (this.helpTopics.containsKey(amendment.getTopicName())) {\n/* 160 */ ((HelpTopic)this.helpTopics.get(amendment.getTopicName())).amendTopic(amendment.getShortText(), amendment.getFullText());\n/* 161 */ if (amendment.getPermission() != null) {\n/* 162 */ ((HelpTopic)this.helpTopics.get(amendment.getTopicName())).amendCanSee(amendment.getPermission());\n/* */ }\n/* */ } \n/* */ } \n/* */ }",
"public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n setDefaultCommand(new GearPickupClampIn());\n }",
"private static void incrementLaunchOrder()\r\n\t{\r\n\t\tlaunchOrder++;\r\n\t}",
"public void autonomousInit() {\n autonomousCommand = (Command) autoChooser.getSelected();\n autonomousCommand.start();\n// \n }",
"@Override\n public void autonomousPeriodic()\n {\n commonPeriodic();\n }",
"public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n \tsetDefaultCommand(new DriveWithJoystick());\n }",
"void\t\tregisterCommandDependentWidget(MiPart widget, String command);",
"@StartStep(localName=\"command-engineering\", after={\"config\"})\n public static void startCommandEngineering(LifecycleContext context) \n {\n // for each class that is a Catalog or Command, create an entry for those in the context.\n ClassScanner classScanner = new ClassScanner(context);\n classScanner.scan();\n }",
"public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n //setDefaultCommand(new MySpecialCommand());\n \tsetDefaultCommand(new VelocityDriveCommand());\n }",
"public interface SuperCommand {\n\n /**\n * Setups anything that is needed for this command.\n * <br/><br/>\n * It is recommended you do the following in this method:\n * <ul>\n * <li>Register any of the sub-commands of this command;</li>\n * <li>Define the permission required to use this command using {@link CompositeCommand#setPermission(String)};</li>\n * <li>Define whether this command can only be run by players or not using {@link CompositeCommand#setOnlyPlayer(boolean)};</li>\n * </ul>\n */\n void setup();\n\n /**\n * Returns whether the command can be executed by this user or not.\n * It is recommended to send messages to let this user know why they could not execute the command.\n * Note that this is run previous to {@link #execute(User, String, List)}.\n * @param user the {@link User} who is executing this command.\n * @param label the label which has been used to execute this command.\n * It can be {@link CompositeCommand#getLabel()} or an alias.\n * @param args the command arguments.\n * @return {@code true} if this command can be executed, {@code false} otherwise.\n * @since 1.3.0\n */\n default boolean canExecute(User user, String label, List<String> args) {\n return true;\n }\n\n /**\n * Defines what will be executed when this command is run.\n * @param user the {@link User} who is executing this command.\n * @param label the label which has been used to execute this command.\n * It can be {@link CompositeCommand#getLabel()} or an alias.\n * @param args the command arguments.\n * @return {@code true} if the command executed successfully, {@code false} otherwise.\n */\n boolean execute(User user, String label, List<String> args);\n\n /**\n * Tab Completer for CompositeCommands.\n * Note that any registered sub-commands will be automatically added to the list.\n * Use this to add tab-complete for things like names.\n * @param user the {@link User} who is executing this command.\n * @param alias alias for command\n * @param args command arguments\n * @return List of strings that could be used to complete this command.\n */\n default Optional<List<String>> tabComplete(User user, String alias, List<String> args) {\n return Optional.empty();\n }\n\n}",
"private void customCommands(MessageEvent message) {\r\n String command = message.getMessage();\r\n \r\n if (!reservedCommands.contains(command)) {\r\n String[]info;\r\n info = manager.getCommandFromDatabase(command, message.getChannel().getName());\r\n\r\n //checks if the command is in custom mod commands\r\n if (info[1].matches(\"-m\")) {\r\n if (message.getChannel().getOps().contains(message.getUser())) {\r\n message.getChannel().send().message(info[0]);\r\n } \r\n else {\r\n message.respond(\"You're not allowed to use this command.\");\r\n }\r\n }\r\n //checks if the command is in the custom commands available to everyone\r\n else if (info[1].matches(\"-e\")) {\r\n message.getChannel().send().message(info[0]);\r\n } \r\n else {\r\n message.respond(\"No such command exists\");\r\n }\r\n }\r\n }",
"public static void twoClientSetupProcesses(List<String> aClientTags, List<String> aServerTags ) {\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setProcessTeams(Arrays.asList(\"RegistryBasedDistributedProgram\"));\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setTerminatingProcesses(\"RegistryBasedDistributedProgram\", Arrays.asList(\"Client_0\", \"Client_1\"));\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setProcesses(\"RegistryBasedDistributedProgram\", Arrays.asList(\"Registry\", \"Server\", \"Client_1\", \"Client_0\"));\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Registry\", Arrays.asList(\"Registry\"));\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Server\", aServerTags);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Client_0\", aClientTags);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Client_1\", aClientTags);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Registry\", FlexibleStaticArgumentsTestCase.TEST_REGISTRY_ARGS);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Server\", FlexibleStaticArgumentsTestCase.TEST_SERVER_ARGS);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Client_0\", FlexibleStaticArgumentsTestCase.TEST_CLIENT_0_ARGS);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Client_1\", FlexibleStaticArgumentsTestCase.TEST_CLIENT_1_ARGS);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setGraderResourceReleaseTime(\"Registry\", 500);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setGraderResourceReleaseTime(\"Server\", 2000);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setGraderResourceReleaseTime(\"Client_0\", 5000);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setGraderResourceReleaseTime(\"Client_1\", 5000);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().getProcessTeams().forEach(team -> System.out.println(\"### \" + team));\n}",
"@Override\r\n\tpublic void processWorkload() {\n this.spawnUser(periods.get(0).getPeriodStartTimePoint());\t\r\n\t}",
"public void registerCommands() {\n commands = new LinkedHashMap<String,Command>();\n \n /*\n * admin commands\n */\n //file util cmds\n register(ReloadCommand.class);\n register(SaveCommand.class);\n \n //shrine cmds\n register(KarmaGetCommand.class);\n register(KarmaSetCommand.class); \n }",
"@Override\n\tpublic void launchTasks() throws Exception {\n\t\t\t\tthis.scheduleTask(\n\t\t\t\t\tnew AbstractComponent.AbstractTask() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t((Controller)this.getTaskOwner()).switchFridgeOn();\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\tthrow new RuntimeException(e) ;\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\t1000, TimeUnit.MILLISECONDS);\n\t\t\t\t\n\t\t\t\tthis.scheduleTask(\n\t\t\t\t\t\tnew AbstractComponent.AbstractTask() {\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t((Controller)this.getTaskOwner()).setOndulatorPolicy(\"default\");\n\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(e) ;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t1000, TimeUnit.MILLISECONDS);\n\t\t\t\t\n\t\t\t\tthis.scheduleTask(\n\t\t\t\t\t\tnew AbstractComponent.AbstractTask() {\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t((Controller)this.getTaskOwner()).getFridgeTemperature();\n\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(e) ;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t2000, TimeUnit.MILLISECONDS);\n\t\t\t\t\n\t\t\t\tthis.scheduleTask(\n\t\t\t\t\t\tnew AbstractComponent.AbstractTask() {\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t((Controller)this.getTaskOwner()).getBatteryEnergy();\n\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(e) ;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t3000, TimeUnit.MILLISECONDS);\n\t\t\t\t\n\t\t\t\tthis.scheduleTaskWithFixedDelay(\t\t\n\t\t\t\t\t\tnew AbstractComponent.AbstractTask() {\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t((Controller)this.getTaskOwner()).controllFridge();\n\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(e) ;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 4000, 1000 // délai entre la fin d'une exécution et la suivante, à modifier \n\t\t\t\t\t\t,TimeUnit.MILLISECONDS) ;\n\t\t\t\t\n\t\t\t\tthis.scheduleTaskWithFixedDelay(\t\t\n\t\t\t\t\t\tnew AbstractComponent.AbstractTask() {\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t((Controller)this.getTaskOwner()).getEPConsommation();\n\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(e) ;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 1000, 4000 // délai entre la fin d'une exécution et la suivante, à modifier \n\t\t\t\t\t\t,TimeUnit.MILLISECONDS) ;\n\t}",
"private void fireEvents() {\n\n if (clockTickCount % clockTicksTillWorkloadChange == 0) {\n clockEventPublisher.fireTriggerWorkloadHandlerEvent(clockTickCount, intervalDurationInMilliSeconds);\n }\n\n // if (clockTickCount % clockTicksTillScalingDecision == 0) {\n // clockEventPublisher.fireTriggerAutoScalerEvent(clockTickCount,\n // intervalDurationInMilliSeconds);\n // }\n\n clockEventPublisher.fireClockEvent(clockTickCount, intervalDurationInMilliSeconds);\n\n // INfrastruktur\n if (clockTickCount % clockTicksTillPublishInfrastructureState == 0) {\n clockEventPublisher.fireTriggerPublishInfrastructureStateEvent(clockTickCount,\n intervalDurationInMilliSeconds);\n\n }\n\n // Queue\n if (clockTickCount % clockTicksTillPublishQueueState == 0) {\n\n clockEventPublisher.fireTriggerPublishQueueStateEvent(clockTickCount, intervalDurationInMilliSeconds);\n }\n\n }"
]
| [
"0.5763735",
"0.5597857",
"0.5525979",
"0.5434967",
"0.53826046",
"0.53644043",
"0.5349786",
"0.5344097",
"0.5329482",
"0.53283983",
"0.5299414",
"0.5261541",
"0.5256005",
"0.52316135",
"0.52242804",
"0.52031666",
"0.5192441",
"0.5177707",
"0.5162963",
"0.51539654",
"0.51415515",
"0.5134641",
"0.51294583",
"0.5100808",
"0.5100189",
"0.5066171",
"0.5060598",
"0.5054086",
"0.5053729",
"0.50498563",
"0.50488585",
"0.50405574",
"0.50277865",
"0.50123876",
"0.5007968",
"0.50026834",
"0.4999771",
"0.49965122",
"0.49965122",
"0.49936378",
"0.49794224",
"0.49731174",
"0.497165",
"0.4958715",
"0.49568033",
"0.495138",
"0.4950068",
"0.49463072",
"0.4937073",
"0.4935162",
"0.49308908",
"0.492395",
"0.49194476",
"0.49173912",
"0.4914265",
"0.49138835",
"0.4913285",
"0.4910033",
"0.49015456",
"0.4901451",
"0.48996598",
"0.48919716",
"0.48854455",
"0.4877579",
"0.48753968",
"0.4871602",
"0.48663017",
"0.48651332",
"0.48641244",
"0.48611182",
"0.4854777",
"0.48534814",
"0.48482594",
"0.48376623",
"0.48345962",
"0.48321",
"0.48316473",
"0.48159063",
"0.4814259",
"0.48067343",
"0.48038673",
"0.48009992",
"0.47940546",
"0.47928053",
"0.47895217",
"0.4787412",
"0.47868937",
"0.47856048",
"0.47854483",
"0.4783526",
"0.4783435",
"0.47813517",
"0.4780666",
"0.47805867",
"0.47790498",
"0.4775403",
"0.47718057",
"0.4767328",
"0.47598335",
"0.47582492",
"0.47543114"
]
| 0.0 | -1 |
pass organisation into the method for useridentity bean | @Override
public List<Permission> fetchByOrganisation(Organisation organisation) {
return this.permissionDao.fetchByOrganisation(userIdentity.getOrganisation());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String organizationId();",
"public long getOrganizationId();",
"@Override\n public long getOrganizationId() {\n return _usersCatastropheOrgs.getOrganizationId();\n }",
"String getOrganization();",
"public int getAD_Org_ID();",
"public int getAD_Org_ID();",
"public int getAD_Org_ID();",
"public int getAD_Org_ID();",
"public int getAD_Org_ID();",
"public int getAD_Org_ID();",
"public int getAD_Org_ID();",
"public int getAD_Org_ID();",
"public int getAD_Org_ID();",
"public int getAD_Org_ID();",
"public int getAD_Org_ID();",
"public int getAD_Org_ID();",
"public int getAD_Org_ID();",
"public interface OrgIdStrategy {\n int getOrgId(String resourceId );\n}",
"public static String getCurrentUserOrgId() {\n DirectoryManager directoryManager = (DirectoryManager) appContext.getBean(\"directoryManager\");\n String username = getCurrentUsername();\n return Optional.of(username)\n .map(directoryManager::getUserByUsername)\n .map(User::getEmployments)\n .map(o -> (Set<Employment>)o)\n .map(Collection::stream)\n .orElseGet(Stream::empty)\n .findFirst()\n .map(Employment::getOrganizationId)\n .orElse(\"\");\n }",
"public final String getOrganisation() {\n return organisation;\n }",
"public String getOrganization ()\n {\n return this.organization;\n }",
"User getPassedUser();",
"String getOrganizationPartyId();",
"@AutoEscape\n\tpublic String getOrgId();",
"public final void setOrganisation(String value) {\n organisation = value;\n }",
"public String getOrganizationEmail() {\n\n \n return organizationEmail;\n\n }",
"public int getPersonOrgID() {\n return personOrgID;\n }",
"public interface User {\n\n /**\n * Get the id of the user.\n *\n * @return the id of the user\n * @throws RepositoryException\n */\n String getId() throws RepositoryException;\n\n /**\n * Whether this user is marked as a system user.\n *\n * @return whether this user is marked as a system user.\n * @throws RepositoryException\n */\n boolean isSystemUser() throws RepositoryException;\n\n /**\n * Whether this user is marked as active.\n *\n * @return whether this user is marked as active.\n * @throws RepositoryException\n */\n boolean isActive() throws RepositoryException;\n\n /**\n * Get the {@link Group}s this user is a member of.\n *\n * @return the {@link Group}s this user is a member of.\n * @throws RepositoryException\n */\n Iterable<Group> getMemberships() throws RepositoryException;\n\n\n /**\n * Get the first name property of this user.\n *\n * @return the first name property of this user or {@code null} if not present\n * @throws RepositoryException\n */\n String getFirstName() throws RepositoryException;\n\n /**\n * Get the last name property of this user.\n *\n * @return the last name property of this user or {@code null} if not present\n * @throws RepositoryException\n */\n String getLastName() throws RepositoryException;\n\n\n /**\n * Get the email property of this user.\n *\n * @return the email property of this user or {@code null} if not present\n * @throws RepositoryException\n */\n String getEmail() throws RepositoryException;\n\n /**\n * Get the last login property of this user.\n *\n * @return the last login property of this user or {@code null} if not present\n * @throws RepositoryException\n */\n Calendar getLastLogin() throws RepositoryException;\n\n /**\n * Get an external user property by name.\n *\n * @return the external property of the user identified by {@code propertyName},\n * or {@code null} if not present\n * @throws RepositoryException\n */\n String getProperty(String propertyName) throws RepositoryException;\n\n}",
"public String getOrganization() {\n return organization;\n }",
"public Long getOrgId() {\n return orgId;\n }",
"public Long getOrgId() {\n return orgId;\n }",
"public Long getOrgId() {\n return orgId;\n }",
"public Long getOrgId() {\n return orgId;\n }",
"public Long getOrgId() {\n return orgId;\n }",
"User getCurrentLoggedInUser();",
"public void setOrganization(String organization);",
"public String getOrganizationId() {\r\n return organizationId;\r\n }",
"@Override\n\tpublic OrgUserDTO getOrgUserNo(String userNo) {\n\t\treturn memberDao.getOrgUserNo(userNo);\n\t}",
"String getIdentityId();",
"public Boolean companySettings(UserDetailsDTO userDetailsDTO, long userId) throws Exception;",
"public Long getOrganizationId() {\n return organizationId;\n }",
"public Long getOrganizationId() {\n return organizationId;\n }",
"public long getOrgId() {\r\n return orgId;\r\n }",
"String getUserId();",
"String getUserId();",
"Party getOrganizationParty();",
"public String getOrganizationId() {\n return organizationId;\n }",
"ApplicationUser getUser();",
"String organizationName();",
"public void setCallingUser(entity.User value);",
"public String getIdentity();",
"String getIdentifiant();",
"public Organization getOrganization(){\r\n\t\treturn organization;\r\n\t}",
"User getUser(User user) ;",
"IdentityDetails identity();",
"public String getOrganizationName() {\n\n \n return organizationName;\n\n }",
"public String organization() {\n return this.organization;\n }",
"People getObjUser();",
"public void setPersonOrgID(int value) {\n this.personOrgID = value;\n }",
"People getUser();",
"List<Organization> findOrgByUser(String userId);",
"UserDetails getCurrentUser();",
"long getUserId();",
"long getUserId();",
"java.lang.String getUserId();",
"java.lang.String getUserId();",
"java.lang.String getUserId();",
"UserProperty getUserProperty(BaseUser u);",
"public abstract String getUser();",
"@Override\n\tpublic String getId() {\n\t\tString pName = ctx.getCallerPrincipal().getName();\n\t\tPerson p = userEJB.findPerson(pName);\n\t\tString id = p.getId()+\"\";\n\t\treturn id;\n\t\t\n\t}",
"@JsonGetter(\"orgId\")\r\n public long getOrgId ( ) { \r\n return this.orgId;\r\n }",
"public Integer getOrgId() {\n\t\treturn orgId;\n\t}",
"public abstract User getLoggedInUser();",
"public Number getOrgId() {\n return (Number)getAttributeInternal(ORGID);\n }",
"public BigDecimal getOrgId() {\n return orgId;\n }",
"Integer getUserId();",
"public int getAD_OrgTrx_ID();",
"public int getAD_OrgTrx_ID();",
"public void setOrgId(String orgId);",
"List<UserDO> getUserListByOrgId(Long orgId);",
"public String getOrganization() {\n\t\treturn organization;\n\t}",
"public Organization getOrganization() {\n return organization;\n }",
"public Organization getOrganization() {\n return organization;\n }",
"public String getOrganizationName() {\n return (orgName);\n }",
"@Override\n public long getUserId() {\n return _usersCatastropheOrgs.getUserId();\n }",
"@Override\n public String getUserId() {\n return email;\n }",
"public void populateUserDetails() {\n\n this.enterprise = system.getOpRegionDirectory().getOperationalRegionList()\n .stream().filter(op -> op.getRegionId() == user.getNetworkId())\n .findFirst()\n .get()\n .getBuDir()\n .getBusinessUnitList()\n .stream()\n .filter(bu -> bu.getUnitType() == BusinessUnitType.CHEMICAL)\n .map(unit -> (ChemicalManufacturingBusiness) unit)\n .filter(chemBusiness -> chemBusiness.getEnterpriseId() == user.getEnterpriseId())\n .findFirst()\n .get();\n\n this.organization = (ChemicalManufacturer) enterprise\n .getOrganizationList().stream()\n .filter(o -> o.getOrgId() == user.getOrganizationId())\n .findFirst()\n .get();\n\n }",
"public void setOrganizationId(long organizationId);",
"public String getOrganId() {\n return organId;\n }",
"public Number getOrganizationId() {\n return (Number)getAttributeInternal(ORGANIZATIONID);\n }",
"@AutoEscape\n\tpublic String getOrganization();",
"public interface OrganismeDAO extends CrudRepository<Organisme,Long> {\n Organisme findByemail (String email);\n\n}",
"public OrgDo getOrg(Integer id);",
"public interface ParametrageAppliRepository extends CrudRepository<ParametresAppliDTO, Integer> {\n /**\n * This method will find an User instance in the database by its email.\n * Note that this method is not implemented and its working code will be\n * automatically generated from its signature by Spring Data JPA.\n */\n\n public ParametresAppliDTO findByTypeEnvironnement(int idTypeEnvironement);\n\n\n}",
"public interface OrganisationRepository extends Repository<Organisation, Long> {\n}",
"public abstract User getOwner();",
"public String getUserIdentity()\n {\n return userIdentity;\n }",
"User getUserUnderValidation();",
"public User getUser(String emailId);",
"HasValue<Boolean> getIsOrgUser();",
"public abstract User getUser();"
]
| [
"0.63246113",
"0.61244833",
"0.6120755",
"0.6064525",
"0.6004497",
"0.6004497",
"0.6004497",
"0.6004497",
"0.6004497",
"0.6004497",
"0.6004497",
"0.6004497",
"0.6004497",
"0.6004497",
"0.6004497",
"0.6004497",
"0.6004497",
"0.5875279",
"0.5820448",
"0.58042365",
"0.57701355",
"0.57550395",
"0.57436",
"0.5737335",
"0.5690384",
"0.5669198",
"0.5628641",
"0.5624078",
"0.560812",
"0.55488247",
"0.55488247",
"0.55488247",
"0.55488247",
"0.55488247",
"0.5547128",
"0.55324936",
"0.55269545",
"0.5499476",
"0.5492802",
"0.548967",
"0.54878104",
"0.54878104",
"0.5484785",
"0.54838824",
"0.54838824",
"0.5480201",
"0.5436376",
"0.5420168",
"0.53992015",
"0.53852695",
"0.53747636",
"0.53679913",
"0.5364645",
"0.53614175",
"0.53581566",
"0.53515226",
"0.5346356",
"0.5341709",
"0.53415614",
"0.53379756",
"0.53277266",
"0.5324461",
"0.53190285",
"0.53190285",
"0.5316115",
"0.5316115",
"0.5316115",
"0.53075176",
"0.53015506",
"0.5298474",
"0.52924085",
"0.52893585",
"0.52886015",
"0.52877706",
"0.5286591",
"0.5285319",
"0.52844316",
"0.52844316",
"0.52824473",
"0.52791184",
"0.5278752",
"0.5278615",
"0.5278615",
"0.5278119",
"0.527349",
"0.52706635",
"0.5270425",
"0.5270218",
"0.5269528",
"0.52677274",
"0.5262473",
"0.5262281",
"0.5260644",
"0.5255858",
"0.52554876",
"0.5242635",
"0.524158",
"0.52394384",
"0.5232354",
"0.5228604",
"0.52261615"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public List<Permission> fetchMenuPermissionByOrganisation(
Organisation organisation, String val) {
return this.permissionDao.fetchMenuPermissionByOrganisation(organisation, val);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public List<Authorization> fecthAuthorizationlist(Integer userid, String authcode)
{
return this.permissionDao.fetchAuthorizationlist( userid, authcode);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
Entry point into token service business logic | public interface ITokenService {
Iterable<Token> getAllTokens();
EntityPage<Token> getTokens(final Integer page, final Integer size, final SortDirection sortDirection,
final String sortedBy, final Token filter);
Token getToken(final String tokenID);
void updateToken(final Token token);
void createToken(final Token token);
void deleteToken(final String tokenID);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface TokenService {\n /**\n * 保存用户登录信息到redis\n *\n * @param loginInfo 用户登录信息\n */\n void saveRedisToken(LoginInfo loginInfo);\n /**\n * 获取登录信息从redis\n *\n * @param id 用户id\n * @param deviceId 设备id\n * @param deviceType 设备类型\n */\n LoginInfo getRedisToken(Long id,String deviceId,int deviceType);\n /**\n * 验证token的有效性\n *\n * @param tokenPayload 用户token\n * @param deviceId 设备id\n * @param deviceType 设备类型\n */\n void verifyToken(String tokenPayload,long id,String deviceId,int deviceType);\n\n /**\n * 获取登录信息从redis\n *\n * @param id 用户id\n */\n List<LoginInfo> getRedisTokenByUserId(Long id);\n\n /**\n * 从redis删除登录信息\n *\n */\n void deleteToken(LoginInfo loginInfo);\n}",
"public interface TokenService {\n /**\n * 创建一个用户token\n * @param userId\n * @return\n */\n TokenModel createToken(Long userId);\n\n /**\n * 检查token是否有效\n * @param model\n * @return\n */\n boolean checkToken(TokenModel model);\n\n /**\n * 从字符串中解析token\n * @param authentication\n * @return\n */\n TokenModel getToken(String authentication);\n\n /**\n * 删除token\n * @param userId\n */\n void deleteToken(Long userId);\n}",
"public interface TokenService {\n\n /**\n * Generate a user-based renewal token\n *\n * @param username The username for which the token will be valid\n * @return A renewal JWT for the user\n */\n String generateUserRenewalToken(String username);\n\n /**\n * Generate a unit-based renewal token\n *\n * @param unit The unit for which the token will be valid\n * @param expiration The optional expiration timestamp for the token (defaults to duration specified in application config)\n * @return A renewal JWT for the unit\n */\n String generateUnitRenewalToken(Unit unit, Instant expiration);\n\n /**\n * Generate a user-based request token\n *\n * @param username The username for which the token will be valid\n * @param authorities The list of authorities associated with the user\n * @return A request JWT for the user\n */\n String generateUserRequestToken(String username, Collection<String> authorities);\n\n /**\n * Generate a unit-based request token\n *\n * @param units The list of units for which the token will be valid\n * @return A request JWT for the units\n */\n String generateUnitRequestToken(Collection<String> units);\n}",
"GetToken.Req getGetTokenReq();",
"private void requestToken(){\n APIAuth auth = new APIAuth(this.prefs.getString(\"email\", \"\"), this.prefs.getString(\"password\", \"\"), this.prefs.getString(\"fname\", \"\") + \" \" +this.prefs.getString(\"lname\", \"\"), this.prefs, null);\n auth.authenticate();\n }",
"@Test\n\tpublic void getTokenTest() {\n\t}",
"@Override\n public void run() {\n\n try {\n token=null;\n token=getAccessGenToken(hand);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"public interface TokenRulesService {\n /**\n * Return the token rule for the given bin.\n * \n * @param iisnBin\n * String - The bin.\n * @return TokenRule - The token rule.\n */\n TokenRule get(String iisnBin);\n\n /**\n * Saves the token in the DB.\n * \n * @param tokenRule\n * TokenRule - The token rule dto.\n * @return TokenRule - The token rule which is saved.\n */\n TokenRule save(TokenRule tokenRule);\n\n /**\n * Fetches the real bins for the issuer.\n * \n * @param iisn\n * String - The iisn.\n * \n * @return List<String> - The bins.\n */\n List<String> getBins(String iisn);\n\n /**\n * @return load list of token bins from token bin mapping.\n */\n List<String> loadListOfTokenBins();\n}",
"Pokemon.RequestEnvelop.AuthInfo.JWT getToken();",
"public interface TokenClientService {\n\n /**\n * Method returns Token from auth provider\n *\n * @return New Auth Token from provider\n */\n Mono<GenericToken> getToken();\n\n}",
"Mono<GenericToken> getToken();",
"@Override\n public Response runInternal(KeycloakSession session) {\n TokenEndpoint other = new TokenEndpoint(session, tokenManager,\n new EventBuilder(session.getContext().getRealm(), session, clientConnection));\n // process the request in the created instance.\n return other.processGrantRequestInternal();\n }",
"private TokenHandler(Context context) {\n mContext = context;\n pullTokenDataFromLocal();\n if(hasSocialToken()){\n updateLoginTokens();\n }\n }",
"GetToken.Res getGetTokenRes();",
"public String getToken();",
"public interface TokenService {\n\n /**\n *查找\n * @param token\n * @return\n */\n TokenPo findByToken(String token);\n\n /**\n * 查找\n * @param userCode\n * @return\n */\n TokenPo findByUserCode(String userCode);\n\n /**\n * 保存\n * @param tokenPo\n * @return\n */\n TokenPo save(TokenPo tokenPo);\n\n /**\n *\n * @param id\n */\n void delete(Long id);\n}",
"public interface JwtTokenService {\n /**\n * Create token for user\n *\n * @param user user, that needs a token\n * @return token\n */\n String createToken(User user);\n\n /**\n * Get token life duration\n *\n * @return token duration\n */\n Duration getTokenExpiredIn();\n\n /**\n * Parse token\n *\n * @param token received token\n * @return authenticated token\n */\n Authentication parseToken(String token);\n}",
"OAuth2Token getToken();",
"java.lang.String getToken();",
"java.lang.String getToken();",
"java.lang.String getToken();",
"java.lang.String getToken();",
"java.lang.String getToken();",
"java.lang.String getToken();",
"int getTokenStart();",
"void visit(AuthToken authToken);",
"String getToken();",
"String getToken();",
"String getToken();",
"String getToken();",
"String getToken();",
"public void setToken(java.lang.String param){\n localTokenTracker = true;\n \n this.localToken=param;\n \n\n }",
"public interface CustomService {\n\n boolean processTokenScript(Management management, OauthClient oauthClient, OauthUser oauthUser,\n String scope, String tokenType, String claimJson, String type);\n\n Map processTokenTest(Management management, String userId, String clientId, String scopes,\n String tokenType, String claimJson, String script);\n\n List<String> getUseCaseList(Management management);\n\n boolean inCase(Management management, String useCase);\n}",
"protected void validateToken() {\n\n authToken = preferences.getString(getString(R.string.auth_token), \"\");\n saplynService = new SaplynService(preferences.getInt(debugLvl, -1), authToken);\n\n // Check if user already authenticated\n if (authToken.equals(\"\")) {\n Intent intent = new Intent(HomeActivity.this, AuthenticationActivity.class);\n startActivityForResult(intent, 0);\n }\n else {\n populateUser();\n }\n }",
"int getTokenFinish();",
"void performTokenRequest() throws MsalClientException, MsalServiceException {\n throwIfNetworkNotAvailable();\n\n final Oauth2Client oauth2Client = new Oauth2Client(mRequestContext);\n buildRequestParameters(oauth2Client);\n\n final TokenResponse tokenResponse;\n try {\n tokenResponse = oauth2Client.getToken(mAuthRequestParameters.getAuthority());\n } catch (final IOException e) {\n Logger.error(TAG, mRequestContext, \"Token request failed with error: \"\n + e.getMessage(), e);\n throw new MsalClientException(MsalClientException.IO_ERROR, \"Auth failed with the error \" + e.getMessage(), e);\n }\n\n mTokenResponse = tokenResponse;\n }",
"public Token() {\n mTokenReceivedDate = new Date();\n }",
"@Override\n /**\n * Handles a HTTP GET request. This implements obtaining an authentication token from the server.\n */\n protected void handleGet(Request request, Response response) throws IllegalStateException {\n String username = String.valueOf(request.getAttributes().get(\"username\"));\n String password = String.valueOf(request.getAttributes().get(\"password\"));\n /* Construct MySQL Query. */\n String query = \"SELECT COUNT(id) AS `CNT`, `authToken` FROM accounts WHERE `username` = '\" + username + \"' AND \" +\n \"`password` = '\" + password + \"' LIMIT 0,1;\";\n /* Obtain the account count and existing token pair, as object array. */\n Object[] authenticationArray = dataHandler.handleAuthentication(database.ExecuteQuery(query,\n new ArrayList<String>()));\n int cnt = (int) authenticationArray[0];\n String existingToken = (String) authenticationArray[1];\n String authenticationToken = null;\n if (cnt == 1) { // There is exactly one account matching the parameterised username and password.\n if (existingToken == null) { // No token yet existed, generate one.\n authenticationToken = TokenGenerator.getInstance().generateAuthenticationToken(TOKEN_LENGTH);\n } else {\n authenticationToken = existingToken;\n }\n } else {\n this.returnStatus(response, new IllegalArgumentStatus(null));\n }\n if (!(authenticationToken == null || authenticationToken == \"\")) { // Update the database with the new token.\n Database.getInstance().ExecuteUpdate(\"UPDATE `accounts` SET `authToken` = '\" + authenticationToken +\n \"', `authTokenCreated` = CURRENT_TIMESTAMP WHERE `username` = '\" + username + \"';\",\n new ArrayList<String>());\n this.returnResponse(response, authenticationToken, new TokenSerializer());\n } else {\n this.returnStatus(response, new IllegalArgumentStatus(null));\n }\n }",
"@Test\n public void tokenTest() {\n // TODO: test token\n }",
"@Test\n public void tokenTest() {\n // TODO: test token\n }",
"public java.lang.String getToken(){\r\n return localToken;\r\n }",
"public void storeToken(AuthorizationToken token);",
"private void createServerSideToken(TokenRequestBody tokenRequestBody, final Paystack.TokenCallback tokenCallback) throws KeyManagementException, NoSuchAlgorithmException, KeyStoreException {\n ApiService apiService = new ApiClient().getApiService();\n\n HashMap<String, String> params = new HashMap<>();\n params.put(TokenRequestBody.FIELD_PUBLIC_KEY, tokenRequestBody.publicKey);\n params.put(TokenRequestBody.FIELD_CLIENT_DATA, tokenRequestBody.clientData);\n\n Call<TokenApiResponse> call = apiService.createToken(params);\n call.enqueue(new Callback<TokenApiResponse>() {\n /**\n * Invoked for a received HTTP response.\n * <p/>\n\n * @param call - the call enqueueing this callback\n * @param response - response from the server after call is made\n */\n @Override\n public void onResponse(Call<TokenApiResponse> call, Response<TokenApiResponse> response) {\n TokenApiResponse tokenApiResponse = response.body();\n if (tokenApiResponse != null) {\n //check for status...if 0 return an error with the message\n if (tokenApiResponse.status.equals(\"0\")) {\n //throw an error\n tokenCallback.onError(new TokenException(tokenApiResponse.message));\n } else {\n Token token = new Token();\n token.token = tokenApiResponse.token;\n token.last4 = tokenApiResponse.last4;\n\n tokenCallback.onCreate(token);\n }\n }\n }\n\n /**\n * Invoked when a network exception occurred talking to the server or when an unexpected\n * exception occurred creating the request or processing the response.\n *\n * @param call - call that enqueued this callback\n * @param t - the error or exception that caused the failure\n */\n @Override\n public void onFailure(Call<TokenApiResponse> call, Throwable t) {\n Log.e(LOG_TAG, t.getMessage());\n tokenCallback.onError(t);\n\n }\n\n });\n }",
"String createToken(User user);",
"protected void updateTokens(){}",
"public TemplexTokenMaker() {\r\n\t\tsuper();\r\n\t}",
"public void sendTokenToRemote() { }",
"void onGetTokenSuccess(AccessTokenData token);",
"public void putToken(Token token)throws Exception;",
"public void tokenArrived(Object token)\n {\n }",
"private String getTokenV2(TokenRequestBody tokenRequestBody, String tokenEndPoint) throws Exception {\n log.info(\"Entering getTokenV2\");\n String message = null;\n HttpStatus status = null;\n try {\n\n MultiValueMap<String, String> map = new LinkedMultiValueMap<>();\n map.add(GRANT_TYPE, tokenRequestBody.getGrantType());\n map.add(CODE, tokenRequestBody.getCode());\n map.add(CLIENT_ID, tokenRequestBody.getClientId());\n map.add(REDIRECT_URI, tokenRequestBody.getRedirectUri());\n map.add(CLIENT_ASSERTION_TYPE, tokenRequestBody.getClientAssertionType());\n map.add(CLIENT_ASSERTION, tokenRequestBody.getClientAssertion());\n log.info(\"Just created token request map\");\n\n HttpHeaders headers = new HttpHeaders();\n headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);\n Object loggedHeader = headers.remove(HttpHeaders.AUTHORIZATION);\n\n HttpEntity<MultiValueMap<String, String>> request = new HttpEntity<>(map, headers);\n log.info(\"User Token v2>>Carrier endpoint: {}\", tokenEndPoint);\n log.info(\"User Token v2>>Carrier Request: {}\", loggedHeader);\n log.info(\"User Token v2>>Carrier Body: {}\", map);\n log.info(\"User Token v2>>Request: {}\", request);\n log.info(\"tokenEndPoint: {}\", tokenEndPoint);\n\n ResponseEntity<String> response = restTemplate.exchange(tokenEndPoint, HttpMethod.POST, request,\n String.class);\n log.info(\"Just made carrier token endpoint REST call\");\n if (!response.getStatusCode().equals(HttpStatus.OK)) {\n throw new OauthException(\"Carrier thrown Exception: \" + response.getStatusCodeValue());\n }\n message = response.getBody();\n log.info(\"User Token2 Response: {}\", message);\n } catch (RestClientResponseException ex) {\n String returnedMessage = \"\";\n if (ex.getRawStatusCode() == 401) {\n returnedMessage = String.format(\"Error getTokenV2: HTTP 401: Unauthorized token: %s\", ex.getMessage());\n log.error(returnedMessage);\n throw new Exception(returnedMessage);\n }\n if (ex.getResponseBodyAsByteArray().length > 0)\n returnedMessage = new String(ex.getResponseBodyAsByteArray());\n else\n returnedMessage = ex.getMessage();\n status = HttpStatus.BAD_REQUEST;\n log.error(\"HTTP 400: \" + returnedMessage);\n throw new OauthException(returnedMessage, status);\n } catch (Exception ex) {\n String returnedMessage = String.format(\"Error getTokenV2: Error in calling Token end point: %s\", ex.getMessage());\n log.error(returnedMessage);\n throw new Exception(returnedMessage);\n }\n log.info(\"Leaving getTokenV2\");\n return message;\n }",
"private Token () { }",
"public static void main(String[] args) {\n String token= JWTTokenUtil.generateToken(\"Token1\", secret_key);\n System.out.println(\"------------------------TOKEN----------------------------------------------------\");\n System.out.println(token);\n System.out.println();\n System.out.println(\"------------------------CLAIMS----------------------------------------------------\");\n\n //code to test parsed token : Claims\n\n Claims claims= Jwts.parser()\n .setSigningKey(Base64.getEncoder().encode(secret_key.getBytes()))\n .parseClaimsJws(token)\n .getBody();\n\n System.out.println(\"Token ID: \"+claims.getId());\n System.out.println(\"Token Subject: \"+claims.getSubject());\n System.out.println(\"Token Issuer: \"+claims.getIssuer());\n System.out.println(\"Token Issue Date: \"+claims.getIssuedAt());\n System.out.println(\"Token Expiration Date: \"+claims.getExpiration());\n System.out.println(\"Token Audience: \"+claims.getAudience());\n }",
"@Primary\n\t@Bean\n\tpublic RemoteTokenServices tokenServices() {\n\t\tfinal RemoteTokenServices tokenService = new RemoteTokenServices();\n\t\ttokenService.setCheckTokenEndpointUrl(\"http://localhost:8282/oauth/check_token\");\n\t\ttokenService.setClientId(\"customer-service\");\n\t\ttokenService.setClientSecret(\"webpass\");\n\t\treturn tokenService;\n\t}",
"@Override\n\tprotected AuthenticationToken createToken(ServletRequest request, ServletResponse response) throws Exception {\n\t\treturn null;\n\t}",
"public interface IGetToken {\n public String getToken();\n}",
"public void onSuccess(Token token) {\n\n }",
"public interface LoginService {\n\t\n\t/**\n\t * Authenttification d'un utilisateur en vue d'obtenir un token valide.\n\t * \n\t * @param authorization hash du login:Mot de passe {@link String}\n\t * @return TokenDTO d'authentification {@link TokenDTO}\n\t * @throws BusinessException : Exception fonctionnelle {@link BusinessException}\n\t */\n\tTokenDTO authenticateCustomer(String authorization) throws BusinessException;\n\n}",
"public java.lang.String getToken(){\n return localToken;\n }",
"@Override\n\t\tprotected TokenRes doInBackground(Void... params) {\n\t\t\treturn JsonOA.getToken();\n\t\t}",
"@Override\n\tprotected AuthenticationToken createToken(ServletRequest request,\n\t\t\tServletResponse response) throws Exception {\n\t\tHttpServletRequest httpRequest = (HttpServletRequest) request;\n\t\tString ticket = httpRequest.getParameter(TICKET_PARAMETER);\n\t\treturn new CasToken(ticket);\n\t}",
"private Token(ISubscriber inSubscriber,\n MarketDataRequest inRequest)\n {\n subscriber = inSubscriber;\n request = inRequest;\n }",
"public interface AccessTokenService extends Managed{\n public UserSession createAccessToken(UserSession userSession);\n\n public UserSession getUserFromAccessToken(String accessToken);\n\n public boolean isValidToken(String accessToken);\n\n public void removeAccessToken(String accessToken);\n\n public void removeUser(String userName);\n\n}",
"public interface ChatService {\n public Object requestRongToken(Member member) throws Exception;\n}",
"@Override\n\tpublic void run() {\n\t\ttry {\n\t\t\tAccountService accountService = (AccountService)BeanUtil.getBeanByName(\"accountService\");\n\t\t} catch (Exception e2) {\n\t\t\t\n\t\t\te2.printStackTrace();\n\t\t}\n\t\t//获取不了accountService\n\t\ttry {\n\t\t\t\n\t\t\tAccount account = new Account();\n\t\t\t\n\t\t\taccount.setAppId(Keys.APP_ID);\n\t\t\taccount.setAppSecret(Keys.APP_SECRET);\n\t\t\taccount.setName(\"中国好电工\");\n\t\t\tAccessToken accessToken = new AccessToken();\n\t\t\tint count = 0;\n\t\t\twhile (true) {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\taccessToken = WeChatUtil.createAccessToKen(account.getAppId(), account.getAppSecret());\n\t\t\t\tif(!\"\".equals(accessToken.getAccessToken()) && accessToken.getAccessToken()!= null )\n\t\t\t\t{\n\t\t\t\t\tString ticket=\"\";\n\t\t\t\t\tString url2 = \"https://api.weixin.qq.com/cgi-bin/ticket/getticket\";//请求URL\n\t\t\t\t\tString data2 = \"access_token=\"+accessToken.getAccessToken()+\"&type=jsapi\";//设置参数\n\t\t\t\t\tJSONObject jsonObject2 = WeChatUtil.httpRequest(url2, data2);\n\t\t\t\t\tif(\"ok\".equals(jsonObject2.getString(\"errmsg\"))){\n\t\t\t\t\t\tticket=jsonObject2.getString(\"ticket\");\n\t\t\t\t\t}\n\t\t\t\t\tWeChatUtil.updateAccessToKen(account.getAppId(), account.getAppSecret());\n\t\t\t\t\t////System.out.println(\"公众账号: \"+account.getName()+\" 获取access_token成功,有效时长秒 token:\"+ accessToken.getExpiresIn());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//System.out.println(\"TokenThread 获取access_token失败!\");\n\t\t\t\t}\n\t\t\t\n\t\t\tThread.sleep(7200 * 1000);\n\t\t\t////System.out.println(\"重新获取access_token!\");\n\t\t\t\t\t\t\n\t\t\t}\t\n\t\t\t\t\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(50 * 1000);\n\t\t\t\t\t} catch (InterruptedException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//System.out.println(\"error\"+ e);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t\n\t}",
"public AccountAuthToken() {\n }",
"public interface SecurityService\r\n{\r\n\t/**\r\n\t * This method return true if the given 'securityToken' is a valid token for the given security service. The security service can be any service\r\n\t * such as OAuth, LDAP, ActiveDirectory, OpenID etc. It is up to the implementor of this interface to interact with the appropriate security\r\n\t * service to determine if the given securityToken is valid. Reasons for a token to not be valid include but are not limited to, expired tokens, \r\n\t * incorrect tokens, not authenticated tokens etc.<br/>\r\n\t * This method will be used by the provider in a DIRECT environment to authenticate/validate a consumer.\r\n\t * \r\n\t * @param securityToken The token that shall be validated against a given security service such as LDAP, OAuth, Active Directory, etc.\r\n\t * @param requestMetadata Metadata that has been sourced from a request. The environmentID property is always null because the token is\r\n * not yet authenticated and therefore the environment is not yet determined. \r\n\t * \r\n\t * @return TRUE if the token is known and valid to the security server and not expired. If a token is expired then FALSE should be returned.\r\n\t */\r\n\tpublic boolean validate(String securityToken, RequestMetadata requestMetadata);\r\n\r\n\t/**\r\n\t * This method may contact the security server which can be an OAuth server, and LDAP server a Active Directory etc. In return it will provide \r\n\t * information that relate to the securityToken such as: <br/>\r\n\t * a) Information about the application and/or user of that securityToken (appUserInfo property populated in the TokenInfo) or<br/>\r\n\t * b) Information about the SIF environment or SIF session the securityToken relates to. This would be the case for already existing SIF\r\n\t * Environments.<br/>\r\n\t * Further an expire date might be set for the securityToken if the token has expired. If the securityToken does not expire then the \r\n\t * expire date is null in the returned TokenInfo object.<br/>\r\n * This method will be used by the provider in a DIRECT environment to get information about a consumer's security token.\r\n\t * \r\n\t * @param securityToken The security token for which the TokenInfo shall be returned.\r\n\t * @param requestMetadata Metadata that has been sourced from a request. The environmentID property is always null because the token is\r\n * not yet authenticated and therefore the environment is not yet determined. \r\n\t * \r\n\t * @return See Desc. It is expected that this method only returns either the environmentKey or the SIF environment ID or the SIF session token but\r\n\t * not all of these at the same time.\r\n\t */\r\n\tpublic TokenInfo getInfo(String securityToken, RequestMetadata requestMetadata);\r\n\t\r\n\t/**\r\n\t * This method may contact the security server which can be an OAuth server, and LDAP server a Active Directory etc. to generate a \r\n\t * security token based on the given 'coreInfo'. It is expected that any consumer or a provider in a BROKERED environment calls this \r\n\t * method to retrieve a security token which it will use as the authorisation token in all SIF requests to a provider or broker.\r\n\t * \r\n\t * @param coreInfo Information about the consumer/provider that might be used to generate a security token by the external security service.\r\n\t * In most cases it would at least need the application key.\r\n\t * @param password It is very likely that some sort of password will be required to generate a security token.\r\n\t * \r\n\t * @return A TokenInfo object which will have the 'token' property set (the security token). Optional the 'tokenExpiryDate' may be set\r\n\t * if the token has an expire date. If the 'tokenExpiryDate' is null it is assumed that the returned security token won't expire.\r\n\t * The returned token should only be a token without any authentication method as a prefix. For example the token may be\r\n\t * \"ZjI2NThiNTktNDM1Yi00YThkLTlmNzYtYzI0MDBiNjY1NWMxOlBhc3N3b3JkMQ\". It should not hold the authentication method such as 'Bearer'\r\n\t * (i.e. not look like this: \"Bearer ZjI2NThiNTktNDM1Yi00YThkLTlmNzYtYzI0MDBiNjY1NWMxOlBhc3N3b3JkMQ\"). The SIF3 Framework will\r\n\t * manage the authentication method.\r\n\t */\r\n\tpublic TokenInfo createToken(TokenCoreInfo coreInfo, String password);\r\n}",
"ResponseEntity<Response> me(String token);",
"public BStarTokenMaker() {\n\t\tsuper();\n\t}",
"public static Result token(String body) {\n\t\t\r\n\t\tArrayList<String> data = new Gson().fromJson(body, ArrayList.class);\r\n\t\tif(data == null) {\r\n\t\t\treturn new BadRequest(\"No payload data\");\r\n\t\t}\r\n\t\t\r\n\t\tString token = data.get(0);\r\n\t\tif(token == null || token.trim().equals(\"\")) {\r\n\t\t\treturn new BadRequest(\"Invalid payload data\");\r\n\t\t}\r\n\r\n\t\tString uname = data.get(1);\r\n\t\tif(uname == null || uname.trim().equals(\"\")) {\r\n\t\t\treturn new BadRequest(\"Invalid payload data\");\r\n\t\t}\r\n\t\t\r\n\t\tUser loggedUser = User.find(\"byUsername\", uname).first();\r\n\t\tif (loggedUser == null) {\r\n\t\t\treturn new BadRequest(\"Invalid payload data\");\r\n\t\t}\r\n\t\t\r\n\t\tif(!CsrfTokenUtils.checkToken(uname, token)) {\r\n\t\t\treturn new BadRequest(\"Invalid token\");\r\n\t\t}\r\n\r\n\t\tLong msgNum = userMsgNum.get(loggedUser.username);\r\n\t\tif(msgNum == null) {\r\n\t\t\tloggedUser.msgNum = 0L;\r\n\t\t\tuserMsgNum.put(loggedUser.username, loggedUser.msgNum);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tloggedUser.msgNum = Long.parseLong(msgNum.toString());\r\n\t\t}\r\n\r\n\t\tsession.put(\"user\", loggedUser.username);\r\n\t\tsession.put(\"userRole\", loggedUser.role.name);\r\n\t\tsession.put(\"userMsgNum\", loggedUser.msgNum);\r\n\t\t\r\n\t\ttoken = JWTUtils.generateJWT(loggedUser.username);\r\n\t\tString json = \"{\\\"role\\\": \\\"\" + loggedUser.role.name\r\n\t\t\t\t\t\t+ \"\\\", \\\"username\\\": \\\"\" + loggedUser.username\r\n\t\t\t\t\t\t+ \"\\\", \\\"msgNum\\\": \" + loggedUser.msgNum\r\n\t\t\t\t\t\t+ \", \\\"token\\\": \\\"\" + token + \"\\\"}\";\r\n\t\treturn new RenderText(json);\r\n\t}",
"@ContractFactory(entites = TokenEntity.class)\npublic interface TokenAPI {\n\n void getAccessToken(String userName, String password);\n\n}",
"@Trace(excludeFromTransactionTrace = true, leaf = true)\n private void getTokenFromFlyweight() {\n Token token = AgentBridge.getAgent().getTransaction().getToken();\n Assert.assertNotNull(token);\n Assert.assertFalse(token.isActive());\n Assert.assertTrue(token instanceof NoOpToken);\n }",
"public interface TokenGenerator {\n\n String generate();\n\n}",
"public static void requestToken(String username, String password, Context context) {\n SharedPreferences preferences = context.getSharedPreferences(token_storage, 0);\n SharedPreferences.Editor editor = preferences.edit();\n Call<Token> call = kedronService.getToken(\"password\", username, password);\n\n try {\n Log.d(\"Service\", \"Using a new token\");\n auth_token = call.execute().body();\n\n Log.d(\"Service\", \"Token received\");\n\n isTokenPresent = true;\n } catch (IOException e) {\n Log.e(\"TOKEN\", \"Failed to retrieve the token\", e);\n }\n\n header_token = \"Bearer \" + auth_token;\n\n editor.putString(\"token\", auth_token.getToken());\n editor.apply();\n\n bindToken();\n }",
"@Override\n protected String doInBackground(Void... voids) {\n RequestHandler requestHandler = new RequestHandler(AppController.getAppContext());\n\n\n\n try {\n JSONObject response = requestHandler.sendPostRequest(URLs.URL_UPDATE_TOKEN_DAILY, null, Request.Method.POST);\n return response.toString();\n\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n\n return null;\n }",
"@BeforeAll\n\tstatic void TM_RF() {\n\t\tpassword = \"Stardust\";\n\t\ttokenManager = new TokenManager();\n\n\t\t// this assertion gives no throws, so we commented it\n\t\t//Assertions.assertThrows(TokenManagementException.class, () -> tm.readTokenRequestFromJSON(filePath));\n\t}",
"Pokemon.RequestEnvelop.AuthInfo.JWTOrBuilder getTokenOrBuilder();",
"@Override\r\n public int getTokenId()\r\n {\r\n return this.tokenId;\r\n }",
"String getToken(PortalControllerContext portalControllerContext);",
"@Service\npublic interface JwtTokenService {\n\n /**\n * Returns a Json Web Token generated out of the provided userDetails\n * @param uerDetails\n * @return a JWT string\n */\n String convertToJwt (SsoUserDetails uerDetails);\n\n /**\n * Checks whether the provided Json Web Token is a valid Token and if it is not expired\n * @param jwt\n * @return true if JWT is a valid Json Web Token and the expiration time is not reached yet\n */\n boolean isValid(String jwt);\n}",
"@Override\n public void tokenOverdue(final Context context) {\n System.out.println(\"tokenOverdue token 失效,重新获取token\");\n\n // 开发者通过自己的方法获取token,这里是demo\n String acountId = \"\";\n USDKCommonManager.updateToken(context, acountId);\n\n /**** 这份代码是例子。。。。。 ****/\n acountId = USDKTest.getSPToken(context);\n String callerPhone = USDKTest.getCallerPhone(context);\n if (TextUtils.isEmpty(acountId) || TextUtils.isEmpty(acountId)) {\n return;\n }\n USDKTest.getToken(context, callerPhone, acountId, new IUSDKHttpCallback() {\n @Override\n public void onSuccess(Object result) {\n try {\n String json = (String) result;\n System.out.println(\"onSuccess json =\" + json);\n String token = \"\";\n\n USDKTestResultGetTokenBean bean = new USDKTestResultGetTokenBean(new JSONObject(json));\n token = bean.getToken();\n USDKCommonManager.updateToken(context, token);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onFailed(Object result) {\n System.out.println(\"onFailed result =\" + result);\n }\n });\n /**** 这份代码是例子。。。。。 ****/\n }",
"public interface IOauthService {\n\n @POST(\"/auth/token/\")\n void getAccessToken(@Body AccessTokenRequest accessTokenRequest,\n Callback<AccessTokenResponse> responseCallback);\n\n\n}",
"private TokenBroadcastReceiver() { }",
"public Token() {\n }",
"interface TokenProcessor {\n /** Process one token.\n * @param token token to process\n * @param context context binding\n * @param container container to fill\n * @return true of token was accepted\n */\n boolean process(ParseToken token, ContextBinding context, AemMetadata container);\n }",
"@Override\n public void onRequestToken() {\n Toast.makeText(getApplicationContext(), \"Your token has expired\", Toast.LENGTH_LONG).show();\n Log.i(\"Video_Call_Tele\", \"The token as expired..\");\n // mRtcEngine.renewToken(token);\n // https://docs.agora.io/en/Video/API%20Reference/java/classio_1_1agora_1_1rtc_1_1_rtc_engine.html#af1428905e5778a9ca209f64592b5bf80\n // Renew token - TODO\n }",
"String getPrimaryToken();",
"@Override\n\t\tprotected Integer doInBackground(Void... arg0) {\n\t\t\ttry {\n\t\t\t\treturn HttpHelperUtils.SaveToken(loginName);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn null;\n\t\t}",
"@RequestMapping(\"/generateToken\")\n @ApiOperation(value = \"Generates the JWT\", httpMethod = \"POST\")\n public ServiceResponse<String> generateToken(@RequestBody ServiceRequest<String> serviceRequest,\n HttpServletResponse response) {\n ServiceResponse<String> serviceResponse = new ServiceResponse<>();\n try {\n checkParameter(serviceRequest);\n long sixMinutes = 6 * 1000 * 60;\n String token = securityService.generateToken(serviceRequest.getParameter(), sixMinutes);\n handleResponse(serviceResponse, token, response);\n } catch (Exception e) {\n exceptionHandler.handleControllerException(serviceResponse, serviceRequest, e, getMethodName(), response);\n }\n return serviceResponse;\n }",
"public Token() {\n }",
"private static Tuple<Integer, String> getToken() {\n\t\tTuple<Integer, String> result = new Tuple<Integer, String>();\n\t\tresult = GETRequest(AUTH_URL, AUTH_HEADER, \"\", \"\");\n\t\treturn result;\n\t}",
"public interface CheckLoginService {\n //根据用户名和密码生成token\n Map<String, Object> checkLogin(LoginInfo loginInfo);\n //检验token信息是否正确,返回登录状态\n Map<String, Object> validToken(String token);\n //验证登录名和密码是否正确\n Boolean verifyAccountAndPassword(LoginInfo loginInfo);\n}",
"@Override\r\n\tpublic Token createToken() {\n\t\tToken token = new Token();\r\n\t\treturn token;\r\n\t}",
"public APIToken() {\n super();\n }",
"@Override\n\tpublic void expireToken() {\n\t\t\n\t}",
"public interface TokenListener {\n void updateSuccess(String token);\n\n void updateFailed(Exception e);\n}",
"@Test\r\n\tpublic void TestvalidateToken() {\r\n\t\tlog.info(env.getProperty(\"log.start\"));\r\n\t\tudetails = new User(\"admin\", \"admin\", new ArrayList<>());\r\n\t\tString generateToken = jwtutil.generateToken(udetails);\r\n\t\tBoolean validateToken = jwtutil.validateToken(generateToken);\r\n\t\tassertEquals(true, validateToken);\r\n\t\tlog.info(env.getProperty(\"log.end\"));\r\n\t}",
"public void setToken(){\n token=null;\n try {\n OkHttpClient client = new OkHttpClient();\n RequestBody reqbody = RequestBody.create(null, new byte[0]); \n Request request = new Request.Builder()\n .url(\"https://api.mercadolibre.com/oauth/token?grant_type=client_credentials&client_id=\"+clienteID +\"&client_secret=\"+secretKey)\n .post(reqbody)\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"cache-control\", \"no-cache\")\n .addHeader(\"postman-token\", \"67053bf3-5397-e19a-89ad-dfb1903d50c4\")\n .build();\n \n Response response = client.newCall(request).execute();\n String respuesta=response.body().string();\n token=respuesta.substring(respuesta.indexOf(\"APP\"),respuesta.indexOf(\",\")-1);\n System.out.println(token);\n } catch (IOException ex) {\n Logger.getLogger(MercadoLibreAPI.class.getName()).log(Level.SEVERE, null, ex);\n token=null;\n }\n }",
"void tokenchange();",
"public interface TokenApi {\n @GET(TouTiaoServerManager.TOKEN_URL)\n Call<TokenBean> getToken(@QueryMap Map<String, String> map);\n}"
]
| [
"0.6806327",
"0.67919636",
"0.6671724",
"0.6532838",
"0.6459768",
"0.63615197",
"0.6354306",
"0.633955",
"0.6317172",
"0.6284094",
"0.6281079",
"0.6279304",
"0.6259817",
"0.62485063",
"0.6240241",
"0.6220591",
"0.61996",
"0.618909",
"0.6171467",
"0.6171467",
"0.6171467",
"0.6171467",
"0.6171467",
"0.6171467",
"0.6160802",
"0.6156586",
"0.6125877",
"0.6125877",
"0.6125877",
"0.6125877",
"0.6125877",
"0.6109489",
"0.610218",
"0.61002076",
"0.6093399",
"0.6091314",
"0.6082853",
"0.6076171",
"0.60275376",
"0.60275376",
"0.6020417",
"0.60160184",
"0.60137326",
"0.5993174",
"0.597405",
"0.59736186",
"0.5941914",
"0.5934312",
"0.5915981",
"0.5907293",
"0.59054834",
"0.5903012",
"0.5902454",
"0.58866286",
"0.58801687",
"0.5877291",
"0.58531284",
"0.5835885",
"0.58356076",
"0.5828285",
"0.5827482",
"0.58269536",
"0.5823206",
"0.5817995",
"0.5815712",
"0.5812667",
"0.58105373",
"0.58052236",
"0.5798691",
"0.57970005",
"0.577185",
"0.57698214",
"0.57666934",
"0.5760291",
"0.5757222",
"0.5750036",
"0.5744416",
"0.57419044",
"0.5733574",
"0.5729326",
"0.57194304",
"0.57161486",
"0.571451",
"0.57099473",
"0.570237",
"0.57008964",
"0.56927574",
"0.56827307",
"0.5669358",
"0.5664439",
"0.5657533",
"0.56564957",
"0.56412274",
"0.5639317",
"0.56356937",
"0.563098",
"0.562528",
"0.5620616",
"0.560013",
"0.559502"
]
| 0.6261901 | 12 |
Inflates a standard GLSurfaceView. | public MonoscopicView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
setPreserveEGLContextOnPause(true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initOpenGlView() {\n setEGLContextClientVersion(2);\n setPreserveEGLContextOnPause(true);\n System.out.println(\"************************************************************* init OpenGlView ********************\");\n// setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);\n// setEGLConfigChooser(8, 8, 8, 8, 0, 0); // added 10.05\n// getHolder().setFormat(PixelFormat.TRANSLUCENT); // // added 10.05\n }",
"@Override\n\tpublic void initCameraGlSurfaceView() {\n\t\t\n\t}",
"@Override\r\n\tpublic void onSurfaceCreated(GL10 gl, EGLConfig config) {\n\t\tLog.d(TAG, \"onSurfaceCreated\");\r\n//\t\tgl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); // Set color's clear-value to\r\n\t\tgl.glClearColor(0.f, 0.f, 0.f, 0.f);\r\n/////new/////\t\t\r\n\t\t gl.glBlendFunc(gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA);\r\n\t\t gl.glEnable(gl.GL_BLEND);\r\n///////\t\t \r\n\t\tgl.glClearDepthf(1.0f); // Set depth's clear-value to farthest\r\n\t\tgl.glEnable(GL10.GL_DEPTH_TEST); // Enables depth-buffer for hidden\r\n\t\t\t\t\t\t\t\t\t\t\t// surface removal\r\n\t\tgl.glDepthFunc(GL10.GL_LEQUAL); // The type of depth testing to do\r\n\t\tgl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST); // nice\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// perspective\r\n\t\t// view\r\n\t\tgl.glShadeModel(GL10.GL_SMOOTH); // Enable smooth shading of color\r\n\t\tgl.glDisable(GL10.GL_DITHER); // Disable dithering for better\r\n\t\t\t\t\t\t\t\t\t\t// performance\r\n\t\t// You OpenGL|ES initialization code here\r\n\t\t// ......\r\n\t\tgl.glGenTextures(MAX_MODEL_NUM, texIDS, 0);\r\n\r\n//\t\tglview.loadTexture(gl); // Load image into Texture (NEW)\r\n\t\tgl.glEnable(gl.GL_TEXTURE_2D); // Enable texture (NEW)\r\n\t\t\r\n\t}",
"void init(){\n if(DEBUG) Log.d(TAG, \"Creating GlHelper and Surface\");\n mGLHelper = new GLHelper();\n int mDefaultTextureID = 10001;\n SurfaceTexture st = new SurfaceTexture(mDefaultTextureID);\n st.setDefaultBufferSize(mWidth, mHeight);\n mGLHelper.init(st);\n\n textureID = mGLHelper.createOESTexture();\n sTexture = new SurfaceTexture(textureID);\n sTexture.setOnFrameAvailableListener(this);\n surface = new Surface(sTexture);\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);//no title bar\n\t\tgetWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);//fullscreen\n\t\tglSurfaceView = new GLSurfaceView(this);//initialize GLSurfaceView\n\t\tglSurfaceView.setRenderer(new myRenderer());//set renderer\n\t\tsetContentView(glSurfaceView);//set surface as content\n\t}",
"private void initOpenGL()\n\t{\n\t\t// Create an OpenGL ES 2.0 context.\n\t\tsetEGLContextClientVersion(2);\n\n\t\t// Set the drawing quality.\n\t\t// Alpha isn't needed and the color choice is limited anyway, so we can get away with this setting.\n\t\tgetHolder().setFormat(PixelFormat.RGB_565);\n\t\tsetEGLConfigChooser(5, 6, 5, 0, 0, 0);\n\n\t\t// Prepare the renderer.\n\t\trenderer = new GLRenderer();\n\t\tsetRenderer(renderer);\n\n\t\t// Choose to only render the view on demand.\n\t\tsetRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);\n\n\t\t// Disable the unneeded depth test and stencil test.\n\t\tGLES20.glDisable(GLES20.GL_DEPTH_TEST);\n\t\tGLES20.glDisable(GLES20.GL_STENCIL_TEST);\n\n\t\t// Render the canvas for the first time.\n\t\trequestRender();\n\t}",
"@Override\n public void onSurfaceCreated(GL10 gl, EGLConfig config) {\n Log.d(LOGTAG, \"GLRenderer.onSurfaceCreated\");\n\n initRendering();\n\n vuforiaAppSession.onSurfaceCreated();\n }",
"@Override\n public void onSurfaceCreated(final GL10 gl, final EGLConfig config) {\n this.gl = gl;\n\n if(mMoon != null){\n this.mMoon.loadGLTexture(gl, this.mContext, R.drawable.moon);\n } else if(mEarth != null){\n this.mEarth.loadGLTexture(gl, this.mContext, R.drawable.earth);\n } else if(mMars != null){\n this.mMars.loadGLTexture(gl, this.mContext, R.drawable.mars_map);\n } else if(mJupiter != null){\n this.mJupiter.loadGLTexture(gl, this.mContext, R.drawable.jupiter_map);\n } else if(mVenus != null){\n this.mVenus.loadGLTexture(gl, this.mContext, R.drawable.venus_map);\n } else if(mNeptune != null){\n this.mNeptune.loadGLTexture(gl, this.mContext, R.drawable.neptune_map);\n } else if(mSun != null){\n this.mSun.loadGLTexture(gl, this.mContext, R.drawable.sun);\n } else if(mSaturn != null){\n this.mSaturn.loadGLTexture(gl, this.mContext, R.drawable.saturn_map);\n } else if(mMercury != null){\n this.mMercury.loadGLTexture(gl, this.mContext, R.drawable.mercury_map);\n } else if(mUran != null){\n this.mUran.loadGLTexture(gl, this.mContext, R.drawable.uranus_map);\n }\n\n gl.glEnable(GL10.GL_TEXTURE_2D);\n gl.glShadeModel(GL10.GL_SMOOTH);\n gl.glClearColor(CLEAR_RED, CLEAR_GREEN, CLEAR_BLUE, CLEAR_ALPHA);\n gl.glClearDepthf(1.0f);\n gl.glEnable(GL10.GL_DEPTH_TEST);\n gl.glDepthFunc(GL10.GL_LEQUAL);\n gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST);\n }",
"@Override\n\tpublic void onSurfaceCreated(GL10 gl, EGLConfig config) {\n\t\tLibNative.init();\n\t}",
"@Override\n public void onSurfaceCreated(GL10 gl, EGLConfig config) {\n gl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); // Set color's clear-value to black\n gl.glClearDepthf(1.0f); // Set depth's clear-value to farthest\n gl.glEnable(GL10.GL_DEPTH_TEST); // Enables depth-buffer for hidden surface removal\n gl.glDepthFunc(GL10.GL_LEQUAL); // The type of depth testing to do\n gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST); // nice perspective view\n gl.glShadeModel(GL10.GL_SMOOTH); // Enable smooth shading of color\n gl.glDisable(GL10.GL_DITHER); // Disable dithering for better performance\n \n // You OpenGL|ES initialization code here\n\n \n \n }",
"@Override\r\n\tpublic void init(GL10 gl, EGLConfig config) {\n try {\r\n loadGLTextures(gl);\t\t\t\t\t\t\t\t\t\t// Jump To Texture Loading Routine ( NEW )\r\n } catch (IOException e) {\r\n \tLog.e(\"120\", \"An error occured!\");\r\n e.printStackTrace();\r\n }\r\n\r\n gl.glEnable(GL10.GL_TEXTURE_2D);\t\t\t\t\t\t\t\t\t// Enable Texture Mapping ( NEW )\r\n gl.glShadeModel(GL10.GL_SMOOTH);\t\t\t\t\t\t\t\t\t// Enable Smooth Shading\r\n gl.glClearColor(0.0f, 0.0f, 0.0f, 0.5f);\t\t\t\t\t\t// Black Background\r\n gl.glClearDepthf(1.0f);\t\t\t\t\t\t\t\t\t\t\t// Depth Buffer Setup\r\n gl.glEnable(GL10.GL_DEPTH_TEST);\t\t\t\t\t\t\t\t\t// Enables Depth Testing\r\n gl.glDepthFunc(GL10.GL_LEQUAL);\t\t\t\t\t\t\t\t\t\t// The Type Of Depth Testing To Do\r\n gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST);\t\t\t// Really Nice Perspective Calculations\r\n\t}",
"@Override\r\n\tpublic void surfaceCreated(GL10 gl) {\n\t\tgl.glDisable(GL10.GL_DITHER);\r\n\t\t\r\n\t\t// One-time OpenGL initialization based on context...\r\n gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT,\r\n GL10.GL_NICEST);\r\n\t\t\r\n gl.glClearColor(0, 0, 0, 1); \r\n gl.glEnable(GL10.GL_CULL_FACE);\r\n gl.glCullFace(GL10.GL_BACK);\r\n gl.glEnable(GL10.GL_DEPTH_TEST);\r\n gl.glEnable(GL10.GL_LIGHTING);\r\n gl.glDepthFunc(GL10.GL_LEQUAL);\r\n gl.glShadeModel(GL10.GL_SMOOTH);\r\n \r\n if(scene != null && use_vbos) {\r\n \t\t// TODO messy...\r\n \t\tscene.forgetHardwareBuffers();\r\n \t\tscene.generateHardwareBuffers(gl);\r\n }\r\n }",
"private void init(Context context) {\n setEGLContextClientVersion(3);\n\n mRenderer = new MyGLRenderer(context);\n\n // Set the Renderer for drawing on the GLSurfaceView\n setRenderer(mRenderer);\n// setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);\n }",
"public void onSurfaceCreated(GL10 gl, EGLConfig config)\n {\n }",
"@Override\r\n\tpublic void onSurfaceCreated(GL10 gl, EGLConfig config) {\n\r\n\t\tgl.glDisable(GL10.GL_DITHER);\r\n\t\tgl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);\r\n\t\tgl.glEnable(GL10.GL_DEPTH_TEST);\r\n\t\tgl.glDepthFunc(GL10.GL_LEQUAL);\r\n\t\tgl.glClearDepthf(1f);\r\n\t}",
"public GL createSurface(SurfaceHolder holder) {\r\n if (MotoConfig.KEY_LOG) {\r\n Log.w(\"EglHelper\", \"createSurface() tid=\" + Thread.currentThread().getId());\r\n }\r\n /*\r\n * Check preconditions.\r\n */\r\n if (mEgl == null) {\r\n throw new RuntimeException(\"egl not initialized\");\r\n }\r\n if (mEglDisplay == null) {\r\n throw new RuntimeException(\"eglDisplay not initialized\");\r\n }\r\n if (mEglConfig == null) {\r\n throw new RuntimeException(\"mEglConfig not initialized\");\r\n }\r\n /*\r\n * The window size has changed, so we need to create a new\r\n * surface.\r\n */\r\n if (mEglSurface != null && mEglSurface != EGL10.EGL_NO_SURFACE) {\r\n\r\n /*\r\n * Unbind and destroy the old EGL surface, if\r\n * there is one.\r\n */\r\n mEgl.eglMakeCurrent(mEglDisplay, EGL10.EGL_NO_SURFACE,\r\n EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT);\r\n mEGLWindowSurfaceFactory.destroySurface(mEgl, mEglDisplay, mEglSurface);\r\n }\r\n\r\n /*\r\n * Create an EGL surface we can render into.\r\n */\r\n mEglSurface = mEGLWindowSurfaceFactory.createWindowSurface(mEgl,\r\n mEglDisplay, mEglConfig, holder);\r\n\r\n if (mEglSurface == null || mEglSurface == EGL10.EGL_NO_SURFACE) {\r\n int error = mEgl.eglGetError();\r\n if (error == EGL10.EGL_BAD_NATIVE_WINDOW) {\r\n Log.e(\"EglHelper\", \"createWindowSurface returned EGL_BAD_NATIVE_WINDOW.\");\r\n }\r\n return null;\r\n }\r\n\r\n /*\r\n * Before we can issue GL commands, we need to make sure\r\n * the context is current and bound to a surface.\r\n */\r\n if (!mEgl.eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface, mEglContext)) {\r\n throw new EglMakeCurrentException(\"eglMakeCurrent\");\r\n }\r\n\r\n GL gl = mEglContext.getGL();\r\n if (mGLWrapper != null) {\r\n gl = mGLWrapper.wrap(gl);\r\n }\r\n\r\n return gl;\r\n }",
"@Override\n public void onSurfaceCreated(GL10 unused, EGLConfig config) {\n float[] backgroundColor = new float[]{0.2f, 0.2f, 0.2f, 1.0f};\n //float[] backgroundColor = main.getModelActivity().getBackgroundColor();\n GLES20.glClearColor(backgroundColor[0], backgroundColor[1], backgroundColor[2], backgroundColor[3]);\n\n // Use culling to remove back faces.\n // Don't remove back faces so we can see them\n GLES20.glEnable(GLES20.GL_CULL_FACE);\n\n // Enable depth testing for hidden-surface elimination.\n GLES20.glEnable(GLES20.GL_DEPTH_TEST);\n// Create the GLText\n\t\t/*glText = new GLText(unused,context.getAssets());\n\n\t\t// Load the font from file (set size + padding), creates the texture\n\t\t// NOTE: after a successful call to this the font is ready for rendering!\n\t\tglText.load( \"Roboto-Regular.ttf\", 14, 2, 2 ); // Create Font (Height: 14 Pixels / X+Y Padding 2 Pixels)\n*/\n // Enable blending for combining colors when there is transparency\n GLES20.glEnable(GLES20.GL_BLEND);\n GLES20.glBlendFunc(GLES20.GL_ONE, GLES20.GL_ONE_MINUS_SRC_ALPHA);\n\n // This component will draw the actual models using OpenGL\n drawer = new DrawerFactory();\n }",
"@Override\n\tpublic void onSurfaceCreated(GL10 gl, EGLConfig config) {\n\t\tgl.glClearColor(0,0,0,1); \n\t\t//enable vertex array for vertex pointer\n\t\tgl.glEnableClientState(GL10.GL_VERTEX_ARRAY); \n\t\t//enable normal array\n\t\tgl.glEnableClientState(GL10.GL_NORMAL_ARRAY);\n\t\t//enable DepthTest\n\t\tgl.glEnable(GL10.GL_DEPTH_TEST); \n\t\t//enable Blend\n\t\tgl.glEnable(GL10.GL_BLEND);\n\t\t//set blend function\n\t\tgl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);\n\t\t//Gen texture\n\t\t//initialize array\n\t\tint textureIds[] = new int[1];\n\t\t//generate 1 texture return handle to textureIds\n\t\tgl.glGenTextures(1, textureIds, 0);\n\t\t//get handle from array to an int\n\t\ttextureId = textureIds[0];\n\t\t//bind using array\n\t\tgl.glBindTexture(GL10.GL_TEXTURE_2D, textureId);\n\t\t//copy image pixels data to texture buffer on video mem\n\t\tGLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0);\n\t\t//filter for minif\n\t\tgl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_NEAREST);\n\t\t//filter for magnif\n\t\tgl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_NEAREST);\n\t\t//unbind texture buffer\n\t\tgl.glBindTexture(GL10.GL_TEXTURE_2D, 0);\n\t\t//bitmap.recycle(); just if not used anymore \n\t}",
"@Override\n\tpublic void onSurfaceCreated(GL10 gl, EGLConfig config) {\n Bitmap bm = this.getDrawingBitmap();\n\n\t\tsquare.loadGLTexture(gl, this.context, bm);\n\t\t\n\t\tgl.glEnable(GL10.GL_TEXTURE_2D);\t\t\t//Enable Texture Mapping ( NEW )\n\t\tgl.glShadeModel(GL10.GL_SMOOTH); \t\t\t//Enable Smooth Shading\n\t\tgl.glClearColor(0.0f, 0.0f, 0.0f, 0.5f); \t//Black Background\n\t\tgl.glClearDepthf(1.0f); \t\t\t\t\t//Depth Buffer Setup\n\t\tgl.glEnable(GL10.GL_DEPTH_TEST); \t\t\t//Enables Depth Testing\n\t\tgl.glDepthFunc(GL10.GL_LEQUAL); \t\t\t//The Type Of Depth Testing To Do\n\t\t\n\t\t//Really Nice Perspective Calculations\n\t\tgl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST); \n\n\t}",
"@Override\n public void onSurfaceCreated(GL10 gl, EGLConfig config) {\n Log.i(\"kike\", \"onSurfaceCreated\");\n }",
"public void onSurfaceCreated(GL10 gl, EGLConfig config) {\n gl.glDisable(GL10.GL_DITHER);\n\n /*\n * Some one-time OpenGL initialization can be made here\n * probably based on features of this particular context\n */\n gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT,\n GL10.GL_FASTEST);\n\n float ratio = (float) width / height;\n gl.glMatrixMode(GL10.GL_PROJECTION);\n gl.glLoadIdentity();\n gl.glFrustumf(-ratio, ratio, -1, 1, 1, 10);\n\n if (mTranslucentBackground) {\n gl.glClearColor(0,0,0,0);\n } else {\n gl.glClearColor(0.07f, 0.639f, 0.7f, 1f);\n }\n gl.glMatrixMode(GL10.GL_MODELVIEW);\n gl.glEnable(GL10.GL_CULL_FACE);\n gl.glShadeModel(GL10.GL_FLAT);\n gl.glLineWidth(2f);\n\n //lighting\n // Define the ambient component of the first light\n gl.glEnable(GL10.GL_LIGHTING);\n gl.glEnable(GL10.GL_LIGHT0);\n gl.glEnable(GL10.GL_LIGHT1);\n gl.glEnable(GL10.GL_LIGHT2);\n\n float lightColor[] = {0.07f, 0.639f, 0.7f, 1f};\n FloatBuffer light0Ambient = FloatBuffer.wrap(lightColor);\n float light1PositionVector[] = {1f, 0f, 0f, 0f};\n FloatBuffer light1Position = FloatBuffer.wrap(light1PositionVector);\n float light2PositionVector[] = {-1f, 0f, 0f, 0f};\n FloatBuffer light2Position = FloatBuffer.wrap(light2PositionVector);\n\n gl.glLightfv(GL10.GL_LIGHT1, GL10.GL_AMBIENT, light0Ambient);\n gl.glLightfv(GL10.GL_LIGHT1, GL10.GL_POSITION, light1Position);\n gl.glLightfv(GL10.GL_LIGHT2, GL10.GL_AMBIENT, light0Ambient);\n gl.glLightfv(GL10.GL_LIGHT2, GL10.GL_POSITION, light2Position);\n }",
"public void previewOglRender();",
"@Override\n\tpublic void onSurfaceCreated(GL10 gl,EGLConfig config){\n\t\t//OpenGL-ES version check\n\t\tString glesVersion = gl.glGetString(GL10.GL_VERSION);\n\t\tSystem.out.println(\"RTR:\" + glesVersion);\n\t\t\n\t\tString glslVersion = gl.glGetString(GLES32.GL_SHADING_LANGUAGE_VERSION);\n\t\tSystem.out.println(\"RTR: Shading lang version:\"+ glslVersion);\n\t\t\n\t\tinitialize(gl);\n\t}",
"public void onSurfaceChanged(GL10 gl, int width, int height)\n {\n\n nativeInitialize(width, height);\n }",
"public void onSurfaceCreated( GL10 gl, EGLConfig config ) {\n\t\tgl.glClearColor(0.0f, 0.0f, 0.0f, 0.5f); \n\n\t\tgl.glClearDepthf(1.0f);\n\t\tgl.glEnable(GL10.GL_DEPTH_TEST);\n\t\tgl.glDepthFunc(GL10.GL_LEQUAL);\n\n\t\tgl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT,\n\t\t\t\tGL10.GL_NICEST);\n\t}",
"public void onSurfaceCreated(GL10 unused, EGLConfig config) {\n GLES20.glClearColor(0.1f, 0.1f, 0.25f, 1.0f);\n RSGFXShaderManager.loadShaders();\n next_game_tick = SystemClock.elapsedRealtime();\n // No culling of back faces\n GLES20.glDisable(GLES20.GL_CULL_FACE);\n \n // No depth testing\n //GLES20.glDisable(GLES20.GL_DEPTH_TEST);\n setupRender();\n // Enable blending\n // GLES20.glEnable(GLES20.GL_BLEND);\n // GLES20.glBlendFunc(GLES20.GL_ONE, GLES20.GL_ONE);\n \n // Setup quad \n \t\t// Generate your vertex, normal and index buffers\n \t\t// vertex buffer\n \t\t_qvb = ByteBuffer.allocateDirect(_quadv.length\n \t\t\t\t* FLOAT_SIZE_BYTES).order(ByteOrder.nativeOrder()).asFloatBuffer();\n \t\t_qvb.put(_quadv);\n \t\t_qvb.position(0);\n\n \t\t// index buffer\n \t\t_qib = ByteBuffer.allocateDirect(_quadi.length\n \t\t\t\t* 4).order(ByteOrder.nativeOrder()).asIntBuffer();\n \t\t_qib.put(_quadi);\n \t\t_qib.position(0);\n }",
"@Override\n public void onSurfaceCreated(GL10 unused, EGLConfig config) {\n GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);\n \n // Do backface culling\n GLES20.glEnable(GLES20.GL_CULL_FACE);\n GLES20.glFrontFace(GLES20.GL_CCW);\n // Why using GL_BACK won't work is a mystery\n GLES20.glCullFace(GLES20.GL_BACK);\n // Enable depth buffer\n GLES20.glEnable(GLES20.GL_DEPTH_TEST);\n GLES20.glDepthFunc(GLES20.GL_LEQUAL);\n GLES20.glDepthMask(true);\n \n for (int i = 0; i < NUM_CARS; i++) {\n mCarBody[i] = new CarBody((float) Math.random(),\n (float) Math.random(),\n (float) Math.random());\n mCarWheels[i] = new CarWheels();\n }\n \n // Create transformation matrices for each car\n for (int i = 0; i < NUM_CARS; i++) {\n mCarXOffsets[i] = (i % NUM_LANES) * 1.1f;\n mCarZOffsets[i] = ((i / NUM_LANES) * -2) + ((i % NUM_LANES) * 1.3f);\n }\n \n road = new Square(0.6f, 0.6f, 0.6f);\n land = new Square(0.1f, 0.6f, 0.1f);\n sky = new Square(0.6f, 0.6f, 0.9f);\n background = new Sprite(mActivityContext);\n \n }",
"public void onSurfaceCreated(GL10 gl, EGLConfig config) {\n\t\tLog.d(LOG_TAG, \"onSurfaceCreated()\");\r\n\t\tsetGL(gl);\r\n\t\tinitOpenGL(gl);\r\n\t\tinitTrackball();\r\n//\t\tupdateData(gl);\r\n\t}",
"public void onSurfaceCreated(GL10 glUnused, EGLConfig config) {\n\t\tGLES20.glBlendFunc(GLES20.GL_SRC_ALPHA, GLES20.GL_ONE_MINUS_SRC_ALPHA);\n\t\tmVertexShader = RawResourceReader.readTextFileFromRawResource(mContext,\n\t\t\t\tde.moliso.shelxle.R.raw.atoms_vetrex_shader);\n\t\tmFragmentShader = RawResourceReader.readTextFileFromRawResource(\n\t\t\t\tmContext, de.moliso.shelxle.R.raw.atoms_fragment_shader);\n\n\t\tmProgram = createProgram(mVertexShader, mFragmentShader);\n\t\tif (mProgram == 0) {\n\t\t\treturn;\n\t\t}\n\t\ttry{\n\t\t\tversionName = mContext.getPackageManager().getPackageInfo(mContext.getPackageName(), 0).versionName;\n\t\t}catch (NameNotFoundException e){\n\t\t\t//wurst\n\t\t}\n\t\ttexturH = GLES20.glGetUniformLocation(mProgram, \"text\");\n\t\tellipsoidH = GLES20.glGetUniformLocation(mProgram, \"eli\");\n\t\tlichtH = GLES20.glGetUniformLocation(mProgram, \"lighting\");\n\n\t\tvertexAttr1 = GLES20.glGetAttribLocation(mProgram, \"vertex\");\n\n\t\tnormalAttr1 = GLES20.glGetAttribLocation(mProgram, \"normal\");\n\t\tmatrixUniform1 = GLES20.glGetUniformLocation(mProgram, \"matrix\");\n\t\tinvmatrixUniform1 = GLES20.glGetUniformLocation(mProgram, \"invmatrix\");\n\t\tcolorUniform1 = GLES20.glGetUniformLocation(mProgram, \"col\");\n\n\t\tmTextureLoc = GLES20.glGetUniformLocation(mProgram, \"textureSampler\");\n\t\tMatrix.setIdentityM(mv, 0);\n\t\tMatrix.scaleM(mv, 0, 9.0f, 9.0f, 9.0f);\n\n\t\t// Matrix.setLookAtM(mVMatrix, 0, 0, 0, -5, 0f, 0f, 0f, 0f, 1.0f, 0.0f);\n\n\t}",
"Surface createSurface();",
"@Override\n public void onSurfaceCreated(EGLConfig config) {\n Log.i(TAG, \"onSurfaceCreated\");\n GLES20.glClearColor(0.1f, 0.1f, 0.1f, 0.5f); // Dark background so text shows up well\n\n ByteBuffer bb = ByteBuffer.allocateDirect(squareVertices.length * 4);\n bb.order(ByteOrder.nativeOrder());\n vertexBuffer = bb.asFloatBuffer();\n vertexBuffer.put(squareVertices);\n vertexBuffer.position(0);\n\n ByteBuffer dlb = ByteBuffer.allocateDirect(drawOrder.length * 2);\n dlb.order(ByteOrder.nativeOrder());\n drawListBuffer = dlb.asShortBuffer();\n drawListBuffer.put(drawOrder);\n drawListBuffer.position(0);\n\n ByteBuffer bb2 = ByteBuffer.allocateDirect(textureVertices.length * 4);\n bb2.order(ByteOrder.nativeOrder());\n textureVerticesBuffer = bb2.asFloatBuffer();\n textureVerticesBuffer.put(textureVertices);\n textureVerticesBuffer.position(0);\n\n int vertexShader = loadGLShader(GLES20.GL_VERTEX_SHADER, vertexShaderCode);\n int fragmentShader = loadGLShader(GLES20.GL_FRAGMENT_SHADER, fragmentShaderCode);\n\n mProgram = GLES20.glCreateProgram(); // create empty OpenGL ES Program\n GLES20.glAttachShader(mProgram, vertexShader); // add the vertex shader to program\n GLES20.glAttachShader(mProgram, fragmentShader); // add the fragment shader to program\n GLES20.glLinkProgram(mProgram);\n\n texture = createTexture();\n startCamera(texture);\n }",
"public MyGLSurfaceView(Context context) {\r\n\t\tsuper(context);\r\n\t\tErrorCheck.SetContext(context);\r\n\t\tsetEGLContextClientVersion(2);\r\n\r\n\t\tmRenderer = new TexRenderer(((WindowManager) context.getSystemService(Activity.WINDOW_SERVICE)).getDefaultDisplay());\r\n\t\tmRenderer.SetRotationSensor(new MobileRotation(context, 30));\t// update interval <- 30 ms\r\n\t\tmRenderer.SetLocationSensor(new MobileLocation(context, 0));\r\n\t\tmRenderer.SetContext(context);\r\n\t\tsetRenderer(mRenderer);\r\n\t\t\r\n\t\t//setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);\r\n\t\t/*\r\n\t\tnew Thread(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tTcpBridge.TcpOpen();\r\n\t\t\t}\r\n\t\t}).start();\r\n\t\t\r\n\t\tuiViewHandler = new Handler();\r\n\t\t\r\n\t\tscheduler = (ScheduledThreadPoolExecutor)Executors.newScheduledThreadPool(1);\r\n\t\tscheduler.scheduleAtFixedRate(\r\n\t\t\tnew Runnable() {\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\tTcpBridge.TcpFetchPosition();\r\n\t\t\t\t\tuiViewHandler.post(new Runnable() {\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\tfloat[] pos = TcpBridge.GetPosition();\r\n\t\t\t\t\t\t\tString output = \"New pos: (\" + pos[0] + \", \" + pos[1] + \", \" + pos[2] + \")\";\r\n\t\t\t\t\t\t\tSystem.out.println(output);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t3000,\r\n\t\t\t500,\r\n\t\t\tTimeUnit.MILLISECONDS);\r\n\t\t*/\r\n\t}",
"@Override\n public void onFrameAvailable(SurfaceTexture st) {\n mGLView.requestRender();\n }",
"@Override\n public void onSurfaceCreated(GL10 unused, EGLConfig config) {\n GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);\n\n mTriangle = new Triangle();\n mSquare = new Square();\n }",
"@Override\n\tpublic void onSurfaceCreated(GL10 unused, EGLConfig config) {\n\t\tGLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);\n\n\t\tmTriangle = new M15_OpenGLES20Triangle();\n\t\tmQuadrat = new M15_OpenGLES20Quadrat();\n\t}",
"public void onSurfaceCreated(GL10 gl, EGLConfig config) {\n gl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);\n \n bgTex = new Texture(gl);\n bgTex.Load(BitmapFactory.decodeResource(getResources(), R.drawable.game_bg));\n playerTex = new Texture(gl);\n playerTex.Load(BitmapFactory.decodeResource(getResources(), R.drawable.player));\n scoreTex = new Texture(gl);\n scoreTex.Load(BitmapFactory.decodeResource(getResources(), R.drawable.score));\n enemyTex = new Texture(gl);\n enemyTex.Load(BitmapFactory.decodeResource(getResources(), R.drawable.enemy));\n invincTex = new Texture(gl);\n invincTex.Load(BitmapFactory.decodeResource(getResources(), R.drawable.invincible));\n slowmoTex = new Texture(gl);\n slowmoTex.Load(BitmapFactory.decodeResource(getResources(), R.drawable.slowdown));\n minisquareTex = new Texture(gl);\n minisquareTex.Load(BitmapFactory.decodeResource(getResources(), R.drawable.smallsquare));\n plus1000Tex = new Texture(gl);\n plus1000Tex.Load(BitmapFactory.decodeResource(getResources(), R.drawable.plus1000));\n evilTex = new Texture(gl);\n evilTex.Load(BitmapFactory.decodeResource(getResources(), R.drawable.evil));\n speedTex = new Texture(gl);\n speedTex.Load(BitmapFactory.decodeResource(getResources(), R.drawable.speedup));\n bigsquareTex = new Texture(gl);\n bigsquareTex.Load(BitmapFactory.decodeResource(getResources(), R.drawable.bigsquare));\n minus1000Tex = new Texture(gl);\n minus1000Tex.Load(BitmapFactory.decodeResource(getResources(), R.drawable.minus1000));\n }",
"public void onSurfaceCreated(GL10 gl, EGLConfig config)\n {\n // Call native function to initialize rendering:\n initRendering();\n\n // Call QCAR function to (re)initialize rendering after first use\n // or after OpenGL ES context was lost (e.g. after onPause/onResume):\n QCAR.onSurfaceCreated();\n }",
"private void initDrawView() {\n\n Draw4Shader view = new Draw4Shader(this);\n\n // Draw5Animator view = new Draw5Animator(this);\n\n // Draw5AnimatorFrame view = new Draw5AnimatorFrame(this);\n\n setContentView(view);\n }",
"private native void nativeSurfaceInit(Object surface);",
"@Override\n public void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n mGLView = new ClearGLSurfaceView(this, (SensorManager) getSystemService(SENSOR_SERVICE));\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n\t\tgetWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);\n setContentView(mGLView);\n }",
"public void onSurfaceCreated(EGLConfig config) {\r\n Log.i(TAG, \"onSurfaceCreated\");\r\n GLES20.glClearColor(0.8f, 0.8f, 0.8f, 0.5f); // Dark background so text\r\n // shows up well.\r\n\r\n vertexShader = loadGLShader(GLES20.GL_VERTEX_SHADER, R.raw.light_vertex);\r\n gridShader = loadGLShader(GLES20.GL_FRAGMENT_SHADER, R.raw.grid_fragment);\r\n passthroughShader = loadGLShader(GLES20.GL_FRAGMENT_SHADER, R.raw.passthrough_fragment);\r\n\r\n\r\n for (GLSelectableObject cube : cubes) {\r\n cube.onSurfaceCreated(vertexShader, gridShader, passthroughShader);\r\n }\r\n\r\n floor.onSurfaceCreated(vertexShader, gridShader, passthroughShader);\r\n GLES20.glEnable(GLES20.GL_DEPTH_TEST);\r\n\r\n checkGLError(\"onSurfaceCreated\");\r\n }",
"@Override\n public void onSurfaceCreated(GL10 unused, EGLConfig config) {\n GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);\n \n // initialize a triangle\n mTriangle = new Triangle();\n // initialize a rect\n mRect = new Rect(mContext.getResources());\n\n mPicture = new Picture(mContext.getResources());\n mBlackAndWhitePicture = new BlackAndWhitePicture(mContext.getResources());\n }",
"public void onSurfaceCreated(GL10 gl, EGLConfig config)\r\n {\r\n DebugLog.LOGD(\"GLRenderer::onSurfaceCreated\");\r\n \r\n // Call native function to initialize rendering:\r\n initRendering();\r\n \r\n // Call QCAR function to (re)initialize rendering after first use\r\n // or after OpenGL ES context was lost (e.g. after onPause/onResume):\r\n QCAR.onSurfaceCreated();\r\n \r\n // Call native function to store information about the Java environment\r\n // It is important that we make this call from this thread (the rendering thread)\r\n // as the native code will want to make callbacks from this thread\r\n initNativeCallback();\r\n }",
"public SpectrogramSurfaceView(Context context) {\n\t\tsuper(context);\n\t\tinit(context);\n\t}",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\t\n\t\tView view = inflater.inflate(R.layout.layout_fragment_draw, container,false);\n\t\t\n\t\tLog.e(\"TAG\",\"aaaaa\");\n\t\t\n\t\t//imageView = (ImageView)view.findViewById(R.id.backImageView);\n\t\tsurFaceView = (DrawFragmentSurfaceView)view.findViewById(R.id.drawSurFaceView);\n\t\n\t\treturn view;\n\t}",
"@Override\n public void onSurfaceCreated(GL10 gl10, EGLConfig eglConfig) {\n filter = new LutColorFilter(mContext);\n mTextureId = createTextureObject();\n mSurfaceTexture = new SurfaceTexture(mTextureId);\n\n\n try {\n Bitmap bitmap = BitmapFactory.decodeStream(mContext.getResources().getAssets().open(\"lut_01.png\"));\n filter.setBitmap(bitmap);\n }catch (IOException e){\n\n }\n\n }",
"@Override\n public void onSurfaceCreated(GL10 glUnused, EGLConfig config) {\n glClearColor(0.0f, 0.0f, 0.0f, 0.0f);\n \n String vertexShaderSource = TextResourceReader.readTextFileFromResource(context, R.raw.simple_vertex_shader);\n String fragmentShaderSource = TextResourceReader.readTextFileFromResource(context, R.raw.simple_fragment_shader);\n \n int vertexShaderId = ShaderHelper.compileVertexShader(vertexShaderSource);\n int fragmentShaderId = ShaderHelper.compileFragmentShader(fragmentShaderSource);\n \n program = ShaderHelper.linkProgram(vertexShaderId, fragmentShaderId);\n \n if(LoggerConfig.ON){\n \tShaderHelper.validateProgram(program);\n }\n glUseProgram(program);\n uColorLocation = glGetUniformLocation(program, U_COLOR);\n aPositionLocation = glGetAttribLocation(program, A_POSITION);\n \n vertexData.position(0);\n glVertexAttribPointer(aPositionLocation, POSITION_COMPONENT_COUNT, GL_FLOAT, false, 0, vertexData);\n glEnableVertexAttribArray(aPositionLocation); \n }",
"public interface IGLWrapper {\n\n /** Indicates that the color buffer should be cleared. */\n int GL_COLOR_BUFFER_BIT = 0x00004000;\n /** Indicates that elements should be drawn as triangles using indices. */\n int GL_TRIANGLES = 0x0004;\n /** Indicates that the texture should be loaded to 2D. */\n int GL_TEXTURE_2D = 0x0DE1;\n /** Indicates that the data type is an unsigned short. */\n int GL_UNSIGNED_SHORT = 0x1403;\n /** Indicates that the data type is a float. */\n int GL_FLOAT = 0x1406;\n /** Indicates that the fragment shader should be loaded. */\n int GL_FRAGMENT_SHADER = 0x8B30;\n /** Indicates that the vertex shader should be loaded. */\n int GL_VERTEX_SHADER = 0x8B31;\n /** Indicates that the nearest neighbor should be used for interpolation. */\n int GL_NEAREST = 0x2600;\n /** Indicates that the texture magnification filter should be modified. */\n int GL_TEXTURE_MAG_FILTER = 0x2800;\n /** Indicates that the texture minification filter should be modified. */\n int GL_TEXTURE_MIN_FILTER = 0x2801;\n /** The 0th texture location. */\n int GL_TEXTURE0 = 0x84C0;\n\n /**\n * Checks whether the application is on desktop or Android.\n * @return True if the application is on desktop, false if on Android.\n */\n boolean isDesktopGL();\n\n /**\n * Sets the active texture index.\n * @param texture The active texture index.\n */\n void glActiveTexture(int texture);\n\n /**\n * Attaches a shader to a shader program.\n * @param program The program to attach the shader to.\n * @param shader The shader to attach to the program.\n */\n void glAttachShader(int program, int shader);\n\n /**\n * Binds a texture to a texture index.\n * @param target The texture index to bind to.\n * @param texture The texture to bind.\n */\n void glBindTexture(int target, int texture);\n\n /**\n * Sets the background color.\n * @param mask A bitmask containing the background color.\n */\n void glClear(int mask);\n\n /**\n * Sets the background color.\n * @param red The red component of the color.\n * @param green The green component of the color.\n * @param blue The blue component of the color.\n * @param alpha The alpha component of the color.\n */\n void glClearColor(float red, float green, float blue, float alpha);\n\n /**\n * Compiles a shader.\n * @param shader The shader to compile.\n */\n void glCompileShader(int shader);\n\n /**\n * Creates a shader program.\n * @return The created shader program.\n */\n int glCreateProgram();\n\n /**\n * Initializes a shader.\n * @param type The type of shader to initialize.\n * @return The initialized shader.\n */\n int glCreateShader(int type);\n\n /**\n * Disables a vertex attribute.\n * @param index The vertex attribute to disable.\n */\n void glDisableVertexAttribArray(int index);\n\n /**\n * Draws vertices on the screen.\n * @param mode The drawing mode to use.\n * @param count The number of vertices to draw.\n * @param type The primitive data type of the vertices.\n * @param indices The vertices to draw.\n * @param bufferIndex The index of the buffer handle to use.\n * @param bufferSize The size of the triangle buffer.\n */\n void glDrawElements(int mode, int count, int type,\n Buffer indices, int bufferIndex, int bufferSize);\n\n /**\n * Enables a vertex attribute.\n * @param index The vertex attribute to enable.\n */\n void glEnableVertexAttribArray(int index);\n\n /**\n * Generates textures in a given array.\n * @param n The number of textures to generate.\n * @param textures The array to generate textures in.\n * @param offset The offset for the starting position in the array to generate textures at.\n */\n void glGenTextures(int n, int[] textures, int offset);\n\n /**\n * Gets a shader attribute.\n * @param program The program to get the shader attribute from.\n * @param name The name of the shader attribute to get.\n * @return The specified shader attribute.\n */\n int glGetAttribLocation(int program, String name);\n\n /**\n * Gets a uniform shader attribute.\n * @param program The program to get the shader attribute from.\n * @param name The name of the uniform shader attribute to get.\n * @return The specified uniform shader attribute.\n */\n int glGetUniformLocation(int program, String name);\n\n /**\n * Links a shader program to OpenGL.\n * @param program The program to link.\n */\n void glLinkProgram(int program);\n\n /**\n * Loads shader code into a shader.\n * @param shader The shader to load code into.\n * @param string The shader code to load.\n */\n void glShaderSource(int shader, String string);\n\n /**\n * Sets the texture paramters for OpenGL.\n * @param target The type of the currently active texture.\n * @param pname The parameter to set.\n * @param param The value to set the parameter to.\n */\n void glTexParameteri(int target, int pname, int param);\n\n /**\n * Sets a uniform shader attribute.\n * @param location The attribute to set.\n * @param x The value to set the attribute to.\n */\n void glUniform1i(int location, int x);\n\n /**\n * Sets a uniform shader attribute.\n * @param location The attribute to set.\n * @param count The number of elements in the new value.\n * @param v The value to set the attribute to.\n * @param offset The offset of the starting index to set.\n */\n void glUniform4fv(int location, int count, float[] v, int offset);\n\n /**\n * Sets a matrix attribute.\n * @param location The matrix attribute to set.\n * @param count The number of elements in the array of matrices.\n * @param transpose Whether to transpose the matrix.\n * @param value The value to set the matrix to.\n * @param offset The offset of the starting index to set in the array of matrices.\n */\n void glUniformMatrix4fv(int location, int count, boolean transpose,\n float[] value, int offset);\n\n /**\n * Sets a shader program to be used by OpenGL.\n * @param program The program to use.\n */\n void glUseProgram(int program);\n\n /**\n * Sets the initial vertices in the vertex shader.\n * @param indx The vertex attribute to use.\n * @param size The number of coordinates per vertex.\n * @param type The type of primitive that the vertices are stored as.\n * @param normalized Whether the vertices are normalized.\n * @param stride The number of bytes per vertex.\n * @param ptr The vertex array.\n * @param bufferIndex The index of the buffer handle to use.\n * @param bufferSize The size of the vertex array in bytes.\n */\n void glVertexAttribPointer(int indx, int size, int type, boolean normalized,\n int stride, Buffer ptr, int bufferIndex, int bufferSize);\n\n /**\n * Sets the viewport of the camera.\n * @param x The x coordinate of the viewport's center.\n * @param y The y coordinate of the viewport's center.\n * @param width The width of the viewport.\n * @param height The height of the viewport.\n */\n void glViewport(int x, int y, int width, int height);\n\n /**\n * Loads a texture into OpenGL.\n * @param target The texture to load the bitmap to.\n * @param level The detail level of the image.\n * @param resourceId The image file to load from\n * @param border 0.\n */\n void texImage2D(int target, int level, int resourceId, int border);\n\n /**\n * Cleans up OpenGL after closing the desktop application.\n */\n void exit(int vertexShader, int fragmentShader);\n}",
"@Override\n\tpublic void onSurfaceCreated(EGLConfig config) {\n\t\tLog.i(TAG, \"onSurfaceCreated\");\n\t}",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n \n \tmSurfaceView = new SurfaceView(this);\n \t/*\n \t * surfaceview是高性能的,需要初始化缓存啊什么的的,所以初始化还需要一定时间\n \t * 需要挂一个回调来检测它的状态变化来做相应的操作\n \t * getHolder是得到它的管家\n \t */\n \tmSurfaceView.getHolder().addCallback(this);\n \t//SurfaceView默认宽和高都是fill_parent\n setContentView(mSurfaceView);\n mSurfaceView.setOnTouchListener(this);\n }",
"public void initEgl(Surface surface, EGLContext eglContext) {\n mEgl = (EGL10) EGLContext.getEGL();\n\n /*\n * Get to the default display.\n */\n mEglDisplay = mEgl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);\n\n if (mEglDisplay == EGL10.EGL_NO_DISPLAY) {\n throw new RuntimeException(\"eglGetDisplay failed(egl获取显示设备失败)\");\n }\n\n /*\n * We can now initialize EGL for that display\n * 初始化默认显示设备\n */\n int[] version = new int[2];\n if (!mEgl.eglInitialize(mEglDisplay, version)) {\n throw new RuntimeException(\"eglInitialize failed(初始化默认显示设备失败)\");\n }\n\n /**\n * 设置属性\n */\n\n int[] attribute = new int[]{\n EGL10.EGL_RED_SIZE, 8,\n EGL10.EGL_GREEN_SIZE, 8,\n EGL10.EGL_BLUE_SIZE, 8,\n EGL10.EGL_ALPHA_SIZE, 8,\n EGL10.EGL_DEPTH_SIZE, 8,//深度大小\n EGL10.EGL_STENCIL_SIZE, 8,//模板大小\n EGL10.EGL_RENDERABLE_TYPE, 4,//2.0版本 值为4\n EGL10.EGL_NONE //以此结尾\n };\n //5.\n int[] num_config = new int[1];\n if (!mEgl.eglChooseConfig(mEglDisplay, attribute, null, 1, num_config)) {\n throw new IllegalArgumentException(\"eglChooseConfig failed(从系统中获取对应的属性失败)\");\n }\n\n int numConfigs = num_config[0];\n\n if (numConfigs <= 0) {\n throw new IllegalArgumentException(\n \"No configs match configSpec(没有匹配到相应的属性)\");\n }\n\n EGLConfig[] configs = new EGLConfig[numConfigs];\n if (!mEgl.eglChooseConfig(mEglDisplay, attribute, configs, numConfigs,\n num_config)) {\n throw new IllegalArgumentException(\"eglChooseConfig#2 failed\");\n }\n\n\n //6,\n int[] attrib_list = {EGL14.EGL_CONTEXT_CLIENT_VERSION, 2,\n EGL10.EGL_NONE};\n\n\n if (eglContext != null) {\n //如果不是null,\n mEglContext = mEgl.eglCreateContext(mEglDisplay,\n configs[0], eglContext, attrib_list);\n } else {\n //如果是null,创建一个新的eglContext\n mEglContext = mEgl.eglCreateContext(mEglDisplay,\n configs[0], EGL10.EGL_NO_CONTEXT, attrib_list);\n }\n\n //7.\n mEglSurface = mEgl.eglCreateWindowSurface(mEglDisplay,\n configs[0],\n surface,\n null\n );\n\n if (mEglSurface == null || mEglSurface == EGL10.EGL_NO_SURFACE) {\n int error = mEgl.eglGetError();\n if (error == EGL10.EGL_BAD_NATIVE_WINDOW) {\n Log.e(\"EglHelper\", \"createWindowSurface returned EGL_BAD_NATIVE_WINDOW.(创建surface失败)\");\n }\n }\n\n //8\n\n\n if (!mEgl.eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface, mEglContext)) {\n throw new IllegalArgumentException(\"eglMakeCurrent failed \" + mEgl.eglGetError());\n }\n\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n requestWindowFeature(Window.FEATURE_NO_TITLE);\n super.onCreate(savedInstanceState);\n getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);\n GLSurfaceView view = new GLSurfaceView(this);\n view.setEGLConfigChooser(8, 8, 8, 8, 16, 0); //Transparent background\n view.getHolder().setFormat(PixelFormat.TRANSLUCENT); //Transparent background\n view.setRenderer(new OpenGLRenderer(this));\n setContentView(view);\n //Transition to Landing screen\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n // This app main activity\n Intent i = new Intent(SplashActivity.this, SearchActivity.class);\n startActivity(i);\n finish();\n }\n }, SPLASH_TIME_OUT);\n }",
"public void init()\r\n {\r\n\t\t/* initialize the widget */\r\n\t\tint width = gl.getWidth();\r\n\t\tint height = gl.getHeight();\r\n\r\n\t\t// Initialize the rendering viewport size to OpenGL\r\n\t\tgl.viewport( 0, 0, width, height );\r\n\t\tgl.matrixMode( GL.PROJECTION );\t// Set up the camera mode\r\n\t\tgl.loadIdentity();\t\t\t\t\t// Reset the transformation matrix\r\n\t\tif (width <= height)\r\n\t\t\tgl.ortho (-50.0, 50.0, -50.0*(double)height/(double)width,\r\n\t\t\t\t 50.0*(double)height/(double)width, -1.0, 1.0);\r\n\t\telse\r\n\t\t\tgl.ortho (-50.0*(double)width/(double)height,\r\n\t\t\t 50.0*(double)width/(double)height, -50.0, 50.0, -1.0, 1.0);\r\n\t\tgl.matrixMode( GL.MODELVIEW );\t\t// Reset to model transforms\r\n }",
"public void onSurfaceCreated(GL10 glUnused, EGLConfig config) {\n Log.i(Focus.TAG, \"onSurfaceCreated, thread is \" + Thread.currentThread());\n\n root = new Root();\n renderable = new Triangle();\n\n try {\n shader = new ShaderLoader(context).load(\"plain\");\n renderable = new Triangle();\n renderable.setShaderProgram(shader);\n Log.i(Focus.TAG, \"shader found, id: \" + shader);\n } catch (IOException ex) {\n Log.e(Focus.TAG, \"error creating shader\", ex);\n }\n\n }",
"public native void Initialize(Surface surface);",
"private void initGL() {\n\t\ttry {\n\t\t\tDisplay.setDisplayMode(new DisplayMode(displayWidth, displayHeight));\n\t\t\tDisplay.setVSyncEnabled(true);\n\t\t\tDisplay.setTitle(\"Shooter\");\n\t\t\tDisplay.create();\n\t\t} catch (LWJGLException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(0);\n\t\t}\n\t\t\n\t\t// init OpenGL\n\t\tglEnable(GL_TEXTURE_2D);\n\t\t\n\t\tglClearColor(0.0f, 0.0f, 0.0f, 0.0f);\n\t\t\n\t\t// enable alpha blending\n\t\tglEnable(GL_BLEND);\n\t\tglBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);\n\t\t\n\t\tglViewport(0, 0, displayWidth, displayHeight);\n\t\t\n\t\tglMatrixMode(GL_PROJECTION);\n\t\tglLoadIdentity();\n\t\tglOrtho(0, displayWidth, displayHeight, 0, 1, -1);\n\t\tglMatrixMode(GL_MODELVIEW);\n\t}",
"@Override\n\tpublic void surfaceCreated(SurfaceHolder holder) {\n\t\trequestRender();\n\t}",
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tGLSurfaceView cubeGL = new GLSurfaceView(this);\r\n\t\trequestWindowFeature(Window.FEATURE_CUSTOM_TITLE);\r\n\t\trender = new OpenGL3DRenderer(this);\r\n\t\tcubeGL.setZOrderOnTop(true);\r\n\t\tcubeGL.setEGLConfigChooser(8, 8, 8, 8, 16, 0);\r\n\t\tcubeGL.getHolder().setFormat(PixelFormat.TRANSLUCENT);\r\n\t\tcubeGL.setBackgroundDrawable(getResources().getDrawable(R.drawable.snowflower));\r\n\t\tcubeGL.setRenderer(render);\r\n\t\tsetContentView(cubeGL);\r\n\t\tgetWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE\t, R.layout.inc_app_title);\r\n\t\tToast.makeText(OpenGLActivity.this, \"zhe\", Toast.LENGTH_LONG).show();\r\n\t\tLoadingAllVideos();\r\n\t}",
"public CameraSurfaceView(Context context, AttributeSet attrs) {\n\t\tsuper(context, attrs);\n\t\tinit();\n\t}",
"public GameSurfaceView(Context context, AttributeSet attrs) {\r\n\t\tsuper( context, attrs);\r\n\t}",
"private void initGL() {\r\n glClearColor(0.0f, 0.0f, 0.0f, 0.0f);\r\n glMatrixMode(GL_PROJECTION);\r\n glLoadIdentity();\r\n\r\n glOrtho(-320, 320, -240, 240, 1, -1);\r\n\r\n glMatrixMode(GL_MODELVIEW);\r\n glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);\r\n }",
"public void init(GLAutoDrawable drawable) {\n drawable.setGL(new DebugGL(drawable.getGL())); //Ну может быть зачем-то он тут и нужен...\n\n final GL gl = drawable.getGL(); //Объект со всеми функциями.\n\n gl.glEnable(GL.GL_DEPTH_TEST); //Разрешаем z-буффер.\n gl.glDepthFunc(GL.GL_LEQUAL); //Задаем функцию глубины для z-буффера.\n\n gl.glShadeModel(GL.GL_SMOOTH); //Плавный переход цветов. Нужно чтобы тень красиво плавно переходила.\n gl.glClearColor(0f, 0f, 0.2f, 0f); //Задаем цвет затирания. Ну то-есть у нас это цвет фона.\n\n gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST); //Все настройки на максимум.\n gl.glHint(GL.GL_POINT_SMOOTH_HINT, GL.GL_NICEST);\n gl.glHint(GL.GL_LINE_SMOOTH_HINT, GL.GL_NICEST);\n gl.glHint(GL.GL_POLYGON_SMOOTH_HINT, GL.GL_NICEST);\n gl.glHint(GL.GL_TEXTURE_COMPRESSION_HINT, GL.GL_NICEST);\n gl.glHint(GL.GL_FRAGMENT_SHADER_DERIVATIVE_HINT, GL.GL_NICEST);\n gl.glHint(GL.GL_FOG_HINT, GL.GL_NICEST);\n gl.glHint(GL.GL_GENERATE_MIPMAP_HINT, GL.GL_NICEST);\n\n glu = new GLU(); //Глу он и есть глу.\n\n earth = new Earth();\n satellite = new Satellite();\n\n\n animator = new FPSAnimator(this, fps);\n animator.start(); //Создаем и запускаем аниматора.\n }",
"@Override\n\tpublic void surfaceCreated(SurfaceHolder arg0) {\n\t\t\n\t}",
"public void onSurfaceCreated(GL2 gl) {\r\n gl.glMatrixMode(GLMatrixFunc.GL_PROJECTION);\r\n gl.glLoadIdentity();\r\n\r\n // Perspective\r\n final int width = SCREEN_WIDTH;\r\n final int height = SCREEN_HEIGHT;\r\n aspectRatio = (float) width / (float) height;\r\n glu.gluPerspective(camera.getOpeningAngle(), aspectRatio, nearClippingPlane, farClippingPlane);\r\n\r\n // Viewport\r\n gl.glViewport(0, 0, width, height);\r\n gl.glMatrixMode(GLMatrixFunc.GL_MODELVIEW);\r\n\r\n // Depth\r\n gl.glEnable(GL2.GL_DEPTH_TEST);\r\n\r\n // which is the front? the one which is drawn counter clockwise\r\n gl.glFrontFace(GL2.GL_CCW);\r\n // which one should NOT be drawn\r\n gl.glCullFace(GL2.GL_BACK);\r\n\r\n // define the color we want to be displayed as the \"clipping wall\"\r\n gl.glClearColor((float) (CLEAR_COLOR.get(0)), (float) (CLEAR_COLOR.get(1)), (float) (CLEAR_COLOR.get(2)), OPAQUE);\r\n\r\n // Flat shading\r\n gl.glPolygonMode(GL2.GL_FRONT_AND_BACK, GL2.GL_FILL);\r\n\r\n // Set a light, just use the first one from the root node.\r\n if (renderFrame != null && renderFrame.getRoot().getNumberOfLightSources() > 0) {\r\n LightSource lightSource = renderFrame.getRoot().getLightSource(0);\r\n float lightAmbient[] = { 1, 1, 1, 1 };\r\n float lightSpecular[] = { 1, 1, 1, 1 };\r\n float lightPosition[] = lightSource.getPosition().floatData();\r\n float lightDiffuse[] = lightSource.getColor().floatData();\r\n gl.glEnable(GL2.GL_LIGHT0);\r\n gl.glLightfv(GL2.GL_LIGHT0, GL2.GL_AMBIENT, lightAmbient, 0);\r\n gl.glLightfv(GL2.GL_LIGHT0, GL2.GL_SPECULAR, lightSpecular, 0);\r\n gl.glLightfv(GL2.GL_LIGHT0, GL2.GL_DIFFUSE, lightDiffuse, 0);\r\n gl.glLightfv(GL2.GL_LIGHT0, GL2.GL_POSITION, lightPosition, 0);\r\n }\r\n\r\n updateView(gl);\r\n }",
"@Override\n public void surfaceCreated(SurfaceHolder holder) {\n }",
"public Surface(){\r\n\t\tsuper(SURFACE_TAG,\"\");\r\n\t\tthis.setRef(\"CG\");\r\n\t}",
"private static void initGL() {\n glClearColor(152/255f, 175/255f, 199/255f, 0.0f);\n glMatrixMode(GL_PROJECTION);\n glLoadIdentity();\n GLU.gluPerspective(100.0f, (float)displayMode.getWidth()/(float)\n displayMode.getHeight(), 0.1f, 500);\n glMatrixMode(GL_MODELVIEW);\n glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);\n glClearDepth(1.0f);\n glEnable(GL_DEPTH_TEST);\n glEnable(GL_TEXTURE_2D);\n glEnableClientState(GL_VERTEX_ARRAY);\n glEnableClientState(GL_COLOR_ARRAY);\n glEnableClientState(GL_TEXTURE_COORD_ARRAY);\n glEnable(GL_LIGHTING);\n glEnable(GL_LIGHT0);\n glEnable(GL_NORMALIZE);\n\n }",
"private native static void initSurface(long instance, long avi);",
"public void onSurfaceCreated(int vertexShader, int gridShader, int passthroughShader) {\r\n \tstuff();\r\n program = GLES20.glCreateProgram();\r\n GLES20.glAttachShader(program, vertexShader);\r\n if (this instanceof GLSelectableObject) {\r\n GLES20.glAttachShader(program, passthroughShader);\r\n } else {\r\n GLES20.glAttachShader(program, gridShader);\r\n }\r\n GLES20.glLinkProgram(program);\r\n GLES20.glUseProgram(program);\r\n\r\n checkGLError(\"Floor program\");\r\n\r\n modelParam = GLES20.glGetUniformLocation(program, \"u_Model\");\r\n modelViewParam = GLES20.glGetUniformLocation(program, \"u_MVMatrix\");\r\n modelViewProjectionParam = GLES20.glGetUniformLocation(program, \"u_MVP\");\r\n lightPosParam = GLES20.glGetUniformLocation(program, \"u_LightPos\");\r\n\r\n positionParam = GLES20.glGetAttribLocation(program, \"a_Position\");\r\n normalParam = GLES20.glGetAttribLocation(program, \"a_Normal\");\r\n colorParam = GLES20.glGetAttribLocation(program, \"a_Color\");\r\n\r\n GLES20.glEnableVertexAttribArray(positionParam);\r\n GLES20.glEnableVertexAttribArray(normalParam);\r\n GLES20.glEnableVertexAttribArray(colorParam);\r\n\r\n checkGLError(\"Floor program params\");\r\n Matrix.setIdentityM(model, 0);\r\n Matrix.translateM(model, 0, -xPos, -yPos, -zPos); // Floor appears\r\n // below user.\r\n\r\n }",
"public void initialize()\r\n\t{\r\n\t\tgl.glClearColor(0.0F, 0.0F, 0.0F, 1.0F);\r\n\t\t// initialize blending for transparency\r\n\t\tgl.glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);\r\n\t\tgl.glEnable(GL_DEPTH_TEST);\r\n\t\tgl.glEnable(GL_DITHER);\r\n\t\t//gl.disable(GL_ALPHA_TEST);\r\n\t\t//gl.disable(GL_COLOR_MATERIAL);\r\n\t\tgl.glShadeModel(GL_SMOOTH);\r\n\t\tgl.glDepthFunc( GL_LEQUAL );\r\n\t\tgl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);\r\n\t\tgl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);\r\n\t\tgl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);\r\n\t\tgl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);\r\n\t\tgl.glPixelStorei(GL_UNPACK_ALIGNMENT, 1);\r\n\t\tgl.glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);\r\n\t\tgl.glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, 1);\r\n\t\tglj.gljCheckGL();\r\n\t}",
"@Override\n public void onSurfaceCreated(GL10 gl, EGLConfig config) {\n GLES20.glClearColor(0.15f, 0.15f, 0.15f, 0.15f);\n\n // Position the eye behind the origin.\n final float eyeX = 0.0f;\n final float eyeY = 0.0f;\n final float eyeZ = 1.5f;\n\n // We are looking toward the distance\n final float lookX = 0.0f;\n final float lookY = 0.0f;\n final float lookZ = -5.0f;\n\n // Set our up vector. This is where our head would be pointing were we holding the camera.\n final float upX = 0.0f;\n final float upY = 1.0f;\n final float upZ = 0.0f;\n\n Matrix.setLookAtM(mViewMatrix, 0, eyeX, eyeY, eyeZ, lookX,\n lookY, lookZ, upX, upY, upZ);\n\n String fragmentShader = \"precision mediump float; \\n\"\n // This is the color from the vertex shader interpolated across the\n + \"varying vec4 v_Color; \\n\"\n // triangle per fragment.\n + \"void main() \\n\"\n + \"{ \\n\"\n + \" gl_FragColor = v_Color; \\n\"\n + \"} \\n\";\n String vertexShader = \"uniform mat4 u_MVPMatrix; \\n\"\n // Per-vertex position information we will pass in.\n + \"attribute vec4 a_Position; \\n\"\n\n // Per-vertex color information we will pass in.\n + \"attribute vec4 a_Color; \\n\"\n\n // This will be passed into the fragment shader.\n + \"varying vec4 v_Color; \\n\"\n\n + \"void main() \\n\"\n + \"{ \\n\"\n\n // Pass the color through to the fragment shader.\n + \" v_Color = a_Color; \\n\"\n\n // gl_Position is a special variable used to store the final position.\n // Multiply the vertex by the matrix to get the final point in\n // normalized screen coordinates.\n + \" gl_Position = u_MVPMatrix \\n\"\n + \" * a_Position; \\n\"\n + \"} \\n\";\n\n program = new GLProgram(vertexShader, fragmentShader);\n\n String positionVariableName = \"a_Position\";\n program.declareAttribute(positionVariableName);\n\n String colorVariableName = \"a_Color\";\n program.declareAttribute(colorVariableName);\n\n program.declareUniform(U_MVP_MATRIX);\n\n // Tell OpenGL to use this program when rendering.\n program.activate();\n\n // This triangle is red, green, and blue.\n final float[] triangle1VerticesData = {\n // X, Y, Z,\n // R, G, B, A\n -0.5f, -0.25f, 0.0f,\n 0.5f, -0.25f, 0.0f,\n 0.0f, 0.559016994f, 0.0f,\n };\n\n final float[] triangleColorData = {\n 1.0f, 0.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n };\n\n VertexArray mTriangleVertices = new VertexArray(triangle1VerticesData,\n program.getVariableHandle(positionVariableName), true);\n /*\n Store our model data in a float buffer.\n */\n ColorArray mTriangleColors = new ColorArray(triangleColorData,\n program.getVariableHandle(colorVariableName), true);\n\n positionVbo = new VertexBufferObject(mTriangleVertices);\n colorVbo = new VertexBufferObject(mTriangleColors);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }",
"@Override\n\t\tpublic void onSurfaceCreated(GL10 unused, EGLConfig config)\n\t\t{\n\t\t\tupdateBackgroundColor();\n\n\t\t\t// Get pointers to the shaders.\n\t\t\tint vertexShader = renderer.loadShader(GLES20.GL_VERTEX_SHADER,\tGLProgram.vertexShaderCode);\n\t\t\tint fragmentShader = renderer.loadShader(GLES20.GL_FRAGMENT_SHADER,\tGLProgram.fragmentShaderCode);\n\n\t\t\t// Create a new OpenGL program.\n\t\t\tGLProgram.glProgram = GLES20.glCreateProgram();\n\n\t\t\t// Add a vertex shader.\n\t\t\tGLES20.glAttachShader(GLProgram.glProgram, vertexShader);\n\n\t\t\t// Add a fragment shader.\n\t\t\tGLES20.glAttachShader(GLProgram.glProgram, fragmentShader);\n\n\t\t\t// Compile the program.\n\t\t\tGLES20.glLinkProgram(GLProgram.glProgram);\n\n\t\t\t// Use it.\n\t\t\tGLES20.glUseProgram(GLProgram.glProgram);\n\n\t\t\t// Initialize the project if it hasn't been done already.\n\t\t\t// Use a posted Runnable since NotepadActivity.initProject() should run on the UI thread.\n\t\t\tif (project == null)\n\t\t\t{\n\t\t\t\tpost(new Runnable()\n\t\t\t\t{\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run()\n\t\t\t\t\t{\n\t\t\t\t\t\tproject = new Project();\n\t\t\t\t\t\tactivity.initProject();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}",
"public MyGLRenderer(Context context, MyGLSurfaceView view) {\n this.view = view;\n this.context = context;\n // create model from specified .obj file\n model = new MyGLDrawModel(context, R.raw.step_00);\n }",
"public void init(GLAutoDrawable drawable) {\n koparka = new Koparka();\n scena = new Scena();\n GL gl = drawable.getGL();\n System.err.println(\"INIT GL IS: \" + gl.getClass().getName());\n\n // Enable VSync\n gl.setSwapInterval(1);\n\n // Setup the drawing area and shading mode\n gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);\n gl.glShadeModel(GL.GL_SMOOTH); \ngl.glEnable(GL.GL_CULL_FACE);// try setting this to GL_FLAT and see what happens.\n//wartości składowe oświetlenia i koordynaty źródła światła\n\n\n//(czwarty parametr określa odległość źródła:\n//0.0f-nieskończona; 1.0f-określona przez pozostałe parametry)\ngl.glEnable(GL.GL_LIGHTING); //uaktywnienie oświetlenia\n//ustawienie parametrów źródła światła nr. 0\ngl.glLightfv(GL.GL_LIGHT0,GL.GL_AMBIENT,ambientLight,0); //swiatło otaczające\ngl.glLightfv(GL.GL_LIGHT0,GL.GL_DIFFUSE,diffuseLight,0); //światło rozproszone\ngl.glLightfv(GL.GL_LIGHT0,GL.GL_SPECULAR,specular,0); //światło odbite\ngl.glLightfv(GL.GL_LIGHT0,GL.GL_POSITION,lightPos,0);\ngl.glLightfv( GL.GL_LIGHT0, GL.GL_SPOT_DIRECTION, direction ,0);\ngl.glLightf( GL.GL_LIGHT0, GL.GL_SPOT_EXPONENT, 1.0f );\ngl.glLightf( GL.GL_LIGHT0, GL.GL_SPOT_CUTOFF, 1.0f);//pozycja światła\ngl.glEnable(GL.GL_LIGHT0);\n\ngl.glLightfv(GL.GL_LIGHT1,GL.GL_AMBIENT,ambientLight,0); //swiatło otaczające\ngl.glLightfv(GL.GL_LIGHT1,GL.GL_DIFFUSE,diffuseLight,0); //światło rozproszone\ngl.glLightfv(GL.GL_LIGHT1,GL.GL_SPECULAR,specular,0); //światło odbite\ngl.glLightfv(GL.GL_LIGHT1,GL.GL_POSITION,lightPos2,0); //pozycja światła\ngl.glEnable(GL.GL_LIGHT1);//uaktywnienie źródła światła nr. 0\ngl.glEnable(GL.GL_COLOR_MATERIAL); //uaktywnienie śledzenia kolorów\n//kolory będą ustalane za pomocą glColor\ngl.glColorMaterial(GL.GL_FRONT, GL.GL_AMBIENT_AND_DIFFUSE);\n//Ustawienie jasności i odblaskowości obiektów\nfloat specref[] = { 1.0f, 1.0f, 1.0f, 1.0f }; //parametry odblaskowo?ci\n gl.glMaterialfv(GL.GL_FRONT, GL.GL_SPECULAR,specref,0);\n \n gl.glMateriali(GL.GL_FRONT,GL.GL_SHININESS,128);\n gl.glEnable(GL.GL_DEPTH_TEST);\n try\n {\n \n image1=ImageIO.read(getClass().getResourceAsStream(\"/bok.jpg\"));\n image2=ImageIO.read(getClass().getResourceAsStream(\"/niebo.jpg\"));\n image3=ImageIO.read(getClass().getResourceAsStream(\"/trawa.jpg\"));\n \n }\n catch (Exception ex)\n {\n return;\n }\n t1 = TextureIO.newTexture(image1, false);\nt2 = TextureIO.newTexture(image2, false);\nt3 = TextureIO.newTexture(image3, false);\ngl.glTexEnvi(GL.GL_TEXTURE_ENV, GL.GL_TEXTURE_ENV_MODE,\n GL.GL_BLEND | GL.GL_MODULATE);\ngl.glEnable(GL.GL_TEXTURE_2D);\ngl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL.GL_REPEAT);\ngl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_REPEAT);\ngl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST);\ngl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST);\ngl.glBindTexture(GL.GL_TEXTURE_2D, t1.getTextureObject());\n\n }",
"public void onSurfaceCreated(GL10 unused, EGLConfig config) {\n GLES20.glClearColor(0.2f, 0.7f, 0.0f, 1.0f);\n }",
"@Override\n\tpublic void surfaceCreated(SurfaceHolder arg0) {\n\t\tLog.e(TAG, \"surfaceCreated\");\n\t}",
"public void init( GLAutoDrawable drawable ) {\n\tGL2 gl = drawable.getGL().getGL2();\n gl.glClearColor(0.3F, 0.3F, 0.3F, 1.0F);\n gl.glEnable(GL2.GL_DEPTH_TEST);\n\tgl.glCullFace(GL2.GL_BACK);\n\tgl.glEnable(GL2.GL_CULL_FACE);\n\tfloat[] light_position = {-1000.0f, 3000.0f, 1000.0f, 0.0f};\n\tfloat[] sun_light = {1.0f, 1.0f, 0.8f, 1.0f};\n\tgl.glShadeModel(GL2.GL_SMOOTH); //FLAT); //SMOOTH); \n\n\tgl.glLightfv(GLLightingFunc.GL_LIGHT0, GLLightingFunc.GL_POSITION,\n\t\t light_position,0);\n\tgl.glLightfv(GLLightingFunc.GL_LIGHT0, GLLightingFunc.GL_DIFFUSE,\n\t\t sun_light,0);\n gl.glEnable(GL2.GL_LIGHTING); // Enable lighting.\n gl.glEnable(GL2.GL_LIGHT0); // Turn on a light. By default, shines from direction of viewer.\n gl.glEnable(GL2.GL_NORMALIZE); // OpenGL will make all normal vectors into unit normals\n gl.glEnable(GL2.GL_COLOR_MATERIAL); // Material ambient and diffuse colors can be set by glColor*\n\tgl.glMaterialf(GL.GL_FRONT, GLLightingFunc.GL_SHININESS, 64.0f);\n\n\tcreateElevationDisplayList();\n }",
"@Override\n\tpublic void onSurfaceCreated(GL10 gl, EGLConfig arg1) {\n\t\tcirculo = new Circulo(0.8f, 360, false);\n\t\tcruz = new cruz();\n\t\tray = new ray();\n\t\tgl.glClearColor(235f / 255, 124f / 255, 20f / 255, 0); // color de fondo\n\t}",
"public void init(GLAutoDrawable drawable) {\n\n GL gl = drawable.getGL();\n System.err.println(\"INIT GL IS: \" + gl.getClass().getName());\n gl.setSwapInterval(1);\n\n\n //wartości składowe oświetlenia i koordynaty źródła światła\n float ambientLight[] = { 0.3f, 0.3f, 0.3f, 1.0f };//swiatło otaczające\n float diffuseLight[] = { 0.7f, 0.7f, 0.7f, 1.0f };//światło rozproszone\n float specular[] = { 1.0f, 1.0f, 1.0f, 1.0f}; //światło odbite\n float lightPos[] = { 0.0f, 150.0f, 150.0f, 1.0f };//pozycja światła\n //(czwarty parametr określa odległość źródła:\n //0.0f-nieskończona; 1.0f-określona przez pozostałe parametry)\n gl.glEnable(GL.GL_LIGHTING); //uaktywnienie oświetlenia\n //ustawienie parametrów źródła światła nr. 0\n gl.glLightfv(GL.GL_LIGHT0,GL.GL_AMBIENT,ambientLight,0); //swiatło otaczające\n gl.glLightfv(GL.GL_LIGHT0,GL.GL_DIFFUSE,diffuseLight,0); //światło rozproszone\n gl.glLightfv(GL.GL_LIGHT0,GL.GL_SPECULAR,specular,0); //światło odbite\n gl.glLightfv(GL.GL_LIGHT0,GL.GL_POSITION,lightPos,0); //pozycja światła\n gl.glEnable(GL.GL_LIGHT0); //uaktywnienie źródła światła nr. 0\n gl.glEnable(GL.GL_COLOR_MATERIAL); //uaktywnienie śledzenia kolorów\n //kolory będą ustalane za pomocą glColor\n gl.glColorMaterial(GL.GL_FRONT, GL.GL_AMBIENT_AND_DIFFUSE);\n gl.glEnable(GL.GL_DEPTH_TEST);\n // Setup the drawing area and shading mode\n gl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);\n gl.glShadeModel(GL.GL_SMOOTH);\n try\n {\n image1 = ImageIO.read(getClass().getResourceAsStream(\"/pokemon.jpg\"));\n image2 = ImageIO.read(getClass().getResourceAsStream(\"/android.jpg\"));\n }\n catch(Exception exc)\n {\n JOptionPane.showMessageDialog(null, exc.toString());\n return;\n }\n\n t1 = TextureIO.newTexture(image1, false);\n t2 = TextureIO.newTexture(image2, false);\n\n gl.glTexEnvi(GL.GL_TEXTURE_ENV, GL.GL_TEXTURE_ENV_MODE, GL.GL_DECAL | GL.GL_MODULATE);\n gl.glEnable(GL.GL_TEXTURE_2D);\n gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL.GL_REPEAT);\n gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_REPEAT);\n gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST);\n gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST);\n gl.glBindTexture(GL.GL_TEXTURE_2D, t1.getTextureObject());\n gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL.GL_REPEAT);\ngl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_REPEAT);\n\n\n \n\n }",
"abstract public void init(GL gl);",
"@Override\n public void onResume() {\n \tsuper.onResume();\n mGLSurfaceView.onResume();\n }",
"@Override\n public void surfaceCreated(SurfaceHolder holder) {\n\n }",
"public void init(GL2 gl) {\n\t}",
"@Override\n protected void onResume()\n {\n super.onResume();\n mGLSurfaceView.onResume();\n }",
"@Override\n protected void onResume()\n {\n super.onResume();\n mGLSurfaceView.onResume();\n }",
"@Override protected void onCreate( Bundle savedInstanceState )\n {\n super.onCreate( savedInstanceState );\n\n _height = getWindowManager().getDefaultDisplay().getHeight();\n //nativeOnCreatePre();\n\n _view = new NativeGLView( getApplication() );\n setContentView( _view );\n\n nativeOnCreate();\n nativeSetTime( SystemClock.uptimeMillis() );\n\n String files = getFilesDir().getAbsolutePath();\n String ext = getExternalFilesDir(null).getAbsolutePath();\n String cache = getCacheDir().getAbsolutePath();\n String data = getDir(\"Data\", 0).getAbsolutePath();\n nativeSetPaths( files, ext, cache, data );\n }",
"@Override\n public void onSurfaceCreated(final GL10 pGL10, final EGLConfig pEGLConfig) {\n\n\n\n Moin2dJni.init(this.mScreenWidth, this.mScreenHeight);\n this.mLastTickInNanoSeconds = System.nanoTime();\n\n if(mlogic != null)\n {\n mlogic.onCreate();\n }\n\n }",
"@Override\n protected void onResume() {\n super.onResume();\n mGLSurfaceView.onResume();\n }",
"@Override\n\tpublic void surfaceCreated(SurfaceHolder holder) {\n\t\t\n\t}",
"private void initOpenGL(){\n\t\tcaps = GL.createCapabilities();\n\t\tglViewport(0,0,WIDTH,HEIGHT);\n\t\tif(caps.OpenGL44)System.out.println(\"All OK\");\n\t\tglEnable(GL_DEPTH_TEST);\n\t\t//glPolygonMode(GL_BACK, GL_LINE);\n\t\tglClearColor(0.0f, 0.0f, 0.0f, 0.0f);\n\t}",
"public void attachTo(@NonNull TextureView view) {\n if (attach(view)) {\n view.setOpaque(isOpaque());\n\n mRenderSurface = new TextureViewHandler(view);\n\n TextureView.SurfaceTextureListener listener = new TextureView.SurfaceTextureListener() {\n @Override\n public void onSurfaceTextureAvailable(\n SurfaceTexture surfaceTexture, int width, int height) {\n if (LOGGING) Log.d(LOG_TAG, \"onSurfaceTextureAvailable()\");\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {\n if (mDesiredWidth > 0 && mDesiredHeight > 0) {\n surfaceTexture.setDefaultBufferSize(mDesiredWidth, mDesiredHeight);\n }\n }\n\n Surface surface = new Surface(surfaceTexture);\n TextureViewHandler textureViewHandler = (TextureViewHandler) mRenderSurface;\n textureViewHandler.setSurface(surface);\n\n createSwapChain(surface);\n\n // Call this the first time because onSurfaceTextureSizeChanged()\n // isn't called at initialization time\n mRenderCallback.onResized(width, height);\n }\n\n @Override\n public void onSurfaceTextureSizeChanged(\n SurfaceTexture surfaceTexture, int width, int height) {\n if (LOGGING) Log.d(LOG_TAG, \"onSurfaceTextureSizeChanged()\");\n if (mDesiredWidth > 0 && mDesiredHeight > 0) {\n surfaceTexture.setDefaultBufferSize(mDesiredWidth, mDesiredHeight);\n mRenderCallback.onResized(mDesiredWidth, mDesiredHeight);\n } else {\n mRenderCallback.onResized(width, height);\n }\n // We must recreate the SwapChain to guarantee that it sees the new size.\n // More precisely, for an EGL client, the EGLSurface must be recreated. For\n // a Vulkan client, the SwapChain must be recreated. Calling\n // onNativeWindowChanged() will accomplish that.\n // This requirement comes from SurfaceTexture.setDefaultBufferSize()\n // documentation.\n TextureViewHandler textureViewHandler = (TextureViewHandler) mRenderSurface;\n mRenderCallback.onNativeWindowChanged(textureViewHandler.getSurface());\n }\n\n @Override\n public boolean onSurfaceTextureDestroyed(SurfaceTexture surfaceTexture) {\n if (LOGGING) Log.d(LOG_TAG, \"onSurfaceTextureDestroyed()\");\n destroySwapChain();\n return true;\n }\n\n @Override\n public void onSurfaceTextureUpdated(SurfaceTexture surface) { }\n };\n\n view.setSurfaceTextureListener(listener);\n\n // in case the View's SurfaceTexture already existed\n if (view.isAvailable()) {\n SurfaceTexture surfaceTexture = view.getSurfaceTexture();\n listener.onSurfaceTextureAvailable(surfaceTexture, mDesiredWidth, mDesiredHeight);\n }\n }\n }",
"private void init(Context context) {\n FilterParam.context = this.getContext();\n this.setEGLContextClientVersion(2);// @see android.opengl.GLSurfaceView\n this.mRender = new MyRenderer(this);\n this.setRenderer(this.mRender);//@see android.opengl.GLSurfaceView\n this.setZOrderMediaOverlay(true);//@see android.opengl.GLSurfaceView\n this.setRenderMode(RENDERMODE_WHEN_DIRTY);\n }",
"@Override\n public void onSurfaceChanged(GL10 gl, int width, int height) {\n onSurfaceChanged(width, height);\n }",
"void createSurface(SurfaceTexture surfaceTexture);",
"@Override\n public void onSurfaceChanged(GL10 gl, int width, int height) {\n Log.d(LOGTAG, \"GLRenderer.onSurfaceChanged\");\n\n vuforiaAppSession.onSurfaceChanged(width, height);\n }",
"@Override\n public void onSurfaceChanged(GL10 glUnused, int width, int height) {\n glViewport(0, 0, width, height);\n\n this.width = width;\n this.height = height;\n setPerspectiveView();\n \n }",
"@Override public void surfaceCreated(SurfaceHolder holder) {\r\n\t\tLog.d(TAG, this + \" surfaceCreated()\");\r\n\t\tif ( appPtr != 0 ) {\r\n\t\t\tnativeSurfaceCreated(appPtr, holder.getSurface());\r\n\t\t\tmSurfaceHolder = holder;\r\n\t\t}\r\n\t}",
"@Override public void surfaceCreated(SurfaceHolder holder) {\n\t\t\t}",
"public SurfaceView createLocalUI(Context context) {\n SurfaceView surfaceV = RtcEngine.CreateRendererView(context);\n surfaceV.setZOrderOnTop(true);\n surfaceV.setZOrderMediaOverlay(true);\n mRtcEngine.setupLocalVideo(new VideoCanvas(surfaceV));\n surfaceV.layout(0, 0, 20, 10);\n return surfaceV;\n }",
"@Override\n public void init(GLAutoDrawable gLDrawable) {\n\n GL2 gl = gLDrawable.getGL().getGL2();\n gLDrawable.setGL(new DebugGL2(gl));\n\n // Global settings.\n gl.glEnable(GL2.GL_DEPTH_TEST);\n\n /*\n gl.glDepthFunc(GL2.GL_LEQUAL);\n gl.glShadeModel(GL2.GL_SMOOTH);\n gl.glHint(GL2.GL_PERSPECTIVE_CORRECTION_HINT, GL2.GL_NICEST);\n\t\t\n */\n gl.glClearColor(0f, 0f, 0f, 1f);\n\n // Start animator (which should be a field).\n FPSAnimator animator = new FPSAnimator(gLDrawable, 60);\n animator.start();\n renderer = new TextRenderer(new Font(\"SansSerif\", Font.BOLD, 36));\n }"
]
| [
"0.6771063",
"0.65976495",
"0.65724283",
"0.6464883",
"0.6373741",
"0.6348982",
"0.63071215",
"0.62468755",
"0.6175344",
"0.61430556",
"0.61111575",
"0.6089068",
"0.6067306",
"0.60638815",
"0.60404694",
"0.60312855",
"0.60074323",
"0.59857666",
"0.59766716",
"0.5961718",
"0.59405094",
"0.5938525",
"0.5910032",
"0.5880592",
"0.58776",
"0.5862113",
"0.5841214",
"0.582852",
"0.5797872",
"0.5775063",
"0.57586235",
"0.5756452",
"0.5756093",
"0.57534784",
"0.5747368",
"0.57423663",
"0.57402676",
"0.5690207",
"0.5686917",
"0.56845117",
"0.5683321",
"0.5681577",
"0.56342584",
"0.5621864",
"0.561097",
"0.56065947",
"0.5562822",
"0.5561778",
"0.55532444",
"0.55373394",
"0.5527932",
"0.55215657",
"0.5521417",
"0.54977906",
"0.54883474",
"0.54848063",
"0.54714644",
"0.5464895",
"0.5456199",
"0.5428157",
"0.54137325",
"0.5394909",
"0.53939",
"0.5384449",
"0.5382433",
"0.538078",
"0.53795457",
"0.53769445",
"0.5365309",
"0.53625286",
"0.53601635",
"0.5357723",
"0.5342505",
"0.53097165",
"0.5303743",
"0.5299509",
"0.52843785",
"0.5273969",
"0.5244626",
"0.5240183",
"0.52270055",
"0.52233785",
"0.52134144",
"0.52078927",
"0.5185151",
"0.5185151",
"0.5184887",
"0.5181406",
"0.5180502",
"0.5178623",
"0.5177423",
"0.51770055",
"0.51651233",
"0.51647425",
"0.51532555",
"0.5139804",
"0.51393545",
"0.5133008",
"0.5132223",
"0.51289606",
"0.51178485"
]
| 0.0 | -1 |
Finishes initialization. This should be called immediately after the View is inflated. | public void initialize(VideoUiView uiView) {
this.uiView = uiView;
mediaLoader = new MediaLoader(getContext());
// Configure OpenGL.
renderer = new Renderer(uiView, mediaLoader);
setEGLContextClientVersion(2);
setRenderer(renderer);
setRenderMode(GLSurfaceView.RENDERMODE_CONTINUOUSLY);
// Configure sensors and touch.
sensorManager = (SensorManager) getContext().getSystemService(Context.SENSOR_SERVICE);
// TYPE_GAME_ROTATION_VECTOR is the easiest sensor since it handles all the complex math for
// fusion. It's used instead of TYPE_ROTATION_VECTOR since the latter uses the mangetometer on
// devices. When used indoors, the magnetometer can take some time to settle depending on the
// device and amount of metal in the environment.
orientationSensor = sensorManager.getDefaultSensor(Sensor.TYPE_GAME_ROTATION_VECTOR);
phoneOrientationListener = new PhoneOrientationListener();
touchTracker = new TouchTracker(renderer);
setOnTouchListener(touchTracker);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void viewInit() {\n }",
"private void initView() {\n\n }",
"@Override\n public void initView() {\n }",
"public void onFinishInflate() {\n super.onFinishInflate();\n this.mIconView = (ImageView) findViewById(R.id.icon);\n this.mTitleView = (TextView) findViewById(R.id.title);\n this.mSummaryView = (TextView) findViewById(R.id.summary);\n this.mSlidingButton = findViewById(R.id.sliding_button);\n }",
"public void onFinishInflate() {\n super.onFinishInflate();\n this.logo = findViewById(C1167R.C1170id.channel_logo);\n this.logoTitle = findViewById(C1167R.C1170id.logo_title);\n this.actionsHint = findViewById(C1167R.C1170id.actions_hint);\n this.sponsoredChannelBackground = findViewById(C1167R.C1170id.sponsored_channel_background);\n this.channelViewMainLinearLayout = findViewById(C1167R.C1170id.main_linear_layout);\n }",
"@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}",
"@Override\n protected void initView() {\n }",
"@Override\n protected void initView() {\n }",
"@Override\r\n\tprotected void initViews(Bundle savedInstanceState) {\n\t\t\r\n\t}",
"public void initView(){}",
"@Override\r\n protected void onFinishInflate() {\r\n initComponents();\r\n }",
"@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}",
"@Override\n\tpublic void initView() {\n\t\t\n\t}",
"@Override\n public void initView() {\n\n }",
"@Override\n\tprotected void initView() {\n\t\t\n\t}",
"@Override\n\tprotected void initView() {\n\t\t\n\t}",
"@Override\n\tpublic void InitView() {\n\t\t\n\t}",
"@Override\n\tprotected void initView()\n\t{\n\n\t}",
"private void initView(){\n\t\tinitSize();\n\t\tinitText();\n\t\tinitBackground();\n\t\tthis.setOnClickListener(this);\n\t\tthis.setOnLongClickListener(this);\n\t}",
"public final void onFinishInflate() {\n super.onFinishInflate();\n m118789x();\n }",
"@Override\n public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {\n super.onViewCreated(view, savedInstanceState);\n initView();\n }",
"protected abstract void initView();",
"private void init() {\n initView();\n setListener();\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n initView();\n }",
"protected abstract void initializeView();",
"@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\t\r\n\t\tinitView();\r\n\t}",
"@Override\r\n\tpublic void initViews() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void initViews() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initViews() {\n\t\t\r\n\t}",
"public void onFinishInflate() {\n AppMethodBeat.i(103009);\n if (getChildCount() > 0) {\n View childAt = getChildAt(0);\n if (!(childAt instanceof RadarSpecialTableLayout)) {\n childAt = null;\n }\n this.pCL = (RadarSpecialTableLayout) childAt;\n }\n AppMethodBeat.o(103009);\n }",
"private void initView() {\n TIMManager.getInstance().addMessageListener(this);\n initAdapter();\n initRefresh();\n }",
"private void initViews() {\n\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tViewUtils.inject(this);\n\t\tsetView();\n\t}",
"private void initView() {\n initRefreshListView(mListview);\n }",
"private void initViews() {\n\n\t}",
"public abstract void initView();",
"void initView();",
"private void onViewInit() {\n setFocusable(true);\n setFocusableInTouchMode(true);\n setBackgroundColor(Color.WHITE);\n setOnTouchListener(this);\n onCanvasInit();\n }",
"@Override\n protected void onFinishInflate() {\n mRootView = getChildAt(0);\n super.onFinishInflate();\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_my_act);\n ButterKnife.bind(this);\n init();\n initView();\n initData();\n }",
"protected void initView(View rootView) {\n\n }",
"public void onFinishInflate() {\n super.onFinishInflate();\n this.mInitPadding = getPaddingTop();\n this.mSlipPaddingRatio = getResources().getFraction(R.fraction.share_channel_slip_padding_ratio, 1, 1);\n }",
"public void onFinishInflate() {\n super.onFinishInflate();\n this.titleIconContainer = findViewById(C1167R.C1170id.watch_next_info_icon_title_container);\n this.message = findViewById(C1167R.C1170id.watch_next_info_message);\n Resources res = getContext().getResources();\n this.selectedMessageWidth = res.getDimensionPixelSize(C1167R.dimen.watch_next_info_card_selected_message_width);\n this.selectedCardHeight = res.getDimensionPixelSize(C1167R.dimen.program_default_height);\n }",
"public void onFinishInflate() {\n super.onFinishInflate();\n this.mTextAndBackground = (ViewGroup) findViewById(C0622R.C0625id.text_and_background);\n ColorDrawable colorDrawable = (ColorDrawable) this.mTextAndBackground.getBackground();\n this.mBackgroundColor = colorDrawable.getColor();\n this.mTextAndBackground.setBackground(new RippleDrawable(ColorStateList.valueOf(Themes.getAttrColor(getContext(), 16843820)), colorDrawable, null));\n this.mTitleView = (TextView) this.mTextAndBackground.findViewById(C0622R.C0625id.title);\n this.mTextView = (TextView) this.mTextAndBackground.findViewById(C0622R.C0625id.text);\n }",
"public void init() {\n\t\tdropViewCollections();\n\t\tbuildViewCollections();\n\t\tthis.populateViewCollections();\n\t}",
"@Override\n protected void initView() {\n ButterKnife.bind(this);\n }",
"public void initViews(){\n }",
"private void initView() {\n mBinding.swipeRefresh.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n\n mBinding.swipeRefresh.setRefreshing(false);\n }\n });\n\n\n setUpBookingRecycler();\n bindStaticData();\n setUpBookingAdapter();\n }",
"protected abstract void initViews();",
"private void initView() {\n\t\tcb_show = (CheckBox) findViewById(R.id.cb_show);\r\n\t\tbtn_next = (Button) findViewById(R.id.btn_next);\r\n\t}",
"@Override\n public void initView() throws Exception {\n mGrowSeedlingsTimeTextView = (TextView) findViewById(R.id.GrowSeedlingsTime_TextView);\n mGrowSeedlingsTimeRecyclerView = (RecyclerView) findViewById(R.id.GrowSeedlingsTime_RecyclerView);\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceBundle)\n\t{\n\t\tsuper.onCreate(savedInstanceBundle);\n\t\tView initView = initView();\n\t\tsetBaseView(initView);\n\t\tinitValues();\n\t\tinitListeners();\n\t}",
"@Override\n protected void onFinishInflate() {\n super.onFinishInflate();\n Log.d(SecondView.class.getSimpleName(), String.valueOf(System.currentTimeMillis()));\n ButterKnife.inject(this, this);\n secondPresenter.takeView(this);\n }",
"@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(getLayoutViewId());\n// presenter = getPresenter(typePresenter);\n init();\n }",
"@Override\n\tpublic void onActivityCreated(@Nullable Bundle savedInstanceState) {\n\t\tinitView();\n\t\tinitListener();\n\t\tinitData();\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}",
"@Override\n public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {\n }",
"@Override\n\tprotected void initComplete() throws Exception\n\t{\n\t\tAlignment eViewAlignment =\n\t\t\tgetUIProperty(VERTICAL_ALIGN, aViewContentParam);\n\n\t\tif (eViewAlignment != null)\n\t\t{\n\t\t\tsetUIProperty(VERTICAL_ALIGN, eViewAlignment, aViewFragmentParam);\n\t\t}\n\t}",
"@Override\n\tprotected void initContentView() {\n\t\t\n\t}",
"@Override\r\n\tpublic void onViewCreated(View view, Bundle savedInstanceState) {\n\t\tsuper.onViewCreated(view, savedInstanceState);\r\n\t\tfindViews(view);\r\n\t\tinitViews(savedInstanceState);\r\n\t}",
"@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tsetview();\r\n\t}",
"@Override\n\tpublic void onViewCreated(View view, Bundle savedInstanceState) {\n\t\tsuper.onViewCreated(view, savedInstanceState);\n\t}",
"@Override\n\tpublic void onViewCreated(View view, Bundle savedInstanceState) {\n\t\tsuper.onViewCreated(view, savedInstanceState);\n\t}",
"@Override\n public void onViewCreated(View view, Bundle savedInstanceState) {\n }",
"public void onFinishInflate() {\n super.onFinishInflate();\n bringChildToFront(this.menuButton);\n this.buttonsCount = getChildCount();\n createLabels();\n }",
"protected abstract void initContentView(View view);",
"private void initViews() {\n mDatabaseHandler = DatabaseHandler.getInstance(HomeActivity.this);\n Toolbar toolbar = (Toolbar) findViewById(R.id.activity_home_toolbar);\n setSupportActionBar(toolbar);\n mFab = (FloatingActionButton) findViewById(R.id.activity_home_fab);\n mMonthsList = new ArrayList<>();\n }",
"@Override\n public void prepareView() {\n }",
"private void initView() {\n\t\timg_back = (ImageView) findViewById(R.id.img_back_updatejob);\n\t\tedt_content = (EditText) findViewById(R.id.edt_content_updatejob);\n\t\tedt_course = (EditText) findViewById(R.id.edt_course_updatejob);\n\t\tbtn_delete = (Button) findViewById(R.id.btn_delete_updatejob);\n\t\tbtn_update = (Button) findViewById(R.id.btn_update_updatejob);\n\t}",
"public abstract void initViews();",
"private void init() {\n refreshLayout = new TurbolinksSwipeRefreshLayout(getContext(), null);\n addView(refreshLayout, 0);\n }",
"@Override\n public void onViewCreated(View view, Bundle savedInstanceState) {\n super.onViewCreated(view, savedInstanceState);\n }",
"@Override\n public void onViewCreated(View view, Bundle savedInstanceState) {\n super.onViewCreated(view, savedInstanceState);\n }",
"protected void onFinalInit() {\n\n }",
"public MainView() {\r\n\t\tinitialize();\r\n\t}",
"public void initView() {\n\t\t view.initView(model);\t \n\t }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n ctx = getActivity();\n View view = inflater.inflate(getLayoutID(),null);\n mPreenter = createPresenter();\n loading = new MyProgressLoading(ctx, R.style.DialogStyle);\n sp = ctx.getSharedPreferences(SpUtiles.SP_Mode,Context.MODE_PRIVATE);\n HideUtil.init(getActivity());\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n initListener();\n return view;\n }",
"@Override\n protected void initView()\n {\n ed_name = findView(R.id.ed_name);\n ed_bank = findView(R.id.ed_bank);\n ed_bank_card = findView(R.id.ed_bank_card);\n ed_bank_name = findView(R.id.ed_bank_name);\n btn_submit = findView(R.id.btn_submit);\n findView(R.id.ib_back).setOnClickListener(this);\n Toolbar toolbar = findView(R.id.toolbar);\n setSupportActionBar(toolbar);\n\n }",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tinflater = LayoutInflater.from(getApplicationContext());\n\t}",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tinitView();\n\t\tinitData();\n\t\tinitEvent();\n\t}",
"private void init() {\n //set view to presenter\n presenter.setView(this, service);\n\n setupView();\n }",
"public void onFinishInflate() {\n super.onFinishInflate();\n this.mTvMain = (TextView) findViewById(R.id.tv_main);\n this.mTvSub = (TextView) findViewById(R.id.tv_second);\n this.mIvIcon = (ImageView) findViewById(R.id.iv_icon);\n this.mIvIcon.setVisibility(8);\n this.mTvSub.setMovementMethod(ScrollingMovementMethod.getInstance());\n }",
"@Override protected void initViews() {\n\t\tsetFragments(F_PopularFragment.newInstance(T_HomeActivity.this), F_TimelineFragment.newInstance(T_HomeActivity.this));\n\t}",
"@Override\n protected void onFinishInflate() {\n super.onFinishInflate();\n mTitleContent = (TextView) findViewById(R.id.title_content);\n mLeftTv = (TextView) findViewById(R.id.title_left_tv);\n mRightTv = (TextView) findViewById(R.id.title_right_tv);\n mRightImg = (ImageView) findViewById(R.id.title_right_img);\n mMessageView = (RelativeLayout) findViewById(R.id.toolbar_message_view);\n mUnReadImg = (ImageView) findViewById(R.id.toolbar_message_unread_img);\n }",
"@Override\n protected void initView(Bundle savedInstanceState) {\n setContentView(R.layout.activity_opinion);\n if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT) {\n findViewById(R.id.View).setVisibility(View.GONE);\n }\n\n ll_back = findView(R.id.ll_back);\n et_opinion_feedback = findView(R.id.et_opinion_feedback);\n et_opinion_phone = findView(R.id.et_opinion_phone);\n btn_opinion_feedback = findView(R.id.btn_opinion_feedback);\n\n }",
"public void initView() {\n setEllipsize(TruncateAt.MARQUEE);\n setSingleLine(true);\n setMarqueeRepeatLimit(-1);\n setFocusable(true);\n setFocusableInTouchMode(false);\n }",
"@Override\n public void onViewCreated(View view, Bundle savedInstanceState) {\n super.onViewCreated(view, savedInstanceState);\n initViews(view);\n // L.e(TAG, \"msg: onViewCreated\" + city);\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\tinitView();\n\n\t\tinitData();\n\n\t\tinitEvent();\n\n\t\tinitAnimation();\n\n\t\tshowUp();\n\t}",
"public View initContentView() {\n return null;\n }",
"@Override\n\tpublic void init(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tsuper.init(inflater, container, savedInstanceState);\n\n\t\tmDxCountTextView = (TextView) findViewById(R.id.dx_count);\n\t\tmDxTotalTextView = (TextView) findViewById(R.id.dx_total);\n\t\tmZyCountTextView = (TextView) findViewById(R.id.zy_count);\n\t\tmZyTotalTextView = (TextView) findViewById(R.id.zy_total);\n\t\tmTimeTextView = (TextView) findViewById(R.id.time);\n\t\t\n\t\tmDxTipText = (TextView) findViewById(R.id.dx_count_tip);\n\t\tmZyTipText = (TextView) findViewById(R.id.zy_count_tip);\n\t\tmDxBottonText = (TextView) findViewById(R.id.dx_total_tip);\n\t\tmXyBottonText = (TextView) findViewById(R.id.zy_total_tip);\n\t}",
"private void init() {\n LayoutInflater inflater = getActivity().getLayoutInflater();\n layout = inflater.inflate(R.layout.approvalaction_popup, null);\n showButton();\n bindButtonClick();\n }",
"protected void onViewCreated(@Nullable Bundle savedInstanceState) {\n }",
"@Override\n public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {\n }",
"@Override\n protected void initViewSetup() {\n }",
"@Override\n public void onViewCreated(View view, Bundle savedInstanceState) {\n\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n LayoutInflater inflater = getActivity().getLayoutInflater();\n if (mainView == null) {\n mainView = inflater.inflate(R.layout.fragment_mywarrelease, null);\n mContext = inflater.getContext();\n initView();\n }\n }",
"public void onFinishInflate() {\n AppMethodBeat.i(111980);\n super.onFinishInflate();\n ab.d(\"MicroMsg.GameIndexListView\", \"onFinishInflate\");\n this.nfE = ViewConfiguration.get(this.mContext).getScaledTouchSlop();\n this.mScroller = new Scroller(this.mContext);\n getContext();\n setLayoutManager(new LinearLayoutManager());\n this.njg = new b();\n setAdapter(this.njg);\n b((h) new a(getResources()));\n setLoadingView((int) R.layout.a3s);\n setOnLoadingStateChangedListener(new com.tencent.mm.plugin.appbrand.widget.recyclerview.LoadMoreRecyclerView.a() {\n public final void aMC() {\n AppMethodBeat.i(111969);\n GameIndexListView.a(GameIndexListView.this);\n AppMethodBeat.o(111969);\n }\n });\n fh(true);\n bFn();\n AppMethodBeat.o(111980);\n }",
"protected void onInit() {\n\t}",
"@Override\n public void onInit()\n {\n\n }",
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.main_layout_holder);\r\n\t\tinitFragments();\r\n\t}"
]
| [
"0.74535805",
"0.7317238",
"0.7315049",
"0.7299989",
"0.72988534",
"0.7289408",
"0.7289408",
"0.72846925",
"0.72846925",
"0.7260422",
"0.7210289",
"0.7209468",
"0.7204616",
"0.7204616",
"0.71874034",
"0.713248",
"0.7080475",
"0.7080475",
"0.7042725",
"0.70404184",
"0.70402116",
"0.7034781",
"0.7001334",
"0.6981496",
"0.69809335",
"0.6957998",
"0.69456995",
"0.6944394",
"0.6892531",
"0.6892531",
"0.6882285",
"0.68537045",
"0.68310434",
"0.68305194",
"0.67508906",
"0.6742537",
"0.6736898",
"0.67238766",
"0.6714719",
"0.6702998",
"0.6694888",
"0.6693082",
"0.66928",
"0.66693383",
"0.6660625",
"0.66590595",
"0.6658557",
"0.6642825",
"0.66291684",
"0.6619548",
"0.6616853",
"0.66042656",
"0.6602879",
"0.659151",
"0.6585104",
"0.65738875",
"0.6570375",
"0.65532476",
"0.6550182",
"0.6546932",
"0.65465254",
"0.65463746",
"0.654492",
"0.654492",
"0.65389264",
"0.6524364",
"0.6520951",
"0.6519982",
"0.6517594",
"0.65150744",
"0.65086406",
"0.65025264",
"0.6489882",
"0.6489882",
"0.6481283",
"0.6480979",
"0.6477663",
"0.64770675",
"0.64750224",
"0.64677423",
"0.6462652",
"0.6462543",
"0.64514184",
"0.6445595",
"0.64372337",
"0.6432828",
"0.6428327",
"0.64265466",
"0.64102083",
"0.6403085",
"0.6399666",
"0.6399309",
"0.63889277",
"0.63886005",
"0.6386655",
"0.6379577",
"0.63727087",
"0.6360203",
"0.6355823",
"0.6351519",
"0.63413465"
]
| 0.0 | -1 |
Starts the sensor & video only when this View is active. | @Override
public void onResume() {
super.onResume();
// Use the fastest sensor readings.
sensorManager.registerListener(
phoneOrientationListener, orientationSensor, SensorManager.SENSOR_DELAY_FASTEST);
mediaLoader.resume();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@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 }",
"public void start() {\r\n view.addListener(this);\r\n view.makeVisible();\r\n view.display();\r\n }",
"public void onStart() {\n\n mVideoFolder = createVideoFolder();\n mImageFolder = createImageFolder();\n mMediaRecorder = new MediaRecorder();\n\n startBackgroundThread();\n\n if (mTextureView.isAvailable()) {\n // TODO: see Google Example add comments\n // pause and resume\n openCamera(mTextureView.getWidth(), mTextureView.getHeight());\n\n } else {\n // first time\n mTextureView.setSurfaceTextureListener(mSurfaceTextureListener);\n }\n }",
"public void start()\n\t{\n\t\tview.showWindow();\n\t\taddListeners();\n\t}",
"@Override\r\n\tpublic void onStart() {\n\t\tsuper.onStart();\r\n\t\tif(videoView.isPrepared() && isPlaying){\r\n\t\t\tvideoView.start();\r\n\t\t}\r\n\t}",
"@FXML\r\n protected void startCamera() {\r\n // set a fixed width for the frame\r\n this.currentFrame.setFitWidth(600);\r\n // preserve image ratio\r\n this.currentFrame.setPreserveRatio(true);\r\n\r\n if (!this.cameraActive) {\r\n\r\n // start the video capture\r\n //this.capture.open(0);\r\n //Read the video (Chage video)\r\n this.capture.open(\"Faruri.m4v\");\r\n\r\n\r\n System.out.println(\"start capture...\");\r\n // is the video stream available?\r\n if (this.capture.isOpened()) {\r\n System.out.println(\"inif\");\r\n this.cameraActive = true;\r\n\r\n // grab a frame every 33 ms (30 frames/sec)\r\n Runnable frameGrabber = new Runnable() {\r\n\r\n @Override\r\n public void run() {\r\n // effectively grab and process a single frame\r\n Mat frame = grabFrame();\r\n\r\n//\t\t\t\t\t\t// convert and show the frame\r\n//\t\t\t\t\t\tImage imageToShow = Utils.mat2Image(frame);\r\n//\t\t\t\t\t\tupdateImageView(currentFrame, imageToShow);\r\n }\r\n };\r\n\r\n this.timer = Executors.newSingleThreadScheduledExecutor();\r\n this.timer.scheduleAtFixedRate(frameGrabber, 0, 33, TimeUnit.MILLISECONDS);\r\n\r\n // update the button content\r\n this.button.setText(\"Stop Video\");\r\n } else {\r\n // log the error\r\n System.err.println(\"Impossible to open the video...\");\r\n }\r\n } else {\r\n // the camera is not active at this point\r\n this.cameraActive = false;\r\n // update again the button content\r\n this.button.setText(\"Start Video\");\r\n\r\n // stop the timer\r\n this.stopAcquisition();\r\n }\r\n }",
"private void onShow() {\n if (DEBUG)\n MLog.d(TAG, \"onShow(): \" + printThis());\n\n startBackgroundThread();\n\n // When the screen is turned off and turned back on, the SurfaceTexture is already\n // available, and \"onSurfaceTextureAvailable\" will not be called. In that case, we can open\n // a camera and start preview from here (otherwise, we wait until the surfaceJavaObject\n // is ready in\n // the SurfaceTextureListener).\n if (mTextureView.isAvailable()) {\n openCamera(mTextureView.getWidth(), mTextureView.getHeight());\n } else {\n mTextureView.setSurfaceTextureListener(mSurfaceTextureListener);\n }\n }",
"@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tmVideoContrl.start();\r\n\t\t\t\t\t\tisBreakDialogDissmiss = true;\r\n\t\t\t\t\t\tsendFirstShowContrlBtn();\r\n\t\t\t\t\t\tisChangeNotStart = true;\r\n\t\t\t\t\t\tmVideoPlayerHander.sendEmptyMessage(REFRESH_PAUSEBUTON);\r\n\t\t\t\t\t\t// start_3Dmode();\r\n\t\t\t\t\t}",
"public void start() {\n if (mSensorManager.getDefaultSensor(Sensor.TYPE_ROTATION_VECTOR)==null){ // check if rotation sensor present\n if (mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD)==null\n || mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER)==null){ // check if acc & mag sensors are present\n noSensorAlert(); // alert if no sensors are present\n }\n else { // use acc & mag sensors\n mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);\n mMagnetometer = mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD);\n haveSensor = mSensorManager.registerListener(this,mAccelerometer,SensorManager.SENSOR_DELAY_UI);\n haveSensor2 = mSensorManager.registerListener(this,mMagnetometer,SensorManager.SENSOR_DELAY_UI);\n }\n }\n else { // use rotation sensor\n mRotationV = mSensorManager.getDefaultSensor(Sensor.TYPE_ROTATION_VECTOR);\n haveSensor = mSensorManager.registerListener(this,mRotationV,SensorManager.SENSOR_DELAY_UI);\n }\n }",
"public void onStart() {\n super.onStart();\n this.mZxingview.startCamera();\n this.mZxingview.startSpotAndShowRect();\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tif(mVideoView != null && mVideoView.isPlaying())\n\t\t\t\t\tstartTimer();\n\t\t\t}",
"@Override // com.master.cameralibrary.CameraViewImpl\n public boolean start() {\n chooseCamera();\n openCamera();\n if (this.mPreview.isReady()) {\n setUpPreview();\n }\n this.mShowingPreview = true;\n this.mCamera.startPreview();\n return true;\n }",
"@Override\n public void enable() {\n if (!sensorEnabled) {\n //Log.d(TAG, \"start app tracking\");\n sensorEnabled = true;\n new AppObserver().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n }\n }",
"public void startListening()\n {\n if (!listening) {\n sensorManager.requestTriggerSensor(listener, motion);\n listening = true;\n }\n }",
"public void start() {\n\n\t\tif (!started.compareAndSet(false, true)) {\n\t\t\treturn;\n\t\t}\n\n\t\tLOG.debug(\"Starting panel rendering and trying to open attached webcam\");\n\n\t\tstarting = true;\n\n\t\tif (updater == null) {\n\t\t\tupdater = new ImageUpdater();\n\t\t}\n\n\t\tupdater.start();\n\n\t\ttry {\n\t\t\terrored = !webcam.open();\n\t\t} catch (WebcamException e) {\n\n\t\t\terrored = true;\n\n\t\t\tDisplay.getDefault().syncExec(new Runnable() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tredraw();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthrow e;\n\t\t} finally {\n\t\t\tstarting = false;\n\t\t}\n\t}",
"public void startStreaming() {\n// phoneCam.setViewportRenderingPolicy(OpenCvCamera.ViewportRenderingPolicy.OPTIMIZE_VIEW);\n phoneCam.startStreaming(320, 240, OpenCvCameraRotation.SIDEWAYS_RIGHT);\n }",
"@Override\n public void surfaceCreated( final SurfaceHolder holder )\n {\n this.controller.setRunning( true );\n this.controller.start();\n }",
"public void startCamera()\n \t{\n\t\t// start the video capture\n\t\t//this.capture.open(0);\n\t\tcapture.open(cameraNumber);\n\n\n\n\t\t// is the video stream available?\n\t\tif (capture.isOpened())\n\t\t{\n\t\t\t// grab a frame every 33 ms (30 frames/sec)\n\t\t\tRunnable frameGrabber = new Runnable() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run()\n\t\t\t\t{\n\t\t\t\t\tgrabFrame();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\ttimer = Executors.newSingleThreadScheduledExecutor();\n\t\t\ttimer.scheduleAtFixedRate(frameGrabber, 0, 500, TimeUnit.MILLISECONDS);\n\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// log the error\n\t\t\tSystem.err.println(\"Impossible to open the camera connection...\");\n\t\t}\n \t}",
"public void onDouyinDetectStart() {\n HwAPPStateInfo curAppInfo = getCurStreamAppInfo();\n if (curAppInfo != null && 100501 == curAppInfo.mScenceId) {\n curAppInfo.mIsVideoStart = true;\n }\n }",
"public void start() {\n sensorManager.registerListener(this, gyroscope, SENSOR_DELAY);\n sensorManager.registerListener(this, rotationVector, SENSOR_DELAY);\n //sender = new UDPSender();\n }",
"public void start() {\n \tif (mediaChangedListener != null) {\n \t\tmediaChangedListener.onStarted();\n \t}\n mMediaPlayer.start();\n }",
"private void activeSensor(Sensor sensor) {\n selectedSensor = sensor;\n// selectedSensor.debug(true);\n// if (start) {\n// view = (DrawingView) findViewById(R.id.surface);\n// bitmap = Bitmap.createBitmap(view.getWidth(), view.getHeight(), Bitmap.Config.RGB_565);\n// canvas = new Canvas(bitmap);\n// view.setDrawer(new DrawingView.Drawer() {\n// @Override\n// public void draw(Canvas canvas) {\n// canvas.drawBitmap(bitmap, 0, 0, null);\n// }\n// });\n// }\n }",
"public void startFrontCam() {\n }",
"public void StartListening()\n\t{\n\t\tif (true == mbHasAccelerometer && false == mbListening)\n\t\t{\n\t\t\tmbListening = true;\n\t\t\t\n\t\t\tfinal AccelerometerNativeInterface accelerometerNI = this;\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\tSensorManager sensorManager = (SensorManager)CSApplication.get().getActivityContext().getSystemService(Activity.SENSOR_SERVICE);\n\t\t\t\t\tsensorManager.registerListener(accelerometerNI, sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), SensorManager.SENSOR_DELAY_GAME);\t\n\t\t\t\t}\n\t\t\t};\n\t\t\tCSApplication.get().scheduleUIThreadTask(task);\n\t\t};\n\t}",
"public void start() {\n m_enabled = true;\n }",
"public void startSensors() {\r\n\t\tsensorManager.registerListener(this, accelerometer,\r\n\t\t\t\tSensorManager.SENSOR_DELAY_UI);\r\n\t\tsensorManager.registerListener(this, magneticField,\r\n\t\t\t\tSensorManager.SENSOR_DELAY_UI);\r\n\r\n\t\tLog.d(TAG, \"Called startSensors\");\r\n\t}",
"public void onPreviewStarted() {\n Log.w(TAG, \"KPI video preview started\");\n this.mAppController.setShutterEnabled(true);\n this.mAppController.onPreviewStarted();\n this.mUI.clearEvoPendingUI();\n if (this.mFocusManager != null) {\n this.mFocusManager.onPreviewStarted();\n }\n if (isNeedStartRecordingOnSwitching()) {\n onShutterButtonClick();\n }\n }",
"@Override\n public void init() {\n startCamera();\n }",
"public void onCameraOpened() {\n openCameraCommon();\n initializeControlByIntent();\n new Thread() {\n public void run() {\n try {\n Thread.sleep(500);\n PhotoModule.this.mIsCameraOpened = true;\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }.start();\n }",
"private void startPreview() {\n if (cameraConfigured && camera!=null) {\n camera.startPreview();\n inPreview=true;\n }\n }",
"public void startSensors() {\n // Register listeners for each sensor\n sensorManager.registerListener(sensorEventListener, accelerometer, SensorManager.SENSOR_DELAY_GAME);\n }",
"@Override\n\tpublic void start() {\n\t\t\n\t\t_mode.init();\n\t\t\n\t\t_mode.start();\n\t}",
"public void startTracking() {\n IntentFilter filter = new IntentFilter();\n\n // Screen state\n filter.addAction(Intent.ACTION_SCREEN_ON);\n filter.addAction(Intent.ACTION_SCREEN_OFF);\n\n // Dreaming state\n if (Build.VERSION.SDK_INT >= 17) {\n filter.addAction(Intent.ACTION_DREAMING_STARTED);\n filter.addAction(Intent.ACTION_DREAMING_STOPPED);\n }\n\n // Debugging/instrumentation\n filter.addAction(ACTION_TRIGGER_IDLE);\n\n mContext.registerReceiver(this, filter);\n }",
"@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\tsensorManager.registerListener(this, pSensor, SensorManager.SENSOR_DELAY_UI);\n\t\ttester.start();\n\t}",
"public void startVirtual() {\n if (mMediaProjection != null) {\n Log.i(TAG, \"want to display virtual\");\n virtualDisplay();\n } else {\n Log.i(TAG, \"start screen capture intent\");\n Log.i(TAG, \"want to build mediaprojection and display virtual\");\n setUpMediaProjection();\n virtualDisplay();\n }\n }",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tif (!isStreaming) {\n\t\t\tmVideoView.startPlayback();\n\t\t\tmPB.setVisibility(View.VISIBLE);\n\t\t}\n\t}",
"public void start() {\r\n\t\tsetupWWD();\r\n\t\tsetupStatusBar();\r\n\t\tsetupViewControllers();\r\n\t\tsetupSky();\r\n\t\t//setupAnnotationToggling();\r\n\r\n\t\t// Center the application on the screen.\r\n\t\tWWUtil.alignComponent(null, this, AVKey.CENTER);\r\n\t\t\r\n\t\tgetLayerEnableCmd().run(); // Enable/disable the desired layers.\r\n\t}",
"private static void start()\r\n\t{\r\n\t\tif(isRunning)\r\n\t\t\treturn;\r\n\t\t\r\n\t\tisRunning = true;\r\n\t\t\r\n\t\tdisplay = new Display();\r\n\t\trun();\r\n\t}",
"public boolean start() {\n if (!isExternalStorageWritable()) {\n Log.e(TAG, \"Writing to external media is not possible\");\n return false;\n }\n synchronized (lock) {\n isRunning = true;\n }\n return true;\n }",
"public void startCamera()\n {\n startCamera(null);\n }",
"@Override\n public void startCamera() {\n super.startCamera();\n\n if(cameraListener != null)\n cameraListener.onCameraStart();\n }",
"@Override\n public void onStart() {\n super.onStart();\n\n /*\n * If call is initiated then we have to reset the timer to initial time.\n * Also inform the user that Authorities have been alerted and video has benn sent.\n */\n if (isCallInitiated) {\n //reset timer to normal recording time\n timeCounter = UserPreferences.sharedInstance().recordTime() * 1000;\n\n mFiveSecondsScreen.setVisibility(View.GONE);\n enableAuthorityAlertedText();\n enableRecordVideoImages();\n } else {\n disableAuthorityAlertedText();\n }\n\n enableCenterText();\n\n if (!isCameraRecording) {\n disableAuthorityAlertedText();\n }\n\n // Keep screen on when on this view\n getActivity().getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);\n }",
"public void enterRealTimeRecognitionMode(View view) {\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }",
"@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tmVideoContrl.seekTo(mBreakPos);\r\n\t\t\t\t\t\tmVideoContrl.start();\r\n\t\t\t\t\t\tisBreakDialogDissmiss = true;\r\n\t\t\t\t\t\tisChangeNotStart = true;\r\n\r\n\t\t\t\t\t\t// start_3Dmode();\r\n\r\n\t\t\t\t\t}",
"@Override\n public void start() {\n runtime.reset();\n\n while (mrGyro.isCalibrating()) { //Ensure calibration is complete (usually 2 seconds)\n }\n\n if(LEDState){\n BallSensorreader.write8(3, 0); //Set the mode of the color sensor using LEDState\n }\n else{\n BallSensorreader.write8(3, 1); //Set the mode of the color sensor using LEDState\n }\n //Active - For measuring reflected light. Cancels out ambient light\n //Passive - For measuring ambient light, eg. the FTC Color Beacon\n }",
"public void startCameraProcessing() {\n this.checkCameraPermission();\n\n try {\n cameraManager.openCamera(cameraId, new CameraDevice.StateCallback() {\n @Override\n public void onOpened(@NonNull CameraDevice camera) {\n cameraDevice = camera;\n onCameraOpened();\n }\n\n @Override\n public void onDisconnected(@NonNull CameraDevice camera) {\n\n }\n\n @Override\n public void onError(@NonNull CameraDevice camera, int error) {\n System.out.println(\"CAMERA ERROR OCCURRED: \" + error);\n }\n\n @Override\n public void onClosed(@NonNull CameraDevice camera) {\n super.onClosed(camera);\n }\n }, null);\n }\n catch (Exception e) {\n System.out.println(\"CAMERA FAILED TO OPEN\");\n e.printStackTrace();\n }\n }",
"private void initiatePlayer() {\n ExoPlayerVideoHandler.getInstance().initiateLoaderController(\n this,\n loadingImage,\n exoPlayerView,\n ExoPlayerVideoHandler.getInstance().getVideoResolution()!=null?ExoPlayerVideoHandler.getInstance().getVideoResolution():getString(R.string.default_resolution),\n this\n );\n ExoPlayerVideoHandler.getInstance().playVideo();\n content = ExoPlayerVideoHandler.getInstance().getCurrentVideoInfo();\n //ExoPlayerVideoHandler.getInstance().goToForeground();\n setSpinnerValue();\n }",
"void startView();",
"@Override\n protected void onStart() {\n camera_ = getCameraInstance();\n Parameters params;\n\n if (camera_ != null) {\n params = camera_.getParameters();\n params.setPreviewFormat(ImageFormat.NV21);\n getSmallestPreviewSize(params);\n params.setPreviewSize(width_, height_);\n //params.setFlashMode(Parameters.FLASH_MODE_TORCH);\n params.setWhiteBalance(Parameters.WHITE_BALANCE_AUTO);\n camera_.setParameters(params);\n\n frame_ = new RGB[width_ * height_];\n for (int i = 0; i < frame_.length; ++i) {\n frame_[i] = new RGB();\n }\n\n camera_.setPreviewCallback(new PreviewCallback() {\n @Override\n public void onPreviewFrame(byte[] data, Camera camera) {\n synchronized (frame_) {\n decodeYUV420SP(frame_, data, width_, height_);\n }\n }\n });\n SurfaceTexture texture_ = new SurfaceTexture(0);\n try {\n camera_.setPreviewTexture(texture_);\n } catch (IOException e) {\n e.printStackTrace();\n }\n camera_.startPreview();\n }\n\n super.onStart();\n }",
"public void start() {\n\t\t setVisible(true);\n\t}",
"public void trigger() {\n triggered = true;\n\n // Get events from the user\n stage = new Stage(new ScreenViewport());\n show();\n }",
"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\r\n\tpublic void start() {\n\t\tthis.controller.start();\r\n\t}",
"@Override\n public void run() {\n if (newPlaying) {\n conductorPanel.sessionStarted(this.session);\n } else {\n conductorPanel.sessionStopped();\n }\n }",
"private void startListening() {\n if (mEnabledByEmulator && mEnabledByUser) {\n if (DEBUG) Log.d(TAG, \"+++ Sensor \" + getEmulatorFriendlyName() + \" is started.\");\n mSenMan.registerListener(mListener, mSensor, SensorManager.SENSOR_DELAY_FASTEST);\n }\n }",
"@Override\n public void start() {\n smDrive.start();\n smArm.start();\n }",
"@Override\n\t\tpublic void run() {\n\t\t\tif(mCameraDevices != null && mParameters!=null){\n\t\t\t\tmParameters.setFlashMode(Parameters.FLASH_MODE_TORCH);\n\t\t\t\tmCameraDevices.setParameters(mParameters); \n\t\t\t\tison = true;\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tLog.d(TAG,\"mParameters is null\");\n\t\t\t\tison = true;\n\t\t\t}\n\t\t\tmCallback.onLightStateChange(ison);\n\t\t}",
"@Override\n protected void onResume() {\n super.onResume();\n cameraView.start();\n }",
"@Override\n public void run() {\n vPauseImageViewEntertainingFactActivity.setVisibility(View.INVISIBLE);\n vPlayImageViewEntertainingFactActivity.setVisibility(View.VISIBLE);\n mediaPlayer.start();\n }",
"public void onStart() {\n super.onStart();\n ApplicationStateMonitor.getInstance().activityStarted();\n }",
"@Override protected void startup() {\n show(new FFTView(this));\n }",
"public void Start() \r\n {\r\n // Set the canvas as the current phone's screen\r\n mDisplay.setCurrent(this);\r\n\r\n // we call our own initialize function to setup all game objects\r\n GameInitialize();\r\n\r\n // Here we setup the thread and start it\r\n Thread thread = new Thread(this);\r\n thread.start();\r\n }",
"@Override\n\tpublic void robotInit() //starts once when the code is started\n\t{\n\t\tm_oi = new OI(); //further definition of OI\n\t\t\n\t\t// chooser.addObject(\"My Auto\", new MyAutoCommand());\n\t\t//SmartDashboard.putData(\"Auto mode\", m_chooser);\n\t\t\n\t\tnew Thread(() -> {\n\t\t\tUsbCamera camera1 = CameraServer.getInstance().startAutomaticCapture();\n\t\t\tcamera1.setResolution(640, 480);\n\t\t\tcamera1.setFPS(30);\n\t\t\tcamera1.setExposureAuto();\n\t\t\t\n\t\t\tCvSink cvSink = CameraServer.getInstance().getVideo();\n\t\t\tCvSource outputStream = CameraServer.getInstance().putVideo(\"Camera1\", 640, 480); \n\t\t\t//set up a new camera with this name in SmartDashboard (Veiw->Add->CameraServer Stream Viewer)\n\t\t\t\n\t\t\tMat source = new Mat();\n\t\t\tMat output = new Mat();\n\t\t\t\n\t\t\twhile(!Thread.interrupted())\n\t\t\t{\n\t\t\t\tcvSink.grabFrame(source);\n\t\t\t\tImgproc.cvtColor(source, output, Imgproc.COLOR_BGR2RGB);//this will show the video in black and white \n\t\t\t\toutputStream.putFrame(output);\n\t\t\t}\t\t\t\t\t\n\t\t}).start();//definition of camera, runs even when disabled\n\t\t\n\t\tdriveStick = new Joystick(0); //further definition of joystick\n\t\tgyroRotate.gyroInit(); //initializing the gyro - in Rotate_Subsystem\n\t\tultrasonic = new Ultrasonic_Sensor(); //further definition of ultrasonic\n\t\tRobotMap.encoderLeft.reset();\n\t\tRobotMap.encoderRight.reset();\n\t\tdriveToDistance.controllerInit();\n\t}",
"public void StartVECapture() {\n Log.v(TAG, \"StartVECapture\");\n\n startVECapture();\n enableUpdateDynamicTex(true);\n\n }",
"private void startThread()\n {\n if (workerThread == null || !workerThread.isLooping())\n {\n workerThread = new LiveViewThread(this);\n workerThread.start();\n }\n }",
"@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t\tisModeSwitch=false;\r\n\t\tif (!TheApp.mApp.clientForeign()) {\r\n\t\t\tUpgradeManager.getInstance().BackStageNetWordCheck();\r\n\t\t}\r\n\t\tif (TheApp.mApp.windowManageView!=null) {\r\n\t\t\tLogCatUtils.showString(\"==removeView=====\");\r\n\t\t\tTheApp.mApp.windowManageView.removeView();\r\n\t\t}\r\n\t\tif (mCManager!=null) {\r\n\t\t\tmCManager.registerCallback(callbackImpl);\r\n\t\t}\r\n\t\tProgressDialog.getInstance().progressShow(R.string.camera_loading);\r\n\t\tProgressDialog.getInstance().enableCanceledOnTouchOutside(true);\r\n\t\tpreviewOverTimeRunTask();\r\n\t\tBundle outparam=new Bundle();\r\n\t\tSyuJniNative.getInstance().syu_jni_command(12, null, outparam);\r\n\t\tif (outparam!=null) {\r\n\t\t\tif (outparam.getInt(\"param0\",-1)==1) {\r\n\t\t\t\tDialog dialog=PublicClass.getInstance().NoCameraWarning(1);\r\n\t\t\t\tdialog.show();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tisonStop=false;\r\n\t\thandler.sendEmptyMessage(0);\r\n\t\thandler.sendEmptyMessageDelayed(3, 500);\r\n\t\tLogCatUtils.showString(\" onStart \" );\r\n\t}",
"@Override\n\tpublic void start() {\n\t\tif(Boolean.parseBoolean(this.configuration.get(ConfigurationEnum.KEYBOARD_LISTENER_ACTIVE.toString()))){\n\t\t\tthis.keyboardListener.registerNativeHook();\n\t\t\tthis.keyboardListenerIsActive = true;\n\t\t}\n\t\t//If the mouse listener is active by configuration\n\t\tif(Boolean.parseBoolean(this.configuration.get(ConfigurationEnum.MOUSE_LISTENER_ACTIVE.toString()))){\n\t\t\tthis.mouseListener.registerNativeHook();\n\t\t\tthis.mouseListenerIsActive = true;\n\t\t}\n\t\t//If the mouse motion listener is active by configuration\n\t\tif(Boolean.parseBoolean(this.configuration.get(ConfigurationEnum.MOUSE_LISTENER_ACTIVE.toString()))){\n\t\t\tthis.mouseMotionListener.registerNativeHook();\n\t\t\tthis.mouseMotionListenerIsActive = true;\n\t\t}\n\t\t//If the mouse wheel listener is active by configuration\n\t\tif(Boolean.parseBoolean(this.configuration.get(ConfigurationEnum.MOUSE_WHEEL_LISTENER_ACTIVE.toString()))){\n\t\t\tthis.mouseWheelListener.registerNativeHook();\n\t\t\tthis.mouseWheelListenerIsActive = true;\n\t\t}\n\t}",
"public void onVideoStarted () {}",
"private void startPlayback() {\n // start player service using intent\n Intent intent = new Intent(mActivity, PlayerService.class);\n intent.setAction(ACTION_PLAY);\n intent.putExtra(EXTRA_STATION, mThisStation);\n mActivity.startService(intent);\n LogHelper.v(LOG_TAG, \"Starting player service.\");\n }",
"@FXML\r\n protected void startCamera(Event event)\r\n {\n if (this.rootElement != null)\r\n {\r\n // get the ImageView object for showing the video stream\r\n final ImageView frameView = currentFrame;\r\n final BorderPane root = (BorderPane) this.rootElement;\r\n // check if the capture stream is opened\r\n if (!this.capture.isOpened())\r\n {\r\n \t\tSystem.out.println(\"Starting Camera ...\");\r\n // start the video capture\r\n this.capture.open(0);\r\n // grab a frame every 33 ms (30 frames/sec)\r\n TimerTask frameGrabber = new TimerTask() {\r\n @Override\r\n public void run()\r\n {\r\n javafx.scene.image.Image tmp = grabFrame();\r\n Platform.runLater(new Runnable() {\r\n @Override\r\n public void run() {\r\n frameView.setImage(tmp);\r\n }\r\n });\r\n\r\n }\r\n };\r\n this.timer = new Timer();\r\n //set the timer scheduling, this allow you to perform frameGrabber every 33ms;\r\n this.timer.schedule(frameGrabber, 0, 33);\r\n this.start_btn.setText(\"Stop Camera\");\r\n }\r\n else\r\n {\r\n this.start_btn.setText(\"Start Camera\");\r\n // stop the timer\r\n if (this.timer != null)\r\n {\r\n this.timer.cancel();\r\n this.timer = null;\r\n }\r\n // release the camera\r\n this.capture.release();\r\n // clear the image container\r\n frameView.setImage(null);\r\n }\r\n }\r\n }",
"public void start() {\n\t\tSystem.out.println(\"Starting new application\");\n\t\texec.init(this);\n\t\tthread = new Thread(this);\n\t\trunning = true;\n\t\tgd.setFullScreenWindow(screen.getFrame());\n\t\tscreen.getFrame().setVisible(true);\n\t\tthread.start();\n\t}",
"@Override\n\tpublic void videoStart() {\n\t\t\n\t}",
"@Override public void run()\n {\n pauseStreaming();\n\n // Switch the current camera\n camera = newCamera;\n\n // Resume streaming on the new camera if there is one\n if (camera != null)\n {\n resumeStreaming();\n }\n }",
"public void start() {\n\t\tthis.controller.run();\n\t}",
"@Override\r\n\tpublic void run() {\n\t\tshowViewer();\r\n\t}",
"@Override\n public void run() {\n ActionBar actionBar = getSupportActionBar();\n if (actionBar != null) {\n actionBar.show();\n }\n mControlsView.setVisibility(View.VISIBLE);\n }",
"@Override\n public void run() {\n ActionBar actionBar = getSupportActionBar();\n if (actionBar != null) {\n actionBar.show();\n }\n mControlsView.setVisibility(View.VISIBLE);\n }",
"@Override\n public void run() {\n ActionBar actionBar = getSupportActionBar();\n if (actionBar != null) {\n actionBar.show();\n }\n mControlsView.setVisibility(View.VISIBLE);\n }",
"@Override\n public void run() {\n ActionBar actionBar = getSupportActionBar();\n if (actionBar != null) {\n actionBar.show();\n }\n mControlsView.setVisibility(View.VISIBLE);\n }",
"@Override\n public void run() {\n ActionBar actionBar = getSupportActionBar();\n if (actionBar != null) {\n actionBar.show();\n }\n mControlsView.setVisibility(View.VISIBLE);\n }",
"@Override\n public void run() {\n ActionBar actionBar = getSupportActionBar();\n if (actionBar != null) {\n actionBar.show();\n }\n mControlsView.setVisibility(View.VISIBLE);\n }",
"@Override\n public void run() {\n ActionBar actionBar = getSupportActionBar();\n if (actionBar != null) {\n actionBar.show();\n }\n mControlsView.setVisibility(View.VISIBLE);\n }",
"public void playerStarted () {\n this.setState(STATE.MEDIA_RUNNING);\n\n // Send status notification to JavaScript\n sendStatusChange(MEDIA_DURATION, null, null);\n }",
"private synchronized void start()\n\t{\n\t\tregisterReceiver(\n\t\t\t\tmConnectivityReceiver,\n\t\t\t\tnew IntentFilter( ConnectivityManager.CONNECTIVITY_ACTION )\n\t\t);\n\n\t\ttry\n\t\t{\n\t\t\t// Show notification in status bar\n\t\t\tshowNotification();\n\t\t} catch ( Exception e ) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"@Override\n public boolean active() {\n General.sleep(100); // Sleep to reduce CPU usage.\n return fishing_spots[0].isOnScreen();\n }",
"public void start(){\n\t\tif (host.getGameSettings().isMusicOn()) {\r\n\t\t\tspr_btnMute.setFrame(0);\r\n\t\t}else{\r\n\t\t\tspr_btnMute.setFrame(1);\r\n\t\t}\r\n\t}",
"public void onPrepared(MediaPlayer mp) {\n\n videoViewFull.start();\n }",
"public void startPreview() {\r\n\t\tCamera localCamera = camera;\r\n\t\tif (localCamera != null && !isPreview) {\r\n\t\t\tcamera.startPreview();\r\n\t\t\tisPreview = true;\r\n\t\t}\r\n\t}",
"@Override\n\t\tpublic void run() {\n\t\t\tif(mCameraDevices != null && mParameters!=null){\n\t\t\t\tmParameters.setFlashMode(Parameters.FLASH_MODE_OFF);\n\t\t\t\tmCameraDevices.setParameters(mParameters);\n\t\t\t\tison = false;\n\t\t\t}else{\n\t\t\t\tLog.d(TAG,\"mParameters is null\");\n\t\t\t\tison = true;\n\t\t\t}\n\t\t\tmCallback.onLightStateChange(ison);\n\t\t}",
"public synchronized void start()\n {\n pluginMonitor.start();\n }",
"public void onStartRunning();",
"public void run() {\n\t\tthis.viewFrame.setVisible(true);\n\t}",
"@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\n\t\tnearby_baidumap.setMyLocationEnabled(true); // 开启图层定位\n\t\tif (!N_locationclient.isStarted()) {\n\t\t\tN_locationclient.start();// 开始定位\n\t\t}\n\t\t// 开启方向传感器\n\t\tmyOrientationListener.start();\n\t}",
"@Override\n public void onVideoStarted() {\n }",
"protected void onResume() {\n super.onResume();\n sensorManager.registerListener(this, accelerometer, SensorManager.SENSOR_DELAY_NORMAL);\n start = false;\n }",
"void onStarted();",
"@Override\r\n\tpublic void start() {\n\t\tmediaPlayer.start();\r\n\t}",
"public synchronized void start() {\n\t\tstartSuspended();\r\n\t\tsetRunnable(true);\r\n\t}",
"@Override\r\n\tprotected void onStart() {\n\t\tLog.d(TAG, \"1 onStart start\");\r\n\t\tsuper.onStart();\r\n\t\tif(isDMR){\r\n\t\t\tbindTVnSreenService();\r\n\t\t}\r\n\t\t// mMediaHanler.sendEmptyMessage(START_PLAY);\r\n\t\tLog.d(TAG, \"2 onStart end\");\r\n\r\n\t}",
"private void startCapture() {\n if (checkAudioPermissions()) {\n requestScreenCapture();\n }\n }",
"public void startScene()\r\n\t{\r\n\t\tthis.start();\r\n\t}"
]
| [
"0.674932",
"0.67394465",
"0.6604759",
"0.6551549",
"0.65222",
"0.6431564",
"0.63865626",
"0.6371284",
"0.63540035",
"0.6335745",
"0.63304776",
"0.62769043",
"0.6217647",
"0.61829865",
"0.6179318",
"0.6177395",
"0.6159558",
"0.6133998",
"0.61330664",
"0.6131398",
"0.61207014",
"0.61135805",
"0.6109601",
"0.60876644",
"0.6086877",
"0.6085307",
"0.6077426",
"0.60771155",
"0.6073628",
"0.60385835",
"0.603489",
"0.60325015",
"0.5993381",
"0.5975822",
"0.5964689",
"0.59343565",
"0.5925911",
"0.5896211",
"0.589494",
"0.58861935",
"0.5885023",
"0.58797365",
"0.5867894",
"0.58534414",
"0.5850551",
"0.58459216",
"0.583348",
"0.5826155",
"0.5825833",
"0.58258116",
"0.58239394",
"0.58174336",
"0.57818663",
"0.5780976",
"0.5777095",
"0.57740897",
"0.57681894",
"0.57624614",
"0.5759523",
"0.5752599",
"0.57517314",
"0.5751715",
"0.57493734",
"0.57389",
"0.57252353",
"0.5723966",
"0.5716702",
"0.57076323",
"0.5703848",
"0.5697851",
"0.5691602",
"0.5684501",
"0.56738776",
"0.5666864",
"0.5666799",
"0.56562006",
"0.56562006",
"0.56562006",
"0.56562006",
"0.56562006",
"0.56562006",
"0.56562006",
"0.5642318",
"0.5641682",
"0.5635435",
"0.5628247",
"0.5626273",
"0.5622762",
"0.5618873",
"0.5615628",
"0.56075716",
"0.5606781",
"0.5595016",
"0.5592892",
"0.5592328",
"0.5582459",
"0.5582023",
"0.55728996",
"0.55720115",
"0.5568294",
"0.5565165"
]
| 0.0 | -1 |
Stops the sensors & video when the View is inactive to avoid wasting battery. | @Override
public void onPause() {
mediaLoader.pause();
sensorManager.unregisterListener(phoneOrientationListener);
super.onPause();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tprotected void onStop() {\n\t\tif(videoviewer != null)\n\t\t\tvideoviewer.stopPlayback();\n\t\tif (timer != null) {\n\t\t\ttimer.cancel();\n\t\t}\n\t\tsuper.onStop();\n\t}",
"@Override\n\tpublic void stop() {\n\t\tif (view != null)\n\t\t\tview.stop();\n\t}",
"@Override\n\tpublic void onStop() {\n\t\tmOrionVideoView.onStop();\n\n\t\tsuper.onStop();\n\t}",
"@Override\n\tpublic void onStop() {\n\t\tmOrionVideoView.onStop();\n\n\t\tsuper.onStop();\n\t}",
"@Override\n\tpublic void onStop() {\n\t\tmOrionVideoView.onStop();\n\n\t\tsuper.onStop();\n\t}",
"public void onStop() {\n super.onStop();\n this.mZxingview.stopCamera();\n }",
"@Override\n\tprotected void onStop() {\n\t\tsuper.onStop();\n\t\tif(video != null)\n\t\t\tvideo.suspend();\n\t}",
"public void stopTimer() {\n if (animationTimer != null) {\n animationTimer.stop();\n }\n try {\n TimeUnit.SECONDS.sleep(1);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n if (roomController.isConfigured()) {\n roomController.closeController();\n }\n timeLogController.closeController();\n videoController.closeController();\n }",
"@Override public void stop() {\n\t\t_active = false;\n\t}",
"public void stopTracking()\n {\n pixyThread.interrupt();\n leds.setMode(LEDController.Mode.OFF);\n }",
"public void deactivate() {\n\t\tcameraNXT.enableTracking(false);\n\t}",
"@Override\n protected void onStop() {\n super.onStop();\n sensorManager.unregisterListener(this);\n }",
"public void stop() {\n\t\tResources.getmScene().unregisterUpdateHandler(time);\n\t\trunning = false;\n\t}",
"public void deactivate() {\n log.info(\"Stopped\");\n }",
"@JavascriptInterface\n public void STOP() {\n sensorManager.unregisterListener(this);\n }",
"public void stop() {\n if (haveSensor && haveSensor2){ // acc & mag sensors used\n mSensorManager.unregisterListener(this, mAccelerometer);\n mSensorManager.unregisterListener(this, mMagnetometer);\n } else if (haveSensor){ // only rotation used\n mSensorManager.unregisterListener(this, mRotationV);\n }\n }",
"@Override\n\tpublic void stop() {\n\t\tsetAccelerate(false);\n\t}",
"public void onStop() {\n super.onStop();\n ApplicationStateMonitor.getInstance().activityStopped();\n }",
"public void stop() {\n m_enabled = false;\n }",
"public void stopVibration() {\n this.mVibrator.cancel();\n LtUtil.log_i(\"GripSensorTestTouchIc\", \"stopVibration\", \"Vibration stop\");\n }",
"public void stopSensors() {\r\n\t\tsensorManager.unregisterListener(this);\r\n\r\n\t\tLog.d(TAG, \"Called stopSensors\");\r\n\t}",
"private void stopAcquisition() {\r\n if (this.timer != null && !this.timer.isShutdown()) {\r\n try {\r\n // stop the timer\r\n this.timer.shutdown();\r\n this.timer.awaitTermination(33, TimeUnit.MILLISECONDS);\r\n } catch (InterruptedException e) {\r\n // log any exception\r\n System.err.println(\"Exception in stopping the frame capture, trying to close the video now... \" + e);\r\n }\r\n }\r\n\r\n if (this.capture.isOpened()) {\r\n // release the camera\r\n this.capture.release();\r\n }\r\n }",
"@Invalidate\n\tpublic synchronized void stop() {\n\t\tSystem.out.println(\"Component is stopping...\");\n\t\tfor (PresenceSensor sensor : presenceSensors) {\n\t\t\tsensor.removeListener(this);\n\t\t}\n\t\tfor (BinaryLight binaryLight : binaryLights) {\n\t\t\tbinaryLight.removeListener(this);\n\t\t}\n\t}",
"public void stopTimer() {\n maxAccelOutput.setText(String.valueOf(maxAccel));\n timeHandler.removeCallbacks(startTimer);\n startButton.setText(R.string.go_button);\n isRunning = false;\n }",
"@Override\n public void stop() {\n\n leftDrive.setPower(0);\n rightDrive.setPower(0);\n armMotor.setPower(0);\n // extendingArm.setPower(0);\n\n telemetry.addData(\"Status\", \"Terminated Interative TeleOp Mode\");\n telemetry.update();\n\n\n }",
"public void onStop() {\n this.mIsShowing.set(false);\n RefreshTask refreshTask = this.mRefreshTask;\n if (refreshTask != null) {\n refreshTask.cancel(true);\n this.mRefreshTask = null;\n }\n NetworkDiagnosticsActivity.super.onStop();\n }",
"@Override\n\tprotected void onStop() {\n\t\tsuper.onStop();\n\t\tsensorManager.unregisterListener(this);\n\t\tif ( null != track ) {\n\t\t\ttrack.stop();\n\t\t\ttrack.release();\n\t\t}\n\t\tthis.finish();\n\t}",
"@Override\n public void stop() {\n detector.disable();\n }",
"@Override\n protected void onStop() {\n super.onStop();\n sensormanager.unregisterListener(sensorEventListener);\n }",
"public void stopMedia() {\n\t\tif (videoviewer.getCurrentPosition() != 0) {\n\t\t\t\n\t\t\tplaytogglebutton.setChecked(true);\n\t\t\t\n\t\t\tvideoviewer.pause();\n\t\t\tvideoviewer.seekTo(0);\n\t\t\ttimer.cancel();\n\n\t\t\ttimeElapsed.setText(countTime(videoviewer.getCurrentPosition()));\n\t\t\tprogressBar.setProgress(0);\n\t\t}\n\t}",
"public void stop() {\n\n\t\tif (!started.compareAndSet(true, false)) {\n\t\t\treturn;\n\t\t}\n\n\t\tLOG.debug(\"Stopping panel rendering and closing attached webcam\");\n\n\t\tupdater.stop();\n\t\tupdater = null;\n\n\t\timage = null;\n\n\t\ttry {\n\t\t\terrored = !webcam.close();\n\t\t} catch (WebcamException e) {\n\n\t\t\terrored = true;\n\n\t\t\tDisplay.getDefault().syncExec(new Runnable() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tredraw();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthrow e;\n\t\t}\n\t}",
"@Override // com.master.cameralibrary.CameraViewImpl\n public void stop() {\n Camera camera = this.mCamera;\n if (camera != null) {\n camera.stopPreview();\n }\n this.mShowingPreview = false;\n releaseCamera();\n }",
"@Override\n public void deactivate() {\n mListener = null;\n if (mLocationClient != null) {\n mLocationClient.stopLocation();\n mLocationClient.onDestroy();\n }\n mLocationClient = null;\n mLocationOption = null;\n }",
"private void stop() {\n\t\t/*\n if (this.status != PedoListener.STOPPED) {\n this.sensorManager.unregisterListener(this);\n }\n this.setStatus(PedoListener.STOPPED);\n\t\t*/\t\t\t\t\n\t\t\t\n\t\tif (status != PedoListener.STOPPED) {\n\t\t uninitSensor();\n\t\t}\n\n\t\tDatabase db = Database.getInstance(getActivity());\n\t\tdb.setConfig(\"status_service\", \"stop\");\n\t\t//db.clear(); // delete all datas on table\n\t\tdb.close();\t\t\n\n\t\tgetActivity().stopService(new Intent(getActivity(), StepsService.class));\n\t\tstatus = PedoListener.STOPPED;\n\n\t\tcallbackContext.success();\n }",
"public void deactivate () {\n\t\tif (_timer!=null) {\n\t\t\t_timer.cancel ();\n\t\t\t_timer.purge ();\n\t\t\t_timer = null;\n\t\t}\n\t}",
"public void onStop() {\n connectivityMonitor.unregister();\n requestTracker.pauseRequests();\n }",
"@Override\n public void stop() {\n smDrive.stop();\n smArm.stop();\n }",
"@Override\r\n\tpublic void stop() {\n\t\tthis.controller.stop();\r\n\t}",
"@Override\n public void onStop() {\n Object object = this.mw;\n synchronized (object) {\n if (this.tV != null) {\n this.tV.cancel(true);\n }\n return;\n }\n }",
"public void stop() {\n\t\tthread.requestStop = true;\n\t\tlong start = System.currentTimeMillis()+timeout;\n\t\twhile( start > System.currentTimeMillis() && thread.running )\n\t\t\tThread.yield();\n\n\t\tdevice.stopDepth();\n\t\tdevice.stopVideo();\n\t\tdevice.close();\n\t}",
"@Override\n\tpublic void stop(){\n\t\tif(this.keyboardListenerIsActive){\n\t\t\tthis.keyboardListener.unregisterNativeHook();\n\t\t\tthis.keyboardListenerIsActive = false;\n\t\t}\n\t\t//If the mouse listener is active\n\t\tif(this.mouseListenerIsActive){\n\t\t\tthis.mouseListener.unregisterNativeHook();\n\t\t\tthis.mouseListenerIsActive = false;\n\t\t}\n\t\t//If the mouse motion listener is active\n\t\tif(this.mouseMotionListenerIsActive){\n\t\t\tthis.mouseMotionListener.unregisterNativeHook();\n\t\t\tthis.mouseMotionListenerIsActive = false;\n\t\t}\n\t\t//If the mouse wheel listener is active\n\t\tif(this.mouseWheelListenerIsActive){\n\t\t\tthis.mouseWheelListener.unregisterNativeHook();\n\t\t\tthis.mouseWheelListenerIsActive = false;\n\t\t}\n\t}",
"public void stopStreaming() {\n phoneCam.stopStreaming();\n }",
"public void StopListening()\n\t{\n\t\tif (true == mbHasAccelerometer && true == mbListening)\n\t\t{\n\t\t\tmbListening = false;\n\t\t\t\n\t\t\tfinal AccelerometerNativeInterface accelerometerNI = this;\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\tSensorManager sensorManager = (SensorManager)CSApplication.get().getActivityContext().getSystemService(Activity.SENSOR_SERVICE);\n\t\t\t\t\tsensorManager.unregisterListener(accelerometerNI);\n\t\t\t\t}\n\t\t\t};\n\t\t\tCSApplication.get().scheduleUIThreadTask(task);\n\t\t}\n\t}",
"public void stop ()\n\t{\n\t\tif (core.hasLock (frame))\n\t\t{\n\t\t\tif (model != null) model.stop();\n\t\t\tstop = true;\n\t\t}\n\t}",
"public void onStop();",
"public void stop() {\n mediaController.getTransportControls().stop();\n }",
"public void stop(){\n if (this.isActive()) {\n this.setEndTime(Calendar.getInstance());\n this.setTotalSeconds();\n this.setActive(false);\n }\n \n }",
"@Override\n public void stop() {\n\n if (mapView != null) {\n mapView.dispose();\n }\n }",
"private void stopAcquisition() {\n if (this.timer != null && !this.timer.isShutdown()) {\n try {\n // stop the timer\n this.timer.shutdown();\n this.timer.awaitTermination(33, TimeUnit.MILLISECONDS);\n } catch (InterruptedException e) {\n // log any exception\n System.err.println(\"Exception in stopping the frame capture, trying to release the camera now... \" + e);\n }\n }\n\n if (this.capture.isOpened()) {\n // release the camera\n this.capture.release();\n }\n }",
"@Override\n\tprotected void onStop() {\n\t\tsuper.onStop();\n\t\tuiHelper.onStop(); \n\t}",
"public void stopListening()\n {\n if (listening) {\n sensorManager.cancelTriggerSensor(listener, motion);\n listening = false;\n }\n }",
"@Override\n public void stop()\n {\n final String funcName = \"stop\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n if (playing)\n {\n analogOut.setAnalogOutputMode((byte) 0);\n analogOut.setAnalogOutputFrequency(0);\n analogOut.setAnalogOutputVoltage(0);\n playing = false;\n expiredTime = 0.0;\n setTaskEnabled(false);\n }\n }",
"public void stop() {\n\tanimator = null;\n\toffImage = null;\n\toffGraphics = null;\n }",
"@Override\n public void stop() {\n leftFrontDrive.setPower(0.0);\n rightFrontDrive.setPower(0.0);\n leftRearDrive.setPower(0.0);\n rightRearDrive.setPower(0.0);\n\n // Disable Tracking when we are done;\n targetsUltimateGoal.deactivate();\n\n //closes object detection to save system resouces\n if (tfod != null) {\n tfod.shutdown();\n }\n }",
"public void stop() {\r\n\t\tisRecording = false;\r\n\t}",
"public void stop() {\n aVideoAnalyzer.stop();\n }",
"@Override\n public void stop() {\n GameManager.getInstance().stopTimer();\n }",
"public void stop() {\n\t\tthis.controller.terminate();\n\t}",
"public void onPause() {\n sensorManager.unregisterListener(this);\n }",
"public void onCustomViewHidden() {\n mTimer.cancel();\n mTimer = null;\n if (mVideoView.isPlaying()) {\n mVideoView.stopPlayback();\n }\n if (isVideoSelfEnded)\n mCurrentProxy.dispatchOnEnded();\n else\n mCurrentProxy.dispatchOnPaused();\n\n // Re enable plugin views.\n mCurrentProxy.getWebView().getViewManager().showAll();\n\n isVideoSelfEnded = false;\n mCurrentProxy = null;\n mLayout.removeView(mVideoView);\n mVideoView = null;\n if (mProgressView != null) {\n mLayout.removeView(mProgressView);\n mProgressView = null;\n }\n mLayout = null;\n }",
"@Override\r\n\tprotected void onStop() {\n\t\tXSDK.getInstance().onStop();\r\n\t\tsuper.onStop();\r\n\t}",
"public void stop() {\n try {\n mIsIdle = true;\n mIsLooping = false;\n if (mCurPlayer != null) \n {\n mCurPlayer.stop(); \n Thread.sleep(100);\n// mCurPlayer.setMediaTime(0);\n mIsPlaying = false;\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void stop(){\n if (mCamera != null){\n mCamera.stopPreview();\n mCamera.setPreviewCallback(null);\n mCamera.release();\n mCamera = null;\n }\n if (mHolder != null) {\n mHolder.getSurface().release();\n mHolder = null;\n }\n }",
"public void stopVideo() {\n try {\n texture.getSurfaceTexture().release();\n nodeMediaPlayer.reset();\n nodeMediaPlayer.prepare();\n nodeMediaPlayer.stop();\n nodeMediaPlayer.release();\n nodeMediaPlayer = null;\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void onStop() {\n }",
"public void stop() {\n enemyTimeline.stop();\n }",
"public void stopClick (View view){\n \tmHandler.removeCallbacks(startTimer);\n \tstopped = true;\n \thideStopButton();\n }",
"private void stopStopHolder() {\n Log.d(TAG, \"Stop the stop holder!\");\n try {\n if (mStopHandler != null) {\n mStopHandler.removeCallbacksAndMessages(null);\n }\n } catch (NullPointerException e) {\n CordovaPluginLog.e(TAG, \"Error: \", e);\n }\n }",
"private void stop() {\n if (lifecycle != null) {\n lifecycle.removeObserver(this);\n return;\n }\n activity.getApplication().unregisterActivityLifecycleCallbacks(this);\n }",
"@Override\n public void stop() {\n if(detector != null) detector.disable(); //Make sure to run this on stop!\n }",
"public void stop() {\n enable = false;\n }",
"@Override\n protected void onStop() {\n status = 0;\n super.onStop();\n }",
"@Override\n public void onStop() {\n if(toggleButton.isChecked()) {\n toggleButton.setChecked(false);\n mediaRecorder.stop();\n mediaRecorder.reset();\n Log.v(TAG, \"Recording Stopped\");\n }\n\n mediaProjection = null;\n stopScreenSharing();\n }",
"public void stop() { \r\n\t if (remoteControlClient != null) {\r\n\t remoteControlClient\r\n\t .setPlaybackState(RemoteControlClient.PLAYSTATE_STOPPED);\r\n\t } \r\n\t }",
"public void stop() {\n pause();\n if (isInPreviewMode) {\n isInPreviewMode = false;\n }\n seekTo(0, new OnCompletionListener() {\n @Override\n public void onComplete() {\n //no-op\n }\n });\n }",
"private void stopVideoPlayer() {\r\n\t\tmediaSrc.stopStream();\r\n\t\tmediaSrc.setObserver(null);\r\n\t\tplayer.setVisible(false);\r\n\t}",
"public void stopPreview() {\n\t\tif (autoFocusManager != null) {\n\t\t\tautoFocusManager.stop();\n\t\t\tautoFocusManager = null;\n\t\t}\n\t\tif (camera != null && previewing) {\n//\t\t\tLog.d(TAG, \"stopPreview\");\n\t\t\tcamera.stopPreview();\n//\t\t\tpreviewCallback.setHandler(null, 0);\n\t\t\tpreviewing = false;\n\t\t}\n\t\t\n\t}",
"protected void onStop() {\n\t\tsuper.onStop();\r\n\t}",
"protected void onStop() {\n\t\tsuper.onStop();\r\n\t}",
"private void stop_meter() {\n\t\t\t mEngin.stop_engine();\n\t\t\t\n\t\t}",
"protected void onPause() {\n super.onPause();\n sensorManager.unregisterListener(this);\n start = false;\n }",
"public void onStop() {\n super.onStop();\n finish();\n }",
"@Override\n protected void onPause() {\n closeCamera();\n\n stopBackgroundThread();\n super.onPause();\n }",
"public native final void stopPreview();",
"@Override\n public void stop() {\n animatorThread = null;\n\n //Get rid of the objects necessary for double buffering.\n offGraphics = null;\n offImage = null;\n }",
"public synchronized void stop()\r\n/* 78: */ {\r\n/* 79:203 */ if (!this.monitorActive) {\r\n/* 80:204 */ return;\r\n/* 81: */ }\r\n/* 82:206 */ this.monitorActive = false;\r\n/* 83:207 */ resetAccounting(milliSecondFromNano());\r\n/* 84:208 */ if (this.trafficShapingHandler != null) {\r\n/* 85:209 */ this.trafficShapingHandler.doAccounting(this);\r\n/* 86: */ }\r\n/* 87:211 */ if (this.scheduledFuture != null) {\r\n/* 88:212 */ this.scheduledFuture.cancel(true);\r\n/* 89: */ }\r\n/* 90: */ }",
"public void stop() {\n\t\tthis.timer.cancel();\n\t}",
"public void stop(View v) {\n stopPlayer();\n }",
"@Override\r\n public void onStop() {\r\n super.onStop();\r\n\r\n\r\n }",
"public void onStop() {\n\t }",
"public void\nstopTimer() {\n\t\n\tSystemDesign.logInfo(\"MetroParams.stopTimer: Killing annealing timer.\");\n\t\n\tif (metroTimer_ != null) {\n metroTimer_.stopPlease();\n\t metroTimer_ = null;\n }\n\tmetroThread_ = null;\n}",
"public void deactivate(){\n state = State.invisible;\n active = false;\n }",
"protected void stop() {\r\n\t\tif (active) {\r\n\t\t\tsource.stop();\r\n\t\t}\r\n\t}",
"@Override\r\n\t\tpublic void surfaceDestroyed(SurfaceHolder arg0) {\n\t\t\tIsRunning = false;\r\n\t\t}",
"@Override\r\n protected void onStop() {\n super.onStop();\r\n }",
"@Override\n protected void onPause() {\n super.onPause();\n sensorManager.unregisterListener(this);\n }",
"@Override\n protected void onPause() {\n super.onPause();\n sensorManager.unregisterListener(this);\n }",
"@Override\n public void onStop() {\n super.onStop();\n }",
"@Override\n public void onStop() {\n super.onStop();\n }",
"public synchronized void stop() {\n this.running = false;\n }",
"public void stopAlarm(View view) {\n timer.cancel();\n ringring.stop();\n vibri.cancel();\n finish();\n }"
]
| [
"0.74072564",
"0.7114252",
"0.7087108",
"0.7087108",
"0.7087108",
"0.7086539",
"0.6957548",
"0.6956862",
"0.6946816",
"0.6923668",
"0.6906872",
"0.68875664",
"0.68680835",
"0.6838512",
"0.67869043",
"0.6759367",
"0.67556876",
"0.67451304",
"0.6731229",
"0.6731158",
"0.6719857",
"0.6716956",
"0.67054653",
"0.6702546",
"0.66959184",
"0.666997",
"0.6663654",
"0.6619793",
"0.66162896",
"0.66061294",
"0.6585531",
"0.65725857",
"0.6572451",
"0.6532353",
"0.65265566",
"0.6523758",
"0.6514322",
"0.64979553",
"0.6497096",
"0.64960116",
"0.6495647",
"0.64937335",
"0.64909",
"0.6487119",
"0.646858",
"0.64537174",
"0.6452687",
"0.64516294",
"0.64441425",
"0.64262503",
"0.64170825",
"0.6413474",
"0.6403308",
"0.64018893",
"0.6385265",
"0.63850415",
"0.637921",
"0.6375027",
"0.6364786",
"0.63609695",
"0.6358734",
"0.6358006",
"0.63557696",
"0.6351611",
"0.63484406",
"0.63483363",
"0.6345928",
"0.63341385",
"0.63240206",
"0.6322771",
"0.6322371",
"0.63207906",
"0.63155",
"0.63142246",
"0.63052744",
"0.6304371",
"0.630118",
"0.62934244",
"0.62934244",
"0.6293202",
"0.62863356",
"0.6283932",
"0.628347",
"0.628298",
"0.62803596",
"0.62782615",
"0.62713593",
"0.62697953",
"0.62670046",
"0.62637794",
"0.6260243",
"0.625624",
"0.625323",
"0.6252513",
"0.62482864",
"0.6246779",
"0.6246779",
"0.62392217",
"0.62392217",
"0.62377286",
"0.62363786"
]
| 0.0 | -1 |
Destroys the underlying resources. If this is not called, the MediaLoader may leak. | public void destroy() {
uiView.setMediaPlayer(null);
mediaLoader.destroy();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void deallocate() {\n\tsetLoaded(false);\n\n if (!externalAudioPlayer) {\n if (audioPlayer != null) {\n audioPlayer.close();\n audioPlayer = null;\n }\n }\n \n\tif (!externalOutputQueue) {\n\t outputQueue.close();\n\t}\n }",
"private void releaseResources() {\n\t\tstopForeground(true);\n\t\taudioManager.unregisterRemoteControlClient(remoteControlClient);\n\t\taudioManager.unregisterMediaButtonEventReceiver(remoteReceiver);\n\t\t\n\t\tif (mediaPlayer != null){\n\t\t\tmediaPlayer.reset();\n\t\t\tmediaPlayer.release();\n\t\t\tmediaPlayer = null;\n\t\t}\n\t\t\n\t\tif (wifiLock.isHeld()) {\n\t\t\twifiLock.release();\n\t\t}\n\t}",
"public void destroy() {\n // Stop any play or record\n if (this.player != null) {\n if ((this.state == STATE.MEDIA_RUNNING) || (this.state == STATE.MEDIA_PAUSED)) {\n this.player.stop();\n }\n this.player = null;\n }\n }",
"private void cleanUp() {\n\t\tVisualizerView mVisualizerView = MusicApplication.getInstance()\n\t\t\t\t.getVisualizerView();\n\t\tif (mVisualizerView != null) {\n\t\t\tmVisualizerView.updateVisualizer(new byte[] {});\n\t\t}\n\t\t//\t\tif (mCurrentMediaPlayer != null) {\n\t\t//\t\t\tmCurrentMediaPlayer.reset();\n\t\t//\t\t\t//\t\t\tmCurrentMediaPlayer = null;\n\t\t//\t\t\tsetState(IDLE);\n\t\t//\t\t\tcom.dj.util.Log.i(this.getClass().getSimpleName(),\n\t\t//\t\t\t\t\t\" 歌曲停止,释放资源。mCurrentMediaPlayer: \" + mCurrentMediaPlayer);\n\t\t//\t\t\t//\t\t\tcleanEQ();\n\t\t//\t\t}\n\t}",
"@Override\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tMediaPlayUtil.getInstance().release();\n\t\tMediaPlayUtil.getInstance().stop();\n\n\t}",
"@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tMediaPlayUtil.getInstance().stop();\n\t\tMediaPlayUtil.getInstance().release();\n\t}",
"private void cleanupResources() {\n Log.d(TAG, \"Initiating resource cleanup\");\n if (mWorkerThread != null) {\n mWorkerThread.quitSafely();\n try {\n mWorkerThread.join();\n mWorkerThread = null;\n } catch (InterruptedException e) {\n Log.e(TAG, \"Failed to join on mWorkerThread\");\n }\n }\n //mListener = null;//Release later when being finalized\n mDisplayHandler = null;\n mERDHandler = null;\n mContext = null;\n surface = null;\n mIface = null;\n mLocalWfdDevice = null;\n mPeerWfdDevice = null;\n mActionListener = null;\n Log.d(TAG, \"Done with resource cleanup\");\n }",
"@Override\n protected void onDestroy() {\n \tsuper.onDestroy();\n \t\n \tif(mediaPlayer!=null){\n \t\t\n \t\tmediaPlayer.stop();\n \t\tmediaPlayer=null;\n \t}\n }",
"protected synchronized void cleanup() {\n frameStorage.clear();\n if (frameIterator != null) {\n try {\n frameIterator.close();\n } catch (IOException ex) {\n logger.error(Thread.currentThread().getName() + \" IOException while closing the mediaReader\", ex);\n }\n }\n status = Status.STOPPED;\n frameIterator = null;\n }",
"private void releaseMediaPlayerResources(){\n if(mRingTonePlayer != null){\n mRingTonePlayer.stop();\n mRingTonePlayer.release();\n mRingTonePlayer = null;\n }\n }",
"@Override\n public void onDestroy(){\n super.onDestroy();\n releaseMediaPlayerResources();\n }",
"public void dispose() {\n if (mediaPlayer.isPlaying())\n mediaPlayer.stop();\n mediaPlayer.release();\n }",
"@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n \tmediaplayer.release();\n\t}",
"public static void release() {\r\n for (int i = 0; i < players_.size(); i++) {\r\n MediaPlayer p = players_.valueAt(i);\r\n if (p != null) {\r\n if (p.isPlaying()) {\r\n p.stop();\r\n }\r\n p.release();\r\n }\r\n }\r\n players_.clear();\r\n currentMusic_ = INVALID_NUMBER;\r\n }",
"@Override\n public void onDestroy() {\n super.onDestroy();\n releasePlayer();\n mMediaSession.setActive(false);\n }",
"private void shutdown() {\n mMediaRecorder.reset();\n mMediaRecorder.release();\n mCamera.release();\n\n // once the objects have been released they can't be reused\n mMediaRecorder = null;\n mCamera = null;\n }",
"@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tif (imageLoader != null) {\n\t\t\timageLoader.clearMemoryCache();\n\t\t}\n\t}",
"@Override\n public void dispose() {\n super.dispose();\n AssetLoader.dispose();\n }",
"@Override\n public void onDestroy() {\n if (mediaPlayer != null)\n mediaPlayer.release();\n\n super.onDestroy();\n // unregister receiver.\n }",
"public void removeResources() {\n\t\tresources.clear();\n\t}",
"public void dispose() {\n\t\tmusic.dispose();\n\t}",
"@Override\n public void onDestroy(){\n\tandroid.widget.Toast.makeText(getApplicationContext(), \"done \", android.widget.Toast.LENGTH_SHORT).show();\n\tmediaPlayer.release();\n\tmediaPlayer = null;\n\tsuper.onDestroy();\n }",
"@Override\r\n protected void onDestroy() {\r\n Log.d(LOGTAG, \"onDestroy\");\r\n super.onDestroy();\r\n\r\n try {\r\n vuforiaAppSession.stopAR();\r\n } catch (ArException e) {\r\n Log.e(LOGTAG, e.getString());\r\n }\r\n\r\n // Unload texture:\r\n mTextures.clear();\r\n mTextures = null;\r\n\r\n System.gc();\r\n }",
"public void teardown() {\n // This is called by the C++ MediaPlayerPrivate dtor.\n // Cancel any active poster download.\n if (mPosterDownloader != null) {\n mPosterDownloader.cancelAndReleaseQueue();\n }\n mNativePointer = 0;\n }",
"private void releaseMediaPlayer(){\n if (mediaPlayer != null) {\n mediaPlayer.release();\n mediaPlayer = null;\n }\n }",
"@Override\n public void destroy() {\n // clean up any resources created by initialize\n }",
"private void releaseMediaPlayer() {\n if (colors_audio != null) {\n // Regardless of the current state of the media player, release its resources\n // because we no longer need it.\n colors_audio.release();\n\n // Set the media player back to null. For our code, we've decided that\n // setting the media player to null is an easy way to tell that the media player\n // is not configured to play an audio file at the moment.\n colors_audio = null;\n colors_audioManager.abandonAudioFocus(colors_OnAudioFocusChangeListener);\n }\n }",
"private void releaseMediaPlayer() {\n if (mediaPlayer != null) {\n // Regardless of the current state of the media player, release its resources\n // because we no longer need it.\n mediaPlayer.release();\n }\n\n // Set the media player back to null. For our code, we've decided that\n // setting the media player to null is an easy way to tell that the media player\n // is not configured to play an audio file at the moment.\n mediaPlayer = null;\n\n }",
"@Override\n public void destroy() {\n // destroy any persistent resources\n // such as thread pools or persistent connections\n }",
"public void release() {\n\n mTextureRender = null;\n mSurfaceTexture = null;\n }",
"public void cleanup() {\n this.close();\n this.delete(this.backingFileBasename + RECORDING_OUTPUT_STREAM_SUFFIX);\n this.delete(this.backingFileBasename + RECORDING_INPUT_STREAM_SUFFIX);\n }",
"private void releaseMediaPlayer() {\n // If the media player is not null, then it may be currently playing a sound.\n if (mediaPlayer != null) {\n // Regardless of the current state of the media player, release its resources\n // because we no longer need it.\n mediaPlayer.release();\n Log.v(TAG, \"Audio resource released\");\n // Set the media player back to null. For our code, we've decided that\n // setting the media player to null is an easy way to tell that the media player\n // is not configured to play an audio file at the moment.\n mediaPlayer = null;\n audioManager.abandonAudioFocus(afChangeListener);\n }\n }",
"@Override\n public void onDestroy() {\n mAdapter = null;\n getLoaderManager().destroyLoader(CHAPTER_HEADER_LOADER_ID);\n getLoaderManager().destroyLoader(CHAPTER_CONTENT_LOADER_ID);\n getLoaderManager().destroyLoader(CHAPTER_CHILD_LOADER_ID);\n\n // Destroy the AdView.\n if (adView != null) {\n adView.destroy();\n }\n\n super.onDestroy();\n }",
"@Override\n public void onDestroy() {\n super.onDestroy();\n music.release();\n }",
"private void releaseMediaPlayer() {\n if (mMymedia != null) {// Regardless of the current state of the media player, release its resources\n // because we no longer need it.\n mMymedia.release();\n // Set the media player back to null. For our code, we've decided that\n // setting the media player to null is an easy way to tell that the media player\n // is not configured to play an audio file at the moment.\n mMymedia = null;\n am.abandonAudioFocus(afChangeListener);\n }\n }",
"public void destroy() {\r\n\t\ttexture.destroy();\r\n\t}",
"@Override\n protected void onDestroy() {\n super.onDestroy();\n Log.d(TAG, \"onDestroy\");\n// mPhotoLoader.stop();\n if (mMatrixCursor != null)\n mMatrixCursor.close();\n }",
"public static void destroy() {\n handler = null;\n initialized = false;\n }",
"@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tif (mMediaPlayer.isPlaying()) {\n\t\t\tmMediaPlayer.stop();\n\t\t}\n\t}",
"public void cleanup() {\n\t\tref.removeEventListener(listener);\n\t\tmodels.clear();\n\t\tmodelNames.clear();\n\t\tmodelNamesMapping.clear();\n\t}",
"private void releaseMediaPlayer() {\n if (mediaPlayer != null) {\n // Regardless of the current state of the media player, release its resources\n // because we no longer need it.\n mediaPlayer.release();\n\n // Set the media player back to null. For our code, we've decided that\n // setting the media player to null is an easy way to tell that the media player\n // is not configured to play an audio file at the moment.\n mediaPlayer = null;\n mAudiomanager.abandonAudioFocus(afChangeListener);\n }\n\n }",
"@Override\n public void dispose() {\n Assets.instance.dispose();\n batch.dispose();\n grayScaleView.dispose();\n }",
"protected void finalize() {\n\t\tdestroyImages();\n\t}",
"public void destroy() {\n destroyIn(0);\n }",
"@Override\n protected void onStop() {\n mediaPlayer.release();\n super.onStop();\n }",
"@Override\n\tpublic void dispose () {\n\t\tmodelBatch.dispose();\n\t\tsprites.dispose();\n\t\t// TODO: dispose of the model\n\t\tmodel.dispose();\n\t\tbackgroundMusic.dispose();\n\t}",
"private void clearMediaAssetFileHolder() { mediaAssetFileHolder_ = null;\n \n }",
"@VisibleForTesting\n public void cleanup() {\n cleanupNative();\n }",
"private void disposeAndDeleteAllImages() {\r\n\r\n\t\tPhotoLoadManager.stopImageLoading(true);\r\n\t\tThumbnailStore.cleanupStoreFiles(true, true);\r\n\r\n\t\tPhotoImageCache.disposeAll();\r\n\r\n\t\tExifCache.clear();\r\n\t}",
"public void clean(){\n\t\tsynchronized(this.lock){\n\t\t\tint index=0;\n\t\t\tfor(ResourceStatus<T> resourceStatus:this.resourcesStatus){\n\t\t\t\tif(resourceStatus!=null){\n\t\t\t\t\tif(!resourceStatus.isInUse()){\n\t\t\t\t\t\tlong lastTime=resourceStatus.getLastNotInUseTime();\n\t\t\t\t\t\tlong currentTime=System.currentTimeMillis();\n\t\t\t\t\t\tT resource=resourceStatus.getResource();\n\t\t\t\t\t\tif((currentTime-lastTime)>=this.resourceAliveTime){\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tdestroyResource(resource);\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\tlogger.error(Constants.Base.EXCEPTION, e);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis.resourcesStatus[index]=null;\n\t\t\t\t\t\t\tthis.currentSize--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t}",
"public void release() {\n\t\t\treset();\n\t\t\tmCurrentMediaPlayer.release();\n\t\t}",
"public void cleanUp(){\n glDeleteTextures(ID);\n }",
"@After\n\tpublic void cleanUp() {\n\t\tif (model != null) {\n\t\t\tmodel.release(true);\n\t\t\tloader.unloadAll();\n\t\t}\n\t}",
"@Override\n protected void onDestroy() {\n Log.v(\"MediaPlayer\", \"onDestroy\");\n super.onDestroy();\n if (mp.isPlaying()) {\n mp.stop();\n }\n mp.release();\n }",
"synchronized public void destroy() {\n \t\tsuper.destroy();\n \t\tp = null;\n \t\tp_layer = null;\n \t}",
"private void release() {\n\t\tinitialized = false;\n\t\tpause();\n\t\tsetOnCompletionListener(null);\n\t\tgetMp().release();\n\t\tmp = null;\n\t}",
"public static void dispose() {\n\t\ttexture.dispose();\n\t\tcoin.dispose();\n\t\tflap.dispose();\n\t\tdead.dispose();\n\t\tfont.dispose();\n\t\tshadow.dispose();\n\t}",
"private void releaseMediaPlayer() {\n // If the media player is not null, then it may be currently playing a sound.\n if (mediaPlayer != null) {\n // Regardless of the current state of the media player, release its resources\n // because we no longer need it.\n mediaPlayer.release();\n\n // Set the media player back to null. For our code, we've decided that\n // setting the media player to null is an easy way to tell that the media player\n // is not configured to play an audio file at the moment.\n mediaPlayer = null;\n audioManager.abandonAudioFocus(mOnAudioFocusChangeListener);\n }\n }",
"private void releaseMediaPlayer() {\r\n // If the media player is not null, then it may be currently playing a sound.\r\n if (mMediaPlayer != null) {\r\n // Regardless of the current state of the media player, release its resources\r\n // because we no longer need it.\r\n mMediaPlayer.release();\r\n\r\n // Set the media player back to null. For our code, we've decided that\r\n // setting the media player to null is an easy way to tell that the media player\r\n // is not configured to play an audio file at the moment.\r\n mMediaPlayer = null;\r\n\r\n mAudioManager.abandonAudioFocus(mOnAudioFocusChangeListener);\r\n }\r\n\r\n\r\n }",
"@Override\n\tpublic void unloadResources() {\n\t\ttextureManager.unLoadTextures();\n\t}",
"private void releaseMediaPlayer() {\n // If the media player is not null, then it may be currently playing a sound.\n if (mMediaPlayer != null) {\n // Regardless of the current state of the media player, release its resources\n // because we no longer need it.\n mMediaPlayer.release();\n\n // Set the media player back to null. For our code, we've decided that\n // setting the media player to null is an easy way to tell that the media player\n // is not configured to play an audio file at the moment.\n mMediaPlayer = null;\n\n mAudioManager.abandonAudioFocus(afChangeListener);\n }\n }",
"private void releaseMediaPlayer(){\n if(mMediaPlayer !=null){\n //Regardless of the current state of the media player, release its resources\n //because we no longer need it\n mMediaPlayer.release();\n\n //set the media player back to null. For your code, we 've decided that\n //setting the media player to null is an easy way to tell that the media player\n //is not configured to play an audio file at the moment.\n mMediaPlayer=null;\n\n // Regardless of whether or not we were granted audio focus, abandon it. This also\n // unregisters the AudioFocusChangeListener so we don't get anymore callbacks.\n mAudioManager.abandonAudioFocus(mOnAudioFocusChangeListener);\n }\n }",
"public void release() {\n\t\tif (state == State.RECORDING) {\n\t\t\tstopRecord();\n\t\t}\n\t\tif (audioRecorder != null) {\n\t\t\taudioRecorder.release();\n\t\t}\n\t\tstate = State.INITIALIZING;\n\t\tsRecorderManager = null;\n\t\taudioRecorder = null;\n\t}",
"public void destroy() {\n\t\tAL10.alDeleteSources(id);\n\t}",
"public void onDestroy() {\n WhiteListActivity.super.onDestroy();\n try {\n getLoaderManager().destroyLoader(100);\n getContentResolver().unregisterContentObserver(this.j);\n } catch (Exception e2) {\n Log.e(\"WhiteListActivity\", e2.toString());\n }\n }",
"private void releaseMediaPlayer() {\n if (mediaPlayer != null) {\n // Regardless of the current state of the media player, release its resources\n // because we no longer need it.\n mediaPlayer.release();\n\n // Set the media player back to null. For our code, we've decided that\n // setting the media player to null is an easy way to tell that the media player\n // is not configured to play an audio file at the moment.\n mediaPlayer = null;\n\n // Regardless of whether or not we were granted audio focus, abandon it. This also\n // unregisters the AudioFocusChangeListener so we don't get anymore callbacks.\n\n }\n }",
"public void releaseMediaPlayers() {\n if(arrSpFiles != null && arrSpFiles.size() > 0) {\n for(SoundPlayerFile spPlayerFile : arrSpFiles) {\n if(spPlayerFile.mp != null) {\n spPlayerFile.mp.release();\n }\n }\n }\n }",
"public void finalize() {\r\n destImage = null;\r\n srcImage = null;\r\n super.finalize();\r\n }",
"public static void dispose () {\n\t\tif (cachedStillModels != null) {\n\t\t\tfor (StillModel m : cachedStillModels.values()) {\n\t\t\t\tm.dispose();\n\t\t\t}\n\n\t\t\tcachedStillModels.clear();\n\t\t}\n\n\t\tif (cachedMaterials != null) {\n\t\t\tcachedMaterials.clear();\n\t\t}\n\t}",
"@Override\r\n\tpublic void dispose() {\n\t\tmodelBatch.dispose();\r\n\t\tinstances.clear();\r\n\t\tassets.dispose();\r\n\t}",
"@Override\n public void dispose() {\n spriteBatchLayer.dispose();\n imageAnimationActor.dispose();\n translateAnimationActor.dispose();\n assetManager.dispose();\n }",
"@Override\n public void dispose() {\n batch.dispose();\n playerTexture.dispose();\n world.dispose();\n b2dr.dispose();\n }",
"@Override\n public void onDestroy() {\n super.onDestroy();\n releasePlayer();\n }",
"@Override\n public void onDestroy() {\n super.onDestroy();\n ytplayer.release();\n }",
"public void dispose () {\r\n \t\trefCount--;\r\n \t\tif (refCount > 0) return;\r\n \t\tif (meshes.get(Gdx.app) != null) meshes.get(Gdx.app).remove(this);\r\n \t\tvertices.dispose();\r\n \t\tindices.dispose();\r\n \t}",
"public final void destroy()\n {\n processDestroy();\n super.destroy();\n }",
"@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tSystem.gc();\r\n\t}",
"public void release() {\n synchronized (mLock) {\n super.release();\n detachMediaController();\n setContentUri(PlayMode.NONE, null);\n setContentFd(PlayMode.NONE, null);\n setCurrentState(State.RELEASED);\n mContext = null;\n }\n }",
"protected void onDestroy()\n {\n super.onDestroy();\n\n // Cancelar las tareas asíncronas que pueden estar en segundo plano:\n // inicializar QCAR y cargar los Trackers\n if (mIniciarQCARTask != null &&\n mIniciarQCARTask.getStatus() != IniciarQCARTask.Status.FINISHED)\n {\n mIniciarQCARTask.cancel(true);\n mIniciarQCARTask = null;\n }\n\n if (mCargarTrackerTask != null &&\n mCargarTrackerTask.getStatus() != CargarTrackerTask.Status.FINISHED)\n {\n mCargarTrackerTask.cancel(true);\n mCargarTrackerTask = null;\n }\n\n // Se utiliza este cerrojo para asegurar que no se están ejecutando\n // aún las dos tareas asíncronas para inicizalizar QCAR y para\n // cargar los Trackers.\n synchronized (mCerrojo) \n {\n destruirAplicacionNativa();\n \n mTextures.clear();\n mTextures = null;\n\n destruirDatosTracker();\n destruirTracker();\n\n QCAR.deinit();\n }\n \n // Se limpia la memoría generada por el soundPool\n if(mReproductor != null)\n \tmReproductor.limpiar();\n \n System.gc();\n }",
"public void destroy() {\n renderer.destroy();\n }",
"public void free(){\n\t\t//android.util.Log.d(TAG,\"free()\");\n\t\tthis.freeGeometries();\n\t\tthis.freeLights();\n\t\tthis.freeCameras();\n\t\tthis.freeTextures();\n\t\tthis.freeMaterials();\n\t}",
"@Override\r\n\tpublic void mediaFreed(MediaPlayer mediaPlayer)\r\n\t{\n\r\n\t}",
"protected void cleanup() {\n try {\n if (_in != null) {\n _in.close();\n _in = null;\n }\n if (_out != null) {\n _out.close();\n _out = null;\n }\n if (_socket != null) {\n _socket.close();\n _socket = null;\n }\n } catch (java.io.IOException e) {\n }\n }",
"public void destroy() {\n analysisdsfilelumiDataProvider.close();\n }",
"public void destroy() {\n \t\n }",
"public void finalize() {\r\n\t\tdestImage = null;\r\n\t\tsrcImage = null;\r\n\t\tsuper.finalize();\r\n\t}",
"private void releaseMediaRecorder() {\n if (mediaRecorder == null) return;\n\n mediaRecorder.stop();\n mediaRecorder.reset(); // clear recorder configuration\n }",
"public void dispose() {\n\t\tthis.shape_renderer.dispose();\n\t\tthis.sprite_renderer.dispose();\n\t}",
"public void onDestroy() {\n Log.d(TAG, \"onDestroy\");\n\n if (videoSource != null) {\n Log.d(TAG, \"VideoSource dispose\");\n videoSource.dispose();\n videoSource = null;\n }\n\n if (factory != null) {\n Log.d(TAG, \"PeerConnectionFactory dispose\");\n factory.dispose();\n factory = null;\n }\n\n\n if (mSocket != null) {\n Log.d(TAG, \"Socket dispose\");\n closeSocket();\n mSocket = null;\n }\n\n\n }",
"@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tmp.release();\n\t\t\n\t}",
"@Override\n protected void onDestroy() {\n super.onDestroy();\n\n stopRecording();\n }",
"public void dispose() {\n if (mainDocument != null) {\n mainDocument.dispose();\n }\n\n if (docAttachments != null) {\n for (DocumentItem d : docAttachments) {\n d.dispose();\n }\n\n docAttachments.clear();\n }\n\n if (documentLink != null) {\n documentLink.clear();\n }\n\n contextWidget = null;\n mainDocument = null;\n docAttachments = null;\n documentLink = null;\n callback = null;\n window = null;\n linkedData = null;\n }",
"public void cleanup() {\r\n }",
"public void finalize() {\r\n fileName = null;\r\n fileDir = null;\r\n fileHeader = null;\r\n\r\n fileInfo = null;\r\n image = null;\r\n vr = null;\r\n\r\n if (rawFile != null) {\r\n\r\n try {\r\n rawFile.close();\r\n } catch (final IOException ex) {\r\n // closing.. ignore errors\r\n }\r\n\r\n rawFile.finalize();\r\n }\r\n\r\n if (raFile != null) {\r\n\r\n try {\r\n raFile.close();\r\n } catch (final IOException ex) {\r\n // closing.. ignore errors\r\n }\r\n\r\n raFile = null;\r\n }\r\n\r\n rawFile = null;\r\n nameSQ = null;\r\n jpegData = null;\r\n\r\n try {\r\n super.finalize();\r\n } catch (final Throwable er) {\r\n // ignore errors during memory cleanup..\r\n }\r\n }",
"public void destroy(){\n\t\tcimg.destroy();\n\t}",
"protected synchronized void clearURLLoader() {\r\n currentLoader = null;\r\n }",
"@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tCleanup();\r\n\t}",
"@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\t//destroy all running hardware/db etc.\n\t}",
"public void cleanup();",
"@Override\n\tpublic void onDestroy() {\n\t\tquitAllFocus();\n\t\timg.setImageBitmap(null);\n\t\tclearMemory();\n\t\tsuper.onDestroy();\n\t\ttry {\n\t\t\t//GARBAGE COLLECTOR\n\t\t\tSystem.gc();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t}"
]
| [
"0.78461474",
"0.7658639",
"0.7606559",
"0.7565364",
"0.74649084",
"0.74470353",
"0.73654383",
"0.73496526",
"0.7346886",
"0.734382",
"0.72965693",
"0.7282727",
"0.72487164",
"0.7135911",
"0.7098211",
"0.70859224",
"0.7080205",
"0.70630467",
"0.7052187",
"0.7038221",
"0.703165",
"0.702243",
"0.70188224",
"0.6979336",
"0.6960586",
"0.6959843",
"0.69581234",
"0.692291",
"0.6859774",
"0.68183136",
"0.6783764",
"0.67709005",
"0.67694485",
"0.6746403",
"0.67430663",
"0.6727054",
"0.6693724",
"0.6692308",
"0.66893184",
"0.6686954",
"0.6681243",
"0.66747725",
"0.6672565",
"0.6666844",
"0.66481936",
"0.664699",
"0.66440797",
"0.6638225",
"0.6622071",
"0.66100144",
"0.6608767",
"0.66009",
"0.6583184",
"0.65825284",
"0.6576556",
"0.6575696",
"0.6575462",
"0.6553519",
"0.65511996",
"0.65476274",
"0.6543105",
"0.65360343",
"0.65343374",
"0.6525242",
"0.6523017",
"0.65204704",
"0.6517891",
"0.6514904",
"0.6511465",
"0.65007526",
"0.6500414",
"0.6499308",
"0.6497399",
"0.6495865",
"0.64949507",
"0.64938635",
"0.64923894",
"0.6491263",
"0.6490975",
"0.6490338",
"0.64898264",
"0.6487478",
"0.6472802",
"0.6470738",
"0.6468668",
"0.6467942",
"0.6456535",
"0.6452822",
"0.6452679",
"0.644516",
"0.6443888",
"0.64312667",
"0.6427614",
"0.64247215",
"0.64150816",
"0.6402056",
"0.6396414",
"0.63942087",
"0.63914245",
"0.6391232"
]
| 0.8203755 | 0 |
Parses the Intent and loads the appropriate media. | public void loadMedia(Intent intent) {
mediaLoader.handleIntent(intent, uiView);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void dispatchLoadPhotoIntent() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Choose Picture\"), REQUEST_LOAD_PHOTO);\n }",
"private void handleIntent() {\n // Get the intent set on this activity\n Intent intent = getIntent();\n\n // Get the uri from the intent\n Uri uri = intent.getData();\n\n // Do not continue if the uri does not exist\n if (uri == null) {\n return;\n }\n\n // Let the deep linker do its job\n Bundle data = mDeepLinker.buildBundle(uri);\n if (data == null) {\n return;\n }\n\n // See if we have a valid link\n DeepLinker.Link link = DeepLinker.getLinkFromBundle(data);\n if (link == null) {\n return;\n }\n\n // Do something with the link\n switch (link) {\n case HOME:\n break;\n case PROFILE:\n break;\n case PROFILE_OTHER:\n break;\n case SETTINGS:\n break;\n }\n\n String msg;\n long id = DeepLinker.getIdFromBundle(data);\n if (id == 0) {\n msg = String.format(\"Link: %s\", link);\n } else {\n msg = String.format(\"Link: %s, ID: %s\", link, id);\n }\n\n Toast.makeText(this, msg, Toast.LENGTH_LONG).show();\n }",
"private void onLoad() {\n\n Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI);\n startActivityForResult(intent, RESULT_LOAD_ARTIST_IMAGE);\n }",
"private void getDataFromIntent(Intent intent) {\n panAadharCardDetail = intent.getParcelableExtra(\"panAadharDetail\");\n card_type = intent.getIntExtra(\"card_type\", 0);\n imageFileUri = intent.getStringExtra(\"imageFile\");\n }",
"protected void loadMedia(Page page) {\n \t\tif (mMessageStream == null) {\n \t\t\treturn;\n \t\t}\n \n \t\tmMetaData.setTitle(\"odr\");\n \t\ttry {\n \t\t\tString ip = getLocalIpAddress();\n \t\t\tString fileName = page.getUri().getLastPathSegment();\n \n \t\t\tMediaProtocolCommand cmd = mMessageStream.loadMedia(\"http://\" + ip\n \t\t\t\t\t+ \":1993/\" + fileName, mMetaData, true);\n \t\t\tcmd.setListener(new MediaProtocolCommand.Listener() {\n \n \t\t\t\t@Override\n \t\t\t\tpublic void onCompleted(MediaProtocolCommand mPCommand) {\n \t\t\t\t}\n \n \t\t\t\t@Override\n \t\t\t\tpublic void onCancelled(MediaProtocolCommand mPCommand) {\n \t\t\t\t}\n \t\t\t});\n \t\t} catch (Exception e) {\n \t\t\te.printStackTrace();\n \n \t\t\tshowCrouton(R.string.chromecast_failed, null, AppMsg.STYLE_ALERT);\n \t\t}\n \t}",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_details);\n\n Intent intent = getIntent();\n Uri data = intent.getData();\n String key = intent.getStringExtra(SearchManager.EXTRA_DATA_KEY);\n if (data != null && key != null) {\n\n if (data.toString().equals(\"homeview://plex/playback\")) {\n\n Intent next = new Intent(this, PlaybackActivity.class);\n next.setAction(PlaybackActivity.ACTION_VIEW);\n next.putExtra(PlaybackActivity.KEY, key);\n PlexVideoItem vid = intent.getParcelableExtra(PlaybackActivity.VIDEO);\n if (vid != null)\n next.putExtra(PlaybackActivity.VIDEO, vid);\n startActivity(next);\n }\n }\n }",
"private void getIntentData() {\r\n if (getIntent() != null && getIntent().getExtras() != null) {\r\n // Handling intent data from DirectoryDetailsActivity class\r\n if (Constant.ALBUM_TYPE.equalsIgnoreCase(getIntent().getExtras().getString(Constant.TYPE))) {\r\n position = getIntent().getIntExtra(Constant.POSITION, 0);\r\n nameKey = getIntent().getStringExtra(Constant.KEY_NAME);\r\n } else if (Constant.LIST_TYPE.equalsIgnoreCase(getIntent().getExtras().getString(Constant.TYPE))) {\r\n imageDataModel = getIntent().getParcelableExtra(Constant.DATA);\r\n } else if (Constant.SECURE_TAB.equalsIgnoreCase(getIntent().getExtras().getString(Constant.TYPE))) {\r\n imageDataModel = getIntent().getParcelableExtra(Constant.DATA);\r\n } else {\r\n // Handling other intent data like camera intent\r\n Uri uri = getIntent().getData();\r\n GalleryHelper.getImageFolderMap(this);\r\n File file = new File(getRealPathFromURI(uri));\r\n nameKey = FileUtils.getParentName(file.getParent());\r\n GalleryHelperBaseOnId.getMediaFilesOnIdBasis(this, GalleryHelper.imageFolderMap.get(nameKey).get(0).getBucketId());\r\n }\r\n }\r\n }",
"private void handleIntent(Intent intent) {\n if (intent == null) {\n return;\n }\n\n // read intent\n String action = intent.getAction();\n Uri launchUri = intent.getData();\n\n // if app was not launched by the url - ignore\n if (!Intent.ACTION_VIEW.equals(action) || launchUri == null) {\n Log.d(TAG, \"launchUri is null or action != VIEW\");\n return;\n }\n\n\n // store message and try to consume it\n storedEvent = createEventFromUrl(launchUri);\n tryToConsumeEvent();\n }",
"void load() {\n String uri =\"/storage/sdcard0/Download/bbb_sunflower_1080p_30fps_normal.mp4\";\n //String uri = \"rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov\";\n put(OPT_URI, sPref.getString(\"OPT_URI\", uri));\n put(OPT_RTSP_PROTOCOL,sPref.getString(\"OPT_RTSP_PROTOCOL\", \"tcp\"));\n put(OPT_PACKET_BUFFER_SIZE,sPref.getInt(\"OPT_PACKET_BUFFER_SIZE\", 10));\n put(OPT_IS_FLUSH,sPref.getBoolean(\"OPT_IS_FLUSH\", true));\n put(OPT_IS_MAX_FPS,sPref.getBoolean(\"OPT_IS_MAX_FPS\", true));\n put(OPT_IS_SKIP_PACKET, sPref.getBoolean(\"OPT_IS_SKIP_PACKET\", true));\n put(OPT_IS_LOOP_PLAYING, sPref.getBoolean(\"OPT_IS_LOOP_PLAYING\", true));\n put(OPT_IS_WINDOW_NATIVE, sPref.getBoolean(\"OPT_IS_WINDOW_NATIVE\", false));\n put(OPT_IS_WINDOW_GLES, sPref.getBoolean(\"OPT_IS_WINDOW_GLES\", true));\n put(OPT_IS_VIDEO_QUEUE, sPref.getBoolean(\"OPT_IS_VIDEO_QUEUE\", false));\n }",
"public void importMedia(){\r\n \r\n }",
"@Override\n\tpublic void onReceive(Context context, Intent intent) {\n\n\t\tString activityName = \"com.sonyericsson.media.infinite.EXTRA_ACTIVITY_NAME\";\n\n\t\tif (intent.getStringExtra(activityName) != null && intent.getStringExtra(activityName).equals(MusicPreferenceActivity.class.getName())) {\n\n\t\t\tBundle extras = new Bundle();\n\n\t\t\t// Build a URI for the string resource for the description text\n\t\t\tString description = new Uri.Builder().scheme(ContentResolver.SCHEME_ANDROID_RESOURCE).authority(context.getPackageName()).appendPath(Integer.toString(R.string.description)).build()\n\t\t\t\t\t.toString();\n\n\t\t\t// And return it to the infinite framework as an extra\n\t\t\textras.putString(\"com.sonyericsson.media.infinite.EXTRA_DESCRIPTION\", description);\n\t\t\tsetResultExtras(extras);\n\n\t\t}\n\t}",
"@Override\n \tpublic void onReceive(Context context, Intent intent)\n \t{\n \tMediaInfoArtist = intent.getStringExtra(\"artist\");\n \tMediaInfoAlbum = intent.getStringExtra(\"album\");\n \tMediaInfoTrack = intent.getStringExtra(\"track\");\n \tMediaInfoNeedsUpdate = true;\n \tLog.d(\"OLV Music\",\"Artist: \"+MediaInfoArtist+\", Album: \"+MediaInfoAlbum+\" and Track: \"+MediaInfoTrack);\n \t}",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tmediaManager.onActivityResult(requestCode, resultCode, data);\n\t}",
"@Override\n protected void onHandleIntent(Intent intent) {\n String urlPath = intent.getStringExtra(URL);\n String fileName = intent.getStringExtra(FILENAME);\n File output = new File(Environment.getExternalStorageDirectory(),\n fileName);\n if (output.exists()) {\n output.delete();\n }\n\n InputStream stream = null;\n FileOutputStream fos = null;\n try {\n\n URL url = new URL(urlPath);\n stream = url.openConnection().getInputStream();\n InputStreamReader reader = new InputStreamReader(stream);\n fos = new FileOutputStream(output.getPath());\n int next = -1;\n while ((next = reader.read()) != -1) {\n fos.write(next);\n }\n // successfully finished\n result = Activity.RESULT_OK;\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n if (stream != null) {\n try {\n stream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if (fos != null) {\n try {\n fos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n publishResults(output.getAbsolutePath(), result);\n }",
"public void viewMedia(Context context, @Nullable Uri data, @Nullable String type, @Nullable Bundle bundle) {\n Intent intent = new Intent();\n intent.setAction(Intent.ACTION_VIEW)\n .addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)\n .setDataAndType(data, type);\n context.startActivity(intent, bundle);\n }",
"private Uri getMedia(String mediaName) {\n if (URLUtil.isValidUrl(mediaName)) {\n // Media name is an external URL.\n return Uri.parse(mediaName);\n } else {\n\n // you can also put a video file in raw package and get file from there as shown below\n\n return Uri.parse(\"android.resource://\" + getPackageName() +\n \"/raw/\" + mediaName);\n\n\n }\n }",
"@Override\n public void run() {\n Log.d(TAG, \"run: \" + pictureFile.getAbsolutePath());\n startActivity(new Intent(PlaceOrderNextActivity.this, PlaceOrderFinalActivity.class)\n .putExtra(\"audioData\", getIntent().getStringExtra(\"audioData\"))\n .putExtra(\"distId\", getIntent().getStringExtra(\"distId\"))\n .putExtra(\"dist\", distModel)\n .putExtra(\"imagePath\", pictureFile.getAbsolutePath())\n .putExtra(\"orderType_id\", getIntent().getStringExtra(\"orderType_id\"))\n .putExtra(\"orderType_fees\", getIntent().getStringExtra(\"orderType_fees\"))\n .putExtra(\"OrderAudioLength\", getIntent().getIntExtra(\"OrderAudioLength\", 0))\n .putExtra(\"imageFrom\", FLAG_CAMERA));//1-camera, 0-gallery\n overridePendingTransition(R.anim.enter_right, android.R.anim.fade_out);\n\n }",
"private Uri getFileUriAndSetType(Intent intent, String str, String str2, String str3, int i) throws IOException {\n String str4;\n String str5;\n String str6;\n if (str2.endsWith(\"mp4\") || str2.endsWith(\"mov\") || str2.endsWith(\"3gp\")) {\n intent.setType(\"video/*\");\n } else if (str2.endsWith(\"mp3\")) {\n intent.setType(\"audio/x-mpeg\");\n } else {\n intent.setType(\"image/*\");\n }\n if (str2.startsWith(\"http\") || str2.startsWith(\"www/\")) {\n String fileName = getFileName(str2);\n String str7 = \"file://\" + str + \"/\" + fileName.replaceAll(\"[^a-zA-Z0-9._-]\", \"\");\n if (str2.startsWith(\"http\")) {\n URLConnection openConnection = new URL(str2).openConnection();\n String headerField = openConnection.getHeaderField(\"Content-Disposition\");\n if (headerField != null) {\n Matcher matcher = Pattern.compile(\"filename=([^;]+)\").matcher(headerField);\n if (matcher.find()) {\n fileName = matcher.group(1).replaceAll(\"[^a-zA-Z0-9._-]\", \"\");\n if (fileName.length() == 0) {\n fileName = \"file\";\n }\n str7 = \"file://\" + str + \"/\" + fileName;\n }\n }\n saveFile(getBytes(openConnection.getInputStream()), str, fileName);\n str2 = str7;\n } else {\n saveFile(getBytes(this.webView.getContext().getAssets().open(str2)), str, fileName);\n str2 = str7;\n }\n } else if (str2.startsWith(\"data:\")) {\n if (!str2.contains(\";base64,\")) {\n intent.setType(\"text/plain\");\n return null;\n }\n String substring = str2.substring(str2.indexOf(\";base64,\") + 8);\n if (!str2.contains(\"data:image/\")) {\n intent.setType(str2.substring(str2.indexOf(\"data:\") + 5, str2.indexOf(\";base64\")));\n }\n String substring2 = str2.substring(str2.indexOf(\"/\") + 1, str2.indexOf(\";base64\"));\n if (notEmpty(str3)) {\n StringBuilder sb = new StringBuilder();\n sb.append(sanitizeFilename(str3));\n if (i == 0) {\n str6 = \"\";\n } else {\n str6 = \"_\" + i;\n }\n sb.append(str6);\n sb.append(\".\");\n sb.append(substring2);\n str4 = sb.toString();\n } else {\n StringBuilder sb2 = new StringBuilder();\n sb2.append(\"file\");\n if (i == 0) {\n str5 = \"\";\n } else {\n str5 = \"_\" + i;\n }\n sb2.append(str5);\n sb2.append(\".\");\n sb2.append(substring2);\n str4 = sb2.toString();\n }\n saveFile(Base64.decode(substring, 0), str, str4);\n str2 = \"file://\" + str + \"/\" + str4;\n } else if (str2.startsWith(\"df:\")) {\n if (!str2.contains(\";base64,\")) {\n intent.setType(\"text/plain\");\n return null;\n }\n String substring3 = str2.substring(str2.indexOf(\"df:\") + 3, str2.indexOf(\";data:\"));\n String substring4 = str2.substring(str2.indexOf(\";data:\") + 6, str2.indexOf(\";base64,\"));\n String substring5 = str2.substring(str2.indexOf(\";base64,\") + 8);\n intent.setType(substring4);\n saveFile(Base64.decode(substring5, 0), str, sanitizeFilename(substring3));\n str2 = \"file://\" + str + \"/\" + sanitizeFilename(substring3);\n } else if (str2.startsWith(\"file://\")) {\n intent.setType(getMIMEType(str2));\n } else {\n throw new IllegalArgumentException(\"URL_NOT_SUPPORTED\");\n }\n return Uri.parse(str2);\n }",
"public final void mo6069c(int i, int i2, Intent intent) {\n AppMethodBeat.m2504i(6291);\n if (i == (C22846h.this.hashCode() & CdnLogic.kBizGeneric)) {\n switch (i2) {\n case -1:\n if (intent == null) {\n C4990ab.m7412e(\"MicroMsg.JsApiChooseMedia\", \"mmOnActivityResult REQUEST_CHOOSE_MEDIA bundle is null,\");\n C22846h.m34667a(C22846h.this, \"fail\");\n AppMethodBeat.m2505o(6291);\n return;\n }\n int intExtra = intent.getIntExtra(\"key_pick_local_media_callback_type\", 0);\n String stringExtra;\n HashMap hashMap;\n if (intExtra == 1) {\n stringExtra = intent.getStringExtra(\"key_pick_local_media_local_id\");\n String stringExtra2 = intent.getStringExtra(\"key_pick_local_media_thumb_local_id\");\n C4990ab.m7417i(\"MicroMsg.JsApiChooseMedia\", \"video localId:%s\", stringExtra);\n C4990ab.m7417i(\"MicroMsg.JsApiChooseMedia\", \"video thumbLocalId:%s\", stringExtra2);\n if (C5046bo.isNullOrNil(stringExtra)) {\n C4990ab.m7412e(\"MicroMsg.JsApiChooseMedia\", \"mmOnActivityResult REQUEST_CHOOSE_MEDIA video localId is null\");\n C22846h.m34667a(C22846h.this, \"fail\");\n AppMethodBeat.m2505o(6291);\n return;\n }\n WebViewJSSDKFileItem aeo = C29782c.aeo(stringExtra);\n if (aeo == null || !(aeo instanceof WebViewJSSDKVideoItem)) {\n C4990ab.m7412e(\"MicroMsg.JsApiChooseMedia\", \"mmOnActivityResult REQUEST_CHOOSE_MEDIA nor the videoitem\");\n break;\n }\n WebViewJSSDKVideoItem webViewJSSDKVideoItem = (WebViewJSSDKVideoItem) aeo;\n C4990ab.m7417i(\"MicroMsg.JsApiChooseMedia\", \"after parse to json data : %s\", C43914ap.m78770c(stringExtra, stringExtra2, webViewJSSDKVideoItem.duration, webViewJSSDKVideoItem.height, webViewJSSDKVideoItem.width, webViewJSSDKVideoItem.size));\n hashMap = new HashMap();\n hashMap.put(\"type\", Integer.valueOf(1));\n hashMap.put(\"localIds\", stringExtra);\n C22846h.m34669a(C22846h.this, hashMap);\n AppMethodBeat.m2505o(6291);\n return;\n } else if (intExtra == 2) {\n stringExtra = intent.getStringExtra(\"key_pick_local_media_local_ids\");\n C4990ab.m7417i(\"MicroMsg.JsApiChooseMedia\", \"chooseMedia localIds:%s\", stringExtra);\n if (C5046bo.isNullOrNil(stringExtra)) {\n C4990ab.m7412e(\"MicroMsg.JsApiChooseMedia\", \"mmOnActivityResult REQUEST_CHOOSE_MEDIA image localIds is null\");\n C22846h.m34667a(C22846h.this, \"fail\");\n AppMethodBeat.m2505o(6291);\n return;\n }\n hashMap = new HashMap();\n hashMap.put(\"type\", Integer.valueOf(2));\n hashMap.put(\"localIds\", stringExtra);\n C22846h.m34669a(C22846h.this, hashMap);\n AppMethodBeat.m2505o(6291);\n return;\n } else {\n C4990ab.m7413e(\"MicroMsg.JsApiChooseMedia\", \"type:%d is error\", Integer.valueOf(intExtra));\n C22846h.m34667a(C22846h.this, \"fail\");\n AppMethodBeat.m2505o(6291);\n return;\n }\n break;\n case 0:\n C22846h.m34667a(C22846h.this, \"cancel\");\n AppMethodBeat.m2505o(6291);\n return;\n }\n C22846h.m34667a(C22846h.this, \"fail\");\n }\n AppMethodBeat.m2505o(6291);\n }",
"private void m34670aA(Intent intent) {\n AppMethodBeat.m2504i(6295);\n C4990ab.m7416i(\"MicroMsg.JsApiChooseMedia\", \"chooseMediaFromAlbum\");\n intent.putExtra(\"key_pick_local_pic_capture\", 4096);\n this.hwd.ifE = this.hvq;\n C25985d.m41453a(this.hwd, \"webview\", \".ui.tools.OpenFileChooserUI\", intent, CdnLogic.kBizGeneric & hashCode(), false);\n AppMethodBeat.m2505o(6295);\n }",
"@Override\n public void onHandleIntent(Intent intent) {\n // Get the URL associated with the Intent data.\n // @@ TODO -- you fill in here.\n Uri url = intent.getData();\n\n // Get the directory pathname where the image will be stored.\n // @@ TODO -- you fill in here.\n String directoryPathname = intent.getStringExtra(DIRECTORY_PATHNAME);\n\n // Download the requested image.\n // @@ TODO -- you fill in here.\n Uri downloadedImage = Utils.downloadImage(this, url, directoryPathname);\n\n // Extract the Messenger stored as an extra in the\n // intent under the key MESSENGER.\n // @@ TODO -- you fill in here.\n Messenger messenger = (Messenger) intent.getExtras().get(MESSENGER);\n\n // Send the path to the image file back to the\n // MainActivity via the messenger.\n // @@ TODO -- you fill in here.\n sendPath(messenger, downloadedImage, url);\n }",
"private void galleryIntent() {\n Intent intent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n intent.setType(\"image/*\");\n ((MessageActivity) context).startActivityForResult(Intent.createChooser(intent,\n \"Select Picture\"), SELECT_PICTURE);\n\n }",
"public Intent parseAndGetIntent(Uri uri) {\n\n Log.d(TAG, uri.toString());\n\n List<String> pathSegments = uri.getPathSegments();\n\n Intent intent = null;\n String tagKey = pathSegments.get(0).toLowerCase();\n\n Log.d(TAG, \"tagKey:\" + tagKey);\n\n if (AppIndexApplication.getInstance().cabSet.contains(tagKey)) {\n intent = new Intent(AppIndexApplication.getInstance(), BookCabActivity.class);\n } else if (AppIndexApplication.getInstance().restaurantSet.contains(tagKey)) {\n intent = new Intent(AppIndexApplication.getInstance(), RestaurantActivity.class);\n } else {\n intent = new Intent(AppIndexApplication.getInstance(), BookCabActivity.class);\n }\n\n return intent;\n }",
"private void m6627b(Intent intent) {\n String action = intent.getAction();\n C0938a.m5002a(\"SR/SoundRecorder\", \"<parseNormalIntent>,getAction =\" + action);\n if (\"android.provider.MediaStore.RECORD_SOUND\".equals(action) || \"android.intent.action.GET_CONTENT\".equals(action) || \"android.intent.action.PICK\".equals(action)) {\n String type = intent.getType();\n C0938a.m5002a(\"SR/SoundRecorder\", \"<parseNormalIntent>,getType =\" + type);\n if (type != null) {\n if (type.equals(\"audio/mp4\") || type.equals(\"audio/amr\") || type.equals(\"audio/evrc\") || type.equals(\"audio/qcelp\") || type.equals(\"audio/aac_mp4\") || type.equals(\"audio/*\") || type.equals(\"*/*\")) {\n this.f5415f = \"audio/aac_mp4\";\n } else {\n setResult(0);\n finish();\n return;\n }\n }\n String O = m6598O();\n C0938a.m5002a(\"SR/SoundRecorder\", \"<parseNormalIntent>, referrerStr: \" + O);\n if (O == null || !O.contains(\"com.vivo.easyshare\")) {\n this.f5427l = true;\n m6661u();\n } else {\n m6661u();\n }\n this.f5453y = intent.getLongExtra(\"android.provider.MediaStore.extra.MAX_BYTES\", -1);\n long j = this.f5453y;\n if (-1 == j) {\n this.f5421i = false;\n } else if (j > 2048) {\n this.f5421i = true;\n } else {\n this.f5453y = -1;\n this.f5421i = false;\n setResult(0);\n finish();\n return;\n }\n C0938a.m5006c(\"SR/SoundRecorder\", \"<parseNormalIntent>,mMaxFileSize = \" + this.f5453y + \",mHasFileSizeLimitation = \" + this.f5421i + \",messageAddRecorder = \" + this.f5427l);\n }\n }",
"public void openIntentGetContent(){\n Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n\n //have to use this instead of startActivity if you want to store the image in imageView\n //cause if you use this method, only then, can you use the method onActivityResult (defined below this method)\n //otherwise the execution won't go there\n startActivityForResult(intent, WRITE_REQUEST_CODE);\n\n }",
"@Override\n protected void onHandleIntent(Intent intent) {\n Utils.printLog(TAG , \"onHandleIntent \" + System.currentTimeMillis());\n\n\n if(true){\n downloadContent();\n /*new Thread(new Runnable() {\n @Override\n public void run() {\n for(int i = 0 ; i < 10 ; i ++ ){\n try {\n Log.e(\"TAG\" , \"Index \" + i);\n Thread.sleep(5000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }\n }).start();*/\n return ;\n }\n// mediaPlayer= MediaPlayer.create(this , R.raw.kaun_tujhe);\n// mediaPlayer.start();\n// mediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n// @Override\n// public void onCompletion(MediaPlayer mp) {\n// MyIntentService.this.stopSelf();\n// }\n// });\n// SystemClock.sleep(1000);\n\n }",
"public interface IMedia extends Parcelable {\n\n enum Type {\n MOVIE(\"movie\"), TV(\"tv\");\n\n private String name;\n\n Type(String name) {\n this.name = name;\n }\n\n @Override\n public String toString() {\n return name;\n }\n }\n\n String getBackdropPath();\n\n int[] getGenreIds();\n\n Genre[] getGenres();\n\n long getId();\n\n String getOriginalTitle();\n\n String getTitle();\n\n String getOverview();\n\n String getReleaseDate();\n\n String getPosterPath();\n\n String getHomePage();\n\n float getPopularity();\n\n boolean isVideo();\n\n float getVoteAverage();\n\n int getVoteCount();\n\n VideosResponse getVideos();\n\n Type getType();\n\n Creator<IMedia> CREATOR = new Creator<IMedia>() {\n @Override\n public IMedia createFromParcel(Parcel parcel) {\n String type = parcel.readString();\n if(Type.MOVIE.name.equals(type)){\n return Movie.CREATOR.createFromParcel(parcel);\n }else{\n return TV.CREATOR.createFromParcel(parcel);\n }\n }\n\n @Override\n public IMedia[] newArray(int i) {\n return new IMedia[i];\n }\n };\n\n}",
"private void galleryIntent() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);//\n startActivityForResult(Intent.createChooser(intent, \"Select Photo\"), SELECT_PHOTO);\n }",
"@Override\n public void onClick(View v) {\n Intent intent_upload = new Intent();\n intent_upload.setType(\"audio/*\");\n intent_upload.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(intent_upload, 1);\n }",
"URI getMediaURI();",
"private void getIncomingIntent()\n {\n if(getIntent().hasExtra(\"Title\")\n && getIntent().hasExtra(\"Time\")\n && getIntent().hasExtra(\"Date\")\n && getIntent().hasExtra(\"Duration\")\n && getIntent().hasExtra(\"Location\")\n && getIntent().hasExtra(\"EventDetails\"))\n {\n Title = getIntent().getStringExtra(\"Title\");\n Time = getIntent().getStringExtra(\"Time\");\n Date = getIntent().getStringExtra(\"Date\");\n Duration = getIntent().getStringExtra(\"Duration\");\n Location = getIntent().getStringExtra(\"Location\");\n EventDetails = getIntent().getStringExtra(\"EventDetails\");\n\n setData(Title,Time,Date,Duration,Location,EventDetails);\n }\n }",
"@Override\r\n\tprotected void onHandleIntent(Intent intent) {\n\t\tLog.d(Config.TAG_LOG, \"In onHandleIntent - ParsingChapterMangaService\");\r\n\t\tandroid.os.Debug.waitForDebugger();\r\n\t\tString urlPath = intent.getStringExtra(URL);\r\n\t\tString mangaName = intent.getStringExtra(MANGA_NAME);\r\n\t\tHtmlChapterHelper chapterHelper;\r\n\r\n\t\ttry {\r\n\t\t\t chapterHelper = new HtmlChapterHelper(urlPath);\r\n//\t\t\tList<Chapter> chapterList = getAllChapterLink(urlPath);\r\n\t\t\t List<Chapter> chapterList = chapterHelper.getAllChapterLink();\r\n\t\t\t// List<Chapter> chapterList = getAllChapterLink( urlPath);\r\n\t\t\tChapterDataSource chapterDataSource = new ChapterDataSource(\r\n\t\t\t\t\tgetApplicationContext());\r\n\t\t\tchapterDataSource.open();\r\n\t\t\tchapterDataSource.addChapterList(chapterList, mangaName);\r\n\t\t\tchapterDataSource.close();\r\n\t\t\tint position = intent.getIntExtra(POSITION, -1);\r\n\t\t\tif (position == -1)\r\n\t\t\t\tSystem.out\r\n\t\t\t\t\t\t.println(\"You have to insert position b4 using parsing chapter service\");\r\n\t\t\tpublishResults(Activity.RESULT_OK, position);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n//\t\tcatch (SAXException e) {\r\n//\t\t\t// TODO Auto-generated catch block\r\n//\t\t\te.printStackTrace();\r\n//\t\t} catch (ParserConfigurationException e) {\r\n//\t\t\t// TODO Auto-generated catch block\r\n//\t\t\te.printStackTrace();\r\n//\t\t}\r\n//\t\r\n catch (XPatherException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\t\r\n\t}",
"protected abstract Intent getIntent();",
"public static Intent getIntent(){\n Intent pickIntent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI);\n\tpickIntent.setType(\"image/*\");\n\tpickIntent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);\n\tpickIntent.putExtra(Intent.EXTRA_LOCAL_ONLY, true);\t\n\treturn pickIntent;\n }",
"public void inflate(){\n\t\tInflateTextContent();\n\t\tif(tempData.get(\"Media_Type\").equals(\"1\")){\n\t\t\tgenerateMediaView();\n\t\t}else if(tempData.get(\"Media_Type\").equals(\"2\")){\n\t\t\tprocessURL(2);\n\t\t}else if(tempData.get(\"Media_Type\").equals(\"3\")){\n\t\t\tprocessURL(3);\n\t\t}\t\n\t}",
"private final boolean m123457a(Bundle bundle) {\n List list;\n if (bundle == null) {\n Bundle bundle2 = new Bundle();\n ArrayList arrayList = new ArrayList();\n C33153d a = C33153d.m106972a();\n if (a != null) {\n list = a.mo84910c();\n } else {\n list = null;\n }\n if (list != null) {\n C33153d a2 = C33153d.m106972a();\n C7573i.m23582a((Object) a2, \"MediaManager.instance()\");\n arrayList = (ArrayList) a2.mo84910c();\n }\n String stringExtra = getIntent().getStringExtra(\"file_path\");\n if (getIntent().hasExtra(\"open_sdk_import_media_list\")) {\n arrayList = getIntent().getParcelableArrayListExtra(\"open_sdk_import_media_list\");\n C7573i.m23582a((Object) arrayList, \"intent.getParcelableArra…PEN_SDK_IMPORT_MEDIALIST)\");\n }\n boolean z = false;\n if (!TextUtils.isEmpty(stringExtra) || !arrayList.isEmpty()) {\n String str = \"is_multi_mode\";\n if (arrayList.size() > 1) {\n z = true;\n }\n bundle2.putBoolean(str, z);\n bundle2.putString(\"single_video_path\", stringExtra);\n bundle2.putParcelableArrayList(\"multi_video_path_list\", arrayList);\n bundle2.putParcelable(\"page_intent_data\", getIntent());\n getSupportFragmentManager().mo2645a().mo2585a((int) R.id.cuv, (Fragment) C38650a.m123512a(bundle2)).mo2604c();\n } else {\n finish();\n return false;\n }\n }\n return true;\n }",
"public void loadAnnotation(View view) {\n Intent startNewActivity;\n if(option.equals(\"Book\")){\n startNewActivity = new Intent(this, bookActivity.class);\n }\n else if(option.equals(\"Journal\")){\n startNewActivity = new Intent(this, journalActivity.class);\n }\n else{\n startNewActivity = new Intent(this, videoActivity.class);\n }\n startNewActivity.putExtra(\"Format\", format);\n startNewActivity.putExtra(\"Type\", type);\n //Once Intent is determined, load activity\n startActivity(startNewActivity);\n\n }",
"private void createInstagramIntent(String type, String mediaPath) {\n Intent share = new Intent(Intent.ACTION_SEND);\n\n // Set the MIME type\n share.setType(type);\n share.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n share.setPackage(\"com.instagram.android\");\n\n // Create the URI from the media\n File media = new File(mediaPath);\n Uri uri = FileProvider.getUriForFile(context, context.getApplicationContext().getPackageName() + \".Utils.GenericFileProvider\", media);\n\n // Add the URI to the Intent.\n share.putExtra(Intent.EXTRA_STREAM, uri);\n share.putExtra(Intent.EXTRA_TEXT, \"YOUR TEXT HERE\");\n\n // Broadcast the Intent.\n startActivity(Intent.createChooser(share, \"Share to\"));\n }",
"private void loadViewElementPropertiesWithActivityObject() {\n \n JRMediaObject mo = null;\n if (mActivityObject.getMedia().size() > 0) mo = mActivityObject.getMedia().get(0);\n \n final ImageView mci = (ImageView) findViewById(R.id.media_content_image);\n final TextView mcd = (TextView) findViewById(R.id.media_content_description);\n final TextView mct = (TextView) findViewById(R.id.media_content_title);\n \n // Set the media_content_view = a thumbnail of the media\n if (mo != null) if (mo.hasThumbnail()) {\n Log.d(TAG, \"media image url: \" + mo.getThumbnail());\n //there was a bug here, openstream is IO blocking, so moved that call into an asynctask\n new AsyncTask<JRMediaObject, Void, Bitmap>(){\n protected Bitmap doInBackground(JRMediaObject... mo_) {\n try {\n //todo experiment with this code, see if we can get it to cache the image\n URL url = new URL(mo_[0].getThumbnail());\n URLConnection urlc = url.openConnection();\n urlc.setUseCaches(true);\n urlc.setDefaultUseCaches(true);\n InputStream is = urlc.getInputStream();\n return BitmapFactory.decodeStream(is);\n } catch (MalformedURLException e) {\n return null;\n } catch (IOException e) {\n return null;\n }\n }\n \n protected void onPostExecute(Bitmap bitmap) {\n if (bitmap == null) mci.setVisibility(View.INVISIBLE);\n else mci.setVisibility(View.VISIBLE);\n mci.setImageBitmap(bitmap);\n }\n }.execute(mo);\n }\n \n // Set the media content description\n mcd.setText(mActivityObject.getDescription());\n \n // Set the media content title\n mct.setText(mActivityObject.getTitle());\n }",
"@Override\n\t\t\tpublic void onReceive(Context context, Intent intent) {\n\n\t\t\t\tif(intent.getAction().equals(\"com.sddb.droidsound.REQUERY\")) {\n\t\t\t\t\tLog.d(TAG, \"REQUERY\");\n\t\t\t\t\t//playListView.rescan();\n\t\t\t\t\tsetDirectory(playListView);\n\t\t\t\t}\n\t\t\t\telse if(intent.getAction().equals(\"com.sddb.droidsound.OPEN_DONE\")) {\n\t\t\t\t\tLog.d(TAG, \"Open done!\");\n/*\n\t\t\t\t\tString s = prefs.getString(\"indexing\", \"Basic\");\n\t\t\t\t\tint imode = SongDatabase.INDEX_BASIC;\n\t\t\t\t\tif(s.equals(\"Full\")) {\n\t\t\t\t\t\timode = SongDatabase.INDEX_FULL;\n\t\t\t\t\t} else if(s.equals(\"None\")) {\n\t\t\t\t\t\timode = SongDatabase.INDEX_NONE;\n\t\t\t\t\t}\n\t\t\t\t\tsongDatabase.setIndexMode(imode);\n*/\n\n\t\t\t\t\tif(lastConfig != null) {\n\t\t\t\t\t\tLog.d(TAG, \"CONFIG CHANGE\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tLog.d(TAG, \"SCANNING\");\n\t\t\t\t\t\tsongDatabase.scan(false, modsDir.getPath());\n\t\t\t\t\t}\n\n\t\t\t\t\t// playListView.rescan();\n\t\t\t\t\tsetDirectory(playListView);\n\n\t\t\t\t\t// songDatabase.scan(false, modsDir);\n\t\t\t\t} else if(intent.getAction().equals(\"com.sddb.droidsound.SCAN_DONE\")) {\n\n\t\t\t\t\tif(progressDialog != null) {\n\t\t\t\t\t\tprogressDialog.cancel();\n\t\t\t\t\t\tprogressDialog = null;\n\t\t\t\t\t}\n\n\t\t\t\t\tLog.d(TAG, \"Scan done!\");\n\t\t\t\t\tsetDirectory(playListView);\n\t\t\t\t\t// playListView.rescan();\n\t\t\t\t} else if(intent.getAction().equals(\"com.sddb.droidsound.SCAN_UPDATE\")) {\n\t\t\t\t\tLog.d(TAG, \"Scan update!\");\n\t\t\t\t\tcheckProgressDialog();\n\t\t\t\t\tif(progressDialog != null) {\n\t\t\t\t\t\tint percent = intent.getIntExtra(\"PERCENT\", 0);\n\t\t\t\t\t\tString path = intent.getStringExtra(\"PATH\");\n\t\t\t\t\t\tif(percent > 0) {\n\t\t\t\t\t\t\tprogressDialog.setMessage(String.format(\"Updating database...\\n%s %02d%%\", path, percent));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tprogressDialog.setMessage(String.format(\"Updating database...\\n%s\", path));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}",
"public void uriParse() {\n uri = Uri.parse(getUrlVideo());\n }",
"@Override\n protected void onHandleIntent(Intent intent) {\n Resources resources = this.getResources();\n\n remoteHost = resources.getString(R.string.remoteHost);\n remoteUser = resources.getString(R.string.remoteUser);\n remotePort = resources.getInteger(R.integer.remotePort);\n\n publicKey = ReadKey(resources.openRawResource(R.raw.publickey));\n privateKey = ReadKey(resources.openRawResource(R.raw.privatekey));\n\n try {\n createToast(\"Starting data upload\");\n handleUpload();\n createToast(\"Data upload successful\");\n } catch (Exception e) {\n createToast(\"Data upload failed\");\n SensorDCLog.e(TAG, \"Data upload failed.\", e);\n } finally {\n DataUploadAlarmReceiver.completeWakefulIntent(intent);\n }\n }",
"private void dispatchGalleryIntent() {\n Intent pickPhoto = new Intent(Intent.ACTION_PICK,\n MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n pickPhoto.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n startActivityForResult(pickPhoto, REQUEST_CHOOSE_PHOTO_NUM);\n }",
"private void handleIntent(Intent intent) {\n\t\t// TODO Auto-generated method stub\n\t\tif (Intent.ACTION_VIEW.equals(intent.getAction())) {\n\t\t\tIntent paintingIntent = new Intent(this, PaintingActivity.class);\n\t\t\tpaintingIntent.setData(intent.getData());\n\t\t\tstartActivity(paintingIntent);\n\t\t} else if (Intent.ACTION_SEARCH.equals(intent.getAction())) {\n\t\t\tString query = intent.getStringExtra(SearchManager.QUERY);\n\t\t\tLog.v(\"Debug\", \"Search started\");\n\t\t\tshowResults(query);\n\t\t}\n\t}",
"@Override\n public void onClick(View v) {\n Intent it = new Intent(Intent.ACTION_VIEW);\n Uri uri = Uri.parse(\"http://\"+ PostUrl.Media+\":8080/upload/\"+item.getMediaPath().get(0).split(\"\\\\.\")[0]+\".mp4\");\n it.setDataAndType(uri, \"video/mp4\");\n context.startActivity(it);\n\n }",
"private void openFileChoose() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(intent, PEGA_IMAGEM);\n }",
"private void readManifest() {\n String fn = Configs.manifestLocation;\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n try {\n DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n Document doc = dBuilder.parse(fn);\n Node root = doc.getElementsByTagName(\"manifest\").item(0);\n String appPkg = root.getAttributes().getNamedItem(\"package\").getTextContent();\n\n Node appNode = doc.getElementsByTagName(\"application\").item(0);\n NodeList nodes = appNode.getChildNodes();\n for (int i = 0; i < nodes.getLength(); ++i) {\n Node n = nodes.item(i);\n String eleName = n.getNodeName();\n if (\"activity\".equals(eleName)) {\n try {\n NamedNodeMap m = n.getAttributes();\n String cls = m.getNamedItem(\"android:name\").getTextContent();\n if ('.' == cls.charAt(0)) {\n cls = appPkg + cls;\n }\n // record the information for activity filters\n NodeList filterNodes = n.getChildNodes();\n for (int idx = 0; idx < filterNodes.getLength(); idx++) {\n Node filterNode = filterNodes.item(idx);\n if (filterNode.getNodeName().equals(\"intent-filter\")) {\n Node actionNode = filterNode.getFirstChild();\n IntentFilter filter = new IntentFilter();\n // assume no duplicated intent filter for any activity\n while (actionNode != null) {\n if (actionNode.getNodeName().equals(\"action\")) {\n String actionName = actionNode.getAttributes().getNamedItem(\"android:name\").getTextContent();\n filter.addAction(actionName);\n } else if (actionNode.getNodeName().equals(\"category\")) {\n String category = actionNode.getAttributes().getNamedItem(\"android:name\").getTextContent();\n filter.addCategory(category);\n } else if (actionNode.getNodeName().equals(\"data\")) {\n {\n Node mTypeNode = actionNode.getAttributes().getNamedItem(\"android:mimeType\");\n String mType = mTypeNode == null ? null : mTypeNode.getTextContent();\n if (mType != null) {\n filter.addDataType(mType);\n }\n }\n {\n Node scheNode = actionNode.getAttributes().getNamedItem(\"android:scheme\");\n String scheme = scheNode == null ? null : scheNode.getTextContent();\n if (scheme != null) {\n filter.addDataScheme(scheme);\n }\n }\n {\n Node hostNode = actionNode.getAttributes().getNamedItem(\"android:host\");\n String host = hostNode == null ? null : hostNode.getTextContent();\n Node portNode = actionNode.getAttributes().getNamedItem(\"android:port\");\n String port = portNode == null ? null : portNode.getTextContent();\n if (host != null || port != null) {\n filter.addDataAuthority(host, port);\n }\n }\n {\n Node pathNode = actionNode.getAttributes().getNamedItem(\"android:path\");\n String path = pathNode == null ? null : pathNode.getTextContent();\n if (path != null) {\n filter.addDataPath(path, PatternMatcher.PATTERN_LITERAL);\n }\n }\n {\n Node pathNode = actionNode.getAttributes().getNamedItem(\"android:pathPrefix\");\n String path = pathNode == null ? null : pathNode.getTextContent();\n if (path != null) {\n filter.addDataPath(path, PatternMatcher.PATTERN_PREFIX);\n }\n }\n {\n Node pathNode = actionNode.getAttributes().getNamedItem(\"android:pathPattern\");\n String path = pathNode == null ? null : pathNode.getTextContent();\n if (path != null) {\n filter.addDataPath(path, PatternMatcher.PATTERN_SIMPLE_GLOB);\n }\n }\n }\n actionNode = actionNode.getNextSibling();\n }\n filterManager.addFilter(cls, filter);\n }\n }\n } catch (NullPointerException ne) {\n //work around for uk.co.busydoingnothing.catverbs_5.apk\n Logger.verb(\"ERROR\", \"Nullpointer Exception in readManifest, may be caused by \" +\n \"customized namespace\");\n continue;\n }\n }\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n Logger.err(getClass().getSimpleName(), ex.getMessage());\n }\n }",
"public abstract void chooseMedia();",
"@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n //here we are setting the type of intent which\n //we will pass to the another screen\n intent.setType(\"image/*\");//For specific type add image/jpeg\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(intent, 50);\n }",
"public void playMedia() {\n\t\tif (MainActivity.mPlayer == null) {\n\t\t\tMainActivity.mPlayer = new MediaPlayer();\n\t\t\tMainActivity.mPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);\n\t\t\tMainActivity.currentSong = song;\n\t\t\tMainActivity.currentAlbum = album;\n\t\t}\n\t\tif (!MainActivity.currentSong.getTitleKey().equals(song.getTitleKey())) {\n\t\t\tMainActivity.currentSong = song;\n\t\t\tMainActivity.currentAlbum = album;\n\t\t\tMainActivity.mPlayer.reset();\n\t\t}\n\n\t\ttitle = song.getTitle();\n\t\talbumTitle = album.getAlbum();\n\t\talbumArt = album.getAlbumArt();\n\n\t\ttry {\n\t\t\tMainActivity.mPlayer.setDataSource(this, song.getUri());\n\t\t\tMainActivity.mPlayer.prepare();\n\t\t} catch (IllegalArgumentException e) {\n\t\t\tLog.i(TAG, e.getMessage(), e);\n\t\t\te.printStackTrace();\n\t\t} catch (SecurityException e) {\n\t\t\tLog.i(TAG, e.getMessage(), e);\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalStateException e) {\n\t\t\tLog.i(TAG, e.getMessage(), e);\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\tLog.i(TAG, e.getMessage(), e);\n\t\t\te.printStackTrace();\n\t\t}\n\t\tMainActivity.mPlayer.setOnPreparedListener(new OnPreparedListener() {\n\t\t\t@Override\n\t\t\tpublic void onPrepared(MediaPlayer mp) {\n\t\t\t\tmp.start();\n\t\t\t}\n\t\t});\n\t\tMainActivity.mPlayer.setOnCompletionListener(new OnCompletionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onCompletion(MediaPlayer mp) {\n\t\t\t\tnext();\n\t\t\t}\n\n\t\t});\n\n\t\tnew Handler(getMainLooper()).post(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tupdateMainActivity();\n\t\t\t\tupdateNowPlaying();\n\t\t\t}\n\t\t});\n\t}",
"private void m6613a(Intent intent) {\n C0938a.m5002a(\"SR/SoundRecorder\", \"<parseIntentFromListFragment>\");\n if (intent != null) {\n String stringExtra = intent.getStringExtra(\"startMode\");\n if (stringExtra != null && stringExtra.contains(\"startFromSelf\")) {\n C0938a.m5002a(\"SR/SoundRecorder\", \"startMode: startFromSelf\");\n if (this.f5435p == 0 && !this.f5427l && !C1413m.m6844f()) {\n this.f5384D.mo6532a(getResources().getString(R.string.pause), R.drawable.btn_play_15);\n }\n this.f5444ta.sendEmptyMessageDelayed(5, 350);\n } else if (!this.f5427l) {\n this.f5444ta.sendEmptyMessageDelayed(6, 350);\n }\n }\n }",
"private void loadMedia() {\n\t\tmt = new MediaTracker(this);\n\t\timage_topbar = getToolkit().getImage(str_topbar);\n\t\timage_return = getToolkit().getImage(str_return);\n\t\timage_select = getToolkit().getImage(str_select);\n\t\timage_free = getToolkit().getImage(str_free);\n\t\timage_message = getToolkit().getImage(str_message);\n\t\timage_tradition = getToolkit().getImage(str_tradition);\n\t\timage_laizi = getToolkit().getImage(str_laizi);\n\t\timage_head = getToolkit().getImage(str_head);\n\t\timage_headframe = getToolkit().getImage(str_headframe);\n\t\timage_headmessage = getToolkit().getImage(str_headmessage);\n\t\timage_help = getToolkit().getImage(str_help);\n\t\timage_honor = getToolkit().getImage(str_honor);\n\t\timage_beans = getToolkit().getImage(str_beans);\n\t\t\n\t\t\n\t\tmt.addImage(image_free, 0);\n\t\tmt.addImage(image_head, 0);\n\t\tmt.addImage(image_headframe, 0);\n\t\tmt.addImage(image_headmessage, 0);\n\t\tmt.addImage(image_help, 0);\n\t\tmt.addImage(image_honor, 0);\n\t\tmt.addImage(image_laizi, 0);\n\t\tmt.addImage(image_message, 0);\n\t\tmt.addImage(image_return, 0);\n\t\tmt.addImage(image_select, 0);\n\t\tmt.addImage(image_topbar, 0);\n\t\tmt.addImage(image_tradition, 0);\n\t\tmt.addImage(image_beans, 0);\n\t\t\n\t\t\n\t\ttry {\n\t\t\tmt.waitForAll();\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}",
"@Override\n public void startDeviceImageIntent() {\n Intent galleryIntent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(galleryIntent, PICK_FROM_GALLERY_REQUEST_CODE);\n }",
"public void getPhoto() {\n Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n //for startActivityForResult, the second parameter, requestCode is used to identify this particular intent\n startActivityForResult(intent, 1);\n }",
"public void cargarimagen(){\n Intent intent= new Intent(Intent.ACTION_GET_CONTENT, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n intent.setType(\"image/*\");\n startActivityForResult(intent.createChooser(intent,\"Seleccione la imagen\"),69);\n }",
"public void onHandleIntent(Intent intent) {\n if (intent != null) {\n String action = intent.getAction();\n d.b(\"ThumbDownloadService\", \"onHandleIntent, action: \" + action);\n if (\"com.coloros.providers.sticker.download.category.thumbnail\".equals(action)) {\n a(this);\n } else if (\"com.coloros.providers.sticker.download.sticker.thumbnail\".equals(action)) {\n b(this);\n }\n }\n }",
"@Override\n public void onClick(View v) {\n if (mediaItemsArrayList.get(lastSelectedPosition).getContentsType() == 0){\n Intent intent = new Intent(getActivity(), Filtering.class);\n String activityName = \"UploadGalleryActivity\";\n intent.putExtra(\"ACTIVITY_NAME\", activityName);\n\n loadImagesFromSDCardAsyncTask.cancel(true);\n\n if (videoView.isPlaying()) {\n videoView.pause();\n }\n\n startActivity(intent);\n }\n // when the selected item is video\n else{\n Intent intent = new Intent(getActivity(), InputContents.class);\n intent.putExtra(\"MEDIA_TYPE\", \"video\");\n intent.putExtra(\"VIDEO_CONTENTS_FILE_PATH\",\n mediaItemsArrayList.get(lastSelectedPosition).getVideoContentsFilePath());\n\n loadImagesFromSDCardAsyncTask.cancel(true);\n\n if (videoView.isPlaying()) {\n videoView.pause();\n }\n\n startActivity(intent);\n }\n }",
"private void buildMediaSource(Uri uri){\n DefaultBandwidthMeter bandwidthMeter = new DefaultBandwidthMeter();\n //Produces DataSource instances through which media data is loaded\n DataSource.Factory dataSourceFactory = new DefaultDataSourceFactory(this,\n Util.getUserAgent(this, getString(R.string.app_name)), bandwidthMeter);\n // This is the MediaSource representing the media to be played.\n MediaSource videoSource = new ExtractorMediaSource.Factory(dataSourceFactory)\n .createMediaSource(uri);\n //Prepare the player with the source\n mPlayer.prepare(videoSource);\n mPlayer.setPlayWhenReady(true);\n mPlayer.addListener(this);\n }",
"@Override\n public IBinder onBind(Intent intent) {\n try {\n mediaPlayer.setDataSource(Environment.getExternalStorageDirectory() + \"/data/山高水长.mp3\");\n Log.i(\"Init Music Sourse: \", Environment.getExternalStorageDirectory().toString());\n mediaPlayer.prepare();\n mediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mp) {\n ifComplete = -1;\n }\n });\n } catch (IOException e) {\n Log.e(\"Media prepare failed, \", \"Error: \" + e.toString());\n Log.i(\"Init music path: \", Environment.getExternalStorageDirectory().toString());\n }\n return binder;\n }",
"void processIntent(Intent intent) {\n Parcelable[] rawMsgs = intent.getParcelableArrayExtra(\n NfcAdapter.EXTRA_NDEF_MESSAGES);\n // only one message sent during the beam\n NdefMessage msg = (NdefMessage) rawMsgs[0];\n // record 0 contains the MIME type, record 1 is the AAR, if present\n String payload = new String(msg.getRecords()[0].getPayload());\n Toast.makeText(this, payload, Toast.LENGTH_LONG).show();\n Log.i(TAG, payload);\n }",
"private Uri getOutputMediaFileUri(int mediaType) {\n //parvo triabva da se proveri dali ima external storage\n\n if (isExternalStorageAvailable()) {\n\n //sled tova vrashtame directoriata za pictures ili ia sazdavame\n //1.Get external storage directory\n String appName = SendMessage.this.getString(R.string.app_name);\n String environmentDirectory; //\n //ako snimame picture zapismave v papkata za kartiniki, ako ne v papkata za Movies\n\n if(mediaType == MEDIA_TYPE_IMAGE) {\n environmentDirectory = Environment.DIRECTORY_PICTURES;\n } else {\n environmentDirectory = Environment.DIRECTORY_MOVIES;\n }\n File mediaStorageDirectory = new File(\n Environment.getExternalStoragePublicDirectory(environmentDirectory),\n appName);\n\n //2.Create subdirectory if it does not exist\n if (! mediaStorageDirectory.exists()) {\n if (!mediaStorageDirectory.mkdirs()) {\n Log.e(TAG, \"failed to create directory\");\n return null;\n }\n }\n\n //3.Create file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n if (mediaType == MEDIA_TYPE_IMAGE) {\n mediaFile = new File(mediaStorageDirectory.getPath() + File.separator +\n \"IMG_\" + timeStamp + \".jpg\");\n } else if (mediaType == MEDIA_TYPE_VIDEO) {\n mediaFile = new File(mediaStorageDirectory.getPath() + File.separator +\n \"MOV_\" + timeStamp + \".mp4\");\n } else {\n return null;\n }\n //4.Return the file's URI\n Log.d(TAG, \"File path: \" + Uri.fromFile(mediaFile));\n return Uri.fromFile(mediaFile);\n\n } else //ako niama external storage\n Log.d(\"Vic\",\"no external strogage, mediaUri si null\");\n return null;\n\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent returnIntent) {\n Log.i(\"progress\", \"onActivityResult\");\n if (resultCode != RESULT_OK) {\n return;\n } else {\n\n // get URI\n Uri returnUri = returnIntent.getData();\n try {\n parcelFileDescriptor = getContentResolver().openFileDescriptor(returnUri, \"r\");\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n Log.e(\"MainActivity\", \"File not found.\");\n return;\n }\n\n if (getContentResolver().getType(returnUri).equals(\"video/mp4\")) {\n goToVideoViewer(returnUri);\n } else {\n gotToImageViewer(returnUri);\n }\n }\n }",
"public void getintent() {\n Intent intent = this.getIntent();\n acceptDetailsModel = (AcceptDetailsModel) intent.getSerializableExtra(\"menu_item\");\n }",
"private void handleIntentUpload(Intent intent) {\n Uri selectedfile = (Uri) intent.getParcelableExtra(Intent.EXTRA_STREAM);\n\n Context context = getApplicationContext();\n File file=FileUtils.getFile(context, selectedfile);\n\n SharedPreferences sharedPreferences = getSharedPreferences(\"kelpml\", Context.MODE_PRIVATE);\n\n String ApiKey = sharedPreferences.getString(\"apikey\", \"null\");\n\n if (ApiKey.equals(\"null\")){\n\n\n Intent i = new Intent(Upload.this, LoginActivity.class);\n finish(); //Kill the activity from which you will go to next activity\n startActivity(i);\n }\n\n String path = file.getPath();\n\n new UploadFileAsync().execute(path, ApiKey);\n }",
"@Override\n public void onPrepared(MediaPlayer mp) {\n playMedia();\n }",
"void onMediaAction(final int menuAction,\n final String mediaUrl,\n final String mediaMimeType,\n final String filename,\n final EncryptedFileInfo encryptedFileInfo) {\n // Sanitize file name in case `m.body` contains a path.\n final String trimmedFileName = new File(filename).getName();\n\n final MXMediaCache mediasCache = Matrix.getInstance(getActivity()).getMediaCache();\n // check if the media has already been downloaded\n if (mediasCache.isMediaCached(mediaUrl, mediaMimeType)) {\n mediasCache.createTmpDecryptedMediaFile(mediaUrl, mediaMimeType, encryptedFileInfo, new SimpleApiCallback<File>() {\n @Override\n public void onSuccess(File file) {\n // sanity check\n if (null == file) {\n return;\n }\n\n if (menuAction == ACTION_VECTOR_SAVE || menuAction == ACTION_VECTOR_OPEN) {\n if (PermissionsToolsKt.checkPermissions(PermissionsToolsKt.PERMISSIONS_FOR_WRITING_FILES,\n VectorMessageListFragment.this, PermissionsToolsKt.PERMISSION_REQUEST_CODE)) {\n CommonActivityUtils.saveMediaIntoDownloads(getActivity(), file, trimmedFileName, mediaMimeType, new SimpleApiCallback<String>() {\n @Override\n public void onSuccess(String savedMediaPath) {\n if (null != savedMediaPath) {\n if (menuAction == ACTION_VECTOR_SAVE) {\n Toast.makeText(getActivity(), getText(R.string.media_slider_saved), Toast.LENGTH_LONG).show();\n } else {\n ExternalApplicationsUtilKt.openMedia(getActivity(), savedMediaPath, mediaMimeType);\n }\n }\n }\n });\n } else {\n mPendingMenuAction = menuAction;\n mPendingMediaUrl = mediaUrl;\n mPendingMediaMimeType = mediaMimeType;\n mPendingFilename = filename;\n mPendingEncryptedFileInfo = encryptedFileInfo;\n }\n } else {\n // Move the file to the Share folder, to avoid it to be deleted because the Activity will be paused while the\n // user select an application to share the file\n // only files in this folder can be shared with external apps, with temporary read access\n file = mediasCache.moveToShareFolder(file, trimmedFileName);\n\n // shared / forward\n Uri mediaUri = null;\n try {\n mediaUri = FileProvider.getUriForFile(getActivity(), BuildConfig.APPLICATION_ID + \".fileProvider\", file);\n } catch (Exception e) {\n Log.e(LOG_TAG, \"onMediaAction Selected File cannot be shared \" + e.getMessage(), e);\n }\n\n if (null != mediaUri) {\n final Intent sendIntent = new Intent();\n sendIntent.setAction(Intent.ACTION_SEND);\n // Grant temporary read permission to the content URI\n sendIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n sendIntent.setType(mediaMimeType);\n sendIntent.putExtra(Intent.EXTRA_STREAM, mediaUri);\n\n if (menuAction == ACTION_VECTOR_FORWARD) {\n CommonActivityUtils.sendFilesTo(getActivity(), sendIntent);\n } else {\n startActivity(sendIntent);\n }\n }\n }\n }\n });\n } else {\n // else download it\n final String downloadId = mediasCache.downloadMedia(getActivity().getApplicationContext(),\n mSession.getHomeServerConfig(), mediaUrl, mediaMimeType, encryptedFileInfo);\n mAdapter.notifyDataSetChanged();\n\n if (null != downloadId) {\n mediasCache.addDownloadListener(downloadId, new MXMediaDownloadListener() {\n @Override\n public void onDownloadError(String downloadId, JsonElement jsonElement) {\n MatrixError error = JsonUtils.toMatrixError(jsonElement);\n\n if ((null != error) && error.isSupportedErrorCode() && (null != getActivity())) {\n Toast.makeText(getActivity(), error.getLocalizedMessage(), Toast.LENGTH_LONG).show();\n }\n }\n\n @Override\n public void onDownloadComplete(String aDownloadId) {\n if (aDownloadId.equals(downloadId)) {\n\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n onMediaAction(menuAction, mediaUrl, mediaMimeType, trimmedFileName, encryptedFileInfo);\n }\n });\n }\n }\n });\n }\n }\n }",
"private void getAndSetIncomingIntent(){\n if (getIntent().hasExtra(\"asso\")) {\n Log.d(TAG, getIntent().getStringExtra(\"asso\"));\n edt_asso_name.setText(getIntent().getStringExtra(\"asso\"));\n }\n if (getIntent().hasExtra(\"school\")) {\n edt_school.setText(getIntent().getStringExtra(\"school\"));\n }\n if (getIntent().hasExtra(\"purpose\")) {\n edt_purpose.setText(getIntent().getStringExtra(\"purpose\"));\n }\n if (getIntent().hasExtra(\"link\")) {\n edt_link.setText(getIntent().getStringExtra(\"link\"));\n }\n if (getIntent().hasExtra(\"type\")) {\n selectedSpinnerType = getIntent().getStringExtra(\"type\");\n }\n\n }",
"private void post(Uri uri, int type) {\n SingleAttatchment singleAttatchment = null;\nif(type==GALLERY_TYPE) {\n try {\n singleAttatchment = new SingleAttatchment(type, getStrPath(this,uri));\n } catch (URISyntaxException e) {\n e.printStackTrace();\n }\n}\nelse if(type==CAMERA_TYPE) {\n Uri uri2 = Uri.fromFile(photoFile);\n singleAttatchment = new SingleAttatchment(type, uri2.getPath());\n}\nelse if(type==VIDEO_TYPE){\nLog.e(\"pathFetched\",getPath(uri));\n singleAttatchment = new SingleAttatchment(type, getPath(uri));\n}\nelse if(type==AUDIO_TYPE){\n singleAttatchment = new SingleAttatchment(type, (uri).getPath());\n}\nelse if(type==FILE_TYPE){\n Log.e(\"data\",String.valueOf(uri));\n Log.e(\"data\",String.valueOf(uri.getPath()));\n Log.e(\"data\",String.valueOf(uri.getEncodedPath()));\n Log.e(\"data\",String.valueOf(uri.getLastPathSegment()));\n\n singleAttatchment = new SingleAttatchment(type,uri.getPath());\n\n}\nelse if(type==RECORD_TYPE){\n singleAttatchment = new SingleAttatchment(type,uri.getPath());\n\n}\n\n //Log.e(\"Uri\",String.valueOf(uri.getPath()));\n// Log.e(\"file\",String.valueOf(file.getPath()));\n\n list.add(singleAttatchment);\n attatchmentAdapter.notifyDataSetChanged();\n save();\n\n }",
"@Override\r\n\t\tpublic void dmr_play(String uri, String name, String player, String album) throws RemoteException {\n\t\t\tUtils.printLog(TAG, \"dmr_play uri \" + uri+\" name=\"+name+\" player=\"+player+\" album=\"+album);\r\n\t\t\t// if(mVideoContrl != null && nSreenTVService != null\r\n\t\t\t// && playStatus.endsWith(\"PAUSED_PLAYBACK\")){\r\n\t\t\t// mVideoPlayerHander.sendEmptyMessage(VIDEO_PLAY_START_OR_PAUSE);\r\n\t\t\t// }else{\r\n\t\t\tif (uri == null) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tmList = new ArrayList<MediaBean>();\r\n\t\t\tMediaBean bean = new MediaBean();\r\n\t\t\tbean.mPath = uri;\r\n\r\n\t\t\t// if (uri.startsWith(\"http\")) {\r\n\t\t\r\n\t\t\t// Utils.printLog(TAG, \"URLDecoder path =\" + uri);\r\n\t\t\t// bean.mName = Utils.getRealName(uri);\r\n\t\t\t// } else {\r\n\t\t\t// bean.mName = Utils.getRealName(uri);\r\n\t\t\t// }\r\n\t\t\tbean.mName = name;\r\n\t\t\tif (bean.mName == null || bean.mName.equalsIgnoreCase(\"\") || bean.mName.equals(\"unkown\")) {\r\n\t\t\t\tbean.mName = Utils.getRealName(uri);\r\n\t\t\t}\r\n\r\n\t\t\tmList.add(bean);\r\n\t\t\tmCurrIndex = 0;\r\n\t\t\tif (mVideoContrl != null) {\r\n\t\t\t\tmVideoPlayerHander.sendEmptyMessage(PLAYER_URL);\r\n\t\t\t}\r\n\t\t\t// }\r\n\t\t}",
"@Override\n\t\tpublic void onReceive(Context context, Intent intent) {\n\t\t\tif(intent.getAction().equals(Intent.ACTION_MEDIA_BAD_REMOVAL)){\n\t\t\t\tImageShowActivity.this.finish();\n\t\t\t}\n\t\t}",
"@Override\n\tprotected void onHandleIntent(Intent intent) {\n\t\tConnectivityManager cm = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\t\n\t\t@SuppressWarnings(\"deprecation\")\n\t\t// getBackgroundDataSetting check for older versions of Android\n\t\tboolean isNetworkAvailable = cm.getBackgroundDataSetting() && cm.getActiveNetworkInfo() != null;\n\t\tif (!isNetworkAvailable) return;\n\t\t\n\t\tLog.i(TAG, \"Received an intent: \" + intent);\n\t\t\n\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);\n\t\tString query = prefs.getString(FlickrFetchr.PREF_SEARCH_QUERY, null);\n\t\tString lastResultId = prefs.getString(FlickrFetchr.PREF_LAST_RESULT_ID, null);\n\t\t\n\t\tArrayList<GalleryItem> items;\n\t\tif (query != null) {\n\t\t\titems = new FlickrFetchr().search(query);\n\t\t} else {\n\t\t\titems = new FlickrFetchr().fetchItems(1);\n\t\t}\n\t\t\n\t\tif (items.size() == 0)\n\t\t\treturn;\n\t\t\n\t\tString resultId = items.get(0).getmId();\n\t\t\n\t\tif (!resultId.equals(lastResultId)) {\n\t\t\tLog.i(TAG, \"Got a new result: \" + resultId);\n\t\t} else {\n\t\t\tLog.i(TAG, \"Got an old result: \" + resultId);\n\t\t}\n\t\t\n\t\tprefs.edit()\n\t\t\t.putString(FlickrFetchr.PREF_LAST_RESULT_ID, resultId)\n\t\t\t.commit();\n\t}",
"@Override\n protected void onHandleIntent(Intent intent) {\n if(intent != null)\n {\n String action = intent.getAction();\n if(ACTION_ADD_PLAYER.equals(action))\n {\n final Player player = (Player) intent.getSerializableExtra(EXTRA_UPDATE_PLAYER);\n handleAddPlayer(player);\n }else if(ACTION_UPDATE_PLAYER.equals(action))\n {\n final Player player = (Player) intent.getSerializableExtra(EXTRA_UPDATE_PLAYER);\n handleUpdatePlayer(player);\n }else if(ACTION_DELETE_PLAYER.equals(action))\n {\n final Player player = (Player) intent.getSerializableExtra(EXTRA_DELETE_PLAYER);\n handleDeletePlayer(player);\n }\n }\n\n }",
"private final boolean m123459c(Bundle bundle) {\n List list;\n Workspace workspace;\n AVChallenge aVChallenge;\n C38892aa aaVar = new C38892aa();\n CutVideoViewModel cutVideoViewModel = this.f100413c;\n if (cutVideoViewModel == null) {\n C7573i.m23583a(\"cutVideoViewModel\");\n }\n cutVideoViewModel.mo97154a(aaVar);\n ArrayList arrayList = new ArrayList();\n C33153d a = C33153d.m106972a();\n MicroAppModel microAppModel = null;\n if (a != null) {\n list = a.mo84910c();\n } else {\n list = null;\n }\n if (list != null) {\n C33153d a2 = C33153d.m106972a();\n C7573i.m23582a((Object) a2, \"MediaManager.instance()\");\n arrayList = (ArrayList) a2.mo84910c();\n }\n String stringExtra = getIntent().getStringExtra(\"file_path\");\n if (getIntent().hasExtra(\"open_sdk_import_media_list\")) {\n arrayList = getIntent().getParcelableArrayListExtra(\"open_sdk_import_media_list\");\n C7573i.m23582a((Object) arrayList, \"intent.getParcelableArra…PEN_SDK_IMPORT_MEDIALIST)\");\n }\n if (!TextUtils.isEmpty(stringExtra) || !arrayList.isEmpty()) {\n aaVar.mo97167a(arrayList);\n aaVar.f100998b = stringExtra;\n aaVar.f100999c = C42017d.m133561a(getIntent().getIntExtra(\"shoot_mode\", -1));\n aaVar.f101000d = getIntent().getLongExtra(\"min_duration\", C39810eq.m127460a());\n if (bundle == null) {\n workspace = Workspace.m122801a();\n } else {\n workspace = (Workspace) bundle.getParcelable(\"workspace\");\n }\n aaVar.f101006j = workspace;\n String stringExtra2 = getIntent().getStringExtra(\"path\");\n if (!TextUtils.isEmpty(stringExtra2)) {\n Workspace workspace2 = aaVar.f101006j;\n if (workspace2 != null) {\n workspace2.mo96312a(new File(stringExtra2));\n }\n }\n if (getIntent().getSerializableExtra(\"av_challenge\") == null) {\n aVChallenge = null;\n } else {\n Serializable serializableExtra = getIntent().getSerializableExtra(\"av_challenge\");\n if (serializableExtra != null) {\n aVChallenge = (AVChallenge) serializableExtra;\n } else {\n throw new TypeCastException(\"null cannot be cast to non-null type com.ss.android.ugc.aweme.shortvideo.AVChallenge\");\n }\n }\n aaVar.f101001e = aVChallenge;\n aaVar.f101002f = getIntent().getStringExtra(\"micro_app_id\");\n if (getIntent().getSerializableExtra(\"micro_app_info\") != null) {\n Serializable serializableExtra2 = getIntent().getSerializableExtra(\"micro_app_info\");\n if (serializableExtra2 != null) {\n microAppModel = (MicroAppModel) serializableExtra2;\n } else {\n throw new TypeCastException(\"null cannot be cast to non-null type com.ss.android.ugc.aweme.shortvideo.edit.MicroAppModel\");\n }\n }\n aaVar.f101003g = microAppModel;\n aaVar.f101004h = getIntent().getSerializableExtra(\"micro_app_class\");\n aaVar.f101005i = getIntent().getBooleanExtra(\"enter_record_from_other_platform\", false);\n aaVar.f101007k = (ShareContext) getIntent().getSerializableExtra(\"extra_share_context\");\n aaVar.f101008l = getIntent().getStringExtra(\"shoot_way\");\n aaVar.f101009m = getIntent().getBooleanExtra(\"from_background_video\", false);\n aaVar.f101010n = getIntent().getLongExtra(\"background_video_max_length\", C40413c.f105051b);\n aaVar.f101011o = getIntent().getStringExtra(\"creation_id\");\n return true;\n }\n finish();\n return false;\n }",
"public void cameraIntent() {\n startActivityForResult(new Intent(\"android.media.action.IMAGE_CAPTURE\"), 1);\n }",
"public void intentHandler() {\n Intent intent = getIntent();\n if (intent.hasExtra(\"DATA\")) {\n data = (String[]) getIntent().getSerializableExtra(\"DATA\");\n recievedPosition = (int) getIntent().getSerializableExtra(\"POS\");\n if(recievedPosition != 0){\n IOException e = new IOException();\n try {\n itemArrAdapt.updateItem(recievedPosition, data, e);\n this.setPrefs();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n }\n } else {\n // Start Normal\n }\n }",
"@Override\r\n\tprotected void onNewIntent(Intent intent) {\n\t\tUtils.printLog(TAG, \"onNewIntent\");\r\n\t\tif (!getPlayList(intent)) {\r\n\t\t\texitPlayforNoPlayList();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (mVideoContrl != null && mVideoContrl.isFinishInit()) {\r\n\t\t\tmVideoContrl.setFinishInit(false);\r\n\t\t\tisOnNewIntent = true;\r\n\t\t\tmVideoContrl.releaseMediaPlayer();\r\n\t\t}\r\n\t\tsuper.onNewIntent(intent);\r\n\t\tUtils.printLog(TAG, \"onNewIntent end\");\r\n\t}",
"void processIntent(Intent intent) {\n Parcelable[] rawMsgs = intent.getParcelableArrayExtra(\n NfcAdapter.EXTRA_NDEF_MESSAGES);\n // only one message sent during the beam\n NdefMessage msg = (NdefMessage) rawMsgs[0];\n // record 0 contains the MIME type, record 1 is the AAR, if present\n menuInfo = new String(msg.getRecords()[0].getPayload());\n \n Toast.makeText(getApplicationContext(), menuInfo, Toast.LENGTH_LONG).show();\n }",
"@Override\r\n\tpublic void onReceive(Context context, Intent intent) {\n\t\tif (intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)) {\r\n\t\t}\r\n\t\tif (Intent.ACTION_MEDIA_SCANNER_STARTED.equals(intent.getAction())) { //开始扫描\r\n\t\t\tif (onMediaScannerListener != null) onMediaScannerListener.onMediaScannerStarted();\r\n\t\t} else if (Intent.ACTION_MEDIA_SCANNER_FINISHED.equals(intent.getAction())) { //结束扫描\r\n\t\t\tif (onMediaScannerListener != null) onMediaScannerListener.onMediaScannerFinished();\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void onReceive(Context context, Intent intent) {\n\t\tif(intent.getAction().equals(\"android.intent.action.MEDIA_MOUNTED\")){\r\n\t\t\tLog.i(\"MediaMountedReceiver\", \"onReceive\");\r\n\t\t\t\r\n\t\t\tUtil.initiateAlarmManager(context);\r\n\t\t}\r\n\t}",
"@Override\n public void onClick(View view) {\n Intent implicitIntent = new Intent(Intent.ACTION_GET_CONTENT);\n\n // Define the file type\n implicitIntent.setType(\"image/*\");\n\n // start this intent\n startActivityForResult(implicitIntent,REQUEST_CODE);\n }",
"public Object importAsAiring() {\n\n if (NewFile==null)\n return null;\n\n String MovedFileString = NewFile.getAbsolutePath();\n\n File MovedFile = new File(MovedFileString);\n\n if (!MovedFile.exists()) {\n Log.getInstance().write(Log.LOGLEVEL_ERROR, \"RecordingEpisode.importAsMediaFile: Error. MovedFile does not exist.\");\n }\n\n // Add the MediaFile to the database.\n Object MF = MediaFileAPI.AddMediaFile(MovedFile, RecSubdir);\n if (MF == null) {\n Log.getInstance().write(Log.LOGLEVEL_ERROR, \"RecordingEpisode.importAsMediaFile: AddMediaFile failed for \" + MovedFile.getAbsolutePath());\n return null;\n }\n \n Log.getInstance().write(Log.LOGLEVEL_TRACE, \"RecordingEpisode.importAsMediaFile: Added MediaFile into subdir \" + RecSubdir);\n\n String Title = ShowTitle;\n boolean IsFirstRun = true;\n String Episode = EpisodeTitle;\n String Description = ChanItem.getCleanDescription();\n long Duration = ChanItem.getDuration();\n String Category = \"PodcastRecorder\";\n String SubCategory = ShowTitle;\n String Author = ChanItem.getAuthor();\n String PeopleList[] = {\"Author\"};\n String RolesList[] = {Author};\n String Rated = null;\n String ExpandedRatedList[] = null;\n String Year = Utility.DateFormat(\"yyyy\", Utility.Time());\n String ParentalRating = null;\n String MiscList[] = {RSSHelper.makeID(ChanItem)};\n Long Now = Utility.Time();\n String NowString = Now.toString();\n String ExternalID = \"ONL\" + NowString;\n String AiringExternalID = \"EP\" + NowString;\n String Language = \"http\";\n long OriginalAirDate = Utility.Time();\n\n Object Show = ShowAPI.AddShow(\n Title,\n IsFirstRun,\n Episode,\n Description,\n Duration,\n Category,\n SubCategory,\n PeopleList,\n RolesList,\n Rated,\n ExpandedRatedList,\n Year,\n ParentalRating,\n MiscList,\n ExternalID,\n Language,\n OriginalAirDate);\n\n if (Show == null) {\n Log.getInstance().write(Log.LOGLEVEL_ERROR, \"RecordingEpisode.importAsMediaFile: AddShow failed.\");\n return null;\n }\n\n if (!MediaFileAPI.SetMediaFileShow(MF, Show)) {\n Log.getInstance().write(Log.LOGLEVEL_ERROR, \"RecordingEpisode.importAsMediaFile: SetMediaFileShow failed.\");\n return null;\n }\n\n Log.getInstance().write(Log.LOGLEVEL_TRACE, \"RecordingEpisode.importAsMediaFile succeeded.\");\n\n // Change the ExternalID metadata to something that starts with \"EP\" to turn the Imported video\n // file into an archived TV recording.\n MediaFileAPI.SetMediaFileMetadata(MF, \"ExternalID\", AiringExternalID);\n\n // Clear the Archived flag.\n MediaFileAPI.MoveTVFileOutOfLibrary(MF);\n\n Airing = MediaFileAPI.GetMediaFileAiring(MF);\n\n if (!AiringAPI.IsAiringObject(Airing)) {\n Log.getInstance().write(Log.LOGLEVEL_ERROR, \"RecordingEpisode.importAsMediaFile: Object is not an Airing.\");\n return null;\n }\n\n // Set metadata to show this is a Podcast.\n MediaFileAPI.SetMediaFileMetadata(MF, METADATA_PODCAST, \"true\");\n\n // Set metadata if this is a Favorite.\n MediaFileAPI.SetMediaFileMetadata(MF, METADATA_FAVORITE, isFavorite ? \"true\" : \"false\");\n\n // Set metadata for OVT, OVI and FeedContext. This can be used at a later time to\n // match MediaFiles to Podcasts.\n MediaFileAPI.SetMediaFileMetadata(MF, METADATA_OVT, OVT);\n MediaFileAPI.SetMediaFileMetadata(MF, METADATA_OVI, OVI);\n MediaFileAPI.SetMediaFileMetadata(MF, METADATA_FEEDCONTEXT, FeedContext);\n\n // Use ManualRecord properties to store Airing information.\n AiringAPI.SetManualRecordProperty(Airing, METADATA_PODCAST, \"true\");\n AiringAPI.SetManualRecordProperty(Airing, METADATA_FAVORITE, isFavorite ? \"true\" : \"false\");\n AiringAPI.SetManualRecordProperty(Airing, METADATA_OVT, OVT);\n AiringAPI.SetManualRecordProperty(Airing, METADATA_OVI, OVI);\n AiringAPI.SetManualRecordProperty(Airing, METADATA_FEEDCONTEXT, FeedContext);\n\n // Return the Airing.\n return Airing;\n }",
"String getMedia();",
"public void run() {\n\n\n if (videoFile != null) {\n //\n // Add Image to Photos Gallery\n //\n //final Uri uri = addMediaToGallery(mInscribedVideoFile.getAbsolutePath(), MCameraActivity.this, \"video\");\n //final Uri uri = addMediaToGallery(videoFile.getAbsolutePath(), MCameraActivity.this, \"video\");\n //Log.e(TAG, \"uri--->\" + uri.getPath());\n\n //\n // Create a media bean and set the copyright for server flags\n //\n String media_id = \"\";\n try {\n media_id = copyrightJsonObject.getString(\"media_id\");\n copyrightJsonObject.put(\"applyCopyrightOnServer\", 1);\n copyrightJsonObject.put(\"device_id\", SessionManager.getInstance().getDevice_id());\n copyrightJsonObject.put(\"device_type\", Common.DEVICE_TYPE);\n } catch (JSONException e) {\n // this shouldn't occur\n Log.e(TAG, \"JSONException trying to get media_id from copyright!\");\n }\n String mediaName = ImageUtils.getInstance()\n .getImageNameFromPath(videoFile.getAbsolutePath());\n GalleryBean media = new GalleryBean(videoFile.getAbsolutePath(),\n mediaName,\n \"video\",\n media_id,\n false,\n thumbnail,\n GalleryBean.GalleryType.NOT_SYNC);\n media.setDeviceId(SessionManager.getInstance().getDevice_id());\n media.setDeviceType(Common.DEVICE_TYPE);\n String mediaNamePrefix = mediaName.substring(0,\n mediaName.lastIndexOf('.'));\n media.setMediaNamePrefix(mediaNamePrefix);\n media.setMediaThumbBitmap(thumbnail);\n media.setLocalMediaPath(videoFile.getAbsolutePath());\n Date date = new Date();\n media.setMediaDate(date.getTime());\n //String mimeType = getContentResolver().getType(uri);\n media.setMimeType(\"video/mp4\"); // must be set for Amazon.\n media.setCopyright(copyrightJsonObject.toString());\n\n MemreasTransferModel transferModel = new MemreasTransferModel(\n media);\n transferModel.setType(MemreasTransferModel.Type.UPLOAD);\n QueueAdapter.getInstance().getSelectedTransferModelQueue()\n .add(transferModel);\n\n // Start the service if it's not running...\n startQueueService();\n } else {\n //\n // Show Toast error occurred here...\n //\n videoFile.delete();\n }\n\n }",
"private void openImageIntent() {\n\t\tfinal File root = new File(Environment.getExternalStorageDirectory()\n\t\t\t\t+ File.separator + \"MyDir\" + File.separator);\n\t\troot.mkdirs();\n\n\t\tfinal File sdImageMainDirectory = new File(root, getUniquePhotoName());\n\t\toutputFileUri = Uri.fromFile(sdImageMainDirectory);\n\n\t\t// Camera.\n\t\tfinal List<Intent> cameraIntents = new ArrayList<Intent>();\n\t\tfinal Intent captureIntent = new Intent(\n\t\t\t\tandroid.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n\t\tfinal PackageManager packageManager = source.getPackageManager();\n\t\tfinal List<ResolveInfo> listCam = packageManager.queryIntentActivities(\n\t\t\t\tcaptureIntent, 0);\n\t\tfor (ResolveInfo res : listCam) {\n\t\t\tfinal String packageName = res.activityInfo.packageName;\n\t\t\tfinal Intent intent = new Intent(captureIntent);\n\t\t\tintent.setComponent(new ComponentName(res.activityInfo.packageName,\n\t\t\t\t\tres.activityInfo.name));\n\t\t\tintent.setPackage(packageName);\n\t\t\tintent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);\n\t\t\tcameraIntents.add(intent);\n\t\t}\n\n\t\t// Filesystem.\n\t\tfinal Intent galleryIntent = new Intent();\n\t\tgalleryIntent.setType(\"*/*\");\n\t\tgalleryIntent.setAction(Intent.ACTION_GET_CONTENT);\n\n\t\t// Chooser of filesystem options.\n\t\tIntent chooserIntent = Intent.createChooser(galleryIntent, \"Select Source\");\n\n\t\t// Add the camera options.\n\t\t//chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS,\n\t\t//\t\tcameraIntents.toArray(new Parcelable[] {}));\n\t\t\n\t\tIntent getContentIntent = FileUtils.createGetContentIntent();\n\n\t chooserIntent = Intent.createChooser(getContentIntent, \"Select a file\");\n\n\t\tsource.startActivityForResult(chooserIntent, Constants.QUIZSHOW_DATA);\n\t\t\n\t}",
"@Override\n protected void onNewIntent(Intent intent){\n handleIntent(intent);\n }",
"private void dispatchGetPictureFromGalleryIntent() {\n Intent pickPhoto = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n if (pickPhoto.resolveActivity(getContext().getPackageManager()) != null) {\n this.startActivityForResult(pickPhoto, PICK_IMAGE);\n }\n }",
"private void performFileSearch() {\n Intent intent = new Intent();\n intent.setType(\"*/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), PICK_IMAGE_REQUEST);\n\n }",
"private void handleIntent(Intent intent) {\n if(intent == null){\n Toast.makeText(this, \"intent is null handleIntent \", Toast.LENGTH_SHORT).show();\n return;\n }\n String action = intent.getAction();\n\n if(nfcAdapter.ACTION_NDEF_DISCOVERED.equals(action)){\n String type = intent.getType();\n if(MIME_TEXT_PLAIN.equals(type)){\n Tag tag = intent.getParcelableExtra(EXTRA_TAG);\n\n nfcReaderTask = new NfcReaderTask();\n nfcReaderTask.SetResponseListener(this);\n nfcReaderTask.execute(tag);\n }\n }\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n String SMS = intent.getExtras().getString(\"sms\");\n Intent SMSReceivedActivityIntent = new Intent(MainActivity.this, SMSReceivedActivity.class);\n SMSReceivedActivityIntent.putExtra(\"SMS\", SMS);\n\n //vibrate & play sound, then start activity\n vibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);\n vibrator.vibrate(500);\n try {\n mediaPlayer = MediaPlayer.create(getBaseContext(), R.raw.ding);\n\n Log.d(\"log mediaplayer\", \"mediaplayer is not null\");\n mediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mediaPlayer) {\n mediaPlayer.release();\n }\n });\n mediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {\n @Override\n public void onPrepared(MediaPlayer mediaPlayer) {\n mediaPlayer.start();\n }\n });\n\n } catch (Exception e) {\n Log.d(\"debug\", e.getMessage());\n }\n\n startActivity(SMSReceivedActivityIntent);\n }",
"public static MMXPushMessage parse(Intent intent) {\n String nestedIntent = null;\n try {\n nestedIntent = intent.getStringExtra(MMX.EXTRA_NESTED_INTENT);\n if (nestedIntent == null) {\n return null;\n }\n MMXPushMessage mmxPushMsg = new MMXPushMessage();\n mmxPushMsg.mIntent = Intent.parseUri(nestedIntent, Intent.URI_INTENT_SCHEME);\n return mmxPushMsg;\n } catch (URISyntaxException e) {\n Log.w(TAG, \"Ignored the malformed MMX intent: \"+nestedIntent);\n return null;\n }\n }",
"public void sendIntentToGallery() {\n\t\tIntent i = new Intent(\n\t\t\t\tIntent.ACTION_PICK,\n\t\t\t\tandroid.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n\t\t// Send the intent with id 1\n\t\tstartActivityForResult(i, 1);\n\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\tFile file = new File(list.get(arg2).get(\"path\"));\n\t\t\t\tif (file.canRead()) {\n\t\t\t\t\tif (file.isDirectory()) {\n\t\t\t\t\t\tgetData(list.get(arg2).get(\"path\"));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tString end = file\n\t\t\t\t\t\t\t\t.getName()\n\t\t\t\t\t\t\t\t.substring(file.getName().lastIndexOf(\".\") + 1,\n\t\t\t\t\t\t\t\t\t\tfile.getName().length()).toLowerCase();\n\n\t\t\t\t\t\tif (end.equals(\"jpg\") || end.equals(\"gif\")\n\t\t\t\t\t\t\t\t|| end.equals(\"png\") || end.equals(\"jpeg\")\n\t\t\t\t\t\t\t\t|| end.equals(\"bmp\")) {\n\t\t\t\t\t\t\tIntent intent = new Intent(\n\t\t\t\t\t\t\t\t\t\"android.intent.action.VIEW\");\n\t\t\t\t\t\t\tintent.addCategory(\"android.intent.category.DEFAULT\");\n\t\t\t\t\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\t\t\tintent.setDataAndType(Uri.fromFile(file), \"image/*\");\n\t\t\t\t\t\t\tstartActivity(intent);\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telse if (end.equals(\"3gp\") || end.equals(\"mp4\")) {\n\t\t\t\t\t\t\tIntent intent = new Intent(\n\t\t\t\t\t\t\t\t\t\"android.intent.action.VIEW\");\n\t\t\t\t\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\t\t\t\t\t\tintent.putExtra(\"oneshot\", 0);\n\t\t\t\t\t\t\tintent.putExtra(\"configchange\", 0);\n\t\t\t\t\t\t\tintent.setDataAndType(Uri.fromFile(file), \"audio/*\");\n\t\t\t\t\t\t\tstartActivity(intent);\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telse if (end.equals(\"m4a\") || end.equals(\"mp3\")\n\t\t\t\t\t\t\t\t|| end.equals(\"mid\") || end.equals(\"xmf\")\n\t\t\t\t\t\t\t\t|| end.equals(\"ogg\") || end.equals(\"wav\")) {\n\t\t\t\t\t\t\tIntent intent = new Intent(\n\t\t\t\t\t\t\t\t\t\"android.intent.action.VIEW\");\n\t\t\t\t\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\t\t\t\t\t\tintent.putExtra(\"oneshot\", 0);\n\t\t\t\t\t\t\tintent.putExtra(\"configchange\", 0);\n\t\t\t\t\t\t\tintent.setDataAndType(Uri.fromFile(file), \"audio/*\");\n\t\t\t\t\t\t\tstartActivity(intent);\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Intent(\"android.intent.action.VIEW\");\n\t\t\t\t\t\t// intent.addCategory(\"android.intent.category.DEFAULT\");\n\t\t\t\t\t\t// intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\t\t//\n\t\t\t\t\t\t// intent.setDataAndType(Uri.fromFile(file), \"image/*\");\n\t\t\t\t\t\t// startActivity(intent);\n\n\t\t\t\t\t\t// Toast.makeText(FileActivity.this,\n\t\t\t\t\t\t// list.get(arg2).get(\"name\") + \"是普通文件\",\n\t\t\t\t\t\t// Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tToast.makeText(FileActivity.this, \"权限不足\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t\t// getData(list.get(arg2).get(\"path\"));\n\n\t\t\t}",
"@Override\r\n\t protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\t if (resultCode == RESULT_OK) {\r\n\t\t\t if (data != null) {\r\n\t\t\t\t // Get the URI of the selected file\r\n\t\t\t\t uri = data.getData();\r\n\t\t\t\t Log.i(TAG, \"Uri = \" + uri.toString());\r\n\t\t\t\t try {\r\n\t\t\t\t\t // Get the file path from the URI\r\n\t\t\t\t\t final String path = FileUtils.getPath(this, uri);\r\n\t\t\t\t\t Intent intent = new Intent(MainActivity.this, ShowFileActiviy.class);\r\n\t\t\t\t\t intent.putExtra(\"file_path\", path);\r\n\t\t\t\t\t startActivity(intent);\r\n\t\t\t\t } catch (Exception e) {\r\n\t\t\t\t\t Log.e(\"FileSelectorTestActivity\", \"File select error\", e);\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t }\r\n\t }",
"public void onMediaAction(Context context, Intent intent) {\n String action = intent.getAction();\n if (action.equals(\"android.intent.action.MEDIA_EJECT\")) {\n String currentPath = Storage.getSavePath();\n if (currentPath != null && currentPath.equals(\"1\") && this.mMediaRecorderRecording) {\n this.mRecordingInterrupted = true;\n onStopVideoRecording();\n }\n } else if (action.equals(\"android.intent.action.MEDIA_SCANNER_STARTED\")) {\n ToastUtil.showToast(this.mActivity, this.mActivity.getResources().getString(R.string.wait), 1);\n }\n }",
"public abstract String playMedia ();",
"@Override\n\tpublic IBinder onBind(Intent intent) {\n\t\tlist=new ArrayList<MusicVO>();\n\t\tMusicVO music=new MusicVO();\n\t\tContentResolver resolver=getContentResolver();\n\t\tcursor = resolver.query(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI,\n\t\t\t\t\t\tnull, null, null, MediaStore.Audio.Media.DEFAULT_SORT_ORDER);\n\t\twhile(cursor.moveToNext()){\n\t\t\tmusic.music_id=cursor.getInt(cursor.getColumnIndexOrThrow(MediaStore.Audio.Media._ID));\n\t\t\tmusic.music_name=cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.TITLE));\t\t\t\t\tmusic.music_uri=cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.DATA));\n\t\t\tmusic.singer_name=cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.ARTIST));\n\t\t\tmusic.file_size=cursor.getLong(cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.SIZE));\n\t\t\tmusic.duration=cursor.getInt(cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.DURATION));\t\t\t\t\tmusic.special=cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.ALBUM));\n\t\t\tlist.add(music);\n\t\t\t\t}\n\t\treturn binder;\n\t}",
"public static Uri UriParse(String url) {\n\t\ttry {\n\t\t\tUrlMedia = url;\n\t\t\tFile path = null;\n\t\t\tFile cacheDir;\n\t\t\tString[] urlDir = url.split(\"/\");\n\t\t\tif (sdAvailableWrite()) {\n\t\t\t\tpath = Environment.getExternalStorageDirectory();\n\t\t\t\tcacheDir = new File(path + File.separator + \"miramusei\"\n\t\t\t\t\t\t+ File.separator + \"cache\" + File.separator\n\t\t\t\t\t\t+ urlDir[urlDir.length - 2]);\n\t\t\t} else {\n\t\t\t\tpath = Environment.getDataDirectory();\n\t\t\t\tcacheDir = new File(path + File.separator + \"data\"\n\t\t\t\t\t\t+ File.separator + \"com.miramusei.museum\"\n\t\t\t\t\t\t+ File.separator + \"cache\" + File.separator\n\t\t\t\t\t\t+ urlDir[urlDir.length - 2]);\n\t\t\t}\n\t\t\t// File cacheDir = new File(ruta+File.separator+ urlDir[8]);\n\t\t\tif (!cacheDir.exists()) {\n\t\t\t\tcacheDir.mkdirs();\n\n\t\t\t}\n\t\t\tcacheDirNameMedia = new File(cacheDir + File.separator\n\t\t\t\t\t+ urlDir[urlDir.length - 1]);\n\n\t\t\tif (!cacheDirNameMedia.exists() || cacheDirNameMedia.length() == 0) {\n\n\t\t\t\tThread downloadFile = new Thread() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tsuper.run();\n\t\t\t\t\t\t\tcacheDirNameMedia.createNewFile();\n\n\t\t\t\t\t\t\tInputStream is = (InputStream) new URL(UrlMedia)\n\t\t\t\t\t\t\t\t\t.getContent();\n\t\t\t\t\t\t\t// Uri jose=Uri.parse(url);\n\t\t\t\t\t\t\tFileOutputStream fo = new FileOutputStream(\n\t\t\t\t\t\t\t\t\tcacheDirNameMedia);\n\t\t\t\t\t\t\t// Drawable d = Drawable.createFromStream(is,\n\t\t\t\t\t\t\t// \"src name\");\n\t\t\t\t\t\t\tbyte[] buffer = new byte[2048];\n\t\t\t\t\t\t\tint length;\n\t\t\t\t\t\t\twhile ((length = is.read(buffer)) > 0) {\n\t\t\t\t\t\t\t\tfo.write(buffer, 0, length);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfo.close();\n\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tcacheDirNameMedia.deleteOnExit();\n\t\t\t\t\t\t\tSystem.out.println(\"Error cacheando imagen\"\n\t\t\t\t\t\t\t\t\t+ e.getMessage());\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tdownloadFile.start();\n\t\t\t\treturn Uri.parse(url);\n\n\t\t\t} else {\n\t\t\t\treturn Uri.fromFile(cacheDirNameMedia);\n\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}",
"protected final void onActivityResult(final int requestCode, final int resultCode, final Intent i)\n\t{\n\t\tsuper.onActivityResult(requestCode, resultCode, i);\n\n\t\t// this matches the request code in the above call\n\t\tUri myUri = i.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);\n\t\tif (myUri != null)\n\t\t{\n\t\t\tString strUri = myUri.toString();\n\t\t\t\n\t\t\tswitch (requestCode)\n\t\t\t{\n\t\t\t\tcase PICK_FILE_RING:\n\t\t\t\t\tm_strUriRing = strUri;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase PICK_FILE_SMS:\n\t\t\t\t\tm_strUriSMS = strUri;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase PICK_FILE_IM:\n\t\t\t\t\tm_strUriIM = strUri;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase PICK_FILE_MAIL:\n\t\t\t\t\tm_strUriMail = strUri;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase PICK_FILE_TEST:\n\t\t\t\t\tMediaPlayer myPlayer = new MediaPlayer();\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tUri myNewUri = Uri.parse(strUri);\n\t\t\t\t\t\tmyPlayer.setDataSource(this, myNewUri);\n\t\t\t\t\t\tmyPlayer.prepare();\n\t\t\t\t\t\tmyPlayer.start();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception e)\n\t\t\t\t\t{\n\t\t\t\t\t\tLog.d(getClass().getSimpleName(), e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\n\t\t\t\tdefault:\n\t\t\t}\n\t\t}\n\t}",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (resultCode == RESULT_OK) {\n switch (requestCode) {\n case (REQUEST_IMAGE_FROM_CAMERA):\n addAttach(mFile, ChatMessageAttachment.ChatMessageAttachmentType_image);\n break;\n case (REQUEST_IMAGE_FROM_GALLERY):\n addAttach(new File(getRealPathFromURI(data.getData())), ChatMessageAttachment.ChatMessageAttachmentType_image);\n break;\n case (REQUEST_VIDEO_FROM_CAMERA):\n addAttach(mFile, ChatMessageAttachment.ChatMessageAttachmentType_video);\n break;\n case (REQUEST_VIDEO_FROM_GALLERY):\n addAttach(new File(getRealPathFromURI(data.getData())), ChatMessageAttachment.ChatMessageAttachmentType_video);\n break;\n default:\n return;\n }\n }\n }",
"private void read_manifest(){\n dir = new File(context.getFilesDir(), folderName);\n dir.mkdir();\n manifestFile = new File(dir, \"manifest\");\n BufferedReader manifestIn = null;\n try {\n manifestIn = new BufferedReader(new FileReader(manifestFile));\n String line;\n while ((line = manifestIn.readLine()) != null) {\n String[] keyValuePair = line.split(\",\");\n pictureList.add(new KeyNamePair(keyValuePair[0], keyValuePair[1]));\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (manifestIn != null) {\n try {\n manifestIn.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }"
]
| [
"0.61956924",
"0.5893135",
"0.5745607",
"0.56915206",
"0.5670249",
"0.5668211",
"0.56470114",
"0.56102526",
"0.5595423",
"0.55541474",
"0.5543509",
"0.5519733",
"0.5481402",
"0.54744583",
"0.54676276",
"0.5466014",
"0.5454643",
"0.5438632",
"0.54339314",
"0.5429699",
"0.541676",
"0.54073536",
"0.5373757",
"0.5365454",
"0.53576595",
"0.5355807",
"0.5327072",
"0.52734476",
"0.5268943",
"0.5253729",
"0.5252715",
"0.5241654",
"0.5240757",
"0.52383816",
"0.52365774",
"0.5233802",
"0.5226143",
"0.5209849",
"0.52093494",
"0.5198584",
"0.5171182",
"0.51667535",
"0.5158879",
"0.51511675",
"0.5141486",
"0.5107277",
"0.5099097",
"0.5086356",
"0.50731444",
"0.5058152",
"0.50549066",
"0.5054306",
"0.5052653",
"0.5048749",
"0.50485283",
"0.5041439",
"0.5026158",
"0.5021448",
"0.5020904",
"0.5020623",
"0.5020565",
"0.5013559",
"0.49929532",
"0.4978783",
"0.49772093",
"0.49619347",
"0.49541053",
"0.49539417",
"0.49494216",
"0.49489242",
"0.49474844",
"0.49404177",
"0.4937844",
"0.49349394",
"0.49319327",
"0.493166",
"0.49264178",
"0.49239546",
"0.49213168",
"0.49175376",
"0.4911931",
"0.49102756",
"0.4908415",
"0.49054697",
"0.49014804",
"0.48840737",
"0.48813733",
"0.48755556",
"0.48708227",
"0.487056",
"0.48704064",
"0.48699775",
"0.4859856",
"0.4854244",
"0.48527783",
"0.48519516",
"0.4849179",
"0.48417744",
"0.48409188",
"0.4840112"
]
| 0.7660212 | 0 |
Converts ACTION_MOVE events to pitch & yaw events while compensating for device roll. | @Override
public boolean onTouch(View v, MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
// Initialize drag gesture.
previousTouchPointPx.set(event.getX(), event.getY());
return true;
case MotionEvent.ACTION_MOVE:
// Calculate the touch delta in screen space.
float touchX = (event.getX() - previousTouchPointPx.x) / PX_PER_DEGREES;
float touchY = (event.getY() - previousTouchPointPx.y) / PX_PER_DEGREES;
previousTouchPointPx.set(event.getX(), event.getY());
float r = roll; // Copy volatile state.
float cr = (float) Math.cos(r);
float sr = (float) Math.sin(r);
// To convert from screen space to the 3D space, we need to adjust the drag vector based
// on the roll of the phone. This is standard rotationMatrix(roll) * vector math but has
// an inverted y-axis due to the screen-space coordinates vs GL coordinates.
// Handle yaw.
accumulatedTouchOffsetDegrees.x -= cr * touchX - sr * touchY;
// Handle pitch and limit it to 45 degrees.
accumulatedTouchOffsetDegrees.y += sr * touchX + cr * touchY;
accumulatedTouchOffsetDegrees.y =
Math.max(-MAX_PITCH_DEGREES,
Math.min(MAX_PITCH_DEGREES, accumulatedTouchOffsetDegrees.y));
renderer.setPitchOffset(accumulatedTouchOffsetDegrees.y);
renderer.setYawOffset(accumulatedTouchOffsetDegrees.x);
return true;
default:
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void move(TrackerState state) {\n\t\t\n\t\tcurrentPosition[0] = state.devicePos[0];\n\t\tcurrentPosition[1] = state.devicePos[1];\n\t\tcurrentPosition[2] = state.devicePos[2];\n\t\t\n\t\tboolean processMove = false;\n\t\t\n\t\tboolean isWheel = (state.actionType == TrackerState.TYPE_WHEEL);\n\t\tboolean isZoom = (isWheel || state.ctrlModifier);\n\t\t\n\t\tif (isZoom) {\n\t\t\t\n\t\t\tdirection[0] = 0;\n\t\t\tdirection[1] = 0;\n\t\t\t\n\t\t\tif (isWheel) {\n\t\t\t\tdirection[2] = state.wheelClicks * 0.1f;\n\t\t\t\t\n\t\t\t} else if (state.ctrlModifier) {\n\t\t\t\tdirection[2] = (currentPosition[1] - startPosition[1]);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tdirection[2] = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif (direction[2] != 0) {\n\t\t\t\t\n\t\t\t\tdirection[2] *= 16;\n\t\t\t\t\n\t\t\t\tdata.viewpointTransform.getTransform(startViewMatrix);\n\t\t\t\tstartViewMatrix.get(positionVector);\n\t\t\t\t\n\t\t\t\tinVector.x = startViewMatrix.m02;\n\t\t\t\tinVector.y = startViewMatrix.m12;\n\t\t\t\tinVector.z = startViewMatrix.m22;\n\t\t\t\tinVector.normalize();\n\t\t\t\tinVector.scale(direction[2]);\n\t\t\t\t\n\t\t\t\tpositionVector.add(inVector);\n\t\t\t\t\n\t\t\t\t// stay above the floor\n\t\t\t\tif (positionVector.y > 0) {\n\t\t\t\t\tdestViewMatrix.set(startViewMatrix);\n\t\t\t\t\tdestViewMatrix.setTranslation(positionVector);\n\t\t\t\t\t\n\t\t\t\t\tprocessMove = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t\n\t\t\tdirection[0] = -(startPosition[0] - currentPosition[0]);\n\t\t\tdirection[1] = -(currentPosition[1] - startPosition[1]);\n\t\t\tdirection[2] = 0;\n\t\t\t\n\t\t\tfloat Y_Rotation = direction[0];\n\t\t\tfloat X_Rotation = direction[1];\n\t\t\t\n\t\t\tif( ( Y_Rotation != 0 ) || ( X_Rotation != 0 ) ) {\n\t\t\t\t\n\t\t\t\tdouble theta_Y = -Y_Rotation * Math.PI;\n\t\t\t\tdouble theta_X = -X_Rotation * Math.PI;\n\t\t\t\t\n\t\t\t\tdata.viewpointTransform.getTransform(startViewMatrix);\n\t\t\t\tstartViewMatrix.get(positionVector);\n\t\t\t\t\n\t\t\t\tpositionVector.x -= centerOfRotation.x;\n\t\t\t\tpositionVector.y -= centerOfRotation.y;\n\t\t\t\tpositionVector.z -= centerOfRotation.z;\n\t\t\t\t\n\t\t\t\tif (theta_Y != 0) {\n\n\t\t\t\t\trot.set(0, 1, 0, (float)theta_Y);\n\t\t\t\t\tmtx.set(rot);\n\t\t\t\t\tmtx.transform(positionVector);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (theta_X != 0) {\n\t\t\t\t\t\n\t\t\t\t\tvec.set(positionVector);\n\t\t\t\t\tvec.normalize();\n\t\t\t\t\tfloat angle = vec.angle(Y_AXIS);\n\t\t\t\t\t\n\t\t\t\t\tif (angle == 0) {\n\t\t\t\t\t\tif (theta_X > 0) {\n\t\t\t\t\t\t\trightVector.x = startViewMatrix.m00;\n\t\t\t\t\t\t\trightVector.y = startViewMatrix.m10;\n\t\t\t\t\t\t\trightVector.z = startViewMatrix.m20;\n\t\t\t\t\t\t\trightVector.normalize();\n\t\t\t\t\t\t\trot.set(rightVector.x, 0, rightVector.z, (float)theta_X);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trot.set(0, 0, 1, 0);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((theta_X + angle) < 0) {\n\t\t\t\t\t\t\ttheta_X = -(angle - 0.0001f);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvec.y = 0;\n\t\t\t\t\t\tvec.normalize();\n\t\t\t\t\t\trot.set(vec.z, 0, -vec.x, (float)theta_X);\n\t\t\t\t\t}\n\t\t\t\t\tmtx.set(rot);\n\t\t\t\t\tmtx.transform(positionVector);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tpositionPoint.x = positionVector.x + centerOfRotation.x;\n\t\t\t\tpositionPoint.y = positionVector.y + centerOfRotation.y;\n\t\t\t\tpositionPoint.z = positionVector.z + centerOfRotation.z;\n\t\t\t\t\n\t\t\t\t// don't go below the floor\n\t\t\t\tif (positionPoint.y > 0) {\n\t\t\t\t\t\n\t\t\t\t\tmatrixUtils.lookAt(positionPoint, centerOfRotation, Y_AXIS, destViewMatrix);\n\t\t\t\t\tmatrixUtils.inverse(destViewMatrix, destViewMatrix);\n\t\t\t\t\t\n\t\t\t\t\tprocessMove = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (processMove) {\n\t\t\t\n\t\t\tboolean collisionDetected = \n\t\t\t\tcollisionManager.checkCollision(startViewMatrix, destViewMatrix);\n\t\t\t\n\t\t\tif (!collisionDetected) {\n\t\t\t\tAV3DUtils.toArray(destViewMatrix, array);\n\t\t\t\tChangePropertyTransientCommand cptc = new ChangePropertyTransientCommand(\n\t\t\t\t\tve, \n\t\t\t\t\tEntity.DEFAULT_ENTITY_PROPERTIES, \n\t\t\t\t\tViewpointEntity.VIEW_MATRIX_PROP,\n\t\t\t\t\tarray,\n\t\t\t\t\tnull);\n\t\t\t\tcmdCntl.execute(cptc);\n\t\t\t\tif (statusManager != null) {\n\t\t\t\t\tstatusManager.fireViewMatrixChanged(destViewMatrix);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tstartPosition[0] = currentPosition[0];\n\t\tstartPosition[1] = currentPosition[1];\n\t\tstartPosition[2] = currentPosition[2];\n\t}",
"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}",
"public void onMove(float x, float y, float pressure) {\n/* 135 */ this.mTouchEventSubject.onNext(new InkEvent(InkEventType.ON_TOUCH_MOVE, x, y, this.mIsPressureSensitive ? pressure : 1.0F));\n/* */ }",
"@Override\n public boolean onTouchEvent(MotionEvent ev) {\n int action = ev.getAction();\n\n switch(action) {\n case MotionEvent.ACTION_MOVE:\n processNewMoveEvent(ev);\n break;\n }\n\n return super.onTouchEvent(ev);\n }",
"@Override\n public void onMovement() {\n showToast(\"设备移动\");\n LogUtil.e(\"move\");\n }",
"private void m87317a(MotionEvent motionEvent) {\n int actionIndex = motionEvent.getActionIndex();\n if (motionEvent.getPointerId(actionIndex) == this.f61230w) {\n int i = actionIndex == 0 ? 1 : 0;\n this.f61227t = motionEvent.getX(i);\n float y = motionEvent.getY(i);\n this.f61229v = y;\n this.f61228u = y;\n this.f61230w = motionEvent.getPointerId(i);\n }\n }",
"@Override\n public void calculateMove() {\n int xa = 0, ya = 0;\n if (steps <= 0) {\n direction = ep.calculateDirection();\n steps = MAX_STEPS;\n }\n if (direction == 0) {\n ya--;\n }\n if (direction == 2) {\n ya++;\n }\n if (direction == 3) {\n xa--;\n }\n if (direction == 1) {\n xa++;\n }\n if (canMove(xa, ya)) {\n steps -= 1 + rest;\n move(xa * speed, ya * speed);\n moving = true;\n } else {\n steps = 0;\n moving = false;\n }\n }",
"@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 }",
"@Override\n public void onSensorChanged(SensorEvent event) {\n // Log.i(TAG, event + \"\");\n for (int i = 0; i < mListeners.size(); i++) {\n mListeners.get(i).setAzimuthPitchRoll(event.values);\n }\n }",
"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 }",
"void onOrientationChanged(float azimuth, float pitch, float roll);",
"void onMove();",
"@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 }",
"@Override\n public void onMove(float x, float y) {\n }",
"private void trackMovement(MotionEvent event) {\n float deltaX = event.getRawX() - event.getX();\n float deltaY = event.getRawY() - event.getY();\n event.offsetLocation(deltaX, deltaY);\n if (mVelocityTracker != null) mVelocityTracker.addMovement(event);\n event.offsetLocation(-deltaX, -deltaY);\n }",
"@Override\r\n\tpublic void onOrientationChanged(float azimuth, float pitch, float roll) {\n\r\n\t}",
"protected void onMove() {\r\n }",
"@Override\n\tpublic void onSensorChanged( SensorEvent event )\n\t{\n\t\tfloat y = -event.values[ 0 ] / GRAVITY;\n\t\tfloat x = event.values[ 1 ] / GRAVITY;\n\t\tfloat z = event.values[ 2 ] / GRAVITY;\n\t\t\n\t\tx = Math.abs(x);\n\n\t\t//Log.d( \"Control\", String.format( \"%+6f, %+6f, %+6f\", x, y, z ) );\n\n\t\t// The x component gives us tilt forward / backward\n\t\tx -= 0.5;\n\t\tx *= 200;\n\t\tif ( Math.abs(x) < 10 ) x = 0;\n\n\t\t// The y component gives us steering\n\t\ty *= 50;\n\t\tif ( Math.abs(y) < 10 ) y = 0;\n\n\t\tfloat\n\t\t\t\tmotorL = x + y,\n\t\t\t\tmotorR = x - y;\n\n\t\t//Log.d( \"Control\", String.format( \"%+6f, %+6f, %+6f\", motorL, motorR, 0f ) );\n\n\t\t// Clamp the values to [-100, 100]\n\t\tif ( motorL < -100 || motorL > 100 )\n\t\t{\n\t\t\tmotorL -= motorL % 100;\n\t\t}\n\t\tif ( motorR < -100 || motorR > 100 )\n\t\t{\n\t\t\tmotorR -= motorR % 100;\n\t\t}\n\t\t\n\t\tmovingAverageX = (movingAverageAlpha * motorL) + (1.0f - movingAverageAlpha) * movingAverageX;\n\t\tmovingAverageY = (movingAverageAlpha * motorR) + (1.0f - movingAverageAlpha) * movingAverageY;\n\n\t\tcallbackTarget.onControlEventResult( (int) movingAverageX, (int) movingAverageY, 0 );\n\t}",
"@Override\r\n public void handle(KeyEvent event){\n if (event.getCode() == KeyCode.LEFT) {\r\n //rotate counter-clockwise by one degree\r\n L = false;\r\n //Moves player right\r\n } else if (event.getCode() == KeyCode.RIGHT) {\r\n \r\n R = false;\r\n \r\n \r\n //Moves player up\r\n } else if (event.getCode() == KeyCode.UP) {\r\n Forward = false;\r\n deltaX5 = 0;\r\n deltaY5 = 0; \r\n \r\n }\r\n }",
"void onIdentityMove(int fromPosition, int toPosition);",
"public void updateRotations() {\n try {\n switch (this.mode) {\n case Packet:\n mc.player.renderYawOffset = this.yaw;\n mc.player.rotationYawHead = this.yaw;\n break;\n case Legit:\n mc.player.rotationYaw = this.yaw;\n mc.player.rotationPitch = this.pitch;\n break;\n case None:\n break;\n }\n } catch (Exception ignored) {\n\n }\n }",
"@Override\n public boolean onTouchEvent(MotionEvent event) {\n x = (int) event.getRawX();\n y = (int) event.getRawY();\n if (event.getAction() == MotionEvent.ACTION_MOVE) {\n deltaX = x - mLastX;\n deltaY = y - mLastY;\n setTranslationX(getTranslationX() + deltaX);\n setTranslationY(getTranslationY() + deltaY);\n }\n mLastX = x;\n mLastY = y;\n return true;\n }",
"private short getHeadingAxe()\r\n\t{\r\n\t\t// Condition based on the angle change\r\n\t\tdouble difA = 0;\r\n\t\tshort movDir = 0;\r\n\r\n\t\t// Difference between the real and ideal angle\r\n\t\tdifA = Math.abs((this.pose.getHeading()/Math.PI*180) - Po_ExpAng);\r\n\t\t\r\n\t\t// Axe detection\r\n\t\tif ((Po_CORNER_ID % 2) == 0)\r\n\t\t{\r\n\t\t\t// Movement in x\r\n\t\t\tif (((Po_CORNER_ID == 0) && ((difA > 70) && (100*this.pose.getX() > 165))) || ((Po_CORNER_ID == 2) && ((difA > 70) && (100*this.pose.getX() < 160))) || ((Po_CORNER_ID == 4) && ((difA > 70) && (100*this.pose.getX() < 35))) || ((Po_CORNER_ID == 6) && ((difA > 70) && (100*this.pose.getX() < 5))))\r\n\t\t\t//if (difA > 70)\r\n\t\t\t{\r\n\t\t\t\tmovDir = 1;\t\t\t// y direction\r\n\t\t\t\tSound.beepSequenceUp();\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tmovDir = 0;\t\t\t// x direction\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Movement in y\r\n\t\t\tif (((Po_CORNER_ID == 1) && ((difA > 30) && (100*this.pose.getY() > 55))) || ((Po_CORNER_ID == 3) && ((difA > 70) && (100*this.pose.getY() < 45))) || ((Po_CORNER_ID == 5) && ((difA > 70) && (100*this.pose.getY() > 55))) || ((Po_CORNER_ID == 7) && (difA > 70) && (100*this.pose.getY() < 5)))\r\n\t\t\t//if (difA > 70)\r\n\t\t\t{\r\n\t\t\t\tmovDir = 0;\t\t\t// x direction\r\n\t\t\t\tSound.beepSequence();\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tmovDir = 1;\t\t\t// y direction\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (((Po_AxeP == 0) && (movDir == 1)) || ((Po_AxeP == 1) && (movDir == 0)))\r\n\t\t{\r\n\t\t\tif (Po_CORNER_ID < 7)\r\n\t\t\t{\r\n\t\t\t\tPo_CORNER_ID = Po_CORNER_ID + 1;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tPo_CORNER_ID = 0;\r\n\t\t\t\t\r\n\t\t\t\tif (this.parkingSlotDetectionIsOn)\r\n\t\t\t\t{\r\n\t\t\t\t\tPo_RoundF = 1;\t\t// Round finished, don't add any new parking slots\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tPo_Corn = 1;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tPo_Corn = 0;\r\n\t\t}\r\n\t\t\r\n\t\tPo_AxeP = movDir;\r\n\t\t\r\n\t\tLCD.drawString(\"Corn_ID: \" + (Po_CORNER_ID), 0, 6);\r\n\t\t\r\n\t\treturn movDir;\r\n\t}",
"@Override\n\t\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\t float[] rotationMatrix;\n\t\t\t rotationMatrix = new float[16];\n\t SensorManager.getRotationMatrixFromVector(rotationMatrix,\n\t event.values);\n\t determineOrientation(rotationMatrix);\n\t\t\t\n\t\t}",
"P applyMovement(M move);",
"private void moveForwards() {\n\t\tposition = MoveAlgorithmExecutor.getAlgorithmFromCondition(orientation).execute(position);\n\t\t\n\t\t// Extracted the condition to check if tractor is in Ditch\n\t\tif(isTractorInDitch()){\n\t\t\tthrow new TractorInDitchException();\n\t\t}\n\t}",
"default void onMoveMade(ScotlandYardView view, Move move) {}",
"@Override\n\tpublic void onSensorChanged(SensorEvent event) {\n\t\trawSensorValue = Math.round(event.values[0]); \n\t\twhile (rawSensorValue < 0) rawSensorValue += 360;\n\t\tm_azimuth_degrees = rawSensorValue - m_sun_azimuth_degrees;\n\t\twhile (m_azimuth_degrees < 0) m_azimuth_degrees += 360;\n\t\t\n\t\t// get pitch value\n\t\tint rotation = activity.getWindowManager().getDefaultDisplay().getRotation();\n\t\tif ((rotation == 0) || (rotation == 2)) m_pitch_degrees = Math.abs((int)event.values[1]); \n\t\telse m_pitch_degrees = Math.abs((int)event.values[2]);\n\t\t\n\t\t// Update event\n\t\tif (m_parent != null) m_parent.onSensorChanged(event);\n\t}",
"public void moveEO(int move) {\n int type = move / 3;\n int[] cycle;\n if(type == 0) {cycle = new int[]{8, 4, 11, 5};}\n else if(type == 1) {cycle = new int[]{8, 3, 9, 0};}\n else if(type == 2) {cycle = new int[]{4, 0, 7, 1};}\n else if(type == 3) {cycle = new int[]{9, 6, 10, 7};}\n else if(type == 4) {cycle = new int[]{11, 1, 10, 2};}\n else {cycle = new int[]{3, 5, 2, 6};}\n\n if(move % 3 == 0) {\n int saver = eo[cycle[0]];\n eo[cycle[0]] = eo[cycle[3]];\n eo[cycle[3]] = eo[cycle[2]];\n eo[cycle[2]] = eo[cycle[1]];\n eo[cycle[1]] = saver;\n }\n else if(move % 3 == 1) {\n int saver0 = eo[cycle[0]];\n int saver1 = eo[cycle[1]];\n eo[cycle[0]] = eo[cycle[2]];\n eo[cycle[1]] = eo[cycle[3]];\n eo[cycle[2]] = saver0;\n eo[cycle[3]] = saver1;\n }\n else {\n int saver = eo[cycle[0]];\n eo[cycle[0]] = eo[cycle[1]];\n eo[cycle[1]] = eo[cycle[2]];\n eo[cycle[2]] = eo[cycle[3]];\n eo[cycle[3]] = saver;\n }\n if(move == 3 || move == 5 || move == 12 || move == 14) {\n eo[cycle[0]] = (eo[cycle[0]] + 1) % 2;\n eo[cycle[1]] = (eo[cycle[1]] + 1) % 2;\n eo[cycle[2]] = (eo[cycle[2]] + 1) % 2;\n eo[cycle[3]] = (eo[cycle[3]] + 1) % 2;\n }\n }",
"void onRotaryEvents(int targetDisplayId, @NonNull List<RotaryEvent> events);",
"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}",
"@Override\n\t\t\t\tpublic void onActionMove(float x, float y) {\n\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void onActionMove(float x, float y) {\n\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void onActionMove(float x, float y) {\n\n\t\t\t\t}",
"@Override\r\n\tpublic void onTouchMove(LTouch e) {\n\t\t\r\n\t}",
"public void onUpdate() {\n/* 89 */ this.lastTickPosX = this.posX;\n/* 90 */ this.lastTickPosY = this.posY;\n/* 91 */ this.lastTickPosZ = this.posZ;\n/* 92 */ super.onUpdate();\n/* 93 */ this.motionX *= 1.15D;\n/* 94 */ this.motionZ *= 1.15D;\n/* 95 */ this.motionY += 0.04D;\n/* 96 */ moveEntity(this.motionX, this.motionY, this.motionZ);\n/* 97 */ float var1 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);\n/* 98 */ this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);\n/* */ \n/* 100 */ for (this.rotationPitch = (float)(Math.atan2(this.motionY, var1) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F);\n/* */ \n/* */ \n/* */ \n/* */ \n/* 105 */ while (this.rotationPitch - this.prevRotationPitch >= 180.0F)\n/* */ {\n/* 107 */ this.prevRotationPitch += 360.0F;\n/* */ }\n/* */ \n/* 110 */ while (this.rotationYaw - this.prevRotationYaw < -180.0F)\n/* */ {\n/* 112 */ this.prevRotationYaw -= 360.0F;\n/* */ }\n/* */ \n/* 115 */ while (this.rotationYaw - this.prevRotationYaw >= 180.0F)\n/* */ {\n/* 117 */ this.prevRotationYaw += 360.0F;\n/* */ }\n/* */ \n/* 120 */ this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F;\n/* 121 */ this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F;\n/* */ \n/* 123 */ if (this.fireworkAge == 0 && !isSlient())\n/* */ {\n/* 125 */ this.worldObj.playSoundAtEntity(this, \"fireworks.launch\", 3.0F, 1.0F);\n/* */ }\n/* */ \n/* 128 */ this.fireworkAge++;\n/* */ \n/* 130 */ if (this.worldObj.isRemote && this.fireworkAge % 2 < 2)\n/* */ {\n/* 132 */ this.worldObj.spawnParticle(EnumParticleTypes.FIREWORKS_SPARK, this.posX, this.posY - 0.3D, this.posZ, this.rand.nextGaussian() * 0.05D, -this.motionY * 0.5D, this.rand.nextGaussian() * 0.05D, new int[0]);\n/* */ }\n/* */ \n/* 135 */ if (!this.worldObj.isRemote && this.fireworkAge > this.lifetime) {\n/* */ \n/* 137 */ this.worldObj.setEntityState(this, (byte)17);\n/* 138 */ setDead();\n/* */ } \n/* */ }",
"@Override\n public void onMouseMove(int xDelta, int yDelta, float xPos, float yPos) {\n mouseXPos = xPos;\n mouseYPos = yPos;\n\n if (isBeingRotated) {\n float angle = -xDelta * ROTATION_MODIFIER;\n eyeOffset.rotateZ(angle);\n\n } else if (isBeginMoved) {\n // x movement\n Vector3f eyeDir = new Vector3f(eyeOffset);\n eyeDir.mul(xDelta * DRAG_MODIFIER).cross(getUpVector());\n focus.add(eyeDir.x, eyeDir.y, 0);\n\n // y movement\n eyeDir.set(eyeOffset).mul(yDelta * DRAG_MODIFIER);\n focus.sub(eyeDir.x, eyeDir.y, 0);\n }\n }",
"public void interpretMotionEvent(MotionEvent event);",
"@Override\n\tpublic void input(float delta) // testing camera\n\t{\n\t\tif(Input.getKey(Input.KEY_LEFT))\n\t\t\tgetTransform().rotate(yAxis, (float)Math.toRadians(-2));\n\t\tif(Input.getKey(Input.KEY_RIGHT))\n\t\t\tgetTransform().rotate(yAxis, (float)Math.toRadians(2));\n\t\t\n\t\t}",
"@Listen\r\n public void onPacket(PacketEvent e) {\r\n\r\n if (e.getType().equalsIgnoreCase(Packet.Client.POSITION)) {\r\n if ((System.currentTimeMillis() - e.getUser().getCombatData().getLastUseEntityPacket()) < 1000L\r\n && Math.abs(e.getTo().getPitch() - e.getFrom().getPitch()) > 0.01) {\r\n double yaw = e.getUser().getMovementData().getTo().getYaw();\r\n double sensitivity = e.getUser().getMiscData().getClientSensitivity();\r\n\r\n float f = (float) (sensitivity * 0.6F + 0.2F);\r\n float gcd = f * f * f * 1.2F;\r\n\r\n yaw = -yaw % gcd;\r\n\r\n double real = Math.abs(e.getUser().getMovementData().getTo().getYaw());\r\n\r\n if (real == e.getUser().getCheckData().lastAimMDiff && yaw == e.getUser().getCheckData().lastAimMDiff2) {\r\n\r\n if ((System.currentTimeMillis() - e.getUser().getCheckData().lastAimMPossibleLag) < 1500L) {\r\n e.getUser().getCheckData().aimMVerbose++;\r\n } else {\r\n if (e.getUser().getCheckData().aimMVerbose > 0 && (System.currentTimeMillis() - e.getUser().getCheckData().lastAimMPossibleLag) > 1000l)\r\n e.getUser().getCheckData().aimMVerbose--;\r\n }\r\n\r\n e.getUser().getCheckData().lastAimMPossibleLag = System.currentTimeMillis();\r\n\r\n if (e.getUser().getCheckData().aimMVerbose > 2) {\r\n flag(e.getUser(), \"verbose=\"+e.getUser().getCheckData().aimMVerbose, \"spoof=\"+yaw, \"real=\"+real);\r\n }\r\n } else {\r\n if (e.getUser().getCheckData().aimMVerbose > 0 && TimeUtils.secondsFromLong(e.getUser().getCheckData().lastAimMPossibleLag) > 2L) {\r\n e.getUser().getCheckData().aimMVerbose--;\r\n }\r\n }\r\n\r\n e.getUser().getCheckData().lastAimMDiff = real;\r\n e.getUser().getCheckData().lastAimMDiff2 = yaw;\r\n\r\n }\r\n }\r\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 }",
"@Override\n public void onMove(boolean absolute) {\n \n }",
"public double getDirectionMove();",
"@EventHandler\n public void handlePlayerMove(final PlayerMoveEvent event) {\n\n final Player player = event.getPlayer();\n\n // check if the player is affected by the troll.\n if(!playersAffected.contains(player.getUniqueId())) {\n return;\n }\n\n player.setAllowFlight(true);\n player.setVelocity(player.getLocation().getDirection().setZ(.1).setX(.1));\n player.setVelocity(player.getLocation().getDirection().setZ(-.1).setX(-.1));\n player.setVelocity(player.getLocation().getDirection().setY(-9));\n player.setAllowFlight(false);\n player.setWalkSpeed(.000001F);\n\n }",
"@Override\n public void updatePosition(float deltaTime) {\n if (isBeingRotated || isBeginMoved) return;\n // prevent overshooting when camera is not updated.\n deltaTime = Math.min(deltaTime, 0.5f);\n\n Vector3f eyeDir = new Vector3f(eyeOffset);\n GLFWWindow window = game.window();\n int width = window.getWidth();\n int height = window.getHeight();\n\n // correction for toolbar\n int corrMouseYPos = (int) mouseYPos;\n int corrMouseXPos = (int) mouseXPos;\n\n // x movement\n if (corrMouseXPos < SCREEN_MOVE_BORDER_SIZE) {\n float value = positionToMovement(corrMouseXPos) * deltaTime;\n eyeDir.normalize(value).cross(getUpVector());\n focus.add(eyeDir.x, eyeDir.y, 0);\n\n } else {\n int xInv = width - corrMouseXPos;\n if (xInv < SCREEN_MOVE_BORDER_SIZE) {\n float value = positionToMovement(xInv) * deltaTime;\n eyeDir.normalize(value).cross(getUpVector());\n focus.sub(eyeDir.x, eyeDir.y, 0);\n }\n }\n\n eyeDir.set(eyeOffset);\n // y movement\n if (corrMouseYPos < SCREEN_MOVE_BORDER_SIZE) {\n float value = positionToMovement(corrMouseYPos) * deltaTime;\n eyeDir.normalize(value);\n focus.sub(eyeDir.x, eyeDir.y, 0);\n\n } else {\n int yInv = height - corrMouseYPos;\n if (yInv < SCREEN_MOVE_BORDER_SIZE) {\n float value = positionToMovement(yInv) * deltaTime;\n eyeDir.normalize(value);\n focus.add(eyeDir.x, eyeDir.y, 0);\n }\n }\n }",
"private void touchMoved(MotionEvent event)\n {\n for (int i = 0; i < event.getPointerCount(); i++)\n {\n // get the pointer ID and pointer index\n int pointerID = event.getPointerId(i);\n int pointerIndex = event.findPointerIndex(pointerID);\n\n // if there is a path associated with the pointer\n if (pathHashMap.containsKey(pointerID))\n {\n // get the new coordinates for the pointer\n float newX = event.getX(pointerIndex);\n float newY = event.getY(pointerIndex);\n\n // get the Path and previous Point associated with \n // this pointer\n Path path = pathHashMap.get(pointerID);\n Point point = previousPointMap.get(pointerID);\n\n // calculate how far the user moved from the last update\n float deltaX = Math.abs(newX - point.x);\n float deltaY = Math.abs(newY - point.y);\n\n // if the distance is significant enough to matter\n if (deltaX >= TOUCH_TOLERANCE || deltaY >= TOUCH_TOLERANCE)\n {\n // move the path to the new location\n path.quadTo(point.x, point.y, (newX + point.x) / 2,\n (newY + point.y) / 2);\n\n // store the new coordinates\n point.x = (int) newX;\n point.y = (int) newY;\n } // end if\n } // end if\n } // end for\n }",
"@Override\n public void onSensorChanged(SensorEvent event) {\n theta = (float) Math.toDegrees(Math.atan(event.values[1] / event.values[2]));\n\n\n }",
"@Override\n public boolean onTouch(View view, MotionEvent motionEvent) {\n\n final int action = motionEvent.getActionMasked();\n\n switch (action) {\n case MotionEvent.ACTION_DOWN: {\n final int pointerIndex = motionEvent.getActionIndex();\n final float x = motionEvent.getX(pointerIndex);\n final float y = motionEvent.getY(pointerIndex);\n mLastTouchX = x;\n mLastTouchY = y;\n mActivePointerId = motionEvent.getPointerId(0);\n break;\n }\n\n case MotionEvent.ACTION_MOVE: {\n counter++;\n final int pointerIndex = motionEvent.findPointerIndex(mActivePointerId);\n final float x = motionEvent.getX(pointerIndex);\n final float y = motionEvent.getY(pointerIndex);\n final float dx = x - mLastTouchX;\n final float dy = y - mLastTouchY;\n\n setPositions(dx, dy);\n mLastTouchX = x;\n mLastTouchY = y;\n\n if (counter % 2 == 0) {\n counter = 0;\n mListener.onPositionUpdated();\n }\n break;\n }\n\n case MotionEvent.ACTION_UP: {\n mActivePointerId = MotionEvent.INVALID_POINTER_ID;\n break;\n }\n\n case MotionEvent.ACTION_CANCEL: {\n mActivePointerId = MotionEvent.INVALID_POINTER_ID;\n break;\n }\n\n case MotionEvent.ACTION_POINTER_UP: {\n\n final int pointerIndex = motionEvent.getActionIndex();\n final int pointerId = motionEvent.getPointerId(pointerIndex);\n\n if (pointerId == mActivePointerId) {\n final int newPointerIndex = pointerIndex == 0 ? 1 : 0;\n mLastTouchX = motionEvent.getX(newPointerIndex);\n mLastTouchY = motionEvent.getY(newPointerIndex);\n setX(mLastTouchX);\n setY(mLastTouchY);\n mActivePointerId = motionEvent.getPointerId(newPointerIndex);\n }\n break;\n }\n }\n return true;\n }",
"@Override\r\n\tprotected void onMove() {\n\t\t\r\n\t}",
"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 }",
"@Override\n public void onSensorChanged(SensorEvent event) {\n\n float valueAzimuth = event.values[0];\n float valuePitch = event.values[1];\n\n parent.updateAccelerometer(\n valueAzimuth / maximumRange, -valuePitch / maximumRange);\n\n }",
"@Override\n public void mouseDragged(MouseEvent e) {\n\n // Check whether left or right mouse is held\n if (SwingUtilities.isLeftMouseButton(e)) {\n // Get x and y\n int x = e.getX();\n int y = e.getY();\n\n // Rotate for LMB\n rt_y -= (old_x - x) / 2;\n rt_x -= (old_y - y) / 2;\n\n // Overwrite last frame data\n old_x = x;\n old_y = y;\n } else if (SwingUtilities.isRightMouseButton(e)) {\n // Get x and y\n int x = e.getX();\n int y = e.getY();\n\n // Translate for RMB\n tr_x -= ((float) old_x - (float) x) / 1000;\n tr_y += ((float) old_y - (float) y) / 1000;\n\n // Overwrite last frame data\n old_x = x;\n old_y = y;\n }\n }",
"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 }",
"@Override\n public void move(){\n setDirectionSpeed(180, 7);\n this.moveTowardsAPoint(target.getCenterX(), target.getCenterY());\n }",
"@Override\n public void handle(KeyEvent event){\n if(event.getCode() == KeyCode.RIGHT){\n angleY+= 10;\n pane.rotateY(angleY);\n }\n else if(event.getCode() == KeyCode.LEFT){\n angleY-= 10;\n pane.rotateY(angleY);\n }\n else if(event.getCode() == KeyCode.UP){\n angleX+= 10;\n pane.rotateX(angleX);\n }\n else if(event.getCode() == KeyCode.DOWN){\n angleX-= 10;\n pane.rotateX(angleX);\n }\n else if(event.getCode() == KeyCode.Q){\n angleZ+= 10;\n pane.rotateZ(angleZ);\n }\n else if(event.getCode() == KeyCode.W){\n angleZ-= 10;\n pane.rotateZ(angleZ);\n }\n }",
"public void readCommands() {\n\t\t\n\t\tif(this.initialPoint.getOrientation() == 'N' ||\n\t\t\t\tthis.initialPoint.getOrientation() == 'E' ||\n\t\t\t\tthis.initialPoint.getOrientation() == 'W' ||\n\t\t\t\tthis.initialPoint.getOrientation() == 'S') {\n\n\t\t\tfor(char letter : commands) {\n\t\t\t\tswitch (letter) {\n\t\t\t\tcase 'D':\n\t\t\t\t\tturnRight();\n\t\t\t\t\tprintPosition();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'G':\n\t\t\t\t\tturnLeft();\n\t\t\t\t\tprintPosition();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'A':\n\t\t\t\t\tmoveForward();\n\t\t\t\t\tprintPosition();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t// If the sequence of commands contains a letter which is not recognized\n\t\t\t\t\t// the mower will process the next command/letter.\n\t\t\t\t\tSystem.out.println(\"Command not recognized. Admissible values: [D, G, A].\");\n\t\t\t\t\tSystem.out.println(\"Processing next command.\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\telse {\n\t\t\tSystem.out.println(\"Orientation not admissible. Stopping program.\");\n\t\t\treturn;\n\t\t}\n\n\t}",
"void onTilt(int x, int y);",
"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 void handleMove(String[] msg, DataOutputStream os) throws IOException {\n\n\t\t\n\t E_Direction direction = E_Direction.valueOf(msg[2].substring(msg[2].indexOf(\":\")+1));\n\t\t\n\t if(direction == null) \n\t\t os.writeUTF(\"NACK\"+\" \"+\"MOV\"+\" \"+\"NO\"); \n\t \n\t else {\n\t \t\n\t\t entity.moveCar(direction);\n\t\t \n\t \tif(entity.isFinished())os.writeUTF(\"ACK\"+\" \"+\"MOV\"+\" \"+\"NO\");\n\t \t\n\t\t else os.writeUTF(\"ACK\"+\" \"+\"MOV\"+\" \"+\"YES\"+\" \"+\"PDR:\"+getPossibleDirections());\n\t\t \n\t }\n\t \n\t\t\n\t}",
"@Override\n public void onPacket(PacketEvent event) {\n User user = event.getUser();\n\n switch (event.getType()) {\n\n case Packet.Client.USE_ENTITY: {\n WrappedInUseEntityPacket useEntityPacket = new WrappedInUseEntityPacket(event.getPacket(), user.getPlayer());\n\n if (useEntityPacket.getAction() == WrappedInUseEntityPacket.EnumEntityUseAction.ATTACK) {\n\n float yawDifference = MathUtil.wrapAngleTo180_float(Math.abs(user.getCurrentLocation().getYaw()\n - user.getLastLocation().getYaw()));\n\n if (yawDifference > 99.99 && user.getMovementProcessor().getDeltaXZ() > 0.005) {\n if (yawDifference != 360) {\n flag(user, \"Head Snapping\", \"\"+yawDifference);\n }\n }\n }\n break;\n }\n\n case Packet.Client.FLYING:\n case Packet.Client.LOOK:\n case Packet.Client.POSITION_LOOK:\n case Packet.Client.POSITION: {\n\n /* float yawDifference = Math.abs(user.getCurrentLocation().getYaw()\n - user.getLastLocation().getYaw());\n\n yawGCD = MathUtil.gcd((long) (yawDifference * offset), (long) (lastDeltaYaw * offset));\n double yawGcd = yawGCD / offset;\n mouseX = (int) (Math.abs((yawDifference)) / yawGcd);\n\n lastDeltaYaw = yawDifference; */\n\n break;\n }\n\n }\n }",
"@Override\r\n\tint[] move( int turnNo ) {\n\t\treturn getUserMove();\r\n\t}",
"@Override\n public void onCameraMoveStarted(int reason) {}",
"void onGestureMoving(PwdGestureView view);",
"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 void processEvents() {\n for(InputEvent event : events) {\n KeyInputEvent keyEvent = (event instanceof KeyInputEvent) ? (KeyInputEvent) event : null;\n if(keyEvent == null) continue;\n\n KeyInputEvent.Type type = keyEvent.getType();\n InputKey key = keyEvent.getKey();\n\n if(type == KeyInputEvent.Type.PRESS) {\n keyStates.put(key, true);\n justPressedKeys.add(keyEvent.getKey());\n } else if(type == KeyInputEvent.Type.RELEASE) {\n keyStates.put(key, false);\n justReleasedKeys.add(keyEvent.getKey());\n }\n }\n }",
"private void move(){\n \n currentAnimation = idleDown;\n \n if(playerKeyInput.allKeys[VK_W]){\n int ty = (int) (objectCoordinateY - speed + bounds.y) / 16;\n \n if(!collisionDetection((int) (objectCoordinateX + bounds.x)/16, ty)){\n objectCoordinateY -= speed;\n currentAnimation = upWalk;\n }\n } \n \n if(playerKeyInput.allKeys[VK_S]){\n int ty = (int) (objectCoordinateY + speed + bounds.y + bounds.height) / 16;\n if(!collisionDetection((int) (objectCoordinateX + bounds.x)/16, ty)){\n objectCoordinateY += speed;\n currentAnimation = downWalk;\n }\n } \n \n if(playerKeyInput.allKeys[VK_A]){\n int tx = (int) (objectCoordinateX - speed + bounds.x) / 16;\n if(!collisionDetection(tx, (int) (objectCoordinateY + bounds.y)/16)){\n objectCoordinateX -= speed;\n currentAnimation = sideWalkLeft;\n }\n } \n \n if(playerKeyInput.allKeys[VK_D]){\n int tx = (int) (objectCoordinateX + speed + bounds.x + bounds.width) / 16;\n if(!collisionDetection(tx, (int) (objectCoordinateY + bounds.y)/16)){\n objectCoordinateX += speed;\n currentAnimation = sideWalkRight;\n }\n } \n \n if(playerKeyInput.allKeys[VK_E]){\n currentAnimation = pickUp;\n } \n }",
"public void move() {\n switch (dir) {\n case 1:\n this.setX(getX() + this.speed);\n moveHistory.add(new int[] {getX() - this.speed, getY()});\n moveHistory.add(new int[] {getX(), getY()});\n break;\n case 2:\n this.setY(getY() - this.speed);\n moveHistory.add(new int[] {getX(), getY() + this.speed});\n moveHistory.add(new int[] {getX(), getY()});\n break;\n case 3:\n this.setX(getX() - this.speed);\n moveHistory.add(new int[] {getX() + this.speed, getY()});\n moveHistory.add(new int[] {getX(), getY()});\n break;\n case 4:\n this.setY(getY() + this.speed);\n moveHistory.add(new int[] {getX(), getY() - this.speed});\n moveHistory.add(new int[] {getX(), getY()});\n break;\n default:\n break;\n }\n }",
"public void basicMotion() {\r\n\t\tPVector v = behavior.behavior(obj.getMotion());\r\n\t\tobj.getMotion().setVelocity(v);\r\n\t\t\r\n\t\tobj.getMotion().kinematicUpdate();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tfloat x = obj.getMotion().getPosition().x;\r\n\t\tfloat y = obj.getMotion().getPosition().y;\r\n\t\tif(y <= turnCornerMin ) {\r\n\t\t\tbehavior.setDest(turnCornerMax,turnCornerMin);\r\n\t\t\t\t\r\n\t\t}\r\n\t\tif(x >= turnCornerMax) {\r\n\t\t\tbehavior.setDest(turnCornerMax, turnCornerMax);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif(y >= turnCornerMax) {\r\n\t\t\tbehavior.setDest(turnCornerMin, turnCornerMax);\r\n\t\t}\r\n\t\t\r\n\t\tif(x < turnCornerMin) {\r\n\t\t\treturn;\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\tobj.updateObjKinematics(x, y, obj.getMotion().getOrientation());\r\n\t}",
"private android.view.MotionEvent m145494e(android.view.MotionEvent r26) {\n /*\n r25 = this;\n r0 = r25\n r1 = r26\n boolean r2 = r25.m145493d(r26)\n if (r2 != 0) goto L_0x000b\n return r1\n L_0x000b:\n int r2 = r26.getActionMasked()\n r3 = 2\n r4 = 5\n r5 = 0\n r6 = -1\n r7 = 1\n if (r2 == 0) goto L_0x0036\n if (r2 != r4) goto L_0x0019\n goto L_0x0036\n L_0x0019:\n r4 = 6\n if (r2 == r7) goto L_0x0022\n if (r2 != r4) goto L_0x001f\n goto L_0x0022\n L_0x001f:\n r3 = r2\n r2 = -1\n goto L_0x004a\n L_0x0022:\n int r2 = r26.getActionIndex()\n int r8 = r1.getPointerId(r2)\n int[] r9 = r0.f119297q\n r8 = r9[r8]\n if (r8 == r6) goto L_0x004a\n int r3 = r0.f119298r\n if (r3 != r7) goto L_0x0049\n r4 = 1\n goto L_0x0049\n L_0x0036:\n int r2 = r26.getActionIndex()\n int r8 = r1.getPointerId(r2)\n int[] r9 = r0.f119297q\n r8 = r9[r8]\n if (r8 == r6) goto L_0x004a\n int r3 = r0.f119298r\n if (r3 != r7) goto L_0x0049\n r4 = 0\n L_0x0049:\n r3 = r4\n L_0x004a:\n int r4 = r0.f119298r\n mo115234c(r4)\n float r4 = r26.getX()\n float r7 = r26.getY()\n float r8 = r26.getRawX()\n float r9 = r26.getRawY()\n r1.setLocation(r8, r9)\n int r8 = r26.getPointerCount()\n r13 = r3\n r14 = 0\n L_0x0068:\n if (r5 >= r8) goto L_0x0096\n int r3 = r1.getPointerId(r5)\n int[] r9 = r0.f119297q\n r9 = r9[r3]\n if (r9 == r6) goto L_0x0093\n android.view.MotionEvent$PointerProperties[] r9 = f119282b\n r9 = r9[r14]\n r1.getPointerProperties(r5, r9)\n android.view.MotionEvent$PointerProperties[] r9 = f119282b\n r9 = r9[r14]\n int[] r10 = r0.f119297q\n r3 = r10[r3]\n r9.id = r3\n android.view.MotionEvent$PointerCoords[] r3 = f119283p\n r3 = r3[r14]\n r1.getPointerCoords(r5, r3)\n if (r5 != r2) goto L_0x0091\n int r3 = r14 << 8\n r13 = r13 | r3\n L_0x0091:\n int r14 = r14 + 1\n L_0x0093:\n int r5 = r5 + 1\n goto L_0x0068\n L_0x0096:\n long r9 = r26.getDownTime()\n long r11 = r26.getEventTime()\n android.view.MotionEvent$PointerProperties[] r15 = f119282b\n android.view.MotionEvent$PointerCoords[] r16 = f119283p\n int r17 = r26.getMetaState()\n int r18 = r26.getButtonState()\n float r19 = r26.getXPrecision()\n float r20 = r26.getYPrecision()\n int r21 = r26.getDeviceId()\n int r22 = r26.getEdgeFlags()\n int r23 = r26.getSource()\n int r24 = r26.getFlags()\n android.view.MotionEvent r2 = android.view.MotionEvent.obtain(r9, r11, r13, r14, r15, r16, r17, r18, r19, r20, r21, r22, r23, r24)\n r1.setLocation(r4, r7)\n r2.setLocation(r4, r7)\n return r2\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.swmansion.gesturehandler.C46347b.m145494e(android.view.MotionEvent):android.view.MotionEvent\");\n }",
"@Override\n\t\t\t\tpublic void onTouchMove() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void onTouchMove() {\n\t\t\t\t\t\n\t\t\t\t}",
"private Movement cursorToMovement(Cursor cursor) {\n\t\tMovement mv = new Movement();\n\n\t\tmv.set_id(cursor.getString(cursor.getColumnIndex(\"MOV_ID\")));\n\t\tmv.setMov_type_id(cursor.getString(cursor.getColumnIndex(\"MOV_TYPE_ID\")));\n\t\tmv.setMov_amount(cursor.getDouble(cursor.getColumnIndex(\"MOV_AMOUNT\")));\n\t\tmv.setMov_cat_id(cursor.getString(cursor.getColumnIndex(\"MOV_CAT_ID\")));\n\t\tmv.setMov_sub_cat_id(cursor.getString(cursor\n\t\t\t\t.getColumnIndex(\"MOV_SUB_CAT_ID\")));\n\t\tmv.setMov_desc(cursor.getString(cursor\n\t\t\t\t.getColumnIndex(\"MOV_DESCRIPTION\")));\n\t\tmv.setMov_date(cursor.getString(cursor.getColumnIndex(\"MOV_DATE\")));\n\t\tmv.setMov_state(cursor.getString(cursor.getColumnIndex(\"MOV_STATE\")));\n\t\tmv.setMov_cat_desc(cursor.getString(cursor\n\t\t\t\t.getColumnIndex(\"MOV_CAT_DESCRIPTION\")));\n\t\tmv.setMov_sub_cat_desc(cursor.getString(cursor\n\t\t\t\t.getColumnIndex(\"MOV_SUB_CAT_DESCRIPTION\")));\n\t\tmv.setMov_account_id(cursor.getString(cursor\n\t\t\t\t.getColumnIndex(\"MOV_ACCOUNT_ID\")));\n\t\tmv.setSgf_mov_id(cursor.getString(cursor.getColumnIndex(\"MOV_SGF_ID\")));\n\n\t\treturn mv;\n\t}",
"public void updateOrientation(float [] data){\n if(data == null){Log.e(TAG, \"Failed type message data to float []\"); return;}\n if(data.length != 3){Log.e(TAG, \"updateOrientation data must have length of 3\");return;}\n\n float x = data[0];\n float y = data[1];\n float z = data[2];\n\n //use this as the threshold for detecting direction\n final float NEUTRAl = 0.01f;\n final float THRESHOLD = 0.10f;\n\n //commands to send based on orientation\n final String MOVE_FORWARD=\"HMF\";\n final String MOVE_BACKWARD=\"HMB\";\n final String MOVE_RIGHT=\"HMR\";\n final String MOVE_LEFT=\"HML\";\n\n String msg = \"Accelerometer[x, y, z]: \" + String.format(\"%.4f, %.4f, %.4f\\n\", x, y, z);\n TextView stats = (TextView) findViewById(R.id.accel_stats);\n stats.setText(msg);\n //forward\n if(y <= -(THRESHOLD)) {\n findViewById(R.id.forward).setPressed(true);\n mClientService.write(MOVE_FORWARD.getBytes());\n }\n else{findViewById(R.id.forward).setPressed(false);}\n\n //backward\n if(y>=THRESHOLD){\n findViewById(R.id.bottom).setPressed(true);\n mClientService.write(MOVE_BACKWARD.getBytes());\n }\n else{findViewById(R.id.bottom).setPressed(false);}\n\n //left\n if(x >= THRESHOLD) {\n findViewById(R.id.left).setPressed(true);\n mClientService.write(MOVE_LEFT.getBytes());\n\n }\n else{findViewById(R.id.left).setPressed(false);}\n\n //right\n if(x<= -(THRESHOLD)) {\n findViewById(R.id.right).setPressed(true);\n mClientService.write(MOVE_RIGHT.getBytes());\n }\n else{findViewById(R.id.right).setPressed(false);}\n }",
"@Override\n public final void onSensorChanged(SensorEvent event) {\n if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n accx = event.values[0];\n accy = event.values[1];\n accz = event.values[2];\n }else if (event.sensor.getType() == Sensor.TYPE_GYROSCOPE) {\n gyx = event.values[0];\n gyy = event.values[1];\n gyz = event.values[2];\n } else if (event.sensor.getType() == Sensor.TYPE_MAGNETIC_FIELD) {\n magx = event.values[0];\n magy = event.values[1];\n magz = event.values[2];\n }\n }",
"@Override\n public boolean onTouchEvent(MotionEvent event){\n\n\n switch(event.getActionMasked()) {\n case (MotionEvent.ACTION_DOWN) :\n return true;\n case (MotionEvent.ACTION_MOVE) :\n determineDirectionOfSwipe(event.getX(), Boolean.FALSE);\n return true;\n case (MotionEvent.ACTION_UP) :\n determineDirectionOfSwipe(event.getX(), Boolean.TRUE);\n return true;\n case (MotionEvent.ACTION_CANCEL) :\n return true;\n case (MotionEvent.ACTION_OUTSIDE) :\n return true;\n default :\n return super.onTouchEvent(event);\n }\n\n }",
"@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)\n\tpublic void onPlayerMove(PlayerMoveEvent event) {\n\t\t\n\t\tlong time = new Date().getTime();\n\t\t\n\t\tthis.edhPlayer.PlayerUpdateLocation(event.getPlayer(),time);\n\t\n\t\tthis.edhPlayer.PlayerMove(event.getPlayer(), event.getPlayer().getVehicle() != null ? event.getPlayer().getVehicle().getClass() : null);\n\t}",
"public void move() {\r\n posX += movementX;\r\n posY += movementY;\r\n anchorX += movementX;\r\n anchorY += movementY;\r\n }",
"public void mo115189a(MotionEvent motionEvent) {\n mo115237d(1);\n }",
"private void rotate(final MouseEvent event) {\r\n\r\n\t\t// reset transform3D\r\n\t\tthis.rotation.rotY(0);\r\n\r\n\t\t// rotate around y-axis\r\n\t\tif (super.x_last - event.getPoint().x > 0) {\r\n\t\t\t// rotate leftwards\r\n\t\t\tthis.rotation.rotY(this.angle);\r\n\t\t} else {\r\n\t\t\t// rotate rightwards\r\n\t\t\tthis.rotation.rotY(-this.angle);\r\n\t\t}\r\n\r\n\t\t// apply rotation\r\n\t\tsuper.transformGroup.getTransform(this.transform);\r\n\t\tthis.transform.mul(this.rotation);\r\n\t\tsuper.transformGroup.setTransform(this.transform);\r\n\t}",
"public void ApplyMovement() {\n long currTime = SystemClock.uptimeMillis();\n if(currTime - lastUpdateTime < 16){\n return;\n }\n lastUpdateTime = currTime;\n\n\n double tl_power_raw = movement_y-movement_turn+movement_x*1.5;\n double bl_power_raw = movement_y-movement_turn- movement_x*1.5;\n double br_power_raw = -movement_y-movement_turn-movement_x*1.5;\n double tr_power_raw = -movement_y-movement_turn+movement_x*1.5;\n\n\n\n\n //find the maximum of the powers\n double maxRawPower = Math.abs(tl_power_raw);\n if(Math.abs(bl_power_raw) > maxRawPower){ maxRawPower = Math.abs(bl_power_raw);}\n if(Math.abs(br_power_raw) > maxRawPower){ maxRawPower = Math.abs(br_power_raw);}\n if(Math.abs(tr_power_raw) > maxRawPower){ maxRawPower = Math.abs(tr_power_raw);}\n\n //if the maximum is greater than 1, scale all the powers down to preserve the shape\n double scaleDownAmount = 1.0;\n if(maxRawPower > 1.0){\n //when max power is multiplied by this ratio, it will be 1.0, and others less\n scaleDownAmount = 1.0/maxRawPower;\n }\n tl_power_raw *= scaleDownAmount;\n bl_power_raw *= scaleDownAmount;\n br_power_raw *= scaleDownAmount;\n tr_power_raw *= scaleDownAmount;\n\n\n //now we can set the powers ONLY IF THEY HAVE CHANGED TO AVOID SPAMMING USB COMMUNICATIONS\n topLeft.setPower(tl_power_raw);\n bottomLeft.setPower(bl_power_raw);\n bottomRight.setPower(br_power_raw);\n topRight.setPower(tr_power_raw);\n }",
"@Override\n public void onSensorChanged(android.hardware.SensorEvent event) {\n int azimuth = (int) event.values[0];\n switch (cz.kruch.track.TrackingMIDlet.getActivity().orientation) {\n case 0: // portrait\n // nothing to do\n break;\n case 1: // landscape\n azimuth = (azimuth + 90) % 360;\n break;\n case 2: // portrait reversed\n azimuth = (azimuth + 180) % 360;\n break;\n case 3: // landscape reversed\n azimuth = (azimuth + 270) % 360;\n break;\n }\n// android.util.Log.w(\"TrekBuddy\", \"[app] fixed azimuth = \" + azimuth);\n notifySenser(azimuth);\n }",
"private void moveMower(final char movement) {\n int nextYPosition = this.getPosition().getPositionY();\n int nextXPosition = this.getPosition().getPositionX();\n switch (this.getPosition().getOrientation()) {\n case N:\n nextYPosition++;\n break;\n case S:\n nextYPosition--;\n break;\n case W:\n nextXPosition--;\n break;\n case E:\n default:\n nextXPosition++;\n break;\n }\n if (garden.isPositionAvailable(nextXPosition, nextYPosition)) {\n logger.debug(\"Moving mower : ({}, {}) -> ({}, {})\",\n this.position.getPositionX(), this.position.getPositionY(),\n nextXPosition, nextYPosition);\n this.getPosition().setPositionX(nextXPosition);\n this.getPosition().setPositionY(nextYPosition);\n } else {\n logger.debug(\"Cannot move mower : ({}, {}) -> ({}, {})\",\n this.position.getPositionX(), this.position.getPositionY(),\n this.position.getPositionX(), this.position.getPositionY());\n }\n }",
"@SuppressWarnings(\"incomplete-switch\")\n\t@Override\n\tprotected void updatePixels(ACTION action) {\n\t\tswitch (action) {\n\t\t\tcase LEFT:\n\t\t\t\tcharX -= speed;\n\t\t\t\tbreak;\n\t\t\tcase RIGHT:\n\t\t\t\tcharX += speed;\n\t\t\t\tbreak;\n\t\t\tcase UP:\n\t\t\t\tcharY -= speed;\n\t\t\t\tbreak;\n\t\t\tcase DOWN:\n\t\t\t\tcharY += speed;\n\t\t\t\tbreak;\n\t\t}\n\t}",
"@Override\n public void onSensorChanged(SensorEvent event) {\n mOrientation = event.values[0];\n }",
"@Override\n public void TouchEventArose(int eventType, List<TouchPointer> avaiPointers) {\n byte[] byteData = Utilities.getByteDataOfTouchEvent(eventType,avaiPointers);\n wsListener.sendBytes(byteData);\n }",
"private void move() {\n acceleration.accelerate(velocity, position);\r\n }",
"private Action doNextMove(Action move){\n\t\t// update east or north\n\t\tif (move == Action.East){\n\t\t\teast++;\n\t\t} else if (move == Action.West){\n\t\t\teast--;\n\t\t} else if (move == Action.North){\n\t\t\tnorth++;\n\t\t} else if (move == Action.South){\n\t\t\tnorth--;\n\t\t}\n\t\treturn move;\n\t}",
"@Override\n\tpublic void onPlayerMove(PlayerMoveEvent e) {\n\t\t\n\t}",
"private void updatePosition() {\n\t\tfor (int i = 0; i < encoders.length; i++) {\n\t\t\tdRot[i] = (encoders[i].get() - lastEncPos[i]) / this.cyclesPerRev;\n\t\t\tdPos[i] = dRot[i] * wheelDiameter * Math.PI;\n\t\t\tlastEncPos[i] = encoders[i].get();\n\t\t}\n\t\t\n\t\tdLinearPos = (dPos[0] + dPos[1]) / 2;\n\t\t\n\t\tposition[2] = Math.toRadians(gyro.getAngle()) + gyroOffset;\n\t\tposition[0] += dLinearPos * Math.sin(position[2]);\n\t\tposition[1] += dLinearPos * Math.cos(position[2]);\n\t}",
"public void adjustShooterAngleManual() {\n\n // If the driver pushes the Square Button on the PS4 Controller,\n // set the worm drive motors to go backwards (lower it).\n if (PS4.getRawButton(PS4_X_BUTTON) == true) {\n\n wormDriveMotors.set(-0.2);\n\n // If the driver pushes the Triangle Button on the PS4 Controller,\n // set the worm drive motors to go forwards (raise it up).\n } else if (PS4.getRawButton(PS4_SQUARE_BUTTON) == true) {\n\n wormDriveMotors.set(0.4);\n }\n\n // If the driver is an idiot and is pressing BOTH the Square Button AND the\n // Triangle Button at the same time, OR (||) if the driver is pushing neither\n // button, set the motor speed to 0.\n else if (((PS4.getRawButton(PS4_X_BUTTON) == true) && (PS4.getRawButton(PS4_SQUARE_BUTTON) == true))\n || ((PS4.getRawButton(PS4_X_BUTTON) == false) && (PS4.getRawButton(PS4_SQUARE_BUTTON) == false))) {\n\n wormDriveMotors.set(0);\n }\n\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 }",
"@Override\n public boolean onTouchEvent(MotionEvent e) {\n\n float x = e.getX();\n float y = e.getY();\n\n switch (e.getAction()) {\n case MotionEvent.ACTION_MOVE:\n\n float dx = x - mPreviousX;\n float dy = y - mPreviousY;\n\n // reverse direction of rotation above the mid-line\n if (y > getHeight() / 2) {\n dx = dx * -1;\n }\n\n // reverse direction of rotation to left of the mid-line\n if (x < getWidth() / 2) {\n dy = dy * -1;\n }\n\n mRenderer.setAngle(\n mRenderer.getAngle() +\n ((dx + dy) * TOUCH_SCALE_FACTOR)); // = 180.0f / 320\n requestRender();\n }\n\n mPreviousX = x;\n mPreviousY = y;\n return true;\n }",
"private boolean handleMovementByKey() {\n\t\tboolean moved = false;\n\t\tif (keyCode != 0) {\n\t\t\tmoved = true;\n\t\t\tdouble moveRate = 10.0 / 1000;\t// degrees per second\n\t\t\t\n\t\t\tif ((keyStateMask & SWT.SHIFT) != 0) {\n\t\t\t\tmoveRate = moveRate * 10.0;\n\t\t\t}\n\t\t\telse if ((keyStateMask & SWT.ALT) != 0) {\n\t\t\t\tmoveRate = moveRate / 5.0;\n\t\t\t}\n\t\t\t\n\t\t\tlong moveTime = 0;\n\t\t\tif (keyStopTime != 0) {\n\t\t\t\tmoveTime = keyStopTime - keyStartTime;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlong currentTime = System.currentTimeMillis();\n\t\t\t\tmoveTime = currentTime - keyStartTime;\n\t\t\t\tkeyStartTime = currentTime;\n\t\t\t}\n\t\t\t\n\t\t\tfloat move = (float)(moveRate * moveTime);\n\t\t\t\n\t\t\tswitch (keyCode) {\n\t\t\tcase 16777219:\n\t\t\t\t// left\n\t\t\t\tviewAzimuth = fixAzimuth(viewAzimuth - move);\n\t\t\t\tbreak;\n\t\t\tcase 16777220:\n\t\t\t\t// right\n\t\t\t\tviewAzimuth = fixAzimuth(viewAzimuth + move);\n\t\t\t\tbreak;\n\t\t\tcase 16777217:\n\t\t\t\t// up\n\t\t\t\tviewElevation = fixElevation(viewElevation + move);\n\t\t\t\tbreak;\n\t\t\tcase 16777218:\n\t\t\t\t// down\n\t\t\t\tviewElevation = fixElevation(viewElevation - move);\n\t\t\t\tbreak;\n\t\t\tcase 97:\n\t\t\t\t// a\n\t\t\t\tviewVFOV = fixFOV(viewVFOV - (move * fovAdjFactor));\n\t\t\t\tbreak;\n\t\t\tcase 122:\n\t\t\t\t// z\n\t\t\t\tviewVFOV = fixFOV(viewVFOV + (move * fovAdjFactor));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tif (keyStopTime != 0) {\n\t\t\t\tkeyCode = 0;\n\t\t\t\tkeyStartTime = 0;\n\t\t\t}\n\t\t}\n\t\treturn moved;\n\t}",
"@Override\n public void onMove(int angle, int strength) {\n TextView text_view_angle = (TextView) findViewById(R.id.angle);\n text_view_angle.setText( \"Angle: \"+Integer.toString(angle) );\n\n TextView text_view_strength = (TextView) findViewById(R.id.strength);\n text_view_strength.setText( \"Strength: \"+Integer.toString(strength) );\n\n // don't process the input unless we've somewhere to send it\n if (hostname != null) {\n if (strength != 0) {\n if (zeroed_timer!= null) {\n zeroed_timer.cancel();\n zeroed_timer = null;\n }\n new SendPacket().execute(angle,strength);\n } else {\n if (zeroed_timer == null) {\n // start time\n zeroed_timer_start = System.currentTimeMillis();\n // actually initialise the timer\n zeroed_timer = new Timer();\n zeroed_timer.scheduleAtFixedRate(new TimerTask() {\n public void run() {\n new SendPacket().execute(0, 0);\n // if the current time is passed the timeout threshold\n if (zeroed_timer_start + zeroed_timer_timout < System.currentTimeMillis()) {\n // stop the timer\n System.out.println(\"Zeroing timer stopped\");\n zeroed_timer.cancel();\n zeroed_timer = null;\n }\n }\n }, 0, 50);\n }\n }\n\n }\n }",
"private void m3383a(MotionEvent motionEvent) {\n motionEvent = MotionEvent.obtain(motionEvent);\n motionEvent.setAction(3);\n super.onTouchEvent(motionEvent);\n motionEvent.recycle();\n }",
"private double[] handleTouches(InkEventType event, float x, float y, float pressure) {\n/* 226 */ switch (event) {\n/* */ case ON_TOUCH_DOWN:\n/* 228 */ return handleOnDown(x, y, pressure);\n/* */ case ON_TOUCH_MOVE:\n/* 230 */ return handleOnMove(x, y, pressure);\n/* */ \n/* */ \n/* */ case ON_TOUCH_UP:\n/* 234 */ return handleOnUp(pressure);\n/* */ } \n/* 236 */ throw new RuntimeException(\"Missing check for event type\");\n/* */ }",
"public void mo21811a(MotionEvent motionEvent, int i, int i2) {\n int i3;\n MotionEvent motionEvent2 = motionEvent;\n int action = motionEvent.getAction() & 255;\n switch (action) {\n case 0:\n case 5:\n i3 = 1;\n break;\n case 1:\n case 6:\n i3 = 2;\n break;\n case 2:\n i3 = 4;\n break;\n default:\n i3 = 3;\n break;\n }\n if (i3 == 1 || i3 == 2) {\n this.f24498A = motionEvent2.getPointerId(0);\n }\n int pointerCount = motionEvent.getPointerCount();\n if (action == 2) {\n int historySize = motionEvent.getHistorySize();\n for (int i4 = 0; i4 < historySize; i4++) {\n C7011d dVar = r1;\n C7011d dVar2 = new C7011d(motionEvent, motionEvent2.getHistoricalEventTime(i4), i3, i2, i);\n dVar.mo22117a(pointerCount);\n int i5 = 0;\n while (i5 < pointerCount) {\n int i6 = i5;\n dVar.mo22118a(i5, motionEvent2.getPointerId(i5), motionEvent2.getHistoricalX(i5, i4), motionEvent2.getHistoricalY(i5, i4), motionEvent2.getHistoricalSize(i5, i4), motionEvent2.getHistoricalPressure(i5, i4));\n i5 = i6 + 1;\n }\n mo21813a((C7008a) dVar);\n }\n }\n C7011d dVar3 = new C7011d(motionEvent, motionEvent.getEventTime(), i3, i2, i);\n if (action == 1) {\n dVar3.mo22117a(0);\n } else {\n dVar3.mo22117a(pointerCount);\n for (int i7 = 0; i7 < motionEvent.getPointerCount(); i7++) {\n dVar3.mo22118a(i7, motionEvent2.getPointerId(i7), motionEvent2.getX(i7), motionEvent2.getY(i7), motionEvent2.getSize(i7), motionEvent2.getPressure(i7));\n }\n }\n mo21813a((C7008a) dVar3);\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 }",
"void updateMotion(boolean altitudeLock)\n {\n \n ascendDescendLift:\n {\n // as pitch and roll increases, lift decreases by fall-off function.\n\t // thrust.y ranges from 0 to 1. at 1, almost perfectly balances gravity\n\t \n //thrust.y = MathHelper.cos(pitchRad) * MathHelper.cos(rollRad);\n thrust.y = MathHelper.cos(pitchRad) * MathHelper.cos(rollRad) * MathHelper.cos(rollRad);\n }\n\n forwardBack:\n {\n // as pitch increases, forward-back motion increases\n // but sin function was too touchy so using 1-cos\n float accel = 1f - MathHelper.cos(pitchRad);\n if (pitchRad > 0f) accel *= -1f;\n \n thrust.x = -fwd.x * accel;\n thrust.z = -fwd.z * accel;\n \n // also adjust y in addition to ascend/descend to simulate diving\n thrust.y += -fwd.y * accel * .3f;\n }\n\n strafeLeftRight:\n {\n // float strafe = -MathHelper.sin(roll);\n float strafe = 1f - MathHelper.cos(rollRad);\n if (rollRad > 0f) strafe *= -1f;\n\n // use perp of yaw and scale by roll\n thrust.x -= fwd.z * strafe;\n thrust.z += fwd.x * strafe;\n }\n\n // start with current velocity\n velocity.set((float)motionX, (float)motionY, (float)motionZ);\n\n // friction, very little!\n velocity.scale(FRICTION);\n\n // scale thrust by current throttle and delta time\n //thrust.normalize().scale(MAX_ACCEL * (1f + throttle) * deltaTime / .05f);\n thrust.normalize().scale(MAX_ACCEL * (1f + throttle) * deltaTime / .05f);\n\n // apply the thrust\n Vector3.add(velocity, thrust, velocity);\n\n // gravity is always straight down\n //if (!inWater && !onGround) velocity.y -= GRAVITY * deltaTime / .05f;\n velocity.y -= GRAVITY * deltaTime / .05f;\n\n // limit max velocity\n if (velocity.lengthSquared() > MAX_VELOCITY * MAX_VELOCITY)\n {\n velocity.scale(MAX_VELOCITY / velocity.length());\n }\n\n // apply velocity changes\n motionX = (double) velocity.x;\n motionY = (double) velocity.y;\n motionZ = (double) velocity.z;\n \n if (altitudeLock && riddenByEntity != null)\n {\n motionY *= .9;\n if (motionY < .00001) motionY = .0;\n }\n \n moveEntity(motionX, motionY, motionZ);\n }",
"public void onGuildVoiceMove(GuildVoiceMoveEvent e) {\n\t\tFunctions funcao = new Functions(e);\n\t\tfuncao.mudouChatVoz();\n\t}"
]
| [
"0.58064425",
"0.58008724",
"0.5284585",
"0.5259384",
"0.5259242",
"0.52469134",
"0.5207784",
"0.52048177",
"0.51444215",
"0.51375043",
"0.5132808",
"0.51229495",
"0.5099143",
"0.5091448",
"0.50868714",
"0.50845313",
"0.50832736",
"0.50432956",
"0.50192857",
"0.49975199",
"0.49959123",
"0.49851963",
"0.49841556",
"0.49837285",
"0.49795982",
"0.4969035",
"0.4957099",
"0.4956682",
"0.49559075",
"0.49516165",
"0.4946166",
"0.49336174",
"0.49336174",
"0.49336174",
"0.49278858",
"0.48944935",
"0.48886758",
"0.486963",
"0.48681122",
"0.48635375",
"0.4854956",
"0.48484966",
"0.48475236",
"0.4838987",
"0.4810982",
"0.48067412",
"0.47667348",
"0.47651502",
"0.47495162",
"0.47359246",
"0.4735008",
"0.47318548",
"0.47202614",
"0.47197378",
"0.470902",
"0.47010398",
"0.46972892",
"0.4685622",
"0.46809843",
"0.46755695",
"0.46713403",
"0.46704152",
"0.466951",
"0.46609637",
"0.46601382",
"0.46583802",
"0.46409044",
"0.4629284",
"0.46222526",
"0.4617767",
"0.4617767",
"0.46171898",
"0.46151093",
"0.4612169",
"0.46042606",
"0.45944223",
"0.45924857",
"0.45857936",
"0.45818081",
"0.45696408",
"0.4568866",
"0.4564842",
"0.45582795",
"0.45555508",
"0.4549869",
"0.45486858",
"0.4548279",
"0.4545451",
"0.45361823",
"0.45290476",
"0.4517908",
"0.45171535",
"0.451502",
"0.45084715",
"0.44992158",
"0.44974917",
"0.4494655",
"0.44860366",
"0.4483726",
"0.4482544"
]
| 0.5457652 | 2 |
We compensate for roll by rotating in the opposite direction. | @BinderThread
public void setRoll(float roll) {
this.roll = -roll;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n default void prependRollRotation(double roll)\n {\n AxisAngleTools.prependRollRotation(roll, this, this);\n }",
"@Override\n default void appendRollRotation(double roll)\n {\n AxisAngleTools.appendRollRotation(this, roll, this);\n }",
"@Override\r\n\tpublic void rotateRight() {\n\t\tsetDirection((this.getDirection() + 1) % 4);\r\n\t}",
"@Override\r\n\tpublic void rotateRight() {\n\t\tfinal int THETA = 10;\r\n\t\tint dir = this.getDirection();\r\n\t\tthis.setDirection(dir + THETA);\r\n\t\t\r\n\t}",
"public static void waltz() {\n //test code written by bokun: self rotation\n leftMotor.setSpeed(ROTATE_SPEED);\n rightMotor.setSpeed(ROTATE_SPEED);\n leftMotor.forward();\n rightMotor.backward();\n }",
"public void reRoll() {\n this.result = this.roll();\n this.isSix = this.result == 6;\n }",
"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 }",
"@Override\n public void turnRight(Double angle) {\n turnLeft(angle * -1);\n }",
"public void roll(double angle) {\n left = rotateVectorAroundAxis(left, heading, angle);\r\n up = rotateVectorAroundAxis(up, heading, angle);\r\n\r\n }",
"public abstract void rotateRight();",
"public void rotateRight(int time) {\n\t\tdouble step = 3;\r\n\t\t\r\n\t\tif( rotation + step > 360 )\r\n\t\t\trotation = rotation + step - 360;\r\n\t\telse\r\n\t\t\trotation += step;\r\n\t}",
"int roll();",
"@Override\r\n\tpublic void rotateLeft() {\n\t\tsetDirection((this.getDirection() + 3) % 4);\r\n\t}",
"public double getRolledHeading() {\n double heading = 360.0 - getRawHeading();\n if (lastHeading < 100 && heading > 300) {\n rotationAmt--;\n } else if (heading < 100 && lastHeading > 300) {\n rotationAmt++;\n }\n lastHeading = heading;\n return heading + rotationAmt * 360.0;\n }",
"private void rotateRight() {\n robot.leftBack.setPower(TURN_POWER);\n robot.leftFront.setPower(TURN_POWER);\n robot.rightBack.setPower(-TURN_POWER);\n robot.rightFront.setPower(-TURN_POWER);\n }",
"@Override\r\n\tpublic void rotateLeft() {\n\t\tfinal int THETA = 10;\r\n\t\tint dir = this.getDirection();\r\n\t\tthis.setDirection(dir - THETA);\r\n\t\t\r\n\t}",
"private void updateRoll(float dt) {\n\n\t\trollRate = (speed / turnRadius) * rollMax;\n\n\t\t// special case if speed is zero - glider landed but still has\n\t\t// to roll level !\n\t\tif (speed == 0) {\n\t\t\trollRate = 1 / 1 * rollMax;\n\t\t}\n\n\t\tif (nextTurn != 0) {\n\n\t\t\t// turning\n\t\t\troll += nextTurn * rollRate * dt;\n\n\t\t\tif (roll > rollMax)\n\t\t\t\troll = rollMax;\n\t\t\tif (roll < -rollMax)\n\t\t\t\troll = -rollMax;\n\n\t\t} else if (roll != 0) {\n\n\t\t\t// roll back towards level\n\t\t\tfloat droll = rollRate * dt;\n\n\t\t\tif (roll > droll) {\n\t\t\t\troll -= droll;\n\t\t\t} else if (roll < -droll) {\n\t\t\t\troll += droll;\n\t\t\t} else {\n\t\t\t\troll = 0;\n\t\t\t}\n\t\t}\n\t}",
"@Override\n protected float handleRotationFloat(RocketSquidEntity squid, float partialTicks) {\n return squid.lastTentacleAngle + (squid.tentacleAngle - squid.lastTentacleAngle) * partialTicks;\n }",
"void rotate();",
"public void roll(){\n roll(new boolean[]{true,true,true,true,true});\n }",
"public void roll() {\n\t\tthis.currentValue = ThreadLocalRandom.current().nextInt(1, this.numSides + 1);\n\t}",
"@Override\n protected float handleRotationFloat(BabyRocketSquidEntity squid, float partialTicks) {\n return squid.lastTentacleAngle + (squid.tentacleAngle - squid.lastTentacleAngle) * partialTicks;\n }",
"public void roll(){\n Random rand = new Random();\n this.rollVal = rand.nextInt(this.faces) + 1;\n }",
"private void rotate() {\n byte tmp = topEdge;\n topEdge = leftEdge;\n leftEdge = botEdge;\n botEdge = rightEdge;\n rightEdge = tmp;\n tmp = reversedTopEdge;\n reversedTopEdge = reversedLeftEdge;\n reversedLeftEdge = reversedBotEdge;\n reversedBotEdge = reversedRightEdge;\n reversedRightEdge = tmp;\n tmp = ltCorner;\n ltCorner = lbCorner;\n lbCorner = rbCorner;\n rbCorner = rtCorner;\n rtCorner = tmp;\n\n }",
"private void rotateRight() {\r\n\t switch(direction){\r\n\t case Constants.DIRECTION_NORTH:\r\n\t direction = Constants.DIRECTION_EAST;\r\n\t break;\r\n\t case Constants.DIRECTION_EAST:\r\n\t direction = Constants.DIRECTION_SOUTH;\r\n\t break;\r\n\t case Constants.DIRECTION_SOUTH:\r\n\t direction = Constants.DIRECTION_WEST;\r\n\t break;\r\n\t case Constants.DIRECTION_WEST:\r\n\t direction = Constants.DIRECTION_NORTH;\r\n\t break;\r\n\t }\r\n\t }",
"public void rotateRight() {\n\t\tthis.direction = this.direction.rotateRight();\n\t}",
"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 abstract void rotateLeft();",
"@Override\r\n\tpublic void rotate() {\n\t\t\r\n\t}",
"@Override\n\tpublic void rotateRight(int degrees) {\n\t\t\n\t}",
"float getRoll();",
"float getRoll();",
"@Override\r\n public void rotateClockwise() {\r\n super.rotateClockwise(); //To change body of generated methods, choose Tools | Templates.\r\n // TODO: Fix me\r\n undo.push('c');\r\n redo = new LinkedListStack();\r\n }",
"private void rotate(int direction){\n\t\t//Gdx.app.debug(TAG, \"rotating, this.x: \" + this.x + \", this.y: \" + this.y);\n\t\tif (direction == 1 || direction == -1){\n\t\t\tthis.orientation = (this.orientation + (direction*-1) + 4) % 4;\n\t\t\t//this.orientation = (this.orientation + direction) % 4;\n\t\t} else{\n\t\t\tthrow new RuntimeException(\"Tile invalid direction\");\n\t\t}\n\t}",
"public void rotRight()\n\t{\n\t\t//only rotate if a PlayerShip is currently spawned\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\t((PlayerShip)gameObj[1].get(0)).moveRight();\n\t\t\tSystem.out.println(\"Heading -10 degrees\");\n\t\t}else {\n\t\t\tSystem.out.println(\"there is not currently a player ship spawned\");\n\t\t}\n\t}",
"public abstract void rotate();",
"public int roll() {\n\t\treturn 3;\n\t}",
"void roll(int pins);",
"public final void mROLL() throws RecognitionException\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal int _type = AshvmLexer.ROLL;\n\t\t\tfinal int _channel = BaseRecognizer.DEFAULT_TOKEN_CHANNEL;\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:741:6: ( 'roll' )\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:741:8: 'roll'\n\t\t\t{\n\t\t\t\tthis.match(\"roll\");\n\n\t\t\t}\n\n\t\t\tthis.state.type = _type;\n\t\t\tthis.state.channel = _channel;\n\t\t}\n\t\tfinally\n\t\t{\n\t\t}\n\t}",
"private void doubleRotateright(WAVLNode x) {\n\t WAVLNode z=x.left;\r\n\t rightRotate(z);\r\n\t z.rank+=1;\r\n\t leftRotate(z);\r\n }",
"@Override\n public void reAngle() {\n }",
"RollingResult roll(Player player);",
"public void resetAngle() {\n\t\t//this.angle = (this.orientation % 4 + 4) * (90);\n\t\tthis.angle = this.orientation * 90*-1;\n\t\tthis.tweenAngle.setCurrentValue(this.angle);\n\t\tthis.tweenAngle.setTargetValue(this.angle);\n\t}",
"public void rollAtk() {\n rollAtk = roll();\n }",
"public int roll()\n {\n int r = (int)(Math.random() * sides) + 1;\n return r;\n }",
"public void roll()\r\n\t{\r\n\t\tRandom rand = new Random();\r\n\r\n\t\trollNumber = rand.nextInt(numOfSides) + 1;\r\n\t}",
"public void rotatePieceRight(){\r\n if (hasFalling()){\r\n FallingPiece test =falling.rotateRight();\r\n if (!moveIfNoConflict(test, falling))\r\n Kick(test, falling);\r\n if(isGhostActivated())\r\n \t\t\tgenerateGhost();\r\n }\r\n }",
"void decreaseAngle() {\n this.strokeAngle -= 3;\n this.updateAcc();\n this.updateStick();\n }",
"@Override\n\tpublic void rotate() {\n\t}",
"static void rotate_right(int[] arr, int rotate){\n for (int j = 0; j < rotate; j++) {\n int temp = arr[j];\n for (int i = j; i < arr.length+rotate; i+=rotate) {\n if(i-rotate < 0)\n temp = arr[i];\n else if(i >= arr.length)\n arr[i-rotate] = temp;\n else\n arr[i-rotate] = arr[i]; \n }\n }\n }",
"private void right() {\n lastMovementOp = Op.RIGHT;\n rotate(TURNING_ANGLE);\n }",
"public float getRoll() {\n return roll_;\n }",
"public float getRoll() {\n return roll_;\n }",
"@Override\n \t\t\t\tpublic void doRotateZ() {\n \n \t\t\t\t}",
"public void rotateRight(int numberOfTurns);",
"public void zRotate() {\n\t\t\n\t}",
"@SuppressWarnings(\"incomplete-switch\")\n\tprivate void rotatingBehavior() {\n\t\tif (remainingSteps > 0) {\n\t\t\tremainingSteps--;\n\t\t} else {\n\t\t\tswitch (facing) {\n\t\t\t\tcase LEFT:\n\t\t\t\t\tchangeFacing(ACTION.UP);\n\t\t\t\t\tbreak;\n\t\t\t\tcase UP:\n\t\t\t\t\tchangeFacing(ACTION.RIGHT);\n\t\t\t\t\tbreak;\n\t\t\t\tcase RIGHT:\n\t\t\t\t\tchangeFacing(ACTION.DOWN);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOWN:\n\t\t\t\t\tchangeFacing(ACTION.LEFT);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tremainingSteps = STEP_SIZE;\n\t\t}\n\t}",
"@Override\r\n\tpublic void onOrientationChanged(float azimuth, float pitch, float roll) {\n\r\n\t}",
"private void normalizeOrientation() {\n\t\twhile (this.orientation >= 2 * Math.PI) {\n\t\t\torientation -= 2 * Math.PI;\n\t\t}\n\t\twhile (this.orientation < 0) {\n\t\t\torientation += 2 * Math.PI;\n\t\t}\n\t}",
"public void rollCup()\n {\n die1.rolldice();\n die2.rolldice();\n gui.setDice(die1.getFacevalue(), die2.getFacevalue());\n }",
"public void turnRight() {\r\n setDirection( modulo( myDirection+1, 4 ) );\r\n }",
"public float getRoll(float[] quat) {\n float[] newquat = normalizeQuat(quat);\n float degreeReturn = (float) Math.toDegrees((double) getRollRad(newquat)); // +180 to return between 0 and 360\n\n //-90 to 180\n if (-90f <= degreeReturn && degreeReturn <= 180f) {\n return degreeReturn + 90f;\n } else {\n //-180 to -90\n return degreeReturn + 180 + 270;\n }\n }",
"public void rotateLeft(int time) {\n\t\tdouble step = 3;\r\n\t\t\r\n\t\tif( rotation - step < 0 )\r\n\t\t\trotation = rotation - step + 360;\r\n\t\telse\r\n\t\t\trotation -= step;\r\n\t\t\t\r\n\t}",
"public int roll()\r\n\t{\r\n\t return die1.roll() + die2.roll();\r\n \t}",
"public void onLeftPressed(){\n player.setRotation(player.getRotation()-3);\n\n }",
"private void moveClawDown() {\n\t\tMotor.A.setSpeed(45);\n\t\tMotor.A.rotate(-90);\n\t}",
"public static double rotation()\r\n\t{\r\n\t\treturn -(mxp.getAngle()/45);\r\n\t}",
"public void noRotation()\n {\n double distance = Math.hypot(this.getX()-xMouse, this.getY()-yMouse);\n if(counter == 40 && noRotation == false && distance<300)\n {\n int rot = getRotation();\n turnTowards(xMouse, yMouse);\n int newRot = getRotation();\n if(Math.abs(rot-newRot)%360<40)\n {\n noRotation = true;\n }\n else\n {\n setRotation(rot);\n }\n }\n }",
"public int roll() {\n Random r;\n if (hasSeed) {\n r = new Random();\n }\n else {\n r = new Random();\n }\n prevRoll = r.nextInt(range) + 1;\n return prevRoll;\n }",
"public void turnRight()\r\n\t{\r\n\t\theading += 2; //JW\r\n\t\t//Following the camera\r\n\t\t//heading += Math.sin(Math.toRadians(15)); \r\n\t\t//heading += Math.cos(Math.toRadians(15));\r\n\t}",
"public String roll() {\n\t\treturn null;\r\n\t}",
"public void onRightPressed(){\n player.setRotation(player.getRotation()+3);\n\n }",
"public void turnRight() {\n\t\tthis.setSteeringDirection(getSteeringDirection()+5);\n\t}",
"public float getRoll() {\n return roll_;\n }",
"public float getRoll() {\n return roll_;\n }",
"@Override\r\n\tpublic void rotar() {\n\r\n\t}",
"public void onUpdate() {\n/* 89 */ this.lastTickPosX = this.posX;\n/* 90 */ this.lastTickPosY = this.posY;\n/* 91 */ this.lastTickPosZ = this.posZ;\n/* 92 */ super.onUpdate();\n/* 93 */ this.motionX *= 1.15D;\n/* 94 */ this.motionZ *= 1.15D;\n/* 95 */ this.motionY += 0.04D;\n/* 96 */ moveEntity(this.motionX, this.motionY, this.motionZ);\n/* 97 */ float var1 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);\n/* 98 */ this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);\n/* */ \n/* 100 */ for (this.rotationPitch = (float)(Math.atan2(this.motionY, var1) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F);\n/* */ \n/* */ \n/* */ \n/* */ \n/* 105 */ while (this.rotationPitch - this.prevRotationPitch >= 180.0F)\n/* */ {\n/* 107 */ this.prevRotationPitch += 360.0F;\n/* */ }\n/* */ \n/* 110 */ while (this.rotationYaw - this.prevRotationYaw < -180.0F)\n/* */ {\n/* 112 */ this.prevRotationYaw -= 360.0F;\n/* */ }\n/* */ \n/* 115 */ while (this.rotationYaw - this.prevRotationYaw >= 180.0F)\n/* */ {\n/* 117 */ this.prevRotationYaw += 360.0F;\n/* */ }\n/* */ \n/* 120 */ this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F;\n/* 121 */ this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F;\n/* */ \n/* 123 */ if (this.fireworkAge == 0 && !isSlient())\n/* */ {\n/* 125 */ this.worldObj.playSoundAtEntity(this, \"fireworks.launch\", 3.0F, 1.0F);\n/* */ }\n/* */ \n/* 128 */ this.fireworkAge++;\n/* */ \n/* 130 */ if (this.worldObj.isRemote && this.fireworkAge % 2 < 2)\n/* */ {\n/* 132 */ this.worldObj.spawnParticle(EnumParticleTypes.FIREWORKS_SPARK, this.posX, this.posY - 0.3D, this.posZ, this.rand.nextGaussian() * 0.05D, -this.motionY * 0.5D, this.rand.nextGaussian() * 0.05D, new int[0]);\n/* */ }\n/* */ \n/* 135 */ if (!this.worldObj.isRemote && this.fireworkAge > this.lifetime) {\n/* */ \n/* 137 */ this.worldObj.setEntityState(this, (byte)17);\n/* 138 */ setDead();\n/* */ } \n/* */ }",
"@Override\r\n\tpublic double getRollRightHand() {\n\t\treturn rechtRoll;\r\n\t}",
"private void rotateLeft() {\n robot.leftBack.setPower(-TURN_POWER);\n robot.leftFront.setPower(-TURN_POWER);\n robot.rightBack.setPower(TURN_POWER);\n robot.rightFront.setPower(TURN_POWER);\n }",
"public void rotateCCW(){\n rotState = (rotState + 3) % 4;\n for (int i = 0; i < tiles.length; ++i){\n tiles[i] = new Point(tiles[i].y , -tiles[i].x);\n }\n }",
"@Test\n public void shouldPredictByRotatingPreviousMoveInReverseDirection() {\n ReverseRotationStrategy strategy = new ReverseRotationStrategy();\n\n strategy.addHistory(Shape.ROCK, Shape.PAPER);\n assertTrue(Arrays.equals(strategy.getNextMoves(), Shape.ROCK.defeatedBy()));\n\n strategy.addHistory(Shape.ROCK, Shape.ROCK);\n assertTrue(Arrays.equals(strategy.getNextMoves(), Shape.SPOCK.defeatedBy()));\n }",
"private void turnClockwise() {\n\t\torientation = TurnAlgorithmExecutor.getAlgorithmFromCondition(orientation).execute(orientation);\n\t}",
"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}",
"private void flip()\r\n\t{\r\n\t\tif(heading == Direction.WEST)\r\n\t\t{\r\n\t\t\tsetDirection(Direction.EAST);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tsetDirection(Direction.WEST);\r\n\t\t}\r\n\t}",
"private void RLRotation(IAVLNode node)\r\n\t{\r\n\t\tLLRotation(node.getRight());\r\n\t\tRRRotation(node);\r\n\t}",
"public Builder clearRoll() {\n bitField0_ = (bitField0_ & ~0x00000080);\n roll_ = 0F;\n onChanged();\n return this;\n }",
"DiceRoll modifyRoll(DiceRoll roll, Die die);",
"public void update() {\n if (Math.abs(deltaAngle) > .01 || Math.abs(deltaPosition.getX()) > 1 || Math.abs(deltaPosition.getY()) > 1) {\n angle += deltaAngle;\n deltaAngle *= .98;\n updatePosition();\n\n if (Math.random() < Math.abs(deltaAngle)) {\n roll(); //While the dice is clacking around, make the value change\t\tTODO make it slow as the deltaAngle Goes down\n }\n }\n else {\n deltaPosition.scale(0); //Set the Vector to 0\n deltaAngle = 0;\n }\n }",
"public void roll() {\n\t\tthis.faceValue = (int)(NUM_SIDES*Math.random()) + 1;\n\t}",
"public MutableImage rotateRight() {\n return rotate(90);\n }",
"public Builder clearRoll() {\n bitField0_ = (bitField0_ & ~0x00000020);\n roll_ = 0F;\n onChanged();\n return this;\n }",
"public void roll() {\n if(!frozen) {\n this.value = ((int)(Math.random() * numSides + 1));\n }\n }",
"@Override\n \t\t\t\tpublic void doRotateY() {\n \n \t\t\t\t}",
"void turnToDir(float angle) { \n float radian = radians(angle);\n _rotVector.set(cos(radian), sin(radian));\n _rotVector.setMag(1);\n }",
"@Override\r\n\tpublic int rollDice() {\n\t\treturn 0;\r\n\t}",
"public void onRollAgainClick(View view) {\n rollDie();\n }",
"@Override\n public void turnLeft(Double angle) {\n angle = Math.toRadians(angle);\n double temp = vector.x;\n vector.x = vector.x * Math.cos(angle) - vector.y * Math.sin(angle);\n vector.y = temp * Math.sin(angle) + vector.y * Math.cos(angle);\n }",
"void rotateInv() {\n startAnimation(allSubCubes(), Axis.Y, Direction.ANTICLOCKWISE);\n rotateCubeSwap();\n rotateCubeSwap();\n rotateCubeSwap();\n }",
"public void rotateLeft() {\n\t\tthis.direction = this.direction.rotateLeft();\n\t}",
"public int roll() {\n this.assuerNN_random();\n //Roll once\n int result = random.nextInt(this.sides)+1;\n //TODO Save the roll somewhere\n\n //Return the roll\n return result;\n }"
]
| [
"0.68914413",
"0.6677346",
"0.6456793",
"0.63917404",
"0.63527536",
"0.63462853",
"0.6253422",
"0.62048316",
"0.6200543",
"0.6122471",
"0.6085459",
"0.6071238",
"0.6059202",
"0.6055419",
"0.6041995",
"0.60340315",
"0.60323244",
"0.6025789",
"0.6020491",
"0.59987116",
"0.59839773",
"0.5983189",
"0.59696656",
"0.5957091",
"0.59503865",
"0.59296703",
"0.5863201",
"0.58352524",
"0.5832333",
"0.58302253",
"0.58261317",
"0.58261317",
"0.5815622",
"0.5783375",
"0.5715633",
"0.5707647",
"0.5704006",
"0.5701209",
"0.5692994",
"0.5691077",
"0.5686868",
"0.5674843",
"0.5660096",
"0.56559783",
"0.56419563",
"0.5634861",
"0.5622682",
"0.5613409",
"0.5610594",
"0.56103903",
"0.5609048",
"0.560864",
"0.560864",
"0.5587703",
"0.55871713",
"0.55729",
"0.556997",
"0.55662215",
"0.55643064",
"0.55575013",
"0.55547476",
"0.5550706",
"0.5550013",
"0.5536809",
"0.55301434",
"0.55245507",
"0.5522363",
"0.55193794",
"0.5513596",
"0.55133665",
"0.55125684",
"0.5511226",
"0.55084956",
"0.5503856",
"0.5503856",
"0.5501733",
"0.54998684",
"0.54947704",
"0.54915893",
"0.5489963",
"0.54888976",
"0.54784447",
"0.54709846",
"0.54677147",
"0.5460841",
"0.54578614",
"0.54567254",
"0.54434484",
"0.5437303",
"0.5423661",
"0.54226273",
"0.5422129",
"0.54153967",
"0.5414832",
"0.5414346",
"0.54117405",
"0.5407614",
"0.5402934",
"0.5393881",
"0.5388191"
]
| 0.66048187 | 2 |
Combine touch & sensor data. Orientation = pitch sensor yaw since that is closest to what most users expect the behavior to be. | @Override
public void onDrawFrame(GL10 gl) {
synchronized (this) {
Matrix.multiplyMM(tempMatrix, 0, deviceOrientationMatrix, 0, touchYawMatrix, 0);
Matrix.multiplyMM(viewMatrix, 0, touchPitchMatrix, 0, tempMatrix, 0);
}
Matrix.multiplyMM(viewProjectionMatrix, 0, projectionMatrix, 0, viewMatrix, 0);
scene.glDrawFrame(viewProjectionMatrix, Type.MONOCULAR);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@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 void onSensorChanged(SensorEvent event) {\n switch (event.sensor.getType()) {\n case Sensor.TYPE_ACCELEROMETER:\n acceleration_vals = event.values.clone();\n break;\n case Sensor.TYPE_MAGNETIC_FIELD:\n magnetic_vals = event.values.clone();\n break;\n }\n \n \n // If we have all the necessary data, update the orientation.\n if (acceleration_vals != null && magnetic_vals != null) {\n float[] R = new float[16];\n float[] I = new float[16];\n \n SensorManager.getRotationMatrix(R, I, acceleration_vals, \n magnetic_vals);\n \n float[] orientation = new float[3];\n SensorManager.getOrientation(R, orientation);\n \n acceleration_vals = null;\n magnetic_vals = null;\n \n // Use the pitch to determine whether we are in ID mode or\n // conference mode.\n if (orientation[1] <= -0.2) { // we're in conference mode\n this.setRequestedOrientation(\n ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n showScheduleView();\n } else if (orientation[1] >= 0.2) { // we're in ID mode\n this.setRequestedOrientation(\n ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT);\n showBadgeView();\n }\n }\n }",
"@Override\n\tpublic void onSensorChanged(SensorEvent event) {\n\t\trawSensorValue = Math.round(event.values[0]); \n\t\twhile (rawSensorValue < 0) rawSensorValue += 360;\n\t\tm_azimuth_degrees = rawSensorValue - m_sun_azimuth_degrees;\n\t\twhile (m_azimuth_degrees < 0) m_azimuth_degrees += 360;\n\t\t\n\t\t// get pitch value\n\t\tint rotation = activity.getWindowManager().getDefaultDisplay().getRotation();\n\t\tif ((rotation == 0) || (rotation == 2)) m_pitch_degrees = Math.abs((int)event.values[1]); \n\t\telse m_pitch_degrees = Math.abs((int)event.values[2]);\n\t\t\n\t\t// Update event\n\t\tif (m_parent != null) m_parent.onSensorChanged(event);\n\t}",
"@Override\n\t\tpublic void onOrientationData(Myo myo, long timestamp,\n\t\t\t\tQuaternion rotation) {\n\t\t\t// Calculate Euler angles (roll, pitch, and yaw) from the\n\t\t\t// quaternion.\n\n\t\t\tMyMyo selected = myos.get(myos.indexOf(new MyMyo(myo)));\n\n\t\t\trotationZ = (float) Math.toDegrees(Quaternion.roll(rotation));\n\t\t\trotationX = (float) Math.toDegrees(Quaternion.pitch(rotation));\n\t\t\trotationY = (float) Math.toDegrees(Quaternion.yaw(rotation));\n\n\t\t\tselected.setRotationX(rotationX);\n\t\t\tselected.setRotationY(rotationY);\n\t\t\tselected.setRotationZ(rotationZ);\n\n\t\t\tif (playingGame) {\n\t\t\t\tselected.addSum();\n\t\t\t}\n\n\t\t\tif (myos.size() > 1)\n\t\t\t\treturn;\n\n\t\t\tfloat heading1 = 0;\n\t\t\tfloat speed1 = 0;\n\t\t\tif (ride) {\n\t\t\t\t// if (ref_rotationZ < rotationZ) {\n\t\t\t\t// float zero = ref_rotationZ;\n\t\t\t\t// float max = left_rotationZ - zero;\n\t\t\t\t// heading1 = rotationZ - zero;\n\t\t\t\t// heading1 /= max;\n\t\t\t\t// heading += 1;\n\t\t\t\t// heading *= -heading1;\n\t\t\t\t// } else {\n\t\t\t\t// float zero = ref_rotationZ;\n\t\t\t\t// float max = right_rotationZ - zero;\n\t\t\t\t//\n\t\t\t\t//\n\t\t\t\t// }\n\t\t\t\tspeed1 = (ref_rotationX - rotationX) / 100;\n\t\t\t\tif (speed1 != Float.NaN) {\n\t\t\t\t\tref_rotationX = rotationX;\n\t\t\t\t\trotx -= speed1;\n\t\t\t\t}\n\t\t\t\t// speed += rotx;\n\t\t\t\t// heading = heading % 360;\n\n\t\t\t\theading1 = (ref_rotationZ - rotationZ) / 50;\n\t\t\t\tref_rotationZ = rotationZ;\n\t\t\t\trotz += heading1;\n\t\t\t\theading += rotz;\n\t\t\t\theading = heading % 360;\n\t\t\t\tif (heading < 0)\n\t\t\t\t\theading = 360 + heading;\n\t\t\t\tif (rotx < 0)\n\t\t\t\t\trotx = 0;\n\t\t\t\tif (rotx > 1)\n\t\t\t\t\trotx = 1;\n\t\t\t\tif (mRobot != null && ride)\n\t\t\t\t\tmRobot.drive(heading, rotx);\n\t\t\t\telse if (mRobot != null)\n\t\t\t\t\tmRobot.drive(0.0f, 0.0f);\n\t\t\t}\n\n\t\t\t// X.setText(String.format(\"x: %.3f / %.3f\", rotationX, rotx));\n\t\t\t// Y.setText(String.format(\"y: %.3f\", rotationY));\n\t\t\t// Z.setText(String.format(\"z: %.3f / %.3f / %.3f\", rotationZ, rotz,\n\t\t\t// heading));\n\t\t\t// Next, we apply a rotation to the text view using the roll, pitch,\n\t\t\t// and yaw.\n\t\t\t// mTextView.setRotation(-rotationZ);\n\t\t\t// mTextView.setRotationX(-rotationX);\n\t\t\t// mTextView.setRotationY(rotationY);\n\t\t}",
"@Override\n public boolean onTouch(View v, MotionEvent event) {\n switch (event.getAction()) {\n case MotionEvent.ACTION_DOWN:\n // Initialize drag gesture.\n previousTouchPointPx.set(event.getX(), event.getY());\n return true;\n case MotionEvent.ACTION_MOVE:\n // Calculate the touch delta in screen space.\n float touchX = (event.getX() - previousTouchPointPx.x) / PX_PER_DEGREES;\n float touchY = (event.getY() - previousTouchPointPx.y) / PX_PER_DEGREES;\n previousTouchPointPx.set(event.getX(), event.getY());\n\n float r = roll; // Copy volatile state.\n float cr = (float) Math.cos(r);\n float sr = (float) Math.sin(r);\n // To convert from screen space to the 3D space, we need to adjust the drag vector based\n // on the roll of the phone. This is standard rotationMatrix(roll) * vector math but has\n // an inverted y-axis due to the screen-space coordinates vs GL coordinates.\n // Handle yaw.\n accumulatedTouchOffsetDegrees.x -= cr * touchX - sr * touchY;\n // Handle pitch and limit it to 45 degrees.\n accumulatedTouchOffsetDegrees.y += sr * touchX + cr * touchY;\n accumulatedTouchOffsetDegrees.y =\n Math.max(-MAX_PITCH_DEGREES,\n Math.min(MAX_PITCH_DEGREES, accumulatedTouchOffsetDegrees.y));\n\n renderer.setPitchOffset(accumulatedTouchOffsetDegrees.y);\n renderer.setYawOffset(accumulatedTouchOffsetDegrees.x);\n return true;\n default:\n return false;\n }\n }",
"@Override\n public void onOrientationData(Myo myo, long timestamp, Quaternion rotation) {\n // Calculate Euler angles (roll, pitch, and yaw) from the quaternion.\n float roll = (float) Math.toDegrees(Quaternion.roll(rotation));\n float pitch = (float) Math.toDegrees(Quaternion.pitch(rotation));\n float yaw = (float) Math.toDegrees(Quaternion.yaw(rotation));\n\n // Adjust roll and pitch for the orientation of the Myo on the arm.\n if (myo.getXDirection() == XDirection.TOWARD_ELBOW) {\n roll *= -1;\n pitch *= -1;\n }\n/*\n // Next, we apply a rotation to the text view using the roll, pitch, and yaw.\n mTextView.setRotation(roll);\n mTextView.setRotationX(pitch);\n mTextView.setRotationY(yaw);*/\n }",
"@Override\n public void onSensorChanged(SensorEvent sensorEvent) {\n storage.writePhoneAccelerometer(new double[]{sensorEvent.values[0], sensorEvent.values[1], sensorEvent.values[2]});\n //System.out.println(\"x: \" + sensorEvent.values[0] + \", y: \" + sensorEvent.values[1] + \", z: \" + sensorEvent.values[2]);\n }",
"@Override\r\n\t\t\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\t\ttemp_m[0] = event.values[0];\r\n\t\t\t\ttemp_m[1] = event.values[1];\r\n\t\t\t\ttemp_m[2] = event.values[2];\r\n\t\t\t}",
"@Override\n public void onSensorChanged(SensorEvent event) {\n if (event.sensor.getType() != Sensor.TYPE_ACCELEROMETER)\n return;\n /*\n * record the accelerometer data, the event's timestamp as well as\n * the current time. The latter is needed so we can calculate the\n * \"present\" time during rendering. In this application, we need to\n * take into account how the screen is rotated with respect to the\n * sensors (which always return data in a coordinate space aligned\n * to with the screen in its native orientation).\n */\n\n switch (mDisplay.getRotation()) {\n case Surface.ROTATION_0:\n mSensorX = event.values[0];\n mSensorY = event.values[1];\n break;\n case Surface.ROTATION_90:\n mSensorX = -event.values[1];\n mSensorY = event.values[0];\n break;\n case Surface.ROTATION_180:\n mSensorX = -event.values[0];\n mSensorY = -event.values[1];\n break;\n case Surface.ROTATION_270:\n mSensorX = event.values[1];\n mSensorY = -event.values[0];\n break;\n }\n\n mGLView.updateScene(10*mSensorX,10*mSensorY,10*event.values[2]);\n\n }",
"private double[] handleTouches(InkEventType event, float x, float y, float pressure) {\n/* 226 */ switch (event) {\n/* */ case ON_TOUCH_DOWN:\n/* 228 */ return handleOnDown(x, y, pressure);\n/* */ case ON_TOUCH_MOVE:\n/* 230 */ return handleOnMove(x, y, pressure);\n/* */ \n/* */ \n/* */ case ON_TOUCH_UP:\n/* 234 */ return handleOnUp(pressure);\n/* */ } \n/* 236 */ throw new RuntimeException(\"Missing check for event type\");\n/* */ }",
"@Override\n\t\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\t float[] rotationMatrix;\n\t\t\t rotationMatrix = new float[16];\n\t SensorManager.getRotationMatrixFromVector(rotationMatrix,\n\t event.values);\n\t determineOrientation(rotationMatrix);\n\t\t\t\n\t\t}",
"@Override\r\n\t\t\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\t\ttemp_r[0] = event.values[0];\r\n\t\t\t\ttemp_r[1] = event.values[1];\r\n\t\t\t\ttemp_r[2] = event.values[2];\r\n\t\t\t\t// TipsTextView.setText(String.valueOf(temp_r[0]) + \" \"\r\n\t\t\t\t// + String.valueOf(temp_r[1]) + \" \"\r\n\t\t\t\t// + String.valueOf(temp_r[2]));\r\n\t\t\t}",
"@Override\n public void onSensorChanged(SensorEvent event) {\n mOrientation = event.values[0];\n }",
"@AnyThread\n private void updatePitchMatrix() {\n // The camera's pitch needs to be rotated along an axis that is parallel to the real world's\n // horizon. This is the <1, 0, 0> axis after compensating for the device's roll.\n Matrix.setRotateM(touchPitchMatrix, 0,\n -touchPitch, (float) Math.cos(deviceRoll), (float) Math.sin(deviceRoll), 0);\n }",
"@Override\n public final void onSensorChanged(SensorEvent event) {\n if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n accx = event.values[0];\n accy = event.values[1];\n accz = event.values[2];\n }else if (event.sensor.getType() == Sensor.TYPE_GYROSCOPE) {\n gyx = event.values[0];\n gyy = event.values[1];\n gyz = event.values[2];\n } else if (event.sensor.getType() == Sensor.TYPE_MAGNETIC_FIELD) {\n magx = event.values[0];\n magy = event.values[1];\n magz = event.values[2];\n }\n }",
"@Override\n public void onSensorChanged(SensorEvent event) {\n theta = (float) Math.toDegrees(Math.atan(event.values[1] / event.values[2]));\n\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 updateOrientation(float [] data){\n if(data == null){Log.e(TAG, \"Failed type message data to float []\"); return;}\n if(data.length != 3){Log.e(TAG, \"updateOrientation data must have length of 3\");return;}\n\n float x = data[0];\n float y = data[1];\n float z = data[2];\n\n //use this as the threshold for detecting direction\n final float NEUTRAl = 0.01f;\n final float THRESHOLD = 0.10f;\n\n //commands to send based on orientation\n final String MOVE_FORWARD=\"HMF\";\n final String MOVE_BACKWARD=\"HMB\";\n final String MOVE_RIGHT=\"HMR\";\n final String MOVE_LEFT=\"HML\";\n\n String msg = \"Accelerometer[x, y, z]: \" + String.format(\"%.4f, %.4f, %.4f\\n\", x, y, z);\n TextView stats = (TextView) findViewById(R.id.accel_stats);\n stats.setText(msg);\n //forward\n if(y <= -(THRESHOLD)) {\n findViewById(R.id.forward).setPressed(true);\n mClientService.write(MOVE_FORWARD.getBytes());\n }\n else{findViewById(R.id.forward).setPressed(false);}\n\n //backward\n if(y>=THRESHOLD){\n findViewById(R.id.bottom).setPressed(true);\n mClientService.write(MOVE_BACKWARD.getBytes());\n }\n else{findViewById(R.id.bottom).setPressed(false);}\n\n //left\n if(x >= THRESHOLD) {\n findViewById(R.id.left).setPressed(true);\n mClientService.write(MOVE_LEFT.getBytes());\n\n }\n else{findViewById(R.id.left).setPressed(false);}\n\n //right\n if(x<= -(THRESHOLD)) {\n findViewById(R.id.right).setPressed(true);\n mClientService.write(MOVE_RIGHT.getBytes());\n }\n else{findViewById(R.id.right).setPressed(false);}\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 onSensorChanged(SensorEvent event) {\n\t\t\tint type = event.sensor.getType();\n\t\t\tif (type == Sensor.TYPE_ACCELEROMETER) {\n\t\t\t\tlong curTime = System.currentTimeMillis();\n\t\t\t\t// only allow one update every 100ms, otherwise updates\n\t\t\t\t// come way too fast and the phone gets bogged down\n\t\t\t\t// with garbage collection\n\t\t\t\t//Log.d(TAG, \"onSensorChanged(\"+type+\")\");\t\t\t\t\n\t\t\t\tif (lastUpdate == -1 || (curTime - lastUpdate) > 40) {\n\t\t\t\t\tlastUpdate = curTime;\t\t\t\t\n\t\t\t\t\tsynchronized (LOCK){\n\t\t\t\t\t\tmLastAccOrientation = calculateAngle(event);\n\t\t\t\t\t\tmLastSample.x = event.values[0];\n\t\t\t\t\t\tmLastSample.y = event.values[1];\n\t\t\t\t\t\tmLastSample.z = event.values[2];\n\t\t\t\t\t\tmLastSample.angle = mLastAccOrientation.angle;\t\t\n\t\t\t\t\t\t//mLastSample.orientation = mLastAccOrientation.orientation;\n\t\t\t\t\t\tmLastSample.orientation = mLastAccOrientation.rotation*90;\n\t\t\t\t\t\tmLastSample.threshold = mLastAccOrientation.threshold;\n\t\t\t\t\t\tmBuffer = mLastSample.x+\",\"+\n\t\t\t\t\t\t\t\t mLastSample.y+\",\"+\n\t\t\t\t\t\t\t\t mLastSample.z+\",\"+\n\t\t\t\t\t\t\t\t mLastSample.angle+\",\"+\n\t\t\t\t\t\t\t\t mLastSample.orientation+\",\"+\n\t\t\t\t\t\t\t\t mLastSample.threshold;\n\t\t\t\t\t\tif (mShowLog)\n\t\t\t\t\t\t\tLog.d(TAG, mBuffer);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"@Override\n public void onSensorChanged(SensorEvent event) {\n float[] valuesCopy = event.values.clone();\n\n if (uptime == 0) {\n uptime = event.timestamp;\n }\n\n double x = (double) ((event.timestamp - uptime))/1000000000.0;\n this.addValues(x, valuesCopy);\n\n TextView xAxisValue = (TextView) findViewById(R.id.xAxisValue);\n xAxisValue.setText(Float.toString(valuesCopy[0]) + \" \" + STI.getUnitString(sensorType));\n\n if (STI.getNumberValues(sensorType) > 1) {\n //set y value to textfield\n TextView yAxisValue = (TextView) findViewById(R.id.yAxisValue);\n yAxisValue.setText(Float.toString(valuesCopy[1]) + \" \" + STI.getUnitString(sensorType));\n\n //set z value to textfield\n TextView zAxisValue = (TextView) findViewById(R.id.zAxisValue);\n zAxisValue.setText(Float.toString(valuesCopy[2]) + \" \" + STI.getUnitString(sensorType));\n }\n }",
"@Override\n public void onSensorChanged(SensorEvent event) {\n\n if (event.sensor.getType() == Sensor.TYPE_MAGNETIC_FIELD) {\n\n mGeomagnetic = new float[3];\n System.arraycopy(event.values, 0, mGeomagnetic, 0, 3);\n\n }\n\n // If we have readings from both sensors then\n // use the readings to compute the device's orientation\n // and then update the display.\n\n if (mGeomagnetic != null) {\n\n int R = (int) mGeomagnetic[0];\n int G = (int) mGeomagnetic[1];\n int B = (int) mGeomagnetic[2];\n\n setBackgroundColorDisplay(R, G, B);\n Log.d(TAG, \"mx : \"+mGeomagnetic[0]+\" my : \"+mGeomagnetic[1]+\" mz : \"+mGeomagnetic[2]);\n\n }\n\n }",
"private void populateSensorData(String name, long timeStamp, float x, float y, float z) {\n //Log.d(CLASS_NAME,sensorData.toString());\n\n //Appending the key and Co-ordinates\n logValues.append(name).append(\";\").append(timeStamp).append(\";\").append(pressedKey).append(\";\")\n .append(coordinateX).append(\";\").append(coordinateY).append(\";\").append(x).append(\";\")\n .append(y).append(\";\").append(z).append(\"\\r\\n\");\n\n }",
"void captureTouch(float[] point, int sequenceNumber);",
"public void onSensorChanged(SensorEvent event)\n {\n if (event.sensor.getType()==Sensor.TYPE_ACCELEROMETER) {\n gravity[0] = event.values[0];\n gravity[1] = event.values[1];\n gravity[2] = event.values[2];\n\n }\n if (event.sensor.getType()==Sensor.TYPE_MAGNETIC_FIELD) {\n geomagnetic[0] = event.values[0];\n geomagnetic[1] = event.values[1];\n geomagnetic[2] = event.values[2];\n\n }\n\n if(SensorManager.getRotationMatrix(_R, null, gravity, geomagnetic)){\n _R = this.opglr.swapRotMatrix(_R);\n }\n\n }",
"public void onTouchEvent(MotionEvent event) {\n Vector3 v = GLHelper.projectTouchToWorld(renderer.getWidth(), renderer.getHeight(),\n renderer.getCurrentModelView(), renderer.getCurrentProjection(), event.getX(), event.getY());\n\n if (BuildConfig.DEBUG) Log.d(TAG, \"touch: \" + v);\n\n flock.touch(v);\n }",
"private void startOrientationSensor() {\n orientationValues = new float[3];\n SensorManager sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n Sensor orientationSensor = sensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION);\n sensorManager.registerListener(this, orientationSensor, SensorManager.SENSOR_DELAY_UI);\n }",
"@Override\n public void onSensorChanged(SensorEvent sensorEvent) {\n if (sensorEvent.sensor.getType() == Sensor.TYPE_ACCELEROMETER && s.equals(\"Accelerometre\")) {\n float Ax = sensorEvent.values[0];\n float Ay = sensorEvent.values[1];\n float Az = sensorEvent.values[2];\n\n acce = \" TimeAcc = \" + sensorEvent.timestamp + \"\\n Ax = \" + Ax + \" \" + \"\\n Ay = \" + Ay + \" \" + \"\\n Az = \" + Az + \"\\n\";\n\n // Do something with this sensor value .\n sensorTxt.setText(acce);\n Log.d(TAG, \" TimeAcc = \" + sensorEvent.timestamp + \" Ax = \" + Ax + \" \" + \" Ay = \" + Ay + \" \" + \" Az = \" + Az);\n }\n\n //LUMIERE\n if (sensorEvent.sensor.getType() == Sensor.TYPE_LIGHT && s.equals(\"Lumiere\")) {\n // La valeur de la lumière\n float lv = sensorEvent.values[0];\n\n light = \" TimeAcc = \" + sensorEvent.timestamp + \"\\n Light value = \" + lv + \"\\n\";\n //On affiche la valeur\n sensorTxt.setText(light);\n }\n\n //PROXIMITE\n if (sensorEvent.sensor.getType() == Sensor.TYPE_PROXIMITY && s.equals(\"Proximite\")) {\n // La valeur de proximité\n float p = sensorEvent.values[0];\n\n proxi = \" TimeAcc = \" + sensorEvent.timestamp + \"\\n Proximite value = \" + p + \"\\n\";\n //On affiche la valeur\n sensorTxt.setText(proxi);\n }\n\n //GYROSCOPE\n if (sensorEvent.sensor.getType() == Sensor.TYPE_GYROSCOPE && s.equals(\"Gyroscope\")) {\n // Les valeurs du gyroscope\n float xGyroscope = sensorEvent.values[0];\n float yGyroscope = sensorEvent.values[1];\n float zGyroscope = sensorEvent.values[2];\n\n gyro = \" TimeAcc = \" + sensorEvent.timestamp + \"\\n Valeur du gyroscope \\n Valeur en x = \" + xGyroscope + \" \" + \"\\n Valeur en y = \" + yGyroscope + \" \" + \"\\n Valeur en z = \" + zGyroscope + \"\\n\";\n //On affiche la valeur\n sensorTxt.setText(gyro);\n }\n\n }",
"@Override\n public void onSensorChanged(SensorEvent event) {\n\n float valueAzimuth = event.values[0];\n float valuePitch = event.values[1];\n\n parent.updateAccelerometer(\n valueAzimuth / maximumRange, -valuePitch / maximumRange);\n\n }",
"public void recordSensors2(){\n\t\t//System.out.println(\"Your pitch is: \" + sd.getPitch());\n if (sd.getPitch() <= .1 || sd.getPitch() >6.2) {\n\t\t\t\t\t//System.out.println(\"Printing off sensor data\");\n\t\t\t\t\tSystem.out.println(\"OdTheta\" + sd.getOdTheta());\n for (int i = 0; i < sd.getRSArrayLength(); i++) {\n double wallX = (sd.getOdLocationX() + (sd.getRangeScanner(i) * Math.cos((((i-90)* (Math.PI/180))- sd.getOdTheta())) + 0));\n //System.out.println(\"Wall X: \" + wallX);\n double wallY = (sd.getOdLocationY() + (0 - sd.getRangeScanner(i) * Math.sin((((i-90)* (Math.PI/180)) - sd.getOdTheta()))));\n //System.out.println(\"Wall Y: \" + wallY);\n int x = (int)Math.round((wallX * scale) + width/2);\n //System.out.println(\"X: \" + x);\n int y = (int)Math.round((wallY * scale) + height/2);\n //System.out.println(\"Y: \" + y);\n \n\n }\n }\n\t\t\t\t//System.out.println(\"Finished Writing Sensor Data\");\n\n\t}",
"@Override\n public void onSensorChanged(SensorEvent event) {\n\n long currentTimeUnix = System.currentTimeMillis() / 1000L;\n long nSeconds = 30L;\n\n // send heartrate data and create new intent\n if (event.sensor.getType() == SENS_HEARTRATE && event.values.length > 0 && event.accuracy > 0) {\n int newValue = Math.round(event.values[0]);\n\n if(newValue!=0 && lastTimeSentUnixHR < (currentTimeUnix-nSeconds)) {\n lastTimeSentUnixHR = System.currentTimeMillis() / 1000L;\n currentValue = newValue;\n\n Log.d(TAG, \"Broadcast HR.\");\n Intent intent = new Intent();\n intent.setAction(\"com.example.Broadcast\");\n intent.putExtra(\"HR\", event.values);\n intent.putExtra(\"ACCR\", event.accuracy);\n intent.putExtra(\"TIME\", event.timestamp);\n sendBroadcast(intent);\n\n client.sendSensorData(event.sensor.getType(), event.accuracy, event.timestamp, event.values);\n\n }\n }\n // also send motion/humidity/step data to know when NOT to interpret hr data\n\n if (event.sensor.getType() == SENS_STEP_COUNTER && event.values[0]-currentStepCount!=0) {\n\n if(lastTimeSentUnixSC < (currentTimeUnix-nSeconds)){\n lastTimeSentUnixSC = System.currentTimeMillis() / 1000L;\n currentStepCount = event.values[0];\n client.sendSensorData(event.sensor.getType(), event.accuracy, event.timestamp, event.values);\n }\n\n }\n\n if (event.sensor.getType() == SENS_ACCELEROMETER) {\n\n if(lastTimeSentUnixACC < (currentTimeUnix-nSeconds)){\n lastTimeSentUnixACC = System.currentTimeMillis() / 1000L;\n\n client.sendSensorData(event.sensor.getType(), event.accuracy, event.timestamp, event.values);\n }\n }\n\n }",
"@Override\n public void onSensorChanged(SensorEvent event) {\n // Log.i(TAG, event + \"\");\n for (int i = 0; i < mListeners.size(); i++) {\n mListeners.get(i).setAzimuthPitchRoll(event.values);\n }\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}",
"public void updateOrientationAngles() {\n SensorManager.getRotationMatrix(rotationMatrix, null,\n accelerometerReading, magnetometerReading);\n\n // \"mRotationMatrix\" now has up-to-date information.\n\n float[] angles = SensorManager.getOrientation(rotationMatrix, orientationAngles);\n azimuth = (float) Math.toDegrees(angles[0]);\n // \"mOrientationAngles\" now has up-to-date information.\n TextView az = findViewById(R.id.az);\n rotateDriver(azimuth);\n\n az.setText(Float.toString(azimuth));\n }",
"private void updateRotation(float[] rotationVector) {\n // Get rotation's based on vector locations\n getRotationMatrixFromVector(mRotationMatrix, rotationVector);\n\n final int worldAxisForDeviceAxisX;\n final int worldAxisForDeviceAxisY;\n\n // Remap the axes as if the device screen was the instrument panel, and adjust the rotation\n // matrix for the device orientation.\n switch (mWindowManager.getDefaultDisplay().getRotation()) {\n case Surface.ROTATION_0:\n default:\n worldAxisForDeviceAxisX = SensorManager.AXIS_X;\n worldAxisForDeviceAxisY = SensorManager.AXIS_Z;\n break;\n case Surface.ROTATION_90:\n worldAxisForDeviceAxisX = SensorManager.AXIS_Z;\n worldAxisForDeviceAxisY = SensorManager.AXIS_MINUS_X;\n break;\n case Surface.ROTATION_180:\n worldAxisForDeviceAxisX = SensorManager.AXIS_MINUS_X;\n worldAxisForDeviceAxisY = SensorManager.AXIS_MINUS_Z;\n break;\n case Surface.ROTATION_270:\n worldAxisForDeviceAxisX = SensorManager.AXIS_MINUS_Z;\n worldAxisForDeviceAxisY = SensorManager.AXIS_X;\n break;\n }\n\n remapCoordinateSystem(\n mRotationMatrix,\n worldAxisForDeviceAxisX,\n worldAxisForDeviceAxisY,\n mAdjustedRotationMatrix);\n\n // Transform rotation matrix into azimuth/pitch/roll\n getOrientation(mAdjustedRotationMatrix, mOrientation);\n\n // Convert radians to degrees and flat\n float newX = (float) Math.toDegrees(mOrientation[1]);\n float newZ = (float) Math.toDegrees(mOrientation[0]);\n\n // How many degrees has the users head rotated since last time.\n float deltaX = applyThreshold(angularRounding(newX - mOldX));\n float deltaZ = applyThreshold(angularRounding(newZ - mOldZ));\n\n // Ignore first head position in order to find base line\n if (!mInitialized) {\n mInitialized = true;\n deltaX = 0;\n deltaZ = 0;\n }\n\n mOldX = newX;\n mOldZ = newZ;\n\n mListener.onTilt((int) deltaZ * 60, (int) deltaX * 60);\n }",
"@Override\n public void onSensorChanged(SensorEvent event) {\n\n // This code is directly taken from the Android website.\n // I used it since the linear accelerometer doesn't seem to work correctly.\n // Without borrowing this code, I would have had no idea how to do this.\n // https://developer.android.com/guide/topics/sensors/sensors_motion.html\n\n final float alpha = 0.8F;\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 // don't include first 10 pieces of data to make sure sensor is properly adjusted\n if(accuracyCounter>=0) {\n accuracyCounter--;\n } else {\n // Add the information to the dataset.\n dataSet.establishNextDataPoint(\n event.values[0] - gravity[0],\n event.values[1] - gravity[1],\n event.values[2] - gravity[2]);\n }\n }",
"void onOrientationChanged(float azimuth, float pitch, float roll);",
"@Override\n public void onSensorChanged(SensorEvent event) {\n if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n // Send data to phone\n if (count == 5) {\n count = 0;\n// Log.d(\"hudwear\", \"send accel data to mobile...\"\n// + \"\\nx-axis: \" + event.values[0]\n// + \"\\ny-axis: \" + event.values[1]\n// + \"\\nz-axis: \" + event.values[2]\n// );\n// Log.d(\"hudwear\", \"starting new task.\");\n\n if (connected)\n Log.d(\"atest\", \"values: \" + event.values[0] + \", \" + event.values[1] + \", \" + event.values[2]);\n// new DataTask().execute(new Float[]{event.values[0], event.values[1], event.values[2]});\n }\n else count++;\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}",
"@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 public void onSensorChanged(android.hardware.SensorEvent event) {\n int azimuth = (int) event.values[0];\n switch (cz.kruch.track.TrackingMIDlet.getActivity().orientation) {\n case 0: // portrait\n // nothing to do\n break;\n case 1: // landscape\n azimuth = (azimuth + 90) % 360;\n break;\n case 2: // portrait reversed\n azimuth = (azimuth + 180) % 360;\n break;\n case 3: // landscape reversed\n azimuth = (azimuth + 270) % 360;\n break;\n }\n// android.util.Log.w(\"TrekBuddy\", \"[app] fixed azimuth = \" + azimuth);\n notifySenser(azimuth);\n }",
"@Override\n\tpublic void onSensorChanged(SensorEvent event) {\n\t\tint sensorType = event.sensor.getType(); \n //values[0]:X轴,values[1]:Y轴,values[2]:Z轴 \n float[] values = event.values; \n if (sensorType == Sensor.TYPE_ACCELEROMETER) \n { \n if ((Math.abs(values[0]) > 17 || Math.abs(values[1]) > 17 || Math \n .abs(values[2]) > 17)) \n { \n Log.d(\"sensor x \", \"============ values[0] = \" + values[0]); \n Log.d(\"sensor y \", \"============ values[1] = \" + values[1]); \n Log.d(\"sensor z \", \"============ values[2] = \" + values[2]); \n Intent intent = new Intent(this, MapActivity.class);\n startActivity(intent);\n //摇动手机后,再伴随震动提示~~ \n vibrator.vibrate(500); \n } \n \n } \n\t}",
"public void recordSensors(){\n\t\t//System.out.println(\"Your pitch is: \" + sd.getPitch());\n if (sd.getPitch() <= .1 || sd.getPitch() >6.2) {\n\t\t\t\tSystem.out.println(\"Yaw\" + sd.getYaw());\n\t\t\t\t\t//System.out.println(\"Printing off sensor data\");\n for (int i = 0; i < sd.getRSArrayLength(); i++) {\n double wallX = (sd.getLocationX() + (sd.getRangeScanner(i) * Math.cos((((i-90)* (Math.PI/180))- sd.getYaw())) + 0));\n //System.out.println(\"Wall X: \" + wallX);\n double wallY = (sd.getLocationY() + (0 - sd.getRangeScanner(i) * Math.sin((((i-90)* (Math.PI/180)) - sd.getYaw()))));\n //System.out.println(\"Wall Y: \" + wallY);\n int x = (int)Math.round((wallX * scale) + width/2);\n //System.out.println(\"X: \" + x);\n int y = (int)Math.round((wallY * scale) + height/2);\n //System.out.println(\"Y: \" + y);\n int drawline1 = (int)Math.round((sd.getLocationX() * scale) + width/2);\n int drawline2 = (int)Math.round((sd.getLocationY() * scale) + height/2);\n g2d.setColor(Color.green);\n g2d.drawLine(drawline1, drawline2, x, y);\n g2d.setColor(Color.black);\n g2d.fillRect(x,y,2,2);\n\n }\n }\n\t\t\t\t//System.out.println(\"Finished Writing Sensor Data\");\n\n\t}",
"@Override\n public int getCameraOrientation() {\n return characteristics_sensor_orientation;\n }",
"@Override\n public void onSensorChanged(SensorEvent sensorEvent) {\n if(sensorEvent.sensor.getType()== Sensor.TYPE_ACCELEROMETER){\n if(rBtnPuerta.isChecked()){\n accionShake(sensorEvent);\n }\n }else{\n if(sensorEvent.sensor.getType() == Sensor.TYPE_PROXIMITY){\n if(rBtnLed.isChecked()){\n accionProximidad(sensorEvent);\n }\n }else{\n if(sensorEvent.sensor.getType() == Sensor.TYPE_LIGHT){\n if(rBtnLuminosidad.isChecked()){\n accionLuminosidad(sensorEvent);\n }\n }\n }\n }\n }",
"@Override\n public void onSensorChanged(SensorEvent event) {\n if (event.sensor.getType() == SENS_ACCELEROMETER && event.values.length > 0) {\n float x = event.values[0];\n float y = event.values[1];\n float z = event.values[2];\n\n latestAccel = (float)Math.sqrt(Math.pow(x,2.)+Math.pow(y,2)+Math.pow(z,2));\n //Log.d(\"pow\", String.valueOf(latestAccel));\n\n }\n // send heartrate data and create new intent\n if (event.sensor.getType() == SENS_HEARTRATE && event.values.length > 0 && event.accuracy >0) {\n\n Log.d(\"Sensor\", event.sensor.getType() + \",\" + event.accuracy + \",\" + event.timestamp + \",\" + Arrays.toString(event.values));\n\n int newValue = Math.round(event.values[0]);\n long currentTimeUnix = System.currentTimeMillis() / 1000L;\n long nSeconds = 30L;\n \n if(newValue!=0 && lastTimeSentUnix < (currentTimeUnix-nSeconds)) {\n lastTimeSentUnix = System.currentTimeMillis() / 1000L;\n currentValue = newValue;\n Log.d(TAG, \"Broadcast HR.\");\n Intent intent = new Intent();\n intent.setAction(\"com.example.Broadcast\");\n intent.putExtra(\"HR\", event.values);\n intent.putExtra(\"ACCR\", latestAccel);\n intent.putExtra(\"TIME\", event.timestamp);\n intent.putExtra(\"ACCEL\", latestAccel);\n\n\n Log.d(\"change\", \"send intent\");\n\n sendBroadcast(intent);\n\n client.sendSensorData(event.sensor.getType(), latestAccel, event.timestamp, event.values);\n }\n }\n\n }",
"private void determineOrientation(float[] rotationMatrix) {\n\t\t\t float[] orientationValues = new float[3];\n\t\t SensorManager.getOrientation(rotationMatrix, orientationValues);\n\t\t double azimuth = Math.toDegrees(orientationValues[0]);\n\t\t double pitch = Math.toDegrees(orientationValues[1]);\n\t\t double roll = Math.toDegrees(orientationValues[2]);\n\t\t if (pitch <= 10)\n\t\t { \n\t\t if (Math.abs(roll) >= 170)\n\t\t {\n\t\t onFaceDown();\n\t\t }\n\t\t else if (Math.abs(roll) <= 10)\n\t\t {\n\t\t onFaceUp();\n\t\t }\n\t\t }\n\t\t\t\n\t\t}",
"@Override\n\tpublic Hashtable getSensorData(Context androidContext, String sensorID, long dateTime,\n\t\t\tlong timeDifference) {\n\t\tString Time_Stamp = \"timestamp\";\n\t\tAndroidSensorDataManager androidSensorDataManager = AndroidSensorDataManagerSingleton.getInstance(androidContext);\n\t\t//androidSensorDataManager.startCollectSensorUsingThreads();\n\t\tAndroidSensorDataContentProviderImpl dataProvider = new AndroidSensorDataContentProviderImpl();\n\t\tandroidSensorDataManager.startSensorDataAcquistionPollingMode(sensorID, dataProvider, null);\n\t\ttry {\n\t\t\tThread.sleep(300);\n\t\t} catch (InterruptedException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tboolean dataFound = false;\n\t\tint counter = 0;\n\t\tBundle currentData = null;\n\t\tHashtable bundleHT = null;\n\t\tList<Bundle> sensorDataBundle;\n\t\twhile ( counter <3 && !dataFound ) {\n\t\t\t\tcounter++;\n\t\t\t\t\n\t\t\t\t//using data provider's data\n\t\t\t\t//instead of expensively requery the sensor\n\t\t\t\t//which might be also wrong\n\t\t\t\tsensorDataBundle = dataProvider.getSensorDataReading();\n\t\t\t\t\n\t\t\t if ( sensorDataBundle.isEmpty() ){\n//\t\t\t //\tsensorDataBundle = androidSensorDataManager.get\n\t\t \tsensorDataBundle = androidSensorDataManager.returnSensorDataAndroidAfterInitialization(sensorID, false);\n\t\t }\n\t\t\t if ( sensorDataBundle.isEmpty() ){\n\t\t\t \t//something very slow regarding with sensor reading\n\t\t\t \ttry {\n\t\t\t\t\t\tThread.sleep(500*counter);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t }\n\t\t\t\tfor ( Bundle curData : sensorDataBundle) {\n\t\t\t\t\t//if ( curData.getLong(Time_Stamp) >= dateTime - timeDifference && curData.getLong(Time_Stamp) <= dateTime + timeDifference ) {\n\t\t\t\t\t\tcurrentData = curData;\n\t\t\t\t\t bundleHT = convertBundleToHash(currentData);\n\t\t\t\t\t\tdataFound = true;\n\t\t\t\t\t//}\n\t\t\t\t}\n\t\t\t\t\n\t\t}\n\t\treturn bundleHT;\n\t\t\n\t\t\n\t}",
"@Override\n\tpublic void onHeadingSensorChanged(float[] orientation) {\n\t\t\n\t}",
"@Override\n public void combinedIMU(int ax, int ay, int az, int gx, int gy, int gz, int timestamp) {\n }",
"private void composeAngleTelemetry(){\n telemetry.addData(\"Start Angle\", startAngles.firstAngle);\n telemetry.addData(\"Current Angle\", angles.firstAngle);\n telemetry.addData(\"Global Angle\", globalAngle);\n }",
"public interface IGestureMotion {\n\n int[] requiredSensors ();\n}",
"public boolean calculate(long newTimestamp, float eventValues0 , float eventValues1, int newRotation) {\n final float xSmallRotateTH = 0.05f;\n //xSmallRotateTH indicating the threshold of max \"small\n //rotation\". This varible is determined by experiments\n //based on MT6575 platform. May be adjusted on other chips.\n float valueToUse = 0;\n if (mOrientation != newRotation) {\n // orientation has changed, reset calculations\n mOrientation = newRotation;\n mValue = 0;\n angle[0] = 0;\n angle[1] = 0;\n angle[2] = 0;\n mFirstTime = true;\n }\n switch (mOrientation) {\n case Surface.ROTATION_0:\n valueToUse = eventValues1;\n break;\n case Surface.ROTATION_90:\n // no need to re-map\n valueToUse = eventValues0;\n break;\n case Surface.ROTATION_180:\n // we do not have this rotation on our device\n valueToUse = -eventValues1;\n break;\n case Surface.ROTATION_270:\n valueToUse = -eventValues0;\n break;\n default:\n valueToUse = eventValues0;\n }\n mValue = valueToUse + OFFSET;\n if (timestamp != 0 && Math.abs(mValue) > TH) {\n final float dT = (newTimestamp - timestamp) * NS2S;\n\n angle[1] += mValue * dT * 180 / Math.PI;\n if (mFirstTime) {\n angle[0] = angle[1] - BASE_ANGLE;\n angle[2] = angle[1] + BASE_ANGLE;\n mFirstTime = false;\n } else if (angle[1] <= angle[0]) {\n angle[0] = angle[1];\n angle[2] = angle[0] + 2 * BASE_ANGLE;\n } else if (angle[1] >= angle[2]) {\n angle[2] = angle[1];\n angle[0] = angle[2] - 2 * BASE_ANGLE;\n }\n }\n float mAngle ;\n if (timestamp != 0 && QuickContactBadgeEx.mCount != 0) {\n mAngle = angle[1] - angle[0];\n } else {\n mAngle = UNUSABLE_ANGLE_VALUE;\n }\n timestamp = newTimestamp;\n \n if (mAngle != UNUSABLE_ANGLE_VALUE) {\n return onGyroPositionChanged(mAngle);\n } else { \n return false;\n }\n }",
"public void updateOrientationAngles() {\n // Update rotation matrix, which is needed to update orientation angles.\n //mSensorManager.getRotationMatrix(mRotationMatrix, null,\n // mAccelerometerReading, mMagnetometerReading);\n\n // \"mRotationMatrix\" now has up-to-date information.\n\n mSensorManager.getOrientation(mRotationMatrix, mOrientationAngles);\n\n // \"mOrientationAngles\" now has up-to-date information.\n\n mGLView.updateScene(mOrientationAngles[0],mOrientationAngles[1],mOrientationAngles[2]);\n }",
"@Override\n\tprotected int getSensorData() {\n\t\treturn sensor.getLightValue();\n\t}",
"public List<SensorObject> getSensorData(){\n\t\t\n\t\t//Cleaning all the information stored\n\t\tthis.sensorData.clear();\n\t\t\n\t\t//Getting the information from the keyboard listener\n\t\tif(keyboardListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.keyboardListener.getKeyboardEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.keyboardListener.getKeyboardEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.keyboardListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse listener\n\t\tif(mouseListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseListener.getMouseEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseListener.getMouseEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse motion listener\n\t\tif(mouseMotionListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseMotionListener.getMouseMotionEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseMotionListener.getMouseMotionEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseMotionListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse wheel listener\n\t\tif(mouseWheelListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseWheelListener.getMouseWheelEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseWheelListener.getMouseWheelEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseWheelListener.clearEvents();\n\t\t}\n\t\t\n\t\t//If we want to write a JSON file with the data\n\t\tif(Boolean.parseBoolean(this.configuration.get(artie.sensor.common.enums.ConfigurationEnum.SENSOR_FILE_REGISTRATION.toString()))){\n\t\t\tthis.writeDataToFile();\n\t\t}\n\t\t\n\t\treturn this.sensorData;\n\t}",
"void take_angles() {\n\n rolls+=String.valueOf((Math.toDegrees(orientation[2]))%360+90)+\"\\n\";\n if(!touch_ground_switch.isChecked()&&angle_with_ground==0)\n angle_with_ground=adjust_angle_rotation(Math.toDegrees(orientation[2]) % 360 + 90);\n else if (down_angle == 0)\n down_angle=adjust_angle_rotation(Math.toDegrees(orientation[2]) % 360 + 90);\n else if(up_angle==0)\n {\n up_angle=adjust_angle_rotation(Math.toDegrees(orientation[2]) % 360 + 90);\n touch_ground_switch.setVisibility(View.INVISIBLE);\n if(!touch_ground_switch.isChecked())\n object_calculations_doesnt_touch_ground();\n else\n object_calculations_touch_ground();\n }\n}",
"public void onSensorChanged(SensorEvent event) {\n synchronized (this) {\n\n //((TextView) findViewById(R.id.texto_prueba2)).setText(Boolean.toString(status));\n\n getInicio(event);\n\n if(status){\n\n if(!(limitarEje(event) && limitarTiempo(event.timestamp, m.getCurrentTime()))){\n ((TextView) findViewById(R.id.texto_prueba)).setText(\"Acelerómetro X, Y , Z: \" + event.values[0] +\" , \"+ event.values[1] +\" , \"+ event.values[2]);\n return;\n }\n\n action=m.isMovement(event.values[0], event.values[1], event.values[2], event.timestamp);\n if(action>=0){\n if(action==10){\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n startActivity(intent);\n status=false;\n }\n\n if(action==12){\n //context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA_FLASH);\n if(cam==null){\n cam = Camera.open();\n p = cam.getParameters();\n p.setFlashMode(android.hardware.Camera.Parameters.FLASH_MODE_TORCH);\n cam.setParameters(p);\n cam.startPreview();\n }\n else{\n p.setFlashMode(android.hardware.Camera.Parameters.FLASH_MODE_OFF);\n cam.setParameters(p);\n cam.release();\n cam = null;\n\n }\n }\n if(action==13){\n /* if(mPlayer==null){\n\n recorder.setAudioSource(MediaRecorder.AudioSource.MIC);\n recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);\n recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);\n recorder.setOutputFile(path);\n recorder.prepare();\n recorder.start();\n }\n else{\n recorder.stop();\n recorder.reset();\n recorder.release();\n\n recorder = null;\n }\n*/\n }\n }\n\n ((TextView) findViewById(R.id.texto_prueba2)).setText(Integer.toString(action));\n\n ((TextView) findViewById(R.id.texto_prueba1)).setText(Long.toString((event.timestamp-m.getCurrentTime())/500000000));\n }\n //((TextView) findViewById(R.id.texto_prueba)).setText(\"Acelerómetro X, Y , Z: \" + curX +\" , \"+ curY +\" , \"+ curZ);\n }\n }",
"public int getDeviceRotation();",
"@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 }",
"public boolean onGenericMotionEvent( MotionEvent event ){\n\t\t\n\t\t\tif( !_useGamepad ) return false;\n\t\t\t\n\t\t\ttry{\n\t\t\t\tint source=((Integer)_getSource.invoke( event )).intValue();\n\n\t\t\t\tif( (source&16)==0 ) return false;\n\t\t\t\n\t\t\t\tBBAndroidGame g=_androidGame;\n\t\t\t\n\t\t\t\targs1[0]=Integer.valueOf( 0 );g._joyx[0]=((Float)_getAxisValue.invoke( event,args1 )).floatValue();\n\t\t\t\targs1[0]=Integer.valueOf( 1 );g._joyy[0]=((Float)_getAxisValue.invoke( event,args1 )).floatValue();\n\t\t\t\targs1[0]=Integer.valueOf( 17 );g._joyz[0]=((Float)_getAxisValue.invoke( event,args1 )).floatValue();\n\t\t\t\t\n\t\t\t\targs1[0]=Integer.valueOf( 11 );g._joyx[1]=((Float)_getAxisValue.invoke( event,args1 )).floatValue();\n\t\t\t\targs1[0]=Integer.valueOf( 14 );g._joyy[1]=((Float)_getAxisValue.invoke( event,args1 )).floatValue();\n\t\t\t\targs1[0]=Integer.valueOf( 18 );g._joyz[1]=((Float)_getAxisValue.invoke( event,args1 )).floatValue();\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t}catch( Exception ex ){\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}",
"private void startupTango() {\n // Lock configuration and connect to Tango.\n // Select coordinate frame pair.\n final ArrayList<TangoCoordinateFramePair> framePairs =\n new ArrayList<TangoCoordinateFramePair>();\n framePairs.add(new TangoCoordinateFramePair(\n TangoPoseData.COORDINATE_FRAME_START_OF_SERVICE,\n TangoPoseData.COORDINATE_FRAME_DEVICE));\n\n // Listen for new Tango data\n mTango.connectListener(framePairs, new OnTangoUpdateListener() {\n @Override\n public void onPoseAvailable(final TangoPoseData pose) {\n //hud_user.update_pose(pose);\n updateLocation(pose); //this calls the function to determine the translation and rotation angle (AKSHAY)\n gMatrix = calcGMatrix(pose);\n// logPose(hud_user.getPose());\n// logPose(pose);\n\n }\n\n @Override\n public void onXyzIjAvailable(TangoXyzIjData xyzIj) {\n // We are not using onXyzIjAvailable for this app.\n }\n\n\n ArrayList<Point> to_point_list(FloatBuffer arr) {\n ArrayList<Point> out = new ArrayList<Point>();\n\n// for (int i = 0; i < arr.limit(); i += 4) {\n// double[] currPoint = {arr.get(i), arr.get(i+1), arr.get(i+2), arr.get(i+3)};\n// /*Matrix pointMat = new Matrix(4, 1, currPoint);\n// try {\n// if (gMatrix != null)\n// pointMat = gMatrix.multiply(pointMat);\n// } catch (Exception e) {\n// e.printStackTrace();\n// }\n// out.add(new Point(pointMat.getElement(0), pointMat.getElement(1), pointMat.getElement(2)));*/\n// out.add(new Point(arr.get(i), arr.get(i+1), arr.get(i+2)));\n// }\n\n //THE FOLLOWING CODE IS FOR ROTATION AND ROTATION OF THE POINT CLOUD DATA\n //FROM AKSHAY\n //UNCOMMENT AND REPLACE THE ABOVE CODE WITH THE FOLLOWING CODE\n\n float x1;\n float y1;\n float z1;\n float newx;\n float newz;\n for (int i = 0; i < arr.limit(); i += 4) {\n if(arr.get(i+3) != 1){ //taking into account the confidence value of the point\n continue;\n }\n x1 = arr.get(i);\n y1 = arr.get(i+1);\n //Code added by Akshay to skip some ceiling/floor data (Only 10 cm window allowed)\n if(y1 < -0.05 || y1 > 0.05){\n continue;\n }\n z1 = arr.get(i+2);\n //code that only captures a 1.0m wall capture at a time by Akshay (Comment out if you want!)\n if (x1 < -0.5 || x1 > 0.5){\n continue;\n }\n\n newx = (float)(x1*Math.cos(Math.toRadians(-roll))-z1*Math.sin(Math.toRadians(-roll))+translation[0]); //rotates new point in x\n newz = (float)(x1*Math.sin(Math.toRadians(-roll))+z1*Math.cos(Math.toRadians(-roll))+translation[1]); //rotates new point in z/y\n\n //Code to test out 3X3 Rotation Matrix Transformation if Euclidean Angles fail (FROM AKSHAY)\n //\n //newx = x1*rotMatrix[0] + y1*rotMatrix[1] +z1*rotMatrix[2];\n //newz = x1*rotMatrix[6]+y1*rotMatrix[7]+z1*rotMatrix[8];\n\n out.add(new Point(newx,y1,newz));\n\n }\n\n return out;\n }\n\n private ArrayList<Point> sample_array(ArrayList<Point> a) {\n int size = a.size()/SAMPLE_FACTOR;\n ArrayList<Point> out = new ArrayList<Point>(size);\n\n for (int i = 0; i < size; i++)\n out.add(a.get(i*SAMPLE_FACTOR));\n\n return out;\n }\n\n private void modifyWallList(ArrayList<Cluster> a) {\n if (a == null)\n return;\n\n for (int i = 0; i < a.size(); i++) {\n Point p1 = new Point(0, 0, 0);\n Point p2 = new Point(1, 0, 0);\n Point p3 = new Point(0, 1, 0);\n Plane xyPlane = new Plane(p1, p2, p3);\n\n a.get(i).calcPlane();\n if (a.get(i).getPlane() != null) {\n if (a.get(i).getPlane().calcInterPlaneAngle(xyPlane) > angleMargin) {\n boolean condition = false;\n for (int j = 0; j < wallList.size() && !condition; j++) {\n if (wallList.get(j).getPlane() != null) {\n double angle = wallList.get(j).getPlane().calcInterPlaneAngle(a.get(i).getPlane());\n\n if (angle < angleMargin && a.get(i).getPlane().getShift() < distanceMargin) {\n wallList.get(j).update(a.get(i));\n condition = true; // wall found\n }\n\n if (angle < Math.PI/2.0 - angleMargin && angle > angleMargin) {\n condition = true; // cluster plane in dead zone\n }\n }\n }\n\n if (!condition) {\n wallList.add(new Wall(a.get(i)));\n }\n }\n }\n }\n }\n\n private void modify2DWallList(ArrayList<Point> points, ArrayList<Line> lines) {\n if (points == null)\n return;\n\n for (int i = 0; i < points.size(); i++) {\n\n boolean wallFound = false;\n\n Point curPoint = points.get(i);\n Line curLine = lines.get(i);\n for (int j = 0; j < wall2DList.size(); j++) {\n Wall2D curWall = wall2DList.get(j);\n\n if (curWall.getDistance(curPoint) < distanceMargin && curWall.getLine().getAngle(curLine) < angleMargin) {\n curWall.addPoint(curPoint);\n wallFound = true;\n } else if (curWall.getLine().getAngle(curLine) > angleMargin && curWall.getLine().getAngle(curLine) < Math.PI/2 - angleMargin)\n wallFound = true;\n }\n\n if (!wallFound) {\n wall2DList.add(new Wall2D(curPoint, curLine));\n }\n }\n }\n\n // attempt to calc point cloud trend line\n private Line linearRegression(ArrayList<Point> points) {\n double sumx = 0.0, sumz = 0.0, sumx2 = 0.0;\n\n for (int i = 0; i < points.size(); i++) {\n Point curPoint = points.get(i);\n sumx += curPoint.x;\n sumz += curPoint.z;\n sumx2 += curPoint.x*curPoint.x;\n }\n\n double xbar = sumx/((double) points.size());\n double zbar = sumz/((double) points.size());\n\n double xxbar = 0.0, xzbar = 0.0;\n\n for (int i = 0; i < points.size(); i++) {\n Point curPoint = points.get(i);\n xxbar += (curPoint.x - xbar) * (curPoint.x - xbar);\n xzbar += (curPoint.x - xbar) * (curPoint.z - zbar);\n }\n\n double slope = xzbar / xxbar;\n double intercept = zbar - slope * xbar;\n\n return new Line(slope, intercept);\n }\n\n private ArrayList<Point> generateAverages(ArrayList<Point> allPoints) {\n ArrayList<Point> averagedPoints = new ArrayList<Point>();\n \n if (allPoints.size() > 0) {\n \n for (int i = 0; i < numGroups; i++) {\n int groupSize = allPoints.size()/numGroups;\n int start = i*groupSize;\n Point avg = allPoints.get(start);\n \n for (int j = start + 1; j < start + groupSize; j++)\n avg.add(allPoints.get(j));\n \n avg.x /= groupSize;\n avg.y /= groupSize;\n avg.z /= groupSize;\n \n averagedPoints.add(avg);\n }\n \n }\n \n return averagedPoints;\n }\n\n private ArrayList<Line> generateLines(ArrayList <Point> allPoints) {\n ArrayList<Line> lines = new ArrayList<>();\n\n if (allPoints.size() > 0) {\n\n for (int i = 0; i < numGroups; i++) {\n int groupSize = allPoints.size()/numGroups;\n int start = i*groupSize;\n ArrayList <Point> group = new ArrayList<Point>();\n //Point avg = allPoints.get(start);\n\n for (int j = start; j < start + groupSize; j++)\n group.add(allPoints.get(j));\n\n lines.add(linearRegression(group));\n }\n\n }\n\n return lines;\n }\n\n private boolean isSingleWall(Line line, ArrayList<Point> points) {\n int count = 0;\n\n for (int i = 0; i < points.size(); i++) {\n count++;\n }\n\n return false;\n }\n\n private void modify2DWallListSingleWall(Wall2D wall) {\n if (wall != null) {\n if (wall2DList.size() < 1)\n wall2DList.add(wall);\n else {\n //Log.i(TAG, String.valueOf(wall.getAngle(wall2DList.get(0))));\n boolean skip = false;\n\n for (int i = 0; i < wall2DList.size() && !skip ; i++) {\n if (wall.getAngle(wall2DList.get(i)) < angleMargin) {\n Log.i(TAG, String.valueOf(wall.getParallelDist(wall2DList.get(i))));\n if (wall.getParallelDist(wall2DList.get(i)) < distanceMargin) {\n skip = true;\n wall.setValid(true);\n\n //CODE ADDED BY AKSHAY\n skip = false;\n Wall2D wWall = wall2DList.get(i);\n double wLen = wWall.getLength();\n double d1 = wWall.getEdge1().dist2D(wall.getEdge1());\n double d2 = wWall.getEdge2().dist2D(wall.getEdge1());\n double d3 = wWall.getEdge1().dist2D(wall.getEdge2());\n double d4 = wWall.getEdge2().dist2D(wall.getEdge2());\n if (wall.getLength()>2*wallMargin){\n skip = true;\n }\n if(d1 < wLen && d2 < wLen && d3 < wLen && d4 < wLen){\n //Case I: candidate wall inside existing wall\n skip = true;\n }\n else if ((d1 > wallMargin || d2 > wallMargin)&&(d3 > wallMargin || d4 > wallMargin)){\n //Case II: candidate wall is outside existing wall\n skip = false;\n }\n else if ((d3 < wLen && d4 < wLen)||(d1 < wLen && d2 < wLen)){\n //Case III: candidate wall is in/outside existing wall\n if(d3 < wLen && d4 < wLen){\n if(d1 > wallMargin || d2 > wallMargin){\n skip = true;\n }\n else {\n skip = true;\n wall2DList.get(i).addPoint(wall.getEdge1());\n wall2DList.get(i).addPoint(wall.getEdge2());\n }\n }\n else {\n if(d3 > wallMargin || d4 > wallMargin){\n skip = true;\n }\n else {\n skip = true;\n wall2DList.get(i).addPoint(wall.getEdge1());\n wall2DList.get(i).addPoint(wall.getEdge2());\n }\n\n }\n }\n //END CODE ADDED BY AKSHAY\n\n\n //CODE BY YOTAM (SHOULD BE UNCOMMENTED IF AKSHAY'S CODE IS COMMENTED!)\n /*\n wall.addPoint(wall2DList.get(i).getEdge1());\n wall.addPoint(wall2DList.get(i).getEdge2());\n wall2DList.set(i, wall);\n */\n\n }\n }\n }\n\n if (skip == false) {\n if (!(wall.getLength()>2*wallMargin)){\n wall2DList.add(wall);\n }\n }\n }\n }\n }\n\n private double sumOfSquaredError(Line line, ArrayList<Point> points){\n double sum = 0;\n double size = points.size();\n\n for (int i = 0; i < points.size(); i++) {\n sum += (1/size)*line.getDistance(points.get(i))*line.getDistance(points.get(i));\n }\n\n return sum/size;\n }\n\n private double meanError(Line line, ArrayList<Point> points){\n double sum = 0;\n double size = points.size();\n\n for (int i = 0; i < points.size(); i++) {\n sum += line.getDistance(points.get(i));\n }\n\n return sum/size;\n }\n\n private Wall2D buildWall(Line line, ArrayList<Point> pointCloud) {\n Wall2D outWall = null;\n int i = 0;\n boolean found = false;\n while (i < pointCloud.size() && !found) {\n Point currPoint = pointCloud.get(i);\n i++;\n\n if (line.getDistance(currPoint) < errorMargin) {\n outWall = new Wall2D(currPoint);\n found = true;\n }\n }\n\n i = pointCloud.size() - 1;\n found = false;\n while (i > 0 && !found) {\n Point currPoint = pointCloud.get(i);\n i--;\n\n if (line.getDistance(currPoint) < errorMargin) {\n outWall.addPoint(currPoint);\n found = true;\n }\n }\n\n return outWall;\n }\n\n @Override\n public void onPointCloudAvailable(final TangoPointCloudData pointCloudData) {\n\n if (pointCloudData.points == null) {\n Log.i(TAG, \"pointCloudData.points is NULL\");\n } else {\n FloatBuffer arr = pointCloudData.points;\n ArrayList<Point> tempPoints = to_point_list(arr);\n global_points = tempPoints;\n\n if (dataCount < 3) {\n dataCount = dataCount + 1;\n\n for (int i = 0; i < tempPoints.size(); i++)\n points.add(tempPoints.get(i));\n\n } else {\n //Log.i(TAG,String.valueOf(points.size())); //added by Akshay for debug\n Collections.sort(points);\n Line totalLine = linearRegression(points);\n double error = meanError(totalLine, points);\n dataCount = 0;\n\n if (error < errorMargin && points.size() > min_points) {\n Wall2D currWall = buildWall(totalLine, points);\n modify2DWallListSingleWall(currWall);\n\n }\n points = new ArrayList<Point>(); //added by Akshay for testing (empties points after three data frames)\n //Log.i(TAG,String.valueOf(points.size()));\n }\n\n //Log.i(TAG, String.valueOf(points.size())); //added by Akshay for debug\n }\n }\n\n @Override\n public void onTangoEvent(final TangoEvent event) {\n // Ignoring TangoEvents.\n }\n\n @Override\n public void onFrameAvailable(int cameraId) {\n // We are not using onFrameAvailable for this application.\n }\n });\n }",
"public int getCameraSensorRotation();",
"@Override\n public void gyroYaw(int value, int timestamp) {\n }",
"@Override\n public void onSensorChanged(SensorEvent event) {\n if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER){\n // Corriger les valeurs x et y en fonction de l'orientation de l'appareil\n switch (mDisplay.getRotation()) {\n case Surface.ROTATION_0:\n mAccelerationX = event.values[0];\n mAccelerationY = event.values[1];\n break;\n case Surface.ROTATION_90:\n mAccelerationX = -event.values[1];\n mAccelerationY = event.values[0];\n break;\n case Surface.ROTATION_180:\n mAccelerationX = -event.values[0];\n mAccelerationY = -event.values[1];\n break;\n case Surface.ROTATION_270:\n mAccelerationX = event.values[1];\n mAccelerationY = -event.values[0];\n break;\n }\n\n //mResX.setText(\"Accelerometre X : \" + mAccelerationX);\n //mResY.setText(\"Accelerometre Y : \" + mAccelerationY);\n\n float newPos = - mAccelerationX*viewWidth/12;\n float deltaAngle = tempAngle-mAccelerationX;\n\n //si l'angle ne varie qu'un peu,on ne bouge pas le boar\n if(Math.abs(deltaAngle)>0.2){\n animate = new TranslateAnimation(globalBoar.getX(),newPos ,0.2f*viewHeight/2, 0.2f*viewHeight/2);\n animate.setDuration(200);\n animate.setFillAfter(true);\n boarPlayerImage.startAnimation(animate);\n globalBoar.decideBoar(newPos,0.2f*viewHeight/2);\n tempAngle=mAccelerationX;\n\n }\n\n }\n }",
"int getSensorRotationDegrees();",
"@Override\r\n\tpublic void onOrientationChanged(float azimuth, float pitch, float roll) {\n\r\n\t}",
"@Override\n public void magnetometer(int x, int y, int z, int timestamp) {\n }",
"@Override\n public void onSensorChanged(SensorEvent event) {\n timestamp = event.timestamp;\n gyroX = event.values[0];\n gyroY = event.values[1];\n gyroZ = event.values[2];\n\n this.setChanged();\n this.notifyObservers(Sensor.TYPE_GYROSCOPE);\n }",
"private static native void getMotionData(long pointer, long controllerHandle, float[] motionData);",
"@Override\r\n public boolean onTouchEvent(MotionEvent event) {\n LogUtil.d(TAG,\"onTouchEvent()\");\r\n int MAX_TOUCHPOINTS=3;\r\n int pointerCount = event.getPointerCount();\r\n if (pointerCount>MAX_TOUCHPOINTS){\r\n pointerCount = MAX_TOUCHPOINTS;\r\n }\r\n //判断触摸事件是单触摸还是多触摸,\r\n\r\n int touchType = event.getActionMasked();\r\n switch (touchType){\r\n //第一个按下\r\n case MotionEvent.ACTION_DOWN:\r\n ;\r\n break;\r\n //非第一个按下\r\n case MotionEvent.ACTION_POINTER_DOWN:\r\n for(int i=0;i<pointerCount;i++){\r\n int j=event.getPointerId(i);\r\n int x1=(int) event.getX(j);\r\n int y1= (int) event.getY(j);\r\n }\r\n ;\r\n break;\r\n }\r\n\r\n if(event.getAction()==MotionEvent.ACTION_UP){\r\n rocker.reset();\r\n }else{\r\n TouchX=(int) event.getX();\r\n TouchY=(int) event.getY();\r\n if (event.getAction()==MotionEvent.ACTION_DOWN){\r\n rocker.begin(TouchX,TouchY);\r\n }else if (event.getAction()==MotionEvent.ACTION_MOVE){\r\n rocker.update(TouchX,TouchY);\r\n }\r\n }\r\n return true;\r\n }",
"public void onTouchEvent(MotionEvent event) {\n\t\t// history\n\t\t// pointers\n\t\tmDurationLogger.start();\n\t\tevent.getPointerCount();\n\t\tevent.getAction();\n\t\tif (event.getHistorySize() > 0){\n\t\t\tLog.i(\"TouchLogger\",\n\t\t\t\t\t\" x:\" + event.getX() +\n\t\t\t\t\t\"Touch duration:\"\n\t\t\t\t\t+ (event.getEventTime() - event\n\t\t\t\t\t\t\t.getHistoricalEventTime(0)) + \" size:\"\n\t\t\t\t\t\t\t+ event.getHistorySize()\n\t\t\t\t\t\t\t+ \"action:\"\n\t\t\t\t\t\t\t+ event.getAction());\n\t\t\tfor (int h = 0 ; h < event.getHistorySize() ; h ++){\n\n\t\t\t\tfor (int i = 0 ; i < event.getPointerCount() ; i++){\n\n\t\t\t\t\tLog.i(\"TouchLogger\",\n\t\t\t\t\t\t\t\" h \" \n\t\t\t\t\t\t\t+ h\n\t\t\t\t\t\t\t+ \" \"\n\t\t\t\t\t\t\t+ i\n\t\t\t\t\t\t\t+ \" \"\n\t\t\t\t\t\t\t+ event.getHistoricalEventTime(h)\n\t\t\t\t\t\t\t+ \" \"\n\t\t\t\t\t\t\t+ event.getHistoricalX(i,h)\n\t\t\t\t\t\t\t+ \" \"\n\t\t\t\t\t\t\t+ event.getHistoricalY(i,h)\n\t\t\t\t\t\t\t+ \" \"\n\t\t\t\t\t\t\t+ event.getHistoricalPressure(i,h)\n\t\t\t\t\t\t\t+ \" \"\n\t\t\t\t\t\t\t+ event.getHistoricalSize(i,h));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0 ; i < event.getPointerCount() ; i++){\n\t\t\tLog.i(\"TouchLogger\",\n\t\t\t\t\t\" current \" \n\t\t\t\t\t+ getActionName(event.getAction() & MotionEvent.ACTION_MASK)\n\t\t\t\t\t+ \" \"\n\t\t\t\t\t+ (event.getAction() & MotionEvent.ACTION_POINTER_ID_MASK)\n\t\t\t\t\t+ \" \"\n\t\t\t\t\t+ event.getEventTime()\n\t\t\t\t\t+ \" \"\n\t\t\t\t\t+ i\n\t\t\t\t\t+ \" \"\n\t\t\t\t\t+ event.getX(i)\n\t\t\t\t\t+ \" \"\n\t\t\t\t\t+ event.getY(i)\n\t\t\t\t\t+ \" \"\n\t\t\t\t\t+ event.getPressure(i)\n\t\t\t\t\t+ \" \"\n\t\t\t\t\t+ event.getSize(i));\n\t\t}\n\n\t\tmDurationLogger.end();\n\t}",
"void onTilt(int x, int y);",
"private void m87317a(MotionEvent motionEvent) {\n int actionIndex = motionEvent.getActionIndex();\n if (motionEvent.getPointerId(actionIndex) == this.f61230w) {\n int i = actionIndex == 0 ? 1 : 0;\n this.f61227t = motionEvent.getX(i);\n float y = motionEvent.getY(i);\n this.f61229v = y;\n this.f61228u = y;\n this.f61230w = motionEvent.getPointerId(i);\n }\n }",
"@Override\n public void onSensorChanged(SensorEvent event) {\n deltaX = Math.abs(lastX - event.values[0]);\n deltaY = Math.abs(lastY - event.values[1]);\n deltaZ = Math.abs(lastZ - event.values[2]);\n\n // if the change is below 5, it is just plain noise\n if (deltaX < 5)\n deltaX = 0;\n if (deltaY < 5)\n deltaY = 0;\n if (deltaZ < 5)\n deltaZ = 0;\n\n // set the last know values of x,y,z\n lastX = event.values[0];\n lastY = event.values[1];\n lastZ = event.values[2];\n\n vibrate();\n\n }",
"private void saveAccelerometerData(float acc_x, float acc_y, float acc_z, long timestamp){\n //Log.v(TAG, \"saveAccelerometerData:: acc_x: \"+acc_x+\" acc_y: \"+acc_y+\" acc_z: \"+acc_z);\n //SensorData sensorData = new SensorData(acc_x, acc_y, acc_z, Util.getTimeMillis(System.currentTimeMillis()));\n SensorData sensorData = new SensorData(acc_x, acc_y, acc_z, Util.getTimeMillis(timestamp));\n listAccelData.add(sensorData);\n }",
"public void onSensorChanged(SensorEvent event) {\n double x = event.values[0];\n double y = event.values[1];\n double z = event.values[2];\n\n final double alpha = 0.8; // constant for our filter below\n\n double[] gravity = {0,0,0};\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 x = event.values[0] - gravity[0];\n y = event.values[1] - gravity[1];\n z = event.values[2] - gravity[2];\n\n if (!mInitialized) {\n // sensor is used for the first time, initialize the last read values\n mLastX = x;\n mLastY = y;\n mLastZ = z;\n mInitialized = true;\n } else {\n // sensor is already initialized, and we have previously read values.\n // take difference of past and current values and decide which\n // axis acceleration was detected by comparing values\n\n double deltaX = Math.abs(mLastX - x);\n double deltaY = Math.abs(mLastY - y);\n double deltaZ = Math.abs(mLastZ - z);\n if (deltaX < NOISE)\n deltaX = (float) 0.0;\n if (deltaY < NOISE)\n deltaY = (float) 0.0;\n if (deltaZ < NOISE)\n deltaZ = (float) 0.0;\n mLastX = x;\n mLastY = y;\n mLastZ = z;\n\n if (deltaX > deltaY) {\n // Horizontal shake\n // do something here if you like\n } else if (deltaY > deltaX) {\n // Vertical shake\n // do something here if you like\n } else if ((deltaZ > deltaX) && (deltaZ > deltaY)) {\n // Z shake\n stepManager.ManualUpdateSharedPref();\n } else {\n // no shake detected\n }\n }\n }",
"public Orientation getOrientation(){return this.orientation;}",
"private void startOrientationSensor() {\n SensorManager sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n Sensor orientationSensor = sensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION);\n sensorManager.registerListener(this, orientationSensor, SensorManager.SENSOR_DELAY_UI);\n }",
"public interface AirboatSensor {\n\n\t// Get 3D raw gyro readings\n\tpublic double[] getGyro();\n}",
"@Override\n\t\tpublic void onAccelerometerData(Myo myo, long timestamp, Vector3 accel) {\n\t\t\tsuper.onAccelerometerData(myo, timestamp, accel);\n\t\t}",
"void composeTelemetry() {\n telemetry.addAction(new Runnable() {\n @Override\n public void run() {\n // Acquiring the angles is relatively expensive; we don't want\n // to do that in each of the three items that need that info, as that's\n // three times the necessary expense.\n angles = imu.getAngularOrientation().toAxesReference(AxesReference.INTRINSIC).toAxesOrder(AxesOrder.ZYX);\n gravity = imu.getGravity();\n }\n });\n\n telemetry.addLine()\n .addData(\"status\", new Func<String>() {\n @Override public String value() {\n return imu.getSystemStatus().toShortString();\n }\n })\n .addData(\"calib\", new Func<String>() {\n @Override\n public String value() {\n return imu.getCalibrationStatus().toString();\n }\n });\n\n telemetry.addLine()\n .addData(\"headingCorrectorLeft \", new Func<String>() {\n @Override public String value() {\n return formatDouble(headingCorrectorLeft);\n }\n })\n .addData(\"headingCorrectorRight \", new Func<String>() {\n @Override\n public String value() {\n return formatDouble(headingCorrectorRight);\n }\n });\n telemetry.addLine()\n .addData(\"currentHeading \", new Func<String>() {\n @Override public String value() {\n return formatDouble(currentHeading);\n }\n })\n .addData(\"diffFromStartHeading \", new Func<String>() {\n @Override\n public String value() {\n return formatDouble(diffFromStartHeading);\n }\n });\n telemetry.addLine()\n .addData(\"heading\", new Func<String>() {\n @Override\n public String value() {\n return formatAngle(angles.angleUnit, angles.firstAngle);\n }\n })\n .addData(\"roll\", new Func<String>() {\n @Override public String value() {\n return formatAngle(angles.angleUnit, angles.secondAngle);\n }\n })\n .addData(\"pitch\", new Func<String>() {\n @Override public String value() {\n return formatAngle(angles.angleUnit, angles.thirdAngle);\n }\n });\n telemetry.addLine()\n .addData(\"Light1 Raw\", new Func<String>() {\n @Override public String value() {\n return formatDouble(lightSensor1.getRawLightDetected());\n }\n })\n .addData(\"Normal\", new Func<String>() {\n @Override public String value() {\n return formatDouble(lightSensor1.getLightDetected());\n }\n });\n telemetry.addLine()\n .addData(\"Motor Power Left1\", new Func<String>() {\n @Override public String value() {\n return formatDegrees(motorLeft1Power);\n }\n })\n .addData(\"Left2\", new Func<String>() {\n @Override\n public String value() {\n return formatDouble(motorLeft2Power);\n }\n })\n .addData(\"Right1\", new Func<String>() {\n @Override\n public String value() {\n return formatDouble(motorRight1Power);\n }\n })\n .addData(\"Right2\", new Func<String>() {\n @Override\n public String value() {\n return formatDouble(motorRight2Power);\n }\n });\n telemetry.addLine()\n .addData(\"Position Left\", new Func<String>() {\n @Override\n public String value() {\n return formatDouble(positionLeft);\n }\n })\n .addData(\"Right\", new Func<String>() {\n @Override public String value() {\n return formatDouble(positionRight);\n }\n });\n telemetry.addLine()\n .addData(\"Control Count\", new Func<String>() {\n @Override public String value() {\n return formatDouble(count);\n }\n });\n telemetry.addLine()\n .addData(\"currentState\", new Func<String>() {\n @Override\n public String value() {\n return currentState.name();\n }\n });\n telemetry.addLine()\n .addData(\"nextState\", new Func<String>() {\n @Override\n public String value() {\n return nextState.name();\n }\n });\n }",
"@Override\n public void onSensorChanged(SensorEvent event) {\n Sensor sensor=event.sensor;\n mMeasure.setMesureX(event.values[0]);\n mMeasure.setMesureY(event.values[1]);\n mMeasure.setMesureZ(event.values[2]);\n switch(sensor.getType()){\n case Sensor.TYPE_ACCELEROMETER:\n mTextArea.getTextValue1().setText(\"X=\" + (double)Math.round(mMeasure.getMesureX() * 100) / 100);\n mTextArea.getTextValue2().setText(\"Y=\" + (double)Math.round(mMeasure.getMesureY() * 100) / 100);\n mTextArea.getTextValue3().setText(\"Z=\" + (double)Math.round(mMeasure.getMesureZ() * 100) / 100);\n System.out.println(\"\\n\");\n System.out.println(\"Acceleration measure\\n\");\n System.out.println(\"time of the new measured value= \"+event.timestamp+ \"\\n\"+\"x=\"+event.values[0]+\" y=\"+event.values[1]+\" z=\"+event.values[2]);\n System.out.println(\"\\n\");\n break;\n case Sensor.TYPE_MAGNETIC_FIELD:\n mTextArea.getTextValue1().setText(\"X=\" + (double)Math.round(mMeasure.getMesureX()* 100) / 100);\n mTextArea.getTextValue2().setText(\"Y=\" + (double)Math.round(mMeasure.getMesureY() * 100) / 100);\n mTextArea.getTextValue3().setText(\"Z=\" + (double)Math.round(mMeasure.getMesureZ() * 100) / 100);\n System.out.println(\"\\n\");\n System.out.println(\"Magnetic field measure\");\n System.out.println(\"time of the new measured value= \"+event.timestamp+ \"\\n\"+\"x=\"+event.values[0]+\" y=\"+event.values[1]+\" z=\"+event.values[2]);\n System.out.println(\"\\n\");\n break;\n case Sensor.TYPE_PROXIMITY:\n if (mMeasure.getMesureX()==0){\n mTextArea.getTextValue1().setText(\"Object detected\");\n mTextArea.getTextValue1().setBackgroundColor(Color.GREEN);\n } else {\n mTextArea.getTextValue1().setText(\"no object detected\");\n mTextArea.getTextValue1().setBackgroundColor(0xffffffff);\n }\n //mTextArea.getTextValue1().setText(\"\"+mMeasure.getMesureX());\n\n System.out.println(\"\\n\");\n System.out.println(\"Proximity measure\\n\");\n System.out.println(\"time of the new measured value= \"+event.timestamp+ \"\\n\"+\"x=\"+event.values[0]);\n System.out.println(\"\\n\");\n break;\n case Sensor.TYPE_LIGHT:\n mTextArea.getTextValue1().setText(\"\" + (double)Math.round(mMeasure.getMesureX() * 100) / 100);\n System.out.println(\"\\n\");\n System.out.println(\"Luminosity measure\\n\");\n System.out.println(\"time of the new measured value= \"+event.timestamp+ \"\\n\"+\"x=\"+event.values[0]);\n System.out.println(\"\\n\");\n }\n }",
"public void respondToGesture(String gesture) {\n String gest = gesture.substring(1, gesture.length() - 1);\n sysMsgTextView.setText(\"Gesture:\" + gest);\n\n // load model\n float[] leftInit;\n float[] rightInit;\n float[] finalpos;\n if (gest.equals(\"Nodding\")){\n ModelRenderable.builder()\n .setSource(this, R.raw.export_71)\n .build()\n .thenAccept(renderable -> model = renderable)\n .exceptionally(\n throwable -> {\n Toast toast =\n Toast.makeText(this, \"Unable to load andy renderable\", Toast.LENGTH_LONG);\n toast.setGravity(Gravity.CENTER, 0, 0);\n toast.show();\n return null;\n });\n finalpos = new float[]{0, 0, -2f};\n leftInit = new float[]{-0.5f, 0, -2f};\n rightInit = new float[]{0.3f, 0, -2f};\n } else {\n ModelRenderable.builder()\n .setSource(this, R.raw.thumbsup)\n .build()\n .thenAccept(renderable -> model = renderable)\n .exceptionally(\n throwable -> {\n Toast toast =\n Toast.makeText(this, \"Unable to load andy renderable\", Toast.LENGTH_LONG);\n toast.setGravity(Gravity.CENTER, 0, 0);\n toast.show();\n return null;\n });\n finalpos = new float[]{0, 0, -6f};\n leftInit = new float[]{-1.5f, 0, -6f};\n rightInit = new float[]{1f, 0, -6f};\n }\n\n float[] rotation = {0, 0, 0, 0};\n\n // get current frame and translate the initial coordinate to the current frame\n session = fragment.getArSceneView().getSession();\n try {\n frame = session.update();\n } catch (CameraNotAvailableException e) {\n e.printStackTrace();\n }\n Pose pose = frame.getAndroidSensorPose();\n if(targetScreenArea == \"LEFT\"){\n finalpos = pose.rotateVector(leftInit);\n } else if(targetScreenArea == \"RIGHT\"){\n finalpos = pose.rotateVector(rightInit);\n } else {\n finalpos = pose.rotateVector(finalpos);\n }\n\n Anchor anchor = session.createAnchor(new Pose(finalpos, rotation));\n anchorNode = new AnchorNode(anchor);\n anchorNode.setParent(fragment.getArSceneView().getScene());\n TransformableNode transformableNode = new TransformableNode(fragment.getTransformationSystem());\n transformableNode.setParent(anchorNode);\n fragment.getArSceneView().getScene().addChild(anchorNode);\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n transformableNode.setRenderable(model);\n transformableNode.select();\n }\n }, 1000);\n\n }",
"@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}",
"Motion getMotion6() {\n try {\n motion.ax = (float) readRegWord(MPU6050_RA_ACCEL_XOUT_H) * accelerometerCoef;\n motion.ay = (float) readRegWord(MPU6050_RA_ACCEL_YOUT_H) * accelerometerCoef;\n motion.az = (float) readRegWord(MPU6050_RA_ACCEL_ZOUT_H) * accelerometerCoef;\n motion.gx = (float) readRegWord(MPU6050_RA_GYRO_XOUT_H) * gyroscopeCoef;\n motion.gy = (float) readRegWord(MPU6050_RA_GYRO_YOUT_H) * gyroscopeCoef;\n motion.gz = (float) readRegWord(MPU6050_RA_GYRO_ZOUT_H) * gyroscopeCoef;\n return motion;\n } catch (IOException e) {\n throw new IllegalStateException(\"Could not read the accel/gyro readings.\", e);\n }\n }",
"public static PVector pointerTrasformations(PointerDevice p, float _x, float _y){\n\n\t\tdouble [][] matrix = p.hMatrix;\n\t\tPVector transformed = new PVector();\n\t\t//change x and y\n\t\ttransformed.x = (p.setYasX)? _y : _x; //toTarget\t\n\t\ttransformed.y = (p.setYasX)? _x : _y;\t //toTarget\n\n\t\t//System.out.println(\"in_p:\" + p.x + \";\" + p.y);\n\n\t\t//invert x or y (flip)\n\t\tif(p.invertX) transformed.x = flipX(transformed.x); //toTarget\n\t\tif(p.invertY) transformed.y = flipY(transformed.y); //toTarget\n\n\t\t//homographic plane\n\t\tif(p.enableHomography || forceHomographyOnCalibration){\n\t\t\t//PVector h = toHomography(new PVector(p.x, p.y), i);\n\t\t\tPVector h = toHomography(transformed,matrix); //toTarget\n\t\t\ttransformed.set(h); //toTarget\n\t\t}else{\n\t\t\t//if(i == 0) System.out.println(\"in _y:\" + _y);\n\t\t\tp.target.x = toServos(fromScreen( transformed)).x; //no need to use copy() because toServo breaks pvector instance. //toTarget\n\t\t\tp.target.y = toServos(fromScreen( transformed)).y; //toTarget\n\t\t\t//if(i == 0) System.out.println(\"out _y:\" + _y);\n\t\t}\n\n\t\treturn transformed;\n\t}",
"public void updateData() {\n List<Device> devices = Lists.newArrayList();\n CustomAdapter customAdapter = (CustomAdapter) deviceListView.getAdapter();\n for (int i = 0; i < customAdapter.getCount(); i++) {\n Model model = customAdapter.getItem(i);\n if (model.isChecked()) {\n devices.add(model.getDevice());\n }\n }\n\n SensorDao sensorDao = new SensorDao(parentActivity);\n Map<Device, List<Sensor>> sensorDeviceMap = sensorDao.fetchDeviceSpecificSensors(devices);\n\n // Aggregate the information about sensor and devices based on unique\n // Map<BluetoothDevice, Map<FileName, List<SensorLabels>>>\n Map<BluetoothDevice, Map<String, List<String>>> rearrangedSensorDeviceInfo = Maps.newHashMap();\n for (Map.Entry<Device, List<Sensor>> elem : sensorDeviceMap.entrySet()) {\n Device device = elem.getKey();\n BluetoothDevice bluetoothDevice = CommonUtils.getBluetoothAdapter(\n parentActivity, REQUEST_BT_ENABLE).getRemoteDevice(device.getDeviceId());\n Map<String, List<String>> fileNameSensorNameMap = rearrangedSensorDeviceInfo.get(bluetoothDevice);\n List<Sensor> sensors = elem.getValue();\n\n if (fileNameSensorNameMap == null) {\n fileNameSensorNameMap = Maps.newHashMap();\n rearrangedSensorDeviceInfo.put(bluetoothDevice, fileNameSensorNameMap);\n }\n\n for(Sensor sensor : sensors) {\n String dataFilePath = sensor.getSensorDataFilePath();\n String sensorName = sensor.getSensorLabel();\n List<String> sensorNames = fileNameSensorNameMap.get(dataFilePath);\n if (sensorNames == null) {\n fileNameSensorNameMap.put(dataFilePath, Lists.newArrayList(sensorName));\n } else {\n sensorNames.add(sensorName);\n }\n }\n }\n\n IntentFilter intentFilter = new IntentFilter();\n intentFilter.addAction(ServerActionsService.ACTION_TRANSFER_FILE_AND_INSERT_DATA_STARTED);\n intentFilter.addAction(ServerActionsService.ACTION_TRANSFER_FILE_AND_INSERT_DATA_FINISHED);\n intentFilter.addAction(ServerActionsService.ACTION_TRANSFER_FILE_AND_INSERT_DATA_ENDED);\n intentFilter.addAction(ServerActionsService.ACTION_TRANSFER_FILE_AND_INSERT_DATA_INITIATED);\n parentActivity.registerReceiver(broadcastReceiver, intentFilter);\n\n //Start service for every device.\n for (Map.Entry<BluetoothDevice, Map<String, List<String>>> elem : rearrangedSensorDeviceInfo.entrySet()) {\n BluetoothDevice device = elem.getKey();\n Map<String, List<String>> fileNameSensorsMap = elem.getValue();\n if (fileNameSensorsMap.size() > 0) {\n Bundle bundle = new Bundle();\n bundle.putParcelable(ServerActionsService.PARAM_BLUETOOTH_DEVICE, device);\n bundle.putSerializable(PARAM_FILENAME_SENSOR_INFO, (Serializable) fileNameSensorsMap);\n\n Intent intent = new Intent(parentActivity, ServerActionsService.class);\n intent.setAction(ServerActionsService.ACTION_TRANSFER_FILE_AND_INSERT_DATA);\n intent.putExtras(bundle);\n\n parentActivity.startService(intent);\n }\n }\n }",
"public void onUpdate() {\n/* 89 */ this.lastTickPosX = this.posX;\n/* 90 */ this.lastTickPosY = this.posY;\n/* 91 */ this.lastTickPosZ = this.posZ;\n/* 92 */ super.onUpdate();\n/* 93 */ this.motionX *= 1.15D;\n/* 94 */ this.motionZ *= 1.15D;\n/* 95 */ this.motionY += 0.04D;\n/* 96 */ moveEntity(this.motionX, this.motionY, this.motionZ);\n/* 97 */ float var1 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);\n/* 98 */ this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);\n/* */ \n/* 100 */ for (this.rotationPitch = (float)(Math.atan2(this.motionY, var1) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F);\n/* */ \n/* */ \n/* */ \n/* */ \n/* 105 */ while (this.rotationPitch - this.prevRotationPitch >= 180.0F)\n/* */ {\n/* 107 */ this.prevRotationPitch += 360.0F;\n/* */ }\n/* */ \n/* 110 */ while (this.rotationYaw - this.prevRotationYaw < -180.0F)\n/* */ {\n/* 112 */ this.prevRotationYaw -= 360.0F;\n/* */ }\n/* */ \n/* 115 */ while (this.rotationYaw - this.prevRotationYaw >= 180.0F)\n/* */ {\n/* 117 */ this.prevRotationYaw += 360.0F;\n/* */ }\n/* */ \n/* 120 */ this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F;\n/* 121 */ this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F;\n/* */ \n/* 123 */ if (this.fireworkAge == 0 && !isSlient())\n/* */ {\n/* 125 */ this.worldObj.playSoundAtEntity(this, \"fireworks.launch\", 3.0F, 1.0F);\n/* */ }\n/* */ \n/* 128 */ this.fireworkAge++;\n/* */ \n/* 130 */ if (this.worldObj.isRemote && this.fireworkAge % 2 < 2)\n/* */ {\n/* 132 */ this.worldObj.spawnParticle(EnumParticleTypes.FIREWORKS_SPARK, this.posX, this.posY - 0.3D, this.posZ, this.rand.nextGaussian() * 0.05D, -this.motionY * 0.5D, this.rand.nextGaussian() * 0.05D, new int[0]);\n/* */ }\n/* */ \n/* 135 */ if (!this.worldObj.isRemote && this.fireworkAge > this.lifetime) {\n/* */ \n/* 137 */ this.worldObj.setEntityState(this, (byte)17);\n/* 138 */ setDead();\n/* */ } \n/* */ }",
"public void onSensorChanged(SensorEvent event) {\n if (event.sensor.getType() != Sensor.TYPE_ACCELEROMETER && event.sensor.getType() != Sensor.TYPE_GYROSCOPE)\n return;\n\n if(event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n sensorCount++;\n\n if (sensorFirstRead) {\n nanotime = System.nanoTime();\n sensorFirstRead = false;\n } else {\n\n if (sensorCount > 0 && sensorCount % 10 == 0) {\n differenceNanoTime = System.nanoTime() - nanotime;\n if (differenceNanoTime > sensorCounterIntervalDelay) {\n differenceSeconds = (double) differenceNanoTime / 1000000000f;\n\n sensorAverageCount = sensorCount / differenceSeconds;\n sensorAverageCountTextView.setText(String.format(\"Read/s: %.2f\", sensorAverageCount));\n\n if (sensorFirstAverageCycle || Math.abs(sensorAverageCount - accValuesLimit * 2) > accValuesLimit * 0.2) {\n if (sensorFirstAverageCycle)\n sensorFirstAverageCycle = false;\n\n accValuesLimit = (int) sensorAverageCount / 2;\n gyroValuesLimit = accValuesLimit / 2;\n sensorCountLimitTextView.setText(String.format(\"Sensor count limit: %d\", accValuesLimit));\n\n stats.get(\"accX\").setLimit(accValuesLimit);\n stats.get(\"accY\").setLimit(accValuesLimit);\n stats.get(\"accZ\").setLimit(accValuesLimit);\n stats.get(\"accDegreeZ\").setLimit(accValuesLimit);\n stats.get(\"accDegreeX\").setLimit(accValuesLimit);\n stats.get(\"accDegreeY\").setLimit(accValuesLimit);\n stats.get(\"accTotalAcceleration\").setLimit(accValuesLimit);\n stats.put(\"gyroX\", new StatisticList(gyroValuesLimit));\n stats.put(\"gyroY\", new StatisticList(gyroValuesLimit));\n stats.put(\"gyroZ\", new StatisticList(gyroValuesLimit));\n }\n\n sensorCount = 0;\n nanotime = System.nanoTime();\n }\n }\n }\n }\n\n if(event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n\n mAccelerometerSensorX = event.values[0];\n mAccelerometerSensorY = event.values[1];\n mAccelerometerSensorZ = event.values[2];\n\n mAccelerometerTotalAcceleration = Math.sqrt(Math.pow(mAccelerometerSensorX, 2) + Math.pow(mAccelerometerSensorY, 2) + Math.pow(mAccelerometerSensorZ, 2));\n\n stats.get(\"accX\").addValue(mAccelerometerSensorX);\n stats.get(\"accY\").addValue(mAccelerometerSensorY);\n stats.get(\"accZ\").addValue(mAccelerometerSensorZ);\n stats.get(\"accTotalAcceleration\").addValue(mAccelerometerTotalAcceleration);\n\n tmp_y = stats.get(\"accY\").getAverage() / stats.get(\"accTotalAcceleration\").getAverage(); // g\n tmp_x = stats.get(\"accX\").getAverage() / stats.get(\"accTotalAcceleration\").getAverage();\n tmp_z = stats.get(\"accZ\").getAverage() / stats.get(\"accTotalAcceleration\").getAverage();\n\n mRotationDegreeZ = Math.asin(tmp_x) * 180 / Math.PI;\n if (Double.isNaN(mRotationDegreeZ))\n mRotationDegreeZ = stats.get(\"accDegreeZ\").getAverage() > 0 ? 90 : -90;\n\n mRotationDegreeX = Math.asin(tmp_z) * 180 / Math.PI;\n if (Double.isNaN(mRotationDegreeX))\n mRotationDegreeX = stats.get(\"accDegreeX\").getAverage() > 0 ? 90 : -90;\n\n mRotationDegreeY = Math.asin(tmp_y) * 180 / Math.PI;\n if (Double.isNaN(mRotationDegreeY))\n mRotationDegreeY = stats.get(\"accDegreeY\").getAverage() > 0 ? 90 : -90;\n\n stats.get(\"accDegreeZ\").addValue(mRotationDegreeZ);\n stats.get(\"accDegreeX\").addValue(mRotationDegreeX);\n stats.get(\"accDegreeY\").addValue(mRotationDegreeY);\n\n updateLog(Sensor.TYPE_ACCELEROMETER);\n }\n else\n if(event.sensor.getType()==Sensor.TYPE_GYROSCOPE)\n {\n mGyroX = event.values[0];\n mGyroY = event.values[1];\n mGyroZ = event.values[2];\n\n stats.get(\"gyroX\").addValue(mGyroX);\n stats.get(\"gyroY\").addValue(mGyroY);\n stats.get(\"gyroZ\").addValue(mGyroZ);\n\n updateLog(Sensor.TYPE_GYROSCOPE);\n }\n }",
"@Override\r\n\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\r\n\t\tax = - event.values[0] / 7;\r\n\t\tay = event.values[1] / 7;\r\n\t}",
"@Override\n public void onSensorChanged(SensorEvent event) {\n textView.setText(event.values[0]+\"\\n\"+event.values[1]+\"\\n\"+event.values[2]);\n\n }",
"void updateMotion(boolean altitudeLock)\n {\n \n ascendDescendLift:\n {\n // as pitch and roll increases, lift decreases by fall-off function.\n\t // thrust.y ranges from 0 to 1. at 1, almost perfectly balances gravity\n\t \n //thrust.y = MathHelper.cos(pitchRad) * MathHelper.cos(rollRad);\n thrust.y = MathHelper.cos(pitchRad) * MathHelper.cos(rollRad) * MathHelper.cos(rollRad);\n }\n\n forwardBack:\n {\n // as pitch increases, forward-back motion increases\n // but sin function was too touchy so using 1-cos\n float accel = 1f - MathHelper.cos(pitchRad);\n if (pitchRad > 0f) accel *= -1f;\n \n thrust.x = -fwd.x * accel;\n thrust.z = -fwd.z * accel;\n \n // also adjust y in addition to ascend/descend to simulate diving\n thrust.y += -fwd.y * accel * .3f;\n }\n\n strafeLeftRight:\n {\n // float strafe = -MathHelper.sin(roll);\n float strafe = 1f - MathHelper.cos(rollRad);\n if (rollRad > 0f) strafe *= -1f;\n\n // use perp of yaw and scale by roll\n thrust.x -= fwd.z * strafe;\n thrust.z += fwd.x * strafe;\n }\n\n // start with current velocity\n velocity.set((float)motionX, (float)motionY, (float)motionZ);\n\n // friction, very little!\n velocity.scale(FRICTION);\n\n // scale thrust by current throttle and delta time\n //thrust.normalize().scale(MAX_ACCEL * (1f + throttle) * deltaTime / .05f);\n thrust.normalize().scale(MAX_ACCEL * (1f + throttle) * deltaTime / .05f);\n\n // apply the thrust\n Vector3.add(velocity, thrust, velocity);\n\n // gravity is always straight down\n //if (!inWater && !onGround) velocity.y -= GRAVITY * deltaTime / .05f;\n velocity.y -= GRAVITY * deltaTime / .05f;\n\n // limit max velocity\n if (velocity.lengthSquared() > MAX_VELOCITY * MAX_VELOCITY)\n {\n velocity.scale(MAX_VELOCITY / velocity.length());\n }\n\n // apply velocity changes\n motionX = (double) velocity.x;\n motionY = (double) velocity.y;\n motionZ = (double) velocity.z;\n \n if (altitudeLock && riddenByEntity != null)\n {\n motionY *= .9;\n if (motionY < .00001) motionY = .0;\n }\n \n moveEntity(motionX, motionY, motionZ);\n }",
"public boolean onInterceptTouchEvent(android.view.MotionEvent r16) {\n /*\n r15 = this;\n r6 = r15\n r7 = r16\n int r0 = r16.getAction()\n r0 = r0 & 255(0xff, float:3.57E-43)\n r1 = -1\n r8 = 0\n r2 = 3\n if (r0 == r2) goto L_0x0119\n r9 = 1\n if (r0 != r9) goto L_0x0013\n goto L_0x0119\n L_0x0013:\n if (r0 == 0) goto L_0x001f\n boolean r2 = r6.mIsBeingDragged\n if (r2 == 0) goto L_0x001a\n return r9\n L_0x001a:\n boolean r2 = r6.mIsUnableToDrag\n if (r2 == 0) goto L_0x001f\n return r8\n L_0x001f:\n r2 = 2\n if (r0 == 0) goto L_0x00b9\n if (r0 == r2) goto L_0x002e\n r1 = 6\n if (r0 == r1) goto L_0x0029\n goto L_0x0107\n L_0x0029:\n r15.onSecondaryPointerUp(r16)\n goto L_0x0107\n L_0x002e:\n int r0 = r6.mActivePointerId\n if (r0 == r1) goto L_0x0107\n int r0 = android.support.v4.view.MotionEventCompat.findPointerIndex(r7, r0)\n float r10 = android.support.v4.view.MotionEventCompat.getX(r7, r0)\n float r1 = r6.mLastMotionX\n float r1 = r10 - r1\n float r11 = java.lang.Math.abs(r1)\n float r12 = android.support.v4.view.MotionEventCompat.getY(r7, r0)\n float r0 = r6.mInitialMotionY\n float r0 = r12 - r0\n float r13 = java.lang.Math.abs(r0)\n r0 = 0\n int r14 = (r1 > r0 ? 1 : (r1 == r0 ? 0 : -1))\n if (r14 == 0) goto L_0x0067\n float r0 = r6.mLastMotionX\n boolean r0 = r6.isGutterDrag(r0, r1)\n if (r0 != 0) goto L_0x0067\n r2 = 0\n int r3 = (int) r1\n int r4 = (int) r10\n int r5 = (int) r12\n r0 = r6\n r1 = r6\n boolean r0 = r0.canScroll(r1, r2, r3, r4, r5)\n if (r0 != 0) goto L_0x006d\n L_0x0067:\n boolean r0 = r6.canSelfScroll()\n if (r0 != 0) goto L_0x0074\n L_0x006d:\n r6.mLastMotionX = r10\n r6.mLastMotionY = r12\n r6.mIsUnableToDrag = r9\n return r8\n L_0x0074:\n int r0 = r6.mTouchSlop\n float r0 = (float) r0\n int r0 = (r11 > r0 ? 1 : (r11 == r0 ? 0 : -1))\n if (r0 <= 0) goto L_0x00a2\n r0 = 1056964608(0x3f000000, float:0.5)\n float r11 = r11 * r0\n int r0 = (r11 > r13 ? 1 : (r11 == r13 ? 0 : -1))\n if (r0 <= 0) goto L_0x00a2\n r6.mIsBeingDragged = r9\n r6.requestParentDisallowInterceptTouchEvent(r9)\n r6.setScrollState(r9)\n if (r14 <= 0) goto L_0x0094\n float r0 = r6.mInitialMotionX\n int r1 = r6.mTouchSlop\n float r1 = (float) r1\n float r0 = r0 + r1\n goto L_0x009a\n L_0x0094:\n float r0 = r6.mInitialMotionX\n int r1 = r6.mTouchSlop\n float r1 = (float) r1\n float r0 = r0 - r1\n L_0x009a:\n r6.mLastMotionX = r0\n r6.mLastMotionY = r12\n r6.setScrollingCacheEnabled(r9)\n goto L_0x00ab\n L_0x00a2:\n int r0 = r6.mTouchSlop\n float r0 = (float) r0\n int r0 = (r13 > r0 ? 1 : (r13 == r0 ? 0 : -1))\n if (r0 <= 0) goto L_0x00ab\n r6.mIsUnableToDrag = r9\n L_0x00ab:\n boolean r0 = r6.mIsBeingDragged\n if (r0 == 0) goto L_0x0107\n boolean r0 = r6.performDrag(r10)\n if (r0 == 0) goto L_0x0107\n android.support.v4.view.ViewCompat.postInvalidateOnAnimation(r6)\n goto L_0x0107\n L_0x00b9:\n float r0 = r16.getX()\n r6.mInitialMotionX = r0\n r6.mLastMotionX = r0\n float r0 = r16.getY()\n r6.mInitialMotionY = r0\n r6.mLastMotionY = r0\n int r0 = android.support.v4.view.MotionEventCompat.getPointerId(r7, r8)\n r6.mActivePointerId = r0\n r6.mIsUnableToDrag = r8\n android.widget.Scroller r0 = r6.mScroller\n r0.computeScrollOffset()\n int r0 = r6.mScrollState\n if (r0 != r2) goto L_0x0102\n android.widget.Scroller r0 = r6.mScroller\n int r0 = r0.getFinalX()\n android.widget.Scroller r1 = r6.mScroller\n int r1 = r1.getCurrX()\n int r0 = r0 - r1\n int r0 = java.lang.Math.abs(r0)\n int r1 = r6.mCloseEnough\n if (r0 <= r1) goto L_0x0102\n android.widget.Scroller r0 = r6.mScroller\n r0.abortAnimation()\n r6.mPopulatePending = r8\n r6.populate()\n r6.mIsBeingDragged = r9\n r6.requestParentDisallowInterceptTouchEvent(r9)\n r6.setScrollState(r9)\n goto L_0x0107\n L_0x0102:\n r6.completeScroll(r8)\n r6.mIsBeingDragged = r8\n L_0x0107:\n android.view.VelocityTracker r0 = r6.mVelocityTracker\n if (r0 != 0) goto L_0x0111\n android.view.VelocityTracker r0 = android.view.VelocityTracker.obtain()\n r6.mVelocityTracker = r0\n L_0x0111:\n android.view.VelocityTracker r0 = r6.mVelocityTracker\n r0.addMovement(r7)\n boolean r0 = r6.mIsBeingDragged\n return r0\n L_0x0119:\n r6.mIsBeingDragged = r8\n r6.mIsUnableToDrag = r8\n r6.mActivePointerId = r1\n android.view.VelocityTracker r0 = r6.mVelocityTracker\n if (r0 == 0) goto L_0x012b\n android.view.VelocityTracker r0 = r6.mVelocityTracker\n r0.recycle()\n r0 = 0\n r6.mVelocityTracker = r0\n L_0x012b:\n return r8\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.autonavi.map.widget.RecyclableViewPager.onInterceptTouchEvent(android.view.MotionEvent):boolean\");\n }",
"protected void useDataOld() {\n\t\tfloat x = values[0];\n\t\tfloat y = values[1];\n\t\tfloat z = values[2];\n\n\t\tcallListener(new AccelarationSensorData(millis, nanos, x, y, z));\n\t}",
"Sensor getSensor();",
"@Override\r\n public final void onSensorChanged(SensorEvent event) {\n double a0 = (double) event.values[0];\r\n double a1 = (double) event.values[1];\r\n double a2 = (double) event.values[2];\r\n\r\n double a = sqrt(a0*a0+a1*a1+a2*a2);\r\n\r\n // Do something with this sensor value.\r\n\r\n TextView textView = (TextView) findViewById(R.id.text_box2);\r\n textView.setText(Double.toString(a));\r\n\r\n if(count<size_accels) {\r\n accelerations[count] = a;\r\n times[count] = event.timestamp;\r\n }\r\n count = count + 1;\r\n }",
"private void processAccelerometerData(SensorEvent event) {\n //interval between two data entry should be min SENSOR_DATA_MIN_INTERVAL\n if ((event.timestamp - lastUpdateAccel) < SENSOR_DATA_MIN_INTERVAL_NANOS) {\n return;\n }\n\n float[] values = event.values;\n // Movement\n float x = values[0];\n float y = values[1];\n float z = values[2];\n\n //float accelationSquareRoot = (x * x + y * y + z * z)\n // / (SensorManager.GRAVITY_EARTH * SensorManager.GRAVITY_EARTH);\n\n //if (accelationSquareRoot >= EPSILON_ACC){\n\n lastUpdateAccel = event.timestamp;\n long timestamp = Util.getStartTime() + event.timestamp/Const.NANOS_TO_MILLIS;\n saveAccelerometerData(x, y, z, timestamp);\n //}\n }",
"@Override\n public boolean onTouchEvent(MotionEvent e) {\n\n float x = e.getX();\n float y = e.getY();\n\n switch (e.getAction()) {\n case MotionEvent.ACTION_DOWN:\n //erwanGLRenderer.startRotating(x,y);\n break;\n case MotionEvent.ACTION_UP:\n //erwanGLRenderer.stopRotating();\n break;\n case MotionEvent.ACTION_MOVE:\n //erwanGLRenderer.updateRotation(x,y);\n break;\n }\n return true;\n }",
"DeviceSensor createDeviceSensor();"
]
| [
"0.5703029",
"0.56325877",
"0.5528251",
"0.5491705",
"0.54888374",
"0.54372734",
"0.5376504",
"0.5301276",
"0.5203099",
"0.5194837",
"0.51909417",
"0.51697516",
"0.51623935",
"0.5122836",
"0.5122262",
"0.5094352",
"0.5088586",
"0.50880474",
"0.5055709",
"0.5017048",
"0.49642614",
"0.49517295",
"0.4948873",
"0.49299583",
"0.4910329",
"0.48946002",
"0.48742455",
"0.48727345",
"0.48682892",
"0.4865749",
"0.4862939",
"0.4849987",
"0.48352557",
"0.48188022",
"0.48105404",
"0.4808274",
"0.48028424",
"0.48020357",
"0.47965425",
"0.47714713",
"0.47685575",
"0.476754",
"0.47620177",
"0.47562224",
"0.47495013",
"0.47447523",
"0.47248486",
"0.46870366",
"0.46778154",
"0.4662931",
"0.4651655",
"0.46503145",
"0.4644847",
"0.46272704",
"0.46129623",
"0.46023968",
"0.46008915",
"0.45960617",
"0.45872465",
"0.45862037",
"0.45803723",
"0.45724204",
"0.45701948",
"0.45546845",
"0.4542186",
"0.45408267",
"0.4536713",
"0.45348203",
"0.45203817",
"0.45200503",
"0.45032203",
"0.44832858",
"0.44823188",
"0.44790122",
"0.44655326",
"0.44624454",
"0.44590682",
"0.44557407",
"0.44529468",
"0.44464272",
"0.44394398",
"0.4436261",
"0.44313133",
"0.44312778",
"0.44181246",
"0.4408339",
"0.440772",
"0.44076285",
"0.44050622",
"0.439784",
"0.43958756",
"0.4395132",
"0.43944246",
"0.43840513",
"0.43755472",
"0.4371821",
"0.43683845",
"0.4356976",
"0.43532965",
"0.43454638"
]
| 0.445113 | 79 |
Adjusts the GL camera's rotation based on device rotation. Runs on the sensor thread. | @BinderThread
public synchronized void setDeviceOrientation(float[] matrix, float deviceRoll) {
System.arraycopy(matrix, 0, deviceOrientationMatrix, 0, deviceOrientationMatrix.length);
this.deviceRoll = -deviceRoll;
updatePitchMatrix();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void updateOrientationAngles() {\n // Update rotation matrix, which is needed to update orientation angles.\n //mSensorManager.getRotationMatrix(mRotationMatrix, null,\n // mAccelerometerReading, mMagnetometerReading);\n\n // \"mRotationMatrix\" now has up-to-date information.\n\n mSensorManager.getOrientation(mRotationMatrix, mOrientationAngles);\n\n // \"mOrientationAngles\" now has up-to-date information.\n\n mGLView.updateScene(mOrientationAngles[0],mOrientationAngles[1],mOrientationAngles[2]);\n }",
"public void setDeviceRotation(int rotation);",
"private void updateTransform() {\n Matrix matrix = new Matrix();\n float centerX = dataBinding.viewFinder.getWidth() / 2f;\n float centerY = dataBinding.viewFinder.getHeight() / 2f;\n int rotation = dataBinding.viewFinder.getDisplay().getRotation();\n int rotationDegrees = 0;\n switch (rotation) {\n case Surface.ROTATION_0:\n rotationDegrees = 0;\n break;\n case Surface.ROTATION_90:\n rotationDegrees = 90;\n break;\n case Surface.ROTATION_180:\n rotationDegrees = 180;\n break;\n case Surface.ROTATION_270:\n rotationDegrees = 270;\n break;\n default:\n }\n matrix.postRotate(-rotationDegrees, centerX, centerY);\n }",
"@Override\n\t\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\t float[] rotationMatrix;\n\t\t\t rotationMatrix = new float[16];\n\t SensorManager.getRotationMatrixFromVector(rotationMatrix,\n\t event.values);\n\t determineOrientation(rotationMatrix);\n\t\t\t\n\t\t}",
"private void setRotation()\n\t{\n\t\tGL11.glPushMatrix();\n\t\tGL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);\n\t}",
"@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}",
"public int getCameraSensorRotation();",
"public void updateOrientationAngles() {\n SensorManager.getRotationMatrix(rotationMatrix, null,\n accelerometerReading, magnetometerReading);\n\n // \"mRotationMatrix\" now has up-to-date information.\n\n float[] angles = SensorManager.getOrientation(rotationMatrix, orientationAngles);\n azimuth = (float) Math.toDegrees(angles[0]);\n // \"mOrientationAngles\" now has up-to-date information.\n TextView az = findViewById(R.id.az);\n rotateDriver(azimuth);\n\n az.setText(Float.toString(azimuth));\n }",
"private void setupCamera(GL gl) {\r\n\t\tgl.glMatrixMode(GL.GL_MODELVIEW);\r\n\t\t// If there's a rotation to make, do it before everything else\r\n\t\tgl.glLoadIdentity();\r\n if (rotationMatrix == null) {\r\n\t\t\trotationMatrix = new double[16];\r\n\t\t\tgl.glGetDoublev(GL.GL_MODELVIEW, rotationMatrix, 0);\r\n\t\t}\r\n\t\tif (nextRotationAxis != null) {\r\n\t\t\tgl.glRotated(nextRotationAngle, nextRotationAxis.x, nextRotationAxis.y, nextRotationAxis.z);\r\n\t\t\tnextRotationAngle = 0;\r\n\t\t\tnextRotationAxis = null;\r\n\t\t}\r\n\t\tgl.glMultMatrixd(rotationMatrix, 0);\r\n\t\tgl.glGetDoublev(GL.GL_MODELVIEW, rotationMatrix, 0);\r\n\t\t// Move the objects according to the camera (instead of moving the camera)\r\n\t\tif (zoom != 0) {\r\n\t\t\tdouble[] oldMatrix = new double[16];\r\n\t\t\tgl.glGetDoublev(GL.GL_MODELVIEW, oldMatrix, 0);\r\n\t\t\tgl.glLoadIdentity();\r\n\t\t\tgl.glTranslated(0, 0, zoom);\r\n\t\t\tgl.glMultMatrixd(oldMatrix, 0);\r\n\t\t}\r\n\t}",
"private void updateRotation(float[] rotationVector) {\n // Get rotation's based on vector locations\n getRotationMatrixFromVector(mRotationMatrix, rotationVector);\n\n final int worldAxisForDeviceAxisX;\n final int worldAxisForDeviceAxisY;\n\n // Remap the axes as if the device screen was the instrument panel, and adjust the rotation\n // matrix for the device orientation.\n switch (mWindowManager.getDefaultDisplay().getRotation()) {\n case Surface.ROTATION_0:\n default:\n worldAxisForDeviceAxisX = SensorManager.AXIS_X;\n worldAxisForDeviceAxisY = SensorManager.AXIS_Z;\n break;\n case Surface.ROTATION_90:\n worldAxisForDeviceAxisX = SensorManager.AXIS_Z;\n worldAxisForDeviceAxisY = SensorManager.AXIS_MINUS_X;\n break;\n case Surface.ROTATION_180:\n worldAxisForDeviceAxisX = SensorManager.AXIS_MINUS_X;\n worldAxisForDeviceAxisY = SensorManager.AXIS_MINUS_Z;\n break;\n case Surface.ROTATION_270:\n worldAxisForDeviceAxisX = SensorManager.AXIS_MINUS_Z;\n worldAxisForDeviceAxisY = SensorManager.AXIS_X;\n break;\n }\n\n remapCoordinateSystem(\n mRotationMatrix,\n worldAxisForDeviceAxisX,\n worldAxisForDeviceAxisY,\n mAdjustedRotationMatrix);\n\n // Transform rotation matrix into azimuth/pitch/roll\n getOrientation(mAdjustedRotationMatrix, mOrientation);\n\n // Convert radians to degrees and flat\n float newX = (float) Math.toDegrees(mOrientation[1]);\n float newZ = (float) Math.toDegrees(mOrientation[0]);\n\n // How many degrees has the users head rotated since last time.\n float deltaX = applyThreshold(angularRounding(newX - mOldX));\n float deltaZ = applyThreshold(angularRounding(newZ - mOldZ));\n\n // Ignore first head position in order to find base line\n if (!mInitialized) {\n mInitialized = true;\n deltaX = 0;\n deltaZ = 0;\n }\n\n mOldX = newX;\n mOldZ = newZ;\n\n mListener.onTilt((int) deltaZ * 60, (int) deltaX * 60);\n }",
"@Override\n public void onRotationChanged(int rotation) {\n stateHandler.postDelayed(new Runnable() {\n @Override\n public void run() {\n rotationChanged();\n }\n }, ROTATION_LISTENER_DELAY_MS);\n }",
"protected void updatePreviewDisplayRotation(Size previewSize, TextureView textureView) {\n int rotationDegrees = 0;\n MCameraActivity activity = mCameraActivity;\n int displayRotation = activity.getWindowManager().getDefaultDisplay().getRotation();\n Configuration config = activity.getResources().getConfiguration();\n // Get UI display rotation\n switch (displayRotation) {\n case Surface.ROTATION_0:\n rotationDegrees = 0;\n break;\n case Surface.ROTATION_90:\n rotationDegrees = 90;\n break;\n case Surface.ROTATION_180:\n rotationDegrees = 180;\n break;\n case Surface.ROTATION_270:\n rotationDegrees = 270;\n break;\n }\n // Get device natural orientation\n int deviceOrientation = Configuration.ORIENTATION_PORTRAIT;\n if ((rotationDegrees % 180 == 0 &&\n config.orientation == Configuration.ORIENTATION_LANDSCAPE) ||\n ((rotationDegrees % 180 != 0 &&\n config.orientation == Configuration.ORIENTATION_PORTRAIT))) {\n deviceOrientation = Configuration.ORIENTATION_LANDSCAPE;\n }\n // Rotate the buffer dimensions if device orientation is portrait.\n int effectiveWidth = previewSize.getWidth();\n int effectiveHeight = previewSize.getHeight();\n if (deviceOrientation == Configuration.ORIENTATION_PORTRAIT) {\n effectiveWidth = previewSize.getHeight();\n effectiveHeight = previewSize.getWidth();\n }\n // Find and center view rect and buffer rect\n Matrix transformMatrix = textureView.getTransform(null);\n int viewWidth = textureView.getWidth();\n int viewHeight = textureView.getHeight();\n RectF viewRect = new RectF(0, 0, viewWidth, viewHeight);\n RectF bufRect = new RectF(0, 0, effectiveWidth, effectiveHeight);\n float centerX = viewRect.centerX();\n float centerY = viewRect.centerY();\n bufRect.offset(centerX - bufRect.centerX(), centerY - bufRect.centerY());\n // Undo ScaleToFit.FILL done by the surface\n transformMatrix.setRectToRect(viewRect, bufRect, Matrix.ScaleToFit.FILL);\n // Rotate buffer contents to proper orientation\n transformMatrix.postRotate((360 - rotationDegrees) % 360, centerX, centerY);\n if ((rotationDegrees % 180) == 90) {\n int temp = effectiveWidth;\n effectiveWidth = effectiveHeight;\n effectiveHeight = temp;\n }\n // Scale to fit view, cropping the longest dimension\n float scale =\n Math.max(viewWidth / (float) effectiveWidth, viewHeight / (float) effectiveHeight);\n transformMatrix.postScale(scale, scale, centerX, centerY);\n Handler handler = new Handler(Looper.getMainLooper());\n class TransformUpdater implements Runnable {\n TextureView mView;\n Matrix mTransformMatrix;\n\n TransformUpdater(TextureView view, Matrix matrix) {\n mView = view;\n mTransformMatrix = matrix;\n }\n\n @Override\n public void run() {\n mView.setTransform(mTransformMatrix);\n }\n }\n handler.post(new TransformUpdater(textureView, transformMatrix));\n }",
"public void onSensorChanged(SensorEvent event) {\n switch (event.sensor.getType()) {\n case Sensor.TYPE_ACCELEROMETER:\n acceleration_vals = event.values.clone();\n break;\n case Sensor.TYPE_MAGNETIC_FIELD:\n magnetic_vals = event.values.clone();\n break;\n }\n \n \n // If we have all the necessary data, update the orientation.\n if (acceleration_vals != null && magnetic_vals != null) {\n float[] R = new float[16];\n float[] I = new float[16];\n \n SensorManager.getRotationMatrix(R, I, acceleration_vals, \n magnetic_vals);\n \n float[] orientation = new float[3];\n SensorManager.getOrientation(R, orientation);\n \n acceleration_vals = null;\n magnetic_vals = null;\n \n // Use the pitch to determine whether we are in ID mode or\n // conference mode.\n if (orientation[1] <= -0.2) { // we're in conference mode\n this.setRequestedOrientation(\n ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n showScheduleView();\n } else if (orientation[1] >= 0.2) { // we're in ID mode\n this.setRequestedOrientation(\n ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT);\n showBadgeView();\n }\n }\n }",
"@Override\n public void update(double delta) {\n model.rotateXYZ(0,(1 * 0.001f),0);\n\n float acceleration = 0.1f;\n float cameraSpeed = 1.5f;\n\n // Left - right\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_A) == GLFW_PRESS)\n speedz+= (speedz < cameraSpeed) ? acceleration : 0;\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_A) == GLFW_RELEASE)\n speedz-= (speedz-acceleration > 0) ? acceleration : 0;\n\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_D) == GLFW_PRESS)\n speedz-= (speedz > -cameraSpeed) ? acceleration : 0;\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_D) == GLFW_RELEASE)\n speedz+= (speedz+acceleration < 0) ? acceleration : 0;\n\n // Forward - backward\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_W) == GLFW_PRESS)\n speedx+= (speedx < cameraSpeed) ? acceleration : 0;\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_W) == GLFW_RELEASE)\n speedx-= (speedx > 0) ? acceleration : 0;\n\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_S) == GLFW_PRESS)\n speedx-= (speedx > -cameraSpeed) ? acceleration : 0;\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_S) == GLFW_RELEASE)\n speedx+= (speedx+acceleration < 0) ? acceleration : 0;\n\n // up - down\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_Q) == GLFW_PRESS)\n speedy+= (speedy < cameraSpeed) ? acceleration : 0;\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_Q) == GLFW_RELEASE)\n speedy-= (speedy > 0.1) ? acceleration : 0;\n\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_E) == GLFW_PRESS)\n speedy-= (speedy > -cameraSpeed) ? acceleration : 0;\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_E) == GLFW_RELEASE)\n speedy+= (speedy < 0) ? acceleration : 0;\n\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_TAB) == GLFW_PRESS) {\n speedz = 0;\n speedx = 0;\n }\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_R) == GLFW_PRESS) {\n debugCameraObject.eyePos.x = 0;\n debugCameraObject.eyePos.y = 0;\n debugCameraObject.eyePos.z = 0;\n }\n if(glfwGetKey(this.mainWindow.id(),GLFW_KEY_T) == GLFW_PRESS) {\n showSkybox = !showSkybox;\n }\n\n\n debugCameraObject.processKeyboard(DebugCamera.CameraMovement.RIGHT, (float) (speedz * delta));\n debugCameraObject.processKeyboard(DebugCamera.CameraMovement.FORWARD, (float) (speedx * delta));\n }",
"public void updateRotations() {\n try {\n switch (this.mode) {\n case Packet:\n mc.player.renderYawOffset = this.yaw;\n mc.player.rotationYawHead = this.yaw;\n break;\n case Legit:\n mc.player.rotationYaw = this.yaw;\n mc.player.rotationPitch = this.pitch;\n break;\n case None:\n break;\n }\n } catch (Exception ignored) {\n\n }\n }",
"@Override\n public void onSensorChanged(SensorEvent event) {\n if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER){\n // Corriger les valeurs x et y en fonction de l'orientation de l'appareil\n switch (mDisplay.getRotation()) {\n case Surface.ROTATION_0:\n mAccelerationX = event.values[0];\n mAccelerationY = event.values[1];\n break;\n case Surface.ROTATION_90:\n mAccelerationX = -event.values[1];\n mAccelerationY = event.values[0];\n break;\n case Surface.ROTATION_180:\n mAccelerationX = -event.values[0];\n mAccelerationY = -event.values[1];\n break;\n case Surface.ROTATION_270:\n mAccelerationX = event.values[1];\n mAccelerationY = -event.values[0];\n break;\n }\n\n //mResX.setText(\"Accelerometre X : \" + mAccelerationX);\n //mResY.setText(\"Accelerometre Y : \" + mAccelerationY);\n\n float newPos = - mAccelerationX*viewWidth/12;\n float deltaAngle = tempAngle-mAccelerationX;\n\n //si l'angle ne varie qu'un peu,on ne bouge pas le boar\n if(Math.abs(deltaAngle)>0.2){\n animate = new TranslateAnimation(globalBoar.getX(),newPos ,0.2f*viewHeight/2, 0.2f*viewHeight/2);\n animate.setDuration(200);\n animate.setFillAfter(true);\n boarPlayerImage.startAnimation(animate);\n globalBoar.decideBoar(newPos,0.2f*viewHeight/2);\n tempAngle=mAccelerationX;\n\n }\n\n }\n }",
"public void onSensorChanged(SensorEvent event)\n {\n if (event.sensor.getType()==Sensor.TYPE_ACCELEROMETER) {\n gravity[0] = event.values[0];\n gravity[1] = event.values[1];\n gravity[2] = event.values[2];\n\n }\n if (event.sensor.getType()==Sensor.TYPE_MAGNETIC_FIELD) {\n geomagnetic[0] = event.values[0];\n geomagnetic[1] = event.values[1];\n geomagnetic[2] = event.values[2];\n\n }\n\n if(SensorManager.getRotationMatrix(_R, null, gravity, geomagnetic)){\n _R = this.opglr.swapRotMatrix(_R);\n }\n\n }",
"private void startOrientationSensor() {\n orientationValues = new float[3];\n SensorManager sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n Sensor orientationSensor = sensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION);\n sensorManager.registerListener(this, orientationSensor, SensorManager.SENSOR_DELAY_UI);\n }",
"@AnyThread\n private void updatePitchMatrix() {\n // The camera's pitch needs to be rotated along an axis that is parallel to the real world's\n // horizon. This is the <1, 0, 0> axis after compensating for the device's roll.\n Matrix.setRotateM(touchPitchMatrix, 0,\n -touchPitch, (float) Math.cos(deviceRoll), (float) Math.sin(deviceRoll), 0);\n }",
"private void adjustCameraPosition() {\n if (upward) {\n\n if (tilt<90) {\n tilt ++;\n zoom-=0.01f;\n } else {\n upward=false;\n }\n\n } else {\n if (tilt>0) {\n tilt --;\n zoom+=0.01f;\n } else {\n upward=true;\n }\n }\n }",
"@Override\n public void onSensorChanged(SensorEvent event) {\n mOrientation = event.values[0];\n }",
"void onOrientationChanged(float azimuth, float pitch, float roll);",
"void setRotation (DMatrix3C R);",
"public void cameraRotation() throws InterruptedException {\n\t\tint lowSide = (int)random(1,4);\r\n\t\tint highSide = (int)random(5,10);\r\n\t\tint medLowSide = (int)random(10,15);\r\n\t\tint medHighSide = (int)random(35,60);\r\n\t\tint highLowSide = (int)random(70,100);\r\n\t\tint highHighSide = (int)random(200,300);\r\n\t\tint cameraRotRandom = (int)random(0,1000);\r\n\t\t//int cameraAngle = (int)camera.getPitchAngle(); // did we want to do anything with this?\r\n\t\t\r\n\t\t// twitch\r\n\t\tif (cameraRotRandom <= 200) {\r\n\t\t\t//log(\"antiban, move camera, twitch\");\r\n\t\t\tint twitchRandom = (int)random(1,4);\r\n\t\t\t\r\n\t\t\tif (twitchRandom == 1) {\r\n\t\t\t\tcamera.movePitch(random(lowSide,highSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (twitchRandom == 2) {\r\n\t\t\t\tcamera.moveYaw(random(lowSide,highSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse {\r\n\t\t\t\tif(random(0,3) == 1) {\r\n\t\t\t\t\tcamera.moveYaw((random(lowSide,highSide)));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.movePitch((random(lowSide,highSide)));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse {\r\n\t\t\t\t\tcamera.movePitch(random(lowSide,highSide));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.moveYaw((random(lowSide,highSide)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\t\r\n\t\t// medium movements\r\n\t\t\r\n\t\telse if (cameraRotRandom <= 900) {\r\n\t\t\t//log(\"antiban, move camera, medium\");\r\n\t\t\tint medtwitchRandom = (int)random(1,4);\r\n\t\t\t\r\n\t\t\tif (medtwitchRandom == 1) {\r\n\t\t\t\tcamera.movePitch(random(medLowSide,medHighSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (medtwitchRandom == 2) {\r\n\t\t\t\tcamera.moveYaw(random(medLowSide,medHighSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse {\r\n\t\t\t\tif(random(0,3) == 1) {\r\n\t\t\t\t\tcamera.moveYaw((random(medLowSide,medHighSide)));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.movePitch((random(medLowSide,medHighSide)));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse {\r\n\t\t\t\t\tcamera.movePitch(random(medLowSide,medHighSide));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.moveYaw((random(medLowSide,medHighSide)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// complete rotations\r\n\t\t\r\n\t\telse if (cameraRotRandom <= 1000) {\r\n\t\t\t//log(\"antiban, move camera, long rotation\");\r\n\t\t\tint hightwitchRandom = (int)random(1,4);\r\n\t\t\t\r\n\t\t\tif (hightwitchRandom == 1) {\r\n\t\t\t\tcamera.movePitch(random(highLowSide,highHighSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (hightwitchRandom == 2) {\r\n\t\t\t\tcamera.moveYaw(random(highLowSide,highHighSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse {\r\n\t\t\t\tif(random(0,3) == 1) {\r\n\t\t\t\t\tcamera.moveYaw((random(highLowSide,highHighSide)));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.movePitch((random(highLowSide,highHighSide)));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse {\r\n\t\t\t\t\tcamera.movePitch(random(highLowSide,highHighSide));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.moveYaw((random(highLowSide,highHighSide)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\tlog(\"something went wrong with antiban camera rotation\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"public void cameraRotation() throws InterruptedException {\n\t\tint lowSide = (int)random(1,4);\r\n\t\tint highSide = (int)random(5,10);\r\n\t\tint medLowSide = (int)random(10,15);\r\n\t\tint medHighSide = (int)random(35,60);\r\n\t\tint highLowSide = (int)random(70,100);\r\n\t\tint highHighSide = (int)random(200,300);\r\n\t\tint cameraRotRandom = (int)random(0,1000);\r\n\t\tint cameraAngle = (int)camera.getPitchAngle(); // did we want to do anything with this?\r\n\t\t\r\n\t\t// twitch\r\n\t\tif (cameraRotRandom <= 200) {\r\n\t\t\t//log(\"antiban, move camera, twitch\");\r\n\t\t\tint twitchRandom = (int)random(1,4);\r\n\t\t\t\r\n\t\t\tif (twitchRandom == 1) {\r\n\t\t\t\tcamera.movePitch(random(lowSide,highSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (twitchRandom == 2) {\r\n\t\t\t\tcamera.moveYaw(random(lowSide,highSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse {\r\n\t\t\t\tif(random(0,3) == 1) {\r\n\t\t\t\t\tcamera.moveYaw((random(lowSide,highSide)));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.movePitch((random(lowSide,highSide)));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse {\r\n\t\t\t\t\tcamera.movePitch(random(lowSide,highSide));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.moveYaw((random(lowSide,highSide)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\t\r\n\t\t// medium movements\r\n\t\t\r\n\t\telse if (cameraRotRandom <= 900) {\r\n\t\t\t//log(\"antiban, move camera, medium\");\r\n\t\t\tint medtwitchRandom = (int)random(1,4);\r\n\t\t\t\r\n\t\t\tif (medtwitchRandom == 1) {\r\n\t\t\t\tcamera.movePitch(random(medLowSide,medHighSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (medtwitchRandom == 2) {\r\n\t\t\t\tcamera.moveYaw(random(medLowSide,medHighSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse {\r\n\t\t\t\tif(random(0,3) == 1) {\r\n\t\t\t\t\tcamera.moveYaw((random(medLowSide,medHighSide)));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.movePitch((random(medLowSide,medHighSide)));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse {\r\n\t\t\t\t\tcamera.movePitch(random(medLowSide,medHighSide));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.moveYaw((random(medLowSide,medHighSide)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// complete rotations\r\n\t\t\r\n\t\telse if (cameraRotRandom <= 1000) {\r\n\t\t\t//log(\"antiban, move camera, long rotation\");\r\n\t\t\tint hightwitchRandom = (int)random(1,4);\r\n\t\t\t\r\n\t\t\tif (hightwitchRandom == 1) {\r\n\t\t\t\tcamera.movePitch(random(highLowSide,highHighSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (hightwitchRandom == 2) {\r\n\t\t\t\tcamera.moveYaw(random(highLowSide,highHighSide));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse {\r\n\t\t\t\tif(random(0,3) == 1) {\r\n\t\t\t\t\tcamera.moveYaw((random(highLowSide,highHighSide)));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.movePitch((random(highLowSide,highHighSide)));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse {\r\n\t\t\t\t\tcamera.movePitch(random(highLowSide,highHighSide));\r\n\t\t\t\t\tsleep(random(100,300));\r\n\t\t\t\t\tcamera.moveYaw((random(highLowSide,highHighSide)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\tlog(\"something went wrong with antiban camera rotation\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n public void onOrientationChanged(double orientation, double tilt) {\n if (!getUserVisibleHint()) {\n return;\n }\n if (mMap == null) {\n return;\n }\n\n /*\n If we're in map mode, we have a location fix, and we have a preference to rotate the map based on sensors,\n then do the map camera reposition\n */\n if (mMapController.getMode().equals(MODE_MAP) && mMyLocationMarker != null && mRotate) {\n mMap.setMapOrientation((float) -orientation);\n }\n mMap.invalidate();\n }",
"private void setCameraDisplayOrientation(Activity activity, int cameraId, Camera camera){\n Camera.CameraInfo info = new Camera.CameraInfo();\n Camera.getCameraInfo(cameraId, info);\n int degrees = getDisplayRotation(activity);\n Log.i(\"Test\", \"rotation:-->\" + degrees);\n int result;\n if(info.facing == Camera.CameraInfo.CAMERA_FACING_FRONT){\n result = (info.orientation + degrees) % 360;\n result = (360 - result) % 360; //compensate the mirror\n }else{\n result = (info.orientation - degrees + 360) % 360;\n }\n camera.setDisplayOrientation(result);\n }",
"public void updateCamera() {\n\t}",
"public void updateRenderCameraPose(TangoPoseData cameraPose) {\n float[] rotation = cameraPose.getRotationAsFloats();\n float[] translation = cameraPose.getTranslationAsFloats();\n Quaternion quaternion = new Quaternion(rotation[3], rotation[0], rotation[1], rotation[2]);\n // Conjugating the Quaternion is need because Rajawali uses left handed convention for\n // quaternions.\n getCurrentCamera().setRotation(quaternion.conjugate());\n getCurrentCamera().setPosition(translation[0], translation[1], translation[2]);\n }",
"private void computeRotate() {\n time = Math.min(\n duration,\n time + MaterialWeatherView.WeatherAnimationImplementor.REFRESH_INTERVAL);\n rotationNow = (rotationEnd - rotationStart) * (1 - Math.pow(1 - 1.0 * time / duration, 2 * FACTOR))\n + rotationStart;\n if (time == duration) {\n // finish.\n rotating = false;\n }\n }",
"@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 void applyRotationLocked(int oldRotation, int rotation) {\n this.mDisplayRotation.setRotation(rotation);\n boolean rotateSeamlessly = this.mWmService.isRotatingSeamlessly();\n ScreenRotationAnimation screenRotationAnimation = rotateSeamlessly ? null : this.mWmService.mAnimator.getScreenRotationAnimationLocked(this.mDisplayId);\n updateDisplayAndOrientation(getConfiguration().uiMode, null);\n if (screenRotationAnimation != null && screenRotationAnimation.hasScreenshot() && screenRotationAnimation.setRotation(getPendingTransaction(), rotation, 10000, this.mWmService.getTransitionAnimationScaleLocked(), this.mDisplayInfo.logicalWidth, this.mDisplayInfo.logicalHeight)) {\n this.mWmService.scheduleAnimationLocked();\n }\n forAllWindows((Consumer<WindowState>) new Consumer(oldRotation, rotation, rotateSeamlessly) {\n /* class com.android.server.wm.$$Lambda$DisplayContent$3g7y7M5XrDR3cz8tOp9f3pwWbyQ */\n private final /* synthetic */ int f$1;\n private final /* synthetic */ int f$2;\n private final /* synthetic */ boolean f$3;\n\n {\n this.f$1 = r2;\n this.f$2 = r3;\n this.f$3 = r4;\n }\n\n @Override // java.util.function.Consumer\n public final void accept(Object obj) {\n DisplayContent.this.lambda$applyRotationLocked$10$DisplayContent(this.f$1, this.f$2, this.f$3, (WindowState) obj);\n }\n }, true);\n this.mWmService.mDisplayManagerInternal.performTraversal(getPendingTransaction());\n scheduleAnimation();\n forAllWindows((Consumer<WindowState>) new Consumer(rotateSeamlessly) {\n /* class com.android.server.wm.$$Lambda$DisplayContent$XeeexVnAosqA0zfHVCT_Txqwl8 */\n private final /* synthetic */ boolean f$1;\n\n {\n this.f$1 = r2;\n }\n\n @Override // java.util.function.Consumer\n public final void accept(Object obj) {\n DisplayContent.this.lambda$applyRotationLocked$11$DisplayContent(this.f$1, (WindowState) obj);\n }\n }, true);\n if (rotateSeamlessly) {\n int timeOutDuration = 2000;\n if (this.mDisplayPolicy.isFromSeamlessLauncher() && hasPinnedStack()) {\n timeOutDuration = 150;\n }\n this.mWmService.mH.sendNewMessageDelayed(54, this, (long) timeOutDuration);\n if (HwDisplaySizeUtil.hasSideInScreen()) {\n this.mWmService.getPolicy().notchControlFilletForSideScreen(this.mWmService.getFocusedWindow(), true);\n }\n }\n for (int i = this.mWmService.mRotationWatchers.size() - 1; i >= 0; i--) {\n WindowManagerService.RotationWatcher rotationWatcher = this.mWmService.mRotationWatchers.get(i);\n if (rotationWatcher.mDisplayId == this.mDisplayId) {\n try {\n rotationWatcher.mWatcher.onRotationChanged(rotation);\n } catch (RemoteException e) {\n }\n }\n }\n if (screenRotationAnimation == null && this.mWmService.mAccessibilityController != null) {\n this.mWmService.mAccessibilityController.onRotationChangedLocked(this);\n }\n this.mWmService.mPolicy.notifyRotationChange(rotation);\n if (this.mSideSurfaceBox != null) {\n this.mWmService.setScreenSideBoxAndCornerVisibility(this.mDisplayId, false);\n }\n }",
"@Override\n public void onConfigurationChanged(Configuration newConfig) {\n super.onConfigurationChanged(newConfig);\n setContentView(R.layout.activity_main);\n if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT) {\n CamB.setRotation(0);\n\n } else if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {\n CamB.setRotation(90);\n }\n }",
"@Override\n public void onOrientationChanged(int orientation) {\n if (orientation == OrientationEventListener.ORIENTATION_UNKNOWN || mPaused) {\n return;\n }\n int newOrientation = Utils.roundOrientation(orientation, mGSensorOrientation);\n if (mGSensorOrientation != newOrientation) {\n mGSensorOrientation = newOrientation;\n }\n mAbstractModuleUI.onOrientationChanged(mGSensorOrientation);\n mAaaControl.onOrientationChanged(mGSensorOrientation);\n mDetectionManager.onOrientationChanged(mGSensorOrientation);\n mCurrentMode.onOrientationChanged(mGSensorOrientation);\n mRemoteTouchFocus.setLocalOrientation(mGSensorOrientation);\n }",
"private void updateCamera() {\n\t\tVector3f x = new Vector3f();\n\t\tVector3f y = new Vector3f();\n\t\tVector3f z = new Vector3f();\n\t\tVector3f temp = new Vector3f(this.mCenterOfProjection);\n\n\t\ttemp.sub(this.mLookAtPoint);\n\t\ttemp.normalize();\n\t\tz.set(temp);\n\n\t\ttemp.set(this.mUpVector);\n\t\ttemp.cross(temp, z);\n\t\ttemp.normalize();\n\t\tx.set(temp);\n\n\t\ty.cross(z, x);\n\n\t\tMatrix4f newMatrix = new Matrix4f();\n\t\tnewMatrix.setColumn(0, x.getX(), x.getY(), x.getZ(), 0);\n\t\tnewMatrix.setColumn(1, y.getX(), y.getY(), y.getZ(), 0);\n\t\tnewMatrix.setColumn(2, z.getX(), z.getY(), z.getZ(), 0);\n\t\tnewMatrix.setColumn(3, mCenterOfProjection.getX(),\n\t\t\t\tmCenterOfProjection.getY(), mCenterOfProjection.getZ(), 1);\n\t\ttry {\n\t\t\tnewMatrix.invert();\n\t\t\tthis.mCameraMatrix.set(newMatrix);\n\t\t} catch (SingularMatrixException exc) {\n\t\t\tLog.d(\"Camera\",\n\t\t\t\t\t\"SingularMatrixException on Matrix: \"\n\t\t\t\t\t\t\t+ newMatrix.toString());\n\t\t}\n\t}",
"public void applyTransform() {\n\t\tglRotatef(xaxisrot, 1.0f, 0.0f, 0.0f);\n\t\tglRotatef(yaxisrot, 0.0f, 1.0f, 0.0f);\n\t\tglRotatef(tilt, 0.0f, 0.0f, 1.0f);\n\t\tglTranslatef(-pos.geti(), -pos.getj(), -pos.getk());\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}",
"public void rotateBy(float angleDelta)\n {\n this.rotation += angleDelta;\n \n updateTransform();\n notifyParentOfPositionChange();\n conditionallyRepaint();\n }",
"@Override\r\n\tpublic void onOrientationChanged(float azimuth, float pitch, float roll) {\n\r\n\t}",
"@Override\n public void onSensorChanged(SensorEvent event) {\n if (event.sensor.getType() != Sensor.TYPE_ACCELEROMETER)\n return;\n /*\n * record the accelerometer data, the event's timestamp as well as\n * the current time. The latter is needed so we can calculate the\n * \"present\" time during rendering. In this application, we need to\n * take into account how the screen is rotated with respect to the\n * sensors (which always return data in a coordinate space aligned\n * to with the screen in its native orientation).\n */\n\n switch (mDisplay.getRotation()) {\n case Surface.ROTATION_0:\n mSensorX = event.values[0];\n mSensorY = event.values[1];\n break;\n case Surface.ROTATION_90:\n mSensorX = -event.values[1];\n mSensorY = event.values[0];\n break;\n case Surface.ROTATION_180:\n mSensorX = -event.values[0];\n mSensorY = -event.values[1];\n break;\n case Surface.ROTATION_270:\n mSensorX = event.values[1];\n mSensorY = -event.values[0];\n break;\n }\n\n mGLView.updateScene(10*mSensorX,10*mSensorY,10*event.values[2]);\n\n }",
"void initFromCameraParameters(OpenCamera camera) {\n Camera.Parameters parameters = camera.getCamera().getParameters();\n WindowManager manager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);\n Display display = manager.getDefaultDisplay();\n\n int displayRotation = display.getRotation();\n int cwRotationFromNaturalToDisplay;\n switch (displayRotation) {\n case Surface.ROTATION_0:\n cwRotationFromNaturalToDisplay = 0;\n break;\n case Surface.ROTATION_90:\n cwRotationFromNaturalToDisplay = 90;\n break;\n case Surface.ROTATION_180:\n cwRotationFromNaturalToDisplay = 180;\n break;\n case Surface.ROTATION_270:\n cwRotationFromNaturalToDisplay = 270;\n break;\n default:\n // Have seen this return incorrect values like -90\n if (displayRotation % 90 == 0) {\n cwRotationFromNaturalToDisplay = (360 + displayRotation) % 360;\n } else {\n throw new IllegalArgumentException(\"Bad rotation: \" + displayRotation);\n }\n }\n Log.i(TAG, \"Display at: \" + cwRotationFromNaturalToDisplay);\n\n int cwRotationFromNaturalToCamera = camera.getOrientation();\n Log.i(TAG, \"Camera at: \" + cwRotationFromNaturalToCamera);\n\n // Still not 100% sure about this. But acts like we need to flip this:\n if (camera.getFacing() == CameraFacing.FRONT) {\n cwRotationFromNaturalToCamera = (360 - cwRotationFromNaturalToCamera) % 360;\n Log.i(TAG, \"Front camera overriden to: \" + cwRotationFromNaturalToCamera);\n }\n\n /*\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n String overrideRotationString;\n if (camera.getFacing() == CameraFacing.FRONT) {\n overrideRotationString = prefs.getString(PreferencesActivity.KEY_FORCE_CAMERA_ORIENTATION_FRONT, null);\n } else {\n overrideRotationString = prefs.getString(PreferencesActivity.KEY_FORCE_CAMERA_ORIENTATION, null);\n }\n if (overrideRotationString != null && !\"-\".equals(overrideRotationString)) {\n Log.i(TAG, \"Overriding camera manually to \" + overrideRotationString);\n cwRotationFromNaturalToCamera = Integer.parseInt(overrideRotationString);\n }\n */\n\n cwRotationFromDisplayToCamera =\n (360 + cwRotationFromNaturalToCamera - cwRotationFromNaturalToDisplay) % 360;\n Log.i(TAG, \"Final display orientation: \" + cwRotationFromDisplayToCamera);\n if (camera.getFacing() == CameraFacing.FRONT) {\n Log.i(TAG, \"Compensating rotation for front camera\");\n cwNeededRotation = (360 - cwRotationFromDisplayToCamera) % 360;\n } else {\n cwNeededRotation = cwRotationFromDisplayToCamera;\n }\n Log.i(TAG, \"Clockwise rotation from display to camera: \" + cwNeededRotation);\n\n Point theScreenResolution = new Point();\n display.getSize(theScreenResolution);\n screenResolution = theScreenResolution;\n Log.i(TAG, \"Screen resolution in current orientation: \" + screenResolution);\n cameraResolution = CameraConfigurationUtils.findBestPreviewSizeValue(parameters, screenResolution);\n Log.i(TAG, \"Camera resolution: \" + cameraResolution);\n bestPreviewSize = CameraConfigurationUtils.findBestPreviewSizeValue(parameters, screenResolution);\n Log.i(TAG, \"Best available preview size: \" + bestPreviewSize);\n\n boolean isScreenPortrait = screenResolution.x < screenResolution.y;\n boolean isPreviewSizePortrait = bestPreviewSize.x < bestPreviewSize.y;\n\n if (isScreenPortrait == isPreviewSizePortrait) {\n previewSizeOnScreen = bestPreviewSize;\n } else {\n previewSizeOnScreen = new Point(bestPreviewSize.y, bestPreviewSize.x);\n }\n Log.i(TAG, \"Preview size on screen: \" + previewSizeOnScreen);\n }",
"@Override\r\n\tpublic void onOrientationChanged(float[] aValues, float[] mValues) {\n\t\trefreshDisplay(calculateOrientation(aValues, mValues));\r\n\t}",
"public void setRotation(){\n\t\t\tfb5.accStop();\n\t\t\twt.turning = true;\n\t\t\tif(state == BotMove.RIGHT_15){\n\t\t\t\tfb5.turnRightBy(6);\n\t\t\t\tangle = (angle+360-20)%360;\n\t\t\t}\n\t\t\telse if(state == BotMove.RIGHT_10){\n\t\t\t\tfb5.turnRightBy(3);\n\t\t\t\tangle = (angle+360-10)%360;\n\t\t\t}\n\t\t\telse if(state == BotMove.LEFT_5){\n\t\t\t\tfb5.turnLeftBy(2);\n\t\t\t\tangle = (angle+360+5)%360;\n\t\t\t}\n\t\t}",
"public void updateRenderAngles() {\n }",
"private void changeCalculatePreviewOrientation() {\n\n if (mHolder.getSurface() == null) {\n // preview surface does not exist\n Log.d(TAG, \"Preview surface does not exist\");\n return;\n }\n\n // stop preview before making changes\n stopCamera();\n\n int orientation = calculatePreviewOrientation(mCameraInfo, mDisplayOrientation);\n mCamera.setDisplayOrientation(orientation);\n\n startCamera();\n }",
"@Override\n\t\tpublic void onOrientationData(Myo myo, long timestamp,\n\t\t\t\tQuaternion rotation) {\n\t\t\t// Calculate Euler angles (roll, pitch, and yaw) from the\n\t\t\t// quaternion.\n\n\t\t\tMyMyo selected = myos.get(myos.indexOf(new MyMyo(myo)));\n\n\t\t\trotationZ = (float) Math.toDegrees(Quaternion.roll(rotation));\n\t\t\trotationX = (float) Math.toDegrees(Quaternion.pitch(rotation));\n\t\t\trotationY = (float) Math.toDegrees(Quaternion.yaw(rotation));\n\n\t\t\tselected.setRotationX(rotationX);\n\t\t\tselected.setRotationY(rotationY);\n\t\t\tselected.setRotationZ(rotationZ);\n\n\t\t\tif (playingGame) {\n\t\t\t\tselected.addSum();\n\t\t\t}\n\n\t\t\tif (myos.size() > 1)\n\t\t\t\treturn;\n\n\t\t\tfloat heading1 = 0;\n\t\t\tfloat speed1 = 0;\n\t\t\tif (ride) {\n\t\t\t\t// if (ref_rotationZ < rotationZ) {\n\t\t\t\t// float zero = ref_rotationZ;\n\t\t\t\t// float max = left_rotationZ - zero;\n\t\t\t\t// heading1 = rotationZ - zero;\n\t\t\t\t// heading1 /= max;\n\t\t\t\t// heading += 1;\n\t\t\t\t// heading *= -heading1;\n\t\t\t\t// } else {\n\t\t\t\t// float zero = ref_rotationZ;\n\t\t\t\t// float max = right_rotationZ - zero;\n\t\t\t\t//\n\t\t\t\t//\n\t\t\t\t// }\n\t\t\t\tspeed1 = (ref_rotationX - rotationX) / 100;\n\t\t\t\tif (speed1 != Float.NaN) {\n\t\t\t\t\tref_rotationX = rotationX;\n\t\t\t\t\trotx -= speed1;\n\t\t\t\t}\n\t\t\t\t// speed += rotx;\n\t\t\t\t// heading = heading % 360;\n\n\t\t\t\theading1 = (ref_rotationZ - rotationZ) / 50;\n\t\t\t\tref_rotationZ = rotationZ;\n\t\t\t\trotz += heading1;\n\t\t\t\theading += rotz;\n\t\t\t\theading = heading % 360;\n\t\t\t\tif (heading < 0)\n\t\t\t\t\theading = 360 + heading;\n\t\t\t\tif (rotx < 0)\n\t\t\t\t\trotx = 0;\n\t\t\t\tif (rotx > 1)\n\t\t\t\t\trotx = 1;\n\t\t\t\tif (mRobot != null && ride)\n\t\t\t\t\tmRobot.drive(heading, rotx);\n\t\t\t\telse if (mRobot != null)\n\t\t\t\t\tmRobot.drive(0.0f, 0.0f);\n\t\t\t}\n\n\t\t\t// X.setText(String.format(\"x: %.3f / %.3f\", rotationX, rotx));\n\t\t\t// Y.setText(String.format(\"y: %.3f\", rotationY));\n\t\t\t// Z.setText(String.format(\"z: %.3f / %.3f / %.3f\", rotationZ, rotz,\n\t\t\t// heading));\n\t\t\t// Next, we apply a rotation to the text view using the roll, pitch,\n\t\t\t// and yaw.\n\t\t\t// mTextView.setRotation(-rotationZ);\n\t\t\t// mTextView.setRotationX(-rotationX);\n\t\t\t// mTextView.setRotationY(rotationY);\n\t\t}",
"private void startOrientationSensor() {\n SensorManager sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n Sensor orientationSensor = sensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION);\n sensorManager.registerListener(this, orientationSensor, SensorManager.SENSOR_DELAY_UI);\n }",
"private void rotationChanged() {\n if(isActive() && getDisplayRotation() != openedOrientation) {\n pause();\n resume();\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 setCameraRotateForPickUp(float[] quat) {\n float[] newquat = normalizeQuat(quat);\n float rollRad = getRollRad(newquat);\n //Need to convert radians to convert to rotation that camera is using\n //pass to augmented image renderer and convert back into quaternion\n augmentedImageRenderer.updateCameraRotateForPickUp(eulerAnglesRadToQuat(-rollRad, 0, 0));\n }",
"@Override\n public void onDrawFrame(GL10 gl) {\n synchronized (this) {\n Matrix.multiplyMM(tempMatrix, 0, deviceOrientationMatrix, 0, touchYawMatrix, 0);\n Matrix.multiplyMM(viewMatrix, 0, touchPitchMatrix, 0, tempMatrix, 0);\n }\n\n Matrix.multiplyMM(viewProjectionMatrix, 0, projectionMatrix, 0, viewMatrix, 0);\n scene.glDrawFrame(viewProjectionMatrix, Type.MONOCULAR);\n }",
"@Override\n public void onSensorChanged(SensorEvent event) {\n\n float valueAzimuth = event.values[0];\n float valuePitch = event.values[1];\n\n parent.updateAccelerometer(\n valueAzimuth / maximumRange, -valuePitch / maximumRange);\n\n }",
"@Override\n public void onDrawFrame(GL10 gl10) {\n glClear(GL_COLOR_BUFFER_BIT);\n\n Location drawCameraLocation;\n\n //Don't draw until camera location is known\n if (mCurrentCameraLocation == null && mNewCameraLocation == null) {\n //Log.d(LOG_TAG, \"onDraw 1\");\n return;\n } else if (mCurrentCameraLocation == null && mNewCameraLocation != null) {\n //Log.d(LOG_TAG, \"onDraw 2\");\n mCurrentCameraLocation = mNewCameraLocation;\n drawCameraLocation = mCurrentCameraLocation;\n } else if (mCurrentCameraLocation != null && mNewCameraLocation != null && mTargetCameraLocation == null) {\n //Log.d(LOG_TAG, \"onDraw 3\");\n\n float distance = mNewCameraLocation.distanceTo(mCurrentCameraLocation);\n\n ///Increment step to target location when new camera location\n // is greater than 1.5 meters from current location\n if (distance > 1.5f) {\n mTargetCameraLocation = mNewCameraLocation;\n }\n\n drawCameraLocation = mCurrentCameraLocation;\n }\n\n //Provide increment location (if necessary) for smooth changes in camera positions\n else if (mCurrentCameraLocation != null && mTargetCameraLocation != null) {\n //Log.d(LOG_TAG, \"onDraw 4\");\n float cameraDistance = mCurrentCameraLocation.distanceTo(mTargetCameraLocation);\n\n\n float x = (float) mCameraStep / TOTALCAMERASTEPS;\n //float y = (float)Math.pow(x,3)*(x*(6*x-15)+10);\n //float y = (float)Math.pow(x,2)*(3-2*x); //smoothstep\n float y = x;\n\n float incDistance = y * cameraDistance;\n float bearing = mCurrentCameraLocation.bearingTo(mTargetCameraLocation);\n\n bearing = (bearing + 360) % 360;\n\n drawCameraLocation = calculateDestinationLocation(mCurrentCameraLocation, bearing, incDistance);\n drawCameraLocation.setAccuracy(mTargetCameraLocation.getAccuracy());\n\n mCameraStep++;\n\n if (mCameraStep == TOTALCAMERASTEPS) {\n //mCurrentCameraLocation = mTargetCameraLocation;\n mCurrentCameraLocation = drawCameraLocation;\n mTargetCameraLocation = null;\n mCameraStep = 0;\n }\n } else {//Never should come to this\n Log.d(LOG_TAG, \"onDraw 5\");\n\n drawCameraLocation = mCurrentCameraLocation;\n }\n\n /*\n setLookAtM(viewMatrix, 0, viewValues[0], viewValues[1], viewValues[2]\n , viewValues[3], viewValues[4], viewValues[5]\n , viewValues[6], viewValues[7], viewValues[8]);\n */\n\n multiplyMM(viewMatrix, 0, rotationMatrix, 0, modelSensorMatrix, 0);\n // Multiply the view and projection matrices together.\n multiplyMM(viewProjectionMatrix, 0, projectionMatrix, 0, viewMatrix, 0);\n\n\n //Process each image texture with drawCameraLocation\n for (ImageTexture it : mImageTextures) {\n\n\n if (it == null) {\n return;\n }\n\n double ItAngle;\n double distance = drawCameraLocation.distanceTo(it.mLocation);\n\n\n\n /*\n if (distance > (drawCameraLocation.getAccuracy() /0.68f))\n {\n ItAngle = (drawCameraLocation.bearingTo(it.mLocation) + 360) % 360;\n it.rotateAroundCamera((float) ItAngle );\n\n Log.d(LOG_TAG, \"onDrawFrame: distance = \" + distance + \" > \" + (drawCameraLocation.getAccuracy() /0.68f) + \", ItAngle = \" +ItAngle );\n }\n //Within accuracy radius\n else {\n distance = 4;\n }\n\n */\n\n ItAngle = (drawCameraLocation.bearingTo(it.mLocation) + 360) % 360;\n\n\n if (distance != 0 || ItAngle != 0.0f) {\n it.rotateAroundCamera((float) ItAngle);\n it.moveFromToCamera((float) -distance * 0.79f);\n }\n\n\n Log.d(LOG_TAG, \"onDrawFrame: distance = \" + distance + \" > \" + (drawCameraLocation.getAccuracy() / 0.68f) + \", ItAngle = \" + ItAngle);\n Log.d(LOG_TAG, \"onDrawFrame: drawCameraLocation = \" + drawCameraLocation.getLatitude() + \", \" + drawCameraLocation.getLongitude()\n + \" \" + it.mLocation.getLatitude() + \", \" + it.mLocation.getLongitude());\n\n\n String debugStr = \"Camera: \" + String.format(\"%5.6f\", drawCameraLocation.getLatitude()) + \", \" + String.format(\"%5.6f\", drawCameraLocation.getLongitude())\n + \"\\nAccuracy: \" + String.format(\"%5.7f\", drawCameraLocation.getAccuracy()) + \", Z: \" + String.format(\"%3.1f\", mAzimuth)\n //+ \"\\nImage: \" + String.format(\"%5.7f\",it.mLocation.getLatitude()) + \", \" + String.format(\"%5.7f\",it.mLocation.getLongitude())\n + \"\\nDistance: \" + String.format(\"%5.5f\", distance) + \", ItAngle: \" + String.format(\"%3.7f\", it.mCameraRotationAngle);\n\n\n float[] modelMatrix = it.calculateModelMatrix();\n multiplyMM(modelViewProjectionMatrix, 0, viewProjectionMatrix, 0, modelMatrix, 0);\n mTextureShaderProgram.useProgram();\n mTextureShaderProgram.setUniforms(modelViewProjectionMatrix, it.mTextureId, it.opacity);//every object sets its own mvpMatrix, texture, and alpha values\n it.bindData(mTextureShaderProgram);\n it.draw();\n }\n }",
"@Override\n public void updateScene() {\n scene.backgroundColor().setAll(new Color4(224, 237, 246, 255));\n\n if (!object3DConfigured || !sensor.validValue())\n return;\n\n IotSensor.Value value = sensor.getValue();\n object3D.rotation().x = value.getRoll();\n object3D.rotation().y = value.getYaw();\n object3D.rotation().z = value.getPitch();\n }",
"int getSensorRotationDegrees();",
"public void onRotate(float rad) {\n rotateRadian = rad;\n rotate(rotateRadian);\n }",
"@Override\n\tpublic void update(float dt) {\n\t\trotation = rotation * 0.9f;\n\t\tif (scene.player != null) {\n\t\t\tRectangle playerBounds = scene.player.getBounds();\n\t\t\tfloat targetX = playerBounds.getX() + playerBounds.getWidth() / 2 - scene.getWidth() / 2.3f;\n\t\t\tfloat targetY = playerBounds.getY() + playerBounds.getHeight() / 2 - scene.getHeight() / 2;\n\t\t\ttranslate((targetX - getX()) * 0.1f, (targetY - getY()) * 0.02f);\n\t\t}\n\n\t\tif (trauma > 0) {\n\t\t\tif (Properties.evaluate(\"enable_camera_shake\")) {\n\t\t\t\tfloat magnitude = amplitude * trauma * trauma * trauma;\n\t\t\t\tfloat offsetX = Random.nextFloat(-1, 1) * magnitude * 50;\n\t\t\t\tfloat offsetY = Random.nextFloat(-1, 1) * magnitude * 50;\n\t\t\t\ttranslate(offsetX, offsetY);\n\t\t\t\trotation -= Random.nextFloat(-1, 1) * magnitude * Math.PI / 50;\n\t\t\t}\n\t\t\ttrauma -= Math.min((trauma + 0.3f) * decay * dt / 1000, trauma);\n\t\t}\n\t}",
"private final void \n\tdoRotation( \n\t\t\tfinal float x, \n\t\t\tfinal float y ) {\n\t\t\n\t\tif( this.mLastRotation[1] >= 0 && this.mLastRotation[2] >= 0 ) {\n\t\t\tGLES11.glTranslatef( this.mLastRotation[1], this.mLastRotation[2], 0f);\n\t\t} else {\n\t\t\tGLES11.glTranslatef( x, y, 0f);\n\t\t}\n\t\t\n\t\tGLES11.glRotatef(this.mLastRotation[0], 0f, 0f, 1f);\n\t\tif( this.mLastRotation[1] >= 0 && this.mLastRotation[2] >= 0 ) {\n\t\t\tGLES11.glTranslatef( -this.mLastRotation[1], -this.mLastRotation[2], 0f);\n\t\t} else {\n\t\t\tGLES11.glTranslatef( -x, -y, 0f);\n\t\t}\n\t}",
"@Override\n public void onSensorChanged(SensorEvent event) {\n float degree = Math.round(event.values[0]);\n\n RotateAnimation ra = new RotateAnimation(\n mCurrentDegree,\n -degree,\n Animation.RELATIVE_TO_SELF, 0.5f,\n Animation.RELATIVE_TO_SELF, 0.5f);\n\n // How long the animation will take place\n ra.setDuration(210);\n\n // Set the animation after the end of the reservation status\n ra.setFillAfter(true);\n\n // Start the animation\n mIvCompass.startAnimation(ra);\n mCurrentDegree = -degree;\n }",
"private void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z)\n {\n modelRenderer.rotateAngleX = x;\n modelRenderer.rotateAngleY = y;\n modelRenderer.rotateAngleZ = z;\n }",
"public void updateGyro() {\n\t\tangleToForward = gyro.getAngle();\n\t\tif (angleToForward >= 360) {\n\t\t\tangleToForward -= 360;\n\t\t} else if (angleToForward < 0) {\n\t\t\tangleToForward += 360;\n\t\t}\n\n\t}",
"private void updateView(){\n \n camera.updateView();\n }",
"@Override\n public void onSensorChanged(SensorEvent event) {\n if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER)\n {\n mGravity = event.values;\n\n float[] g = new float[3];\n g = event.values.clone();\n\n float norm_Of_g = (float) Math.sqrt(g[0] * g[0] + g[1] * g[1] + g[2] * g[2]);\n\n // Normalize the accelerometer vector\n g[0] = g[0] / norm_Of_g;\n g[1] = g[1] / norm_Of_g;\n g[2] = g[2] / norm_Of_g;\n\n int inclination = (int) Math.round(Math.toDegrees(Math.acos(g[2])));\n //Log.d(\"test\", Integer.toString(inclination));\n\n // lower than 70 degree display google map view\n if(inclination<65)\n {\n if(showGoogleMap==false)\n {\n\n showGoogleMap=true;\n ft = getSupportFragmentManager().beginTransaction();\n ft.hide(mBeyondarFragment);\n ft.show(mapFragment);\n ft.commit();\n myLocationButton.setVisibility(View.VISIBLE);\n }\n\n }\n else\n {\n\n if(showGoogleMap==true)\n {\n showGoogleMap=false;\n ft = getSupportFragmentManager().beginTransaction();\n ft.hide(mapFragment);\n ft.show(mBeyondarFragment);\n ft.commit();\n myLocationButton.setVisibility(View.GONE);\n }\n // display AR view\n }\n /*if (inclination<25||inclination>155)\n {\n Log.d(\"test\", \"downwards\");\n }\n else\n {\n Log.d(\"test\", \"upwards\");\n }*/\n }\n\n }",
"public void forceSyncRotation() {\n this.rotateCtr = 14;\n }",
"@Override\n public void loop() {\n telemetry.addData(\"Rotation: \", Round(stevens_IMU.getAngularOrientation().firstAngle * -57.143));\n telemetry.addData(\"Position \", stevens_IMU.getAngularOrientation());\n }",
"void setOffsetWorldRotation(DMatrix3C R);",
"private void setCamera() {\n\t\tVector viewTranslation = controller.getCameraPosition();\n\n\t\tGL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);\n\t\tGL11.glMatrixMode(GL11.GL_PROJECTION);\n\t\tGL11.glLoadIdentity();\n\n\t\tfloat whRatio = (float) windowWidth / (float) windowHeight;\n\t\tGLU.gluPerspective(controller.getFOV(), whRatio, 1, 100000);\n\t\tGLU.gluLookAt((float) viewTranslation.x, (float) viewTranslation.y,\n\t\t\t\t(float) controller.getCameraDistance(), (float) viewTranslation.x,\n\t\t\t\t(float) viewTranslation.y, 0, 0, 1, 0);\n\n\t\tGL11.glMatrixMode(GL11.GL_MODELVIEW);\n\t\tGL11.glLoadIdentity();\n\t}",
"@Override\n public void modelChanged(double currentAngle, double[][] mat43) {\n Runnable runnable = new Runnable() {\n public void run() {\n updateModelEntList(combinedRotatingMatrix);\n Rectangle rect = getBounds();\n rect.x = 0;\n rect.y = 0;\n// System.out.println(\"MainMonitorCSysView.updateCSysEntList: x \" + rect.x + \" y \" + rect.y + \" w \" + rect.width + \" h\" + rect.height);\n// MainMonitorCSysView.this.paintImmediately(rect);\n repaint();\n }\n };\n if (!SwingUtilities.isEventDispatchThread()) {\n Thread.dumpStack();\n }\n\n// System.out.println(\"isEventDispatchThread \"+SwingUtilities.isEventDispatchThread());\n if (SwingUtilities.isEventDispatchThread()) {\n runnable.run();\n } else {\n SwingUtilities.invokeLater(runnable);\n }\n\n// updateModelEntList(combinedRotatingMatrix);\n// if (backBuffer == null) {\n// buildImage = true;\n// }\n }",
"public void onDrawFrame( GL10 gl ) {\n\t\tgl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); \n\t\tgl.glLoadIdentity();\n\n\t\t\n\t\t//Move \"camera\"\n\t\tgl.glMatrixMode(GL10.GL_MODELVIEW);\n\t\tgl.glLoadIdentity();\n\t\t//gl.glTranslatef(x, y, z);\n\n\t\tQuaternion q= new Quaternion(qx,qy,qz,qw);\n\t\tVector3f rv = q.getEulerAngles();\n\t\tgl.glRotatef(rv.x, -1.0f, 0.0f, 0.0f);\n\t\tgl.glRotatef(rv.y, 0.0f, -1.0f, 0.0f);\n\t\tgl.glRotatef(rv.z, 0.0f, 0.0f, -1.0f);\n\t\t//End camera move\n\t\t\n\t\tgl.glTranslatef(-10*x, -10*y, -10*z);\n\t\t\n\t\n\t\t\n\t\t//gl.glRotatef(mCubeRotation, 1.0f, 1.0f, 1.0f);\n\n\t\tmCube.draw(gl);\n\t\t\n\t\t\n\t\t\n\n\t\tgl.glLoadIdentity(); \n\n\t\n\t\t\n\t\tmCubeRotation -= 0.15f; \n\n\t}",
"public void applyRotationForce(double force);",
"@Override\n public void onOrientationData(Myo myo, long timestamp, Quaternion rotation) {\n // Calculate Euler angles (roll, pitch, and yaw) from the quaternion.\n float roll = (float) Math.toDegrees(Quaternion.roll(rotation));\n float pitch = (float) Math.toDegrees(Quaternion.pitch(rotation));\n float yaw = (float) Math.toDegrees(Quaternion.yaw(rotation));\n\n // Adjust roll and pitch for the orientation of the Myo on the arm.\n if (myo.getXDirection() == XDirection.TOWARD_ELBOW) {\n roll *= -1;\n pitch *= -1;\n }\n/*\n // Next, we apply a rotation to the text view using the roll, pitch, and yaw.\n mTextView.setRotation(roll);\n mTextView.setRotationX(pitch);\n mTextView.setRotationY(yaw);*/\n }",
"public void onUpdate() {\n/* 89 */ this.lastTickPosX = this.posX;\n/* 90 */ this.lastTickPosY = this.posY;\n/* 91 */ this.lastTickPosZ = this.posZ;\n/* 92 */ super.onUpdate();\n/* 93 */ this.motionX *= 1.15D;\n/* 94 */ this.motionZ *= 1.15D;\n/* 95 */ this.motionY += 0.04D;\n/* 96 */ moveEntity(this.motionX, this.motionY, this.motionZ);\n/* 97 */ float var1 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);\n/* 98 */ this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);\n/* */ \n/* 100 */ for (this.rotationPitch = (float)(Math.atan2(this.motionY, var1) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F);\n/* */ \n/* */ \n/* */ \n/* */ \n/* 105 */ while (this.rotationPitch - this.prevRotationPitch >= 180.0F)\n/* */ {\n/* 107 */ this.prevRotationPitch += 360.0F;\n/* */ }\n/* */ \n/* 110 */ while (this.rotationYaw - this.prevRotationYaw < -180.0F)\n/* */ {\n/* 112 */ this.prevRotationYaw -= 360.0F;\n/* */ }\n/* */ \n/* 115 */ while (this.rotationYaw - this.prevRotationYaw >= 180.0F)\n/* */ {\n/* 117 */ this.prevRotationYaw += 360.0F;\n/* */ }\n/* */ \n/* 120 */ this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F;\n/* 121 */ this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F;\n/* */ \n/* 123 */ if (this.fireworkAge == 0 && !isSlient())\n/* */ {\n/* 125 */ this.worldObj.playSoundAtEntity(this, \"fireworks.launch\", 3.0F, 1.0F);\n/* */ }\n/* */ \n/* 128 */ this.fireworkAge++;\n/* */ \n/* 130 */ if (this.worldObj.isRemote && this.fireworkAge % 2 < 2)\n/* */ {\n/* 132 */ this.worldObj.spawnParticle(EnumParticleTypes.FIREWORKS_SPARK, this.posX, this.posY - 0.3D, this.posZ, this.rand.nextGaussian() * 0.05D, -this.motionY * 0.5D, this.rand.nextGaussian() * 0.05D, new int[0]);\n/* */ }\n/* */ \n/* 135 */ if (!this.worldObj.isRemote && this.fireworkAge > this.lifetime) {\n/* */ \n/* 137 */ this.worldObj.setEntityState(this, (byte)17);\n/* 138 */ setDead();\n/* */ } \n/* */ }",
"public void onSensorChanged(SensorEvent event) {\n\t\t\tint type = event.sensor.getType();\n\t\t\tif (type == Sensor.TYPE_ACCELEROMETER) {\n\t\t\t\tlong curTime = System.currentTimeMillis();\n\t\t\t\t// only allow one update every 100ms, otherwise updates\n\t\t\t\t// come way too fast and the phone gets bogged down\n\t\t\t\t// with garbage collection\n\t\t\t\t//Log.d(TAG, \"onSensorChanged(\"+type+\")\");\t\t\t\t\n\t\t\t\tif (lastUpdate == -1 || (curTime - lastUpdate) > 40) {\n\t\t\t\t\tlastUpdate = curTime;\t\t\t\t\n\t\t\t\t\tsynchronized (LOCK){\n\t\t\t\t\t\tmLastAccOrientation = calculateAngle(event);\n\t\t\t\t\t\tmLastSample.x = event.values[0];\n\t\t\t\t\t\tmLastSample.y = event.values[1];\n\t\t\t\t\t\tmLastSample.z = event.values[2];\n\t\t\t\t\t\tmLastSample.angle = mLastAccOrientation.angle;\t\t\n\t\t\t\t\t\t//mLastSample.orientation = mLastAccOrientation.orientation;\n\t\t\t\t\t\tmLastSample.orientation = mLastAccOrientation.rotation*90;\n\t\t\t\t\t\tmLastSample.threshold = mLastAccOrientation.threshold;\n\t\t\t\t\t\tmBuffer = mLastSample.x+\",\"+\n\t\t\t\t\t\t\t\t mLastSample.y+\",\"+\n\t\t\t\t\t\t\t\t mLastSample.z+\",\"+\n\t\t\t\t\t\t\t\t mLastSample.angle+\",\"+\n\t\t\t\t\t\t\t\t mLastSample.orientation+\",\"+\n\t\t\t\t\t\t\t\t mLastSample.threshold;\n\t\t\t\t\t\tif (mShowLog)\n\t\t\t\t\t\t\tLog.d(TAG, mBuffer);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"LocalMaterialData rotate();",
"public int getDeviceRotation();",
"private void remapGyroVector(){\n\t\tif (referenceGyroMatrix == null){\n\t\t\ttempGyroMatrix = new float[16];\n\t\t\treferenceGyroMatrix = new float[16];\n\t\t\tMatrix.setIdentityM(tempGyroMatrix, 0);\n\t\t\tSensorManager.remapCoordinateSystem(tempGyroMatrix, remapX, remapY, referenceGyroMatrix);\n\t\t\tSystem.arraycopy(referenceGyroMatrix, 0, tempGyroMatrix, 0, 16);\n\t\t\tthis.remappedGyro = new float[4];\n\t\t\tthis.tempGyroValues = new float[4];\n\t\t\t//need to transpose, since sensor manager and matrix use different notations\n\t\t\t//Matrix.transposeM(referenceGyroMatrix, 0, tempGyroMatrix, 0);\n\t\t}\n\t\t\n\t\tfloat[] gyroValues = getValues(VALUE_KEYS.GYRO.name());\n\t\t//System.arraycopy(gyroValues, 0, this.gyroValues, 0, 3);\n\t\tSystem.arraycopy(gyroValues, 0, this.tempGyroValues, 0, 3);\n\t\tMatrix.multiplyMV(this.remappedGyro, 0, referenceGyroMatrix, 0, this.tempGyroValues, 0);\n\t\tSystem.arraycopy(this.remappedGyro, 0, this.finalGyroValues, 0, 3);\n\t\t\n\t}",
"private void applyTransform() {\n GlStateManager.rotate(180, 1.0F, 0.0F, 0.0F);\n GlStateManager.translate(offsetX, offsetY - 26, offsetZ);\n }",
"@Override\n public int getCameraOrientation() {\n return characteristics_sensor_orientation;\n }",
"public void setRotation(int newRotation) {\n\n int progressVal = newRotation + Math.round(thisNumLEDs / 2);\n\n // If the new rotation would put the rotation value out of range, then ignore it\n\n if (progressVal < 0 | thisNumLEDs < progressVal) {\n return;\n }\n\n // Update the rotation to the new value\n currentRotation = newRotation;\n\n // Update all required widgets\n sliceRotateView.setText(Integer.toString(currentRotation));\n sliceRotateSlider.setProgress(progressVal);\n\n\n // Redraw the pattern\n updatePattern();\n }",
"public abstract void setRequestedOrientation(int requestedOrientation);",
"@Override\n\tpublic void onSensorChanged(SensorEvent event) {\n\t\trawSensorValue = Math.round(event.values[0]); \n\t\twhile (rawSensorValue < 0) rawSensorValue += 360;\n\t\tm_azimuth_degrees = rawSensorValue - m_sun_azimuth_degrees;\n\t\twhile (m_azimuth_degrees < 0) m_azimuth_degrees += 360;\n\t\t\n\t\t// get pitch value\n\t\tint rotation = activity.getWindowManager().getDefaultDisplay().getRotation();\n\t\tif ((rotation == 0) || (rotation == 2)) m_pitch_degrees = Math.abs((int)event.values[1]); \n\t\telse m_pitch_degrees = Math.abs((int)event.values[2]);\n\t\t\n\t\t// Update event\n\t\tif (m_parent != null) m_parent.onSensorChanged(event);\n\t}",
"@Override\n public void onSensorChanged(SensorEvent event) {\n float degree = Math.round(event.values[0]);\n\n // create a rotation animation (reverse turn degree degrees)\n RotateAnimation ra = new RotateAnimation(\n currentDegree,\n -degree,\n Animation.RELATIVE_TO_SELF, 0.5f,\n Animation.RELATIVE_TO_SELF,\n 0.5f);\n\n // how long the animation will take place\n ra.setDuration(210);\n\n // set the animation after the end of the reservation status\n ra.setFillAfter(true);\n\n // Start the animation\n image.startAnimation(ra);\n currentDegree = -degree;\n\n }",
"public void setRenderRotation(float rad) {\n if(mNativeAddress != 0)\n nativeSetRenderRotation(mNativeAddress, rad);\n }",
"private void transformation(GL gl)\n {\n\t\t// Make X axis face forward, Y right, Z up\n\t\t// (map ZXY to XYZ)\n\t\tgl.glRotated(-90, 1, 0, 0);\n\t\tgl.glRotated(-90, 0, 0, 1);\n\t \n\t\tif (drawBugView.value) {\n\t\t // ---- \"Bug cam\" transformation (for mainBug)\n\t\t\t// this is the inverse of the M transformation that places the bug in the scene (based on mainbug pos and vel)\n double angle = Math.atan2(mainBug.vel.y, mainBug.vel.x);\n \t\tgl.glRotated(Math.toDegrees(Math.PI - angle), 0, 0, 1);\n \t\t\n \t\t//drawing a bit above the z axis so we can see the ground\n\t\t\tgl.glTranslated(-mainBug.pos.x, -mainBug.pos.y, -mainBug.pos.z-0.2);\n\t\t} else {\n\t\t // ---- Ordinary scene transformation\n\t\n\t\t // Move camera back so that scene is visible\n\t\t gl.glTranslated(-20, 0, 0);\n\t\t \n\t\t // Translate by Zoom/Horiz/Vert\n\t\t gl.glTranslated(tZ.value, tH.value, tV.value);\n\t\t \n\t\t // Rotate by Alt/Azim\n\t\t gl.glRotated(rAlt.value, 0, 1, 0);\n\t\t gl.glRotated(rAzim.value, 0, 0, 1);\n\t\t}\n }",
"public void setRotation(int degree) {\n\trotation = degree;\n}",
"private void initCamera(SubScene scene, Group root){\n //Create a perspective camera for 3D use and add it to the scene.\n PerspectiveCamera camera = new PerspectiveCamera(true);\n scene.setCamera(camera);\n\n //Set the camera's field of view, near and far pane, and starting zoom.\n camera.setFieldOfView(80);\n camera.setNearClip(1);\n camera.setFarClip(5000);\n camera.setTranslateZ(-1000);\n\n //Initiate the rotation objects used for rotating the camera about the world.\n Rotate xRotate = new Rotate(0, Rotate.X_AXIS);\n Rotate yRotate = new Rotate(0, Rotate.Y_AXIS);\n root.getTransforms().addAll(xRotate, yRotate);\n\n //Bind the property so it automatically updates.\n xRotate.angleProperty().bind(angleX);\n yRotate.angleProperty().bind(angleY);\n\n //Add an event listener to track the start of a mouse drag when the mouse is clicked.\n scene.setOnMousePressed(event -> {\n dragStartX = event.getSceneX();\n dragStartY = event.getSceneY();\n anchorAngleX = angleX.get();\n anchorAngleY = angleY.get();\n });\n\n //Add an event listener to update the rotation objects based on the distance dragged.\n scene.setOnMouseDragged(event -> {\n //A modifier (0.2 in this case) is used to control the sensitivity.\n Double newAngleX = anchorAngleX - (dragStartY - event.getSceneY())*0.2;\n //Restrict the rotation to angles less than 90.\n if(newAngleX > 90){\n angleX.set(90);\n //Restrict the rotation to angles greater than 5.\n } else if (newAngleX < 5){\n angleX.set(5);\n } else {\n angleX.set(newAngleX);\n }\n angleY.set(anchorAngleY + (dragStartX - event.getSceneX())*0.2);\n });\n\n //Add an event listener to move the camera away or towards the scene using the mouse wheel.\n scene.setOnScroll(event -> {\n Double delta = event.getDeltaY();\n //If the mouse scrolls in, and the camera is not too close, then move the camera closer.\n if(delta > 0 && camera.getTranslateZ() <= -100){\n camera.setTranslateZ(camera.getTranslateZ()*0.975);\n //Else, if the mouse scrolls out and it's not too far away, then move the camera away.\n } else if(delta <0 && camera.getTranslateZ() >= -3000){\n camera.setTranslateZ(camera.getTranslateZ()* 1/0.975);\n }\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 }",
"public static void setCameraFrame() {\n\t\tCAMERA.src = VERTICES[CAMERA.v];\n\t\tVector zc = CAMERA.src.d.scale(-1).normalized();\n\t\tCAMERA.zAxis = zc;\n\t\tVector xc = MathUtils.cross(CAMERA.src.d, new Vector(0, 1, 0)).normalized();\n\t\tCAMERA.xAxis = xc;\n\t\tVector yc = MathUtils.cross(zc, xc).normalized();\n\t\tCAMERA.yAxis = yc;\n\t\t\n\t\tSystem.out.println(\"***** just set camera: \" + CAMERA.toString());\n\t}",
"public void updateOrientation(Location loc)\n {\n orientation = new Orientation(loc);\n }",
"private void determineOrientation(float[] rotationMatrix) {\n\t\t\t float[] orientationValues = new float[3];\n\t\t SensorManager.getOrientation(rotationMatrix, orientationValues);\n\t\t double azimuth = Math.toDegrees(orientationValues[0]);\n\t\t double pitch = Math.toDegrees(orientationValues[1]);\n\t\t double roll = Math.toDegrees(orientationValues[2]);\n\t\t if (pitch <= 10)\n\t\t { \n\t\t if (Math.abs(roll) >= 170)\n\t\t {\n\t\t onFaceDown();\n\t\t }\n\t\t else if (Math.abs(roll) <= 10)\n\t\t {\n\t\t onFaceUp();\n\t\t }\n\t\t }\n\t\t\t\n\t\t}",
"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 }",
"public void apply() {\n\t\tglTranslated(0, 0, -centerDistance);\n\t\tglRotated(pitch, 1, 0, 0);\n\t\tglRotated(yaw, 0, 0, 1);\n\t\tglScaled(scale, scale, scale);\n\n\t\tglTranslated(-pos.get(0), -pos.get(1), -pos.get(2));\n\t}",
"@VisibleForTesting\n public void setDisplayRotation(DisplayRotation displayRotation) {\n this.mDisplayRotation = displayRotation;\n }",
"public void update() {\n\t\tupdateCamera();\n\t}",
"@Override\n public void onSensorChanged(android.hardware.SensorEvent event) {\n int azimuth = (int) event.values[0];\n switch (cz.kruch.track.TrackingMIDlet.getActivity().orientation) {\n case 0: // portrait\n // nothing to do\n break;\n case 1: // landscape\n azimuth = (azimuth + 90) % 360;\n break;\n case 2: // portrait reversed\n azimuth = (azimuth + 180) % 360;\n break;\n case 3: // landscape reversed\n azimuth = (azimuth + 270) % 360;\n break;\n }\n// android.util.Log.w(\"TrekBuddy\", \"[app] fixed azimuth = \" + azimuth);\n notifySenser(azimuth);\n }",
"@SuppressWarnings(\"SuspiciousNameCombination\")\n @NonNull\n private Size applyPreviewToSensorRotation(@NonNull Size referenceSize,\n @NonNull PointF referencePoint) {\n int angle = angles.offset(Reference.SENSOR, Reference.VIEW, Axis.ABSOLUTE);\n boolean flip = angle % 180 != 0;\n float tempX = referencePoint.x;\n float tempY = referencePoint.y;\n if (angle == 0) {\n referencePoint.x = tempX;\n referencePoint.y = tempY;\n } else if (angle == 90) {\n referencePoint.x = tempY;\n referencePoint.y = referenceSize.getWidth() - tempX;\n } else if (angle == 180) {\n referencePoint.x = referenceSize.getWidth() - tempX;\n referencePoint.y = referenceSize.getHeight() - tempY;\n } else if (angle == 270) {\n referencePoint.x = referenceSize.getHeight() - tempY;\n referencePoint.y = tempX;\n } else {\n throw new IllegalStateException(\"Unexpected angle \" + angle);\n }\n return flip ? referenceSize.flip() : referenceSize;\n }",
"public void calibrateGyro() {\n gyro.SetYaw(0);\n }",
"@Override\n public boolean onTouchEvent(MotionEvent e) {\n\n float x = e.getX();\n float y = e.getY();\n\n switch (e.getAction()) {\n case MotionEvent.ACTION_DOWN:\n //erwanGLRenderer.startRotating(x,y);\n break;\n case MotionEvent.ACTION_UP:\n //erwanGLRenderer.stopRotating();\n break;\n case MotionEvent.ACTION_MOVE:\n //erwanGLRenderer.updateRotation(x,y);\n break;\n }\n return true;\n }",
"public void setRotation(float newRotation, PointF newPivot)\n {\n this.rotation = newRotation;\n this.rotationPivot = newPivot;\n \n updateTransform();\n notifyParentOfPositionChange();\n conditionallyRepaint();\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 }"
]
| [
"0.662236",
"0.6619188",
"0.66110146",
"0.65679413",
"0.6519934",
"0.65032685",
"0.64863986",
"0.64844525",
"0.63010794",
"0.629706",
"0.6231699",
"0.62286615",
"0.6220284",
"0.6219288",
"0.6217746",
"0.6119846",
"0.6099922",
"0.60904384",
"0.60816646",
"0.607974",
"0.6074477",
"0.6064511",
"0.605417",
"0.6043833",
"0.60273",
"0.6011845",
"0.60066456",
"0.5961039",
"0.5958803",
"0.5958348",
"0.5947043",
"0.5929096",
"0.5920916",
"0.5917841",
"0.59078044",
"0.59059614",
"0.58989644",
"0.5894436",
"0.5890807",
"0.5868787",
"0.5861682",
"0.58596814",
"0.585306",
"0.58525497",
"0.58447516",
"0.5837864",
"0.583703",
"0.5827333",
"0.5822469",
"0.58183146",
"0.58008164",
"0.5794833",
"0.57879543",
"0.57574767",
"0.5757032",
"0.5752",
"0.573548",
"0.5734932",
"0.57349294",
"0.5724253",
"0.5723638",
"0.57204455",
"0.5688878",
"0.5684467",
"0.5659538",
"0.56501526",
"0.5637875",
"0.56191707",
"0.56138474",
"0.56092924",
"0.5608253",
"0.56031036",
"0.5602222",
"0.5598595",
"0.55833095",
"0.5582084",
"0.5575804",
"0.55741894",
"0.5566532",
"0.5553351",
"0.5549935",
"0.5544562",
"0.55387443",
"0.5532711",
"0.5527382",
"0.55252",
"0.552141",
"0.55075026",
"0.55051214",
"0.54997563",
"0.54994464",
"0.54955554",
"0.5484351",
"0.5483834",
"0.5478824",
"0.54770046",
"0.54739356",
"0.5472446",
"0.5470619",
"0.54694957"
]
| 0.59042025 | 36 |
Updates the pitch matrix after a physical rotation or touch input. The pitch matrix rotation is applied on an axis that is dependent on device rotation so this must be called after either touch or sensor update. | @AnyThread
private void updatePitchMatrix() {
// The camera's pitch needs to be rotated along an axis that is parallel to the real world's
// horizon. This is the <1, 0, 0> axis after compensating for the device's roll.
Matrix.setRotateM(touchPitchMatrix, 0,
-touchPitch, (float) Math.cos(deviceRoll), (float) Math.sin(deviceRoll), 0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n default void appendPitchRotation(double pitch)\n {\n AxisAngleTools.appendPitchRotation(this, pitch, this);\n }",
"public final MotionUpdateEvent setPitch(float pitch) {\n rotations.setY(pitch);\n return this;\n }",
"@Override\n default void prependPitchRotation(double pitch)\n {\n AxisAngleTools.prependPitchRotation(pitch, this, this);\n }",
"@UiThread\n public synchronized void setPitchOffset(float pitchDegrees) {\n touchPitch = pitchDegrees;\n updatePitchMatrix();\n }",
"public void pitch(double angle) {\n heading = rotateVectorAroundAxis(heading, left, angle);\r\n up = rotateVectorAroundAxis(up, left, angle);\r\n\r\n }",
"public void updateOrientationAngles() {\n // Update rotation matrix, which is needed to update orientation angles.\n //mSensorManager.getRotationMatrix(mRotationMatrix, null,\n // mAccelerometerReading, mMagnetometerReading);\n\n // \"mRotationMatrix\" now has up-to-date information.\n\n mSensorManager.getOrientation(mRotationMatrix, mOrientationAngles);\n\n // \"mOrientationAngles\" now has up-to-date information.\n\n mGLView.updateScene(mOrientationAngles[0],mOrientationAngles[1],mOrientationAngles[2]);\n }",
"public void setPitch(int pitch) {\n mSelf.setPitch(pitch);\n }",
"public void updateRotations() {\n try {\n switch (this.mode) {\n case Packet:\n mc.player.renderYawOffset = this.yaw;\n mc.player.rotationYawHead = this.yaw;\n break;\n case Legit:\n mc.player.rotationYaw = this.yaw;\n mc.player.rotationPitch = this.pitch;\n break;\n case None:\n break;\n }\n } catch (Exception ignored) {\n\n }\n }",
"public void updateOrientationAngles() {\n SensorManager.getRotationMatrix(rotationMatrix, null,\n accelerometerReading, magnetometerReading);\n\n // \"mRotationMatrix\" now has up-to-date information.\n\n float[] angles = SensorManager.getOrientation(rotationMatrix, orientationAngles);\n azimuth = (float) Math.toDegrees(angles[0]);\n // \"mOrientationAngles\" now has up-to-date information.\n TextView az = findViewById(R.id.az);\n rotateDriver(azimuth);\n\n az.setText(Float.toString(azimuth));\n }",
"public void setPitch(int pitch);",
"public void update() {\n\t\tmrRoboto.move();\n\t\tobsMatrix.updateSensor(mrRoboto.x, mrRoboto.y);\n\t\thmm.updateProb(obsMatrix.getSensorReading());\n\t}",
"private void updateRotation(float[] rotationVector) {\n // Get rotation's based on vector locations\n getRotationMatrixFromVector(mRotationMatrix, rotationVector);\n\n final int worldAxisForDeviceAxisX;\n final int worldAxisForDeviceAxisY;\n\n // Remap the axes as if the device screen was the instrument panel, and adjust the rotation\n // matrix for the device orientation.\n switch (mWindowManager.getDefaultDisplay().getRotation()) {\n case Surface.ROTATION_0:\n default:\n worldAxisForDeviceAxisX = SensorManager.AXIS_X;\n worldAxisForDeviceAxisY = SensorManager.AXIS_Z;\n break;\n case Surface.ROTATION_90:\n worldAxisForDeviceAxisX = SensorManager.AXIS_Z;\n worldAxisForDeviceAxisY = SensorManager.AXIS_MINUS_X;\n break;\n case Surface.ROTATION_180:\n worldAxisForDeviceAxisX = SensorManager.AXIS_MINUS_X;\n worldAxisForDeviceAxisY = SensorManager.AXIS_MINUS_Z;\n break;\n case Surface.ROTATION_270:\n worldAxisForDeviceAxisX = SensorManager.AXIS_MINUS_Z;\n worldAxisForDeviceAxisY = SensorManager.AXIS_X;\n break;\n }\n\n remapCoordinateSystem(\n mRotationMatrix,\n worldAxisForDeviceAxisX,\n worldAxisForDeviceAxisY,\n mAdjustedRotationMatrix);\n\n // Transform rotation matrix into azimuth/pitch/roll\n getOrientation(mAdjustedRotationMatrix, mOrientation);\n\n // Convert radians to degrees and flat\n float newX = (float) Math.toDegrees(mOrientation[1]);\n float newZ = (float) Math.toDegrees(mOrientation[0]);\n\n // How many degrees has the users head rotated since last time.\n float deltaX = applyThreshold(angularRounding(newX - mOldX));\n float deltaZ = applyThreshold(angularRounding(newZ - mOldZ));\n\n // Ignore first head position in order to find base line\n if (!mInitialized) {\n mInitialized = true;\n deltaX = 0;\n deltaZ = 0;\n }\n\n mOldX = newX;\n mOldZ = newZ;\n\n mListener.onTilt((int) deltaZ * 60, (int) deltaX * 60);\n }",
"public float getPitch() {\n return pitch_;\n }",
"public float getPitch() {\n return pitch_;\n }",
"public void setRotation ( float yaw , float pitch ) {\n\t\t// TODO: backwards compatibility required\n\t\texecute ( handle -> handle.setRotation ( yaw , pitch ) );\n\t}",
"@Override\n public void gyroPitch(int value, int timestamp) {\n }",
"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 float getPitch() {\n return pitch_;\n }",
"public float getPitch() {\n return pitch_;\n }",
"public synchronized double getPitch() {\n\t\tif (isConnected) {\n\t\t\treturn gyro.getPitch();\n\t\t}\n\t\telse {\n\t\t\treturn 0;\n\t\t}\n\t}",
"private void adjustPitch(double tick) {\n\t\tif(pitch < targetPitch) {\n\t\t\taddPitch((float)tick * deltaPitch);\n\t\t\tif(pitch >= targetPitch)\n\t\t\t\tsetPitch(targetPitch);\n\t\t} else if(pitch > targetPitch) {\n\t\t\taddPitch((float)tick * deltaPitch);\n\t\t\tif(pitch <= targetPitch)\n\t\t\t\tsetPitch(targetPitch);\n\t\t}\n\t}",
"private void updateTransform() {\n Matrix matrix = new Matrix();\n float centerX = dataBinding.viewFinder.getWidth() / 2f;\n float centerY = dataBinding.viewFinder.getHeight() / 2f;\n int rotation = dataBinding.viewFinder.getDisplay().getRotation();\n int rotationDegrees = 0;\n switch (rotation) {\n case Surface.ROTATION_0:\n rotationDegrees = 0;\n break;\n case Surface.ROTATION_90:\n rotationDegrees = 90;\n break;\n case Surface.ROTATION_180:\n rotationDegrees = 180;\n break;\n case Surface.ROTATION_270:\n rotationDegrees = 270;\n break;\n default:\n }\n matrix.postRotate(-rotationDegrees, centerX, centerY);\n }",
"public void setPitch(float pitch) {\n\t\tthis.pitch = pitch;\n\t\ttargetPitch = pitch;\n\t\tAL10.alSourcef(id, AL10.AL_PITCH, pitch);\n\t}",
"public void setCamPitch(double pitchDegrees){\n kCamPitch = Units.degreesToRadians(pitchDegrees);\n }",
"public float getPitch() {\n return pitch;\n }",
"@Override\r\n\tpublic void onOrientationChanged(float azimuth, float pitch, float roll) {\n\r\n\t}",
"@BinderThread\n public synchronized void setDeviceOrientation(float[] matrix, float deviceRoll) {\n System.arraycopy(matrix, 0, deviceOrientationMatrix, 0, deviceOrientationMatrix.length);\n this.deviceRoll = -deviceRoll;\n updatePitchMatrix();\n }",
"public void rotate(double yaw, double pitch)\n {\n this.rotate(yaw, pitch, 0);\n }",
"void onOrientationChanged(float azimuth, float pitch, float roll);",
"@Override\n\tpublic void onSensorChanged(SensorEvent event) {\n\t\trawSensorValue = Math.round(event.values[0]); \n\t\twhile (rawSensorValue < 0) rawSensorValue += 360;\n\t\tm_azimuth_degrees = rawSensorValue - m_sun_azimuth_degrees;\n\t\twhile (m_azimuth_degrees < 0) m_azimuth_degrees += 360;\n\t\t\n\t\t// get pitch value\n\t\tint rotation = activity.getWindowManager().getDefaultDisplay().getRotation();\n\t\tif ((rotation == 0) || (rotation == 2)) m_pitch_degrees = Math.abs((int)event.values[1]); \n\t\telse m_pitch_degrees = Math.abs((int)event.values[2]);\n\t\t\n\t\t// Update event\n\t\tif (m_parent != null) m_parent.onSensorChanged(event);\n\t}",
"public void setPitch(float pitch) {\n\t\talSourcef(musicSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(reverseSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(flangeSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(revFlangeSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(wahSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(revWahSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(wahFlangeSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(revWahFlangeSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(distortSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(revDistortSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(distortFlangeSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(revDistortFlangeSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(wahDistortSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(revWahDistortSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(wahDistortFlangeSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(revWahDistortFlangeSourceIndex, AL_PITCH, pitch);\n\t}",
"@Override\n public double getPitch()\n {\n Vector3d modelIntersect = getModelIntersection();\n if (modelIntersect == null)\n {\n return 0;\n }\n modelIntersect = modelIntersect.getNormalized();\n Vector3d projectedIntersect = Plane.unitProjection(myPosition.getDir().multiply(-1), modelIntersect).getNormalized();\n // Now calculate angle between vectors (and keep sign)\n Vector3d orthogonal = myPosition.getRight().multiply(-1);\n Vector3d cross = modelIntersect.cross(projectedIntersect);\n double dot = modelIntersect.dot(projectedIntersect);\n double resultAngle = Math.atan2(orthogonal.dot(cross), dot);\n double ninetyDegrees = Math.toRadians(90);\n return Math.signum(resultAngle) < 0 ? -1 * (ninetyDegrees - Math.abs(resultAngle)) : ninetyDegrees - resultAngle;\n }",
"public void onUpdate() {\n/* 89 */ this.lastTickPosX = this.posX;\n/* 90 */ this.lastTickPosY = this.posY;\n/* 91 */ this.lastTickPosZ = this.posZ;\n/* 92 */ super.onUpdate();\n/* 93 */ this.motionX *= 1.15D;\n/* 94 */ this.motionZ *= 1.15D;\n/* 95 */ this.motionY += 0.04D;\n/* 96 */ moveEntity(this.motionX, this.motionY, this.motionZ);\n/* 97 */ float var1 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);\n/* 98 */ this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);\n/* */ \n/* 100 */ for (this.rotationPitch = (float)(Math.atan2(this.motionY, var1) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F);\n/* */ \n/* */ \n/* */ \n/* */ \n/* 105 */ while (this.rotationPitch - this.prevRotationPitch >= 180.0F)\n/* */ {\n/* 107 */ this.prevRotationPitch += 360.0F;\n/* */ }\n/* */ \n/* 110 */ while (this.rotationYaw - this.prevRotationYaw < -180.0F)\n/* */ {\n/* 112 */ this.prevRotationYaw -= 360.0F;\n/* */ }\n/* */ \n/* 115 */ while (this.rotationYaw - this.prevRotationYaw >= 180.0F)\n/* */ {\n/* 117 */ this.prevRotationYaw += 360.0F;\n/* */ }\n/* */ \n/* 120 */ this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F;\n/* 121 */ this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F;\n/* */ \n/* 123 */ if (this.fireworkAge == 0 && !isSlient())\n/* */ {\n/* 125 */ this.worldObj.playSoundAtEntity(this, \"fireworks.launch\", 3.0F, 1.0F);\n/* */ }\n/* */ \n/* 128 */ this.fireworkAge++;\n/* */ \n/* 130 */ if (this.worldObj.isRemote && this.fireworkAge % 2 < 2)\n/* */ {\n/* 132 */ this.worldObj.spawnParticle(EnumParticleTypes.FIREWORKS_SPARK, this.posX, this.posY - 0.3D, this.posZ, this.rand.nextGaussian() * 0.05D, -this.motionY * 0.5D, this.rand.nextGaussian() * 0.05D, new int[0]);\n/* */ }\n/* */ \n/* 135 */ if (!this.worldObj.isRemote && this.fireworkAge > this.lifetime) {\n/* */ \n/* 137 */ this.worldObj.setEntityState(this, (byte)17);\n/* 138 */ setDead();\n/* */ } \n/* */ }",
"public float getPitch() {\n\treturn pitch;\n }",
"public void addPitch(float pitch) {\n\t\tthis.pitch += pitch;\n\t\tAL10.alSourcef(id, AL10.AL_PITCH, this.pitch);\n\t}",
"@Override\n public void onDrawFrame(GL10 gl) {\n synchronized (this) {\n Matrix.multiplyMM(tempMatrix, 0, deviceOrientationMatrix, 0, touchYawMatrix, 0);\n Matrix.multiplyMM(viewMatrix, 0, touchPitchMatrix, 0, tempMatrix, 0);\n }\n\n Matrix.multiplyMM(viewProjectionMatrix, 0, projectionMatrix, 0, viewMatrix, 0);\n scene.glDrawFrame(viewProjectionMatrix, Type.MONOCULAR);\n }",
"float getPitch();",
"float getPitch();",
"public void applyTransform() {\n\t\tglRotatef(xaxisrot, 1.0f, 0.0f, 0.0f);\n\t\tglRotatef(yaxisrot, 0.0f, 1.0f, 0.0f);\n\t\tglRotatef(tilt, 0.0f, 0.0f, 1.0f);\n\t\tglTranslatef(-pos.geti(), -pos.getj(), -pos.getk());\n\t}",
"public void pitch(float amount)\r\n {\r\n //increment the pitch by the amount param\r\n pitch -= amount;\r\n }",
"double getPitch();",
"public float getPitchAngle() { return PitchAngle; }",
"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}",
"@Override\r\n public void updateMixer() {\n playerPosition = mixer.getGlobalCoordinates();\r\n playerOrientation = mixer.getGlobalOrientation();\r\n }",
"public void handleToggleButtonPitch() {\n\t\tif (toggleButtonPitch.isSelected()) {\n\t\t\tcontroller.audioManipulatorUsePitchProcessor(true);\n\t\t\tsliderPitch.setDisable(false);\n\t\t\ttextFieldPitch.setDisable(false);\n\t\t\ttoggleButtonPitch.setText(bundle.getString(\"mixerToggleButtonOn\"));\n\n\t\t} else if (!toggleButtonPitch.isSelected()) {\n\t\t\tcontroller.audioManipulatorUsePitchProcessor(false);\n\t\t\tsliderPitch.setDisable(true);\n\t\t\ttextFieldPitch.setDisable(true);\n\t\t\ttoggleButtonPitch.setText(bundle.getString(\"mixerToggleButtonOff\"));\n\t\t}\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 setSoundPitch(float soundPitch) {\n _soundPitch = soundPitch;\n }",
"@Override\n\t\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\t float[] rotationMatrix;\n\t\t\t rotationMatrix = new float[16];\n\t SensorManager.getRotationMatrixFromVector(rotationMatrix,\n\t event.values);\n\t determineOrientation(rotationMatrix);\n\t\t\t\n\t\t}",
"@Override\n public void onSensorChanged(SensorEvent event) {\n\n float valueAzimuth = event.values[0];\n float valuePitch = event.values[1];\n\n parent.updateAccelerometer(\n valueAzimuth / maximumRange, -valuePitch / maximumRange);\n\n }",
"public void setPitch(float hertz) {\n\tthis.pitch = hertz;\n }",
"@Override\n public void onSensorChanged(SensorEvent event) {\n mOrientation = event.values[0];\n }",
"public void apply() {\n\t\tglTranslated(0, 0, -centerDistance);\n\t\tglRotated(pitch, 1, 0, 0);\n\t\tglRotated(yaw, 0, 0, 1);\n\t\tglScaled(scale, scale, scale);\n\n\t\tglTranslated(-pos.get(0), -pos.get(1), -pos.get(2));\n\t}",
"public void updateController() {\n\t\tjoystickLXAxis = controller.getRawAxis(portJoystickLXAxis);\t\t//returns a value [-1,1]\n\t\tjoystickLYAxis = controller.getRawAxis(portJoystickLYAxis);\t\t//returns a value [-1,1]\n\t\tjoystickLPress = controller.getRawButton(portJoystickLPress);\t//returns a value {0,1}\n\t\t\n\t\t//right joystick update\n\t\tjoystickRXAxis = controller.getRawAxis(portJoystickRXAxis);\t\t//returns a value [-1,1]\n\t\tjoystickRYAxis = controller.getRawAxis(portJoystickRYAxis);\t\t//returns a value [-1,1]\n\t\tjoystickRPress = controller.getRawButton(portJoystickRPress);\t//returns a value {0,1}\n\t\t\n\t\t//trigger updates\n\t\ttriggerL = controller.getRawAxis(portTriggerL);\t\t//returns a value [0,1]\n\t\ttriggerR = controller.getRawAxis(portTriggerR);\t\t//returns a value [0,1]\n\t\t\n\t\t//bumper updates\n\t\tbumperL = controller.getRawButton(portBumperL);\t\t//returns a value {0,1}\n\t\tbumperR = controller.getRawButton(portBumperR);\t\t//returns a value {0,1}\n\t\t\n\t\t//button updates\n\t\tbuttonX = controller.getRawButton(portButtonX);\t\t//returns a value {0,1}\n\t\tbuttonY = controller.getRawButton(portButtonY);\t\t//returns a value {0,1}\n\t\tbuttonA = controller.getRawButton(portButtonA);\t\t//returns a value {0,1}\n\t\tbuttonB = controller.getRawButton(portButtonB);\t\t//returns a value {0,1}\n\t\t\n\t\tbuttonBack = controller.getRawButton(portButtonBack);\t//returns a value {0,1}\n\t\tbuttonStart = controller.getRawButton(portButtonStart);\t//returns a value {0,1}\n\t\t\n\t\t//toggle checks\n\t\ttankDriveBool = checkButton(buttonX, tankDriveBool, portButtonX);\t\t//toggles boolean if button is pressed\n\t\tfastBool = checkButton(buttonB, fastBool, portButtonB);\t\t\t\t\t//toggles boolean if button is pressed\n\t\t\n\t\t\n\t\t//d-pad/POV updates\n\t\tdPad = controller.getPOV(portDPad);\t\t//returns a value {-1,0,45,90,135,180,225,270,315}\n\n\t\t//d-pad/POV turns\n\t\tif (dPad != -1) {\n\t\t\tdPad = 360 - dPad; //Converts the clockwise dPad rotation into a Gyro-readable counterclockwise rotation.\n\t\t\trotateTo(dPad);\n\t\t}\n\t\t\n\t\tjoystickDeadZone();\n\t}",
"public void onSensorChanged(SensorEvent event) {\n switch (event.sensor.getType()) {\n case Sensor.TYPE_ACCELEROMETER:\n acceleration_vals = event.values.clone();\n break;\n case Sensor.TYPE_MAGNETIC_FIELD:\n magnetic_vals = event.values.clone();\n break;\n }\n \n \n // If we have all the necessary data, update the orientation.\n if (acceleration_vals != null && magnetic_vals != null) {\n float[] R = new float[16];\n float[] I = new float[16];\n \n SensorManager.getRotationMatrix(R, I, acceleration_vals, \n magnetic_vals);\n \n float[] orientation = new float[3];\n SensorManager.getOrientation(R, orientation);\n \n acceleration_vals = null;\n magnetic_vals = null;\n \n // Use the pitch to determine whether we are in ID mode or\n // conference mode.\n if (orientation[1] <= -0.2) { // we're in conference mode\n this.setRequestedOrientation(\n ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n showScheduleView();\n } else if (orientation[1] >= 0.2) { // we're in ID mode\n this.setRequestedOrientation(\n ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT);\n showBadgeView();\n }\n }\n }",
"private void updateRotated() {\r\n\r\n\tfor (int n = 0; n < npoints * 3; n += 3) {\r\n\r\n\t // take the linear sum of local co-ords with local\r\n\t // unit vectors and then translate by adding the local\r\n\t // origin's co-ords\r\n\t ps[n] = locals[n] * i[0] + locals[n + 1] * j[0] + locals[n + 2] * k[0];\r\n\t ps[n + 1] = locals[n] * i[1] + locals[n + 1] * j[1] + locals[n + 2] * k[1];\r\n\t ps[n + 2] = locals[n] * i[2] + locals[n + 1] * j[2] + locals[n + 2] * k[2];\r\n\r\n\t ps[n] += p[0];\r\n\t ps[n + 1] += p[1];\r\n\t ps[n + 2] += p[2];\r\n\t}\r\n\r\n\t// reset bounding box and clear dirty flags\r\n\tbox.setBB();\r\n\tdirtyR = false;\r\n\tdirtyT = false;\r\n\r\n\t// normals must be reset\r\n\tthis.setNormals();\r\n\r\n\t// finally\r\n\t_p[0] = p[0];\r\n\t_p[1] = p[1];\r\n\t_p[2] = p[2];\r\n\t_roll = roll;\r\n }",
"@Override\n public void onSensorChanged(SensorEvent event) {\n // Log.i(TAG, event + \"\");\n for (int i = 0; i < mListeners.size(); i++) {\n mListeners.get(i).setAzimuthPitchRoll(event.values);\n }\n }",
"private void determineOrientation(float[] rotationMatrix) {\n\t\t\t float[] orientationValues = new float[3];\n\t\t SensorManager.getOrientation(rotationMatrix, orientationValues);\n\t\t double azimuth = Math.toDegrees(orientationValues[0]);\n\t\t double pitch = Math.toDegrees(orientationValues[1]);\n\t\t double roll = Math.toDegrees(orientationValues[2]);\n\t\t if (pitch <= 10)\n\t\t { \n\t\t if (Math.abs(roll) >= 170)\n\t\t {\n\t\t onFaceDown();\n\t\t }\n\t\t else if (Math.abs(roll) <= 10)\n\t\t {\n\t\t onFaceUp();\n\t\t }\n\t\t }\n\t\t\t\n\t\t}",
"public void updateRenderCameraPose(TangoPoseData cameraPose) {\n float[] rotation = cameraPose.getRotationAsFloats();\n float[] translation = cameraPose.getTranslationAsFloats();\n Quaternion quaternion = new Quaternion(rotation[3], rotation[0], rotation[1], rotation[2]);\n // Conjugating the Quaternion is need because Rajawali uses left handed convention for\n // quaternions.\n getCurrentCamera().setRotation(quaternion.conjugate());\n getCurrentCamera().setPosition(translation[0], translation[1], translation[2]);\n }",
"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}",
"public void update() {\n\t\tupdateController();\n\t\tupdateTimer();\n\t\tupdateTrifecta();\n\t\tupdateGyro();\n\t\tupdateGameTime();\n\t\t//updateTilt();\n\t}",
"@Override\n public void onOrientationChanged(double orientation, double tilt) {\n if (!getUserVisibleHint()) {\n return;\n }\n if (mMap == null) {\n return;\n }\n\n /*\n If we're in map mode, we have a location fix, and we have a preference to rotate the map based on sensors,\n then do the map camera reposition\n */\n if (mMapController.getMode().equals(MODE_MAP) && mMyLocationMarker != null && mRotate) {\n mMap.setMapOrientation((float) -orientation);\n }\n mMap.invalidate();\n }",
"@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 void updateRenderAngles() {\n }",
"@Override\n\tpublic void onHeadingSensorChanged(float[] orientation) {\n\t\t\n\t}",
"@Override\n\tprotected float getSoundPitch() {\n\t\t// note: unused, managed in playSound()\n\t\treturn 1;\n\t}",
"public float getInterpolatedPitch (float u) {\r\n\r\n float newPitch;\r\n \r\n // if linear interpolation\r\n if (this.linear == 1) {\r\n\r\n newPitch = keyFrame[1].pitch + \r\n ((keyFrame[2].pitch - keyFrame[1].pitch) * u);\r\n } else {\r\n\r\n newPitch = p0 + u * (p1 + u * (p2 + u * p3));\r\n\r\n }\r\n\r\n return newPitch;\r\n }",
"@Override\n\tpublic void update(float temp, float humidity, float pressure) {\n\n\t}",
"@Override\n public void onOrientationData(Myo myo, long timestamp, Quaternion rotation) {\n // Calculate Euler angles (roll, pitch, and yaw) from the quaternion.\n float roll = (float) Math.toDegrees(Quaternion.roll(rotation));\n float pitch = (float) Math.toDegrees(Quaternion.pitch(rotation));\n float yaw = (float) Math.toDegrees(Quaternion.yaw(rotation));\n\n // Adjust roll and pitch for the orientation of the Myo on the arm.\n if (myo.getXDirection() == XDirection.TOWARD_ELBOW) {\n roll *= -1;\n pitch *= -1;\n }\n/*\n // Next, we apply a rotation to the text view using the roll, pitch, and yaw.\n mTextView.setRotation(roll);\n mTextView.setRotationX(pitch);\n mTextView.setRotationY(yaw);*/\n }",
"public void setDeviceRotation(int rotation);",
"@Override\r\n\tpublic void onOrientationChanged(float[] aValues, float[] mValues) {\n\t\trefreshDisplay(calculateOrientation(aValues, mValues));\r\n\t}",
"@Override\n public void onSensorChanged(SensorEvent event) {\n if (event.sensor.getType() != Sensor.TYPE_ACCELEROMETER)\n return;\n /*\n * record the accelerometer data, the event's timestamp as well as\n * the current time. The latter is needed so we can calculate the\n * \"present\" time during rendering. In this application, we need to\n * take into account how the screen is rotated with respect to the\n * sensors (which always return data in a coordinate space aligned\n * to with the screen in its native orientation).\n */\n\n switch (mDisplay.getRotation()) {\n case Surface.ROTATION_0:\n mSensorX = event.values[0];\n mSensorY = event.values[1];\n break;\n case Surface.ROTATION_90:\n mSensorX = -event.values[1];\n mSensorY = event.values[0];\n break;\n case Surface.ROTATION_180:\n mSensorX = -event.values[0];\n mSensorY = -event.values[1];\n break;\n case Surface.ROTATION_270:\n mSensorX = event.values[1];\n mSensorY = -event.values[0];\n break;\n }\n\n mGLView.updateScene(10*mSensorX,10*mSensorY,10*event.values[2]);\n\n }",
"@Override\n public void onOrientationChanged(int orientation) {\n if (orientation == OrientationEventListener.ORIENTATION_UNKNOWN || mPaused) {\n return;\n }\n int newOrientation = Utils.roundOrientation(orientation, mGSensorOrientation);\n if (mGSensorOrientation != newOrientation) {\n mGSensorOrientation = newOrientation;\n }\n mAbstractModuleUI.onOrientationChanged(mGSensorOrientation);\n mAaaControl.onOrientationChanged(mGSensorOrientation);\n mDetectionManager.onOrientationChanged(mGSensorOrientation);\n mCurrentMode.onOrientationChanged(mGSensorOrientation);\n mRemoteTouchFocus.setLocalOrientation(mGSensorOrientation);\n }",
"@Override\n\tpublic void update()\n\t{\n\t\tsuper.update();\n\n\t\tcalcAcceleration();\n\t\tsetVelocity(Vector2D.add(getVelocity(), getAcceleration()));\n\n\t\tcalcVelocity();\n\t\tsetPosition(Vector2D.add(getPosition(), getVelocity()));\n\n\t\tbm.update(getPosition(), getWidth(), getHeight());\n\t}",
"public void update() {\n\t\tupdateCamera();\n\t}",
"public void update()\n\t{\n\t\tif (active)\n\t\t{\n\t\t\t// Increases speed to accelerate.\n\t\t\tif (speed < max_speed) speed += acceleration;\n\n\t\t\tif (speed > max_speed) speed = max_speed;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Negates speed to slow down.\n\t\t\tif (speed > 0) speed = -speed;\n\t\t\tif (speed < 0) speed += acceleration;\n\n\t\t\tif (speed > 0) speed = 0;\n\t\t}\n\n\t\t// Sets the speed for thrust.\n\t\thost.momentum.addVelocity(new Displacement(speed * Math.cos(angle), speed * Math.sin(angle)));\n\t}",
"@Override\n public void periodic() {\n odometry.update(ahrs.getRotation2d(), getEncoderMeters(leftEncoder), getEncoderMeters(rightEncoder));\n }",
"@Override\n\t\tpublic void onOrientationChanged(int orientation) {\n\t\t\tif (orientation == ORIENTATION_UNKNOWN)\n\t\t\t\treturn;\n\t\t\tmLastRawOrientation = orientation;\n\t\t\tmCurrentModule.onOrientationChanged(orientation);\n\t\t}",
"public abstract void setRequestedOrientation(int requestedOrientation);",
"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 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 }",
"@Override\n\tvoid update(){\n\n\t\t\tif(Frogger.flag==1){\n\t\t\t\tif(orientation == Orientation.UP) y -= step;\n\t\t\t\telse if (orientation == Orientation.DOWN) y += step;\n\t\t\t\telse if (orientation == Orientation.RIGHT) x += step;\n\t\t\t\telse if (orientation == Orientation.LEFT) x -= step;\n\t\t}\n\t\tsetChanged();\n\t\tnotifyObservers();\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 }",
"private void startOrientationSensor() {\n orientationValues = new float[3];\n SensorManager sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n Sensor orientationSensor = sensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION);\n sensorManager.registerListener(this, orientationSensor, SensorManager.SENSOR_DELAY_UI);\n }",
"public void Update()\n\t{\n\t\tUpdateVelocity();\n\t\tUpdateAcceleration();\n\t\tUpdateTransform();\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 }",
"@Override\n public void gyroYaw(int value, int timestamp) {\n }",
"void updateJointTransform(RigidBodyTransform jointTransformToUpdate);",
"@Override\n\tpublic void input(float delta) // testing camera\n\t{\n\t\tif(Input.getKey(Input.KEY_LEFT))\n\t\t\tgetTransform().rotate(yAxis, (float)Math.toRadians(-2));\n\t\tif(Input.getKey(Input.KEY_RIGHT))\n\t\t\tgetTransform().rotate(yAxis, (float)Math.toRadians(2));\n\t\t\n\t\t}",
"public void update() {\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < columns; j++) {\n Point point = getPointAtLocation(i, j);\n WorldItem item = point.getContainedItem();\n calculatePointTemp(point);\n point.update();\n if (item instanceof FlammableItem) {\n updateIgnition(point);\n } else if (item instanceof SimulatedSensor) {\n updateAlarm(point);\n }\n }\n }\n }",
"public void updatePosition(Matrix4x4 transform, Vector yawPitchRoll) {\n if (this.posSet) {\n Vector v = new Vector(this.posX, this.posY, this.posZ);\n transform.transformPoint(v);\n updatePosition(v, yawPitchRoll);\n } else {\n updatePosition(transform.toVector(), yawPitchRoll);\n }\n }",
"public void update() {\n if (System.currentTimeMillis() >= currSampleTimeInMillis + sampleDuration) {\n lastSampleTimeInMillis = currSampleTimeInMillis;\n lastPositionInTicks = currPositionInTicks;\n currSampleTimeInMillis = System.currentTimeMillis();\n currPositionInTicks = motor.getCurrentPosition();\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}",
"@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 }",
"private void refreshHeadRotation() {\n if (this.syncMode.isNormal() && isLivingEntity()) {\n CommonPacket packet = PacketType.OUT_ENTITY_HEAD_ROTATION.newInstance();\n packet.write(PacketType.OUT_ENTITY_HEAD_ROTATION.entityId, this.entityId);\n packet.write(PacketType.OUT_ENTITY_HEAD_ROTATION.headYaw, this.liveYaw);\n broadcast(packet);\n }\n }",
"public void updateOrientation(float [] data){\n if(data == null){Log.e(TAG, \"Failed type message data to float []\"); return;}\n if(data.length != 3){Log.e(TAG, \"updateOrientation data must have length of 3\");return;}\n\n float x = data[0];\n float y = data[1];\n float z = data[2];\n\n //use this as the threshold for detecting direction\n final float NEUTRAl = 0.01f;\n final float THRESHOLD = 0.10f;\n\n //commands to send based on orientation\n final String MOVE_FORWARD=\"HMF\";\n final String MOVE_BACKWARD=\"HMB\";\n final String MOVE_RIGHT=\"HMR\";\n final String MOVE_LEFT=\"HML\";\n\n String msg = \"Accelerometer[x, y, z]: \" + String.format(\"%.4f, %.4f, %.4f\\n\", x, y, z);\n TextView stats = (TextView) findViewById(R.id.accel_stats);\n stats.setText(msg);\n //forward\n if(y <= -(THRESHOLD)) {\n findViewById(R.id.forward).setPressed(true);\n mClientService.write(MOVE_FORWARD.getBytes());\n }\n else{findViewById(R.id.forward).setPressed(false);}\n\n //backward\n if(y>=THRESHOLD){\n findViewById(R.id.bottom).setPressed(true);\n mClientService.write(MOVE_BACKWARD.getBytes());\n }\n else{findViewById(R.id.bottom).setPressed(false);}\n\n //left\n if(x >= THRESHOLD) {\n findViewById(R.id.left).setPressed(true);\n mClientService.write(MOVE_LEFT.getBytes());\n\n }\n else{findViewById(R.id.left).setPressed(false);}\n\n //right\n if(x<= -(THRESHOLD)) {\n findViewById(R.id.right).setPressed(true);\n mClientService.write(MOVE_RIGHT.getBytes());\n }\n else{findViewById(R.id.right).setPressed(false);}\n }",
"protected void execute() {\n //pitch.setSpeed(translator.getValue());\n }",
"public void onSensorChanged(SensorEvent event) {\n\t\t\tint type = event.sensor.getType();\n\t\t\tif (type == Sensor.TYPE_ACCELEROMETER) {\n\t\t\t\tlong curTime = System.currentTimeMillis();\n\t\t\t\t// only allow one update every 100ms, otherwise updates\n\t\t\t\t// come way too fast and the phone gets bogged down\n\t\t\t\t// with garbage collection\n\t\t\t\t//Log.d(TAG, \"onSensorChanged(\"+type+\")\");\t\t\t\t\n\t\t\t\tif (lastUpdate == -1 || (curTime - lastUpdate) > 40) {\n\t\t\t\t\tlastUpdate = curTime;\t\t\t\t\n\t\t\t\t\tsynchronized (LOCK){\n\t\t\t\t\t\tmLastAccOrientation = calculateAngle(event);\n\t\t\t\t\t\tmLastSample.x = event.values[0];\n\t\t\t\t\t\tmLastSample.y = event.values[1];\n\t\t\t\t\t\tmLastSample.z = event.values[2];\n\t\t\t\t\t\tmLastSample.angle = mLastAccOrientation.angle;\t\t\n\t\t\t\t\t\t//mLastSample.orientation = mLastAccOrientation.orientation;\n\t\t\t\t\t\tmLastSample.orientation = mLastAccOrientation.rotation*90;\n\t\t\t\t\t\tmLastSample.threshold = mLastAccOrientation.threshold;\n\t\t\t\t\t\tmBuffer = mLastSample.x+\",\"+\n\t\t\t\t\t\t\t\t mLastSample.y+\",\"+\n\t\t\t\t\t\t\t\t mLastSample.z+\",\"+\n\t\t\t\t\t\t\t\t mLastSample.angle+\",\"+\n\t\t\t\t\t\t\t\t mLastSample.orientation+\",\"+\n\t\t\t\t\t\t\t\t mLastSample.threshold;\n\t\t\t\t\t\tif (mShowLog)\n\t\t\t\t\t\t\tLog.d(TAG, mBuffer);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public void updateTextField(long thrust, float roll, double pitch, float yaw){\r\n\t\tcfThrust.setText(String.valueOf(thrust));\r\n\t\tcfRoll.setText(String.valueOf(roll));\r\n\t\tcfPitch.setText(String.valueOf(pitch));\r\n\t\tcfYaw.setText(String.valueOf(yaw));\r\n\t}",
"@Override\r\n\tpublic double getPitchRightHand() {\n\t\treturn rechtPitch;\r\n\t}",
"public void update() {\n\t\toldButtons = currentButtons;\n\t\tcurrentButtons = DriverStation.getInstance().getStickButtons(getPort());\n\t\tif (axisCount != DriverStation.getInstance().getStickAxisCount(getPort())) {\n\t\t\taxisCount = DriverStation.getInstance().getStickAxisCount(getPort());\n\t\t\toldAxis = new double[axisCount];\n\t\t\tcurrentAxis = new double[axisCount];\n\t\t}\n\t\tif (povCount != DriverStation.getInstance().getStickPOVCount(getPort())) {\n\t\t\tpovCount = DriverStation.getInstance().getStickPOVCount(getPort());\n\t\t\toldPOV = new int[povCount];\n\t\t\tcurrentPOV = new int[povCount];\n\t\t}\n\t\toldAxis = currentAxis;\n\t\tfor (int i = 0; i < axisCount; i++) {\n\t\t\tcurrentAxis[i] = DriverStation.getInstance().getStickAxis(getPort(), i);\n\t\t}\n\n\t\toldPOV = currentPOV;\n\t\tfor (int i = 0; i < povCount; i++) {\n\t\t\tcurrentPOV[i] = DriverStation.getInstance().getStickPOV(getPort(), i);\n\t\t}\n\t}"
]
| [
"0.6397778",
"0.6114928",
"0.589616",
"0.5892382",
"0.5811201",
"0.57990247",
"0.5740818",
"0.57179946",
"0.56828",
"0.5674416",
"0.5653162",
"0.563174",
"0.5577868",
"0.5577868",
"0.5574148",
"0.5570757",
"0.5568689",
"0.5536304",
"0.5536304",
"0.55154335",
"0.54528415",
"0.5436879",
"0.5432507",
"0.5431569",
"0.5422221",
"0.5414007",
"0.5407605",
"0.5377845",
"0.53771245",
"0.5374273",
"0.53693277",
"0.5330212",
"0.5309252",
"0.53074914",
"0.5295326",
"0.5253551",
"0.5225558",
"0.5225558",
"0.51949453",
"0.5184197",
"0.5157965",
"0.5152199",
"0.5141806",
"0.5141344",
"0.5086785",
"0.5077107",
"0.50736797",
"0.50690395",
"0.5039428",
"0.5027625",
"0.49902007",
"0.49732122",
"0.496335",
"0.49552286",
"0.4952974",
"0.49462956",
"0.4900813",
"0.48924056",
"0.48719433",
"0.48676366",
"0.48394832",
"0.48377514",
"0.483626",
"0.48257455",
"0.48245555",
"0.48163632",
"0.47993827",
"0.4786671",
"0.47827598",
"0.47817457",
"0.47816962",
"0.475407",
"0.4753984",
"0.4749327",
"0.4746752",
"0.47416428",
"0.47315472",
"0.47257718",
"0.47083223",
"0.47060317",
"0.46898016",
"0.46862808",
"0.4684417",
"0.4677334",
"0.46557096",
"0.46468577",
"0.46436062",
"0.46418422",
"0.4640727",
"0.46372458",
"0.46354535",
"0.46181127",
"0.46116835",
"0.46059602",
"0.46050617",
"0.4588864",
"0.45849922",
"0.4583361",
"0.45773685",
"0.45716208"
]
| 0.8503283 | 0 |
Set the pitch offset matrix. | @UiThread
public synchronized void setPitchOffset(float pitchDegrees) {
touchPitch = pitchDegrees;
updatePitchMatrix();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@AnyThread\n private void updatePitchMatrix() {\n // The camera's pitch needs to be rotated along an axis that is parallel to the real world's\n // horizon. This is the <1, 0, 0> axis after compensating for the device's roll.\n Matrix.setRotateM(touchPitchMatrix, 0,\n -touchPitch, (float) Math.cos(deviceRoll), (float) Math.sin(deviceRoll), 0);\n }",
"public void setPitch(int pitch);",
"public void setPitch(int pitch) {\n mSelf.setPitch(pitch);\n }",
"public void setPitch(float pitch) {\n\t\talSourcef(musicSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(reverseSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(flangeSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(revFlangeSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(wahSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(revWahSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(wahFlangeSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(revWahFlangeSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(distortSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(revDistortSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(distortFlangeSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(revDistortFlangeSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(wahDistortSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(revWahDistortSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(wahDistortFlangeSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(revWahDistortFlangeSourceIndex, AL_PITCH, pitch);\n\t}",
"public void setPitch(float pitch) {\n\t\tthis.pitch = pitch;\n\t\ttargetPitch = pitch;\n\t\tAL10.alSourcef(id, AL10.AL_PITCH, pitch);\n\t}",
"void setOffsetRotation(DMatrix3C R);",
"public final MotionUpdateEvent setPitch(float pitch) {\n rotations.setY(pitch);\n return this;\n }",
"void setOffset(double offset);",
"void setOffsetWorldRotation(DMatrix3C R);",
"public void setRotation ( float yaw , float pitch ) {\n\t\t// TODO: backwards compatibility required\n\t\texecute ( handle -> handle.setRotation ( yaw , pitch ) );\n\t}",
"@BinderThread\n public synchronized void setDeviceOrientation(float[] matrix, float deviceRoll) {\n System.arraycopy(matrix, 0, deviceOrientationMatrix, 0, deviceOrientationMatrix.length);\n this.deviceRoll = -deviceRoll;\n updatePitchMatrix();\n }",
"public void setCamPitch(double pitchDegrees){\n kCamPitch = Units.degreesToRadians(pitchDegrees);\n }",
"void setOffset(com.walgreens.rxit.ch.cda.IVLPPDPQ offset);",
"void setOffsetWorldQuaternion(DQuaternionC q);",
"public Builder setPitch(float value) {\n bitField0_ |= 0x00000040;\n pitch_ = value;\n onChanged();\n return this;\n }",
"public void setPitchRange(float range) {\n\tthis.range = range;\n }",
"public Builder setPitch(float value) {\n bitField0_ |= 0x00000010;\n pitch_ = value;\n onChanged();\n return this;\n }",
"@UiThread\n public synchronized void setYawOffset(float yawDegrees) {\n Matrix.setRotateM(touchYawMatrix, 0, -yawDegrees, 0, 1, 0);\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(Point2D offset) {\n\t\tthis.offset.setLocation(offset);\n\t}",
"void setOffsetQuaternion(DQuaternionC q);",
"public void setHandPositions(double offset) {\n offset = Range.clip(offset, -0.5, 0.5);\n leftHand.setPosition(MID_SERVO + offset);\n rightHand.setPosition(MID_SERVO - offset);\n }",
"public void setPitch(float hertz) {\n\tthis.pitch = hertz;\n }",
"public Builder clearPitch() {\n bitField0_ = (bitField0_ & ~0x00000040);\n pitch_ = 0F;\n onChanged();\n return this;\n }",
"void setRawOffset(int rawOffset);",
"public void setSoundPitch(float soundPitch) {\n _soundPitch = soundPitch;\n }",
"public void setPitchShift(float shift) {\n\tthis.pitchShift = shift;\n }",
"public void pitch(double angle) {\n heading = rotateVectorAroundAxis(heading, left, angle);\r\n up = rotateVectorAroundAxis(up, left, angle);\r\n\r\n }",
"public Builder clearPitch() {\n bitField0_ = (bitField0_ & ~0x00000010);\n pitch_ = 0F;\n onChanged();\n return this;\n }",
"public void setOffset(double offset) {\n this.offset = offset;\n }",
"public void setInitalOffset(double offset){\n \tmodule.forEach(m -> m.setInitialOffset(offset));\n }",
"void setOffsetWorldPosition(double x, double y, double z);",
"public float getPitchAngle() { return PitchAngle; }",
"public void setOffset(int offset) {\r\n\t\tthis.offSet = offset;\r\n\t}",
"void setOffsetPosition(double x, double y, double z);",
"public void setPitchShift(int pitchShift) {\r\n\r\n\t\t// Values are in half steps (semitones) in the \r\n\t\t// range -12..0..+12 corresponding to -/+ 1 octave for\r\n\t\t// a range of 2 octaves.\r\n\r\n\t\t// Determine which direction the sweep is going\r\n\t\tsweepUp = (pitchShift >= 0);\r\n\r\n\t\tsetIndices();\r\n\r\n\t\tdouble newStep = 1.0;\r\n\r\n\t\t// If pitch shift is 0 short circuit calculations\r\n\t\tif (pitchShift == 0)\r\n\t\t\tstep = 0;\r\n\r\n\t\telse\t{\r\n\t\t\t// Step is rate at which samples read out\r\n\t\t\tfor (int i=0; i < Math.abs(pitchShift); i++) {\r\n\t\t\t\tif (pitchShift > 0)\r\n\t\t\t\t\tnewStep *= twelvethRootOfTwo;\r\n\t\t\t\telse\r\n\t\t\t\t\tnewStep /= twelvethRootOfTwo;\r\n\t\t\t}\r\n\t\t\tstep = Math.abs(newStep - 1.0);\r\n\t\t}\r\n\t\t// Reset the following values whenever pitch shift value changes\r\n\t\tsweep = 0.0;\r\n\t\tcrossFadeCount = 0;\r\n\t\tactiveSampleCount = numberOfDelaySamples - \r\n\t\t\t(int)(numberOfCrossFadeSamples * (newStep - 1.0) - 2); \r\n\t}",
"public FlightProfile setPitchAngle( float val ) {\n PitchAngle = val;\n return this;\n }",
"private void adjustPitch(double tick) {\n\t\tif(pitch < targetPitch) {\n\t\t\taddPitch((float)tick * deltaPitch);\n\t\t\tif(pitch >= targetPitch)\n\t\t\t\tsetPitch(targetPitch);\n\t\t} else if(pitch > targetPitch) {\n\t\t\taddPitch((float)tick * deltaPitch);\n\t\t\tif(pitch <= targetPitch)\n\t\t\t\tsetPitch(targetPitch);\n\t\t}\n\t}",
"@Override\n default void appendPitchRotation(double pitch)\n {\n AxisAngleTools.appendPitchRotation(this, pitch, this);\n }",
"@Override\n default void prependPitchRotation(double pitch)\n {\n AxisAngleTools.prependPitchRotation(pitch, this, this);\n }",
"@Override\r\n public void setOffset(long offset) {\n }",
"float getPitch();",
"float getPitch();",
"public void setuMVPMatrix(float[] mvpMatrix)\n {\n GLES20.glUniformMatrix4fv(uMVPMatrix, 1, false, mvpMatrix, 0);\n }",
"public void setOffset(final double offset) {\r\n\t\tthis.offset = offset;\r\n\t}",
"public void setFrame(float[] p, float[] v, float roll) {\r\n\r\n\t// any movement of origin since we last updated the co-ords\r\n\tif (p[0] == _p[0] && p[1] == _p[1] && p[2] == _p[2]) {\r\n\t // local origin has not moved\r\n\t // so lets look at rotation\r\n\t} else {\r\n\t this.p[0] = p[0];\r\n\t this.p[1] = p[1];\r\n\t this.p[2] = p[2];\r\n\t dirtyT = true;\r\n\t}\r\n\r\n\t// any rotation of axes ?\r\n\tif (roll == _roll && j[0] == v[0] && \r\n\t j[1] == v[1] && j[2] == v[2]) {\r\n\t // no rotation - job done !\r\n\t return;\r\n\t}\r\n\r\n\tj[0] = v[0];\r\n\tj[1] = v[1];\r\n\tj[2] = v[2];\r\n\tthis.roll = roll;\r\n\r\n\tTools3d.cross(v,UP,i_);\r\n\tTools3d.cross(i_, j, k_);\r\n\r\n\t// now apply roll\r\n\tif (roll != 0) {\r\n\t //Tools3d.linearSum(Tools3d.quickSin(roll), i_, Tools3d.quickCos(roll), k_, k);\r\n\t //Tools3d.linearSum(Tools3d.quickCos(roll), i_, - Tools3d.quickSin(roll), k_, i);\r\n\t Tools3d.linearSum((float) Math.sin(roll), i_, (float) Math.cos(roll), k_, k);\r\n\t Tools3d.linearSum((float) Math.cos(roll), i_, (float) - Math.sin(roll), k_, i);\r\n\t} else {\r\n\t k[0] = k_[0]; \r\n\t k[1] = k_[1]; \r\n\t k[2] = k_[2];\r\n\t i[0] = i_[0];\r\n\t i[1] = i_[1];\r\n\t i[2] = i_[2];\r\n\t}\r\n\tdirtyR = true;\r\n }",
"public void addPitch(float pitch) {\n\t\tthis.pitch += pitch;\n\t\tAL10.alSourcef(id, AL10.AL_PITCH, this.pitch);\n\t}",
"public float getPitch() {\n return pitch_;\n }",
"public float getPitch() {\n return pitch_;\n }",
"public void pitch(float amount)\r\n {\r\n //increment the pitch by the amount param\r\n pitch -= amount;\r\n }",
"public void setAngularOffset(float angularOffset) {\n jniSetAngularOffset(addr, angularOffset);\n }",
"public void offsetCamera(Location offset){\n //updateCoordinateToScreenPosition();\n xCameraOffset = offset.getX();\n yCameraOffset = offset.getY();\n }",
"public float getPitch() {\n return pitch;\n }",
"double getPitch();",
"public void setViewMatrix(float[] viewMatrix) {\n\t\tif (viewMatrix.length != 16) \n\t\t\tthrow new IllegalArgumentException(\"Invalid view matrix specified!\");\n\t\t\n\t\tSystem.arraycopy(this.viewMatrix, 0, viewMatrix, 0, viewMatrix.length);\n\t\tcomputeReverseMatrix();\n\t}",
"public void setOffset(int offset) {\r\n this.offset = offset;\r\n }",
"public float getPitch() {\n\treturn pitch;\n }",
"@Override\n public void setMatrix(final com.bramosystems.oss.player.core.client.geom.TransformationMatrix matrix) {\n if (isPlayerOnPage(playerId)) {\n String mx = mxNf.format(matrix.getMatrix().getVx().getX()) + \", \"\n + mxNf.format(matrix.getMatrix().getVy().getX()) + \", \"\n + mxNf.format(matrix.getMatrix().getVz().getX()) + \" \"\n + mxNf.format(matrix.getMatrix().getVx().getY()) + \", \"\n + mxNf.format(matrix.getMatrix().getVy().getY()) + \", \"\n + mxNf.format(matrix.getMatrix().getVz().getY()) + \" \"\n + mxNf.format(matrix.getMatrix().getVx().getZ()) + \", \"\n + mxNf.format(matrix.getMatrix().getVy().getZ()) + \", \"\n + mxNf.format(matrix.getMatrix().getVz().getZ());\n impl.setMatrix(mx);\n if (resizeToVideoSize) {\n checkVideoSize(getVideoHeight() + 16, getVideoWidth());\n }\n } else {\n addToPlayerReadyCommandQueue(\"matrix\", new Command() {\n\n @Override\n public void execute() {\n setMatrix(matrix);\n }\n });\n }\n }",
"public void setTransomOffset(IfcLengthMeasure TransomOffset)\n\t{\n\t\tthis.TransomOffset = TransomOffset;\n\t\tfireChangeEvent();\n\t}",
"public float getPitch() {\n return pitch_;\n }",
"public float getPitch() {\n return pitch_;\n }",
"public void setOffset(int offset) {\n this.offset = offset;\n }",
"public final void setIdentity() {\n \t\n this.m00 = 1.0F;\n this.m01 = 0.0F;\n this.m02 = 0.0F;\n this.m10 = 0.0F;\n this.m11 = 1.0F;\n this.m12 = 0.0F;\n this.m20 = 0.0F;\n this.m21 = 0.0F;\n this.m22 = 1.0F;\n }",
"public abstract void setRawOffset(int offsetMillis);",
"public void setCameraAngles(float x, float y, float z, float w) {\n\t\tthis.qx=x;\n\t\tthis.qy=y;\n\t\tthis.qz=z;\n\t\tthis.qw=w;\n\t}",
"public void setOffset(double xOffset, double yOffset) {\n this.xOffset = xOffset;\n this.yOffset = yOffset;\n }",
"public float setRotationY(float hand_positionX, float r_mapY_start) {\n r_yStart = r_mapY_start - ((270.0f / (1200.0f-100.0f)) * (hand_positionX-100.0f));\n return r_yStart;\n}",
"public void 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 }",
"void setPose(IPose2D newPose);",
"public void setAngle(double angle) {\n if (!isReset) {\n System.out.println(\"ARM NOT RESETTED. ROBOT WILL NOT MOVE ARM AS PID WILL DESTROY IT.\");\n armMotor.set(ControlMode.PercentOutput, 0);\n return;\n }\n double targetPositionRotations = angle * Const.kArmDeg2Talon4096Unit * Const.kArmGearRatioArm2Encoder;\n System.out.println(\"setting PID setpoint \" + targetPositionRotations);\n armMotor.set(ControlMode.Position, targetPositionRotations);\n }",
"private void setWallpaperOffset()\n\t{\n\t\tif( DefaultLayout.enable_configmenu_for_move_wallpaper )\n\t\t{\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences( SetupMenu.getContext() );\n\t\t\tif( prefs.getBoolean( SetupMenu.getKey( RR.string.desktop_wallpaper_mv ) , true ) == false )\n\t\t\t{\n\t\t\t\t//当菜单中设置壁纸不随滑动而滚动时,不需要设置offset\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t//teapotXu add end\n\t\tif( animView.getUser() == targetOffset || targetOffset == -1 )\n\t\t\treturn;\n\t\tIBinder token = launcher.getWindow().getCurrentFocus().getWindowToken();\n\t\tif( token == null )\n\t\t\treturn;\n\t\tmWallpaperManager.setWallpaperOffsets( token , animView.getUser() , 0 );\n\t}",
"@Override\r\n\tpublic void setOffset(IOffset offset) {\n\t\t\r\n\t}",
"public void setOffset(Integer offset) {\n set(\"offset\",offset);\n }",
"public void rotate(double yaw, double pitch)\n {\n this.rotate(yaw, pitch, 0);\n }",
"public void setNominalPositionAndOrientation() {\n // Nothing to do for absolute position/orientation device.\n }",
"public final void setIdentity() {\n m00 = 1f;\n m11 = 1f;\n m22 = 1f;\n m33 = 1f;\n\n m01 = 0f;\n m02 = 0f;\n m03 = 0f;\n m10 = 0f;\n m12 = 0f;\n m13 = 0f;\n m20 = 0f;\n m21 = 0f;\n m23 = 0f;\n m30 = 0f;\n m31 = 0f;\n m32 = 0f;\n }",
"void copyOffsetRotation (DMatrix3 R);",
"public void resetPose() {\n }",
"private void setOffset(int offsetX, int offsetY) {\n this.offsetX = offsetX;\n this.offsetY = offsetY;\n }",
"private void positionMode() {\n\t\ttestMotor.setProfile(0);\n\t\ttestMotor.ClearIaccum();\n\t\ttestMotor.set(testMotor.getPosition());\n\t\ttestMotor.ClearIaccum();\n\t}",
"public void setPositionMatrix(Position[][] positionMatrix)\n {\n PositionMatrix = positionMatrix;\n this.entry = positionMatrix[entry.getRowIndex()][entry.getColumnIndex()];\n this.exit = positionMatrix[exit.getRowIndex()][exit.getColumnIndex()];\n }",
"public void setOffset(Integer offset) {\n set(\"offset\",offset);\n }",
"public void setOffset(long offset) {\n cSetOffset(this.cObject, offset);\n }",
"void setAnchorOffset(int anchorOffset);",
"public static native void OpenMM_AmoebaInPlaneAngleForce_setAngleParameters(PointerByReference target, int index, int particle1, int particle2, int particle3, int particle4, double length, double quadraticK);",
"public void updateRotations() {\n try {\n switch (this.mode) {\n case Packet:\n mc.player.renderYawOffset = this.yaw;\n mc.player.rotationYawHead = this.yaw;\n break;\n case Legit:\n mc.player.rotationYaw = this.yaw;\n mc.player.rotationPitch = this.pitch;\n break;\n case None:\n break;\n }\n } catch (Exception ignored) {\n\n }\n }",
"public void setIdentity() {\n System.arraycopy(IDENTITY, 0, matrix, 0, 16);\n }",
"void setPWMRate(double rate);",
"static void setIdentityM(float[] sm, int smOffset) {\n for (int i = 0; i < 16; i++) {\n sm[smOffset + i] = 0;\n }\n for (int i = 0; i < 16; i += 5) {\n sm[smOffset + i] = 1.0f;\n }\n }",
"protected void initialize() {\n translator = new PIDOutputTranslator();\n controller = new PIDController(0.0001, 0, 0, pitch.pitchEncoder, translator);\n \n //controller.setSetpoint(pitch.getEncoder() + angle);\n //controller.setPercentTolerance(1);\n \n //THIS IS NOT THE RIGHT RANGE\n //I made it this way so that we would not break the robot\n //we need to test the range of the encoder\n //we need to find where zero is\n //then we can update this input range!\n //controller.setInputRange(0, 1);\n //controller.enable();\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 setFrameXY(RMPoint aPoint) { setFrameXY(aPoint.x, aPoint.y); }",
"public void setOffset(int startOffset, int endOffset);",
"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}",
"public void setSpeed() {\n //assigns the speed based on the shuffleboard with a default value of zero\n double tempSpeed = setpoint.getDouble(0.0);\n\n //runs the proportional control system based on the aquired speed\n controlRotator.proportionalSpeedSetter(tempSpeed);\n }",
"public void set(float[] matrix) {\n System.arraycopy(matrix, 0, this.matrix, 0, 16);\n }",
"@Override\n\tpublic void changeMapPointer(ImageView posView) {\n\t\tif (room.equals(properties.getRoomFromProperties().get(1))) {\n\t\t\tposView.relocate(789, 272);\n\n\t\t} else if (room.equals(properties.getRoomFromProperties().get(2))) {\n\t\t\tposView.relocate(788, 185);\n\n\t\t} else if (room.equals(properties.getRoomFromProperties().get(3))) {\n\t\t\tposView.relocate(880.0, 281);\n\n\t\t} else if (room.equals(properties.getRoomFromProperties().get(4))) {\n\t\t\tposView.relocate(867.0, 200);\n\n\t\t} else if (room.equals(properties.getRoomFromProperties().get(5))) {\n\t\t\tposView.relocate(880.0, 64.0);\n\n\t\t} else {\n\t\t\tposView.relocate(788.0, 60.0);\n\t\t}\n\t}",
"public void setCameraPos(CamPos in){\r\n\t\tresolveCamPos(in);\r\n\t\tpan_servo.setAngle(cur_pan_angle);\r\n\t\ttilt_servo.setAngle(cur_tilt_angle);\r\n\t\t\r\n\t\t\r\n\t}"
]
| [
"0.6830006",
"0.656848",
"0.6351859",
"0.6068011",
"0.5979351",
"0.59147984",
"0.5828844",
"0.57409394",
"0.5733558",
"0.56819355",
"0.5524741",
"0.5486888",
"0.54859835",
"0.5478116",
"0.5474475",
"0.5438813",
"0.5430856",
"0.5407813",
"0.5393516",
"0.5322517",
"0.53137493",
"0.5309062",
"0.5275706",
"0.5257093",
"0.52468944",
"0.5234609",
"0.52282524",
"0.5224174",
"0.5219246",
"0.5213912",
"0.52004284",
"0.519262",
"0.517504",
"0.5157915",
"0.51072145",
"0.5099082",
"0.5087505",
"0.5074511",
"0.5071969",
"0.5061967",
"0.50619555",
"0.5039734",
"0.5039734",
"0.500647",
"0.4999651",
"0.49816772",
"0.4967555",
"0.49640933",
"0.49640933",
"0.4927386",
"0.49113107",
"0.49035066",
"0.48831126",
"0.4877883",
"0.4874419",
"0.48702958",
"0.48648766",
"0.48480222",
"0.48355967",
"0.48276994",
"0.48276994",
"0.4824227",
"0.48190802",
"0.4800415",
"0.47930133",
"0.4781204",
"0.4776216",
"0.47597903",
"0.47587836",
"0.47493824",
"0.4745632",
"0.4724177",
"0.47240546",
"0.47073868",
"0.47025186",
"0.4696464",
"0.4694886",
"0.46858773",
"0.46639684",
"0.4647726",
"0.4646274",
"0.46406838",
"0.46405736",
"0.46398172",
"0.46336907",
"0.46302253",
"0.46204644",
"0.4611539",
"0.45877033",
"0.4587139",
"0.45790705",
"0.45790705",
"0.45790705",
"0.45734227",
"0.4571856",
"0.45610613",
"0.45579684",
"0.4548157",
"0.4547821",
"0.45443207"
]
| 0.60800296 | 3 |
Set the yaw offset matrix. | @UiThread
public synchronized void setYawOffset(float yawDegrees) {
Matrix.setRotateM(touchYawMatrix, 0, -yawDegrees, 0, 1, 0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final MotionUpdateEvent setYaw(float yaw) {\n rotations.setX(yaw);\n return this;\n }",
"void setOffsetRotation(DMatrix3C R);",
"public void setRotation ( float yaw , float pitch ) {\n\t\t// TODO: backwards compatibility required\n\t\texecute ( handle -> handle.setRotation ( yaw , pitch ) );\n\t}",
"void setOffsetWorldRotation(DMatrix3C R);",
"private void setYaw(float yawDeg) {\n\n // Get current orientation.\n QuatF currentOrientation = mOrionVideoView.getViewingRotation();\n\n // Create a vector showing where in the sphere the user is currently looking at.\n Vec3F lookingAt = Vec3F.AXIS_FRONT.rotate(currentOrientation.conjugate());\n\n // Get current yaw offset with respective to content 'front' direction in rads.\n float currentYawRad = lookingAt.getYaw();\n\n // Convert target yaw angle from degrees to radians.\n float newYawRad = (float) (Math.PI / 180.0f * yawDeg);\n\n // Create a rotation that replaces the current yaw offset with the desired yaw offset.\n QuatF rotation = QuatF.fromRotationAxisY(newYawRad - currentYawRad);\n\n // Rotate the view to a new orientation.\n QuatF newOrientation = currentOrientation.multiply(rotation);\n mOrionVideoView.setViewingRotation(newOrientation);\n\n }",
"public Builder setYaw(float value) {\n bitField0_ |= 0x00000008;\n yaw_ = value;\n onChanged();\n return this;\n }",
"void setOffsetWorldQuaternion(DQuaternionC q);",
"public Builder setYaw(float value) {\n bitField0_ |= 0x00000020;\n yaw_ = value;\n onChanged();\n return this;\n }",
"public void yaw(double angle) {\n heading = rotateVectorAroundAxis(heading, up, angle);\r\n left = rotateVectorAroundAxis(left, up, angle);\r\n }",
"public void yaw(float amount)\r\n {\n yaw += amount;\r\n }",
"public void rotate(double yaw, double pitch)\n {\n this.rotate(yaw, pitch, 0);\n }",
"void setOffsetQuaternion(DQuaternionC q);",
"@Override\n default void appendYawRotation(double yaw)\n {\n AxisAngleTools.appendYawRotation(this, yaw, this);\n }",
"public void setCameraAngles(float x, float y, float z, float w) {\n\t\tthis.qx=x;\n\t\tthis.qy=y;\n\t\tthis.qz=z;\n\t\tthis.qw=w;\n\t}",
"public Builder clearYaw() {\n bitField0_ = (bitField0_ & ~0x00000008);\n yaw_ = 0F;\n onChanged();\n return this;\n }",
"public Builder clearYaw() {\n bitField0_ = (bitField0_ & ~0x00000020);\n yaw_ = 0F;\n onChanged();\n return this;\n }",
"public void rotate(double yaw, double pitch, double roll)\n {\n double yawRadians = Math.toRadians(yaw);\n double pitchRadians = Math.toRadians(pitch);\n double rollRadians = Math.toRadians(roll);\n\n double x = this.x;\n double y = this.y;\n double z = this.z;\n\n this.x = x * Math.cos(yawRadians) * Math.cos(pitchRadians) + z * (Math.cos(yawRadians) * Math.sin(pitchRadians) * Math.sin(rollRadians) - Math.sin(yawRadians) * Math.cos(rollRadians)) + y * (Math.cos(yawRadians) * Math.sin(pitchRadians) * Math.cos(rollRadians) + Math.sin(yawRadians) * Math.sin(rollRadians));\n this.z = x * Math.sin(yawRadians) * Math.cos(pitchRadians) + z * (Math.sin(yawRadians) * Math.sin(pitchRadians) * Math.sin(rollRadians) + Math.cos(yawRadians) * Math.cos(rollRadians)) + y * (Math.sin(yawRadians) * Math.sin(pitchRadians) * Math.cos(rollRadians) - Math.cos(yawRadians) * Math.sin(rollRadians));\n this.y = -x * Math.sin(pitchRadians) + z * Math.cos(pitchRadians) * Math.sin(rollRadians) + y * Math.cos(pitchRadians) * Math.cos(rollRadians);\n }",
"@Override\n default void prependYawRotation(double yaw)\n {\n AxisAngleTools.prependYawRotation(yaw, this, this);\n }",
"public void updateRotations() {\n try {\n switch (this.mode) {\n case Packet:\n mc.player.renderYawOffset = this.yaw;\n mc.player.rotationYawHead = this.yaw;\n break;\n case Legit:\n mc.player.rotationYaw = this.yaw;\n mc.player.rotationPitch = this.pitch;\n break;\n case None:\n break;\n }\n } catch (Exception ignored) {\n\n }\n }",
"public float getYaw() {\n return yaw_;\n }",
"public float getYaw() {\n return yaw_;\n }",
"public void setRotateAngle(Cuboid model, float x, float y, float z) {\n model.pitch = x;\n model.yaw = y;\n model.roll = z;\n }",
"public float getYaw() {\n return yaw_;\n }",
"public float getYaw() {\n return yaw_;\n }",
"private void animateYaw(float yawDeg, long durationMs) {\n\n // Get current orientation.\n QuatF currentOrientation = mOrionVideoView.getViewingRotation();\n\n // Create a vector showing where in the sphere the user is currently looking at.\n Vec3F lookingAt = Vec3F.AXIS_FRONT.rotate(currentOrientation.conjugate());\n\n // Get current yaw offset with respective to content 'front' direction in rads.\n float currentYawRad = lookingAt.getYaw();\n\n // Convert target yaw angle from degrees to radians.\n float newYawRad = (float) (Math.PI / 180.0f * yawDeg);\n\n // Android ValueAnimators can only be run in the UI thread, hence any excessive\n // load will make animations stutter, especially after a few seconds of inactivity\n // when the device begins to throttle the CPU. You can observe this most easily with\n // a pulsating or rotating animation: leave the device alone for a moment and\n // keep watching an animated object - if the animation is first smooth, and after\n // a few seconds starts to stutter, try touching the screen (e.g. pan a little)\n // and observe if the animation now becomes smooth again.\n\n // If this becomes a problem, you can try to use a background thread and a custom\n // animator for making the animations smoother. Another option is to upgrade to\n // Orion360 SDK Pro, which has built-in support for many animations and performs\n // them with C++ code in the GL thread, in sync with frame rendering at 60 fps.\n\n // Setup camera animator.\n mCameraAnimator = ValueAnimator.ofFloat(currentYawRad, newYawRad);\n mCameraAnimator.setRepeatCount(0);\n mCameraAnimator.setRepeatMode(ValueAnimator.RESTART);\n mCameraAnimator.setDuration(durationMs);\n mCameraAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {\n\n @Override\n public void onAnimationUpdate(final ValueAnimator animation) {\n\n // Rotate the camera to the desired yaw angle. Notice that each\n // animation step will get the yaw angle from the camera animator,\n // but pitch and roll will be checked again at each animation step,\n // hence allowing user control for these angles during the animation.\n float animatedValue = (Float) animation.getAnimatedValue();\n float yawDeg = (float) (animatedValue * 180.0f / Math.PI);\n setYaw(yawDeg);\n\n }\n });\n mCameraAnimator.start();\n }",
"@BinderThread\n public synchronized void setDeviceOrientation(float[] matrix, float deviceRoll) {\n System.arraycopy(matrix, 0, deviceOrientationMatrix, 0, deviceOrientationMatrix.length);\n this.deviceRoll = -deviceRoll;\n updatePitchMatrix();\n }",
"public void setInitalOffset(double offset){\n \tmodule.forEach(m -> m.setInitialOffset(offset));\n }",
"public float getYaw() {\n return yaw;\n }",
"void setOffset(double offset);",
"@Override\n\tpublic void setLocationAndAngles(double x, double y, double z, float yaw, float pitch)\n\t{\n\t\tBlockPos blockpos = this.hangingPosition.add(x - this.posX, y - this.posY, z - this.posZ);\n\t\tthis.setPosition((double) blockpos.getX(), (double) blockpos.getY(), (double) blockpos.getZ());\n\t}",
"@AnyThread\n private void updatePitchMatrix() {\n // The camera's pitch needs to be rotated along an axis that is parallel to the real world's\n // horizon. This is the <1, 0, 0> axis after compensating for the device's roll.\n Matrix.setRotateM(touchPitchMatrix, 0,\n -touchPitch, (float) Math.cos(deviceRoll), (float) Math.sin(deviceRoll), 0);\n }",
"public void resetAngle() {\n\t\tnavx.zeroYaw();\n\t}",
"public void setHandPositions(double offset) {\n offset = Range.clip(offset, -0.5, 0.5);\n leftHand.setPosition(MID_SERVO + offset);\n rightHand.setPosition(MID_SERVO - offset);\n }",
"void setOffsetWorldPosition(double x, double y, double z);",
"@Test\n public void testGetSetRollPitchYawAngles() throws WrongSizeException {\n UniformRandomizer randomizer = new UniformRandomizer(new Random());\n double roll = randomizer.nextDouble(2.0 * MIN_ANGLE_DEGREES, \n 2.0 * MAX_ANGLE_DEGREES) * Math.PI / 180.0;\n double pitch = randomizer.nextDouble(MIN_ANGLE_DEGREES, \n MAX_ANGLE_DEGREES) * Math.PI / 180.0;\n double yaw = randomizer.nextDouble(2.0 * MIN_ANGLE_DEGREES, \n 2.0 * MAX_ANGLE_DEGREES) * Math.PI / 180.0;\n \n MatrixRotation3D rotation = new MatrixRotation3D();\n \n //set angles\n rotation.setRollPitchYaw(roll, pitch, yaw);\n \n //retrieve angles to check correctness\n assertTrue(Math.abs(rotation.getRollAngle() - roll) < ABSOLUTE_ERROR ||\n Math.abs(rotation.getRollAngle2() - roll) < ABSOLUTE_ERROR);\n assertTrue(Math.abs(rotation.getPitchAngle() - pitch) < ABSOLUTE_ERROR ||\n Math.abs(rotation.getPitchAngle2() - roll) < ABSOLUTE_ERROR);\n assertTrue(Math.abs(rotation.getYawAngle() - yaw) < ABSOLUTE_ERROR ||\n Math.abs(rotation.getYawAngle2() - yaw) < ABSOLUTE_ERROR);\n\n //check internal matrix\n Matrix rotationMatrix = rotation.getInternalMatrix();\n \n Matrix rotationMatrix2 = new Matrix(ROTATION_ROWS, ROTATION_COLS);\n rotationMatrix2.setElementAt(0, 0, Math.cos(pitch) * Math.cos(yaw));\n rotationMatrix2.setElementAt(1, 0, Math.cos(pitch) * Math.sin(yaw));\n rotationMatrix2.setElementAt(2, 0, -Math.sin(pitch));\n \n rotationMatrix2.setElementAt(0, 1, -Math.cos(roll) * Math.sin(yaw) + \n Math.sin(roll) * Math.sin(pitch) * Math.cos(yaw));\n rotationMatrix2.setElementAt(1, 1, Math.cos(roll) * Math.cos(yaw) + \n Math.sin(roll) * Math.sin(pitch) * Math.sin(yaw));\n rotationMatrix2.setElementAt(2, 1, Math.sin(roll) * Math.cos(pitch));\n \n rotationMatrix2.setElementAt(0, 2, Math.sin(roll) * Math.sin(yaw) + \n Math.cos(roll) * Math.sin(pitch) * Math.cos(yaw));\n rotationMatrix2.setElementAt(1, 2, -Math.sin(roll) * Math.cos(yaw) +\n Math.cos(roll) * Math.sin(pitch) * Math.sin(yaw));\n rotationMatrix2.setElementAt(2, 2, Math.cos(roll) * Math.cos(pitch));\n \n //check that rotation matrices are equal (up to a certain error)\n assertTrue(rotationMatrix.equals(rotationMatrix2, ABSOLUTE_ERROR));\n }",
"public void setOffset(double offset) {\n this.offset = offset;\n }",
"public final flipsParser.yaw_return yaw() throws RecognitionException {\n flipsParser.yaw_return retval = new flipsParser.yaw_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token At174=null;\n Token At176=null;\n Token To178=null;\n flipsParser.direction_return direction172 = null;\n\n flipsParser.direction_return direction173 = null;\n\n flipsParser.angularRateValue_return angularRateValue175 = null;\n\n flipsParser.angularRateValue_return angularRateValue177 = null;\n\n flipsParser.direction_return direction179 = null;\n\n\n CommonTree At174_tree=null;\n CommonTree At176_tree=null;\n CommonTree To178_tree=null;\n RewriteRuleTokenStream stream_At=new RewriteRuleTokenStream(adaptor,\"token At\");\n RewriteRuleTokenStream stream_To=new RewriteRuleTokenStream(adaptor,\"token To\");\n RewriteRuleSubtreeStream stream_direction=new RewriteRuleSubtreeStream(adaptor,\"rule direction\");\n RewriteRuleSubtreeStream stream_angularRateValue=new RewriteRuleSubtreeStream(adaptor,\"rule angularRateValue\");\n try {\n // flips.g:332:2: ( direction | direction At angularRateValue -> direction angularRateValue | ( At )? angularRateValue To direction -> direction angularRateValue )\n int alt68=3;\n alt68 = dfa68.predict(input);\n switch (alt68) {\n case 1 :\n // flips.g:332:4: direction\n {\n root_0 = (CommonTree)adaptor.nil();\n\n pushFollow(FOLLOW_direction_in_yaw1670);\n direction172=direction();\n\n state._fsp--;\n\n adaptor.addChild(root_0, direction172.getTree());\n\n }\n break;\n case 2 :\n // flips.g:333:4: direction At angularRateValue\n {\n pushFollow(FOLLOW_direction_in_yaw1675);\n direction173=direction();\n\n state._fsp--;\n\n stream_direction.add(direction173.getTree());\n At174=(Token)match(input,At,FOLLOW_At_in_yaw1677); \n stream_At.add(At174);\n\n pushFollow(FOLLOW_angularRateValue_in_yaw1679);\n angularRateValue175=angularRateValue();\n\n state._fsp--;\n\n stream_angularRateValue.add(angularRateValue175.getTree());\n\n\n // AST REWRITE\n // elements: direction, angularRateValue\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 334:2: -> direction angularRateValue\n {\n adaptor.addChild(root_0, stream_direction.nextTree());\n adaptor.addChild(root_0, stream_angularRateValue.nextTree());\n\n }\n\n retval.tree = root_0;\n }\n break;\n case 3 :\n // flips.g:335:4: ( At )? angularRateValue To direction\n {\n // flips.g:335:4: ( At )?\n int alt67=2;\n int LA67_0 = input.LA(1);\n\n if ( (LA67_0==At) ) {\n alt67=1;\n }\n switch (alt67) {\n case 1 :\n // flips.g:335:4: At\n {\n At176=(Token)match(input,At,FOLLOW_At_in_yaw1691); \n stream_At.add(At176);\n\n\n }\n break;\n\n }\n\n pushFollow(FOLLOW_angularRateValue_in_yaw1694);\n angularRateValue177=angularRateValue();\n\n state._fsp--;\n\n stream_angularRateValue.add(angularRateValue177.getTree());\n To178=(Token)match(input,To,FOLLOW_To_in_yaw1696); \n stream_To.add(To178);\n\n pushFollow(FOLLOW_direction_in_yaw1698);\n direction179=direction();\n\n state._fsp--;\n\n stream_direction.add(direction179.getTree());\n\n\n // AST REWRITE\n // elements: angularRateValue, direction\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 336:2: -> direction angularRateValue\n {\n adaptor.addChild(root_0, stream_direction.nextTree());\n adaptor.addChild(root_0, stream_angularRateValue.nextTree());\n\n }\n\n retval.tree = root_0;\n }\n break;\n\n }\n retval.stop = input.LT(-1);\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }",
"DMatrix3C getOffsetRotation();",
"void setRotation (DMatrix3C R);",
"public void setOffset(final double offset) {\r\n\t\tthis.offset = offset;\r\n\t}",
"public void offsetCamera(Location offset){\n //updateCoordinateToScreenPosition();\n xCameraOffset = offset.getX();\n yCameraOffset = offset.getY();\n }",
"public void setRotation(){\n\t\t\tfb5.accStop();\n\t\t\twt.turning = true;\n\t\t\tif(state == BotMove.RIGHT_15){\n\t\t\t\tfb5.turnRightBy(6);\n\t\t\t\tangle = (angle+360-20)%360;\n\t\t\t}\n\t\t\telse if(state == BotMove.RIGHT_10){\n\t\t\t\tfb5.turnRightBy(3);\n\t\t\t\tangle = (angle+360-10)%360;\n\t\t\t}\n\t\t\telse if(state == BotMove.LEFT_5){\n\t\t\t\tfb5.turnLeftBy(2);\n\t\t\t\tangle = (angle+360+5)%360;\n\t\t\t}\n\t\t}",
"@Override\n public void onAnimationUpdate(final ValueAnimator animation) {\n float animatedValue = (Float) animation.getAnimatedValue();\n float yawDeg = (float) (animatedValue * 180.0f / Math.PI);\n setYaw(yawDeg);\n\n }",
"void setOffsetPosition(double x, double y, double z);",
"void copyOffsetRotation (DMatrix3 R);",
"public void setOffset(Point2D offset) {\n\t\tthis.offset.setLocation(offset);\n\t}",
"public void updateOrientationAngles() {\n SensorManager.getRotationMatrix(rotationMatrix, null,\n accelerometerReading, magnetometerReading);\n\n // \"mRotationMatrix\" now has up-to-date information.\n\n float[] angles = SensorManager.getOrientation(rotationMatrix, orientationAngles);\n azimuth = (float) Math.toDegrees(angles[0]);\n // \"mOrientationAngles\" now has up-to-date information.\n TextView az = findViewById(R.id.az);\n rotateDriver(azimuth);\n\n az.setText(Float.toString(azimuth));\n }",
"private void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z)\n {\n modelRenderer.rotateAngleX = x;\n modelRenderer.rotateAngleY = y;\n modelRenderer.rotateAngleZ = z;\n }",
"public void setCameraRotateForPickUp(float[] quat) {\n float[] newquat = normalizeQuat(quat);\n float rollRad = getRollRad(newquat);\n //Need to convert radians to convert to rotation that camera is using\n //pass to augmented image renderer and convert back into quaternion\n augmentedImageRenderer.updateCameraRotateForPickUp(eulerAnglesRadToQuat(-rollRad, 0, 0));\n }",
"float getYaw();",
"float getYaw();",
"protected void setupRotationOrigin()\n\t{\n\t\tthis.currentRotationAxis = new Point2D.Double(getOriginX(), getOriginY());\n\t\tupdateDefaultMomentMass();\n\t\tthis.currentMomentMass = this.defaultMomentMass;\n\t\t\n\t\t//changeRotationAxisTo(new Point2D.Double(0, 0));\n\t}",
"public void updatePosition(Matrix4x4 transform, Vector yawPitchRoll) {\n if (this.posSet) {\n Vector v = new Vector(this.posX, this.posY, this.posZ);\n transform.transformPoint(v);\n updatePosition(v, yawPitchRoll);\n } else {\n updatePosition(transform.toVector(), yawPitchRoll);\n }\n }",
"void setRawOffset(int rawOffset);",
"public void setWindowAlignmentOffset(int offset) {\n mLayoutManager.setWindowAlignmentOffset(offset);\n requestLayout();\n }",
"public void function_yaw(int x, int y,int gyro){\n\n\n }",
"public void setRotateAngle(Cuboid modelRenderer, float x, float y, float z) {\n modelRenderer.rotationPointX = x;\n modelRenderer.rotationPointY = y;\n modelRenderer.rotationPointZ = z;\n }",
"public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n modelRenderer.rotateAngleX = x;\n modelRenderer.rotateAngleY = y;\n modelRenderer.rotateAngleZ = z;\n }",
"public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n modelRenderer.rotateAngleX = x;\n modelRenderer.rotateAngleY = y;\n modelRenderer.rotateAngleZ = z;\n }",
"public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n modelRenderer.rotateAngleX = x;\n modelRenderer.rotateAngleY = y;\n modelRenderer.rotateAngleZ = z;\n }",
"public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n modelRenderer.rotateAngleX = x;\n modelRenderer.rotateAngleY = y;\n modelRenderer.rotateAngleZ = z;\n }",
"public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n modelRenderer.rotateAngleX = x;\n modelRenderer.rotateAngleY = y;\n modelRenderer.rotateAngleZ = z;\n }",
"public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n modelRenderer.rotateAngleX = x;\n modelRenderer.rotateAngleY = y;\n modelRenderer.rotateAngleZ = z;\n }",
"public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n modelRenderer.rotateAngleX = x;\n modelRenderer.rotateAngleY = y;\n modelRenderer.rotateAngleZ = z;\n }",
"public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n modelRenderer.rotateAngleX = x;\n modelRenderer.rotateAngleY = y;\n modelRenderer.rotateAngleZ = z;\n }",
"public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n modelRenderer.rotateAngleX = x;\n modelRenderer.rotateAngleY = y;\n modelRenderer.rotateAngleZ = z;\n }",
"public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n modelRenderer.rotateAngleX = x;\n modelRenderer.rotateAngleY = y;\n modelRenderer.rotateAngleZ = z;\n }",
"public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n modelRenderer.rotateAngleX = x;\n modelRenderer.rotateAngleY = y;\n modelRenderer.rotateAngleZ = z;\n }",
"public void setAngularOffset(float angularOffset) {\n jniSetAngularOffset(addr, angularOffset);\n }",
"public void calibrateGyro() {\n gyro.SetYaw(0);\n }",
"private void adjustCameraPosition() {\n if (upward) {\n\n if (tilt<90) {\n tilt ++;\n zoom-=0.01f;\n } else {\n upward=false;\n }\n\n } else {\n if (tilt>0) {\n tilt --;\n zoom+=0.01f;\n } else {\n upward=true;\n }\n }\n }",
"public void setRotateAngle(RendererModel RendererModel, float x, float y, float z)\n\t{\n\t\tRendererModel.rotateAngleX = x;\n\t\tRendererModel.rotateAngleY = y;\n\t\tRendererModel.rotateAngleZ = z;\n\t}",
"private void resetAngle() {\n lastAngles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n startAngles = lastAngles;\n globalAngle = 0;\n }",
"public void setOffset(Point2D offset) {\n Point2D oldOffset = this.offset;\n this.offset = offset;\n propertyChangeSupport.firePropertyChange(\"offset\", oldOffset, offset);\n }",
"public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n\t\tmodelRenderer.rotateAngleX = x;\n\t\tmodelRenderer.rotateAngleY = y;\n\t\tmodelRenderer.rotateAngleZ = z;\n\t}",
"public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n\t\tmodelRenderer.rotateAngleX = x;\n\t\tmodelRenderer.rotateAngleY = y;\n\t\tmodelRenderer.rotateAngleZ = z;\n\t}",
"public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n\t\tmodelRenderer.rotateAngleX = x;\n\t\tmodelRenderer.rotateAngleY = y;\n\t\tmodelRenderer.rotateAngleZ = z;\n\t}",
"public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n\t\tmodelRenderer.rotateAngleX = x;\n\t\tmodelRenderer.rotateAngleY = y;\n\t\tmodelRenderer.rotateAngleZ = z;\n\t}",
"public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n\t\tmodelRenderer.rotateAngleX = x;\n\t\tmodelRenderer.rotateAngleY = y;\n\t\tmodelRenderer.rotateAngleZ = z;\n\t}",
"public void setCameraLookAt(Point lookAt) {\n setCamera(getCamera().position, lookAt);\n }",
"private void resetAngle() {\n lastAngles = imu.getAngularOrientation(AxesReference.INTRINSIC,\n AxesOrder.ZYX, AngleUnit.DEGREES);\n globalAngle = 0;\n }",
"private void resetAngle()\n {\n lastAngles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n globalAngle = 0;\n }",
"void setRotation(int objIndex,Quaternion rot){\n look[objIndex].setRotationQuaternion(rot);\n usedRot.set(objIndex);\n }",
"private void setAlignParam(ConstTiltalignParam tiltalignParam) {\n if (dialog == null) {\n return;\n }\n dialog.setAngleOffset(tiltalignParam.getAngleOffset());\n dialog.setTiltAxisZShift(tiltalignParam.getAxisZShift());\n }",
"public void resetAngle() {\n lastAngles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n globalAngle = 0;\n\n }",
"public void setOrientation(LatLonAlt lla) {\r\n\tOrientation = Location.azimuth_elevation_dist(lla)[0];\r\n}",
"public IMU(Axis yaw_axis, AHRSAlgorithm algorithm)\n {\n super(yaw_axis, algorithm);\n }",
"void setOffset(com.walgreens.rxit.ch.cda.IVLPPDPQ offset);",
"public void setOffset(long offset) {\n cSetOffset(this.cObject, offset);\n }",
"public void setOffset(int offset) {\r\n this.offset = offset;\r\n }",
"private void setupTransformationMatrix(ShapeRenderer renderer){\n\t\trenderer.identity();\n\t\trenderer.translate(cx, cy, 0);\n\t\trenderer.rotate(0, 0, 1, angle); \n\t\trenderer.translate(-cx, -cy, 0);\n\t}",
"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 static void setRowKeyExpressionOffset(Expression rootExpression, final int offset) {\n rootExpression.accept(new RowKeyExpressionVisitor() {\n\n @Override\n public Void visit(RowKeyColumnExpression node) {\n node.setOffset(offset);\n return null;\n }\n \n });\n }",
"public void setOffset(Integer offset) {\n set(\"offset\",offset);\n }",
"public void setOffset(int offset) {\r\n\t\tthis.offSet = offset;\r\n\t}",
"public void setOffset(int offset) {\n this.offset = offset;\n }",
"private void setInititalValues() {\n drone.setTranslateX(INITIAL_X_POSITION);\n drone.setTranslateY(INITIAL_Y_POSITION);\n drone.setTranslateZ(INITIAL_Z_POSITION);\n\n // set initial orientation to z-axis (into the screen)\n setxOrientation(0);\n setyOrientation(0);\n setzOrientation(1);\n setYawAngle(0);\n setRollAngle(0);\n setPitchAngle(0);\n setSpeed(TelloDefaultValues.DEFAULT_SPEED);\n }",
"public void setRotation(double angle)\n\t{\n\t\tdouble cos = Math.cos(angle);\n\t\tdouble sin = Math.sin(angle);\n\t\tmatrix[0].x=cos;\n\t\tmatrix[0].y=sin;\n\t\tmatrix[1].x=-sin;\n\t\tmatrix[1].y=cos;\n\t}",
"public void setOffset(Integer offset) {\n set(\"offset\",offset);\n }",
"public void setViewMatrix(Mat4 matrix) {\n uploadUniform(viewMatUniformHandle, matrix);\n }"
]
| [
"0.68567616",
"0.67801577",
"0.6706831",
"0.6616529",
"0.65652037",
"0.62667644",
"0.6246795",
"0.6194484",
"0.6155108",
"0.6129473",
"0.60764",
"0.5986517",
"0.5902689",
"0.5808817",
"0.5785924",
"0.57805026",
"0.57347286",
"0.5730299",
"0.56873876",
"0.56786954",
"0.56786954",
"0.559429",
"0.55697894",
"0.55697894",
"0.5552484",
"0.5547982",
"0.55147153",
"0.54968125",
"0.5489566",
"0.545814",
"0.54424304",
"0.5430155",
"0.5381287",
"0.5381125",
"0.5319581",
"0.5304666",
"0.52887464",
"0.5266178",
"0.52554333",
"0.52548516",
"0.52053154",
"0.520301",
"0.51779276",
"0.51645947",
"0.5145521",
"0.5141883",
"0.513265",
"0.5128557",
"0.51171887",
"0.51078683",
"0.51078683",
"0.50993556",
"0.50974613",
"0.50493014",
"0.49964076",
"0.49952808",
"0.4929482",
"0.49185613",
"0.49185613",
"0.49185613",
"0.49185613",
"0.49185613",
"0.49185613",
"0.49185613",
"0.49185613",
"0.49185613",
"0.49185613",
"0.49185613",
"0.49177155",
"0.4915811",
"0.49080187",
"0.4903296",
"0.4901981",
"0.48868448",
"0.48851368",
"0.48851368",
"0.48851368",
"0.48851368",
"0.48851368",
"0.48729333",
"0.48618963",
"0.48558518",
"0.48424563",
"0.4833402",
"0.48274162",
"0.4825052",
"0.48231372",
"0.48194999",
"0.48187283",
"0.4812142",
"0.47959656",
"0.47918913",
"0.47906822",
"0.47876665",
"0.47746873",
"0.47733313",
"0.47677818",
"0.4758321",
"0.47563",
"0.47544804"
]
| 0.7477151 | 0 |
Normalize nodes for update/get LogicalTopology. Remove node that deviceType is not SERVER or SWITCH and remove node that have no ports. | private void normalizeLogicalNode(Connection conn, Collection<OfpConDeviceInfo> nodes) throws SQLException {
final String fname = "normalizeLogicalNode";
if (logger.isDebugEnabled()) {
logger.debug(String.format("%s(conn=%s, nodes=%s) - start", fname, conn, nodes));
}
Map<String, Boolean> devTypeMap = new HashMap<String, Boolean>();
List<OfpConDeviceInfo> removalNodeList = new ArrayList<OfpConDeviceInfo>();
for (OfpConDeviceInfo node : nodes) {
String devType = node.getDeviceType();
if (!devType.equals(NODE_TYPE_SERVER) && !devType.equals(NODE_TYPE_SWITCH) && !devType.equals(NODE_TYPE_EX_SWITCH)) {
removalNodeList.add(node);
continue;
}
List<OfpConPortInfo> ports = node.getPorts();
List<OfpConPortInfo> removalPortList = new ArrayList<OfpConPortInfo>();
for (OfpConPortInfo port : ports) {
String neiDevName = port.getOfpPortLink().getDeviceName();
/* check outDevice is LEAF, other wise don't append port */
Boolean isOfpSw = devTypeMap.get(neiDevName);
if (isOfpSw == null) {
Map<String, Object> outDevDoc = dao.getNodeInfoFromDeviceName(conn, neiDevName);
String outDevType = (String)outDevDoc.get("type");
isOfpSw = OFPMUtils.isNodeTypeOfpSwitch(outDevType);
devTypeMap.put(neiDevName, isOfpSw);
}
if (!isOfpSw) {
removalPortList.add(port);
}
}
ports.removeAll(removalPortList);
/* if node don't has port that connect to leaf-switch, node remove from nodeList */
if (ports.isEmpty()) {
removalNodeList.add(node);
}
}
nodes.removeAll(removalNodeList);
if (logger.isDebugEnabled()) {
logger.debug(String.format("%s() - end", fname));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void normalizeLogicalLink(Collection<OfpConDeviceInfo> nodes, Collection<LogicalLink> links) {\n\t\tfinal String fname = \"normalizeLogicalLink\";\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(String.format(\"%s(nodes=%s, links=%s) - start\", fname, nodes, links));\n\t\t}\n\n\t\tList<LogicalLink> removalLinks = new ArrayList<LogicalLink>();\n\t\tfor (LogicalLink link : links) {\n\t\t\tList<PortData> ports = link.getLink();\n\t\t\tif (!OFPMUtils.nodesContainsPort(nodes, ports.get(0).getDeviceName(), null)) {\n\t\t\t\tremovalLinks.add(link);\n\t\t\t} else if (!OFPMUtils.nodesContainsPort(nodes, ports.get(1).getDeviceName(), null)) {\n\t\t\t\tremovalLinks.add(link);\n\t\t\t}\n\t\t}\n\t\tlinks.removeAll(removalLinks);\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(String.format(\"%s() - end\", fname));\n\t\t}\n\t}",
"private void Clean(){\n \t NodeIterable nodeit = graphModel.getGraph().getNodes();\n \t\n \t for (Node node : nodeit) {\n\t\t\t\n \t\t \n \t\t \n\t\t}\n \t\n }",
"public void removeBootStrapNode() throws RemoteException{\n\t\tnodeIp=null;\n\t\thasNeighbours = false;\n\t\n\t}",
"public void alter(){\n\t\t//Alter the network to show change\n\t\t//Removes the connection between Nodes 2-3 and 4-3\n\t\tnodes.get(\"192.168.0.2\").delPort(0);\n\t\tnodes.get(\"192.168.0.4\").delPort(1);\n\t}",
"public void removeNode(Runtime runtime) {\n if (runtime == null) {\n LOG.debug(\"Can not remove null node\");\n return;\n }\n\n Iterator<NotificationListener> iter = topologyListeners.iterator();\n while(iter.hasNext()) {\n NotificationListener listener = iter.next();\n // TODO : Do it async...\n // TODO : Generics...\n listener.on(\"remove\", runtime);\n }\n }",
"private void removeNodeAndChildren(Node node) {\n Pane container = node.getContainerPane();\n\n if (container.getChildren().size() < 2) {\n return;\n }\n\n Iterator<javafx.scene.Node> iterator = container.getChildren().iterator();\n while (iterator.hasNext()) {\n javafx.scene.Node nextNode = iterator.next();\n if (nextNode instanceof Edge) {\n edges.remove(nextNode);\n iterator.remove();\n }\n }\n\n for (javafx.scene.Node genericNode : node.getChildrenVBox().getChildren()) {\n Pane containerPane = (Pane) genericNode;\n Node childNode = (Node) containerPane.getChildren().get(0);\n nodes.remove(childNode);\n removeNodeAndChildren(childNode);\n }\n node.getChildrenVBox().getChildren().clear();\n clearEdgeLinks();\n }",
"private void removeNoMoreExistingOriginalNodes() {\n for (Node mirrorNode : mirrorGraph.nodes()) {\n if (!isPartOfMirrorEdge(mirrorNode) && !originalGraph.has(mirrorNode)) {\n mirrorGraph.remove(mirrorNode);\n }\n }\n }",
"private void clean() {\n nodesToRemove.clear();\n edgesToRemove.clear();\n }",
"public static void modifyTopology()\r\n\t{\r\n\t\tSystem.out.println(\"===============STARTING TO MODIFY TOPOLOGY==============\");\r\n\t\tscan = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Please enter Router that you want to Shutdown : \"); // Printing Instruction\r\n\t\t\r\n\t\tint delr = Integer.parseInt(scan.nextLine()); // Reading the router to be deleted\r\n\t\twhile (delr < 1 || delr > routers) {\r\n\t\t\tSystem.out.print(\"\\n The entered source router not present, Please enter Again : \");\r\n\t\t\tdelr = Integer.parseInt(scan.nextLine());\r\n\t\t}\r\n\t\tdelr = delr - 1;\r\n\t\t\r\n\t\tint[][] graph2 = new int[routers-1][routers-1];\r\n\t\tint p = 0;\r\n\t\tfor (int i = 0; i < routers; ++i) { // Loop for deleting router and shifting graphay\r\n\r\n\t\t\tif (i == delr)\r\n\t\t\t\tcontinue;\r\n\t\t\tint q = 0;\r\n\t\t\tfor (int j = 0; j < routers; ++j) // Control loop for shifting\r\n\t\t\t{\r\n\t\t\t\tif (j == delr)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t\r\n\t\t\t\tgraph2[p][q] = graph[i][j]; // shifting row and column\r\n\t\t\t\t++q;\r\n\t\t\t}\r\n\t\t\t++p;\r\n\t\t}\r\n\t\t\r\n\t\trouters -= 1;\r\n\t\t\r\n\t\tSystem.out.println(\"============NEW TOPLOGY============\");\r\n\t\tfor (int row = 0; row < routers; row++) {\r\n\t\t\tfor (int col = 0; col < routers; col++) {\r\n\t\t\t\tLinkstateRouting.graph[row][col] = graph2[row][col];\r\n\t\t\t\tSystem.out.print(graph[row][col] + \"\\t\"); // Printing the new topology again\t\t\t\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t }\r\n\t\tSystem.out.println(\"Router \" + (delr + 1) + \" is Shutdown\");\r\n\t}",
"private void clearNodeFields() {\n nodeId.setText(\"\");\n sequencePreview.setText(\"\");\n leftNeighbours.setText(\"\");\n rightNeighbours.setText(\"\");\n position.setText(\"\");\n }",
"private void clearNodes()\r\n\t{\r\n\t clearMetaInfo();\r\n\t nodeMap.clear();\r\n\t}",
"public void cleanNodeListToEdges(CircosEdgeList edges){\n\t\tArrayList<CircosNode> tempnodes = new ArrayList<CircosNode>();\n\t\tHashMap<String,String> tempcolors = new HashMap<String,String>();\n\t\t\n\t\tfor(int i = 0; i < nodes.size(); i++){\n\t\t\tif(edges.containsNodeAsSourceOrTarget(nodes.get(i).getID())){\n\t\t\t\ttempnodes.add(nodes.get(i));\n\t\t\t\ttempcolors.put(nodes.get(i).getID(), colors.get(nodes.get(i).getID()));\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tnodes = tempnodes;\n\t\tcolors = tempcolors;\n\t}",
"private void emptyLayout() {\n int maxIndex = getNumPeers();\n for (int i = 0; i < maxIndex; i++) {\n // Iterate over the remote Peers only (first Peer is self Peer)\n Utils.removeViewFromParent(getVideoView(getPeerId(i + 1)));\n }\n }",
"public void removeContainerAndProtocolFilters()\n {\n clearConditions(CONTAINER_FIELD_KEY);\n clearConditions(PROTOCOL_FIELD_KEY);\n _dontNeedFilterContainer = true;\n }",
"private void reregisterNodes()\n {\n for(Protos.SchedulerNodeInfo nodeInfo : this.app.getSchedulerAppInfo().getNodesList())\n {\n this.app.reregisterNode(this, nodeInfo);\n }\n\n //tell scheduler to do a reconcile\n //FIXME: wait until all apps reregistered then do this?\n LOGGER.debug(\"kicking task reconciler...\");\n this.scheduler.kickReconciler();\n }",
"public void updateChildNodes() {\n\t\tList<FTNonLeafNode> nodesToRemove = new ArrayList<FTNonLeafNode>();\n\t\tfor (FTNonLeafNode intermediateNode : intermediateNodes.values()) {\n\t\t\tList<FTNode> childNodesToRemove = new ArrayList<FTNode>();\n\t\t\tfor (String childName : intermediateNode.childNodes.keySet()) {\n\t\t\t\tif (intermediateNodes.containsKey(childName)) {\n\t\t\t\t\t// update child node if it has child node\n\t\t\t\t\tFTNonLeafNode childNode = intermediateNodes.get(childName);\n\t\t\t\t\tif ((childNode instanceof FTOrNode) || (childNode instanceof FTAndNode)) {\n\t\t\t\t\t\tintermediateNode.addChildNode(childName, intermediateNodes.get(childName));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// if parent node is an OR node\n\t\t\t\t\t\t// remove this child\n\t\t\t\t\t\tif (intermediateNode instanceof FTOrNode) {\n\t\t\t\t\t\t\tchildNodesToRemove.add(childNode);\n\t\t\t\t\t\t\tnodesToRemove.add(childNode);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// if parent node is an AND node\n\t\t\t\t\t\t// remove the parent node and child node\n\t\t\t\t\t\t// and set their values to false in case they are referenced by other nodes\n\t\t\t\t\t\telse if (intermediateNode instanceof FTAndNode) {\n\t\t\t\t\t\t\tnodesToRemove.add(intermediateNode);\n\t\t\t\t\t\t\tnodesToRemove.add(childNode);\n\t\t\t\t\t\t\t// mark the nodes as they are not getting removed till after the loop\n\t\t\t\t\t\t\tintermediateNode.resolved = true;\n\t\t\t\t\t\t\tintermediateNode.nodeValue = false;\n\t\t\t\t\t\t\tchildNode.resolved = true;\n\t\t\t\t\t\t\tchildNode.nodeValue = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tintermediateNode.removeChildNodes(childNodesToRemove);\n\t\t\t// if no child node left for this intermediate node,\n\t\t\t// then its parent node should remove this intermediate node as well\n\t\t}\n\t\t// remove the no child nodes\n\t\tfor (FTNonLeafNode node : nodesToRemove) {\n\t\t\tintermediateNodes.remove(node.nodeName);\n\t\t}\n\t}",
"public void removeAllSuccessors() {\n\t\tfor (int idx=0; idx < this.successorNodes.length; idx++) {\n\t\t\tBaseNode bn = (BaseNode) this.successorNodes[idx];\n\t\t\tbn.removeAllSuccessors();\n\t\t}\n\t\tthis.successorNodes = new BaseNode[0];\n this.useCount = 0;\n\t}",
"public void removeAllSuccessors() {\n\t\tfor (int idx=0; idx < this.successorNodes.length; idx++) {\n\t\t\tBaseNode bn = (BaseNode) this.successorNodes[idx];\n\t\t\tbn.removeAllSuccessors();\n\t\t}\n\t\tthis.successorNodes = new BaseNode[0];\n this.useCount = 0;\n\t}",
"private void cleanupDirectedPresences(NodeID nodeID) {\n Map<String, Collection<String>> senders = nodePresences.remove(nodeID);\n if (senders != null) {\n for (Map.Entry<String, Collection<String>> entry : senders.entrySet()) {\n String sender = entry.getKey();\n Collection<String> receivers = entry.getValue();\n for (String receiver : receivers) {\n try {\n Presence presence = new Presence(Presence.Type.unavailable);\n presence.setFrom(sender);\n presence.setTo(receiver);\n XMPPServer.getInstance().getPresenceRouter().route(presence);\n }\n catch (PacketException e) {\n Log.error(e);\n }\n }\n }\n }\n }",
"void forceRemoveNodesAndExit(Collection<Node> nodesToRemove) throws Exception;",
"void disableUpgrade(NodeType type);",
"private static void removeNode(CFG cfg, SDGNode toRemove) {\n\t\tfinal List<SDGEdge> edgesToAdd = new LinkedList<SDGEdge>();\n\t\tfinal List<SDGEdge> edgesToRemove = new LinkedList<SDGEdge>();\n\t\tfor (SDGEdge eIncoming : cfg.getIncomingEdgesOfKind(toRemove, SDGEdge.Kind.CONTROL_FLOW)) {\n\t\t\tfor (SDGEdge eOutgoing : cfg\n\t\t\t\t\t.getOutgoingEdgesOfKind(toRemove, SDGEdge.Kind.CONTROL_FLOW)) {\n\t\t\t\tedgesToAdd.add(new SDGEdge(eIncoming.getSource(), eOutgoing.getTarget(),\n\t\t\t\t\t\tSDGEdge.Kind.CONTROL_FLOW));\n\t\t\t\tedgesToRemove.add(eIncoming);\n\t\t\t\tedgesToRemove.add(eOutgoing);\n\t\t\t}\n\t\t}\n\n\t\tcfg.addAllEdges(edgesToAdd);\n\t\tcfg.removeAllEdges(edgesToRemove);\n\t\tcfg.removeVertex(toRemove);\n\t}",
"void removeNodes(List<CyNode> nodes);",
"private void normalizeModel(List<Server> servers) {\n\n for (Server server : servers) {\n ServerInstance serverInstance = getServerInstance(new ServerRef(server.getHostName(), server.getName()));\n server.setServerState(serverInstance.getServerState());\n server.setSuspendState(serverInstance.getSuspendState());\n }\n }",
"public Builder clearNetwork() {\n if (networkBuilder_ == null) {\n if (stepInfoCase_ == 17) {\n stepInfoCase_ = 0;\n stepInfo_ = null;\n onChanged();\n }\n } else {\n if (stepInfoCase_ == 17) {\n stepInfoCase_ = 0;\n stepInfo_ = null;\n }\n networkBuilder_.clear();\n }\n return this;\n }",
"public void syncNodes(Node dataAfter, Node dataBefore) {\n if (isControllerConfigNode(dataAfter, dataBefore)) {\n LOG.trace(\"{} is ignored by VPP-renderer\", CONTROLLER_CONFIG_NODE);\n return;\n }\n // New node\n if (dataBefore == null && dataAfter != null) {\n createNode(dataAfter);\n }\n // Connected/disconnected node\n if (dataBefore != null && dataAfter != null) {\n updateNode(dataAfter);\n }\n // Removed node\n if (dataBefore != null && dataAfter == null) {\n removeNode(dataBefore);\n }\n }",
"void removeNode(Entity entity) {\n\t\tProcessing.nodeSet.remove(entity);\n\t\tProcessing.friendMap.remove(entity);\n\n\t\tSystem.out.println(\"the person was successfully removed from the network.\");\n\t}",
"public void cleanUpConnections()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tfor (int i = 0; i < this.electricityNetworks.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tthis.electricityNetworks.get(i).cleanUpArray();\r\n\r\n\t\t\t\tif (this.electricityNetworks.get(i).conductors.size() == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tthis.electricityNetworks.remove(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tFMLLog.severe(\"Failed to clean up wire connections!\");\r\n\t\t}\r\n\t}",
"public Builder clearNodeStatusList() {\n if (nodeStatusListBuilder_ == null) {\n nodeStatusList_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n } else {\n nodeStatusListBuilder_.clear();\n }\n return this;\n }",
"public void removeNodes(String nodeType, boolean force)\r\n {\r\n\tfinal NodeTypeHolder nt = ntMap.get(nodeType);\r\n\t\r\n\t// If the nodeType doesn't exist, then throw.\r\n\tif (nt == null)\r\n\t throw new RuntimeException(\"Can't find nodeType <\"+nodeType+\">\");\r\n\r\n\t// Look for EdgeTypes connecting Nodes of type nodeType.\r\n\tfor (final EdgeTypeHolder eth : ethMap.values())\r\n\t{\r\n\t final EdgeType et = eth.getEdgeType();\r\n\t if (et.getSourceType().equals(nodeType)\r\n\t\t|| et.getDestType().equals(nodeType))\r\n\t {\r\n\t\t// If we find any Edges matching this EdgeType...\r\n\t\tif (eth.numEdges() > 0)\r\n\t\t // If we're forcing then remove them, otherwise throw.\r\n\t\t if (force)\r\n\t\t {\r\n\t\t\t// Only remove the Edges, not the EdgeType itself!\r\n\t\t\teth.removeEdges();\r\n\t\t\t// Invalidate the Edge array cache.\r\n\t\t\tedges = null;\r\n\t\t }\r\n\t\t else\r\n\t\t\tthrow new RuntimeException(\"Edges already exist which connect Nodes of type <\"\r\n\t\t\t\t\t\t +nodeType+\">\");\r\n\t }\r\n\t}\r\n\t// Now clear out matching Nodes, not the nodeType itself!\r\n\tnt.clearNodes();\r\n\t// Invalidate the nodes array cache.\r\n\tnodes = null;\r\n }",
"private void shrinkComponents() {\n List<List<XGraph.XVertex>> components = getComponents();\n XGraph.XVertex componentVertices[] = new XGraph.XVertex[components.size()];\n\n int index = 0;\n //create or assign component\n for (List<XGraph.XVertex> component : components) {\n //if the size of the component is 1 then there is no need to create a new component group.\n componentVertices[index++] = component.size() == 1 ? component.get(0) :\n graph.getNewComponent();\n }\n index = 0;\n //Add edges\n for (XGraph.XVertex component : componentVertices) {\n //Disable vertex and edges of the children and get minimum edge\n Hashtable<Integer, XGraph.XEdge> minEdges = new Hashtable<>();\n //Process all child vertices only if this is a new component\n if (components.get(index).size() > 1) {\n for (XGraph.XVertex vertex : components.get(index++)) {\n getMinEdges(vertex, minEdges);\n vertex.disable();\n }\n } else {\n index++;\n getMinEdges(component, minEdges);\n }\n for (Map.Entry<Integer, XGraph.XEdge> edgeEntry : minEdges.entrySet()) {\n XGraph.XEdge minEdge = edgeEntry.getValue();\n XGraph.XVertex toVertex = componentVertices[scc.getComponentNo(minEdge.toVertex())];\n //Edge already there in original graph no need to add\n if (toVertex == minEdge.toVertex() && component == minEdge.fromVertex()) {\n continue;\n }\n //Need to create a new edge\n minEdge.disable();\n //Avoid loopback\n if (toVertex.isComponent() && toVertex != minEdge.toVertex()) {\n minEdge = new XGraph.XEdge(component, toVertex, minEdge.getWeight(), minEdge);\n } else {\n minEdge = new XGraph.XEdge(component, toVertex, minEdge.getWeight(), minEdge.getOriginal());\n }\n component.addEdge(minEdge);\n toVertex.addRevEdge(minEdge);\n }\n }\n }",
"public final static void disableNormalizationPlugin()\n { /* disableNormalizationPlugin */\n activeNormalization= null;\n }",
"private void unhilitNode()\n {\n\tif (hilited==null) return;\n\tGraphics g = getGraphics();\n\tsetRenderColor(g,Color.black);\n\trenderCircle(g,hilited.x,hilited.y,hilited.diameter+4);\n\thilited = null;\n }",
"public void deallocateNode(){\n this.processId = NO_PROCESS;\n this.full = false;\n }",
"private void editPipelineDefDeleteAllNodes(PipelineDefinition pipelineDef) {\n pipelineDefinitionCrud.deleteAllPipelineNodes(pipelineDef);\n }",
"void tryRemoveNodes(Collection<Node> nodesToRemove) throws Exception;",
"private void clearEdgeLinks() {\n edges.clear();\n //keep whole tree to maintain its position when it is expanded (within scroll pane bounds)\n Node rootNode = nodes.get(0);\n VBox rootVBox = (VBox) rootNode.getContainerPane().getParent();\n rootVBox.layout();\n Bounds rootNodeChildrenVBoxBounds = rootNode.getChildrenVBox().getBoundsInLocal();\n rootVBox.setLayoutY(Math.abs(rootVBox.getLayoutY() - ((rootNodeChildrenVBoxBounds.getHeight()) - rootNode.getHeight()) / 2 + rootNode.getLayoutY()));\n rootVBox.layout();\n\n for (int i = 0; i < nodes.size(); i++) {\n Pane containerPane = nodes.get(i).getContainerPane();\n //reposition node to the center of its children\n ObservableList<javafx.scene.Node> genericNodes = nodes.get(i).getChildrenVBox().getChildren();\n if (!genericNodes.isEmpty()) {\n nodes.get(i).setLayoutY(((nodes.get(i).getChildrenVBox().getBoundsInLocal().getHeight()) - rootNode.getHeight()) / 2);\n }\n\n for (int j = 0; j < containerPane.getChildren().size(); j++) {\n if (containerPane.getChildren().get(j) instanceof Edge) {\n containerPane.getChildren().remove(j);\n j--;\n }\n }\n }\n redrawEdges(rootNode);\n }",
"public void disconnect(){\n\t\tfor (NodeInfo peerInfo : peerList) {\r\n\t\t\t// send leave to peer\r\n\t\t\tsend(\"0114 LEAVE \" + ip + \" \" + port, peerInfo.getIp(), peerInfo.getPort());\r\n\t\t\t\r\n\t\t\tfor (NodeInfo peerInfo2 : peerList) {\r\n\t\t\t\tif (!peerInfo.equals(peerInfo2)) {\r\n\t\t\t\t\tString joinString = \"0114 JOIN \" + peerInfo2.getIp() + \" \" + peerInfo2.getPort();\r\n\t\t\t\t\t\r\n\t\t\t\t\tsend(joinString, peerInfo.getIp(), peerInfo.getPort());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tunRegisterBootstrapServer(serverIp, serverPort, ip, port, username);\r\n\t\t\tapp.printInfo(\"Node disconnected from server....\");\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t//socket = null;\r\n\t}",
"@Override\n public void disableUpgrade(NodeType type) {\n }",
"public static void reset() {\n\t\tnodes.clear();\n\t\tid = 0;\n\t}",
"void removeLine(PNode c){\n\t\tLinkSet ls = null;\n\t\tLink l = null;\n\t\tLinkSet ls1 = new LinkSet();\n\t\tfor(int i=0;i<linksets.size();i++){\n\t\t\tfor(int j=0;j<linksets.get(i).getLinks().size();j++){\n\t\t\t\tif(c==linksets.get(i).getLinks().get(j).getNode1()||c==linksets.get(i).getLinks().get(j).getNode2()){\n\t\t\t\t\tls = linksets.get(i);\n\t\t\t\t\tl = ls.getLinks().get(j);\n\t\t\t\t\tls.removeLink(l);\n\t\t\t\t\tif(ls.getLinks().size()==0){\n\t\t\t\t\t\tlinksets.remove(ls);//remove linkset if it is empty\n\t\t\t\t\t\tls = null;\n\t\t\t\t\t\tl = null;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(ls!=null){\n\t\t\tLink tlink = null;\n\t\t\tfor(Link lnk: ls.getLinks()){\n\t\t\t\tif(lnk.getNode1().getOwner()==l.getNode1().getOwner() && lnk.getNode1().getSignal()==l.getNode1().getSignal()\n\t\t\t\t\t\t|| lnk.getNode2().getOwner()==l.getNode1().getOwner() && lnk.getNode2().getSignal()==l.getNode1().getSignal()){\n\t\t\t\t\ttlink = lnk;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\tif(tlink!=null){\n\t\t\t\tls1.addLink(tlink);\n\t\t\t\tls.removeLink(tlink);\n\t\t\t\tcheckForNextLink(ls1, ls, tlink);\n\t\t\t}\n\t\t\tif(ls.getLinks().size()==0){\n\t\t\t\tlinksets.remove(ls);\n\t\t\t}\n\t\t\tlinksets.add(ls1);\n\t\t}\n\t\tfor(int i=0; i<links.size();i++){\n\t\t\tLink lnk = links.get(i);\n\t\t\tif (c == lnk.getNode1() || c == lnk.getNode2()){\n\t\t\t\tlayer.removeChild(links.get(i).getPPath());\n\t\t\t\tlinks.remove(i);\n\t\t\t\tremoveLine(c);\n\t\t\t}\n\t\t}\n\t}",
"public static void removeSample() {\n Node ll1 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll2 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll3 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll4 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll5 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll6 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n\n System.out.println(\"remove 1==\");\n Node r1 = ll1.remove(0);\n r1.printList();\n System.out.println(\"remove 2==\");\n Node r2 = ll2.remove(1);\n r2.printList();\n System.out.println(\"remove 3==\");\n Node r3 = ll3.remove(2);\n r3.printList();\n System.out.println(\"remove 4==\");\n Node r4 = ll4.remove(3);\n r4.printList();\n System.out.println(\"remove 5==\");\n Node r5 = ll5.remove(4);\n r5.printList();\n System.out.println(\"remove 6==\");\n Node r6 = ll6.remove(5);\n r6.printList();\n\n }",
"private void updateTopologyGraph(ExecNode<?> node) {\n TreeMap<Integer, List<Integer>> inputPriorityGroupMap = new TreeMap<>();\n Preconditions.checkState(\n node.getInputEdges().size() == node.getInputProperties().size(),\n \"Number of inputs nodes does not equal to number of input edges for node \"\n + node.getClass().getName()\n + \". This is a bug.\");\n for (int i = 0; i < node.getInputProperties().size(); i++) {\n int priority = node.getInputProperties().get(i).getPriority();\n inputPriorityGroupMap.computeIfAbsent(priority, k -> new ArrayList<>()).add(i);\n }\n\n // add edges between neighboring priority groups\n List<List<Integer>> inputPriorityGroups = new ArrayList<>(inputPriorityGroupMap.values());\n for (int i = 0; i + 1 < inputPriorityGroups.size(); i++) {\n List<Integer> higherGroup = inputPriorityGroups.get(i);\n List<Integer> lowerGroup = inputPriorityGroups.get(i + 1);\n\n for (int higher : higherGroup) {\n for (int lower : lowerGroup) {\n addTopologyEdges(node, higher, lower);\n }\n }\n }\n }",
"public void unsetProtocol()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(PROTOCOL$0);\n }\n }",
"private void clean() {\n Iterable<Long> v = vertices();\n Iterator<Long> iter = v.iterator();\n while (iter.hasNext()) {\n Long n = iter.next();\n if (world.get(n).adj.size() == 0) {\n iter.remove();\n }\n }\n }",
"public void disableNormalizationPlugin();",
"public NodeSet deleteTerminalDevice() throws JNCException {\n this.terminalDevice = null;\n String path = \"terminal-device\";\n return delete(path);\n }",
"public void removeAllEdges() {\n }",
"public void filterNodes(String filter) {\n\n\n tree_graphs.getChildren().clear();\n populate(universe, filter, this.showNodes, this.showEdges,\n this.showHyperEdges);\n\n\n tree_nodes.getChildren().clear();\n for (INode node : universe.getNodes()) {\n if (node.getID().contains(filter)) {\n parseNode(node, tree_nodes, filter);\n }\n }\n\n }",
"public Builder clearNodes() {\n if (nodesBuilder_ == null) {\n nodes_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n } else {\n nodesBuilder_.clear();\n }\n return this;\n }",
"public void trimRoutes(){\n Station firstStation = null;\n Station s = null;\n Link link = null;\n if (trainState instanceof TrainReady)\n s = ((TrainReady) trainState).getStation();\n if (trainState instanceof TrainArrive)\n link = ((TrainArrive) trainState).getLink();\n if (trainState instanceof TrainDepart)\n link = ((TrainDepart) trainState).getLink();\n\n if (trainState instanceof TrainReady){\n firstStation = s;\n } else if (trainState instanceof TrainArrive){\n firstStation = link.getTo();\n } else if (trainState instanceof TrainDepart){\n firstStation = link.getFrom();\n }\n\n Iterator<Route> routeIterator = routes.iterator();\n while (routeIterator.hasNext()) {\n Route route = routeIterator.next();\n Iterator<Link> iter = route.getLinkList().iterator();\n while (iter.hasNext()){\n Link track = iter.next();\n if (!track.getFrom().equals(firstStation))\n iter.remove();\n else\n break;\n }\n if (route.getLinkList().size() == 0) {\n routeIterator.remove();\n }\n }\n }",
"public void clearPathData()\r\n {\r\n // Clear out all paths\r\n for(String key: network_topology.keyset())\r\n {\r\n //System.out.println(\"Clearing : \"+ key);\r\n network_topology.get(key).previous=null;\r\n network_topology.get(key).minDistance = Double.POSITIVE_INFINITY;\r\n }\r\n }",
"public void clear(){\n this.entities.clear();\n /*for(QuadTree node: this.getNodes()){\n node.clear();\n this.getNodes().remove(node);\n }*/\n this.nodes.clear();\n }",
"public void resetNodeTeams()\n\t{\n\t\tfor (Node node : nodes.values())\n\t\t{\n\t\t\tnode.team = null;\n\t\t}\n\t}",
"public synchronized void removeAllFor(String nodeId) {\n\t/* see if this is a remote node */\n\tRoutesMap rl = forwardTable.remove(nodeId);\n\tif (rl == null) {\n\t /* if not, then see if it's a via node */\n\t Set<String> targets = inverseTable.remove(nodeId);\n\t if (targets != null) {\n\t\tfor (String to : targets) {\n\t\t RoutesMap trl = forwardTable.get(to);\n\t\t if (trl != null) {\n\t\t\ttrl.remove(nodeId);\n\t\t\tif (trl.size() == 0) {\n\t\t\t /* if this was the only route, cleanup */\n\t\t\t forwardTable.remove(to);\n\t\t\t}\n\t\t }\n\t\t}\n\t }\n\t}\n }",
"private void resetAllTouched() {\n for (NetworkNode n: network.nodes) {\n n.touched = false;\n }\n }",
"public static void main(String[] args) {\n // Set MessageDispatcher.\n // /////////////////////////////////////\n MessageDispatcher dispatcher = new MessageDispatcher(\n SYSTEM_MGR_ID,\n DISPATCHER_IP,\n Integer.parseInt(DISPATCHER_PORT));\n dispatcher.start();\n\n // /////////////////////////////////////\n // // Set SystemManager Interface\n // /////////////////////////////////////\n SystemManagerInterface systemMngInterface =\n new SystemManagerInterface(dispatcher);\n \n // /////////////////////////////////////\n // Set NetworkIntece\n // /////////////////////////////////////\n NetworkInterface originalNwInterface =\n new NetworkInterface(dispatcher, ORIGINAL_NW_ID);\n NetworkInterface aggregatedNwInterface =\n new NetworkInterface(dispatcher, AGGREGATED_NW_ID);\n\n outMsg(\"//////////////////////////////////////////////////\");\n outMsg(\"//// (1) Delete All Flows.\");\n outMsg(\"//////////////////////////////////////////////////\");\n List<Response> rsps = originalNwInterface.deleteAllFlow(); \n for (Response rsp : rsps) {\n outMsg(\" -DELETE FLow. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n }\n wait(WAIT_TIME);\n\n rsps = aggregatedNwInterface.deleteAllFlow(); \n for (Response rsp : rsps) {\n outMsg(\" -DELETE FLow. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n }\n wait(WAIT_TIME);\n \n outMsg(\"//////////////////////////////////////////////////\");\n outMsg(\"//// (2) Delete Topology.\");\n outMsg(\"//////////////////////////////////////////////////\");\n rsps = originalNwInterface.deleteTopology();\n for (Response rsp : rsps) {\n outMsg(\" -PUT (empty)Topology (Delete Topology). \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n }\n wait(WAIT_TIME * 2);\n \n rsps = aggregatedNwInterface.deleteTopology();\n for (Response rsp : rsps) {\n outMsg(\" -PUT (empty)Topology (Delete Topology). \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n } \n wait(WAIT_TIME * 2);\n \n outMsg(\"//////////////////////////////////////////////////\");\n outMsg(\"//// (3) Delete Connections.\");\n outMsg(\"//////////////////////////////////////////////////\");\n Response rsp = systemMngInterface.delConnection(\"conn1\");\n outMsg(\" -DELETE Connection. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n wait(WAIT_TIME * 2);\n\n rsp = systemMngInterface.delConnection(\"conn2\");\n outMsg(\" -DELETE Connection. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n wait(WAIT_TIME * 2);\n\n\n outMsg(\"//////////////////////////////////////////////////\");\n outMsg(\"//// (4) Delete Components.\");\n outMsg(\"//////////////////////////////////////////////////\");\n rsp = systemMngInterface.delComponent(ORIGINAL_NW_ID);\n outMsg(\" -DELETE Component. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n wait(WAIT_TIME * 2);\n\n rsp = systemMngInterface.delComponent(AGGREGATED_NW_ID);\n outMsg(\" -DELETE Component. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n wait(WAIT_TIME * 2);\n \n rsp = systemMngInterface.delComponent(AGGREGATOR_ID);\n outMsg(\" -DELETE Component. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n wait(WAIT_TIME * 2);\n\n dispatcher.close();\n System.exit(0);\n\n }",
"public void resetNodes() {\n\tmaxX = -100000;\n\tmaxY = -100000;\n\tminX = 100000;\n\tminY = 100000;\n\taverageX = 0;\n\taverageY = 0;\n }",
"private OfpConDeviceInfo getLogicalNode(Connection conn, String devName) throws SQLException {\n\t\tfinal String fname = \"getLogicalNode\";\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(String.format(\"%s(conn=%s, devName=%s) - start\", fname, conn, devName));\n\t\t}\n\t\tMap<String, Object> devDoc = dao.getNodeInfoFromDeviceName(conn, devName);\n\t\tif (devDoc == null) {\n\t\t\treturn null;\n\t\t}\n\t\tOfpConDeviceInfo node = new OfpConDeviceInfo();\n\t\tnode.setDeviceName(devName);\n\t\tnode.setDeviceType((String)devDoc.get(\"type\"));\n\t\tnode.setLocation((String)devDoc.get(\"location\"));\n\t\tnode.setTenant((String)devDoc.get(\"tenant\"));\n\n\t\tList<OfpConPortInfo> portList = new ArrayList<OfpConPortInfo>();\n\t\tList<Map<String, Object>> linkDocList = dao.getCableLinksFromDeviceName(conn, devName);\n\t\tif (linkDocList == null) {\n\t\t\treturn null;\n\t\t}\n\t\tfor (Map<String, Object> linkDoc : linkDocList) {\n\t\t\tString outDevName = (String)linkDoc.get(\"outDeviceName\");\n\n\t\t\tPortData ofpPort = new PortData();\n\t\t\tString outPortName = (String)linkDoc.get(\"outPortName\");\n\t\t\tInteger outPortNmbr = (Integer)linkDoc.get(\"outPortNumber\");\n\t\t\tofpPort.setDeviceName(outDevName);\n\t\t\tofpPort.setPortName(outPortName);\n\t\t\tofpPort.setPortNumber(outPortNmbr);\n\n\t\t\tString inPortName = (String)linkDoc.get(\"inPortName\");\n\t\t\tInteger inPortNmbr = (Integer)linkDoc.get(\"inPortNumber\");\n\t\t\tOfpConPortInfo port = new OfpConPortInfo();\n\t\t\tport.setPortName(inPortName);\n\t\t\tport.setPortNumber(inPortNmbr);\n\t\t\tport.setOfpPortLink(ofpPort);\n\n\t\t\tportList.add(port);\n\t\t}\n\t\tnode.setPorts(portList);\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(String.format(\"%s(ret=%s) - end\", fname, node));\n\t\t}\n\t\treturn node;\n\t}",
"public void run(TaskMonitor taskMonitor){\n taskMonitor.setStatusMessage(\"Grouping by node type ...\");\n // Getting necessary components from network\n CyApplicationManager manager = adapter.getCyApplicationManager();\n CyNetworkView networkView = manager.getCurrentNetworkView();\n CyNetwork network = networkView.getModel();\n CyTable table = network.getDefaultNodeTable();\n // Getting all selected nodes\n List<CyNode> nodes = CyTableUtil.getNodesInState(network,\"selected\",true);\n for(CyNode node:nodes){\n\n FilterUtil filter = new FilterUtil(network,table);\n String nodeType=filter.findNodeType(node);\n // Getting all nodes with same node type with selected node\n List<CyNode> matchingNodes=filter.FilterRowByNodeType(nodeType,\"nodeType\");\n // If value is not locked this means it is not hiden on the network, because it lockes green color value to node\n if(networkView.getNodeView(node).isValueLocked(BasicVisualLexicon.NODE_FILL_COLOR)){\n for(CyNode node2:matchingNodes){\n networkView.getNodeView(node2).clearValueLock(BasicVisualLexicon.NODE_FILL_COLOR);\n }\n } else{\n for(CyNode node2:matchingNodes){\n networkView.getNodeView(node2).setLockedValue(BasicVisualLexicon.NODE_FILL_COLOR, Color.GREEN);\n }\n }\n }\n }",
"public void setToOriginals(){\n\t\t//set all occupied nodes as empty\n\t\tif(nodeStatus == Status.occupied){\n\t\t\tsetAsEmpty();\n\t\t}\n\t\t//if the node had a unit end on it, reset that value\n\t\tif(ended == true){\n\t\t\tended=false;\n\t\t}\n\t\tf=0;\n\t\tg=0;\n\t\th=0;\n\t}",
"public void freeNodes(){\n\t\t//android.util.Log.d(TAG,\"freeNodes()\");\n\t\tfinal int size = this.nodes.size();\n\t\tfor(int index=0; index < size; index++){\n\t\t\tthis.nodes.delete(this.nodes.keyAt(index));\n\t\t}\n\t}",
"public void reset()\r\n {\n if_list.removeAllElements();\r\n ls_db.reset();\r\n spf_root = null;\r\n vertex_list.removeAllElements();\r\n router_lsa_self = null;\r\n floodLastTime = Double.NaN;\r\n delayFlood = false;\r\n spf_calculation = 0;\r\n lsa_refresh_timer = null;\r\n }",
"public Boolean unregisterTopologyChangeCallback();",
"public void removeNeighbours(){\n\t\tgetNeighbours().removeAll(getNeighbours());\n\t}",
"public void resetViews() {\n\t\tmContentView.findViewById(R.id.btn_connect).setVisibility(View.VISIBLE);\n\t\tTextView view = (TextView) mContentView.findViewById(R.id.device_address);\n\t\tview.setText(R.string.empty);\n\t\tview = (TextView) mContentView.findViewById(R.id.device_info);\n\t\tview.setText(R.string.empty);\n\t\tview = (TextView) mContentView.findViewById(R.id.group_owner);\n\t\tview.setText(R.string.empty);\n\t\tview = (TextView) mContentView.findViewById(R.id.status_text);\n\t\tview.setText(R.string.empty);\n//\t\tmContentView.findViewById(R.id.btn_start_client).setVisibility(View.GONE);\n\t\tmContentView.findViewById(R.id.btn_send_data).setVisibility(View.GONE);\n\t\tthis.getView().setVisibility(View.GONE);\n\t\tserver_running = false;\n\t}",
"public void clearSupervised() {\n supervisedNodes.clear();\n }",
"@Override\n\tpublic void initNode() {\n\t\tEFMonitorUtil.cleanAllInstance(false);\t\t\t\n\t}",
"@Override\npublic NodeConfig<NodeIDType> getNodeConfig() {\n\treturn null;\n}",
"public void clearShapes() {\n\t\tcollectionOfNodes.clear();\n\t}",
"default void stopNode(\n com.google.cloud.tpu.v2alpha1.StopNodeRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStopNodeMethod(), responseObserver);\n }",
"private static void simplify (GraphDirected<NodeCppOSMDirected, EdgeCppOSMDirected> osmGraph) {\n \t\tfinal Iterator<NodeCppOSMDirected> iteratorNodes = osmGraph.getNodes().iterator();\n \t\twhile (iteratorNodes.hasNext()) {\n \t\t\tfinal NodeCppOSMDirected node = iteratorNodes.next();\n \t\t\t// one in one out\n \t\t\tif (node.getInDegree() == 1 && node.getOutDegree() == 1) {\n \t\t\t\t// get the ids of the two connected nodes\n \t\t\t\tfinal Long currentNodeId = node.getId();\n \t\t\t\tfinal List<EdgeCppOSMDirected> edges = node.getEdges();\n \t\t\t\tfinal EdgeCppOSMDirected edge1 = edges.get(0);\n \t\t\t\tfinal EdgeCppOSMDirected edge2 = edges.get(1);\n \t\t\t\tfinal Long node1id = edge1.getNode1().getId() == (currentNodeId) ? edge2.getNode1().getId() : edge1.getNode1().getId();\n \t\t\t\tfinal Long node2id = edge1.getNode1().getId() == (currentNodeId) ? edge1.getNode2().getId() : edge2.getNode2().getId();\n \t\t\t\tif (node2id == node1id){\n \t\t\t\t\t// we are in a deadend and do not erase ourself\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\t// concat the list in the right way\n \t\t\t\tList<WayNodeOSM> newMetaNodes = concatMetanodes(edge1.getMetadata().getNodes(), edge2.getMetadata().getNodes(), currentNodeId);\n \t\t\t\t// add a new edge\n \t\t\t\t// TODO: Handle way properly - what would name be in this context?\n \t\t\t\tosmGraph.getNode(node1id).connectWithNodeWeigthAndMeta(osmGraph.getNode(node2id), edge1.getWeight() + edge2.getWeight(),\n \t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, \"unknown\", newMetaNodes));\n \t\t\t\t// remove the old node\n \t\t\t\t// do this manually because we otherwise corrupt the iterator\n \t\t\t\tnode.removeAllEdges();\n \t\t\t\titeratorNodes.remove();\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t// two in two out\n \t\t\tif (node.getInDegree() == 2 && node.getOutDegree() == 2) {\n \t\t\t\tfinal long currentNodeId = node.getId();\n \t\t\t\t//check the connections\n \t\t\t\tArrayList<EdgeCppOSMDirected> incomingEdges = new ArrayList<>();\n \t\t\t\tArrayList<EdgeCppOSMDirected> outgoingEdges = new ArrayList<>();\n \t\t\t\tfor(EdgeCppOSMDirected edge : node.getEdges()) {\n \t\t\t\t\tif(edge.getNode1().getId() == currentNodeId){\n \t\t\t\t\t\toutgoingEdges.add(edge);\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\tincomingEdges.add(edge);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\t//TODO make this condition better\n \t\t\t\tif(outgoingEdges.get(0).getNode2().equals(incomingEdges.get(0).getNode1())){\n \t\t\t\t\t//out0 = in0\n \t\t\t\t\tif(!outgoingEdges.get(1).getNode2().equals(incomingEdges.get(1).getNode1())){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(0).getWeight() != incomingEdges.get(0).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(1).getWeight() != incomingEdges.get(1).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\t//out0 should be in1\n \t\t\t\t\t//therefore out1 = in0\n \t\t\t\t\tif(!outgoingEdges.get(0).getNode2().equals(incomingEdges.get(1).getNode1())){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(!outgoingEdges.get(1).getNode2().equals(incomingEdges.get(0).getNode1())){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(0).getWeight() != incomingEdges.get(1).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(1).getWeight() != incomingEdges.get(0).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t}\n \n \t\t\t\t// get the ids of the two connected nodes\n \t\t\t\tfinal NodeCppOSMDirected node1 = incomingEdges.get(0).getNode1();\n \t\t\t\tfinal NodeCppOSMDirected node2 = incomingEdges.get(1).getNode1();\n \t\t\t\t// \t\t\tif (node1.equals(node2)){\n \t\t\t\t// \t\t\t\t// we are in a loop and do not erase ourself\n \t\t\t\t// \t\t\t\tcontinue;\n \t\t\t\t// \t\t\t}\n \t\t\t\t// concat the list in the right way\n \t\t\t\tList<WayNodeOSM> metaNodes1 = incomingEdges.get(0).getMetadata().getNodes();\n \t\t\t\tList<WayNodeOSM> metaNodes2 = incomingEdges.get(1).getMetadata().getNodes();\n \t\t\t\tdouble weight = incomingEdges.get(0).getWeight() +incomingEdges.get(1).getWeight();\n \t\t\t\tList<WayNodeOSM> newMetaNodes = concatMetanodes(metaNodes1, metaNodes2, currentNodeId);\n \t\t\t\t// add a new edge\n \t\t\t\t// TODO: Handle way properly - what would name be in this context?\n \t\t\t\tnode1.connectWithNodeWeigthAndMeta(node2, weight,\n \t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, \"unknown\", newMetaNodes));\n \t\t\t\tnode2.connectWithNodeWeigthAndMeta(node1, weight,\n \t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, \"unknown\", newMetaNodes));\n \t\t\t\t// remove the old node\n \t\t\t\t// do this manually because we otherwise corrupt the iterator\n \t\t\t\tnode.removeAllEdges();\n \t\t\t\titeratorNodes.remove();\n \t\t\t}\n \t\t}\n \t}",
"private static void strip(final List<ValueNode> nodes, Collection c, ValueNode current) {\n if (current.blockName != null || current.isField()) {\n \n int cpt = 0;\n for (ValueNode node : nodes) {\n if (Objects.equals(node.path, current.path) &&\n Objects.equals(node.blockName, current.blockName)) {\n cpt++;\n }\n }\n if (c.size() > cpt) {\n final List toRemove = new ArrayList<>();\n final Iterator it = c.iterator();\n int i = 0;\n while (it.hasNext()) {\n Object o = it.next();\n if (i >= cpt) {\n toRemove.add(o);\n }\n i++;\n }\n c.removeAll(toRemove);\n }\n }\n }",
"private void clean() {\n //use iterator\n Iterator<Long> it = nodes.keySet().iterator();\n while (it.hasNext()) {\n Long node = it.next();\n if (nodes.get(node).adjs.isEmpty()) {\n it.remove();\n }\n }\n }",
"public static void reset(){\n\t\t\n\t\t// clear hashmap\n\t\tvisitorListMap.clear();\n\t\t\n\t\t// clear visitor list model\n\t\tvisitorListModel.clear();\n\t\t\n\t\t// clear server info\n\t\tlblServerInfoIP.setText(\"IP address: Not connected.\");\n\t\tlblServerInfoPort.setText(\"Port: \");\n\t\t\n\t\t// disable leave room\n\t\tlblLeave.setVisible(false);\n\t\t\n\t}",
"private void RemoveRootNode() {\n\t\t\n\t\troot_map.remove(this);\n\t\tis_node_set = false;\n\t\tif(left_ptr == null && right_ptr == null) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tleft_ptr.RemoveRootNode();\n\t\tright_ptr.RemoveRootNode();\n\t}",
"@Deprecated\n public void destroy(){\n if (DeviceUtils.getVersionSDK() >= 11){\n //just for api < 11\n return;\n }\n final NodeController controller = this.controller.get();\n if (controller != null) {\n controller.onDestroy();\n controller.getLogger().d(\"[NodeRemoter]destroy (api<11), nodeId:\" + controller.getNodeId());\n }\n }",
"void removeHasNodeSettings(NodeSettings oldHasNodeSettings);",
"public void retainOnlyVisibleNodes() {\n RTGraphComponent.RenderContext myrc = (RTGraphComponent.RenderContext) getRTComponent().rc; if (myrc == null) return;\n Set<String> new_retained_nodes = new HashSet<String>();\n Iterator<String> it = myrc.entity_counter_context.binIterator();\n while (it.hasNext()) new_retained_nodes.add(it.next());\n retained_nodes = new_retained_nodes;\n newBundlesRoot(getRTParent().getRootBundles());\n }",
"public void clear()\n {\n if (nodes != null)\n {\n detachNodes(nodes);\n nodes = null;\n namedNodes = null;\n }\n }",
"private boolean removeNode(NeuralNode node) {\r\n\t\treturn innerNodes.remove(node);\r\n\t}",
"protected void dropDetachedPartitionTables() {\n\n TenantInfo tenantInfo = getTenantInfo(); \n \n FhirSchemaGenerator gen = new FhirSchemaGenerator(adminSchemaName, tenantInfo.getTenantSchema());\n PhysicalDataModel pdm = new PhysicalDataModel();\n gen.buildSchema(pdm);\n\n dropDetachedPartitionTables(pdm, tenantInfo);\n }",
"public void resetDecoyRouter() {\n this.hostsDecoyRouter = false;\n }",
"void removeDevice(int networkAddress);",
"public synchronized void unCollaspeAll(GraphData data){\r\n \t\tfor (int i=0; i<data.nnodes; i++)\r\n \t\t{\r\n \t\t\tdata.nodes[i].isCollapsed = false;\r\n \t\t\tdata.nodes[i].collapseSource = -1;\r\n \t\t\tdata.nodes[i].collapseDest = -1;\r\n \t\t}\r\n \t\tfor (int i=0; i<data.nedges; i++)\r\n \t\t{\r\n \t\t\tdata.edges[i].isCollapsed = false;\r\n \t\t}\r\n \t\tdata.virtualEdges.clear();\r\n \t}",
"public void decreaseDegreeOfUsedNodes() {\n\t\tthis.v0.decreseDegree();\n\t\tthis.v1.decreseDegree();\n\t}",
"public Topology convertTopology(FloodlightTopology floodlightTopology)\n\t{\n\t\tArrayList<IDevice> devices = floodlightTopology.getDevices();\n\t\tArrayList<Link> links = floodlightTopology.getLinks();\n\t\tMap<DatapathId, IOFSwitch> switchMap = floodlightTopology.getSwitchMap();\n\t\tHashMap<IOFSwitch, ArrayList<OFPortDesc>> switchPortMap = floodlightTopology.getSwitchPortMap();\n\n\t\tArrayList<Node> topoNodes = new ArrayList<Node>();\n\t\tArrayList<FlowLink> topoLinks = new ArrayList<FlowLink>();\n\t\t//Create Switch Nodes\n\t\tfor(DatapathId dpID : switchMap.keySet()){\n\t\t\tString name = dpID.toString();\n\t\t\tint numPorts = switchPortMap.get(switchMap.get(dpID)).size();\n\t\t\ttopoNodes.add(new Switch(name, numPorts));\n\t\t}\n\t\t//Create Host Nodes\n\t\t//Create (Host, Switch) Links\n\t\tfor(IDevice device : devices){\n\t\t\tString name = device.getMACAddressString();\n\t\t\tSwitchPort[] attachmentPoints = device.getAttachmentPoints();\n\t\t\tfor (SwitchPort ap : attachmentPoints){\n\t\t\t\tif(ap.getPort().getPortNumber() > 0){\n\t\t\t\t\tHost newHost = new Host(name, 1);\n\t\t\t\t\ttopoNodes.add(newHost);\n\t\t\t\t\tArrayList<FlowLink> hostSwitchLinks = makeHostSwitchLinkPair(topoNodes, device, ap, switchMap, switchPortMap);\n\t\t\t\t\ttopoLinks.add(hostSwitchLinks.get(0));\n\t\t\t\t\ttopoLinks.add(hostSwitchLinks.get(1));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Create (Switch, Switch) Links\n\t\tfor(Link link : links){\n\t\t\tFlowLink switchSwitchLink = makeSwitchSwitchLink(topoNodes, link, switchMap, switchPortMap);\n\t\t\ttopoLinks.add(switchSwitchLink);\n\t\t}\n\t\t\n\t\treturn new Topology(topoNodes, topoLinks);\n\t}",
"public void testConvertTopo (Topology tp)\n {\n Node root = tp.getNodes().get(0);\n //root.setColor(Color.green);\n parcours(root, visitedlist, compo1);\n set.addAll(composante);\n ArrayList distinctList = new ArrayList(set);\n System.out.println(distinctList.size());\n for ( int i = 0; i < distinctList.size(); i++ )\n System.out.println(distinctList.get(i));\n ArrayList<Link> liste = connectedL(tp);\n /*for (int i = 0; i < liste.size(); i++)\n System.out.println(liste.get(i));*/\n Convert(liste);\n /*for ( int i = 0; i < listConvert.size(); i++ )\n System.out.println(listConvert.get(i));*/\n ConvertMinimiz(listConvert);\n minimisationConvCompo(distinctList);\n minimisationAllNeighbor(listConvert,tp);\n //minimisation4(listConvert,tp);\n }",
"public void normalization(){\n normalization = processControlBlock[0].getArrivalTime();\n }",
"private void setGroupNodeNotProcess(int row, int col) {\n\t\tfor(int i = 0; i <= row; i++) {\n\t\t\tfor(int j = 0; j < MAX_COL; j++) {\n\t\t\t\tif(i == row && j > col) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.inputs[i][j].setWalking(true);\n\t\t\t\t\t// System.out.print(this.inputs[i][j].getNumber() + \", \");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"protected void removeFromChain(\n LogicalOperator nodeToRemove,\n Map<Integer, Integer> projectionMapping)\n throws VisitorException, FrontendException {\n \t\n \tList<LogicalOperator> afterNodes = mPlan.getPredecessors(nodeToRemove);\n \tif (afterNodes.size()!=1)\n \t\tthrow new RuntimeException(\"removeFromChain only valid to remove \" + \n \t\"node has one predecessor.\");\n \tList<LogicalOperator> beforeNodes = mPlan.getSuccessors(nodeToRemove);\n \tif (beforeNodes!=null && beforeNodes.size()!=1)\n \t\tthrow new RuntimeException(\"removeFromChain only valid to remove \" + \n \t\t\"node has one successor.\");\n \t\n \t// Get after and before node\n \tLogicalOperator after = mPlan.getPredecessors(nodeToRemove).get(0);\n \tLogicalOperator before = null;\n \tif (beforeNodes!=null)\n \t\tbefore = mPlan.getSuccessors(nodeToRemove).get(0);\n \t\n // Remove nodeToRemove from plan\n \tmPlan.remove(nodeToRemove);\n \tif (before!=null)\n \t{\n\t \t// Shortcut nodeToRemove.\n\t mPlan.connect(after, before);\n\t\n\t // Visit all the inner plans of before and change their projects to\n\t // connect to after instead of nodeToRemove.\n\t // Find right inner plan(s) to visit\n\t List<LogicalPlan> plans = new ArrayList<LogicalPlan>();\n\t if (before instanceof LOCogroup) {\n\t plans.addAll((((LOCogroup)before).getGroupByPlans()).values());\n\t } else if (before instanceof LOSort) {\n\t plans.addAll(((LOSort)before).getSortColPlans());\n\t } else if (before instanceof LOFilter) {\n\t plans.add(((LOFilter)before).getComparisonPlan());\n\t } else if (before instanceof LOSplitOutput) {\n\t plans.add(((LOSplitOutput)before).getConditionPlan());\n\t } else if (before instanceof LOForEach) {\n\t plans.addAll(((LOForEach)before).getForEachPlans());\n\t }\n\t \n\t for (LogicalPlan lp : plans) {\n\t ProjectFixerUpper pfu =\n\t new ProjectFixerUpper(lp, nodeToRemove, after, projectionMapping);\n\t pfu.visit();\n\t }\n\t\n \t}\n\n \t// Now rebuild the schemas\n // rebuildSchemas();\n }",
"public void resetWorld(){\r\n\t\tSystem.out.println(\"Resetting world\");\r\n\t\tengine.removeAllEntities();\r\n\t\tlvlFactory.resetWorld();\r\n\t\t\r\n\t\tplayer = lvlFactory.createPlayer(cam);\r\n\t\tlvlFactory.createFloor();\r\n lvlFactory.createWaterFloor();\r\n \r\n int wallWidth = (int) (1*RenderingSystem.PPM);\r\n int wallHeight = (int) (60*RenderingSystem.PPM);\r\n TextureRegion wallRegion = DFUtils.makeTextureRegion(wallWidth, wallHeight, \"222222FF\");\r\n lvlFactory.createWalls(wallRegion); //TODO make some damn images for this stuff \r\n \r\n // reset controller controls (fixes bug where controller stuck on directrion if died in that position)\r\n controller.left = false;\r\n controller.right = false;\r\n controller.up = false;\r\n controller.down = false;\r\n controller.isMouse1Down = false;\r\n controller.isMouse2Down = false;\r\n controller.isMouse3Down = false;\r\n\t\t\r\n\t}",
"public synchronized void cleanup() {\n\t\t// by freeing the mother group we clean up all the nodes we've created\n\t\t// on the SC server\n\t\tsendMessage(\"/g_freeAll\", new Object[] { _motherGroupID });\n\t\tfreeNode(_motherGroupID);\n\t\tfreeAllBuffers();\n\t\t\n\t\t//reset the lists of sound nodes, nodeIds, busses, etc\n\t\tSoundNode sn;\n\t\tEnumeration<SoundNode> e = _soundNodes.elements();\n\t\twhile (e.hasMoreElements()) {\n\t\t\tsn = e.nextElement();\n\t\t\tsn.setAlive(false);\n\t\t}\n\t\t_soundNodes.clear();\n\t\t_nodeIdList.clear();\n\t\t_busList.clear();\n\t\t_bufferMap.clear();\n\t}",
"public void delContextNodes();",
"public void resetCenters(){\n\tsynchroCenters.clear();\n }",
"public void removeNode(Node... nodes) {\n\t\tfor (Node node : nodes) {\n\t\t\twhile(this.nodes.remove(node));\n\t\t\tremoveConnections(node.getAllConnection());\n\t\t}\n\t}",
"public void unsetSrvWeightValue() throws JNCException {\n delete(\"srv-weight\");\n }",
"void clear() {\n\t\t\tfor (int i = 0 ; i < nodes.length; i++) {\n\t\t\t\tnodes[i].clear((byte) 1);\n\t\t\t}\n\t\t\tsize = 0;\n\t\t}",
"public void removeParentLineConnector()\n {\n LineConnector parentLineConnector = null;\n \n for (LineConnector lineConnector: lineConnectors)\n if (lineConnector.isType(LineConnectorType.TRIANGLE))\n {\n parentLineConnector = lineConnector;\n break;\n }\n if (parentLineConnector != null)\n lineConnectors.remove(parentLineConnector);\n }",
"private void resetNetworkProperties() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.resetNetworkProperties():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.resetNetworkProperties():void\");\n }"
]
| [
"0.61413795",
"0.53164405",
"0.50736856",
"0.50708157",
"0.50594676",
"0.49640173",
"0.49542245",
"0.4894341",
"0.48937577",
"0.4891107",
"0.487765",
"0.47774416",
"0.47737882",
"0.47576618",
"0.47416264",
"0.47291288",
"0.47120413",
"0.47120413",
"0.47073087",
"0.4702707",
"0.46711296",
"0.46704707",
"0.4668643",
"0.4641007",
"0.46317622",
"0.46312636",
"0.4616935",
"0.45819008",
"0.4565045",
"0.45574322",
"0.4540934",
"0.45321602",
"0.4519232",
"0.4513902",
"0.45119777",
"0.45059958",
"0.4501049",
"0.4493868",
"0.44804728",
"0.44783556",
"0.44777244",
"0.4471875",
"0.4454435",
"0.44253248",
"0.44144756",
"0.43981752",
"0.43919456",
"0.43911055",
"0.4382779",
"0.4374575",
"0.4372836",
"0.43715805",
"0.43704197",
"0.43650585",
"0.43598926",
"0.4352542",
"0.43453884",
"0.43332863",
"0.43310305",
"0.4329764",
"0.4314114",
"0.43116572",
"0.43103257",
"0.4309014",
"0.43073243",
"0.43023443",
"0.4302268",
"0.42988786",
"0.42980117",
"0.42942342",
"0.42862305",
"0.4285675",
"0.42801547",
"0.42713386",
"0.42699036",
"0.4268189",
"0.4257062",
"0.42466292",
"0.42421165",
"0.42401996",
"0.42271322",
"0.42253113",
"0.42206344",
"0.4207619",
"0.41977426",
"0.41959",
"0.41952905",
"0.41915262",
"0.41897684",
"0.41896245",
"0.41888112",
"0.41821763",
"0.41818526",
"0.41803837",
"0.41794387",
"0.41776618",
"0.4177502",
"0.41745293",
"0.41714433",
"0.41680044"
]
| 0.75748265 | 0 |
Make node for update/getLogicalTopology from deviceName, and return it. | private OfpConDeviceInfo getLogicalNode(Connection conn, String devName) throws SQLException {
final String fname = "getLogicalNode";
if (logger.isDebugEnabled()) {
logger.debug(String.format("%s(conn=%s, devName=%s) - start", fname, conn, devName));
}
Map<String, Object> devDoc = dao.getNodeInfoFromDeviceName(conn, devName);
if (devDoc == null) {
return null;
}
OfpConDeviceInfo node = new OfpConDeviceInfo();
node.setDeviceName(devName);
node.setDeviceType((String)devDoc.get("type"));
node.setLocation((String)devDoc.get("location"));
node.setTenant((String)devDoc.get("tenant"));
List<OfpConPortInfo> portList = new ArrayList<OfpConPortInfo>();
List<Map<String, Object>> linkDocList = dao.getCableLinksFromDeviceName(conn, devName);
if (linkDocList == null) {
return null;
}
for (Map<String, Object> linkDoc : linkDocList) {
String outDevName = (String)linkDoc.get("outDeviceName");
PortData ofpPort = new PortData();
String outPortName = (String)linkDoc.get("outPortName");
Integer outPortNmbr = (Integer)linkDoc.get("outPortNumber");
ofpPort.setDeviceName(outDevName);
ofpPort.setPortName(outPortName);
ofpPort.setPortNumber(outPortNmbr);
String inPortName = (String)linkDoc.get("inPortName");
Integer inPortNmbr = (Integer)linkDoc.get("inPortNumber");
OfpConPortInfo port = new OfpConPortInfo();
port.setPortName(inPortName);
port.setPortNumber(inPortNmbr);
port.setOfpPortLink(ofpPort);
portList.add(port);
}
node.setPorts(portList);
if (logger.isDebugEnabled()) {
logger.debug(String.format("%s(ret=%s) - end", fname, node));
}
return node;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract UPnPDeviceNode GetDeviceNode(String name);",
"public MockTopologyNode createManualTree() throws ServiceFactory.ServiceNotAvailableException {\n // get a new submitter to create a new tree\n final TopologyDataSubmissionService3.TopologySubmitter3 mysubmitter = mServiceFactory.getService\n (TopologyDataSubmissionService3.class).getTopologySubmitter();\n\n TopologyNode topnode = mysubmitter.createTopLevelNode(\"__top_of_tree__\", 0);\n MockTopologyNode node = (MockTopologyNode) topnode;\n\n MockTopologyNode node1 = createMockNode(node, \"HostDiscoveryData\", null, 0, 0, false, false);\n MockTopologyValue value1 = (MockTopologyValue) node1.createValue(\"name\");\n value1.setSampleValue(\"HostDiscoveryData\");\n value1.setIsIdentity(true);\n value1.setNodeFrequency(0);\n\n MockTopologyNode node2 = createMockNode(node1, \"host\", \"Host\", 0, 0, false, false);\n MockTopologyValue value2 = (MockTopologyValue) node2.createValue(\"name\");\n value2.setSampleValue(\"198.51.100.0\");\n value2.setIsIdentity(true);\n value2.setNodeFrequency(0);\n\n return node;\n}",
"private static Topology getTopology(){\n final Serde<String> stringSerde = Serdes.String();\n final Serde<VehiclePosition> vpSerde = getJsonSerde();\n StreamsBuilder builder = new StreamsBuilder();\n KStream<String,VehiclePosition> positions = builder\n .stream(\"vehicle-positions\", Consumed.with(stringSerde, vpSerde));\n KStream<String,VehiclePosition> operator47Only =\n positions.filter((key,value) -> value.VP.oper == 47); \n operator47Only.to(\"vehicle-positions-oper-47\",\n Produced.with(stringSerde, vpSerde));\n Topology topology = builder.build();\n return topology;\n }",
"public NetworkTopology getNetworkTopology() throws NotExistingEntityException, MethodNotImplementedException;",
"public static Object switchOp(final String nodeId, final String operationName) {\n\t\tLOGGER.info(\"Executing Z-Wave Device Operation...\" + operationName + \" on Z-Wave Device #\" + nodeId);\n\n\t\tProcess process = null;\n\t\tBufferedReader br = null;\n\t\tfinal List<String> listOfDevices = Lists.newArrayList();\n\n\t\ttry {\n\t\t\t// Before each serial port communication, reset the serial port to\n\t\t\t// make sure that all operations related to ZWave Device gets to be\n\t\t\t// successful\n\t\t\tresetSerialPort(SERIAL_PORT_DRIVER);\n\t\t\tprocess = Runtime.getRuntime().exec(\"java -Djava.library.path=\" + RXTX_LIBRARY_PATH + \" -cp \"\n\t\t\t\t\t+ RXTX_LOCATION + \" -jar \" + JAR_LOCATION + \" \" + nodeId + \" \" + operationName);\n\t\t\tbr = new BufferedReader(new InputStreamReader(process.getInputStream()));\n\t\t\tString line = null;\n\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tif (line.contains(\"Something bad happened\")) {\n\t\t\t\t\tLOGGER.error(\"Something bad happened with Serial Communication\");\n\t\t\t\t\tthrow new KuraException(KuraErrorCode.OPERATION_NOT_SUPPORTED);\n\t\t\t\t}\n\n\t\t\t\tif (\"ON\".equals(operationName)) {\n\t\t\t\t\tif (line.contains(\"ZWave Node is switched on\")) {\n\t\t\t\t\t\tLOGGER.info(\"Executing Z-Wave Device Switch ON Operation on Z-Wave Device #\" + nodeId\n\t\t\t\t\t\t\t\t+ \"....... Done\");\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (\"OFF\".equals(operationName)) {\n\t\t\t\t\tif (line.contains(\"ZWave Node is switched off\")) {\n\t\t\t\t\t\tLOGGER.info(\"Executing Z-Wave Device Switch OFF Operation on Z-Wave Device #\" + nodeId\n\t\t\t\t\t\t\t\t+ \"....... Done\");\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (\"STATUS\".equals(operationName)) {\n\t\t\t\t\tif (line.contains(\"Status\")) {\n\t\t\t\t\t\tLOGGER.info(\"Executing Z-Wave Device Switch Status Operation on Z-Wave Device #\" + nodeId\n\t\t\t\t\t\t\t\t+ \"....... Done\");\n\t\t\t\t\t\treturn line.split(\":\")[1];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (\"LIST\".equals(operationName)) {\n\t\t\t\t\tif (line.contains(\"ZWave Device Added\")) {\n\t\t\t\t\t\tLOGGER.info(\"Executing Z-Wave Devices List Operation....... Done\");\n\t\t\t\t\t\tlistOfDevices.add(line.split(\":\")[1]);\n\t\t\t\t\t\treturn listOfDevices;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfinal boolean flag = process.waitFor(15, TimeUnit.SECONDS);\n\t\t\tresetSerialPort(SERIAL_PORT_DRIVER);\n\t\t\treturn flag;\n\n\t\t} catch (final Exception e) {\n\t\t\tLOGGER.error(Throwables.getStackTraceAsString(e));\n\t\t\treturn false;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tLOGGER.debug(\"Closing Buffered Reader and destroying Process\", process);\n\t\t\t\tbr.close();\n\t\t\t\tprocess.destroy();\n\t\t\t} catch (final IOException e) {\n\t\t\t\tLOGGER.error(\"Error closing read buffer\", Throwables.getStackTraceAsString(e));\n\t\t\t}\n\t\t}\n\t}",
"String targetServiceTopologyId();",
"public Topology getTopology() {\n return new Topology(Lists.newCopyOnWriteArrayList(topology.getRuntimes()));\n }",
"public static GraphNode createGraphNodeForSubsystem() {\n GraphNode nameNode = new GraphNode();\n\n for (int i = 0; i < 3; i++) {\n GraphNode childNode = new GraphNode();\n\n childNode.setPosition(AccuracyTestHelper.createPoint(0, 12 * i));\n childNode.setSize(AccuracyTestHelper.createDimension(100, 22));\n\n nameNode.addContained(childNode);\n }\n\n nameNode.setPosition(AccuracyTestHelper.createPoint(20, 20));\n nameNode.setSize(AccuracyTestHelper.createDimension(100, 100));\n\n GraphNode graphNode = new GraphNode();\n graphNode.addContained(nameNode);\n graphNode.addContained(new GraphNode());\n\n graphNode.setPosition(AccuracyTestHelper.createPoint(20, 20));\n graphNode.setSize(AccuracyTestHelper.createDimension(1000, 1000));\n\n // create a subsystem\n Subsystem subsystem = new SubsystemImpl();\n\n // set namespace\n Namespace namespace = new MockNamespaceImplAcucracy();\n subsystem.setNamespace(namespace);\n\n // create a semantic model\n Uml1SemanticModelBridge semanticModel = new Uml1SemanticModelBridge();\n semanticModel.setElement(subsystem);\n\n graphNode.setSemanticModel(semanticModel);\n\n return graphNode;\n }",
"@Override\n public TopologyResponse startParserTopology(String name) throws RestException {\n TopologyResponse topologyResponse = new TopologyResponse();\n if (globalConfigService.get() == null) {\n topologyResponse.setErrorMessage(TopologyStatusCode.GLOBAL_CONFIG_MISSING.toString());\n return topologyResponse;\n }\n\n List<String> sensorTypes = Collections.singletonList(name);\n // If name is a group then look up sensors to build the actual topology name\n SensorParserGroup sensorParserGroup = sensorParserGroupService.findOne(name);\n if (sensorParserGroup != null) {\n sensorTypes = new ArrayList<>(sensorParserGroup.getSensors());\n }\n for (String sensorType : sensorTypes) {\n if (sensorParserConfigService.findOne(sensorType.trim()) == null) {\n topologyResponse\n .setErrorMessage(TopologyStatusCode.SENSOR_PARSER_CONFIG_MISSING.toString());\n return topologyResponse;\n }\n }\n\n // sort the sensor types so the topology name is consistent\n Collections.sort(sensorTypes);\n return createResponse(\n stormCLIClientWrapper.startParserTopology(String.join(ParserTopologyCLI.TOPOLOGY_OPTION_SEPARATOR, sensorTypes)),\n TopologyStatusCode.STARTED,\n TopologyStatusCode.START_ERROR\n );\n }",
"TopologyBuilder getTopology() {\n return topology;\n }",
"public Topology convertTopology(FloodlightTopology floodlightTopology)\n\t{\n\t\tArrayList<IDevice> devices = floodlightTopology.getDevices();\n\t\tArrayList<Link> links = floodlightTopology.getLinks();\n\t\tMap<DatapathId, IOFSwitch> switchMap = floodlightTopology.getSwitchMap();\n\t\tHashMap<IOFSwitch, ArrayList<OFPortDesc>> switchPortMap = floodlightTopology.getSwitchPortMap();\n\n\t\tArrayList<Node> topoNodes = new ArrayList<Node>();\n\t\tArrayList<FlowLink> topoLinks = new ArrayList<FlowLink>();\n\t\t//Create Switch Nodes\n\t\tfor(DatapathId dpID : switchMap.keySet()){\n\t\t\tString name = dpID.toString();\n\t\t\tint numPorts = switchPortMap.get(switchMap.get(dpID)).size();\n\t\t\ttopoNodes.add(new Switch(name, numPorts));\n\t\t}\n\t\t//Create Host Nodes\n\t\t//Create (Host, Switch) Links\n\t\tfor(IDevice device : devices){\n\t\t\tString name = device.getMACAddressString();\n\t\t\tSwitchPort[] attachmentPoints = device.getAttachmentPoints();\n\t\t\tfor (SwitchPort ap : attachmentPoints){\n\t\t\t\tif(ap.getPort().getPortNumber() > 0){\n\t\t\t\t\tHost newHost = new Host(name, 1);\n\t\t\t\t\ttopoNodes.add(newHost);\n\t\t\t\t\tArrayList<FlowLink> hostSwitchLinks = makeHostSwitchLinkPair(topoNodes, device, ap, switchMap, switchPortMap);\n\t\t\t\t\ttopoLinks.add(hostSwitchLinks.get(0));\n\t\t\t\t\ttopoLinks.add(hostSwitchLinks.get(1));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Create (Switch, Switch) Links\n\t\tfor(Link link : links){\n\t\t\tFlowLink switchSwitchLink = makeSwitchSwitchLink(topoNodes, link, switchMap, switchPortMap);\n\t\t\ttopoLinks.add(switchSwitchLink);\n\t\t}\n\t\t\n\t\treturn new Topology(topoNodes, topoLinks);\n\t}",
"private MockTopologyNode createMockNode(MockTopologyNode parent, String nodeName, String typeHint, long freq,\n long timestamp, Boolean isId, Boolean isReplace){\n final MockTopologyNode result = (MockTopologyNode) parent.createNode(nodeName);\n result.setTypeHint(typeHint);\n result.setReplace(isReplace);\n result.setIsIdentity(isId);\n result.setNodeFrequency(freq);\n result.setNodeTimestamp(timestamp);\n\n return result;\n}",
"public Device getDevice() {\n\t\tDevice device = new Device();\n\n\t\tdevice.setName(\"DeviceNorgren\");\n\t\tdevice.setManufacturer(\"Norgren\");\n\t\tdevice.setVersion(\"5.7.3\");\n\t\tdevice.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\n\t\tSensor sensorTemperature = new Sensor();\n\t\tsensorTemperature.setName(\"SensorSiemens\");\n\t\tsensorTemperature.setManufacturer(\"Siemens\");\n\t\tsensorTemperature.setVersion(\"1.2.2\");\n\t\tsensorTemperature.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\t\tsensorTemperature.setMonitor(\"Temperature\");\n\n\t\tSensor sensorPressure = new Sensor();\n\t\tsensorPressure.setName(\"SensorOmron\");\n\t\tsensorPressure.setManufacturer(\"Omron\");\n\t\tsensorPressure.setVersion(\"0.5.2\");\n\t\tsensorPressure.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\t\tsensorPressure.setMonitor(\"Pressure\");\n\n\t\tdevice.getListSensor().add(sensorTemperature);\n\t\tdevice.getListSensor().add(sensorPressure);\n\n\t\tActuator actuadorKey = new Actuator();\n\n\t\tactuadorKey.setName(\"SensorAutonics\");\n\t\tactuadorKey.setManufacturer(\"Autonics\");\n\t\tactuadorKey.setVersion(\"3.1\");\n\t\tactuadorKey.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\t\tactuadorKey.setAction(\"On-Off\");\n\n\t\tdevice.getListActuator().add(actuadorKey);\n\n\t\treturn device;\n\n\t}",
"public static KubevirtNode buildKubevirtNode(Node node) {\n String hostname = node.getMetadata().getName();\n IpAddress managementIp = null;\n IpAddress dataIp = null;\n\n for (NodeAddress nodeAddress:node.getStatus().getAddresses()) {\n if (nodeAddress.getType().equals(INTERNAL_IP)) {\n managementIp = IpAddress.valueOf(nodeAddress.getAddress());\n dataIp = IpAddress.valueOf(nodeAddress.getAddress());\n }\n }\n\n Set<String> rolesFull = node.getMetadata().getLabels().keySet().stream()\n .filter(l -> l.contains(K8S_ROLE))\n .collect(Collectors.toSet());\n\n KubevirtNode.Type nodeType = WORKER;\n\n for (String roleStr : rolesFull) {\n String role = roleStr.split(\"/\")[1];\n if (MASTER.name().equalsIgnoreCase(role)) {\n nodeType = MASTER;\n break;\n }\n }\n\n // start to parse kubernetes annotation\n Map<String, String> annots = node.getMetadata().getAnnotations();\n String physnetConfig = annots.get(PHYSNET_CONFIG_KEY);\n String gatewayConfig = annots.get(GATEWAY_CONFIG_KEY);\n String dataIpStr = annots.get(DATA_IP_KEY);\n Set<KubevirtPhyInterface> phys = new HashSet<>();\n String gatewayBridgeName = null;\n try {\n if (physnetConfig != null) {\n JsonArray configJson = JsonArray.readFrom(physnetConfig);\n\n for (int i = 0; i < configJson.size(); i++) {\n JsonObject object = configJson.get(i).asObject();\n String network = object.get(NETWORK_KEY).asString();\n String intf = object.get(INTERFACE_KEY).asString();\n\n if (network != null && intf != null) {\n String physBridgeId;\n if (object.get(PHYS_BRIDGE_ID) != null) {\n physBridgeId = object.get(PHYS_BRIDGE_ID).asString();\n } else {\n physBridgeId = genDpidFromName(network + intf + hostname);\n log.trace(\"host {} physnet dpid for network {} intf {} is null so generate dpid {}\",\n hostname, network, intf, physBridgeId);\n }\n\n phys.add(DefaultKubevirtPhyInterface.builder()\n .network(network)\n .intf(intf)\n .physBridge(DeviceId.deviceId(physBridgeId))\n .build());\n }\n }\n }\n\n if (dataIpStr != null) {\n dataIp = IpAddress.valueOf(dataIpStr);\n }\n\n if (gatewayConfig != null) {\n JsonNode jsonNode = new ObjectMapper().readTree(gatewayConfig);\n\n nodeType = GATEWAY;\n gatewayBridgeName = jsonNode.get(GATEWAY_BRIDGE_NAME).asText();\n }\n } catch (JsonProcessingException e) {\n log.error(\"Failed to parse physnet config or gateway config object\", e);\n }\n\n // if the node is taint with kubevirt.io key configured,\n // we mark this node as OTHER type, and do not add it into the cluster\n NodeSpec spec = node.getSpec();\n if (spec.getTaints() != null) {\n for (Taint taint : spec.getTaints()) {\n String effect = taint.getEffect();\n String key = taint.getKey();\n String value = taint.getValue();\n\n if (StringUtils.equals(effect, NO_SCHEDULE_EFFECT) &&\n StringUtils.equals(key, KUBEVIRT_IO_KEY) &&\n StringUtils.equals(value, DRAINING_VALUE)) {\n nodeType = OTHER;\n }\n }\n }\n\n return DefaultKubevirtNode.builder()\n .hostname(hostname)\n .managementIp(managementIp)\n .dataIp(dataIp)\n .type(nodeType)\n .state(KubevirtNodeState.ON_BOARDED)\n .phyIntfs(phys)\n .gatewayBridgeName(gatewayBridgeName)\n .build();\n }",
"private void createTopology() {\n deviceService = createMock(DeviceService.class);\n linkService = createMock(LinkService.class);\n\n deviceService.addListener(anyObject(DeviceListener.class));\n linkService.addListener(anyObject(LinkListener.class));\n\n createDevices(NUM_DEVICES, NUM_PORTS_PER_DEVICE);\n createLinks(NUM_DEVICES);\n addIntfConfig();\n popluateEdgePortService();\n }",
"@Override\n\tpublic IDevice byId( String deviceId )\n\t{\n\t\treturn new DeviceOperations(this.getPartner(), this.getContext().getItem1(), this.getContext().getItem2(), deviceId);\n\t}",
"OperationNode getNode();",
"public static Topology getTopology() {\n StreamsBuilder builder = new StreamsBuilder();\n\n KafkaStreamsRunnerDSL uot = new KafkaStreamsRunnerDSL();\n uot.buildPipeline(builder);\n\n // build the topology and start streaming\n Topology topology = builder.build();\n return topology;\n }",
"DeviceSensor createDeviceSensor();",
"Device createDevice();",
"@SuppressWarnings(\"unchecked\")\n\t\tpublic Operation createOperation(String opName, String[] params, OperationCallback caller) {\n\t\t\tthrow new RuntimeException(\"Method 'createOperation' in class 'DummyNode' not yet implemented!\");\n\t\t\t//return null;\n\t\t}",
"private void createDevice(String host, int port, String name) {\n ThingUID uid = new ThingUID(THING_TYPE_DEVICE, name);\n\n if (uid != null) {\n Map<String, Object> properties = new HashMap<>(1);\n properties.put(\"hostname\", host);\n properties.put(\"port\", port);\n properties.put(\"name\", name);\n DiscoveryResult result = DiscoveryResultBuilder.create(uid).withProperties(properties)\n .withLabel(\"Kinect Device\").build();\n thingDiscovered(result);\n }\n }",
"CommunicationLink getNodeByName(String name)\n {\n return getNodeById(Objects.hash(name));\n }",
"public Device build() {\n return new Device(name, active);\n }",
"public static ElectronicDevice getDevice(){\n\t\treturn new Television();\n\t\t\n\t}",
"Builder forDevice(DeviceId deviceId);",
"public SupplyNode getNode(String name){\n return t.get(name);\n }",
"PhysicalWireDefinition generateWire(LogicalWire wire) throws Fabric3Exception;",
"public static GraphNode createGraphNodeForUseCaseConnector() {\n GraphNode graphNode = new GraphNode();\n GraphNode graphNodeName = new GraphNode();\n\n for (int i = 0; i < 3; i++) {\n GraphNode childNode = new GraphNode();\n\n childNode.setPosition(AccuracyTestHelper.createPoint(60, 20 + 20 * i));\n childNode.setSize(AccuracyTestHelper.createDimension(100, 22));\n\n graphNodeName.addContained(childNode);\n }\n graphNode.addContained(graphNodeName);\n\n graphNode.setPosition(AccuracyTestHelper.createPoint(-50, -50));\n graphNode.setSize(AccuracyTestHelper.createDimension(100, 100));\n\n // create a use case\n UseCase usecase = new UseCaseImpl();\n\n // set stereotype\n Stereotype stereotype = new StereotypeImpl();\n\n // set namespace\n Namespace namespace = new MockAccuracyNamespaceImpl();\n usecase.setNamespace(namespace);\n // create a semantic model\n Uml1SemanticModelBridge semanticModel = new Uml1SemanticModelBridge();\n semanticModel.setElement(usecase);\n\n graphNode.setSemanticModel(semanticModel);\n\n return graphNode;\n }",
"public static void createTopology()\r\n\t{\r\n\t\tSystem.out.println(\"==============STARTING TO CREATE TOPOLOGY=================\");\r\n\t\tint row = 0, col = 0;\r\n\t\ttry {\r\n\t\t\tscan = new Scanner(System.in);\r\n\t\t\tSystem.out.println(\"\\nPlease enter the file name <name.txt>\");\r\n\t\t\tString s_t_r = scan.nextLine();\r\n\t\t\tFile inFile = new File(s_t_r); // Connecting to the input file\r\n\t\t\t\r\n\t\t\tScanner in = new Scanner(inFile);\r\n\t\t\tString lines[] = in.nextLine().trim().split(\"\\\\s+\"); // line count estimation\r\n\t\t\tin.close(); // Closing the input file\r\n\t\t\t\r\n\t\t\trouters = lines.length;\r\n\t\t\tgraph = new int[routers][routers]; // declaring the adjacency matrix\r\n\t\t\t\r\n\t\t\tin = new Scanner(inFile); // scanner for each line in the input file\r\n\t\t\tint lineCount = 0;\r\n\t\t\twhile (in.hasNextLine()) // Checking the size of the matrix input\r\n\t\t\t{\r\n\t\t\t\tString currentLine[] = in.nextLine().trim().split(\"\\\\s+\"); // read each line\r\n\t\t\t\tfor (int i = 0; i < currentLine.length; i++) {\r\n\t\t\t\t\tgraph[lineCount][i] = Integer.parseInt(currentLine[i]);\r\n\t\t\t\t}\r\n\t\t\t\tlineCount++;\r\n\t\t\t}\r\n\t\t} catch (Exception e) { // Catching exception for error in reading the file\r\n\t\t\tSystem.out.println(\"Error in reading the file\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"\\nReview the original topology \");\r\n\t\tfor (row = 0; row < routers; row++) {\r\n\t\t\tfor (col = 0; col < routers; col++)\r\n\t\t\t\tSystem.out.print(graph[row][col] + \"\\t\"); // Printing the topology that is created\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}",
"DeviceActuator createDeviceActuator();",
"public String getOdlOpenflowNode2() throws SnmpStatusException;",
"private static void connectToNameNode(){\n int nameNodeID = GlobalContext.getNameNodeId();\n ServerConnectMsg msg = new ServerConnectMsg(null);\n\n if(comm_bus.isLocalEntity(nameNodeID)) {\n log.info(\"Connect to local name node\");\n comm_bus.connectTo(nameNodeID, msg.getByteBuffer());\n } else {\n log.info(\"Connect to remote name node\");\n HostInfo nameNodeInfo = GlobalContext.getHostInfo(nameNodeID);\n String nameNodeAddr = nameNodeInfo.ip + \":\" + nameNodeInfo.port;\n log.info(\"name_node_addr = \" + String.valueOf(nameNodeAddr));\n comm_bus.connectTo(nameNodeID, nameNodeAddr, msg.getByteBuffer());\n }\n }",
"NodeConnection createNodeConnection();",
"protected HardwareDevice getHardwareOn(String name, Object hardwareDeviceMapping) {\n\n HardwareDevice hardwareDevice = null;\n try {\n HardwareMap.DeviceMapping<HardwareDevice> deviceMapping = (HardwareMap.DeviceMapping<HardwareDevice>) hardwareDeviceMapping;\n hardwareDevice = (HardwareDevice)deviceMapping.get(name);\n }\n catch (Throwable e)\n {\n try {\n ActiveOpMode.handleCatchAllException(e, getTelemetryUtil());\n } catch (InterruptedException e1) {\n //DbgLog.msg(e.getLocalizedMessage());\n }\n\n }\n\n return hardwareDevice;\n }",
"public static Network teSubsystem2YangNetwork(\n org.onosproject.tetopology.management.api.Network teSubsystem,\n OperationType operation,\n TeTopologyService teTopologyService) {\n checkNotNull(teSubsystem, E_NULL_TE_NETWORK);\n checkNotNull(teSubsystem.networkId(), E_NULL_TE_NETWORKID);\n\n // Generate a network builder with the specific networkId.\n NetworkId networkId = NetworkId.fromString(teSubsystem.networkId().toString());\n NetworkBuilder builder = DefaultNetwork.builder()\n .yangNetworkOpType(\n toNetworksOperationType(operation))\n .networkId(networkId);\n\n // Supporting networks\n if (teSubsystem.supportingNetworkIds() != null) {\n builder = te2YangSupportingNetwork(builder, teSubsystem.supportingNetworkIds());\n }\n\n // Nodes\n if (teSubsystem.nodes() != null) {\n org.onosproject.tetopology.management.api.Network nt = teTopologyService.network(teSubsystem.networkId());\n TeTopologyKey teTopoKey = new TeTopologyKey(nt.teTopologyId().providerId(),\n nt.teTopologyId().clientId(),\n Long.valueOf(nt.teTopologyId().topologyId()));\n builder = te2YangNodes(builder, teSubsystem.nodes(),\n teTopologyService,\n teTopoKey);\n }\n\n // Network types\n builder = te2YangNetworkType(builder, teSubsystem.teTopologyId());\n\n // Add links - link is the augmentation\n if (teSubsystem.links() != null) {\n builder = te2YangLinks(builder, teSubsystem.links(), teTopologyService);\n }\n\n // TE Topology IDs\n if (teSubsystem.teTopologyId() != null) {\n builder = te2YangTopologyIds(builder, teSubsystem.teTopologyId(),\n teTopologyService,\n teSubsystem.networkId());\n }\n\n return builder.build();\n }",
"@java.lang.Deprecated\n public A withNewTopologyKey(java.lang.String original);",
"public String topologyName() {\n return this.innerProperties() == null ? null : this.innerProperties().topologyName();\n }",
"private SmartDevice createDevice(Cursor cursor){\n String id = cursor.getString(cursor.getColumnIndex(COLUMN_ID));\n String name = cursor.getString(cursor.getColumnIndex(COLUMN_NAME));\n String type = cursor.getString(cursor.getColumnIndex(COLUMN_TYPE));\n String active = cursor.getString(cursor.getColumnIndex(COLUMN_ACTIVE));\n String image = cursor.getString(cursor.getColumnIndex(COLUMN_IMAGE));\n return new SmartDevice(id, name, type, active, image);\n }",
"private VmDevice readVmDevice(XmlNode node, Guid deviceId) {\n VmDevice vmDevice = new VmDevice();\n vmDevice.setId(new VmDeviceId(deviceId, vmBase.getId()));\n if (node.SelectSingleNode(OvfProperties.VMD_ADDRESS, _xmlNS) != null\n && !StringUtils.isEmpty(node.SelectSingleNode(OvfProperties.VMD_ADDRESS, _xmlNS).innerText)) {\n vmDevice.setAddress(String.valueOf(node.SelectSingleNode(OvfProperties.VMD_ADDRESS, _xmlNS).innerText));\n } else {\n vmDevice.setAddress(\"\");\n }\n if (node.SelectSingleNode(OvfProperties.VMD_ALIAS, _xmlNS) != null\n && !StringUtils.isEmpty(node.SelectSingleNode(OvfProperties.VMD_ALIAS, _xmlNS).innerText)) {\n vmDevice.setAlias(String.valueOf(node.SelectSingleNode(OvfProperties.VMD_ALIAS, _xmlNS).innerText));\n } else {\n vmDevice.setAlias(\"\");\n }\n XmlNode specParamsNode = node.SelectSingleNode(OvfProperties.VMD_SPEC_PARAMS, _xmlNS);\n if (specParamsNode != null\n && !StringUtils.isEmpty(specParamsNode.innerText)) {\n vmDevice.setSpecParams(getMapNode(specParamsNode));\n } else {\n // Empty map\n vmDevice.setSpecParams(Collections.<String, Object>emptyMap());\n }\n if (node.SelectSingleNode(OvfProperties.VMD_TYPE, _xmlNS) != null\n && !StringUtils.isEmpty(node.SelectSingleNode(OvfProperties.VMD_TYPE, _xmlNS).innerText)) {\n vmDevice.setType(VmDeviceGeneralType.forValue(String.valueOf(node.SelectSingleNode(OvfProperties.VMD_TYPE, _xmlNS).innerText)));\n } else {\n int resourceType = getResourceType(node, OvfProperties.VMD_RESOURCE_TYPE);\n vmDevice.setType(VmDeviceGeneralType.forValue(VmDeviceType.getoVirtDevice(resourceType)));\n }\n if (node.SelectSingleNode(OvfProperties.VMD_DEVICE, _xmlNS) != null\n && !StringUtils.isEmpty(node.SelectSingleNode(OvfProperties.VMD_DEVICE, _xmlNS).innerText)) {\n vmDevice.setDevice(String.valueOf(node.SelectSingleNode(OvfProperties.VMD_DEVICE, _xmlNS).innerText));\n } else {\n setDeviceByResource(node, vmDevice);\n }\n if (node.SelectSingleNode(OvfProperties.VMD_BOOT_ORDER, _xmlNS) != null\n && !StringUtils.isEmpty(node.SelectSingleNode(OvfProperties.VMD_BOOT_ORDER, _xmlNS).innerText)) {\n vmDevice.setBootOrder(Integer.valueOf(node.SelectSingleNode(OvfProperties.VMD_BOOT_ORDER, _xmlNS).innerText));\n } else {\n vmDevice.setBootOrder(0);\n }\n if (node.SelectSingleNode(OvfProperties.VMD_IS_PLUGGED, _xmlNS) != null\n && !StringUtils.isEmpty(node.SelectSingleNode(OvfProperties.VMD_IS_PLUGGED, _xmlNS).innerText)) {\n vmDevice.setIsPlugged(Boolean.valueOf(node.SelectSingleNode(OvfProperties.VMD_IS_PLUGGED, _xmlNS).innerText));\n } else {\n vmDevice.setIsPlugged(Boolean.TRUE);\n }\n if (node.SelectSingleNode(OvfProperties.VMD_IS_READONLY, _xmlNS) != null\n && !StringUtils.isEmpty(node.SelectSingleNode(OvfProperties.VMD_IS_READONLY, _xmlNS).innerText)) {\n vmDevice.setIsReadOnly(Boolean.valueOf(node.SelectSingleNode(OvfProperties.VMD_IS_READONLY, _xmlNS).innerText));\n } else {\n vmDevice.setIsReadOnly(Boolean.FALSE);\n }\n if (node.SelectSingleNode(OvfProperties.VMD_CUSTOM_PROP, _xmlNS) != null\n && StringUtils.isNotEmpty(node.SelectSingleNode(OvfProperties.VMD_CUSTOM_PROP, _xmlNS).innerText)) {\n vmDevice.setCustomProperties(DevicePropertiesUtils.getInstance().convertProperties(\n String.valueOf(node.SelectSingleNode(OvfProperties.VMD_CUSTOM_PROP, _xmlNS).innerText)));\n } else {\n vmDevice.setCustomProperties(null);\n }\n\n if (node.SelectSingleNode(OvfProperties.VMD_SNAPSHOT_PROP, _xmlNS) != null\n && StringUtils.isNotEmpty(node.SelectSingleNode(OvfProperties.VMD_SNAPSHOT_PROP, _xmlNS).innerText)) {\n vmDevice.setSnapshotId(new Guid(String.valueOf(node.SelectSingleNode(OvfProperties.VMD_CUSTOM_PROP, _xmlNS).innerText)));\n }\n\n return vmDevice;\n }",
"public AffinityTopologyVersion topologyVersion(AffinityTopologyVersion topVer);",
"ControllerNode localNode();",
"static String generateNodeName(final String hostName, final String hostPort) {\n return hostName + ':' + hostPort + '_' + \"solr\";\n }",
"public T caseTopology(Topology object) {\r\n\t\treturn null;\r\n\t}",
"DeviceState createDeviceState();",
"GeomLayout.IGeomLayoutCreateFromNode geomLayoutCreator();",
"protected SimpleSwitchDevice(RemoteHomeManager m, int deviceId, String deviceName) {\n super (m, deviceId, deviceName);\n setSubDeviceNumber(\"1\");\n lightSchedule = new OnOffSchedule();\n }",
"private Device buildDevice() {\n Device device = Device.builder()\n .text(Narrative.builder().div(Xhtml.of(\"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\">Generated</div>\")).status(NarrativeStatus.GENERATED).build())\n .meta(Meta.builder()\n .profile(Canonical.of(\"http://ibm.com/fhir/StructureDefinition/test-device|0.1.0\"))\n .build())\n .statusReason(CodeableConcept.builder().coding(Coding.builder().system(Uri.of(\"http://terminology.hl7.org/CodeSystem/device-status-reason\")).code(Code.of(\"online\")).build()).build())\n .specialization(Specialization.builder()\n .systemType(CodeableConcept.builder().coding(Coding.builder().system(Uri.of(ValidationSupport.BCP_47_URN)).code(Code.of(ENGLISH_US)).build()).build()).build())\n .extension(Extension.builder().url(\"http://ibm.com/fhir/StructureDefinition/test-language-primary-extension\")\n .value(CodeableConcept.builder().coding(Coding.builder().system(Uri.of(ValidationSupport.BCP_47_URN)).code(Code.of(ENGLISH_US)).build()).build()).build(),\n Extension.builder().url(\"http://ibm.com/fhir/StructureDefinition/test-language-secondary-extension\")\n .value(Coding.builder().system(Uri.of(ValidationSupport.BCP_47_URN)).code(Code.of(ENGLISH_US)).build()).build(),\n Extension.builder().url(\"http://ibm.com/fhir/StructureDefinition/test-language-tertiary-extension\")\n .value(Code.of(ENGLISH_US)).build())\n .build();\n return device;\n }",
"@Override\n public ExecutionPlan build(Config cfg, DataFlowTaskGraph taskGraph,\n TaskSchedulePlan taskSchedule) {\n TaskPlan taskPlan =\n TaskPlanBuilder.build(workerId, workerInfoList, taskSchedule, taskIdGenerator);\n ParallelOperationFactory opFactory = new ParallelOperationFactory(\n cfg, network, taskPlan, edgeGenerator);\n\n Map<Integer, ContainerPlan> containersMap = taskSchedule.getContainersMap();\n ContainerPlan conPlan = containersMap.get(workerId);\n if (conPlan == null) {\n LOG.log(Level.INFO, \"Cannot find worker in the task plan: \" + workerId);\n return null;\n }\n\n ExecutionPlan execution = new ExecutionPlan();\n\n Set<TaskInstancePlan> instancePlan = conPlan.getTaskInstances();\n // for each task we are going to create the communications\n for (TaskInstancePlan ip : instancePlan) {\n Vertex v = taskGraph.vertex(ip.getTaskName());\n Map<String, String> inEdges = new HashMap<>();\n Map<String, String> outEdges = new HashMap<>();\n if (v == null) {\n throw new RuntimeException(\"Non-existing task scheduled: \" + ip.getTaskName());\n }\n\n INode node = v.getTask();\n if (node instanceof ICompute || node instanceof ISource) {\n // lets get the communication\n Set<Edge> edges = taskGraph.outEdges(v);\n // now lets create the communication object\n for (Edge e : edges) {\n Vertex child = taskGraph.childOfTask(v, e.getName());\n // lets figure out the parents task id\n Set<Integer> srcTasks = taskIdGenerator.getTaskIds(v.getName(),\n ip.getTaskId(), taskGraph);\n Set<Integer> tarTasks = taskIdGenerator.getTaskIds(child.getName(),\n getTaskIdOfTask(child.getName(), taskSchedule), taskGraph);\n\n if (!parOpTable.contains(v.getName(), e.getName())) {\n parOpTable.put(v.getName(), e.getName(),\n new Communication(e, v.getName(), child.getName(), srcTasks, tarTasks));\n }\n outEdges.put(e.getName(), child.getName());\n }\n }\n\n if (node instanceof ICompute || node instanceof ISink) {\n // lets get the parent tasks\n Set<Edge> parentEdges = taskGraph.inEdges(v);\n for (Edge e : parentEdges) {\n Vertex parent = taskGraph.getParentOfTask(v, e.getName());\n // lets figure out the parents task id\n Set<Integer> srcTasks = taskIdGenerator.getTaskIds(parent.getName(),\n getTaskIdOfTask(parent.getName(), taskSchedule), taskGraph);\n Set<Integer> tarTasks = taskIdGenerator.getTaskIds(v.getName(),\n ip.getTaskId(), taskGraph);\n\n if (!parOpTable.contains(parent.getName(), e.getName())) {\n parOpTable.put(parent.getName(), e.getName(),\n new Communication(e, parent.getName(), v.getName(), srcTasks, tarTasks));\n }\n inEdges.put(e.getName(), parent.getName());\n }\n }\n\n // lets create the instance\n INodeInstance iNodeInstance = createInstances(cfg, ip, v, taskGraph.getOperationMode(),\n inEdges, outEdges, taskSchedule);\n // add to execution\n execution.addNodes(v.getName(), taskIdGenerator.generateGlobalTaskId(\n v.getName(), ip.getTaskId(), ip.getTaskIndex()), iNodeInstance);\n }\n\n // now lets create the queues and start the execution\n for (Table.Cell<String, String, Communication> cell : parOpTable.cellSet()) {\n Communication c = cell.getValue();\n\n // lets create the communication\n OperationMode operationMode = taskGraph.getOperationMode();\n IParallelOperation op = opFactory.build(c.getEdge(), c.getSourceTasks(), c.getTargetTasks(),\n operationMode);\n // now lets check the sources and targets that are in this executor\n Set<Integer> sourcesOfThisWorker = intersectionOfTasks(conPlan, c.getSourceTasks());\n Set<Integer> targetsOfThisWorker = intersectionOfTasks(conPlan, c.getTargetTasks());\n\n // set the parallel operation to the instance\n //let's separate the execution instance generation based on the Operation Mode\n if (operationMode == OperationMode.STREAMING) {\n for (Integer i : sourcesOfThisWorker) {\n if (streamingTaskInstances.contains(c.getSourceTask(), i)) {\n TaskStreamingInstance taskStreamingInstance\n = streamingTaskInstances.get(c.getSourceTask(), i);\n taskStreamingInstance.registerOutParallelOperation(c.getEdge().getName(), op);\n } else if (streamingSourceInstances.contains(c.getSourceTask(), i)) {\n SourceStreamingInstance sourceStreamingInstance\n = streamingSourceInstances.get(c.getSourceTask(), i);\n sourceStreamingInstance.registerOutParallelOperation(c.getEdge().getName(), op);\n } else {\n throw new RuntimeException(\"Not found: \" + c.getSourceTask());\n }\n }\n\n for (Integer i : targetsOfThisWorker) {\n if (streamingTaskInstances.contains(c.getTargetTask(), i)) {\n TaskStreamingInstance taskStreamingInstance\n = streamingTaskInstances.get(c.getTargetTask(), i);\n op.register(i, taskStreamingInstance.getInQueue());\n taskStreamingInstance.registerInParallelOperation(c.getEdge().getName(), op);\n } else if (streamingSinkInstances.contains(c.getTargetTask(), i)) {\n SinkStreamingInstance streamingSinkInstance\n = streamingSinkInstances.get(c.getTargetTask(), i);\n streamingSinkInstance.registerInParallelOperation(c.getEdge().getName(), op);\n op.register(i, streamingSinkInstance.getstreamingInQueue());\n } else {\n throw new RuntimeException(\"Not found: \" + c.getTargetTask());\n }\n }\n execution.addOps(op);\n }\n\n if (operationMode == OperationMode.BATCH) {\n for (Integer i : sourcesOfThisWorker) {\n if (batchTaskInstances.contains(c.getSourceTask(), i)) {\n TaskBatchInstance taskBatchInstance = batchTaskInstances.get(c.getSourceTask(), i);\n taskBatchInstance.registerOutParallelOperation(c.getEdge().getName(), op);\n } else if (batchSourceInstances.contains(c.getSourceTask(), i)) {\n SourceBatchInstance sourceBatchInstance\n = batchSourceInstances.get(c.getSourceTask(), i);\n sourceBatchInstance.registerOutParallelOperation(c.getEdge().getName(), op);\n } else {\n throw new RuntimeException(\"Not found: \" + c.getSourceTask());\n }\n }\n\n for (Integer i : targetsOfThisWorker) {\n if (batchTaskInstances.contains(c.getTargetTask(), i)) {\n TaskBatchInstance taskBatchInstance = batchTaskInstances.get(c.getTargetTask(), i);\n op.register(i, taskBatchInstance.getInQueue());\n taskBatchInstance.registerInParallelOperation(c.getEdge().getName(), op);\n } else if (batchSinkInstances.contains(c.getTargetTask(), i)) {\n SinkBatchInstance sinkBatchInstance = batchSinkInstances.get(c.getTargetTask(), i);\n sinkBatchInstance.registerInParallelOperation(c.getEdge().getName(), op);\n op.register(i, sinkBatchInstance.getBatchInQueue());\n } else {\n throw new RuntimeException(\"Not found: \" + c.getTargetTask());\n }\n }\n execution.addOps(op);\n }\n }\n return execution;\n }",
"@Override\n\tpublic String createNode(String type,String name,String time,String loca,String phone, String desc,String axisId ) {\n\t\tNode node = new Node(type, name, time, loca, phone, desc, axisId);\n\t\thibernatedao.insert(null, node);\n\t\treturn node.getId();\n\t}",
"public interface SwiftClusterNode {\n\n String getId();\n\n String getName();\n\n String getIp();\n\n int getPort();\n\n}",
"NodeLayout createNodeLayout();",
"public DeviceLocator getDeviceLocator();",
"public T getAutoInstance(String devName) {\n S settings = sGen.apply(devName);\n for (Class clz : subClasses) {\n T device;\n try {\n device = (T) clz.getDeclaredConstructor(sClass).newInstance(settings);\n } catch (InvocationTargetException e) { \n if (e.getCause() instanceof Device.IDException) {\n continue; //This just means the device wasn't identified. Try the next device\n } else {\n throw new RuntimeException(e.getCause());\n }\n } catch (NoSuchMethodException | InstantiationException | IllegalAccessException me) {\n throw new RuntimeException(me);\n }\n Globals.mm().logs().logMessage(String.format(\"Autofinder found device of type %s for device label %s.\", device.getClass().toString(), devName));\n return device; //We only get this far if the object successfully initializes.\n }\n return null; //Nothing was identified.\n }",
"@Override\n\tpublic Structure createNew() {\n\t\treturn new FloorSwitch();\n\t}",
"public BlueMeshServiceBuilder deviceId( String a_deviceId ){\n deviceId = a_deviceId;\n return this;\n }",
"public interface CommunicationDevice {\n String getAddress();\n\n CommunicationSocket createCommunicationSocket(UUID uuid) throws IOException;\n}",
"public interface NodeService {\n\n /**\n * Given a Node's ID, return the point associated with that Node.\n * @param nodeId - Integer unique ID for the Node.\n * @return Point with the coordinates of the Node's coordinates.\n */\n Point getPointByNodeId(Integer nodeId);\n\n /**\n * Adding a candidate Node to the network which has yet been evaluated\n * against the network.\n *\n * @param lat - Latitude of the Node.\n * @param lon - Longitude of the Node.\n * @return JSON String listing the results of evaluating whether this Node is on\n * the Network or requires adding Edges to reach the network.\n */\n String addNewNode(Double lat, Double lon);\n\n // TODO: Diagnostic Service? This is being used however to Edit Nodes.\n String showAllNodes();\n\n String getNodeGroups();\n\n String setNodeGroup(Integer id, Double lat, Double lon);\n\n // TODO: Probably would go over to the EdgeService\n String getMatchingSegments(Integer pointId);\n\n /**\n * Given a Node's ID and a new Lat/Lon position, edit the Edges connected\n * to that node and return a Feature Collection with the updated Edges (the\n * Node itself will be still active in the browser and the position is\n * already known by the client).\n * @param pointId - Unique Integer representing the Node to edit.\n * @param lat - Latitude of the new location.\n * @param lng - Longitude of the new location.\n * @return Feature Collection with the updated Edges.\n */\n // TODO: Probably would go over to the EdgeService\n String getEdgesAtNewLocation(Integer pointId, Double lat, Double lng);\n\n /**\n * Accepts the last recommended position for the Node as the one to be\n * committed to the database.\n * @param pointId - Unique Integer representing the Node to edit.\n * @return String \"OK\" to confirm.\n */\n // TODO: Probably would go over to the EdgeService\n String confirmEdgesAtNewLocation(Integer pointId);\n}",
"ExternalSensor createExternalSensor();",
"TaskNode getNode(Task task);",
"public String openRegistration(String nodeGroupId, String externalId);",
"public ProductModel getDevice(String did) {\n\t\tSystem.out.println(\"\\nNetworkDevServ-getDevice()\");\r\n\t\treturn deviceData.getDevice(did);\r\n\t}",
"public void doExecute() {\n\t\tparent.requestChange(new ModelChangeRequest(this.getClass(), parent,\n\t\t\t\t\"create\") {\n\t\t\t@Override\n\t\t\tprotected void _execute() throws Exception {\n\t\t\t\ttry {\n\t\t\t\t\tCompositeEntity parentModel = (CompositeEntity) parent;\n\t\t\t\t\tString componentName = null;\n\t\t\t\t\tif (model == null) {\n\t\t\t\t\t\tcomponentName = ModelUtils.findUniqueName(parentModel,\n\t\t\t\t\t\t\t\t\t\t clazz,\n\t\t\t\t\t\t\t\t\t\t name.equalsIgnoreCase(\"INPUT\") ? DEFAULT_INPUT_PORT : DEFAULT_OUTPUT_PORT,\n\t\t\t\t\t\t\t\t\t\t name);\n\t\t\t\t\t\tcomponentName = ModelUtils.getLegalName(componentName);\n\t\t\t\t\t\tClass constructorClazz = CompositeEntity.class;\n\t\t\t\t\t\tif (clazz.getSimpleName().equals(\"TypedIOPort\")) {\n\t\t\t\t\t\t\tconstructorClazz = ComponentEntity.class;\n\t\t\t\t\t\t} else if (clazz.getSimpleName().equals(\n\t\t\t\t\t\t\t\t\"TextAttribute\")) {\n\t\t\t\t\t\t\tconstructorClazz = NamedObj.class;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (clazz.getSimpleName().equals(\"Vertex\")) {\n\t\t\t\t\t\t\tTypedIORelation rel = new TypedIORelation(\n\t\t\t\t\t\t\t\t\tparentModel, componentName);\n\t\t\t\t\t\t\tchild = new Vertex(rel, \"Vertex\");\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tConstructor constructor = clazz.getConstructor(\n\t\t\t\t\t\t\t\t\tconstructorClazz, String.class);\n\n\t\t\t\t\t\t\tchild = (NamedObj) constructor.newInstance(\n\t\t\t\t\t\t\t\t\tparentModel, componentName);\n\t\t\t\t\t\t\tif (child instanceof TypedIOPort) {\n\t\t\t\t\t\t\t\tboolean isInput = name\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"INPUT\");\n\t\t\t\t\t\t\t\t((TypedIOPort) child).setInput(isInput);\n\t\t\t\t\t\t\t\t((TypedIOPort) child).setOutput(!isInput);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (model instanceof TypedIOPort) {\n\t\t\t\t\t\t\tname = ((TypedIOPort) model).isInput() ? DEFAULT_INPUT_PORT\n\t\t\t\t\t\t\t\t\t: DEFAULT_OUTPUT_PORT;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcomponentName = ModelUtils.findUniqueName(parentModel, model.getClass(), name, name);\n\t\t\t\t\t\tcomponentName = ModelUtils.getLegalName(componentName);\n\t\t\t\t\t\tif (model instanceof Vertex) {\n\t\t\t\t\t\t\tTypedIORelation rel = new TypedIORelation(\n\t\t\t\t\t\t\t\t\tparentModel, componentName);\n\t\t\t\t\t\t\tchild = new Vertex(rel, \"Vertex\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tchild = (NamedObj) model\n\t\t\t\t\t\t\t\t\t.clone(((CompositeEntity) parentModel)\n\t\t\t\t\t\t\t\t\t\t\t.workspace());\n\t\t\t\t\t\t\tchild.setName(componentName);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tComponentUtility.setContainer(child, parentModel);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcreateDefaultValues(child);\n\t\t\t\t\t\n\t\t\t\t\tif (location != null) {\n\t\t\t\t\t\tModelUtils.setLocation(child, location);\n\t\t\t\t\t}\n\t\t\t\t\tsetChild(child);\n\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tgetLogger().error(\"Unable to create component\", e);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t});\n\t}",
"public Node registerPullOnlyNode(String externalId, String nodeGroupId, String databaseType, String databaseVersion) throws IOException;",
"RenderedOp getNode(Long id) throws RemoteException;",
"public Node getNode(String name) {\n Node result = super.getNode(name);\n\n if (result == null) {\n byte type = gateClass.getPinType(name);\n int index = gateClass.getPinNumber(name);\n if (type == CompositeGateClass.INTERNAL_PIN_TYPE)\n result = internalPins[index];\n }\n\n return result;\n }",
"Switch getHostSwitch();",
"@objid (\"afa7354b-88c4-40d5-b8dd-215055f8955c\")\n CommunicationNode getStart();",
"@Override\n public GetWirelessDeviceResult getWirelessDevice(GetWirelessDeviceRequest request) {\n request = beforeClientExecution(request);\n return executeGetWirelessDevice(request);\n }",
"abstract AbstractRuntimeServiceNode<T> newRuntimeNode();",
"@Override\n\tpublic void updateUse(IASTName name) {\n\t\tIMTANode newnode = new MTUseSharedNode(bb, activePThreadnr, name);\n\t\tmtapath.addLast(newnode);\t\t\n\t}",
"private static org.onosproject.tetopology.management.api.DefaultNetwork yang2TeDefaultNetwork(\n Network yangNetwork,\n org.onosproject.yang.gen.v1.urn.ietf.params.xml.ns.\n yang.ietf.network.rev20151208.ietfnetwork.networksstate.\n Network yangNetworkState,\n Networks yangNetworks, DeviceId deviceId) {\n checkNotNull(yangNetwork, E_NULL_YANG_NETWORK);\n checkNotNull(yangNetwork.networkId(), E_NULL_YANG_NETWORKID);\n String networkId = yangNetwork.networkId().uri().string();\n\n KeyId networkKeyId = KeyId.keyId(networkId);\n List<KeyId> supportingNetworkIds = null;\n Map<KeyId, NetworkNode> teNodes = null;\n Map<KeyId, NetworkLink> teLinks = null;\n org.onosproject.tetopology.management.api.TeTopologyId teTopologyId = null;\n boolean serverProvided = false;\n\n // Supporting networks\n if (yangNetwork.supportingNetwork() != null) {\n supportingNetworkIds = Lists.newArrayList();\n for (SupportingNetwork supportNw : yangNetwork.supportingNetwork()) {\n supportingNetworkIds.add(\n KeyId.keyId(supportNw.networkRef().uri().string()));\n }\n }\n\n // Nodes\n if (yangNetwork.node() != null) {\n teNodes = Maps.newHashMap();\n for (Node node : yangNetwork.node()) {\n // Convert the Yang Node to a TE node.\n teNodes.put(KeyId.keyId(node.nodeId().uri().string()),\n NodeConverter.yang2TeSubsystemNode(node, yangNetwork, yangNetworks));\n }\n }\n\n // Links\n if (yangNetwork.yangAugmentedInfo(AugmentedNdNetwork.class) != null) {\n AugmentedNdNetwork augmentLink =\n (AugmentedNdNetwork) yangNetwork.yangAugmentedInfo(AugmentedNdNetwork.class);\n teLinks = Maps.newHashMap();\n for (Link link : augmentLink.link()) {\n // Convert the Yang Link to a TE link.\n teLinks.put(KeyId.keyId(link.linkId().uri().string()),\n LinkConverter.yang2TeSubsystemLink(link, yangNetwork, yangNetworks));\n }\n }\n\n // TE Topology Ids\n if (yangNetwork.yangAugmentedInfo(AugmentedNwNetwork.class) != null) {\n AugmentedNwNetwork augmentTeIds =\n (AugmentedNwNetwork) yangNetwork.yangAugmentedInfo(AugmentedNwNetwork.class);\n teTopologyId =\n new org.onosproject.tetopology.management.api.TeTopologyId(\n augmentTeIds.providerId().uint32(),\n augmentTeIds.clientId().uint32(),\n augmentTeIds.teTopologyId().string());\n }\n\n if (yangNetworkState != null) {\n serverProvided = yangNetworkState.serverProvided();\n }\n\n org.onosproject.tetopology.management.api.DefaultNetwork network =\n new org.onosproject.tetopology.management.api.DefaultNetwork(networkKeyId, supportingNetworkIds,\n teNodes, teLinks, teTopologyId,\n serverProvided,\n deviceId,\n NOT_OPTIMIZED);\n return network;\n }",
"public ABLLocalWifiDevice WifiDevice() {\r\n\t\treturn new ABLLocalWifiDevice(BrickFinder.getDefault().getWifiDevice());\r\n\t}",
"Reference getDevice();",
"public String cloudDeviceIdToDevicePath(String hypervisor, String deviceId) {\n Integer devId = new Integer(deviceId);\n if (null != hypervisor && hypervisor.toLowerCase().contains(\"windows\")) {\n switch (devId) {\n case 1:\n return \"xvdb\";\n case 2:\n return \"xvdc\";\n case 3:\n return \"xvdd\";\n case 4:\n return \"xvde\";\n case 5:\n return \"xvdf\";\n case 6:\n return \"xvdg\";\n case 7:\n return \"xvdh\";\n case 8:\n return \"xvdi\";\n case 9:\n return \"xvdj\";\n default:\n return new String(\"\" + deviceId);\n }\n } else { // -> assume its unix\n switch (devId) {\n case 1:\n return \"/dev/sdb\";\n case 2:\n return \"/dev/sdc\";\n case 3:\n return \"/dev/sdd\";\n case 4:\n return \"/dev/sde\";\n case 5:\n return \"/dev/sdf\";\n case 6:\n return \"/dev/sdg\";\n case 7:\n return \"/dev/sdh\";\n case 8:\n return \"/dev/sdi\";\n case 9:\n return \"/dev/sdj\";\n default:\n return new String(\"\" + deviceId);\n }\n }\n }",
"public interface DeviceBasedTask {\n\n\tpublic Device getDevice();\n\n\tpublic void setDevice(Device device);\n}",
"Operation createOperation();",
"Operation createOperation();",
"@Override\n public Operator getOperator(String name) {\n return super.getOperator(SdnrOperation.NAME);\n }",
"private BTNode createNode() {\n BTNode btNode;\n btNode = new <DataPair>BTNode ();\n btNode.mIsLeaf = true;\n btNode.mCurrentKeyNum = 0;\n return btNode;\n }",
"public String runCMD(String command,String topologyName){\n try{\n Process pc = Runtime.getRuntime().exec(command,null,new File(\"d:/com/mon4cc/\"+topologyName));\n return getCMDInfo(pc.getErrorStream()) ;\n }catch(Exception e){\n e.printStackTrace();\n }\n return \"null\";\n }",
"@GET\n @Produces(MediaType.APPLICATION_XML)\n @Path(\"getDeviceAsSensorML/{device}\")\n String getSensorML(@PathParam(\"device\") int id);",
"@Override\n\tpublic void execute(Tuple input) {\n\t\tScanner inputStream = null;\n\t\t int counterVK =0;\n\t\t int counterSensorVal =0;\n\n\t int[][] topoFromFile= new int[GlobalVar.numberOfNodes][GlobalVar.numberOfNodes];\n\n\t\ttry\n\t\t{\n\t\t inputStream = new Scanner(new File(this.fileName + \"/topologyInformation.txt\"));//The txt file is being read correctly.\n\t\t}\n\t\tcatch(FileNotFoundException e)\n\t\t{\n\t\t System.exit(0);\n\t\t}\n \n\t\ttry {\n FileReader fr = new FileReader(this.fileName +\"/nodes_test16.csv\");\n sensorsIds = parseCsv(fr, \",\", true);\n\t\t} catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t\tfor (int row = 0; row < GlobalVar.numberOfNodes; row++) {\n\t\t String line = inputStream.nextLine();\n\t\t String[] lineValues = line.split(\",\");\n\t\t for (int column = 0; column < GlobalVar.numberOfNodes; column++) {\n\t\t topoFromFile[row][column] = Integer.parseInt(lineValues[column]);\n\t\t }\n\t\t}\n\t\tinputStream.close();\n\t\t//For testing purpose choose neighbors randomly\n\t\t/*for(int l=0;l<16;l++)\n\t\t{\n\t\t\tfor(int m =0; m<16; m++){\n\t\t\t\ttopoFromFile[l][m] = 1;\n\n\t\t\t\n\t\t\tif(l != m){\n\t\t\t\ttopoFromFile[l][m] = 0;\n\t\t\t\t}\n\t\t\telse \n\t\t\t\ttopoFromFile[l][m] = 1;\n\t\t\t}\n\t\t}\n\t\tfor(int l=0;l<16;l++)\n\t\t{\n\t\t\tint cnt=12;\n\t\tRandom randomParameterVal = new Random();\n\t\tint high = 15;\n\t\tint low = 0;\n\t\twhile(cnt>0){\n\t\tint changeneighbor=randomParameterVal.nextInt(high-low)+low;\n\t\tif(changeneighbor != l && topoFromFile[l][changeneighbor]!=1){\n\t\t\ttopoFromFile[l][changeneighbor] = 1;\n\t\t\tcnt--;\n\t\t\t}\n\t\t}\n\t\t}*/\n\t\t\n\t\tString sentence = input.getString(0);\n String[] tokens= sentence.split(\"\\n\");\n\t\tfor(String senseVal: tokens){\n\t\t\tcounterSensorVal++;\n\t\t}\n\t\tDouble[] findTimeStampVal = new Double[100000];\n\t\tString[] lastTimeStamp = tokens[counterSensorVal-1].split(\",\");\n\t\tDouble sumOfAllSensors = 0.0;\n\t\tDouble varianceOfAllSensors = 0.0;\n\t\tDouble varianceSumOfAllSensors = 0.0;\n\t\t//Filter Neighbors values at same time stamp\n\t\tfor(String senseVal: tokens){\n\t\t\tString[] vKValues= senseVal.split(\",\");\n\t\t\tif(vKValues[2].contentEquals(lastTimeStamp[2])){\n\t\t\t\tfindTimeStampVal[counterVK++] = Double.parseDouble(vKValues[1]);\n\t\t\t\tsumOfAllSensors += Double.parseDouble(vKValues[1]);\n\t\t\t\t//System.out.print(\"Find value at last time stamp: \" +findTimeStampVal[counterVK-1] + \"\\n\");\n\t\t\t}\n\t\t}\n\t\tDouble meanOfAllSensors = sumOfAllSensors/(counterVK-1);\n\n\t\tfor(int i=0; i< counterVK; i++){\n\t\t\tvarianceSumOfAllSensors += (findTimeStampVal[i] - meanOfAllSensors)*(findTimeStampVal[i] - meanOfAllSensors);\n\t\t}\n\t\tvarianceOfAllSensors = varianceSumOfAllSensors/(counterVK-1);\n //Computing group Ids for tuples to forward for LISA compute\n for(String word : tokens){\n \tString[] senseVal = word.split(\",\");\n\t\t\t//System.out.print(\"sensorVal at second BOLT =\" + senseVal[0] + \"\\n ****\");\n\n //word = word.trim();\n if(!word.isEmpty()){\n \tfor(int i=0; i<GlobalVar.numberOfNodes; i++){\n \tif(senseVal[0].contains(sensorsIds[i])){\n \t\t\tfor(int j=0; j<GlobalVar.numberOfNodes; j++){\n \t\t\t\tgroupIds += topoFromFile[i][j];\n \t\t\t\t//System.out.print(\"generate group ids \"+ \"group:=\" + groupIds + str +\"\\n ****\");\n\n \t\t\t} \n str += word + \":\";\n \tfor(String strPass : tokens){\n \tString[] sensePass = strPass.split(\",\");\n \tif(!strPass.trim().isEmpty() && word != strPass){\n \tfor(int k=0; k<GlobalVar.numberOfNodes; k++){\n \t\tfor(int l=0; l<GlobalVar.numberOfNodes; l++){\n \t\t\tif(topoFromFile[i][l]==1 && sensePass[0].contains(sensorsIds[l]) && !sensePass[0].contains(sensorsIds[i]) && !str.contains(strPass)){\n \t\t\t\tstr += strPass + \":\";\n \t\t\t\t//System.out.print(\"looping param \"+ \"i:=\" + i + \"l:=\" + l + \"k:=\" +k+\"\\n ****\");\n \t\t\t\t//System.out.print(\"String after grouping \"+ \"group:=\" + groupIds + str +\"\\n ****\");\n \t\t\t}\n \t\t\t\n \t\t}\n }\n \t}\n \t}\n \t//if(senseVal[0].contentEquals(\"N-H82EQ\"))\n \tcollector.emit(new Values(groupIds,str,meanOfAllSensors,varianceOfAllSensors,lastTimeStamp[2]));\n //System.out.print(\"groupIds\" + groupIds + \"word\" + str + \"mean\" +meanOfAllSensors+ \"variance\"+varianceOfAllSensors +\"\\n\");\n groupIds = \"\";\n str =\"\";\n \t//}\n \t\n\n \n }\n \n }\n }\n collector.ack(input);\n }\n\t\t\n /*for(int i=0; i<5; i++){\n \tif(Integer.parseInt(tokens[0]) == i){\n\t\t\tfor(int j=0; j<5; j++){\n\t\t\t\tgroupIds += topo[i][j];\n\t\t\t} \n }\n }*/\n\t\t //for(String word: tokens)\n\t\t //groupIds=\"\";\n\t}",
"String getNodeName();",
"public IDevice getNamedDevice(String simpleName) {\n\t\ttry {\n\t\t\treturn (IDevice) getObjectInstance(\"com.console.springernature.paint.model.\"+simpleName);\n\t\t} catch (ClassCastException e) {\n\t\t\tlogger.error(\"(ClassCastException) Unable to instanziate the named device : \"+simpleName+\" ...\", e);\n\t\t} catch (Throwable e) {\n\t\t\tlogger.error(\"(Generic Exception) Unable to instanziate the named device : \"+simpleName+\" ...\", e);\n\t\t}\n\t\treturn null;\n\t}",
"@Test\n public void getLocallyExecutableNodes() {\n final String LOCUS_KEY = \"locus\";\n final String EARTH_KEY = \"earth\";\n final String MOON_KEY = \"moon\";\n final String SKY_LABS_KEY = \"sky-labs\";\n AnalysisGraph graph =\n new AnalysisGraph() {\n /*\n ------------------\n | CPU |\n | | |\n | \\|/ |\n | EARTH |\n |-------|---------|\n | |\n | |\n | |\n | |\n -------|---------- |\n | \\|/ | |\n | MOON | |\n | | |\n |-----------------| |\n \\ |\n \\ |\n \\ |\n \\ |\n \\ |\n \\ |\n |------\\--|--------|\n | cpu \\ | |\n | \\ \\| |\n | \\/ \\/ | Skylabs consumes the locally generated metric\n | skylabs | CPU and also the metrics from remote nodes moon\n |------------------| and earth.\n\n In this graph:\n IntentFlow:\n - Moon -> Earth\n - SkyLabs -> Earth\n - SkyLabs -> Moon\n DataFlow:\n - Earth -> Moon\n - Earth -> SkyLabs\n - Moon -> Skylabs\n The following code tests this.\n */\n\n @Override\n public void construct() {\n Metric metric =\n new CPU_Utilization(1) {\n @Override\n public MetricFlowUnit gather(Queryable queryable) {\n return MetricFlowUnit.generic();\n }\n };\n Symptom earthSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n @Override\n public String name() {\n return EARTH_KEY;\n }\n };\n Symptom moonSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n public String name() {\n return MOON_KEY;\n }\n };\n\n Metric skyLabCpu =\n new CPU_Utilization(1) {\n @Override\n public MetricFlowUnit gather(Queryable queryable) {\n return MetricFlowUnit.generic();\n }\n };\n Symptom skyLabsSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n public String name() {\n return SKY_LABS_KEY;\n }\n };\n\n addLeaf(metric);\n addLeaf(skyLabCpu);\n earthSymptom.addAllUpstreams(Collections.singletonList(metric));\n moonSymptom.addAllUpstreams(Collections.singletonList(earthSymptom));\n skyLabsSymptom.addAllUpstreams(\n new ArrayList<Node<?>>() {\n {\n add(earthSymptom);\n add(moonSymptom);\n add(skyLabCpu);\n }\n });\n\n metric.addTag(LOCUS_KEY, EARTH_KEY);\n earthSymptom.addTag(LOCUS_KEY, EARTH_KEY);\n moonSymptom.addTag(LOCUS_KEY, MOON_KEY);\n skyLabCpu.addTag(LOCUS_KEY, SKY_LABS_KEY);\n skyLabsSymptom.addTag(LOCUS_KEY, SKY_LABS_KEY);\n }\n };\n\n RcaConf earthConf =\n new RcaConf() {\n @Override\n public Map<String, String> getTagMap() {\n return new HashMap<String, String>() {\n {\n this.put(LOCUS_KEY, EARTH_KEY);\n }\n };\n }\n };\n\n RcaConf moonConf =\n new RcaConf() {\n @Override\n public Map<String, String> getTagMap() {\n return new HashMap<String, String>() {\n {\n this.put(LOCUS_KEY, MOON_KEY);\n }\n };\n }\n };\n\n RcaConf skyLabsConf =\n new RcaConf() {\n @Override\n public Map<String, String> getTagMap() {\n return new HashMap<String, String>() {\n {\n this.put(LOCUS_KEY, SKY_LABS_KEY);\n }\n };\n }\n };\n\n class WireHopperDerived extends WireHopper {\n DataMsg dataMsg;\n List<IntentMsg> intentMsgs;\n int intextIdx = 0;\n\n private WireHopperDerived(IntentMsg intentMsg, DataMsg dataMsg) {\n this(Collections.singletonList(intentMsg), dataMsg);\n }\n\n private WireHopperDerived(List<IntentMsg> intentMsg, DataMsg dataMsg) {\n super(null, null, null, null, null, new AppContext());\n this.intentMsgs = intentMsg;\n this.dataMsg = dataMsg;\n }\n\n @Override\n public void sendData(DataMsg msg) {\n assertEquals(msg.getSourceGraphNode(), this.dataMsg.getSourceGraphNode());\n AssertHelper.compareLists(msg.getDestinationGraphNodes(), this.dataMsg.getDestinationGraphNodes());\n }\n\n @Override\n public void sendIntent(IntentMsg intentMsg) {\n assertEquals(\n intentMsg.getRequesterGraphNode(), this.intentMsgs.get(intextIdx).getRequesterGraphNode());\n assertEquals(\n intentMsg.getDestinationGraphNode(), this.intentMsgs.get(intextIdx).getDestinationGraphNode());\n intextIdx++;\n }\n }\n\n List<ConnectedComponent> connectedComponents = RcaUtil.getAnalysisGraphComponents(graph);\n\n class RCASchedulerTaskMock extends RCASchedulerTask {\n private RCASchedulerTaskMock(RcaConf conf, WireHopper wireHopper) {\n super(\n 100,\n Executors.newFixedThreadPool(2),\n connectedComponents,\n null,\n null,\n conf,\n wireHopper,\n new AppContext());\n }\n }\n\n RCASchedulerTaskMock earthTask =\n new RCASchedulerTaskMock(\n earthConf,\n new WireHopperDerived(\n Collections.emptyList(),\n new DataMsg(\n EARTH_KEY,\n new ArrayList<String>() {\n {\n add(MOON_KEY);\n add(SKY_LABS_KEY);\n }\n },\n null)));\n\n RCASchedulerTaskMock moonTask =\n new RCASchedulerTaskMock(\n moonConf,\n new WireHopperDerived(\n new IntentMsg(MOON_KEY, EARTH_KEY, null),\n new DataMsg(\n MOON_KEY,\n new ArrayList<String>() {\n {\n add(SKY_LABS_KEY);\n }\n },\n null)));\n RCASchedulerTaskMock skyLabsTask =\n new RCASchedulerTaskMock(\n skyLabsConf,\n new WireHopperDerived(\n new ArrayList<IntentMsg>() {\n {\n add(new IntentMsg(SKY_LABS_KEY, EARTH_KEY, null));\n add(new IntentMsg(SKY_LABS_KEY, MOON_KEY, null));\n }\n },\n null));\n\n earthTask.run();\n\n moonTask.run();\n\n skyLabsTask.run();\n }",
"Swarm createSwarm();",
"public static SubsystemNodeContainer createSubsystemNodeContainer() {\n Map<String, String> properties = new HashMap<String, String>();\n properties.put(\"String\", \"String\");\n TransferHandler handler = new TransferHandler(\"\");\n SubsystemNodeContainer snc = null;\n try {\n snc = new SubsystemNodeContainer(AccuracyTestHelper.createGraphNodeForSubsystem(), properties, handler);\n } catch (IllegalGraphElementException e) {\n TestCase.fail(\"Should not throw exception here.\");\n }\n return snc;\n }",
"public NameNode namenodes() {\n\t\tString uri = SystemConfig.getProperty(\"hive.cube.hdfs.web\");\n\t\tBufferedReader bufReader = null;\n\t\tInputStreamReader input = null;\n\t\tNameNode nn = new NameNode();\n\t\ttry {\n\t\t\tURL url = new URL(uri + HDFS.NAMENODE_JMX);\n\t\t\tHttpURLConnection httpConn = (HttpURLConnection) url.openConnection();\n\t\t\tinput = new InputStreamReader(httpConn.getInputStream(), \"UTF-8\");\n\t\t\tbufReader = new BufferedReader(input);\n\t\t\tString line = \"\";\n\t\t\tStringBuilder contentBuf = new StringBuilder();\n\t\t\twhile ((line = bufReader.readLine()) != null) {\n\t\t\t\tcontentBuf.append(line);\n\t\t\t}\n\t\t\tJSONObject obj = JSON.parseObject(contentBuf.toString());\n\t\t\tJSONArray array = JSON.parseArray(obj.getString(\"beans\"));\n\t\t\tJSONObject tmp = (JSONObject) array.get(0);\n\t\t\tnn.setCapacity(tmp.getLong(\"Total\"));\n\t\t\tnn.setClusterStartTime(CalendarUtils.formatLocale(tmp.getString(\"NNStarted\")));\n\t\t\tnn.setDeadNodes(JSON.parseObject(tmp.getString(\"DeadNodes\")).size());\n\t\t\tnn.setDecomNodes(JSON.parseObject(tmp.getString(\"DecomNodes\")).size());\n\t\t\tnn.setDfsRemaining(tmp.getLong(\"Free\"));\n\t\t\tnn.setDfsUsed(tmp.getLong(\"Used\"));\n\t\t\tnn.setLiveNodes(JSON.parseObject(tmp.getString(\"LiveNodes\")).size());\n\t\t\tnn.setNonDFSUsed(tmp.getLong(\"NonDfsUsedSpace\"));\n\t\t\tnn.setVersion(tmp.getString(\"SoftwareVersion\"));\n\t\t} catch (Exception e) {\n\t\t\tLOG.error(\"Get hadoop namenode data has error,msg is \" + e.getMessage());\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (input != null) {\n\t\t\t\t\tinput.close();\n\t\t\t\t}\n\t\t\t\tif (bufReader != null) {\n\t\t\t\t\tbufReader.close();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tLOG.error(\"Close IO has error,msg is \" + e.getMessage());\n\t\t\t}\n\t\t}\n\n\t\treturn nn;\n\t}",
"public NodeMap<CDMNode, DapNode> create() throws DapException {\n // Netcdf Dataset will already have a root group\n Group cdmroot = ncfile.getRootGroup();\n this.nodemap.put(cdmroot, this.dmr);\n fillGroup(cdmroot, this.dmr, ncfile);\n return this.nodemap;\n }",
"public String getDeviceOntClass()\n\t{\n\t\treturn \"http://almanac-project.eu/ontologies/smartcity.owl#\"+this.realBin.getClass().getSimpleName();\n\t}",
"TargetDevice(String devname) throws com.microchip.crownking.Anomaly,\r\n org.xml.sax.SAXException,\r\n java.io.IOException,\r\n javax.xml.parsers.ParserConfigurationException,\r\n IllegalArgumentException {\r\n\r\n pic_ = (xPIC) xPICFactory.getInstance().get(devname);\r\n name_ = normalizeDeviceName(devname);\r\n\r\n if(Family.PIC32 == pic_.getFamily() || Family.ARM32BIT == pic_.getFamily()) {\r\n instructionSets_ = new ArrayList<>(pic_.getInstructionSet().getSubsetIDs());\r\n\r\n String setId = pic_.getInstructionSet().getID();\r\n if(setId != null && !setId.isEmpty()) {\r\n instructionSets_.add(setId);\r\n }\r\n } else {\r\n String what = \"Device \" + devname + \" is not a recognized MIPS32 or Arm device.\";\r\n throw new IllegalArgumentException(what);\r\n }\r\n }",
"public int getCoarseRootTopologyType() {return coarseRootTopologyType;}",
"@Transactional\n public abstract OnmsDistPoller createDistPollerIfNecessary(String dpName, String dpAddr);",
"Replica.DefinitionStages.Blank define(String name);",
"private String performStructureOperation(String tiid1, String tiid2,\n EOperations operation, Map<String, Object> parameters)\n throws HumanTaskManagerException {\n try {\n String taskModelName;\n String taskInstanceName;\n Object inputData;\n\n if (tiid2 == null) {\n log.info(operation.toString() + \" on Task \" + tiid1);\n } else {\n log.info(operation.toString() + \" on Task \" + tiid1\n + \" and on Task \" + tiid2);\n }\n sdap.beginTx();\n\n String result = null;\n\n TaskStructure taskStructure = new TaskStructure(tiid1);\n\n // check if both tasks are not locked or controlled\n taskStructure.checkGeneralOperationPreconditions();\n\n TaskStructure strTask2 = null;\n if (tiid2 != null) {\n strTask2 = new TaskStructure(tiid2);\n strTask2.checkGeneralOperationPreconditions();\n }\n\n switch (operation) {\n case ADDSUBTASK:\n taskModelName = (String) parameters.get(\"taskModelName\");\n taskInstanceName = (String) parameters.get(\"taskInstanceName\");\n inputData = (Object) parameters.get(\"inputData\");\n\n TaskStructure subTask = taskStructure.addSubTask(taskModelName,\n taskInstanceName, inputData);\n result = subTask.getSelectedTask_Id();\n break;\n case REMOVESUBTASK:\n taskStructure.removeSubTask();\n break;\n case MERGE:\n taskModelName = (String) parameters.get(\"taskModelName\");\n taskInstanceName = (String) parameters.get(\"taskInstanceName\");\n inputData = (Object) parameters.get(\"inputData\");\n result = taskStructure.mergeTask(strTask2, taskModelName,\n taskInstanceName, inputData, true).getSelectedTask_Id();\n break;\n case UNMERGE:\n List<TaskStructure> freedTasks = taskStructure.unmergeTask();\n for (TaskStructure freeTask : freedTasks) {\n freeTask.propagateStateToPredecessor();\n }\n\n break;\n default:\n String excMsg = \"Operation \" + operation.toString()\n + \" is no structure operation.\";\n throw new SHTMInvalidOperationException(excMsg);\n }\n\n sdap.commitTx();\n return result;\n } catch (DatabaseException e) {\n sdap.rollbackTx();\n throw new HumanTaskManagerException(e);\n } finally {\n sdap.close();\n }\n\n }",
"String getTechnologyName(OperationNode node);",
"public interface Topology {\r\n\r\n /**\r\n * Returns list of links\r\n * @return list of links\r\n */\r\n List<Link> getLinks();\r\n \r\n /**\r\n * Returns list of nodes\r\n * @return list of nodes\r\n */\r\n List<Node> getNodes();\r\n \r\n /**\r\n * Returns list od domains\r\n * @return list of domains\r\n */\r\n List<AdminDomain> getDomains();\r\n \r\n /**\r\n * Inserts link in the topology\r\n * @param link link to insert\r\n * @return if insertion of link was successful returns true, otherwise false \r\n */\r\n boolean insertLink(Link link);\r\n \r\n /**\r\n * Removes link from topology\r\n * @param link link to delete\r\n * @return if deletion of link was successful returns true, otherwise false\r\n */\r\n boolean removeLink(Link link);\r\n \r\n}",
"public Sensor registerSensor(String name, String type) {\n \tSCSensor sensor = new SCSensor(name);\n \n String uid = UUID.randomUUID().toString();\n sensor.setId(uid);\n sensor.setType(type);\n \n //temporary fix..\n if(sensorCatalog.hasSensorWithName(name))\n \tsensorCatalog.removeSensor(sensorCatalog.getSensorWithName(name).getId());\n \n // Setting PublicEndPoint\n sensor.setPublicEndpoint(publicEndPoint);\n \n /*sensor = generateSensorEndPoints(sensor);*/\n Endpoint dataEndpoint;\n if (Constants.SENSOR_TYPE_BLOCK.equalsIgnoreCase(type)) {\n dataEndpoint = new JMSEndpoint();\n dataEndpoint.setAddress(sensor.getId() + \"/data\");\n // TODO: we have to decide the connection factory to be used\n dataEndpoint.setProperties(\n configuration.getBrokerPool().getBroker(sensor.getId()).getConnections(\"topic\").getParameters());\n } else if (Constants.SENSOR_TYPE_STREAMING.equalsIgnoreCase(type)) {\n dataEndpoint = new StreamingEndpoint();\n \n dataEndpoint.setProperties(configuration.getStreamingServer().getParameters());\n dataEndpoint.getProperties().put(\"PATH\", \"sensor/\" + sensor.getId() + \"/data\");\n \n // add the routing to the streaming server\n } else {\n // defaulting to JMS\n dataEndpoint = new JMSEndpoint();\n dataEndpoint.setAddress(sensor.getId() + \"/data\");\n // TODO: we have to decide the connection factory to be used\n dataEndpoint.setProperties(\n configuration.getBrokerPool().getBroker(sensor.getId()).getConnections(\"topic\").getParameters());\n }\n \n sensor.setDataEndpoint(dataEndpoint);\n \n Endpoint controlEndpoint;\n \n controlEndpoint = new JMSEndpoint();\n controlEndpoint.setAddress(sensor.getId() + \"/control\");\n // TODO: we have to decide the connection factory to be used\n controlEndpoint.setProperties(\n configuration.getBrokerPool().getBroker(sensor.getId()).getConnections(\"topic\").getParameters());\n sensor.setControlEndpoint(controlEndpoint);\n \n // set the update sending endpoint as the global endpoint\n Endpoint updateSendingEndpoint;\n updateSendingEndpoint = new JMSEndpoint();\n \n updateSendingEndpoint.setProperties(\n configuration.getBrokerPool().getBroker(sensor.getId()).getConnections(\"topic\").getParameters());\n updateSendingEndpoint.setAddress(sensor.getId() + \"/update\");\n sensor.setUpdateEndpoint(updateSendingEndpoint);\n \n registry.addSensor(sensor);\n \n sensorCatalog.addSensor(sensor);\n updateManager.sensorChange(Constants.Updates.ADDED, sensor.getId());\n return sensor;\n }",
"private Device getDevFromElement(Element devElement, String address) {\n\n String devId = devElement.getElementsByTagName(\"Id\").item(0).getTextContent();\n NodeList nodeList = devElement.getElementsByTagName(\"Names\").item(0).getChildNodes();\n Map<Locale, String> actNames = new HashMap<>();\n\n for (int i = 0; i < nodeList.getLength(); i++) {\n NodeList nameNodes = nodeList.item(i).getChildNodes();\n String locale = nameNodes.item(0).getTextContent();\n String name = nameNodes.item(1).getTextContent();\n actNames.put(new Locale(locale.split(\"_\")[0], locale.split(\"_\")[1]), name);\n }\n\n String type = devElement.getElementsByTagName(\"Type\").item(0).getTextContent();\n String image = devElement.getElementsByTagName(\"Image\").item(0).getTextContent();\n // create device\n Device device = new Device(devId, actNames, Integer.parseInt(address), type, image);\n\n NodeList capList = devElement.getElementsByTagName(\"Capabilities\").item(0).getChildNodes();\n\n for (int j = 0; j < capList.getLength(); j++) {\n String capId = capList.item(j).getTextContent();\n Capability cap = readFromCapabilityFile(capId);\n cap.setDevice(device);\n device.addCapability(cap);\n }\n return device;\n }"
]
| [
"0.56546694",
"0.5467553",
"0.5358953",
"0.5271729",
"0.52625805",
"0.5188381",
"0.5105736",
"0.5087162",
"0.49590617",
"0.49571943",
"0.48987767",
"0.48786473",
"0.48371023",
"0.48362082",
"0.48015383",
"0.47866794",
"0.4742919",
"0.47421503",
"0.47192436",
"0.47046742",
"0.46432543",
"0.46063003",
"0.45941985",
"0.45915258",
"0.45587587",
"0.4508613",
"0.4483099",
"0.44668034",
"0.4466428",
"0.44545436",
"0.44527155",
"0.4447698",
"0.44440293",
"0.44293007",
"0.442766",
"0.44210976",
"0.4411633",
"0.44009912",
"0.43611786",
"0.43530363",
"0.434226",
"0.4341827",
"0.43404844",
"0.43318462",
"0.4330958",
"0.43127328",
"0.43107325",
"0.42967442",
"0.42948127",
"0.42935693",
"0.42751074",
"0.42683554",
"0.42550412",
"0.4252968",
"0.42460033",
"0.42388648",
"0.42349547",
"0.4233172",
"0.42289907",
"0.4212217",
"0.42060524",
"0.42045182",
"0.42040873",
"0.41926777",
"0.41874096",
"0.41869208",
"0.4186458",
"0.4184293",
"0.41742977",
"0.4162921",
"0.4161704",
"0.41562617",
"0.4141886",
"0.41384313",
"0.41382995",
"0.41377532",
"0.41364095",
"0.41364095",
"0.41270265",
"0.4125715",
"0.41243953",
"0.41141698",
"0.41139492",
"0.41131988",
"0.4105007",
"0.40970397",
"0.4092854",
"0.408589",
"0.40819383",
"0.4079805",
"0.4073143",
"0.4068264",
"0.4061602",
"0.40607846",
"0.40583652",
"0.40581912",
"0.40563074",
"0.40495306",
"0.40457907",
"0.40447983"
]
| 0.60054165 | 0 |
Normalize links for update/get LogicalTopology. Remove list that does not contains nodes. | private void normalizeLogicalLink(Collection<OfpConDeviceInfo> nodes, Collection<LogicalLink> links) {
final String fname = "normalizeLogicalLink";
if (logger.isDebugEnabled()) {
logger.debug(String.format("%s(nodes=%s, links=%s) - start", fname, nodes, links));
}
List<LogicalLink> removalLinks = new ArrayList<LogicalLink>();
for (LogicalLink link : links) {
List<PortData> ports = link.getLink();
if (!OFPMUtils.nodesContainsPort(nodes, ports.get(0).getDeviceName(), null)) {
removalLinks.add(link);
} else if (!OFPMUtils.nodesContainsPort(nodes, ports.get(1).getDeviceName(), null)) {
removalLinks.add(link);
}
}
links.removeAll(removalLinks);
if (logger.isDebugEnabled()) {
logger.debug(String.format("%s() - end", fname));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void normalizeLogicalNode(Connection conn, Collection<OfpConDeviceInfo> nodes) throws SQLException {\n\t\tfinal String fname = \"normalizeLogicalNode\";\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(String.format(\"%s(conn=%s, nodes=%s) - start\", fname, conn, nodes));\n\t\t}\n\t\tMap<String, Boolean> devTypeMap = new HashMap<String, Boolean>();\n\t\tList<OfpConDeviceInfo> removalNodeList = new ArrayList<OfpConDeviceInfo>();\n\t\tfor (OfpConDeviceInfo node : nodes) {\n\t\t\tString devType = node.getDeviceType();\n\t\t\tif (!devType.equals(NODE_TYPE_SERVER) && !devType.equals(NODE_TYPE_SWITCH) && !devType.equals(NODE_TYPE_EX_SWITCH)) {\n\t\t\t\tremovalNodeList.add(node);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tList<OfpConPortInfo> ports = node.getPorts();\n\t\t\tList<OfpConPortInfo> removalPortList = new ArrayList<OfpConPortInfo>();\n\t\t\tfor (OfpConPortInfo port : ports) {\n\t\t\t\tString neiDevName = port.getOfpPortLink().getDeviceName();\n\t\t\t\t/* check outDevice is LEAF, other wise don't append port */\n\t\t\t\tBoolean isOfpSw = devTypeMap.get(neiDevName);\n\t\t\t\tif (isOfpSw == null) {\n\t\t\t\t\tMap<String, Object> outDevDoc = dao.getNodeInfoFromDeviceName(conn, neiDevName);\n\t\t\t\t\tString outDevType = (String)outDevDoc.get(\"type\");\n\t\t\t\t\tisOfpSw = OFPMUtils.isNodeTypeOfpSwitch(outDevType);\n\t\t\t\t\tdevTypeMap.put(neiDevName, isOfpSw);\n\t\t\t\t}\n\t\t\t\tif (!isOfpSw) {\n\t\t\t\t\tremovalPortList.add(port);\n\t\t\t\t}\n\t\t\t}\n\t\t\tports.removeAll(removalPortList);\n\n\t\t\t/* if node don't has port that connect to leaf-switch, node remove from nodeList */\n\t\t\tif (ports.isEmpty()) {\n\t\t\t\tremovalNodeList.add(node);\n\t\t\t}\n\t\t}\n\t\tnodes.removeAll(removalNodeList);\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(String.format(\"%s() - end\", fname));\n\t\t}\n\t}",
"private void clearLinks() {\n links_ = emptyProtobufList();\n }",
"void removeLine(PNode c){\n\t\tLinkSet ls = null;\n\t\tLink l = null;\n\t\tLinkSet ls1 = new LinkSet();\n\t\tfor(int i=0;i<linksets.size();i++){\n\t\t\tfor(int j=0;j<linksets.get(i).getLinks().size();j++){\n\t\t\t\tif(c==linksets.get(i).getLinks().get(j).getNode1()||c==linksets.get(i).getLinks().get(j).getNode2()){\n\t\t\t\t\tls = linksets.get(i);\n\t\t\t\t\tl = ls.getLinks().get(j);\n\t\t\t\t\tls.removeLink(l);\n\t\t\t\t\tif(ls.getLinks().size()==0){\n\t\t\t\t\t\tlinksets.remove(ls);//remove linkset if it is empty\n\t\t\t\t\t\tls = null;\n\t\t\t\t\t\tl = null;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(ls!=null){\n\t\t\tLink tlink = null;\n\t\t\tfor(Link lnk: ls.getLinks()){\n\t\t\t\tif(lnk.getNode1().getOwner()==l.getNode1().getOwner() && lnk.getNode1().getSignal()==l.getNode1().getSignal()\n\t\t\t\t\t\t|| lnk.getNode2().getOwner()==l.getNode1().getOwner() && lnk.getNode2().getSignal()==l.getNode1().getSignal()){\n\t\t\t\t\ttlink = lnk;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\tif(tlink!=null){\n\t\t\t\tls1.addLink(tlink);\n\t\t\t\tls.removeLink(tlink);\n\t\t\t\tcheckForNextLink(ls1, ls, tlink);\n\t\t\t}\n\t\t\tif(ls.getLinks().size()==0){\n\t\t\t\tlinksets.remove(ls);\n\t\t\t}\n\t\t\tlinksets.add(ls1);\n\t\t}\n\t\tfor(int i=0; i<links.size();i++){\n\t\t\tLink lnk = links.get(i);\n\t\t\tif (c == lnk.getNode1() || c == lnk.getNode2()){\n\t\t\t\tlayer.removeChild(links.get(i).getPPath());\n\t\t\t\tlinks.remove(i);\n\t\t\t\tremoveLine(c);\n\t\t\t}\n\t\t}\n\t}",
"private void Clean(){\n \t NodeIterable nodeit = graphModel.getGraph().getNodes();\n \t\n \t for (Node node : nodeit) {\n\t\t\t\n \t\t \n \t\t \n\t\t}\n \t\n }",
"public void cleanNodeListToEdges(CircosEdgeList edges){\n\t\tArrayList<CircosNode> tempnodes = new ArrayList<CircosNode>();\n\t\tHashMap<String,String> tempcolors = new HashMap<String,String>();\n\t\t\n\t\tfor(int i = 0; i < nodes.size(); i++){\n\t\t\tif(edges.containsNodeAsSourceOrTarget(nodes.get(i).getID())){\n\t\t\t\ttempnodes.add(nodes.get(i));\n\t\t\t\ttempcolors.put(nodes.get(i).getID(), colors.get(nodes.get(i).getID()));\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tnodes = tempnodes;\n\t\tcolors = tempcolors;\n\t}",
"private void cleanCollectedLinks() {\n for (Iterator itr = visitedLinks.iterator(); itr.hasNext(); ) {\n String thisURL = (String) itr.next();\n if (urlInLinkedList(NetworkUtils.makeURL(thisURL), collectedLinks)) {\n collectedLinks.remove(thisURL.toString());\n// Log.v(\"DLasync.cleanCollected\", \" from CollectedLinks, just cleaned: \" + thisURL);\n// Log.v(\".cleanCollected\", \" collected set is now:\" + collectedLinks.toString());\n }\n }\n\n }",
"void updateLinks() {\n\t\tdouble x1, x2, y1, y2;\n\t\tfor(int i=0; i<links.size();i++){\n\t\t\tPNode node1 = links.get(i).getNode1();\n\t\t\tPNode node2 = links.get(i).getNode2();\n\t\t\tx1 = node1.getFullBoundsReference().getCenter2D().getX() + node1.getParent().getFullBounds().getOrigin().getX();\n\t\t\ty1 = node1.getFullBoundsReference().getCenter2D().getY() + node1.getParent().getFullBounds().getOrigin().getY();\n\t\t\tx2 = node2.getFullBoundsReference().getCenter2D().getX() + node2.getParent().getFullBounds().getOrigin().getX();\n\t\t\ty2 = node2.getFullBoundsReference().getCenter2D().getY() + node2.getParent().getFullBounds().getOrigin().getY();\n\t\t\t\n\t\t\t/*\n\t\t\tLine2D line = new Line2D.Double(x1,y1,x2,y2);\n\t\t\tlinks.get(i).getPPath().setPathTo(line);\n */\n\t\t\tsetPolyLine(links.get(i).getPPath(), (float)x1, (float)y1, (float)x2, (float)y2);\n\t\t\t}\n\t\t}",
"ObservableList<Link> getUnfilteredLinkList();",
"public void clearLinkRemovalTags() {\n\tfor (Link l : allLinks)\n\t l.clearRemovalTag();\n }",
"public void filterToBidirectionalLinks() {\n RTGraphComponent.RenderContext myrc = (RTGraphComponent.RenderContext) getRTComponent().rc; if (myrc == null) return;\n\n // Get the visible links, extract the direction, create the reverse direction -- if that exists, add those records to keepers\n Iterator<String> it = myrc.graphedgeref_to_link.keySet().iterator(); Set<Bundle> to_keep = new HashSet<Bundle>();\n while (it.hasNext()) {\n String graph_edge_ref = it.next(); String line_ref = myrc.graphedgeref_to_link.get(graph_edge_ref);\n int fm_i = digraph.linkRefFm(graph_edge_ref);\n int to_i = digraph.linkRefTo(graph_edge_ref);\n String other_dir = digraph.getLinkRef(to_i,fm_i);\n if (myrc.graphedgeref_to_link.containsKey(other_dir)) { to_keep.addAll(myrc.link_counter_context.getBundles(line_ref)); }\n }\n\n // Add the no mapping set and push it to the RTParent\n to_keep.addAll(getRTComponent().getNoMappingSet()); getRTParent().push(getRTParent().getRootBundles().subset(to_keep));\n }",
"private void clearEdgeLinks() {\n edges.clear();\n //keep whole tree to maintain its position when it is expanded (within scroll pane bounds)\n Node rootNode = nodes.get(0);\n VBox rootVBox = (VBox) rootNode.getContainerPane().getParent();\n rootVBox.layout();\n Bounds rootNodeChildrenVBoxBounds = rootNode.getChildrenVBox().getBoundsInLocal();\n rootVBox.setLayoutY(Math.abs(rootVBox.getLayoutY() - ((rootNodeChildrenVBoxBounds.getHeight()) - rootNode.getHeight()) / 2 + rootNode.getLayoutY()));\n rootVBox.layout();\n\n for (int i = 0; i < nodes.size(); i++) {\n Pane containerPane = nodes.get(i).getContainerPane();\n //reposition node to the center of its children\n ObservableList<javafx.scene.Node> genericNodes = nodes.get(i).getChildrenVBox().getChildren();\n if (!genericNodes.isEmpty()) {\n nodes.get(i).setLayoutY(((nodes.get(i).getChildrenVBox().getBoundsInLocal().getHeight()) - rootNode.getHeight()) / 2);\n }\n\n for (int j = 0; j < containerPane.getChildren().size(); j++) {\n if (containerPane.getChildren().get(j) instanceof Edge) {\n containerPane.getChildren().remove(j);\n j--;\n }\n }\n }\n redrawEdges(rootNode);\n }",
"private void removeNoMoreExistingOriginalNodes() {\n for (Node mirrorNode : mirrorGraph.nodes()) {\n if (!isPartOfMirrorEdge(mirrorNode) && !originalGraph.has(mirrorNode)) {\n mirrorGraph.remove(mirrorNode);\n }\n }\n }",
"public void trimRoutes(){\n Station firstStation = null;\n Station s = null;\n Link link = null;\n if (trainState instanceof TrainReady)\n s = ((TrainReady) trainState).getStation();\n if (trainState instanceof TrainArrive)\n link = ((TrainArrive) trainState).getLink();\n if (trainState instanceof TrainDepart)\n link = ((TrainDepart) trainState).getLink();\n\n if (trainState instanceof TrainReady){\n firstStation = s;\n } else if (trainState instanceof TrainArrive){\n firstStation = link.getTo();\n } else if (trainState instanceof TrainDepart){\n firstStation = link.getFrom();\n }\n\n Iterator<Route> routeIterator = routes.iterator();\n while (routeIterator.hasNext()) {\n Route route = routeIterator.next();\n Iterator<Link> iter = route.getLinkList().iterator();\n while (iter.hasNext()){\n Link track = iter.next();\n if (!track.getFrom().equals(firstStation))\n iter.remove();\n else\n break;\n }\n if (route.getLinkList().size() == 0) {\n routeIterator.remove();\n }\n }\n }",
"public void fixEdges() {\n\tfor (LayoutEdge lEdge: edgeList) {\n\t // Get the underlying edge\n\t CyEdge edge = lEdge.getEdge();\n\t CyNode target = (CyNode) edge.getTarget();\n\t CyNode source = (CyNode) edge.getSource();\n\n\t if (nodeToLayoutNode.containsKey(source) && nodeToLayoutNode.containsKey(target)) {\n\t\t// Add the connecting nodes\n\t\tlEdge.addNodes((LayoutNode) nodeToLayoutNode.get(source),\n\t\t\t (LayoutNode) nodeToLayoutNode.get(target));\n\t }\n\t}\n }",
"void clearLinks();",
"public SimpleFeatureCollection simplify(SimpleFeatureCollection bus_links) {\r\n\t\t\r\n\t\t//lists hold simplified and split slope segments\r\n\t\tList<SimpleFeature> simpleSlopes = new ArrayList<SimpleFeature>();\r\n\t List<SimpleFeature> segmentsSlopes = new ArrayList<SimpleFeature>();\r\n\t\t\r\n\t\t//list to hold the assigned rids of the segments\r\n\t \tList<Integer> assigned = new ArrayList<Integer>();\r\n\t \t\r\n\t\t//collections to lists\r\n\t\tList<SimpleFeature> intersections = FeatureOperations.featureCollectionToList(this.intersections);\r\n\t\tList<SimpleFeature> slopeLinks = FeatureOperations.featureCollectionToList(this.getSlopeLinks());\r\n\t\tList<SimpleFeature> slopeLiftLinks = FeatureOperations.featureCollectionToList(this.getLinks());\r\n\t\tList<SimpleFeature> busLinks = (bus_links != null) ? FeatureOperations.featureCollectionToList(bus_links) : null;\r\n\t\t\r\n\t\t//INTERSECTIONS USING KDTREE\r\n\t\t//create spatial index to contain all intersections\r\n\t\tfinal KdTree pointIndex = new KdTree();\r\n\t\tfor (SimpleFeature intersection: intersections) {\r\n\t\t\tpointIndex.insert(((Geometry)intersection.getDefaultGeometry()).getCoordinate(), intersection);\r\n\t\t}\r\n\t\tif (pointIndex.isEmpty()) {\r\n\t\t\tLogger.getLogger(SlopeLinkMatching.class.getName()).log(Level.WARNING, \"kdTree is Emtpy. No Intersections loaded while simplifying slopes\");\r\n\t\t\tLogger.getLogger(Logger.GLOBAL_LOGGER_NAME).log(Level.WARNING, \"kdTree is Emtpy. No Intersections loaded while simplifying slopes\");\r\n\t\t}\r\n\t\t\r\n\t\t//SLOPE LINKS, SLOPE LIFT LINKS AND BUS LINKS USING STRTREE\r\n\t\tfinal SpatialIndex lineIndex = new STRtree();\r\n\t\t//insert all slope links\r\n\t\tfor (SimpleFeature link: slopeLinks) {\r\n\t\t\tEnvelope linkEnvelope = new Envelope(((Geometry) link.getDefaultGeometry()).getEnvelopeInternal());\r\n\t\t\tlineIndex.insert(linkEnvelope, link);\r\n\t\t}\r\n\t\t//insert all slopeLift links\r\n\t\tfor (SimpleFeature link: slopeLiftLinks) {\r\n\t\t\tEnvelope linkEnvelope2 = new Envelope(((Geometry) link.getDefaultGeometry()).getEnvelopeInternal());\r\n\t\t\tlineIndex.insert(linkEnvelope2, link);\r\n\t\t}\r\n\t\t//insert all bus links\r\n\t\tif (busLinks!=null) {\r\n\t\t\tfor (SimpleFeature link: busLinks) {\r\n\t\t\t\tEnvelope linkEnvelope3 = new Envelope(((Geometry) link.getDefaultGeometry()).getEnvelopeInternal());\r\n\t\t\t\tlineIndex.insert(linkEnvelope3, link);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//KEEP INTERSECTING LINKS FOR EACH SLOPE\r\n\t\tfor (SimpleFeature slope_original: this.getFeatures_in()) {\r\n\t\t\t\r\n//if (!slope_original.getAttribute(\"DE_GR_L_1\").equals(\"Sportgastein\")) continue;\r\n\r\n\t\t\t//fetch slope geometry as LengthIndexedLine\r\n\t\t\tGeometry slopeGeom = (Geometry) slope_original.getDefaultGeometry();\r\n\t\t\tLengthIndexedLine lengthLine = new LengthIndexedLine(slopeGeom);\r\n\t\t\t\r\n\t\t\t//get envelope and expand by 5.00 meters\r\n\t\t\tEnvelope search = new Envelope(slopeGeom.getEnvelopeInternal()); \r\n\t\t\tsearch.expandBy(5.00);\r\n\r\n\t\t\t//Vertex ordered Map as index on lengthLine and corresponding coordinate\r\n\t\t\tMap<Double, Coordinate> newVertices = new TreeMap<Double, Coordinate>();\r\n\t\t\t//insert start and end-point\r\n\t\t\tnewVertices.put(lengthLine.getStartIndex(), lengthLine.extractPoint(lengthLine.getStartIndex()));\r\n\t\t\tnewVertices.put(lengthLine.getEndIndex(), lengthLine.extractPoint(lengthLine.getEndIndex()));\r\n\r\n\t\t\t/*------------------------ INTERSECTIONS ------------------------*/\r\n\t\t\t//fetch intersections in the slope envelope\r\n\t\t\tList<?> neighbourIntersections = pointIndex.query(search);\r\n\t\t\t\r\n/*\t\t\tSystem.out.println(\"For slope \" + slope.getAttribute(\"XML_GID\") \r\n\t\t\t\t+ \" found following intersections: \");\r\n\t\t\tfor (Object inters: neighbourIntersections) {\r\n\t\t\t\tSystem.out.println(\"\\tintersection: \" + ((SimpleFeature)((KdNode )inters).getData()).getAttribute(\"gid_start\") + \", \" + ((SimpleFeature)((KdNode )inters).getData()).getAttribute(\"gid_end\"));\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"----------------------------------\");\r\n*/\r\n\t\t\t\r\n\t\t\t//iterate through intersections and keep only those on line (using distance threshold)\r\n\t\t\tfor (Object inters: neighbourIntersections) {\r\n\t\t\t\t//get geometry and coordinate\r\n\t\t\t\tGeometry geom = (Geometry) ((SimpleFeature)((KdNode )inters).getData()).getDefaultGeometry();\r\n\t\t\t\tCoordinate coord = geom.getCoordinate();\r\n\t\t\t\t//check if intersection is on line (using distance with threshold 1cm)\r\n\t\t\t\tif (slopeGeom.distance(geom) < 0.001) {\r\n\t\t\t\t\tdouble index = lengthLine.indexOf(coord);\r\n\t\t\t\t\t//add it if not already contained\r\n\t\t\t\t\tif(!newVertices.containsKey(index) && !newVertices.containsValue(coord)) {\r\n\t\t\t\t\t\tnewVertices.put(index, coord);\r\n\t\t\t\t\t}\r\n//\t\t\t\t\tSystem.out.println(\"\\tintersection: \" + ((SimpleFeature)((KdNode )inters).getData()).getAttribute(\"gid_start\") + \", \" \r\n//\t\t\t\t\t+ ((SimpleFeature)((KdNode )inters).getData()).getAttribute(\"gid_end\"));\r\n\t\t\t\t} \r\n\t\t\t}\r\n\t\t\t/*-------------------------------------------------------*/\r\n\t\t\t\r\n\t\t\t/*------------------------ LINKS ------------------------*/\r\n\t\t\t//fetch links in the envelope\r\n\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\tList<SimpleFeature> neighbourLinks = lineIndex.query(search);\r\n\r\n/*\t\t\tSystem.out.println(\"For slope \" + slope.getAttribute(\"XML_GID\") \r\n\t\t\t\t+ \" found following links: \");\r\n\t\t\tfor (SimpleFeature link: neighbourLinks) {\r\n\t\t\t\tSystem.out.println(\"\\tlink: \" + link.getAttribute(\"gid_start\") + \", \" + link.getAttribute(\"gid_end\"));\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"----------------------------------\");\r\n*/\r\n\t\t\t\r\n\t\t\t//iterate through links and keep only those on line (using distance threshold)\r\n\t\t\tfor (SimpleFeature link : neighbourLinks) {\t\t\t\t\r\n\t\t\t\tGeometry linkGeom = (Geometry) link.getDefaultGeometry();\r\n\t\t\t\t//filter out links not intersecting with slope\r\n\t\t\t\tif(slopeGeom.distance(linkGeom) < 0.05) {\r\n\t\t\t\t\tCoordinate[] linkCoords = linkGeom.getCoordinates();\r\n\t\t\t\t\t//check which link end-point is on line (using distance with threshold 5cm) and add if not already contained\r\n\t\t\t\t\tfor (Coordinate linkCoord: linkCoords) {\r\n\t\t\t\t\t\tif (slopeGeom.distance(FeatureMatching.geomOps.coordinateToPointGeometry(linkCoord)) < 0.05 && !newVertices.containsValue(linkCoord)) {\r\n\t\t\t\t\t\t\tnewVertices.put(lengthLine.indexOf(linkCoord), linkCoord);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t//System.out.println(\"\\tlink: \" + link.getAttribute(\"gid_start\") + \", \" + link.getAttribute(\"gid_end\"));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t/*-------------------------------------------------------*/\r\n\t\t\t\r\n\t\t\t//new coordinate list from kept indices, for the creation of the simplified feature\r\n\t\t\tList<Coordinate> simplifiedCoords = new ArrayList<Coordinate>();\r\n\t\t\tfor (Entry<Double, Coordinate> entry: newVertices.entrySet()){\r\n\t\t\t\tif (!simplifiedCoords.contains(entry.getValue()))\r\n\t\t\t\tsimplifiedCoords.add(entry.getValue());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//use the simplified coordinates to split original bus geometry to its bus segments at topologic nodes\r\n\t\t\t//geometry must be preserved\r\n\t\t\t//semantic attributes must be preserved\r\n\t\t\t// r_id attribute must be added\r\n\t\t\tArrayList<SimpleFeature> splitSegments = FeatureMatching.featOps.splitFeatureAtCoordinates(slope_original, simplifiedCoords);\r\n\t\t\t\r\n\t\t\t//create new feature and add to feature collection\r\n\t\t\tSimpleFeatureType simplifiedType = FeatureOperations.makeLineStringFeatureType(this.getFeatures_in()[0].getFeatureType().getCoordinateReferenceSystem(), \"merged_pivots\");\r\n\t\t\tSimpleFeature simplifiedSlope = FeatureMatching.featOps.getFeatureFromCoordinates(simplifiedType, simplifiedCoords.toArray(new Coordinate[0]));\r\n\t\t \tString deName = slope_original.getAttribute(\"DE_GR_L_0\").toString() + \" \" + slope_original.getAttribute(\"DE_GR_L_1\").toString();\r\n\t\t \t//split feature at remaining vertices to line segments (for each vertex pair)\r\n\t\t \tArrayList<SimpleFeature> simpleSegments = FeatureMatching.featOps.splitFeatureAtVertices(simplifiedSlope);\r\n\t\t \t//rids building\r\n\t\t \tint segmentNumber = 1;\r\n//if(splitSegments.size() != simpleSegments.size()) {\t\t \t\r\n//System.out.println(slope_original.getAttribute(\"XML_GID\").toString() + \": \" +splitSegments.size() + \" / \" + simpleSegments.size());\t\r\n//System.exit(0);\r\n//}\t\t\t\r\n\t\t \tfor (SimpleFeature simpleSegment: simpleSegments) {\r\n\t\t \t\tGeometry segment_geom = (Geometry) simpleSegment.getDefaultGeometry();\r\n\t\t \t\tCoordinate[] segment_coords = segment_geom.getCoordinates(); \r\n\t\t \t\t//indexedLineGeom to getLength\r\n\t\t \t\tdouble length = lengthLine.extractLine(lengthLine.indexOf(segment_coords[0]), lengthLine.indexOf(segment_coords[1])).getLength();\r\n\t\t \t\t//in case segment has zero length ignore it and proceed to the next\r\n\t\t \t\tif (length == 0.0) continue;\t//{System.err.println(length);}\r\n\t\t \t\tdouble cost_1, cost_2, cost_3, r_cost_1, r_cost_2, r_cost_3;\r\n if (Integer.parseInt(slope_original.getAttribute(\"difficulty\").toString()) == 1) {\r\n r_cost_1 = length; r_cost_2 = 10 * length; r_cost_3 = 15 * length;\r\n cost_1 = length; cost_2 = 10 * length; cost_3 = 15 * length;\r\n } else if (Integer.parseInt(slope_original.getAttribute(\"difficulty\").toString()) == 2) {\r\n r_cost_1 = 5 * length; r_cost_2 = length; r_cost_3 = 5 * length;\r\n cost_1 = 5 * length; cost_2 = length; cost_3 = 5 * length;\r\n } else if (Integer.parseInt(slope_original.getAttribute(\"difficulty\").toString()) == 3) {\r\n r_cost_1 = 15 * length; r_cost_2 = 10 * length; r_cost_3 = length;\r\n cost_1 = 15 * length; cost_2 = 10 * length; cost_3 = length;\r\n } else {\r\n r_cost_1 = length; r_cost_2 = length; r_cost_3 = length;\r\n cost_1 = length; cost_2 = length; cost_3 = length;\r\n }\r\n \r\n\t\t \t\t//build unique r_id\r\n int slopeNumber = Integer.parseInt(slope_original.getAttribute(\"XML_GID\").toString());\r\n\t\t \t\tint rid = Integer.parseInt(\"1\"+ digitRectifier(slopeNumber, 5) + digitRectifier(segmentNumber, 3));\r\n\t\t \t\twhile (assigned.contains(rid)) {\r\n\t\t \t\t\trid++;\r\n\t\t \t\t\tsegmentNumber++;\r\n\t\t \t\t}\r\n\t\t \t\tassigned.add(rid);\r\n\t\t \t\tsegmentNumber++;\r\n\t\t \t\t//pass computed r_id to the corresponded split segment\r\n\t\t \t\tsplitSegments.get(simpleSegments.indexOf(simpleSegment)).setAttribute(\"r_id\", rid);\r\n\t\t \t\tsplitSegments.get(simpleSegments.indexOf(simpleSegment)).setAttribute(\"difficulty\", Integer.parseInt(slope_original.getAttribute(\"difficulty\").toString()));\r\n \r\n\t\t\t \tMap <String, Object> attrs = new LinkedHashMap<String, Object>();\r\n\t\t\t \tattrs.put(\"XML_TYPE\", \"slopes\");\r\n\t\t\t \tattrs.put(\"de_name\", deName);\r\n\t\t\t \tattrs.put(\"difficulty\", Integer.parseInt(slope_original.getAttribute(\"difficulty\").toString()));\r\n\t\t\t \tattrs.put(\"source\", String.valueOf(0));\r\n\t\t\t \tattrs.put(\"target\", String.valueOf(0));\r\n\t\t\t \tattrs.put(\"duration\", Double.parseDouble(\"0\")); //duration 0 for slopes\r\n\t\t\t \tattrs.put(\"length\", length); \r\n\t\t\t \tattrs.put(\"r_length\", length); \r\n attrs.put(\"r_rev_c\", (double) -1);\r\n attrs.put(\"rev_c\", (double) -1);\r\n\t\t\t \tattrs.put(\"cost_1\", cost_1);\r\n\t\t\t \tattrs.put(\"cost_2\", cost_2);\r\n\t\t\t \tattrs.put(\"cost_3\", cost_3);\r\n\t\t\t \tattrs.put(\"r_cost_1\", r_cost_1);\r\n\t\t\t \tattrs.put(\"r_cost_2\", r_cost_2);\r\n\t\t\t \tattrs.put(\"r_cost_3\", r_cost_3);\r\n\t\t\t \tattrs.put(\"open\", (int) 0);\r\n\t\t\t \tattrs.put(\"start_z\", segment_coords[0].z/10);\r\n\t\t\t \tattrs.put(\"end_z\", segment_coords[segment_coords.length-1].z/10);\r\n\t\t\t\tattrs.put(\"r_id\", rid);\r\n\t\t\t\t//add attributes\r\n\t\t\t\tfor (Map.Entry<String, Object> attribute : attrs.entrySet()){\r\n\t\t\t\t\tsimpleSegment = FeatureOperations.addAttribute(simpleSegment, attribute.getKey(), attribute.getValue());\r\n\t\t\t\t\tsimpleSegment.setAttribute(attribute.getKey(), attribute.getValue());\r\n\t\t\t\t}\r\n\t\t\t\tsimpleSlopes.add(simpleSegment);\r\n\t\t \t}\r\n\t\t \tsegmentsSlopes.addAll(splitSegments);\r\n\r\n\t\t\t//CONTROL METHOD PRINTS OUT SLOPE WITH NO CONNECTIONS\r\n/*\t\t\tif (neighbourLinks.size() == 0 && neighbourIntersections.size() == 0) {\r\n\t\t\t\tSystem.err.println(\"Slope with 'r_id' \" + slope_original.getAttribute(\"XML_GID\") + \" was found with no links and no intersections\");\r\n\t\t\t} else if (neighbourLinks.size() == 0) {\r\n\t\t\t\tSystem.err.println(\"Slope with 'r_id' \" + slope_original.getAttribute(\"XML_GID\") + \" was found with no links\");\r\n\t\t\t}*/\r\n\t\t\t//TODO:METHOD END PRINT RESULT TO FILE\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//create segments_buses shapeFile\r\n\t\tSimpleFeatureCollection newSlopeSegments = new ListFeatureCollection(segmentsSlopes.get(0).getFeatureType(), segmentsSlopes);\r\n\t\tFileOperations.createShapeFile(newSlopeSegments, StartConfiguration.getInstance().getFolder_out() + \"segments_slopes.shp\");\t\r\n\t\t//return feature collection\r\n\t\tSimpleFeatureCollection simplifiedSlopes = new ListFeatureCollection(simpleSlopes.get(0).getFeatureType(), simpleSlopes);\r\n\t\t\r\n\t\t\r\n\t\treturn simplifiedSlopes;\r\n\t}",
"public void removeAllLinks() {\n\t\tfor (int i=0; i<links.size(); i++){\n\t\t\tlinks.remove(i);\n\t\t}\n\t}",
"private void clean() {\n nodesToRemove.clear();\n edgesToRemove.clear();\n }",
"public final void clearLinks() {\n\t\tlockMe(this);\n\t\tlinks.clear();\n\t\tlinksFromDistance.clear();\n\t\tlinksToDistance.clear();\n\t\tunlockMe(this);\n\t}",
"protected void _removeLinks() throws java.rmi.RemoteException, javax.ejb.RemoveException {\n\t\tjava.util.List links = _getLinks();\n\t\tfor (int i = 0; i < links.size(); i++) {\n\t\t\ttry {\n\t\t\t\t((com.ibm.ivj.ejb.associations.interfaces.Link) links.get(i)).remove();\n\t\t\t} catch (javax.ejb.FinderException e) {\n\t\t\t} //Consume Finder error since I am going away\n\t\t}\n\t}",
"public void testConvertTopo (Topology tp)\n {\n Node root = tp.getNodes().get(0);\n //root.setColor(Color.green);\n parcours(root, visitedlist, compo1);\n set.addAll(composante);\n ArrayList distinctList = new ArrayList(set);\n System.out.println(distinctList.size());\n for ( int i = 0; i < distinctList.size(); i++ )\n System.out.println(distinctList.get(i));\n ArrayList<Link> liste = connectedL(tp);\n /*for (int i = 0; i < liste.size(); i++)\n System.out.println(liste.get(i));*/\n Convert(liste);\n /*for ( int i = 0; i < listConvert.size(); i++ )\n System.out.println(listConvert.get(i));*/\n ConvertMinimiz(listConvert);\n minimisationConvCompo(distinctList);\n minimisationAllNeighbor(listConvert,tp);\n //minimisation4(listConvert,tp);\n }",
"void unsetFurtherRelations();",
"public void clear()\t{nodes.clear(); allLinks.clear();}",
"protected void _removeLinks() throws java.rmi.RemoteException, javax.ejb.RemoveException {\n\tjava.util.Enumeration links = _getLinks().elements();\n\twhile (links.hasMoreElements()) {\n\t\ttry {\n\t\t\t((com.ibm.ivj.ejb.associations.interfaces.Link) (links.nextElement())).remove();\n\t\t}\n\t\tcatch (javax.ejb.FinderException e) {} //Consume Finder error since I am going away\n\t}\n}",
"void removeNodes(List<CyNode> nodes);",
"void removeEdges(List<CyEdge> edges);",
"public void delIncomingRelations();",
"public static void main(String[] args) {\n\t\taListNode.next = bListNode;\n\t\tbListNode.next = cListNode;\n\t\tcListNode.next = dListNode;\n\t\tdListNode.next = aListNode;\n\t\tremoveElements(aListNode,1);\n\n\t}",
"public void addAllOnVisibleLinks() {\n // Check for a valid render context and create the new set\n RTGraphComponent.RenderContext myrc = (RTGraphComponent.RenderContext) getRTComponent().rc; if (myrc == null) return;\n Set<Bundle> set = new HashSet<Bundle>();\n // Go through visible links and find the related bundles\n Iterator<String> it = myrc.graphedgeref_to_link.keySet().iterator();\n while (it.hasNext()) {\n String graphedgeref = it.next();\n Iterator<Bundle> itb = digraph.linkRefIterator(graphedgeref);\n while (itb.hasNext()) set.add(itb.next());\n }\n // Add the no mapping set and push it to the RTParent\n set.addAll(getRTComponent().getNoMappingSet()); getRTParent().push(getRTParent().getRootBundles().subset(set));\n }",
"@Override\n\tpublic void removeAll() {\n\t\tfor (LinkGroup linkGroup : findAll()) {\n\t\t\tremove(linkGroup);\n\t\t}\n\t}",
"private void updateOriginalNodesInMirror() {\n for (Node node : originalGraph.nodes()) {\n if (!mirrorGraph.has(node)) {\n mirrorGraph.add(node);\n }\n originalAttributesToMirror(node);\n }\n }",
"private void clean() {\n Iterable<Long> v = vertices();\n Iterator<Long> iter = v.iterator();\n while (iter.hasNext()) {\n Long n = iter.next();\n if (world.get(n).adj.size() == 0) {\n iter.remove();\n }\n }\n }",
"private static void method_2(){\r\n\t\tLinkedList link = new LinkedList();\r\n\t\tlink.add(\"abc1\");\r\n\t\tlink.add(\"abc2\");\r\n\t\tlink.add(\"abc3\");\r\n\t\tlink.addFirst(\"QQ\");\r\n\t\tlink.add(\"WWW\");\r\n\t\tlink.addLast(\"RRR\");\r\n\t\tSystem.out.println(link);// qq 1 2 3 www rrr\r\n\t\tSystem.out.println(link.removeFirst());//1 2 3 www rrr\r\n\t\tSystem.out.println(link.removeLast());//1 2 3 www\r\n\t\tSystem.out.println(link);\r\n\t}",
"private void deleteConnections() {\n for (int i = 0; !this.sourceConnections.isEmpty(); ) {\n LinkElement wire = (LinkElement) this.sourceConnections.get(i);\n wire.detachSource();\n wire.detachTarget();\n this.graphElement.removeEdge(wire.getEdgeId(), wire);\n }\n\n for (int i = 0; !this.targetConnections.isEmpty(); ) {\n LinkElement wire = (LinkElement) this.targetConnections.get(i);\n wire.detachSource();\n wire.detachTarget();\n this.graphElement.removeEdge(wire.getEdgeId(), wire);\n }\n }",
"private void refreshNodeList() {\n if (UnderNet.router.status.equals(InterfaceStatus.STARTED)) {\n //Using connected and cached nodes if the router has started.\n ArrayList<Node> nodesToList = UnderNet.router.getConnectedNodes();\n for (Node cachedNode :\n EntryNodeCache.cachedNodes) {\n boolean canAdd = true;\n for (Node connectedNode : UnderNet.router.getConnectedNodes()) {\n if (cachedNode.getAddress().equals(connectedNode.getAddress())) {\n canAdd = false;\n }\n }\n if (canAdd) {\n nodesToList.add(cachedNode);\n }\n }\n nodeList.setListData(nodesToList.toArray());\n } else {\n //Using cached nodes if the router isn't online.\n nodeList.setListData(EntryNodeCache.cachedNodes.toArray());\n }\n }",
"public void removeAllEdges() {\n }",
"public List<T> sort() {\n final ArrayList<Node<T>> L = new ArrayList<>();\n\n // S <- Set of all nodes with no incoming edges\n final HashSet<Node<T>> S = new HashSet<>();\n nodes.stream().filter(n -> n.inEdges.isEmpty()).forEach(S::add);\n\n // while S is non-empty do\n while (!S.isEmpty()) {\n // remove a node n from S\n final Node<T> n = S.iterator().next();\n S.remove(n);\n\n // insert n into L\n L.add(n);\n\n // for each node m with an edge e from n to m do\n for (Iterator<Edge<T>> it = n.outEdges.iterator(); it.hasNext();) {\n // remove edge e from the graph\n final Edge<T> e = it.next();\n final Node<T> m = e.to;\n it.remove(); // Remove edge from n\n m.inEdges.remove(e); // Remove edge from m\n\n // if m has no other incoming edges then insert m into S\n if (m.inEdges.isEmpty()) S.add(m);\n }\n }\n // Check to see if all edges are removed\n for (Node<T> n : nodes) {\n if (!n.inEdges.isEmpty()) {\n return die(\"Cycle present, topological sort not possible: \"+n.thing.toString()+\" <- [\"+n.inEdges.stream().map(e->e.from.thing.toString()).collect(Collectors.joining(\", \"))+\"]\");\n }\n }\n return L.stream().map(n -> n.thing).collect(Collectors.toList());\n }",
"public void normalize(List<RankList> samples) {\n/* 667 */ for (RankList sample : samples) nml.normalize(sample);\n/* */ \n/* */ }",
"public void clearPathData()\r\n {\r\n // Clear out all paths\r\n for(String key: network_topology.keyset())\r\n {\r\n //System.out.println(\"Clearing : \"+ key);\r\n network_topology.get(key).previous=null;\r\n network_topology.get(key).minDistance = Double.POSITIVE_INFINITY;\r\n }\r\n }",
"public static void convertToWebgraphUndirected() {\n\t\tObjectArrayList<File> list = Utilities.getUndirectedGraphList(LoadMethods.ASCII);\n\t\tUtilities.outputLine(\"Converting \" + list.size() + \" undirected graphs...\", 1);\n\n\t\tint k = 0;\n\t\tfor (File f : list) {\n\t\t\t\n\t\t\tgraph.Undir g = Undir.load(f.getPath(), GraphTypes.ADJLIST, LoadMethods.ASCII);\n\t\t\tString output = \"Undirected/\" + f.getName();\n\n\t\t\tif (output.lastIndexOf('.') >= 0) {\n\t\t\t\toutput = output.substring(0, output.lastIndexOf('.'));\n\t\t\t}\n\t\t\tUtilities.output(++k + \" - \" + f.getPath(), 1);\n\t\t\tg.exportAsWebgraph(output);\n\t\t\tUtilities.outputLine(\" => \" + Utilities.webGraphPath + output, 1);\n\t\t}\n\t}",
"private void clean() {\n //use iterator\n Iterator<Long> it = nodes.keySet().iterator();\n while (it.hasNext()) {\n Long node = it.next();\n if (nodes.get(node).adjs.isEmpty()) {\n it.remove();\n }\n }\n }",
"public void removeAllRuleRef();",
"public static void complementaryGraph(mxAnalysisGraph aGraph) {\n ArrayList<ArrayList<mxCell>> oldConnections = new ArrayList<ArrayList<mxCell>>();\n mxGraph graph = aGraph.getGraph();\n Object parent = graph.getDefaultParent();\n //replicate the edge connections in oldConnections\n Object[] vertices = aGraph.getChildVertices(parent);\n int vertexCount = vertices.length;\n\n for (int i = 0; i < vertexCount; i++) {\n mxCell currVertex = (mxCell)vertices[i];\n int edgeCount = currVertex.getEdgeCount();\n mxCell currEdge = new mxCell();\n ArrayList<mxCell> neighborVertexes = new ArrayList<mxCell>();\n\n for (int j = 0; j < edgeCount; j++) {\n currEdge = (mxCell)currVertex.getEdgeAt(j);\n\n mxCell source = (mxCell)currEdge.getSource();\n mxCell destination = (mxCell)currEdge.getTarget();\n\n if (!source.equals(currVertex)) {\n neighborVertexes.add(j, source);\n }\n else {\n neighborVertexes.add(j, destination);\n }\n\n }\n\n oldConnections.add(i, neighborVertexes);\n }\n\n //delete all edges and make a complementary model\n Object[] edges = aGraph.getChildEdges(parent);\n graph.removeCells(edges);\n\n for (int i = 0; i < vertexCount; i++) {\n ArrayList<mxCell> oldNeighbors = new ArrayList<mxCell>();\n oldNeighbors = oldConnections.get(i);\n mxCell currVertex = (mxCell)vertices[i];\n\n for (int j = 0; j < vertexCount; j++) {\n mxCell targetVertex = (mxCell)vertices[j];\n boolean shouldConnect = true; // the decision if the two current vertexes should be connected\n\n if (oldNeighbors.contains(targetVertex)) {\n shouldConnect = false;\n }\n else if (targetVertex.equals(currVertex)) {\n shouldConnect = false;\n }\n else if (areConnected(aGraph, currVertex, targetVertex)) {\n shouldConnect = false;\n }\n\n if (shouldConnect) {\n graph.insertEdge(parent, null, null, currVertex, targetVertex);\n }\n }\n\n }\n }",
"ObservableList<Link> getFilteredLinkList();",
"void tryRemoveNodes(Collection<Node> nodesToRemove) throws Exception;",
"public void resetRelatesToList(MappingType mapping) {\n\t\tmapping.getRelatesTo().clear();\n\t}",
"private static void stripTrivialCycles(CFG cfg) {\n\t\tCollection<SDGEdge> toRemove = new LinkedList<SDGEdge>();\n\t\tfor (SDGEdge e : cfg.edgeSet()) {\n\t\t\tif (e.getSource().equals(e.getTarget())) {\n\t\t\t\ttoRemove.add(e);\n\t\t\t}\n\t\t}\n\t\t\n\t\tcfg.removeAllEdges(toRemove);\n\t}",
"public void clean() {\n\t\tfor(ComponentConfig comp: components ) {\r\n\t\t\tList<Integer> cleanCalls = new ArrayList<Integer>();\r\n\t\t\tif(comp.getCalls()!=null) {\r\n\t\t\t\tfor(int call:comp.getCalls()) {\r\n\t\t\t\t\tif(hasComp(call)) {\r\n\t\t\t\t\t\tcleanCalls.add(call);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tint[] result = new int[cleanCalls.size()];\r\n\t\t\t\tint i=0;\r\n\t\t\t\tfor(Integer call: cleanCalls) {\r\n\t\t\t\t\tresult[i] = call;\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\t\t\tcomp.setCalls(result);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t// remove duplicate\r\n\t\tList<ComponentConfig> newComponentList = new ArrayList<ComponentConfig>();\r\n\t\tthis.compids.clear();\r\n\t\tfor(ComponentConfig c:components) {\r\n\t\t\tif(!compids.contains(c.getId())) {\r\n\t\t\t\tnewComponentList.add(c);\r\n\t\t\t\tcompids.add(c.getId());\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.components = newComponentList;\r\n\t}",
"private List<MutateOperation> removeAll() {\n return removeDescendantsAndFilter(rootResourceName);\n }",
"public void minimisation4( ArrayList<Node>convrt1, Topology tp)\n {\n for ( int i=0; i<tp.getNodes().size(); i++ )\n {\n Node n= tp.getNodes().get(i);\n List<Link>allLinks = n.getLinks();\n boolean allLinksConnected= true;\n for ( int j=0; j<allLinks.size();j++ )\n {\n Link l= allLinks.get(j);\n if ( l.getColor()!=Color.orange)\n allLinksConnected=false;\n }\n List<Node> neighbors= n.getNeighbors();\n boolean allNeighborsConvert=true;\n for ( int j=0; j<neighbors.size();j++ )\n {\n Node n1= neighbors.get(j);\n if ( (convrt1.contains(n1))== false )\n {\n allNeighborsConvert=false;\n }\n }\n if ( allLinksConnected==true && allNeighborsConvert==true )\n {\n if ( n instanceof Ipv6)\n {\n ((Ipv6) n).setType(\"Conv\");\n n.setIcon(\"./src/img/Conv.png\");\n convrt1.add(n);\n }\n else if ( n instanceof Ipv4)\n {\n ((Ipv4) n).setType(\"Conv\");\n n.setIcon(\"./src/img/Conv.png\");\n convrt1.add(n);\n }\n\n for ( int m=0; m< n.getNeighbors().size(); m++ )\n {\n Node n2= n.getNeighbors().get(m);\n if ( n2 instanceof Ipv6)\n {\n ((Ipv6) n2).setType(\"IPV6\");\n n2.setIcon(\"./src/img/ipv6.png\");\n convrt1.remove(n2);\n }\n else if ( n2 instanceof Ipv4)\n {\n ((Ipv4) n2).setType(\"IPV4\");\n n2.setIcon(\"./src/img/ipv4.png\");\n convrt1.remove(n2);\n }\n }\n }\n }\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic Set<Link> algorithmPLMISL(ArrayList<Link> links_p, ArrayList<Link> links_s) {\n\t\tSet<Link> selected_links = new HashSet<Link>();\n\t\tSet<Link> selected_primary_links = new HashSet<Link>();\n\t\t//set up variables\n\t\tLink a;\n\t\tdouble rho;\n\t\tboolean first=true;\n\t\t//sort primary links and get the smallest\n\t\tCollections.sort(links_p);\n\t\tLink primaryLink_c = links_p.get(0);\n\t\t//run algorithm\n\t\twhile(links_s.size()>0) {\n\t\t\ta=links_s.get(0);\n\t\t\tlinks_s.remove(0);\n\t\t\tif (a.getLength()<primaryLink_c.getLength()) {\n\t\t\t\t//figure out if you can add the link to the set\n\t\t\t\t//you can only add it if the relative interference of the sender and the existing links on the primary links are less than 1-phi\n\t\t\t\tboolean can_add = true;\n\t\t\t\tfor (Link primaryLink: links_p) {\n\t\t\t\t\tif (relativeInterference(a.getSender(),primaryLink)+relativeInterference(selected_links,primaryLink)>(1-phi)) {\n\t\t\t\t\t\tcan_add = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (can_add) {\n\t\t\t\t\tselected_links.add(a);\n\t\t\t\t\trho = calcrho(a);\n\t\t\t\t\tlinks_s = firstRemoval(links_s, a,rho);\n\t\t\t\t\tlinks_s = secondRemoval(links_s, selected_links, primaryLink_c, a,true);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (first) {\n\t\t\t\t\ta=primaryLink_c;\n\t\t\t\t\tselected_links.add(a);\n\t\t\t\t\tselected_primary_links.add(a);\n\t\t\t\t\trho = calcrho(a);\n\t\t\t\t\tlinks_s = firstRemoval(links_s, a,rho);\n\t\t\t\t\tlinks_s = secondRemoval(links_s, selected_links, primaryLink_c, a,true);\n\t\t\t\t\t//check if more primary links\n\t\t\t\t\tlinks_p.remove(0);\n\t\t\t\t\tif (links_p.size()==0) {\n\t\t\t\t\t\tfirst = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprimaryLink_c = links_p.get(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tselected_links.add(a);\n\t\t\t\t\trho = calcrho(a);\n\t\t\t\t\tlinks_s = firstRemoval(links_s, a,rho);\n\t\t\t\t\tlinks_s = secondRemoval(links_s, selected_links, primaryLink_c, a, false);\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (links_p.size()!=0) selected_links.addAll(links_p);\n\t\treturn selected_links;\n\t}",
"private void removeNoMoreExistingOriginalEdges() {\n for (MirrorEdge mirrorEdge : directEdgeMap.values()) {\n if (!originalGraph.has(mirrorEdge.original)) {\n for (Edge segment : mirrorEdge.segments) {\n mirrorGraph.forcedRemove(segment);\n reverseEdgeMap.remove(segment);\n }\n for (Node bend : mirrorEdge.bends) {\n mirrorGraph.forcedRemove(bend);\n reverseEdgeMap.remove(bend);\n }\n directEdgeMap.remove(mirrorEdge.original);\n }\n }\n }",
"private List<AxiomTreeNode> reduceNodeList(List<AxiomTreeNode> list, int remove) {\n\n List<AxiomTreeNode> reduced = new ArrayList<AxiomTreeNode>(list);\n\n reduced.remove(remove);\n\n return reduced;\n }",
"private void clean() {\n // TODO: Your code here.\n for (Long id : vertices()) {\n if (adj.get(id).size() == 1) {\n adj.remove(id);\n }\n }\n }",
"public void clearList()\n\t{\n\t\tnodeManager.clearList();\n\t}",
"public void resetGraph(Comparator comp) {\r\n Collections.sort(users, comp);\r\n }",
"private void cleanupDirectedPresences(NodeID nodeID) {\n Map<String, Collection<String>> senders = nodePresences.remove(nodeID);\n if (senders != null) {\n for (Map.Entry<String, Collection<String>> entry : senders.entrySet()) {\n String sender = entry.getKey();\n Collection<String> receivers = entry.getValue();\n for (String receiver : receivers) {\n try {\n Presence presence = new Presence(Presence.Type.unavailable);\n presence.setFrom(sender);\n presence.setTo(receiver);\n XMPPServer.getInstance().getPresenceRouter().route(presence);\n }\n catch (PacketException e) {\n Log.error(e);\n }\n }\n }\n }\n }",
"public ArrayList<Link> firstRemoval(ArrayList<Link> links_s, Link a, double rho) {\n\t\tArrayList<Link> S_1 = new ArrayList<Link>();\n\t\tfor (Link l: links_s) {\n\t\t\tif (a.getSender().distanceToOtherNode(l.getSender())<rho*a.getLength()) S_1.add(l);\n\t\t}\n\t\tfor (Link l: S_1) {\n\t\t\tlinks_s.remove(l);\n\t\t}\n\t\treturn links_s;\n\t}",
"protected void _initLinks() {\n\t\tleaseTaskStartsLink = null;\n\t\tleaseRulesLink = null;\n\t}",
"void forceRemoveNodesAndExit(Collection<Node> nodesToRemove) throws Exception;",
"private Set<LogicalLink> getLogicalLink(Connection conn, String devName, boolean setPortNumber) throws SQLException {\n\t\tfinal String fname = \"getLogicalLink\";\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(String.format(\"%s(conn=%s, devName=%s, setPortNumber=%s) - start\", fname, conn, devName, setPortNumber));\n\t\t}\n\t\tSet<LogicalLink> linkSet = new HashSet<LogicalLink>();\n\t\tList<Map<String, Object>> patchDocList = dao.getLogicalLinksFromDeviceName(conn, devName);\n\t\tif (patchDocList == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\t/*check src->dst*/\n\t\tfor (Map<String, Object> patchDoc : patchDocList) {\n\t\t\tString inDevName = (String)patchDoc.get(\"inDeviceName\");\n\t\t\tString inPortName = (String)patchDoc.get(\"inPortName\");\n\t\t\tPortData inPort = new PortData();\n\t\t\tinPort.setDeviceName(inDevName);\n\t\t\tinPort.setPortName(inPortName);\n\n\t\t\tString outDevName = (String)patchDoc.get(\"outDeviceName\");\n\t\t\tString outPortName = (String)patchDoc.get(\"outPortName\");\n\t\t\tPortData outPort = new PortData();\n\t\t\toutPort.setDeviceName(outDevName);\n\t\t\toutPort.setPortName(outPortName);\n\n\t\t\tList<PortData> ports = new ArrayList<PortData>();\n\t\t\tports.add(inPort);\n\t\t\tports.add(outPort);\n\n\t\t\tLogicalLink link = new LogicalLink();\n\t\t\tlink.setLink(ports);\n\n\t\t\tlinkSet.add(link);\n\n\n\t\t\tPortData inPort_2 = new PortData();\n\t\t\tinPort_2.setDeviceName(outDevName);\n\t\t\tinPort_2.setPortName(outPortName);\n\t\t\tPortData outPort_2 = new PortData();\n\t\t\toutPort_2.setDeviceName(inDevName);\n\t\t\toutPort_2.setPortName(inPortName);\n\n\t\t\tList<PortData> ports_2 = new ArrayList<PortData>();\n\t\t\tports_2.add(inPort_2);\n\t\t\tports_2.add(outPort_2);\n\n\t\t\tLogicalLink link_2 = new LogicalLink();\n\t\t\tlink_2.setLink(ports_2);\n\n\t\t\tlinkSet.add(link_2);\n\n\t\t}\n\n\t\tif (linkSet.isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\tif (!setPortNumber) {\n\t\t\treturn linkSet;\n\t\t}\n\t\t/* Set port number at port data in logical link */\n\t\tfor (LogicalLink link : linkSet) {\n\t\t\tfor (PortData port : link.getLink()) {\n\t\t\t\tMap<String, Object> portMap = dao.getPortInfoFromPortName(\n\t\t\t\t\t\tconn,\n\t\t\t\t\t\tport.getDeviceName(),\n\t\t\t\t\t\tport.getPortName());\n\t\t\t\tport.setPortNumber((Integer)portMap.get(\"number\"));\n\t\t\t}\n\t\t}\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(String.format(\"%s(ret=%s) - end\", fname, linkSet));\n\t\t}\n\t\treturn linkSet;\n\t}",
"public static void removeSample() {\n Node ll1 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll2 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll3 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll4 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll5 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll6 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n\n System.out.println(\"remove 1==\");\n Node r1 = ll1.remove(0);\n r1.printList();\n System.out.println(\"remove 2==\");\n Node r2 = ll2.remove(1);\n r2.printList();\n System.out.println(\"remove 3==\");\n Node r3 = ll3.remove(2);\n r3.printList();\n System.out.println(\"remove 4==\");\n Node r4 = ll4.remove(3);\n r4.printList();\n System.out.println(\"remove 5==\");\n Node r5 = ll5.remove(4);\n r5.printList();\n System.out.println(\"remove 6==\");\n Node r6 = ll6.remove(5);\n r6.printList();\n\n }",
"List<CommunicationLink> getAllNodes()\n {\n return new ArrayList<>(allNodes.values());\n }",
"void getSinkSet(){\n\t\tsink = new HashSet<>(inlinks.keySet());\n\t\tfor(String node : outlinks.keySet()){\n\t\t\tif(!(sink.add(node))){\n\t\t\t\tsink.remove(node);\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Sink Size : \"+sink.size());\n\t }",
"public interface Topology {\r\n\r\n /**\r\n * Returns list of links\r\n * @return list of links\r\n */\r\n List<Link> getLinks();\r\n \r\n /**\r\n * Returns list of nodes\r\n * @return list of nodes\r\n */\r\n List<Node> getNodes();\r\n \r\n /**\r\n * Returns list od domains\r\n * @return list of domains\r\n */\r\n List<AdminDomain> getDomains();\r\n \r\n /**\r\n * Inserts link in the topology\r\n * @param link link to insert\r\n * @return if insertion of link was successful returns true, otherwise false \r\n */\r\n boolean insertLink(Link link);\r\n \r\n /**\r\n * Removes link from topology\r\n * @param link link to delete\r\n * @return if deletion of link was successful returns true, otherwise false\r\n */\r\n boolean removeLink(Link link);\r\n \r\n}",
"public void setNodesToUnvisited(){\n for(GraphNode node: graphNode){\n if(node.visited){\n node.visited = false;\n }\n }\n }",
"public native VertexList removeSubList(VertexNode a, VertexNode b);",
"private void clearDownloadListStatus() {\r\n /* reset ip waittimes only for local ips */\r\n ProxyController.getInstance().removeIPBlockTimeout(null, true);\r\n /* reset temp unavailble times for all ips */\r\n ProxyController.getInstance().removeHostBlockedTimeout(null, false);\r\n for (final DownloadLink link : DownloadController.getInstance().getAllDownloadLinks()) {\r\n /*\r\n * do not reset if link is offline, finished , already exist or pluginerror (because only plugin updates can fix this)\r\n */\r\n link.getLinkStatus().resetStatus(LinkStatus.ERROR_FATAL | LinkStatus.ERROR_PLUGIN_DEFECT | LinkStatus.ERROR_ALREADYEXISTS, LinkStatus.ERROR_FILE_NOT_FOUND, LinkStatus.FINISHED);\r\n }\r\n }",
"public SortedSet<WIpLink> getIncomingIpLinks () { return n.getIncomingLinks(getNet().getIpLayer().getNe()).stream().map(ee->new WIpLink(ee)).filter(e->!e.isVirtualLink()).collect(Collectors.toCollection(TreeSet::new)); }",
"@Override\n public Set<Edge<PhysicalObject>> getRelationBetweenObjects() {\n assert false : \"shouldn't call this method\";\n return null;\n }",
"private static List<ImmutableList<String>> sanitizeNode(\n AclNode node, List<AclNode> visited, Set<String> sanitized, Map<String, AclNode> aclNodeMap) {\n visited.add(node);\n\n // Create set to hold cycles found\n List<ImmutableList<String>> cyclesFound = new ArrayList<>();\n\n // Go through dependencies (each ACL this one depends on will only appear as one dependency)\n for (AclNode dependency : node.getDependencies()) {\n if (sanitized.contains(dependency.getName())) {\n // We've already checked out the dependency. It must not be in a cycle with current ACL.\n continue;\n }\n int dependencyIndex = visited.indexOf(dependency);\n if (dependencyIndex != -1) {\n // Found a new cycle.\n ImmutableList<String> cycleAcls =\n ImmutableList.copyOf(\n visited.subList(dependencyIndex, visited.size()).stream()\n .map(AclNode::getName)\n .collect(Collectors.toList()));\n cyclesFound.add(cycleAcls);\n } else {\n // No cycle found; recurse on dependency to see if there is a cycle farther down.\n cyclesFound.addAll(\n sanitizeNode(aclNodeMap.get(dependency.getName()), visited, sanitized, aclNodeMap));\n }\n }\n // Remove current node from visited list\n visited.remove(node);\n\n // Record found cycles in this node.\n for (ImmutableList<String> cycleAcls : cyclesFound) {\n int indexOfThisAcl = cycleAcls.indexOf(node.getName());\n if (indexOfThisAcl != -1) {\n node.sanitizeCycle(cycleAcls);\n }\n }\n\n // Now that all cycles are recorded, never explore this node again, and sanitize its ACL.\n node.buildSanitizedAcl();\n sanitized.add(node.getName());\n return cyclesFound;\n }",
"public void removeNeighbours(){\n\t\tgetNeighbours().removeAll(getNeighbours());\n\t}",
"public void removeAllSuccessors() {\n\t\tfor (int idx=0; idx < this.successorNodes.length; idx++) {\n\t\t\tBaseNode bn = (BaseNode) this.successorNodes[idx];\n\t\t\tbn.removeAllSuccessors();\n\t\t}\n\t\tthis.successorNodes = new BaseNode[0];\n this.useCount = 0;\n\t}",
"public void removeAllSuccessors() {\n\t\tfor (int idx=0; idx < this.successorNodes.length; idx++) {\n\t\t\tBaseNode bn = (BaseNode) this.successorNodes[idx];\n\t\t\tbn.removeAllSuccessors();\n\t\t}\n\t\tthis.successorNodes = new BaseNode[0];\n this.useCount = 0;\n\t}",
"void topologicalSort() {\n\n\t\tfor (SimpleVertex vertice : allvertices) {\n\n\t\t\tif (vertice.isVisited == false) {\n\t\t\t\tlistset.add(vertice.Vertexname);\n\t\t\t\ttopologicalSortUtil(vertice);\n\n\t\t\t}\n\t\t}\n\n\t}",
"List<ProductLink> links();",
"void resetLink(Link link, Node source, Node target, Dependency type) {\n\t\tlinks.remove(link);\n\t\tlinks.add(new Link(source, target, type, source));\n\t}",
"@Override\n\tpublic void linkDiscoveryUpdate(List<LDUpdate> updateList)\n\t{\n\n\t}",
"public void populateLinks(List<Drop> drops, Account queryingAccount) {\n \n \t\tList<Long> dropIds = new ArrayList<Long>();\n \t\tfor (Drop drop : drops) {\n \t\t\tdropIds.add(drop.getId());\n \t\t}\n \n \t\tString sql = \"SELECT `droplet_id`, `link_id` AS `id`, `url` \";\n \t\tsql += \"FROM `droplets_links` \";\n \t\tsql += \"INNER JOIN `links` ON (`links`.`id` = `link_id`) \";\n \t\tsql += \"WHERE `droplet_id` IN :drop_ids \";\n \t\tsql += \"AND `links`.`id` NOT IN ( \";\n \t\tsql += \"SELECT `link_id` \";\n \t\tsql += \"FROM `account_droplet_links` \";\n \t\tsql += \"WHERE `account_id` = :account_id \";\n \t\tsql += \"AND `droplet_id` IN :drop_ids \";\n \t\tsql += \"AND `deleted` = 1) \";\n \t\tsql += \"UNION ALL \";\n \t\tsql += \"SELECT `droplet_id`, `link_id` AS `id`, `url` \";\n \t\tsql += \"FROM `account_droplet_links` \";\n \t\tsql += \"INNER JOIN `links` ON (`links`.`id` = `link_id`) \";\n \t\tsql += \"WHERE `droplet_id` IN :drop_ids \";\n \t\tsql += \"AND `account_id` = :account_id \";\n \t\tsql += \"AND `deleted` = 0 \";\n \n \t\tQuery query = em.createNativeQuery(sql);\n \t\tquery.setParameter(\"drop_ids\", dropIds);\n \t\tquery.setParameter(\"account_id\", queryingAccount.getId());\n \n \t\t// Group the links by drop id\n \t\tMap<Long, List<Link>> links = new HashMap<Long, List<Link>>();\n \t\tfor (Object oRow : query.getResultList()) {\n \t\t\tObject[] r = (Object[]) oRow;\n \n \t\t\tLong dropId = ((BigInteger) r[0]).longValue();\n \t\t\tLink link = new Link();\n \t\t\tlink.setId(((BigInteger) r[1]).longValue());\n \t\t\tlink.setUrl((String) r[2]);\n \n \t\t\tList<Link> l = links.get(dropId);\n \t\t\tif (l == null) {\n \t\t\t\tl = new ArrayList<Link>();\n \t\t\t\tlinks.put(dropId, l);\n \t\t\t}\n \n \t\t\tl.add(link);\n \t\t}\n \n \t\tfor (Drop drop : drops) {\n \t\t\tList<Link> l = links.get(drop.getId());\n \n \t\t\tif (l != null) {\n \t\t\t\tdrop.setLinks(l);\n \t\t\t} else {\n \t\t\t\tdrop.setLinks(new ArrayList<Link>());\n \t\t\t}\n \t\t}\n \t}",
"public ArrayList<Link> secondRemoval(ArrayList<Link> links_s, Set<Link> selected_links, Link primaryLink,\n\t\t\tLink a, boolean use_primary) {\n\t\t\n\t\tArrayList<Link> S_2 = new ArrayList<Link>();\n\t\tif (a.getLength()<primaryLink.getLength() && use_primary) {\n\t\t\tfor (Link l: links_s) {\n\t\t\t\tif((relativeInterference(selected_links,l)+relativeInterference(primaryLink.getSender(),l))>(1-phi)) S_2.add(l);\n\t\t\t}\n\t\t}else{\n\t\t\tfor (Link l: links_s) {\n\t\t\t\tif(relativeInterference(selected_links,l)>(1-phi)) S_2.add(l);\n\t\t\t}\n\t\t}\n\t\tfor (Link l: S_2) {\n\t\t\tlinks_s.remove(l);\n\t\t}\n\t\treturn links_s;\n\t}",
"public void removeAllInternetRadioStationOwner() {\r\n\t\tBase.removeAll(this.model, this.getResource(), INTERNETRADIOSTATIONOWNER);\r\n\t}",
"public void clearUpLanes () {\r\n\t\tupLanes = null;\r\n\t}",
"protected void _initLinks() {\n\tpeopleLink = null;\n\tchangeLogDetailsesLink = null;\n}",
"private void RemoveLT(int size, LeapNode[][] pa, LeapNode[][] na,\n\t\t\tLeapNode[] n, LeapNode[][] oldNode, boolean[] merge,\n\t\t\tboolean[] changed) {\n\t\t\n\t}",
"public List<Link> getLinks()\t{return Collections.unmodifiableList(allLinks);}",
"public void clearLinks(){\r\n varContextObject=null; \r\n varContextFields=null; \r\n }",
"public void cleanUpConnections()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tfor (int i = 0; i < this.electricityNetworks.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tthis.electricityNetworks.get(i).cleanUpArray();\r\n\r\n\t\t\t\tif (this.electricityNetworks.get(i).conductors.size() == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tthis.electricityNetworks.remove(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tFMLLog.severe(\"Failed to clean up wire connections!\");\r\n\t\t}\r\n\t}",
"public void sortCheckAndRemove(List oldlist, List newlist){\n \n List removenode = new ArrayList();\n List addnode = new ArrayList();\n \n for (int i=0;i < newlist.size() ; i++){\n if (!oldlist.contains((String) newlist.get(i))){\n addnode.add((String) newlist.get(i));\n }\n }\n \n for (int i=0;i < oldlist.size() ; i++){\n \n if (!newlist.contains((String)oldlist.get(i))){\n removenode.add((String)oldlist.get(i));\n }\n }\n for (int k=0; k < removenode.size() ; k++){\n //System.out.println(toremove[k]);\n System.out.println(\"Deleting \"+(String) removenode.get(k));\n removeMaster((String) removenode.get(k));\n }\n \n for (int k=0; k < addnode.size() ; k++){\n //System.out.println(toadd[k]);\n System.out.println(\"adding slave \"+(String)addnode.get(k));\n addMaster((String)addnode.get(k),getQueue());\n }\n \n try {\n FileUtils.copyFile(new File(\"/tmp/newmaster\"), new File(\"/tmp/oldmaster\"));\n } catch (IOException ex) {\n System.out.println(\"Could not copy file\");\n }\n }",
"public ArrayList<Node> getLuasNodes(ArrayList<Node> initialList, LatLng startLocation, LatLng EndLocation){\n ArrayList<Node> luasStopList = nodeMinimisation.findMatchingLuasStops(initialList,startLocation,EndLocation);\n for(Node bus : luasStopList){\n System.out.println(\"stop is: \"+bus.getStopId());\n }\n return luasStopList;\n }",
"public void remove() {\r\n\t\theadNode.link = headNode.link.link;\r\n\t\tsize--;\r\n\t}",
"private Set<String> excludeLoopback(Set<String> localAddr) {\n Set<String> newAddr = new HashSet<>();\n for (String addr : localAddr) {\n if (!Constants.localAddressList.contains(addr.toLowerCase())) {\n newAddr.add(addr);\n }\n }\n return newAddr;\n }",
"public void filter11Relations() {\n this.relations.removeIf(relationship -> !relationship.isOneToOne());\n }",
"private void trimX() {\n\t\tint indexIntoBranches = 0;\n\t\tfor (int i = 0; i < this.branches.size(); i++) {\n\t\t\tif (this.branches.get(i).size() == this.numXVertices) {\n\t\t\t\tindexIntoBranches = i;\n\t\t\t}\n\t\t}\n\n\t\tthis.allX = (ArrayList) this.branches.get(indexIntoBranches).clone(); // We need this for a set difference above\n\n\t\tfor (int k = 0; k < this.branches.get(indexIntoBranches).size(); k++) {\n\t\t\tfor (int j = 0; j < this.branches.get(indexIntoBranches).size(); j++) {\n\t\t\t\t// Ignore if the index is the same - otherwise remove the edges\n\t\t\t\tif (!(k == j)) {\n\t\t\t\t\tthis.branches.get(indexIntoBranches).get(k)\n\t\t\t\t\t\t\t.removeNeighbor(this.branches.get(indexIntoBranches).get(j));\n\t\t\t\t\tthis.branches.get(indexIntoBranches).get(j)\n\t\t\t\t\t\t\t.removeNeighbor(this.branches.get(indexIntoBranches).get(k));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static void main(String[] args) {\n LinkRemoveDuplicates2 ll=new LinkRemoveDuplicates2();\r\n\r\n ll.insertFirst(40);\r\n\r\n ll.insertFirst(30);\r\n \r\n ll.insertFirst(20);\r\n ll.insertFirst(20);\r\n ll.insertFirst(10);\r\n ll.insertFirst(10);\r\n System.out.println(\"Initial List->\");\r\n ll.printList();\r\n ll.head=ll.remove(ll.head);\r\n System.out.println(\"\\n\\nAfter removing duplicates->\");\r\n ll.printList();\r\n\t}",
"public static void modifyTopology()\r\n\t{\r\n\t\tSystem.out.println(\"===============STARTING TO MODIFY TOPOLOGY==============\");\r\n\t\tscan = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Please enter Router that you want to Shutdown : \"); // Printing Instruction\r\n\t\t\r\n\t\tint delr = Integer.parseInt(scan.nextLine()); // Reading the router to be deleted\r\n\t\twhile (delr < 1 || delr > routers) {\r\n\t\t\tSystem.out.print(\"\\n The entered source router not present, Please enter Again : \");\r\n\t\t\tdelr = Integer.parseInt(scan.nextLine());\r\n\t\t}\r\n\t\tdelr = delr - 1;\r\n\t\t\r\n\t\tint[][] graph2 = new int[routers-1][routers-1];\r\n\t\tint p = 0;\r\n\t\tfor (int i = 0; i < routers; ++i) { // Loop for deleting router and shifting graphay\r\n\r\n\t\t\tif (i == delr)\r\n\t\t\t\tcontinue;\r\n\t\t\tint q = 0;\r\n\t\t\tfor (int j = 0; j < routers; ++j) // Control loop for shifting\r\n\t\t\t{\r\n\t\t\t\tif (j == delr)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t\r\n\t\t\t\tgraph2[p][q] = graph[i][j]; // shifting row and column\r\n\t\t\t\t++q;\r\n\t\t\t}\r\n\t\t\t++p;\r\n\t\t}\r\n\t\t\r\n\t\trouters -= 1;\r\n\t\t\r\n\t\tSystem.out.println(\"============NEW TOPLOGY============\");\r\n\t\tfor (int row = 0; row < routers; row++) {\r\n\t\t\tfor (int col = 0; col < routers; col++) {\r\n\t\t\t\tLinkstateRouting.graph[row][col] = graph2[row][col];\r\n\t\t\t\tSystem.out.print(graph[row][col] + \"\\t\"); // Printing the new topology again\t\t\t\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t }\r\n\t\tSystem.out.println(\"Router \" + (delr + 1) + \" is Shutdown\");\r\n\t}",
"public synchronized void prunePeers() {\n\t\tchecker.checkList(this.getPeers());\n\t}",
"public void ConvertMinimiz( ArrayList<Node>listConvert)\n {\n for ( int i=0; i<listConvert.size(); i++)\n {\n Boolean allConvert= true;\n Node n= listConvert.get(i);\n List<Node> neigbors= n.getNeighbors();\n for ( int j=0; j< neigbors.size(); j++)\n {\n Node neigbor = neigbors.get(j);\n if ( neigbor instanceof Ipv6 && (!((Ipv6) neigbor).getType().equals(\"Conv\")))\n {\n allConvert=false;\n }\n else if ( neigbor instanceof Ipv4 && (!((Ipv4) neigbor).getType().equals(\"Conv\")))\n {\n allConvert= false;\n }\n }\n\n if ( allConvert==true)\n {\n if ( n instanceof Ipv6)\n {\n ((Ipv6) n).setType(\"IPV6\");\n n.setIcon(\"./src/img/ipv6.png\");\n listConvert.remove(n);\n }\n else\n {\n ((Ipv4) n).setType(\"IPV4\");\n n.setIcon(\"./src/img/ipv4.png\");\n listConvert.remove(n);\n }\n }\n }\n }",
"public void removeDeviceServiceLink();",
"@Override\n\tpublic void clear()\n\t{\n\t\t/*\n\t\t * TODO This doesn't actually notify GraphChangeListeners, is that a\n\t\t * problem? - probably is ... thpr, 6/27/07\n\t\t */\n\t\tnodeEdgeMap.clear();\n\t\tnodeList.clear();\n\t\tedgeList.clear();\n\t}",
"private AssemblyResult cleanupSeqGraph(final SeqGraph seqGraph, final Haplotype refHaplotype) {\n if (debugGraphTransformations) {\n printDebugGraphTransform(seqGraph, refHaplotype.getLocation() + \"-sequenceGraph.\"+seqGraph.getKmerSize()+\".1.0.non_ref_removed.dot\");\n }\n // the very first thing we need to do is zip up the graph, or pruneGraph will be too aggressive\n seqGraph.zipLinearChains();\n if (debugGraphTransformations) {\n printDebugGraphTransform(seqGraph, refHaplotype.getLocation() + \"-sequenceGraph.\"+seqGraph.getKmerSize()+\".1.1.zipped.dot\");\n }\n\n // now go through and prune the graph, removing vertices no longer connected to the reference chain\n seqGraph.removeSingletonOrphanVertices();\n seqGraph.removeVerticesNotConnectedToRefRegardlessOfEdgeDirection();\n\n if (debugGraphTransformations) {\n printDebugGraphTransform(seqGraph, refHaplotype.getLocation() + \"-sequenceGraph.\"+seqGraph.getKmerSize()+\".1.2.pruned.dot\");\n }\n seqGraph.simplifyGraph();\n if (debugGraphTransformations) {\n printDebugGraphTransform(seqGraph, refHaplotype.getLocation() + \"-sequenceGraph.\"+seqGraph.getKmerSize()+\".1.3.merged.dot\");\n }\n\n // The graph has degenerated in some way, so the reference source and/or sink cannot be id'd. Can\n // happen in cases where for example the reference somehow manages to acquire a cycle, or\n // where the entire assembly collapses back into the reference sequence.\n if ( seqGraph.getReferenceSourceVertex() == null || seqGraph.getReferenceSinkVertex() == null ) {\n return new AssemblyResult(AssemblyResult.Status.JUST_ASSEMBLED_REFERENCE, seqGraph, null);\n }\n\n seqGraph.removePathsNotConnectedToRef();\n seqGraph.simplifyGraph();\n if ( seqGraph.vertexSet().size() == 1 ) {\n // we've perfectly assembled into a single reference haplotype, add a empty seq vertex to stop\n // the code from blowing up.\n // TODO -- ref properties should really be on the vertices, not the graph itself\n final SeqVertex complete = seqGraph.vertexSet().iterator().next();\n final SeqVertex dummy = new SeqVertex(\"\");\n seqGraph.addVertex(dummy);\n seqGraph.addEdge(complete, dummy, new BaseEdge(true, 0));\n }\n if (debugGraphTransformations) {\n printDebugGraphTransform(seqGraph, refHaplotype.getLocation() + \"-sequenceGraph.\"+seqGraph.getKmerSize()+\".1.4.final.dot\");\n }\n return new AssemblyResult(AssemblyResult.Status.ASSEMBLED_SOME_VARIATION, seqGraph, null);\n }"
]
| [
"0.6339175",
"0.60706234",
"0.56066865",
"0.5584677",
"0.5535781",
"0.55078614",
"0.55054295",
"0.54990506",
"0.54580605",
"0.54408413",
"0.5439286",
"0.53433216",
"0.5339406",
"0.53249997",
"0.53189844",
"0.52495986",
"0.5225137",
"0.51822203",
"0.5181129",
"0.5180425",
"0.5150538",
"0.51233333",
"0.51209927",
"0.5120933",
"0.5118906",
"0.5048264",
"0.5043111",
"0.5034567",
"0.50270706",
"0.49974433",
"0.49757254",
"0.49749324",
"0.49697202",
"0.49665946",
"0.4956263",
"0.4955802",
"0.49298504",
"0.49289814",
"0.49052873",
"0.49044937",
"0.4886734",
"0.48709482",
"0.48709077",
"0.48615634",
"0.48496392",
"0.4846905",
"0.48438388",
"0.4835146",
"0.48249635",
"0.48231122",
"0.48204955",
"0.48193985",
"0.4795243",
"0.47948217",
"0.4778669",
"0.47747704",
"0.47645208",
"0.47605273",
"0.4756646",
"0.47562575",
"0.47546446",
"0.47517118",
"0.47500354",
"0.4749131",
"0.47477368",
"0.47460753",
"0.47420266",
"0.47292653",
"0.47291175",
"0.4728128",
"0.47254783",
"0.47250578",
"0.4719044",
"0.4719044",
"0.4710455",
"0.47080037",
"0.4707329",
"0.4701265",
"0.46981788",
"0.46924675",
"0.46913117",
"0.46910918",
"0.468965",
"0.4683965",
"0.46802223",
"0.46778145",
"0.4674998",
"0.46625242",
"0.46583012",
"0.46550438",
"0.46542606",
"0.46454558",
"0.46445325",
"0.46431333",
"0.4641029",
"0.46345326",
"0.463281",
"0.4625679",
"0.4617173",
"0.4616336"
]
| 0.76067173 | 0 |
Make list of link for LogicalTopology from deviceName, and return it. | private Set<LogicalLink> getLogicalLink(Connection conn, String devName, boolean setPortNumber) throws SQLException {
final String fname = "getLogicalLink";
if (logger.isDebugEnabled()) {
logger.debug(String.format("%s(conn=%s, devName=%s, setPortNumber=%s) - start", fname, conn, devName, setPortNumber));
}
Set<LogicalLink> linkSet = new HashSet<LogicalLink>();
List<Map<String, Object>> patchDocList = dao.getLogicalLinksFromDeviceName(conn, devName);
if (patchDocList == null) {
return null;
}
/*check src->dst*/
for (Map<String, Object> patchDoc : patchDocList) {
String inDevName = (String)patchDoc.get("inDeviceName");
String inPortName = (String)patchDoc.get("inPortName");
PortData inPort = new PortData();
inPort.setDeviceName(inDevName);
inPort.setPortName(inPortName);
String outDevName = (String)patchDoc.get("outDeviceName");
String outPortName = (String)patchDoc.get("outPortName");
PortData outPort = new PortData();
outPort.setDeviceName(outDevName);
outPort.setPortName(outPortName);
List<PortData> ports = new ArrayList<PortData>();
ports.add(inPort);
ports.add(outPort);
LogicalLink link = new LogicalLink();
link.setLink(ports);
linkSet.add(link);
PortData inPort_2 = new PortData();
inPort_2.setDeviceName(outDevName);
inPort_2.setPortName(outPortName);
PortData outPort_2 = new PortData();
outPort_2.setDeviceName(inDevName);
outPort_2.setPortName(inPortName);
List<PortData> ports_2 = new ArrayList<PortData>();
ports_2.add(inPort_2);
ports_2.add(outPort_2);
LogicalLink link_2 = new LogicalLink();
link_2.setLink(ports_2);
linkSet.add(link_2);
}
if (linkSet.isEmpty()) {
return null;
}
if (!setPortNumber) {
return linkSet;
}
/* Set port number at port data in logical link */
for (LogicalLink link : linkSet) {
for (PortData port : link.getLink()) {
Map<String, Object> portMap = dao.getPortInfoFromPortName(
conn,
port.getDeviceName(),
port.getPortName());
port.setPortNumber((Integer)portMap.get("number"));
}
}
if (logger.isDebugEnabled()) {
logger.debug(String.format("%s(ret=%s) - end", fname, linkSet));
}
return linkSet;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private OfpConDeviceInfo getLogicalNode(Connection conn, String devName) throws SQLException {\n\t\tfinal String fname = \"getLogicalNode\";\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(String.format(\"%s(conn=%s, devName=%s) - start\", fname, conn, devName));\n\t\t}\n\t\tMap<String, Object> devDoc = dao.getNodeInfoFromDeviceName(conn, devName);\n\t\tif (devDoc == null) {\n\t\t\treturn null;\n\t\t}\n\t\tOfpConDeviceInfo node = new OfpConDeviceInfo();\n\t\tnode.setDeviceName(devName);\n\t\tnode.setDeviceType((String)devDoc.get(\"type\"));\n\t\tnode.setLocation((String)devDoc.get(\"location\"));\n\t\tnode.setTenant((String)devDoc.get(\"tenant\"));\n\n\t\tList<OfpConPortInfo> portList = new ArrayList<OfpConPortInfo>();\n\t\tList<Map<String, Object>> linkDocList = dao.getCableLinksFromDeviceName(conn, devName);\n\t\tif (linkDocList == null) {\n\t\t\treturn null;\n\t\t}\n\t\tfor (Map<String, Object> linkDoc : linkDocList) {\n\t\t\tString outDevName = (String)linkDoc.get(\"outDeviceName\");\n\n\t\t\tPortData ofpPort = new PortData();\n\t\t\tString outPortName = (String)linkDoc.get(\"outPortName\");\n\t\t\tInteger outPortNmbr = (Integer)linkDoc.get(\"outPortNumber\");\n\t\t\tofpPort.setDeviceName(outDevName);\n\t\t\tofpPort.setPortName(outPortName);\n\t\t\tofpPort.setPortNumber(outPortNmbr);\n\n\t\t\tString inPortName = (String)linkDoc.get(\"inPortName\");\n\t\t\tInteger inPortNmbr = (Integer)linkDoc.get(\"inPortNumber\");\n\t\t\tOfpConPortInfo port = new OfpConPortInfo();\n\t\t\tport.setPortName(inPortName);\n\t\t\tport.setPortNumber(inPortNmbr);\n\t\t\tport.setOfpPortLink(ofpPort);\n\n\t\t\tportList.add(port);\n\t\t}\n\t\tnode.setPorts(portList);\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(String.format(\"%s(ret=%s) - end\", fname, node));\n\t\t}\n\t\treturn node;\n\t}",
"public void createLinkedStructure() {\n\t\t\n\t\tfor (ArrayList<String> s : stations.values())\n\t\t//Check every ArrayList of stations in the stations hashmap\n\t\t{\n\t\t\tArrayList<String> stationsInLine = s;\n\t\t\t// get the arraylist of stations value and put it into a new arraylist stationsInLine\n\t\t\tint i = 0;\n\t\t\twhile(i < stationsInLine.size())\n\t\t\t//loop through the list of stations 1 by 1\n\t\t\t{\n\t\t\t\tString currentStation = stationsInLine.get(i);\n\t\t\t\t//get current station at position i in the arraylist and assign it to String variable currentStation\n\n\t\t\t\tArrayList<String> links;\n\t\t\t\t//create empty arraylist links for storing relevant stations\n\n\t\t\t\tif (linkedStations.containsKey(currentStation))\n\t\t\t\t//if the linkedStations hashmap has the current station as the key\n\t\t\t\t{\n\t\t\t\t\tlinks = linkedStations.get(currentStation);\n\t\t\t\t\t//assign the current station to the links array list\n\t\t\t\t} else \n\t\t\t\t{\n\t\t\t\t\tlinks = new ArrayList<>();\n\t\t\t\t\t//if it is the very first link then create an new arraylist\n\t\t\t\t}\n\t\t\t\tif (i + 1 < stationsInLine.size()) {\n\t\t\t\t\tlinks.add(stationsInLine.get(i + 1));\n\t\t\t\t\t//if it is not the last station, add the next station to the current one\n\t\t\t\t}\n\t\t\t\tif (i > 0) {\n\t\t\t\t\tlinks.add(stationsInLine.get(i - 1));\n\t\t\t\t\t//if it is not the first item add the station previous to the one you are at - this will form a line of stations\n\t\t\t\t}\n\t\t\t\t//populate the HashMap with station as key and the relevant links arraylist created\n\t\t\t\tlinkedStations.put(currentStation, links);\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t}",
"List<ProductLink> links();",
"public ArrayList<FlowLink> makeHostSwitchLinkPair(ArrayList<Node> topoNodes, IDevice device, SwitchPort ap, Map<DatapathId, IOFSwitch> switchMap, \n\t\t\tHashMap<IOFSwitch, ArrayList<OFPortDesc>> switchPortMap){\n\t\t\n\t\tString deviceName = device.getMACAddressString();\n\t\t\t\t\n\t\tDatapathId switchId = ap.getSwitchDPID();\n\t\tString switchName = switchId.toString();\n\t\t\n\t\tIOFSwitch connectingSwitch = switchMap.get(switchId);\n\t\tArrayList<OFPortDesc> ports = switchPortMap.get(connectingSwitch);\n\t\t\n\t\tOFPort portOnSwitch = ap.getPort();\n\t\tint switchPortNum = portOnSwitch.getPortNumber();\n\t\t\n\t\tString hostSwitchLinkName = \"(\" + deviceName + \", \" + switchName + \")\";\n\t\tString switchHostLinkName = \"(\" + switchName + \", \" + deviceName + \")\";\n\t\t\n\n\t\tNode src = getNodeWithName(topoNodes, deviceName);\n\t\tNode dst = getNodeWithName(topoNodes, switchName);\n\t\t\n\t\tPort srcP = src.getPortByID(1);\n\t\tPort dstP = dst.getPortByID(switchPortNum);\n\t\t\n\t\tlong bandWidth = 0;\n\t\t\n\t\tfor(OFPortDesc portDesc : ports){\n\t\t\tif(portDesc.getPortNo().equals(portOnSwitch)){\n\t\t\t\tbandWidth = convertBandwidth(portDesc.getCurrSpeed());\n\t\t\t}\n\t\t}\n\t\t\n\t\tArrayList<FlowLink> hostSwitchLinks = new ArrayList<FlowLink>();\n\t\thostSwitchLinks.add(new FlowLink(hostSwitchLinkName, src, dst, srcP, dstP, bandWidth));\n\t\thostSwitchLinks.add(new FlowLink(switchHostLinkName, dst, src, dstP, srcP, bandWidth));\n\t\t\n\t\treturn hostSwitchLinks;\n\t}",
"public Topology convertTopology(FloodlightTopology floodlightTopology)\n\t{\n\t\tArrayList<IDevice> devices = floodlightTopology.getDevices();\n\t\tArrayList<Link> links = floodlightTopology.getLinks();\n\t\tMap<DatapathId, IOFSwitch> switchMap = floodlightTopology.getSwitchMap();\n\t\tHashMap<IOFSwitch, ArrayList<OFPortDesc>> switchPortMap = floodlightTopology.getSwitchPortMap();\n\n\t\tArrayList<Node> topoNodes = new ArrayList<Node>();\n\t\tArrayList<FlowLink> topoLinks = new ArrayList<FlowLink>();\n\t\t//Create Switch Nodes\n\t\tfor(DatapathId dpID : switchMap.keySet()){\n\t\t\tString name = dpID.toString();\n\t\t\tint numPorts = switchPortMap.get(switchMap.get(dpID)).size();\n\t\t\ttopoNodes.add(new Switch(name, numPorts));\n\t\t}\n\t\t//Create Host Nodes\n\t\t//Create (Host, Switch) Links\n\t\tfor(IDevice device : devices){\n\t\t\tString name = device.getMACAddressString();\n\t\t\tSwitchPort[] attachmentPoints = device.getAttachmentPoints();\n\t\t\tfor (SwitchPort ap : attachmentPoints){\n\t\t\t\tif(ap.getPort().getPortNumber() > 0){\n\t\t\t\t\tHost newHost = new Host(name, 1);\n\t\t\t\t\ttopoNodes.add(newHost);\n\t\t\t\t\tArrayList<FlowLink> hostSwitchLinks = makeHostSwitchLinkPair(topoNodes, device, ap, switchMap, switchPortMap);\n\t\t\t\t\ttopoLinks.add(hostSwitchLinks.get(0));\n\t\t\t\t\ttopoLinks.add(hostSwitchLinks.get(1));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Create (Switch, Switch) Links\n\t\tfor(Link link : links){\n\t\t\tFlowLink switchSwitchLink = makeSwitchSwitchLink(topoNodes, link, switchMap, switchPortMap);\n\t\t\ttopoLinks.add(switchSwitchLink);\n\t\t}\n\t\t\n\t\treturn new Topology(topoNodes, topoLinks);\n\t}",
"private void createLinks(int numDevices) {\n List<Link> links = new ArrayList<>();\n\n for (int i = 1; i <= numDevices; i++) {\n ConnectPoint src = new ConnectPoint(\n getDeviceId(i),\n PortNumber.portNumber(2));\n ConnectPoint dst = new ConnectPoint(\n getDeviceId((i + 1 > numDevices) ? 1 : i + 1),\n PortNumber.portNumber(3));\n\n Link link = createMock(Link.class);\n expect(link.src()).andReturn(src).anyTimes();\n expect(link.dst()).andReturn(dst).anyTimes();\n replay(link);\n\n links.add(link);\n }\n\n expect(linkService.getLinks()).andReturn(links).anyTimes();\n replay(linkService);\n }",
"public List<Device> getListDevice() {\n\n\t\tList<Device> listDevice = new ArrayList<Device>();\n\n\t\tDevice device = new Device();\n\n\t\tdevice.setName(\"DeviceNorgren\");\n\t\tdevice.setManufacturer(\"Norgren\");\n\t\tdevice.setVersion(\"5.7.3\");\n\t\tdevice.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\n\t\tSensor sensorTemperature = new Sensor();\n\t\tsensorTemperature.setName(\"SensorSiemens\");\n\t\tsensorTemperature.setManufacturer(\"Siemens\");\n\t\tsensorTemperature.setVersion(\"1.2.2\");\n\t\tsensorTemperature.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\t\tsensorTemperature.setMonitor(\"Temperature\");\n\n\t\tSensor sensorPressure = new Sensor();\n\t\tsensorPressure.setName(\"SensorOmron\");\n\t\tsensorPressure.setManufacturer(\"Omron\");\n\t\tsensorPressure.setVersion(\"0.5.2\");\n\t\tsensorPressure.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\t\tsensorPressure.setMonitor(\"Pressure\");\n\n\t\tdevice.getListSensor().add(sensorTemperature);\n\t\tdevice.getListSensor().add(sensorPressure);\n\n\t\tActuator actuadorKey = new Actuator();\n\n\t\tactuadorKey.setName(\"SensorAutonics\");\n\t\tactuadorKey.setManufacturer(\"Autonics\");\n\t\tactuadorKey.setVersion(\"3.1\");\n\t\tactuadorKey.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\t\tactuadorKey.setAction(\"On-Off\");\n\n\t\tdevice.getListActuator().add(actuadorKey);\n\n\t\tlistDevice.add(device);\n\n\t\treturn listDevice;\n\n\t}",
"java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Device> \n getDevicesList();",
"private void createTopology() {\n deviceService = createMock(DeviceService.class);\n linkService = createMock(LinkService.class);\n\n deviceService.addListener(anyObject(DeviceListener.class));\n linkService.addListener(anyObject(LinkListener.class));\n\n createDevices(NUM_DEVICES, NUM_PORTS_PER_DEVICE);\n createLinks(NUM_DEVICES);\n addIntfConfig();\n popluateEdgePortService();\n }",
"public Collection<String> listDevices();",
"public interface Topology {\r\n\r\n /**\r\n * Returns list of links\r\n * @return list of links\r\n */\r\n List<Link> getLinks();\r\n \r\n /**\r\n * Returns list of nodes\r\n * @return list of nodes\r\n */\r\n List<Node> getNodes();\r\n \r\n /**\r\n * Returns list od domains\r\n * @return list of domains\r\n */\r\n List<AdminDomain> getDomains();\r\n \r\n /**\r\n * Inserts link in the topology\r\n * @param link link to insert\r\n * @return if insertion of link was successful returns true, otherwise false \r\n */\r\n boolean insertLink(Link link);\r\n \r\n /**\r\n * Removes link from topology\r\n * @param link link to delete\r\n * @return if deletion of link was successful returns true, otherwise false\r\n */\r\n boolean removeLink(Link link);\r\n \r\n}",
"public void link_rooms() {\n numberGen = new Random();\n int index = numberGen.nextInt(roomList.size());\n int direction = numberGen.nextInt(2);\n Room linkRoom = roomList.get(index);\n\n for(Room destRoom: roomList) {\n draw_link(linkRoom.getPosition(), destRoom, direction);\n }\n }",
"public void configureDeviceListView(){\n deviceListView = findViewById(R.id.device_listView);\n combinedDeviceList = new ArrayList<>();\n deviceListAdapter = new DeviceListAdapter(this, combinedDeviceList);\n deviceListView.setAdapter(deviceListAdapter);\n }",
"List<DeviceDetails> getDevices();",
"public List<NetworkNode> listNetworkNode();",
"@Override\n public ListWirelessDevicesResult listWirelessDevices(ListWirelessDevicesRequest request) {\n request = beforeClientExecution(request);\n return executeListWirelessDevices(request);\n }",
"private List<RouteInfo> createList() {\r\n\r\n List<RouteInfo> results = new ArrayList<>();\r\n\r\n for (String temp [] : stops) {\r\n\r\n RouteInfo info = new RouteInfo();\r\n info.setTitle(temp[0]);\r\n info.setRouteName(\"Stop ID: \" + temp[1]);\r\n info.setRouteDescription(\"Next bus at: \");\r\n results.add(info);\r\n }\r\n\r\n return results;\r\n }",
"private void addLinkesToGraph()\n\t{\n\t\tString from,to;\n\t\tshort sourcePort,destPort;\n\t\tMap<Long, Set<Link>> mapswitch= linkDiscover.getSwitchLinks();\n\n\t\tfor(Long switchId:mapswitch.keySet())\n\t\t{\n\t\t\tfor(Link l: mapswitch.get(switchId))\n\t\t\t{\n\t\t\t\tfrom = Long.toString(l.getSrc());\n\t\t\t\tto = Long.toString(l.getDst());\n\t\t\t\tsourcePort = l.getSrcPort();\n\t\t\t\tdestPort = l.getDstPort();\n\t\t\t\tm_graph.addEdge(from, to, Capacity ,sourcePort,destPort);\n\t\t\t} \n\t\t}\n\t\tSystem.out.println(m_graph);\n\t}",
"List <Connector.Type> getConnectors();",
"List<VlanId> getXconnectVlans(DeviceId deviceId, PortNumber port);",
"public List<Device> getRunningDevices();",
"public ArrayList<String> getNodeRouteList(String code);",
"public static void main(String[] args) {\n// LinkedList\n String leWord = \"meow\";\n char[] arrChar = leWord.toCharArray();\n LinkedList newLinkList = new LinkedList(arrChar);\n\n\n\n\n//\n\n\n }",
"NamedLinkDescriptor createNamedLinkDescriptor();",
"public List<String> getRouteList();",
"public MonitorListCommand mapListCommand(String dottedName)\n throws MalformedNameException {\n ParsedDottedName result = parseDottedName(dottedName, CLI_COMMAND_LIST);\n MonitorListCommand command;\n if (result.monitoredObjectType != null) {\n command = new MonitorListCommand(result.objectName,\n result.monitoredObjectType);\n } else {\n command = new MonitorListCommand(result.objectName);\n }\n return command;\n }",
"private void connectDevices() {\n Set<DeviceId> deviceSubjects =\n cfgRegistry.getSubjects(DeviceId.class, Tl1DeviceConfig.class);\n deviceSubjects.forEach(deviceId -> {\n Tl1DeviceConfig config =\n cfgRegistry.getConfig(deviceId, Tl1DeviceConfig.class);\n connectDevice(new DefaultTl1Device(config.ip(), config.port(), config.username(),\n config.password()));\n });\n }",
"public ArrayList<IDevice> setHostData(ArrayList<Long> swList, boolean socketConnection)\n\t{\n\t\tIterator<? extends IDevice> deviceIt = deviceService.getAllDevices().iterator();\n\t\t\n\t\t//get host data form deviceService\n\t\twhile(deviceIt.hasNext())\n\t\t{\n\t\t\tIDevice device = deviceIt.next();\n\t\t\tdeviceList.add(device);\n\t\t}\n\t\t\n\t\thostData = new NormalDataFormat(EnviProtocol.NODEADD); \n\t\t\n\t\t\n\t\tHashMap<Long, ArrayList<Short>> interDomainPort = new HashMap<Long, ArrayList<Short>>();\n\t\tif(!InterDomainManagement.interDomainLinkMap.isEmpty())\n\t\t{\n\t\t\tfor(Link interDomainlink : InterDomainManagement.interDomainLinkMap.keySet())\n\t\t\t{\n\t\t\t\tArrayList<Short> portList = interDomainPort.get(interDomainlink.getSrc());\n\t\t\t\tif( portList == null )\n\t\t\t\t{\n\t\t\t\t\tportList = new ArrayList<Short>();\n\t\t\t\t\tportList.add(interDomainlink.getSrcPort());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tportList.add(interDomainlink.getSrcPort());\t\n\t\t\t\tinterDomainPort.put(interDomainlink.getSrc(), portList);\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\tboolean match = false;\n\t\tfor(IDevice idev : deviceList)\n\t\t{\t\t\n\t\t\tSwitchPort[] switchPorts = idev.getAttachmentPoints();\n\t\t\tfor(long sw : swList)\n\t\t\t{\n\t\t\t\tif(switchPorts[0].getSwitchDPID() == sw)\n\t\t\t\t{\n\t\t\t\t\tmatch = true;\n\t\t\t\t\tArrayList<Short> interDomainPortList = interDomainPort.get(sw);\n\t\t\t\t\tif( interDomainPortList!= null )\n\t\t\t\t\t{\n\t\t\t\t\t\tfor(short port : interDomainPortList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(port != switchPorts[0].getPort())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tInteger [] IPList = idev.getIPv4Addresses();\n\t\t\t\t\t\t\t\tif(IPList.length == 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tString ip = \"CannotGetIp\";\n\t\t\t\t\t\t\t\t\thostData.addNodeData(EnviProtocol.HOST, idev.getMACAddress(), ip.length(), ip);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tString ip = IPv4.fromIPv4Address(IPList[0].intValue());\n\t\t\t\t\t\t\t\t\thostData.addNodeData(EnviProtocol.HOST, idev.getMACAddress(), ip.length(), ip);\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tInteger [] IPList = idev.getIPv4Addresses();\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(IPList.length == 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tString ip = \"CannotGetIp\";\n\t\t\t\t\t\t\thostData.addNodeData(EnviProtocol.HOST, idev.getMACAddress(), ip.length(), ip);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tString ip = IPv4.fromIPv4Address(IPList[0].intValue());\n\t\t\t\t\t\t\thostData.addNodeData(EnviProtocol.HOST, idev.getMACAddress(), ip.length(), ip);\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}\t\t\t\t\t\t\t\t\n\t\t}\n\t\t\n\t\tif(socketConnection)\n\t\t{\n\t\t\tsendMessage(hostData);\n\t\t}\n\t\t\t\t\n\t\treturn deviceList;\n\t}",
"private List<routerNode> getPathVertexList(routerNode beginNode, routerNode endNode) {\r\n\t\tTransformer<routerLink, Integer> wtTransformer; // transformer for getting edge weight\r\n\t\twtTransformer = new Transformer<routerLink, Integer>() {\r\n public Integer transform(routerLink link) {\r\n return link.getWeight();\r\n \t}\r\n };\t\t\r\n\r\n\t\t\r\n\t\tList<routerNode> vlist;\r\n\t\tDijkstraShortestPath<routerNode, routerLink> DSPath = \r\n\t \t new DijkstraShortestPath<routerNode, routerLink>(gGraph, wtTransformer);\r\n \t// get the shortest path in the form of edge list \r\n List<routerLink> elist = DSPath.getPath(beginNode, endNode);\r\n\t\t\r\n \t\t// get the node list form the shortest path\r\n\t Iterator<routerLink> ebIter = elist.iterator();\r\n\t vlist = new ArrayList<routerNode>(elist.size() + 1);\r\n \tvlist.add(0, beginNode);\r\n\t for(int i=0; i<elist.size(); i++){\r\n\t\t routerLink aLink = ebIter.next();\r\n\t \t \t// get the nodes corresponding to the edge\r\n \t\tPair<routerNode> endpoints = gGraph.getEndpoints(aLink);\r\n\t routerNode V1 = endpoints.getFirst();\r\n\t routerNode V2 = endpoints.getSecond();\r\n\t \tif(vlist.get(i) == V1)\r\n\t \t vlist.add(i+1, V2);\r\n\t else\r\n\t \tvlist.add(i+1, V1);\r\n\t }\r\n\t return vlist;\r\n\t}",
"java.util.List<org.chromium.components.paint_preview.common.proto.PaintPreview.LinkDataProto> \n getLinksList();",
"public List<Topic> getLinks() {\n\t\tList<Topic> topics = new ArrayList<Topic>();\n\t\tTopic tp = null;\n\t\tString sqlSearch = \"select lid,label,url from \" + Constant.schema\n\t\t\t\t+ \".link\";\n\n\t\t// Define Connection, statement and resultSet\n\t\tConnection conn = null;\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet result = null;\n\t\ttry {\n\t\t\tconn = DBConUtil.getConn();\n\t\t\tpstmt = conn.prepareStatement(sqlSearch);\n\t\t\tconn.setAutoCommit(true);\n\t\t\tresult = DBConUtil.query(conn, pstmt);\n\n\t\t\tif (result != null) {\n\t\t\t\twhile (result.next()) {\n\t\t\t\t\ttp = new Topic();\n\t\t\t\t\ttp.setTopicID(result.getInt(\"lid\"));\n\t\t\t\t\ttp.setLabel(result.getString(\"label\"));\n\t\t\t\t\ttp.setUrl(result.getString(\"url\"));\n\t\t\t\t\ttopics.add(tp);\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t} finally {\n\t\t\tDBConUtil.close(conn, pstmt, result);\n\t\t}\n\t\treturn topics;\n\t}",
"public List<String> getLinks();",
"public List getTargetConnections() {\n return new ArrayList(targetConnections);\n }",
"public DSALinkedList getAdjacent()\n\t\t{\n\t\t\treturn links;\n\t\t}",
"private void normalizeLogicalNode(Connection conn, Collection<OfpConDeviceInfo> nodes) throws SQLException {\n\t\tfinal String fname = \"normalizeLogicalNode\";\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(String.format(\"%s(conn=%s, nodes=%s) - start\", fname, conn, nodes));\n\t\t}\n\t\tMap<String, Boolean> devTypeMap = new HashMap<String, Boolean>();\n\t\tList<OfpConDeviceInfo> removalNodeList = new ArrayList<OfpConDeviceInfo>();\n\t\tfor (OfpConDeviceInfo node : nodes) {\n\t\t\tString devType = node.getDeviceType();\n\t\t\tif (!devType.equals(NODE_TYPE_SERVER) && !devType.equals(NODE_TYPE_SWITCH) && !devType.equals(NODE_TYPE_EX_SWITCH)) {\n\t\t\t\tremovalNodeList.add(node);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tList<OfpConPortInfo> ports = node.getPorts();\n\t\t\tList<OfpConPortInfo> removalPortList = new ArrayList<OfpConPortInfo>();\n\t\t\tfor (OfpConPortInfo port : ports) {\n\t\t\t\tString neiDevName = port.getOfpPortLink().getDeviceName();\n\t\t\t\t/* check outDevice is LEAF, other wise don't append port */\n\t\t\t\tBoolean isOfpSw = devTypeMap.get(neiDevName);\n\t\t\t\tif (isOfpSw == null) {\n\t\t\t\t\tMap<String, Object> outDevDoc = dao.getNodeInfoFromDeviceName(conn, neiDevName);\n\t\t\t\t\tString outDevType = (String)outDevDoc.get(\"type\");\n\t\t\t\t\tisOfpSw = OFPMUtils.isNodeTypeOfpSwitch(outDevType);\n\t\t\t\t\tdevTypeMap.put(neiDevName, isOfpSw);\n\t\t\t\t}\n\t\t\t\tif (!isOfpSw) {\n\t\t\t\t\tremovalPortList.add(port);\n\t\t\t\t}\n\t\t\t}\n\t\t\tports.removeAll(removalPortList);\n\n\t\t\t/* if node don't has port that connect to leaf-switch, node remove from nodeList */\n\t\t\tif (ports.isEmpty()) {\n\t\t\t\tremovalNodeList.add(node);\n\t\t\t}\n\t\t}\n\t\tnodes.removeAll(removalNodeList);\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(String.format(\"%s() - end\", fname));\n\t\t}\n\t}",
"public List<ProductModel> getAllDevices() {\n\t\tSystem.out.println(\"\\nNetworkDevServ-getAllDev()\");\r\n\t\treturn deviceData.getAllDevices();\r\n\t}",
"public void openAddSmartDeviceList() {\n getNavigator().openAddSmartDeviceList();\n }",
"public ArrayList<Link> getLinksFromConf(Configuration configuration) {\n\n ArrayList<Link> links = new ArrayList<>();\n ArrayList<Screen> screens = this.getScreensFromConf(configuration);\n\n for(Screen s : screens)\n links.addAll(s.getLinks());\n\n return links;\n\n }",
"Link getL();",
"public FlowLink makeSwitchSwitchLink(ArrayList<Node> topoNodes,Link link, Map<DatapathId, IOFSwitch> switchMap, HashMap<IOFSwitch, ArrayList<OFPortDesc>> switchPortMap){\n\t\tDatapathId srcId = link.getSrc();\n\t\tDatapathId dstId = link.getDst();\n\t\t\n\t\tIOFSwitch srcSwitch = switchMap.get(srcId);\n\t\tIOFSwitch dstSwitch = switchMap.get(dstId);\n\t\t\n\t\tOFPort srcPort = link.getSrcPort();\n\t\tOFPort dstPort = link.getDstPort();\n\t\t\n\t\tint srcPortNum = srcPort.getPortNumber();\n\t\tint dstPortNum = dstPort.getPortNumber();\n\t\tArrayList<OFPortDesc> srcPorts = switchPortMap.get(srcSwitch);\n\t\tArrayList<OFPortDesc> dstPorts = switchPortMap.get(dstSwitch);\n\t\t\n\t\tString linkName = \"(\" + srcId.toString() + \", \" + dstId.toString() + \")\";\n\t\tNode src = getNodeWithName(topoNodes, srcId.toString());\n\t\tNode dst = getNodeWithName(topoNodes, dstId.toString());\n\t\tPort srcP = src.getPortByID(srcPortNum);\n\t\tPort dstP = dst.getPortByID(dstPortNum);\n\t\t\n\t\tlong bandWidth = 0;\n\t\tfor(OFPortDesc portDesc : srcPorts){\n\t\t\tif(portDesc.getPortNo().equals(srcPort)){\n\t\t\t\tbandWidth = convertBandwidth(portDesc.getCurrSpeed());\n\t\t\t}\n\t\t}\n\t\treturn new FlowLink(linkName, src, dst, srcP, dstP, bandWidth);\n\t}",
"private void setDeviceListAdapter(ArrayList<DeviceEntity> deviceListResponse) {\n\n mControlDeviceRecyclerView.setLayoutManager(new LinearLayoutManager(this));\n mControlDeviceRecyclerView.setNestedScrollingEnabled(false);\n mControlDeviceRecyclerView.setAdapter(new DeviceAdapter(deviceListResponse, this));\n\n }",
"public List getDevices() {\n return devices;\n }",
"public List fetch(String logicalName) throws AdaptorException {\n return fetchByNonLocationConstraint( getAnalysisIDCondition(logicalName) );\n }",
"List<IConnector> getConnectors();",
"public List<Link> getTargetConnections() {\n\t\treturn inputLinks;\n\t}",
"String targetServiceTopologyId();",
"private boolean linkMappingAggSeparate(VirtualLink vLink, SubstrateSwitch edgeSwitch1, SubstrateSwitch edgeSwitch2, \n\t\t\tLinkedList<SubstrateSwitch> listAggConnectStartEdge, Topology topo) {\n\t\tboolean success = false;\n\t\tboolean checkAgg = false;\n\t\tboolean checkEdge = false;\n\t\tdouble bandwidth = vLink.getBandwidthRequest();\n\t\t\n\t\tLinkedList<LinkPhyEdge> listPhyEdge = topo.getListLinkPhyEdge();\n\t\tLinkedList<SubstrateLink> listLinkBandwidth = topo.getLinkBandwidth();\n\t\t\n\t\tPhysicalServer phy1 = vLink.getsService().getBelongToServer();\n\t\tPhysicalServer phy2 = vLink.getdService().getBelongToServer();\n\t\t\n\t\tSubstrateLink linkAggEdge01 = new SubstrateLink();\n\t\tSubstrateLink linkAggEdge10 = new SubstrateLink();\n\t\tSubstrateLink linkAggEdge02 = new SubstrateLink();\n\t\tSubstrateLink linkAggEdge20 = new SubstrateLink();\n\t\t\n\t\tLinkPhyEdge linkPhyEdge1 = new LinkPhyEdge();\n\t\tLinkPhyEdge linkPhyEdge2 = new LinkPhyEdge();\n\t\t\n\t\tSubstrateSwitch aggSW = new SubstrateSwitch();\n\t\t\n\t\t\n\t\tfor(SubstrateSwitch sw : listAggConnectStartEdge) {\n\t\t\tint count = 0;\n\t\t\tfor(SubstrateLink link : listLinkBandwidth) {\n\t\t\t\tif(link.getStartSwitch().equals(sw) && link.getEndSwitch().equals(edgeSwitch1) && link.getBandwidth() >= bandwidth) {\n\t\t\t\t\tcount++;\n\t\t\t\t\tlinkAggEdge01 = link;\n\t\t\t\t} else if(link.getStartSwitch().equals(edgeSwitch1) && link.getEndSwitch().equals(sw) && link.getBandwidth() >= bandwidth) {\n\t\t\t\t\tcount++;\n\t\t\t\t\tlinkAggEdge10 = link;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(link.getStartSwitch().equals(sw) && link.getEndSwitch().equals(edgeSwitch2) && link.getBandwidth() >= bandwidth) {\n\t\t\t\t\tcount++;\n\t\t\t\t\tlinkAggEdge02 = link;\n\t\t\t\t} else if(link.getStartSwitch().equals(edgeSwitch2) && link.getEndSwitch().equals(sw) && link.getBandwidth() >= bandwidth) {\n\t\t\t\t\tcount++;\n\t\t\t\t\tlinkAggEdge20 = link;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(count == 4) {\n\t\t\t\t\taggSW = sw;\n\t\t\t\t\tcheckAgg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint count = 0;\n\t\tfor(LinkPhyEdge link : listPhyEdge) {\n\t\t\tif(link.getEdgeSwitch().equals(edgeSwitch1) && link.getPhysicalServer().equals(phy1) && link.getBandwidth() >= bandwidth) {\n\t\t\t\tlinkPhyEdge1 = link;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\t\n\t\t\tif(link.getEdgeSwitch().equals(edgeSwitch2) && link.getPhysicalServer().equals(phy2) && link.getBandwidth() >= bandwidth) {\n\t\t\t\tlinkPhyEdge2 = link;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\t\n\t\t\tif(count == 2) {\n\t\t\t\tcheckEdge = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(checkAgg == true && checkEdge == true) {\n\t\t\t\n\t\t\tsuccess = true;\n\t\t\t\n\t\t\tLinkedList<SubstrateSwitch> listSWUsed = topo.getListSwitchUsed();\n\t\t\tboolean checkContain = false;\n\t\t\tfor(SubstrateSwitch sw : listSWUsed) {\n\t\t\t\tif(sw.getNameSubstrateSwitch().equals(aggSW.getNameSubstrateSwitch())) {\n\t\t\t\t\tcheckContain = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(checkContain == false) {\n\t\t\t\tlistSWUsed.add(aggSW);\n\t\t\t\ttopo.setListSwitchUsed(listSWUsed);\n\t\t\t}\n\t\t\t\n\t\t\tlinkAggEdge01.setBandwidth(linkAggEdge01.getBandwidth() - bandwidth);\n\t\t\tlinkAggEdge01.getStartSwitch().setPort(linkAggEdge01.getEndSwitch(), bandwidth);\n\t\t\tlinkAggEdge10.setBandwidth(linkAggEdge10.getBandwidth() - bandwidth);\n\t\t\tlinkAggEdge10.getStartSwitch().setPort(linkAggEdge10.getEndSwitch(), bandwidth);\n\t\t\tlinkAggEdge02.setBandwidth(linkAggEdge02.getBandwidth() - bandwidth);\n\t\t\tlinkAggEdge02.getStartSwitch().setPort(linkAggEdge02.getEndSwitch(), bandwidth);\n\t\t\tlinkAggEdge20.setBandwidth(linkAggEdge20.getBandwidth() - bandwidth);\n\t\t\tlinkAggEdge20.getStartSwitch().setPort(linkAggEdge20.getEndSwitch(), bandwidth);\n\t\t\tvLink.getLinkSubstrate().add(linkAggEdge01);\n\t\t\tvLink.getLinkSubstrate().add(linkAggEdge10);\n\t\t\tvLink.getLinkSubstrate().add(linkAggEdge02);\n\t\t\tvLink.getLinkSubstrate().add(linkAggEdge20);\n\t\t\t\n\t\t\tlinkPhyEdge1.setBandwidth(linkPhyEdge1.getBandwidth() - bandwidth);\n\t\t\tlinkPhyEdge1.getEdgeSwitch().setPort(linkPhyEdge1.getEdgeSwitch(), bandwidth);\n\t\t\tlinkPhyEdge2.setBandwidth(linkPhyEdge2.getBandwidth() - bandwidth);\n\t\t\tlinkPhyEdge2.getEdgeSwitch().setPort(linkPhyEdge2.getEdgeSwitch(), bandwidth);\t\t\t\n\t\t\tvLink.getLinkPhyEdge().add(linkPhyEdge1);\n\t\t\tvLink.getLinkPhyEdge().add(linkPhyEdge2);\n\t\t\t\n\t\t} else {\n\t\t\tsuccess = false;\n\t\t}\n\t\t\n\t\treturn success;\n\t}",
"LinkLayer getLinkLayer();",
"private LinkedList<Wind> listSensorWind(){\r\n LinkedList<Wind> aux=new LinkedList<>();\r\n for (Sensor doo:sensors){\r\n if(doo instanceof Wind)\r\n aux.add((Wind)doo);\r\n }\r\n return aux;\r\n }",
"public abstract List<NADevice> getDevices(Context context);",
"private boolean linkMappingCoreSeparate( VirtualLink vLink, SubstrateSwitch edgeSwitch1,\n\t\t\tSubstrateSwitch edgeSwitch2, Topology topo) {\n\t\tMap<SubstrateSwitch, LinkedList<SubstrateSwitch>> listAggConnectEdge = topo.getListAggConnectEdge();\n\t\tMap<SubstrateSwitch, LinkedList<SubstrateSwitch>> listCoreConnectAggMap = topo.getListCoreConnectAgg();\t\n\t\tLinkedList<LinkPhyEdge> listPhyEdge = topo.getListLinkPhyEdge();\n\t\tLinkedList<SubstrateLink> listLinkBandwidth = topo.getLinkBandwidth();\n\t\tLinkedList<SubstrateSwitch> listAggSort1 = new LinkedList<>();\n\t\tLinkedList<SubstrateSwitch> listAggSort2 = new LinkedList<>();\n\t\tLinkedList<SubstrateSwitch> listCoreSort1 = new LinkedList<>();\n\t\tLinkedList<SubstrateSwitch> listCoreSort2 = new LinkedList<>();\n\t\t\n\t\tService sService = vLink.getsService();\n\t\tService dService = vLink.getdService();\n\t\t\n\t\tdouble bandwidthDemand = vLink.getBandwidthRequest();\n\t\tint count = 0;\n\t\t\n\t\tSubstrateSwitch edge1 = null, edge2 = null;\n\t\tSubstrateSwitch agg1 = null, agg2 = null;\n\t\tSubstrateSwitch core = null;\n\t\t\n\t\tLinkPhyEdge linkEdge1 = null, linkEdge2 = null;\n\t\t\n\t\tSubstrateLink linkAggEdge1a = null, linkAggEdge1b = null;\n\t\tSubstrateLink linkAggEdge2a = null, linkAggEdge2b = null;\n\t\tSubstrateLink linkCoreAgg1a = null, linkCoreAgg1b = null;\n\t\tSubstrateLink linkCoreAgg2a = null, linkCoreAgg2b = null;\n\t\t//===get edge switch connect to server=====================================//\n\t\tfor (LinkPhyEdge linkPhyEdge: listPhyEdge) { \n\t\t\t\n\t\t\tif(linkPhyEdge.getPhysicalServer().equals(sService.getBelongToServer())){\n\t\t\t\tedge1 = linkPhyEdge.getEdgeSwitch();\n\t\t\t\tif(linkPhyEdge.getBandwidth() < bandwidthDemand) {\n\t\t\t\t\treturn false;\n\t\t\t\t}else {\n\t\t\t\t\tlinkEdge1 = linkPhyEdge;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\tif(linkPhyEdge.getPhysicalServer().equals(dService.getBelongToServer())) {\n\t\t\t\tedge2 = linkPhyEdge.getEdgeSwitch();\n\t\t\t\tif(linkPhyEdge.getBandwidth() < bandwidthDemand) {\n\t\t\t\t\treturn false;\n\t\t\t\t}else {\n\t\t\t\t\tlinkEdge2 = linkPhyEdge;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tlistAggSort1 = sortListSwitch(listAggConnectEdge.get(edge1));\n\t\tlistAggSort2 = sortListSwitch(listAggConnectEdge.get(edge2));\n\t\n\t\t//=== find link connect Agg to Edge ======================================//\n\t\tAGG_EDGE_LOOP1:\n\t\tfor(int index = 0; index < listAggSort1.size(); index++) {\n\t\t\tagg1 = listAggSort1.get(index);\n\t\t\tfor (SubstrateLink link : listLinkBandwidth) {\n\t\t\t\tif(link.getStartSwitch() == edge1 && link.getEndSwitch() == agg1) {\n\t\t\t\t\tif(link.getBandwidth() < bandwidthDemand) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tlinkAggEdge1a = link;\n\t\t\t\t\t\tcount ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(link.getStartSwitch() == agg1 && link.getEndSwitch() == edge1) {\n\t\t\t\t\tif(link.getBandwidth() < bandwidthDemand) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tlinkAggEdge1b = link;\n\t\t\t\t\t\tcount ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(count == 2) break AGG_EDGE_LOOP1;\n\t\t\t}\t\n\t\t} // end for loop 1\n\t\tcount = 0;\n\t\tAGG_EDGE_LOOP2:\n\t\tfor(int index = 0; index < listAggSort2.size(); index++) {\n\t\t\tagg2 = listAggSort2.get(index);\n\t\t\tfor (SubstrateLink link : listLinkBandwidth) {\n\t\t\t\tif(link.getStartSwitch() == edge2 && link.getEndSwitch() == agg2) {\n\t\t\t\t\tif(link.getBandwidth() < bandwidthDemand) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tlinkAggEdge2a = link;\n\t\t\t\t\t\tcount ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(link.getStartSwitch() == agg2 && link.getEndSwitch() == edge2) {\n\t\t\t\t\tif(link.getBandwidth() < bandwidthDemand) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tlinkAggEdge2b = link;\n\t\t\t\t\t\tcount ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(count == 2) break AGG_EDGE_LOOP2;\n\t\t\t}\t\n\t\t} // end for loop 2\n\t\t//=== find link connect Agg to Core ======================================//\n\t\tlistCoreSort1 = sortListSwitch(listCoreConnectAggMap.get(agg1));\n\t\tlistCoreSort2 = sortListSwitch(listCoreConnectAggMap.get(agg2));\n\t\t\n\t\tif(!listCoreSort1.equals(listCoreSort2)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tfor(int index = 0; index < listCoreSort1.size(); index++) {\n\t\t\tcore = listCoreSort1.get(index);\n\t\t\tfor (SubstrateLink link : listLinkBandwidth) {\n\t\t\t\tif(link.getStartSwitch() == agg1 && link.getEndSwitch() == core) {\n\t\t\t\t\tif(link.getBandwidth() < bandwidthDemand) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tlinkCoreAgg1a = link;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(link.getStartSwitch() == core && link.getEndSwitch() == agg1) {\n\t\t\t\t\tif(link.getBandwidth() < bandwidthDemand) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tlinkCoreAgg1b = link;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(link.getStartSwitch() == agg2 && link.getEndSwitch() == core) {\n\t\t\t\t\tif(link.getBandwidth() < bandwidthDemand) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tlinkCoreAgg2a = link;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(link.getStartSwitch() == core && link.getEndSwitch() == agg2) {\n\t\t\t\t\tif(link.getBandwidth() < bandwidthDemand) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tlinkCoreAgg2b = link;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//===set up bandwidth for all found links above ========//\n\t\tlinkEdge1.setBandwidth(linkEdge1.getBandwidth() - bandwidthDemand);\n\t\tlinkEdge1.getEdgeSwitch().setPort(linkEdge1.getEdgeSwitch(), bandwidthDemand);\n\t\tlinkEdge2.setBandwidth(linkEdge2.getBandwidth() - bandwidthDemand);\n\t\tlinkEdge2.getEdgeSwitch().setPort(linkEdge2.getEdgeSwitch(), bandwidthDemand);\n\t\tvLink.getLinkPhyEdge().add(linkEdge1);\n\t\tvLink.getLinkPhyEdge().add(linkEdge2);\n\t\tlinkAggEdge1a.setBandwidth(linkAggEdge1a.getBandwidth() - bandwidthDemand);\n\t\tlinkAggEdge1a.getStartSwitch().setPort(linkAggEdge1a.getEndSwitch(), bandwidthDemand);\n\t\tlinkAggEdge1b.setBandwidth(linkAggEdge1b.getBandwidth() - bandwidthDemand);\n\t\tlinkAggEdge1b.getStartSwitch().setPort(linkAggEdge1b.getEndSwitch(), bandwidthDemand);\n\t\tlinkAggEdge2a.setBandwidth(linkAggEdge2a.getBandwidth() - bandwidthDemand);\n\t\tlinkAggEdge2a.getStartSwitch().setPort(linkAggEdge2a.getEndSwitch(), bandwidthDemand);\n\t\tlinkAggEdge2b.setBandwidth(linkAggEdge2b.getBandwidth() - bandwidthDemand);\n\t\tlinkAggEdge2b.getStartSwitch().setPort(linkAggEdge2b.getEndSwitch(), bandwidthDemand);\n\t\tlinkCoreAgg1a.setBandwidth(linkCoreAgg1a.getBandwidth() - bandwidthDemand);\n\t\tlinkCoreAgg1a.getStartSwitch().setPort(linkCoreAgg1a.getEndSwitch(), bandwidthDemand);\n\t\tlinkCoreAgg1b.setBandwidth(linkCoreAgg1b.getBandwidth() - bandwidthDemand);\n\t\tlinkCoreAgg1b.getStartSwitch().setPort(linkCoreAgg1b.getEndSwitch(), bandwidthDemand);\n\t\tlinkCoreAgg2a.setBandwidth(linkCoreAgg2a.getBandwidth() - bandwidthDemand);\n\t\tlinkCoreAgg2a.getStartSwitch().setPort(linkCoreAgg2a.getEndSwitch(), bandwidthDemand);\n\t\tlinkCoreAgg2b.setBandwidth(linkCoreAgg2b.getBandwidth() - bandwidthDemand);\n\t\tlinkCoreAgg2b.getStartSwitch().setPort(linkCoreAgg2b.getEndSwitch(), bandwidthDemand);\n\t\tvLink.getLinkSubstrate().add(linkAggEdge1a);\n\t\tvLink.getLinkSubstrate().add(linkAggEdge1b);\n\t\tvLink.getLinkSubstrate().add(linkAggEdge2a);\n\t\tvLink.getLinkSubstrate().add(linkAggEdge2b);\n\t\tvLink.getLinkSubstrate().add(linkCoreAgg1a);\n\t\tvLink.getLinkSubstrate().add(linkCoreAgg1b);\n\t\tvLink.getLinkSubstrate().add(linkCoreAgg2a);\n\t\tvLink.getLinkSubstrate().add(linkCoreAgg2b);\n\t\treturn true;\n\t}",
"public abstract UPnPDeviceNode GetDeviceNode(String name);",
"public static void generateSocialDevices(){\n\t\tLocationModel Users = new LocationModel();\n\t\tUsers = LocalDataMaintenance.getUsers();\n\t\tFile file = new File(\"socialNet_device.txt\");\n\t\ttry{\n\t\t\tFileWriter out = new FileWriter(file);\n\t\t\tBufferedWriter bw = new BufferedWriter(out);\n\n\t\t\tfor(int i=0;i<Users.Macs.size();i++){\n\t\t\t\t//System.out.println(Users.Macs.get(i) + \" \" + emailToMac(Users.Macs.get(i)));\n\t\t\t\tbw.write(emailToMac(Users.Macs.get(i)));\n\t\t\t\tbw.newLine();\n\t\t\t}\n\n\t\t\tbw.flush();\n\t\t\tbw.close();\n\n\t\t}catch (IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"java.util.List<org.landxml.schema.landXML11.LanesDocument.Lanes> getLanesList();",
"public void mkList(MacAddress hostId, DeviceId apId, int flowNum, PortNumber portNumber, MacAddress sourceMac, MacAddress destinationMac, int stype) {\n\tif(stype == 1){\n\t\tcnt_1++;\n\t\ttype1 = \"type1_\"+cnt_1;\n\t}else if(stype == 2){\n\t\tcnt_2++;\n\t\ttype2 = \"type2_\"+cnt_2;\n\t}\n\n\tArrayList flow = new ArrayList();\t\n\tflow.add(\"flow\"+flowNum);\n\tflow.add(flowNum);\n\tflow.add(stype);\n\tflow.add(portNumber);\n\tflow.add(sourceMac);\n\tflow.add(destinationMac);\n\tflow.add(type1);\n\tflow.add(type2);\n\tlog.info(\"***Putting flow info--------------ok\");\n\t\n\tif(stype == 1){\n\t// non-realtime\n\t\tflowPrefix1.add(flow);\n\t}else if(stype == 2){\n\t// real time\n\t\tflowPrefix2.add(flow);\n\t}\n\t\n\tTestBCE mService = new TestBCE(hostId, apId, prefix1, prefix2, flowPrefix1, flowPrefix2);\n }",
"public static native String JavaGetDeviceSerialList(int Number);",
"private void onDeviceList(RequestDeviceList r){\n\t\t//Answer the request with the list of devices from the group\n\t\tgetSender().tell(new ReplyDeviceList(r.requestId, deviceActors.keySet()), getSelf());\n\t}",
"public String[] getVideoDevicesList();",
"@Override\n\tpublic IDevice byId( String deviceId )\n\t{\n\t\treturn new DeviceOperations(this.getPartner(), this.getContext().getItem1(), this.getContext().getItem2(), deviceId);\n\t}",
"public static JPanel generateLinks()\n\t{\n\t\tJPanel showAll = new JPanel();\n\t\tLinkFinder getLinks = new LinkFinder(url);\n\n\t\tgetLinks.setLinkList();\n\t\tprintLinks = getLinks.getLinkList();\n\n\t\tDefaultListModel<String> toList = new DefaultListModel<>();\n\t\tfor (int i = 0; i < printLinks.size(); i++)\n\t\t{\n\t\t\ttoList.addElement(printLinks.get(i).toString());\n\t\t}\n\n\t\tviewLinks = new JList(toList);\n\t\tviewLinks.setVisibleRowCount(12);\n\t\tviewLinks.setFixedCellWidth(200);\n\t\tviewLinks.setFixedCellHeight(15);\n\t\tlistScrollPane = new JScrollPane(viewLinks);\n\t\tshowAll.add(listScrollPane);\n\t\tlistScrollPane.setVisible(true);\n\n\t\treturn showAll;\n\t}",
"@Path(\"device\")\n DeviceAPI devices();",
"List<Link> getLinks();",
"@Override\n public Map<String, List<Sensor>> getDeviceSchemaList() {\n Path path = Paths.get(config.getFILE_PATH(), Constants.SCHEMA_PATH);\n if (!Files.exists(path) || !Files.isRegularFile(path)) {\n LOGGER.error(\"Failed to find schema file in \" + path.getFileName().toString());\n System.exit(0);\n }\n Map<String, List<Sensor>> result = new HashMap<>();\n try {\n List<String> schemaLines = Files.readAllLines(path);\n for (String schemaLine : schemaLines) {\n if (schemaLine.trim().length() != 0) {\n String line[] = schemaLine.split(\" \");\n String deviceName = line[0];\n if (!result.containsKey(deviceName)) {\n result.put(deviceName, new ArrayList<>());\n }\n Sensor sensor = new Sensor(line[1], SensorType.getType(Integer.parseInt(line[2])));\n result.get(deviceName).add(sensor);\n }\n }\n } catch (IOException exception) {\n LOGGER.error(\"Failed to init register\");\n }\n return result;\n }",
"public void listDevices(final BluetoothAdapter bluetoothAdapter){\n Set<BluetoothDevice> pairedDevices = bluetoothAdapter.getBondedDevices();\n ArrayList pairedDeviceList = new ArrayList();\n String address = null;\n\n if (pairedDevices.size() > 0) {\n int i = 0;\n // There are paired devices. Get the name and address of each paired device.\n for (BluetoothDevice device : pairedDevices) {\n String deviceName = device.getName().trim();\n String deviceHardwareAddress = device.getAddress(); // MAC address\n if (deviceName.equals(DEVICE_NAME)){\n address = device.getAddress().trim();\n System.out.println(address +\"\\n\");\n }\n pairedDeviceList.add(\"Device Name: \" + deviceName + \" Device MAC Address: \" + deviceHardwareAddress);\n }\n\n System.out.println(pairedDeviceList.get(0) + \"\\n\");\n\n final String finalAddress = address;\n AsyncTask.execute(new Runnable(){\n @Override\n public void run(){\n bluetoothDevice = bluetoothAdapter.getRemoteDevice(finalAddress);\n BLEDevice = new BluetoothLeService(bluetoothDevice, quantifenUUID);\n BLEDevice.connect(BluetoothActivity.this, testUUID);\n }\n });\n\n\n }\n }",
"public void connect(Set<String> tags, Integer linkId);",
"LINK createLINK();",
"protected java.util.Vector _getLinks() {\n\t\tjava.util.Vector links = new java.util.Vector();\n\t\tlinks.add(getLeaseTaskStartsLink());\n\t\tlinks.add(getLeaseRulesLink());\n\t\treturn links;\n\t}",
"public static List<String> getDeviceList() {\n\t\tList<String> str = CommandRunner.exec(CMD_GET_DEVICE_ID);\n\t\tList<String> ids = new ArrayList<String>();\n\t\tfor (int i = 1; i < str.size(); i++) {\n\t\t\tString id = str.get(i).split(\" |\\t\")[0].trim();\n\t\t\tif (!id.isEmpty()) {\n\t\t\t\tids.add(id);\n\t\t\t}\n\t\t}\n\t\treturn ids;\n\t}",
"protected SimpleSwitchDevice(RemoteHomeManager m, int deviceId, String deviceName) {\n super (m, deviceId, deviceName);\n setSubDeviceNumber(\"1\");\n lightSchedule = new OnOffSchedule();\n }",
"public String[] getOutputConnectorNames();",
"public void buildShimmersConnectedList(final List<ShimmerDevice> deviceList, final Context context,\n final ShimmerBluetoothManagerAndroid bluetoothManager) {\n //List<ShimmerDevice> deviceList = btManager.getListOfConnectedDevices();\n CharSequence[] nameList = new CharSequence[deviceList.size()];\n CharSequence[] macList = new CharSequence[deviceList.size()];\n CharSequence[] displayList = new CharSequence[deviceList.size()];\n\n for(int i=0; i<nameList.length; i++) {\n nameList[i] = deviceList.get(i).getShimmerUserAssignedName();\n macList[i] = deviceList.get(i).getMacId();\n displayList[i] = nameList[i] + \"\\n\" + macList[i];\n }\n\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n\n builder.setTitle(\"Connected Shimmers\");\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.cancel();\n }\n });\n builder.setItems(displayList, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ShimmerDevice shimmerDevice = deviceList.get(i);\n buildSensorOrConfigOptions(shimmerDevice, context, bluetoothManager);\n //dialogInterface.cancel();\n }\n });\n\n builder.create().show();\n }",
"List<? extends Link> getLinks();",
"@GetMapping(\"/linkage/list\")\n public R getLinkageList() {\n List<LinkageRule> list = linkageCache.cacheLinkageListGet();\n return R.ok().data(\"list\", list);\n }",
"java.util.List<io.netifi.proteus.admin.om.Connection> \n getConnectionsList();",
"private static String makeDeviceListKey(int device, String deviceAddress) {\n return \"0x\" + Integer.toHexString(device) + \":\" + deviceAddress;\n }",
"CommunicationLink getNodeByName(String name)\n {\n return getNodeById(Objects.hash(name));\n }",
"public OSLink( rcNode creator, HashMap hAttrs) {\n rcSource = creator;\n szSourcePort = (OSPort)hAttrs.get( \"SourcePort\");\n szDestPort = (String)hAttrs.get( \"DestinationPort\");\n szDestName =(String) hAttrs.get( \"DestinationName\");\n }",
"@Override\n public List<Link> getConnectionList()\n {\n return connections;\n }",
"public DeviceLocator getDeviceLocator();",
"public abstract DBResult getAdjacentLinks(int nodeId) throws SQLException;",
"List<ConnectionElement> getConnectionsByName(String userId,\n String assetManagerGUID,\n String assetManagerName,\n String name,\n int startFrom,\n int pageSize,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;",
"@GET\n @Produces(MediaType.APPLICATION_XML)\n @Path(\"getDeviceAsSensorML/{device}\")\n String getSensorML(@PathParam(\"device\") int id);",
"public Gateway getListGateway(String mac) {\n\t\tString jpql = \"select p from Gateway p inner join fetch p.bundlerInstalled\";\n\t\tTypedQuery<Gateway> query = entityManager.createQuery(jpql, Gateway.class);\n\t\tquery.setParameter(\"mac\", mac);\n\t\tGateway gtw = query.getSingleResult();\n\t\ttry {\n\t\t\treturn gtw;\n\t\t} catch (NoResultException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}",
"CharNode getLink();",
"public Map<Long, List<LineStation>> getConnections(RailwayConnectionsRequest request) {\n return linesStationsRepository.findAllConnections(request.getStartingStation(),request.getFinalStation(), request.getDepartureDate()).stream()\n .sorted(Comparator.comparing(LineStation::getArrivalDate))\n .collect(Collectors.groupingBy(x -> x.getTrain().getTrainNumber(), Collectors.toList()));\n }",
"public void removeDeviceServiceLink();",
"public List<String> execAdbDevices()\r\n\t{\r\n\t\tList<String> ret_device_id_list = new ArrayList<>();\r\n\t\t\r\n\t\tProcess proc = null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tproc = new ProcessBuilder(this.adb_directory, \"devices\").start();\r\n\t\t\tproc.waitFor();\r\n\t\t} catch (IOException ioe)\r\n\t\t{\r\n\t\t\tioe.printStackTrace();\r\n\t\t} catch (InterruptedException ire)\r\n\t\t{\r\n\t\t\tire.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tString devices_result = this.collectResultFromProcess(proc);\r\n\t String[] device_id_list = devices_result.split(\"\\\\r?\\\\n\");\r\n\r\n\t if (device_id_list.length <= 1)\r\n\t {\r\n\t \tSystem.out.println(\"No Devices Attached.\");\r\n\t \treturn ret_device_id_list;\r\n\t }\r\n\t \r\n\t /**\r\n\t * collect the online devices \r\n\t */\r\n\t String str_device_id = null;\r\n\t String[] str_device_id_parts = null;\r\n\t // ignore the first line which is \"List of devices attached\"\r\n\t for (int i = 1; i < device_id_list.length; i++)\r\n\t\t{\r\n\t\t\tstr_device_id = device_id_list[i];\r\n\t\t\tstr_device_id_parts = str_device_id.split(\"\\\\s+\");\r\n\t\t\t// add the online device\r\n\t\t\tif (str_device_id_parts[1].equals(\"device\"))\r\n\t\t\t\tret_device_id_list.add(str_device_id_parts[0]);\r\n\t\t}\r\n\t \r\n\t return ret_device_id_list;\r\n\t}",
"public static ArrayList<String> connectors2(Graph g) {\n boolean[] visits = new boolean[g.members.length]; \n for (int i=0;i<=g.members.length-1;i++) {\n \tvisits[i]=false;\n }\n int[] dfsnum = new int[g.members.length];\n int[] back = new int[g.members.length];\n ArrayList<String> answer = new ArrayList<String>();\n\n //driver portion\n for (Person person : g.members) {\n //if it hasn't been visited\n if (visits[g.map.get(person.name)]==false){\n //for different islands\n dfsnum = new int[g.members.length];\n dfs(g.map.get(person.name), g.map.get(person.name), g, visits, dfsnum, back, answer);\n }\n }\n \n //check if vertex has one neighbor\n for (int i = 0; i < answer.size(); i++) {\n Friend ptr = g.members[g.map.get(answer.get(i))].first;\n //counts number of neighbors\n int count = 0;\n while (ptr != null) {\n ptr = ptr.next;\n count++;\n }\n if (count == 1) answer.remove(i);\n if (count == 0) answer.remove(i);\n } \n for (Person member : g.members) {\n if (member.first!=null&& member.first.next == null) {\n if (answer.contains(g.members[member.first.fnum].name)==false)\n \t\t answer.add(g.members[member.first.fnum].name);\n }\n }\n answer=modify(answer,g);\n if (answer==null||answer.size()==0) return null;\n return answer;\n }",
"public static GraphNode createGraphNodeForSubsystem() {\n GraphNode nameNode = new GraphNode();\n\n for (int i = 0; i < 3; i++) {\n GraphNode childNode = new GraphNode();\n\n childNode.setPosition(AccuracyTestHelper.createPoint(0, 12 * i));\n childNode.setSize(AccuracyTestHelper.createDimension(100, 22));\n\n nameNode.addContained(childNode);\n }\n\n nameNode.setPosition(AccuracyTestHelper.createPoint(20, 20));\n nameNode.setSize(AccuracyTestHelper.createDimension(100, 100));\n\n GraphNode graphNode = new GraphNode();\n graphNode.addContained(nameNode);\n graphNode.addContained(new GraphNode());\n\n graphNode.setPosition(AccuracyTestHelper.createPoint(20, 20));\n graphNode.setSize(AccuracyTestHelper.createDimension(1000, 1000));\n\n // create a subsystem\n Subsystem subsystem = new SubsystemImpl();\n\n // set namespace\n Namespace namespace = new MockNamespaceImplAcucracy();\n subsystem.setNamespace(namespace);\n\n // create a semantic model\n Uml1SemanticModelBridge semanticModel = new Uml1SemanticModelBridge();\n semanticModel.setElement(subsystem);\n\n graphNode.setSemanticModel(semanticModel);\n\n return graphNode;\n }",
"public synchronized Hashtable getDevices() {\n Hashtable hashtable;\n hashtable = new Hashtable();\n Enumeration keys = this.deviceList.keys();\n while (keys.hasMoreElements()) {\n Integer num = (Integer) keys.nextElement();\n hashtable.put(num, this.deviceList.get(num));\n }\n return hashtable;\n }",
"public Map<String, Integer> execAdbOnlineDevicesPortForward()\r\n\t{\r\n\t\tList<String> device_id_list = this.execAdbDevices();\r\n\t\tMap<String, Integer> device_hostport_map = new HashMap<String, Integer>();\r\n\t\t\r\n\t\tint index = 0;\r\n\t\tfor (String device : device_id_list)\r\n\t\t{\r\n\t\t\tint host_port = ADBExecutor.HOST_BASE_PORT + index * 10;\r\n\t\t\tthis.execAdbSingleDevicePortForward(device, host_port, ADBExecutor.ANDROID_PORT);\r\n\t\t\tdevice_hostport_map.put(device, host_port);\r\n\t\t\tindex++;\r\n\t\t}\r\n\t\treturn device_hostport_map;\r\n\t}",
"void link(Portal portal1, Portal portal2);",
"@Override\n public String generateRouter(String routeJsonStr) {\n if(routeJsonStr.isEmpty()) return null;\n pubSubJson = new JSONObject();\n topicJson = new JSONObject();\n JSONObject routerObj = JSONObject.parseObject(routeJsonStr);\n for (Map.Entry<String, Object> entry : routerObj.entrySet()) {\n String deviceName = entry.getKey();\n List<Map<String,Object>> routerList =(List<Map<String,Object>>) entry.getValue();\n for(Map<String,Object> routerInstance:routerList) {\n String moduleName = routerInstance.get(\"moduleName\").toString();\n List nextRoute = (List<Map<String, Object>>) routerInstance.get(\"next\");\n getNextRoute(nextRoute, moduleName, deviceName);\n }\n }\n\n /*JSONArray jsonArray = JSONObject.parseArray(routeJsonStr);\n for (Iterator iterator = jsonArray.iterator(); iterator.hasNext(); ) {\n JSONObject jsonObject = (JSONObject) iterator.next();\n String deviceName = jsonObject.getString(\"deviceName\");\n JSONObject routeObj = jsonObject.getJSONObject(\"route\");\n String moduleName = routeObj.getString(\"moduleName\");\n JSONArray nextRoute = routeObj.getJSONArray(\"moduleName\");\n getNextRoute(nextRoute, moduleName, deviceName);\n }*/\n\n String topicJsonStr = topicJson.toJSONString();\n String pubSubStr = pubSubJson.toJSONString();\n System.out.println(topicJsonStr);\n System.out.println(pubSubStr);\n //优化 一个订阅者如果订阅了 多个topic topic可能可以合并\n JSONObject joinTopic = new JSONObject();\n for (Map.Entry<String, Object> entry : topicJson.entrySet()) {\n List<String> subList = (List<String>) entry.getValue();\n String topic = entry.getKey();\n String key = StringUtils.join(subList, '_');\n JSONArray topicArray;\n if (joinTopic.containsKey(key)) {\n topicArray = joinTopic.getJSONArray(key);\n } else {\n topicArray = new JSONArray();\n joinTopic.put(key,topicArray);\n }\n topicArray.add(topic);\n }\n JSONObject topicReplace = new JSONObject();\n for (Map.Entry<String, Object> entry : joinTopic.entrySet()) {\n List<String> topicList = (List<String>) entry.getValue();\n if (topicList.size() > 1) {\n String newTopic = StringUtils.join(topicList, '_');\n for (String topic : topicList) {\n topicReplace.put(topic, newTopic);\n }\n }\n }\n //合并\n for (Map.Entry<String, Object> entry : pubSubJson.entrySet()) {\n Map<String, Object> pubSubInstance = (Map<String, Object>) entry.getValue();\n if(pubSubInstance.containsKey(\"pub\")){\n Map<String, String> pubList= (Map<String, String>)pubSubInstance.get(\"pub\");\n for(Map.Entry<String, String> pubEntry:pubList.entrySet()){\n String topic = pubEntry.getValue();\n if(topicReplace.containsKey(topic)){\n pubList.replace(pubEntry.getKey(),topicReplace.getString(topic));\n }\n }\n /* List<Map<String, String>> pubList= (List<Map<String, String>>)pubSubInstance.get(\"pub\");\n for(Map<String, String> pubInstance:pubList){\n String = pubInstance.get(\"topic\");\n if(topicReplace.containsKey(topic)){\n pubInstance.replace(\"topic\",topicReplace.getString(topic));\n }\n }*/\n }\n if(pubSubInstance.containsKey(\"sub\")){\n List<String> subList= (List<String>)pubSubInstance.get(\"sub\");\n List<String> removeList = new ArrayList<>();\n List<String> addList = new ArrayList<>();\n for(String topic:subList){\n if(topicReplace.containsKey(topic)){\n removeList.add(topic);\n String newTopic = topicReplace.getString(topic);\n if(!addList.contains(newTopic)){\n addList.add(newTopic);\n }\n }\n }\n if(!removeList.isEmpty()){\n subList.removeAll(removeList);\n subList.addAll(addList);\n }\n }\n //entry.getValue()\n }\n topicJsonStr = topicJson.toJSONString();\n pubSubStr = pubSubJson.toJSONString();\n System.out.println(topicJsonStr);\n System.out.println(pubSubStr);\n return pubSubStr;\n }",
"public static Map<String, List<StationMap>> buildConnections() {\n\t\tif (connectionsCache.size() > 0)\n\t\t\treturn connectionsCache;\n\t\ttry {\n\t\t\tList<StationMap> stationMaps = buildStationMap();\n\t\t\tMap<String, List<StationMap>> connections = new HashMap<>();\n\t\t\tfor (int i = 0; i < stationMaps.size(); i++) {\n\t\t\t\tfor (int j = 0; j < stationMaps.size(); j++) {\n\t\t\t\t\tif (i != j && stationMaps.get(i).getStationName()\n\t\t\t\t\t\t\t.equalsIgnoreCase(stationMaps.get(j).getStationName())) {\n\t\t\t\t\t\tif (connections.containsKey(stationMaps.get(i).getStationName())) {\n\t\t\t\t\t\t\tList<StationMap> list = connections.get(stationMaps.get(i).getStationName());\n\t\t\t\t\t\t\tlist.add(stationMaps.get(j));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tList<StationMap> list = new ArrayList<>();\n\t\t\t\t\t\t\tlist.add(stationMaps.get(i));\n\t\t\t\t\t\t\tlist.add(stationMaps.get(j));\n\t\t\t\t\t\t\tconnections.put(stationMaps.get(i).getStationName(), list);\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\tconnectionsCache = connections;\n\t\t} catch (UrbanRailNetworkException e) {\n\t\t}\n\t\treturn connectionsCache;\n\t}",
"public List<String> execAdbDevices() {\n System.out.println(\"adb devices\");\n\n List<String> ret_device_id_list = new ArrayList<>();\n Process proc = null;\n try {\n proc = new ProcessBuilder(this.adb_path, \"devices\").start();\n proc.waitFor();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n } catch (InterruptedException ire) {\n ire.printStackTrace();\n }\n\n String devices_result = this.collectResultFromProcess(proc);\n String[] device_id_list = devices_result.split(\"\\\\r?\\\\n\");\n\n if (device_id_list.length <= 1) {\n System.out.println(\"No Devices Attached.\");\n return ret_device_id_list;\n }\n\n /**\n * collect the online devices\n */\n String str_device_id = null;\n String device = null;\n String[] str_device_id_parts = null;\n // ignore the first line which is \"List of devices attached\"\n for (int i = 1; i < device_id_list.length; i++) {\n str_device_id = device_id_list[i];\n str_device_id_parts = str_device_id.split(\"\\\\s+\");\n // add the online device\n if (str_device_id_parts[1].equals(\"device\")) {\n device = str_device_id_parts[0];\n ret_device_id_list.add(device);\n System.out.println(device);\n }\n }\n\n return ret_device_id_list;\n }",
"public SimpleFeatureCollection simplify(SimpleFeatureCollection bus_links) {\r\n\t\t\r\n\t\t//lists hold simplified and split slope segments\r\n\t\tList<SimpleFeature> simpleSlopes = new ArrayList<SimpleFeature>();\r\n\t List<SimpleFeature> segmentsSlopes = new ArrayList<SimpleFeature>();\r\n\t\t\r\n\t\t//list to hold the assigned rids of the segments\r\n\t \tList<Integer> assigned = new ArrayList<Integer>();\r\n\t \t\r\n\t\t//collections to lists\r\n\t\tList<SimpleFeature> intersections = FeatureOperations.featureCollectionToList(this.intersections);\r\n\t\tList<SimpleFeature> slopeLinks = FeatureOperations.featureCollectionToList(this.getSlopeLinks());\r\n\t\tList<SimpleFeature> slopeLiftLinks = FeatureOperations.featureCollectionToList(this.getLinks());\r\n\t\tList<SimpleFeature> busLinks = (bus_links != null) ? FeatureOperations.featureCollectionToList(bus_links) : null;\r\n\t\t\r\n\t\t//INTERSECTIONS USING KDTREE\r\n\t\t//create spatial index to contain all intersections\r\n\t\tfinal KdTree pointIndex = new KdTree();\r\n\t\tfor (SimpleFeature intersection: intersections) {\r\n\t\t\tpointIndex.insert(((Geometry)intersection.getDefaultGeometry()).getCoordinate(), intersection);\r\n\t\t}\r\n\t\tif (pointIndex.isEmpty()) {\r\n\t\t\tLogger.getLogger(SlopeLinkMatching.class.getName()).log(Level.WARNING, \"kdTree is Emtpy. No Intersections loaded while simplifying slopes\");\r\n\t\t\tLogger.getLogger(Logger.GLOBAL_LOGGER_NAME).log(Level.WARNING, \"kdTree is Emtpy. No Intersections loaded while simplifying slopes\");\r\n\t\t}\r\n\t\t\r\n\t\t//SLOPE LINKS, SLOPE LIFT LINKS AND BUS LINKS USING STRTREE\r\n\t\tfinal SpatialIndex lineIndex = new STRtree();\r\n\t\t//insert all slope links\r\n\t\tfor (SimpleFeature link: slopeLinks) {\r\n\t\t\tEnvelope linkEnvelope = new Envelope(((Geometry) link.getDefaultGeometry()).getEnvelopeInternal());\r\n\t\t\tlineIndex.insert(linkEnvelope, link);\r\n\t\t}\r\n\t\t//insert all slopeLift links\r\n\t\tfor (SimpleFeature link: slopeLiftLinks) {\r\n\t\t\tEnvelope linkEnvelope2 = new Envelope(((Geometry) link.getDefaultGeometry()).getEnvelopeInternal());\r\n\t\t\tlineIndex.insert(linkEnvelope2, link);\r\n\t\t}\r\n\t\t//insert all bus links\r\n\t\tif (busLinks!=null) {\r\n\t\t\tfor (SimpleFeature link: busLinks) {\r\n\t\t\t\tEnvelope linkEnvelope3 = new Envelope(((Geometry) link.getDefaultGeometry()).getEnvelopeInternal());\r\n\t\t\t\tlineIndex.insert(linkEnvelope3, link);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//KEEP INTERSECTING LINKS FOR EACH SLOPE\r\n\t\tfor (SimpleFeature slope_original: this.getFeatures_in()) {\r\n\t\t\t\r\n//if (!slope_original.getAttribute(\"DE_GR_L_1\").equals(\"Sportgastein\")) continue;\r\n\r\n\t\t\t//fetch slope geometry as LengthIndexedLine\r\n\t\t\tGeometry slopeGeom = (Geometry) slope_original.getDefaultGeometry();\r\n\t\t\tLengthIndexedLine lengthLine = new LengthIndexedLine(slopeGeom);\r\n\t\t\t\r\n\t\t\t//get envelope and expand by 5.00 meters\r\n\t\t\tEnvelope search = new Envelope(slopeGeom.getEnvelopeInternal()); \r\n\t\t\tsearch.expandBy(5.00);\r\n\r\n\t\t\t//Vertex ordered Map as index on lengthLine and corresponding coordinate\r\n\t\t\tMap<Double, Coordinate> newVertices = new TreeMap<Double, Coordinate>();\r\n\t\t\t//insert start and end-point\r\n\t\t\tnewVertices.put(lengthLine.getStartIndex(), lengthLine.extractPoint(lengthLine.getStartIndex()));\r\n\t\t\tnewVertices.put(lengthLine.getEndIndex(), lengthLine.extractPoint(lengthLine.getEndIndex()));\r\n\r\n\t\t\t/*------------------------ INTERSECTIONS ------------------------*/\r\n\t\t\t//fetch intersections in the slope envelope\r\n\t\t\tList<?> neighbourIntersections = pointIndex.query(search);\r\n\t\t\t\r\n/*\t\t\tSystem.out.println(\"For slope \" + slope.getAttribute(\"XML_GID\") \r\n\t\t\t\t+ \" found following intersections: \");\r\n\t\t\tfor (Object inters: neighbourIntersections) {\r\n\t\t\t\tSystem.out.println(\"\\tintersection: \" + ((SimpleFeature)((KdNode )inters).getData()).getAttribute(\"gid_start\") + \", \" + ((SimpleFeature)((KdNode )inters).getData()).getAttribute(\"gid_end\"));\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"----------------------------------\");\r\n*/\r\n\t\t\t\r\n\t\t\t//iterate through intersections and keep only those on line (using distance threshold)\r\n\t\t\tfor (Object inters: neighbourIntersections) {\r\n\t\t\t\t//get geometry and coordinate\r\n\t\t\t\tGeometry geom = (Geometry) ((SimpleFeature)((KdNode )inters).getData()).getDefaultGeometry();\r\n\t\t\t\tCoordinate coord = geom.getCoordinate();\r\n\t\t\t\t//check if intersection is on line (using distance with threshold 1cm)\r\n\t\t\t\tif (slopeGeom.distance(geom) < 0.001) {\r\n\t\t\t\t\tdouble index = lengthLine.indexOf(coord);\r\n\t\t\t\t\t//add it if not already contained\r\n\t\t\t\t\tif(!newVertices.containsKey(index) && !newVertices.containsValue(coord)) {\r\n\t\t\t\t\t\tnewVertices.put(index, coord);\r\n\t\t\t\t\t}\r\n//\t\t\t\t\tSystem.out.println(\"\\tintersection: \" + ((SimpleFeature)((KdNode )inters).getData()).getAttribute(\"gid_start\") + \", \" \r\n//\t\t\t\t\t+ ((SimpleFeature)((KdNode )inters).getData()).getAttribute(\"gid_end\"));\r\n\t\t\t\t} \r\n\t\t\t}\r\n\t\t\t/*-------------------------------------------------------*/\r\n\t\t\t\r\n\t\t\t/*------------------------ LINKS ------------------------*/\r\n\t\t\t//fetch links in the envelope\r\n\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\tList<SimpleFeature> neighbourLinks = lineIndex.query(search);\r\n\r\n/*\t\t\tSystem.out.println(\"For slope \" + slope.getAttribute(\"XML_GID\") \r\n\t\t\t\t+ \" found following links: \");\r\n\t\t\tfor (SimpleFeature link: neighbourLinks) {\r\n\t\t\t\tSystem.out.println(\"\\tlink: \" + link.getAttribute(\"gid_start\") + \", \" + link.getAttribute(\"gid_end\"));\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"----------------------------------\");\r\n*/\r\n\t\t\t\r\n\t\t\t//iterate through links and keep only those on line (using distance threshold)\r\n\t\t\tfor (SimpleFeature link : neighbourLinks) {\t\t\t\t\r\n\t\t\t\tGeometry linkGeom = (Geometry) link.getDefaultGeometry();\r\n\t\t\t\t//filter out links not intersecting with slope\r\n\t\t\t\tif(slopeGeom.distance(linkGeom) < 0.05) {\r\n\t\t\t\t\tCoordinate[] linkCoords = linkGeom.getCoordinates();\r\n\t\t\t\t\t//check which link end-point is on line (using distance with threshold 5cm) and add if not already contained\r\n\t\t\t\t\tfor (Coordinate linkCoord: linkCoords) {\r\n\t\t\t\t\t\tif (slopeGeom.distance(FeatureMatching.geomOps.coordinateToPointGeometry(linkCoord)) < 0.05 && !newVertices.containsValue(linkCoord)) {\r\n\t\t\t\t\t\t\tnewVertices.put(lengthLine.indexOf(linkCoord), linkCoord);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t//System.out.println(\"\\tlink: \" + link.getAttribute(\"gid_start\") + \", \" + link.getAttribute(\"gid_end\"));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t/*-------------------------------------------------------*/\r\n\t\t\t\r\n\t\t\t//new coordinate list from kept indices, for the creation of the simplified feature\r\n\t\t\tList<Coordinate> simplifiedCoords = new ArrayList<Coordinate>();\r\n\t\t\tfor (Entry<Double, Coordinate> entry: newVertices.entrySet()){\r\n\t\t\t\tif (!simplifiedCoords.contains(entry.getValue()))\r\n\t\t\t\tsimplifiedCoords.add(entry.getValue());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//use the simplified coordinates to split original bus geometry to its bus segments at topologic nodes\r\n\t\t\t//geometry must be preserved\r\n\t\t\t//semantic attributes must be preserved\r\n\t\t\t// r_id attribute must be added\r\n\t\t\tArrayList<SimpleFeature> splitSegments = FeatureMatching.featOps.splitFeatureAtCoordinates(slope_original, simplifiedCoords);\r\n\t\t\t\r\n\t\t\t//create new feature and add to feature collection\r\n\t\t\tSimpleFeatureType simplifiedType = FeatureOperations.makeLineStringFeatureType(this.getFeatures_in()[0].getFeatureType().getCoordinateReferenceSystem(), \"merged_pivots\");\r\n\t\t\tSimpleFeature simplifiedSlope = FeatureMatching.featOps.getFeatureFromCoordinates(simplifiedType, simplifiedCoords.toArray(new Coordinate[0]));\r\n\t\t \tString deName = slope_original.getAttribute(\"DE_GR_L_0\").toString() + \" \" + slope_original.getAttribute(\"DE_GR_L_1\").toString();\r\n\t\t \t//split feature at remaining vertices to line segments (for each vertex pair)\r\n\t\t \tArrayList<SimpleFeature> simpleSegments = FeatureMatching.featOps.splitFeatureAtVertices(simplifiedSlope);\r\n\t\t \t//rids building\r\n\t\t \tint segmentNumber = 1;\r\n//if(splitSegments.size() != simpleSegments.size()) {\t\t \t\r\n//System.out.println(slope_original.getAttribute(\"XML_GID\").toString() + \": \" +splitSegments.size() + \" / \" + simpleSegments.size());\t\r\n//System.exit(0);\r\n//}\t\t\t\r\n\t\t \tfor (SimpleFeature simpleSegment: simpleSegments) {\r\n\t\t \t\tGeometry segment_geom = (Geometry) simpleSegment.getDefaultGeometry();\r\n\t\t \t\tCoordinate[] segment_coords = segment_geom.getCoordinates(); \r\n\t\t \t\t//indexedLineGeom to getLength\r\n\t\t \t\tdouble length = lengthLine.extractLine(lengthLine.indexOf(segment_coords[0]), lengthLine.indexOf(segment_coords[1])).getLength();\r\n\t\t \t\t//in case segment has zero length ignore it and proceed to the next\r\n\t\t \t\tif (length == 0.0) continue;\t//{System.err.println(length);}\r\n\t\t \t\tdouble cost_1, cost_2, cost_3, r_cost_1, r_cost_2, r_cost_3;\r\n if (Integer.parseInt(slope_original.getAttribute(\"difficulty\").toString()) == 1) {\r\n r_cost_1 = length; r_cost_2 = 10 * length; r_cost_3 = 15 * length;\r\n cost_1 = length; cost_2 = 10 * length; cost_3 = 15 * length;\r\n } else if (Integer.parseInt(slope_original.getAttribute(\"difficulty\").toString()) == 2) {\r\n r_cost_1 = 5 * length; r_cost_2 = length; r_cost_3 = 5 * length;\r\n cost_1 = 5 * length; cost_2 = length; cost_3 = 5 * length;\r\n } else if (Integer.parseInt(slope_original.getAttribute(\"difficulty\").toString()) == 3) {\r\n r_cost_1 = 15 * length; r_cost_2 = 10 * length; r_cost_3 = length;\r\n cost_1 = 15 * length; cost_2 = 10 * length; cost_3 = length;\r\n } else {\r\n r_cost_1 = length; r_cost_2 = length; r_cost_3 = length;\r\n cost_1 = length; cost_2 = length; cost_3 = length;\r\n }\r\n \r\n\t\t \t\t//build unique r_id\r\n int slopeNumber = Integer.parseInt(slope_original.getAttribute(\"XML_GID\").toString());\r\n\t\t \t\tint rid = Integer.parseInt(\"1\"+ digitRectifier(slopeNumber, 5) + digitRectifier(segmentNumber, 3));\r\n\t\t \t\twhile (assigned.contains(rid)) {\r\n\t\t \t\t\trid++;\r\n\t\t \t\t\tsegmentNumber++;\r\n\t\t \t\t}\r\n\t\t \t\tassigned.add(rid);\r\n\t\t \t\tsegmentNumber++;\r\n\t\t \t\t//pass computed r_id to the corresponded split segment\r\n\t\t \t\tsplitSegments.get(simpleSegments.indexOf(simpleSegment)).setAttribute(\"r_id\", rid);\r\n\t\t \t\tsplitSegments.get(simpleSegments.indexOf(simpleSegment)).setAttribute(\"difficulty\", Integer.parseInt(slope_original.getAttribute(\"difficulty\").toString()));\r\n \r\n\t\t\t \tMap <String, Object> attrs = new LinkedHashMap<String, Object>();\r\n\t\t\t \tattrs.put(\"XML_TYPE\", \"slopes\");\r\n\t\t\t \tattrs.put(\"de_name\", deName);\r\n\t\t\t \tattrs.put(\"difficulty\", Integer.parseInt(slope_original.getAttribute(\"difficulty\").toString()));\r\n\t\t\t \tattrs.put(\"source\", String.valueOf(0));\r\n\t\t\t \tattrs.put(\"target\", String.valueOf(0));\r\n\t\t\t \tattrs.put(\"duration\", Double.parseDouble(\"0\")); //duration 0 for slopes\r\n\t\t\t \tattrs.put(\"length\", length); \r\n\t\t\t \tattrs.put(\"r_length\", length); \r\n attrs.put(\"r_rev_c\", (double) -1);\r\n attrs.put(\"rev_c\", (double) -1);\r\n\t\t\t \tattrs.put(\"cost_1\", cost_1);\r\n\t\t\t \tattrs.put(\"cost_2\", cost_2);\r\n\t\t\t \tattrs.put(\"cost_3\", cost_3);\r\n\t\t\t \tattrs.put(\"r_cost_1\", r_cost_1);\r\n\t\t\t \tattrs.put(\"r_cost_2\", r_cost_2);\r\n\t\t\t \tattrs.put(\"r_cost_3\", r_cost_3);\r\n\t\t\t \tattrs.put(\"open\", (int) 0);\r\n\t\t\t \tattrs.put(\"start_z\", segment_coords[0].z/10);\r\n\t\t\t \tattrs.put(\"end_z\", segment_coords[segment_coords.length-1].z/10);\r\n\t\t\t\tattrs.put(\"r_id\", rid);\r\n\t\t\t\t//add attributes\r\n\t\t\t\tfor (Map.Entry<String, Object> attribute : attrs.entrySet()){\r\n\t\t\t\t\tsimpleSegment = FeatureOperations.addAttribute(simpleSegment, attribute.getKey(), attribute.getValue());\r\n\t\t\t\t\tsimpleSegment.setAttribute(attribute.getKey(), attribute.getValue());\r\n\t\t\t\t}\r\n\t\t\t\tsimpleSlopes.add(simpleSegment);\r\n\t\t \t}\r\n\t\t \tsegmentsSlopes.addAll(splitSegments);\r\n\r\n\t\t\t//CONTROL METHOD PRINTS OUT SLOPE WITH NO CONNECTIONS\r\n/*\t\t\tif (neighbourLinks.size() == 0 && neighbourIntersections.size() == 0) {\r\n\t\t\t\tSystem.err.println(\"Slope with 'r_id' \" + slope_original.getAttribute(\"XML_GID\") + \" was found with no links and no intersections\");\r\n\t\t\t} else if (neighbourLinks.size() == 0) {\r\n\t\t\t\tSystem.err.println(\"Slope with 'r_id' \" + slope_original.getAttribute(\"XML_GID\") + \" was found with no links\");\r\n\t\t\t}*/\r\n\t\t\t//TODO:METHOD END PRINT RESULT TO FILE\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//create segments_buses shapeFile\r\n\t\tSimpleFeatureCollection newSlopeSegments = new ListFeatureCollection(segmentsSlopes.get(0).getFeatureType(), segmentsSlopes);\r\n\t\tFileOperations.createShapeFile(newSlopeSegments, StartConfiguration.getInstance().getFolder_out() + \"segments_slopes.shp\");\t\r\n\t\t//return feature collection\r\n\t\tSimpleFeatureCollection simplifiedSlopes = new ListFeatureCollection(simpleSlopes.get(0).getFeatureType(), simpleSlopes);\r\n\t\t\r\n\t\t\r\n\t\treturn simplifiedSlopes;\r\n\t}",
"public void initConnectList()\r\n\t{\r\n\t\t//head\r\n\t\tconnect(\"LFHD\",\"LBHD\"); \r\n\t\tconnect(\"LFHD\",\"RFHD\");\r\n\t\r\n\t\tconnect(\"RBHD\",\"LBHD\");\r\n\t\tconnect(\"RFHD\",\"LBHD\");\r\n\t\tconnect(\"RFHD\",\"RBHD\");\r\n\t\t\r\n\t\t//right arm\r\n\t\tconnect(\"RUPA\",\"RSHO\");\r\n\t\tconnect(\"RUPA\",\"RELB\");\r\n\t\tconnect(\"RELB\",\"RFRM\");\r\n\t\tconnect(\"RFRM\",\"RFIN\");\r\n\t\tconnect(\"RWRA\",\"RWRB\");\r\n\t\t\r\n\t\t//left arm\r\n\t\tconnect(\"LUPA\",\"LSHO\");\r\n\t\tconnect(\"LUPA\",\"LELB\");\r\n\t\tconnect(\"LELB\",\"LFRM\");\r\n\t\tconnect(\"LFRM\",\"LFIN\");\r\n\t\tconnect(\"LWRA\",\"LWRB\");\r\n\t\t\t\t// right leg\r\n\t\tconnect(\"RPel\",\"RTHI\");\r\n\t\tconnect(\"RTHI\",\"RKNE\");\r\n\t\t\r\n\t\tconnect(\"RKNE\",\"RSHN\");\r\n\t\tconnect(\"RSHN\",\"RANK\");\r\n\t\tconnect(\"RANK\",\"RHEL\");\r\n\t\tconnect(\"RTOE\",\"RMT5\");\r\n\t\tconnect(\"RANK\",\"RHEE\");\r\n\t\tconnect(\"RMT5\",\"RHEE\");\r\n\t\tconnect(\"RTOE\",\"RHEE\");\r\n\t\t\r\n\t\t//fuss right\r\n\t\tconnect(\"RHEL\",\"RTOE\");\r\n\t\tconnect(\"RHEL\",\"RMT5\");\r\n\t\t\r\n\t\t// left leg\r\n\t\tconnect(\"LPel\",\"LTHI\");\r\n\t\tconnect(\"LTHI\",\"LKNE\");\r\n\t\t\r\n\t\tconnect(\"LKNE\",\"LSHN\");\r\n\t\tconnect(\"LSHN\",\"LANK\");\r\n\t\tconnect(\"LANK\",\"LHEL\");\r\n\t\tconnect(\"LANK\",\"LHEE\");\r\n\t\tconnect(\"LTOE\",\"LMT5\");\r\n\t\tconnect(\"LMT5\",\"LHEE\");\r\n\t\tconnect(\"LTOE\",\"LHEE\");\r\n\t\t\r\n\t\t//fuss left\r\n\t\tconnect(\"LHEL\",\"LTOE\");\r\n\t\tconnect(\"LHEL\",\"LMT5\");\r\n\t\r\n\t\t// sholders\r\n\t\tconnect(\"RSHO\",\"LSHO\");\r\n\t\r\n\t\t// shoulder hump connection\r\n\t\tconnect(\"LSHO\",\"LPel\");\r\n\t\tconnect(\"RSHO\",\"RPel\");\r\n\t\t\r\n\t\t// guertel\r\n\t\tconnect(\"RBWT\",\"LBWT\");\r\n\t\tconnect(\"RPel\",\"RBWT\");\r\n\t\tconnect(\"RPel\",\"RFWT\");\r\n\t\tconnect(\"LPel\",\"LBWT\");\r\n\t\tconnect(\"LPel\",\"LFWT\");\r\n\t\tconnect(\"RFWT\",\"LFWT\");\r\n\t\t\r\n\t\t// ruecken\r\n\t\tconnect(\"LBWT\",\"T10\");\r\n\t\tconnect(\"RBWT\",\"T10\");\r\n\t\tconnect(\"C7\",\"T10\");\r\n\t\tconnect(\"C7\",\"RSHO\");\r\n\t\tconnect(\"C7\",\"LSHO\");\r\n \r\n\t\t// bauch\r\n\t\tconnect(\"LFWT\",\"STRN\");\r\n\t\tconnect(\"RFWT\",\"STRN\");\r\n\t\tconnect(\"CLAV\",\"STRN\");\r\n\t\tconnect(\"CLAV\",\"RSHO\");\r\n\t\tconnect(\"CLAV\",\"LSHO\");\r\n\r\n\t\t\r\n\t}",
"private void getDevices(){\n progress.setVisibility(View.VISIBLE);\n\n emptyMessage.setVisibility(View.GONE);\n getListView().setVisibility(View.GONE);\n\n // request device list from the server\n Model.PerformRESTCallTask gd = Model.asynchRequest(this,\n getString(R.string.rest_url) + \"?\"\n + \"authentification_key=\" + MainActivity.authentificationKey + \"&operation=\" + \"getdevices\",\n //Model.GET,\n \"getDevices\");\n tasks.put(\"getDevices\", gd);\n }",
"private void getWalkinList(){\n sendPacket(CustomerTableAccess.getConnection().getWalkinList());\n \n }",
"LinkedService get(String resourceGroupName, String workspaceName, String linkedServiceName);"
]
| [
"0.53955233",
"0.5060995",
"0.49643603",
"0.49619588",
"0.48512927",
"0.48071614",
"0.47623092",
"0.474373",
"0.47186598",
"0.46416235",
"0.46410096",
"0.46315882",
"0.4619952",
"0.46067375",
"0.46011275",
"0.46004587",
"0.45956734",
"0.45547363",
"0.4538048",
"0.45119807",
"0.44920862",
"0.4477525",
"0.4447703",
"0.44463384",
"0.4407498",
"0.44053602",
"0.4391753",
"0.43419397",
"0.4318579",
"0.4313663",
"0.43075094",
"0.43059736",
"0.42990494",
"0.42601225",
"0.42522976",
"0.42517778",
"0.42476356",
"0.42473167",
"0.42322433",
"0.42297888",
"0.42260042",
"0.42242998",
"0.42224538",
"0.42177984",
"0.42075664",
"0.42052552",
"0.42026046",
"0.41959533",
"0.41844735",
"0.41770485",
"0.41760227",
"0.41743696",
"0.41714385",
"0.41652852",
"0.41544145",
"0.4143281",
"0.41352352",
"0.4125486",
"0.41210422",
"0.41144207",
"0.4113754",
"0.41101572",
"0.4109836",
"0.41081962",
"0.41075197",
"0.4106106",
"0.41058737",
"0.41002128",
"0.40905148",
"0.4084023",
"0.4083771",
"0.40772176",
"0.40754074",
"0.40707108",
"0.40633127",
"0.40617937",
"0.4061153",
"0.40551773",
"0.4054511",
"0.40412995",
"0.40372264",
"0.40344846",
"0.4029474",
"0.40288886",
"0.4027633",
"0.40259135",
"0.40211797",
"0.40200582",
"0.4016339",
"0.4012966",
"0.40059108",
"0.4000521",
"0.39997095",
"0.39996868",
"0.3998366",
"0.39957407",
"0.39948982",
"0.3988002",
"0.39877403",
"0.39849845"
]
| 0.59625334 | 0 |
Calculate new usedvalue when reduced patchWiring. | private long calcReduceCableLinkUsed(Connection conn, Map<String, Object> link, long band) throws SQLException {
final String fname = "updateCableLinkUsed";
if (logger.isDebugEnabled()) {
logger.debug(String.format("%s(conn=%s, link=%s, band=%d) - start", fname, conn, link, band));
}
long used = (Integer)link.get("used");
long inBand = this.getBandWidth(conn, (String)link.get("inDeviceName"), (String)link.get("inPortName"));
long outBand = this.getBandWidth(conn, (String)link.get("outDeviceName"), (String)link.get("outPortName"));
long useBand = (inBand < outBand)? inBand : outBand;
used -= band;
if (used > useBand) {
used = useBand - band;
}
if (used < 0) {
used = 0;
// MEMO: output log message, however not throw exception. That's right?
logger.warn(String.format("Used value was been under than zero, and the value modify zero. %s", link));
}
if (logger.isDebugEnabled()) {
logger.debug(String.format("%s(ret=%s) - end", fname, used));
}
return used;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@ComputerMethod\n private FloatingLong getEnergyUsage() {\n return getActive() ? energyContainer.getEnergyPerTick() : FloatingLong.ZERO;\n }",
"public Long getUsed() {\r\n return used;\r\n }",
"@ComputerMethod\n private FloatingLong getEnergyUsage() {\n return energyContainer.getEnergyPerTick();\n }",
"public float getWeightUsed()\r\n {\r\n // implement our own magic formula here ...\r\n return 2.0f;\r\n }",
"public abstract BigInteger getUseed();",
"@Override\n\tint use() {\n\t\treturn (int)(primaryStat*1.2);\n\t}",
"public Long used() {\n return this.used;\n }",
"@Override\n\tpublic double calcConsumedEnergy() {\n\t\treturn (getBasicEnergyCost() * 4);\n\t}",
"@JsonIgnore\r\n public Double priceReduction() {\n if (wasPrice == null || nowPrice == null)\r\n return 0D;\r\n\r\n return wasPrice - nowPrice;\r\n }",
"public void setUsed(Long used) {\r\n this.used = used;\r\n }",
"void recalc() {\n\t\tthis.currentValue = baseValue;\n\t\tthis.modifiers.stream().forEach(a -> this.currentValue += a.getValue());\n\t}",
"public double recallMemory() {\n return memoryValue;\n }",
"public int totalGemValue() {\r\n\t\ttotal = 0;\r\n\t\ttotal += gemPile[0];\r\n\t\ttotal += gemPile[1] * 2;\r\n\t\ttotal += gemPile[2] * 3;\r\n\t\ttotal += gemPile[3] * 4;\r\n\t\treturn total;\r\n\t}",
"public void refuel() {\n fuelAmount = type.fuelCapacity;\n }",
"public Point getLocationUsed() {\n return (Point)this.locationUsed.clone();\n }",
"@Override\n public int getUsedSize() {\n return usedSize;\n }",
"public int getRemainingUses() {\n return remainingUses;\n }",
"@Override\r\n public void update() {\r\n this.total = calculateTotal();\r\n }",
"BigInteger getLeftoverCPU() {\n return pm.getCPU().subtract(used_cpu);\n }",
"@Override\n\tdouble updateTotalPrice() {\n\t\treturn 0;\n\t}",
"public double calculateAdditionalCharge() {\n return 5.0;\n }",
"double getCurrentTfConsumed();",
"protected byte[] getMeasuredAmountOfWaterRemainingInTank() {return null;}",
"public float getUsedLimit() {\n return usedLimit;\n }",
"public double getResistance() \n {\n //dummy return value.\n return 0;\n }",
"@Override\r\n public double calculatePrice() {\r\n return super.priceAdjustIE(super.calculatePrice() + WASTE_REMOVAL);\r\n }",
"public double getAllocatedValue()\r\n\t{\r\n\t\tint numberOfAllocatedRecords = 0;\r\n\t\tfor(int i = 0; i < _actuallyAllocatedTuples.size(); ++i)\r\n\t\t\tnumberOfAllocatedRecords += _actuallyAllocatedTuples.get(i);\r\n\t\t\r\n\t\treturn numberOfAllocatedRecords * this.getValue();\r\n\t}",
"public static int getSupplyUsed() {\n return Atlantis.getBwapi().getSelf().getSupplyUsed() / 2;\n }",
"public void updateUsedStorage(long consumedStorage) {\n this.usedStorage = consumedStorage;\n }",
"float getCostReduction();",
"@Override\n\tpublic int getUses() {\n\t\treturn heldObj.getUses();\n\t}",
"public long getLastUse() {\n\t\treturn _lastused;\n\t}",
"@Override\r\n\tpublic double foodConsumption() {\n\t\treturn 0;\r\n\t}",
"public static int totalSupply() {\n return totalSupplyGet();\n }",
"public static int consumedPower(){\n int consumedPower = 0;\n for (ElectricalHomeDevice device : allTrunedOnDevices){\n consumedPower += device.getDevicePower();\n }\n return consumedPower;\n }",
"public synchronized void returnUsedBytes(long returnUsedBytes) {\n mUsedBytes -= returnUsedBytes;\n }",
"public double getPercentRem(long used){\n long left = freeSpace - used;\n return ((double)left / (double)totalSpace) * 100d;\n }",
"public double getCostOverride() {\n\t\treturn costOverride;\n\t}",
"public double getOldPVal() { return this.pValBefore; }",
"public long getBytesUsed(){\r\n\t\treturn bytesUsed;\r\n\t}",
"public double getCurrentFuel();",
"public double calculate()\n {\n return ((this.getProduction() * this.getNumberOfStillages() + this.getLastCount() - this.getPrevCount()) * this.getProfileLength());\n }",
"public Long usage() {\n return this.usage;\n }",
"@Override\n public double total() {\n return 2500;\n }",
"protected boolean getUsed(){\n\t\treturn alreadyUsed;\n\t}",
"@Override\n\tpublic int getEnergyStored() {\n\t\treturn 0;\n\t}",
"public double getNewPVal() { return this.pValAfter; }",
"@Override\r\n\tpublic float getEnergyConsumption() {\r\n\t\treturn 2500 - robot.getBatteryLevel();\r\n\t}",
"@Override\n public int viability() {\n int[] newStats = getNewStats();\n return newStats[0] * newStats[1];\n }",
"public synchronized void updateUsedBytes(long usedBytes) {\n mUsedBytes = usedBytes;\n }",
"Map<Modification, Double> estimateModificationRate(Map<Modification, Integer> usedModifications, SpectrumAnnotatorResult spectrumAnnotatorResult, double aFixedModificationThreshold);",
"public double getTotalValue(){\r\n return this.quantity * this.price;\r\n }",
"public void setUsed() {\n used = true;\n }",
"public int getUsedPoints() {\n return usedPoints_;\n }",
"public int getUsedPoints() {\n return usedPoints_;\n }",
"public int getUsedPoints() {\n return usedPoints_;\n }",
"private boolean needsToRecalcStats() {\n\n return this.equipsChanged;\n }",
"public void increaseCpuUsage(double val) {\n \t\tcpuUsage += val;\n \n \t}",
"public Integer getConsumption() {\r\n return consumption;\r\n }",
"public int getChanged () {\n int d = getDiff () * 2;\n int s = getSize () * 2;\n\n for (int i = 0; i < references.length; i++) {\n if (references[i] != null) {\n d += references[i].getDiff ();\n s += references[i].getSize ();\n }\n }\n \n // own cluster change is twice as much important than \n // those referenced\n int ret = d * 100 / s;\n if (ret == 0 && d > 0) {\n ret = 1;\n }\n return ret;\n }",
"public void setUsed()\n\t{\n\t\tm_justReset = false;\n\t}",
"VariableAmount getExtremeSpikeIncrease();",
"public double getUtility(double consumption);",
"private void calculeStatRemove() {\n resourceA = this.getContext().getGame().getPlayer(idPlayer).getInventory().getValueRessource(type);\n int loose = resourceB - resourceA;\n int diff = (resourceA - resourceB) + value;\n this.getContext().getStats().incNbRessourceLoosePlayers(idPlayer,type,loose);\n this.getContext().getStats().incNbRessourceNotLoosePlayers(idPlayer,type,diff);\n }",
"int getTotalFree();",
"public BigDecimal getTOTAL_DEFERRED_PROFIT() {\r\n return TOTAL_DEFERRED_PROFIT;\r\n }",
"public int getUsedPoints() {\n return usedPoints_;\n }",
"public int getUsedPoints() {\n return usedPoints_;\n }",
"public int getUsedPoints() {\n return usedPoints_;\n }",
"@Override\n\t\tpublic long usage() {\n\t\t\t\n\t\t\treturn super.usage();\n\t\t}",
"public Float getUsedtime() {\n return usedtime;\n }",
"public double refreshData(double newValue){\n\t\t\n\t\tlastResultValue = resultValue;\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t *\tAdding new value \n\t\t */\n\t\tif( (isThresholdUsingEnabled) && ( Math.abs((resultValue - newValue)) > threshold) ){\t// If the newValue is much different then previous resultValues then we discard the previous values..\n\t\t\tthis.valueCount = 0;\n\t\t\tthis.values = new double[this.maxValueCount];\n\t\t}\n\t\t\n\t\tif(valueCount == maxValueCount){\n\t\t\t\n\t\t\tfor(int i=1; i<maxValueCount; i++)\n\t\t\t\tvalues[i-1] = values[i]; \n\t\t\t\n\t\t\tvalues[maxValueCount-1] = newValue;\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\tvalues[valueCount] = newValue;\n\t\t\t\n\t\t\tvalueCount++;\n\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t * \tCalculating result value\n\t\t */\n\t\t\n\t\t// Not need calculating if the new value equals the last result...\n\t\tif(resultValue == newValue)\t\n\t\t\treturn resultValue;\n\t\t\n\t\t// If the last result is not equal to the value of the new input value...\n\t\tdouble sum = 0;\n\t\tint div = 0;\n\t\tfor (int i = 0; i < valueCount; i++){\n\t\t\t\n\t\t\tsum += (values[i] * priorities[ ( (maxValueCount-valueCount ) + i) ]);\n\t\t\tdiv += priorities[ ( (maxValueCount-valueCount ) + i) ];\n\t\t\t\n\t\t}\n\t\t\n\t\tthis.resultValue = sum / div;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t * If we have new result (not equals the last) than we call onDataChanged method what can be implemented on parent\n\t\t */\n\t\tif(resultValue != lastResultValue)\n\t\t\tthis.onDataChanged();\n\t\t\n\t\t\n\t\t\n\t\t// Returns the new result\n\t\treturn this.resultValue;\n\t}",
"public double getActualWeight() {\n return actualWeight;\n }",
"@Override\n\tpublic Double metricValue() {\n\t\tthis.totalSampleSize = (int) Math.min(MAX_FQURIS_PER_TLD, (Math.round((double) totalURIs * POPULATION_PERCENTAGE)));\n\t\tList<String> lstUrisToDeref = new ArrayList<String>(totalSampleSize);\t\n\n\t\t\n\t\tfor(Tld tld : this.tldsReservoir.getItems()){\n\t\t\t//Work out ratio for the number of maximum TLDs in Reservior\n//\t\t\tdouble totalRatio = ((double) tldCount.get(tld.getUri())) * POPULATION_PERCENTAGE; // ratio between the total number of URIs of a TLD in a dataset against the overall total number of URIs\n//\t\t\tdouble representativeRatio = totalRatio / ((double) totalURIs * POPULATION_PERCENTAGE); // the ratio of the URIs of a TLD against the population sample for all URIs in a dataset\n//\t\t\tlong maxRepresentativeSample = Math.round(representativeRatio * (double) MAX_FQURIS_PER_TLD); // how big should the final reservior for a TLD be wrt the representative ratio\n\t\t\t\n\t\t\tlong maxRepresentativeSample = Math.round(((double) this.totalSampleSize / (double) totalURIs) * ((double) tldCount.get(tld.getUri())));\n\t\t\t// Re-sample the sample to have the final representative sample\n\t\t\tif (maxRepresentativeSample > 0){\n\t\t\t\tReservoirSampler<String> _tmpRes = new ReservoirSampler<String>((int)maxRepresentativeSample, true);\n\t\t\t\n\t\t\t\tfor(String uri : tld.getfqUris().getItems()){\n\t\t\t\t\t_tmpRes.add(uri);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlstUrisToDeref.addAll(_tmpRes.getItems());\n\t\t\t}\n\t\t}\n\t\tdouble metricValue = 0.0;\n\t\t\n\t\tthis.totalNumberOfURIs = (lstUrisToDeref.size() + this.nonSemanticResources);\n\t\t\n\t\tthis.totalCorrectReportedTypes = this.checkForMisreportedContentType(lstUrisToDeref);\n\t\tmetricValue = (double)this.totalCorrectReportedTypes / this.totalNumberOfURIs;\n\t\t\n\t\treturn metricValue;\n\t}",
"public Double getTotalAvailable(){\n return totalAvailable;\n }",
"@Override\n\tpublic double calcSpendFuel() {\n\t\tdouble result = distance / (literFuel - fuelStart);\n\t\treturn result;\n\t}",
"BigInteger getLeftoverMemory() {\n return pm.getMemory().subtract(used_mem);\n }",
"public void buyFuelGainMultiply() {\n this.fuelGainMultiply++;\n }",
"private Double getUsedAmountFromFunding(final FundingSourceResponse fundingSource) {\n BigDecimal usedAmount = new BigDecimal(0);\n if (fundingSource.getAmountUsed() != null) {\n usedAmount = usedAmount.add(fundingSource.getAmountUsed());\n }\n return usedAmount.doubleValue();\n }",
"@Override\n\tpublic double calculate(int currentIteration, int maxIterations) {\n\t\treturn value;\n\t}",
"@Override\n public double getValue() {\n return currentLoad;\n }",
"public double calculateValue() {\n if (!isLeaf && Double.isNaN(value)) {\n for (List<LatticeNode> list : children) {\n double tempVal = 0;\n for (LatticeNode node : list) {\n tempVal += ((CALatticeNode) node).calculateValue();\n }\n if (!list.isEmpty())\n value = tempVal;\n }\n }\n weight = Math.abs(value);\n return value;\n }",
"public void updateFuelUsed(double fuel) {\r\n\t\tfuelUsed.setText(\"Fuel Used (L): \" + BigDecimal.valueOf(fuel).setScale(2, RoundingMode.HALF_UP));\r\n\t\t\r\n\t}",
"public double totalPotential(Configuration conf) {\n \n return getValue(conf);\n}",
"public int FitVal(){\r\n return _FitVal;\r\n}",
"@Override\r\n\tpublic FPGAResource getHardwareResourceUsage() {\r\n\t\tint lutCount = 0;\r\n\r\n\t\tValue inputValue = getDataPort().getValue();\r\n\t\tfor (int i = 0; i < inputValue.getSize(); i++) {\r\n\t\t\tBit inputBit = inputValue.getBit(i);\r\n\t\t\tif (!inputBit.isConstant() && inputBit.isCare()) {\r\n\t\t\t\tlutCount++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tFPGAResource hwResource = new FPGAResource();\r\n\t\thwResource.addLUT(lutCount);\r\n\r\n\t\treturn hwResource;\r\n\t}",
"public double FuelRemaining()\n {\n \treturn amountOfFuelInTheTank;\n }",
"private double getValue() {\n return value;\n }",
"public java.lang.Integer getUsedCounter() {\n\t\treturn this.usedCounter;\n\t}",
"public void setUsed(){\n\t\talreadyUsed = true;\n\t}",
"public abstract int getCostToUpgrade();",
"@Override\n\tpublic double calculate() \n\t{\t\n\t\t//return 2.45e6;\n\t\t//return (2499.64 - (2.51 * tempCelsius.value)) * 1000;\t\n\t\t//return ((2.501 - (0.002361 * tempCelsius.value)) * 1e6)*0.33;\n\t\treturn ((2.501 - (0.002361 * tempCelsius.value)) * 1e6);\n\t}",
"public String getPlannedEquivalentValue() {\n\t\tString s = getNumberFormat().format(\r\n\t\t\t\t(getCurrentUsageValue() * geog.getLagoonKmSquared()));\r\n\t\treturn s;\r\n\t}",
"@Override\n public int calculateBattleValue() {\n return calculateBattleValue(false, false);\n }",
"public void setUsedLimit(float value) {\n this.usedLimit = value;\n }",
"@Override\n\tpublic float used(Fighter source,Object target,float data,int type)\n\t{\n\t\treturn 0;\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 }",
"@Override\n\t\tprotected int computeValue() {\n\t\t\treturn squareSide.get() * squareSide.get(); //return squared value\n\t\t}",
"public double getActualFixedCost(FieldContext fieldContext) {\n\t\treturn 0;\n\t}",
"AttributeReport setUsed(boolean used){\n this.used = used;\n this.versionsSinceLeftUnused = -1;\n return this;\n }"
]
| [
"0.6396292",
"0.63341707",
"0.62470114",
"0.6137153",
"0.6016186",
"0.5980716",
"0.59663796",
"0.5876402",
"0.5863337",
"0.5821151",
"0.57796466",
"0.57642275",
"0.573109",
"0.57176954",
"0.561206",
"0.55831486",
"0.55717695",
"0.55664617",
"0.55552983",
"0.55549484",
"0.55530095",
"0.5549547",
"0.55386204",
"0.552713",
"0.55175316",
"0.5509764",
"0.5506164",
"0.549265",
"0.5479946",
"0.54783106",
"0.5476705",
"0.54715604",
"0.5466544",
"0.54650384",
"0.54637426",
"0.54619193",
"0.5461171",
"0.5454105",
"0.54520595",
"0.54422796",
"0.54365647",
"0.5431956",
"0.54302394",
"0.5427699",
"0.5409149",
"0.54044694",
"0.5403554",
"0.54003274",
"0.5379719",
"0.5374912",
"0.5356297",
"0.5351815",
"0.53461343",
"0.5346096",
"0.5346096",
"0.5346096",
"0.5345856",
"0.53410685",
"0.53364915",
"0.53356457",
"0.53355974",
"0.53306544",
"0.52988243",
"0.52970797",
"0.52727133",
"0.52718496",
"0.52678704",
"0.52678704",
"0.52678704",
"0.5263617",
"0.5261024",
"0.525864",
"0.5258435",
"0.52572376",
"0.5256992",
"0.5253539",
"0.5246708",
"0.5245263",
"0.5238503",
"0.5232645",
"0.5232496",
"0.5231854",
"0.52314496",
"0.523102",
"0.5228628",
"0.5225098",
"0.52207017",
"0.5220442",
"0.5216815",
"0.5216452",
"0.52156746",
"0.52115786",
"0.52105504",
"0.52094257",
"0.5203944",
"0.51984864",
"0.51928765",
"0.51907414",
"0.5190158",
"0.5185376"
]
| 0.5260334 | 71 |
Get band width from Orient DB | private long getBandWidth(Connection conn, String deviceName, String portName) throws SQLException {
long band = 0;
try {
band = Long.parseLong((String)(dao.getPortBandFromDeviceNamePortName(conn, deviceName, portName)));
} catch (NullPointerException e) {
throw new RuntimeException(String.format(NOT_FOUND, "port={deviceName:'" + deviceName + "', portName:'" + portName + "'}"));
}
return band;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public BigDecimal getBandWidth() {\r\n return bandWidth;\r\n }",
"public byte getWidth();",
"public int getWidth() {\n\treturn width;\n\t//return myOven.getWidth();\n}",
"public Integer getWidth(){return this.width;}",
"public Integer getWidth() {\n return this.width;\n }",
"@DISPID(100) //= 0x64. The runtime will prefer the VTID if present\r\n @VTID(10)\r\n float width();",
"public abstract double getBaseWidth();",
"public int getWidth() {\n return bala.getWidth();\n }",
"String getWidth();",
"String getWidth();",
"long getWidth();",
"float getRenderableWidth(Long id) throws RemoteException;",
"Length getWidth();",
"public int width();",
"public double getWidth();",
"public double getWidth();",
"public float getWidth();",
"int getWidth(Long id) throws RemoteException;",
"public int getWidth()\n {\n return larghezza;\n }",
"public abstract int getWidth();",
"public double getWidth() {\n\treturn width;\n }",
"public double getBandWidth() {\n\t\treturn bw * _mySampleRate;\n\t}",
"public double width() { return _width; }",
"public int getWidth(){\n return width;\n }",
"double getWidth();",
"double getWidth();",
"public int getWidth(){\n return width;\n }",
"public int getWidth();",
"public int getWidth();",
"public int getWidth();",
"public int getWidth(){\n return this.baseLevel.getWidth();\n }",
"public double getWidth()\n {\n return width;\n }",
"public SVGLength getWidth() {\n return width;\n }",
"public Integer getWidth() {\n\t\t\treturn width;\n\t\t}",
"public int getWidth() {\n return type.getWidth();\n }",
"public short getWidth() {\n\n\t\treturn getShort(ADACDictionary.X_DIMENSIONS);\n\t}",
"public int getWidth()\n {\n return width;\n }",
"Integer getCurrentWidth();",
"public int getWidth() {\n return width;\n }",
"public int getWidth() {\n return width;\n }",
"public int getWidth(){\n \treturn width;\n }",
"public int getLargeur() {\n return getWidth();\n }",
"public int getWidth() {\n return width_;\n }",
"public Integer getWidth()\n {\n return (Integer) getStateHelper().eval(PropertyKeys.width, null);\n }",
"public int getWidth()\n {\n\treturn width;\n }",
"BigInteger getWidth();",
"public int getWidth() { return width; }",
"public int getWidth() { return width; }",
"public double getWidth()\r\n {\r\n return width;\r\n }",
"public int getWidth(){\n\t\treturn width;\n\t}",
"public double getWidth () {\n return width;\n }",
"public int getWidth(){\n return this.width;\n }",
"public double getWidth() {\n return width;\n }",
"public double getWidth() {\n return width;\n }",
"public double getWidth() {\n return width;\n }",
"public int getWidth()\n {\n return width;\n }",
"public int getWidth()\n {\n return width;\n }",
"public int getWidth()\n {\n return width;\n }",
"public String getWidth() {\n return width;\n }",
"public int grWidth() { return width; }",
"public double getWidth() {\r\n return width;\r\n }",
"public final int getWidth(){\n return width_;\n }",
"public int getWidth() {\r\n return width;\r\n }",
"public int getWidth()\n {return width;}",
"int getWidth();",
"int getWidth();",
"int getWidth();",
"int getWidth();",
"int getWidth();",
"int getWidth();",
"int getWidth();",
"int getWidth();",
"int getWidth();",
"int getWidth();",
"int getWidth();",
"int getWidth();",
"int getWidth();",
"int getWidth();",
"int getWidth();",
"int getWidth();",
"int getWidth();",
"public float getWidth() {\n\treturn widthRatio;\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 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 int getWidth() {\n return width_;\n }",
"public int getWidth() {\n return width_;\n }"
]
| [
"0.6822074",
"0.65063286",
"0.6428608",
"0.63984",
"0.6350402",
"0.63074386",
"0.62994856",
"0.62987167",
"0.62736136",
"0.62736136",
"0.625702",
"0.6255857",
"0.6250127",
"0.622489",
"0.62148046",
"0.62148046",
"0.61760193",
"0.6174763",
"0.6171632",
"0.6171523",
"0.6171064",
"0.61383194",
"0.61373484",
"0.6132371",
"0.6126559",
"0.6126559",
"0.61205614",
"0.611876",
"0.611876",
"0.611876",
"0.61167634",
"0.6114233",
"0.61134154",
"0.6106249",
"0.6089514",
"0.6086346",
"0.60831666",
"0.60751015",
"0.6069594",
"0.6069594",
"0.6068458",
"0.60670763",
"0.60668266",
"0.605823",
"0.6057331",
"0.6053923",
"0.6050848",
"0.6050848",
"0.6047598",
"0.60377616",
"0.6031274",
"0.6028562",
"0.6020814",
"0.6020814",
"0.6020814",
"0.6007122",
"0.6007122",
"0.6007122",
"0.5992005",
"0.59852827",
"0.59786916",
"0.597617",
"0.59759134",
"0.5965393",
"0.59648216",
"0.59648216",
"0.59648216",
"0.59648216",
"0.59648216",
"0.59648216",
"0.59648216",
"0.59648216",
"0.59648216",
"0.59648216",
"0.59648216",
"0.59648216",
"0.59648216",
"0.59648216",
"0.59648216",
"0.59648216",
"0.59648216",
"0.5952009",
"0.5941204",
"0.5941204",
"0.5941204",
"0.5941204",
"0.5941204",
"0.5941204",
"0.5941204",
"0.5941204",
"0.5941204",
"0.5941204",
"0.5941204",
"0.5941204",
"0.5941204",
"0.59377724",
"0.59377724",
"0.59377724",
"0.59355736",
"0.59355736"
]
| 0.6222194 | 14 |
Calc Vlan tag overhead | private long calcVlanTagOverhead(Long band) {
long bandBps = band * CONVERT_MBPS_BPS;
long maxEthFrameNum = bandBps / MIN_ETHER_FRAME_SIZE_BIT;
long vlanTagOverheadBpsPerSec = maxEthFrameNum * VLAN_FEALD_SIZE_BIT;
long ret = vlanTagOverheadBpsPerSec / CONVERT_MBPS_BPS;
return ret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getTagSize();",
"public int getTagSize()\r\n\t{\r\n\t\treturn tagSize;\r\n\t}",
"void countTagStatistics(){\t\n\t\thtmlParsed.traverse(new NodeVisitor() {\n\t\t\tdouble count = 0.;\n\t\t\tString tagName = \"\";\n\t\t public void head(Node node, int depth) {\n\t\t \tif (node instanceof Element) {\n\t\t \t\ttagName = ((Element) node).tagName();\n\t\t \t\tif(countTags.containsKey(tagName)){\n\t\t \t\t\tcount = countTags.get(tagName) + 1.;\n\t\t \t\t\tcountTags.put(tagName, count);\n\t\t \t\t}\n\t\t \t\telse if(tagName.matches(\"^[a-zA-Z:]+\"))\n\t\t \t\t\t\tcountTags.put(tagName, 1.);\n\t\t \t}\n\t\t }\n\t\t public void tail(Node node, int depth) {\n\t\t }\n\t\t});\t\n\t\t\t\n\t}",
"int getTagCount();",
"public abstract int getPerTagAvgPoseSolveTime();",
"@DISPID(1) //= 0x1. The runtime will prefer the VTID if present\r\n @VTID(10)\r\n short count16();",
"private int calculateUnionSize(Instance i1, Instance i2) {\n int toReturn = this.m_possibleAttributes.size();\n if (this.m_possibleAttributes.contains(this.m_splittingAttribute)) {\n toReturn -= 1;\n }\n return toReturn;\n }",
"private int weight(final String tag) {\n final int weight;\n if (tag.matches(this.regex())) {\n weight = 1 + this.numberOfConstants();\n } else {\n weight = 0;\n }\n return weight;\n }",
"@Test\n @Tag(\"bm1000\")\n public void testVTP_BASE() {\n CuteNetlibCase.doTest(\"VTP-BASE.SIF\", \"129831.46246136136\", null, NumberContext.of(7, 4));\n }",
"private void tagInHeadStatistics(){\n\t\tfinal List<Integer> countNbLinkHead = new ArrayList<>();\n\t\tfinal List<Integer> countNbCssHead = new ArrayList<>();\n\t\tfinal List<Integer> countNbScriptHead = new ArrayList<>();\n\t\tfinal List<Integer> countNbCssLinkHead = new ArrayList<>();\n\t\tElement head = htmlParsed.select(\"head\").first();\n\t\thead.traverse(new NodeVisitor(){\n\t\t\tString attributeValue = \"\"; \n\t\t\tpublic void head(Node node, int depth){\n\t\t\t\tif (node instanceof Element){\n\t\t\t\t\tElement tag = (Element) node;\n\t\t\t\t\tif(tag.tagName().equals(\"script\"))\n\t\t\t\t\t\tcountNbScriptHead.add(1);\n\t\t\t\t\telse if(tag.tagName().equals(\"style\"))\n\t\t\t\t\t\tcountNbCssHead.add(1);\n\t\t\t\t\telse if(tag.tagName().equals(\"link\")){\n\t\t\t\t\t\tcountNbLinkHead.add(1);\n\t\t\t\t\t\tattributeValue = tag.attr(\"rel\");\n\t\t\t\t\t\tif(attributeValue.equals(\"stylesheet\"))\n\t\t\t\t\t\t\tcountNbCssLinkHead.add(1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tpublic void tail(Node node, int depth) {\n\t\t }\n\t\t});\n\t\thtmlStatistics.put(\"link_head\",(double) countNbLinkHead.size());\n\t\thtmlStatistics.put(\"css_code_head\", (double) countNbCssHead.size());\n\t\thtmlStatistics.put(\"script_tag_head\", (double) countNbScriptHead.size());\n\t\thtmlStatistics.put(\"link_css_head\", (double) countNbCssLinkHead.size());\n\t}",
"public int computeRepeatedSerializedSize(Object obj) {\n if (this.tag == this.nonPackedTag) {\n return super.computeRepeatedSerializedSize(obj);\n }\n if (this.tag == this.packedTag) {\n int computePackedDataSize = computePackedDataSize(obj);\n return (computePackedDataSize + CodedOutputByteBufferNano.computeRawVarint32Size(computePackedDataSize)) + CodedOutputByteBufferNano.computeRawVarint32Size(this.tag);\n }\n StringBuilder stringBuilder = new StringBuilder(\"Unexpected repeated extension tag \");\n stringBuilder.append(this.tag);\n stringBuilder.append(\", unequal to both non-packed variant \");\n stringBuilder.append(this.nonPackedTag);\n stringBuilder.append(\" and packed variant \");\n stringBuilder.append(this.packedTag);\n throw new IllegalArgumentException(stringBuilder.toString());\n }",
"int getTagNo();",
"private static long tagId(long x) {\n return x & 0xFFFFFFFFFFFFL; // 1\n }",
"int size() {\n int basic = ((offset() + 4) & ~3) - offset() + 8;\n /* Add 8*number of offsets */\n return basic + targetsOp.length*8;\n }",
"public YangUInt16 getVlanTag1Value() throws JNCException {\n return (YangUInt16)getValue(\"vlan-tag1\");\n }",
"long getTraceTag();",
"abstract float linkSize(String link);",
"public YangUInt16 getVlanTag2Value() throws JNCException {\n return (YangUInt16)getValue(\"vlan-tag2\");\n }",
"boolean onTag(ByteBuffer buffer, int tagIndex, int tagLen, int valueLen);",
"int getTotalTags(String userName);",
"int getTokenSegmentCount();",
"UnsignedLong cost(EigrpMetricVersion version);",
"@Override\n\t\tpublic long usage() {\n\t\t\t\n\t\t\treturn super.usage();\n\t\t}",
"public static int size_cost() {\n return (16 / 8);\n }",
"final int calculateTypeConstraintMaxDiff(){\n int result=0;\n for(int i=0;i<MaximumNumberOfVerticesOfTypeZ.length;i++){\n result+=MaximumNumberOfVerticesOfTypeZ[i];\n }\n return result;\n }",
"private void incTag() {\n long id = tagId(tag[th()]); // 1\n tag[th()] = newTag(id+1); // 2\n }",
"public int GetDiskUsed (final StreamVersion rkVersion)\r\n {\r\n return super.GetDiskUsed(rkVersion) +\r\n Stream.SIZEOF_BOOLEAN + //sizeof(char) + // Enabled\r\n Stream.SIZEOF_INT + //sizeof(int) + // FrontFace\r\n Stream.SIZEOF_INT; //sizeof(int); // CullFace\r\n }",
"protected int getTagCountInCurrentIfd() {\n return mNumOfTagInIfd;\n }",
"private String countFileSize(long length) {\n\n if (length < UNIT) {\n return length + \" B\";\n }\n int exp = (int) (Math.log(length) / Math.log(UNIT));\n String pre = \"KMGTPE\".charAt(exp - 1) + \"i\";\n\n return String.format(\"%.1f %sB\", length / Math.pow(UNIT, exp), pre);\n\n }",
"public abstract long getLength() throws VlException;",
"com.google.protobuf.ByteString\n getTagBytes();",
"public int getTagCount() {\n return tag_.size();\n }",
"@DISPID(11) //= 0xb. The runtime will prefer the VTID if present\r\n @VTID(18)\r\n int count();",
"public int getHopCount()\r\n/* */ {\r\n/* 168 */ return this.nHops;\r\n/* */ }",
"public int getLovDataByteSize() {\n\t\treturn 0; // sometimes first 4 bytes give the length of data + 4 bytes for number\n\t}",
"@DISPID(6) //= 0x6. The runtime will prefer the VTID if present\r\n @VTID(13)\r\n short stat();",
"public static int getSize(int vip){\n if(vip<10){\n return NORMAL;\n }else if(vip==10){\n return Vip1;\n } else\n {\n return Vip2;\n }\n }",
"public static int getElanTagFromMetadata(Uint64 metadata) {\n return metadata.toJava().and(MetaDataUtil.METADATA_MASK_SERVICE.toJava()).shiftRight(24).intValue();\n }",
"public static int totalSize_infos_metadata() {\n return (16 / 8);\n }",
"private int numTags(int tagname) {\n\t\tCVSTag[] tags = logEntry.getTags();\n\t\tint count = 0;\n\t\tfor (CVSTag tag : tags) {\n\t\t\tif (tag.getType() == tagname) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}",
"@Override\n\tpublic int computeSize() {\n\t\treturn 36;\n\t}",
"int sizeOfTrafficVolumeArray();",
"public static int totalSize_infos_noise() {\n return (48 / 8);\n }",
"@Override\n\tprotected int precomputeAlgoId() {\n\t\treturn Objects.hash(getClass().getName(), height, width, this.precision.name()) * 31 + 1;\n\t}",
"public static int totalSizeBits_infos_metadata() {\n return 16;\n }",
"private void htmlGlobalTagStatistics() throws MalformedURLException {\n\t\tfinal List<String> anchorLinks = new ArrayList<>();\n\t\tfinal List<String> imgLinks = new ArrayList<>();\n\t\tfinal List<String> anchorImgLinks = new ArrayList<>();\n\t\tfinal List<Integer> countNbImgGif = new ArrayList<>();\n\t\tfinal List<Integer> countNbScriptOutside = new ArrayList<>();\n\t\thtmlParsed.traverse(new NodeVisitor(){\n\t\t\tString attributeValue = \"\";\n\t\t\tpublic void head(Node node, int depth){\n\t\t\t\tif (node instanceof Element){\n\t\t\t\t\tElement tag = (Element) node;\n\t\t\t\t\tif(tag.tagName().equals(\"a\")){\n\t\t\t\t\t\tattributeValue = tag.attr(\"href\");\n\t\t\t\t\t\tif(attributeValue.length() > 0) {\n\t\t\t\t\t\t\tanchorLinks.add(attributeValue);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if(tag.tagName().equals(\"img\")){\n\t\t\t\t\t\tattributeValue = tag.attr(\"src\");\n\t\t\t\t\t\tif(attributeValue.length() > 0){\n\t\t\t\t\t\t\timgLinks.add(attributeValue);\n\t\t\t\t\t\t\tif(attributeValue.endsWith(\".gif\")){\n\t\t\t\t\t\t\t\tcountNbImgGif.add(1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(tag.parent().tagName().equals(\"a\")) {\n\t\t\t\t\t\t\t\tanchorImgLinks.add(attributeValue);\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(tag.tagName().equals(\"script\")){\n\t\t\t\t\t\tattributeValue = tag.attr(\"src\");\n\t\t\t\t\t\tif(attributeValue.length() > 0)\n\t\t\t\t\t\t\tcountNbScriptOutside.add(1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t public void tail(Node node, int depth) {\n\t\t }\n\t\t});\t\n\t\t\n\t\tint nbYearImgLink = anchorImgLinks.stream()\n\t\t\t\t.mapToInt(ClassificationGeneralFunctions::countNbOfYears)\n\t\t\t\t.sum();\n\t\t\t\t\n\t\tint nbYearAnchorLink = 0;\n\t\tint nbLinkSameDomain = 0;\n\t\tint nbLinkOutside = 0;\n\t\tint nbHrefJavascript = 0;\n\t\tString domain = new URL(url).getHost().toLowerCase();\n\t\tfor(String link: anchorLinks){\n\t\t\tlink = link.toLowerCase();\n\t\t\tnbYearAnchorLink += ClassificationGeneralFunctions.countNbOfYears(link);\n\t\t\tif(link.startsWith(\"http\")){\n\t\t\t\tif(link.contains(domain)) {\n\t\t\t\t\tnbLinkSameDomain += 1;\n\t\t\t\t}else {\n\t\t\t\t\tnbLinkOutside += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif(link.startsWith(\"javascript\")){\n\t\t\t\t\tnbHrefJavascript += 1;\n\t\t\t\t}else {\n\t\t\t\t\tnbLinkSameDomain += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\thtmlStatistics.put(\"img\", (double) imgLinks.size());\n\t\thtmlStatistics.put(\"img_gif\",(double) countNbImgGif.size());\n\t\thtmlStatistics.put(\"script_outside\", (double) countNbScriptOutside.size());\n\t\thtmlStatistics.put(\"anchor_with_image\", (double) anchorImgLinks.size());\n\t\thtmlStatistics.put(\"year_link_img\", (double) nbYearImgLink);\n\t\thtmlStatistics.put(\"year_link_anchor\", (double) nbYearAnchorLink);\n\t\thtmlStatistics.put(\"links_same_domains\", (double) nbLinkSameDomain);\n\t\thtmlStatistics.put(\"links_to_outside\", (double) nbLinkOutside);\n\t\thtmlStatistics.put(\"href_javascript\", (double) nbHrefJavascript);\n\t}",
"int getTotalTags(int accountId);",
"@Override\n public int computeLength()\n {\n if ( matchingRule != null )\n {\n matchingRuleBytes = Strings.getBytesUtf8( matchingRule );\n extensibleMatchLength = 1 + TLV.getNbBytes( matchingRuleBytes.length ) + matchingRuleBytes.length;\n }\n\n if ( type != null )\n {\n typeBytes = Strings.getBytesUtf8( type );\n extensibleMatchLength += 1 + TLV.getNbBytes( typeBytes.length ) + typeBytes.length;\n }\n\n if ( matchValue != null )\n {\n int bytesLength = matchValue.getBytes().length;\n extensibleMatchLength += 1 + TLV.getNbBytes( bytesLength ) + bytesLength;\n }\n\n if ( dnAttributes )\n {\n extensibleMatchLength += 1 + 1 + 1;\n }\n\n return 1 + TLV.getNbBytes( extensibleMatchLength ) + extensibleMatchLength;\n }",
"private void initializeTag()\n {\n Iterator<node_info> it=this.ga.getV().iterator();\n while(it.hasNext())\n {\n it.next().setTag(Double.POSITIVE_INFINITY);\n }\n }",
"int calculateBodyLength(TranscoderContext context);",
"godot.wire.Wire.Vector2 getSize();",
"long getFeaturesUsed();",
"teledon.network.protobuffprotocol.TeledonProtobufs.Voluntar getVoluntar();",
"long getPlaneSize();",
"public Vlen_t() {}",
"@Test\n @Tag(\"bm1000\")\n public void testADLITTLE() {\n CuteNetlibCase.doTest(\"ADLITTLE.SIF\", \"225494.96316238036\", null, NumberContext.of(7, 4));\n }",
"@Test\n @Tag(\"unstable\")\n @Tag(\"bm1000\")\n public void testTUFF() {\n CuteNetlibCase.doTest(\"TUFF.SIF\", \"0.29214776509361284\", \"0.8949901867574317\", NumberContext.of(7, 4));\n }",
"protected void onGetTankCapacity(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}",
"godot.wire.Wire.Vector3 getSize();",
"public int memUsage(){\n\t\tint usage = 36;\n\t\tusage += 12 * point.length;\n\t\tusage += 4 * glComannd.length;\n\t\tusage += 12 * glVertex.length;\n\t\tusage += 24 * state.length;\n\t\treturn usage;\n\t}",
"int countByExample(TagDataExample example);",
"@SuppressWarnings(\"unchecked\")\r\n private PagingResult<Tag> computeTag(UrlBuilder url)\r\n {\r\n Response resp = read(url, ErrorCodeRegistry.TAGGING_GENERIC);\r\n PublicAPIResponse response = new PublicAPIResponse(resp);\r\n\r\n List<Tag> result = new ArrayList<Tag>();\r\n Map<String, Object> data = null;\r\n for (Object entry : response.getEntries())\r\n {\r\n data = (Map<String, Object>) ((Map<String, Object>) entry).get(PublicAPIConstant.ENTRY_VALUE);\r\n result.add(TagImpl.parsePublicAPIJson(data));\r\n }\r\n\r\n return new PagingResultImpl<Tag>(result, response.getHasMoreItems(), response.getSize());\r\n }",
"public short computeLength() {\n \tshort len = (short)(CORE_LENGTH + super.computeLength());\n \treturn len;\n }",
"public int tag () { return MyTag; }",
"@Override\n public long sizeInBytes() {\n return STATIC_SIZE + (2 * normalizedValue.length());\n }",
"public int vol() {\r\n\t\treturn 3;\r\n\t}",
"public int encodedSize(BackendService adVar) {\n return adVar.unknownFields().mo132944h();\n }",
"public void setTagSize(int tagSize)\r\n\t{\r\n\t\tthis.tagSize = tagSize;\r\n\t}",
"long getObjectSize(Object instance);",
"private void createValue()\n\t{\n\t\ttry\n\t\t{\n\t\t\tm_usage = ((DERBitString)new ASN1InputStream(\n\t\t\t\t\t new ByteArrayInputStream(getDEROctets())).readObject()).intValue();\n\t\t} catch (Exception a_e)\n\t\t{\n\t\t\tthrow new RuntimeException(\"Could not read key usage from byte array!\");\n\t\t}\n\t}",
"public static int totalSizeBits_infos_noise() {\n return 48;\n }",
"public void balayer()\r\n {\r\n int tot=0;\r\n for (int i=0;i<LONGUEUR;i++ )\r\n {\r\n for (int j=0; j<LARGEUR; j++ )\r\n {\r\n tot=0;\r\n Haut = lignesHor[i][j];\r\n Droite = lignesVert[i+1][j];\r\n Bas = lignesHor[i][j+1];\r\n Gauche = lignesVert[i][j];\r\n\r\n if (Haut)\r\n {\r\n tot++;\r\n Vision[i][j][1]=1;\r\n }\r\n\r\n if (Droite)\r\n {\r\n tot++;\r\n Vision[i][j][2]=1;\r\n }\r\n\r\n if (Bas)\r\n {\r\n tot++;\r\n Vision[i][j][3]=1;\r\n }\r\n\r\n\r\n if (Gauche)\r\n {\r\n tot++;\r\n Vision[i][j][4]=1;\r\n }\r\n\r\n Vision[i][j][0]=Vision[i][j][1]+Vision[i][j][2]+Vision[i][j][3]+Vision[i][j][4];\r\n }\r\n }\r\n }",
"public void a(bq nbttagcompound)\r\n/* 226: */ {\r\n/* 227:184 */ super.a(nbttagcompound);\r\n/* 228: */ \r\n/* 229: */ \r\n/* 230: */ \r\n/* 231:188 */ int cs2 = nbttagcompound.e(\"cvm\") & 0x3F;\r\n/* 232:189 */ this.CoverSides |= cs2;\r\n/* 233:190 */ byte[] cov = nbttagcompound.j(\"cvs\");\r\n/* 234:191 */ if ((cov != null) && (cs2 > 0))\r\n/* 235: */ {\r\n/* 236:192 */ int sp = 0;\r\n/* 237:193 */ for (int i = 0; i < 6; i++) {\r\n/* 238:194 */ if ((cs2 & 1 << i) != 0)\r\n/* 239: */ {\r\n/* 240:195 */ this.Covers[i] = ((short)((cov[sp] & 0xFF) + ((cov[(sp + 1)] & 0xFF) << 8)));\r\n/* 241: */ \r\n/* 242:197 */ sp += 2;\r\n/* 243: */ }\r\n/* 244: */ }\r\n/* 245: */ }\r\n/* 246:200 */ rebuildSticky();\r\n/* 247: */ }",
"public static int size_infos_log_src() {\n return (16 / 8);\n }",
"public int getLabelSize()\n {\n return myLabelSize;\n }",
"long getEmbeddingTokenHigh();",
"long getEmbeddingTokenHigh();",
"public long estimateSize() {\n/* 1448 */ return this.est;\n/* */ }",
"public int getFeaturesSize();",
"@Override\n\tVector calcUV(Vector hitPoint) {\n\t\treturn null;\n\t}",
"public double defaultEvaulateAsMiniBits() {\n double result = 0;\n for (int i = 0; i < this.m_GenotypeLength; i++) {\n if (this.m_Genotype.get(i)) result++;\n }\n return result;\n }",
"public abstract int virtualSize();",
"public byte[] tag();",
"godot.wire.Wire.Vector2OrBuilder getSizeOrBuilder();",
"public int computeSerializedSize(Object obj) {\n return this.repeated ? computeRepeatedSerializedSize(obj) : computeSingularSerializedSize(obj);\n }",
"public final int getNumCodedBytes(){\n // NOTE: testing these algorithms for correctness is quite\n // difficult. One way is to modify the rate allocator so that not all\n // bit-planes are output if the distortion estimate for last passes is\n // the same as for the previous ones.\n\n switch (ltype) {\n case LENGTH_LAZY_GOOD:\n // This one is a bit better than LENGTH_LAZY.\n int bitsInN3Bytes; // The minimum amount of bits that can be stored\n // in the 3 bytes following the current byte\n // buffer 'b'.\n if (b >= 0xFE) {\n // The byte after b can have a bit stuffed so ther could be\n // one less bit available\n bitsInN3Bytes = 22; // 7 + 8 + 7\n }\n else {\n // We are sure that next byte after current byte buffer has no\n // bit stuffing\n bitsInN3Bytes = 23; // 8 + 7 + 8\n }\n if ((11-cT+16) <= bitsInN3Bytes) {\n return nrOfWrittenBytes+(delFF ? 1 : 0)+1+3;\n }\n else {\n return nrOfWrittenBytes+(delFF ? 1 : 0)+1+4;\n }\n case LENGTH_LAZY:\n // This is the very basic one that appears in the VM text\n if ((27-cT) <= 22) {\n return nrOfWrittenBytes+(delFF ? 1 : 0)+1+3;\n }\n else {\n return nrOfWrittenBytes+(delFF ? 1 : 0)+1+4;\n }\n case LENGTH_NEAR_OPT:\n // This is the best length calculation implemented in this class.\n // It is almost always optimal. In order to calculate the length\n // it is necessary to know which bytes will follow in the MQ\n // bit stream, so we need to wait until termination to perform it.\n // Save the state to perform the calculation later, in\n // finishLengthCalculation()\n saveState();\n // Return current number of output bytes to use it later in\n // finishLengthCalculation()\n return nrOfWrittenBytes;\n default:\n throw new Error(\"Illegal length calculation type code\");\n }\n }",
"private void computeElementstatistics(Elements eles, String nameElement, Map<String,Boolean> option) throws Exception{\t\n\t\tif(eles.size() == 0)\n\t\t\treturn;\n\t\tdouble nbAnchor, nbList, nbTable, nbImg, nbImgAnchor, nbPTag, nbDescendants;\t\t\n\t\tList<Double> nbAnchorEle = new ArrayList<>();\n\t\tList<Double> nbListEle = new ArrayList<>();\n\t\tList<Double> nbTableEle = new ArrayList<>();\n\t\tList<Double> nbImgEle = new ArrayList<>();\n\t\tList<Double> nbImgAnchorEle = new ArrayList<>();\n\t\tList<Double> nbPTagEle = new ArrayList<>();\n\t\tList<Double> nbDescendantsEle = new ArrayList<>();\n\t\tfor(Element div : eles){\n\t\t\tnbAnchor = 0;\n\t\t\tnbList = 0;\n\t\t\tnbTable = 0;\n\t\t\tnbImg = 0;\n\t\t\tnbImgAnchor = 0;\n\t\t\tnbPTag = 0;\n\t\t\tnbDescendants = 0;\n\t\t\tfor(Element tag : div.getAllElements()){\n\t\t\t\tnbDescendants += 1;\n\t\t\t\tif(tag.tagName().equals(\"a\"))\n\t\t\t\t\tnbAnchor += 1;\n\t\t\t\telse if(option.containsKey(\"list\") && option.get(\"list\") && (tag.tagName().equals(\"ul\") || tag.tagName().equals(\"li\")))\n\t\t\t\t\tnbList += 1;\n\t\t\t\telse if(option.containsKey(\"table\") && option.get(\"table\") &&\n\t\t\t\t\t\t(tag.tagName().equals(\"table\") || tag.tagName().equals(\"tr\") || tag.tagName().equals(\"td\")))\n\t\t\t\t\tnbTable += 1;\n\t\t\t\telse if(tag.tagName().equals(\"img\")){\n\t\t\t\t\tif(tag.parent().tagName().equals(\"a\"))\n\t\t\t\t\t\tnbImgAnchor += 1;\n\t\t\t\t\telse\n\t\t\t\t\t\tnbImg += 1;\n\t\t\t\t}\n\t\t\t\telse if(option.containsKey(\"p\") && option.get(\"p\") && (tag.tagName().equals(\"p\")))\n\t\t\t\t\tnbPTag += 1;\n\t\t\t}\n\t\t\tnbAnchorEle.add(nbAnchor);\t\t\t\n\t\t\tnbListEle.add(nbList);\n\t\t\tnbTableEle.add(nbTable);\n\t\t\tnbImgEle.add(nbImg);\n\t\t\tnbImgAnchorEle.add(nbImgAnchor);\n\t\t\tnbPTagEle.add(nbPTag);\n\t\t\tnbDescendantsEle.add(nbDescendants);\n\t\t}\n\t\tHashtable<String, List<Double>> eleStat = new Hashtable<String, List<Double>>();\n\t\teleStat.put(\"anchor_by_\" + nameElement, nbAnchorEle);\n\t\tif(option.containsKey(\"list\") && option.get(\"list\"))\n\t\t\teleStat.put(\"list_by_\" + nameElement, nbListEle);\n\t\tif(option.containsKey(\"table\") && option.get(\"table\"))\n\t\t\teleStat.put(\"table_by_\" + nameElement, nbTableEle);\n\t\teleStat.put(\"img_by_\" + nameElement, nbImgEle);\n\t\teleStat.put(\"img_anchor_by_\" + nameElement, nbImgAnchorEle);\n\t\tif(option.containsKey(\"p\") && option.get(\"p\"))\n\t\t\teleStat.put(\"tag_p_by_\" + nameElement, nbPTagEle);\n\t\teleStat.put(\"descendants_by_\" + nameElement, nbDescendantsEle);\n\t\tList<String> averageName = Arrays.asList(\"__mean\",\"__std\",\"__2nd_skew_coef\");\n\t\tList<String> bigName = Arrays.asList(\"__highest\",\"__2nd_highest\",\"__3rd_highest\");\n\t\tfor(String name : eleStat.keySet()){\n\t\t\tList<Double> average = ClassificationGeneralFunctions.getAverageSkewness(eleStat.get(name));\n\t\t\tList<Double> highestElements = ClassificationGeneralFunctions.getHighestElementStatistics(eleStat.get(name), average.get(0));\t\t\t\n\t\t\tfor(int i = 0; i < averageName.size(); i++){\n\t\t\t\thtmlStatistics.put(name + averageName.get(i), average.get(i));\n\t\t\t}\n\t\t\tfor(int i = 0; i < bigName.size(); i++){\n\t\t\t\thtmlStatistics.put(name + bigName.get(i), highestElements.get(i));\n\t\t\t}\n\t\t}\n\t}",
"public int computeRepeatedSerializedSize(Object obj) {\n int length = Array.getLength(obj);\n int i = 0;\n for (int i2 = 0; i2 < length; i2++) {\n if (Array.get(obj, i2) != null) {\n i += computeSingularSerializedSize(Array.get(obj, i2));\n }\n }\n return i;\n }",
"private int analyzeConstPool()\n {\n cp_index = new int[constant_pool_count];\n cp_index[0] = -1;\n\n int index = 1;\n int offset = 10;\n while (index < constant_pool_count)\n {\n cp_index[index] = offset;\n ++index;\n\n EConstPoolItem item = EConstPoolItem.getByTag(bytes[offset]);\n if (item == EConstPoolItem.UTF8_INFO)\n {\n int length = ByteTool.uBigEnd(bytes[offset + 1], bytes[offset + 2]);\n offset += length + 3;\n }\n else\n {\n offset += item.count;\n }\n\n // 这规定mdzz\n if (item == EConstPoolItem.DOUBLE_INFO || item == EConstPoolItem.LONG_INFO)\n {\n ++index;\n }\n }\n\n return offset;\n }",
"@NoProxy\n public int calculateByteSize() {\n\n int sz = 40; // Overhead for superclasses.\n sz += 4; // int entityType = CalFacadeDefs.entityTypeEvent;\n /*\n sv += stringSize(name); // String name;\n sv += collectionSize(nnn); // Collection<BwString> summaries;\n sv += collectionSize(nnn); // Collection<BwLongString> descriptions;\n sv += stringSize(classification); // String classification;\n sv += collectionSize(nnn); // Collection<BwString> comments;\n sv += collectionSize(nnn); // Collection<BwString> resources;\n private BwDateTime dtstart;\n private BwDateTime dtend;\n sv += 16; // String duration;\n sv += 4; // Boolean noStart;\n sv += 1; // char endType = endTypeDate;\n sv += stringSize(link); // String link;\n private BwGeo geo;\n sv += stringSize(status); // String status;\n sv += stringSize(cost); // String cost;\n sv += 1; // boolean deleted;\n sv += 16; // String dtstamp;\n sv += 16; // String lastmod;\n sv += 16; // String created;\n sv += 4; // integer priority;\n private Collection<BwCategory> categories = null;\n private Collection<BwContact> contacts;\n private BwLocation location;\n sv += stringSize(name); // String transparency;\n sv += 4; // integer percentComplete;\n sv += 16; // String completed;\n private Collection<BwAttendee> attendees;\n sv += 4; // Boolean recurring;\n sv += stringSize(uid); // String uid;\n private Collection<BwAlarm> alarms;\n sv += 16; // String recurrenceId;\n private Collection<String> rrules;\n private Collection<String> exrules;\n private Collection<BwDateTime> rdates;\n private Collection<BwDateTime> exdates;\n sv += 16; // String latestDate;\n sv += 4; // Boolean expanded;\n sv += 4; // int sequence;\n sv += 4; // int scheduleMethod;\n sv += stringSize(name); // String originator;\n private Collection<String> recipients;\n sv += 4; // int scheduleState;\n private Collection<BwRequestStatus> requestStatuses;\n private BwRelatedTo relatedTo;\n sv += 4; // int byteSize;\n */\n\n return sz;\n }",
"@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)\n private void addTrafficStatsTag(Request<?> request) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {\n TrafficStats.setThreadStatsTag(request.getTrafficStatsTag());\n }\n }",
"protected short getTLVOffset(byte[] buffer, byte tag, \n short Lc, short occurrence) {\n byte count = 0; // count of occurances\n short offset = firstTLVOffset;\n tag = (byte)(tag & 0x7F);\n while (offset < Lc) {\n if ((byte)(buffer[offset] & 0x7F) == tag) {\n count++;\n if (count != occurrence) {\n continue;\n }\n return offset;\n } else {\n // advance to next TLV\n offset++;\n short length = buffer[offset];\n offset = (short)(offset + length + 1);\n }\n }\n return offset; // not found\n }",
"public static int performanceCountGet() { return 0; }",
"@DISPID(100) //= 0x64. The runtime will prefer the VTID if present\r\n @VTID(10)\r\n float width();",
"@Nullable\n Integer getVcpuCount();",
"private static int getTreeSize(int totalSize) {\n if (totalSize <= 32) {\n return 0;\n } else {\n // TODO: Clojure does ((realSize - 1) >>> 5) << 5); is that faster?\n return ((totalSize - 1) & (~0x1F));\n }\n }",
"float getFixedHotwordGain();",
"static int size_of_code(String instruction){\n\t\tint size = 0;\n\t\tString code = instruction.split(\" \")[0];\n\t\tswitch(code){\n\t\tcase \"MOV\":\n\t\t\tsize = size_of_mov(instruction);\n\t\t\tbreak;\n\t\tcase \"MVI\":\n\t\t\tsize = size_of_mvi(instruction);\n\t\t\tbreak;\n\t\tcase \"LXI\":\n\t\t\tsize = size_of_lxi(instruction);\n\t\t\tbreak;\n\t\tcase \"LDA\":\n\t\t\tsize = size_of_lda(instruction);\n\t\t\tbreak;\n\t\tcase \"STA\":\n\t\t\tsize = size_of_sta(instruction);\n\t\t\tbreak;\n\t\tcase \"LHLD\":\n\t\t\tsize = size_of_lhld(instruction);\n\t\t\tbreak;\n\t\tcase \"SHLD\":\n\t\t\tsize = size_of_shld(instruction);\n\t\t\tbreak;\n\t\tcase \"LDAX\":\n\t\t\tsize = size_of_ldax(instruction);\n\t\t\tbreak;\n\t\tcase \"STAX\": \n\t\t\tsize = size_of_stax(instruction);\n\t\t\tbreak;\n\t\tcase \"XCHG\":\n\t\t\tsize = size_of_xchg(instruction);\n\t\t\tbreak;\n\t\tcase \"ADD\":\n\t\t\tsize = size_of_add(instruction);\n\t\t\tbreak;\n\t\tcase \"ADC\":\n\t\t\tsize = size_of_adc(instruction);\n\t\t\tbreak;\n\t\tcase \"ADI\":\n\t\t\tsize = size_of_adi(instruction);\n\t\t\tbreak;\n\t\tcase \"ACI\":\n\t\t\tsize = size_of_aci(instruction);\n\t\t\tbreak;\n\t\tcase \"DAD\":\n\t\t\tsize = size_of_dad(instruction);\n\t\t\tbreak;\n\t\tcase \"SUB\":\n\t\t\tsize = size_of_sub(instruction);\n\t\t\tbreak;\n\t\tcase \"SBB\":\n\t\t\tsize = size_of_sbb(instruction);\n\t\t\tbreak;\n\t\tcase \"SUI\":\n\t\t\tsize = size_of_sui(instruction);\n\t\t\tbreak;\n\t\tcase \"INR\":\n\t\t\tsize = size_of_inr(instruction);\n\t\t\tbreak;\n\t\tcase \"DCR\":\n\t\t\tsize = size_of_dcr(instruction);\n\t\t\tbreak;\n\t\tcase \"INX\":\n\t\t\tsize = size_of_inx(instruction);\n\t\t\tbreak;\n\t\tcase \"DCX\":\n\t\t\tsize = size_of_dcx(instruction);\n\t\t\tbreak;\n\t\tcase \"DAA\":\n\t\t\tsize = size_of_daa(instruction);\n\t\tcase \"ANA\":\n\t\t\tsize = size_of_ana(instruction);\n\t\t\tbreak;\n\t\tcase \"ANI\":\n\t\t\tsize = size_of_ani(instruction);\n\t\t\tbreak;\n\t\tcase \"ORA\":\n\t\t\tsize = size_of_ora(instruction);\n\t\t\tbreak;\n\t\tcase \"ORI\":\n\t\t\tsize = size_of_ori(instruction);\n\t\t\tbreak;\n\t\tcase \"XRA\":\n\t\t\tsize = size_of_xra(instruction);\n\t\t\tbreak;\n\t\tcase \"XRI\":\n\t\t\tsize = size_of_xri(instruction);\n\t\t\tbreak;\n\t\tcase \"CMA\":\n\t\t\tsize = size_of_cma(instruction);\n\t\t\tbreak;\n\t\tcase \"CMC\":\n\t\t\tsize = size_of_cmc(instruction);\n\t\t\tbreak;\n\t\tcase \"STC\":\n\t\t\tsize = size_of_stc(instruction);\n\t\t\tbreak;\n\t\tcase \"CMP\":\n\t\t\tsize = size_of_cmp(instruction);\n\t\t\tbreak;\n\t\tcase \"CPI\":\n\t\t\tsize = size_of_cpi(instruction);\n\t\t\tbreak;\n\t\tcase \"RLC\":\n\t\t\tsize = size_of_rlc(instruction);\n\t\t\tbreak;\n\t\tcase \"RRC\":\n\t\t\tsize = size_of_rrc(instruction);\n\t\t\tbreak;\n\t\tcase \"RAL\":\n\t\t\tsize = size_of_ral(instruction);\n\t\t\tbreak;\n\t\tcase \"RAR\":\n\t\t\tsize = size_of_rar(instruction);\n\t\t\tbreak;\n\t\tcase \"JMP\":\n\t\t\tsize = size_of_jmp(instruction);\n\t\t\tbreak;\n\t\tcase \"JZ\":\n\t\t\tsize = size_of_jz(instruction);\n\t\t\tbreak;\n\t\tcase \"JNZ\":\n\t\t\tsize = size_of_jnz(instruction);\n\t\t\tbreak;\n\t\tcase \"JC\":\n\t\t\tsize = size_of_jc(instruction);\n\t\t\tbreak;\n\t\tcase \"JNC\":\n\t\t\tsize = size_of_jnc(instruction);\n\t\t\tbreak;\n\t\tcase \"JP\":\n\t\t\tsize = size_of_jp(instruction);\n\t\t\tbreak;\n\t\tcase \"JM\":\n\t\t\tsize = size_of_jm(instruction);\n\t\t\tbreak;\n\t\tcase \"JPE\":\n\t\t\tsize = size_of_jpe(instruction);\n\t\t\tbreak;\n\t\tcase \"JPO\":\n\t\t\tsize = size_of_jpo(instruction);\n\t\t\tbreak;\n\t\tcase \"CALL\":\n\t\t\tsize = size_of_call(instruction);\n\t\t\tbreak;\n\t\tcase \"CZ\":\n\t\t\tsize = size_of_cz(instruction);\n\t\t\tbreak;\n\t\tcase \"CNZ\":\n\t\t\tsize = size_of_cnz(instruction);\n\t\t\tbreak;\n\t\tcase \"CC\":\n\t\t\tsize = size_of_cc(instruction);\n\t\t\tbreak;\n\t\tcase \"CNC\":\n\t\t\tsize = size_of_cnc(instruction);\n\t\t\tbreak;\n\t\tcase \"CP\":\n\t\t\tsize = size_of_cp(instruction);\n\t\t\tbreak;\n\t\tcase \"CM\":\n\t\t\tsize = size_of_cm(instruction);\n\t\t\tbreak;\n\t\tcase \"CPE\":\n\t\t\tsize = size_of_cpe(instruction);\n\t\t\tbreak;\n\t\tcase \"CPO\":\n\t\t\tsize = size_of_cpo(instruction);\n\t\t\tbreak;\n\t\tcase \"RET\":\n\t\t\tsize = size_of_ret(instruction);\n\t\t\tbreak;\n\t\tcase \"RZ\":\n\t\t\tsize = size_of_rz(instruction);\n\t\t\tbreak;\n\t\tcase \"RNZ\":\n\t\t\tsize = size_of_rnz(instruction);\n\t\t\tbreak;\n\t\tcase \"RC\":\n\t\t\tsize = size_of_rc(instruction);\n\t\t\tbreak;\n\t\tcase \"RNC\":\n\t\t\tsize = size_of_rnc(instruction);\n\t\t\tbreak;\n\t\tcase \"RP\":\n\t\t\tsize = size_of_rp(instruction);\n\t\t\tbreak;\n\t\tcase \"RM\":\n\t\t\tsize = size_of_rm(instruction);\n\t\t\tbreak;\n\t\tcase \"RPE\":\n\t\t\tsize = size_of_rpe(instruction);\n\t\t\tbreak;\n\t\tcase \"RPO\":\n\t\t\tsize = size_of_rpo(instruction);\n\t\t\tbreak;\n\t\tcase \"PCHL\":\n\t\t\tsize = size_of_pchl(instruction);\n\t\t\tbreak;\n\t\tcase \"IN\":\n\t\t\tsize = size_of_in(instruction);\n\t\t\tbreak;\n\t\tcase \"OUT\":\n\t\t\tsize = size_of_out(instruction);\n\t\t\tbreak;\n\t\tcase \"PUSH\":\n\t\t\tsize = size_of_push(instruction);\n\t\t\tbreak;\n\t\tcase \"POP\":\n\t\t\tsize = size_of_pop(instruction);\n\t\t\tbreak;\n\t\tcase \"XTHL\":\n\t\t\tsize = size_of_xthl(instruction);\n\t\t\tbreak;\n\t\tcase \"SPHL\":\n\t\t\tsize = size_of_sphl(instruction);\n\t\t\tbreak;\n\t\t}\n\t\treturn size;\n\t}",
"public Long calculateDistanceVision() {\n return this.getVision() + lazyPlayboardActor.get().getCarte().getCarte().getValue(this.point).getVisionAdvantage();\n }",
"public Double getProbTagGiven2Tag(String t1, String t2, String t3) {\n\r\n\t\treturn l1 * uModel.freq(t1) + l2 * biModel.freq(t2, t1) + l3\r\n\t\t\t\t* triModel.freq(t2 + \" \" + t3, t1);\r\n\t}"
]
| [
"0.6363708",
"0.5683441",
"0.56569654",
"0.56209964",
"0.5620038",
"0.557339",
"0.530368",
"0.52743995",
"0.5180156",
"0.5169557",
"0.5163215",
"0.51535916",
"0.5106787",
"0.5079684",
"0.50385517",
"0.5034738",
"0.5029109",
"0.50142974",
"0.5009751",
"0.49950692",
"0.4989574",
"0.49889565",
"0.49691528",
"0.49595454",
"0.49560207",
"0.49387753",
"0.4921486",
"0.49170804",
"0.4914469",
"0.49053144",
"0.48969913",
"0.48966473",
"0.4892243",
"0.48867738",
"0.48844895",
"0.48844194",
"0.48840186",
"0.4868818",
"0.48678017",
"0.4861376",
"0.48503596",
"0.48489496",
"0.4831504",
"0.48309422",
"0.482968",
"0.4815346",
"0.4807906",
"0.47972038",
"0.4773382",
"0.4772824",
"0.47587514",
"0.4756622",
"0.47530657",
"0.47511643",
"0.47341",
"0.4722895",
"0.47204068",
"0.47067928",
"0.4698722",
"0.46933284",
"0.4692901",
"0.46913087",
"0.4689765",
"0.46843895",
"0.46823564",
"0.46798417",
"0.4676962",
"0.4675484",
"0.4675354",
"0.46711844",
"0.4670116",
"0.46697128",
"0.4661913",
"0.46575248",
"0.46571195",
"0.46482056",
"0.46482056",
"0.46324185",
"0.46304762",
"0.46294928",
"0.46276897",
"0.4621663",
"0.46212763",
"0.46076694",
"0.46037745",
"0.46024463",
"0.4602355",
"0.46004698",
"0.4593929",
"0.45939222",
"0.4591379",
"0.4584698",
"0.45825374",
"0.45794067",
"0.45750785",
"0.457426",
"0.4572849",
"0.45704612",
"0.45685893",
"0.4567973"
]
| 0.6659951 | 0 |
Delete logical link, in fact remove patch wiring and update links used value. | private void addDeclementLogicalLink(Connection conn, LogicalLink link, MultivaluedMap<String, SetFlowToOFC> reducedFlows) throws SQLException {
PortData inPort = link.getLink().get(0);
/* get route */
Map<String, Object> logicalLinkMap = dao.getLogicalLinkFromNodeNamePortName(conn, inPort.getDeviceName(), inPort.getPortName());
List<Map<String, Object>> routeMapList = dao.getRouteFromLogicalLinkId(conn, (String)logicalLinkMap.get("rid"));
if (routeMapList == null || routeMapList.isEmpty()) {
throw new RuntimeException(String.format(NOT_FOUND, "route=" + link));
}
Map<String, Object> txRouteMap = routeMapList.get(0);
Map<String, Object> rxRouteMap = routeMapList.get(routeMapList.size() - 1);
/* calc patch band width */
long bandOverHead = 0L;
long band = 0L;
{
Map<String, Object> txLinkMap = dao.getCableLinkFromInPortRid(conn, (String)txRouteMap.get("in_port_id"));
Map<String, Object> rxLinkMap = dao.getCableLinkFromInPortRid(conn, (String)rxRouteMap.get("out_port_id"));
long txBand = this.getBandWidth(conn, (String)txLinkMap.get("inDeviceName"), (String)txLinkMap.get("inPortName"));
long rxBand = this.getBandWidth(conn, (String)rxLinkMap.get("inDeviceName"), (String)rxLinkMap.get("inPortName"));
long txOfpBand = this.getBandWidth(conn, (String)txLinkMap.get("outDeviceName"), (String)txLinkMap.get("outPortName"));
long rxOfpBand = this.getBandWidth(conn, (String)rxLinkMap.get("outDeviceName"), (String)rxLinkMap.get("outPortName"));
band = (txBand < rxBand) ? txBand: rxBand;
band = (band < txOfpBand)? band: txOfpBand;
band = (band < rxOfpBand)? band: rxOfpBand;
bandOverHead = this.calcVlanTagOverhead(band);
}
/* update link-used-value and make patch link for ofc */
List<String> alreadyProcCable = new ArrayList<String>();
for (Map<String, Object> routeMap : routeMapList) {
Map<String, Object> OfpsMap = dao.getNodeInfoFromDeviceName(conn, (String) routeMap.get("node_name"));
long used = band + bandOverHead;
String inPortRid = (String)routeMap.get("in_port_id");
Map<String, Object> inLink = dao.getCableLinkFromInPortRid(conn, inPortRid);
String inCableRid = (String)inLink.get("rid");
if (!alreadyProcCable.contains(inCableRid) && (OfpsMap.get("type").equals("Spine") || OfpsMap.get("type").equals("Leaf"))) {
long newUsed = this.calcReduceCableLinkUsed(conn, inLink, used);
dao.updateCableLinkUsedFromPortRid(conn, inPortRid, newUsed);
alreadyProcCable.add(inCableRid);
}
String outPortRid = (String)routeMap.get("out_port_id");
Map<String, Object> outLink = dao.getCableLinkFromOutPortRid(conn, outPortRid);
String outCableRid = (String)outLink.get("rid");
if (!alreadyProcCable.contains(outCableRid) && (OfpsMap.get("type").equals("Spine") || OfpsMap.get("type").equals("Leaf"))) {
long newUsed = this.calcReduceCableLinkUsed(conn, outLink, used);
dao.updateCableLinkUsedFromPortRid(conn, outPortRid, newUsed);
alreadyProcCable.add(outCableRid);
}
}
Map<String, Object> txOfpsMap = dao.getNodeInfoFromDeviceName(conn, (String) txRouteMap.get("node_name"));
Map<String, Object> txInPortMap = dao.getPortInfoFromPortName(conn, (String) txRouteMap.get("node_name"), (String) txRouteMap.get("in_port_name"));
Map<String, Object> txOutPortMap = dao.getPortInfoFromPortName(conn, (String) txRouteMap.get("node_name"), (String) txRouteMap.get("out_port_name"));
Map<String, Object> rxOfpsMap = dao.getNodeInfoFromDeviceName(conn, (String) rxRouteMap.get("node_name"));
Map<String, Object> rxOutPortMap = dao.getPortInfoFromPortName(conn, (String) rxRouteMap.get("node_name"), (String) rxRouteMap.get("out_port_name"));
OFCClient client = new OFCClientImpl();
if (routeMapList.size() == 1 ) {
String ofcIp = (String)txOfpsMap.get("ip") + ":" + Integer.toString((Integer)txOfpsMap.get("port"));
SetFlowToOFC requestData = client.createRequestData(Long.decode((String)txOfpsMap.get("datapathId")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);
Integer inPortNumber = (Integer)txInPortMap.get("number");
client.createMatchForInPort(requestData, inPortNumber.longValue());
reducedFlows.add(ofcIp, requestData);
Integer outPortNumber = (Integer)txOutPortMap.get("number");
requestData = client.createRequestData(Long.decode((String)txOfpsMap.get("datapathId")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);
client.createMatchForInPort(requestData, outPortNumber.longValue());
reducedFlows.add(ofcIp, requestData);
/* delete route */
dao.deleteRouteFromLogicalLinkRid(conn, (String)logicalLinkMap.get("rid"));
/* delete logical link */
dao.deleteLogicalLinkFromNodeNamePortName(conn, inPort.getDeviceName(), inPort.getPortName());
return;
}
/* make flow edge-switch tx side */
{
String ofcIp = (String)txOfpsMap.get("ip") + ":" + Integer.toString((Integer)txOfpsMap.get("port"));
SetFlowToOFC requestData = client.createRequestData(Long.decode((String)txOfpsMap.get("datapathId")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);
Integer inPortNumber = (Integer)txInPortMap.get("number");
client.createMatchForInPort(requestData, inPortNumber.longValue());
reducedFlows.add(ofcIp, requestData);
requestData = client.createRequestData(Long.decode((String)txOfpsMap.get("datapathId")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);
client.createMatchForDlVlan(requestData, (Long)logicalLinkMap.get("nw_instance_id"));
reducedFlows.add(ofcIp, requestData);
}
/* make flow edge-switch rx side */
{
String ofcIp = (String)rxOfpsMap.get("ip") + ":" + Integer.toString((Integer)rxOfpsMap.get("port"));
SetFlowToOFC requestData = client.createRequestData(Long.decode((String)rxOfpsMap.get("datapathId")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);
Integer inPortNumber = (Integer)rxOutPortMap.get("number");
client.createMatchForInPort(requestData, inPortNumber.longValue());
reducedFlows.add(ofcIp, requestData);
requestData = client.createRequestData(Long.decode((String)rxOfpsMap.get("datapathId")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);
client.createMatchForDlVlan(requestData, (Long)logicalLinkMap.get("nw_instance_id"));
reducedFlows.add(ofcIp, requestData);
}
/* make flow internal switch */
{
for (int i = 1; i < routeMapList.size() - 1; i++) {
String node_name = (String)routeMapList.get(i).get("node_name");
Map<String, Object> ofpsMap = dao.getNodeInfoFromDeviceName(conn, node_name);
if(ofpsMap.get("type").equals(NODE_TYPE_SPINE))
{
String ofcIp = (String)ofpsMap.get("ip") + ":" + Integer.toString((Integer)ofpsMap.get("port"));
SetFlowToOFC requestData = client.createRequestData(Long.decode((String)ofpsMap.get("datapathId")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);
client.createMatchForDlVlan(requestData, (Long)logicalLinkMap.get("nw_instance_id"));
reducedFlows.add(ofcIp, requestData);
}
else if(ofpsMap.get("type").equals(NODE_TYPE_AGGREGATE_SW))
{
String ofcIp = (String)ofpsMap.get("ip") + ":" + Integer.toString((Integer)ofpsMap.get("port"));
SetFlowToOFC requestData = client.createRequestData(Long.decode((String)ofpsMap.get("datapathId")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);
client.createMatchForDlVlan(requestData, (Long)logicalLinkMap.get("nw_instance_id"));
reducedFlows.add(ofcIp, requestData);
}
}
}
/* delete route */
dao.deleteRouteFromLogicalLinkRid(conn, (String)logicalLinkMap.get("rid"));
/* delete logical link */
dao.deleteLogicalLinkFromNodeNamePortName(conn, inPort.getDeviceName(), inPort.getPortName());
/* delete Outer_tag table */
//dao.DeleteOutertagflows(conn,(Long)logicalLinkMap.get("nw_instance_id"));
return;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic int delLink(Link link) {\n\t\treturn 0;\n\t}",
"public void removeDeviceServiceLink();",
"public void deletelink(Integer linkId);",
"public void deleteLink(IHyperLink link)\n throws OculusException;",
"private void linkRemoved(Link link) {\n\n\t}",
"boolean removeLink(Link link);",
"public void removeServiceEntry(String linkName);",
"protected void _removeLinks() throws java.rmi.RemoteException, javax.ejb.RemoveException {\n\tjava.util.Enumeration links = _getLinks().elements();\n\twhile (links.hasMoreElements()) {\n\t\ttry {\n\t\t\t((com.ibm.ivj.ejb.associations.interfaces.Link) (links.nextElement())).remove();\n\t\t}\n\t\tcatch (javax.ejb.FinderException e) {} //Consume Finder error since I am going away\n\t}\n}",
"public void unsetObservationDataLink()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_attribute(OBSERVATIONDATALINK$18);\r\n }\r\n }",
"boolean delete(String linkId);",
"protected void _removeLinks() throws java.rmi.RemoteException, javax.ejb.RemoveException {\n\t\tjava.util.List links = _getLinks();\n\t\tfor (int i = 0; i < links.size(); i++) {\n\t\t\ttry {\n\t\t\t\t((com.ibm.ivj.ejb.associations.interfaces.Link) links.get(i)).remove();\n\t\t\t} catch (javax.ejb.FinderException e) {\n\t\t\t} //Consume Finder error since I am going away\n\t\t}\n\t}",
"void resetLink(Link link, Node source, Node target, Dependency type) {\n\t\tlinks.remove(link);\n\t\tlinks.add(new Link(source, target, type, source));\n\t}",
"@Override\n\tpublic void deleteLinkmanById(long id) {\n\t\tmapper.deleteByPrimaryKey(id);\n\t}",
"@Transactional\n public void remove(ExtensionLinkEntity link) {\n EntityManager entityManager = entityManagerProvider.get();\n link = findById(link.getLinkId());\n if (null != link) {\n entityManager.remove(link);\n }\n }",
"int deleteByPrimaryKey(Integer linkid);",
"private void clearLinks() {\n links_ = emptyProtobufList();\n }",
"public void deleteLink(String spid, Link link) throws EVDBRuntimeException, EVDBAPIException {\n\t\t\n\t\tMap<String, String> params = new HashMap();\n\t\t\n\t\tparams.put(\"user\", APIConfiguration.getEvdbUser());\n\t\tparams.put(\"password\", APIConfiguration.getEvdbPassword());\n\t\t\n\t\t//modify needs this to be set\n\t\tparams.put(\"link_id\", String.valueOf(link.getId()));\n\t\tparams.put(\"id\", spid);\n\t\t\n\t\tInputStream is = serverCommunication.invokeMethod(PERFORMERS_LINKS_DELETE, params);\n\t\t\n\t\tunmarshallRequest(GenericResponse.class, is);\n\n\t}",
"public void onUnlink()\n {\n getTextArea().setFocus(true);\n// clientJupiter.generate(treeOperationFactory.createLink(clientJupiter.getSiteId(),\n// getTextArea().getDocument().getSelection().getRangeAt(0), linkConfig.getUrl()));\n Console.getInstance().log(\"RTP: onUnlink\");\n }",
"public void remove() {\r\n\t\theadNode.link = headNode.link.link;\r\n\t\tsize--;\r\n\t}",
"@Test\n\tpublic void deletingAReferencedResourceRemovesReference() {\n\t\tfinal PhysicalElement pe = resMan.createResource(newResourceName(), PhysicalElement.class);\n\t\tfinal PhysicalElement pe2 = resMan.createResource(newResourceName(), PhysicalElement.class);\n\n\t\tpe2.location().create();\n\t\tpe.location().setAsReference(pe2.location());\n\n\t\tassertExists(pe2.location());\n\t\tassertFalse(pe2.location().isReference(false));\n\t\tassertExists(pe.location());\n\t\tassertTrue(pe.location().isReference(false));\n\n\t\tpe2.location().delete();\n\t\tassertDeleted(pe2.location());\n\t\tassertDeleted(pe.location());\n\t\tassertFalse(pe.location().isReference(false));\n\t}",
"public void unlinkLR()\n {\n this.L.R = this.R;\n this.R.L = this.L;\n }",
"public void delHsExtendedRef(SomeRelation value){\n ((ExtendedRefHSDMO) core).delHsExtendedRef(value);\n }",
"public void unsetRoadwayRef()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_attribute(ROADWAYREF$16);\r\n }\r\n }",
"void clearLinks();",
"private void normalizeLogicalLink(Collection<OfpConDeviceInfo> nodes, Collection<LogicalLink> links) {\n\t\tfinal String fname = \"normalizeLogicalLink\";\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(String.format(\"%s(nodes=%s, links=%s) - start\", fname, nodes, links));\n\t\t}\n\n\t\tList<LogicalLink> removalLinks = new ArrayList<LogicalLink>();\n\t\tfor (LogicalLink link : links) {\n\t\t\tList<PortData> ports = link.getLink();\n\t\t\tif (!OFPMUtils.nodesContainsPort(nodes, ports.get(0).getDeviceName(), null)) {\n\t\t\t\tremovalLinks.add(link);\n\t\t\t} else if (!OFPMUtils.nodesContainsPort(nodes, ports.get(1).getDeviceName(), null)) {\n\t\t\t\tremovalLinks.add(link);\n\t\t\t}\n\t\t}\n\t\tlinks.removeAll(removalLinks);\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(String.format(\"%s() - end\", fname));\n\t\t}\n\t}",
"public void delete() {\n\t\t// pre: length>0\n\t\t// post: delete one node from the end; reduce length\n\t\tif (this.length > 0) {\n\t\t\tCLL_LinkNode temp_node = this.headNode ;\n\t\t\tfor (int i = 1; i < this.length-1; i++) {\n\t\t\t\ttemp_node = temp_node.getNext();\n\t\t\t}\n\t\t\ttemp_node.getNext().setNext(null);\n\t\t\ttemp_node.setNext(this.headNode);\n\t\t\tthis.length--;\n\t\t}\n\t}",
"public void removeSemanticLink(IBusinessObject dest, LinkKind type)\n throws OculusException;",
"public void delIncomingRelations();",
"public void delRelations();",
"int deleteByExample(TLinkmanExample example);",
"public void clearLinks(){\r\n varContextObject=null; \r\n varContextFields=null; \r\n }",
"void removeLine(PNode c){\n\t\tLinkSet ls = null;\n\t\tLink l = null;\n\t\tLinkSet ls1 = new LinkSet();\n\t\tfor(int i=0;i<linksets.size();i++){\n\t\t\tfor(int j=0;j<linksets.get(i).getLinks().size();j++){\n\t\t\t\tif(c==linksets.get(i).getLinks().get(j).getNode1()||c==linksets.get(i).getLinks().get(j).getNode2()){\n\t\t\t\t\tls = linksets.get(i);\n\t\t\t\t\tl = ls.getLinks().get(j);\n\t\t\t\t\tls.removeLink(l);\n\t\t\t\t\tif(ls.getLinks().size()==0){\n\t\t\t\t\t\tlinksets.remove(ls);//remove linkset if it is empty\n\t\t\t\t\t\tls = null;\n\t\t\t\t\t\tl = null;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(ls!=null){\n\t\t\tLink tlink = null;\n\t\t\tfor(Link lnk: ls.getLinks()){\n\t\t\t\tif(lnk.getNode1().getOwner()==l.getNode1().getOwner() && lnk.getNode1().getSignal()==l.getNode1().getSignal()\n\t\t\t\t\t\t|| lnk.getNode2().getOwner()==l.getNode1().getOwner() && lnk.getNode2().getSignal()==l.getNode1().getSignal()){\n\t\t\t\t\ttlink = lnk;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\tif(tlink!=null){\n\t\t\t\tls1.addLink(tlink);\n\t\t\t\tls.removeLink(tlink);\n\t\t\t\tcheckForNextLink(ls1, ls, tlink);\n\t\t\t}\n\t\t\tif(ls.getLinks().size()==0){\n\t\t\t\tlinksets.remove(ls);\n\t\t\t}\n\t\t\tlinksets.add(ls1);\n\t\t}\n\t\tfor(int i=0; i<links.size();i++){\n\t\t\tLink lnk = links.get(i);\n\t\t\tif (c == lnk.getNode1() || c == lnk.getNode2()){\n\t\t\t\tlayer.removeChild(links.get(i).getPPath());\n\t\t\t\tlinks.remove(i);\n\t\t\t\tremoveLine(c);\n\t\t\t}\n\t\t}\n\t}",
"public void _unlinkClient(ModelElement client1);",
"private void removeLinks(int index) {\n ensureLinksIsMutable();\n links_.remove(index);\n }",
"public static void delete(Nodelink node){\n\n Nodelink temp = node.next;\n node = null;\n\n node = temp;\n\n }",
"LinkedService delete(String resourceGroupName, String workspaceName, String linkedServiceName);",
"public void removeFromImages(final SessionContext ctx, final GPImageLinkComponent value)\n\t{\n\t\tremoveLinkedItems( \n\t\t\tctx,\n\t\t\ttrue,\n\t\t\tGpcommonaddonConstants.Relations.BRANDBAR2GPIMAGELINKRELATION,\n\t\t\tnull,\n\t\t\tCollections.singletonList(value),\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t\tUtilities.getMarkModifiedOverride(BRANDBAR2GPIMAGELINKRELATION_MARKMODIFIED)\n\t\t);\n\t}",
"void delete(String resourceGroupName, String searchServiceName, String sharedPrivateLinkResourceName);",
"public void clearLinkRemovalTags() {\n\tfor (Link l : allLinks)\n\t l.clearRemovalTag();\n }",
"void deleteRule(long ruleID, boolean dropPendingCmdlets) throws IOException;",
"LinkedService deleteById(String id);",
"private void deleteResource() {\n }",
"private void deleteLinkPrihRash(Integer argDocument) throws Exception {\n\t\tlogIt(\"Deleting linkprihrash\");\n\t\tDocumentPositionAccessBean adocp = new DocumentPositionAccessBean();\n\t\tEnumeration dposes = adocp.findDocPositionsByDocOrderByOrderAsc(argDocument);\n\t\twhile (dposes.hasMoreElements()) {\n\t\t\tDocumentPositionAccessBean docpos = (DocumentPositionAccessBean)dposes.nextElement();\n\t\t\ttry {\n\t\t\t\tPIEDocInfoDocPosAccessBean dopinfo = new PIEDocInfoDocPosAccessBean();\n\t\t\t\tdopinfo.setInitKey_docposition(docpos.getDocposition());\n\t\t\t\tdopinfo.refreshCopyHelper();\n\t\t\t\tdopinfo.getEJBRef().remove();\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"PLATINUM-SYNC: dopinfo docposition not found - cannot remove\");\n\t\t\t\te.printStackTrace(System.out);\n\t\t\t}\n\t\t\tPIELinkPrihRashAccessBean pielink = new PIELinkPrihRashAccessBean();\n\t\t\tEnumeration pielinkps = pielink.findByDocposPrihod(new Integer(docpos.getDocposition()));\n\t\t\twhile (pielinkps.hasMoreElements()) {\n\t\t\t\tPIELinkPrihRashAccessBean tpielink = (PIELinkPrihRashAccessBean)pielinkps.nextElement();\n\t\t\t\ttry {\n\t\t\t\t\ttpielink.getEJBRef().remove();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.out.println(\"PLATINUM-SYNC: linkprihrash docposition not found - cannot remove\");\n\t\t\t\t\te.printStackTrace(System.out);\n\t\t\t\t}\n\t\t\t}\n\t\t\tpielinkps = pielink.findByDocposRashod(new Integer(docpos.getDocposition()));\n\t\t\twhile (pielinkps.hasMoreElements()) {\n\t\t\t\tPIELinkPrihRashAccessBean tpielink = (PIELinkPrihRashAccessBean)pielinkps.nextElement();\n\t\t\t\ttry {\n\t\t\t\t\ttpielink.getEJBRef().remove();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.out.println(\"PLATINUM-SYNC: linkprihrash docposition not found - cannot remove\");\n\t\t\t\t\te.printStackTrace(System.out);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void delete(T aData) {\r\n\t\tListNode temp = head;\r\n\t\twhile (temp != null) {\r\n\t\t\tif (temp.link.data.equals(aData)) {\r\n\t\t\t\ttemp.link = temp.link.link;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\ttemp = temp.link;\r\n\t\t}\r\n\t}",
"void removeHadithUrl(Object oldHadithUrl);",
"protected void removeReference()\n {\n }",
"public static com.agbar.intranet.quienesquien.model.Link deleteLink(\n\t\tcom.agbar.intranet.quienesquien.model.Link link)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn getService().deleteLink(link);\n\t}",
"public void Free_SSL(int k){\n // Link deleted element to a alternate link list\n // Let free element become the second element of alternate link list\n StaticLinkList[k].cur = StaticLinkList[0].cur;\n // Let the deleted element become the first element of alternate link list\n StaticLinkList[0].cur = k;\n }",
"ArrayMap<Integer,DefinedProperty> relDelete( long relId );",
"@Test\n\tpublic void testRemoveLinkComponentDeleteOrphanedFromDoc() {\n\t\tAddressBook adrbook = new AddressBook();\n\t\tDocument doc = new Document(adrbook);\n\t\tAssert.assertSame(doc.findBeansByType(\"org.rapidbeans.test.codegen.AddressBook\").get(0), doc.getRoot());\n\t\tPerson martin = new Person(new String[] { \"Bl�mel\", \"Martin\", \"19641014\" });\n\t\tadrbook.addPerson(martin);\n\t\tAssert.assertSame(martin, ((ReadonlyListCollection<?>) adrbook.getPersons()).get(0));\n\t\tAssert.assertSame(martin, doc.findBeansByType(\"org.rapidbeans.test.codegen.Person\").get(0));\n\t\tAddress fasanstreet = new Address();\n\t\tfasanstreet.setStreet(\"Fasanenstra�e\");\n\t\tadrbook.addAddress(fasanstreet);\n\t\tAssert.assertNull(fasanstreet.getInhabitants());\n\t\tfasanstreet.addInhabitant(martin);\n\t\tAssert.assertEquals(1, fasanstreet.getInhabitants().size());\n\t\tAssert.assertSame(fasanstreet, martin.getAddress());\n\t\tadrbook.removeAddress(fasanstreet);\n\t\tAssert.assertEquals(0, fasanstreet.getInhabitants().size());\n\t}",
"@Override\n public ListenableFuture<RpcResult<DeleteTapiLinkOutput>> deleteTapiLink(DeleteTapiLinkInput input) {\n try {\n InstanceIdentifier<Link> linkIID = InstanceIdentifier.builder(Context.class)\n .augmentation(Context1.class).child(TopologyContext.class).child(Topology.class,\n new TopologyKey(tapiTopoUuid)).child(Link.class, new LinkKey(input.getUuid())).build();\n this.networkTransactionService.delete(LogicalDatastoreType.OPERATIONAL, linkIID);\n this.networkTransactionService.commit().get();\n LOG.info(\"TAPI link deleted successfully.\");\n return RpcResultBuilder.success(new DeleteTapiLinkOutputBuilder()\n .setResult(\"Link successfully deleted from tapi topology\").build()).buildFuture();\n } catch (InterruptedException | ExecutionException e) {\n LOG.error(\"Failed to delete TAPI link\", e);\n return RpcResultBuilder.<DeleteTapiLinkOutput>failed()\n .withError(ErrorType.RPC, \"Failed to delete link from topology\")\n .buildFuture();\n }\n }",
"private void deleteConnections() {\n for (int i = 0; !this.sourceConnections.isEmpty(); ) {\n LinkElement wire = (LinkElement) this.sourceConnections.get(i);\n wire.detachSource();\n wire.detachTarget();\n this.graphElement.removeEdge(wire.getEdgeId(), wire);\n }\n\n for (int i = 0; !this.targetConnections.isEmpty(); ) {\n LinkElement wire = (LinkElement) this.targetConnections.get(i);\n wire.detachSource();\n wire.detachTarget();\n this.graphElement.removeEdge(wire.getEdgeId(), wire);\n }\n }",
"LinkedService delete(String resourceGroupName, String workspaceName, String linkedServiceName, Context context);",
"@Test\r\n\tpublic void deleteResourceTest() {\n\t\tLibraryNode ln = ml.createNewLibrary(\"http://example.com/resource\", \"RT\", pc.getDefaultProject());\r\n\t\tBusinessObjectNode bo = ml.addBusinessObjectToLibrary(ln, \"MyBo\");\r\n\t\tResourceNode rn = ml.addResource(bo);\r\n\t\tcheck(rn);\r\n\r\n\t\t// Given\r\n\t\tCollection<TypeUser> l1 = bo.getWhereAssigned();\r\n\t\tCollection<TypeUser> l2 = bo.getWhereUsedAndDescendants();\r\n\t\tassertTrue(\"Resource must be in subject's where assigned list.\", bo.getWhereAssigned().contains(rn));\r\n\t\tassertTrue(\"Resource must have a subject.\", rn.getSubject() == bo);\r\n\t\tassertTrue(\"Resource must be in subject's where-used list.\", bo.getWhereUsedAndDescendants().contains(rn));\r\n\r\n\t\t// When - the resource is deleted\r\n\t\trn.delete();\r\n\r\n\t\t// Then\r\n\t\tassertTrue(\"Resource must be deleted.\", rn.isDeleted());\r\n\t\tassertTrue(\"Resource must NOT be in subject's where-used list.\", !bo.getWhereUsedAndDescendants().contains(rn));\r\n\t}",
"public void remHsExtendedRef(){\n ((ExtendedRefHSDMO) core).remHsExtendedRef();\n }",
"public void _unlinkSupplier(ModelElement supplier1);",
"void unsetFurtherRelations();",
"@Override\n public void deleteRuleAR() {\n }",
"void relRemoveProperty( long relId, int propertyKey );",
"public Set<Double> decrease(LinkSpecification spec);",
"public void removeRuleRef(org.semanticwb.model.RuleRef value);",
"@Override\n public void remove() {\n deleteFromModel();\n deleteEdgeEndpoints();\n\n setDeleted(true);\n if (!isCached()) {\n HBaseEdge cachedEdge = (HBaseEdge) graph.findEdge(id, false);\n if (cachedEdge != null) cachedEdge.setDeleted(true);\n }\n }",
"protected void setDeleteUrl(EditingPolicyHelper policyHelper, ObjectPropertyStatement ops) {\n RequestedAction action = new DropObjectPropStmt(subjectUri, propertyUri, objectUri);\n if ( ! policyHelper.isAuthorizedAction(action) ) { \n return;\n }\n \n if (propertyUri.equals(VitroVocabulary.IND_MAIN_IMAGE)) {\n deleteUrl = ObjectPropertyTemplateModel.getImageUploadUrl(subjectUri, \"delete\");\n } else {\n ParamMap params = new ParamMap(\n \"subjectUri\", subjectUri,\n \"predicateUri\", propertyUri,\n \"objectUri\", objectUri,\n \"cmd\", \"delete\");\n \n for ( String key : data.keySet() ) {\n String value = data.get(key);\n // Remove an entry with a null value instead of letting it get passed\n // as a param with an empty value, in order to align with behavior on\n // profile page. E.g., if statement.moniker is null, a test for \n // statement.moniker?? will yield different results if null on the \n // profile page but an empty string on the deletion page.\n if (value != null) {\n params.put(\"statement_\" + key, data.get(key));\n }\n }\n \n params.put(\"templateName\", templateName);\n \n params.putAll(UrlBuilder.getModelParams(vreq));\n \n deleteUrl = UrlBuilder.getUrl(EDIT_PATH, params);\n } \n }",
"public void removeAllRuleRef();",
"public final void clearLinks() {\n\t\tlockMe(this);\n\t\tlinks.clear();\n\t\tlinksFromDistance.clear();\n\t\tlinksToDistance.clear();\n\t\tunlockMe(this);\n\t}",
"public void removeLink(String link, TOSCAPlan buildPlan) {\n\t\tNodeList children = buildPlan.getBpelMainFlowLinksElement().getChildNodes();\n\t\tNode toRemove = null;\n\t\tfor (int i = 0; i < children.getLength(); i++) {\n\t\t\tif (children.item(i).getAttributes().getNamedItem(\"name\").getNodeValue().equals(link)) {\n\t\t\t\ttoRemove = children.item(i);\n\t\t\t}\n\t\t\tif (children.item(i).getAttributes().getNamedItem(\"name\").getTextContent().equals(link)) {\n\t\t\t\ttoRemove = children.item(i);\n\t\t\t}\n\n\t\t}\n\t\tif (toRemove != null) {\n\t\t\tbuildPlan.getBpelMainFlowLinksElement().removeChild(toRemove);\n\t\t}\n\n\t}",
"int deleteByExample(TempletLinkExample example);",
"public void deleteMediaRelation(MediaRelation mediarelation);",
"public void relinkLR()\n {\n this.L.R = this.R.L = this;\n }",
"public int deleteByResource(String lfn, String handle) {\n return delete(lfn,SITE_ATTRIBUTE,handle);\n }",
"private int handleUnlink(String name) {\n\t\tboolean succeeded = ThreadedKernel.fileSystem.remove(name);\n\t\t//if the file was not removed return error\n\t\tif(!succeeded)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\treturn 0;\n\t}",
"public void delRelation(XDI3Segment arcXri, XDI3Segment targetContextNodeXri);",
"protected void _initLinks() {\n\tpeopleLink = null;\n\tchangeLogDetailsesLink = null;\n}",
"@DISPID(1611005980) //= 0x6006001c. The runtime will prefer the VTID if present\n @VTID(55)\n boolean updateLinkedExternalReferences();",
"public void deleteLUC() {\r\n/* 135 */ this._has_LUC = false;\r\n/* */ }",
"private void delete(Node next) {\n\t\t\n\t}",
"public void delete(Long id) {\n log.debug(\"Request to delete ShortLink : {}\", id);\n shortLinkRepository.delete(id);\n }",
"private void removeCrossReference ()\n\t{\n\t\tif (crossReference != null)\n\t\t{\n\t\t\tcrossReferences.remove (crossReference);\n\t\t}\n\t}",
"public final void delete() {\n\t\tOllie.delete(this);\n\t\tOllie.removeEntity(this);\n\t\tnotifyChange();\n\t\tid = null;\n\t}",
"private void delete() {\n\n\t}",
"void removeHadithReferenceNo(Object oldHadithReferenceNo);",
"public void removeFromImages(final GPImageLinkComponent value)\n\t{\n\t\tremoveFromImages( getSession().getSessionContext(), value );\n\t}",
"public void deleteCurrent(){\r\n if(curr != null && prev != null){\r\n prev.link = curr.link;\r\n curr = curr.link;\r\n }\r\n else if(curr != null){\r\n head = head.link;\r\n curr = head;\r\n }\r\n\r\n }",
"public void removeExternalLink(ExternalLinkItem item) {\n getExternalLinks().remove(item);\n item.setProject(null);\n }",
"void kickNeighbor(Link l) {\n this.lsd.removeDiscoveredRouter(l.getRemoteRouterDesc().simulatedIPAddress);\n this.broadcastLSARemove(l.getRemoteRouterDesc());\n this.shutdownLink(l);\n }",
"void removeHadithBookUrl(Object oldHadithBookUrl);",
"private void removeContentAfterIndexLink()\r\n \t{\r\n \t\tdeleteNodes(XPath.AFTER_INDEX_LINK.query);\r\n \t}",
"private void cleanCollectedLinks() {\n for (Iterator itr = visitedLinks.iterator(); itr.hasNext(); ) {\n String thisURL = (String) itr.next();\n if (urlInLinkedList(NetworkUtils.makeURL(thisURL), collectedLinks)) {\n collectedLinks.remove(thisURL.toString());\n// Log.v(\"DLasync.cleanCollected\", \" from CollectedLinks, just cleaned: \" + thisURL);\n// Log.v(\".cleanCollected\", \" collected set is now:\" + collectedLinks.toString());\n }\n }\n\n }",
"public void delete()\n throws ROSRSException {\n annotation.deletePropertyValues(subject, property, merge ? null : value);\n if (annotation.getStatements().isEmpty()) {\n annotation.delete();\n } else {\n annotation.update();\n }\n value = null;\n }",
"public void deleteNetWS() {\r\n/* 142 */ this._has_netWS = false;\r\n/* */ }",
"@Override\n\t\tpublic void delete() {\n\n\t\t}",
"public void relinkUD()\n {\n this.U.D = this.D.U = this;\n }",
"void removeRelationship(DbRelationship rel) {\n objectList.remove(rel);\n fireTableDataChanged();\n }",
"public final void mT__61() throws RecognitionException {\n try {\n int _type = T__61;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:129:7: ( 'RemoveLink' )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:129:9: 'RemoveLink'\n {\n match(\"RemoveLink\"); if (state.failed) return ;\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"private void removePolicy(){\n\texcludedPermissions = null;\n\tuncheckedPermissions = null;\n\trolePermissionsTable = null;\n\tremovePolicyFile(true);\n\tremovePolicyFile(false);\n\tremovePolicyContextDirectory();\n\tinitLinkTable();\n\tpolicy = null;\n\twriteOnCommit = true;\n }",
"public void removeLink(int newID) {\n\t\tfor (int i = 0; i < routingTable.get(0).size(); i++) {\n\t\t\tif ((routingTable.get(0).get(i) == newID) || (routingTable.get(2).get(i) == newID)) {\n\t\t\t\troutingTable.get(1).set(i, -1);\n\t\t\t\troutingTable.get(2).set(i, -1);\n\t\t\t}\n\t\t}\n\t\tfor (Link l : links) {\n\t\t\tif (l.getDestination() == newID) {\n\t\t\t\tint idx = links.indexOf(l);\n\t\t\t\tSystem.out.println(links.get(idx).getDestination());\n\t\t\t\tlinks.remove(idx);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}",
"public void unlinkAll()\n // -end- 3D4FA2190370 head358A5F2B0354 \"unlinkAll\"\n // declare any checked exceptions\n // please fill in/modify the following section\n // -beg- preserve=no 3D4FA2190370 throws358A5F2B0354 \"unlinkAll\"\n\n // -end- 3D4FA2190370 throws358A5F2B0354 \"unlinkAll\"\n {\n // please fill in/modify the following section\n // -beg- preserve=no 3D4FA2190370 body358A5F2B0354 \"unlinkAll\"\n \n clearAttributeDef();\n super.unlinkAll();\n // -end- 3D4FA2190370 body358A5F2B0354 \"unlinkAll\"\n }",
"@Test\n\tpublic void testRemoveLinkComponent() {\n\t\tSubmenu root = new Submenu(\"root\");\n\t\tMenuItem item1 = new MenuItem(\"item1\");\n\t\troot.addMenuentry(item1);\n\t\tSubmenu submenu1 = new Submenu(\"submenu1\");\n\t\troot.addMenuentry(submenu1);\n\n\t\troot.removeMenuentry(submenu1);\n\t\tAssert.assertEquals(1, root.getMenuentrys().size());\n\t\tAssert.assertSame(item1, root.getMenuentrys().iterator().next());\n\t\tAssert.assertNull(submenu1.getParentBean());\n\t\troot.removeMenuentry(item1);\n\t\tAssert.assertEquals(0, root.getMenuentrys().size());\n\t\tAssert.assertNull(item1.getParentBean());\n\t}",
"public void removeNodeAfterThis() {\r\n\t\tif ( link != null ) {\r\n\t\t\tlink = link.link;\r\n\t\t} // end precondition\r\n\t}",
"@Test\r\n public void testRemove() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException\r\n {\r\n DoublyLinkedList<Integer> list = new DoublyLinkedList<Integer>();\r\n testLinks(list);\r\n list.insertTail(2);\r\n testLinks(list);\r\n list.insertHead(1);\r\n testLinks(list);\r\n list.insertTail(3);\r\n testLinks(list);\r\n list.insertTail(4);\r\n testLinks(list);\r\n\r\n Iterator<Integer> itr = list.iterator();\r\n assertEquals(4, list.size());\r\n assertEquals(\"[1, 2, 3, 4]\", list.toString());\r\n assertEquals(true, itr.hasNext());\r\n itr.remove();\r\n assertEquals(4, list.size());\r\n assertEquals(\"[1, 2, 3, 4]\", list.toString());\r\n assertEquals(true, itr.hasNext());\r\n testLinks(list);\r\n\r\n assertEquals(1, (int)itr.next());\r\n itr.remove();\r\n assertEquals(3, list.size());\r\n assertEquals(\"[2, 3, 4]\", list.toString());\r\n assertEquals(true, itr.hasNext());\r\n testLinks(list);\r\n itr.remove();\r\n assertEquals(3, list.size());\r\n assertEquals(\"[2, 3, 4]\", list.toString());\r\n assertEquals(true, itr.hasNext());\r\n testLinks(list);\r\n\r\n assertEquals(2, (int)itr.next());\r\n itr.remove();\r\n assertEquals(2, list.size());\r\n assertEquals(\"[3, 4]\", list.toString());\r\n assertEquals(true, itr.hasNext());\r\n testLinks(list);\r\n\r\n assertEquals(3, (int)itr.next());\r\n itr.remove();\r\n assertEquals(1, list.size());\r\n assertEquals(\"[4]\", list.toString());\r\n assertEquals(true, itr.hasNext());\r\n testLinks(list);\r\n\r\n assertEquals(4, (int)itr.next());\r\n itr.remove();\r\n assertEquals(0, list.size());\r\n assertEquals(\"[]\", list.toString());\r\n testLinks(list);\r\n itr.remove();\r\n assertEquals(0, list.size());\r\n assertEquals(\"[]\", list.toString());\r\n assertEquals(false, itr.hasNext());\r\n testLinks(list);\r\n }",
"protected void mutateDisableLink() {\n\t\tGene g = getRandomGene();\n\t\tg.enabled = false;\n\n\t\tif (Braincraft.gatherStats)\n\t\t\tBraincraft.genetics.add(\"link disable mutation \" + ID + \" \"\n\t\t\t\t\t+ g.innovation);\n\t}"
]
| [
"0.6990126",
"0.68104273",
"0.6746025",
"0.6635844",
"0.6577994",
"0.6459069",
"0.62481856",
"0.61539006",
"0.615071",
"0.61413777",
"0.60887516",
"0.6081989",
"0.60691535",
"0.60378534",
"0.5965778",
"0.5820625",
"0.58120644",
"0.58032876",
"0.5802889",
"0.57806975",
"0.57704735",
"0.5770038",
"0.575592",
"0.5732952",
"0.57251114",
"0.572348",
"0.56854916",
"0.56547016",
"0.5620614",
"0.5618671",
"0.5613633",
"0.5602958",
"0.5583464",
"0.5581188",
"0.5576163",
"0.55745274",
"0.55581564",
"0.55452955",
"0.55427104",
"0.5534055",
"0.5531359",
"0.5506475",
"0.54970974",
"0.54933554",
"0.54932725",
"0.5457386",
"0.5431039",
"0.54007924",
"0.5389628",
"0.53821784",
"0.5369485",
"0.5365509",
"0.5364033",
"0.53633934",
"0.53514075",
"0.5342688",
"0.53366596",
"0.5334178",
"0.53291833",
"0.530121",
"0.5282366",
"0.528231",
"0.527715",
"0.52684397",
"0.5262009",
"0.52590233",
"0.52573055",
"0.52569807",
"0.5255658",
"0.5252017",
"0.5246839",
"0.5240025",
"0.5238989",
"0.52297974",
"0.5225708",
"0.52180356",
"0.52093345",
"0.52040404",
"0.5202919",
"0.51779425",
"0.5164631",
"0.5158417",
"0.5155132",
"0.5150403",
"0.5143525",
"0.5142128",
"0.51345056",
"0.5130123",
"0.51291156",
"0.5125276",
"0.51193535",
"0.511902",
"0.51178616",
"0.5116996",
"0.51167274",
"0.5115868",
"0.51156723",
"0.5113918",
"0.5110012",
"0.5106391",
"0.5104122"
]
| 0.0 | -1 |
Create logical link, in fact insert patch wiring, update links used value, and then notify NCS. | private void addInclementLogicalLink(Connection conn, LogicalLink link, MultivaluedMap<String, SetFlowToOFC> augmentedFlows) throws SQLException, NoRouteException {
PortData tx = link.getLink().get(0);
PortData rx = link.getLink().get(1);
/* get rid of txPort/rxPort */
String txRid = null;
String rxRid = null;
String nwid = null;
{
Map<String, Object> txMap =
(StringUtils.isBlank(tx.getPortName()))
? dao.getNodeInfoFromDeviceName(conn, tx.getDeviceName())
: dao.getPortInfoFromPortName(conn, tx.getDeviceName(), tx.getPortName());
Map<String, Object> rxMap =
(StringUtils.isBlank(rx.getPortName()))
? dao.getNodeInfoFromDeviceName(conn, rx.getDeviceName())
: dao.getPortInfoFromPortName(conn, rx.getDeviceName(), rx.getPortName());
txRid = (String)txMap.get("rid");
rxRid = (String)rxMap.get("rid");
}
Map<String, Object> txDeviceMap = dao.getNodeInfoFromDeviceName(conn, tx.getDeviceName());
Map<String, Object> rxDeviceMap = dao.getNodeInfoFromDeviceName(conn, rx.getDeviceName());
/* get shortest path */
List<Map<String, Object>> path = dao.getShortestPath(conn, txRid, rxRid);
String path_route = "";
for(int i=0;i<path.size();i++)
{
if(path.get(i).get("node_name")!=null)
{
path_route += path.get(i).get("node_name")+"("+path.get(i).get("name")+")";
if(i+1!=path.size())
{
path_route += "<->";
}
}
}
System.out.println(path_route);
//search interpoint route
String before_rid = "";
String in_spine_id = "";
String out_spine_id = "";
List<String> network = new ArrayList<String>();
for(int i=0;i<path.size();i++)
{
if(path.get(i).get("node_name")!=null)
{
Map<String,Object> route = dao.getNodeInfoFromDeviceName(conn, path.get(i).get("node_name").toString());
if(!before_rid.equals(route.get("rid").toString()))
{
if(route.get("type").toString().equals("Spine") && in_spine_id.equals(""))
{
in_spine_id = route.get("rid").toString();
}
if(route.get("type").toString().equals("Aggregate_Switch"))
{
Map<String, Object> search_network = dao.getPortInfoFromPortName(conn,path.get(i).get("node_name").toString(),path.get(i).get("name").toString());
if(search_network.get("network")!=null && !search_network.get("network").equals(""))
{
network.add(search_network.get("network").toString());
}
}
if(route.get("type").toString().equals("Spine") && !network.isEmpty())
{
out_spine_id = route.get("rid").toString();
}
}
before_rid=route.get("rid").toString();
}
}
//catch of nwid. make use of spineID from outer_tag class
if(!network.isEmpty())
{
//search of Vlanid from path.
List<Map<String, Object>> nwid1 = dao.getNetworkidFromSpineid(conn, in_spine_id, out_spine_id,network.get(0).toString());
List<Map<String, Object>> nwid2 = dao.getNetworkidFromSpineid(conn, out_spine_id, in_spine_id,network.get(0).toString());
//not asigned to vlanid from estimate path, asigned to vlanid.
if((nwid1.isEmpty() && nwid2.isEmpty()))
{
String a = network.get(0);
nwid = dao.payoutNetworkid(conn, in_spine_id, out_spine_id,a);
}
else if(!nwid1.isEmpty())
{
Map<String, Object> networkid = nwid1.get(0);
nwid = networkid.get("outer_tag").toString();
}
else if(!nwid2.isEmpty())
{
Map<String, Object> networkid = nwid2.get(0);
nwid = networkid.get("outer_tag").toString();
}
}
/* search first/last port */
int txPortIndex = (StringUtils.isBlank(tx.getPortName()))? 1: 0;
int rxPortIndex = (StringUtils.isBlank(rx.getPortName()))? path.size() - 2: path.size() - 1;
Map<String, Object> txPort = path.get(txPortIndex);
Map<String, Object> rxPort = path.get(rxPortIndex);
Map<String, Object> txPortMap = dao.getPortInfoFromPortName(conn, (String)txPort.get("node_name"), (String)txPort.get("name"));
Map<String, Object> rxPortMap = dao.getPortInfoFromPortName(conn, (String)rxPort.get("node_name"), (String)rxPort.get("name"));
/* check patch wiring exist */
{
boolean isTxPatch = dao.isContainsLogicalLinkFromDeviceNamePortName(conn, (String)txPort.get("node_name"), (String)txPort.get("name"));
boolean isRxPatch = dao.isContainsLogicalLinkFromDeviceNamePortName(conn, (String)rxPort.get("node_name"), (String)rxPort.get("name"));
if (isTxPatch || isRxPatch) {
throw new NoRouteException(String.format(IS_NO_ROUTE, (String)txPort.get("node_name") + " " + (String)txPort.get("name"), (String)rxPort.get("node_name") + " " + (String)rxPort.get("name")));
}
}
/* get band width of port info */
Map<Map<String, Object>, Long> portBandMap = new HashMap<Map<String, Object>, Long>();
for (Map<String, Object> current : path) {
if (StringUtils.equals((String)current.get("class"), "port")) {
long band = this.getBandWidth(conn, (String)current.get("node_name"), (String)current.get("name"));
portBandMap.put(current, band);
}
}
/* conmute need band-width for patching */
long needBandOverHead = 0L;
long needBand = 0L;
{
long txBand = portBandMap.get(txPort);
long rxBand = portBandMap.get(rxPort);
long txNextBand = portBandMap.get(path.get(txPortIndex + 1));
long rxNextBand = portBandMap.get(path.get(rxPortIndex - 1));
needBand = ( txBand < rxBand)? txBand: rxBand;
needBand = (needBand < txNextBand)? needBand: txNextBand;
needBand = (needBand < rxNextBand)? needBand: rxNextBand;
needBandOverHead = this.calcVlanTagOverhead(needBand);
}
/* Update links used value */
for (int i = 1; i < path.size(); i++) {
Map<String, Object> nowV = path.get(i);
Map<String, Object> prvV = path.get(i - 1);
String nowClass = (String)nowV.get("class");
String prvClass = (String)prvV.get("class");
if (!StringUtils.equals(nowClass, "port") || !StringUtils.equals(prvClass, "port")) {
continue;
}
String nowPortRid = (String)nowV.get("rid");
String nowVparentDevType = (String)nowV.get("type");
String prvVparentDevType = (String)prvV.get("type");
Map<String, Object> cableLink = dao.getCableLinkFromInPortRid(conn, nowPortRid);
long nowUsed = (Integer)cableLink.get("used");
long inBand = portBandMap.get(nowV);
long outBand = portBandMap.get(prvV);
long maxBand = (inBand < outBand)? inBand: outBand;
long newUsed = 0;
if((StringUtils.equals(nowVparentDevType, NODE_TYPE_LEAF) && StringUtils.equals(prvVparentDevType, NODE_TYPE_SPINE)) ||
(StringUtils.equals(nowVparentDevType, NODE_TYPE_SPINE) && StringUtils.equals(prvVparentDevType, NODE_TYPE_LEAF))){
//newUsed = nowUsed + needBand +needBandOverHead;
newUsed = nowUsed + needBand;
if (newUsed > maxBand) {
throw new NoRouteException(String.format(NOT_FOUND, "Path"));
}
dao.updateCableLinkUsedFromPortRid(conn, nowPortRid, newUsed);
//Add balancing to AG - Sites_SW. Balancing is Used weight only.(not check of maxBand)
} else if((StringUtils.equals(nowVparentDevType, NODE_TYPE_SITES_SW) && StringUtils.equals(prvVparentDevType, NODE_TYPE_AGGREGATE_SW)) ||
(StringUtils.equals(nowVparentDevType, NODE_TYPE_AGGREGATE_SW) && StringUtils.equals(prvVparentDevType, NODE_TYPE_SITES_SW))){
newUsed = nowUsed + needBand +needBandOverHead;
}else {
continue;
}
}
/* Make ofpatch index list */
/* MEMO: Don't integrate to the loop for the above for easy to read. */
List<Integer> ofpIndexList = new ArrayList<Integer>();
for (int i = 1; i < path.size(); i++) {
Map<String, Object> nowV = path.get(i);
String nowClass = (String)nowV.get("class");
String devType = (String)nowV.get("type");
if (!StringUtils.equals(nowClass, "node")) {
continue;
}
if (!StringUtils.equals(devType, NODE_TYPE_LEAF) && !StringUtils.equals(devType, NODE_TYPE_SPINE) && !StringUtils.equals(devType, NODE_TYPE_AGGREGATE_SW)) {
continue;
}
ofpIndexList.add(new Integer(i));
}
String nw_instance_type = NETWORK_INSTANCE_TYPE;
Long nw_instance_id = dao.getNwInstanceId(conn);
if (nw_instance_id < 0) {
throw new NoRouteException(String.format(IS_FULL, "network instance id"));
}
/* insert logical link */
dao.insertLogicalLink(conn,
(String)txDeviceMap.get("rid"),
(String)txDeviceMap.get("name"),
(String)txPortMap.get("rid"),
(String)txPortMap.get("name"),
(String)rxDeviceMap.get("rid"),
(String)rxDeviceMap.get("name"),
(String)rxPortMap.get("rid"),
(String)rxPortMap.get("name"),
nw_instance_id,
nw_instance_type);
Map<String, Object> logicalLinkMap = dao.getLogicalLinkFromNodeNamePortName(conn, (String)txDeviceMap.get("name"), (String)txPortMap.get("name"));
for (int seq = 0; seq < ofpIndexList.size(); seq++) {
int i = ofpIndexList.get(seq);
/* insert frowarding patch wiring */
Map<String, Object> inPortDataMap = path.get(i-1);
Map<String, Object> ofpPortDataMap = path.get(i);
Map<String, Object> outPortDataMap = path.get(i+1);
dao.insertRoute(
conn,
seq + 1,
(String)logicalLinkMap.get("rid"),
(String)ofpPortDataMap.get("rid"),
(String)ofpPortDataMap.get("name"),
(String)inPortDataMap.get("rid"),
(String)inPortDataMap.get("name"),
(Integer)inPortDataMap.get("number"),
(String)outPortDataMap.get("rid"),
(String)outPortDataMap.get("name"),
(Integer)outPortDataMap.get("number"));
}
/* make SetFlowToOFC list for each ofcIp */
OFCClient client = new OFCClientImpl();
/* port to port patching */
if (ofpIndexList.size() == 1) {
int i = ofpIndexList.get(0);
Map<String, Object> inPortDataMap = path.get(i - 1);
Map<String, Object> ofpNodeData = path.get(i);
Map<String, Object> ofpNodeDataMap = dao.getNodeInfoFromDeviceName(conn, (String)ofpNodeData.get("name"));
Map<String, Object> outPortDataMap = path.get(i + 1);
String ofcIp = (String)ofpNodeDataMap.get("ip") + ":" + Integer.toString((Integer)ofpNodeDataMap.get("port"));
Integer inPortNumber = (Integer)inPortDataMap.get("number");
Integer outPortNumber = (Integer)outPortDataMap.get("number");
SetFlowToOFC requestData = client.createRequestData(Long.decode((String)ofpNodeDataMap.get("datapathId")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);
client.createMatchForInPort(requestData, inPortNumber.longValue());
client.createActionsForOutputPort(requestData, outPortNumber.longValue());
augmentedFlows.add(ofcIp, requestData);
requestData = client.createRequestData(Long.decode((String)ofpNodeDataMap.get("datapathId")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);
client.createMatchForInPort(requestData, outPortNumber.longValue());
client.createActionsForOutputPort(requestData, inPortNumber.longValue());
augmentedFlows.add(ofcIp, requestData);
return;
}
/* the first ofps flow */
{
int i = ofpIndexList.get(0);
Map<String, Object> inPortDataMap = path.get(i - 1);
Map<String, Object> ofpNodeData = path.get(i);
Map<String, Object> ofpNodeDataMap = dao.getNodeInfoFromDeviceName(conn, (String)ofpNodeData.get("name"));
Map<String, Object> outPortDataMap = path.get(i + 1);
String ofcIp = (String)ofpNodeDataMap.get("ip") + ":" + Integer.toString((Integer)ofpNodeDataMap.get("port"));
Integer inPortNumber = (Integer)inPortDataMap.get("number");
Integer outPortNumber = (Integer)outPortDataMap.get("number");
SetFlowToOFC requestData = client.createRequestData(Long.decode((String)ofpNodeDataMap.get("datapathId")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);
client.createMatchForInPort(requestData, inPortNumber.longValue());
client.createActionsForPushVlan(requestData, outPortNumber.longValue(), nw_instance_id);
augmentedFlows.add(ofcIp, requestData);
requestData = client.createRequestData(Long.decode((String)ofpNodeDataMap.get("datapathId")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);
client.createMatchForInPortDlVlan(requestData, outPortNumber.longValue(), nw_instance_id);
client.createActionsForPopVlan(requestData, inPortNumber.longValue());
augmentedFlows.add(ofcIp, requestData);
}
Boolean beforespinecheck = false;
/* spine ofs flow */
for (int i = 1; i < ofpIndexList.size() - 1; i++) {
/* insert frowarding patch wiring */
int index = ofpIndexList.get(i);
Map<String, Object> inPortDataMap = path.get(index-1);
Map<String, Object> ofpNodeData = path.get(index);
Map<String, Object> ofpNodeDataMap = dao.getNodeInfoFromDeviceName(conn, (String)ofpNodeData.get("name"));
Map<String, Object> outPortDataMap = path.get(index+1);
if(ofpNodeDataMap.get("type").equals("Spine"))
{
String ofcIp = (String)ofpNodeDataMap.get("ip") + ":" + Integer.toString((Integer)ofpNodeDataMap.get("port"));
Integer inPortNumber = (Integer)inPortDataMap.get("number");
Integer outPortNumber = (Integer)outPortDataMap.get("number");
SetFlowToOFC requestData = client.createRequestData(Long.decode((String)ofpNodeDataMap.get("datapathId")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);
client.createMatchForInPortDlVlan(requestData, inPortNumber.longValue(), nw_instance_id);
client.createActionsForOutputPort(requestData, outPortNumber.longValue());
augmentedFlows.add(ofcIp, requestData);
requestData = client.createRequestData(Long.decode((String)ofpNodeDataMap.get("datapathId")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);
client.createMatchForInPortDlVlan(requestData, outPortNumber.longValue(), nw_instance_id);
client.createActionsForOutputPort(requestData, inPortNumber.longValue());
augmentedFlows.add(ofcIp, requestData);
beforespinecheck = true;
}
else if(ofpNodeDataMap.get("type").equals("Aggregate_Switch"))
{
String ofcIp = (String)ofpNodeDataMap.get("ip") + ":" + Integer.toString((Integer)ofpNodeDataMap.get("port"));
Integer inPortNumber = (Integer)inPortDataMap.get("number");
Integer outPortNumber = (Integer)outPortDataMap.get("number");
SetFlowToOFC requestData = client.createRequestData(Long.decode((String)ofpNodeDataMap.get("datapathId")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);
if(beforespinecheck.equals(true))
{
client.createMatchForInPortDlVlan(requestData, inPortNumber.longValue(),nw_instance_id);
client.createActionsForPushOuter_tag(requestData, outPortNumber.longValue(),Long.parseLong(nwid),nw_instance_id);
augmentedFlows.add(ofcIp, requestData);
dao.insertOutertag(conn,nw_instance_id.toString(),nwid,(String)ofpNodeDataMap.get("datapathId"),inPortNumber.toString(),outPortNumber.toString(),"push",network.get(0).toString());
requestData = client.createRequestData(Long.decode((String)ofpNodeDataMap.get("datapathId")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);
client.createMatchForInPortDlVlan(requestData, outPortNumber.longValue(), Long.parseLong(nwid));
client.createActionsForPopOuter_tag(requestData, inPortNumber.longValue());
augmentedFlows.add(ofcIp, requestData);
beforespinecheck = false;
dao.insertOutertag(conn,nw_instance_id.toString(),nwid,(String)ofpNodeDataMap.get("datapathId"),outPortNumber.toString(),inPortNumber.toString(),"pop",network.get(0).toString());
}
else
{
client.createMatchForInPortDlVlan(requestData, outPortNumber.longValue(),nw_instance_id);
client.createActionsForPushOuter_tag(requestData, inPortNumber.longValue(), Long.parseLong(nwid),nw_instance_id);
augmentedFlows.add(ofcIp, requestData);
dao.insertOutertag(conn,nw_instance_id.toString(),nwid,(String)ofpNodeDataMap.get("datapathId"),outPortNumber.toString(),inPortNumber.toString(),"push",network.get(0).toString());
requestData = client.createRequestData(Long.decode((String)ofpNodeDataMap.get("datapathId")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);
client.createMatchForInPortDlVlan(requestData, inPortNumber.longValue(), Long.parseLong(nwid));
client.createActionsForPopOuter_tag(requestData, outPortNumber.longValue());
augmentedFlows.add(ofcIp, requestData);
dao.insertOutertag(conn,nw_instance_id.toString(),nwid,(String)ofpNodeDataMap.get("datapathId"),inPortNumber.toString(),outPortNumber.toString(),"pop",network.get(0).toString());
}
}
}
/* the final ofps flow */
{
int i = ofpIndexList.get(ofpIndexList.size() - 1);
Map<String, Object> inPortDataMap = path.get(i + 1);
Map<String, Object> ofpNodeData = path.get(i);
Map<String, Object> ofpNodeDataMap = dao.getNodeInfoFromDeviceName(conn, (String)ofpNodeData.get("name"));
Map<String, Object> outPortDataMap = path.get(i - 1);
String ofcIp = (String)ofpNodeDataMap.get("ip") + ":" + Integer.toString((Integer)ofpNodeDataMap.get("port"));
Integer inPortNumber = (Integer)inPortDataMap.get("number");
Integer outPortNumber = (Integer)outPortDataMap.get("number");
SetFlowToOFC requestData = client.createRequestData(Long.decode((String)ofpNodeDataMap.get("datapathId")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);
client.createMatchForInPort(requestData, inPortNumber.longValue());
client.createActionsForPushVlan(requestData, outPortNumber.longValue(), nw_instance_id);
augmentedFlows.add(ofcIp, requestData);
requestData = client.createRequestData(Long.decode((String)ofpNodeDataMap.get("datapathId")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);
client.createMatchForInPortDlVlan(requestData, outPortNumber.longValue(), nw_instance_id);
client.createActionsForPopVlan(requestData, inPortNumber.longValue());
augmentedFlows.add(ofcIp, requestData);
}
return;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void mutateAddLink() {\n\t\t// Make sure network is not fully connected\n\n\t\t// Sum number of connections\n\t\tint totalconnections = numGenes();\n\n\t\t// Find number of each type of node\n\t\tint in = population.numInputs;\n\t\tint out = population.numOutputs;\n\t\tint hid = numNodes() - (in + out);\n\n\t\t// Find the number of possible connections.\n\t\t// Links cannot end with an input\n\t\tint fullyconnected = 0;\n\t\tfullyconnected = (in + out + hid) * (out + hid);\n\n\t\tif (totalconnections == fullyconnected)\n\t\t\treturn;\n\n\t\t// Pick 2 nodes for a new connection and submit it\n\t\tNNode randomstart;\n\t\tNNode randomend;\n\t\tdo {\n\t\t\trandomstart = getRandomNode();\n\t\t\trandomend = getRandomNode();\n\t\t} while (randomend.type == NNode.INPUT\n\t\t\t\t|| hasConnection(randomstart.ID, randomend.ID));\n\n\t\tint newgeneinno = population\n\t\t\t\t.getInnovation(randomstart.ID, randomend.ID);\n\t\tGene newgene = new Gene(newgeneinno, randomstart.ID, randomend.ID,\n\t\t\t\tBraincraft.randomWeight(), true);\n\t\tpopulation.registerGene(newgene);\n\t\tsubmitNewGene(newgene);\n\n\t\tif (Braincraft.gatherStats)\n\t\t\tBraincraft.genetics.add(\"link creation mutation \" + ID + \" \"\n\t\t\t\t\t+ newgene.innovation + \" \" + randomstart.ID + \" \"\n\t\t\t\t\t+ randomend.ID);\n\t}",
"LINK createLINK();",
"@DISPID(1611005980) //= 0x6006001c. The runtime will prefer the VTID if present\n @VTID(55)\n boolean updateLinkedExternalReferences();",
"void updateLinks() {\n\t\tdouble x1, x2, y1, y2;\n\t\tfor(int i=0; i<links.size();i++){\n\t\t\tPNode node1 = links.get(i).getNode1();\n\t\t\tPNode node2 = links.get(i).getNode2();\n\t\t\tx1 = node1.getFullBoundsReference().getCenter2D().getX() + node1.getParent().getFullBounds().getOrigin().getX();\n\t\t\ty1 = node1.getFullBoundsReference().getCenter2D().getY() + node1.getParent().getFullBounds().getOrigin().getY();\n\t\t\tx2 = node2.getFullBoundsReference().getCenter2D().getX() + node2.getParent().getFullBounds().getOrigin().getX();\n\t\t\ty2 = node2.getFullBoundsReference().getCenter2D().getY() + node2.getParent().getFullBounds().getOrigin().getY();\n\t\t\t\n\t\t\t/*\n\t\t\tLine2D line = new Line2D.Double(x1,y1,x2,y2);\n\t\t\tlinks.get(i).getPPath().setPathTo(line);\n */\n\t\t\tsetPolyLine(links.get(i).getPPath(), (float)x1, (float)y1, (float)x2, (float)y2);\n\t\t\t}\n\t\t}",
"void setLink(DependencyLink newLink);",
"Link createLink();",
"ReferenceLink createReferenceLink();",
"public void AddLink() {\n snake.add(tail + 1, new Pair(snake.get(tail).GetFirst(), snake.get(tail).GetSecond())); //Set the new link to the current tail link\n tail++;\n new_link = true;\n }",
"private void createDummyData() {\n YangInstanceIdentifier yiid;\n // create 2 links (stored in waitingLinks)\n LeafNode<String> link1Source = ImmutableNodes.leafNode(TopologyQNames.LINK_SOURCE_NODE_QNAME,\n UNDERLAY_NODE_ID_1);\n LeafNode<String> link2Source = ImmutableNodes.leafNode(TopologyQNames.LINK_SOURCE_NODE_QNAME,\n UNDERLAY_NODE_ID_3);\n\n ContainerNode source1Container = ImmutableContainerNodeBuilder\n .create(ImmutableNodes.containerNode(Source.QNAME)).withChild(link1Source).build();\n ContainerNode source2Container = ImmutableContainerNodeBuilder\n .create(ImmutableNodes.containerNode(Source.QNAME)).withChild(link2Source).build();\n\n LeafNode<String> link1Dest = ImmutableNodes.leafNode(TopologyQNames.LINK_DEST_NODE_QNAME, UNDERLAY_NODE_ID_2);\n LeafNode<String> link2Dest = ImmutableNodes.leafNode(TopologyQNames.LINK_DEST_NODE_QNAME, UNDERLAY_NODE_ID_4);\n ContainerNode dest1Container = ImmutableContainerNodeBuilder\n .create(ImmutableNodes.containerNode(Destination.QNAME)).withChild(link1Dest).build();\n ContainerNode dest2Container = ImmutableContainerNodeBuilder\n .create(ImmutableNodes.containerNode(Destination.QNAME)).withChild(link2Dest).build();\n\n MapEntryNode link1 = ImmutableNodes.mapEntryBuilder(Link.QNAME, TopologyQNames.NETWORK_LINK_ID_QNAME, LINK_ID_1)\n .withChild(source1Container).withChild(dest1Container).build();\n MapEntryNode link2 = ImmutableNodes.mapEntryBuilder(Link.QNAME, TopologyQNames.NETWORK_LINK_ID_QNAME, LINK_ID_2)\n .withChild(source2Container).withChild(dest2Container).build();\n\n yiid = DUMMY_LINK_CREATOR.createNodeIdYiid(LINK_ID_1);\n UnderlayItem item = new UnderlayItem(link1, null, TOPOLOGY_ID, LINK_ID_1, CorrelationItemEnum.Link);\n ntLinkCalculator.processCreatedChanges(yiid, item, TOPOLOGY_ID);\n\n yiid = DUMMY_LINK_CREATOR.createNodeIdYiid(LINK_ID_2);\n item = new UnderlayItem(link2, null, TOPOLOGY_ID, LINK_ID_2, CorrelationItemEnum.Link);\n ntLinkCalculator.processCreatedChanges(yiid, item, TOPOLOGY_ID);\n\n // create 2 supporting nodes under two overlay nodes\n yiid = YangInstanceIdentifier.builder()\n .nodeWithKey(Node.QNAME, TopologyQNames.NETWORK_NODE_ID_QNAME, OVERLAY_NODE_ID_1).build();\n Map<QName, Object> suppNode1KeyValues = new HashMap<>();\n suppNode1KeyValues.put(TopologyQNames.TOPOLOGY_REF, TOPOLOGY_ID);\n suppNode1KeyValues.put(TopologyQNames.NODE_REF, UNDERLAY_NODE_ID_1);\n MapEntryNode menSuppNode1 = ImmutableNodes.mapEntryBuilder()\n .withNodeIdentifier(new NodeIdentifierWithPredicates(SupportingNode.QNAME, suppNode1KeyValues)).build();\n MapNode suppNode1List = ImmutableNodes.mapNodeBuilder(SupportingNode.QNAME).addChild(menSuppNode1).build();\n MapEntryNode overlayNode1 = ImmutableNodes\n .mapEntryBuilder(Node.QNAME, TopologyQNames.NETWORK_NODE_ID_QNAME, OVERLAY_NODE_ID_1)\n .addChild(suppNode1List).build();\n item = new UnderlayItem(overlayNode1, null, TOPOLOGY_ID, OVERLAY_NODE_ID_1, CorrelationItemEnum.Node);\n // overlayNode1 is created\n ntLinkCalculator.processCreatedChanges(yiid, item, TOPOLOGY_ID);\n\n yiid = YangInstanceIdentifier.builder()\n .nodeWithKey(Node.QNAME, TopologyQNames.NETWORK_NODE_ID_QNAME, OVERLAY_NODE_ID_2).build();\n Map<QName, Object> suppNode2KeyValues = new HashMap<>();\n suppNode2KeyValues.put(TopologyQNames.TOPOLOGY_REF, TOPOLOGY_ID);\n suppNode2KeyValues.put(TopologyQNames.NODE_REF, UNDERLAY_NODE_ID_2);\n MapEntryNode menSuppNode2 = ImmutableNodes.mapEntryBuilder()\n .withNodeIdentifier(new NodeIdentifierWithPredicates(SupportingNode.QNAME, suppNode2KeyValues)).build();\n MapNode suppNode2List = ImmutableNodes.mapNodeBuilder(SupportingNode.QNAME).addChild(menSuppNode2).build();\n MapEntryNode overlayNode2 = ImmutableNodes\n .mapEntryBuilder(Node.QNAME, TopologyQNames.NETWORK_NODE_ID_QNAME, OVERLAY_NODE_ID_2)\n .addChild(suppNode2List).build();\n item = new UnderlayItem(overlayNode2, null, TOPOLOGY_ID, OVERLAY_NODE_ID_2, CorrelationItemEnum.Node);\n // overlayNode2 is created and link:1 is matched\n ntLinkCalculator.processCreatedChanges(yiid, item, TOPOLOGY_ID);\n\n // create a third supporting node under a third overlay node\n yiid = YangInstanceIdentifier.builder()\n .nodeWithKey(Node.QNAME, TopologyQNames.NETWORK_NODE_ID_QNAME, OVERLAY_NODE_ID_3).build();\n Map<QName, Object> suppNode3KeyValues = new HashMap<>();\n suppNode3KeyValues.put(TopologyQNames.TOPOLOGY_REF, TOPOLOGY_ID);\n suppNode3KeyValues.put(TopologyQNames.NODE_REF, UNDERLAY_NODE_ID_3);\n MapEntryNode menSuppNode3 = ImmutableNodes.mapEntryBuilder()\n .withNodeIdentifier(new NodeIdentifierWithPredicates(SupportingNode.QNAME, suppNode3KeyValues)).build();\n MapNode suppNode3List = ImmutableNodes.mapNodeBuilder(SupportingNode.QNAME).addChild(menSuppNode3).build();\n MapEntryNode node3 = ImmutableNodes\n .mapEntryBuilder(Node.QNAME, TopologyQNames.NETWORK_NODE_ID_QNAME, OVERLAY_NODE_ID_3)\n .addChild(suppNode3List).build();\n item = new UnderlayItem(node3, null, TOPOLOGY_ID, OVERLAY_NODE_ID_3, CorrelationItemEnum.Node);\n\n ntLinkCalculator.processCreatedChanges(yiid, item, TOPOLOGY_ID);\n\n // create another matched link (link:3)\n LeafNode<String> link3Source = ImmutableNodes.leafNode(TopologyQNames.LINK_SOURCE_NODE_QNAME,\n UNDERLAY_NODE_ID_2);\n ContainerNode source3Container = ImmutableContainerNodeBuilder\n .create(ImmutableNodes.containerNode(Source.QNAME)).withChild(link3Source).build();\n LeafNode<String> link3Dest = ImmutableNodes.leafNode(TopologyQNames.LINK_DEST_NODE_QNAME, UNDERLAY_NODE_ID_3);\n ContainerNode dest3Container = ImmutableContainerNodeBuilder\n .create(ImmutableNodes.containerNode(Destination.QNAME)).withChild(link3Dest).build();\n MapEntryNode link3 = ImmutableNodes.mapEntryBuilder(Link.QNAME, TopologyQNames.NETWORK_LINK_ID_QNAME, LINK_ID_3)\n .withChild(source3Container).withChild(dest3Container).build();\n yiid = DUMMY_LINK_CREATOR.createNodeIdYiid(LINK_ID_3);\n item = new UnderlayItem(link3, null, TOPOLOGY_ID, LINK_ID_3, CorrelationItemEnum.Link);\n ntLinkCalculator.processCreatedChanges(yiid, item, TOPOLOGY_ID);\n }",
"protected void _initLinks() {\n\t\tleaseTaskStartsLink = null;\n\t\tleaseRulesLink = null;\n\t}",
"@DISPID(1611005980) //= 0x6006001c. The runtime will prefer the VTID if present\n @VTID(56)\n void updateLinkedExternalReferences(\n boolean oExternalReferencesUpdated);",
"public boolean addLink(LinkData link) {\n log.debug(\"Adding link {}\", link);\n\n KVLink rcLink = new KVLink(link.getSrc().getDpid(),\n link.getSrc().getPortNumber(),\n link.getDst().getDpid(),\n link.getDst().getPortNumber());\n\n // XXX This method is called only by discovery,\n // which means what we are trying to write currently is the truth\n // so we can force write here\n //\n // TODO: We need to check for errors\n rcLink.setStatus(KVLink.STATUS.ACTIVE);\n rcLink.forceCreate();\n\n return true; // Success\n }",
"public OSLink( rcNode creator, HashMap hAttrs) {\n rcSource = creator;\n szSourcePort = (OSPort)hAttrs.get( \"SourcePort\");\n szDestPort = (String)hAttrs.get( \"DestinationPort\");\n szDestName =(String) hAttrs.get( \"DestinationName\");\n }",
"public void testLinkPersists() {\n\t\tJabberMessage msg = new JabberMessage();\n\t\tmsg.setMessage(\"Hello There! http://google.com/fwd.txt This is a test\");\n\t\tmsg.setId(1);\n\t\tmsg.setUsername(\"Test\");\n\t\tmsg.setTimestamp(\"NOW!\");\n\t\tLink link;\n\t\ttry {\n\t\t\tlh.putLink(msg);\n\t\t\tlink = dao.getLink(\"http://google.com/fwd.txt\");\n\t\t\tassert(link.getCount() == 1);\n\t\t\tif (link.getCount() != 1) {\n\t\t\t\tfail(\"Link count meant to be 1 but is:\" + link.getCount());\n\t\t\t}\n\t\t}catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t\tfail(\"I'm bad at logic\");\n\t}",
"@Override\n\tpublic void linkDiscoveryUpdate(List<LDUpdate> updateList)\n\t{\n\n\t}",
"private void hookLinks(long offleft,long offright){\n\t\tlinks.clear();\n\t\tlinks.add(offleft);\n\t\tlinks.add(offright);\n\t}",
"void addLink(byte start, byte end);",
"@SubL(source = \"cycl/sbhl/sbhl-link-methods.lisp\", position = 13634) \n public static final SubLObject add_to_sbhl_link(SubLObject old_link, SubLObject mt, SubLObject direction, SubLObject tv, SubLObject node) {\n {\n SubLObject link = old_link;\n SubLObject mt_links = sbhl_links.get_sbhl_mt_links(link, direction, sbhl_module_vars.get_sbhl_module(UNPROVIDED));\n if ((NIL != mt_links)) {\n {\n SubLObject tv_links = sbhl_links.get_sbhl_tv_links(mt_links, mt);\n if ((NIL != tv_links)) {\n sbhl_links.push_onto_sbhl_tv_links(tv_links, tv, node);\n } else {\n sbhl_links.set_sbhl_mt_links(mt_links, mt, sbhl_links.create_sbhl_tv_links(tv, node));\n }\n }\n } else {\n sbhl_links.set_sbhl_direction_link(link, direction, sbhl_links.create_sbhl_mt_links(mt, sbhl_links.create_sbhl_tv_links(tv, node)), sbhl_module_vars.get_sbhl_module(UNPROVIDED));\n }\n return link;\n }\n }",
"LinkRelation createLinkRelation();",
"public OntologyLinkModeTool()\n \t{\n \tedu.tufts.vue.ontology.ui.OntologyBrowser.getBrowser().addOntologySelectionListener(this);\n \t//creationLink.setID(\"<creationLink>\"); // can't use label or it will draw one \n \t//invisibleLinkEndpoint.addLinkRef(creationLink);\n \tcreationLink=null;\n invisibleLinkEndpoint.setSize(0,0);\n \n \t}",
"void addLink(BlockChainLink link);",
"private RequirementLink parseAttackModelLinkInfo(List<String> factors) {\n\t\t// obtain the elements of the link.\n\t\tElement source = findElementById(factors.get(4));\n\t\tElement target = findElementById(factors.get(5));\n\t\tif (target == null || source == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\t/*\n\t\t * this part is exclusively for requirement elements 0)link; 1)id,51690 2)arrow type,StickArrow; 3)line type, curved; 4)source/tail,51670; 5)destination/head,51490;\n\t\t * 6)label,NoLabel;(The shape of that label is not considered, only the content of that label) 7)dash type,0; 8)thickness,1.0; 9)head scale,1.0 10) layer, Layer 1\n\t\t */\n\t\t// first assign basic information to the link\n\t\tRequirementLink new_link = new RequirementLink();\n\t\tnew_link.setId(factors.get(1));\n\t\tnew_link.setSource(source);\n\t\tnew_link.setTarget(target);\n\t\tsource.getOutLinks().add(new_link);\n\t\ttarget.getInLinks().add(new_link);\n\n\t\t// identify the type of the link. Here we roughly have them as either \"refine\" or \"and-refine\" for simplification, facilitating the intended analysis.\n\t\t// refine\n\t\tif ((factors.get(2).equals(\"SharpArrow\") || factors.get(2).equals(\"StickArrow\") || factors.get(2).equals(\"Arrow\"))\n\t\t\t\t& !new_link.getSource().getType().equals(InfoEnum.RequirementElementType.MIDDLE_POINT.name())) {\n\t\t\tnew_link.setType(InfoEnum.RequirementLinkType.REFINE.name());\n\t\t\t// the target of this link should update the \"refine_links\" information as well\n\t\t\tnew_link.getTarget().refine_links.add(new_link);\n\t\t}\n\t\t// for all and-refine links, the corresponding information should be updated after re-processing the elements\n\t\t// and refine - main\n\t\telse if (factors.get(2).equals(\"SharpArrow\") & new_link.getSource().getType().equals(InfoEnum.RequirementElementType.MIDDLE_POINT.name())) {\n\t\t\tnew_link.setType(InfoEnum.RequirementLinkType.AND_REFINE_ARROW.name());\n\t\t\t// mark as redundant\n\t\t\tnew_link.setRemark(InfoEnum.LinkRemark.REDUNDANT.name());\n\t\t}\n\t\t// and refine - branch\n\t\telse if (factors.get(2).equals(\"NoHead\") & factors.get(6).equals(\"NoLabel\")) {\n\t\t\tnew_link.setType(InfoEnum.RequirementLinkType.AND_REFINE.name());\n\t\t}\n\t\t// exception\n\t\telse {\n\t\t\tCommandPanel.logger.severe(\"Unknown links cannot be imported\");\n\t\t}\n\t\treturn new_link;\n\t}",
"@Override\n public boolean handleComponentPressed(MapMouseEvent e)\n {\n LWComponent hit = e.getPicked();\n // TODO: handle LWGroup picking\n //if (hit instanceof LWGroup)\n //hit = ((LWGroup)hit).findDeepestChildAt(e.getMapPoint());\n\n if (hit != null && hit.canLinkTo(null)) {\n linkSource = hit;\n // todo: pick up current default stroke color & stroke width\n // and apply to creationLink\n\n creationLink.setParent(linkSource.getParent()); // needed for new relative-to-parent link code\n //invisibleLinkEndpoint.setParent(linkSource.getParent()); // needed for new relative-to-parent link code\n \n creationLink.setTemporaryEndPoint1(linkSource);\n EditorManager.applyCurrentProperties(creationLink); // don't target until / unless link actually created\n // never let drawn creator link get less than 1 pixel wide on-screen\n float minStrokeWidth = (float) (1 / e.getViewer().getZoomFactor());\n if (creationLink.getStrokeWidth() < minStrokeWidth)\n creationLink.setStrokeWidth(minStrokeWidth);\n invisibleLinkEndpoint.setLocation(e.getMapPoint());\n creationLink.notifyEndpointMoved(null, invisibleLinkEndpoint);\n e.setDragRequest(invisibleLinkEndpoint);\n // using a LINK as the dragComponent is a mess because geting the\n // \"location\" of a link isn't well defined if any end is tied\n // down, and so computing the relative movement of the link\n // doesn't work -- thus we just use this invisible endpoint\n // to move the link around.\n return true;\n }\n \t \n return false;\n }",
"public void addlink(TparselinksEntity newlink);",
"private void addDeclementLogicalLink(Connection conn, LogicalLink link, MultivaluedMap<String, SetFlowToOFC> reducedFlows) throws SQLException {\n\t\tPortData inPort = link.getLink().get(0);\n\n\t\t/* get route */\n\t\tMap<String, Object> logicalLinkMap = dao.getLogicalLinkFromNodeNamePortName(conn, inPort.getDeviceName(), inPort.getPortName());\n\t\tList<Map<String, Object>> routeMapList = dao.getRouteFromLogicalLinkId(conn, (String)logicalLinkMap.get(\"rid\"));\n\n\t\tif (routeMapList == null || routeMapList.isEmpty()) {\n\t\t\tthrow new RuntimeException(String.format(NOT_FOUND, \"route=\" + link));\n\t\t}\n\n\t\tMap<String, Object> txRouteMap = routeMapList.get(0);\n\t\tMap<String, Object> rxRouteMap = routeMapList.get(routeMapList.size() - 1);\n\n\t\t/* calc patch band width */\n\t\tlong bandOverHead = 0L;\n\t\tlong band = 0L;\n\t\t{\n\t\t\tMap<String, Object> txLinkMap = dao.getCableLinkFromInPortRid(conn, (String)txRouteMap.get(\"in_port_id\"));\n\t\t\tMap<String, Object> rxLinkMap = dao.getCableLinkFromInPortRid(conn, (String)rxRouteMap.get(\"out_port_id\"));\n\t\t\tlong txBand = this.getBandWidth(conn, (String)txLinkMap.get(\"inDeviceName\"), (String)txLinkMap.get(\"inPortName\"));\n\t\t\tlong rxBand = this.getBandWidth(conn, (String)rxLinkMap.get(\"inDeviceName\"), (String)rxLinkMap.get(\"inPortName\"));\n\t\t\tlong txOfpBand = this.getBandWidth(conn, (String)txLinkMap.get(\"outDeviceName\"), (String)txLinkMap.get(\"outPortName\"));\n\t\t\tlong rxOfpBand = this.getBandWidth(conn, (String)rxLinkMap.get(\"outDeviceName\"), (String)rxLinkMap.get(\"outPortName\"));\n\t\t\tband = (txBand < rxBand) ? txBand: rxBand;\n\t\t\tband = (band < txOfpBand)? band: txOfpBand;\n\t\t\tband = (band < rxOfpBand)? band: rxOfpBand;\n\t\t\tbandOverHead = this.calcVlanTagOverhead(band);\n\t\t}\n\n\t\t/* update link-used-value and make patch link for ofc */\n\t\tList<String> alreadyProcCable = new ArrayList<String>();\n\t\tfor (Map<String, Object> routeMap : routeMapList) {\n\t\t\tMap<String, Object> OfpsMap = dao.getNodeInfoFromDeviceName(conn, (String) routeMap.get(\"node_name\"));\n\t\t\tlong used = band + bandOverHead;\n\t\t\tString inPortRid = (String)routeMap.get(\"in_port_id\");\n\t\t\tMap<String, Object> inLink = dao.getCableLinkFromInPortRid(conn, inPortRid);\n\t\t\tString inCableRid = (String)inLink.get(\"rid\");\n\n\t\t\tif (!alreadyProcCable.contains(inCableRid) && (OfpsMap.get(\"type\").equals(\"Spine\") || OfpsMap.get(\"type\").equals(\"Leaf\"))) {\n\t\t\t\tlong newUsed = this.calcReduceCableLinkUsed(conn, inLink, used);\n\t\t\t\tdao.updateCableLinkUsedFromPortRid(conn, inPortRid, newUsed);\n\t\t\t\talreadyProcCable.add(inCableRid);\n\t\t\t}\n\n\t\t\tString outPortRid = (String)routeMap.get(\"out_port_id\");\n\t\t\tMap<String, Object> outLink = dao.getCableLinkFromOutPortRid(conn, outPortRid);\n\t\t\tString outCableRid = (String)outLink.get(\"rid\");\n\t\t\tif (!alreadyProcCable.contains(outCableRid) && (OfpsMap.get(\"type\").equals(\"Spine\") || OfpsMap.get(\"type\").equals(\"Leaf\"))) {\n\t\t\t\tlong newUsed = this.calcReduceCableLinkUsed(conn, outLink, used);\n\t\t\t\tdao.updateCableLinkUsedFromPortRid(conn, outPortRid, newUsed);\n\t\t\t\talreadyProcCable.add(outCableRid);\n\t\t\t}\n\t\t}\n\t\tMap<String, Object> txOfpsMap = dao.getNodeInfoFromDeviceName(conn, (String) txRouteMap.get(\"node_name\"));\n\t\tMap<String, Object> txInPortMap = dao.getPortInfoFromPortName(conn, (String) txRouteMap.get(\"node_name\"), (String) txRouteMap.get(\"in_port_name\"));\n\t\tMap<String, Object> txOutPortMap = dao.getPortInfoFromPortName(conn, (String) txRouteMap.get(\"node_name\"), (String) txRouteMap.get(\"out_port_name\"));\n\n\t\tMap<String, Object> rxOfpsMap = dao.getNodeInfoFromDeviceName(conn, (String) rxRouteMap.get(\"node_name\"));\n\t\tMap<String, Object> rxOutPortMap = dao.getPortInfoFromPortName(conn, (String) rxRouteMap.get(\"node_name\"), (String) rxRouteMap.get(\"out_port_name\"));\n\n\t\tOFCClient client = new OFCClientImpl();\n\n\t\tif (routeMapList.size() == 1 ) {\n\t\t\tString ofcIp = (String)txOfpsMap.get(\"ip\") + \":\" + Integer.toString((Integer)txOfpsMap.get(\"port\"));\n\n\t\t\tSetFlowToOFC requestData = client.createRequestData(Long.decode((String)txOfpsMap.get(\"datapathId\")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);\n\t\t\tInteger inPortNumber = (Integer)txInPortMap.get(\"number\");\n\t\t\tclient.createMatchForInPort(requestData, inPortNumber.longValue());\n\t\t\treducedFlows.add(ofcIp, requestData);\n\n\t\t\tInteger outPortNumber = (Integer)txOutPortMap.get(\"number\");\n\t\t\trequestData = client.createRequestData(Long.decode((String)txOfpsMap.get(\"datapathId\")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);\n\t\t\tclient.createMatchForInPort(requestData, outPortNumber.longValue());\n\t\t\treducedFlows.add(ofcIp, requestData);\n\n\n\t\t\t/* delete route */\n\t\t\tdao.deleteRouteFromLogicalLinkRid(conn, (String)logicalLinkMap.get(\"rid\"));\n\n\t\t\t/* delete logical link */\n\t\t\tdao.deleteLogicalLinkFromNodeNamePortName(conn, inPort.getDeviceName(), inPort.getPortName());\n\n\t\t\treturn;\n\t\t}\n\n\t\t/* make flow edge-switch tx side */\n\t\t{\n\t\t\tString ofcIp = (String)txOfpsMap.get(\"ip\") + \":\" + Integer.toString((Integer)txOfpsMap.get(\"port\"));\n\n\t\t\tSetFlowToOFC requestData = client.createRequestData(Long.decode((String)txOfpsMap.get(\"datapathId\")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);\n\t\t\tInteger inPortNumber = (Integer)txInPortMap.get(\"number\");\n\t\t\tclient.createMatchForInPort(requestData, inPortNumber.longValue());\n\t\t\treducedFlows.add(ofcIp, requestData);\n\n\t\t\trequestData = client.createRequestData(Long.decode((String)txOfpsMap.get(\"datapathId\")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);\n\t\t\tclient.createMatchForDlVlan(requestData, (Long)logicalLinkMap.get(\"nw_instance_id\"));\n\t\t\treducedFlows.add(ofcIp, requestData);\n\t\t}\n\n\t\t/* make flow edge-switch rx side */\n\t\t{\n\t\t\tString ofcIp = (String)rxOfpsMap.get(\"ip\") + \":\" + Integer.toString((Integer)rxOfpsMap.get(\"port\"));\n\n\t\t\tSetFlowToOFC requestData = client.createRequestData(Long.decode((String)rxOfpsMap.get(\"datapathId\")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);\n\t\t\tInteger inPortNumber = (Integer)rxOutPortMap.get(\"number\");\n\t\t\tclient.createMatchForInPort(requestData, inPortNumber.longValue());\n\t\t\treducedFlows.add(ofcIp, requestData);\n\n\t\t\trequestData = client.createRequestData(Long.decode((String)rxOfpsMap.get(\"datapathId\")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);\n\t\t\tclient.createMatchForDlVlan(requestData, (Long)logicalLinkMap.get(\"nw_instance_id\"));\n\t\t\treducedFlows.add(ofcIp, requestData);\n\t\t}\n\n\t\t/* make flow internal switch */\n\t\t{\n\t\t\tfor (int i = 1; i < routeMapList.size() - 1; i++) {\n\t\t\t\tString node_name = (String)routeMapList.get(i).get(\"node_name\");\n\n\t\t\t\tMap<String, Object> ofpsMap = dao.getNodeInfoFromDeviceName(conn, node_name);\n\n\t\t\t\tif(ofpsMap.get(\"type\").equals(NODE_TYPE_SPINE))\n\t\t\t\t{\n\t\t\t\t\tString ofcIp = (String)ofpsMap.get(\"ip\") + \":\" + Integer.toString((Integer)ofpsMap.get(\"port\"));\n\n\t\t\t\t\tSetFlowToOFC requestData = client.createRequestData(Long.decode((String)ofpsMap.get(\"datapathId\")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);\n\t\t\t\t\tclient.createMatchForDlVlan(requestData, (Long)logicalLinkMap.get(\"nw_instance_id\"));\n\t\t\t\t\treducedFlows.add(ofcIp, requestData);\n\t\t\t\t}\n\t\t\t\telse if(ofpsMap.get(\"type\").equals(NODE_TYPE_AGGREGATE_SW))\n\t\t\t\t{\n\t\t\t\t\tString ofcIp = (String)ofpsMap.get(\"ip\") + \":\" + Integer.toString((Integer)ofpsMap.get(\"port\"));\n\n\t\t\t\t\tSetFlowToOFC requestData = client.createRequestData(Long.decode((String)ofpsMap.get(\"datapathId\")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);\n\t\t\t\t\tclient.createMatchForDlVlan(requestData, (Long)logicalLinkMap.get(\"nw_instance_id\"));\n\t\t\t\t\treducedFlows.add(ofcIp, requestData);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/* delete route */\n\t\tdao.deleteRouteFromLogicalLinkRid(conn, (String)logicalLinkMap.get(\"rid\"));\n\n\t\t/* delete logical link */\n\t\tdao.deleteLogicalLinkFromNodeNamePortName(conn, inPort.getDeviceName(), inPort.getPortName());\n\n\t\t/* delete Outer_tag table */\n\t\t//dao.DeleteOutertagflows(conn,(Long)logicalLinkMap.get(\"nw_instance_id\"));\n\n\n\t\treturn;\n\t}",
"public void generateEnquireLink();",
"void register(String linkName, Link link) throws CCAException;",
"public PatchNotesDownloader(String patchNotesLink) {\n // Check to see if patchNotesLink starts with C:\\ or a similar path and then append file:\\\\ if true?\n PATCH_NOTES_LINK = patchNotesLink;\n }",
"public IHyperLink attachLink()\n throws OculusException;",
"void storeLinks();",
"SimpleLink createSimpleLink();",
"protected void insertBindingUpdateActivities(String plink, Map<String,Binding> addyMap, Node addInitHere, Node addUpdateHere){\n\t\tif (addyMap.containsKey(plink)){\n\t\t\tBinding bind = addyMap.get(plink);\n\t\t\taddInitHere.appendChild(initArrayVar(bind, bind));\n\t\t\taddUpdateHere.appendChild(getNextBinding(plink));\n\t\t\tfor (String dependentPlink: bind.getDependentPlinks()){\n\t\t\t\tif (addyMap.containsKey(dependentPlink)){\n\t\t\t\t\taddInitHere.appendChild(initArrayVar(addyMap.get(dependentPlink),bind));\n\t\t\t\t\taddUpdateHere.appendChild(getNextBinding(dependentPlink));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void linkUp(Mtp2 link) {\n linkset.add(link);\n if (linkset.isActive() && mtpUser != null) {\n mtpUser.linkUp();\n }\n logger.info(String.format(\"(%s) Link now IN_SERVICE\", link.name));\n }",
"public void markNextHopIpv4GwAddr2Create() throws JNCException {\n markLeafCreate(\"nextHopIpv4GwAddr2\");\n }",
"protected String newLinkName(){\n\t\treturn \"WomoEvtLnk_\" + linkNr++;\n\t}",
"public void \t\t\t\t\t\t\t\t\tlink(RoomCreateActivity act) \n\t\t{\n\t\t\tthis.activity = new WeakReference<RoomCreateActivity>(act);\n\t\t}",
"private ReplicaInfo createNewReplicaObjWithLink(ExtendedBlock block,\n FsDatasetImpl fsDataSetImpl) throws IOException {\n ReplicaInfo replicaInfo = fsDataSetImpl.getReplicaInfo(block);\n FsVolumeSpi destVolume = getDestinationVolume(block, fsDataSetImpl);\n return fsDataSetImpl.moveReplicaToVolumeOnSameMount(block, replicaInfo,\n destVolume.obtainReference());\n }",
"public interface Linkage {\n /*\n * Save Operation\n * 1. Add\n * 2. Update\n *\n * The parameter vector means that whether it's double direction\n * 1. vector = true, source -> target, target -> source\n * 2. vector = false, source <-> target\n * The key point is that `linkKey` calculation are different between these two.\n */\n Future<JsonArray> link(JsonArray linkage, boolean vector);\n\n /*\n * Delete Operation\n * 1. Remove\n * Here the criteria is condition to remove previous linkage\n */\n Future<Boolean> unlink(JsonObject criteria);\n\n /*\n * Fetch Operation\n */\n Future<JsonArray> fetch(JsonObject criteria);\n}",
"public void markNextHopIpv6GwAddr2Create() throws JNCException {\n markLeafCreate(\"nextHopIpv6GwAddr2\");\n }",
"public void markSecondaryApnSourceGprsCreate() throws JNCException {\n markLeafCreate(\"secondaryApnSourceGprs\");\n }",
"private void processAttach(String processIP, int processPort,\n String simulatedIP, short weight) {\n RouterDescription targetRouter = new RouterDescription();\n targetRouter.processIPAddress = processIP;\n targetRouter.processPortNumber = processPort;\n targetRouter.simulatedIPAddress = simulatedIP;\n targetRouter.status = RouterStatus.INIT;\n\n // create a new link and connect to target router\n Link newLink = Link.establishConnection(this, targetRouter);\n this.ports[this.nextAvailPort] = newLink;\n this.connectedPortsThreadPool.submit(newLink::listenForIncomingCommands);\n\n\n // make sure an initial link is created\n LSA currentRouterLSA = this.lsd.getDiscoveredRouter(this.routerDesc.simulatedIPAddress);\n Optional<LinkDescription> targetLinkOpt = currentRouterLSA\n .links\n .stream()\n .filter(x -> x.linkID.equalsIgnoreCase(targetRouter.simulatedIPAddress))\n .findAny();\n if(!targetLinkOpt.isPresent()) {\n LinkDescription newLinkDesc = new LinkDescription();\n newLinkDesc.linkID = targetRouter.simulatedIPAddress;\n newLinkDesc.portNum = this.nextAvailPort;\n newLinkDesc.tosMetrics = weight;\n newLinkDesc.status = RouterStatus.INIT;\n\n currentRouterLSA.links.add(newLinkDesc);\n }\n\n this.nextAvailPort++;\n }",
"public void makeSyncNailBetweenLocations() {\n final double x = Grid.snap((getSourceLocation().getX() + getTargetLocation().getX()) / 2.0);\n final double y = Grid.snap((getSourceLocation().getY() + getTargetLocation().getY()) / 2.0);\n\n final Nail nail = new Nail(x, y);\n nail.setPropertyType(Edge.PropertyType.SYNCHRONIZATION);\n addNail(nail);\n }",
"public org.apache.xmlbeans.XmlAnySimpleType addNewObservationDataLink()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlAnySimpleType target = null;\r\n target = (org.apache.xmlbeans.XmlAnySimpleType)get_store().add_attribute_user(OBSERVATIONDATALINK$18);\r\n return target;\r\n }\r\n }",
"@Override\n public void addConnection(Link link)\n {\n connections.add(link);\n if (executableProcess != null)\n addConnectionToExec(link);\n }",
"private boolean putLinkInTopology(Link tapLink) {\n LOG.info(\"Creating tapi node in TAPI topology context\");\n InstanceIdentifier<Topology> topoIID = InstanceIdentifier.builder(Context.class)\n .augmentation(Context1.class).child(TopologyContext.class)\n .child(Topology.class, new TopologyKey(tapiTopoUuid))\n .build();\n\n Topology topology = new TopologyBuilder().setUuid(tapiTopoUuid)\n .setLink(Map.of(tapLink.key(), tapLink)).build();\n\n // merge in datastore\n this.networkTransactionService.merge(LogicalDatastoreType.OPERATIONAL, topoIID,\n topology);\n try {\n this.networkTransactionService.commit().get();\n\n } catch (InterruptedException | ExecutionException e) {\n LOG.error(\"Error populating TAPI topology: \", e);\n return false;\n }\n LOG.info(\"TAPI Link added succesfully.\");\n return true;\n }",
"void relationshipCreate( long id, int typeId, long startNodeId,\n long endNodeId );",
"@Test\n\tpublic void testEstablishLink() {\n\t\tresetTestVars();\n\t\tuser1.setID(\"1\");\n\t\tuser2.setID(\"1\");\n\t\tuser3.setID(\"2\");\n\t\tsn.addUser(user1);\n\t\tsn.addUser(user2);\n\t\tsn.addUser(user3);\n\t\t\n\t\ttry {\n\t\t\tsn.establishLink(null, null, null, status);\n\t\t} catch (NullPointerException np) {\n\t\t\tSystem.out.println(\"EXPECTED(1/4): Null arguments\");\n\t\t} catch (UninitializedObjectException uo) {\n\t\t\tSystem.out.println(\"UNEXPECTED: should never be thrown\");\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tassertFalse(\"IDs are identical\", sn.establishLink(\"1\", \"1\", early, status));\n\t\t} catch (UninitializedObjectException | IllegalArgumentException e) {\n\t\t\tSystem.out.println(\"EXPECTED(2/4): No loops allowed (same ID)\");\n\t\t}\n\t\ttry {\n\t\t\tassertFalse(\"One ID isnt a user\", sn.establishLink(\"1\", \"3\", early, status));\n\t\t\tassertTrue(\"Distinct valid users\", sn.establishLink(\"1\", \"2\", early, status));\n\t\t\tassertFalse(\"Link is already active\", sn.establishLink(\"1\", \"2\", mid, status));\n\t\t\tsn.tearDownLink(\"1\", \"2\", mid, status);\n\t\t\tassertTrue(\"Link is currently torn down\", sn.establishLink(\"1\", \"2\", late, status));\n\t\t} catch (UninitializedObjectException uo) {\n\t\t\tSystem.out.println(\"UNEXPECTED: shouldnt be thrown\");\n\t\t}\n\t}",
"void createOrUpdateReferenceObligationPairs(List<PsdReferenceObligationPair> psdReferObligPairs);",
"private Set<LogicalLink> getLogicalLink(Connection conn, String devName, boolean setPortNumber) throws SQLException {\n\t\tfinal String fname = \"getLogicalLink\";\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(String.format(\"%s(conn=%s, devName=%s, setPortNumber=%s) - start\", fname, conn, devName, setPortNumber));\n\t\t}\n\t\tSet<LogicalLink> linkSet = new HashSet<LogicalLink>();\n\t\tList<Map<String, Object>> patchDocList = dao.getLogicalLinksFromDeviceName(conn, devName);\n\t\tif (patchDocList == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\t/*check src->dst*/\n\t\tfor (Map<String, Object> patchDoc : patchDocList) {\n\t\t\tString inDevName = (String)patchDoc.get(\"inDeviceName\");\n\t\t\tString inPortName = (String)patchDoc.get(\"inPortName\");\n\t\t\tPortData inPort = new PortData();\n\t\t\tinPort.setDeviceName(inDevName);\n\t\t\tinPort.setPortName(inPortName);\n\n\t\t\tString outDevName = (String)patchDoc.get(\"outDeviceName\");\n\t\t\tString outPortName = (String)patchDoc.get(\"outPortName\");\n\t\t\tPortData outPort = new PortData();\n\t\t\toutPort.setDeviceName(outDevName);\n\t\t\toutPort.setPortName(outPortName);\n\n\t\t\tList<PortData> ports = new ArrayList<PortData>();\n\t\t\tports.add(inPort);\n\t\t\tports.add(outPort);\n\n\t\t\tLogicalLink link = new LogicalLink();\n\t\t\tlink.setLink(ports);\n\n\t\t\tlinkSet.add(link);\n\n\n\t\t\tPortData inPort_2 = new PortData();\n\t\t\tinPort_2.setDeviceName(outDevName);\n\t\t\tinPort_2.setPortName(outPortName);\n\t\t\tPortData outPort_2 = new PortData();\n\t\t\toutPort_2.setDeviceName(inDevName);\n\t\t\toutPort_2.setPortName(inPortName);\n\n\t\t\tList<PortData> ports_2 = new ArrayList<PortData>();\n\t\t\tports_2.add(inPort_2);\n\t\t\tports_2.add(outPort_2);\n\n\t\t\tLogicalLink link_2 = new LogicalLink();\n\t\t\tlink_2.setLink(ports_2);\n\n\t\t\tlinkSet.add(link_2);\n\n\t\t}\n\n\t\tif (linkSet.isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\tif (!setPortNumber) {\n\t\t\treturn linkSet;\n\t\t}\n\t\t/* Set port number at port data in logical link */\n\t\tfor (LogicalLink link : linkSet) {\n\t\t\tfor (PortData port : link.getLink()) {\n\t\t\t\tMap<String, Object> portMap = dao.getPortInfoFromPortName(\n\t\t\t\t\t\tconn,\n\t\t\t\t\t\tport.getDeviceName(),\n\t\t\t\t\t\tport.getPortName());\n\t\t\t\tport.setPortNumber((Integer)portMap.get(\"number\"));\n\t\t\t}\n\t\t}\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(String.format(\"%s(ret=%s) - end\", fname, linkSet));\n\t\t}\n\t\treturn linkSet;\n\t}",
"@Override\n public boolean handleComponentPressed(MapMouseEvent e)\n {\n LWComponent hit = e.getPicked();\n // TODO: handle LWGroup picking\n //if (hit instanceof LWGroup)\n //hit = ((LWGroup)hit).findDeepestChildAt(e.getMapPoint());\n\n if (hit != null && hit.canLinkTo(null)) {\n linkSource = hit;\n // todo: pick up current default stroke color & stroke width\n // and apply to creationLink\n creationLink.setTemporaryEndPoint1(linkSource);\n // EditorManager.applyCurrentProperties(creationLink);\n // never let drawn creator link get less than 1 pixel wide on-screen\n float minStrokeWidth = (float) (1 / e.getViewer().getZoomFactor());\n if (creationLink.getStrokeWidth() < minStrokeWidth)\n creationLink.setStrokeWidth(minStrokeWidth);\n invisibleLinkEndpoint.setLocation(e.getMapPoint());\n e.setDragRequest(invisibleLinkEndpoint);\n // using a LINK as the dragComponent is a mess because geting the\n // \"location\" of a link isn't well defined if any end is tied\n // down, and so computing the relative movement of the link\n // doesn't work -- thus we just use this invisible endpoint\n // to move the link around.\n return true;\n }\n \t \n return false;\n }",
"public void addLink(String spid, Link link) throws EVDBRuntimeException, EVDBAPIException {\n\t\t\n\t\tsuper.addLink(PERFORMERS_LINKS_NEW, spid, link);\n\t}",
"private void createLinks(int numDevices) {\n List<Link> links = new ArrayList<>();\n\n for (int i = 1; i <= numDevices; i++) {\n ConnectPoint src = new ConnectPoint(\n getDeviceId(i),\n PortNumber.portNumber(2));\n ConnectPoint dst = new ConnectPoint(\n getDeviceId((i + 1 > numDevices) ? 1 : i + 1),\n PortNumber.portNumber(3));\n\n Link link = createMock(Link.class);\n expect(link.src()).andReturn(src).anyTimes();\n expect(link.dst()).andReturn(dst).anyTimes();\n replay(link);\n\n links.add(link);\n }\n\n expect(linkService.getLinks()).andReturn(links).anyTimes();\n replay(linkService);\n }",
"public void processLink(String source, String qualifier, String target) throws BeaconException;",
"void addNode(CommunicationLink communicationLink)\n {\n int nodeId = communicationLink.getInfo().hashCode();\n assert !nodeIds.contains(nodeId);\n nodeIds.add(nodeId);\n allNodes.put(nodeId, communicationLink);\n }",
"ch.crif_online.www.webservices.crifsoapservice.v1_00.FurtherRelations addNewFurtherRelations();",
"public void markSrvWeightCreate() throws JNCException {\n markLeafCreate(\"srvWeight\");\n }",
"private void addLinks(\n int index, org.chromium.components.paint_preview.common.proto.PaintPreview.LinkDataProto value) {\n value.getClass();\n ensureLinksIsMutable();\n links_.add(index, value);\n }",
"protected void _initLinks() {\n\tpeopleLink = null;\n\tchangeLogDetailsesLink = null;\n}",
"public void sendHellos() {\n\t\tint lnk = 0;\n\t\tboolean isChanged = false;\n\t\tfor (LinkInfo lnkInfo : lnkVec) {\n\n\t\t\t// if no reply to the last hello, subtract 1 from\n\t\t\t// link status if it's not already 0\n\t\t\tif (!lnkInfo.gotReply){\n\t\t\t\tif (lnkInfo.helloState != 0){\n\t\t\t\t\tlnkInfo.helloState--;\n\t\t\t\t}\t\n\n\t\t\t\t// go through the routes to check routes \n\t\t\t\t// that contain the failed link\n\t\t\t\telse {\n\t\t\t\t\tfor (Route rte : rteTbl){\n\t\t\t\t\t\tif (rte.path.contains(lnk)){\n\t\t\t\t\t\t\tif (rte.valid != false){\n\t\t\t\t\t\t\t\tisChanged = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\trte.valid = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t// print routing table if debug is enabled \n\t\t\t// and valid field of route is changed\n\t\t\tif (debug > 0 && isChanged){\n\t\t\t\tprintTable();\n\t\t\t}\n\n\t\t\t// send link failure advertisement if enFA is enabled\n\t\t\t// and valid field of route is changed\n\t\t\tif (enFA && isChanged){\n\t\t\t\tsendFailureAdvert(lnk);\n\t\t\t\tisChanged = false;\n\t\t\t}\n\n\t\t\t// send new hello, after setting gotReply to false\n\t\t\tlnkInfo.gotReply = false;\n\t\t\tPacket p = new Packet();\n\t\t\tp.protocol = 2;\n\t\t\tp.ttl = 100;\n\t\t\tp.srcAdr = myIp;\n\t\t\tp.destAdr = lnkInfo.peerIp;\n\t\t\tp.payload = String.format(\"RPv0\\ntype: hello\\n\"\n\t\t\t\t\t+ \"timestamp: %.3f \\n\",\n\t\t\t\t\tnow);\n\t\t\tfwdr.sendPkt(p, lnk);\n\t\t}\n\t}",
"@DISPID(1611006048) //= 0x60060060. The runtime will prefer the VTID if present\n @VTID(124)\n void linkedExternalReferences(\n boolean oWithLink);",
"LinkRelationsLibrary createLinkRelationsLibrary();",
"NamedLinkDescriptor createNamedLinkDescriptor();",
"public void createWebLink(String description, String weblink) throws MalformedURLException{\n\n /*Create a bound Rectangle to enclose this JLabel*/\n Rectangle encloseRect = new Rectangle(304 - (int) 140/2,\n 136 - (int) 40/2, 140, 40);\n\n\n /*Add the JLabel in the array of JLabels*/\n ShapeURL webLink = new ShapeURL(encloseRect,\"UserTest\",\n weblink,description,\"id\",0);\n\n \n /*Add this ShapeConcept in the bufferList*/\n this.labelBuffer.add(webLink);\n\n /*Draw the ShapeConcept object on the JPanel*/\n this.add(webLink);\n\n /*Refresh screen*/\n repaint();\n}",
"public void linkPhysicalPort(String nmsPortId, String nocLabel, String physicalResourceGroup) {\n linkPhysicalPort(nmsPortId, nocLabel, \"\", physicalResourceGroup);\n }",
"public void markPortNumberCreate() throws JNCException {\n markLeafCreate(\"portNumber\");\n }",
"public void onLinkEdit()\n {\n getLinkWizard().start(LinkWizardStep.LINK_REFERENCE_PARSER.toString(), linkConfigFactory.createLinkConfig());\n }",
"public void markNextHopIpv6GwAddr1Create() throws JNCException {\n markLeafCreate(\"nextHopIpv6GwAddr1\");\n }",
"@SubL(source = \"cycl/sbhl/sbhl-link-methods.lisp\", position = 13313) \n public static final SubLObject create_and_store_sbhl_link(SubLObject arg1, SubLObject arg2, SubLObject direction, SubLObject mt, SubLObject tv, SubLObject module) {\n if ((NIL != module)) {\n checkType(module, $sym4$SBHL_MODULE_P);\n }\n sbhl_graphs.set_sbhl_graph_link(arg1, create_new_sbhl_link(direction, mt, tv, arg2, module), module);\n return NIL;\n }",
"public void createIssueLink(Long sourceId, Long destinationId, Long issueLinkTypeId, Long sequence, ApplicationUser remoteUser)\n throws CreateException {\n if (getIssueLink(sourceId, destinationId, issueLinkTypeId) != null) {\n return;\n }\n // JRA-30953: if the link type does not exist throw an exception\n if (!validateIssueLinkType(issueLinkTypeId)) {\n String msg = String.format(\"There is no IssueLinkType with id: %s\", issueLinkTypeId);\n log.error(msg);\n throw new CreateException(msg);\n }\n\n IssueLink issueLink = null;\n try {\n issueLink = storeIssueLink(sourceId, destinationId, issueLinkTypeId, sequence);\n\n final IssueLinkType issueLinkType = issueLink.getIssueLinkType();\n // Create change record only if the issue link is not of a system issue link type\n if (!issueLinkType.isSystemLinkType()) {\n // Manually do our changelogs and issue updates as we have two issues\n createCreateIssueLinkChangeItems(issueLink, issueLinkType, remoteUser);\n }\n } finally {\n if (issueLink != null) {\n invalidateRequestCache(issueLink);\n // We always need to reindex linked Issues - the updated date of both issues is updated. see JRA-7156\n reindexLinkedIssues(issueLink);\n }\n }\n }",
"protected void drawLinks(Graphics2D g2d) {\n Rectangle2D screen = new Rectangle2D.Float(0,0,w,h);\n // Figure out the stroke, color, transparency\n Stroke orig_stroke = g2d.getStroke(); Composite orig_composite = g2d.getComposite();\n\tLinkSizer sizer = null; LinkColorer colorer = null; float default_size = 1.0f;\n switch (link_size) {\n\t case INVISIBLE: return;\n\t case THIN: g2d.setStroke(new BasicStroke(default_size = 0.4f)); break;\n\t case THICK: g2d.setStroke(new BasicStroke(default_size = 2.5f)); break;\n\t case NORMAL: g2d.setStroke(new BasicStroke(default_size = 1.0f)); break;\n\t case VARY: sizer = new VaryLinkSizer(); break;\n case CONDUCT: sizer = new ConductanceLinkSizer(); break;\n case CLUSTERP: sizer = new ClusterProbSizer(); break;\n default: throw new RuntimeException(\"Unknown Link Size \" + link_size);\n }\n switch (link_color) {\n\t case GRAY: colorer = new FixedLinkColorer(RTColorManager.getColor(\"linknode\", \"edge\")); break;\n\t case VARY: colorer = new VaryLinkColorer(); break;\n\t default: throw new RuntimeException(\"Unknown Link Color \" + link_color);\n }\n\n\t// Enable transparency if requested\n if (link_trans) { g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER,0.6f)); }\n\n\t// Make the label maker\n\tLabelMaker lm = null;\n if (draw_link_labels) lm = new LabelMaker(bundle_labels, link_counter_context);\n\n // - Create the dashes\n float dashes[] = null;\n float long_ds[] = new float[2],\n dotted_ds[] = new float[2],\n alter_ds[] = new float[4];\n long_ds[0] = 10.0f; long_ds[1] = 5.0f;\n dotted_ds[0] = 1.0f; dotted_ds[1] = 5.0f;\n alter_ds[0] = 10.0f; alter_ds[1] = 5.0f; alter_ds[2] = 1.0f; alter_ds[3] = 5.0f;\n // Go through the links and draw them\n Iterator<String> it = link_counter_context.binIterator();\n\twhile (it.hasNext()) {\n String link = it.next(); if (link.equals(reverseLink(link))) continue;\n Line2D line = link_to_line.get(link);\n if (line.intersects(screen)) {\n // Figure out the rendering...\n Set<String> styles = line_ref_to_styles.get(link);\n if (styles != null && styles.size() == 1) {\n String str = styles.iterator().next();\n if (str.equals(STYLE_SOLID_STR)) dashes = null;\n else if (str.equals(STYLE_LONG_DASH_STR)) dashes = long_ds;\n else if (str.equals(STYLE_DOTTED_STR)) dashes = dotted_ds;\n else if (str.equals(STYLE_ALTERNATE_STR)) dashes = alter_ds;\n else System.err.println(\"Do Not Understand Line Style \\\"\" + str + \"\\\"\");\n } else dashes = null;\n\t if (sizer != null && dashes != null) g2d.setStroke(new BasicStroke(sizer.linkSize(link), BasicStroke.CAP_ROUND, BasicStroke.JOIN_BEVEL, 1.0f, dashes, 0.0f));\n else if (sizer != null ) g2d.setStroke(new BasicStroke(sizer.linkSize(link)));\n else if ( dashes != null) g2d.setStroke(new BasicStroke(default_size, BasicStroke.CAP_ROUND, BasicStroke.JOIN_BEVEL, 1.0f, dashes, 0.0f));\n else g2d.setStroke(new BasicStroke(default_size));\n g2d.setColor(colorer.linkColor(link));\n\n\t // Draw curved arcs to help differentiate direction\n\t if (curves) {\n\t //\n\t // Calculate the arc\n\t //\n double dx = line.getX2() - line.getX1(),\n\t dy = line.getY2() - line.getY1();\n double l = Math.sqrt(dx*dx+dy*dy); if (l < 0.0001) l = 0.0001;\n\t dx = dx/l;\n\t\t dy = dy/l;\n double cx = (line.getX2() + line.getX1())/2,\n\t cy = (line.getY2() + line.getY1())/2;\n double ctrl_x = cx - (l/8)*dy,\n\t ctrl_y = cy + (l/8)*dx;\n\t g2d.draw(new QuadCurve2D.Double(line.getX1(), line.getY1(), ctrl_x, ctrl_y, line.getX2(), line.getY2()));\n\n\t //\n\t // Add a half arrow to aid with directionality\n\t //\n ctrl_x = cx - (l/4)*dy;\n\t ctrl_y = cy + (l/4)*dx;\n dx = ctrl_x - line.getX2();\n\t\t dy = ctrl_y - line.getY2();\n\t\t l = Math.sqrt(dx*dx+dy*dy); if (l < 0.0001) l = 0.0001;\n\t\t dx = dx/l;\n\t\t dy = dy/l;\n g2d.draw(new Line2D.Double(line.getX2(), line.getY2(), line.getX2() + dx*16.0, line.getY2() + dy*16.0));\n\n\t } else g2d.draw(line);\n\n\t // Draw arrows if applicable\n if (arrows || timing) {\n\t double dx = line.getX2() - line.getX1(),\n\t dy = line.getY2() - line.getY1();\n\t double len = Utils.length(dx,dy);\n\t if (len < 0.001) len = 0.001; dx = dx/len; dy = dy/len; double pdx = dy, pdy = -dx;\n\t if (arrows) {\n GeneralPath gp = new GeneralPath();\n\t\t// Triangle (best?... worst for performance)\n\t\t// - From \"A User Study on Visualizing Directed Edges in Graphs\", Danny Holten, Jarke J. van Wijk. 2009.\n\t\t//\n\t\tgp.moveTo(line.getX2(), line.getY2());\n\t\tgp.lineTo(line.getX1() - 5*pdx, line.getY1() - 5*pdy);\n\t\tgp.lineTo(line.getX1() + 5*pdx, line.getY1() + 5*pdy);\n\t\tgp.closePath();\n\t\tg2d.fill(gp);\n/* // Mid Arrows (better)\n\t double midx = (line.getX1() + line.getX2())/2.0, midy = (line.getY1() + line.getY2())/2.0;\n\t g2d.draw(new Line2D.Double(midx - 5*dx, midy - 5*dy, midx - 10*dx + 5*pdx, midy - 10*dy + 5*pdy));\n\t g2d.draw(new Line2D.Double(midx - 5*dx, midy - 5*dy, midx - 10*dx - 5*pdx, midy - 10*dy - 5*pdy));\n*/\n/* // End Arrows (okay)\n\t g2d.draw(new Line2D.Double(line.getX2() - 5*dx, line.getY2() - 5*dy, line.getX2() - 10*dx + 5*pdx, line.getY2() - 10*dy + 5*pdy));\n\t g2d.draw(new Line2D.Double(line.getX2() - 5*dx, line.getY2() - 5*dy, line.getX2() - 10*dx - 5*pdx, line.getY2() - 10*dy - 5*pdy));\n*/\n }\n\t if (timing) {\n Iterator<Bundle> itb = link_counter_context.getBundles(link).iterator();\n\t\twhile (itb.hasNext()) {\n Bundle bundle = itb.next();\n\t\t if (bundle.hasTime()) {\n\t\t double ratio = ((double) (bundle.ts0() - bs.ts0()))/((double) (bs.ts1dur() - bs.ts0()));\n g2d.setColor(timing_marks_cs.at((float) ratio));\n\t\t double x0 = line.getX1() + dx * len * 0.1 + dx * len * 0.8 * ratio,\n\t\t y0 = line.getY1() + dy * len * 0.1 + dy * len * 0.8 * ratio;\n // g2d.draw(new Line2D.Double(x0 - 4*pdx, y0 - 4*pdy, x0 + 4*pdx, y0 + 4*pdy));\n g2d.draw(new Line2D.Double(x0, y0, x0 + 4*pdx, y0 + 4*pdy));\n \n\t\t // Draw the duration if appropriate\n\t\t double ratio2 = ((double) (bundle.ts1() - bs.ts0()))/((double) (bs.ts1dur() - bs.ts0()));\n if (len * (ratio2 - ratio) > 4) {\n\t\t double x1 = line.getX1() + dx * len * 0.1 + dx * len * 0.8 * ratio2,\n\t\t y1 = line.getY1() + dy * len * 0.1 + dy * len * 0.8 * ratio2,\n xa = line.getX1() + dx * len * 0.1 + dx * (len-0.05*len) * 0.8 * ratio2,\n\t\t\t ya = line.getY1() + dy * len * 0.1 + dy * (len-0.05*len) * 0.8 * ratio2;\n\t\t g2d.draw(new Line2D.Double(x0 + 4*pdx, y0 + 4*pdy, x1 + 4*pdx, y1 + 4*pdy));\n\t\t g2d.draw(new Line2D.Double(xa + 8*pdx, ya + 8*pdy, x1 + 4*pdx, y1 + 4*pdy));\n\t\t // g2d.draw(new Line2D.Double(x1 + 4*pdx, y1 + 4*pdy, x1 + 2*pdx + 2*pdy, y1 + 2*pdy + 2*pdx));\n\t\t }\n\t\t }\n\t\t}\n\t }\n\t }\n\t // Draw labels if applicable\n\t if (lm != null) lm.draw(g2d, link, (int) line.getBounds().getCenterX(), \n\t (int) line.getBounds().getCenterY(), false);\n\n // Accounting for interactivity\n all_shapes.add(line);\n // line_to_link.put(line, link); // Doesn't seem to be needed -- replaced with another function...\n line_to_bundles.put(line, link_counter_context.getBundles(link));\n\n Iterator<Bundle> itb = link_counter_context.getBundles(link).iterator();\n while (itb.hasNext()) {\n\t Bundle bundle = itb.next();\n if (bundle_to_shapes.containsKey(bundle) == false) bundle_to_shapes.put(bundle, new HashSet<Shape>());\n\t bundle_to_shapes.get(bundle).add(line);\n }\n }\n\t}\n g2d.setComposite(orig_composite); g2d.setStroke(orig_stroke);\n }",
"private void monitoringLicenseAndSendNotification(NotificationBean notificationBean){\n\t\t\n//System.out.println(\"execute cmd -- \" + notificationBean.getConnection() + \" --- \" + notificationBean.getNotificationLmstatCmdLoc());\t\t\n\t\t\n\t\t//download lmstat file and delete it remotely\t\t\n//\t\tNetWorkUtil.executeSCPCmdForNotification(notificationBean.getConnection(),\n//\t\t\tnotificationBean.getNotificationLmstatCmdLoc(),LicLiteData.licLiteDataTmpDir);\n\n//local one_server.log and two_server.log test\nif(isGetingOneServerFile()){\nSystem.out.println(\"downloading one_server.log ...\");\n\tNetWorkUtil.executeSCPCmdForNotification(notificationBean.getConnection(),\n\t\t\tnotificationBean.getNotificationLmstatCmdLoc(),LicLiteData.licLiteDataTmpDir);\n}else{\n\tString cmdTwoServerLog = \"cat /home/leo/Desktop/log/two_server.log > /home/leo/Desktop/log/notificationtmp\";\n\tNetWorkUtil.executeSCPCmdForNotification(notificationBean.getConnection(),\n\t\t\tcmdTwoServerLog , LicLiteData.licLiteDataTmpDir);\nSystem.out.println(\"downloading two_server.log ...\");\n}\n\t\t\n\t\t\n\t\t\n\t\t//parse file to generate notification bean\n\t\tString notificationTmpFile = LicLiteData.licLiteDataTmpDir + File.separator + LicLiteData.NOTIFICATION_TMP_FILE;\n//System.out.println(\"notificationTmpFile --> \" + notificationTmpFile);\n\t\tNotificationCmpBean notificationCmpBean = Parser.parseDownloadDataFileToNotificationCmpBean(notificationTmpFile,\n\t\t\tnotificationBean.getNotificationLicenseName(),notificationBean.getNotificationLicenseUserName());\n//System.out.println(\"notificationCmpBean --> \" + notificationCmpBean.toString());\n//System.out.println(\"notificationCmpBean --> \" + notificationTmpFile);\n//System.out.println(\"NotificationLicenseName --> \" + notificationBean.getNotificationLicenseName());\n//System.out.println(\"NotificationLicenseUserName --> \" + notificationBean.getNotificationLicenseUserName());\n//System.out.println(\"licenseName, userName, cmpbeanStr -> \" + notificationBean.getNotificationLicenseName() \n//+ \" -- \" + notificationBean.getNotificationLicenseUserName() + \"\\n\" + notificationCmpBean.toString());\t\t\n\t\tif(notificationCmpBean.getFeatureNameCmp() == null){\n\t\t\t//stop service\n\t\t\t\n\t\t\t//toast say : \"wrong feature name or user name\"\n\t\t}else {\n\t\t\tif(LicLiteData.previousNotificationBean == null){\n\t\t\t\tLicLiteData.previousNotificationBean = notificationCmpBean;\n\t\t\t} else {\n\t\t\t\t//compare previous and current bean to see if need to send notification\n\t\t\t\t//compare LicLiteData.previousNotificationBean as 1st bean with notificationCmpBean as 2nd bean\n//System.out.println(\"LicLiteData.previousNotificationBean --> \" + LicLiteData.previousNotificationBean.toString());\n//System.out.println(\"notificationCmpBean --> \" + notificationCmpBean.toString());\n\t\t\t\tArrayList<NotificationCmpResultBean> tmpCmpResultBeanList = UIUtil\n\t\t\t\t\t.comparePreviousWithSecondNotificationBean(LicLiteData.previousNotificationBean , notificationCmpBean);\n//System.out.println(\"tmpCmpResultBeanList --> \" + tmpCmpResultBeanList);\t\t\t\t\n\t\t\t\tif(tmpCmpResultBeanList.size() > 0){\n//System.out.println(\"sending notification...\");\n\t\t\t\t\tLicLiteData.notificationCmpResultBeanList = tmpCmpResultBeanList;\n\t\t\t\t\t\n\t\t\t\t\tsendNotification();\n\t\t\t\t} else {\n//System.out.println(\"not sending notification...\");\n\t\t\t\t}\n\t\t\t\t//set the ischanged file to true for future comparison\n\t\t\t\tfor(int i = 0; i < notificationCmpBean.getUserUsageListCmp().size(); i++){\n\t\t\t\t\tnotificationCmpBean.getUserUsageListCmp().get(i).setChanged(true);\n\t\t\t\t}\n\t\t\t\t//notificationCmpBean overwrite LicLiteData.previousNotificationBean\n\t\t\t\tLicLiteData.previousNotificationBean = notificationCmpBean;\n\t\t\t} \n\t\t\t\n\t\t}\n\t\t\n\t\t//delete download local lmstat file\n\t\t//this one doesn't needed anymore\n\t\t\n\t\t\n\t}",
"@SubL(source = \"cycl/sbhl/sbhl-link-methods.lisp\", position = 20909) \n public static final SubLObject add_sbhl_link(SubLObject arg1, SubLObject arg2, SubLObject mt, SubLObject tv) {\n {\n final SubLThread thread = SubLProcess.currentSubLThread();\n store_in_sbhl_graph(arg1, arg2, mt, tv);\n if ((!(((tv == $kw18$UNKNOWN)\n || ((NIL != sbhl_module_utilities.sbhl_reflexive_module_p(sbhl_module_vars.get_sbhl_module(UNPROVIDED)))\n && arg1.equal(arg2)))))) {\n if (sbhl_paranoia.$sbhl_trace_level$.getDynamicValue(thread).numGE(FIVE_INTEGER)) {\n Errors\n\t\t\t\t.handleMissingMethodError(\"This call was replaced for LarKC purposes. Originally a method was called. Refer to number 2246\");\n }\n if (sbhl_paranoia.$sbhl_test_level$.getDynamicValue(thread).numGE(FIVE_INTEGER)) {\n {\n SubLObject module = sbhl_module_vars.get_sbhl_module(UNPROVIDED);\n SubLObject module_index_arg = sbhl_module_utilities.get_sbhl_index_arg(module);\n SubLObject index_arg = ((module_index_arg == ONE_INTEGER) ? ((SubLObject) arg1) : arg2);\n SubLObject gather_arg = ((module_index_arg == ONE_INTEGER) ? ((SubLObject) arg2) : arg1);\n if ((NIL == subl_promotions.memberP(gather_arg, get_sbhl_graph_link_nodes(index_arg, sbhl_module_utilities.get_sbhl_module_forward_direction(module), mt, tv), UNPROVIDED, UNPROVIDED))) {\n sbhl_paranoia.sbhl_error(THREE_INTEGER, $str25$Link_node___a__not_present_in_for, gather_arg, arg1, arg2, mt, tv);\n }\n if ((NIL == subl_promotions.memberP(index_arg, get_sbhl_graph_link_nodes(gather_arg, sbhl_module_utilities.get_sbhl_module_backward_direction(module), mt, tv), UNPROVIDED, UNPROVIDED))) {\n sbhl_paranoia.sbhl_error(THREE_INTEGER, $str26$Link_node___a__not_present_in_bac, index_arg, arg1, arg2, mt, tv);\n }\n }\n }\n }\n return NIL;\n }\n }",
"public interface LinkGenerator {\n\n String ATTRIBUTE_CONTROLLER = \"controller\";\n String ATTRIBUTE_RESOURCE = \"resource\";\n String ATTRIBUTE_ACTION = \"action\";\n String ATTRIBUTE_METHOD = \"method\";\n String ATTRIBUTE_URI = \"uri\";\n String ATTRIBUTE_RELATIVE_URI = \"relativeUri\";\n String ATTRIBUTE_INCLUDE_CONTEXT = \"includeContext\";\n String ATTRIBUTE_CONTEXT_PATH = \"contextPath\";\n String ATTRIBUTE_URL = \"url\";\n String ATTRIBUTE_BASE = \"base\";\n String ATTRIBUTE_ABSOLUTE = \"absolute\";\n String ATTRIBUTE_ID = \"id\";\n String ATTRIBUTE_FRAGMENT = \"fragment\";\n String ATTRIBUTE_PARAMS = \"params\";\n String ATTRIBUTE_MAPPING = \"mapping\";\n String ATTRIBUTE_EVENT = \"event\";\n String ATTRIBUTE_ELEMENT_ID = \"elementId\";\n String ATTRIBUTE_PLUGIN = \"plugin\";\n String ATTRIBUTE_NAMESPACE = \"namespace\";\n \n\n Set<String> LINK_ATTRIBUTES = CollectionUtils.newSet(\n ATTRIBUTE_RESOURCE,\n ATTRIBUTE_METHOD,\n ATTRIBUTE_CONTROLLER,\n ATTRIBUTE_ACTION,\n ATTRIBUTE_URI,\n ATTRIBUTE_RELATIVE_URI,\n ATTRIBUTE_CONTEXT_PATH,\n ATTRIBUTE_URL,\n ATTRIBUTE_BASE,\n ATTRIBUTE_ABSOLUTE,\n ATTRIBUTE_ID,\n ATTRIBUTE_FRAGMENT,\n ATTRIBUTE_PARAMS,\n ATTRIBUTE_MAPPING,\n ATTRIBUTE_EVENT,\n ATTRIBUTE_ELEMENT_ID,\n ATTRIBUTE_PLUGIN,\n ATTRIBUTE_NAMESPACE\n );\n\n Map<String, String> REST_RESOURCE_ACTION_TO_HTTP_METHOD_MAP = CollectionUtils.<String, String>newMap(\n \"create\", \"GET\",\n \"save\", \"POST\",\n \"show\", \"GET\",\n \"index\", \"GET\",\n \"edit\", \"GET\",\n \"update\", \"PUT\",\n \"patch\", \"PATCH\",\n \"delete\", \"DELETE\"\n );\n\n Map<String, String> REST_RESOURCE_HTTP_METHOD_TO_ACTION_MAP = CollectionUtils.<String, String>newMap(\n \"GET_ID\", \"show\",\n \"GET\", \"index\",\n \"POST\", \"save\",\n \"DELETE\", \"delete\",\n \"PUT\", \"update\",\n \"PATCH\", \"patch\"\n );\n\n\n /**\n * Generates a link to a static resource for the given named parameters.\n *\n * Possible named parameters include:\n *\n * <ul>\n * <li>base - The base path of the URL, typically an absolute server path</li>\n * <li>contextPath - The context path to link to, defaults to the servlet context path</li>\n * <li>dir - The directory to link to</li>\n * <li>file - The file to link to (relative to the directory if specified)</li>\n * <li>plugin - The plugin that provides the resource</li>\n * <li>absolute - Whether the link should be absolute or not</li>\n * </ul>\n *\n * @param params The named parameters\n * @return The link to the static resource\n */\n String resource(@SuppressWarnings(\"rawtypes\") Map params);\n\n /**\n * Generates a link to a controller, action or URI for the given named parameters.\n *\n * Possible named parameters include:\n *\n * <ul>\n * <li>resource - If linking to a REST resource, the name of the resource or resource path to link to. Either 'resource' or 'controller' should be specified, but not both</li>\n * <li>controller - The name of the controller to use in the link, if not specified the current controller will be linked</li>\n * <li>action - The name of the action to use in the link, if not specified the default action will be linked</li>\n * <li>uri - relative URI</li>\n * <li>url - A map containing the action,controller,id etc.</li>\n * <li>base - Sets the prefix to be added to the link target address, typically an absolute server URL. This overrides the behaviour of the absolute property, if both are specified.</li>\n * <li>absolute - If set to \"true\" will prefix the link target address with the value of the grails.serverURL property from Config, or http://localhost:<port> if no value in Config and not running in production.</li>\n * <li>contextPath - The context path to link to, defaults to the servlet context path</li>\n * <li>id - The id to use in the link</li>\n * <li>fragment - The link fragment (often called anchor tag) to use</li>\n * <li>params - A map containing URL query parameters</li>\n * <li>mapping - The named URL mapping to use to rewrite the link</li>\n * <li>event - Webflow _eventId parameter</li>\n * </ul>\n * @param params The named parameters\n * @return The generator link\n */\n String link(@SuppressWarnings(\"rawtypes\") Map params);\n\n /**\n * Generates a link to a controller, action or URI for the given named parameters.\n *\n * Possible named parameters include:\n *\n * <ul>\n * <li>resource - If linking to a REST resource, the name of the resource or resource path to link to. Either 'resource' or 'controller' should be specified, but not both</li>\n * <li>controller - The name of the controller to use in the link, if not specified the current controller will be linked</li>\n * <li>action - The name of the action to use in the link, if not specified the default action will be linked</li>\n * <li>uri - relative URI</li>\n * <li>url - A map containing the action,controller,id etc.</li>\n * <li>base - Sets the prefix to be added to the link target address, typically an absolute server URL. This overrides the behaviour of the absolute property, if both are specified.</li>\n * <li>absolute - If set to \"true\" will prefix the link target address with the value of the grails.serverURL property from Config, or http://localhost:<port> if no value in Config and not running in production.</li>\n * <li>id - The id to use in the link</li>\n * <li>fragment - The link fragment (often called anchor tag) to use</li>\n * <li>params - A map containing URL query parameters</li>\n * <li>mapping - The named URL mapping to use to rewrite the link</li>\n * <li>event - Webflow _eventId parameter</li>\n * </ul>\n * @param params The named parameters\n * @param encoding The character encoding to use\n * @return The generator link\n */\n String link(@SuppressWarnings(\"rawtypes\") Map params, String encoding);\n\n /**\n * Obtains the context path from which this link generator is operating.\n *\n * @return The base context path\n */\n String getContextPath();\n\n /**\n * The base URL of the server used for creating absolute links.\n *\n * @return The base URL of the server\n */\n String getServerBaseURL();\n}",
"private void setLinks(\n int index, org.chromium.components.paint_preview.common.proto.PaintPreview.LinkDataProto value) {\n value.getClass();\n ensureLinksIsMutable();\n links_.set(index, value);\n }",
"public static void createNode(int id, Field field,\r\n\t\t\tRadioInfo.RadioInfoShared radioInfoShared, Mapper protMap,\r\n\t\t\tPacketLoss plIn, PacketLoss plOut, NodeInfo info,\r\n\t\t\tATaGProgram atagPrg) throws NoSuchMethodException {\r\n\r\n\t\t// Create entities\r\n\t\tRadioNoise radio = new RadioNoiseIndep(id, radioInfoShared);\r\n\t\tMacDumb mac = new MacDumb(new MacAddress(id), radio.getRadioInfo());\r\n\t\tNetAddress netAddr = NetAddress.LOCAL;\r\n\t\tNetIp net = new NetIp(netAddr, protMap, plIn, plOut);\r\n\t\tTransUdp udp = new TransUdp();\r\n\r\n\t\t// hookup entities\r\n\t\tLocation location = new Location.Location2D(\r\n\t\t\t\tinfo.getMyLocation().getX(), info.getMyLocation().getY());\r\n\t\tfield.addRadio(radio.getRadioInfo(), radio.getProxy(), location);\r\n\t\tfield.startMobility(radio.getRadioInfo().getUnique().getID());\r\n\r\n\t\t// radio hookup\r\n\t\tradio.setFieldEntity(field.getProxy());\r\n\t\tradio.setMacEntity(mac.getProxy());\r\n\r\n\t\t// mac hookup\r\n\t\tmac.setRadioEntity(radio.getProxy());\r\n\t\tbyte intId = net.addInterface(mac.getProxy());\r\n\t\tmac.setNetEntity(net.getProxy(), intId);\r\n\r\n\t\t// net hookup\r\n\t\tnet.setProtocolHandler(Constants.NET_PROTOCOL_UDP, udp.getProxy());\r\n\r\n\t\t// trans hookup\r\n\t\tudp.setNetEntity(net.getProxy());\r\n\r\n\t\tSimulationReferences.setNodeInfo(id, info);\r\n\r\n\t\tDatagramObjectIO objectIO = new DatagramObjectIO(\r\n\t\t\t\tLogicalNeighborhood.PORT, LogicalNeighborhood.BUFFER_SIZE,\r\n\t\t\t\tLogicalNeighborhood.RECEIVE_TIMEOUT);\r\n\t\tSimulationReferences.setObjectIO(id, objectIO);\r\n\t\tAppJava runObjectIO = new AppJava(DatagramObjectIO.class);\r\n\t\trunObjectIO.setUdpEntity(udp.getProxy());\r\n\t\trunObjectIO.getProxy().run(new String[] { String.valueOf(id) });\r\n\t\tJistAPI.sleep(1);\r\n\r\n\t\tLogicalNeighborhood ln = new LogicalNeighborhood(info, objectIO);\r\n\t\tSimulationReferences.setLN(id, ln);\r\n\t\tAppJava runLNTick = new AppJava(LogicalNeighborhood.class);\r\n\t\trunLNTick.setUdpEntity(udp.getProxy());\r\n\t\trunLNTick.getProxy().run(\r\n\t\t\t\tnew String[] { \"tickStart\", String.valueOf(id) });\r\n\t\tJistAPI.sleep(1);\r\n\t\tAppJava runLNQueue = new AppJava(LogicalNeighborhood.class);\r\n\t\trunLNQueue.setUdpEntity(udp.getProxy());\r\n\t\trunLNQueue.getProxy().run(\r\n\t\t\t\tnew String[] { \"queueStart\", String.valueOf(id) });\r\n\t\tJistAPI.sleep(1);\r\n\r\n\t\t// TODO: Need pre-built ATaG manager!!!\r\n\t\tAtagManager atagManager = new PreBuiltAtagManager();\r\n\t\tatagManager.setAtagProgram(atagPrg);\r\n\t\tatagManager.setNodeInfo(info);\r\n\t\tatagManager.setDataPool(new DataPool(ln, info, atagManager));\r\n\t\tatagManager.setUp();\r\n\t\tSimulationReferences.setAtagManager(id, atagManager);\r\n\r\n\t\tAppJava runAtagManager = new AppJava(AtagManager.class);\r\n\t\trunAtagManager.setUdpEntity(udp.getProxy());\r\n\t\tfor (int i = 0; i < atagPrg.numTasks(); i++) {\r\n\t\t\tJistAPI.sleep(1);\r\n\t\t\trunAtagManager.getProxy().run(\r\n\t\t\t\t\tnew String[] { String.valueOf(id), String.valueOf(i) });\r\n\t\t}\r\n\t}",
"void updateTapTableReferences(TableConfig cfgTable, boolean createOnly) throws ConfigurationException;",
"public Link add(Link link);",
"@objid (\"000fb1bc-c4bf-1fd8-97fe-001ec947cd2a\")\npublic interface LinkEnd extends UmlModelElement {\n /**\n * The metaclass simple name.\n */\n @objid (\"e6dd0ee9-d2ae-459e-911e-137b205a96a9\")\n public static final String MNAME = \"LinkEnd\";\n\n /**\n * The metaclass qualified name.\n */\n @objid (\"62f5bc44-c159-4a21-873f-c9ba90f5653c\")\n public static final String MQNAME = \"Standard.LinkEnd\";\n\n /**\n * Get the 'graphical owner' related to this end.\n * The owner is the current source or the opposite end's target according to the navigability.\n */\n @objid (\"8b942215-f0a1-454e-9f8a-596315ee40d5\")\n Instance getOwner();\n\n @objid (\"006058b0-2963-1080-943a-001ec947cd2a\")\n void setTarget(final Instance value, final boolean fixModel);\n\n @objid (\"006059f0-2963-1080-943a-001ec947cd2a\")\n void setSource(final Instance value, final boolean fixModel);\n\n /**\n * Sets both ends sources and targets according to the given navigability.\n * <ul>\n * <li>THISSIDE: only current source and target must be filled.</li>\n * <li>OHERSIDE: only opposite source and target must be filled.</li>\n * <li>BOTHSIDES: current source must be equals to opposite target as well as current target and opposite source.</li>\n * <li>NONE: both sources must be filled, but no target</li>\n * </ul>\n * @param value whether or not to synchronize the other end and both source/target values. This end will be made navigable whatever the current navigability is.\n */\n @objid (\"50d3075c-1fcb-4a03-a648-16729171986f\")\n void setNavigable(boolean value);\n\n @objid (\"6d12e031-ad22-449a-9171-6a88d4158b48\")\n boolean isNavigable();\n\n /**\n * Getter for attribute 'LinkEnd.IsOrdered'\n * \n * Metamodel description:\n * <i>Determines if this LinkEnd is ordered.</i>\n */\n @objid (\"fcf73d01-d406-41e9-9490-067237966153\")\n boolean isIsOrdered();\n\n /**\n * Setter for attribute 'LinkEnd.IsOrdered'\n * \n * Metamodel description:\n * <i>Determines if this LinkEnd is ordered.</i>\n */\n @objid (\"85e0d2fc-c5f1-47a6-a7a9-d1d92c110978\")\n void setIsOrdered(boolean value);\n\n /**\n * Getter for attribute 'LinkEnd.IsUnique'\n * \n * Metamodel description:\n * <i>Determines if this LinkEnd is unique.</i>\n */\n @objid (\"ef9777b4-ed2a-4341-bb22-67675cddb70a\")\n boolean isIsUnique();\n\n /**\n * Setter for attribute 'LinkEnd.IsUnique'\n * \n * Metamodel description:\n * <i>Determines if this LinkEnd is unique.</i>\n */\n @objid (\"d7a49a3a-2f15-4f2c-91a0-847c1e869a0c\")\n void setIsUnique(boolean value);\n\n /**\n * Getter for attribute 'LinkEnd.MultiplicityMax'\n * \n * Metamodel description:\n * <i>Maximum value of the Link's multiplicity.</i>\n */\n @objid (\"7bba25c1-4310-45fa-b2ce-d6cdc992be70\")\n String getMultiplicityMax();\n\n /**\n * Setter for attribute 'LinkEnd.MultiplicityMax'\n * \n * Metamodel description:\n * <i>Maximum value of the Link's multiplicity.</i>\n */\n @objid (\"0ef18ad8-3371-4bb9-933d-7b4e156bea34\")\n void setMultiplicityMax(String value);\n\n /**\n * Getter for attribute 'LinkEnd.MultiplicityMin'\n * \n * Metamodel description:\n * <i>Minimum value of the Link's multiplicity. When placed on a target end, the multiplicity specifies the number of target instances that may be associated with a single source instance across the given Link.</i>\n */\n @objid (\"258318a3-c0bd-4ddc-971b-1e72b90fcbb1\")\n String getMultiplicityMin();\n\n /**\n * Setter for attribute 'LinkEnd.MultiplicityMin'\n * \n * Metamodel description:\n * <i>Minimum value of the Link's multiplicity. When placed on a target end, the multiplicity specifies the number of target instances that may be associated with a single source instance across the given Link.</i>\n */\n @objid (\"06670c6b-fb3b-41b3-aefd-29ea57042310\")\n void setMultiplicityMin(String value);\n\n /**\n * Getter for relation 'LinkEnd->Link'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"780bebb2-6884-4789-bdef-ca10444ad5fb\")\n Link getLink();\n\n /**\n * Setter for relation 'LinkEnd->Link'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"cd72633c-53d3-4556-b5de-b52113e3a225\")\n void setLink(Link value);\n\n /**\n * Getter for relation 'LinkEnd->Target'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"19651663-f981-4f11-802a-d5d7cbd6f88a\")\n Instance getTarget();\n\n /**\n * Setter for relation 'LinkEnd->Target'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"8fb70c43-b102-4a64-9424-c7cc07d58fcf\")\n void setTarget(Instance value);\n\n /**\n * Getter for relation 'LinkEnd->OppositeOwner'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"aaf16daa-ed28-496e-bee1-ebf665987a0e\")\n LinkEnd getOppositeOwner();\n\n /**\n * Setter for relation 'LinkEnd->OppositeOwner'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"67ebbbfe-83e1-4802-a6be-2ffada70c737\")\n void setOppositeOwner(LinkEnd value);\n\n /**\n * Getter for relation 'LinkEnd->RealizedInformationFlow'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"d5ab3449-47f3-49a5-9936-6634cda6cb2a\")\n EList<InformationFlow> getRealizedInformationFlow();\n\n /**\n * Filtered Getter for relation 'LinkEnd->RealizedInformationFlow'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"b9cdbb67-9b00-43b4-aa83-a5150ca375e9\")\n <T extends InformationFlow> List<T> getRealizedInformationFlow(java.lang.Class<T> filterClass);\n\n /**\n * Getter for relation 'LinkEnd->Model'\n * \n * Metamodel description:\n * <i>The LinkEnd is an occurrence of this AssociationEnd.</i>\n */\n @objid (\"661a22c1-2de2-4b65-a955-6b755461b1ac\")\n AssociationEnd getModel();\n\n /**\n * Setter for relation 'LinkEnd->Model'\n * \n * Metamodel description:\n * <i>The LinkEnd is an occurrence of this AssociationEnd.</i>\n */\n @objid (\"1a8cb555-55ca-418e-8378-2f50ba867c6b\")\n void setModel(AssociationEnd value);\n\n /**\n * Getter for relation 'LinkEnd->Consumer'\n * \n * Metamodel description:\n * <i>Used for Connectors between Ports to designate the RequiredInterface(s) set the LinkEnd is connected to.</i>\n */\n @objid (\"8f1c9d42-a8ac-4f52-b3f8-2b5f076b4348\")\n RequiredInterface getConsumer();\n\n /**\n * Setter for relation 'LinkEnd->Consumer'\n * \n * Metamodel description:\n * <i>Used for Connectors between Ports to designate the RequiredInterface(s) set the LinkEnd is connected to.</i>\n */\n @objid (\"443e3927-5e5c-43bb-9d78-44c58df8e6fd\")\n void setConsumer(RequiredInterface value);\n\n /**\n * Getter for relation 'LinkEnd->Opposite'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"e10bb26d-c5e7-4f7e-b4cb-8c5551328d52\")\n LinkEnd getOpposite();\n\n /**\n * Setter for relation 'LinkEnd->Opposite'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"322f7781-7f9f-47de-8df7-a12ebfa5784a\")\n void setOpposite(LinkEnd value);\n\n /**\n * Getter for relation 'LinkEnd->Source'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"4e37aa68-c0f7-4404-a2cb-e6088f1dda62\")\n Instance getSource();\n\n /**\n * Setter for relation 'LinkEnd->Source'\n * \n * Metamodel description:\n * <i>null</i>\n */\n @objid (\"fddcf86a-595c-4c38-ad3f-c2a660a9497b\")\n void setSource(Instance value);\n\n /**\n * Getter for relation 'LinkEnd->Provider'\n * \n * Metamodel description:\n * <i>Used for Connectors between Ports to designate the ProvidedInterface(s) set the LinkEnd is connected to.</i>\n */\n @objid (\"13e63a4b-fab3-4b16-b7f9-69b4d6187c94\")\n ProvidedInterface getProvider();\n\n /**\n * Setter for relation 'LinkEnd->Provider'\n * \n * Metamodel description:\n * <i>Used for Connectors between Ports to designate the ProvidedInterface(s) set the LinkEnd is connected to.</i>\n */\n @objid (\"a3188449-2f95-4e02-a233-e2e48fa5e5b0\")\n void setProvider(ProvidedInterface value);\n\n}",
"public void markNextHopIpv4GwAddr1Create() throws JNCException {\n markLeafCreate(\"nextHopIpv4GwAddr1\");\n }",
"public static void setLink(Node node, Pointer val) {\n binding_irnode.set_irn_link(node.ptr, val);\n }",
"ISSeedModifications createISSeedModifications();",
"@SubL(source = \"cycl/sbhl/sbhl-link-methods.lisp\", position = 15232) \n public static final SubLObject store_in_sbhl_graph(SubLObject arg1, SubLObject arg2, SubLObject mt, SubLObject tv) {\n if (((NIL != sbhl_link_vars.sbhl_node_object_p(arg1))\n && (NIL != sbhl_link_vars.sbhl_node_object_p(arg2)))) {\n if ((tv != $kw18$UNKNOWN)) {\n {\n SubLObject module = sbhl_module_vars.get_sbhl_module(UNPROVIDED);\n if ((!(((NIL != sbhl_module_utilities.sbhl_reflexive_module_p(module))\n && arg1.equal(arg2))))) {\n {\n SubLObject module_index_arg = sbhl_module_utilities.get_sbhl_index_arg(module);\n SubLObject index_arg = ((module_index_arg == ONE_INTEGER) ? ((SubLObject) arg1) : arg2);\n SubLObject gather_arg = ((module_index_arg == ONE_INTEGER) ? ((SubLObject) arg2) : arg1);\n SubLObject forward_direction = sbhl_module_utilities.get_sbhl_module_forward_direction(module);\n SubLObject backward_direction = sbhl_module_utilities.get_sbhl_module_backward_direction(module);\n SubLObject forward_link = sbhl_graphs.get_sbhl_graph_link(index_arg, module);\n SubLObject rw_lock_var = sbhl_link_vars.$sbhl_rw_lock$.getGlobalValue();\n SubLObject needs_to_releaseP = NIL;\n try {\n needs_to_releaseP = ReadWriteLocks.rw_lock_seize_write_lock(rw_lock_var);\n if ((NIL != forward_link)) {\n {\n SubLObject forward_link_nodes = get_sbhl_forward_link_nodes(index_arg, mt, tv);\n if ((NIL == list_utilities.member_eqP(gather_arg, forward_link_nodes))) {\n add_to_sbhl_link(forward_link, mt, forward_direction, tv, gather_arg);\n sbhl_graphs.touch_sbhl_graph_link(index_arg, forward_link, module);\n }\n }\n } else {\n create_and_store_sbhl_link(index_arg, gather_arg, forward_direction, mt, tv, module);\n }\n {\n SubLObject backward_link = sbhl_graphs.get_sbhl_graph_link(gather_arg, module);\n if ((NIL != backward_link)) {\n {\n SubLObject backward_link_nodes = get_sbhl_backward_link_nodes(gather_arg, mt, tv);\n if ((NIL == list_utilities.member_eqP(index_arg, backward_link_nodes))) {\n add_to_sbhl_link(backward_link, mt, backward_direction, tv, index_arg);\n sbhl_graphs.touch_sbhl_graph_link(gather_arg, backward_link, module);\n }\n }\n } else {\n create_and_store_sbhl_link(gather_arg, index_arg, backward_direction, mt, tv, module);\n }\n }\n } finally {\n if ((NIL != needs_to_releaseP)) {\n ReadWriteLocks.rw_lock_release_write_lock(rw_lock_var);\n }\n }\n }\n }\n }\n }\n } else if ((NIL != isa_to_naut_conditionsP(arg1, arg2))) {\n {\n SubLObject rw_lock_var = sbhl_link_vars.$sbhl_rw_lock$.getGlobalValue();\n SubLObject needs_to_releaseP = NIL;\n try {\n needs_to_releaseP = ReadWriteLocks.rw_lock_seize_write_lock(rw_lock_var);\n Errors\n\t\t\t\t.handleMissingMethodError(\"This call was replaced for LarKC purposes. Originally a method was called. Refer to number 1914\");\n } finally {\n if ((NIL != needs_to_releaseP)) {\n ReadWriteLocks.rw_lock_release_write_lock(rw_lock_var);\n }\n }\n }\n }\n return NIL;\n }",
"public static long createSmartLinkForElement(KnowledgeElement element) {\n\t\tif (element == null) {\n\t\t\treturn 0;\n\t\t}\n\t\tlong linkId = element.isLinked();\n\t\tif (linkId > 0) {\n\t\t\treturn linkId;\n\t\t}\n\t\tKnowledgeElement lastElement = getPotentialParentElement(element);\n\t\tlinkId = KnowledgePersistenceManager.getInstance(element.getProject()).insertLink(lastElement, element, null);\n\t\treturn linkId;\n\t}",
"private void addLinks(org.chromium.components.paint_preview.common.proto.PaintPreview.LinkDataProto value) {\n value.getClass();\n ensureLinksIsMutable();\n links_.add(value);\n }",
"LinkReader addLink(NodeReader source, NodeReader dest, boolean overwrite) throws NoNodeException, LinkAlreadyPresentException, ServiceException;",
"public void setLink(java.lang.String newLink) {\n\t\tif (instanceExtension.needValuesOnMarkDirty())\n\t\t\tinstanceExtension.markDirty(1,getLink(),newLink);\n\t\telse\n\t\t\tinstanceExtension.markDirty(1);\n\t\tdataCacheEntry.setLink(newLink);\n\t}",
"private String setReferralzz(){\n String uid = mAuth.getCurrentUser().getUid();\n String link = INVITE_LINK+uid;\n FIRDynamicLinkComponents referalLink = new FIRDynamicLinkComponents(new NSURL(link) ,\"https://fingertipsandcompany.page.link\");\n\n FIRDynamicLinkIOSParameters iOSParameters = new FIRDynamicLinkIOSParameters(BUNDLE_ID);\n iOSParameters.setMinimumAppVersion(\"1.0.1\");\n iOSParameters.setAppStoreID(\"1496752335\");\n referalLink.setIOSParameters(iOSParameters);\n\n FIRDynamicLinkAndroidParameters androidParameters = new FIRDynamicLinkAndroidParameters(BUNDLE_ID);\n androidParameters.setMinimumVersion(125);\n referalLink.setAndroidParameters(androidParameters);\n\n\n referalLink.shorten(new VoidBlock3<NSURL, NSArray<NSString>, NSError>() {\n @Override\n public void invoke(NSURL shortURL, NSArray<NSString> nsStrings, NSError nsError) {\n if (nsError != null){\n System.out.println(\"Referal Link Shorter Error-------------------->\"+nsError);\n return;\n }\n mInvitationURL = shortURL.getAbsoluteString();\n System.out.println(\"Generated Referral Link \");\n\n }\n });\n\n return mInvitationURL;\n\n }",
"void createOrUpdateReferenceEntity(List<PsdReferenceEntity> psdReferEntities);",
"public void addNotify() {\n synchronized(getTreeLock()) {\n if (peer == null)\n peer = getComponentFactory().createButton(this);\n super.addNotify();\n }\n }",
"public void _patchReferencesInternal(SL_Obj fromObjArg) {\n SATableReadCapabilityAttributesExtension fromObj = (SATableReadCapabilityAttributesExtension)fromObjArg;\n\n // Get the map of old->new references\n Map<SL_Obj, SL_Obj> map = rootObj.get_patchRefsMap();\n\n SL_Obj wkObj;\n super._patchReferencesInternal(fromObj);\n\n\n }",
"Link(Object it, Link inp, Link inn) { e = it; p = inp; n = inn; }",
"@DISPID(1611006056) //= 0x60060068. The runtime will prefer the VTID if present\n @VTID(132)\n void linkedExternalReferencesWarningAtCreation(\n boolean oWarningAtCreation);",
"public boolean saveLink2(String gameTitle, String nameConfig, String screenName, Link oldLink, Link newLink) {\n\n Log.d(TAG, \"saveLink\");\n\n boolean linkSaved = false;\n Configuration thisConfig = MainModel.getInstance().getConfiguration(gameTitle, nameConfig);\n Screen screen = MainModel.getInstance().getScreenFromConf(thisConfig, screenName);\n\n //alreadyExistInConfig is true if an event already exists with the same name associated with the game\n //modifyingExistingLink is true if we are modifying a pre-existent event, then oldEvent! = null\n //boolean alreadyExistInConfig = (screen.getLink(newLink.getEvent().getName()) != null);\n boolean alreadyExistInConfig = (thisConfig.getLink(newLink.getEvent().getName()) != null);\n boolean modifyingExistingLink = (oldLink != null);\n\n //if it exists and we are modifying it, we delete the previous copy to create an updated one\n if(alreadyExistInConfig && modifyingExistingLink) {\n\n Log.d(TAG, \"deleted old link, added a new one: \"+newLink.getEvent().getName());\n screen.getLinks().remove(oldLink);\n screen.addLink(newLink);\n MainModel.getInstance().writeConfigurationsJson();\n linkSaved = true;\n\n }\n\n //if the link does not exist in the configuration we add it without other controls\n if(!alreadyExistInConfig) {\n\n Log.d(TAG, \"added a new Link\");\n\n screen.addLink(newLink);\n MainModel.getInstance().writeConfigurationsJson();\n linkSaved = true;\n }\n\n return linkSaved;\n\n }",
"boolean insertLink(Link link);",
"public void MANU() {\n //<< ;-------------------------------------------------------------------------------\n //<< ; MANUELLER LINK DURCH EXECUTE ;trans- EXECUTE\n //<< ;\n //<< ; Params:\n //<< ;\n //<< ; ByRefs:\n //<< ;\n //<< ; Returns:\n //<< ;\n //<< ; History:\n //<< ; 25-Jun-2007 shobby BR014409: Adjusted id of image\n //<< ; 11-Jun-2007 shobby BR014409: Don't use YLFN as the loop for buttons. We\n //<< ; need that to preserve the id of the associated field\n //<< ; (set somewhere up the stack)\n //<< ;-------------------------------------------------------------------------------\n //<< new LINK,EXEC,strLink\n mVar LINK = m$.var(\"LINK\");\n mVar EXEC = m$.var(\"EXEC\");\n mVar strLink = m$.var(\"strLink\");\n m$.newVar(LINK,EXEC,strLink);\n //<< \n //<< set LINK=0\n LINK.set(0);\n //<< set strLink = $$$WWW124ExecuteForManualLink(YA)\n strLink.set(include.WWWConst.$$$WWW124ExecuteForManualLink(m$,m$.var(\"YA\")));\n //<< \n //<< if $EXTRACT(strLink,1,2)=\"$$\" {\n if (mOp.Equal(m$.Fnc.$extract(strLink.get(),1,2),\"$$\")) {\n //<< set EXEC = \"SET LINK=\"_strLink\n EXEC.set(mOp.Concat(\"SET LINK=\",strLink.get()));\n //<< XECUTE EXEC\n m$.Cmd.Xecute(EXEC.get());\n }\n //<< \n //<< } elseif $EXTRACT(strLink,1)=\"@\" {\n else if (mOp.Equal(m$.Fnc.$extract(strLink.get(),1),\"@\")) {\n //<< set LINK = @$EXTRACT(strLink,2,99)\n LINK.set(m$.indirectVar(m$.Fnc.$extract(strLink.get(),2,99)).get());\n }\n //<< }\n //<< if 'blnButtons {\n if (mOp.Not(m$.var(\"blnButtons\").get())) {\n //<< write \"<INPUT TYPE=\"\"BUTTON\"\" VALUE=\"\"\"_YAM_$$^WWWUML($$$WWW124ButtonDescription(YA))_\"\"\" onClick=\"\"\"\n m$.Cmd.Write(mOp.Concat(mOp.Concat(mOp.Concat(\"<INPUT TYPE=\\\"BUTTON\\\" VALUE=\\\"\",m$.var(\"YAM\").get()),m$.fnc$(\"WWWUML.main\",include.WWWConst.$$$WWW124ButtonDescription(m$,m$.var(\"YA\")))),\"\\\" onClick=\\\"\"));\n }\n //<< } else {\n else {\n //<< write \"<A onClick='return doLink(this)' HREF=\"\"\"\n m$.Cmd.Write(\"<A onClick='return doLink(this)' HREF=\\\"\");\n }\n //<< }\n //<< if LINK'=0 {\n if (mOp.NotEqual(LINK.get(),0)) {\n //<< write LINK\n m$.Cmd.Write(LINK.get());\n }\n //<< } else {\n else {\n //<< XECUTE strLink\n m$.Cmd.Xecute(strLink.get());\n }\n //<< }\n //<< write \"\"\"\"\n m$.Cmd.Write(\"\\\"\");\n //<< if YTARGETF'=\"\" write \" TARGET=\"\"\"_YTARGETF_\"\"\"\"\n if (mOp.NotEqual(m$.var(\"YTARGETF\").get(),\"\")) {\n m$.Cmd.Write(mOp.Concat(mOp.Concat(\" TARGET=\\\"\",m$.var(\"YTARGETF\").get()),\"\\\"\"));\n }\n //<< write \">\"\n m$.Cmd.Write(\">\");\n //<< if blnButtons {\n if (mOp.Logical(m$.var(\"blnButtons\").get())) {\n //<< do StopButton^WWWFORMCOMMON($$$WWW124ButtonDescription(YA),strPic,\"Y\"_$GET(YFORM)_\"D\"_$get(idYLFN)_\"_\"_$GET(YLFN)_\"IMG\")\n m$.Cmd.Do(\"WWWFORMCOMMON.StopButton\",include.WWWConst.$$$WWW124ButtonDescription(m$,m$.var(\"YA\")),m$.var(\"strPic\").get(),mOp.Concat(mOp.Concat(mOp.Concat(mOp.Concat(mOp.Concat(mOp.Concat(\"Y\",m$.Fnc.$get(m$.var(\"YFORM\"))),\"D\"),m$.Fnc.$get(m$.var(\"idYLFN\"))),\"_\"),m$.Fnc.$get(m$.var(\"YLFN\"))),\"IMG\"));\n //<< write \"</A>\"\n m$.Cmd.Write(\"</A>\");\n }\n //<< }\n //<< QUIT\n return;\n }",
"public void run () {\n \n ExternalAgentReference childExtRef;\n LiaisonStatusReference childLSR;\n ALPAgentReference childAlpRef;\n ALPAgentReference alpRef = theApplication.currentAlpRef;\n ExternalAgentReference extRef = theApplication.currentExtRef;\n ArrayList affectedLSRs = new ArrayList();\n ArrayList extDescendants;\n ArrayList alpDescendants;\n ArrayList alpArray = new ArrayList(); \n ArrayList extArray = new ArrayList();\n Iterator extIt, alpIt;\n\n theApplication.mainWindow.setStatusBar(new String(\"Updating liaison permissions...\"));\n \n affectedLSRs.add(theLSR);\n\n // gather all affect extRefs \n extArray.add(extRef);\n extDescendants = theApplication.extSet.getDescendants(extRef);\n extIt = extDescendants.iterator();\n while(extIt.hasNext()){\n extArray.add(extIt.next());\n }\n\n // gather all affected Alp references \n alpArray.add(alpRef); \n // if the current ALP node controls subordinates, we must set \n // their permissions as well. \n if(!(alpRef.delegatesAuthority.booleanValue())){\n alpDescendants = theApplication.alpSet.getDescendants(alpRef);\n if(alpDescendants.size() > 0){\n alpIt = alpDescendants.iterator();\n while(alpIt.hasNext()){\n alpArray.add(alpIt.next());\n }\n }\n }\n\n // Now, cycle through and modify all necessary permissions\n\n alpIt = alpArray.iterator();\n while(alpIt.hasNext()){\n // outer loop, go through the current alp ref and any descendants\n childAlpRef = (ALPAgentReference) alpIt.next();\n // inner loop-- go through all affect ext refs. \n extIt = extArray.iterator();\n while(extIt.hasNext()){\n childExtRef = (ExternalAgentReference) extIt.next();\n childLSR = theApplication.liaisonSet.getStatusRef(childAlpRef, \n childExtRef);\n childLSR.ALPCanInitiate = new Boolean(theValue);\n affectedLSRs.add(childLSR);\n } // loop through affected external refs \n\n }\n\n theApplication.liaisonCollector.writeOutLSRsToJavaSpace(affectedLSRs);\n \n \n \n \n // Need to get teh external tree to repaint itself. \n theApplication.mainWindow.repaintMainExtTree();\n // Update permissions panel but not the values themselves, otherwise will\n // end up in an infinite event loop\n theApplication.mainWindow.updatePermissionsPanel(alpRef, extRef, false);\n theApplication.mainWindow.setStatusBar(new String(\"done.\"));\n \n }",
"public PhysicalLink() {\n\n }",
"private void syncConnectedDeviceId(String newDeviceId, boolean isReference) {\n // Add the newly connected device id\n Map<Object, Object> devicesMap = new HashMap<>((Map<?, ?>) getEcologyDataSync().getData\n (\"devices\"));\n devicesMap.put(newDeviceId, isReference);\n getEcologyDataSync().setData(\"devices\", devicesMap);\n }",
"public void onLinkInsert(LinkConfig.LinkType linkType)\n {\n LinkConfig linkConfig = linkConfigFactory.createLinkConfig();\n linkConfig.setType(linkType);\n getLinkWizard().start(LinkWizardStep.LINK_REFERENCE_PARSER.toString(), linkConfig);\n }",
"public void markPdnconnEventsMmeCreate() throws JNCException {\n markLeafCreate(\"pdnconnEventsMme\");\n }"
]
| [
"0.5882346",
"0.57663786",
"0.57432735",
"0.55552185",
"0.549953",
"0.5466648",
"0.53128564",
"0.5302869",
"0.5271972",
"0.5263046",
"0.52440614",
"0.5241263",
"0.5236646",
"0.5231125",
"0.5196202",
"0.51786083",
"0.5121298",
"0.51136947",
"0.5103963",
"0.50952315",
"0.5092446",
"0.5091696",
"0.5086376",
"0.50619334",
"0.5059417",
"0.5041071",
"0.50345486",
"0.5031241",
"0.50217235",
"0.50083387",
"0.49958694",
"0.4978",
"0.49672323",
"0.49619448",
"0.49517623",
"0.49444342",
"0.49238244",
"0.49155313",
"0.4908241",
"0.49041337",
"0.48977688",
"0.48965216",
"0.48897555",
"0.48887062",
"0.48847142",
"0.48662335",
"0.48640296",
"0.4857646",
"0.48470533",
"0.48455793",
"0.48381433",
"0.48236892",
"0.48200977",
"0.48174164",
"0.48161852",
"0.4805943",
"0.4803474",
"0.48011324",
"0.4797696",
"0.47902888",
"0.47886187",
"0.47837847",
"0.4780844",
"0.47808006",
"0.47671637",
"0.47581413",
"0.47495705",
"0.47464395",
"0.47418845",
"0.47309512",
"0.47286752",
"0.47144258",
"0.4714227",
"0.47131163",
"0.4699824",
"0.46982533",
"0.46970597",
"0.46910983",
"0.46897352",
"0.46866575",
"0.4681053",
"0.46721345",
"0.4669687",
"0.4665892",
"0.46624574",
"0.46516046",
"0.4647048",
"0.46462938",
"0.46440545",
"0.4642331",
"0.4639814",
"0.46339363",
"0.4630019",
"0.46145076",
"0.46127334",
"0.46110955",
"0.46075952",
"0.4605973",
"0.46021447",
"0.46001244"
]
| 0.52205276 | 14 |
Created by Jurel on 10/23/2015. | public interface Observer {
public void update(float temp, float humidity, float pressure);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"protected boolean func_70814_o() { return true; }",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"private void m50366E() {\n }",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public int describeContents() { return 0; }",
"public void gored() {\n\t\t\n\t}",
"private void poetries() {\n\n\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"public void mo38117a() {\n }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n public void init() {\n }",
"public void method_4270() {}",
"@Override\r\n\tpublic void init() {}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\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 public void init() {}",
"private void kk12() {\n\n\t}",
"public void mo4359a() {\n }",
"@Override\n protected void init() {\n }",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"private void init() {\n\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n void init() {\n }",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n\tpublic void init() {\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"public void m23075a() {\n }",
"@Override public int describeContents() { return 0; }",
"@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 protected void initialize() {\n\n \n }",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\n public int retroceder() {\n return 0;\n }",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"@Override\n protected void initialize() \n {\n \n }",
"private void strin() {\n\n\t}",
"@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\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\t\tpublic void init() {\n\t\t}",
"public final void mo91715d() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"public void mo21877s() {\n }",
"private void m50367F() {\n }",
"public void Tyre() {\n\t\t\r\n\t}"
]
| [
"0.59408295",
"0.59193635",
"0.5820147",
"0.5817149",
"0.5749767",
"0.57429385",
"0.57429385",
"0.5739728",
"0.5731761",
"0.572507",
"0.5722569",
"0.56719667",
"0.56638426",
"0.5658286",
"0.56342953",
"0.56342953",
"0.56342953",
"0.56342953",
"0.56342953",
"0.56277657",
"0.5620296",
"0.5616682",
"0.5594135",
"0.5587415",
"0.5585747",
"0.55717844",
"0.55654806",
"0.55594903",
"0.5554869",
"0.55481285",
"0.55409527",
"0.55404645",
"0.55343056",
"0.55343056",
"0.5475466",
"0.5467614",
"0.546455",
"0.54596686",
"0.5458118",
"0.5454049",
"0.5454049",
"0.5454049",
"0.5453237",
"0.544598",
"0.54421645",
"0.54421645",
"0.54421645",
"0.5441379",
"0.5441267",
"0.54412156",
"0.54344565",
"0.54336345",
"0.54336345",
"0.54336345",
"0.5432566",
"0.54160935",
"0.541153",
"0.54115254",
"0.5409544",
"0.54073834",
"0.5407175",
"0.5406764",
"0.5405302",
"0.54008216",
"0.5400405",
"0.5399565",
"0.53974676",
"0.53974676",
"0.53974676",
"0.53974676",
"0.53974676",
"0.53974676",
"0.5395644",
"0.5393152",
"0.5393152",
"0.5374009",
"0.5369564",
"0.5368655",
"0.53533983",
"0.5344524",
"0.53345203",
"0.5326668",
"0.53260404",
"0.5317036",
"0.5312276",
"0.5312276",
"0.5312276",
"0.5312276",
"0.5312276",
"0.5312276",
"0.5312276",
"0.5309148",
"0.5309148",
"0.5308837",
"0.5304975",
"0.5303393",
"0.53021944",
"0.53021944",
"0.5301472",
"0.5297322",
"0.5296153"
]
| 0.0 | -1 |
Constructor por defecto. Instanciamos los mapas correspondientes a las "tablas" y "secuencias". | BaseDatosMemoria() {
baseDatos = new HashMap<>();
secuencias = new HashMap<>();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void inicializarTablero() {\n for (int i = 0; i < casillas.length; i++) {\n for (int j = 0; j < casillas[i].length; j++) {\n casillas[i][j] = new Casilla();\n }\n }\n }",
"public static void adicionaMap2() {\n\t\t\t\tcDebitos_DFlorianopolis.put(\"seq\", new Integer[] { 1, 5 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"dam\", new Integer[] { 6, 18 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"fiti\", new Integer[] { 19, 26 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"data_Venc\", new Integer[] { 27, 38 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"cartorio\", new Integer[] { 39, 76 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"valor\", new Integer[] { 77, 90 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"multa\", new Integer[] { 91, 104 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"juros\", new Integer[] { 105, 118 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"total\", new Integer[] { 119, 132 });\r\n\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"seq\", new Integer[] { 1, 5 });\t\t\t\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"dam\", new Integer[] { 6, 20 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"processo\", new Integer[] { 21, 34 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"data_Venc\", new Integer[] { 35, 46 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"tributos\", new Integer[] { 47, 60 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"historico\", new Integer[] { 61, 78 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"valor\", new Integer[] { 79, 90 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"multa\", new Integer[] { 91, 104 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"juros\", new Integer[] { 105, 118 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"total\", new Integer[] { 119, 132 });\t\t\t\t\r\n\t\t\t\t\r\n\r\n\r\n\t\t\r\n\r\n\t\t// No DAM ANO DATA VENC No. PROCESSO\r\n\t\t// No. PARCELAMENTO VALOR JUROS TOTAL\r\n\t\tcDebitos_JFlorianopolis.put(\"seq\", new Integer[] { 1, 5 });\r\n\t\tcDebitos_JFlorianopolis.put(\"dam\", new Integer[] { 6, 20 });\r\n\t\tcDebitos_JFlorianopolis.put(\"ano\", new Integer[] { 21, 26 });\r\n\t\tcDebitos_JFlorianopolis.put(\"data_Venc\", new Integer[] { 27, 38 });\r\n\t\tcDebitos_JFlorianopolis.put(\"processo\", new Integer[] { 39, 55 });\r\n\t\tcDebitos_JFlorianopolis.put(\"nParcelamento\", new Integer[] { 55, 76 });\r\n\t\tcDebitos_JFlorianopolis.put(\"valor\", new Integer[] { 77, 104 });\r\n\t\tcDebitos_JFlorianopolis.put(\"juros\", new Integer[] { 105, 118 });\r\n\t\tcDebitos_JFlorianopolis.put(\"total\", new Integer[] { 119, 132 });\r\n\r\n\t\t// DAM LIV/FOLHA/CERT. DATA INSC HISTORICO\r\n\t\t// INSCRICAO VALOR\r\n\r\n\t\tcDebitos_J1Florianopolis.put(\"dam\", new Integer[] { 1, 13 });\r\n\t\tcDebitos_J1Florianopolis.put(\"liv_Folha_Cert\", new Integer[] { 14, 34 });\r\n\t\tcDebitos_J1Florianopolis.put(\"data_Insc\", new Integer[] { 35, 46 });\r\n\t\tcDebitos_J1Florianopolis.put(\"historico\", new Integer[] { 47, 92 });\r\n\t\tcDebitos_J1Florianopolis.put(\"inscricao\", new Integer[] { 93, 119 });\r\n\t\tcDebitos_J1Florianopolis.put(\"valor\", new Integer[] { 120, 132 });\r\n\t\t\r\n\t\t\r\n\t\t// No DAM ANO DATA VENC HISTORICO PROCESSO VALOR JUROS TOTAL\r\n\t\tcDebitos_LFlorianopolis.put(\"seq\", new Integer[] { 1, 5 });\r\n\t\tcDebitos_LFlorianopolis.put(\"dam\", new Integer[] { 6, 20 });\r\n\t\tcDebitos_LFlorianopolis.put(\"ano\", new Integer[] { 21, 26 });\r\n\t\tcDebitos_LFlorianopolis.put(\"data_Venc\", new Integer[] { 27, 38 });\r\n\t\tcDebitos_LFlorianopolis.put(\"historico\", new Integer[] { 39, 76 });\r\n\t\tcDebitos_LFlorianopolis.put(\"processo\", new Integer[] { 77, 91 });\r\n\t\tcDebitos_LFlorianopolis.put(\"valor\", new Integer[] { 92, 104 });\r\n\t\tcDebitos_LFlorianopolis.put(\"juros\", new Integer[] { 105, 118 });\r\n\t\tcDebitos_LFlorianopolis.put(\"total\", new Integer[] { 119, 132 });\r\n\r\n\t\t\r\n\t}",
"public Empresa()\n\t{\n\t\tclientes = new HashMap<String, Cliente>();\n\t\tplanes = new ArrayList<Plan>();\n\t\t\n\t}",
"private void init_fields(String subor, Maps map) throws FileNotFoundException{ //inicializacia vsetkych zoznamov -> hlavne tych z triedy Maps\n map.setCars(new ArrayList<>());\n map.setStations(new ArrayList<>());\n Free_time_window free[][] = map.getFree_windows();\n Reserved_time_window reserved[][] = map.getReserved_windows();\n Road[][] road_matrix = map.getRoads();\n ArrayList<Car>cars;\n \n fr = new FileReader(subor); //nabijem do File Readera moj subor\n br = new BufferedReader(fr); //a budem ho citat\n \n cars = new ArrayList<>();\n \n for(int i= 0;i< max_NO_of_stations; i++){\n for(int j = 0;j< max_NO_of_stations; j++){\n if(i==j){ \n road_matrix[i][j] = new Road(0,-1,-1,-1);\n }\n else{\n road_matrix[i][j] = new Road(-1,-1,-1,-1);\n }\n }\n }\n \n for(int i= 0;i< max_NO_of_stations; i++){\n for(int j = 0;j< max_NO_of_windows; j++){\n free[i][j] = new Free_time_window(-1,-1,-1, -1);\n \n reserved[i][j] = new Reserved_time_window(-1,-1, new Car(-1));\n }\n }\n \n map.setFree_windows(free);\n map.setReserved_windows(reserved);\n map.setRoads(road_matrix);\n map.setCars(cars);\n }",
"public Mapa(String ruta){\r\n cargarMapa(ruta);\r\n generarMapa();\r\n }",
"public Maps()\n\t{\t\n\t\tsetOnMapReadyHandler( new MapReadyHandler() {\n\t\t\t@Override\n\t\t\tpublic void onMapReady(MapStatus status)\n\t\t\t{\n\t\t\t\tmodelo = new MVCModelo();\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tmodelo.cargarInfo();\n\t\t\t\t\tArregloDinamico<Coordenadas> aux = modelo.sacarCoordenadasVertices();\n\t\t\t\t\tLatLng[] rta = new LatLng[aux.darTamano()];\n\t\t\t\t\tfor(int i=0; i< aux.darTamano();i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tCoordenadas actual = aux.darElementoPos(i);\n\t\t\t\t\t\trta[i] = new LatLng(actual.darLatitud(), actual.darLongitud());\n\t\t\t\t\t}\n\t\t\t\t\tlocations = rta;\n\t\t\t\t}\n\t\t\t\tcatch(Exception e)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Error\");\n\t\t\t\t}\n\t\t\t\tfinally\n\t\t\t\t{\n\t\t\t\t\tif ( status == MapStatus.MAP_STATUS_OK )\n\t\t\t\t\t{\n\t\t\t\t\t\tmap = getMap();\n\n\t\t\t\t\t\t// Configuracion de localizaciones intermedias del path (circulos)\n\t\t\t\t\t\tCircleOptions middleLocOpt= new CircleOptions(); \n\t\t\t\t\t\tmiddleLocOpt.setFillColor(\"#00FF00\"); // color de relleno\n\t\t\t\t\t\tmiddleLocOpt.setFillOpacity(0.5);\n\t\t\t\t\t\tmiddleLocOpt.setStrokeWeight(1.0);\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor(int i=0; i<locations.length;i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tCircle middleLoc1 = new Circle(map);\n\t\t\t\t\t\t\tmiddleLoc1.setOptions(middleLocOpt);\n\t\t\t\t\t\t\tmiddleLoc1.setCenter(locations[i]); \n\t\t\t\t\t\t\tmiddleLoc1.setRadius(20); //Radio del circulo\n\t\t\t\t\t\t}\n\n\t\t\t \t //Configuracion de la linea del camino\n\t\t\t \t PolylineOptions pathOpt = new PolylineOptions();\n\t\t\t \t pathOpt.setStrokeColor(\"#FFFF00\");\t // color de linea\t\n\t\t\t \t pathOpt.setStrokeOpacity(1.75);\n\t\t\t \t pathOpt.setStrokeWeight(1.5);\n\t\t\t \t pathOpt.setGeodesic(false);\n\t\t\t \t \n\t\t\t \t Polyline path = new Polyline(map); \t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t \t path.setOptions(pathOpt); \n\t\t\t \t path.setPath(locations);\n\t\t\t\t\t\tinitMap( map );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\t);\n\n\n\t}",
"public Model() {\r\n\t\t\tsuper();\r\n\t\t\tdao=new SerieADAO();\r\n\t\t\tthis.mapSeason=new HashMap<>();\r\n\t\t\tthis.mapTeam=new HashMap<>();\r\n\t\t\tthis.mapTeamBySeason=new HashMap<>();\r\n\t\t\tthis.mapMatch=new HashMap<>();\r\n\t\t\tthis.mapMatchBySeason=new HashMap<>();\r\n\r\n\t\r\n\t\t}",
"public TrazAqui(){\n this.utilizadores = new TreeMap<>();\n this.encomendas = new TreeMap<>();\n this.utilizador = null;\n }",
"public Mapa(int ancho, int alto) {\r\n this.ancho = ancho;\r\n this.alto = alto;\r\n cuadros = new int[ancho*alto];\r\n generarMapa();\r\n }",
"public void initMap() {\n\t\tmap = new Map();\n\t\tmap.clear();\n\t\tphase = new Phase();\n\t\tmap.setPhase(phase);\n\t\tmapView = new MapView();\n\t\tphaseView = new PhaseView();\n\t\tworldDomiView = new WorldDominationView();\n\t\tcardExchangeView = new CardExchangeView();\n\t\tphase.addObserver(phaseView);\n\t\tphase.addObserver(cardExchangeView);\n\t\tmap.addObserver(worldDomiView);\n\t\tmap.addObserver(mapView);\n\t}",
"public Map() {\n\n\t\t}",
"public Roleta()\r\n {\r\n contadorJogadas = new LinkedHashMap<>(); \r\n //adiciona os valores ao mapa de resultados.\r\n valores = new ArrayList<>();\r\n valores.add(EnumResultados.PASSA_VEZ);\r\n valores.add(EnumResultados.PASSA_VEZ);\r\n valores.add(EnumResultados.PERDE_TUDO);\r\n valores.add(EnumResultados.PERDE_TUDO);\r\n valores.add(EnumResultados.PONTOS_100);\r\n valores.add(EnumResultados.PONTOS_100);\r\n valores.add(EnumResultados.PONTOS_100);\r\n valores.add(EnumResultados.PONTOS_100);\r\n valores.add(EnumResultados.PONTOS_200);\r\n valores.add(EnumResultados.PONTOS_200);\r\n valores.add(EnumResultados.PONTOS_200);\r\n valores.add(EnumResultados.PONTOS_200);\r\n valores.add(EnumResultados.PONTOS_400);\r\n valores.add(EnumResultados.PONTOS_400);\r\n valores.add(EnumResultados.PONTOS_400);\r\n valores.add(EnumResultados.PONTOS_400);\r\n valores.add(EnumResultados.PONTOS_500);\r\n valores.add(EnumResultados.PONTOS_500);\r\n valores.add(EnumResultados.PONTOS_1000);\r\n valores.add(EnumResultados.PONTOS_1000); \r\n \r\n }",
"public Empresa(){\r\n\t\tclientes = new ArrayList<Cliente>();\r\n\t\tmedidores = new ArrayList<Medidor>();\r\n\t\tmapaClientes = new HashMap<String,String>();\r\n\t}",
"@Override\n public void initialize() {\n AppContext.getInstance().set(\"tablero\",this);\n tabl = new CasillaController[8][6]; \n SeleccNivel((int)AppContext.getInstance().get(\"lvl\"));\n LlenarCasillas();\n \n }",
"public Propiedad() {\n bdPropiedad = new DaoPropiedad();\n bdComentario = new DaoComentario();\n }",
"public vistaAlojamientos() {\n initComponents();\n \n try {\n miConn = new Conexion(\"jdbc:mysql://localhost/turismo\", \"root\", \"\");\n ad = new alojamientoData(miConn);\n \n } catch (ClassNotFoundException ex) {\n Logger.getLogger(vistaAlojamientos.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n \n }",
"public Tablero(int n, int m) {\n taxis = new HashMap<>();\n casillas = new Casilla[n][m];\n sigueEnOptimo = new HashMap<>();\n for(int i=0; i<n; i++) {\n for(int j=0; j<m; j++) {\n casillas[i][j] = new Casilla(Estado.LIBRE, 0, i, j);\n }\n }\n numFilas = n;\n numColumnas = m;\n }",
"public MVCModelo()\n\t{\n\t\ttablaChaining=new HashSeparateChaining<String, TravelTime>(20000000);\n\t\ttablaLineal = new TablaHashLineal<String, TravelTime>(20000000);\n\t}",
"protected AusschreibungMapper() {\r\n\t}",
"public Saida() {\n initComponents();\n defaults();\n preencherTabela();\n \n }",
"public RekapKamar() {\n Koneksi DB = new Koneksi();\n DB.koneksi();\n con = DB.conn;\n stat = DB.stmn;\n initComponents();\n loadTabel();\n }",
"public Controlador() {\n\t\t// m\n\t\tdatosPrueba1 = new ListaEnlazada();\n\t\t// m\n\t\tdatosPrueba2 = new ListaEnlazada();\n\t\t// add\n\t\tdatosPrueba3 = new ListaEnlazada();\n\t\tdatosPrueba4 = new ListaEnlazada();\n\t\tprueba1 = new Estadisticas(datosPrueba1);\n\t\tprueba2 = new Estadisticas(datosPrueba2);\n\t\tprueba3 = new Estadisticas(datosPrueba3);\n\t\tprueba4 = new Estadisticas(datosPrueba4);\n\t\t// finAdd\n\t}",
"public Scacchiera()\n {\n contenutoCaselle = new int[DIM_LATO][DIM_LATO];\n statoIniziale();\n }",
"public Regras()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1100, 457, 1); \n prepare();\n if(MenuPrincipal.mundo == 1) //se o mundo anterior tiver sido MenuPrincipal\n som1 = MenuPrincipal.som2; //a música ficar com a mesma opção do mundo Menu Principal (a tocar ou sem som)}\n else if(MenuPrincipal.mundo == 3) //se o mundo anterior tiver sido MundoJogo\n som1 = MundoJogo.som3; //a música ficar com a mesma opção do mundo MundoJogo (a tocar ou sem som)\n imgsom2 = MenuPrincipal.imgsom1; //atualiza a imagem da coluna para ser igual à do mundo MenuPrincipal (mute/unmute)\n MenuPrincipal.mundo = 2; //atualizar 'mundo' para indicar que o mundo atual é o mundo Regras\n }",
"public DetalleTablaComplementario() {\r\n }",
"private void init() {\n\t\tmap = new LinkedHashMap<String, HeaderData>();\r\n\t\tList<HeaderData> list = config.getColumns();\r\n\t\tfor(HeaderData info: list){\r\n\t\t\tString id = info.getId();\r\n\t\t\tif(id == null) throw new IllegalArgumentException(\"Null id found for \"+info.getClass().getName());\r\n\t\t\t// Map the id to info\r\n\t\t\tmap.put(info.getId(), info);\r\n\t\t}\r\n\t}",
"public MapEntity() {\n\t}",
"public Aritmetica(){ }",
"public void construirTabla(String tipo) {\r\n\r\n\t\t\r\n\t\tif(tipo == \"lis\") {\r\n\t\t\tlistaPersonas = datarPersonas();\r\n\t\t} else if (tipo == \"bus\") {\r\n\t\t\tlistaPersonas = datarPersonasBusqueda();\r\n\t\t}\r\n\t\t\r\n\t\tArrayList<String> titulosList=new ArrayList<>();\r\n\t\t\r\n\t\t//Estos son los encabezados de las columnas\r\n\t\t\r\n\t\ttitulosList.add(\"DNI\");\r\n\t\ttitulosList.add(\"NOMBRE\");\r\n\t\ttitulosList.add(\"APELLIDO\");\r\n\t\ttitulosList.add(\"CUENTA BANCARIA\");\r\n\t\ttitulosList.add(\"PASSWORD\");\r\n\t\ttitulosList.add(\"FECHA DE NACIMIENTO\");\r\n\t\ttitulosList.add(\"TELEFONO\");\r\n\t\ttitulosList.add(\"CORREO ELECTRONICO\");\r\n\t\ttitulosList.add(\"ROL\");\r\n\t\ttitulosList.add(\"Modificar\");\r\n\t\ttitulosList.add(\"Eliminar\"); \r\n\t\t\t\t\r\n\t\t//se asignan los tÃtulos de las columnas para enviarlas al constructor de la tabla\r\n\t\t\r\n\t\tString titulos[] = new String[titulosList.size()];\r\n\t\tfor (int i = 0; i < titulos.length; i++) {\r\n\t\t\ttitulos[i]=titulosList.get(i);\r\n\t\t}\r\n\t\t\r\n\t\tObject[][] data = arrayDatos(titulosList);\r\n\t\tcrearTabla(titulos,data);\r\n\t\t\r\n\t}",
"public void cargarTablas(){\n ControladorEmpleados empleados= new ControladorEmpleados();\n ControladorProyectos proyectos= new ControladorProyectos();\n ControladorCasos casos= new ControladorCasos();\n actualizarListadoObservable(empleados.consultarEmpleadosAdminProyectos(ESTADO_ASIGNADO, TIPO_3),casos.consultarCasos(devolverUser()),casos.consultarTiposCaso());\n }",
"public DataMahasiswa() {\n initComponents();\n load_table();\n }",
"public void iniciarTabuleiro(JogoTrilha tabuleiro){\n String corInicial = \"vazia\";\n \n for(int i = 0; i < nomeCasa.size(); i++){\n casas.put(nomeCasa.get(i), new Casa(nomeCasa.get(i)));\n casas.get(nomeCasa.get(i)).setCor(corInicial);\n } \n }",
"@PostConstruct\n void init() {\n try {\n parameter = 0;\n inmuebleEntityObj = new InmuebleEntity();\n tipoInmuebleEntityObj = new TipoInmuebleEntity();\n localidadEntityObj = new LocalidadEntity();\n propiedadEntityObj = new PropiedadEntity();\n tipoInmuebleEntityList = selectOptions.cbxTipoInmueble();\n propiedadEntityList = selectOptions.cbxPropiedad(true);\n localidadEntityObj = new LocalidadEntity();\n municipioEntityObj = new MunicipioEntity();\n departamentoEntityObj = new DepartamentoEntity();\n provinciaEntityObj = new ProvinciaEntity();\n tipoInmuebleEntityList = selectOptions.cbxTipoInmueble();\n propiedadEntityList = selectOptions.cbxPropiedad(true);\n departamentoEntityList = selectOptions.cbxDepartamento();\n setEstadoProvincia(true);\n setEstadoMunicipio(true);\n setEstadoLocalidad(true);\n validateParameter = beanApplicationContext.getMapValidateParameters();\n miscParameter = beanApplicationContext.getMapMiscellaneousParameters();\n mapaPropiedades = new MapaGoole(miscParameter.get(EnumParametros.LATITUD_CENTER_MAPA.toString()) + \",\" + miscParameter.get(EnumParametros.LONGITUD_CENTER_MAPA.toString()),\n miscParameter.get(EnumParametros.ZOOM_MAPA.toString()),\n miscParameter.get(EnumParametros.TIPO_MAPA.toString()));\n } catch (Exception e) {\n logger.error(\"[init] Fallo en el init.\", e);\n }\n }",
"public Model() {\n\t\tthis.map = new Map(37, 23);\n\t}",
"public PostalCodeDataBase()\n {\n codeToCityMap = new HashMap<String, Set<String>>();\n // additional instance variable(s) to be initialized in part (b)\n }",
"public Kullanici() {}",
"private void inicializarTablero() {\r\n\t\t\r\n\t\tfor(int i = 0; i < filas; i++) {\r\n\t\t\tfor(int j = 0; j < columnas; j++) {\r\n\t\t\t\tsuperficie[i][j] = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public Diccionario(){\r\n rz=new BinaryTree<Association<String,String>>(null, null, null, null);\r\n llenDic();\r\n tradOra();\r\n }",
"public TranspositionTable() {\n\t\tmap = new HashMap<Long, Transposition>(1000000);\n\t\t//purgatory = new HashSet<Long>();\n\t}",
"public void fill_table()\n {\n Secante secante = new Secante(GraficaSecanteController.a, GraficaSecanteController.b, GraficaSecanteController.ep, FuncionController.e);\n list = secante.algoritmo();\n }",
"public Secante() {\n initComponents();\n this.setLocationRelativeTo(null);\n //Hacer el metodo\n int intentos;\n double a, b, c, d, raiz1, raiz2;\n Interfaza inter = new Interfaza();\n a=inter.a;\n b=inter.b;\n c=inter.c;\n d=inter.d;\n raiz1=inter.metd3a;\n raiz2=inter.metd3b;\n intentos=inter.intentos;\n //COdigo para hacer la tabla\n DefaultTableModel modelo1 = (DefaultTableModel) tblFormula1.getModel();\n hacertabla(intentos, raiz1, raiz2, a, b, c, d, modelo1, txtInformacion);\n }",
"public Principal() {\n initComponents();\n setLocationRelativeTo(null);\n deshabilitarPermisos();\n String titulos[] = {\"Nº\", \"Fecha y Hora\", \"Actividad\"};\n modeloTabla.setColumnIdentifiers(titulos);\n this.tabla.setModel(modeloTabla);\n }",
"public Map(){\r\n map = new Square[0][0];\r\n }",
"public MapBuilder() {\r\n map = new Map();\r\n json = new Gson();\r\n }",
"protected WumpusMap() {\n\t\t\n\t}",
"public Caso_de_uso () {\n }",
"public Arbre(HashMap<String, String> data) throws ExcepcionArbolIncompleto {\n String[] strings = {\"codi\", \"posicioX_ETRS89\", \"posicioY_ETRS89\", \"latitud_WGS84\", \"longitud_WGS84\", \"tipusElement\", \"espaiVerd\", \"adreca\", \"alcada\", \"catEspecieId\", \"nomCientific\", \"nomEsp\", \"nomCat\", \"categoriaArbrat\", \"ampladaVorera\", \"plantacioDT\", \"tipAigua\", \"tipReg\", \"tipSuperf\", \"tipSuport\", \"cobertaEscocell\", \"midaEscocell\", \"voraEscocell\"};\n List<String> infoArbol = new ArrayList<>(Arrays.asList(strings));\n\n for (String s : infoArbol) {\n if (!data.containsKey(s)) {\n throw new ExcepcionArbolIncompleto();\n }\n }\n\n this.codi = data.get(\"codi\");\n this.posicioX_ETRS89 = data.get(\"posicioX_ETRS89\").equals(\"NO HAY DATOS REGISTRADOS\") ? 0 : Double.parseDouble(data.get(\"posicioX_ETRS89\"));\n this.posicioY_ETRS89 = data.get(\"posicioY_ETRS89\").equals(\"NO HAY DATOS REGISTRADOS\") ? 0 : Double.parseDouble(data.get(\"posicioY_ETRS89\"));\n this.latitud_WGS84 = data.get(\"latitud_WGS84\").equals(\"NO HAY DATOS REGISTRADOS\") ? 0 : Double.parseDouble(data.get(\"latitud_WGS84\"));\n this.longitud_WGS84 = data.get(\"longitud_WGS84\").equals(\"NO HAY DATOS REGISTRADOS\") ? 0 : Double.parseDouble(data.get(\"longitud_WGS84\"));\n this.tipusElement = data.get(\"tipusElement\");\n this.espaiVerd = data.get(\"espaiVerd\");\n this.adreca = data.get(\"adreca\");\n this.alcada = data.get(\"alcada\");\n this.catEspecieId = data.get(\"catEspecieId\").equals(\"NO HAY DATOS REGISTRADOS\") ? 0 : Integer.parseInt(data.get(\"catEspecieId\"));\n this.nomCientific = data.get(\"nomCientific\");\n this.nomEsp = data.get(\"nomEsp\");\n this.nomCat = data.get(\"nomCat\");\n this.categoriaArbrat = data.get(\"categoriaArbrat\");\n this.ampladaVorera = data.get(\"ampladaVorera\");\n this.plantacioDT = data.get(\"plantacioDT\");\n this.tipAigua = data.get(\"tipAigua\");\n this.tipReg = data.get(\"tipReg\");\n this.tipSuperf = data.get(\"tipSuperf\");\n this.tipSuport = data.get(\"tipSuport\");\n this.cobertaEscocell = data.get(\"cobertaEscocell\");\n this.midaEscocell = data.get(\"midaEscocell\");\n this.voraEscocell = data.get(\"voraEscocell\");\n }",
"public void createMap() {\n\t\tArrayList<String>boardMap = new ArrayList<String>(); //boardmap on tiedostosta ladattu maailman malli\n\t\t\n\t\t//2. try catch blocki, ei jaksa laittaa metodeja heittämään poikkeuksia\n\t\ttry {\n\t\t\tboardMap = loadMap(); //ladataan data boardMap muuttujaan tiedostosta\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t\t\n\t\t// 3. j=rivit, i=merkit yksittäisellä rivillä\n\t\tfor(int j=0; j<boardMap.size();j++){ \t\t//..rivien lkm (boardMap.size) = alkioiden lkm. \n\t\t\tfor(int i=0; i<boardMap.get(j).length(); i++){\t\t//..merkkien lkm rivillä (alkion Stringin pituus .length)\n\t\t\t\tCharacter hexType = boardMap.get(j).charAt(i);\t//tuodaan tietyltä riviltä, yksittäinen MERKKI hexType -muuttujaan\n\t\t\t\tworld.add(new Hex(i, j, hexType.toString()));\t//Luodaan uusi HEXa maailmaan, Character -merkki muutetaan Stringiksi että Hex konstructori hyväksyy sen.\n\t\t\t}\n\t\t}\n\t\tconvertEmptyHex();\n\t}",
"public Principal() {\n initComponents();\n\n System.out.println(\"lista de hoteles disponibles\");\n List<Document> hoteles = db.getAllDocuments(\"hoteles\");\n for (Document hotel : hoteles) {\n this.hoteles.add(hotel.getString(\"nombre\"));\n System.out.println(hotel.getString(\"nombre\"));\n }\n \n List<Document> ciudades = db.getAllDocuments(\"ciudades\");\n for (Document ciudad : ciudades) {\n this.ciudades_destino.add(ciudad.getString(\"nombre\"));\n }\n \n }",
"public Controlador(boolean newTable){\n if(newTable){\n vocabulario = new TSB_OAHashtable<>();\n }\n }",
"private void inicializarComponentes() \n\t{\n\t\tthis.table=new JTable(); \n\t\ttablas.setBackground(Color.white);\n\t\tscroll =new JScrollPane(table); // Scroll controla la tabla\n\t\tthis.add(scroll,BorderLayout.CENTER);\n\t\tthis.add(tablas,BorderLayout.NORTH);\n\t\t\n\t}",
"public TabelaDoces() {\n initComponents();\n }",
"public PantallaPrincipal() {\n gestor= new Gestor();\n initComponents();\n inicializarTablaCarreras();\n inicializarTablaCorredorTotales();\n inicializarTablaCorredor();\n mostrarCarreras();\n mostrarCorredoresTotales();\n \n \n }",
"public Alojamiento() {\r\n\t}",
"public Monopoly() {\n\t\tsuper();\n\t\tthis.spieler = new Spielerverwaltung();\n\t\tthis.logik = new Spielverwaltung(spieler,this);\n\t\tpmLaden = new PersistenzLaden();\n\t\tpmSpeichern = new PersistenzSpeichern();\n\t}",
"public BitacoraHotelera() {\n initComponents();\n tabla();\n this.setTitle(\"BITACORA DEL ÁREA DE HOTELERIA\");\n }",
"public Tabono() {\n }",
"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 }",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic HashTableMap() {\r\n\t\tK = new LinkedList[10];\r\n\t\tV = new LinkedList[10];\r\n\t}",
"public InstanceLabelMapTable() {\n\t\tthis(\"instance_label_map\", null);\n\t}",
"public void initialize() {\n\n fechaDeLaVisita.set(LocalDate.now());\n\n if (medico.get() != null) {\n medico.get().clear();\n } else {\n medico.set(new Medico());\n }\n\n turnoVisita.set(\"\");\n visitaAcompanadaSN.set(false);\n lugarVisita.set(\"\");\n if (causa.get() != null) {\n causa.get().clear();\n } else {\n causa.set(new Causa());\n }\n\n if (promocion.get() != null) {\n promocion.get().clear();\n } else {\n promocion.set(new Promocion());\n }\n\n observacion.set(\"\");\n persistida.set(false);\n persistidoGraf.set(MaterialDesignIcon.SYNC_PROBLEM.graphic());\n\n fechaCreacion.set(LocalDateTime.now());\n\n }",
"public Regla2(){ /*ESTE ES EL CONSTRUCTOR POR DEFECTO */\r\n\r\n /* TODAS LAS CLASES TIENE EL CONSTRUCTOR POR DEFECTO, A VECES SE CREAN AUTOMATICAMENTE, PERO\r\n PODEMOS CREARLOS NOSOTROS TAMBIEN SI NO SE HUBIERAN CREADO AUTOMATICAMENTE\r\n */\r\n \r\n }",
"public TelaEmpresa() {\n initComponents();\n conexao = ModuloConexao.conector();\n }",
"public CjtMap(){\r\n cjtMap = new TreeMap();\r\n sequence = new Sequence(1, 0, 1, false);\r\n }",
"public TelaContaUnica() {\n initComponents();\n }",
"public School(){\n _persons = new TreeMap<Integer, Person>();\n _students = new HashMap<Integer, Student>();\n _professors = new HashMap<Integer, Professor>();\n _administratives = new HashMap<Integer, Administrative>();\n _courses = new HashMap<String,Course>();\n _disciplines = new HashMap<String,Discipline>();\n _disciplineCourse = new TreeMap<String, HashMap<String, Discipline>>();\n }",
"public ConsultasConsulta() {\n tablaconsultas = new DefaultTableModel();\n archivo.leer();\n try {\n this.conexioncitas = new ProcesosCitas(archivo.getBase(), archivo.getUser(), archivo.getPassword());\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(Especie.class.getName()).log(Level.SEVERE, null, ex);\n } catch (SQLException ex) {\n Logger.getLogger(Especie.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n initComponents();\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n cargarConsultas();\n\n }",
"public Matriu() {\n \t/** <p><b>Pre:</b></p> <Ul>Cert.</Ul>\n\t\t * <p><b>Post:</b></p> <Ul> S'inicialitza una matriu esparsa buida. </Ul>\n\t\t * \n\t\t*/\n this.M = new HashMap<>(0);\n this.MatriuTF_IDF = new HashMap<>(0);\n this.IDFJ = new TreeMap<>();\n }",
"public MapOther() {\n }",
"@Override\n\t@Transactional\n\n\tpublic void initCinemas() {\n\t\tvilleRepository.findAll().forEach(v->{\n\t\t\tStream.of(\"Megarama\",\"Pathé\",\"UGC\",\"MK2\").forEach(c->{\n\t\t\t\tCinema cinema=new Cinema();\n\t\t\t\tcinema.setName(c);\n\t\t\t\tcinema.setNombreSalles(3+(int) (Math.random()*7));\n\t\t\t\tcinema.setVille(v);\n\t\t\t\t\n\t\t\t cinemaRepository.save(cinema);\t\n\t\t\t});\n\t\t\t\n\t\t\t\n\t\t});\n\t}",
"public Sistema(){\r\n\t\t\r\n\t}",
"public Map(){\n this.matrix = new int[10][10];\n }",
"public Manusia() {}",
"public Pasien() {\r\n }",
"private MapTransformer(Map map) {\n super();\n iMap = map;\n }",
"public DanielPatricio() throws SQLException {\n initComponents();\n //limpiar();\n recargarDropDownCarros();\n recargarTextArea();\n recargarDataTable();\n \n \n }",
"public Ciudad()\n {\n\n }",
"public Map(SpriteLoader sprites) {\n\n this.sprites = sprites;\n\n }",
"public empresaDAO(){\r\n \r\n }",
"public TimeMap2() {\n map = new HashMap<>();\n }",
"public TournamentController()\n\t{\n\t\tinitMap();\n\t}",
"public Agregar_pacientes() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"private void iniciar() {\r\n\t\t/*Se instancian las clases*/\r\n\t\tmiVentanaPrincipal=new VentanaPrincipal();\r\n\t\tmiVentanaRegistro=new VentanaRegistro();\r\n\t\tmiVentanaBuscar= new VentanaBuscar();\r\n\t\tmiLogica=new Logica();\r\n\t\tmiCoordinador= new Coordinador();\r\n\t\t\r\n\t\t/*Se establecen las relaciones entre clases*/\r\n\t\tmiVentanaPrincipal.setCoordinador(miCoordinador);\r\n\t\tmiVentanaRegistro.setCoordinador(miCoordinador);\r\n\t\tmiVentanaBuscar.setCoordinador(miCoordinador);\r\n\t\tmiLogica.setCoordinador(miCoordinador);\r\n\t\t\r\n\t\t/*Se establecen relaciones con la clase coordinador*/\r\n\t\tmiCoordinador.setMiVentanaPrincipal(miVentanaPrincipal);\r\n\t\tmiCoordinador.setMiVentanaRegistro(miVentanaRegistro);\r\n\t\tmiCoordinador.setMiVentanaBuscar(miVentanaBuscar);\r\n\t\tmiCoordinador.setMiLogica(miLogica);\r\n\t\t\t\t\r\n\t\tmiVentanaPrincipal.setVisible(true);\r\n\t}",
"public Funcionalidad() {\n Cajero cajero1 = new Cajero(\"Pepe\", 2);\n empleados.put(cajero1.getID(), cajero1);\n Reponedor reponedor1 = new Reponedor(\"Juan\", 3);\n empleados.put(reponedor1.getID(), reponedor1);\n Producto producto1 = new Producto(\"Platano\", 10, 8);\n productos.add(producto1);\n Perecedero perecedero1 = new Perecedero(LocalDateTime.now(), \"Yogurt\", 10, 8);\n }",
"public EstadosSql() {\r\n }",
"public MorteSubita() {\n }",
"private InfoTable(Map<Integer, Vehicle> vehiclesDic) {\n\t\t\n\t\t//Set Vehicles dictionaries\n\t\tthis.vehiclesDic = vehiclesDic;\n\t\t\n\t\t// initialize Dictionary for info table\n\t\ttableDic = new ConcurrentHashMap<Integer, Object[]>();\n\t}",
"public Transportador()\n {\n super();\n this.transporte = true;\n this.transporte_medico = false;\n this.classificacao = new HashMap<>();\n this.encomendas = new HashMap<>();\n this.raio = 0.0;\n }",
"public void initializeMap() {\n\t\tgameMap = new GameMap(GameMap.MAP_HEIGHT, GameMap.MAP_WIDTH);\n\t\tgameMap.initializeFields();\n\t}",
"public Espacio (int id, int capacidad, int ocupacion, TipoEspacio tipo, Localizacion localizacion){\n this.id = id;\n this.capacidad = capacidad;\n this.ocupacion = ocupacion;\n this.TIPO = tipo;\n this.localizacion = localizacion;\n }",
"protected Asignatura()\r\n\t{}",
"private void initCoordLogic() throws SQLException {\n\t\tcoordUsuario = new CoordinadorUsuario();\n\t\tlogicaUsuario = new LogicaUsuario();\n\t\tcoordUsuario.setLogica(logicaUsuario);\n\t\tlogicaUsuario.setCoordinador(coordUsuario);\n\t\t/* Listados de ComboBox*/\n\t\trol = new RolVO();\n\t\templeado = new EmpleadoVO();\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t\tfecha = new Date();\r\n\t\t\r\n\t\tlistaBancos = new ArrayList<SelectItem>();\r\n\t\tlistaRegiones = new ArrayList<SelectItem>();\r\n\t\tlistaCiudades = new ArrayList<SelectItem>();\r\n\t\tlistaComunas = new ArrayList<SelectItem>();\r\n\t\t\r\n\t\tfor(EmpresaDTO empresa : configJProcessService.selectEmpresasByOrganizacion(1))\r\n\t\t\tlistaBancos.add(new SelectItem(empresa.getId(), empresa.getNombre()));\r\n\t}",
"public SistemskiKontroler() {\r\n\t\ttabla = new Tabla(10, 10, 10);\r\n\t\tlista = SOUcitajIzFajla.izvrsi(\"data/lista\");\r\n\t}",
"public Map(float longitude, float lattitude, float long_span, float lat_span, Joueur[] joueur) {\n this.longitude = longitude;\n this.lattitude = lattitude;\n this.long_span = long_span;\n this.lat_span = lat_span;\n this.joueur = joueur;\n }",
"public TablaInmueble() {\n initComponents();\n this.setLocationRelativeTo(null);\n inmd = new InmuebleData();\n this.cargarTabla();\n \n }",
"public Biodata() {\n initComponents();\n //pemanggilan fungsi koneksi database yang sudah kita buat pada class koneksi.java\n ConnectionDB DB = new ConnectionDB();\n DB.config();\n con = DB.con;\n stat = DB.stm;\n pst = DB.pst;\n data_table_mahasiswa();\n }",
"public AntrianPasien() {\r\n\r\n }",
"public TmKabupaten() {\n\t}",
"private void initValues() {\n this.closeConnection();\n this.agregarRol = false;\n rutRoles = null; rutRoles = new Vector(); rutRoles.clear();\n deudasContribuyente = null; deudasContribuyente = new Vector(); deudasContribuyente.clear();\n rutRolesConsultados = null; rutRolesConsultados = new HashMap(); rutRolesConsultados.clear();\n param = null; param = new HashMap(); param.clear();\n\n demandasContribuyente = null; demandasContribuyente = new Vector(); demandasContribuyente.clear();\n demandaSeleccionada=null; demandaSeleccionada= new Long(-1);\n\n\n this.conveniosMasivo = null;\n\n porcentajeCuotaContado = null; porcentajeCuotaContado = new Long(0);\n porcentajeCondonacion = null; porcentajeCondonacion = new Long(0);\n pagoContado = null; pagoContado = new Long(0);\n numeroCuotas = null; numeroCuotas = new Long(0);\n totalPagar = null; totalPagar = new Long(0);\n totalPagarConCondonacion = null; totalPagarConCondonacion = new Long(0);\n arregloDeudas=\"\";\n tipoPago=1;\n estadoCobranza=\"T\";\n codigoPropuesta = new Long(0);\n codigoFuncionario = new Long(0);\n idTesoreria = new Long(0);\n liquidada = false;\n }"
]
| [
"0.67048174",
"0.65614235",
"0.65310615",
"0.63675773",
"0.6366978",
"0.6205446",
"0.6160112",
"0.6096611",
"0.60504496",
"0.6029276",
"0.60240364",
"0.6017218",
"0.60089636",
"0.5998407",
"0.5976785",
"0.5963542",
"0.5956105",
"0.5944695",
"0.59443283",
"0.59323794",
"0.59318995",
"0.589896",
"0.58934313",
"0.5890331",
"0.5876965",
"0.5863371",
"0.58478147",
"0.58446664",
"0.58416176",
"0.5837647",
"0.58277154",
"0.5822207",
"0.5812383",
"0.57992005",
"0.57976973",
"0.5786958",
"0.57657254",
"0.5744925",
"0.5741134",
"0.57395285",
"0.5737049",
"0.5731961",
"0.5716899",
"0.5714078",
"0.5703895",
"0.5692485",
"0.56850886",
"0.5678132",
"0.56754595",
"0.5674465",
"0.5674211",
"0.5661633",
"0.5660049",
"0.56583786",
"0.5655541",
"0.56538135",
"0.56537986",
"0.56491274",
"0.5648861",
"0.56463337",
"0.5646148",
"0.56364447",
"0.5628588",
"0.5626105",
"0.5624867",
"0.56118685",
"0.56102824",
"0.5607903",
"0.5595394",
"0.55896324",
"0.55863446",
"0.5584502",
"0.55833626",
"0.5582608",
"0.55755424",
"0.55724823",
"0.55670446",
"0.5561157",
"0.5551159",
"0.5549012",
"0.5548982",
"0.5546252",
"0.5542623",
"0.55421937",
"0.5540505",
"0.5535347",
"0.55296326",
"0.55289936",
"0.5528478",
"0.55229694",
"0.55226606",
"0.5519968",
"0.55172926",
"0.5517182",
"0.55159014",
"0.55118656",
"0.5507102",
"0.5502128",
"0.55006117",
"0.5498849"
]
| 0.6721008 | 0 |
Almacenamos en la base de datos los datos contenidos en un Modelo. | public boolean almacenar(Modelo modelo) {
boolean retVal = false;
//determinamos el nombre de la clase para determinar que "tabla" se utilizara
//utilizamos clases de utilería de commons-lang.
String tabla = ClassUtils.getShortClassName(modelo.getClass());
System.out.println("Procesando tabla : " + tabla);
// si no tenemos un valor en el campo de identificador ...
if(modelo.getId() == 0) {
// obtenemos el siguiente valor en la secuencia relacionada a la "tabla"
modelo.setId(getSecuencia(tabla));
}
// si no existe aun la tabla en la base de datos la creamos
if(!baseDatos.containsKey(tabla)) {
baseDatos.put(tabla, new HashMap<Integer, Modelo>());
}
//almacenamos el objeto en la tabla
baseDatos.get(tabla).put(modelo.getId(), modelo);
// como esta implementación es ficticia, solo para demostracion, siempre
// devolvemos un valor verdadero.
retVal = true;
return retVal;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void crearModelo() {\n modeloagr = new DefaultTableModel(null, columnasAgr) {\n public boolean isCellEditable(int fila, int columna) {\n return false;\n }\n };\n tbl.llenarTabla(AgendarA.tblAgricultor, modeloagr, columnasAgr.length, \"SELECT idPersonalExterno,cedula,CONCAT(nombres,' ',apellidos),municipios.nombre,telefono,telefono2,telefono3 FROM personalexterno,municipios WHERE tipo='agricultor' AND personalexterno.idMunicipio=municipios.idMunicipio\");\n tbl.alinearHeaderTable(AgendarA.tblAgricultor, headerColumnas);\n tbl.alinearCamposTable(AgendarA.tblAgricultor, camposColumnas);\n tbl.rowNumberTabel(AgendarA.tblAgricultor);\n }",
"public void cargarModelo() {\n\t}",
"public ControladorVentanaDatosOperador(Modelo modelo) throws SQLException {\n this.modelo = modelo;\n ventanaAgregarOperador = new VentanaDatosOperador();\n ventanaEditarOperador = new VentanaDatosOperador();\n registrarListeners();\n }",
"public void entregarVehiculo(Modelo modeloAAdjudicar) {\n\t\t\n\t}",
"public Conocido agrega(Conocido modelo) {\n\n final EntityManager em = getEntityManager();\n\n try {\n\n final EntityTransaction tx = em.getTransaction();\n\n tx.begin();\n\n em.persist(modelo);\n\n tx.commit();\n\n return modelo;\n\n } finally {\n\n em.close();\n\n }\n\n }",
"private void cargarModelo() {\n dlmLibros = new DefaultListModel<>();\n listaLibros.setModel(dlmLibros);\n }",
"private void actualizeazaModel() {\n model.clear();\n listaContacte.forEach((o) -> {\n model.addElement(o);\n });\n }",
"public void LlenarPagos(){\n datos=new DefaultTableModel();\n LlenarModelo();\n this.TablaPagos.setModel(datos);\n }",
"private List<Object[]> getModelo() throws Exception {\n\t\treturn getModelo(null);\n\t}",
"public void setModelo(String Modelo) {\n this.Modelo = Modelo;\n }",
"public void llenarTabla(){\n pedidoMatDao.llenarTabla();\n }",
"public void editarData(){\n\t\talunoTurmaService.inserirAlterar(alunoTurmaAltera);\n\t\t\n\t\t\n\t\tmovimentacao.setDataMovimentacao(alunoTurmaAltera.getDataMudanca());\n\t\tmovimentacaoService.inserirAlterar(movimentacao);\n\t\t\n\t\tFecharDialog.fecharDialogDATAAluno();\n\t\tExibirMensagem.exibirMensagem(Mensagem.SUCESSO);\n\t\talunoTurmaAltera = new AlunoTurma();\n\t\tmovimentacao = new Movimentacao();\n\t\t\n\t\tatualizarListas();\n\t}",
"public void llenarModelo(DefaultTableModel model) {\r\n int tamanioArticulos = this.obtenerTamanioLista();\r\n for (int i = model.getRowCount(); i < tamanioArticulos; i++) {\r\n Object rowData[] = {i, listaProductosCarrito[i].getNombre(), listaProductosCarrito[i].getValor()};\r\n model.addRow(rowData);\r\n }\r\n }",
"public void setModelo(String modelo) {\n this.modelo = modelo;\n }",
"private void recogerDatos() {\n\t\ttry {\n\t\t\tusuSelecc.setId(etId.getText().toString());\n\t\t\tusuSelecc.setName(etNombre.getText().toString());\n\t\t\tusuSelecc.setFirstName(etPApellido.getText().toString());\n\t\t\tusuSelecc.setLastName(etSApellido.getText().toString());\n\t\t\tusuSelecc.setEmail(etCorreo.getText().toString());\n\t\t\tusuSelecc.setCustomFields(etAuth.getText().toString());\n\t\t} catch (Exception e) {\n\t\t\t// Auto-generated catch block\n\t\t\tmostrarException(e.getMessage());\n\t\t}\n\t}",
"private void carregarAgendamentos() {\n agendamentos.clear();\n\n // Carregar os agendamentos do banco de dados\n agendamentos = new AgendamentoDAO(this).select();\n\n // Atualizar a lista\n setupRecyclerView();\n }",
"public void almacenoDatos(){\n BaseDatosSecundaria administrador= new BaseDatosSecundaria(this);\n SQLiteDatabase bdsecunadaria= administrador.getWritableDatabase();\n _valuesPedido.put(\"Producto\", this._productoNombre);\n _valuesPedido.put(\"Precio\",this._productoPrecio);\n _valuesPedido.put(\"Cantidad\",this._etAdquirir.getText().toString());\n _valuesPedido.put(\"Vendedor\",this.username);\n _valuesPedido.put(\"Id_Producto\",this._productoId);\n bdsecunadaria.insert(\"DATOS\",null,this._valuesPedido);\n bdsecunadaria.close();\n }",
"private void srediTabelu() {\n\n mtu = (ModelTabeleUlica) jtblUlica.getModel();\n ArrayList<Ulica> ulice = kontrolor.Kontroler.getInstanca().vratiUlice();\n mtu.setLista(ulice);\n\n }",
"public void llenadoDeTablas() {\n \n DefaultTableModel modelo1 = new DefaultTableModel();\n modelo1 = new DefaultTableModel();\n modelo1.addColumn(\"ID Usuario\");\n modelo1.addColumn(\"NOMBRE\");\n UsuarioDAO asignaciondao = new UsuarioDAO();\n List<Usuario> asignaciones = asignaciondao.select();\n TablaPerfiles.setModel(modelo1);\n String[] dato = new String[2];\n for (int i = 0; i < asignaciones.size(); i++) {\n dato[0] = (Integer.toString(asignaciones.get(i).getId_usuario()));\n dato[1] = asignaciones.get(i).getNombre_usuario();\n\n modelo1.addRow(dato);\n }\n }",
"public List<Modelo> obtenModelos() {\r\n try {\r\n IntAdmInventario adm = new FacAdmInventario();\r\n\r\n return adm.obtenListaModelos();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\r\n return null;\r\n }",
"private void cargaDatosBasicos(Model model) {\r\n\t\t\tLong t1 = System.currentTimeMillis();\r\n\t\t\tAccionesMGCBusquedaForm form = null;\r\n\t\t\tLinkedHashMap<String, String> dias = UtilFechas.getDias();\r\n\t\t\tLinkedHashMap<String, String> meses = UtilFechas.getMeses();\r\n\t\t\tLinkedHashMap<String, String> anios = UtilFechas.getAnios();\r\n\t\t\tmodel.addAttribute(\"dias\", dias);\r\n\t\t\tmodel.addAttribute(\"meses\", meses);\r\n\t\t\tmodel.addAttribute(\"anios\", anios);\r\n\t\t\tif (!model.containsAttribute(\"formulario\")) {\r\n\t\t\t\tform = new AccionesMGCBusquedaForm();\r\n\t\t\t\tmodel.addAttribute(\"formulario\", form);\r\n\t\t\t} else {\r\n\t\t\t\tform = (AccionesMGCBusquedaForm) model.asMap().get(\"formulario\");\r\n\t\t\t}\r\n\t/* Se ajusta para mercado TTV \r\n\t\ttry {\r\n\t\t\t\tint tipoMercado = form.getTipoMercado() == IAcciones.TIPO_MERCADO_REPOS ? IMercadoDao.REPOS\r\n\t\t\t\t\t\t: IMercadoDao.ACCIONES;\r\n\t\t\t\tGregorianCalendar cal = new GregorianCalendar();\r\n\t\t\t\tif (StringUtils.isNotEmpty(fechaConsulta)\r\n\t\t\t\t\t\t&& !fechaConsulta.equals(sdf.format(new Date()))) {\r\n\t\t\t\t\tcal.setTime(sdf.parse(fechaConsulta));\r\n\t\t\t\t}\r\n\t\t\t\tString mensajeHorario = this.mercadoDao.mercadoAbierto(cal,\r\n\t\t\t\t\t\ttipoMercado, true);\r\n\t\t\t\tmodel.addAttribute(\"horarioAcciones\", mensajeHorario);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tlog.error(\"Error al cargar mensajeHorario\", e);\r\n\t\t\t}\r\n\t*/\r\n\t\t\ttry {\r\n\t\t\t\tint tipoMercado = IAccionesMGC.TIPO_MERCADO_REPOS_MGC; \r\n//\t\t\t\t? IMercadoDao.REPOS : IMercadoDao.ACCIONES ;\r\n\t\t\t\tGregorianCalendar cal = new GregorianCalendar();\r\n\t\t\t\tif (StringUtils.isNotEmpty(fechaConsulta)\r\n\t\t\t\t\t\t&& !fechaConsulta.equals(sdf.format(new Date()))) {\r\n\t\t\t\t\tcal.setTime(sdf.parse(fechaConsulta));\r\n\t\t\t\t}\r\n\t\t\t\tString mensajeHorario = this.mercadoDao.mercadoAbierto(cal,\r\n\t\t\t\t\t\ttipoMercado, true);\r\n\t\t\t\tmodel.addAttribute(\"horarioAcciones\", mensajeHorario);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tlog.error(\"Error al cargar mensajeHorario\", e);\r\n\t\t\t}\r\n\t//*\r\n\t\t\t\r\n\t\t\tLong t2 = System.currentTimeMillis();\r\n\t\t\tLong t = (t2 - t1) / 1000;\r\n\t\t\tlog\r\n\t\t\t\t\t.info(\"El tiempo en el método cargaDatosBasicos de ResumenAccionesMGCPortlet es =\"\r\n\t\t\t\t\t\t\t+ t);\r\n\t\t}",
"public void setIdModelo(Integer idModelo) {\n\t\tthis.idModelo = idModelo;\n\t}",
"private void limpiarDatos() {\n\t\t\n\t}",
"public DefaultComboBoxModel<ModeloVO> preencherCbx_Modelo() {\n BaseDAO<ModeloVO> bDAO = new ModeloDAO();\n ArrayList<ModeloVO> list = bDAO.consultarTodos();\n return new DefaultComboBoxModel(list.toArray());\n }",
"public void atualizarTabela() {\n\t\tJTAlocar.setModel(modelAlocar = new TableModelAlocar(ManipulacaoXml.getInstace().todasAlocacoes()));\n\t}",
"public DefaultTableModel cargarDatos () {\r\n DefaultTableModel modelo = new DefaultTableModel(\r\n new String[]{\"ID SALIDA\", \"IDENTIFICACIÓN CAPITÁN\", \"NÚMERO MATRICULA\", \"FECHA\", \"HORA\", \"DESTINO\"}, 0); //Creo un objeto del modelo de la tabla con los titulos cargados\r\n String[] info = new String[6];\r\n String query = \"SELECT * FROM actividad WHERE eliminar = false\";\r\n try {\r\n Statement st = con.createStatement();\r\n ResultSet rs = st.executeQuery(query);\r\n while (rs.next()) { \r\n info[0] = rs.getString(\"id_salida\");\r\n info[1] = rs.getString(\"identificacion_navegate\");\r\n info[2] = rs.getString(\"numero_matricula\");\r\n info[3] = rs.getString(\"fecha\");\r\n info[4] = rs.getString(\"hora\");\r\n info[5] = rs.getString(\"destino\");\r\n Object[] fila = new Object[]{info[0], info[1], info[2], info[3], info[4], info[5]};\r\n modelo.addRow(fila);\r\n }\r\n st.close();\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(PActividad.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return modelo;\r\n }",
"public int getID_Modelo() {\n return ID_Modelo;\n }",
"Tablero consultarTablero();",
"public void updateModeloPagoLaboratorio() throws Exception{\n ArrayList<Pago> pgAbono = PagoDB.listarPagosDePlanTratamientoLab(tratamientotoSelected.getIdPlanTratamiento());\n \n \n int m = this.columnasNombrePagoLab.length;\n ArrayList<Object []> objetos = new ArrayList<Object []>();\n String aux = this.costoAbono.getText();\n int total = Integer.parseInt(aux.substring(1, aux.length()));\n for(Pago pagAbn : pgAbono){\n\n String tipoPago = pagAbn.getTipoPago();\n String detalle = pagAbn.getDetalle();\n String fecha = girarFecha(pagAbn.getFecha());\n String valor = pagAbn.getAbono()+\"\";\n int numBoleta = pagAbn.getNumBoleta();\n total = total + pagAbn.getAbono();\n Object [] fila = new Object [] {new Item (tipoPago,pagAbn.getIdPago()), detalle, fecha, \"$\"+valor, numBoleta+\"\"};\n objetos.add(fila);\n \n }\n costoAbono.setText(\"$\"+total);\n int id = tratamientotoSelected.getIdPlanTratamiento();\n PlanTratamiento planTrat = PlanTratamientoDB.getPlanTratamiento(id);\n planTrat.setTotalAbonos(total);\n //calculando el porcentaje de abance\n int cosTotal=tratamientotoSelected.getCostoTotal();\n int avance= total*100/cosTotal;\n planTrat.setAvance(avance);\n \n PlanTratamientoDB.editarPlanTratamiento(planTrat);\n //System.out.println(\"total 1:\"+total+\"id:\"+id);\n \n this.filasPagoLab = new Object [objetos.size()][m];\n int i = 0;\n for(Object [] o : objetos){\n this.filasPagoLab[i] = o;\n i++;\n }\n \n this.modeloPagoLab = new DefaultTableModel(this.filasPagoLab, this.columnasNombrePagoLab) {\n Class[] types = new Class [] {\n String.class, Item.class, String.class, String.class, String.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n };\n \n this.tablaPagoLaboratorio.setModel(modeloPagoLab);\n \n this.iniciarTablaPlanesTratamientos();\n //habilitarBoton();\n }",
"public TabellaModel() {\r\n lista = new Lista();\r\n elenco = new Vector<Persona>();\r\n elenco =lista.getElenco();\r\n values = new String[elenco.size()][3];\r\n Iterator<Persona> iterator = elenco.iterator();\r\n while (iterator.hasNext()) {\r\n\t\t\tfor (int i = 0; i < elenco.size(); i++) {\r\n\t\t\t\tpersona = new Persona();\r\n\t\t\t\tpersona = (Persona) iterator.next();\r\n\t\t\t\tvalues[i][0] = persona.getNome();\r\n\t\t\t\tvalues[i][1] = persona.getCognome();\r\n\t\t\t\tvalues[i][2] = persona.getTelefono();\t\r\n\t\t\t}\r\n\t\t}\r\n setDataVector(values, columnNames);\t\r\n }",
"public void preencherTabela(){\n imagemEnunciado.setImage(imageDefault);\n pergunta.setImagemEnunciado(caminho);\n imagemResposta.setImage(imageDefault);\n pergunta.setImagemResposta(caminho);\n ///////////////////////////////\n perguntas = dao.read();\n if(perguntas != null){\n perguntasFormatadas = FXCollections.observableList(perguntas);\n\n tablePerguntas.setItems(perguntasFormatadas);\n }\n \n }",
"public void buscaTodasOSs() {\n try {\n ServicoDAO sDAO = new ServicoDAO(); // instancia a classe ProdutoDB()\n ArrayList<OS> cl = sDAO.consultaTodasOs(); // coloca o método dentro da variável\n\n DefaultTableModel modeloTabela = (DefaultTableModel) jTable1.getModel();\n // coloca a tabela em uma variável do tipo DefaultTableModel, que permite a modelagem dos dados da tabela\n\n for (int i = modeloTabela.getRowCount() - 1; i >= 0; i--) {\n modeloTabela.removeRow(i);\n // loop que limpa a tabela antes de ser atualizada\n }\n\n for (int i = 0; i < cl.size(); i++) {\n // loop que pega os dados e insere na tabela\n Object[] dados = new Object[7]; // instancia os objetos. Cada objeto representa um atributo \n dados[0] = cl.get(i).getNumero_OS();\n dados[3] = cl.get(i).getStatus_OS();\n dados[4] = cl.get(i).getDefeito_OS();\n dados[5] = cl.get(i).getDataAbertura_OS();\n dados[6] = cl.get(i).getDataFechamento_OS();\n\n // pega os dados salvos do banco de dados (que estão nas variáveis) e os coloca nos objetos definidos\n modeloTabela.addRow(dados); // insere uma linha nova a cada item novo encontrado na tabela do BD\n }\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Falha na operação.\\nErro: \" + ex.getMessage());\n } catch (Exception ex) {\n Logger.getLogger(FrmPesquisar.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public DefaultTableModel armarModelo() {\r\n\t\tString columnNames[] = {\"Posici\\u00F3n\", \"Jugador\", \"Puntaje Total\", \"Partidas Jugadas\", \"Partidas Ganadas\", \"Prom. PPP\"};\r\n\t\t@SuppressWarnings(\"serial\")\r\n\t\tDefaultTableModel model = new DefaultTableModel(columnNames, 0) {\r\n\t\t\t@Override\r\n\t\t\tpublic boolean isCellEditable(int row, int column) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t};\r\n\t\tint pos = 0;\r\n\t\tfor(Jugador jugador : this.ranking.getListaJugadores()) {\r\n\t\t\tpos++;\r\n\t\t\tif(!jugador.getUsuario().equals(this.principal.getCliente().getUsuario()))\r\n\t\t\t\tmodel.addRow(new Object[]{pos, jugador.getUsuario(), jugador.getpuntajeTotal(), jugador.getJugados(), jugador.getGanados(), jugador.getPromPPP()});\r\n\t\t\telse\r\n\t\t\t\tmodel.addRow(new Object[]{this.principal.getMiPosicionRanking(), jugador.getUsuario(), jugador.getpuntajeTotal(), jugador.getJugados(), jugador.getGanados(), jugador.getPromPPP()});\r\n\t\t}\r\n\t\treturn model;\r\n\t}",
"private void cargarColumnasTabla(){\n \n modeloTabla.addColumn(\"Nombre\");\n modeloTabla.addColumn(\"Telefono\");\n modeloTabla.addColumn(\"Direccion\");\n }",
"public void llenadoDeTablas() {\n /**\n *\n * creaccion de la tabla de de titulos \n */\n DefaultTableModel modelo = new DefaultTableModel();\n modelo.addColumn(\"ID Bitacora\");\n modelo.addColumn(\"Usuario\");\n modelo.addColumn(\"Fecha\");\n modelo.addColumn(\"Hora\");\n modelo.addColumn(\"Ip\");\n modelo.addColumn(\"host\");\n \n modelo.addColumn(\"Accion\");\n modelo.addColumn(\"Codigo Aplicacion\");\n modelo.addColumn(\"Modulo\");\n /**\n *\n * instaciamiento de las las clases Bitacora y BiracoraDAO\n * intaciamiento de la clases con el llenado de tablas\n */\n BitacoraDao BicDAO = new BitacoraDao();\n List<Bitacora> usuario = BicDAO.select();\n JtProductos1.setModel(modelo);\n String[] dato = new String[9];\n for (int i = 0; i < usuario.size(); i++) {\n dato[0] = usuario.get(i).getId_Bitacora();\n dato[1] = usuario.get(i).getId_Usuario();\n dato[2] = usuario.get(i).getFecha();\n dato[3] = usuario.get(i).getHora();\n dato[4] = usuario.get(i).getHost();\n dato[5] = usuario.get(i).getIp();\n dato[6] = usuario.get(i).getAccion();\n dato[7] = usuario.get(i).getCodigoAplicacion();\n dato[8] = usuario.get(i).getModulo();\n \n //System.out.println(\"vendedor:\" + vendedores);\n modelo.addRow(dato);\n }}",
"private void llenarEntidadConLosDatosDeLosControles() {\n clienteActual.setNombre(txtNombre.getText());\n clienteActual.setApellido(txtApellido.getText());\n clienteActual.setDui(txtDui.getText());\n //clienteActual.setNumero(txtNumero.getText());\n //clienteActual.setNumero(Integer.parseInt(this.txtNumero.getText()));\n clienteActual.setNumero(Integer.parseInt(this.txtNumero.getText()));\n }",
"public List<Talla> obtenTallasDeModelo(Modelo modelo) {\r\n try {\r\n FacAdmInventario admInventario = new FacAdmInventario();\r\n return admInventario.obtenTallasDeModelo(modelo);\r\n } catch (Exception e) {\r\n return null;\r\n }\r\n }",
"public void llenarTabla() {\n DefaultTableModel modelos = (DefaultTableModel) tableProducto.getModel();\n while (modelos.getRowCount() > 0) {\n modelos.removeRow(0);\n }\n MarcaDAO marcaDao = new MarcaDAO();\n CategoriaProductoDAO catProDao = new CategoriaProductoDAO();\n ProductoDAO proDao = new ProductoDAO();\n Marca marca = new Marca();\n CategoriaProducto catPro = new CategoriaProducto();\n\n for (Producto producto : proDao.findAll()) {\n DefaultTableModel modelo = (DefaultTableModel) tableProducto.getModel();\n modelo.addRow(new Object[10]);\n int nuevaFila = modelo.getRowCount() - 1;\n tableProducto.setValueAt(producto.getIdProducto(), nuevaFila, 0);\n tableProducto.setValueAt(producto.getNombreProducto(), nuevaFila, 1);\n tableProducto.setValueAt(producto.getCantidadProducto(), nuevaFila, 2);\n tableProducto.setValueAt(producto.getPrecioCompra(), nuevaFila, 3);\n tableProducto.setValueAt(producto.getPrecioVenta(), nuevaFila, 4);\n tableProducto.setValueAt(producto.getFechaCaducidadProducto(), nuevaFila, 5);\n tableProducto.setValueAt(producto.getFechaCaducidadProducto(), nuevaFila, 6);\n tableProducto.setValueAt(producto.getDescripcionProducto(), nuevaFila, 7);\n marca.setIdMarca(producto.getFK_idMarca());\n tableProducto.setValueAt(marcaDao.findBy(marca, \"idMarca\").get(0).getNombreMarca(), nuevaFila, 8);//PARA FK ID MARCA\n catPro.setIdCategoriaProducto(producto.getFK_idCategoriaProducto());\n tableProducto.setValueAt(catProDao.findBy(catPro, \"idCategoriaProducto\").get(0).getNombreCategoriaProducto(), nuevaFila, 9);\n //PARA FK ID CATEGORIA PRODUCTO\n\n }\n }",
"public void setModelo(String modelo) {\n\t\tthis.modelo = modelo;\n\t}",
"public void cargarDatos() {\n \n if(drogasIncautadoList==null){\n return;\n }\n \n \n \n List<Droga> datos = drogasIncautadoList;\n\n Object[][] matriz = new Object[datos.size()][4];\n \n for (int i = 0; i < datos.size(); i++) {\n \n \n //System.out.println(s[0]);\n \n matriz[i][0] = datos.get(i).getTipoDroga();\n matriz[i][1] = datos.get(i).getKgDroga();\n matriz[i][2] = datos.get(i).getQuetesDroga();\n matriz[i][3] = datos.get(i).getDescripcion();\n \n }\n Object[][] data = matriz;\n String[] cabecera = {\"Tipo Droga\",\"KG\", \"Quetes\", \"Descripción\"};\n dtm = new DefaultTableModel(data, cabecera);\n tableDatos.setModel(dtm);\n }",
"Modelo(Marca marca) {\n\t\tsetMarca(marca);\n\t}",
"private void loadData(){\n\t\t \n\t\t model.getDataVector().clear();\n\t\t ArrayList<Person> personList = DataBase.getInstance().getPersonList();\n\t\t for(Person person : personList){\n\t\t\t addRow(person.toBasicInfoStringArray());\n\t\t }\n\t\t \n\t }",
"void setDataFromDBContent() {\n\n }",
"public void setModeloEventos(ModeloTablaEventos modeloEventos) {\n\t\tthis.modeloEventos = modeloEventos;\n\t}",
"public void AlterarRegistro(){\n \n\t\tthis.localidadeRepository.AlterarRegistro(this.localidadeModel);\t\n \n\t\tUteis.MensagemInfo(\"Registro alterado com sucesso\");\n\t\t\n\t\tthis.init();\n\t}",
"@Override\n public void almacenarElemento(Object elemento) {\n database.store(elemento);\n }",
"public void buscaxnombre() {\r\n try {\r\n modelo.setNombre(vistabuscapro.jTvnombre.getText());//C.P.M le mandamos a el modelo el nombre para consultarlo\r\n rs = modelo.Buscarxnombre();//C.P.M ejecutamo el metodo del modelo y atrapamos el resultado\r\n\r\n DefaultTableModel buscar = new DefaultTableModel() {//C.P.M se establese el modelo de la tabla\r\n @Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {//C.P.M no sera editable\r\n return false;\r\n }\r\n };\r\n vistabuscapro.Tproductos.setModel(buscar);//C.P.M le mandamos el modelo\r\n modelo.estructuraProductos(buscar);//C.P.M obtenemos la estructura de la tabla \"los encabeados\"\r\n ResultSetMetaData rsMd = rs.getMetaData();//C.P.M obtenemos los metadatos de el resultado\r\n int cantidadColumnas = rsMd.getColumnCount();//C.P.M obtenemos la cantidad de columnas\r\n while (rs.next()) {//C.P.M recorremos el resultado\r\n Object[] fila = new Object[cantidadColumnas];//C.P.M creamos un objeto con la cantidad de columnas obtenidas\r\n for (int i = 0; i < cantidadColumnas; i++) {//C.P.M lo recorremos\r\n fila[i] = rs.getObject(i + 1);//C.P.M le agregamos la informacion obtenida\r\n }\r\n buscar.addRow(fila);//C.P.M lo agregamos a la tabla como una nueva fila\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al buscar por nombre\");\r\n }\r\n }",
"public void guardar(Modelo modelo) throws SipsaExcepcion;",
"public void introducirDatosHabitacionMasPopular(TablaModelo modelo,String idHabitacion){\n introducirPagosALojamientoHabitacion(modelo, idHabitacion);\n }",
"public void cargarTablas(){\n ControladorEmpleados empleados= new ControladorEmpleados();\n ControladorProyectos proyectos= new ControladorProyectos();\n ControladorCasos casos= new ControladorCasos();\n actualizarListadoObservable(empleados.consultarEmpleadosAdminProyectos(ESTADO_ASIGNADO, TIPO_3),casos.consultarCasos(devolverUser()),casos.consultarTiposCaso());\n }",
"public ClienteModel getModelo() {\r\n return modelo;\r\n }",
"public void crearModelo() {\r\n\t\tmodelo = new DefaultComboBoxModel<>();\r\n\t\tmodelo.addElement(\"Rojo\");\r\n\t\tmodelo.addElement(\"Verde\");\r\n\t\tmodelo.addElement(\"Azul\");\r\n\t\tmodelo.addElement(\"Morado\");\r\n\t}",
"private void srediTabelu() {\n ModelTabeleStavka mts = new ModelTabeleStavka();\n mts.setLista(n.getLista());\n tblStavka.setModel(mts);\n }",
"void LlenarModelo(){\n datos.addColumn(\"ID\");\n datos.addColumn(\"Descripcion\");\n datos.addColumn(\"Cantidad\");\n String []ingresar=new String[4];\n try {\n Connection con = Conexion.getConection();\n Statement estado = con.createStatement();\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo>=\" + SIGEPSA.IDOtrosPagosMin + \";\");\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago ;\");\n ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo<9 or codigo>10 and activo = 1;\");\n while(resultado.next()){\n ingresar[0]=String.valueOf((String)resultado.getObject(\"CODIGO\").toString());\n ingresar[1]=String.valueOf((String)resultado.getObject(\"DESCRIPCION\").toString());\n ingresar[2]=String.valueOf((String)resultado.getObject(\"CANTIDAD\").toString());\n datos.addRow(ingresar);\n }\n }catch (Exception ex) {\n \n }\n }",
"public void exportModele(ArrayList<Modele> modeles) {\n String query;\n\n for (Modele mod : modeles) {\n if (!isNomModeleExists(mod)) { // new modele, insertion\n query = \"Insert into Modele values ('\" + mod.getNomModele() + \"', \" + mod.getNbPilotes() + \", \" + mod.getRayonAction() + \")\";\n } else { // update un modele\n query = \"Update Modele set nbPilotes=\" + mod.getNbPilotes() + \", rayonAction=\" + mod.getRayonAction() + \" where nomModele='\" + mod.getNomModele() + \"'\";\n }\n\n try {\n DBManager.dbExecuteUpdate(query);\n } catch (SQLException | ClassNotFoundException ex) {\n Logger.getLogger(ExportDAL.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }\n\n }",
"public void update() throws ModelException {\n\t\tConnection conn = null;\n\t\ttry {\n\t\t\tconn = DataSource.getConnection();\n\t\t\tPreparedStatement pstmt = conn.prepareStatement(\n \" UPDATE carrera nombre = ? WHERE codigo = ?\");\n\t\t\tpstmt.setString(2, this.nombre);\n\t\t\tpstmt.executeUpdate();\n\t\t} catch (SQLException e) {\n\t\t\tthrow new ModelException(\"Error de acceso a datos\", e);\n\t\t} finally {\n \t\t\tDataSource.closeConnection(conn);\n\t\t}\n\t}",
"private void cargarDeDB() {\n Query query = session.createQuery(\"SELECT p FROM Paquete p WHERE p.reparto is NULL\");\n data = FXCollections.observableArrayList();\n\n List<Paquete> paquetes = query.list();\n for (Paquete paquete : paquetes) {\n data.add(paquete);\n }\n\n cargarTablaConPaquetes();\n }",
"public void inicializarDatos(aplicacion.Usuario u){\n //Pestaña Informacion\n this.usuario=fa.obtenerUsuarioVivo(u.getIdUsuario());\n ModeloTablaBuenasAcciones mba;\n mba = (ModeloTablaBuenasAcciones) tablaBA.getModel();\n mba.setFilas(usuario.getBuenasAcciones());\n ModeloTablaPecados mp;\n mp = (ModeloTablaPecados) tablaPecados.getModel();\n mp.setFilas(usuario.getPecados());\n textoNombre.setText(usuario.getNombre());\n textoUsuario.setText(usuario.getNombreUsuario());\n textoContrasena.setText(usuario.getClave());\n textoLocalidad.setText(usuario.getLocalidad());\n textoFechaNacimiento.setText(String.valueOf(usuario.getFechaNacimiento()));\n //PestañaVenganzas\n ModeloTablaUsuarios mu;\n mu = (ModeloTablaUsuarios) tablaUsuarios.getModel();\n mu.setFilas(fa.consultarUsuariosMenos(usuario.getIdUsuario(), textoNombreBusqueda.getText()));\n ModeloTablaVenganzas mv;\n mv = (ModeloTablaVenganzas) tablaVenganzas.getModel();\n mv.setFilas(fa.listaVenganzas());\n }",
"public ArrayList<ModelAprendizagemTeorica> getListaAprendizagemTeoricaDAO(){\n ArrayList<ModelAprendizagemTeorica> listamodelAprendizagemTeorica = new ArrayList();\n ModelAprendizagemTeorica modelAprendizagemTeorica = new ModelAprendizagemTeorica();\n try {\n this.conectar();\n this.executarSQL(\n \"SELECT \"\n + \"id,\"\n + \"descricao,\"\n + \"texto\"\n + \" FROM\"\n + \" aprendizagem_teorica\"\n + \";\"\n );\n\n while(this.getResultSet().next()){\n modelAprendizagemTeorica = new ModelAprendizagemTeorica();\n modelAprendizagemTeorica.setId(this.getResultSet().getInt(1));\n modelAprendizagemTeorica.setDescricao(this.getResultSet().getString(2));\n modelAprendizagemTeorica.setTexto(this.getResultSet().getString(3));\n listamodelAprendizagemTeorica.add(modelAprendizagemTeorica);\n }\n }catch(Exception e){\n e.printStackTrace();\n }finally{\n this.fecharConexao();\n }\n return listamodelAprendizagemTeorica;\n }",
"private void loadTable() {\n model.getDataVector().removeAllElements();\n model.fireTableDataChanged();\n try {\n String sql = \"select * from tb_mahasiswa\";\n Statement n = a.createStatement();\n ResultSet rs = n.executeQuery(sql);\n while (rs.next()) {\n Object[] o = new Object[6];\n o[0] = rs.getString(\"id_mahasiswa\");\n o[1] = rs.getString(\"nama\");\n o[2] = rs.getString(\"tempat\");\n o[3] = rs.getString(\"waktu\");\n o[4] = rs.getString(\"status\");\n model.addRow(o);\n }\n } catch (Exception e) {\n }\n }",
"@Override\r\n\tpublic void AgregarOrden() {\n\r\n\t}",
"private void fillData() {\n String[] from = new String[] {\n NOMBRE_OBJETO,\n DESCRIPCION,\n TEXTURA\n };\n // Campos de la interfaz a los que mapeamos\n int[] to = new int[] {\n R.id.txtNombreObjeto,\n R.id.txtDescripcion,\n R.id.imgIconoObjeto\n };\n getLoaderManager().initLoader(OBJETOS_LOADER, null, this);\n ListView lvObjetos = (ListView) findViewById(R.id.listaObjetos);\n adapter = new SimpleCursorAdapter(this, R.layout.activity_tiendaobjetos_filaobjeto, null, from, to, 0);\n lvObjetos.setAdapter(adapter);\n }",
"public String darModelo( )\n\t{\n\t\treturn modelo;\n\t}",
"protected void saveValues() {\n dataModel.persist();\n }",
"public void reloadTable() {\n\n this.removeAllData();// borramos toda la data \n for (int i = 0; i < (list.size()); i++) { // este for va de la primera casilla hast ael largo del arreglo \n Balanza object = list.get(i);\n this.AddtoTable(object);\n }\n\n }",
"public CadastrarMarcasModelos() {\n initComponents();\n }",
"private void cargarDatosDefault() {\n\t\tPersonasJSON personas = new PersonasJSON();\n\t\tpersonas = personas.leerJSON(\"src/datosJSON/Personas.JSON\");\n\t\t\n\t\tfor(int i=0 ; i<personas.getCantidadPersonas(); i++) {\n\t\t\t\n\t\t\tString nombre = personas.getPersona(i).getNombre();\n\t\t\tint deporte = personas.getPersona(i).getDeporte();\n\t\t\tint musica = personas.getPersona(i).getMusica();\n\t\t\tint espectaculo = personas.getPersona(i).getEspectaculo();\n\t\t\tint ciencia = personas.getPersona(i).getCiencia();\n\t\t\t\n\t\t\tmodel.addRow(new String[]{ nombre, String.valueOf(deporte), String.valueOf(musica),\n\t\t\t\t\tString.valueOf(espectaculo), String.valueOf(ciencia) });\n\t\t}\n\t\t\n\t\tdatos.addAll(personas.getTodasLasPersonas());\n\t\t\n\t}",
"@Override\n\tpublic void organizarTabla() {\n\t\tif (isEditingMode) {\n\t\t\tisEditingMode = false;\n\t\t}\n\t\telse {\n\t\t\tisEditingMode = true;\n\t\t}\n\t\tarrayGaleriaAux = new Vector<WS_ImagenVO>(imagenAdapter.getListAdapter());\n\t\timagenAdapter.setEditar(isEditingMode);\n\t\timagenAdapter.notifyDataSetChanged();\n\t\tacomodarBotones(ButtonStyleShow.ButtonStyleShowSave);\n\t}",
"public CadastroPessoas() throws ClassNotFoundException, SQLException {\n initComponents();\n modeloModel = (DefaultTableModel) tabelaPessoa.getModel();\n updateTabela();\n\n \n \n }",
"private void insertData() {\r\n PodamFactory factory = new PodamFactoryImpl();\r\n for (int i = 0; i < 3; i++) {\r\n UsuarioEntity entity = factory.manufacturePojo(UsuarioEntity.class);\r\n em.persist(entity);\r\n dataUsuario.add(entity);\r\n }\r\n for (int i = 0; i < 3; i++) {\r\n CarritoDeComprasEntity entity = factory.manufacturePojo(CarritoDeComprasEntity.class);\r\n if (i == 0 ){\r\n entity.setUsuario(dataUsuario.get(0));\r\n }\r\n em.persist(entity);\r\n data.add(entity);\r\n }\r\n }",
"public void llenadoDeTablas() {\n DefaultTableModel modelo = new DefaultTableModel();\n modelo.addColumn(\"ID Articulo\");\n modelo.addColumn(\"Fecha Ingreso\");\n modelo.addColumn(\"Nombre Articulo\");\n modelo.addColumn(\"Talla XS\");\n modelo.addColumn(\"Talla S\");\n modelo.addColumn(\"Talla M\");\n modelo.addColumn(\"Talla L\");\n modelo.addColumn(\"Talla XL\");\n modelo.addColumn(\"Color Articulo\");\n modelo.addColumn(\"Nombre Proveedor\");\n modelo.addColumn(\"Existencias\");\n\n RegistroArticuloDAO registroarcticuloDAO = new RegistroArticuloDAO();\n\n List<RegistroArticulo> registroarticulos = registroarcticuloDAO.select();\n TablaArticulo.setModel(modelo);\n String[] dato = new String[11];\n for (int i = 0; i < registroarticulos.size(); i++) {\n dato[0] = Integer.toString(registroarticulos.get(i).getPK_id_articulo());\n dato[1] = registroarticulos.get(i).getFecha_ingreso();\n dato[2] = registroarticulos.get(i).getNombre_articulo();\n dato[3] = registroarticulos.get(i).getTalla_articuloXS();\n dato[4] = registroarticulos.get(i).getTalla_articuloS();\n dato[5] = registroarticulos.get(i).getTalla_articuloM();\n dato[6] = registroarticulos.get(i).getTalla_articuloL();\n dato[7] = registroarticulos.get(i).getTalla_articuloXL();\n dato[8] = registroarticulos.get(i).getColor_articulo();\n dato[9] = registroarticulos.get(i).getNombre_proveedor();\n dato[10] = registroarticulos.get(i).getExistencia_articulo();\n\n //System.out.println(\"vendedor:\" + vendedores);\n modelo.addRow(dato);\n }\n }",
"public void loadData() {\n String[] header = {\"Tên Cty\", \"Mã Cty\", \"Cty mẹ\", \"Giám đốc\", \"Logo\", \"Slogan\"};\n model = new DefaultTableModel(header, 0);\n List<Enterprise> list = new ArrayList<Enterprise>();\n list = enterpriseBN.getAllEnterprise();\n for (Enterprise bean : list) {\n Enterprise enterprise = enterpriseBN.getEnterpriseByID(bean.getEnterpriseParent()); // Lấy ra 1 Enterprise theo mã\n Person person1 = personBN.getPersonByID(bean.getDirector());\n Object[] rows = {bean.getEnterpriseName(), bean.getEnterpriseID(), enterprise, person1, bean.getPicture(), bean.getSlogan()};\n model.addRow(rows);\n }\n listEnterprisePanel.getTableListE().setModel(model);\n setupTable();\n }",
"public Controlador(Vista view, Modelo model){\r\n \r\n //Se igualan las propiedades\r\n this.view = view;\r\n this.model = model;\r\n this.view.btnGuardar.addActionListener(this);\r\n \r\n //se iguala el modelo de la tabla\r\n table = new DefaultTableModel();\r\n view.tablaResultado.setModel(table);\r\n \r\n //nombre para la columna de la tabla\r\n table.addColumn(\"Listado\"); \r\n \r\n }",
"public ArrayList<RealmCobaModels> setSemuaDataNama() {\n // mendapatkan data realm berbentuk realmresults\n RealmResults<RealmCobaModels> realmCobaModels = realm.where(RealmCobaModels.class).findAll();\n // mendeklarasi arraylist\n ArrayList<RealmCobaModels> arrayListModels = new ArrayList<>();\n\n // validasi\n if (realmCobaModels.size() > 0) { // jika realmresult lebih dari 0\n // membuat looping data\n for (int i = 0; i < realmCobaModels.size(); i++) {\n RealmCobaModels rcm1 = new RealmCobaModels();\n rcm1.setId(realmCobaModels.get(i).getId());\n rcm1.setNama(realmCobaModels.get(i).getNama());\n rcm1.setUmur(realmCobaModels.get(i).getUmur());\n arrayListModels.add(rcm1); // memasukkan ke array list\n }\n\n // tampil log\n Log.e(TAG, arrayListModels.toString());\n } else { // jika realmresult tidak lebih dari 0, maka kosong!\n // tampil log\n Log.e(TAG, \"Tidak Ada Data!\");\n }\n\n return arrayListModels;\n }",
"public static Modelo insertModelo(String NOMB_MODELO){\n Modelo miModelo = new Modelo(NOMB_MODELO);\n miModelo.registrarModelo();\n return miModelo;\n }",
"protected void updateData() throws SQLException{\n\t\t//Actualizar array de items dentro del comboBox del menu eliminar\n\t\tItems = d.getAsArray(this.mode);\n\t\t//Actualizar el ComboBox\n\t\tDefaultComboBoxModel<String> model = new DefaultComboBoxModel<String>(Items);\n\t\tcomboBox.setModel(model);\n\t}",
"private void Actualizar_Tabla() {\n String[] columNames = {\"iditem\", \"codigo\", \"descripcion\", \"p_vent\", \"p_comp\", \"cant\", \"fecha\"};\n dtPersona = db.Select_Item();\n // se colocan los datos en la tabla\n DefaultTableModel datos = new DefaultTableModel(dtPersona, columNames);\n jTable1.setModel(datos);\n }",
"private void modi() { \n try {\n cvo.getId_cliente();\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.actualizar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Modificado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para Modificar registro!\");\n }\n }",
"private void dameTodoAlbum(int id) {\n List<AlbumCancion> miListaAlbumCancion = miCancionDao.dameTodoPorId(id);\n modeloTabla = (DefaultTableModel) tablaAlbumCancion.getModel();\n Object[] o = new Object[6];\n for (int i = 0; i < miListaAlbumCancion.size(); i++) {\n o[0] = miListaAlbumCancion.get(i).getCancion_id();\n o[1] = miListaAlbumCancion.get(i).getNombre_cancion();\n o[2] = miListaAlbumCancion.get(i).getDescripcion();\n o[3] = miListaAlbumCancion.get(i).getGrupo_musical();\n o[4] = miListaAlbumCancion.get(i).getNombre();\n o[5] = miListaAlbumCancion.get(i).getAnno();\n modeloTabla.addRow(o);\n }\n tablaAlbumCancion.setModel(modeloTabla);\n\n }",
"public Controlador() {\n\t\t// m\n\t\tdatosPrueba1 = new ListaEnlazada();\n\t\t// m\n\t\tdatosPrueba2 = new ListaEnlazada();\n\t\t// add\n\t\tdatosPrueba3 = new ListaEnlazada();\n\t\tdatosPrueba4 = new ListaEnlazada();\n\t\tprueba1 = new Estadisticas(datosPrueba1);\n\t\tprueba2 = new Estadisticas(datosPrueba2);\n\t\tprueba3 = new Estadisticas(datosPrueba3);\n\t\tprueba4 = new Estadisticas(datosPrueba4);\n\t\t// finAdd\n\t}",
"public void limpiarDatos() {\r\n FormularioUtil.limpiarComponentes(groupboxEditar, idsExcluyentes);\r\n tbxNro_identificacion.setValue(\"\");\r\n tbxNro_identificacion.setDisabled(false);\r\n deshabilitarCampos(true);\r\n\r\n }",
"public Cursor CargarTodosLosDatos()\n {\n return db.query(DATABASE_TABLE, new String[] {KEY_ATRIBUTO01}, null, null, null, null, null);\n }",
"public void setModeloOperaciones(ModeloTablaOperaciones modeloOperaciones) {\n\t\tthis.modeloOperaciones = modeloOperaciones;\n\t}",
"public BeanDatosAlumno() {\r\n bo = new BoPrestamoEjemplarImpl();\r\n verEjemplares(\"ABC0001\"); \r\n numerodelibrosPrestados();\r\n }",
"@Override\n\tpublic List<MahasiswaModel> selectAllMahasiswa(){\n\t\treturn mahasiswaDAO.selectAllMahasiswa();\n\t}",
"public void setModello(Modello m) {\r\n\t\t//PRECONDIZIONE\r\n\t\tassert m!=null : \"Chiamato setModello con m null\";\r\n\t\tmod = m;\r\n\t}",
"private void setNumTalentosToModel(int numTalentos)\n {\n if (controlador != null)\n { controlador.setTalentos(skill.getID(), stat.getID(), numTalentos); }\n }",
"public DefaultTableModel getModelo(){\n\n\t\treturn modelo;\n\n\t}",
"private void IniciarTabla(){\n \n // limpia los datos de los Label y los datos relacionados a la actualizacion de los datos e inhabilita y habilitar botones\nthis.jLabelId.setText(\"Id\");\nthis.jnombre.setText(\"\");\ngrabarCambios.setEnabled(false);\njBotonAgregar.setEnabled(true);\n\n DefaultTableModel dfm = new DefaultTableModel();\n tabla = this.jTabla;\n tabla.setModel(dfm);\n \n // agrega los datos al index de la tabla \n dfm.setColumnIdentifiers(new Object[]{\"id\",\"Comuna\",\"Estado\"});\n Conexion cn = new Conexion();\n rs = cn.SeleccionarTodosComunas();\n try{\n // se recorre rs donde estan los resultados de la busqueda de los datos de la tabla comuna\n while(rs.next()){\n String activo =\"\";\n if (rs.getInt(\"COM_ESTADO\")==1) {\n activo = \"activo\";\n } else {\n activo = \"no activo\";};\n // se agrega la fila con los datos de la columna \n dfm.addRow(new Object[]{rs.getInt(\"COM_ID\"),rs.getString(\"COM_NOMBRE\"),activo});\n }\n \n } catch(Exception e){\n System.out.println(\"Error Revisar funcion TableModel\" + e);\n }\n }",
"public ArrayList<Mascota> obtenerDatos(){\n\n BaseDatos db = new BaseDatos(context);\n\n ArrayList<Mascota> aux = db.obtenerTodoslosContactos();\n\n if(aux.size()==0){\n insertarMascotas(db);\n aux = db.obtenerTodoslosContactos();\n }\n\n return aux;\n }",
"public void save(){\n\t\tlowresModelManager.save();\n\t}",
"private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n ServicioEntity entity = factory.manufacturePojo(ServicioEntity.class);\n em.persist(entity);\n dataServicio.add(entity);\n }\n for (int i = 0; i < 3; i++) {\n QuejaEntity entity = factory.manufacturePojo(QuejaEntity.class);\n if (i == 0) {\n entity.setServicio(dataServicio.get(0));\n }\n em.persist(entity);\n data.add(entity);\n }\n }",
"public void readdata(ArrayList<AddData> daftar){\n Cursor crsr = this.getReadableDatabase().rawQuery(\"select todo, description, priority from \"+nama_tabel, null);\n while (crsr.moveToNext()){\n daftar.add(new AddData(crsr.getString(0), crsr.getString(1), crsr.getString(2)));\n }\n }",
"@Override\n public ModeloCuestionario visualizarModelo(Integer id) {\n ModeloCuestionario visualiza = modeloCuestionarioRepository.findOne(id);\n List<AreasCuestionario> listaAreas = areaCuestionarioService\n .findDistinctByIdCuestionarioAndFechaBajaIsNullOrderByOrdenAsc(id);\n for (AreasCuestionario area : listaAreas) {\n List<PreguntasCuestionario> listaPreguntas = preguntasRepository\n .findByAreaAndFechaBajaIsNullOrderByOrdenAsc(area);\n area.setPreguntas(listaPreguntas);\n }\n visualiza.setAreas(listaAreas);\n return visualiza;\n }",
"public void reloadTableEmpleado() {\n\n this.removeAllData();// borramos toda la data \n for (int i = 0; i < (listae.size()); i++) { // este for va de la primera casilla hast ael largo del arreglo \n Empleado object = listae.get(i);\n this.AddtoTableEmpleado(object);\n }\n\n }",
"private void caricaLista() {\n /** variabili e costanti locali di lavoro */\n ArrayList unaLista = null;\n CampoDati unCampoDati = null;\n CDBLinkato unCampoDBLinkato = null;\n //@todo da cancellare\n try { // prova ad eseguire il codice\n /* recupera il campo DB specializzato */\n unCampoDBLinkato = (CDBLinkato)unCampoParente.getCampoDB();\n\n /* recupera la lista dal campo DB */\n unaLista = unCampoDBLinkato.caricaLista();\n\n /* recupera il campo dati */\n unCampoDati = unCampoParente.getCampoDati();\n\n /* registra i valori nel modello dei dati del campo */\n if (unaLista != null) {\n unCampoDati.setValoriInterni(unaLista);\n// unCampoDatiElenco.regolaElementiAggiuntivi();\n } /* fine del blocco if */\n\n } catch (Exception unErrore) { // intercetta l'errore\n /* mostra il messaggio di errore */\n Errore.crea(unErrore);\n } /* fine del blocco try-catch */\n\n }",
"public void setModeloUsuarios(ModeloListaUsuariosConectados modeloUsuarios) {\n\t\tlistaUsuarios.setModel(modeloUsuarios);\n\t\tlistaUsuarios.setCellRenderer(modeloUsuarios.getListCellRenderer());\n\t\tthis.modeloUsuarios = modeloUsuarios;\n\t}",
"private void agregarDatoATable() {\n\t\tString nombre = textNombre.getText();\n\t\tint deporte = (int)spinnerDeporte.getValue();\n\t\tint musica = (int)spinnerMusica.getValue();\n\t\tint espectaculo = (int)spinnerEspectaculo.getValue();\n\t\tint ciencia = (int)spinnerCiencia.getValue();\n\t\t\n\t\t//Reseteo los inputs para los proximos datos\n\t\ttextNombre.setText(\"\");\n\t\tspinnerDeporte.setValue(1);\n\t\tspinnerMusica.setValue(1);\n\t\tspinnerEspectaculo.setValue(1);\n\t\tspinnerCiencia.setValue(1);\n\t\t\n\t\t//Agrego todos los datos al array\n\t\tdatos.add(new Persona(nombre,deporte,musica,espectaculo,ciencia));\n\t\t\n\t\t//Agrego los datos a la JTable\n\t\tmodel.addRow(new String[]{ nombre, String.valueOf(deporte), String.valueOf(musica),\n\t\t\t\tString.valueOf(espectaculo), String.valueOf(ciencia) });\n\t\ttable.setModel(model);\n\t}",
"public void CargarProveedores() {\n DefaultTableModel modelo = (DefaultTableModel) vista.Proveedores.jTable1.getModel();\n modelo.setRowCount(0);\n res = Conexion.Consulta(\"select * From proveedores\");\n try {\n while (res.next()) {\n Vector v = new Vector();\n v.add(res.getInt(1));\n v.add(res.getString(2));\n v.add(res.getString(3));\n v.add(res.getString(4));\n modelo.addRow(v);\n vista.Proveedores.jTable1.setModel(modelo);\n }\n } catch (SQLException e) {\n }\n }",
"public void populateListaObjetos() {\n listaObjetos.clear();\n Session session = HibernateUtil.getSessionFactory().openSession();\n try {\n String tipo = null;\n if (selectedTipo.equals(\"submenu\")) {\n tipo = \"menu\";\n } else if (selectedTipo.equals(\"accion\")) {\n tipo = \"submenu\";\n }\n\n Criteria cObjetos = session.createCriteria(Tblobjeto.class);\n cObjetos.add(Restrictions.eq(\"tipoObjeto\", tipo));\n Iterator iteObjetos = cObjetos.list().iterator();\n while (iteObjetos.hasNext()) {\n Tblobjeto o = (Tblobjeto) iteObjetos.next();\n listaObjetos.add(new SelectItem(new Short(o.getIdObjeto()).toString(), o.getNombreObjeto(), \"\"));\n }\n } catch (HibernateException e) {\n //logger.throwing(getClass().getName(), \"populateListaObjetos\", e);\n } finally {\n session.close();\n }\n }"
]
| [
"0.6751751",
"0.6719308",
"0.65009236",
"0.64335924",
"0.63737935",
"0.63101494",
"0.61586946",
"0.61389697",
"0.61201036",
"0.6065427",
"0.60366607",
"0.6008197",
"0.60078835",
"0.59933394",
"0.59770983",
"0.5974069",
"0.59726727",
"0.59673804",
"0.59495825",
"0.5946735",
"0.592667",
"0.5925655",
"0.59211636",
"0.58746773",
"0.58624065",
"0.58511186",
"0.5839637",
"0.5836707",
"0.58357376",
"0.58118546",
"0.5787727",
"0.57854795",
"0.5782251",
"0.5776309",
"0.5765822",
"0.576501",
"0.5748682",
"0.5745572",
"0.57311344",
"0.5721964",
"0.57047915",
"0.57022715",
"0.569104",
"0.56894505",
"0.5686839",
"0.568669",
"0.5681488",
"0.568137",
"0.56797045",
"0.56715196",
"0.5664445",
"0.56640935",
"0.5662752",
"0.56594425",
"0.5657388",
"0.56550926",
"0.56472784",
"0.56446606",
"0.5631607",
"0.5618638",
"0.5613451",
"0.56109786",
"0.5582808",
"0.55778956",
"0.55667955",
"0.5558463",
"0.55494",
"0.55486494",
"0.5538638",
"0.55339783",
"0.5531627",
"0.55292064",
"0.55268615",
"0.5519153",
"0.5512413",
"0.55111307",
"0.5502322",
"0.55000967",
"0.5497429",
"0.5497284",
"0.54945546",
"0.5493287",
"0.5493146",
"0.5491952",
"0.54883945",
"0.54743403",
"0.5474176",
"0.54691833",
"0.54686743",
"0.54646534",
"0.54640687",
"0.54636884",
"0.54633933",
"0.5456766",
"0.54550636",
"0.5453518",
"0.5451997",
"0.5451914",
"0.54483616",
"0.5443579"
]
| 0.673459 | 1 |
Obtenemos el siguiente valor de la secuencia relacionada a la tabla y lo actualiza. | private Integer getSecuencia(String nombreTabla) {
Integer secuencia = null;
// determinamos la secuencia a utilizar en base al nombre de la tabla
if(secuencias.containsKey(nombreTabla)) {
// si ya existe la recuperamos
secuencia = secuencias.get(nombreTabla);
} else {
// de lo contrario la iniciamos en 0
secuencia = 0;
}
// incrementamos el valor
secuencia += 1;
// lo almacenamos
secuencias.put(nombreTabla, secuencia);
// devolvemos el valor
return secuencia;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"ParqueaderoEntidad actualizar(ParqueaderoEntidad parqueadero);",
"public void ActaulizarTabla() {\n int id = Integer.parseInt(txtId.getText());\n int unidad = Integer.parseInt(txtUsuario.getText());\n String placa = txtCorreo.getText();\n\n try {\n PreparedStatement ps = null;\n ResultSet rs = null;\n Conexion obj_con = new Conexion();\n Connection con = obj_con.getConexion();\n String SQL = \"UPDATE `carros` SET `nro_unidad`=?,`placa`=?,`color`=?,`id_marca`=?,`id_modelo`=?,`cant_puestos`=?,`ano_unidad`=?,`estatus_table`=?,`id_estado_actual`=? WHERE `id_unidad`=?\";\n ps = con.prepareStatement(SQL);\n\n ps.setInt(1, unidad);////////////////////////////YA///////////////////////\n ps.setString(2, placa);\n ps.setInt(10, id);\n System.out.println(ps);\n ps.execute();\n JOptionPane.showMessageDialog(null, \"Registro Modificado Exitosamente\");\n //limpiar();\n this.dispose();\n tabla.setVisible(true);\n //tabla.cargarDatos(); \n \n int Fila = tabla.jTableVehiculos.getSelectedRow();\n /*obtener el nro de fila sellecioando*/\n System.out.println(Fila);\n Object[] filas = new Object[7]; //OBJETO PARA CREAR FILA NUEVA GUARDADA EN LA TABLA\n filas[0] = txtUsuario.getText();\n filas[1] = txtCorreo.getText();\n \n modelTable.addRow(filas);\n tabla.jTableVehiculos.setModel(modelTable);\n \n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Error al guardar registro\");\n System.err.println(e.toString());\n } \n }",
"private void UpdateTable() {\n\t\t\t\t\n\t\t\t}",
"public void getSetVersionRowValorPorUnidadWithConnection()throws Exception {\n\t\tif(valorporunidad.getIsChangedAuxiliar() && Constantes.ISSETVERSIONROWUPDATE) {\r\n\t\t \t//TEMPORAL\r\n\t\t\t//if((valorporunidad.getIsDeleted() || (valorporunidad.getIsChanged()&&!valorporunidad.getIsNew()))&& Constantes.ISSETVERSIONROWUPDATE) {\r\n\t\t\tTimestamp timestamp=null;\r\n\t\t\t\r\n\t\t\ttry {\t\r\n\t\t\t\tconnexion=connexion.getNewConnexion(this.connexionType,this.parameterDbType,this.entityManagerFactory);connexion.begin();\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\ttimestamp=valorporunidadDataAccess.getSetVersionRowValorPorUnidad(connexion,valorporunidad.getId());\r\n\t\t\t\t\r\n\t\t\t\tif(!valorporunidad.getVersionRow().equals(timestamp)) {\t\r\n\t\t\t\t\tvalorporunidad.setVersionRow(timestamp);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tconnexion.commit();\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tvalorporunidad.setIsChangedAuxiliar(false);\r\n\t\t\t\t\r\n\t\t\t} catch(Exception e) {\r\n\t\t\t\tconnexion.rollback();\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tthrow e;\r\n\t\t\t\t\r\n\t \t} finally {\r\n\t\t\t\tconnexion.close();\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void saveValue() {\n String[] idCol = assignedDataObject.getIdentifyTemplate().getIdentifyColumnNames();\n if (!(idCol.length == 1 && name.equals(idCol[0]))) { // method \"copy\" must not change unique key name! For any other methods it is not needed to save from frame.\n if (this.getText().equals(\"\")) {\n assignedDataObject.setInt(name, 0);\n } else {\n assignedDataObject.setInt(name, this.getIntValue());\n }\n }\n }",
"private void datos() {\n int row;\n row = vista.tblClientes.getSelectedRow();\n cvo.setId_cliente(Integer.parseInt(vista.tblClientes.getValueAt(row, 0).toString()));\n vista.txtNombre.setText(String.valueOf(vista.tblClientes.getValueAt(row, 1)));\n vista.txtApellido.setText(String.valueOf(vista.tblClientes.getValueAt(row, 2)));\n vista.txtDireccion.setText(String.valueOf(vista.tblClientes.getValueAt(row, 3)));\n vista.txtCorreo.setText(String.valueOf(vista.tblClientes.getValueAt(row, 4)));\n vista.txtClave.setText(String.valueOf(vista.tblClientes.getValueAt(row, 5)));\n }",
"protected Object getTableValue()\n\t\t{\n\t\t\treturn Value ;\n\t\t}",
"private void fechaActual() {\r\n\t\tDate date = new Date();\r\n\t\tSimpleDateFormat sm = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\r\n\t\t// Formateo de Fecha para mostrar en la vista - (String)\r\n\t\tsetFechaCreacion(sm.format(date.getTime()));\r\n\t\t// Formateo de Fecha campo db - (Date)\r\n\t\ttry {\r\n\t\t\tnewEntidad.setFechaCreacion(sm.parse(getFechaCreacion()));\r\n\t\t} catch (ParseException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t;\r\n\t}",
"private void actualizarVentanaOperadores() throws SQLException {\n Sistema.getControladorVentanaOperadores().actualizarTablaOperadores(\"SELECT * FROM operador WHERE activo=TRUE ORDER BY id ASC;\");\n }",
"public void llenadoDeTablas() {\n /**\n *\n * creaccion de la tabla de de titulos \n */\n DefaultTableModel modelo = new DefaultTableModel();\n modelo.addColumn(\"ID Bitacora\");\n modelo.addColumn(\"Usuario\");\n modelo.addColumn(\"Fecha\");\n modelo.addColumn(\"Hora\");\n modelo.addColumn(\"Ip\");\n modelo.addColumn(\"host\");\n \n modelo.addColumn(\"Accion\");\n modelo.addColumn(\"Codigo Aplicacion\");\n modelo.addColumn(\"Modulo\");\n /**\n *\n * instaciamiento de las las clases Bitacora y BiracoraDAO\n * intaciamiento de la clases con el llenado de tablas\n */\n BitacoraDao BicDAO = new BitacoraDao();\n List<Bitacora> usuario = BicDAO.select();\n JtProductos1.setModel(modelo);\n String[] dato = new String[9];\n for (int i = 0; i < usuario.size(); i++) {\n dato[0] = usuario.get(i).getId_Bitacora();\n dato[1] = usuario.get(i).getId_Usuario();\n dato[2] = usuario.get(i).getFecha();\n dato[3] = usuario.get(i).getHora();\n dato[4] = usuario.get(i).getHost();\n dato[5] = usuario.get(i).getIp();\n dato[6] = usuario.get(i).getAccion();\n dato[7] = usuario.get(i).getCodigoAplicacion();\n dato[8] = usuario.get(i).getModulo();\n \n //System.out.println(\"vendedor:\" + vendedores);\n modelo.addRow(dato);\n }}",
"public void tabla_campos() {\n int rec = AgendarA.tblAgricultor.getSelectedRow();// devuelve un entero con la posicion de la seleccion en la tabla\n ccAgricultor = AgendarA.tblAgricultor.getValueAt(rec, 1).toString();\n crearModeloAgenda();\n }",
"public String actualizarValorRetencionIVAListener()\r\n/* 571: */ {\r\n/* 572:605 */ DetalleFacturaProveedorSRI detalleFacturaProveedorSRI = (DetalleFacturaProveedorSRI)this.dtDetalleIVAFacturaProveedorSRI.getRowData();\r\n/* 573:606 */ this.servicioFacturaProveedorSRI.actualizarValorRetencion(detalleFacturaProveedorSRI);\r\n/* 574:607 */ return \"\";\r\n/* 575: */ }",
"public void get_TableValues(){\r\n\tFFM=99;\r\n\tADFM=99;\r\n\tDF=0;\r\n\tFLOAD=0;\r\n\t\r\n}",
"@Override\n public int getSalida() {\n return 0;\n }",
"@Override\r\n\tpublic void actualizar(int id_evento_vista, Object datos) {\r\n\t\t//Borra lo anterior\r\n \t\r\n \t jFormattedTextFieldPiso.setText(\"\");\r\n jFormattedTextFieldNumero.setText(\"\");\r\n jFormattedTextFieldTipo.setText(\"\");\r\n \r\n\t\t\r\n\t\tif(id_evento_vista == EventoVista.ALTA_HABITACION_EXITO){\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Se ha creado la Habitacion con exito\", \"Nuevo Habitacion\", JOptionPane.INFORMATION_MESSAGE);\t\t\r\n\t\t}\t\r\n\t\r\n\t\telse if (id_evento_vista == EventoVista.ALTA_HABITACION_FALLO){\r\n\t\t\tJOptionPane.showMessageDialog(null, \"ERROR!! Ha ocurrido un error con la BD\", \"Nuevo Habitacion\", JOptionPane.ERROR_MESSAGE);\r\n\t\t}\r\n\t\t\r\n\t}",
"public String vaAcSec(ConexionBaseDatos con, String nomSec) {\n con.abrirConexion();\n String sec = \"\";\n try {\n ResultSet rs = null;\n PreparedStatement stmt = null;\n String sql = \"SELECT last_value FROM \" + nomSec;\n stmt = con.con.prepareStatement(sql);\n rs = stmt.executeQuery();\n rs.next();\n sec = rs.getString(\"last_value\");\n\n\n } catch (SQLException e) {\n System.out.println(\"Error obteniendo el valor de la secuencia en funciones.java\");\n }\n return sec;\n }",
"public void salir() {\n if (bandera == 1) {\n altoTabla = \"310\";\n formulaProceso = (Column) FacesContext.getCurrentInstance().getViewRoot().findComponent(\"form:datosFormulaProceso:formulaProceso\");\n formulaProceso.setFilterStyle(\"display: none; visibility: hidden;\");\n\n formulaPeriodicidad = (Column) FacesContext.getCurrentInstance().getViewRoot().findComponent(\"form:datosFormulaProceso:formulaPeriodicidad\");\n formulaPeriodicidad.setFilterStyle(\"display: none; visibility: hidden;\");\n\n RequestContext.getCurrentInstance().update(\"form:datosFormulaProceso\");\n bandera = 0;\n filtrarListFormulasProcesos = null;\n tipoLista = 0;\n }\n listFormulasProcesosBorrar.clear();\n listFormulasProcesosCrear.clear();\n listFormulasProcesosModificar.clear();\n index = -1;\n secRegistro = null;\n k = 0;\n listFormulasProcesos = null;\n guardado = true;\n RequestContext.getCurrentInstance().update(\"form:ACEPTAR\");\n formulaActual = null;\n lovProcesos = null;\n }",
"private void procurarData() {\n if (jDateIni.getDate() != null && jDateFim.getDate() != null) {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n String data = sdf.format(jDateIni.getDate());\n String data2 = sdf.format(jDateFim.getDate());\n carregaTable(id, data, data2);\n JBreg.setEnabled(false);\n }\n }",
"public void almacenoDatos(){\n BaseDatosSecundaria administrador= new BaseDatosSecundaria(this);\n SQLiteDatabase bdsecunadaria= administrador.getWritableDatabase();\n _valuesPedido.put(\"Producto\", this._productoNombre);\n _valuesPedido.put(\"Precio\",this._productoPrecio);\n _valuesPedido.put(\"Cantidad\",this._etAdquirir.getText().toString());\n _valuesPedido.put(\"Vendedor\",this.username);\n _valuesPedido.put(\"Id_Producto\",this._productoId);\n bdsecunadaria.insert(\"DATOS\",null,this._valuesPedido);\n bdsecunadaria.close();\n }",
"public void fill_table()\n {\n Secante secante = new Secante(GraficaSecanteController.a, GraficaSecanteController.b, GraficaSecanteController.ep, FuncionController.e);\n list = secante.algoritmo();\n }",
"public void enregistrerdonnees() {\n try {\n int i = jTable2.getSelectedRow();\n int mtle = Integer.parseInt(jTable2.getValueAt(i, 0) + \"\");\n String nom_el = jTable2.getValueAt(i, 1) + \"\";\n String prenom_el = jTable2.getValueAt(i, 2) + \"\";\n String sexe_el = jTable2.getValueAt(i, 3) + \"\";\n String date_naiss_el = jTable2.getValueAt(i, 4) + \"\";\n String lieu_naiss = jTable2.getValueAt(i, 5) + \"\";\n String redoublant = jTable2.getValueAt(i, 6) + \"\";\n String email = jTable2.getValueAt(i, 7) + \"\";\n String date_inscription = jTable2.getValueAt(i, 8) + \"\";\n String solvable = jTable2.getValueAt(i, 9) + \"\";\n\n\n Connector1.statement.executeUpdate(\"UPDATE eleve set nom_el ='\" + nom_el.replace(\"'\", \"''\").toUpperCase() + \"' WHERE mtle = \" + mtle + \"\");\n Connector1.statement.executeUpdate(\"UPDATE eleve set prenom_el ='\" + prenom_el.replace(\"'\", \"''\").toUpperCase() + \"' WHERE mtle = \" + mtle + \"\");\n Connector1.statement.executeUpdate(\"UPDATE eleve set sexe_el ='\" + sexe_el.replace(\"'\", \"''\").toUpperCase() + \"' WHERE mtle = \" + mtle + \"\");\n Connector1.statement.executeUpdate(\"UPDATE eleve set date_naiss_el ='\" + date_naiss_el.replace(\"'\", \"''\") + \"' WHERE mtle = \" + mtle + \"\");\n Connector1.statement.executeUpdate(\"UPDATE eleve set lieu_naiss ='\" + lieu_naiss.replace(\"'\", \"''\") + \"' WHERE mtle = \" + mtle + \"\");\n Connector1.statement.executeUpdate(\"UPDATE eleve set redoublant ='\" + redoublant.replace(\"'\", \"''\") + \"' WHERE mtle= \" + mtle + \"\");\n Connector1.statement.executeUpdate(\"UPDATE eleve set email ='\" + email.replace(\"'\", \"''\").toLowerCase() + \"' WHERE mtle= \" + mtle + \"\");\n Connector1.statement.executeUpdate(\"UPDATE eleve set solvable ='\" + solvable.replace(\"'\", \"''\").toUpperCase() + \"' WHERE mtle= \" + mtle + \"\");\n Connector1.statement.executeUpdate(\"UPDATE eleve set date_inscription =DEFAULT WHERE mtle= \" + mtle + \"\");\n JOptionPane.showMessageDialog(null, \"BRAVO MODIFICATION EFFECTUEE AVEC SUCCES\");\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"ERROR \\n\" + e.getMessage());\n }\n }",
"private void updateALUTableTomasulo() {\n\t\t// Get a copy of the memory stations\n\t\tALUStation[] temp_alu = alu_rsTomasulo;\n\n\t\t// Update the table with current values for the stations\n\t\tfor (int i = 0; i < temp_alu.length; i++) {\n\t\t\t// generate a meaningfull representation of busy\n\t\t\tString busy_desc = (temp_alu[i].isBusy() ? \"Yes\" : \"No\");\n\n\t\t\tReservationStationModelTomasulo\n\t\t\t\t\t.setValueAt(((temp_alu[i].isReady() && temp_alu[i].isBusy()) ? temp_alu[i].getCycle() : \"0\"), i, 0);\n\n\t\t\tReservationStationModelTomasulo.setValueAt(temp_alu[i].getName(), i, 1);\n\t\t\tReservationStationModelTomasulo.setValueAt(busy_desc, i, 2);\n\t\t\tReservationStationModelTomasulo.setValueAt(((temp_alu[i].isBusy()) ? temp_alu[i].getOperation() : \" \"), i,\n\t\t\t\t\t3);\n\t\t\tReservationStationModelTomasulo.setValueAt(temp_alu[i].getVj(), i, 4);\n\t\t\tReservationStationModelTomasulo.setValueAt(temp_alu[i].getVk(), i, 5);\n\t\t\tReservationStationModelTomasulo.setValueAt(temp_alu[i].getQj(), i, 6);\n\t\t\tReservationStationModelTomasulo.setValueAt(temp_alu[i].getQk(), i, 7);\n\t\t}\n\t}",
"public int getValue()\n { \n return table.get(getSelectedItem());\n }",
"private void salvarVenda(String nomeCliente, double precoFinal, double desconto ,String mesAnoAt,String dataCompra,String formaDePagamento) {\n\n\t\tFirebaseAuth autenticacion = configFireBase.getFireBaseAutenticacao();\n\n\t\tString idUsuario = Base64Custom.codificarBase64(autenticacion.getCurrentUser().getEmail());\n\t\tDatabaseReference VendaRef=mDatabase.child(\"vendas\");\n\n\n\t\tvenda.setIdVenda(VendaRef.push().getKey());\n\t\tvenda.setNomeCliente(nomeCliente);\n\t\tvenda.setValorTotal(precoFinal);\n\t\tvenda.setMesAno(mesAnoAt);\n\t\tvenda.setDesconto(desconto);\n\t\tvenda.setDataCompra(dataCompra);\n\t\tvenda.setLista(ListagemDeProdutosParaCompras.produtosSelecionados);\n\t\tvenda.setFormaDePagamento(formaDePagamento);\n\n\t\tmDatabase.child(\"armazenamento\").child(idUsuario).child(\"vendas\").child(venda.getIdVenda()).setValue(venda).addOnCompleteListener(new OnCompleteListener<Void>() {\n\n\t\t\t@Override\n\t\t\tpublic void onComplete(@NonNull Task<Void> task) {\n\n\t\t\t}\n\n\t\t});\n\n\t\tToast.makeText(CadastrarVendaActivity.this, \"Venda Realizada\", Toast.LENGTH_SHORT).show();\n\t\tstartActivity(new Intent(getApplicationContext(), ListagemDeVendasRealizadas.class));\n\t\tvenda.subtrairVendas();\n\n\t\tthis.finish();\n\t}",
"public void alertasexistencia() {\r\n try {\r\n rs = modelo.alertaexistenciapro();//C.P.M consultamos los producto con alerta en existencia\r\n DefaultTableModel tabla = new DefaultTableModel() {//C.P.M creamos el modelo de la tabla\r\n @Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {\r\n return false;\r\n }\r\n };\r\n vista.Talertas.setModel(tabla);//C.P.M le mandamos el modelo\r\n modelo.estructuraAlrta(tabla);//C.P.M obtenemos la estructura de la tabla \"los encabezados\"\r\n ResultSetMetaData rsMd = rs.getMetaData();//C.P.M obtenemos los metadatos de la consulta\r\n int cantidadColumnas = rsMd.getColumnCount();//C.P.M obtenemos la cantidad de las columnas de la consulta\r\n while (rs.next()) {\r\n Object[] fila = new Object[cantidadColumnas];//C.P.M creamos un arreglo con la cantidad de columnas \r\n for (int i = 0; i < cantidadColumnas; i++) {//C.P.M lo recorremos \r\n fila[i] = rs.getObject(i + 1);//C.P.M y agregamos la informacion de la consulta\r\n }\r\n tabla.addRow(fila);//C.P.M lo agregamos a la tabla como una nueva fila\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Ocurrio algun error al consultar las alertas\");\r\n }\r\n }",
"public void llenadoDeTablas() {\n DefaultTableModel modelo = new DefaultTableModel();\n modelo.addColumn(\"ID Articulo\");\n modelo.addColumn(\"Fecha Ingreso\");\n modelo.addColumn(\"Nombre Articulo\");\n modelo.addColumn(\"Talla XS\");\n modelo.addColumn(\"Talla S\");\n modelo.addColumn(\"Talla M\");\n modelo.addColumn(\"Talla L\");\n modelo.addColumn(\"Talla XL\");\n modelo.addColumn(\"Color Articulo\");\n modelo.addColumn(\"Nombre Proveedor\");\n modelo.addColumn(\"Existencias\");\n\n RegistroArticuloDAO registroarcticuloDAO = new RegistroArticuloDAO();\n\n List<RegistroArticulo> registroarticulos = registroarcticuloDAO.select();\n TablaArticulo.setModel(modelo);\n String[] dato = new String[11];\n for (int i = 0; i < registroarticulos.size(); i++) {\n dato[0] = Integer.toString(registroarticulos.get(i).getPK_id_articulo());\n dato[1] = registroarticulos.get(i).getFecha_ingreso();\n dato[2] = registroarticulos.get(i).getNombre_articulo();\n dato[3] = registroarticulos.get(i).getTalla_articuloXS();\n dato[4] = registroarticulos.get(i).getTalla_articuloS();\n dato[5] = registroarticulos.get(i).getTalla_articuloM();\n dato[6] = registroarticulos.get(i).getTalla_articuloL();\n dato[7] = registroarticulos.get(i).getTalla_articuloXL();\n dato[8] = registroarticulos.get(i).getColor_articulo();\n dato[9] = registroarticulos.get(i).getNombre_proveedor();\n dato[10] = registroarticulos.get(i).getExistencia_articulo();\n\n //System.out.println(\"vendedor:\" + vendedores);\n modelo.addRow(dato);\n }\n }",
"public void actualizarFechaComprobantes() {\r\n if (utilitario.isFechasValidas(cal_fecha_inicio.getFecha(), cal_fecha_fin.getFecha())) {\r\n tab_tabla1.setCondicion(\"fecha_trans_cnccc between '\" + cal_fecha_inicio.getFecha() + \"' and '\" + cal_fecha_fin.getFecha() + \"' and ide_cntcm=\" + com_tipo_comprobante.getValue());\r\n tab_tabla1.ejecutarSql();\r\n tab_tabla2.ejecutarValorForanea(tab_tabla1.getValorSeleccionado());\r\n utilitario.addUpdate(\"tab_tabla1,tab_tabla2\");\r\n calcularTotal();\r\n utilitario.addUpdate(\"gri_totales\");\r\n } else {\r\n utilitario.agregarMensajeInfo(\"Rango de fechas no válidas\", \"\");\r\n }\r\n\r\n }",
"@Override\n\tpublic void atualizar() {\n\t\t\n\t\t \n\t\t String idstring = id.getText();\n\t\t UUID idlong = UUID.fromString(idstring);\n\t\t \n\t\t PedidoCompra PedidoCompra = new PedidoCompra();\n\t\t\tPedidoCompra.setId(idlong);\n\t\t\tPedidoCompra.setAtivo(true);\n//\t\t\tPedidoCompra.setNome(nome.getText());\n\t\t\tPedidoCompra.setStatus(StatusPedido.valueOf(status.getSelectionModel().getSelectedItem().name()));\n//\t\t\tPedidoCompra.setSaldoinicial(saldoinicial.getText());\n\t\t\tPedidoCompra.setData(new Date());\n\t\t\tPedidoCompra.setIspago(false);\n\t\t\tPedidoCompra.setData_criacao(new Date());\n//\t\t\tPedidoCompra.setFornecedor(fornecedores.getSelectionModel().getSelectedItem());\n\t\t\tPedidoCompra.setFornecedor(cbfornecedores.getSelectionModel().getSelectedItem());\n\t\t\tPedidoCompra.setTotal(PedidoCompra.CalcularTotal(PedidoCompra.getItems()));\n\t\t\tPedidoCompra.setTotalpago(PedidoCompra.CalculaTotalPago(PedidoCompra.getFormas()));\n\t\t\t\n\t\t\t\n\t\t\tgetservice().edit(PedidoCompra);\n\t\t\tupdateAlert(PedidoCompra);\n\t\t\tclearFields();\n\t\t\tdesligarLuz();\n\t\t\tloadEntityDetails();\n\t\t\tatualizar.setDisable(true);\n\t\t\tsalvar.setDisable(false);\n\t\t\t\n\t\t \n\t\t \n\t\tsuper.atualizar();\n\t}",
"private void updateTabela() {\n\n if (txBuscar.getText().isEmpty()) {\n ListaEmprestimosBEANs = new ControlerEmprestimos().listaEmprestimoss();\n } else {\n try {\n Integer buscar = Integer.parseInt(txBuscar.getText());\n ListaEmprestimosBEANs = new ArrayList<>();\n ListaEmprestimosBEANs.add(new ControlerEmprestimos().findEmprestimos(buscar));\n } catch (Exception e) {\n\n }\n }\n DefaultTableModel model = new DefaultTableModel(null, new String[]{\"ID\", \"Data de Saida\", \"Data Estimada do Retorno\", \"Data do Retorno\"});\n try {\n jTable1.setModel(model);\n String[] dados = new String[9];\n for (EmprestimosBEAN a : ListaEmprestimosBEANs) {\n dados[0] = String.valueOf(a.getId_emprestimo());\n dados[1] = a.getDtSaida().toString();\n dados[2] = a.getDtVolta().toString();\n dados[3] = a.getDtRetorno() == null ? \"\" : a.getDtRetorno().toString();\n model.addRow(dados);\n }\n } catch (Exception ex) {\n\n }\n\n }",
"private void limpiarValores(){\n\t\tpcodcia = \"\";\n\t\tcedula = \"\";\n\t\tcoduser = \"\";\n\t\tcluser = \"\";\n\t\tmail = \"\";\n\t\taudit = \"\";\n\t\tnbr = \"\";\n\t\trol = \"\";\n\t}",
"public void atualizaEstoque(int quantidade, String produto) {\r\n\r\n int idProduto = 0;\r\n int novoEstoque = 0;\r\n\r\n //Verificar qual o produto selecionado\r\n String sql = \"SELECT idProduto FROM produtos WHERE nomeProduto = ? \";\r\n\r\n try {\r\n\r\n PreparedStatement pstmt = this.conexao.prepareStatement(sql);\r\n pstmt.setString(1, produto);\r\n ResultSet rs = pstmt.executeQuery();\r\n\r\n while (rs.next()) {\r\n idProduto = rs.getInt(\"idProduto\");\r\n }\r\n\r\n } catch (Exception e) {\r\n\r\n JOptionPane.showMessageDialog(null, \"Erro ao buscar produto!\" + e.getMessage());\r\n\r\n }\r\n\r\n //Pegar o estoque desse protudo\r\n try {\r\n sql = \"SELECT quantidadeEstoque FROM estoque WHERE idEstoque = ?\";\r\n\r\n PreparedStatement pstmt2 = this.conexao.prepareStatement(sql);\r\n pstmt2.setInt(1, idProduto);\r\n ResultSet rs = pstmt2.executeQuery();\r\n\r\n while (rs.next()) {\r\n novoEstoque = (rs.getInt(\"quantidadeEstoque\") - quantidade);\r\n }\r\n\r\n pstmt2.execute();\r\n pstmt2.close();\r\n } catch (Exception e) {\r\n JOptionPane.showMessageDialog(null, \"Erro ao buscar estoque!\" + e.getMessage());\r\n }\r\n\r\n try {\r\n\r\n //Descontar a quantidade comprada do estoque\r\n sql = \"UPDATE estoque SET quantidadeEstoque = ? WHERE idEstoque = ?\";\r\n\r\n PreparedStatement pstmt3 = this.conexao.prepareStatement(sql);\r\n pstmt3.setInt(1, novoEstoque);\r\n pstmt3.setInt(2, idProduto);\r\n\r\n pstmt3.execute();\r\n\r\n pstmt3.close();\r\n\r\n } catch (Exception e) {\r\n\r\n JOptionPane.showMessageDialog(null, \"Falha ao atualizar estoque!\" + e.getMessage());\r\n\r\n }\r\n }",
"public void introducirConsumosHabitacion(TablaModelo modelo,String idHabitacion) {\n int idHabitacionInt = Integer.parseInt(idHabitacion);\n try {// mira los consumo de unas fechas\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT CONSUMO_RESTAURANTE.Id_Consumo,CONSUMO_RESTAURANTE.Id_Alojamiento,CONSUMO_RESTAURANTE.Nombre_Comida,CONSUMO_RESTAURANTE.Precio_Comida,CONSUMO_RESTAURANTE.Cantidad,CONSUMO_RESTAURANTE.Fecha_Consumo FROM CONSUMO_RESTAURANTE JOIN ALOJAMIENTO JOIN RESERVACION WHERE RESERVACION.Id=ALOJAMIENTO.Id_Reservacion AND ALOJAMIENTO.Id=CONSUMO_RESTAURANTE.Id_Alojamiento AND RESERVACION.Id_Habitacion=?\");\n declaracion.setInt(1, idHabitacionInt);// mira los consumo de unas fechas\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {\n Object objeto[] = new Object[7];// mira los consumo de unas fechas\n objeto[0] = resultado.getInt(1);\n objeto[1] = resultado.getInt(2);// mira los consumo de unas fechas\n objeto[2] = resultado.getString(3);\n objeto[3] = resultado.getInt(4);\n objeto[4] = resultado.getInt(5);// mira los consumo de unas fechas\n objeto[5] = resultado.getDate(6);\n int total = (Integer)objeto[3]*(Integer)objeto[4];\n objeto[6]= total;// mira los consumo de unas fechas\n modelo.addRow(objeto);\n } // maneja el resultado \n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }",
"@Override\r\n\tpublic void salarioAtual() {\n\t\tSystem.out.print(\"VALOR ATUAL\"+this.valor);\r\n\t\t\r\n\t}",
"private void Actualizar_Tabla() {\n String[] columNames = {\"iditem\", \"codigo\", \"descripcion\", \"p_vent\", \"p_comp\", \"cant\", \"fecha\"};\n dtPersona = db.Select_Item();\n // se colocan los datos en la tabla\n DefaultTableModel datos = new DefaultTableModel(dtPersona, columNames);\n jTable1.setModel(datos);\n }",
"public void getSetVersionRowDatoGeneralEmpleadoWithConnection()throws Exception {\n\t\tif(datogeneralempleado.getIsChangedAuxiliar() && Constantes.ISSETVERSIONROWUPDATE) {\r\n\t\t \t//TEMPORAL\r\n\t\t\t//if((datogeneralempleado.getIsDeleted() || (datogeneralempleado.getIsChanged()&&!datogeneralempleado.getIsNew()))&& Constantes.ISSETVERSIONROWUPDATE) {\r\n\t\t\tTimestamp timestamp=null;\r\n\t\t\t\r\n\t\t\ttry {\t\r\n\t\t\t\tconnexion=connexion.getNewConnexion(this.connexionType,this.parameterDbType,this.entityManagerFactory);connexion.begin();\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\ttimestamp=datogeneralempleadoDataAccess.getSetVersionRowDatoGeneralEmpleado(connexion,datogeneralempleado.getId());\r\n\t\t\t\t\r\n\t\t\t\tif(!datogeneralempleado.getVersionRow().equals(timestamp)) {\t\r\n\t\t\t\t\tdatogeneralempleado.setVersionRow(timestamp);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tconnexion.commit();\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tdatogeneralempleado.setIsChangedAuxiliar(false);\r\n\t\t\t\t\r\n\t\t\t} catch(Exception e) {\r\n\t\t\t\tconnexion.rollback();\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tthrow e;\r\n\t\t\t\t\r\n\t \t} finally {\r\n\t\t\t\tconnexion.close();\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void actualizaSugerencias() { \t \t\n\n \t// Pide un vector con las últimas N_SUGERENCIAS búsquedas\n \t// get_historial siempre devuelve un vector tamaño N_SUGERENCIAS\n \t// relleno con null si no las hay\n \tString[] historial = buscador.get_historial(N_SUGERENCIAS);\n \t\n \t// Establece el texto para cada botón...\n \tfor(int k=0; k < historial.length; k++) { \t\t \t\t\n \t\t\n \t\tString texto = historial[k]; \n \t\t// Si la entrada k está vacía..\n \t\tif ( texto == null) {\n \t\t\t// Rellena el botón con el valor por defecto\n \t\t\ttexto = DEF_SUGERENCIAS[k];\n \t\t\t// Y lo añade al historial para que haya concordancia\n \t\t\tbuscador.add_to_historial(texto);\n \t\t} \t\t\n \t\tb_sugerencias[k].setText(texto);\n \t} \t\n }",
"public void tableChanged(TableModelEvent e) {\n int row = e.getFirstRow();\n TableModel model = (TableModel)e.getSource();\n// Als er een wijziging is aangebracht de 'opslaan' knop activeren\n btnOpslaan.setEnabled(true);\n lblSysteemMelding.setText(\" \");\n// Juiste gegevens voor in de db bepalen aan de hand van de status van een gebruiker.\n int rolID;\n if (model.getValueAt(row,5).equals(\"Gedeactiveerd\")){\n rolID = 2;\n } else if (model.getValueAt(row,5).equals(\"Administrator\")) {\n rolID = 3;\n } else {\n rolID = 4;\n }\n// Wijziging klaarzetten voor opslag repo / db.\n beheerGebruikersController.buildUpdate(new Administrator(\n (String)model.getValueAt(row,3),\n (String)model.getValueAt(row,1),\n (String)model.getValueAt(row,2),\n rolID,\n (String)model.getValueAt(row,4),\n (String)model.getValueAt(row,0),\n 0));\n\n }",
"private void modi() { \n try {\n cvo.getId_cliente();\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.actualizar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Modificado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para Modificar registro!\");\n }\n }",
"public void actionPerformed(ActionEvent event)\n {\n if (event.getSource()==balterar)\n {\n operacao=\"edicao\";\t\n int linha = aTable.getSelectedRow();\n if (linha>=0)\n {\n \t desbloqueia();\n String idprod = aTable.getValueAt(linha,0).toString();\n String desprod = aTable.getValueAt(linha,1).toString();\n String quantidade = aTable.getValueAt(linha,2).toString();\n String valunit = aTable.getValueAt(linha,3).toString();\n String ultmov = aTable.getValueAt(linha,4).toString();\n String categoria = aTable.getValueAt(linha,5).toString();\n String idcateg = aTable.getValueAt(linha,6).toString();\n tidprod.setText(idprod);\n tidprod.setEnabled(false);\n tdesprod.setText(desprod);\n tquantidade.setText(quantidade);\n tvalunit.setText(valunit);\n tultmov.setDate(dma_to_amd(ultmov));\n tlistacateg.setSelectedItem(categoria);\n g_idcateg = Integer.parseInt(idcateg);\n }\n else\n {\n \t JOptionPane.showMessageDialog(null,\"Selecione na tabela o registro que deseja editar\");\n }\n }\n \n \t \n // Executa este if se for clicado o botao Gravar\n if (event.getSource()==bgravar)\n {\n try\n {\n \t int idprod = Integer.parseInt(tidprod.getText());\n \t \n \t if (idprod>0 && \"edicao\".equals(operacao))\n \t { \t \n \t PreparedStatement st = conex.prepareStatement(\"update produtos set desprod=?,quantidade=?,valunit=?,codcateg=?, ultmov=? where idprod=?\");\n st.setString(1,tdesprod.getText());\n st.setDouble(2,Double.parseDouble(tquantidade.getText()));\n st.setDouble(3,Double.parseDouble(tvalunit.getText()));\n st.setInt(4,g_idcateg);\n st.setDate(5,new java.sql.Date(tultmov.getDate().getTime())); \n st.setInt(6,Integer.parseInt(tidprod.getText()));\n st.executeUpdate();\n \t }\n \n \t if (idprod > 0 && \"novo\".equals(operacao))\n \t { \t \n PreparedStatement st = conex.prepareStatement(\"select idprod from produtos where idprod = ?\");\n st.setInt(1,Integer.parseInt(tidprod.getText()));\n ResultSet rs = st.executeQuery();\n if (rs.first())\n {\n JOptionPane.showMessageDialog(null,\"Este codigo ja existe!\");\n }\n else\n {\n String sql = \"insert into produtos (idprod,desprod,quantidade,valunit,codcateg,ultmov) values (?,?,?,?,?,?)\";\n PreparedStatement vs = conex.prepareStatement(sql);\n vs.setInt(1,Integer.parseInt(tidprod.getText()));\n vs.setString(2,tdesprod.getText());\n vs.setDouble(3,Double.parseDouble(tquantidade.getText()));\n vs.setDouble(4,Double.parseDouble(tvalunit.getText()));\n vs.setInt(5,g_idcateg);\n vs.setDate(6,new java.sql.Date(tultmov.getDate().getTime()));\n vs.executeUpdate();\n }\n rs.close();\n \t }\n \t \n } catch (Exception sqlEx) {JOptionPane.showMessageDialog(null,\"erro\");}\n preenche_grid();\n limpaBase();\n bloqueia();\n }\n \n // Executa este if se for clicado o botao Excluir\n if (event.getSource()==bexcluir)\n {\n int linha = aTable.getSelectedRow();\n if (linha>=0)\n {\n \t int resp = JOptionPane.showOptionDialog(null,\"Confirma exclusão\",\"Atenção\",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE,null,null,null);\n \t if (resp==0)\n \t {\n String idprod = aTable.getValueAt(linha,0).toString();\n try\n {\n PreparedStatement st = conex.prepareStatement(\"delete from produtos where idprod = ?\");\n st.setInt(1,Integer.parseInt(idprod));\n st.executeUpdate();\n } catch (Exception sqlEx) {}\n preenche_grid();\n \t }\n }\n else\n {\n \t JOptionPane.showMessageDialog(null,\"Selecione na tabela o registro que deseja excluir\");\n }\n\n }\n \n // Executa este if se for clicado o botao Incluir\n if (event.getSource()==bincluir)\n {\n \toperacao=\"novo\";\t\n try\n {\n \tlimpaBase();\n \tdesbloqueia();\n } catch (Exception sqlEx) {}\n }\n \n \n \n }",
"@Override\n\tpublic long actualizar(Account entidad) {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic void frenar() {\n\t\tvelocidadActual = 0;\n\t}",
"private EstabelecimentoTable() {\n\t\t\t}",
"public void limpiarcarrito() {\r\n setTotal(0);//C.P.M limpiamos el total\r\n vista.jTtotal.setText(\"0.00\");//C.P.M limpiamos la caja de texto con el formato adecuado\r\n int x = vista.Tlista.getRowCount() - 1;//C.P.M inicializamos una variable con el numero de columnas\r\n {\r\n try {\r\n DefaultTableModel temp = (DefaultTableModel) vista.Tlista.getModel();//C.P.M obtenemos el modelo actual de la tabla\r\n while (x >= 0) {//C.P.M la recorremos\r\n temp.removeRow(x);//C.P.M vamos removiendo las filas de la tabla\r\n x--;//C.P.M y segimos disminuyendo para eliminar la siguiente \r\n }\r\n } catch (ArrayIndexOutOfBoundsException e) {\r\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al limpiar la venta\");\r\n }\r\n }\r\n }",
"public void salvarDadosNaTela(){\n SharedPreferences sharedPreferences = this.getActivity().getSharedPreferences(SHARED_PREFS, MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n\n editor.putString(TVHORAUM, tvHoraUm.getText().toString());\n editor.putString(TVHORADOIS, tvHoraDois.getText().toString());\n editor.putString(TVHORATRES, tvHoraTres.getText().toString());\n editor.putString(TVHORAQUATRO, tvHoraQuatro.getText().toString());\n\n editor.apply();\n\n }",
"private void actualizarStock(String codBarras) throws SQLException {\n\n }",
"public void updatedTable() {\r\n\t\tfireTableDataChanged();\r\n\t}",
"public void editarData(){\n\t\talunoTurmaService.inserirAlterar(alunoTurmaAltera);\n\t\t\n\t\t\n\t\tmovimentacao.setDataMovimentacao(alunoTurmaAltera.getDataMudanca());\n\t\tmovimentacaoService.inserirAlterar(movimentacao);\n\t\t\n\t\tFecharDialog.fecharDialogDATAAluno();\n\t\tExibirMensagem.exibirMensagem(Mensagem.SUCESSO);\n\t\talunoTurmaAltera = new AlunoTurma();\n\t\tmovimentacao = new Movimentacao();\n\t\t\n\t\tatualizarListas();\n\t}",
"public void datosIniciales() {\n try {\n nombre.setCellValueFactory(new PropertyValueFactory<>(\"nombre\"));\n subTipo.setCellValueFactory(new PropertyValueFactory<>(\"subTipo\"));\n tipo.setCellValueFactory(new PropertyValueFactory<>(\"tipo\"));\n editar.setCellValueFactory(new PropertyValueFactory<>(\"imagenEditar\"));\n listaSubTipoDAO = subTipoDAO.hacerConsulta();\n listaSubTipo = FXCollections.observableArrayList(listaSubTipoDAO);\n valoresSubtipo = new ListSpinnerValueFactory(listaSubTipo);\n spinnerSubtipo.setValueFactory(valoresSubtipo);\n\n puntuacion = new SpinnerValueFactory.IntegerSpinnerValueFactory(1, 5, 1, 1);\n\n editar.getStyleClass().add(\"cursorMano\");\n refrescarDatos();\n\n } catch (SQLException ex) {\n alarmaFalloSQL();\n }\n }",
"private void dibujarEstado() {\n\n\t\tcantidadFichasNegras.setText(String.valueOf(juego.contarFichasNegras()));\n\t\tcantidadFichasBlancas.setText(String.valueOf(juego.contarFichasBlancas()));\n\t\tjugadorActual.setText(juego.obtenerJugadorActual());\n\t}",
"public void actualizarPodio() {\r\n\t\tordenarXPuntaje();\r\n\t\tint tam = datos.size();\r\n\t\traizPodio = datos.get(tam-1);\r\n\t\traizPodio.setIzq(datos.get(tam-2));\r\n\t\traizPodio.setDer(datos.get(tam-3));\r\n\t}",
"public RespuestaBD modificarRegistro(int codigoFlujo, int secuencia, int servicioInicio, int accion, int codigoEstado, int servicioDestino, String nombreProcedimiento, String correoDestino, String enviar, String mismoProveedor, String mismomismoCliente, String estado, int caracteristica, int caracteristicaValor, int caracteristicaCorreo, String metodoSeleccionProveedor, String indCorreoCliente, String indHermana, String indHermanaCerrada, String indfuncionario, String usuarioModificacion) {\n/* 437 */ RespuestaBD rta = new RespuestaBD();\n/* */ \n/* */ try {\n/* 440 */ String s = \"update wkf_detalle set servicio_inicio=\" + servicioInicio + \",\" + \" accion=\" + accion + \",\" + \" codigo_estado=\" + codigoEstado + \",\" + \" servicio_destino=\" + ((servicioDestino == 0) ? \"null\" : Integer.valueOf(servicioDestino)) + \",\" + \" nombre_procedimiento='\" + nombreProcedimiento + \"',\" + \" correo_destino='\" + correoDestino + \"',\" + \" enviar_solicitud='\" + enviar + \"',\" + \" ind_mismo_proveedor='\" + mismoProveedor + \"',\" + \" ind_mismo_cliente='\" + mismomismoCliente + \"',\" + \" estado='\" + estado + \"',\" + \" caracteristica=\" + ((caracteristica == 0) ? \"null\" : (\"\" + caracteristica)) + \",\" + \" valor_caracteristica=\" + ((caracteristicaValor == 0) ? \"null\" : (\"\" + caracteristicaValor)) + \",\" + \" caracteristica_correo=\" + ((caracteristicaCorreo == 0) ? \"null\" : (\"\" + caracteristicaCorreo)) + \",\" + \" metodo_seleccion_proveedor=\" + ((metodoSeleccionProveedor.length() == 0) ? \"null\" : (\"'\" + metodoSeleccionProveedor + \"'\")) + \",\" + \" ind_correo_clientes=\" + ((indCorreoCliente.length() == 0) ? \"null\" : (\"'\" + indCorreoCliente + \"'\")) + \",\" + \" enviar_hermana=\" + ((indHermana.length() == 0) ? \"null\" : (\"'\" + indHermana + \"'\")) + \",\" + \" enviar_si_hermana_cerrada=\" + ((indHermanaCerrada.length() == 0) ? \"null\" : (\"'\" + indHermanaCerrada + \"'\")) + \",\" + \" ind_cliente_inicial=\" + ((indfuncionario.length() == 0) ? \"null\" : (\"'\" + indfuncionario + \"'\")) + \",\" + \" usuario_modificacion='\" + usuarioModificacion + \"',\" + \" fecha_modificacion=\" + Utilidades.getFechaBD() + \"\" + \" where\" + \" codigo_flujo=\" + codigoFlujo + \" and secuencia=\" + secuencia + \"\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 465 */ rta = this.dat.executeUpdate2(s);\n/* */ }\n/* 467 */ catch (Exception e) {\n/* 468 */ e.printStackTrace();\n/* 469 */ Utilidades.writeError(\"FlujoDetalleDAO:modificarRegistro \", e);\n/* 470 */ rta.setMensaje(e.getMessage());\n/* */ } \n/* 472 */ return rta;\n/* */ }",
"public String actualizarValorRetencionListener()\r\n/* 564: */ {\r\n/* 565:599 */ DetalleFacturaProveedorSRI detalleFacturaProveedorSRI = (DetalleFacturaProveedorSRI)this.dtDetalleFacturaProveedorSRI.getRowData();\r\n/* 566:600 */ this.servicioFacturaProveedorSRI.actualizarValorRetencion(detalleFacturaProveedorSRI);\r\n/* 567:601 */ return \"\";\r\n/* 568: */ }",
"public void updateModeloPagoLaboratorio() throws Exception{\n ArrayList<Pago> pgAbono = PagoDB.listarPagosDePlanTratamientoLab(tratamientotoSelected.getIdPlanTratamiento());\n \n \n int m = this.columnasNombrePagoLab.length;\n ArrayList<Object []> objetos = new ArrayList<Object []>();\n String aux = this.costoAbono.getText();\n int total = Integer.parseInt(aux.substring(1, aux.length()));\n for(Pago pagAbn : pgAbono){\n\n String tipoPago = pagAbn.getTipoPago();\n String detalle = pagAbn.getDetalle();\n String fecha = girarFecha(pagAbn.getFecha());\n String valor = pagAbn.getAbono()+\"\";\n int numBoleta = pagAbn.getNumBoleta();\n total = total + pagAbn.getAbono();\n Object [] fila = new Object [] {new Item (tipoPago,pagAbn.getIdPago()), detalle, fecha, \"$\"+valor, numBoleta+\"\"};\n objetos.add(fila);\n \n }\n costoAbono.setText(\"$\"+total);\n int id = tratamientotoSelected.getIdPlanTratamiento();\n PlanTratamiento planTrat = PlanTratamientoDB.getPlanTratamiento(id);\n planTrat.setTotalAbonos(total);\n //calculando el porcentaje de abance\n int cosTotal=tratamientotoSelected.getCostoTotal();\n int avance= total*100/cosTotal;\n planTrat.setAvance(avance);\n \n PlanTratamientoDB.editarPlanTratamiento(planTrat);\n //System.out.println(\"total 1:\"+total+\"id:\"+id);\n \n this.filasPagoLab = new Object [objetos.size()][m];\n int i = 0;\n for(Object [] o : objetos){\n this.filasPagoLab[i] = o;\n i++;\n }\n \n this.modeloPagoLab = new DefaultTableModel(this.filasPagoLab, this.columnasNombrePagoLab) {\n Class[] types = new Class [] {\n String.class, Item.class, String.class, String.class, String.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n };\n \n this.tablaPagoLaboratorio.setModel(modeloPagoLab);\n \n this.iniciarTablaPlanesTratamientos();\n //habilitarBoton();\n }",
"public void getSetVersionRowPresuTipoProyectoWithConnection()throws Exception {\n\t\tif(presutipoproyecto.getIsChangedAuxiliar() && Constantes.ISSETVERSIONROWUPDATE) {\r\n\t\t \t//TEMPORAL\r\n\t\t\t//if((presutipoproyecto.getIsDeleted() || (presutipoproyecto.getIsChanged()&&!presutipoproyecto.getIsNew()))&& Constantes.ISSETVERSIONROWUPDATE) {\r\n\t\t\tTimestamp timestamp=null;\r\n\t\t\t\r\n\t\t\ttry {\t\r\n\t\t\t\tconnexion=connexion.getNewConnexion(this.connexionType,this.parameterDbType,this.entityManagerFactory);connexion.begin();\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\ttimestamp=presutipoproyectoDataAccess.getSetVersionRowPresuTipoProyecto(connexion,presutipoproyecto.getId());\r\n\t\t\t\t\r\n\t\t\t\tif(!presutipoproyecto.getVersionRow().equals(timestamp)) {\t\r\n\t\t\t\t\tpresutipoproyecto.setVersionRow(timestamp);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tconnexion.commit();\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tpresutipoproyecto.setIsChangedAuxiliar(false);\r\n\t\t\t\t\r\n\t\t\t} catch(Exception e) {\r\n\t\t\t\tconnexion.rollback();\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tthrow e;\r\n\t\t\t\t\r\n\t \t} finally {\r\n\t\t\t\tconnexion.close();\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void actualizarTablaPeriodos() {\n\t\tMap<Integer, Periodo> periodos = modelo\n\t\t\t\t.obtenerPeriodos(Integer.parseInt(jfad.cBCursosMod.getSelectedItem().toString()));\n\t\tDefaultTableModel dtm = new DefaultTableModel(new Object[][] {},\n\t\t\t\tnew String[] { \"Periodo\", \"Dia inicio\", \"Dia fin\", \"Hora inicio\", \"Hora_fin\", \"Habilitado\" });\n\n\t\tfor (Integer key : periodos.keySet()) {\n\n\t\t\tdtm.addRow(new Object[] { key, periodos.get(key).getDia_inicio(), periodos.get(key).getDia_fin(),\n\t\t\t\t\tperiodos.get(key).getHora_inicio(), periodos.get(key).getHora_fin(),\n\t\t\t\t\tperiodos.get(key).getHabilitado() });\n\t\t}\n\t\tjfad.tPeriodos.setModel(dtm);\n\t}",
"private void updateMemTableTomasulo() {\n\t\t// Get a copy of the memory stations\n\t\tMemStation[] temp_ms = MemReservationTomasulo;\n\n\t\t// Update the table with current values for the stations\n\t\tfor (int i = 0; i < temp_ms.length; i++) {\n\t\t\t// generate a meaningfull representation of busy\n\t\t\tString busy_desc = (temp_ms[i].isBusy() ? \"Yes\" : \"No\");\n\n\t\t\tMemoryModelTomasulo.setValueAt(temp_ms[i].getName(), i, 0);\n\t\t\tMemoryModelTomasulo.setValueAt(busy_desc, i, 1);\n\t\t\tMemoryModelTomasulo.setValueAt(temp_ms[i].getAddress(), i, 2);\n\t\t}\n\t}",
"Values() {\n initializeTable(INITIAL_SIZE);\n this.size = 0;\n this.tombstones = 0;\n }",
"@Override\r\n\tpublic void atualizar(Tipo tipo) {\n String sql = \"update tipos_servicos set nome = ? \"\r\n + \"where id = ?\";\r\n try {\r\n stmt = conn.prepareStatement(sql);\r\n \r\n stmt.setString(1, tipo.getNome());\r\n \r\n \r\n stmt.setInt(3, tipo.getId());\r\n \r\n stmt.executeUpdate();\r\n \r\n } catch (SQLException ex) {\r\n ex.printStackTrace();\r\n }\r\n\t}",
"private void verificarDatos(int fila) {\n try {\n colValidada = -1;\n\n float cantidad = 1;\n float descuento = 0;\n float precio = 1;\n float stock = 1;\n if (TblOrdenCompraDetalle.getValueAt(fila, oCLOrdenCompra.colCantidad) != null) {\n cantidad = Float.parseFloat(TblOrdenCompraDetalle.getValueAt(fila, oCLOrdenCompra.colCantidad).toString());\n }\n if (TblOrdenCompraDetalle.getValueAt(fila, oCLOrdenCompra.colPrecioConIGV) != null) {\n precio = Float.parseFloat(TblOrdenCompraDetalle.getValueAt(fila, oCLOrdenCompra.colPrecioConIGV).toString());\n }\n if (TblOrdenCompraDetalle.getValueAt(fila, oCLOrdenCompra.colDescuento) != null) {\n descuento = Float.parseFloat(TblOrdenCompraDetalle.getValueAt(fila, oCLOrdenCompra.colDescuento).toString());\n }\n\n if (precio < 0) {\n JOptionPane.showMessageDialog(this, \"el precio debe ser mayor a cero\");\n TblOrdenCompraDetalle.setValueAt(null, fila, oCLOrdenCompra.colPrecioConIGV);\n TblOrdenCompraDetalle.setValueAt(null, fila, oCLOrdenCompra.colImporSinDesc);\n TblOrdenCompraDetalle.setValueAt(null, fila, oCLOrdenCompra.colImporSinDescConIgv);\n colValidada = oCLOrdenCompra.colPrecioConIGV;\n return;\n }\n\n if (descuento > cantidad * precio) {\n JOptionPane.showMessageDialog(this, \"El descuento no puede ser mayor al Importe Bruto\");\n TblOrdenCompraDetalle.setValueAt(null, fila, oCLOrdenCompra.colDescuento);\n descuento = 0;\n TblOrdenCompraDetalle.setValueAt(CLRedondear.Redondear((cantidad * precio) - descuento, 2), fila, oCLOrdenCompra.colImporConDesc);//con\n oCLOrdenCompra.CalcularSubtotales();\n oCLOrdenCompra.calcularImportes();\n\n colValidada = oCLOrdenCompra.colDescuento;\n return;\n }\n\n if (descuento < 0) {\n JOptionPane.showMessageDialog(this, \"El descuento no puede ser menor a cero\");\n TblOrdenCompraDetalle.setValueAt(null, fila, oCLOrdenCompra.colDescuento);\n descuento = 0;\n TblOrdenCompraDetalle.setValueAt(CLRedondear.Redondear((cantidad * precio) - descuento, 2), fila, oCLOrdenCompra.colImporConDesc);//con\n colValidada = oCLOrdenCompra.colDescuento;\n return;\n }\n\n if (cantidad <= 0) {\n JOptionPane.showMessageDialog(this, \"La cantidad debe ser mayor a cero\");\n TblOrdenCompraDetalle.setValueAt(null, fila, oCLOrdenCompra.colCantidad);\n colValidada = oCLOrdenCompra.colCantidad;\n return;\n }\n /* if(precio<=0)\n {\n JOptionPane.showMessageDialog(null,\"El precio tiene q ser mayor a cero\");\n colValidada=oCLOrdenCompra.colPrecio;\n return;\n }*/\n if (TblOrdenCompraDetalle.getValueAt(fila, oCLOrdenCompra.colStock) != null) {\n stock = Float.parseFloat(TblOrdenCompraDetalle.getValueAt(fila, oCLOrdenCompra.colStock).toString());\n }\n if (cantidad > stock) {\n /* JOptionPane.showMessageDialog(null,\"La cantidad no debe ser mayor al stock disponible\");\n TblOrdenCompraDetalle.setValueAt(null, fila,oCLOrdenCompra.colCantidad);\n colValidada=oCLOrdenCompra.colCantidad;\n return;*/\n }\n\n int col = TblOrdenCompraDetalle.getSelectedColumn();\n if (!eventoGuardar) {\n if (col == oCLOrdenCompra.colCantidad) {\n oCLOrdenCompra.calcularPrecio(fila);\n }\n }\n\n } catch (Exception e) {\n cont++;\n System.out.println(\"dlgGestionOrdenCompra-metodo Verificar datos: \"+e);\n }\n }",
"@Override\r\n public boolean ActualizarDatosCliente() {\r\n try {\r\n puente.executeUpdate(\"UPDATE `cliente` SET `Nombre` = '\"+Nombre+\"', `Apellido` = '\"+Apellido+\"', `Telefono` = '\"+Telefono+\"', `Fecha_Nacimiento` = '\"+Fecha_Nacimiento+\"', `Email` = '\"+Email+\"', `Direccion` = '\"+Direccion+\"', `Ciudad` = '\"+Ciudad+\"' WHERE `cliente`.`Cedula` = '\"+Cedula+\"';\");\r\n listo = true;\r\n } catch (Exception e) {\r\n Logger.getLogger(DaoCliente.class.getName()).log(Level.SEVERE, null, e);\r\n }\r\n return listo;\r\n }",
"private void refreshTable() {\n data = getTableData();\n updateTable();\n }",
"public void actualizarActividad (Actividad act) {\r\n String query = \"UPDATE actividad SET identificacion_navegate = \\\"\" + act.getIdentificacionNavegante() \r\n + \"\\\", numero_matricula = \\\"\" + act.getNumeroMatricula() \r\n + \"\\\", fecha = \\\"\" + act.getFecha() \r\n + \"\\\", hora = \\\"\" + act.getHora() \r\n + \"\\\", destino = \\\"\" + act.getDestino() \r\n + \"\\\" WHERE id_salida = \\\"\" + act.getIdentificacionSalida() + \"\\\"\";\r\n try {\r\n Statement st = con.createStatement();\r\n st.executeUpdate(query);\r\n st.close();\r\n JOptionPane.showMessageDialog(null, \"Actividad actualizada\", \"Operación exitosa\", JOptionPane.INFORMATION_MESSAGE);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(PActividad.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }",
"public void updateTable() throws SQLException {\n //query for retrieving all records\n String query1=\"Select * from savingstable\";\n\n //fetching results\n PreparedStatement query=connObj.prepareStatement(query1, ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);\n\n ResultSet rs=query.executeQuery();\n\n DefaultTableModel df=(DefaultTableModel) recordTable.getModel();\n\n rs.last();\n\n int q=rs.getRow();\n\n rs.beforeFirst();\n\n String[][] array=new String[0][];\n if(q>0){\n array=new String[q][5];\n }\n\n int i=0;\n\n //getting the values from database\n while(rs.next()){\n array[i][0]=rs.getString(\"custno\");\n array[i][1]=rs.getString(\"custname\");\n array[i][2]=rs.getString(\"cdep\");\n array[i][3]=rs.getString(\"nyears\");\n array[i][4]=rs.getString(\"savtype\");\n ++i;\n\n }\n\n //updating the jtable\n String[] cols={\"Number\",\"Name\",\"Deposit\",\"Years\",\"Type of Savings\"};\n DefaultTableModel model = new DefaultTableModel(array,cols);\n recordTable.setModel(model);\n\n recordTable.setDefaultEditor(Object.class, null);\n\n\n }",
"private void refreshTableForUpdate()\n {\n //Was updating the values but don't believe this is necessary, as like budget items\n //a loss amount will stay the same unless changed by the user (later on it might be the\n //case that it can increase/decrease by a percentage but not now...)\n /*\n BadBudgetData bbd = ((BadBudgetApplication) this.getApplication()).getBadBudgetUserData();\n for (MoneyLoss loss : bbd.getLosses())\n {\n TextView valueView = valueViews.get(loss.expenseDescription());\n valueView.setText(BadBudgetApplication.roundedDoubleBB(loss.lossAmount()));\n }\n */\n }",
"public void actualizar(Especialiadad espe,JTextField txtcodigo){\r\n\t\r\n\t\t\tConnection con = null;\r\n\t\t\tStatement stmt=null;\r\n\t\t\tint result=0;\r\n\t\t\t//stmt=con.prepareStatement(\"UPDATE Especialiadad \"\r\n\t\t\t//\t\t+ \"SET Nombre =? )\"\r\n\t\t\t\t//\t+ \"WHERE Codigo = \r\n\t\t\t\r\n try\r\n {\r\n \tcon = ConexionBD.getConnection();\r\n \t stmt = con.createStatement();\r\n \t\t // result = stmt.executeUpdate();\r\n\r\n } catch (Exception e) {\r\n \t\t e.printStackTrace();\r\n \t\t} finally {\r\n \t\t\tConexionBD.close(con);\r\n \t\t}\r\n\t\r\n\t}",
"public int save() {\n\t\tint result = 0;\n\n\t\ttry {\n\t\t\tmanager = Connection.connectToMysql();\n\n\t\t\tif (this.id > 0) {\n\t\t\t\t// UPDATE\n\t\t\t\tmanager.getTransaction().begin();\n\t\t\t\tresult=manager.createNativeQuery(\"UPDATE Cancion SET nombre = ?, duracion = ?, id_disco = ? WHERE id = ?\")\n\t\t\t\t\t\t.setParameter(1, this.nombre)\n\t\t\t\t\t\t.setParameter(2, this.duracion)\n\t\t\t\t\t\t.setParameter(3, this.disco_contenedor.id)\n\t\t\t\t\t\t.setParameter(4, this.id)\n\t\t\t\t\t\t.executeUpdate();\n\t\t\t\tmanager.getTransaction().commit();\n\t\t\t} else {\n\t\t\t\t// INSERT\n\t\t\t\tmanager.getTransaction().begin();\n\t\t\t\tresult=manager.createNativeQuery(\"INSERT INTO Cancion (nombre,duracion,id_disco) VALUES (?,?,?)\")\n\t\t\t\t\t\t.setParameter(1, this.nombre)\n\t\t\t\t\t\t.setParameter(2, this.duracion)\n\t\t\t\t\t\t.setParameter(3, this.disco_contenedor.id)\n\t\t\t\t\t\t.executeUpdate();\n\t\t\t\tmanager.getTransaction().commit();\n\t\t\t}\n\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(ex);\n\t\t}\n\n\t\treturn result;\n\t}",
"public void getSetVersionRowPlantillaFacturaWithConnection()throws Exception {\n\t\tif(plantillafactura.getIsChangedAuxiliar() && Constantes.ISSETVERSIONROWUPDATE) {\r\n\t\t \t//TEMPORAL\r\n\t\t\t//if((plantillafactura.getIsDeleted() || (plantillafactura.getIsChanged()&&!plantillafactura.getIsNew()))&& Constantes.ISSETVERSIONROWUPDATE) {\r\n\t\t\tTimestamp timestamp=null;\r\n\t\t\t\r\n\t\t\ttry {\t\r\n\t\t\t\tconnexion=connexion.getNewConnexion(this.connexionType,this.parameterDbType,this.entityManagerFactory);connexion.begin();\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\ttimestamp=plantillafacturaDataAccess.getSetVersionRowPlantillaFactura(connexion,plantillafactura.getId());\r\n\t\t\t\t\r\n\t\t\t\tif(!plantillafactura.getVersionRow().equals(timestamp)) {\t\r\n\t\t\t\t\tplantillafactura.setVersionRow(timestamp);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tconnexion.commit();\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tplantillafactura.setIsChangedAuxiliar(false);\r\n\t\t\t\t\r\n\t\t\t} catch(Exception e) {\r\n\t\t\t\tconnexion.rollback();\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tthrow e;\r\n\t\t\t\t\r\n\t \t} finally {\r\n\t\t\t\tconnexion.close();\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void setValuesJTableResultados(){\n int alternativas = views.useController().getProblema().getAlternativas();\n TableModelPersonalizado modelo = new TableModelPersonalizado(alternativas, 1);\n jTableVectorResultados.setModel(modelo);\n jTableVectorResultados.setEnabled(false);\n jTableVectorResultados.getTableHeader().setResizingAllowed(false);\n jTableVectorResultados.getTableHeader().setReorderingAllowed(false);\n //HEADERS DE LA TABLA\n jTableVectorResultados.getColumnModel().getColumn(0).setHeaderValue(\" \"); \n //CONTENIDO DE LA TABLA\n for(int f = 0; f < alternativas; f++){\n modelo.setValueAt(df.format(views.useController().getProblema().getResult().getPriorityVector().get(f, 0)), f, 0);\n } \n }",
"public int MostrarUltimoValorIngresado() {\r\n return UltimoValorIngresado.informacion;\r\n }",
"public void atualizarTabelaFunc() throws SQLException {\n DefaultTableModel model = (DefaultTableModel) tabelaFunc.getModel();\n model.setNumRows(0);\n dadosDAO dados = new dadosDAO();\n String pesquisa = funcField.getText().toUpperCase();\n for (funcionario func : dados.readFuncionarios()){\n if (!funcField.getText().equals(\"\")){\n if (nomeBtnFunc.isSelected()){\n if (func.getNome().contains(pesquisa)){\n model.addRow(new Object[]{\n func.getId_func(),\n nomeProprio(func.getNome()),\n func.getCpf(),\n func.getDt_nascimento(),\n func.getSexo(),\n func.getTelfix(),\n func.getRamal(),\n func.getTelcel(),\n func.getCep(),\n func.getCargo(),\n func.getTurno(),\n func.getSalario()\n });\n }\n } else if (cpfBtnFunc.isSelected()){\n if (funcField.getText().equals(func.getCpf())) {\n model.addRow(new Object[]{\n func.getId_func(),\n nomeProprio(func.getNome()),\n func.getCpf(),\n func.getDt_nascimento(),\n func.getSexo(),\n func.getTelfix(),\n func.getRamal(),\n func.getTelcel(),\n func.getCep(),\n func.getCargo(),\n func.getTurno(),\n func.getSalario()\n });\n }\n } else {\n if (funcField.getText().equals(String.valueOf(func.getId_func()))){\n model.addRow(new Object[]{\n func.getId_func(),\n nomeProprio(func.getNome()),\n func.getCpf(),\n func.getDt_nascimento(),\n func.getSexo(),\n func.getTelfix(),\n func.getRamal(),\n func.getTelcel(),\n func.getCep(),\n func.getCargo(),\n func.getTurno(),\n func.getSalario()\n });\n }\n }\n } else {\n model.addRow(new Object[]{\n func.getId_func(),\n nomeProprio(func.getNome()),\n func.getCpf(),\n func.getDt_nascimento(),\n func.getSexo(),\n func.getTelfix(),\n func.getRamal(),\n func.getTelcel(),\n func.getCep(),\n func.getCargo(),\n func.getTurno(),\n func.getSalario()\n });\n }\n }\n }",
"@Override\n public void actualizarPorEstadoYFechaMax(FecetProrrogaOrden prorroga, AgaceOrden orden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_UPDATE).append(getTableName());\n query.append(\" SET ID_ESTATUS = ? WHERE FECHA_CARGA = (SELECT MAX(FECHA_CARGA) FROM FECET_PRORROGA_ORDEN \");\n query.append(\" WHERE ID_ORDEN = ?)\");\n\n getJdbcTemplateBase().update(query.toString(), prorroga.getIdEstatus(), orden.getIdOrden());\n\n }",
"private void establecerTablaPlatillos() {\n Object[] columnas = {\"Platillo\", \"Cantidad\", \"Costo\"};\n Object[][] modelo = new Object[platillosAVender.size()][3];\n int x = 0;\n\n for (VentaPlatillo ventaPlatillo : platillosAVender) {\n\n modelo[x][0] = ventaPlatillo.getPlatillo().getNombre();\n modelo[x][1] = ventaPlatillo.getCantidad();\n modelo[x][2] = ventaPlatillo.getCosto();\n x++;\n }\n // Se establece el modelo en la tabla con los datos\n tablaPlatillosAVender.setDefaultEditor(Object.class, null);\n tablaPlatillosAVender.setModel(new DefaultTableModel(modelo, columnas));\n tablaPlatillosAVender.setCellSelectionEnabled(false);\n tablaPlatillosAVender.setRowSelectionAllowed(false);\n txtTotal.setText(total + \"\");\n }",
"@Override\r\n\t@Transactional\r\n\tpublic Integer restaPrestadoEventual() {\n\t\treturn dao.restaPrestadoEventual();\r\n\t}",
"@Override\r\n\tpublic String update(FicheColisageValue ficheColisageValue) {\n\t\tLong nombrePaquet = ZERO_L;\r\n\t\tLong quantiteEclate = ZERO_L;\r\n\t\t\r\n\t\tif(ficheColisageValue.getListColis() != null){\r\n\t\t\t\r\n\t\t\tif (ficheColisageValue.getColPalette() != null && ficheColisageValue.getColPalette() == true)\r\n\t\t\t{\r\n\t\t\t\tRechercheMulticritereBonSortieFiniValue request;\r\n\t\t\t for (ColisValue cv:ficheColisageValue.getListColis())\r\n\t\t\t {\r\n\t\t\t \tif (cv.getOrdrePalette() != null && cv.getOrdrePalette().equals(\"\")) cv.setOrdrePalette(null);\r\n\t\t\t \t\t\r\n\t\t\t \tif (cv.getRefPalette() != null)\r\n\t\t\t \t{\r\n\t\t\t \t\tif (!cv.getRefPalette().equals(\"\"))\r\n\t\t\t \t\t{\r\n\t\t\t \t\t\trequest= new RechercheMulticritereBonSortieFiniValue();\r\n\t\t\t\t \t\trequest.setReferenceBon(cv.getRefPalette());\r\n\t\t\t\t \t\tResultatRechecheBonSortieFiniValue res = bonSortieFiniDomain.rechercherMultiCritere(request);\r\n\t\t\t\t \t\t\r\n\t\t\t\t \t\tif (res != null) \r\n\t\t\t\t \t\t{\r\n\t\t\t\t \t\t\tif (res.getNombreResultaRechercher() > 0)\r\n\t\t\t\t \t\t\t{\r\n\t\t\t\t \t\t\t\tcv.setBonSortie(res.getList().iterator().next().getId());\r\n\t\t\t\t \t\t\t}\r\n\t\t\t\t \t\t}\r\n\t\t\t \t\t}\r\n\t\t\t \t\telse \r\n\t\t\t \t\t{\r\n\t\t\t \t\t\tcv.setBonSortie(null);\r\n\t\t\t \t\t\tcv.setOrdrePalette(null);\r\n\t\t\t \t\t\tcv.setFictif(null);\r\n\t\t\t \t\t}\r\n\t\t\t \r\n\t\t\t \t}\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tnombrePaquet = Long.valueOf(ficheColisageValue.getListColis().size());\r\n\t\t\t\r\n\t\t\tfor(ColisValue element : ficheColisageValue.getListColis()){\r\n\t\t\t\t\r\n\t\t\t\tquantiteEclate = quantiteEclate + ((element.getQuantite() != null) ? element.getQuantite() : ZERO_L);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tficheColisageValue.setQuantiteColis(quantiteEclate);\r\n\t\t\tficheColisageValue.setNombreColis(nombrePaquet);\r\n\t\t\r\n\t\t\r\n\t\t\tif(ficheColisageValue.getOrdreFabricationNumero()!=null){\r\n\t\t\t\tOrdreFabricationValue ordreFabrication =ordreFabricationPersistence.getByNumero(ficheColisageValue.getOrdreFabricationNumero());\r\n\t\t\t \r\n\t\t\t\tif(ordreFabrication!=null){\r\n\t\t\t\t\t\r\n\t\t\t\t\tficheColisageValue.setOrdreFabricationId(ordreFabrication.getId());\r\n\t\t\t\t\t////System.out.println(\"/***********ordreFabrication.getQtColisage() : \"+ordreFabrication.getQtColisage());\r\n\t\t\t\t\t////System.out.println(\"/*//////////////////////ficheColisageValue.getQuantiteColisBefore() : \"+ficheColisageValue.getQuantiteColisBefore());\r\n\t\t\t\t//\t//System.out.println(\"/*//////////////ficheColisageValue.getQuantiteColis() : \"+ficheColisageValue.getQuantiteColis());\r\n\t\t\t\t\t\r\n\t\t\t\tordreFabrication.setQtColisage(ordreFabrication.getQtColisage()-ficheColisageValue.getQuantiteColisBefore()+ficheColisageValue.getQuantiteColis());\r\n\t\t\t//\tordreFabrication.setSolder(ficheColisageValue.getSolder());\r\n\t\t\t\t ordreFabricationPersistence.modifierOrdreFabrication(ordreFabrication);\r\n\t\t\t\t \r\n\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t/*\tLong quantiteTotale = ZERO_L;\r\n\t\t\r\n\t\tif(ficheColisageValue.getListDetails()!=null){\r\n\t\t\t\r\n\t\t\tfor (DetailsColisageValue det:ficheColisageValue.getListDetails()){\r\n\t\t\t\tquantiteTotale+=det.getQuantite();\r\n\t\t\t}\r\n\t\t\tficheColisageValue.setQuantiteTotale(quantiteTotale);\r\n\t\t} */\r\n\t\t\r\n\t}\r\n\t\tPartieInteresseValue partieInteresseValue=partieInteressePersistance.recherchePartieInteresseeParId(ficheColisageValue.getClientId());\r\n\t\tficheColisageValue.setClientAbreviation(partieInteresseValue.getAbreviation());\r\n ficheColisageValue.setClientReference(partieInteresseValue.getReference());\t\r\n\t\t\r\n\t\treturn ficheColisagePersistance.update(ficheColisageValue);\r\n\t}",
"public void getSetVersionRowCajaWithConnection()throws Exception {\n\t\tif(caja.getIsChangedAuxiliar() && Constantes.ISSETVERSIONROWUPDATE) {\r\n\t\t \t//TEMPORAL\r\n\t\t\t//if((caja.getIsDeleted() || (caja.getIsChanged()&&!caja.getIsNew()))&& Constantes.ISSETVERSIONROWUPDATE) {\r\n\t\t\tTimestamp timestamp=null;\r\n\t\t\t\r\n\t\t\ttry {\t\r\n\t\t\t\tconnexion=connexion.getNewConnexion(this.connexionType,this.parameterDbType,this.entityManagerFactory);connexion.begin();\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\ttimestamp=cajaDataAccess.getSetVersionRowCaja(connexion,caja.getId());\r\n\t\t\t\t\r\n\t\t\t\tif(!caja.getVersionRow().equals(timestamp)) {\t\r\n\t\t\t\t\tcaja.setVersionRow(timestamp);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tconnexion.commit();\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tcaja.setIsChangedAuxiliar(false);\r\n\t\t\t\t\r\n\t\t\t} catch(Exception e) {\r\n\t\t\t\tconnexion.rollback();\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tthrow e;\r\n\t\t\t\t\r\n\t \t} finally {\r\n\t\t\t\tconnexion.close();\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static void updateActividadUsuario(Actividad a) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n int diaInicio, mesInicio, anoInicio, diaFin, mesFin, anoFin;\n //int[] fechaInicio = getFechaInt(a.getFechaInicio());\n diaInicio = Integer.valueOf(a.getFechaInicio().substring(8));\n mesInicio = Integer.valueOf(a.getFechaInicio().substring(5,7));\n anoInicio = Integer.valueOf(a.getFechaInicio().substring(0,4));\n // int[] fechaFin = getFechaInt(a.getFechaFin());\n diaFin = Integer.valueOf(a.getFechaFin().substring(8));\n mesFin = Integer.valueOf(a.getFechaFin().substring(5,7));\n anoFin = Integer.valueOf(a.getFechaFin().substring(0,4));\n String query = \"UPDATE Actividades SET login=?, descripcion=?, rol=?, duracionEstimada=?, diaInicio=?, mesInicio=?, anoInicio=?, diaFin=?, mesFin=?, anoFin=?, duracionReal=?, estado=?, idFase=? WHERE id=?\";\n try {\n ps = connection.prepareStatement(query);\n ps.setString(1, a.getLogin());\n ps.setString(2, a.getDescripcion());\n ps.setString(3, a.getRolNecesario());\n ps.setInt(4, a.getDuracionEstimada());\n ps.setInt(5, diaInicio);\n ps.setInt(6, mesInicio);\n ps.setInt(7, anoInicio);\n ps.setInt(8, diaFin);\n ps.setInt(9, mesFin);\n ps.setInt(10, anoFin);\n ps.setInt(11, a.getDuracionReal());\n ps.setString(12, String.valueOf(a.getEstado()));\n ps.setInt(13, a.getIdFase());\n ps.setInt(14, a.getIdentificador());\n ps.executeUpdate();\n ps.close();\n pool.freeConnection(connection);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"private void initValues() {\n this.closeConnection();\n this.agregarRol = false;\n rutRoles = null; rutRoles = new Vector(); rutRoles.clear();\n deudasContribuyente = null; deudasContribuyente = new Vector(); deudasContribuyente.clear();\n rutRolesConsultados = null; rutRolesConsultados = new HashMap(); rutRolesConsultados.clear();\n param = null; param = new HashMap(); param.clear();\n\n demandasContribuyente = null; demandasContribuyente = new Vector(); demandasContribuyente.clear();\n demandaSeleccionada=null; demandaSeleccionada= new Long(-1);\n\n\n this.conveniosMasivo = null;\n\n porcentajeCuotaContado = null; porcentajeCuotaContado = new Long(0);\n porcentajeCondonacion = null; porcentajeCondonacion = new Long(0);\n pagoContado = null; pagoContado = new Long(0);\n numeroCuotas = null; numeroCuotas = new Long(0);\n totalPagar = null; totalPagar = new Long(0);\n totalPagarConCondonacion = null; totalPagarConCondonacion = new Long(0);\n arregloDeudas=\"\";\n tipoPago=1;\n estadoCobranza=\"T\";\n codigoPropuesta = new Long(0);\n codigoFuncionario = new Long(0);\n idTesoreria = new Long(0);\n liquidada = false;\n }",
"@Override\n\tpublic void salvar() {\n\t\t\n\t\tPedidoCompra PedidoCompra = new PedidoCompra();\n\t\t\n\t\tPedidoCompra.setAtivo(true);\n//\t\tPedidoCompra.setNome(nome.getText());\n\t\tPedidoCompra.setStatus(StatusPedido.valueOf(status.getSelectionModel().getSelectedItem().name()));\n//\t\tPedidoCompra.setSaldoinicial(\"0.00\");\n\t\t\n\t\tPedidoCompra.setData(new Date());\n\t\tPedidoCompra.setIspago(false);\n\t\tPedidoCompra.setData_criacao(new Date());\n\t\tPedidoCompra.setFornecedor(cbfornecedores.getSelectionModel().getSelectedItem());\n\t\tPedidoCompra.setTotal(PedidoCompra.CalcularTotal(PedidoCompra.getItems()));\n\t\tPedidoCompra.setTotalpago(PedidoCompra.CalculaTotalPago(PedidoCompra.getFormas()));\n\t\t\n\t\tgetservice().save(PedidoCompra);\n\t\tsaveAlert(PedidoCompra);\n\t\tclearFields();\n\t\tdesligarLuz();\n\t\tloadEntityDetails();\n\t\tatualizar.setDisable(true);\n\t\tsalvar.setDisable(false);\n\t\t\n\t\tsuper.salvar();\n\t}",
"public void atualizarTabela() {\n\t\tJTAlocar.setModel(modelAlocar = new TableModelAlocar(ManipulacaoXml.getInstace().todasAlocacoes()));\n\t}",
"public void actualizarValor() {\n\t\tif (valor!=null && valor < getCantElementos()-1){\n\t\t\tvalor++;\n\t\t}\n\t\telse {\n\t\t\tvalor = 0;\n\t\t}\t\t\n\t}",
"public void encerraServico(Servico servico) throws SQLException {\r\n\r\n servico.setStatus(0);\r\n servico.setDtEncerramento(LocalDateTime.now().format(DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss\")));\r\n\r\n System.out.println(servico.toString());\r\n update(servico);\r\n String sql = \"UPDATE solicitacoes SET em_chamado=4 WHERE servico_id_servico= \" + servico.getCell(0).getValue();\r\n\r\n stmt = conn.createStatement();\r\n stmt.execute(sql);\r\n stmt.close();\r\n\r\n }",
"@Override\n public void actualizarPropiedad(Propiedad nuevaPropiedad) {\n int numFinca = nuevaPropiedad.getNumFinca();\n String modalidad = nuevaPropiedad.getModalidad();\n double area = nuevaPropiedad.getAreaTerreno();\n double metro = nuevaPropiedad.getValorMetroCuadrado();\n double fiscal = nuevaPropiedad.getValorFiscal();\n String provincia = nuevaPropiedad.getProvincia();\n String canton = nuevaPropiedad.getCanton();\n String distrito = nuevaPropiedad.getDistrito();\n String dirExacta = nuevaPropiedad.getDirExacta();\n String estado = nuevaPropiedad.getEstado();\n String tipo = nuevaPropiedad.getTipo();\n System.out.println(nuevaPropiedad.getFotografias().size());\n double precio = nuevaPropiedad.getPrecio();\n try {\n bdPropiedad.manipulationQuery(\"UPDATE PROPIEDAD SET MODALIDAD = '\" + modalidad + \"', AREA_TERRENO \"\n + \"= \" + area + \", VALOR_METRO = \" + metro + \", VALOR_FISCAL = \"+ fiscal + \", PROVINCIA = '\" \n + provincia + \"', CANTON = '\" + canton + \"' , DISTRITO = '\" + distrito + \"', DIREXACTA = '\" \n + dirExacta + \"', ESTADO = '\" + estado + \"', PRECIO = \" + precio + \" WHERE ID_PROPIEDAD = \" \n + numFinca);\n bdPropiedad.manipulationQuery(\"DELETE FROM FOTOGRAFIA_PROPIEDAD WHERE ID_PROPIEDAD = \" + numFinca);\n bdPropiedad.insertarFotografias(nuevaPropiedad);\n } catch (SQLException ex) {\n Logger.getLogger(Propiedad.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"private void mostraResultado() {\n int linha = jTableResultados.getSelectedRow();\n if (linha >= 0) {\n int a = new Integer(\"\" + jTableResultados.getValueAt(linha, 0));\n double c0 = Double.parseDouble(\"\" + jTableResultados.getValueAt(linha, 1));\n double c1 = Double.parseDouble(\"\" + jTableResultados.getValueAt(linha, 2));\n telaSemivariograma.getJTextFieldAlcance().setText(\"\" + a);\n telaSemivariograma.getJTextFieldEfeitoPepita().setText(\"\" + c0);\n telaSemivariograma.getJTextFieldContribuicao().setText(\"\" + c1);\n telaSemivariograma.getJSliderAlcance().setValue(a);\n telaSemivariograma.getJSliderEfeitoPepita().setValue((int) (c0 * 10000));\n telaSemivariograma.getJSliderContribuicao().setValue((int) (c1 * 10000));\n if (telaSemivariograma.isVisible()) {\n telaSemivariograma.setVisible(false);\n }\n telaSemivariograma.setVisible(true);\n }\n }",
"public CensoSeccionE() {\n this.columnName1=\"\";\n this.columnName2=\"\";\n this.Total_institu=0;\n this.Total_severo=0;\n }",
"public void mudaStatus(String e) throws SQLException {\r\n String sql = \"UPDATE solicitacoes SET em_chamado=2 WHERE id_solicitacao= \" + e;\r\n System.err.println(\"MUDASTATUS: \" + sql);\r\n stmt.executeUpdate(sql);\r\n stmt.close();\r\n rs.close();\r\n }",
"public void setCodigo() throws SQLException {\n try (PreparedStatement query = Herramientas.getConexion().prepareStatement(\"SELECT MAX(codigo_ticket) FROM ticket\"); \n ResultSet resultado = query.executeQuery()) {\n resultado.next();\n this.codigo = (resultado.getInt(1))+1;\n }\n \n }",
"public int obtenerDatos() {\n codigo =Integer.parseInt(modelo.getValueAt(fila,0).toString());\n return codigo;\n }",
"void LlenarModelo(){\n datos.addColumn(\"ID\");\n datos.addColumn(\"Descripcion\");\n datos.addColumn(\"Cantidad\");\n String []ingresar=new String[4];\n try {\n Connection con = Conexion.getConection();\n Statement estado = con.createStatement();\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo>=\" + SIGEPSA.IDOtrosPagosMin + \";\");\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago ;\");\n ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo<9 or codigo>10 and activo = 1;\");\n while(resultado.next()){\n ingresar[0]=String.valueOf((String)resultado.getObject(\"CODIGO\").toString());\n ingresar[1]=String.valueOf((String)resultado.getObject(\"DESCRIPCION\").toString());\n ingresar[2]=String.valueOf((String)resultado.getObject(\"CANTIDAD\").toString());\n datos.addRow(ingresar);\n }\n }catch (Exception ex) {\n \n }\n }",
"private void addLastValueToTable(){\n\t\t//System.out.println(theModelColumn.size()-1);\n\t\tsetValueAt(theModelColumn.get(theModelColumn.size()-1).getX(), theModelColumn.size()-1, 0);\n\t\tsetValueAt(theModelColumn.get(theModelColumn.size()-1).getY(), theModelColumn.size()-1, 1);\n\t\tsetValueAt(theModelColumn.get(theModelColumn.size()-1).getWidth(), theModelColumn.size()-1, 2);\n\t\tsetValueAt(theModelColumn.get(theModelColumn.size()-1).getHeight(), theModelColumn.size()-1, 3);\n\t}",
"public void clicTable(View v) {\n try {\n conteoTab ct = clc.get(tb.getIdTabla() - 1);\n\n if(ct.getEstado().equals(\"0\")) {\n String variedad = ct.getVariedad();\n String bloque = ct.getBloque();\n Long idSiembra = ct.getIdSiembra();\n String idSiempar = String.valueOf(idSiembra);\n\n long idReg = ct.getIdConteo();\n int cuadro = ct.getCuadro();\n int conteo1 = ct.getConteo1();\n int conteo4 = ct.getConteo4();\n int total = ct.getTotal();\n\n txtidReg.setText(\"idReg:\" + idReg);\n txtCuadro.setText(\"Cuadro: \" + cuadro);\n cap_1.setText(String.valueOf(conteo1));\n cap_2.setText(String.valueOf(conteo4));\n cap_ct.setText(String.valueOf(total));\n txtId.setText(\"Siembra: \" + idSiempar);\n txtVariedad.setText(\"Variedad: \" + variedad);\n txtBloque.setText(\"Bloque: \" + bloque);\n }else{\n Toast.makeText(this, \"No se puede cargar el registro por que ya ha sido enviado\", Toast.LENGTH_SHORT).show();\n }\n\n } catch (Exception E) {\n Toast.makeText(getApplicationContext(), \"No has seleccionado aún una fila \\n\" + E, Toast.LENGTH_LONG).show();\n }\n }",
"public boolean actualizar(){\n conexion=base.GetConnection();\n if(conexion!=null){\n try{\n String peticion= \"update usuarios set Cedula=? ,Nombres=? ,Sexo=? ,Edad=? ,Direccion=? ,Ciudad=? ,Contrasena=? ,Estrato=? ,Rol=? where Cedula='\";\n PreparedStatement actualizar= conexion.prepareStatement(peticion+this.Cedula+\"'\");\n actualizar.setString(1,this.Cedula);\n actualizar.setString(2,this.Nombres);\n actualizar.setString(3,this.Sexo);\n actualizar.setInt(4,this.Edad);\n actualizar.setString(5,this.Direccion);\n actualizar.setString(6,this.Ciudad);\n actualizar.setString(7,this.Contrasena);\n actualizar.setInt(8,this.Estrato);\n actualizar.setString(9,this.Rol);\n actualizar.executeUpdate();\n conexion.close();\n JOptionPane.showMessageDialog(null,\"Usuario Actualizado\",\"Éxito al actualizar\",1);\n return true;\n }\n catch(SQLException ex){\n JOptionPane.showMessageDialog(null,\"Error al actualizar: \"+ex.getMessage(),\"error\",1);\n return false;\n }}\n else{\n JOptionPane.showMessageDialog(null,\"error al conectar\",\"error\",1);\n return false;\n }\n}",
"private void quitarChksAutorizacion(int Row, int Column){\n try{\n if(Column==INT_TBL_DAT_CHK_AUTORIZAR){\n objTblMod.setValueAt(true, Row, INT_TBL_DAT_CHK_AUTORIZAR); \n \n objTblMod.setValueAt(false, Row, INT_TBL_DAT_CHK_PENDIENTE); \n objTblMod.setValueAt(false, Row, INT_TBL_DAT_CHK_DENEGAR); \n }\n if(Column==INT_TBL_DAT_CHK_DENEGAR){\n objTblMod.setValueAt(true, Row, INT_TBL_DAT_CHK_DENEGAR); \n \n objTblMod.setValueAt(false, Row, INT_TBL_DAT_CHK_AUTORIZAR); \n objTblMod.setValueAt(false, Row, INT_TBL_DAT_CHK_PENDIENTE); \n objTblMod.setValueAt(false, Row, INT_TBL_DAT_CHK_AUT_ENV_PED); \n }\n }\n catch(Exception Evt){ \n objUti.mostrarMsgErr_F1(null, Evt); \n }\n \n }",
"protected void setTableValue(Object val)\n\t\t{\n\t\t\tValue = val ;\n\t\t}",
"public void reversarComprobante() {\r\n if (tab_tabla1.getTotalFilas() > 0) {\r\n String ide_cnccc_anular = tab_tabla1.getValor(\"ide_cnccc\");\r\n // realizo el asiento de reversa\r\n con.reversar(ide_cnccc_anular, \"Asiento de reversa de la transaccion num: \" + ide_cnccc_anular, con);\r\n String ide_cnccc_nuevo = con.getTab_cabecera().getValor(\"ide_cnccc\");\r\n if (ide_cnccc_nuevo != null && !ide_cnccc_nuevo.isEmpty()) {\r\n // cambio el estado de libro bancos a anulado\r\n utilitario.getConexion().agregarSqlPantalla(\"update tes_cab_libr_banc set ide_teelb=1 where ide_cnccc=\" + ide_cnccc_anular);\r\n // consulto si tiene Documentos por Pagar\r\n TablaGenerica tab_cxp_cab_fact = utilitario.consultar(\"select * from cxp_cabece_factur where ide_cnccc=\" + ide_cnccc_anular);\r\n if (tab_cxp_cab_fact.getTotalFilas() > 0) {\r\n // cambio elestado a anulado de la factura\r\n utilitario.getConexion().agregarSqlPantalla(\"update cxp_cabece_factur set ide_cpefa=1 where ide_cnccc=\" + ide_cnccc_anular);\r\n cls_cuentas_x_pagar cxp = new cls_cuentas_x_pagar();\r\n // reverso la transaccion CxP\r\n cxp.reversar(ide_cnccc_nuevo, tab_cxp_cab_fact.getValor(0, \"ide_cpcfa\"), \"Reversa CxP de fact. num:\" + tab_cxp_cab_fact.getValor(0, \"numero_cpcfa\") + \" y asiento num:\" + ide_cnccc_anular, null);\r\n // hago reversa de inventario\r\n TablaGenerica tab_inv_cab_inv = utilitario.consultar(\"select * from inv_cab_comp_inve where ide_cnccc=\" + ide_cnccc_anular);\r\n if (tab_inv_cab_inv.getTotalFilas() > 0) {\r\n cls_inventario inv = new cls_inventario();\r\n inv.reversar_menos(ide_cnccc_nuevo, tab_inv_cab_inv.getValor(0, \"ide_cnccc\"), \"Reversa de comprobante num:\" + ide_cnccc_anular);\r\n }\r\n }\r\n\r\n boolean boo_asiento_costos = false;\r\n String ide_asiento_costos = \"-1\";\r\n // consulto si tiene CXC\r\n\r\n TablaGenerica tab_cxc_cab_fact = utilitario.consultar(\"select * from cxc_cabece_factura where ide_cnccc=\" + ide_cnccc_anular);\r\n if (tab_cxc_cab_fact.getTotalFilas() > 0) {\r\n // cambio elestado a anulado de la factura cxc si tiene\r\n utilitario.getConexion().agregarSqlPantalla(\"update cxc_cabece_factura set ide_ccefa=1 where ide_cnccc=\" + ide_cnccc_anular);\r\n cls_cuentas_x_cobrar cxc = new cls_cuentas_x_cobrar();\r\n //cxc.reversar(ide_cnccc_nuevo, tab_cxc_cab_fact.getValor(0, \"ide_cccfa\"), \"Reversa CxP de fact. num:\" + tab_cxc_cab_fact.getValor(0, \"secuencial_cccfa\") + \" y asiento num:\" + ide_cnccc_anular);\r\n TablaGenerica tab_inv_cab_inv = utilitario.consultar(\"select * from inv_cab_comp_inve where ide_incci in ( \"\r\n + \"select ide_incci from inv_det_comp_inve where ide_cccfa=\" + tab_cxc_cab_fact.getValor(0, \"ide_cccfa\") + \" GROUP BY ide_incci)\");\r\n if (tab_inv_cab_inv.getTotalFilas() > 0) {\r\n cls_inventario inv = new cls_inventario();\r\n // reverso inventario\r\n inv.reversar_mas(ide_cnccc_nuevo, tab_inv_cab_inv.getValor(0, \"ide_cnccc\"), \"Reversa de comprobante num:\" + ide_cnccc_anular);\r\n // reverso el comprobante de costos\r\n boo_asiento_costos = true;\r\n ide_asiento_costos = tab_inv_cab_inv.getValor(0, \"ide_cnccc\");\r\n }\r\n }\r\n\r\n utilitario.getConexion().guardarPantalla();\r\n tab_tabla1.setFilaActual(con.getTab_cabecera().getValor(\"ide_cnccc\"));\r\n tab_tabla1.ejecutarSql();\r\n if (boo_asiento_costos == true) {\r\n con.limpiar();\r\n con.reversar(ide_asiento_costos, \"Asiento de reversa asiento costos de la transaccion num: \" + ide_cnccc_anular, con);\r\n utilitario.getConexion().guardarPantalla();\r\n }\r\n }\r\n }\r\n }",
"private void btnUpdateActionPerformed(java.awt.event.ActionEvent evt) {\n Tables tables = new Tables();\n try{\n int id = Integer.parseInt(lblID.getText().trim());\n String tableNumber = txtUpdateTable.getText().trim();\n \n int asAvailable = 1 ;\n \n tables.setTableId(id);\n tables.setTableNumber(tableNumber);\n tables.setAsAvailable(asAvailable);\n \n tableService.updateTableNumber(tables);\n }catch(Exception e){\n JOptionPane.showMessageDialog(null, \"Please Fill TextField\");\n }\n \n vectorTablesNumber = commonService.getVectorTables();\n\n TablesTableModel tableTableModel = new TablesTableModel(vectorTablesNumber);\n tblTablesNumber.setModel(tableTableModel);\n \n \n txtUpdateTable.setText(\"\");\n \n }",
"@Override\n public void changed(ObservableValue observableValue, Object oldValue, Object newValue) {\n if(table_progressive.getSelectionModel().getSelectedItem() != null) \n { \n TableViewSelectionModel selectionModel = table_progressive.getSelectionModel();\n ObservableList selectedCells = selectionModel.getSelectedCells();\n TablePosition tablePosition = (TablePosition) selectedCells.get(0); \n String[] liste_value=newValue.toString().split(\",\");\n selected_row_table_progressive=tablePosition.getRow()+1; \n selected_row_table_progressive_nom=liste_value[1].trim();\n selected_row_table_progressive_prenom=liste_value[2].trim();\n // Object val = tablePosition.getTableColumn().getCellData(newValue); \n }\n }",
"@Override\n public void changed(ObservableValue observableValue, Object oldValue, Object newValue) {\n if(table_progressive.getSelectionModel().getSelectedItem() != null) \n { \n TableViewSelectionModel selectionModel = table_progressive.getSelectionModel();\n ObservableList selectedCells = selectionModel.getSelectedCells();\n TablePosition tablePosition = (TablePosition) selectedCells.get(0); \n String[] liste_value=newValue.toString().split(\",\");\n selected_row_table_progressive=tablePosition.getRow()+1; \n selected_row_table_progressive_nom=liste_value[1].trim();\n selected_row_table_progressive_prenom=liste_value[2].trim();\n // Object val = tablePosition.getTableColumn().getCellData(newValue); \n }\n }",
"public void atualizar() {\n System.out.println(\"Metodo atualizar chamado!\");\n setR1(0);\n setR2(0);\n setR3(0);\n setN(0);\n\n //context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, \"Atualizado!\", \"\"));\n }",
"public void salida(String k_idparqueadero) throws CaException {\n try {\n String strSQL = \"UPDATE servicio SET f_fycsalida=?, q_valorapagar=? WHERE k_idservicio =?\";\n Connection conexion = ServiceLocator.getInstance().tomarConexion();\n PreparedStatement prepStmt = conexion.prepareStatement(strSQL);\n prepStmt.setDate(1, Date.valueOf(servicio.getF_fycsalida()));\n prepStmt.setInt(2, servicio.getQ_valorapagar());\n prepStmt.setInt(3, servicio.getK_idservicio());\n prepStmt.executeUpdate();\n prepStmt.close();\n ServiceLocator.getInstance().commit();\n } catch (SQLException e) {\n throw new CaException(\"ServicioDAO\", \"No pudo actualizar el servicio\" + e.getMessage());\n } finally {\n ServiceLocator.getInstance().liberarConexion();\n }\n this.actualizarDatosSalida(String.valueOf(servicio.getK_idservicio()), k_idparqueadero);\n }",
"public void atualizarTabelaRespostas(){\n resposta = new Resposta(); \n\n try{\n if(txtIdPergunta.getText().isEmpty()){\n listaRespostas = respostaDao.ListaResposta(0);\n \n }else{\n listaRespostas = respostaDao.ListaResposta(Integer.parseInt(txtIdPergunta.getText()));\n \n }\n }catch (SQLException ex){\n Logger.getLogger(PerguntaView.class.getName()).log(Level.SEVERE, null, ex);\n } \nString dados [][] = new String[listaRespostas.size()][0];\nint i = 0;\nfor(Resposta resposta : listaRespostas){\n dados[i][0] = String.valueOf(resposta.getId());\n dados[i][1] = resposta.getDescricao();\n \n i++;\n}\nString tituloColuna[] ={\"ID Resposta\", \"Resposta\"};\nDefaultTableModel tabelaresposta = new DefaultTableModel();\ntabelaresposta.setDataVector(dados, tituloColuna);\n \n\n tabela_respostas.setModel(new DefaultTableModel(dados, tituloColuna){\n boolean[] canEdit = new boolean[]{\n false, false};\n \n public boolean isCellEditable(int rowIndex, int columnIndex){\n return canEdit[columnIndex];\n }\n \n\n });\ntabela_respostas.getColumnModel().getColumn(0).setPreferredWidth(100);\ntabela_respostas.getColumnModel().getColumn(1).setPreferredWidth(400);\n\nDefaultTableCellRenderer alinhamentoCentro = new DefaultTableCellRenderer();\nalinhamentoCentro.setHorizontalAlignment(SwingConstants.CENTER);\n\n\ntabela_respostas.getColumnModel().getColumn(0).setCellRenderer(alinhamentoCentro);\n\n\ntabela_respostas.setRowHeight(25);\ntabela_respostas.updateUI();\n }"
]
| [
"0.63411385",
"0.6295406",
"0.6249885",
"0.621736",
"0.6205486",
"0.6137161",
"0.6093092",
"0.5967337",
"0.59321547",
"0.5925257",
"0.58577305",
"0.58107376",
"0.58096695",
"0.58031976",
"0.5790974",
"0.5776352",
"0.57565296",
"0.57556695",
"0.575365",
"0.5750083",
"0.5742205",
"0.5739328",
"0.5738748",
"0.5735216",
"0.57226413",
"0.57188016",
"0.571669",
"0.57143384",
"0.56968457",
"0.5671053",
"0.5664425",
"0.56627434",
"0.56573486",
"0.5657283",
"0.5650741",
"0.5637355",
"0.5636091",
"0.5636052",
"0.56342643",
"0.5632552",
"0.5630512",
"0.56105655",
"0.5606518",
"0.55911994",
"0.55777234",
"0.5577356",
"0.55732924",
"0.55731416",
"0.5571807",
"0.5568904",
"0.5561832",
"0.5554427",
"0.554325",
"0.5543009",
"0.55426514",
"0.5542558",
"0.55422",
"0.5536679",
"0.5532574",
"0.5522005",
"0.5518386",
"0.5516704",
"0.5515059",
"0.5513818",
"0.5507317",
"0.5499338",
"0.54992396",
"0.5488258",
"0.54878104",
"0.54876405",
"0.5483903",
"0.54833066",
"0.54809666",
"0.54779357",
"0.54695016",
"0.5469383",
"0.54666406",
"0.5461508",
"0.5454523",
"0.5453155",
"0.54519707",
"0.5451743",
"0.5450459",
"0.54495335",
"0.54474497",
"0.54405415",
"0.54405224",
"0.5436134",
"0.5435778",
"0.5434975",
"0.54332435",
"0.5430337",
"0.5430088",
"0.54294646",
"0.54281276",
"0.54220325",
"0.54220325",
"0.54192805",
"0.54189736",
"0.5417595"
]
| 0.59340876 | 8 |
Changes the GameObject's tile image for a walking animation. | void walkAnimation(int direction, int index) {
switch (direction) {
case 0:
if (flip) { tile.setImg(upSprites1.get(index)); }
else { tile.setImg(upSprites2.get(index)); }
break;
case 1:
if (flip) { tile.setImg(downSprites2.get(index)); }
else { tile.setImg(downSprites2.get(index)); }
break;
case 2:
tile.setImg(leftSprites.get(index));
break;
case 3:
tile.setImg(rightSprites.get(index));
break;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void animateWalking() {\n if (seqIdx > 7) {\n seqIdx = 0;\n }\n if (walking) {\n this.setImage(\"images/bat/bat_\" + seqIdx + FILE_SUFFIX);\n } else {\n this.setImage(\"images/bat/bat_0.png\");\n }\n seqIdx++;\n }",
"private void animate() {\r\n\t\tif (spriteCounter > 50) {\r\n\t\t\tanimationFrame = 0;\r\n\t\t} else {\r\n\t\t\tanimationFrame = -16;\r\n\t\t}\r\n\t\t\r\n\t\tif (spriteCounter > 100) {\r\n\t\t\tspriteCounter = 0;\r\n\t\t}\r\n\t\t\r\n\t\r\n\t\tspriteCounter++;\r\n\t\tsetImage((Graphics2D) super.img.getGraphics());\r\n\t}",
"@Override\n public void draw(SpriteBatch batch) {\n stateTime += Gdx.graphics.getDeltaTime();\n\n if (SinglePGameModel.getInstance().getPlayer().isWalking())\n sprite.setRegion(walkingAnimation.getKeyFrame(stateTime, true));\n else\n sprite.setRegion(jumpingAnimation);\n\n sprite.draw(batch);\n }",
"public void moveLeft() {\r\n speedX = -6;\r\n Texture r1 = changeImg (\"./graphics/characters/player/leftWalk1.png\");\r\n img = new Sprite (r1);\r\n }",
"public void act() \n {\n setImage(\"1up.png\");\n setImage(\"acrate.png\");\n setImage(\"Betacactus.png\");\n setImage(\"bullet1.png\");\n setImage(\"bullet2.png\");\n setImage(\"burst.png\");\n setImage(\"cowboy.png\");\n setImage(\"fOxen1.png\");\n setImage(\"fOxen2.png\");\n setImage(\"fOxen3.png\");\n setImage(\"fOxen4.png\");\n setImage(\"fOxenH.png\");\n setImage(\"fWagon1.png\");\n setImage(\"fWagon2.png\");\n setImage(\"fWagon3.png\");\n setImage(\"fWagon4.png\");\n setImage(\"fWagonH.png\");\n setImage(\"health.png\");\n setImage(\"indian.png\");\n setImage(\"normal.png\");\n setImage(\"oxen.png\");\n setImage(\"oxen2.png\");\n setImage(\"oxen3.png\");\n setImage(\"oxen4.png\");\n setImage(\"oxen-hit.png\");\n setImage(\"plasma.png\");\n setImage(\"rapid.png\");\n setImage(\"snake1.png\");\n setImage(\"snake2.png\");\n setImage(\"snake3.png\");\n setImage(\"snake4.png\");\n setImage(\"spread.png\");\n setImage(\"theif.png\");\n setImage(\"train1.png\");\n setImage(\"train-hit.png\");\n setImage(\"wagon.png\");\n setImage(\"wagonhit.png\");\n setImage(\"wave.png\");\n getWorld().removeObject(this);\n }",
"@Override\n\tpublic void draw() {\n\t\tfloat delta = Gdx.graphics.getDeltaTime();\n\t\ti+= delta;\n\t\timage.setRegion(animation.getKeyFrame(i, true));\n\t\t//this.getSpriteBatch().draw(animation.getKeyFrame(i, true), 0, 0);\n\t\t\n\t\tGdx.app.log(\"tag\", \"delta = \" + i);\n\t\t\n\t\tsuper.draw();\n\t}",
"void setTile(Tile tile) {\n _tile = tile;\n }",
"private void idleAnimation(){\n timer++;\n if( timer > 4 ){\n setImage(loadTexture());\n animIndex++;\n timer= 0;\n if(animIndex > maxAnimIndex ){\n animIndex = 0;\n }\n }\n }",
"public void imageSwap() {\n GreenfootImage image = (movement.dx < 1) ? leftImage : rightImage;\n setImage(image);\n }",
"@Override\n\tpublic void update() {\n\t\tif(!canSwoop)\n\t\tif(System.currentTimeMillis() - lastAnim >= 200){\t\n\t\t\tif(currentAnim < 2){\n\t\t\t\tcurrentAnim++;\n\t\t\t} else {\n\t\t\t\tcurrentAnim = 0;\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"ANIMATING image: \" + currentAnim);\n\t\t\tlastAnim = System.currentTimeMillis();\t\t\n\t\t\t}\n\t\t\n\t\tthis.texture = Assets.shadowAnim[currentAnim];\n\t}",
"public void move() {\r\n\t\tsetY(getY() + 134);\r\n\t\tmyImage = myImage.getScaledInstance(100, 300, 60);\r\n\r\n\t}",
"public void updateLavaTiles() {\n for (Tile tile : getTiles()) {\n Random random = new Random();\n if (tile.getType().matches(\"BurnTile\")) {\n tile.setTexture(\"Volcano_\" + (random.nextInt(4) + 5));\n }\n }\n }",
"public void setTile (int i, boolean up)\n\t{\n\t\ttileButton[i].setIcon (up ? tileIcon[i] : tileIcon[0]);\n\t}",
"public void superPacman(){\n setSuperPacman(true);\n\n for(VisualObject v : Map.visualObjects){\n if(v.getClass().getGenericSuperclass() == Fantome.class){\n ((Fantome)v).changeSpriteAnimation(\"./data/SpriteMouvement/FantomePeur/\");\n ((Fantome)v).initAnimation();\n }\n }\n new Thread(() -> {\n //mettre la nouvelle image du superpacman\n try {\n TimeUnit.SECONDS.sleep(10);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n setSuperPacman(false);\n for(VisualObject v : Map.getVisualObjects()){\n if(v.getClass().getGenericSuperclass() == Fantome.class){\n ((Fantome)v).initSpriteAnimation();\n ((Fantome)v).initAnimation();\n }\n }\n }).start();\n\n }",
"@Override\n\tprotected void generateMap() {\n\t\t//read map from tmx\n\t\tmap = null;\n\t\tfinal String tmx = \"res/tiles/map.tmx\";\n\t\ttry {\n\t\t\tTMXMapReader mapReader = new TMXMapReader();\n\t\t\tmap = mapReader.readMap(tmx);\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tTileLayer layer = (TileLayer)map.getLayer(0);\n\n\t\ttiles = new PropertyTile[layer.getWidth()][layer.getHeight()];\n\t\tfor(int x=0; x<layer.getWidth(); x++) {\n\t\t\tfor(int y=0; y<layer.getHeight(); y++) {\n\t\t\t\tTile tile = layer.getTileAt(x, y);\n\t\t\t\tString type = (String)tile.getProperties().get(\"type\");\n\t\t\t\ttiles[x][y] = new PropertyTile(tile, TileType.valueOf(type.toUpperCase()));\n\t\t\t\ttiles[x][y].setImage(tile.getImage());\n\t\t\t}\n\t\t}\n\t\t\n\t\t//generate animated tiles from river tileset\n\t\tTileSet riverset = map.getTileSets().get(1);\n\t\tList<AnimatedTile> animatedTiles = new ArrayList<>();\n\t\tfor(int i=0; i<5; i++) {\n\t\t\tTile[] frames = new Tile[3];\n\t\t\tIterator<Tile> iterator = riverset.iterator();\n\t\t\twhile(iterator.hasNext()) {\n\t\t\t\tTile tile = iterator.next();\n\t\t\t\tint rtile = Integer.parseInt(tile.getProperties().getProperty(\"tile\"));\n\t\t\t\tint frame = Integer.parseInt(tile.getProperties().getProperty(\"frame\"));\n\t\t\t\tif(rtile == i+1) {\n\t\t\t\t\tframes[frame-1] = tile;\n\t\t\t\t}\n\t\t\t}\n\t\t\tAnimatedTile aTile = new AnimatedTile(frames);\n\t\t\tanimatedTiles.add(aTile);\n\t\t}\n\n\t\t//replace tiles in map with animated tiles\n//\t\tfor(int x=0; x<layer.getWidth(); x++) {\n//\t\t\tfor(int y=0; y<layer.getHeight(); y++) {\n//\t\t\t\tTile tile = layer.getTileAt(x, y);\n//\t\t\t\tif(tile.getProperties().containsKey(\"animated\")) {\n//\t\t\t\t\tint rtile = Integer.parseInt(tile.getProperties().getProperty(\"tile\"));\n//\t\t\t\t\tlayer.setTileAt(x, y, animatedTiles.get(rtile-1));\t\t\t\t\t\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n\t}",
"private void muerte(){\r\n\t\t for(Icon i:sprites.elementAt(4))\r\n\t \t {\r\n\t \t\t grafico.setIcon(i);\r\n\t \t\t try {\r\n\t\t\t\tThread.sleep(300);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t \t }\r\n\t \t grafico.setIcon(null);\r\n\t}",
"private Animation<TextureRegion> createWalkingAnimation(MyCumulusGame game) {\n Texture walkingTexture = game.getAssetManager().get(\"bird.png\");\n TextureRegion[][] walkingRegion = TextureRegion.split(walkingTexture, walkingTexture.getWidth() / 3, walkingTexture.getHeight()/3);\n\n TextureRegion[] frames = new TextureRegion[2]; //todo change to accomodate any color of bird\n System.arraycopy(walkingRegion[0], 0, frames, 0, 2);\n\n return new Animation<TextureRegion>(FRAME_TIME, frames);\n }",
"void jump() {\n if (myIsJumping == myNoJumpInt) {\n myIsJumping++;\n // switch the cowboy to use the jumping image\n // rather than the walking animation images:\n setFrameSequence(null);\n setFrame(0);\n }\n }",
"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 }",
"public void act() \n {\n String worldname = getWorld().getClass().getName();\n if (worldname == \"Level0\")\n setImage(new GreenfootImage(\"vibranium.png\"));\n else if (worldname == \"Level1\")\n setImage(rocket.getCurrentImage());\n setLocation(getX()-8, getY()); \n if (getX() == 0) \n {\n getWorld().removeObject(this);\n }\n \n }",
"@Override\n public void drawTile(GraphicsContext gc, double dx, double dy) {\n gc.drawImage(tile, dx, dy, 64, 64);\n }",
"public void setHeroWalkDown(Animation<TextureRegion> heroWalkDown) {\n this.heroWalkDown = heroWalkDown;\n }",
"@Override\n\tpublic void render() {\n\t\tupdate();\n\n\t\tGdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); // clear the screen\n\t\tbatch.begin();\n\n\t\tTextureRegion tmpRegion = null;\n\t\t\n\t\t// Draw the terrain!\n\t\tfor (int x = 0; x < 30; ++x) {\n\t\t\tfor (int y = 0; y < 20; ++y) {\n\t\t\t\ttmpRegion = new TextureRegion( tileset32Texture, (tiles[x][y] - 4) * 32, 0, 32, 32);\n\t\t\t\t//pause_button_region = new TextureRegion( spriteSheet, tiles[x][y] - 4, 0, 32, 32);\n\t\t\t\t// switch to 32x32 sprite\n\t\t\t\t//batch.draw(spriteSheet, x * 16, y * 16, tiles[x][y] * 16, 0, 16, 16);\n\t\t\t\tbatch.draw(tmpRegion, x * SQUARE_WIDTH, y * SQUARE_WIDTH, SQUARE_WIDTH, SQUARE_WIDTH);\n\n\t\t\t\t// Temporary, copy pasta\n\t\t\t\t/*\n\t\t\t\t * switch( movementDirs[x][y] ) { case 'N': batch.draw(\n\t\t\t\t * spriteSheet, x*16, y*16, 11*16, 0, 16, 16 ); break; case 'E':\n\t\t\t\t * batch.draw( spriteSheet, x*16, y*16, 12*16, 0, 16, 16 );\n\t\t\t\t * break; case 'W': batch.draw( spriteSheet, x*16, y*16, 13*16,\n\t\t\t\t * 0, 16, 16 ); break; case 'S': batch.draw( spriteSheet, x*16,\n\t\t\t\t * y*16, 14*16, 0, 16, 16 ); break; }\n\t\t\t\t */\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\t// Draw the towers\n\t\tfor( int i = 0; i < towers.size(); ++i )\n\t\t{\n\t\t\tbatch.draw(towers.get(i).m_type.getTextureRegion(), towers.get(i).m_x * SQUARE_WIDTH, (towers.get(i).m_y) * SQUARE_WIDTH, SQUARE_WIDTH, SQUARE_WIDTH);\n\t\t\t//drawSprite(towers.get( i ).getIconNum(), towers.get(i).m_x, towers.get(i).m_y);\n\t\t\tif (towers.get(i).selected) {\n\t\t\t\t//batch.draw(spriteSheet, towers.get(i).m_x * SQUARE_WIDTH, towers.get(i).m_y * SQUARE_WIDTH, SQUARE_WIDTH, SQUARE_WIDTH, towers.get(i).m_type.getSpriteLocX(), towers.get(i).m_type.getSpriteLocY(), 16, 16, false, true);\n\t\t\t\t//drawSprite(towers.get( i ).getIconNum(), towers.get(i).m_x, towers.get(i).m_y);\n\t\t\t\tbatch.draw(selectionImg, towers.get(i).m_x * SQUARE_WIDTH, towers.get(i).m_y * SQUARE_WIDTH, SQUARE_WIDTH, SQUARE_WIDTH, 0, 0, 32, 32, false, true);\n\t\t\t}\n\n\t\t\t\n\t\t}\n\n\t\t// Draw the creeps!\n\t\tfor( int i = 0; i < creeps.size(); ++i)\n\t\t{\n\n\t\t\tif( creeps.get(i).active ) {\n\t\t\t\tTextureRegion toUse = null;\n\t\t\t\t//TextureRegion toUse = new TextureRegion(corporateCreepTexture);\n\t\t\t\tif (creeps.get(i).m_type == CreepType.GLOBAL_CORP) {\n\t\t\t\t\ttoUse = new TextureRegion(corporateCreepTexture);\n\t\t\t\t} else if (creeps.get(i).m_type == CreepType.SEARCHER) {\n\t\t\t\t\ttoUse = new TextureRegion(defconZeplinTexture);\n\t\t\t\t} else if (creeps.get(i).m_type == CreepType.GOVERNMENT) {\n\t\t\t\t\ttoUse = new TextureRegion(govHeliTexture);\n\t\t\t\t} else {\n\t\t\t\t\t// TODO: Change this to difference art.\n\t\t\t\t\ttoUse = new TextureRegion(corporateCreepTexture);\n\t\t\t\t}\n\t\t\t\tbatch.draw(toUse, creeps.get(i).x * SQUARE_WIDTH + creeps.get(i).xOffset, creeps.get(i).y * SQUARE_WIDTH + creeps.get(i).yOffset, SQUARE_WIDTH, SQUARE_WIDTH);\n\t\t\t\t//batch.draw(toUse, creeps.get(i).x * SQUARE_WIDTH + creeps.get(i).xOffset, creeps.get(i).y * SQUARE_WIDTH + creeps.get(i).yOffset, SQUARE_WIDTH, SQUARE_WIDTH, 0, 32, 32, 32, false, false);\n\t\t\t}\n\t\t}\n\n\t\t// Draw the projectiles!\n\t\tfor( int i = 0; i < maxProjectiles; ++i )\n\t\t{\n\t\t\tif( projectiles[i].active )\n\t\t\t{\n//\t\t\t\tbatch.draw( spriteSheet, projectiles[i].my_coords.x*SQUARE_WIDTH, projectiles[i].my_coords.y*SQUARE_WIDTH, SQUARE_WIDTH, SQUARE_WIDTH, 0, 16*3, 16, 16, false, false);\n\t\t\t\tif (projectiles[i].towertype == \"judge\"){\n\t\t\t\t\tbatch.draw( spriteSheet, projectiles[i].my_coords.x*SQUARE_WIDTH, projectiles[i].my_coords.y*SQUARE_WIDTH, SQUARE_WIDTH, SQUARE_WIDTH, 0, 16*3, 16, 16, false, false);\n\t\t\t\t} else if (projectiles[i].towertype == \"teacher\"){\n\t\t\t\t\tbatch.draw( spriteSheet, projectiles[i].my_coords.x*SQUARE_WIDTH, projectiles[i].my_coords.y*SQUARE_WIDTH, SQUARE_WIDTH, SQUARE_WIDTH, 16, 16*3, 16, 16, false, false);\n\t\t\t\t} else if (projectiles[i].towertype == \"lawyer\"){\n\t\t\t\t\tbatch.draw( spriteSheet, projectiles[i].my_coords.x*SQUARE_WIDTH, projectiles[i].my_coords.y*SQUARE_WIDTH, SQUARE_WIDTH, SQUARE_WIDTH, 32, 16*3, 16, 16, false, false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Draw the UI!\n\n\t\t// Background\n\n\t\tbatch.draw(blackBox, 0, 0, uiPanelWidth , screenHeight);\n\n\t\t// Draw the menu bar\n\t\tbatch.draw(menuTexture,-4,-190);\n\t\t//batch.draw(menu_region, 0, -100);\n\t\t\n\t\t// Draw the free towers.\n\t\t\n\t\tfor (int i = 1; i <= 3; i++) \n\t\t{\n\t\t\tif (free_towers.get(i-1) != null) \n\t\t\t{\n\t\t\t\t//tower_region.setRegion( free_towers.get(i-1).getSpriteLocX(), free_towers.get(i-1).getSpriteLocY(), 16, 16 );\n\t\t\t\tbatch.draw(free_towers.get(i-1).getTextureRegion(), 29, (screenHeight - 60 * i) + 5, SQUARE_WIDTH, SQUARE_WIDTH);\n\t\t\t\t//batch.draw(tower_region, 33, screenHeight - 57 * i, 16, 16);\n\t\t\t\t\n\t\t\t\tString towerPrice = \"$\" + free_towers.get(i-1).getPrice();\n\t\t\t\tTextBounds priceBounds = mFont.getBounds(towerPrice);\n\t\t\t\tColor oldColor = mFont.getColor();\n\t\t\t\tmFont.setColor(Color.GREEN);\n\t\t\t\tmFont.drawWrapped(batch, towerPrice, 10, 33 + screenHeight - 58*i + priceBounds.height, priceBounds.width);\n\t\t\t\tmFont.setColor(oldColor);\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\t// Keep the GC in its cage as long as possible. \n\t\tif( oldMoney != money || oldLife != life )\n\t\t{\n\t\t\tuiString = \"+: \" + life + '\\n' + \"$: \" + money;\n\t\t\tuiBounds = mFont.getMultiLineBounds(uiString);\n\t\t}\n\t\toldMoney = money;\n\t\toldLife = life;\n\t\t\t\t\n\t\t// Draw droid pause button if on an android device.\n\t\tif (runningDrd) {\n\t\t\t\n\t\t\tpause_button_region.setRegion(7*17, 23, 2, 2);\n\t\t\tbatch.draw(pause_button_region, DRD_PAUSE_RECT.x, DRD_PAUSE_RECT.y, DRD_PAUSE_RECT.width, DRD_PAUSE_RECT.height);\n\t\t\t\n\t\t\tString pause_button_string = \"Pause\";\n\t\t\tTextBounds pauseButtonBounds = mFont.getBounds(pause_button_string);\n\t\t\tmFont.drawWrapped(batch, pause_button_string,\n\t\t\t\t\t\t\t(32 - (pauseButtonBounds.width / 2)),\n\t\t\t\t\t\t\tDRD_PAUSE_RECT.y + pauseButtonBounds.height + 4, pauseButtonBounds.width);\n\t\t}\n\t\t\n\t\t// Draw the restart button if paused or game over.\n\t\tif (life <= 0 || isPaused) {\n\t\t\t\n\t\t\trestart_button_region.setRegion(7*17, 23, 2, 2);\n\t\t\tbatch.draw(restart_button_region, RESTART_RECT.x, RESTART_RECT.y, RESTART_RECT.width, RESTART_RECT.height);\n\t\t\t\n\t\t\tString restart_button_string = \"Restart\";\n\t\t\tTextBounds restartButtonBounds = mFont.getBounds(restart_button_string);\n\t\t\tmFont.drawWrapped(batch, restart_button_string,\n\t\t\t\t\t\t\t(32 - (restartButtonBounds.width / 2)),\n\t\t\t\t\t\t\tRESTART_RECT.y + restartButtonBounds.height + 4, restartButtonBounds.width);\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t// Draw the start button if we are in build mode.\n\t\tif (buildMode) {\n\t\t\t\n\t\t\tstart_button_region.setRegion(7*17, 23, 2, 2);\n\t\t\tbatch.draw(start_button_region, START_RECT.x, START_RECT.y, START_RECT.width, START_RECT.height);\n\t\t\t\n\t\t\tString start_button_string = \"Start\";\n\t\t\tTextBounds startButtonBounds = mFont.getBounds(start_button_string);\n\t\t\tmFont.drawWrapped(batch, start_button_string,\n\t\t\t\t\t\t\t(32 - (startButtonBounds.width / 2)),\n\t\t\t\t\t\t\tSTART_RECT.y + startButtonBounds.height + 4, startButtonBounds.width);\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t// Draw the sell button if we are not paused or in build mode and a tower is selected.\n\t\tif (!isPaused && !buildMode && selected != null) {\n\t\t\t\n\t\t\tsell_button_region.setRegion(7*17, 23, 2, 2);\n\t\t\tbatch.draw(sell_button_region, SELL_RECT.x, SELL_RECT.y, SELL_RECT.width, SELL_RECT.height);\n\t\t\t\n\t\t\tString sell_button_string = \"Sell\";\n\t\t\tTextBounds sellButtonBounds = mFont.getBounds(sell_button_string);\n\t\t\tmFont.drawWrapped(batch, sell_button_string,\n\t\t\t\t\t\t\t(32 - (sellButtonBounds.width / 2)),\n\t\t\t\t\t\t\tSTART_RECT.y + sellButtonBounds.height + 4, sellButtonBounds.width);\n\t\t}\n\t\t\n\t\t// Text\n\t\tString uiString = \"+ \" + life + '\\n' + \"$ \" + money;\n\t\tTextBounds uiBounds = mFont.getMultiLineBounds(uiString);\n\t\tColor oldColor = mFont.getColor();\n\t\tmFont.setColor(Color.RED);\n\t\tmFont.drawWrapped(batch, uiString, 3, uiBounds.height + 3, uiBounds.width);\n\t\tmFont.setColor(oldColor);\n\n\t\t// DEBUG TEXT\n\t\t//mFont.drawWrapped(batch, debugtext, 60, uiBounds.height + 3, 1000);\t\t\n\n\t\t// Draw the cursorTexture\n\t\tif (cursorState != null && cursorTexture != null) {\n\t\t\tbatch.draw(cursorTexture, cursorLocX - 8, screenHeight - cursorLocY - 8);\n\t\t}\n\t\t\n\t\t// Render Paused String if needed in bottom right corner.\n\t\tString center_string = null;\n\t\tif (isPaused) {\n\t\t\tcenter_string = \"PAUSED\";\n\t\t} else if (life <= 0) {\n\t\t\tcenter_string = \"GAME OVER\";\n\t\t}\n\t\t\n\t\tif (center_string != null) {\n\t\t\tTextBounds pausedBounds = mFont.getMultiLineBounds(center_string);\n\t\t\tColor oldColor2 = mFont.getColor();\n\t\t\tmFont.setColor(Color.RED);\n\t\t\tmFont.drawWrapped(batch, center_string,\n\t\t\t\t\t(screenWidth / 2) - (pausedBounds.width / 2),\n\t\t\t\t\t(screenHeight / 2) - (pausedBounds.height / 2), pausedBounds.width );\n\t\t\tmFont.setColor(oldColor2);\n\t\t}\n\t\t\n\t\tbatch.end();\n\t}",
"public void updateImage() {\n \t\tAnimation anim = this.animationCollection.at(\n \t\t\t\tfak.getCurrentAnimationTextualId());\n \n \t\t// if animation is set to something bad, then set it to back to initial\n \t\tif(anim==null)\n \t\t{\n \t\t\tfak.setCurrentAnimationTextualId(ConstantsForAPI.INITIAL);\n \t\t\tanim = this.animationCollection.at(\n \t\t\t\t\tfak.getCurrentAnimationTextualId());\n \t\t}\n \n \t\tif(anim==null)\n \t\t{\n \t\t\tanim = this.animationCollection.at(0);\n \t\t\tfak.setCurrentAnimationTextualId(anim.getTextualId());\n \t\t}\n \n \t\tif (anim != null) {\n \t\t\tif (fak.getCurrentFrame()\n \t\t\t\t\t>= anim.getLength()) {\n \t\t\t\tfak.setCurrentFrame(\n \t\t\t\t\t\tanim.getLength() - 1);\n \t\t\t}\n \n \t\t\tcom.github.a2g.core.objectmodel.Image current = anim.getImageAndPosCollection().at(\n \t\t\t\t\tfak.getCurrentFrame());\n \n \t\t\t// yes current can equal null in some weird cases where I place breakpoints...\n \t\t\tif (current != null\n \t\t\t\t\t&& !current.equals(this)) {\n \t\t\t\tif (this.currentImage != null) {\n \t\t\t\t\tthis.currentImage.setVisible(\n \t\t\t\t\t\t\tfalse, new Point(this.left,this.top));\n \t\t\t\t}\n \t\t\t\tthis.currentImage = current;\n \t\t\t}\n \t\t}\n \t\t// 2, but do this always\n \t\tif (this.currentImage != null) {\n \t\t\tthis.currentImage.setVisible(\n \t\t\t\t\tthis.visible, new Point(this.left,\n \t\t\t\t\t\t\tthis.top));\n \t\t}\n \n \t}",
"public void act() \n {\n if(images != null)\n {\n if(animationState == AnimationState.ANIMATING)\n {\n if(animationCounter++ > delay)\n {\n animationCounter = 0;\n currentImage = (currentImage + 1) % images.length;\n setImage(images[currentImage]);\n }\n }\n else if(animationState == AnimationState.SPECIAL)\n {\n setImage(specialImage);\n }\n else if(animationState == AnimationState.RESTING)\n {\n animationState = AnimationState.FROZEN;\n animationCounter = 0;\n currentImage = 0;\n setImage(images[currentImage]);\n }\n }\n }",
"public void setHeroWalkUp(Animation<TextureRegion> heroWalkUp) {\n this.heroWalkUp = heroWalkUp;\n }",
"public void act() {\n setImage(myGif.getCurrentImage());\n }",
"private void init() {\n\t\trunning = true;\n\t\timage = new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_INT_RGB);\n\t\tg = (Graphics2D) image.getGraphics();\n\t\ttheMap.loadTiles(\"resizedTiles2.png\");\n\t}",
"private void setInitialAnim()\n {\n \n \n if(level.playerFacing == Direction.LEFT)\n {\t\n \tcurrentAnim = leftWalk;\n }\n else\n {\n \tcurrentAnim = rightWalk;\n }\n \n Image i = currentAnim.getCurrentFrame();\n width = i.getWidth();\n height = i.getHeight();\n }",
"public void setAnimaciones( ){\n\n int x= 0;\n Array<TextureRegion> frames = new Array<TextureRegion>();\n for(int i=1;i<=8;i++){\n frames.add(new TextureRegion(atlas.findRegion(\"demon01\"), x, 15, 16, 15));\n x+=18;\n }\n this.parado = new Animation(1 / 10f, frames);//5 frames por segundo\n setBounds(0, 0, 18, 15);\n\n }",
"public void Attack()\n\t{\n\t\tif(action && waitingFrames == 0)\n\t\t{\n\t\t\tspriteImageView.setImage(new Image(\"image/main_attack.png\"));\n\t\t\tswitch(getDirection())\n\t\t\t{\n\t\t\t\tcase \"UP\": \tspriteImageView.setViewport(new Rectangle2D(300, 0, width, height)); action = false; break;\n\t\t\t\tcase \"DOWN\": spriteImageView.setViewport(new Rectangle2D(0, 0, width, height)); action = false; break;\n\t\t\t\tcase \"LEFT\": spriteImageView.setViewport(new Rectangle2D(100, 0, width, height)); action = false; break;\n\t\t\t\tcase \"RIGHT\": spriteImageView.setViewport(new Rectangle2D(200, 0, width, height)); action = false; break;\n\t\t\t\tdefault: break;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}",
"public void move(){\n\t\tswitch(state){\r\n\t\t\tcase ATField.SPRITE_STAND:\r\n\t\t\t\tspriteX = 0;\r\n\t\t\t\tcoords = standbySprite.get(spriteX);\r\n\t\t\t\tspriteImg = new Rect(coords.left,coords.top,coords.right,coords.bottom);\r\n\t\t\t\tactualImg = new Rect(x, y, x + width, y + height);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\r\n\t\t\tcase ATField.SPRITE_WALK:\r\n\t\t\t\tif(spriteX >walkSprite.size() - 1){\r\n\t\t\t\t\tspriteX = 0;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcoords = walkSprite.get(spriteX);\r\n\t\t\t\tspriteImg = new Rect(coords.left,coords.top,coords.right,coords.bottom);\r\n\t\t\t\tactualImg = new Rect(x, y, x + width, y + height);\r\n\t\t\t\tspriteX++;\r\n\t\t\t\t\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase ATField.SPRITE_RUN:\r\n\t\t\t\t\r\n\t\t\t\tif(spriteX >runSprite.size() - 1){\r\n\t\t\t\t\tspriteX = 0;\r\n\t\t\t\t\tsetState(STAND);\r\n\t\t\t\t}\r\n\t\t\t\tcoords = runSprite.get(spriteX);\r\n\t\t\t\tspriteImg = new Rect(coords.left,coords.top,coords.right,coords.bottom);\r\n\t\t\t\tactualImg = new Rect(x, y, x + width, y + height);\r\n\t\t\t\tspriteX++;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase ATField.SPRITE_JUMP:\r\n\t\t\t\tif(spriteX >5){\r\n\t\t\t\t\tsetState(STAND);\r\n\t\t\t\t}\r\n\t\t\t\tcoords = jumpSprite.get(0);\r\n\t\t\t\tspriteImg = new Rect(coords.left,coords.top,coords.right,coords.bottom);\r\n\t\t\t\tactualImg = new Rect(x, y, x + width, y + height);\r\n\t\t\t\tspriteX++;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}",
"public void drawTile() {\n\n }",
"public void playWinAnimation()\n {\n // MAKE A NEW PATH\n ArrayList<Integer> winPath = new ArrayList();\n \n // THIS HAS THE APPROXIMATE PATH NODES, WHICH WE'LL SLIGHTLY\n // RANDOMIZE FOR EACH TILE FOLLOWING THE PATH.\n winPath.add(getGameWidth() - 8*WIN_PATH_COORD);\n winPath.add(getGameHeight() - 6*WIN_PATH_COORD);\n \n winPath.add(getGameWidth() - 10*WIN_PATH_COORD);\n winPath.add(getGameHeight() - 4*WIN_PATH_COORD);\n \n winPath.add(getGameWidth() - 10*WIN_PATH_COORD); \n winPath.add(getGameHeight() - 2*WIN_PATH_COORD);\n \n winPath.add(getGameWidth() - 8*WIN_PATH_COORD); \n winPath.add(getGameHeight() - 1*WIN_PATH_COORD);\n \n winPath.add(getGameWidth() - 6*WIN_PATH_COORD); \n winPath.add(getGameHeight() - 1*WIN_PATH_COORD);\n \n winPath.add(getGameWidth() - 4*WIN_PATH_COORD); \n winPath.add(getGameHeight() - 2*WIN_PATH_COORD);\n \n winPath.add(getGameWidth() - 4*WIN_PATH_COORD); \n winPath.add(getGameHeight() - 4*WIN_PATH_COORD);\n \n winPath.add(getGameWidth() - 6*WIN_PATH_COORD); \n winPath.add(getGameHeight() - 6*WIN_PATH_COORD);\n \n // START THE ANIMATION FOR ALL THE TILES\n for (int i = 0; i < stackTiles.size(); i++)\n {\n // GET EACH TILE\n MahjongSolitaireTile tile = stackTiles.get(i);\n \n // MAKE SURE IT'S MOVED EACH FRAME\n movingTiles.add(tile); \n \n // AND GET IT ON A PATH\n tile.initWinPath(winPath);\n }\n }",
"public void actionPerformed(ActionEvent e)\n {\n if(jumpState != 2){\n //if the player is not jumping this if else statement will\n //change the character from leg out to leg in position\n if(jumpState == 1){\n //sets the image to have the leg in\n jumpState = 0;\n }\n else{\n //sets the image to have the leg out\n jumpState = 1;\n }\n\n }\n\n }",
"@Test\n\tpublic void animationTest() {\n\t\t\n\t\tMap<Direction, TimeAnimation> animationMap = Player.makePlayerAnimation(PlayerType.CAVEMAN.name(), \n\t\t\t\tPlayerState.IDLE, 1, 1, null);\n\t\t\n\t\t// Test setting idle animation to north\n\t\tarcher.setAnimation(animationMap.get(Direction.N));\n\t\t\n\t\t// Test setting idle animation to south\n\t\tarcher.setAnimation(animationMap.get(Direction.S));\n\t\t\t\t\n\t\t// Test setting idle animation to south west\n\t\tarcher.setAnimation(animationMap.get(Direction.SW));\n\t}",
"protected void setSprite(Image i){\n sprites = new HashMap<Facing,Image>();\n sprites.put(Facing.RIGHT, i);\n sprites.put(Facing.LEFT , i.getFlippedCopy(true, false));\n }",
"protected abstract void setTile( int tile, int x, int y );",
"public void changeImage() {\r\n this.image = ColourDoor.image2;\r\n }",
"void move(Tile t);",
"@Override\n public void draw(SpriteBatch batch) {\n\n stateTime += Gdx.graphics.getDeltaTime();\n if(hurtTime > 0) hurtTime -= Gdx.graphics.getDeltaTime();\n\n if(direction != EntityModel.AnimDirection.NONE) {\n sprite.setRegion((TextureRegion) animations.get(direction.ordinal()).getKeyFrame(stateTime, true));\n\n } else sprite.setRegion(idleSprites.get(previousDirection.ordinal()));\n\n sprite.draw(batch);\n }",
"public void act() \r\n {\r\n if(timeInterval > 0) {\r\n timeInterval--;\r\n }else{\r\n if(currentSprite < 30) {\r\n currentSprite++;\r\n GreenfootImage img = new GreenfootImage(\"explosion_\" + currentSprite + \".png\");\r\n img.scale(img.getWidth() / 2 + 25, img.getHeight() / 2 + 25);\r\n setImage(img);\r\n timeInterval = timeIntervalDef;\r\n }else{\r\n getWorld().removeObject(this);\r\n }\r\n }\r\n }",
"public void changeIcon(){\r\n\t\tif (pacman.direction.equals(\"up\")){\r\n\t\t\tif (mouthOpen)\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/UpClosed.png\"));\r\n\t\t\telse\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/UpOpened.png\"));\r\n\t\t}\r\n\t\tif (pacman.direction.equals(\"down\")){\r\n\t\t\tif (mouthOpen)\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/DownClosed.png\"));\r\n\t\t\telse\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/DownOpened.png\"));\r\n\t\t}\r\n\t\tif (pacman.direction.equals(\"left\")){\r\n\t\t\tif (mouthOpen)\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/LeftClosed.png\"));\r\n\t\t\telse\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/LeftOpened.png\"));\r\n\t\t}\r\n\t\tif (pacman.direction.equals(\"right\")){\r\n\t\t\tif (mouthOpen)\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/RightClosed.png\"));\r\n\t\t\telse\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/RightOpened.png\"));\r\n\t\t}\r\n\t\t\r\n\t\tmouthOpen = !mouthOpen;\r\n\t}",
"public void playerAnimation(){\r\n \r\n switch (gif) {\r\n case 5:\r\n j= new ImageIcon(getClass().getResource(\"/\" + Character.choosen_char + \"_1.png\"));\r\n img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n ;\r\n break;\r\n case 15:\r\n j = new ImageIcon(getClass().getResource(\"/\"+ Character.choosen_char + \"_2.png\"));\r\n img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n break;\r\n case 20:\r\n j = new ImageIcon(getClass().getResource(\"/\"+ Character.choosen_char + \"_3.png\"));\r\n img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n\r\n break;\r\n case 35:\r\n j = new ImageIcon(getClass().getResource(\"/\" + Character.choosen_char + \"_4.png\"));\r\n img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n\r\n break;\r\n case 45:\r\n j = new ImageIcon(getClass().getResource(\"/\" + Character.choosen_char + \"_5.png\"));\r\n img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n\r\n break;\r\n case 55:\r\n j = new ImageIcon(getClass().getResource(\"/\" + Character.choosen_char + \"_6.png\"));\r\n img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n\r\n break;\r\n case 65:\r\n // j= new ImageIcon(\"D:\\\\Netbeans\\\\Projects\\\\ProjectZ\\\\src\\\\shi_1.png\");\r\n // img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n // \r\n gif = 0;\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n }",
"public void setTile(Tile tile) {\n\t\tthis.tile = tile;\n\t}",
"private void animateRight(){\n if(frame == 1){\n setImage(run1);\n }\n else if(frame == 2){\n setImage(run2);\n }\n else if(frame == 3){\n setImage(run3);\n }\n else if(frame == 4){\n setImage(run4);\n }\n else if(frame == 5){\n setImage(run5);\n }\n else if(frame == 6){\n setImage(run6);\n }\n else if(frame == 7){\n setImage(run7);\n }\n else if(frame == 8){\n setImage(run8);\n frame =1;\n return;\n }\n frame ++;\n }",
"void setTileChanged(@Nonnull Location location);",
"public void updateBonusTile(String bonusTileIndex){\n\n Image image = new Image(bonusTilesMap.get(bonusTileIndex));\n bonusTile.setImage(image);\n }",
"@Override\n\tprotected void loadWalkRight() {\n\t\tthis.walkRight = new Animation(RenderableHolder.getInstance().skullMonsterSprite, frameWidth, frameHeight,\n\t\t\t\twalkFrameCount, 2, 1);\n\t\tthis.walkRight.setOffset(offsetX, offsetY);\n\t\tthis.walkRight.setPosition(this.logicalX, this.logicalY);\n\n\t}",
"@Override\n public void update() {\n// if (anim > 10000) anim = 0;\n// else anim++;\n setMousePossition();\n if (feildIsRightClicked()) {\n renderClicks = true;\n cannon.FireCannon();\n }\n else renderClicks = false;\n for (int i = 0; i < projectiles.size(); i++) {\n if (projectiles.get(i).isRemoved()) projectiles.remove(i);\n else projectiles.get(i).update();\n }\n }",
"public void Boom()\r\n {\r\n image1 = new GreenfootImage(\"Explosion1.png\");\r\n image2 = new GreenfootImage(\"Explosion2.png\");\r\n image3 = new GreenfootImage(\"Explosion3.png\");\r\n image4 = new GreenfootImage(\"Explosion4.png\");\r\n image5 = new GreenfootImage(\"Explosion5.png\");\r\n image6 = new GreenfootImage(\"Explosion6.png\");\r\n setImage(image1);\r\n\r\n }",
"public void changeDirection(int image){\n this.image = image; \n }",
"@Override\n\tpublic void enter() {\n\t\t//Update dimensions\n\t\tattachedTo.setWidth(20);\n\t\tattachedTo.setHeight(20);\n\t\t\n\t\t//set image of player to overworld image\n\t\tattachedTo.setShape(new Ellipse2D.Double(), Color.green);\n\t\tattachedTo.updateShape();\n\t\t\n\t\t\n\t\t//Set the sprite to testspritesheet (until image for overworld state is made)\n\t\t//Now sets the sprite to a test spritesheet\n\t\tattachedTo.setSprite(Directory.spriteLibrary.get(\"HeroOverworld\"));\n\t\t\n\t\t//Queue up an animation of row 0 in spritesheet to repeat\n\t\tattachedTo.getSprite().queueAnimation(0, false);\n\t\t\n\t\t//Start timing movement by getting previous time\n\t\tpreviousTime = System.currentTimeMillis();\n\t}",
"public Mario(){\n setImage(\"06.png\");\n \n }",
"public void setHeroWalkRight(Animation<TextureRegion> heroWalkRight) {\n this.heroWalkRight = heroWalkRight;\n }",
"private TextureRegion createJumpingAnimation(MyCumulusGame game) {\n Texture jumping = game.getAssetManager().get(\"bird.png\");\n //todo check if this is correct\n return new TextureRegion(jumping, 2/3f,0f,1f,1/3f);\n }",
"@Override\n public void update(){\n getNextPosition();\n checkTileMapCollision();\n setPosition(xtemp, ytemp);\n animation.update();\n }",
"public void cargarGameScreenTiled() {\n\n musicaTiled = get(rutaMusica, Music.class);\n musicaTiled.setLooping(true);\n platMusicInGame();\n\n TextureAtlas atlas = get(atlasTiledStuff, TextureAtlas.class);\n tiledMap = get(rutaTiled, TiledMap.class);\n\n SkeletonJson json = new SkeletonJson(atlas);\n json.setScale(.01f);\n ponySkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/personajes.json\"));\n // ponySkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/characters.json\"));\n json.setScale(.004f);\n skeletonBombData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/bombs.json\"));\n bombAnim = skeletonBombData.findAnimation(\"b1\");\n bombExAnim = skeletonBombData.findAnimation(\"b2x\");\n\n json.setScale(.005f);\n skeletonMonedaData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/coin.json\"));\n monedaAnim = skeletonMonedaData.findAnimation(\"normal\");\n monedaTomadaAnim = skeletonMonedaData.findAnimation(\"plus1\");\n\n json.setScale(.009f);\n chileSkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/chile.json\"));\n chileAnim = chileSkeletonData.findAnimation(\"normal\");\n chileTomadaAnim = chileSkeletonData.findAnimation(\"toospicy\");\n\n json.setScale(.009f);\n globoSkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/ballons.json\"));\n globoAnim = globoSkeletonData.findAnimation(\"normal\");\n globoTomadaAnim = globoSkeletonData.findAnimation(\"plus5\");\n\n json.setScale(.009f);\n dulceSkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/chocolate.json\"));\n dulceAnim = dulceSkeletonData.findAnimation(\"normal\");\n dulceTomadaAnim = dulceSkeletonData.findAnimation(\"speedup\");\n\n medallaPrimerLugar = atlas.findRegion(\"imagenes/podio/1stplacetrophy\");\n medallaSegundoLugar = atlas.findRegion(\"imagenes/podio/2ndplace\");\n medallaTercerLugar = atlas.findRegion(\"imagenes/podio/3rdplace\");\n congratulations = atlas.findRegion(\"imagenes/podio/congratulations\");\n youLose = atlas.findRegion(\"imagenes/podio/youlose\");\n timeUp = atlas.findRegion(\"imagenes/podio/timeup\");\n\n // json.setScale(.003f);\n // SkeletonData fuegoSkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/bombs.json\"));\n // fuegoAnim = fuegoSkeletonData.findAnimation(\"firedancing\");\n // fuegoSkeleton = new Skeleton(fuegoSkeletonData);\n\n json.setScale(.01f);\n SkeletonData fondoSkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/background.json\"));\n fondoAnim = fondoSkeletonData.findAnimation(\"animation\");\n fondoSkeleton = new Skeleton(fondoSkeletonData);\n\n //\n // json.setScale(.011f);\n // SkeletonData fogataSkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/fogata.json\"));\n // fogataAnim = fogataSkeletonData.findAnimation(\"fogata\");\n // fogataSkeleton = new Skeleton(fogataSkeletonData);\n //\n // json.setScale(.005f);\n // SkeletonData plumaSkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/feather.json\"));\n // plumaAnim = plumaSkeletonData.findAnimation(\"pluma\");\n // plumaSkeleton = new Skeleton(plumaSkeletonData);\n //\n // json.setScale(.011f);\n // SkeletonData bloodStoneSkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/bloodstone.json\"));\n // bloodStoneAnim = bloodStoneSkeletonData.findAnimation(\"animation\");\n // bloodStoneSkeleton = new Skeleton(bloodStoneSkeletonData);\n //\n // SkeletonData bloodStone2SkeletonData = json.readSkeletonData(Gdx.files.internal(\"data/animaciones/bloodstones.json\"));\n // bloodStone2Anim = bloodStone2SkeletonData.findAnimation(\"glow1\");\n // bloodStone2Skeleton = new Skeleton(bloodStone2SkeletonData);\n\n fondo = atlas.findRegion(\"imagenes/fondo\");\n\n padIzq = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/pad_izq\")));\n padDer = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/pad_derecha\")));\n btBombaDown = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/bombasalpresionar\")));\n btBombaUp = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/bombasinpresionar\")));\n\n btJumpDown = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/saltoalpresionar\")));\n btJumpUp = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/saltosinpresionar\")));\n // btTroncoUp = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/botontroncosinpresionar\")));\n // btTroncoDown = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/botontroncopresionado\")));\n\n btTroncoUp = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/btPlatanoTachuelas\")));\n btTroncoDown = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/btPlatanoTachuelasPresionado\")));\n\n btPauseUp = new NinePatchDrawable(new NinePatch(atlas.findRegion(\"Interfaz/pause\")));\n\n indicador = atlas.findRegion(\"Interfaz/indicador\");\n indicadorCloud = atlas.findRegion(\"Interfaz/icono000\");\n indicadorCientifico = atlas.findRegion(\"Interfaz/icono001\");\n indicadorMinion = atlas.findRegion(\"Interfaz/icono002\");\n indicadorNatylol = atlas.findRegion(\"Interfaz/icono003\");\n indicadorLighthingAlba = atlas.findRegion(\"Interfaz/icono004\");\n indicadorIgnis = atlas.findRegion(\"Interfaz/icono005\");\n\n perfilRegionCloud = atlas.findRegion(\"perfiles/cloud\");\n perfilRegionNatylol = atlas.findRegion(\"perfiles/natylol\");\n perfilRegionIgnis = atlas.findRegion(\"perfiles/ignis\");\n perfilRegionCientifico = atlas.findRegion(\"perfiles/scientist\");\n perfilRegionLAlba = atlas.findRegion(\"perfiles/lightingalba\");\n perfilRegionEnemigo = atlas.findRegion(\"perfiles/enemy\");\n\n lugaresMarco = atlas.findRegion(\"Interfaz/lugares\");\n\n moneda = atlas.findRegion(\"moneda\");\n\n tronco = atlas.findRegion(\"tachuelas\");\n tachuelas = atlas.findRegion(\"tachuelas\");\n platano = atlas.findRegion(\"platano\");\n\n pickCoin = get(\"data/musica/coin.mp3\");\n jump = get(\"data/musica/salto.mp3\");\n }",
"void setAnimation(Animation animation) {\n prevHeight = spriteHeight;\n currAnimation = animation;\n spriteWidth = animation.getSpriteWidth();\n spriteHeight = animation.getSpriteHeight();\n }",
"@Override\n public Sprite createSprite(MyCumulusGame game) {\n walkingAnimation = createWalkingAnimation(game);\n jumpingAnimation = createJumpingAnimation(game);\n\n return new Sprite(jumpingAnimation);\n }",
"public void atacar() {\n texture = new Texture(Gdx.files.internal(\"recursos/ataques.png\"));\n rectangle=new Rectangle(x,y,texture.getWidth(),texture.getHeight());\n tmp = TextureRegion.split(texture, texture.getWidth() / 4, texture.getHeight() / 4);\n switch (jugadorVista) {\n case \"Derecha\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[2][b];\n animation = new Animation((float) 0.1, regions);\n tiempo = 0f;\n }\n break;\n case \"Izquierda\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[3][b];\n animation = new Animation((float) 0.1, regions);\n tiempo = 0f;\n }\n break;\n case \"Abajo\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[0][b];\n animation = new Animation((float) 0.1, regions);\n tiempo = 0f;\n }\n break;\n case \"Arriba\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[1][b];\n animation = new Animation((float) 0.1, regions);\n tiempo = 0f;\n }\n break;\n }\n }",
"public void updateImage(GameObject.Direction direction) {\n switch (direction) {\n case NORTH:\n currentImage = north;\n break;\n\n case SOUTH:\n currentImage = south;\n break;\n\n case WEST:\n currentImage = west;\n break;\n\n case EAST:\n currentImage = east;\n break;\n }\n }",
"Board() {\n currentlyPlacedShip = null;\n imageMap = new TreeMap<ShipType, Image>();\n fillImageMap();\n try {\n hit = ImageIO.read(getClass().getResource(\"img/hit.gif\"));\n board = ImageIO.read(getClass().getResource(\"img/board.gif\"));\n mishit = ImageIO.read(getClass().getResource(\"img/mishit.gif\"));\n } catch(IOException e) {\n e.printStackTrace();\n }\n }",
"public void update()\n {\n // get the GridSquare object from the world\n Terrain terrain = game.getTerrain(row, column);\n boolean squareVisible = game.isVisible(row, column);\n boolean squareExplored = game.isExplored(row, column);\n \n if (game.hasPlayer(row, column)){\n setImage2(\"images/player.png\");\n } else {\n player = null;\n }\n \n //ImageIcon image = null;//new ImageIcon(\"images/blank.png\");\n JLabel lblImage = new JLabel(); // create a new label to put an image on\n \n // call the method to set a new Buffered image to this panel\n \n if (squareVisible && image == null){\n switch ( terrain )\n {\n case SAND : setImage(\"images/sand.png\"); break;// = new ImageIcon(\"images/sand.png\"); break;\n case FOREST : setImage(\"images/forest.png\"); break;\n case WETLAND : setImage(\"images/wetland.png\"); break;\n case SCRUB : setImage(\"images/scrub.png\"); break;\n case WATER : setImage(\"images/water.png\"); break;\n default : image = null; break;\n }\n }\n \n// this is old code that use to change the graphics, trying BufferedImage instead of IconImage\n// switch ( terrain )\n// {\n// case SAND : setImage(\"images/forest.png\");// = new ImageIcon(\"images/sand.png\"); break;\n// case FOREST : image = new ImageIcon(\"images/forest.png\"); break;\n// case WETLAND : image = new ImageIcon(\"images/wetland.png\"); break;\n// case SCRUB : image = new ImageIcon(\"images/scrub.png\"); break;\n// case WATER : image = new ImageIcon(\"images/water.png\"); break;\n// default : image = null; break;\n// }\n \n if ( squareExplored || squareVisible )\n {\n // Set the text of the JLabel according to the occupant\n lblText.setText(game.getOccupantStringRepresentation(row,column)); \n }\n else {\n lblText.setText(\"\");\n image = null;\n }\n \n // if the game is not being played, remove the activeBorder (this fixes the multiple borders glitch)\n// if (game.getState() != GameState.PLAYING) {\n// setBorder(normalBorder);\n// } \n \n // set the redsquare border to active if the player is here\n setBorder(game.hasPlayer(row,column) ? activeBorder : normalBorder);\n \n\n // add the imageIcon to the gridsquare panel\n //lblImage.setIcon((Icon) image); // add the image to the label\n this.add(lblImage); // add the jlabel image to the current gridsquare\n \n JLabel lblImage2 = new JLabel(); \n this.add(lblImage2);\n \n }",
"public void animateMovementUp()\n {\n if(animationCount%frameRate == 0)\n {\n imageNumber = (imageNumber + 1)% (upMvt.length);\n setImage(upMvt[imageNumber]);\n } \n }",
"public void animateMovementDown()\n {\n if(animationCount%frameRate == 0)\n {\n imageNumber = (imageNumber + 1)% (downMvt.length);\n setImage(downMvt[imageNumber]);\n } \n }",
"void reset() {\n setPosition(-(TILE_WIDTH * CYCLE), TOP_Y);\n mySequenceIndex = 0;\n setAnimatedTile(myAnimatedTileIndex, FRAME_SEQUENCE[mySequenceIndex]);\n }",
"protected void setAnimation(BufferedImage[] sprites, int delay) {\r\n animation.setFrames(sprites);\r\n animation.setDelay(delay);\r\n }",
"public MovingTile(double locx, double locy, double width, double height, Image[] imgs, Tile[][] tiles, Hero hero, Sprite[] enemies,TurningPoint[] turningPoints,boolean movingHorizontal) {\r\n super(locx, locy, width, height, imgs, tiles, hero);\r\n g = 0;\r\n speed = tileW*0.2;\r\n state = imgs[1];\r\n this.hero = hero;\r\n this.enemies = enemies;\r\n this.turningPoints = turningPoints;\r\n if (movingHorizontal)\r\n vx = -speed;\r\n else\r\n vy = -speed;\r\n\r\n movingTile = true;\r\n inFrame = true;\r\n\r\n }",
"@Override\r\n\tpublic void onStargateOpened(MapElement mapElement, ProjectileType type, Direction direction) {\r\n\t\tstargates.put(type, new RotatableElement(mapElement.getCoord(),\r\n\t\t\t\tUIUtility.getImage(\"stargate_\" + type.name().toLowerCase()), UIUtility.getRotationAngle(direction)));\r\n\r\n\t\tUILogger.log(type + \" changed\");\r\n\r\n\t\t// Notify the GamePanel that its contents need to be repainted\r\n\t\tparent.repaint();\r\n\t\tUILogger.log(\"GamePanel.repaint()\");\r\n\t}",
"private void initIdleDown() {\n int x = 0;\n int y = 0;\n int newRow = 3;\n BufferedImage[] temp = new BufferedImage[IDLE_DOWN_IMAGE_COUNT];\n for(int i = 0; i < IDLE_DOWN_IMAGE_COUNT; i++){\n temp[i] = spriteManager.getCharacter().get(\"Character\").get(\"idleDown.png\").getSubimage(x, y, 64, 64); \n x += 64;\n \n if(i == newRow){\n x = 0;\n y += 64;\n newRow += 3;\n }\n }\n \n idleDown = new Animation(10, temp[0], temp[1], temp[2], temp[3], temp[4]);\n }",
"public void switchDirection(String monster) {\n isFacingRight = !isFacingRight;\n if (isFacingRight) {\n spriteBase.setImage(monster + \"Right.png\");\n } else {\n spriteBase.setImage(monster + \"Left.png\");\n }\n }",
"@Override\n\tpublic void paint(Graphics g) {\n\t\tg.drawImage(iMonster, (int)x, (int)rely, (int)width, (int)height,null);\n\t}",
"public void walking(final Player p){\n timerListener = new ActionListener()\n {\n public void actionPerformed(ActionEvent e)\n {\n //test to see if the player is currently jumping\n if(jumpState != 2){\n //if the player is not jumping this if else statement will\n //change the character from leg out to leg in position\n if(jumpState == 1){\n //sets the image to have the leg in\n jumpState = 0;\n }\n else{\n //sets the image to have the leg out\n jumpState = 1;\n }\n\n }\n\n }\n };\n //creates the timer for continous animation of walkListener\n walker = new Timer(getWalkSpeed(), timerListener);\n //starts timer for walk animation\n walker.start();\n ActionListener walkIncListener = new ActionListener()\n {\n public void actionPerformed(ActionEvent e)\n {\n if (getWalkSpeed() > WALK_SPEED_MIN)\n {\n System.out.println(\"1\");\n walker.stop();\n incWalkSpeed(getWalkSpeedInc());\n walker = new Timer(getWalkSpeed(), timerListener);\n walker.start();\n }\n else\n {\n walkInc.stop();\n System.out.println(\"2\");\n }\n\n }\n };\n walkInc = new Timer(WALK_SPEED, walkIncListener);\n //starts timer for walk animation\n walker.start();\n ActionListener dead = new ActionListener()\n {\n public void actionPerformed(ActionEvent e)\n {\n if(p.isAlive() == false){\n walker.stop();\n }\n }\n };\n Timer kill = new Timer(100, dead);\n kill.start();\n\n }",
"public void blit() {}",
"public void act() \n {\n //plays animation with a delay between frames\n explosionSound.play();\n i = (i+1)%(frames.length); \n setImage(frames[i]);\n if(i == 0) getWorld().removeObject(this);\n }",
"@Override\r\n public void update() {\r\n // Animate sprite\r\n if (this.spriteTimer++ >= 4) {\r\n this.spriteIndex++;\r\n this.spriteTimer = 0;\r\n }\r\n if (this.spriteIndex >= this.animation.length) {\r\n this.destroy();\r\n } else {\r\n this.sprite = this.animation[this.spriteIndex];\r\n }\r\n }",
"public MyAnimation getSprite();",
"public void animationTakeHit(ImageView m){\n animation = AnimationUtils.loadAnimation(context,R.anim.anim_recibir_golpe);\n m.startAnimation(animation);\n }",
"public Animation<TextureRegion> getHeroWalkDown() {\n return heroWalkDown;\n }",
"public void update() {\n\t\tif (MainClass.getPlayer().isJumping()) {\n\t\t\tcurrentImage = characterJumped;\n\t\t} else if(Math.abs(MainClass.getPlayer().getSpeedY()) > Player.getFallspeed() ) {\n\t\t\tcurrentImage = characterJumped;\n\t\t} else if(MainClass.getPlayer().isCovered() == true) {\n\t\t\tcurrentImage = characterCover;\n\t\t} else if(MainClass.getPlayer().isJumping() == false && MainClass.getPlayer().isCovered() == false) {\n\t\t\tcurrentImage = super.getCurrentImage();\n\t\t}\n\t\tthis.update(25);\n\t\n\t}",
"public void init() {\n\t\t// Image init\n\t\tcharacter_static = MainClass.getImage(\"\\\\data\\\\character.png\");\n\t\tcharacter_static2 = MainClass.getImage(\"\\\\data\\\\character2.png\");\n\t\tcharacter_static3 = MainClass.getImage(\"\\\\data\\\\character3.png\");\n\t\t\n\t\tcharacterCover = MainClass.getImage(\"\\\\data\\\\cover.png\");\n\t\tcharacterJumped = MainClass.getImage(\"\\\\data\\\\jumped.png\");\n\t\t\n\t\t// Animated when static.\n\t\tthis.addFrame(character_static, 2000);\n\t\tthis.addFrame(character_static2, 50);\n\t\tthis.addFrame(character_static3, 100);\n\t\tthis.addFrame(character_static2, 50);\n\t\t\n\t\tthis.currentImage = super.getCurrentImage();\n\t}",
"public Ju(){\n\t\tsuper(STARTING_X, STARTING_Y);\n\t\tsetIsJumping(true);\n\t\tdy = STARTING_DY;\n\t\tjumpHeight = INITIAL_JUMP_HEIGHT;\n\t\thealth = STARTING_LIFE;\n\t\tisStageComplete = false;\n\t\tpoint = 0;\n\t\t//A Sound obj\n\t\t\n\t\t//LOAD THE IMAGES AND CREATE ANIMATION. #check\n\t\tBufferedImage[] rightImages = {ImageManipulator.loadImage(\"Data/Ju/stillRight.png\"), ImageManipulator.loadImage(\"Data/Ju/runRight1.png\"),\n\t\t\t\t\tImageManipulator.loadImage(\"Data/Ju/runRight2.png\"), ImageManipulator.loadImage(\"Data/Ju/runRight3.png\"),\n\t\t\t\t\tImageManipulator.loadImage(\"Data/Ju/runRight4.png\"), ImageManipulator.loadImage(\"Data/Ju/stillJumpRight1.png\"),\n\t\t\t\t\tImageManipulator.loadImage(\"Data/Ju/stillJumpRight2.png\"), ImageManipulator.loadImage(\"Data/Ju/runningJumpRight1.png\"),\n\t\t\t\t\tImageManipulator.loadImage(\"Data/Ju/runningJumpRight2.png\"), ImageManipulator.loadImage(\"Data/Ju/runningJumpRight3.png\"),\n\t\t\t\t\tImageManipulator.loadImage(\"Data/Ju/stillSitRight.png\"), ImageManipulator.loadImage(\"Data/Ju/stillUpRight.png\"),\n\t\t\t\t\tImageManipulator.loadImage(\"Data/Ju/deadRight1.png\"), ImageManipulator.loadImage(\"Data/Ju/deadRight2.png\"), \n\t\t\t\t\tImageManipulator.loadImage(\"Data/Ju/deadRight3.png\"), ImageManipulator.loadImage(\"Data/Ju/runRight5.png\"),\n\t\t\t\t\tImageManipulator.loadImage(\"Data/Ju/runRight6.png\"), ImageManipulator.loadImage(\"Data/Ju/runRight7.png\"),\n\t\t\t\t\tImageManipulator.loadImage(\"Data/Ju/runRight8.png\"), ImageManipulator.loadImage(\"Data/Ju/runRightNew.png\"),\n\t\t\t\t\tImageManipulator.loadImage(\"Data/Ju/stageWin1.png\"), ImageManipulator.loadImage(\"Data/Ju/stageWin2.png\"),\n\t\t\t\t\tImageManipulator.loadImage(\"Data/Ju/stageWin3.png\"), ImageManipulator.loadImage(\"Data/Ju/stageWin4.png\"),\n\t\t\t\t\tImageManipulator.loadImage(\"Data/Ju/stageWin5.png\")};\n\t\t//0 == still right\n\t\t//1-4 == walk & run right\n\t\t//5-6 == still jump right\n\t\t//7-9 == running jump right\n\t\t//10 == sit right\n\t\t//11 == still up right\n\t\t//12-14 == dead right\n\t\t//15-16 17 18 == walk & run right new\n\t\t// 19-20 == walk right new\n\t\t//21-24 == win\n\t\tBufferedImage[] leftImages = {null, null, null, null, null, null, null, null, null,\n\t\t\t\tnull, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null};\n\t\tfor(int i=0; i<rightImages.length; i++){\n\t\t\tleftImages[i] = ImageManipulator.horizontalFlip(rightImages[i]);\n\t\t}\n\t\t\n\t\tstillLeft = new Animation(ANIM_TIME).addFrame(leftImages[0]);\n\t\twalkLeft = new Animation(ANIM_TIME+30).addFrame(leftImages[1]).addFrame(leftImages[4]).addFrame(leftImages[15]).addFrame(leftImages[19]).addFrame(leftImages[18]);\n\t\trunLeft = new Animation(ANIM_TIME).addFrame(leftImages[1]).addFrame(leftImages[2]).addFrame(leftImages[3]).addFrame(leftImages[4]).addFrame(leftImages[15]).addFrame(leftImages[16]).addFrame(leftImages[17]).addFrame(leftImages[18]);\n\t\tsitLeft = new Animation(ANIM_TIME).addFrame(leftImages[10]);\n\t\tstillJumpLeft = new Animation(ANIM_TIME).addFrame(leftImages[5], 300).addFrame(leftImages[6], 4000);\n\t\trunningJumpLeft = new Animation(ANIM_TIME).addFrame(leftImages[7]).addFrame(leftImages[8], 400).addFrame(leftImages[9], 4000);\n\t\tchangeLeft = new Animation(ANIM_TIME).addFrame(leftImages[1]);\n\t\tstillUpLeft = new Animation(ANIM_TIME).addFrame(leftImages[11]);\n\t\tdeadLeft = new Animation(ANIM_TIME-30).addFrame(leftImages[12], 500).addFrame(leftImages[13]).addFrame(leftImages[14], 3000);\n\t\t\n\t\tstillRight = new Animation(ANIM_TIME).addFrame(rightImages[0]);\n\t\twalkRight = new Animation(ANIM_TIME+30).addFrame(rightImages[1]).addFrame(rightImages[4]).addFrame(rightImages[15]).addFrame(rightImages[19]).addFrame(rightImages[18]);\n\t\trunRight = new Animation(ANIM_TIME).addFrame(rightImages[1]).addFrame(rightImages[2]).addFrame(rightImages[3]).addFrame(rightImages[4]).addFrame(rightImages[15]).addFrame(rightImages[16]).addFrame(rightImages[17]).addFrame(rightImages[18]);\n\t\tsitRight = new Animation(ANIM_TIME).addFrame(rightImages[10]);\n\t\tstillJumpRight = new Animation(ANIM_TIME).addFrame(rightImages[5], 300).addFrame(rightImages[6], 4000);\n\t\trunningJumpRight = new Animation(ANIM_TIME).addFrame(rightImages[7]).addFrame(rightImages[8], 400).addFrame(rightImages[9], 4000);\n\t\tchangeRight = new Animation(ANIM_TIME).addFrame(rightImages[1]);\n\t\tstillUpRight = new Animation(ANIM_TIME).addFrame(rightImages[11]);\n\t\tdeadRight = new Animation(ANIM_TIME-60).addFrame(rightImages[12], 500).addFrame(rightImages[13]).addFrame(rightImages[14], 3000);\n\t\t\n\t\tstageWin = new Animation(ANIM_TIME+60).addFrame(rightImages[0]).addFrame(rightImages[20]).addFrame(rightImages[21]).addFrame(rightImages[22]).addFrame(rightImages[23]).addFrame(rightImages[24]);\n\t\t\n\t\tsetAnimation(stillRight);\n\t\tcurrLeftAnim = walkLeft;\n\t\tcurrRightAnim = walkRight;\n\t}",
"public void initTiles()\n {\n PropertiesManager props = PropertiesManager.getPropertiesManager(); \n String imgPath = props.getProperty(MahjongSolitairePropertyType.IMG_PATH);\n int spriteTypeID = 0;\n SpriteType sT;\n \n // WE'LL RENDER ALL THE TILES ON TOP OF THE BLANK TILE\n String blankTileFileName = props.getProperty(MahjongSolitairePropertyType.BLANK_TILE_IMAGE_NAME);\n BufferedImage blankTileImage = miniGame.loadImageWithColorKey(imgPath + blankTileFileName, COLOR_KEY);\n ((MahjongSolitairePanel)(miniGame.getCanvas())).setBlankTileImage(blankTileImage);\n \n // THIS IS A HIGHLIGHTED BLANK TILE FOR WHEN THE PLAYER SELECTS ONE\n String blankTileSelectedFileName = props.getProperty(MahjongSolitairePropertyType.BLANK_TILE_SELECTED_IMAGE_NAME);\n BufferedImage blankTileSelectedImage = miniGame.loadImageWithColorKey(imgPath + blankTileSelectedFileName, COLOR_KEY);\n ((MahjongSolitairePanel)(miniGame.getCanvas())).setBlankTileSelectedImage(blankTileSelectedImage);\n \n // FIRST THE TYPE A TILES, OF WHICH THERE IS ONLY ONE OF EACH\n // THIS IS ANALOGOUS TO THE SEASON TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeATiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_A_TILES);\n for (int i = 0; i < typeATiles.size(); i++)\n {\n String imgFile = imgPath + typeATiles.get(i); \n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID);\n initTile(sT, TILE_A_TYPE);\n spriteTypeID++;\n }\n \n // THEN THE TYPE B TILES, WHICH ALSO ONLY HAVE ONE OF EACH\n // THIS IS ANALOGOUS TO THE FLOWER TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeBTiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_B_TILES);\n for (int i = 0; i < typeBTiles.size(); i++)\n {\n String imgFile = imgPath + typeBTiles.get(i); \n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID);\n initTile(sT, TILE_B_TYPE);\n spriteTypeID++;\n }\n \n // AND THEN TYPE C, FOR WHICH THERE ARE 4 OF EACH \n // THIS IS ANALOGOUS TO THE CHARACTER AND NUMBER TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeCTiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_C_TILES);\n for (int i = 0; i < typeCTiles.size(); i++)\n {\n String imgFile = imgPath + typeCTiles.get(i);\n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID); \n for (int j = 0; j < 4; j++)\n {\n initTile(sT, TILE_C_TYPE);\n }\n spriteTypeID++;\n }\n }",
"public void setUpAnimations(){\n //Vertical movement animation\n this.verticalMovement = new Animation[NUMBER_OF_VERTICAL_FRAMES]; //Number of images\n TextureRegion[][] heroVerticalSpriteSheet = TextureRegion.split(new Texture(\"img/hero/hero_vertical.png\"), HERO_WIDTH_PIXEL, HERO_HEIGHT_PIXEL); //TODO: Load atlas?\n\n for(int i = 0; i < NUMBER_OF_VERTICAL_FRAMES; i++)\n verticalMovement[i] = new Animation(ANIMATION_SPEED, heroVerticalSpriteSheet[0][i]); //TODO HANDLE EXCEPTION?\n\n //Jump animation\n this.jumpMovement = new Animation[NUMBER_OF_JUMP_FRAMES];\n TextureRegion[][] heroJumpSpriteSheet = TextureRegion.split(new Texture(\"img/hero/hero_jump.png\"), HERO_WIDTH_PIXEL, HERO_HEIGHT_PIXEL); //TODO: Load atlas?\n\n for(int i = 0; i < NUMBER_OF_JUMP_FRAMES; i++)\n jumpMovement[i] = new Animation(ANIMATION_SPEED, heroJumpSpriteSheet[0][i]); //TODO HANDLE EXCEPTION?\n\n }",
"private void initAnim()\n {\n \t\n //leftWalk = AnimCreator.createAnimFromPaths(Actor.ANIM_DURATION, \n // AUTO_UPDATE, leftWalkPaths);\n // get the images for leftWalk so we can flip them to use as right.#\n \tImage[] leftWalkImgs = new Image[leftWalkPaths.length];\n \tImage[] rightWalkImgs = new Image[leftWalkPaths.length];\n \tImage[] leftStandImgs = new Image[leftStandPaths.length];\n \tImage[] rightStandImgs = new Image[leftStandPaths.length];\n \t\n \t\n \t\n \tleftWalkImgs = AnimCreator.getImagesFromPaths(\n \t\t\tleftWalkPaths).toArray(leftWalkImgs);\n \t\n \theight = leftWalkImgs[0].getHeight();\n \t\n \trightWalkImgs = AnimCreator.getHorizontallyFlippedCopy(\n \t\t\tleftWalkImgs).toArray(rightWalkImgs);\n \t\n \tleftStandImgs = AnimCreator.getImagesFromPaths(\n \t\t\tleftStandPaths).toArray(leftStandImgs);\n \t\n \trightStandImgs = AnimCreator.getHorizontallyFlippedCopy(\n \t\t\tleftStandImgs).toArray(rightStandImgs);\n \t\n \tboolean autoUpdate = true;\n \t\n \tleftWalk = new /*Masked*/Animation(\n\t\t\t\t\t\t leftWalkImgs, \n\t\t\t\t\t\t Actor.ANIM_DURATION, \n\t\t\t\t\t\t autoUpdate);\n\n \trightWalk = new /*Masked*/Animation(\n \t\t\t\t\t\trightWalkImgs, \n \t\t\t\t\t\tActor.ANIM_DURATION, \n\t\t\t\t autoUpdate);\n \t\n \tleftStand = new /*Masked*/Animation(\n \t\t\t\t\t\tleftStandImgs, \n\t\t\t\t\t\t\tActor.ANIM_DURATION, \n\t\t\t\t\t\t\tautoUpdate);\n \t\n \trightStand = new /*Masked*/Animation(\n \t\t\t\t\t\trightStandImgs, \n \t\t\t\t\t\tActor.ANIM_DURATION,\n \t\t\t\t\t\tautoUpdate);\n \t\n \tsetInitialAnim();\n }",
"private void changeCharacterLocations() {\n if (locationAnimationDirectionSwitch) {\n locationAnimationTicker++;\n } else {\n locationAnimationTicker--;\n }\n\n // While the user's FaceCharacter bobs up, their opponent should bob down.\n heroLocation[1] += locationAnimationTicker;\n antagonistLocation[1] -= locationAnimationTicker;\n\n if (locationAnimationTicker == 5 || locationAnimationTicker == -5) {\n locationAnimationDirectionSwitch = !locationAnimationDirectionSwitch;\n }\n }",
"void setPosition(Tile t);",
"public void render(final SpriteBatch batch) {\n tiempo += Gdx.graphics.getDeltaTime();\n textureRegion = (TextureRegion) animation.getKeyFrame(tiempo, true);\n sprite=new Sprite(textureRegion);\n AnchoJugador=sprite.getWidth()*wReescalado;\n largoJugador=sprite.getHeight()*hReescalado-10;\n setBounds(x,y,sprite.getWidth()*wReescalado,sprite.getHeight()*hReescalado-15);\n batch.draw(sprite, x, y,sprite.getWidth()*wReescalado,sprite.getHeight()*hReescalado);\n }",
"public MyTextureMoon(){\n textureMoon = new Texture(Gdx.files.internal(\"moon2.png\"));\n lastTimeMoon = TimeUtils.nanoTime();\n moonXposition = Gdx.graphics.getWidth() / 2 - textureMoon.getWidth() / 2;\n isXAtBorder = false;\n lastTimeXAtBorder = 0;\n }",
"private void characterLocationAnimations() {\n if (animationToggle) {\n changeCharacterLocations();\n }\n animationToggle = !animationToggle;\n }",
"public void setAnimation() {\r\n\r\n // start outside the screen and move down until the clock is out of sight\r\n ObjectAnimator moveDown = ObjectAnimator.ofFloat(this, \"y\", -100, screenY + 100);\r\n AnimatorSet animSet = new AnimatorSet();\r\n animSet.play(moveDown);\r\n\r\n // Set duration to 4000 milliseconds\r\n animSet.setDuration(4000);\r\n\r\n animSet.start();\r\n\r\n }",
"@Override\n\tpublic void draw() {\n\t\tdouble t = System.currentTimeMillis();\n\t\tdouble dt = t - currentTime;\n\t\tcurrentTime = t;\n\n\t\t// Fetch current animation\n\t\tBaseAnimation animation = AnimationManager.getInstance().getCurrentAnimation();\n\t\tif (animation == null) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Draw animation frame with delta time\n\t\tanimation.draw(dt);\n\n\t\t// Send image to driver\n\t\tdriver.displayImage(animation.getImage());\n\n\t\t// Display previews\n\t\tbackground(0);\n\t\tif (ledPreviewEnabled) {\n\t\t\timage(preview.renderPreview(animation.getImage()), 0, 0);\n\t\t} else {\n\t\t\ttextAlign(CENTER);\n\t\t\ttextSize(16);\n\t\t\ttext(\"Press W to preview the animation.\", previewRect.width/2, previewRect.height/2);\n\t\t}\n\t\t\n\t\tif (sourcePreviewEnabled && BaseCanvasAnimation.class.isAssignableFrom(animation.getClass())) {\n\t\t\timage(((BaseCanvasAnimation) animation).getCanvasImage(), 0, 0);\n\t\t} else if (sourcePreviewEnabled) {\n\n\t\t\t// Copy animation image (else the animation image gets resized)\n\t\t\t// and scale it for better visibility\n\t\t\tPImage sourcePreview = animation.getImage().get();\n\t\t\tsourcePreview.resize(130, 405);\n\n\t\t\timage(sourcePreview, 0, 0);\n\t\t}\n\n\t}",
"public void setMazeSprite(Sprite mazeSprite)\n {\n this.mazeSprite = mazeSprite;\n\n //mazeFrameWidth = frameWidth;\n //mazeFrameHeight = frameHeight;\n }",
"public void death(){\n setCoordinate(super.getGameImage().getCoordInit());\n diminueVies();\n super.initAnimation();\n\n }",
"public void act() \n {\n move(-16);\n \n \n if (isAtEdge())\n {\n setLocation(700,getY());\n }\n \n if (isTouching(Shots.class))\n {\n getWorld().addObject(new SpaceObject(), 500,Greenfoot.getRandomNumber(400));\n }\n \n }",
"protected void animate(GreenfootImage[] images, int currentFrame)\n {\n setImage(images[currentFrame]);\n }",
"public Animation<TextureRegion> getHeroWalkUp() {\n return heroWalkUp;\n }",
"public void go()\n {\n for( int i = 0; i<3; i++)m[i].setSpeed(720);\n step();\n for( int i = 0; i<3; i++)m[i].regulateSpeed(false);\n step();\n }",
"public void renderTileManager()\n {\n background(background);\n tiles[activeTile].drawGrid();\n tiles[activeTile].drawCellHover();\n createPreview(tiles[activeTile]);\n drawPreviewHover();\n drawPreviews();\n }"
]
| [
"0.72064453",
"0.6480292",
"0.5946465",
"0.5866645",
"0.5852269",
"0.58366257",
"0.5828732",
"0.5820677",
"0.57944703",
"0.57912207",
"0.57899743",
"0.57628363",
"0.5758984",
"0.5758652",
"0.57516265",
"0.57371926",
"0.5730826",
"0.57217586",
"0.56999826",
"0.5699591",
"0.5699333",
"0.56950986",
"0.567201",
"0.56517935",
"0.5649582",
"0.56492865",
"0.56446666",
"0.5643066",
"0.5640991",
"0.56353587",
"0.56212234",
"0.5617505",
"0.5616942",
"0.5605808",
"0.55718344",
"0.5545981",
"0.55394053",
"0.55188614",
"0.5496911",
"0.5476799",
"0.5457959",
"0.5445921",
"0.5430744",
"0.54242605",
"0.54172057",
"0.540821",
"0.54070973",
"0.540412",
"0.5403799",
"0.5403221",
"0.5401538",
"0.5401354",
"0.5397664",
"0.5391223",
"0.5390305",
"0.53901446",
"0.5381647",
"0.5380758",
"0.53691363",
"0.53622526",
"0.5360367",
"0.53553766",
"0.5353698",
"0.53492343",
"0.5345689",
"0.53434855",
"0.53391737",
"0.53361315",
"0.5326364",
"0.532587",
"0.5320004",
"0.53172696",
"0.5285513",
"0.5284764",
"0.52845186",
"0.52774394",
"0.526867",
"0.5261702",
"0.526164",
"0.5258959",
"0.5251513",
"0.5248162",
"0.52409434",
"0.5233153",
"0.52300644",
"0.5224865",
"0.5222712",
"0.52195996",
"0.52146065",
"0.5210931",
"0.52039665",
"0.52035975",
"0.51995635",
"0.5196925",
"0.5194762",
"0.5189342",
"0.5189001",
"0.51827836",
"0.51802945",
"0.5178449"
]
| 0.65773714 | 1 |
Creates an Emotion object above the GameObject. | void displayEmotion() {
if (emotion.getLifetime() == 0) { emotion = null; }
else { emotion.decreaseLifetime(); }
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void createPlayerExplosion() {\n\t\tAsteroidsExplosion explosion = new AsteroidsExplosion(GameObject.ROOT, this, 50, 20.0, 3.0);\n\t\texplosion.translate(player.getPositionVector());\n\t\totherObjects.add(explosion);\n\t}",
"private void addHero()\n {\n // Initial horizontal position\n int initialX = TILE_SIZE;\n\n // Instantiate the hero object\n theHero = new Hero(initialX);\n\n // Add hero in bottom left corner of screen\n addObject(theHero, initialX, 8 * TILE_SIZE);\n }",
"PositionedObject(){\n float x = DrawingHelper.getGameViewWidth()/2;\n float y = DrawingHelper.getGameViewHeight()/2;\n _position.set(x,y);\n }",
"@Override\n\tpublic void create() {\n\t\t// TODO: create completely new batches for sprites and models\n\t\tsprites = new SpriteBatch();\n\t\tmodelBatch = new ModelBatch();\n\n\t\t// TODO: create a new environment\n\t\t// set a new color attribute for ambient light in the environment\n\t\t// add a new directional light to the environment\n\n\t\tenvironment = new Environment();\n\t\tenvironment.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.4f, 0.4f, 0.4f, 0.1f));\n\t\tenvironment.add(new DirectionalLight().set(0.8f, 0.8f, 0.8f, -1f, -0.8f, -0.2f));\n\n\t\t// create a new logo texture from the \"data/firstorder.png\" file\n\t\tlogo = new Texture(\"data/firstorder.png\");\n\n\t\t// TODO: create a new perspective camera with a field-of-view of around 70,\n\t\t// and the width and height found in the Gdx.graphics class\n\t\t// set the position of the camera to (100, 100, 100)\n\t\t// set the camera to look at the origin point (0, 0, 0)\n\t\t// set the near and far planes of the camera to 1 and 300\n\t\t// update the camera\n\t\tint width = Gdx.graphics.getWidth();\n\t\tint height = Gdx.graphics.getHeight();\n\t\tcam = new PerspectiveCamera(70f, width, height);\n\t\tcam.position.set(100f,100f,100f);\n\t\tcam.lookAt(0f, 0f, 0f);\n\t\tcam.near = 1f;\n\t\tcam.far = 300f;\n\t\tcam.update();\n\n\t\tbackgroundMusic = Gdx.audio.newMusic(Gdx.files.internal(\"data/StarWarsMusicTheme.mp3\"));\n\t\tbackgroundMusic.setLooping(true);\n\t\tbackgroundMusic.play();\n\n\t\t// create a new model loader\n\t\tfinal ModelLoader modelLoader = new ObjLoader();\n\n\t\t// TODO: load the internal file \"data/stormtrooper.obj\" into the model variable\n\t\tmodel = modelLoader.loadModel(Gdx.files.internal(\"data/stormtrooper_unwrapped.obj\"));\n\n\t\t// TODO: create a new model instance and scale it to 20% it's original size (it's huge...)\n\t\tinstance = new ModelInstance(model); // ← our model instance is here\n\t\tinstance.transform.scale(0.2f, 0.2f, 0.2f);\n\n\t\t// TODO: set the helmet details material to a new diffuse black color attribute\n\n\t\tgetHelmetDetails().material = new Material(ColorAttribute.createDiffuse(Color.BLACK));\n\t\tgetHelmetMoreDetails().material = new Material(ColorAttribute.createDiffuse(Color.DARK_GRAY));\n\t\tgetHelmetBase().material = new Material(ColorAttribute.createDiffuse(Color.WHITE));\n\n\t\t// set the input processor to work with our custom input:\n\t\t// clicking the image in the lower right should change the colors of the helmets\n\t\t// bonus points: implement your own GestureDetector and an input processor based on it\n\t\tGdx.app.log(\"instance node size\", \"\"+String.valueOf(instance.nodes.size));\n\n\n\t\tGdx.input.setInputProcessor(new FirstOrderInputProcessor(cam, new Runnable() {\n\t\t\tprivate Texture camouflage = new Texture(\"data/camouflage.png\");\n\t\t\tprivate Texture paper = new Texture(\"data/paper.png\");\n\t\t\tprivate Texture hive = new Texture(\"data/hive.png\");\n\t\t\tprivate Texture strips = new Texture(\"data/strip.png\");\n\t\t\tprivate Texture grass = new Texture(\"data/grass.jpeg\");\n\t\t\tpublic void run() {\n\t\t\t\t// TODO: change the helmet details material to a new diffuse random color\n\n\t\t\t\tgetHelmetDetails().material = getRandomMaterial();\n\t\t\t\tgetHelmetMoreDetails().material = getRandomMaterial();\n\n\t\t\t\t// bonus points:\n\t\t\t\t// randomly change the material of the helmet base to a texture\n\t\t\t\t// from the files aloha.png and camouflage.png (or add your own!)\n\t\t\t\tgetHelmetBase().material = getRandomMaterial();\n\t\t\t\tsetRandomLight();\n\n\t\t\t}\n\n\t\t\tprivate Material getRandomMaterial() {\n\t\t\t\tint rand = (int) (MathUtils.random() * 100) % 8;\n\t\t\t\tGdx.app.log(\"Random\", \"\" + rand);\n\n\t\t\t\t//Texture aloha = new Texture(\"data/aloha.png\");\n\t\t\t\tMaterial randMaterial = null;\n\n\t\t\t\tswitch (rand) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\trandMaterial = new Material(ColorAttribute.createReflection(Color.WHITE));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(paper));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(hive));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(camouflage));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 5:\n\t\t\t\t\t\trandMaterial = new Material(ColorAttribute.createDiffuse(getRandomColor()));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 6:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(strips));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 7:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(grass));\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treturn randMaterial;\n\t\t\t}\n\t\t}));\n\t}",
"@Override\n\tpublic void enter() {\n\t\t//Update dimensions\n\t\tattachedTo.setWidth(20);\n\t\tattachedTo.setHeight(20);\n\t\t\n\t\t//set image of player to overworld image\n\t\tattachedTo.setShape(new Ellipse2D.Double(), Color.green);\n\t\tattachedTo.updateShape();\n\t\t\n\t\t\n\t\t//Set the sprite to testspritesheet (until image for overworld state is made)\n\t\t//Now sets the sprite to a test spritesheet\n\t\tattachedTo.setSprite(Directory.spriteLibrary.get(\"HeroOverworld\"));\n\t\t\n\t\t//Queue up an animation of row 0 in spritesheet to repeat\n\t\tattachedTo.getSprite().queueAnimation(0, false);\n\t\t\n\t\t//Start timing movement by getting previous time\n\t\tpreviousTime = System.currentTimeMillis();\n\t}",
"@Override\n\tpublic void create() {\n\t\tassetManager = new AssetManager();\n\t\tassetManager.load(ROLIT_BOARD_MODEL, Model.class);\n\t\tassetManager.load(ROLIT_BALL_MODEL, Model.class);\n\t\t\n\t\t//construct the lighting\n\t\tenvironment = new Environment();\n\t\tenvironment.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.4f, 0.4f, 0.4f, 1f));\n\t\tenvironment.add(new DirectionalLight().set(0.8f, 0.8f, 0.8f, -1f, -0.8f, -0.2f));\n\t\t\n\t\tmodelBatch = new ModelBatch();\n\t\t\n\t\tcam = new PerspectiveCamera(67f, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\n\t\t\n\t\tGdx.input.setInputProcessor(new InputHandler());\n\t}",
"@Override\r\n protected SimpleBody addObject(Entity e) {\n PhysicsShape ps = e.get(PhysicsShape.class);\r\n PhysicsMassType pmt = e.get(PhysicsMassType.class);\r\n Position pos = e.get(Position.class);\r\n\r\n // Right now only works for CoG-centered shapes \r\n SimpleBody newBody = createBody(e.getId(), pmt.getTypeName(ed), ps.getFixture(), true);\r\n\r\n newBody.setPosition(pos); //ES position: Not used anymore, since Dyn4j controls movement\r\n\r\n newBody.getTransform().setTranslation(pos.getLocation().x, pos.getLocation().y); //Dyn4j position\r\n newBody.getTransform().setRotation(pos.getRotation());\r\n\r\n newBody.setUserData(e.getId());\r\n\r\n newBody.setLinearDamping(0.3);\r\n\r\n return newBody;\r\n }",
"@Override\r\n protected SimpleBody addObject(Entity e) {\n PhysicsShape ps = e.get(PhysicsShape.class);\r\n PhysicsMassType pmt = e.get(PhysicsMassType.class);\r\n Position pos = e.get(Position.class);\r\n\r\n // Right now only works for CoG-centered shapes \r\n SimpleBody newBody = createStatic(e.getId(), pmt.getTypeName(ed), ps.getFixture(), true);\r\n\r\n newBody.setPosition(pos); //ES position: Not used anymore, since Dyn4j controls movement\r\n\r\n newBody.getTransform().setTranslation(pos.getLocation().x, pos.getLocation().y); //Dyn4j position\r\n newBody.getTransform().setRotation(pos.getRotation());\r\n\r\n newBody.setUserData(e.getId());\r\n\r\n newBody.setLinearDamping(0.3);\r\n\r\n return newBody;\r\n }",
"private void createEnemy()\n {\n scorpion = new Enemy(\"Giant Scorpion\", 5, 10); \n rusch = new Enemy(\"Mr. Rusch\", 10, 1000);\n skeleton = new Enemy(\"Skeleton\", 10, 50);\n zombie = new Enemy(\"Zombie\", 12, 25);\n ghoul = new Enemy(\"Ghoul\", 15, 45);\n ghost = new Enemy(\"Ghost\", 400, 100);\n cthulu = new Enemy(\"Cthulu\", 10000000, 999999);\n concierge = new Enemy(\"Concierge\", 6, 100);\n wookie = new Enemy(\"Savage Wookie\", 100, 300);\n }",
"private void createAsteroidExplosion(AsteroidsAsteroid asteroid) {\n\t\tAsteroidsExplosion explosion = new AsteroidsExplosion(GameObject.ROOT, this, 25, asteroid.getRadius() * 3.0, 1.0);\n\t\texplosion.translate(asteroid.getPositionVector());\n\t\totherObjects.add(asteroid);\n\t}",
"public void createObject(float posX, float posY)\n\t{\n\t\tdrawableItems.add(new ObjectItem(posX,posY));\n\t}",
"private ParticleMesh createExplosion() {\r\n ParticleMesh pMesh = ParticleFactory.buildParticles(\"explosion\", 30);\r\n pMesh.setEmissionDirection(new Vector3f(0.0f, 1.0f, 0.0f));\r\n pMesh.setMaximumAngle(3.1415927f);\r\n pMesh.setMinimumAngle(0);\r\n pMesh.getParticleController().setSpeed(0.1f);\r\n pMesh.setMinimumLifeTime(20.0f);\r\n pMesh.setMaximumLifeTime(150.0f);\r\n pMesh.setStartSize(15);\r\n pMesh.setEndSize(2);\r\n pMesh.getParticleController().setControlFlow(false);\r\n pMesh.getParticleController().setRepeatType(Controller.RT_CLAMP);\r\n pMesh.warmUp(80);\r\n pMesh.setInitialVelocity(2.5f);\r\n pMesh.setStartColor(new ColorRGBA(1.0f, 0.312f, 0.121f, 1.0f));\r\n pMesh.setEndColor(new ColorRGBA(1.0f, 0.24313726f, 0.03137255f, 0.0f));\r\n pMesh.setRenderState(ts);\r\n pMesh.setRenderState(bs);\r\n pMesh.setRenderState(zs);\r\n\r\n rootNode.attachChild(pMesh);\r\n rootNode.updateRenderState();\r\n \r\n explosions.add(pMesh);\r\n \r\n return pMesh;\r\n }",
"private void createModel() {\n model = new Node(\"Enemy\"+enemyCounter);\n Box b = new Box(.5f, 2, .5f);\n Geometry bg = new Geometry(\"Box\", b);\n Material bm = new Material(assetManager, \"Common/MatDefs/Misc/Unshaded.j3md\");\n Sphere sphere = new Sphere(32, 32, 1.5f, false, false);\n Geometry sg = new Geometry(\"Sphere\", sphere);\n Material sm = new Material(assetManager, \"Common/MatDefs/Misc/Unshaded.j3md\");\n bm.setColor(\"Color\", ColorRGBA.Blue);\n sm.setColor(\"Color\", ColorRGBA.Red);\n bg.setMaterial(bm); \n sg.setMaterial(sm);\n model.attachChild(bg);\n model.attachChild(sg);\n sg.setLocalTranslation(0,2.5f,0);\n \n attachChild(model);\n }",
"@Override\n\tpublic void create() {\n\t\tGdx.gl20.glClearColor(1, 1, 1, 1);\n\n\t\t// instancia batch, asset manager e ambiente 3D\n\t\tmodelBatch = new ModelBatch();\n\t\tassets = new AssetManager();\n\t\tambiente = new Environment();\n\t\tambiente.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.4f, 0.4f, 0.4f, 1f));\n\t\tambiente.add(new DirectionalLight().set(0.8f, 0.8f, 0.8f, -1f, -0.8f, -0.2f));\n\n\t\t// configura a câmera\n\t\tfloat razaoAspecto = ((float) Gdx.graphics.getWidth()) / Gdx.graphics.getHeight();\n\t\tcamera = new PerspectiveCamera(67, 480f * razaoAspecto, 480f);\n\t\tcamera.position.set(1f, 1.75f, 3f);\n\t\tcamera.lookAt(0, 0.35f, 0);\n\t\tcamera.near = 1f;\n\t\tcamera.far = 300f;\n\t\tcamera.update();\n\t\tcameraController = new CameraInputController(camera);\n\t\tGdx.input.setInputProcessor(cameraController);\n\n\t\t// solicita carregamento dos 2 modelos 3D da cena\n\t\tassets.load(\"caldeirao.obj\", Model.class);\n\t\tassets.load(\"caldeirao-jogos.obj\", Model.class);\n\t\tassets.load(\"caldeirao-love.obj\", Model.class);\n\t\tassets.load(\"fogueira.obj\", Model.class);\n\n\t\t// instancia e configura 2 tipos de renderizadores de partículas:\n\t\t// 1. Billboards (para fogo)\n\t\t// 2. PointSprites (para bolhas)\n\t\tBillboardParticleBatch billboardBatch = new BillboardParticleBatch(ParticleShader.AlignMode.Screen, true, 500);\n\t\tPointSpriteParticleBatch pointSpriteBatch = new PointSpriteParticleBatch();\n\t\tsistemaParticulas = new ParticleSystem();\n\t\tbillboardBatch.setCamera(camera);\n\t\tpointSpriteBatch.setCamera(camera);\n\t\tsistemaParticulas.add(billboardBatch);\n\t\tsistemaParticulas.add(pointSpriteBatch);\n\n\t\t// solicita o carregamento dos efeitos de partículas\n\t\tParticleEffectLoader.ParticleEffectLoadParameter loadParam = new ParticleEffectLoader.ParticleEffectLoadParameter(\n\t\t\t\tsistemaParticulas.getBatches());\n\t\tassets.load(\"fogo.pfx\", ParticleEffect.class, loadParam);\n\t\tassets.load(\"fogo-jogos.pfx\", ParticleEffect.class, loadParam);\n\t\tassets.load(\"fogo-love.pfx\", ParticleEffect.class, loadParam);\n\t\tassets.load(\"bolhas.pfx\", ParticleEffect.class, loadParam);\n\t\tassets.load(\"bolhas-jogos.pfx\", ParticleEffect.class, loadParam);\n\t\tassets.load(\"bolhas-love.pfx\", ParticleEffect.class, loadParam);\n\n\t\t// solicita carregamento da música\n\t\tmusica = Gdx.audio.newMusic(Gdx.files.internal(\"zelda-potion-shop.mp3\"));\n\n\t\taindaEstaCarregando = true;\n\t}",
"Hero createHero();",
"@Override\n protected void createCreature() {\n Sphere sphere = new Sphere(32,32, 0.4f);\n pacman = new Geometry(\"Pacman\", sphere);\n Material mat = new Material(assetManager, \"Common/MatDefs/Misc/Unshaded.j3md\");\n mat.setColor(\"Color\", ColorRGBA.Yellow);\n pacman.setMaterial(mat);\n this.attachChild(pacman); \n }",
"EM createEM();",
"public Hero(Position position) {\n this.position = position;\n hp = PV_BASE;\n atk = 1;\n status = Status.STANDING;\n buffs = new ArrayList<>();\n orientation = Orientation.DOWN;\n }",
"public Hero(float x, float y, int controlType) {\n\t\tgraphic = new Graphic(\"HERO\");\n\t\tspeed = 0.12f;\n\t\tthis.controlType = controlType;\n\t\tgraphic.setPosition(x,y);\n\t}",
"@Override\n\t\tpublic void create() {\n\t\t\tcannon = new CannonLogic();\n\t\t\tlines = new LineLogic();\n\t\t\tboxes = new BoxLogic();\n\t\t\tcontroller = new PlayerController();\n\t\t\tshapeList = new ArrayList<Shape>();\n\t\t\t\n\t\t\tGdx.gl11.glEnableClientState(GL11.GL_VERTEX_ARRAY);\n\t\t\tGdx.gl11.glClearColor(0.4f, 0.6f, 1.0f, 1.0f);\n\t\t\tvertexBuffer = BufferUtils.newFloatBuffer(8);\n\t\t\tvertexBuffer.put(new float[] {-50,-50, -50,50, 50,-50, 50,50});\n\t\t\tvertexBuffer.rewind();\n\t\t}",
"@Override\r\n\tpublic void createScene() {\n\t\tthis.setBackground(new Background(255, 255, 255));\r\n\t\tsLogo = new Sprite(BaseActivity.WIDTH / 2, BaseActivity.HEIGHT / 2, logoRegion.getWidth() * 1.23f, logoRegion.getHeight() * 1.23f, logoRegion, engine.getVertexBufferObjectManager());\r\n\t\tthis.attachChild(sLogo);\r\n\t\tSystem.out.println(\"stufff\");\r\n\t\t\r\n\t\tengine.registerUpdateHandler(new TimerHandler(0.2f, new ITimerCallback() \r\n\t {\r\n\t public void onTimePassed(final TimerHandler pTimerHandler) \r\n\t {\r\n\t System.out.println(\"stuff1\");\r\n\t engine.unregisterUpdateHandler(pTimerHandler);\r\n\t PlayScene play = new PlayScene(engine, activity, camera);\r\n\t play.createScene();\r\n\t engine.setScene(play);\r\n\t Resources.getInstance().music.setLooping(true);\r\n\t \t\tResources.getInstance().music.play();\r\n\t play.start();\r\n\t }\r\n\t }));\r\n\t}",
"void makeAvocado() {\n this.hungerDeltaPcrntArray.add(0.17f);\n this.speedDeltaPcrntArray.add(0.50f);\n this.pointsDeltaArray.add(600);\n this.imageLocationArray.add(\"avocado.png\");\n }",
"public void spawnCreature(){\n\t\tif(spawnType.equalsIgnoreCase(\"worm\")){\n\t\t\tRuntimeObjectFactory.getObjectFromPool(\"worm\"+spawnId);\n\t\t}else if(spawnType.equalsIgnoreCase(\"antorc\")){\n\t\t\tGdx.app.debug(TamerGame.LOG, this.getClass()\n\t\t\t\t\t.getSimpleName() + \" :: Ant entered\");\t\t\t\n\t\t\t//CHANGE SPAWNING IMPLEMENTATION\n\t\t\tAntOrc orc = new AntOrc();\n\t\t\torc.setPosition(getPosition());\n\t\t\torc.setWaypoint(waypoint);\n\t\t\tenvironment.addNewObject(orc);\n\t\t\tEventPool.addEvent(new tEvent(this,\"spawnCreature\",sleepTime,1));\n\t\t}\n\t\t\t\n\t}",
"@Override\r\n\tpublic void create() {\n\t\tsuper.create();\r\n\t\t// Ground\r\n\t\tBodyDef groundBodyDef = new BodyDef();\r\n\t\tgroundBody = world.createBody(groundBodyDef);\r\n\t\tEdgeShape edgeShape = new EdgeShape();\r\n\t\tedgeShape.set(new Vector2(50.0f, 0.0f), new Vector2(50.0f, 0.0f));\r\n\t\tgroundBody.createFixture(edgeShape, 0.0f);\r\n \r\n\t\tcreateFirstGroupShape();\r\n\t\t// the second group\r\n\t\tcreateSecondGroupShape();\r\n\t}",
"void addBoxObject() {\n\t\tint boxObjectX = random.nextInt(ScreenManager.getWindowWidth());\n\t\tint boxObjectY = random.nextInt(ScreenManager.getWindowHeight());\n\t\tint boxObjectWidth = ScreenManager.getSizeFromPercentageOfWindowY((float) 24);\n\t\tint boxObjectHeight = ScreenManager.getSizeFromPercentageOfWindowY(18);\n\t\tint boxObjectHitsToDestroy = random.nextInt(9)+1;\n\t\t\n\t\tboxObjects.add(new BoxObject(boxObjectX, boxObjectY, boxObjectWidth, boxObjectHeight, boxObjectHitsToDestroy, true));\n\t}",
"public ParticleEmotion(World world, Entity host, double posX, double posY, double posZ, float height, int hostType, int emoType)\r\n {\r\n super(world, posX, posY, posZ);\r\n this.host = host;\r\n this.setSize(0F, 0F);\r\n this.setPosition(posX, posY, posZ);\r\n this.prevPosX = posX;\r\n this.prevPosY = posY;\r\n this.prevPosZ = posZ;\r\n this.motionX = 0D;\r\n this.motionZ = 0D;\r\n this.motionY = 0D;\r\n this.particleType = emoType;\r\n this.particleScale = this.rand.nextFloat() * 0.05F + 0.275F;\r\n this.particleAlpha = 0F;\r\n this.playSpeed = 1F;\r\n this.playSpeedCount = 0F;\r\n this.stayTick = 10;\r\n this.stayTickCount = 0;\r\n this.fadeTick = 0;\r\n this.fadeState = 0; //0:fade in, 1:normal, 2:fade out, 3:set dead\r\n this.frameSize = 1;\r\n this.addHeight = height;\r\n this.hostType = hostType; //0:any entity, 1:entity, 2:block\r\n this.particleAge = -1; //prevent showing the emo's initial moving from posY = 0\r\n this.canCollide = false;\r\n \r\n //set icon position\r\n switch(this.particleType)\r\n {\r\n case 1: //小愛心\r\n \tthis.particleIconX = 0.0625F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 4;\r\n \t//no stay\r\n \tthis.stayTick = 0;\r\n\t\t\tbreak;\r\n case 2: //噴汗\r\n \tthis.particleIconX = 0.0625F;\r\n \tthis.particleIconY = 0.5F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 3;\r\n \t//cancel fade in\r\n \tthis.particleAlpha = 1F;\r\n \tthis.fadeState = 1;\r\n \tthis.fadeTick = 5;\r\n \t//no stay\r\n \tthis.stayTick = 0;\r\n \tbreak;\r\n case 3: //問號\r\n \tthis.particleIconX = 0.125F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 1;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n\t\t\tbreak;\r\n case 4: //驚嘆號\r\n \tthis.particleIconX = 0.125F;\r\n \tthis.particleIconY = 0.5F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 1;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \t//long stay\r\n \tthis.stayTick = 20;\r\n \tbreak;\r\n case 5: //點點點\r\n \tthis.particleIconX = 0.1875F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 1;\r\n \t//long stay\r\n \tthis.stayTick = 20;\r\n \t//slow play\r\n \tthis.playSpeed = 0.5F;\r\n\t\t\tbreak;\r\n case 6: //冒青筋\r\n \tthis.particleIconX = 0.1875F;\r\n \tthis.particleIconY = 0.5F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 1;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \tbreak;\r\n case 7: //音符\r\n \tthis.particleIconX = 0.25F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 15;\r\n \tthis.playTimes = 1;\r\n \t//cancel fade in\r\n \tthis.particleAlpha = 1F;\r\n \tthis.fadeState = 1;\r\n \tthis.fadeTick = 3;\r\n \t//short stay\r\n \tthis.stayTick = 3;\r\n \t//slow play\r\n \tthis.playSpeed = 0.7F;\r\n \tbreak;\r\n case 8: //cry\r\n \tthis.particleIconX = 0.3125F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 3;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \t//no stay\r\n \tthis.stayTick = 0;\r\n \t//slow play\r\n \tthis.playSpeed = 0.5F;\r\n \tbreak;\r\n case 9: //流口水\r\n \tthis.particleIconX = 0.3125F;\r\n \tthis.particleIconY = 0.5F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 2;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \t//no stay\r\n \tthis.stayTick = 1;\r\n \t//slow play\r\n \tthis.playSpeed = 0.5F;\r\n \tbreak;\r\n case 10: //混亂\r\n \tthis.particleIconX = 0.375F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 4;\r\n \t//cancel fade in\r\n \tthis.particleAlpha = 1F;\r\n \tthis.fadeState = 1;\r\n \tthis.fadeTick = 3;\r\n \t//short stay\r\n \tthis.stayTick = 1;\r\n \tbreak;\r\n case 11: //尋找\r\n \tthis.particleIconX = 0.375F;\r\n \tthis.particleIconY = 0.5F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 2;\r\n \t//cancel fade in\r\n \tthis.particleAlpha = 1F;\r\n \tthis.fadeState = 1;\r\n \tthis.fadeTick = 3;\r\n \t//short stay\r\n \tthis.stayTick = 0;\r\n \t//slow play\r\n \tthis.playSpeed = 0.75F;\r\n \tbreak;\r\n case 12: //驚嚇\r\n \tthis.particleIconX = 0.4375F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 14;\r\n \tthis.playTimes = 1;\r\n \t//cancel fade in\r\n \tthis.particleAlpha = 1F;\r\n \tthis.fadeState = 1;\r\n \tthis.fadeTick = 3;\r\n \t//long stay\r\n \tthis.stayTick = 20;\r\n \t//slow play\r\n \tthis.playSpeed = 0.75F;\r\n \t//large frame\r\n \tthis.frameSize = 2;\r\n \tbreak;\r\n case 13: //點頭\r\n \tthis.particleIconX = 0.5F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 2;\r\n \t//cancel fade in\r\n \tthis.particleAlpha = 1F;\r\n \tthis.fadeState = 1;\r\n \tthis.fadeTick = 3;\r\n \t//no stay\r\n \tthis.stayTick = 0;\r\n \t//slow play\r\n \tthis.playSpeed = 0.75F;\r\n \tbreak;\r\n case 14: //+_+\r\n \tthis.particleIconX = 0.5F;\r\n \tthis.particleIconY = 0.5F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 2;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \t//no stay\r\n \tthis.stayTick = 0;\r\n \tbreak;\r\n case 15: //kiss\r\n \tthis.particleIconX = 0.5625F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 1;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \t//long stay\r\n \tthis.stayTick = 15;\r\n \t//slow play\r\n \tthis.playSpeed = 0.7F;\r\n \tbreak;\r\n case 16: //lol\r\n \tthis.particleIconX = 0.5625F;\r\n \tthis.particleIconY = 0.5F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 3;\r\n \t//cancel fade in\r\n \tthis.particleAlpha = 1F;\r\n \tthis.fadeState = 1;\r\n \tthis.fadeTick = 3;\r\n \t//no stay\r\n \tthis.stayTick = 0;\r\n \tbreak;\r\n case 17: //奸笑\r\n \tthis.particleIconX = 0.625F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 15;\r\n \tthis.playTimes = 1;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \t//slow play\r\n \tthis.playSpeed = 0.5F;\r\n \tbreak;\r\n case 18: //殘念\r\n \tthis.particleIconX = 0.6875F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 1;\r\n \t//no stay\r\n \tthis.stayTick = 0;\r\n \t//slow play\r\n \tthis.playSpeed = 0.4F;\r\n \tbreak;\r\n case 19: //舔舔\r\n \tthis.particleIconX = 0.6875F;\r\n \tthis.particleIconY = 0.5F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 3;\r\n \t//cancel fade in\r\n \tthis.particleAlpha = 1F;\r\n \tthis.fadeState = 1;\r\n \tthis.fadeTick = 3;\r\n \t//no stay\r\n \tthis.stayTick = 0;\r\n \t//slow play\r\n \tthis.playSpeed = 0.75F;\r\n \tbreak;\r\n case 20: //orz\r\n \tthis.particleIconX = 0.75F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 1;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \t//long stay\r\n \tthis.stayTick = 20;\r\n \t//slow play\r\n \tthis.playSpeed = 0.5F;\r\n \tbreak;\r\n case 21: //O\r\n \tthis.particleIconX = 0.75F;\r\n \tthis.particleIconY = 0.5F;\r\n \tthis.particleMaxAge = 0;\r\n \tthis.playTimes = 1;\r\n \t//long stay\r\n \tthis.stayTick = 40;\r\n \tbreak;\r\n case 22: //X\r\n \tthis.particleIconX = 0.75F;\r\n \tthis.particleIconY = 0.5625F;\r\n \tthis.particleMaxAge = 0;\r\n \tthis.playTimes = 1;\r\n \t//long stay\r\n \tthis.stayTick = 40;\r\n \tbreak;\r\n case 23: //!?\r\n \tthis.particleIconX = 0.75F;\r\n \tthis.particleIconY = 0.625F;\r\n \tthis.particleMaxAge = 0;\r\n \tthis.playTimes = 1;\r\n \t//long stay\r\n \tthis.stayTick = 40;\r\n \tbreak;\r\n case 24: //rock\r\n \tthis.particleIconX = 0.75F;\r\n \tthis.particleIconY = 0.6875F;\r\n \tthis.particleMaxAge = 0;\r\n \tthis.playTimes = 1;\r\n \t//long stay\r\n \tthis.stayTick = 40;\r\n \tbreak;\r\n case 25: //paper\r\n \tthis.particleIconX = 0.75F;\r\n \tthis.particleIconY = 0.75F;\r\n \tthis.particleMaxAge = 0;\r\n \tthis.playTimes = 1;\r\n \t//long stay\r\n \tthis.stayTick = 40;\r\n \tbreak;\r\n case 26: //scissors\r\n \tthis.particleIconX = 0.75F;\r\n \tthis.particleIconY = 0.8125F;\r\n \tthis.particleMaxAge = 0;\r\n \tthis.playTimes = 1;\r\n \t//long stay\r\n \tthis.stayTick = 40;\r\n \tbreak;\r\n case 27: //-w-\r\n \tthis.particleIconX = 0.75F;\r\n \tthis.particleIconY = 0.875F;\r\n \tthis.particleMaxAge = 0;\r\n \tthis.playTimes = 1;\r\n \t//long stay\r\n \tthis.stayTick = 40;\r\n \tbreak;\r\n case 28: //-口-\r\n \tthis.particleIconX = 0.75F;\r\n \tthis.particleIconY = 0.9375F;\r\n \tthis.particleMaxAge = 0;\r\n \tthis.playTimes = 1;\r\n \t//long stay\r\n \tthis.stayTick = 40;\r\n \tbreak;\r\n case 29: //blink\r\n \tthis.particleIconX = 0.8125F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 1;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \t//slow play\r\n \tthis.playSpeed = 0.35F;\r\n \t//long stay\r\n \tthis.stayTick = 20;\r\n \tbreak;\r\n case 30: //哼\r\n \tthis.particleIconX = 0.8125F;\r\n \tthis.particleIconY = 0.5F;\r\n \tthis.particleMaxAge = 7;\r\n \tthis.playTimes = 1;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \t//slow play\r\n \tthis.playSpeed = 0.75F;\r\n \t//short stay\r\n \tthis.stayTick = 3;\r\n \tbreak;\r\n case 31: //臉紅紅\r\n \tthis.particleIconX = 0.875F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 3;\r\n \tthis.particleScale += 0.2F;\r\n \tthis.playTimes = 1;\r\n \t//short fade in\r\n \tthis.fadeTick = 3;\r\n \t//slow play\r\n \tthis.playSpeed = 0.75F;\r\n \t//long stay\r\n \tthis.stayTick = 30;\r\n \tbreak;\r\n case 32: //尷尬\r\n \tthis.particleIconX = 0.875F;\r\n \tthis.particleIconY = 0.25F;\r\n \tthis.particleMaxAge = 5;\r\n \tthis.playTimes = 4;\r\n \t//slow play\r\n \tthis.playSpeed = 0.75F;\r\n \t//no stay\r\n \tthis.stayTick = 0;\r\n \tbreak;\r\n case 33: //:P\r\n \tthis.particleIconX = 0.875F;\r\n \tthis.particleIconY = 0.625F;\r\n \tthis.particleMaxAge = 4;\r\n \tthis.playTimes = 1;\r\n \t//slow play\r\n \tthis.playSpeed = 0.25F;\r\n \t//long stay\r\n \tthis.stayTick = 30;\r\n \tbreak;\r\n case 34: //|||\r\n \tthis.particleIconX = 0.875F;\r\n \tthis.particleIconY = 0.9375F;\r\n \tthis.particleMaxAge = 0;\r\n \tthis.particleScale += 0.3F;\r\n \tthis.playTimes = 1;\r\n \t//long stay\r\n \tthis.stayTick = 50;\r\n \tbreak;\r\n default: //汗\r\n \tthis.particleIconX = 0F;\r\n \tthis.particleIconY = 0F;\r\n \tthis.particleMaxAge = 15;\r\n \tthis.playTimes = 1;\r\n\t\t\tbreak;\r\n }\r\n \r\n //init position\r\n this.px = posX;\r\n this.py = posY;\r\n this.pz = posZ;\r\n this.addx = 0D;\r\n this.addy = 0D;\r\n this.addz = 0D;\r\n \r\n calcParticlePosition();\r\n }",
"public void act() \n {\n move(-16);\n \n \n if (isAtEdge())\n {\n setLocation(700,getY());\n }\n \n if (isTouching(Shots.class))\n {\n getWorld().addObject(new SpaceObject(), 500,Greenfoot.getRandomNumber(400));\n }\n \n }",
"Elevage createElevage();",
"private void explode()\n\t{\n\t\texplosion.setX(getX());\n\t\texplosion.setY(getY());\n\t\t\n\t\tif(!explosion.isOver())\n\t\t{\n\t\t\texplosion.update();\n\t\t\texplosion.drawObject();\n\t\t}\t\n\t\telse\n\t\t\talive = false;\n\t}",
"@Override\n\tpublic void create () {\n\t\t//IntrigueGraphicalDebugger.enable();\n\t\tIntrigueGraphicSys = new IntrigueGraphicSystem();\n\t\tIntrigueTotalPhysicsSys = new IntrigueTotalPhysicsSystem();\n\t\t\n\t\tfinal int team1 = 1;\n\t\tfinal int team2 = 2;\n\t\t\n\t\tstage = new Stage();\n\t\ttable = new Table();\n\t\ttable.bottom();\n\t\ttable.left();\n\t\ttable.setFillParent(true);\n\t\t\n\t\tLabelStyle textStyle;\n\t\tBitmapFont font = new BitmapFont();\n\t\t\n\n\t\ttextStyle = new LabelStyle();\n\t\ttextStyle.font = font;\n\n\t\ttext = new Label(\"Intrigue\",textStyle);\n\t\tLabel text2 = new Label(\"@author: Matt\", textStyle);\n\t\tLabel text3 = new Label(\"OPERATION 1\", textStyle);\n\t\t\n\t\ttext.setFontScale(1f,1f);\n\t\ttable.add(text);\n\t\ttable.row();\n\t\ttable.add(text2);\n\t\ttable.row();\n\t\ttable.add(text3);\n\t\tstage.addActor(table);\n\n\t\ttable.setDebug(true);\n\t\tString path_to_char = \"3Dmodels/Soldier/ArmyPilot/ArmyPilot.g3dj\";\n //String path_to_road = \"3Dmodels/Road/roadV2.g3db\";\n\t\t//String path_to_rink = \"3Dmodels/Rink/Rink2.g3dj\";\n\t\tString path_to_snow_terrain = \"3Dmodels/Snow Terrain/st5.g3dj\";\n\t\tString path_to_crosshair = \"2Dart/Crosshairs/rifle_cross.png\";\n\t\n\t\tMatrix4 trans = new Matrix4();\n\t\tMatrix4 iceTrans = new Matrix4();\n\t\tMatrix4 iceTrans2 = new Matrix4();\n\t\tMatrix4 iceTrans3 = new Matrix4();\n\t\tMatrix4 iceTrans4 = new Matrix4();\n\t\tMatrix4 trans2 = new Matrix4();\n\t\tMatrix4 trans3 = new Matrix4();\n\t\n\t\ttrans.translate(-3000,6000,-500);\n\t\t//Vector3 halfExtents = new Vector3(30f,90f,25f);\n\t\tbtCapsuleShape person_shape = new btCapsuleShape(30f, 90f);\n\t\t\n\t\tmamaDukes.add(new Entity.Builder(player_guid)\n\t\t\t\t\t.IntrigueModelComponent(path_to_char).IntrigueControllerComponent(1)\n\t\t\t\t\t.IntriguePhysicalComponent(person_shape, 200f, trans)\n\t\t\t\t\t.MotionComponent()\n\t\t\t\t\t.AimingComponent()\n\t\t\t\t\t.DecalComponent()\n\t\t\t\t\t.ThirdPersonCameraComponent()\n .CharacterActionsComponent()\n\t\t\t\t\t.AnimationComponent()\n\t\t\t\t\t.Fireable(path_to_crosshair)\n\t\t\t\t\t.TargetingAI(team1)\n\t\t\t\t\t//.CharacterSoundComponent(\"SoundEffects/Character/walking/step-spur.mp3\", \"SoundEffects/guns/M4A1.mp3\")\n\t\t\t\t\t.Build());\n\t\tJson json_test = new Json(); \n\t\tEntity d = mamaDukes.get(player_guid);\n\t\t//System.out.println(json_test.prettyPrint(d));\n\t\t\n\t\t\n\t\tmamaDukes.get(player_guid).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody()\n\t\t\t\t\t.setActivationState(Collision.DISABLE_DEACTIVATION);\n\n\t\tmamaDukes.add(level_factory.createLevel(path_to_snow_terrain,\n\t\t\t\t\"3DParticles/blizzard.pfx\", iceTrans, Entity.class));\n\t\t\t\t/*\n\t\t\t\tnew DrifterObject.DrifterObjectBuilder(1)\n\t\t\t\t\t.BaseObject(new Gobject.Builder(1)\n\t\t\t\t\t.IntrigueModelComponent(path_to_snow_terrain)\n\t\t\t\t\t.IntriguePhysicalComponent(iceMass, iceTrans)\n\t\t\t\t\t.ParticleComponent(\"Blizzard\",\n\t\t\t\t\t\t\t\"3DParticles/blizzard.pfx\",new Vector3(1000,1000, -2500), \n\t\t\t\t\t\t\tnew Vector3(3000, 1000,2000 ))\n\t\t\t\t\t.Build())\n\t\t\t\t\t.Build());*/\n\t\ttrans2.translate(-1000,1000,1500);\n\t\t\n\t\tmamaDukes.add(new Entity.Builder(2)\n\t\t\t\t\t.IntrigueModelComponent(path_to_char)\n\t\t\t\t\t.IntriguePhysicalComponent(person_shape, 200f, trans2)\n\t\t\t\t\t.ParticleComponent(\"Blood\", \"3DParticles/Character/Blood.pfx\", \n\t\t\t\t\t\t\tnew Vector3(), new Vector3(1f,1f,1f))\n\t\t\t\t\t.MotionComponent()\n\t\t\t\t\t.AimingComponent()\n\t\t\t\t\t.CharacterActionsComponent()\n\t\t\t\t\t.AnimationComponent()\n\t\t\t\t\t.Fireable()\n\t\t\t\t\t.ShootingSoldierAI()\n\t\t\t\t\t.TargetingAI(team2)\n\t\t\t\t\t.Build());\n\t\t\n\t\tmamaDukes.get(2).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody()\n\t\t\t\t\t.getRigidBody()\n\t\t\t\t\t.setAngularFactor(new Vector3(0,0,0));\n\t\tmamaDukes.get(2).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody()\n\t\t\t\t\t.getRigidBody()\n\t\t\t\t\t.setActivationState(Collision.DISABLE_DEACTIVATION);\n\t\t\n\t\tmamaDukes.get(2).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody()\n\t\t\t\t\t.setUserIndex(2);\n\t\t\n\t\ttrans3.translate(-1000, 1000, 2000);\n\t\t\n\t\tmamaDukes.add(new Entity.Builder(3)\n\t\t\t\t\t.IntrigueModelComponent(path_to_char)\n\t\t\t\t\t.IntriguePhysicalComponent(person_shape, 200f, trans3)\n\t\t\t\t\t.MotionComponent()\n\t\t\t\t\t.AimingComponent()\n\t\t\t\t\t.CharacterActionsComponent()\n\t\t\t\t\t.AnimationComponent().Fireable()\n\t\t\t\t\t.ShootingSoldierAI().TargetingAI(team2)\n\t\t\t\t\t.Build());\n\t\t\n\t\tmamaDukes.get(3).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody()\n\t\t\t\t\t.setAngularFactor(new Vector3(0,0,0));\n\t\tmamaDukes.get(3).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody()\n\t\t\t\t\t.setActivationState(Collision.DISABLE_DEACTIVATION);\n\t\tmamaDukes.get(3).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody().setUserIndex(3);\n\t\t\n\t\tVector3 rpos = new Vector3();\n\t\t\n\t\tmamaDukes.get(1).getModelComponent().getModel()\n\t\t\t\t\t.transform.getTranslation(rpos);\n\t\t\n\t\ticeTrans2.translate(0, 0, 6185.332f);\n\t\t\n\t\tmamaDukes.add(level_factory.createLevel(path_to_snow_terrain,\n\t\t\t\t\"SoundEffects/stages/snow stage/wind1.mp3\",\n\t\t\t\t\"3DParticles/blizzard.pfx\", iceTrans2, Entity.class));\n\t\t\n\t\t\t\t\t/*new DrifterObject.DrifterObjectBuilder(4)\n\t\t\t\t\t.BaseObject(new Gobject.Builder(4)\n\t\t\t\t\t.IntrigueModelComponent(path_to_snow_terrain)\n\t\t\t\t\t.IntriguePhysicalComponent(iceMass, iceTrans2)\n\t\t\t\t\t.IntrigueLevelComponent(\"SoundEffects/stages/snow stage/wind1.mp3\")\n\t\t\t\t\t.Build())\n\t\t\t\t\t.ParticleComponent(\"Blizzard\",\"3DParticles/blizzard.pfx\",\n\t\t\t\t\t\t\tnew Vector3(0, 0, 6185.332f),\n\t\t\t\t\t\t\tnew Vector3(3000, 1000,2000 ))\n\t\t\t\t\t.Build());*/\n\t\t\n\t\tmamaDukes.get(4).getModelComponent().getModel().transform.translate(new Vector3(0, 0, 6185.332f)); //btStaticMeshShapes do not update their motionStates. The model Translation must be set manually in these cases.\n\t\ticeTrans3.translate(-6149.6568f, 0, 6185.332f);\n\t\t\n\t\tmamaDukes.add(level_factory.createLevel(path_to_snow_terrain,\n\t\t\t\t\"3DParticles/blizzard.pfx\" , iceTrans3, Entity.class));\n\t\t/**\n\t\t * btStaticMeshShapes do not update their motionStates. The model Translation must be set manually in these cases.\n\t\t */\n\t\tmamaDukes.get(5).getModelComponent().getModel().transform.translate(new Vector3(-6149.6568f, 0, 6185.332f)); \n\t\t\n\t\ticeTrans4.translate(-6149.6568f, 0, 0);\n\t\tmamaDukes.add(level_factory.createLevel(path_to_snow_terrain,\n\t\t\t\t\"3DParticles/blizzard.pfx\" , iceTrans4, Entity.class));\n\t\t\t\t\t/**new DrifterObject.DrifterObjectBuilder(6)\n\t\t\t\t\t.BaseObject(new Gobject.Builder(6)\n\t\t\t\t\t.IntrigueModelComponent(path_to_snow_terrain)\n\t\t\t\t\t.IntriguePhysicalComponent(iceMass, iceTrans4)\n\t\t\t\t\t.ParticleComponent(\"Blizzard\",\"3DParticles/blizzard.pfx\",\n\t\t\t\t\t\t\tnew Vector3(-6149.6568f, 0, 0), new Vector3(3000, 1000,2000 ))\n\t\t\t\t\t.Build())\n\t\t\t\t\t.Build());*/\n\t\tmamaDukes.get(6).getModelComponent().getModel().transform.translate(new Vector3(-6149.6568f, 0, 0)); \n\t\t\n\t}",
"@Override\n public void create(GameContainer gc) {\n this.gc = gc;\n addKeys();\n\n AssetManager.background.setSize(gc.getWidth(), gc.getHeight());\n AssetManager.background.addToRender();\n\n player = new Player(gc.getWidth() / 2,\n gc.getHeight() / 2, 100, 100);\n updateCamera((int) player.getX(), (int) player.getY());\n\n player2 = new Player(gc.getWidth() / 2 + player.getWidth(),\n gc.getHeight() / 2 + player.getHeight(), 100, 100);\n }",
"Position createPosition();",
"private void createObstacole()\n {\n //Create Obstacole\n Obstacole topObstacole = new Obstacole(\"top\");\n Obstacole botObstacole = new Obstacole(\"bottom\");\n Obstacole midObstacole = new Obstacole(\"mid\");\n //amount of space between obstacole\n int ObstacoleSpacing = 150;\n \n //get object image\n GreenfootImage image = botObstacole.getImage();\n \n //random number to vary\n int numOfObstacoles = Greenfoot.getRandomNumber(40) + 15;\n \n //counter increment to 50\n ObstacoleCounter++;\n if (ObstacoleCounter == 50)\n {\n if (getObjects(Obstacole.class).size() < numOfObstacoles)\n {\n addObject(botObstacole, getWidth(), getHeight() / 2 + image.getHeight() - Greenfoot.getRandomNumber(100) - 10);\n addObject(topObstacole, getWidth(), botObstacole.getY() - image.getHeight() - ObstacoleSpacing);\n addObject(midObstacole, getWidth(), botObstacole.getY() + image.getHeight() / 3 + ObstacoleSpacing);\n }\n ObstacoleCounter = 0;\n }\n }",
"public void moveTowards(){\n \n \n \n if(!exploded){\n \n \n move(speed);\n \n if(isTouching(Enemy.class)){\n move(explosionRadius); \n \n inRange = (ArrayList) getObjectsInRange(explosionRadius + 25, Enemy.class);\n for(Enemy e : inRange){\n e.hit(damage);\n }\n \n //explode\n exploded = true;\n \n image = new GreenfootImage(\"50x50 aoe.png\");\n image.scale(explosionRadius*2, explosionRadius*2);\n setImage(image);\n //getWorld().removeObject(this);\n }\n else if (isAtEdge())\n {\n getWorld().removeObject(this);\n }\n else if ( radius < distance) {\n getWorld().removeObject(this); \n }\n }\n else{\n setImage(image);\n image.setTransparency(image.getTransparency() - 5);\n if(image.getTransparency() <= 0) getWorld().removeObject(this);\n }\n }",
"void generateEnemy(){\n\t\tEnemy e = new Enemy((int)(Math.random()*\n\t\t\t(cp.getWidthScreen() - (ss.getWidth()/2)))\n\t\t\t,ss.getHeight(), cp.getHieghtScreen());\t\t\t\t//Enemy (int x, int y, int heightScreen)\n\t\tcp.shapes.add(e);\n\t\tenemies.add(e);\n\t}",
"private Hero createHeroObject(){\n return new Hero(\"ImageName\",\"SpiderMan\",\"Andrew Garfield\",\"6 feet 30 inches\",\"70 kg\",\n \"Webs & Strings\",\"Fast thinker\",\"Webs & Flexible\",\n \"200 km/hour\",\"Very fast\",\"Spiderman - Super Hero saves the world\",\n \"SuperHero saves the city from all the villians\");\n }",
"public Hero(int x, int y) {\r\n this.centerX = x;\r\n this.centerY = y;\r\n this.currentHealth = 100;\r\n rect1 = new FloatRect (100,630,80,110);\r\n imgTexture = new Texture ();\r\n try {\r\n imgTexture.loadFromFile (Paths.get (ImageFile));\r\n } catch (IOException ex) {\r\n ex.printStackTrace ();\r\n }\r\n imgTexture.setSmooth (true);\r\n\r\n img = new Sprite (imgTexture);\r\n img.setOrigin (Vector2f.div (new Vector2f (imgTexture.getSize ()), 2));\r\n img.setPosition (x, y);\r\n // Store references to object and key methods\r\n obj = img;\r\n setPosition = img::setPosition;\r\n\r\n background = new Sprite (bg.loadTextures ());\r\n background.setOrigin(Vector2f.div(new Vector2f(bg.getTexture1 ()), 1000000));\r\n background.setPosition (0,0);\r\n }",
"private void makeMedicine() {\n\t\teating = true;\n\t\ttama.setLayoutX(200);\n\n\t\tmedicine = new Sprite(3, 3, 540, 478, new Image(\"file:./res/images/hearts.png\"), 1, 2100);\n\t\tmedicine.setLayoutX(150);\n\t\tmedicine.setLayoutY(150);\n\t\tmedicine.setScaleX(0.3);\n\t\tmedicine.setScaleY(0.3);\n\t\tgrid.getChildren().addAll(medicine);\n\t\tPauseTransition pause = new PauseTransition(Duration.millis(2100));\n\t\tpause.setOnFinished(e -> {\n\t\t\tgrid.getChildren().remove(medicine);\n\t\t\ttama.setLayoutX(190);\n\t\t\teating = false;\n\t\t\tmodel.getController().feedMedicine();\n\t\t});\n\t\tpause.play();\n\n\t}",
"@Override\n\tpublic void create () {\n\t\tgempiresAssetHandler = new GempiresAssetHandler(this);\n\t\tbatch = new SpriteBatch();\n\t\tcastle = new CastleScreen(this);\n\t\tsetScreen(new MainMenuScreen(this));\n\t}",
"public Zombie() {\r\n\t\tsuper(myAnimationID, 0, 0, 60, 60);\r\n\t}",
"Entity(Vector3f position) {\n this.position = position;\n }",
"Actor createActor();",
"@Override\n protected Scene onCreateScene() {\n this.getWindowManager().getDefaultDisplay().getMetrics(metrics);\n this.mEngine.registerUpdateHandler(new FPSLogger());\n inventoryEntity.attachChild(new Rectangle(0,0,125,780,new VertexBufferObjectManager()));\n viennaPracticeScene.attachChild(inventoryEntity);\n\n final Entity doorEntity = new Entity(50,270,100,100);\n Rectangle r = new Rectangle(0,0,120,300,new VertexBufferObjectManager());\n r.setSkewY(-20);\n r.setColor(Color.BLACK);\n doorEntity.attachChild(r);\n viennaPracticeScene.attachChild(doorEntity);\n\n final Entity beethovenEntity = new Entity(CAMERA_WIDTH/2,CAMERA_HEIGHT/2);\n beethovenEntity.attachChild(beethovenSprite);\n viennaPracticeScene.attachChild(beethovenEntity);\n\n final Text beethovenSpeech = new Text(0, 70, this.font, \"...Alas!\\nI, the great Beethoven, have broken my strings!\", this.getVertexBufferObjectManager());\n beethovenSpeech.setWidth(850);\n beethovenSpeech.setAutoWrap(AutoWrap.NONE);\n beethovenSpeech.setHorizontalAlign(HorizontalAlign.CENTER);\n\n guitarStringSprite.setColor(Color.WHITE);\n guitarStringSprite.setOnClickListener(new ButtonSprite.OnClickListener() {\n @Override\n public void onClick(ButtonSprite pButtonSprite, float pTouchAreaLocalX, float pTouchAreaLocalY) {\n toggleColor();\n ViennaPracticeActivity.this.game.handleItemClick(new GuitarStrings(player));\n }\n });\n viennaPracticeScene.registerTouchArea(guitarStringSprite);\n\n beethovenSprite.setOnClickListener(new ButtonSprite.OnClickListener() {\n @Override\n public void onClick(ButtonSprite pButtonSprite, float pTouchAreaLocalX, float pTouchAreaLocalY) {\n beethovenEntity.attachChild(beethovenSpeech);\n Timer timer = new Timer();\n Long delayTime = (long) (30 * 100);\n timer.schedule(new TimerTask() {\n @Override\n public void run() {\n beethovenEntity.detachChild(beethovenSpeech);\n }\n }, delayTime);\n }\n });\n viennaPracticeScene.registerTouchArea(beethovenSprite);\n\n viennaPracticeScene.setOnSceneTouchListener(new IOnSceneTouchListener() {\n @Override\n public boolean onSceneTouchEvent(Scene pScene, TouchEvent pSceneTouchEvent) {\n float xCoordinate = pSceneTouchEvent.getX();\n float yCoordinate = pSceneTouchEvent.getY();\n if (pSceneTouchEvent.isActionDown() && pSceneTouchEvent.getX() < 70) {\n Intent startIntent = new Intent(ViennaPracticeActivity.this.getApplication(), ViennaStreetActivity.class);\n startIntent.putExtra(\"game\", game);\n ViennaPracticeActivity.this.startActivity(startIntent);\n ViennaPracticeActivity.this.finish();\n ViennaPracticeActivity.this.game.switchToScene(jlstanford.bsu.edu.game.Scene.VIENNA_STREET);\n } else if (pSceneTouchEvent.isActionDown() && ((xCoordinate < 335 && xCoordinate > 263) && (yCoordinate < 284 && yCoordinate > 124))) {\n player = ViennaPracticeActivity.this.game.getPlayer();\n ViennaPracticeActivity.this.game.handleItemClick(new GuitarStrings(player));\n ViennaPracticeActivity.this.toastOnUiThread(\"Got Guitar Strings!\");\n loadInventoryItems();\n } else {\n }\n return false;\n }\n });\n\n loadInventoryItems();\n final Sprite spriteBG = new Sprite(405,240,CAMERA_WIDTH,CAMERA_HEIGHT,this.backgroundTiledTextureRegion,this.getVertexBufferObjectManager());\n SpriteBackground bg = new SpriteBackground(spriteBG);\n viennaPracticeScene.setBackground(bg);\n\n return viennaPracticeScene;\n }",
"Hazard createHazard();",
"public Sheep()\n {\n super(\"Sheep\",3,2,0); \n \n // tagline = \"Whatever\";\n maxHealth = 5;\n currentHealth = maxHealth;\n equip(new Cloth());\n equip(new SheepClaws());\n \n \n \n engaged = false;\n aggression = 1;\n special = 0;\n hostileRange = 2;\n }",
"public void initialHeroCastle() {\n Pair<Integer, Integer> heroCastlePosition = world.getHeroCastlePosition();\n SimpleIntegerProperty x2 = new SimpleIntegerProperty();\n SimpleIntegerProperty y2 = new SimpleIntegerProperty();\n x2.set(heroCastlePosition.getValue0());\n y2.set(heroCastlePosition.getValue1());\n String type = \"HeroCastle\";\n Building heroBuilding = new HeroCastleBuilding(x2, y2, type, 0);\n ImageView view = new ImageView(heroBuilding.getImage());\n addEntity(heroBuilding, view);\n squares.getChildren().add(view);\n }",
"@Override\n\tpublic void create() {\n\t\tAssets.load();\n\t\t\n\t\t//creo pantallas y cargo por defecto menuPrincipal\n\t\tscreenJuego = new JuegoScreen(this);\n\t\tmenuPrincipal = new MenuPrincipal(this);\n\t\tsetScreen(menuPrincipal);\n\t}",
"void impact(GameObject object) {\n\n }",
"private void createEnemyHelicopter()\n\t {\n\t \t\tRandNum = 0 + (int)(Math.random()*700);\n\t\t \t\tint xCoordinate = 1400;\n\t int yCoordinate = RandNum; \n\t eh = new Enemy(xCoordinate,yCoordinate);\n\t \n\t // Add created enemy to the list of enemies.\n\t EnemyList.add(eh);\n\t \n\t }",
"public ModelElephant()\n {\n \tint par1 = 12;\n \tint textureWidth = 256;\n \tint textureHeight = 128;\n \t\n \t// head\n head = new ModelRenderer(this, 0, 0);\n head.setTextureSize(textureWidth, textureHeight);\n head.addBox(-4F, -4F, -6F, 10, 10, 7);\n // remember default rotation point to allow for return after rearing animation\n headRotPointXDefault = -1F;\n headRotPointYDefault = 18 - par1;\n headRotPointZDefault = -10F;\n head.setRotationPoint(headRotPointXDefault, headRotPointYDefault, headRotPointZDefault);\n // add head's children models (ears, trunk, tusks)\n ear1 = new ModelRenderer(this, 34, 8);\n ear1.setTextureSize(textureWidth, textureHeight);\n ear1.addBox(-7F, -4F, -0.5F, 7, 8, 1);\n ear1.setRotationPoint(-3F, -1F, -2F);\n head.addChild(ear1);\n ear2 = new ModelRenderer(this, 34, 8);\n ear2.setTextureSize(textureWidth, textureHeight);\n ear2.addBox(0F, -4F, -0.5F, 7, 8, 1);\n ear2.setRotationPoint(4F, -1F, -2F);\n head.addChild(ear2);\n trunk1 = new ModelRenderer(this, 20, 50);\n trunk1.setTextureSize(textureWidth, textureHeight);\n trunk1.addBox(-2F, 0F, -1.5F, 4, 11, 3);\n trunk1.setRotationPoint(1F, 0F, -6F);\n head.addChild(trunk1);\n // trunk tip is child of trunk\n trunk2 = new ModelRenderer(this, 20, 50);\n trunk2.setTextureSize(textureWidth, textureHeight);\n trunk2.addBox(-2F, 0F, -1.5F, 4, 5, 3);\n trunk2.setRotationPoint(0F, 10F, 0F);\n trunk1.addChild(trunk2);\n // tusks\n tusk1 = new ModelRenderer(this, 34, 1);\n tusk1.setTextureSize(textureWidth, textureHeight);\n tusk1.addBox(-0.5F, -0.5F, 0F, 1, 1, 6);\n tusk1.setRotationPoint(-1.5F, 2F, -6F);\n tusk1.rotateAngleX = degToRad(-160);\n head.addChild(tusk1);\n tusk2 = new ModelRenderer(this, 34, 1);\n tusk2.setTextureSize(textureWidth, textureHeight);\n tusk2.addBox(4.5F, -0.5F, 0F, 1, 1, 6);\n tusk2.setRotationPoint(-1.5F, 2F, -6F);\n tusk2.rotateAngleX = degToRad(-160);\n head.addChild(tusk2);\n body = new ModelRenderer(this, 0, 17);\n body.setTextureSize(textureWidth, textureHeight);\n body.addBox(-8F, -10F, -7F, 16, 21, 12);\n bodyRotPointXDefault = 0F;\n bodyRotPointYDefault = 17 - par1;\n bodyRotPointZDefault = 1F;\n body.setRotationPoint(bodyRotPointXDefault, bodyRotPointYDefault, bodyRotPointZDefault);\n legRearRight = new ModelRenderer(this, 0, 50);\n legRearRight.setTextureSize(textureWidth, textureHeight);\n legRearRight.addBox(-3F, 0F, -2F, 5, 13, 5);\n legRearRight.setRotationPoint(-5F, 11F, 8F);\n legRearLeft = new ModelRenderer(this, 0, 50);\n legRearLeft.setTextureSize(textureWidth, textureHeight);\n legRearLeft.addBox(-1F, 0F, -1F, 5, 13, 5);\n legRearLeft.setRotationPoint(4F, 11F, 7F);\n legFrontRight = new ModelRenderer(this, 0, 50);\n legFrontRight.setTextureSize(textureWidth, textureHeight);\n legFrontRight.addBox(-3F, 0F, -3F, 5, 13, 5);\n legFrontRightRotPointXDefault = -5F;\n legFrontRightRotPointYDefault = 11F;\n legFrontRightRotPointZDefault = -6F;\n legFrontRight.setRotationPoint(legFrontRightRotPointXDefault, legFrontRightRotPointYDefault, legFrontRightRotPointZDefault);\n legFrontLeft = new ModelRenderer(this, 0, 50);\n legFrontLeft.setTextureSize(textureWidth, textureHeight);\n legFrontLeft.addBox(-1F, 0F, -3F, 5, 13, 5);\n legFrontLeftRotPointXDefault = 4F;\n legFrontLeftRotPointYDefault = 11F;\n legFrontLeftRotPointZDefault = -6F;\n legFrontLeft.setRotationPoint(legFrontLeftRotPointXDefault, legFrontLeftRotPointYDefault, legFrontLeftRotPointZDefault);\n\n \t// head for baby entity\n childHead = new ModelRenderer(this, 0, 0);\n childHead.setTextureSize(textureWidth, textureHeight);\n childHead.addBox(-4F, -4F, -6F, 10, 10, 7);\n childHeadRotPointXDefault = 0F;\n childHeadRotPointYDefault = 18 - par1;\n childHeadRotPointZDefault = -9.0F;\n childHead.setRotationPoint(childHeadRotPointXDefault, childHeadRotPointYDefault, childHeadRotPointZDefault);\n // add head's children models (ears, trunk, tusks)\n childEar1 = new ModelRenderer(this, 34, 8);\n childEar1.setTextureSize(textureWidth, textureHeight);\n childEar1.addBox(-7F, -4F, -0.5F, 7, 8, 1);\n childEar1.setRotationPoint(-3F, -1F, -2F);\n childHead.addChild(childEar1);\n childEar2 = new ModelRenderer(this, 34, 8);\n childEar2.setTextureSize(textureWidth, textureHeight);\n childEar2.addBox(0F, -4F, -0.5F, 7, 8, 1);\n childEar2.setRotationPoint(4F, -1F, -2F);\n childHead.addChild(childEar2);\n childTrunk1 = new ModelRenderer(this, 20, 50);\n childTrunk1.setTextureSize(textureWidth, textureHeight);\n childTrunk1.addBox(-2F, 0F, -1.5F, 4, 8, 3);\n childTrunk1.setRotationPoint(1F, 0F, -6F);\n childHead.addChild(childTrunk1);\n\n }",
"private void createPlayer() {\n Entity entity = engine.createEntity();\n B2dBodyComponent b2dbody = engine.createComponent(B2dBodyComponent.class);\n TransformComponent position = engine.createComponent(TransformComponent.class);\n TextureComponent texture = engine.createComponent(TextureComponent.class);\n PlayerComponent player = engine.createComponent(PlayerComponent.class);\n CollisionComponent colComp = engine.createComponent(CollisionComponent.class);\n TypeComponent type = engine.createComponent(TypeComponent.class);\n StateComponent stateCom = engine.createComponent(StateComponent.class);\n\n // create the data for the components and add them to the components\n b2dbody.body = bodyFactory.makeCirclePolyBody(10,10,1, BodyFactory.STONE, BodyType.DynamicBody,true);\n // set object position (x,y,z) z used to define draw order 0 first drawn\n position.position.set(10,10,0);\n texture.region = atlas.findRegion(\"player\");\n type.type = TypeComponent.PLAYER;\n stateCom.set(StateComponent.STATE_NORMAL);\n b2dbody.body.setUserData(entity);\n\n // add the components to the entity\n entity.add(b2dbody);\n entity.add(position);\n entity.add(texture);\n entity.add(player);\n entity.add(colComp);\n entity.add(type);\n entity.add(stateCom);\n\n // add the entity to the engine\n engine.addEntity(entity);\n }",
"public static Entity createArrow(Entity from, float x,float y,float xVel,float yVel) {\n \tEntity e = Lutebox.scene.createEntity();\n \tEquipedCrossbow bow = from.get(EquipedCrossbow.class);\n \t\n \te.attach(Position.class).set(x, y);\n \tif (from.get(Player.class) != null) {\n \t\te.attach(Movement.class).setMaxSpeed(10).set(xVel*10, yVel*10);\n \t} else {\n \t\te.attach(Movement.class).setMaxSpeed(6).set(xVel*5, yVel*5);\n \t}\n \te.attach(Size.class).set(0.3f, 0.3f);\n \te.attach(Collider.class);\n \te.attach(Direction.class);\n \te.attach(Projectile.class).setShooter(from).setDamage(bow.damage).setStartPosition(x, y);\n \t\n \t\n \treturn e;\n }",
"public Axe() {\n\t\t\tthis.name = \"Axe\";\n\t\t\tthis.damage = 20;\n\t\t}",
"public Player(Position position) {\n this.position = position;\n this.image = new Image(\"O\");\n }",
"void spawnEntityAt(String typeName, int x, int y);",
"public Zombie(float pX, float pY, CharacterSkin skin, int health, DialogLevelScene context) {\n\t\tsuper(pX, pY, skin, health, context);\n\t\tZombie.getAliveZombies().add(this);\n\t\tif (this.isContextSessionScene())\n\t\t\t((SessionScene) context).addBulletTarget(this);\n\t}",
"private void prepare()\n {\n addObject(player,185,196);\n player.setLocation(71,271);\n Ground ground = new Ground();\n addObject(ground,300,360);\n invent invent = new invent();\n addObject(invent,300,375);\n }",
"public Levels()\r\n { \r\n super(1070, 570, 1);\r\n \r\n //Add the bottom platform in the menu screen\r\n platforms = new Platforms[7]; \r\n for (int i = 0; i < platforms.length; i++)\r\n {\r\n platforms[i] = new Platforms();\r\n }\r\n bottomPlatform();\r\n\r\n //Add the Potato (player)\r\n player = new Player();\r\n addObject (player, 100, 512); \r\n\r\n setBackground(\"menu.png\");\r\n }",
"Ogre(int xPos, int yPos, String color,int deltaX,int deltaY) {\n this.xPos = xPos;\n this.yPos = yPos;\n this.color = color;\n this.deltaX = deltaX;\n this.deltaY = deltaY;\n }",
"public void spawnWanderingSeeker(LogicEngine in_logicEngine)\r\n\t{\n\t\tGameObject ship = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/triangle.png\",(float)LogicEngine.SCREEN_WIDTH*Math.random(),LogicEngine.SCREEN_HEIGHT-10,0);\r\n\t\t\t\t\r\n\t\t//set animation frame\r\n\t\tship.i_animationFrame=1;\r\n\t\tship.i_animationFrameRow=0;\r\n\t\tship.i_animationFrameSizeWidth=16;\r\n\t\tship.i_animationFrameSizeHeight=16;\r\n\t\t\r\n\t\t//wander \t\r\n\t\tCustomBehaviourStep cb = new CustomBehaviourStep(new Wander(-2.5,2.5,20,0.1));\r\n\t\tship.stepHandlers.add( cb);\r\n\t\t\r\n\t\t//chase player if on medium or hard\r\n\t\tif(Difficulty.difficulty == DIFFICULTY.MEDIUM || \r\n\t\t\t\tDifficulty.difficulty == DIFFICULTY.HARD)\r\n\t\t{\t\r\n\t\t\tSeekNearestPlayerStep sps = new SeekNearestPlayerStep(100);\r\n\t\t\tship.stepHandlers.add(sps);\r\n\t\t}\r\n\t\r\n\t\tship.stepHandlers.add(new FlyStraightStep(new Vector2d(0,-2)));\r\n\t\tship.collisionHandler = new DestroyIfEnemyCollision(ship, 10, true);\r\n\t\tship.v.setMaxForce(2);\r\n\t\tship.v.setMaxVel(2);\r\n\t\t\r\n\t\tship.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\t\t\r\n\t\tin_logicEngine.objectsEnemies.add(ship);\r\n\t\t\r\n\t}",
"public final void spawn(AttachmentViewer viewer, Vector motion) {\n super.spawn(viewer, motion);\n }",
"@Override\n protected void createMesh() {\n rayLight.getScope().add(camera);\n\n light = new PointLight(Color.GAINSBORO);\n light.setTranslateX(-300);\n light.setTranslateY(300);\n light.setTranslateZ(-2000);\n\n light2 = new PointLight(Color.ALICEBLUE);\n light2.setTranslateX(300);\n light2.setTranslateY(-300);\n light2.setTranslateZ(2000);\n\n light3 = new PointLight(Color.SPRINGGREEN);\n light3.setTranslateY(-2000);\n //create a target\n target1 = new Sphere(180);\n target1.setId(\"t1\");\n target1.setDrawMode(DrawMode.LINE);\n target1.setCullFace(CullFace.NONE);\n target1.setTranslateX(500);\n target1.setTranslateY(500);\n target1.setTranslateZ(500);\n target1.setMaterial(red);\n // create another target\n target2 = new Sphere(150);\n target2.setId(\"t2\");\n target2.setDrawMode(DrawMode.LINE);\n target2.setCullFace(CullFace.NONE);\n target2.setTranslateX(-500);\n target2.setTranslateY(-500);\n target2.setTranslateZ(-500);\n target2.setMaterial(blue);\n\n origin = new Box(20, 20, 20);\n origin.setDrawMode(DrawMode.LINE);\n origin.setCullFace(CullFace.NONE);\n \n model = new Group(target1, target2, origin, light, light2, light3, rayLight);\n }",
"public AbstractGameObject(Level linksTo, int atX, int atY) {\n level = linksTo;\n xPosition = atX;\n yPosition = atY;\n }",
"public GameObject peek();",
"private void createGun() {\n gun = new Node(\"Gun\");\n Box b = new Box(.25f, .25f, 1.25f);\n Geometry bg = new Geometry(\"Box\", b);\n Material bm = new Material(assetManager, \"Common/MatDefs/Misc/Unshaded.j3md\");\n bm.setColor(\"Color\", ColorRGBA.Gray);\n bg.setMaterial(bm);\n gun.attachChild(bg);\n }",
"@Spawns(\"moose\")\n public Entity spawnMoose(SpawnData data) {\n return entityBuilder()\n .from(data)\n .type(MOOSE)\n .viewWithBBox(texture(\"moose.png\", 40, 58))\n .with(new CollidableComponent(true))\n .with(new OffscreenCleanComponent())\n .with(new LiftComponent().yAxisSpeedDuration(150, Duration.seconds(15)))\n .build();\n }",
"public WorldScene makeScene() {\n // WorldCanvas c = new WorldCanvas(300, 300);\n WorldScene s = new WorldScene(this.width, this.height);\n s.placeImageXY(newImg, this.width / 2, this.height / 2);\n return s;\n }",
"@Override\n public void onSurfaceCreated(GL10 unused, javax.microedition.khronos.egl.EGLConfig config) {\n GLES20.glClearColor(Player.colorBG[0], Player.colorBG[1], Player.colorBG[2], 1.0f);\n // initialize a triangle\n mHat = new Hat();\n robe = new Robe();\n // initialize a square\n mSquare = new Square(Player.PLAYER_ONE);\n mHat2 = new Hat();\n robe2 = new Robe();\n // initialize a square\n mSquare2 = new Square(Player.PLAYER_TWO);\n\n\n\n float[] colorWhite = {1f, 1f, 1f, 1.0f};\n p1Eye = new Circle(colorWhite);\n p2Eye = new Circle(colorWhite);\n\n }",
"Position_Position createPosition_Position();",
"public CreateHero() {\r\n\t\tinitComponents();\r\n\t}",
"public Space_Object (){\n groundPosition = 0;\n }",
"public GameObject(String name, int x, int y) {\n this.image = GameObject.processing.loadImage(\"images\" + File.separator + name + \".png\");\n this.xPosition = x;\n this.yPosition = y;\n this.active = true;\n }",
"public void explosion(){\n explosionEffect.play(pitch, volume);\n }",
"public Stage1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1200, 900, 1);\n \n GreenfootImage image = getBackground();\n image.setColor(Color.BLACK);\n image.fill();\n star();\n \n \n \n //TurretBase turretBase = new TurretBase();\n playerShip = new PlayerShip();\n scoreDisplay = new ScoreDisplay();\n addObject(scoreDisplay, 100, 50);\n addObject(playerShip, 100, 450);\n \n }",
"@Override\n\tpublic void create() {\n\t\tthis.playScreen = new PlayScreen<EntityUnknownGame>(this);\n\t\tsetScreen(this.playScreen);\n\t\t\n\t\t//this.shadowMapTest = new ShadowMappingTest<EntityUnknownGame>(this);\n\t\t//setScreen(this.shadowMapTest);\n\t\t\n\t\t//this.StillModelTest = new StillModelTest<EntityUnknownGame>(this);\n\t\t//setScreen(this.StillModelTest);\n\t\t\n//\t\tthis.keyframedModelTest = new KeyframedModelTest<EntityUnknownGame>(this);\n//\t\tsetScreen(this.keyframedModelTest);\n\t}",
"Oracion createOracion();",
"@Override\n public void create () {\n batch = new SpriteBatch();\n height = Gdx.graphics.getHeight();\n width = Gdx.graphics.getWidth();\n\n bullets = new ArrayList<Bullet>();\n fondo = new Texture(\"background.png\");\n nave = new Texture(\"space-ship-24px.png\");\n\n spaceship = new SpaceShip();\n Enemy = new Enemy();\n //Enemy = new Sprite(nave);\n //spaceship.setPosition(348, 50);\n Enemy.setPosition(348, 300);\n System.out.println(x);\n }",
"private void createBasicEnemies() {\n\t\tint xTemp1 = (int) app.random(60, 500);\n\t\tint xTemp2 = (int) app.random(650, 1140);\n\t\tint yTemp = -60;\n\t\t\n\t\t//Contador para crear enemigo cada cierto tiempo\n\t\tapp.frameRate(80);\n\t\t\n\t\t//Agregar enemigos basicos\n\t\tif (app.frameCount%120 == 0) {\n\t\t\tbasicEnemies1.add(new BasicEnemy(app, xTemp1, yTemp));\n\t\t\tbasicEnemies2.add(new BasicEnemy(app, xTemp2, yTemp));\n\t\t}\n\t\t\n\t\t//Agregar enemigos que disparan\t\t\n\t\tif (app.frameCount%250 == 0) {\n\t\t\thardEnemies1.add(new HardEnemy(app, xTemp1, yTemp));\n\t\t\thardEnemies2.add(new HardEnemy(app, xTemp2, yTemp));\n\t\t}\n\t}",
"public EliteMobEntity(EntityType entityType, Location location, int eliteMobLevel, String name, CreatureSpawnEvent.SpawnReason spawnReason) {\n\n /*\n Register living entity to keep track of which entity this object is tied to\n */\n this.eliteMob = spawnBossMobLivingEntity(entityType, location);\n /*\n Register level, this is variable as per stacking rules\n */\n setEliteMobLevel(eliteMobLevel);\n eliteMobTier = MobTierFinder.findMobTier(eliteMobLevel);\n /*\n Sets the spawn reason\n */\n setSpawnReason(spawnReason);\n /*\n Start tracking the entity\n */\n if (!EntityTracker.registerEliteMob(this)) return;\n /*\n Get correct instance of plugin data, necessary for settings names and health among other things\n */\n EliteMobProperties eliteMobProperties = EliteMobProperties.getPluginData(entityType);\n /*\n Handle name, variable as per stacking rules\n */\n setCustomName(name);\n /*\n Handle health, max is variable as per stacking rules\n Currently #setHealth() resets the health back to maximum\n */\n setMaxHealth(eliteMobProperties);\n setHealth();\n /*\n Register whether or not the elite mob is natural\n */\n this.isNaturalEntity = EntityTracker.isNaturalEntity(this.eliteMob);\n /*\n These have custom powers\n */\n this.hasCustomPowers = true;\n /*\n Start tracking the entity\n */\n// EntityTracker.registerEliteMob(this);\n\n eliteMob.setCanPickupItems(false);\n\n this.setHasStacking(false);\n this.setHasCustomArmor(true);\n\n }",
"public ModelFlameThrower()\n/* 16: */ {\n/* 17:15 */ float f = 0.0F;\n/* 18:16 */ this.bipedGun = new ModelRenderer(this, 0, 10);\n/* 19:17 */ this.bipedGun.addBox(0.0F, 0.0F, 0.0F, 4, 4, 4, f);\n/* 20: */ \n/* 21:19 */ this.rifle = new ModelRenderer(this, 0, 18);\n/* 22:20 */ this.rifle.addBox(0.5F, 0.2F, 4.0F, 3, 3, 3, f);\n/* 23: */ \n/* 24:22 */ this.mouth = new ModelRenderer(this, 0, 0);\n/* 25:23 */ this.mouth.addBox(1.5F, 1.2F, 7.0F, 1, 1, 2, f);\n/* 26: */ \n/* 27:25 */ this.spark = new ModelRenderer(this, 14, 0);\n/* 28:26 */ this.spark.addBox(1.5F, 0.0F, 0.0F, 1, 1, 3, -0.38F);\n/* 29:27 */ this.spark.setRotationPoint(0.0F, 0.0F, 6.9F);\n/* 30:28 */ this.spark.rotateAngleX = -0.2618F;\n/* 31: */ }",
"public void createPlayerModel() {\n\t\tModelBuilder mb = new ModelBuilder();\n\t\tModelBuilder mb2 = new ModelBuilder();\n\t\tlong attr = Usage.Position | Usage.Normal;\n\t\tfloat r = 0.5f;\n\t\tfloat g = 1f;\n\t\tfloat b = 0.75f;\n\t\tMaterial material = new Material(ColorAttribute.createDiffuse(new Color(r, g, b, 1f)));\n\t\tMaterial faceMaterial = new Material(ColorAttribute.createDiffuse(Color.BLUE));\n\t\tfloat w = 1f;\n\t\tfloat d = w;\n\t\tfloat h = 2f;\n\t\tmb.begin();\n\t\t//playerModel = mb.createBox(w, h, d, material, attr);\n\t\tNode node = mb.node(\"box\", mb2.createBox(w, h, d, material, attr));\n\t\t// the face is just a box to show which direction the player is facing\n\t\tNode faceNode = mb.node(\"face\", mb2.createBox(w/2, h/2, d/2, faceMaterial, attr));\n\t\tfaceNode.translation.set(0f, 0f, d/2);\n\t\tplayerModel = mb.end();\n\t}",
"public Node<E> createNode(E e, Position<E> parent){\n Node<E> p = (Node<E>) parent;\n return new Node<>(e, p);\n }",
"public PokeSceneWithBlastoiseCharizard() {\n BackgroundImage blastoise = new BackgroundImage(\"blastoise.png\", 350, 80, 300);\n BackgroundImage charizard = new BackgroundImage(\"charizard.png\", 400, 800, 300);\n\n sceneNodes.getChildren().add(blastoise);\n sceneNodes.getChildren().add(charizard);\n }",
"public ThreeDiceApp()\n {\n t1 = new Thrower();\n\n m1 = new Betting();\n m1.setLocation( 350, 300 );\n\n }",
"void addMotion(IMotion motion);",
"public ExamineCommand(Game theGame) {\n\t\tsuper(theGame);\n\t}",
"private Spatial makeCharacter(final float x, final float y, final float z, final EgocentricContextData data) {\n Spatial golem = assetManager.loadModel(\"Models/Oto/Oto.mesh.xml\");\n golem.scale(0.2f);\n golem.setLocalTranslation(x, y, z);\n\n golem.setUserData(EgocentricContextData.TAG, data);\n\n // We must add a light to make the model visible\n DirectionalLight sun = new DirectionalLight();\n sun.setDirection(new Vector3f(-0.1f, -0.7f, -1.0f));\n golem.addLight(sun);\n return golem;\n }",
"private Entity createBoid(Pane pane) {\n Random randGen = new Random();\n double randX = randGen.nextDouble() * pane.getWidth();\n double randY = randGen.nextDouble() * pane.getHeight();\n Entity e = new Entity(randX, randY);\n entities.add(e);\n\n Circle cir = new Circle();\n e.setShape(cir);\n cir.setCenterX(randX);\n cir.setCenterY(randY);\n cir.setRadius(2);\n cir.setFill(Color.rgb(255,255,255));\n pane.getChildren().add(cir);\n return e;\n }",
"public void spawnExplosion(Vector3f location) {\r\n ParticleMesh mesh = getExplosion();\r\n mesh.getLocalTranslation().set(location);\r\n mesh.updateGeometricState(0, true);\r\n mesh.forceRespawn();\r\n }",
"GameObject getObject();",
"public void spawn()\n\t{\n\t\tsynchronized(this)\n\t\t{\n\t\t\t// Set the x,y,z position of the L2Object spawn and update its _worldregion\n\t\t\tsetVisible(true);\n\t\t\tsetWorldRegion(WorldManager.getInstance().getRegion(getWorldPosition()));\n\n\t\t\t// Add the L2Object spawn in the _allobjects of L2World\n\t\t\tWorldManager.getInstance().storeObject(object);\n\n\t\t\t// Add the L2Object spawn to _visibleObjects and if necessary to _allplayers of its L2WorldRegion\n\t\t\tregion.addVisibleObject(object);\n\t\t}\n\n\t\t// this can synchronize on others instancies, so it's out of\n\t\t// synchronized, to avoid deadlocks\n\t\t// Add the L2Object spawn in the world as a visible object\n\t\tWorldManager.getInstance().addVisibleObject(object, region);\n\n\t\tobject.onSpawn();\n\t}",
"@Override\n public void create() {\n\n batch = new SpriteBatch();\n manager = new AssetManager();\n\n manager.load(\"audio/main_theme.mp3\", Music.class);\n // manager.load(\"String sonido\", Sound.class);\n manager.load(\"sprites/dragon.pack\", TextureAtlas.class);\n manager.load(\"sprites/vanyr.pack\", TextureAtlas.class);\n manager.finishLoading();\n\n setScreen(new PlayScreen(this));\n\n }",
"public Eagle(Eagle e) {\n super(e.weight, e.food, e.tame);\n setPoint(e.pos);\n }",
"public Eagle(Position position) {\n\t\tsuper(position);\n\t\tsetInactive();\n\t\thasSword = false;\n\t\tonWay = false;\n\t\treturning = false;\n\t\tswordPath = new ArrayList<Position>();\n\t\treturnPath = new Stack<Position>();\n\t\tlastCell = \"H \";\n\t}",
"@Override\n public Graphics2D createObjectView() {\n\n Graphics2D objectView = super.createObjectView();\n\n /* Setting graphics */\n objectView.setColor(Color.RED);\n objectView.setFont(new Font(\"Lucida\", Font.ITALIC, 10));\n\n RedBird player = ((RedBird) getFieldObject());\n String playerName = player.getPlayerName();\n int playerSize = player.getSize();\n int ovalSize = getOvalSize();\n\n /* Painting player name */\n if (ovalSize > START_OVAL_SIZE) {\n objectView.drawString(\n playerName,\n (playerSize / 2) - X_OFFSET,\n (playerSize / 2) + Y_OFFSET\n );\n }\n\n return objectView;\n }",
"@Override\r\n\tpublic void create() {\n\t\tbatch = new SpriteBatch();\r\n\t\tcamera = new OrthographicCamera();\r\n\t\tassets = new AssetManager();\r\n\t\t\r\n\t\tcamera.setToOrtho(false,WIDTH,HEIGHT);\r\n\t\t\r\n\t\tTexture.setAssetManager(assets);\r\n\t\tTexture.setEnforcePotImages(false);\r\n\t\t\r\n\t\tsetScreen(new SplashScreen(this));\r\n\t}",
"public EliteMobEntity(LivingEntity livingEntity, int eliteMobLevel, CreatureSpawnEvent.SpawnReason spawnReason) {\n\n /*\n Register living entity to keep track of which entity this object is tied to\n */\n this.eliteMob = livingEntity;\n /*\n Register level, this is variable as per stacking rules\n */\n setEliteMobLevel(eliteMobLevel);\n eliteMobTier = MobTierFinder.findMobTier(eliteMobLevel);\n /*\n Sets the spawn reason\n */\n setSpawnReason(spawnReason);\n /*\n Start tracking the entity\n */\n if (!EntityTracker.registerEliteMob(this)) return;\n /*\n Get correct instance of plugin data, necessary for settings names and health among other things\n */\n EliteMobProperties eliteMobProperties = EliteMobProperties.getPluginData(livingEntity);\n /*\n Handle name, variable as per stacking rules\n */\n setCustomName(eliteMobProperties);\n /*\n Handle health, max is variable as per stacking rules\n Currently #setHealth() resets the health back to maximum\n */\n setMaxHealth(eliteMobProperties);\n setHealth();\n /*\n Set the armor\n */\n setArmor();\n /*\n Register whether or not the elite mob is natural\n */\n this.isNaturalEntity = EntityTracker.isNaturalEntity(livingEntity);\n /*\n Set the power list\n */\n randomizePowers(eliteMobProperties);\n\n eliteMob.setCanPickupItems(false);\n\n }",
"public DumbEnemy(){\n setImage(new GreenfootImage(SPRITE_W,SPRITE_H));\n }",
"public AbstractGameObject(Level linksTo, Point at) {\n level = linksTo;\n xPosition = at.x;\n yPosition = at.y;\n }",
"public void dispara()\r\n {\r\n BulletEnemy bala = new BulletEnemy();\r\n getWorld().addObject(bala,getX(),getY()+25);\r\n }"
]
| [
"0.6155864",
"0.5803539",
"0.5610887",
"0.56103224",
"0.5491587",
"0.54714316",
"0.5471394",
"0.54622686",
"0.5444056",
"0.542274",
"0.54214895",
"0.5385739",
"0.5384524",
"0.53475624",
"0.53197896",
"0.5319438",
"0.5272553",
"0.5270782",
"0.52588505",
"0.52540255",
"0.52366424",
"0.5221274",
"0.51921725",
"0.5179526",
"0.51778567",
"0.5162343",
"0.5149482",
"0.51414055",
"0.514026",
"0.5138271",
"0.5126023",
"0.51225877",
"0.5121913",
"0.51197493",
"0.5092947",
"0.50776625",
"0.5068704",
"0.5067227",
"0.50643694",
"0.50615364",
"0.505694",
"0.5055644",
"0.5038703",
"0.5034811",
"0.50340384",
"0.5027593",
"0.5018602",
"0.49965566",
"0.49682027",
"0.49607906",
"0.49604663",
"0.49552923",
"0.49518088",
"0.49503717",
"0.4942206",
"0.49348477",
"0.49196193",
"0.49146837",
"0.49068445",
"0.49059963",
"0.48994964",
"0.4893559",
"0.48927042",
"0.48923793",
"0.48849353",
"0.48831698",
"0.4877545",
"0.48722956",
"0.48679915",
"0.48645526",
"0.4862551",
"0.48574117",
"0.48560673",
"0.48514628",
"0.48389012",
"0.4836355",
"0.48315156",
"0.48314068",
"0.48310965",
"0.48266494",
"0.48210263",
"0.48180616",
"0.48162475",
"0.48131996",
"0.48101458",
"0.4808511",
"0.48075238",
"0.4803659",
"0.47960716",
"0.47955143",
"0.47947866",
"0.4790893",
"0.4789245",
"0.47868237",
"0.47755",
"0.47719315",
"0.4768539",
"0.4766968",
"0.47652245",
"0.47598678"
]
| 0.4882154 | 66 |
Created by Tanner on 12/16/2016. | public interface SpriteInterface {
void start();
void update(double timeChange);
void draw();
void changeLocation(float xPos, float yPos, float rotation, float scaleX, float scaleY);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"public final void mo51373a() {\n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"public void mo38117a() {\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"public void mo4359a() {\n }",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void nadar() {\n\t\t\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 sacrifier() {\n\t\t\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\n public void init() {\n\n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n protected void initialize() \n {\n \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}",
"private void m50366E() {\n }",
"@Override\n public void init() {\n }",
"@Override\n void init() {\n }",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n public void init() {}",
"@Override\n protected void init() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"protected boolean func_70814_o() { return true; }",
"private Rekenhulp()\n\t{\n\t}",
"private void poetries() {\n\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public final void mo91715d() {\n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"private TMCourse() {\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 public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"private void init() {\n\n\t}",
"public void mo6081a() {\n }",
"private static void cajas() {\n\t\t\n\t}",
"private MetallicityUtils() {\n\t\t\n\t}",
"@Override\n public void initialize() {\n \n }",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override public int describeContents() { return 0; }",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n public int retroceder() {\n return 0;\n }",
"@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n public void initialize() { \n }",
"public void mo12628c() {\n }",
"@Override\n\t\tpublic void init() {\n\t\t}",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"public Pitonyak_09_02() {\r\n }",
"@Override\n public int getSize() {\n return 1;\n }"
]
| [
"0.6040784",
"0.5958848",
"0.5881894",
"0.58776605",
"0.5774199",
"0.576116",
"0.57297444",
"0.57297444",
"0.5694601",
"0.56525165",
"0.5597258",
"0.55791086",
"0.5566723",
"0.55539477",
"0.55524665",
"0.5544612",
"0.55429995",
"0.5531344",
"0.5528329",
"0.5523306",
"0.5523306",
"0.5523306",
"0.5523306",
"0.5523306",
"0.5523306",
"0.55160797",
"0.55157626",
"0.54978436",
"0.5485377",
"0.5483118",
"0.5481431",
"0.5480916",
"0.5472881",
"0.5472881",
"0.54723513",
"0.5451637",
"0.5451637",
"0.5451637",
"0.5451637",
"0.5451637",
"0.54427373",
"0.5435441",
"0.5412377",
"0.54093814",
"0.54074985",
"0.5403018",
"0.5399839",
"0.53994054",
"0.53994054",
"0.53994054",
"0.53994054",
"0.53994054",
"0.53994054",
"0.53994054",
"0.5396526",
"0.5396526",
"0.5395454",
"0.5393995",
"0.5391052",
"0.5390199",
"0.5379721",
"0.53775555",
"0.5377287",
"0.5374376",
"0.53710264",
"0.53662944",
"0.5360323",
"0.5349875",
"0.53482944",
"0.5346873",
"0.5346873",
"0.5346873",
"0.5345154",
"0.53343904",
"0.53343904",
"0.53343904",
"0.53182906",
"0.53182906",
"0.53086555",
"0.5301548",
"0.5298101",
"0.52906406",
"0.5289645",
"0.52871686",
"0.52840877",
"0.52840877",
"0.52840877",
"0.528387",
"0.52818245",
"0.5281358",
"0.5281358",
"0.5280884",
"0.5275047",
"0.5268813",
"0.52687734",
"0.52677673",
"0.5265927",
"0.5261928",
"0.52590996",
"0.5258065",
"0.5257875"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void action() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
Output only. The unique identifier of this transition route. string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; | java.lang.String getName(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getRouteName() {\n return routeName;\n }",
"String getRouteID();",
"private String getName(String name) {\n\t\tint n;\n\t\tif (name.startsWith(\"place_\")) {\n\t\t\tn = Integer.parseInt(name.substring(6));\n\t\t} else if (name.startsWith(\"t_\")) {\n\t\t\tn = Integer.parseInt(name.substring(2));\n\t\t} else {\n\t\t\treturn name;\n\t\t}\n\t\tif (n < net.getPlaces().size()) {\n\t\t\tPlace p = (Place) net.getPlaces().get(n);\n\t\t\treturn \"Place \" + p.getIdentifier();\n\t\t}\n\t\tn -= net.getPlaces().size();\n\t\tn--;\n\t\tif (n < net.getTransitions().size()) {\n\t\t\tTransition t = (Transition) net.getTransitions().get(n);\n\t\t\treturn \"Transition \" + t.getIdentifier();\n\t\t}\n\t\treturn name;\n\t}",
"protected String revealedId (String name)\n {\n return name;\n }",
"String getDestinationName();",
"public RouteInterface setName(String name);",
"public String getDestinationName() {\n return destinationName;\n }",
"@Override\n\tpublic String updateATourneyName() {\n\t\treturn null;\n\t}",
"@Override\n public String toString() {\n return \"The name of the destination is \" + this.name + \".\";\n }",
"public String getRoutingNo();",
"public int getRouteId() {\n return routeId;\n }",
"private String getActivityName(Transition transition) {\n\t\tString result = \"\";\n\t\t// get associated log event type\n\t\tLogEvent le = transition.getLogEvent();\n\n\t\t// check for invisible tasks\n\t\tif (le != null) {\n\t\t\tresult = le.getModelElementName();\n\t\t} else {\n\t\t\tresult = transition.getIdentifier();\n\t\t}\n\t\treturn result;\n\t}",
"public String getRouteid() {\r\n return routeid;\r\n }",
"@Override\n public String getName() {\n return seqName;\n }",
"public String getDestinationId()\n {\n return destinationId; // Field is final; no need to sync.\n }",
"@JsonProperty(\"destination_name\")\n public String getDestinationName() {\n return destinationName;\n }",
"public java.lang.String getRoute () {\n\t\treturn route;\n\t}",
"long getDestinationId();",
"private static String getUniqueGraphName() {\n return String.format(\"g%d\", uniqueGraph++);\n }",
"@Override\n\tpublic java.lang.String getUuid() {\n\t\treturn _esfTournament.getUuid();\n\t}",
"public StringKey getName() {\n return ModelBundle.SHIP_NAME.get(name);\n }",
"public final int getName() { return name; }",
"@Override\r\n\tpublic int getLinkDestinationId() {\n\t\treturn destination.getNodeId();\r\n\t}",
"private String printRoute() {\n String r = String.valueOf(this.route.get(0));\n int index = 1;\n while (index < this.route.size()) {\n r = r + \" - \" + this.route.get(index);\n index++;\n }\n return r;\n }",
"public void generateRouteNameString(){\n switch(routeName){\n case \"1A\": this.routeNameString = \"College Edinburgh\"; break;\n case \"1B\": this.routeNameString = \"College Edinburgh\"; break;\n case \"2A\": this.routeNameString = \"West Loop\"; break;\n case \"2B\": this.routeNameString = \"West Loop\"; break;\n case \"3A\": this.routeNameString = \"East Loop\"; break;\n case \"3B\": this.routeNameString = \"East Loop\"; break;\n case \"4\": this.routeNameString = \"York\"; break;\n case \"5\": this.routeNameString = \"Gordon\"; break;\n case \"6\": this.routeNameString = \"Harvard Ironwood\"; break;\n case \"7\": this.routeNameString = \"Kortright Downey\"; break;\n case \"8\": this.routeNameString = \"Stone Road Mall\"; break;\n case \"9\": this.routeNameString = \"Waterloo\"; break;\n case \"10\": this.routeNameString = \"Imperial\"; break;\n case \"11\": this.routeNameString = \"Willow West\"; break;\n case \"12\": this.routeNameString = \"General Hospital\"; break;\n case \"13\": this.routeNameString = \"Victoria Rd Rec Centre\"; break;\n case \"14\": this.routeNameString = \"Grange\"; break;\n case \"15\": this.routeNameString = \"University College\"; break;\n case \"16\": this.routeNameString = \"Southgate\"; break;\n case \"20\": this.routeNameString = \"NorthWest Industrial\"; break;\n case \"50\": this.routeNameString = \"Stone Road Express\"; break;\n case \"56\": this.routeNameString = \"Victoria Express\"; break;\n case \"57\": this.routeNameString = \"Harvard Express\"; break;\n case \"58\": this.routeNameString = \"Edinburgh Express\"; break;\n default: this.routeNameString = \"Unknown Route\"; break;\n }\n }",
"FlowId id();",
"public String getDestinationAirportName() {\n return destination.getName();\n }",
"public String getName() {\n return (\"(\" + this.source.getName() + \",\" + this.destination.getName() + \")\");\n }",
"public String getDestination(){\r\n\t\treturn route.getDestination();\r\n\t}",
"public String getName(){\n\t\treturn this.tournamentName;\n\t}",
"public String getName() {\n\t\treturn JWLC.nativeHandler().wlc_output_get_name(this.to());\n\t}",
"public String toString()\n {\n return id() + location().toString() + direction().toString();\n }",
"public Relationship.Name getName() {\n return name;\n }",
"public String toString(){\n\t\tString str = \"<Route: \";\n\t\tfor(int i=0; i<visits.size(); i++){\n\t\t\tVisit v = visits.get(i);\n\t\t\tstr += \"\\t\"+i+\": \"+ v +\"\\t\"+ \"At time: \"+arrivalTimes.get(i)+\"->\"+departureTimes.get(i);\n\t\t\tif(locked.get(i)) str += \" locked\";\n\t\t\tstr += \"\\n\";\n\t\t}\n\t\tstr += \"\\t\"+visits.get(0);\n\t\treturn str+\">\";\n\t}",
"public String getRoute() {\n return route;\n }",
"public String printRoute()\r\n {\r\n String res = this.getRoute().stream()\r\n .map(entry -> entry.getKey().getId()\r\n + \":\"\r\n + entry.getValue()\r\n + \";\")\r\n .collect(Collectors.joining());\r\n System.out.println(res);\r\n return res;\r\n }",
"public final String name() {\n return name;\n }",
"public String getName() {\n return this.lineName;\n }",
"public String getName() {\n if (mName == null) {\n mName = mId;\n int index = mName.lastIndexOf(WS_SEP);\n if (index != -1) {\n mName = mName.substring(index + 1);\n }\n }\n\n return mName;\n }",
"@Override\n public String name() {\n return this._name;\n }",
"public String getStateName() {\n return name;\n }",
"@Override\n\tpublic String toString() {\n\t\treturn Name;// + \"||\" + ID;// + \"-\" + ID;\n\t}",
"public String toString() {return name;}",
"public String getVisitName() {\r\n\t\treturn visitName;\r\n\t}",
"public String name() {\n return BPMNode.getId();\n }",
"public String getRouteDest() {\n Object ref = routeDest_;\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 routeDest_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }",
"@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.RouteInfo getRoute() {\n if (routeBuilder_ == null) {\n if (stepInfoCase_ == 7) {\n return (com.google.cloud.networkmanagement.v1beta1.RouteInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.RouteInfo.getDefaultInstance();\n } else {\n if (stepInfoCase_ == 7) {\n return routeBuilder_.getMessage();\n }\n return com.google.cloud.networkmanagement.v1beta1.RouteInfo.getDefaultInstance();\n }\n }",
"public Integer getRoutingId() {\n return routingId;\n }",
"public String getNameId() {\r\n\t\treturn nameId;\r\n\t}",
"public String getSequenceName() {\n return sequenceName;\n }",
"@Basic @Immutable\n\tpublic String getName() {\n\t\treturn name;\n\t}",
"public java.lang.String getPortGoingToStateName() {\n\t\treturn _tempNoTiceShipMessage.getPortGoingToStateName();\n\t}",
"java.lang.String getRoutingKey();",
"io.envoyproxy.envoy.type.metadata.v3.MetadataKind.Route getRoute();",
"@ApiModelProperty(value = \"Name of a flow\")\n public String getName() {\n return name;\n }",
"public String getRouteDest() {\n Object ref = routeDest_;\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 routeDest_ = s;\n }\n return s;\n }\n }",
"@ToString\n @Override\n public String toString() {\n return name;\n }",
"@Override\n\tpublic synchronized String toString() {\n\t\treturn this.id + \" : \" + this.name;\n\t}",
"public String getRoutename() {\r\n return routename;\r\n }",
"public long getDestinationId() {\n return destinationId_;\n }",
"String getRouteDest();",
"public String getId() {\n\t\tStringBuilder builder = new StringBuilder();\n\t\tbuilder.append(\"n=\");\n\t\tif ( nodeId != null ) {\n\t\t\tbuilder.append(nodeId);\n\t\t}\n\t\tbuilder.append(\";c=\");\n\t\tif ( created != null ) {\n\t\t\tbuilder.append(created);\n\t\t}\n\t\tbuilder.append(\";s=\");\n\t\tif ( sourceId != null ) {\n\t\t\tbuilder.append(sourceId);\n\t\t}\n\t\treturn DigestUtils.sha1Hex(builder.toString());\n\t}",
"@XmlElement(name = \"identifier\", namespace = Namespaces.SRV)\n final String getIdentifier() {\n if (LEGACY_XML) {\n final ScopedName name = getScopedName();\n if (name != null) {\n return name.tip().toString();\n }\n }\n return null;\n }",
"UUID getTransmissionId();",
"public String toString ( ) {\r\n String returnString = _name + \"{ id: \" + _uniqueID + \" pos: [\"+ getPosition().getPosition() + \"] }\";\r\n return returnString;\r\n }",
"@Override\n\tpublic String getSameViewID() {\n\t\tif (this.movements.isEmpty()) {\n\t\t\treturn \"/index.html\";\n\t\t} else {\n\t\t\tfinal String lastId = this.movements.peek();\n\t\t\treturn \"/\" + lastId + \".xhtml\";\n\t\t}\n\t}",
"public String toString() {\n return String.format(\"%4d: %s\", id, name);\n }",
"String getUniqueId();",
"public final String name() {\n\t\treturn name;\n\t}",
"public String name() { return name; }",
"public long getDestinationId() {\n return destinationId_;\n }",
"public long getRouteStepKey() {\n\t\treturn routeStepKey;\n\t}",
"@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.RouteInfo getRoute() {\n if (stepInfoCase_ == 7) {\n return (com.google.cloud.networkmanagement.v1beta1.RouteInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.RouteInfo.getDefaultInstance();\n }",
"public String name()\r\n/* 256: */ {\r\n/* 257:465 */ return this.name;\r\n/* 258: */ }",
"public String toString()\r\n\t{\r\n\t\treturn ToStringHelper.toString(this, new String [] { \"stepName\" });\r\n\t}",
"@Schema(description = \"Name of the view to be built.\")\n public String getName() {\n return name;\n }",
"protected UUID getId(String name) {\n\t\treturn names.get(name);\n\t}",
"public java.lang.String getDestination() {\n java.lang.Object ref = destination_;\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 destination_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"@NotNull\n public String getName() {\n if (myName == null) {\n myName = myId;\n int index = myName.lastIndexOf('/');\n if (index != -1) {\n myName = myName.substring(index + 1);\n }\n }\n\n return myName;\n }",
"public String getSequenceName() {\n return sequenceName;\n }",
"@Override\n public final String toString() {\n return name;\n }",
"@Override\n public final String toString() {\n return name;\n }",
"public String name() {\n this.use();\n\n return name;\n }",
"@Override\n public String getMappedLocation() {\n return gameMap.convertPortReferenceToName(reference);\n }",
"@DISPID(-2147417110)\n @PropGet\n java.lang.String id();",
"public String toString() {\n return name;\n }",
"public String toString() {\n return name;\n }",
"public String toString() {\n\t\treturn name;\n\t}",
"public String toString() {\n\t\treturn name;\n\t}",
"public String toString() {\n\t\treturn name;\n\t}",
"public final String name ()\r\n {\r\n return _name;\r\n }",
"public String getPairName() {\n return \"(\" + this.source.getName() + \",\" + this.destination.getName() + \")\";\n }",
"public String getId() {\n String id = name.replaceAll(\" \", \"-\");\n id = id.replaceAll(\"_\", \"-\");\n return id.toLowerCase();\n }",
"public String getNamedId();",
"public String name() {\n return this.nam;\n }",
"public String name() {\n return name;\n }",
"String name() {\n return name;\n }",
"public java.lang.String getDestination() {\n java.lang.Object ref = destination_;\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 destination_ = s;\n return s;\n }\n }",
"public String toString() {\r\n return name;\r\n }",
"public String toString() {\r\n\t\treturn name;\r\n\t}",
"public Identifier getName();"
]
| [
"0.62862194",
"0.6102271",
"0.55974925",
"0.554746",
"0.54973716",
"0.54911333",
"0.54743516",
"0.5458081",
"0.5411409",
"0.53935045",
"0.53543043",
"0.533562",
"0.53257465",
"0.5271917",
"0.5269514",
"0.52645105",
"0.52191836",
"0.52052146",
"0.519653",
"0.51896554",
"0.5176616",
"0.5163883",
"0.51272947",
"0.51250994",
"0.5116924",
"0.5108444",
"0.5106599",
"0.51049453",
"0.50676966",
"0.5039329",
"0.50350493",
"0.50296104",
"0.50200194",
"0.5018581",
"0.5014386",
"0.50120103",
"0.49881932",
"0.49703738",
"0.4969531",
"0.4966904",
"0.49571887",
"0.49571326",
"0.49570546",
"0.49393284",
"0.4933215",
"0.49322242",
"0.49318376",
"0.49271226",
"0.4922617",
"0.49216774",
"0.49179277",
"0.49173257",
"0.49162132",
"0.4915757",
"0.49140373",
"0.49137232",
"0.4910081",
"0.49062055",
"0.49060798",
"0.49060488",
"0.489742",
"0.48966676",
"0.48941058",
"0.4892855",
"0.48912707",
"0.4890932",
"0.48901296",
"0.48866144",
"0.487975",
"0.4874008",
"0.48718157",
"0.486877",
"0.48674315",
"0.4862242",
"0.48622176",
"0.48587516",
"0.48586917",
"0.48575392",
"0.48563924",
"0.48547846",
"0.48530826",
"0.48530826",
"0.48412532",
"0.4836255",
"0.48309237",
"0.48288995",
"0.48288995",
"0.48280752",
"0.48280752",
"0.48280752",
"0.48279124",
"0.48246267",
"0.4824477",
"0.48224014",
"0.48221508",
"0.48198575",
"0.48195174",
"0.48191664",
"0.4817409",
"0.48161516",
"0.4814883"
]
| 0.0 | -1 |
Output only. The unique identifier of this transition route. string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; | com.google.protobuf.ByteString getNameBytes(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getRouteName() {\n return routeName;\n }",
"String getRouteID();",
"private String getName(String name) {\n\t\tint n;\n\t\tif (name.startsWith(\"place_\")) {\n\t\t\tn = Integer.parseInt(name.substring(6));\n\t\t} else if (name.startsWith(\"t_\")) {\n\t\t\tn = Integer.parseInt(name.substring(2));\n\t\t} else {\n\t\t\treturn name;\n\t\t}\n\t\tif (n < net.getPlaces().size()) {\n\t\t\tPlace p = (Place) net.getPlaces().get(n);\n\t\t\treturn \"Place \" + p.getIdentifier();\n\t\t}\n\t\tn -= net.getPlaces().size();\n\t\tn--;\n\t\tif (n < net.getTransitions().size()) {\n\t\t\tTransition t = (Transition) net.getTransitions().get(n);\n\t\t\treturn \"Transition \" + t.getIdentifier();\n\t\t}\n\t\treturn name;\n\t}",
"protected String revealedId (String name)\n {\n return name;\n }",
"String getDestinationName();",
"public RouteInterface setName(String name);",
"public String getDestinationName() {\n return destinationName;\n }",
"@Override\n\tpublic String updateATourneyName() {\n\t\treturn null;\n\t}",
"@Override\n public String toString() {\n return \"The name of the destination is \" + this.name + \".\";\n }",
"public String getRoutingNo();",
"public int getRouteId() {\n return routeId;\n }",
"private String getActivityName(Transition transition) {\n\t\tString result = \"\";\n\t\t// get associated log event type\n\t\tLogEvent le = transition.getLogEvent();\n\n\t\t// check for invisible tasks\n\t\tif (le != null) {\n\t\t\tresult = le.getModelElementName();\n\t\t} else {\n\t\t\tresult = transition.getIdentifier();\n\t\t}\n\t\treturn result;\n\t}",
"public String getRouteid() {\r\n return routeid;\r\n }",
"@Override\n public String getName() {\n return seqName;\n }",
"public String getDestinationId()\n {\n return destinationId; // Field is final; no need to sync.\n }",
"@JsonProperty(\"destination_name\")\n public String getDestinationName() {\n return destinationName;\n }",
"public java.lang.String getRoute () {\n\t\treturn route;\n\t}",
"long getDestinationId();",
"private static String getUniqueGraphName() {\n return String.format(\"g%d\", uniqueGraph++);\n }",
"@Override\n\tpublic java.lang.String getUuid() {\n\t\treturn _esfTournament.getUuid();\n\t}",
"public StringKey getName() {\n return ModelBundle.SHIP_NAME.get(name);\n }",
"public final int getName() { return name; }",
"@Override\r\n\tpublic int getLinkDestinationId() {\n\t\treturn destination.getNodeId();\r\n\t}",
"private String printRoute() {\n String r = String.valueOf(this.route.get(0));\n int index = 1;\n while (index < this.route.size()) {\n r = r + \" - \" + this.route.get(index);\n index++;\n }\n return r;\n }",
"public void generateRouteNameString(){\n switch(routeName){\n case \"1A\": this.routeNameString = \"College Edinburgh\"; break;\n case \"1B\": this.routeNameString = \"College Edinburgh\"; break;\n case \"2A\": this.routeNameString = \"West Loop\"; break;\n case \"2B\": this.routeNameString = \"West Loop\"; break;\n case \"3A\": this.routeNameString = \"East Loop\"; break;\n case \"3B\": this.routeNameString = \"East Loop\"; break;\n case \"4\": this.routeNameString = \"York\"; break;\n case \"5\": this.routeNameString = \"Gordon\"; break;\n case \"6\": this.routeNameString = \"Harvard Ironwood\"; break;\n case \"7\": this.routeNameString = \"Kortright Downey\"; break;\n case \"8\": this.routeNameString = \"Stone Road Mall\"; break;\n case \"9\": this.routeNameString = \"Waterloo\"; break;\n case \"10\": this.routeNameString = \"Imperial\"; break;\n case \"11\": this.routeNameString = \"Willow West\"; break;\n case \"12\": this.routeNameString = \"General Hospital\"; break;\n case \"13\": this.routeNameString = \"Victoria Rd Rec Centre\"; break;\n case \"14\": this.routeNameString = \"Grange\"; break;\n case \"15\": this.routeNameString = \"University College\"; break;\n case \"16\": this.routeNameString = \"Southgate\"; break;\n case \"20\": this.routeNameString = \"NorthWest Industrial\"; break;\n case \"50\": this.routeNameString = \"Stone Road Express\"; break;\n case \"56\": this.routeNameString = \"Victoria Express\"; break;\n case \"57\": this.routeNameString = \"Harvard Express\"; break;\n case \"58\": this.routeNameString = \"Edinburgh Express\"; break;\n default: this.routeNameString = \"Unknown Route\"; break;\n }\n }",
"FlowId id();",
"public String getDestinationAirportName() {\n return destination.getName();\n }",
"public String getName() {\n return (\"(\" + this.source.getName() + \",\" + this.destination.getName() + \")\");\n }",
"public String getDestination(){\r\n\t\treturn route.getDestination();\r\n\t}",
"public String getName(){\n\t\treturn this.tournamentName;\n\t}",
"public String getName() {\n\t\treturn JWLC.nativeHandler().wlc_output_get_name(this.to());\n\t}",
"public String toString()\n {\n return id() + location().toString() + direction().toString();\n }",
"public Relationship.Name getName() {\n return name;\n }",
"public String toString(){\n\t\tString str = \"<Route: \";\n\t\tfor(int i=0; i<visits.size(); i++){\n\t\t\tVisit v = visits.get(i);\n\t\t\tstr += \"\\t\"+i+\": \"+ v +\"\\t\"+ \"At time: \"+arrivalTimes.get(i)+\"->\"+departureTimes.get(i);\n\t\t\tif(locked.get(i)) str += \" locked\";\n\t\t\tstr += \"\\n\";\n\t\t}\n\t\tstr += \"\\t\"+visits.get(0);\n\t\treturn str+\">\";\n\t}",
"public String getRoute() {\n return route;\n }",
"public String printRoute()\r\n {\r\n String res = this.getRoute().stream()\r\n .map(entry -> entry.getKey().getId()\r\n + \":\"\r\n + entry.getValue()\r\n + \";\")\r\n .collect(Collectors.joining());\r\n System.out.println(res);\r\n return res;\r\n }",
"public final String name() {\n return name;\n }",
"public String getName() {\n return this.lineName;\n }",
"public String getName() {\n if (mName == null) {\n mName = mId;\n int index = mName.lastIndexOf(WS_SEP);\n if (index != -1) {\n mName = mName.substring(index + 1);\n }\n }\n\n return mName;\n }",
"@Override\n public String name() {\n return this._name;\n }",
"public String getStateName() {\n return name;\n }",
"@Override\n\tpublic String toString() {\n\t\treturn Name;// + \"||\" + ID;// + \"-\" + ID;\n\t}",
"public String toString() {return name;}",
"public String getVisitName() {\r\n\t\treturn visitName;\r\n\t}",
"public String name() {\n return BPMNode.getId();\n }",
"public String getRouteDest() {\n Object ref = routeDest_;\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 routeDest_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }",
"@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.RouteInfo getRoute() {\n if (routeBuilder_ == null) {\n if (stepInfoCase_ == 7) {\n return (com.google.cloud.networkmanagement.v1beta1.RouteInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.RouteInfo.getDefaultInstance();\n } else {\n if (stepInfoCase_ == 7) {\n return routeBuilder_.getMessage();\n }\n return com.google.cloud.networkmanagement.v1beta1.RouteInfo.getDefaultInstance();\n }\n }",
"public Integer getRoutingId() {\n return routingId;\n }",
"public String getNameId() {\r\n\t\treturn nameId;\r\n\t}",
"public String getSequenceName() {\n return sequenceName;\n }",
"@Basic @Immutable\n\tpublic String getName() {\n\t\treturn name;\n\t}",
"public java.lang.String getPortGoingToStateName() {\n\t\treturn _tempNoTiceShipMessage.getPortGoingToStateName();\n\t}",
"java.lang.String getRoutingKey();",
"io.envoyproxy.envoy.type.metadata.v3.MetadataKind.Route getRoute();",
"@ApiModelProperty(value = \"Name of a flow\")\n public String getName() {\n return name;\n }",
"public String getRouteDest() {\n Object ref = routeDest_;\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 routeDest_ = s;\n }\n return s;\n }\n }",
"@ToString\n @Override\n public String toString() {\n return name;\n }",
"@Override\n\tpublic synchronized String toString() {\n\t\treturn this.id + \" : \" + this.name;\n\t}",
"public long getDestinationId() {\n return destinationId_;\n }",
"public String getRoutename() {\r\n return routename;\r\n }",
"public String getId() {\n\t\tStringBuilder builder = new StringBuilder();\n\t\tbuilder.append(\"n=\");\n\t\tif ( nodeId != null ) {\n\t\t\tbuilder.append(nodeId);\n\t\t}\n\t\tbuilder.append(\";c=\");\n\t\tif ( created != null ) {\n\t\t\tbuilder.append(created);\n\t\t}\n\t\tbuilder.append(\";s=\");\n\t\tif ( sourceId != null ) {\n\t\t\tbuilder.append(sourceId);\n\t\t}\n\t\treturn DigestUtils.sha1Hex(builder.toString());\n\t}",
"UUID getTransmissionId();",
"String getRouteDest();",
"@XmlElement(name = \"identifier\", namespace = Namespaces.SRV)\n final String getIdentifier() {\n if (LEGACY_XML) {\n final ScopedName name = getScopedName();\n if (name != null) {\n return name.tip().toString();\n }\n }\n return null;\n }",
"@Override\n\tpublic String getSameViewID() {\n\t\tif (this.movements.isEmpty()) {\n\t\t\treturn \"/index.html\";\n\t\t} else {\n\t\t\tfinal String lastId = this.movements.peek();\n\t\t\treturn \"/\" + lastId + \".xhtml\";\n\t\t}\n\t}",
"public String toString ( ) {\r\n String returnString = _name + \"{ id: \" + _uniqueID + \" pos: [\"+ getPosition().getPosition() + \"] }\";\r\n return returnString;\r\n }",
"public String toString() {\n return String.format(\"%4d: %s\", id, name);\n }",
"String getUniqueId();",
"public final String name() {\n\t\treturn name;\n\t}",
"public String name() { return name; }",
"public long getDestinationId() {\n return destinationId_;\n }",
"public long getRouteStepKey() {\n\t\treturn routeStepKey;\n\t}",
"@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.RouteInfo getRoute() {\n if (stepInfoCase_ == 7) {\n return (com.google.cloud.networkmanagement.v1beta1.RouteInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.RouteInfo.getDefaultInstance();\n }",
"public String name()\r\n/* 256: */ {\r\n/* 257:465 */ return this.name;\r\n/* 258: */ }",
"public String toString()\r\n\t{\r\n\t\treturn ToStringHelper.toString(this, new String [] { \"stepName\" });\r\n\t}",
"protected UUID getId(String name) {\n\t\treturn names.get(name);\n\t}",
"@Schema(description = \"Name of the view to be built.\")\n public String getName() {\n return name;\n }",
"public java.lang.String getDestination() {\n java.lang.Object ref = destination_;\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 destination_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"@NotNull\n public String getName() {\n if (myName == null) {\n myName = myId;\n int index = myName.lastIndexOf('/');\n if (index != -1) {\n myName = myName.substring(index + 1);\n }\n }\n\n return myName;\n }",
"public String getSequenceName() {\n return sequenceName;\n }",
"@Override\n public final String toString() {\n return name;\n }",
"@Override\n public final String toString() {\n return name;\n }",
"public String name() {\n this.use();\n\n return name;\n }",
"@Override\n public String getMappedLocation() {\n return gameMap.convertPortReferenceToName(reference);\n }",
"@DISPID(-2147417110)\n @PropGet\n java.lang.String id();",
"public String toString() {\n return name;\n }",
"public String toString() {\n return name;\n }",
"public String toString() {\n\t\treturn name;\n\t}",
"public String toString() {\n\t\treturn name;\n\t}",
"public String toString() {\n\t\treturn name;\n\t}",
"public final String name ()\r\n {\r\n return _name;\r\n }",
"public String getId() {\n String id = name.replaceAll(\" \", \"-\");\n id = id.replaceAll(\"_\", \"-\");\n return id.toLowerCase();\n }",
"public String getPairName() {\n return \"(\" + this.source.getName() + \",\" + this.destination.getName() + \")\";\n }",
"public String getNamedId();",
"public String name() {\n return this.nam;\n }",
"public String name() {\n return name;\n }",
"String name() {\n return name;\n }",
"public java.lang.String getDestination() {\n java.lang.Object ref = destination_;\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 destination_ = s;\n return s;\n }\n }",
"public String toString() {\r\n return name;\r\n }",
"public String toString() {\r\n\t\treturn name;\r\n\t}",
"public Identifier getName();"
]
| [
"0.6281736",
"0.61005366",
"0.55972904",
"0.55465704",
"0.5495915",
"0.54883903",
"0.5472104",
"0.5456346",
"0.5409681",
"0.5391939",
"0.5350923",
"0.5338445",
"0.53226674",
"0.52709204",
"0.52688926",
"0.52614474",
"0.5216372",
"0.5204534",
"0.51972795",
"0.5189655",
"0.5175734",
"0.51629335",
"0.5126069",
"0.5122558",
"0.5114437",
"0.510938",
"0.51046467",
"0.51044184",
"0.50650245",
"0.50377333",
"0.50336784",
"0.5029102",
"0.50194156",
"0.50173354",
"0.50116205",
"0.5009757",
"0.49874464",
"0.4968844",
"0.49687606",
"0.4965985",
"0.49581274",
"0.4956493",
"0.49564475",
"0.4939587",
"0.4931799",
"0.4930371",
"0.49295902",
"0.49247685",
"0.4921115",
"0.49209267",
"0.49180752",
"0.4917027",
"0.49150822",
"0.49140117",
"0.4913265",
"0.49119303",
"0.49097148",
"0.49060073",
"0.4904414",
"0.49032068",
"0.4897804",
"0.48951453",
"0.48949307",
"0.48941296",
"0.48916537",
"0.48907524",
"0.48906422",
"0.48878264",
"0.48787782",
"0.4873191",
"0.4870118",
"0.48674962",
"0.48653105",
"0.48619843",
"0.48619488",
"0.48583364",
"0.4857841",
"0.48569322",
"0.48558864",
"0.48540455",
"0.48522025",
"0.48522025",
"0.4839857",
"0.48347774",
"0.48315164",
"0.48281914",
"0.48281914",
"0.4827427",
"0.4827427",
"0.4827427",
"0.48270303",
"0.48253188",
"0.48241556",
"0.48223937",
"0.4820752",
"0.48190826",
"0.48186526",
"0.48186114",
"0.4816726",
"0.48154604",
"0.48145723"
]
| 0.0 | -1 |
Optional. The description of the transition route. The maximum length is 500 characters. string description = 8 [(.google.api.field_behavior) = OPTIONAL]; | java.lang.String getDescription(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getRouteDescription() {\n\t\tFlightRoutePersistenceProvider routePersistor = FlightRoutePersistenceProvider.getInstance();\n\t\tByteArrayInputStream inStream;\n\t\tIFlightRoute froute;\n\n\t\tIFlightRouteplanningRemoteService service;\n\t\tBaseServiceProvider provider = MyUI.getProvider();\n\n\t\tString description = \"didnt get description\";\n\t\t// Sends the information to dronology to be saved.\n\t\ttry {\n\t\t\tservice = (IFlightRouteplanningRemoteService) provider.getRemoteManager()\n\t\t\t\t\t.getService(IFlightRouteplanningRemoteService.class);\n\n\t\t\tString id = this.getMainLayout().getControls().getInfoPanel().getHighlightedFRInfoBox().getId();\n\n\t\t\tbyte[] information = service.requestFromServer(id);\n\t\t\tinStream = new ByteArrayInputStream(information);\n\t\t\tfroute = routePersistor.loadItem(inStream);\n\n\t\t\tdescription = froute.getDescription();\n\t\t\tif (description == null) {\n\t\t\t\tdescription = \"No Description\";\n\t\t\t}\n\t\t} catch (DronologyServiceException | RemoteException e1) {\n\t\t\tMyUI.setConnected(false);\n\t\t\te1.printStackTrace();\n\t\t} catch (PersistenceException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\treturn description;\n\t}",
"@NonNull\n public String getDescription() {\n return description;\n }",
"@NonNull\n public String getDescription() {\n return description;\n }",
"@Override\n\tpublic void setDescription(java.lang.String description) {\n\t\t_esfTournament.setDescription(description);\n\t}",
"@Nullable\n public String getDescription() {\n return description;\n }",
"@Nullable\n public String getDescription() {\n return description;\n }",
"public TimeEntry description(String description) {\n this.description = description;\n return this;\n }",
"public static String descriptrionForDisplay(String description){\n /*\n if(description == null || description.equals(CommonConstant.EMPTY_STRING)){\n return null;\n } \n description = description.replaceAll(Serializable.toStringRegex(DESC_OPEN), CommonConstant.EMPTY_STRING);\n description = description.replaceAll(Serializable.toStringRegex(DESC_CLOSE), CommonConstant.EMPTY_STRING);\n description = description.replaceAll(Serializable.toStringRegex(DESC_FIELD_SEPARATOR), CommonConstant.LINE_SEPARATOR); \n */\n return description;\n }",
"public Flow withDescription(String description) {\n this.description = description;\n return this;\n }",
"public java.lang.String getDescription() {\n java.lang.Object ref = description_;\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 description_ = s;\n }\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getDescription() {\n java.lang.Object ref = description_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n description_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getDescription() {\n java.lang.Object ref = description_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n description_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getDescription() {\n java.lang.Object ref = description_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n description_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getDescription() {\n java.lang.Object ref = description_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n description_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getDescription() {\n java.lang.Object ref = description_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n description_ = s;\n return s;\n }\n }",
"@ApiModelProperty(value = \"The event long description\")\n public String getDescription() {\n return description;\n }",
"public java.lang.String getDescription() {\n java.lang.Object ref = description_;\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 description_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"@java.lang.Override\n public java.lang.String getDescription() {\n java.lang.Object ref = description_;\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 description_ = s;\n return s;\n }\n }",
"public java.lang.String getDescription() {\n java.lang.Object ref = description_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n description_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getDescription() {\n java.lang.Object ref = description_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n description_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getDescription() {\n java.lang.Object ref = description_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n description_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getDescription() {\n java.lang.Object ref = description_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n description_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getDescription() {\n java.lang.Object ref = description_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n description_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getDescription() {\n Object ref = description_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n description_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"@Override\n public String getDescription() {\n Object ref = description_;\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 description_ = s;\n return s;\n }\n }",
"public java.lang.String getDescription() {\n java.lang.Object ref = description_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n description_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"@Override\n public String getDescription() {\n return descriptionText;\n }",
"public CharSequence getDescription() {\n return description;\n }",
"@Override\n\tpublic java.lang.String getDescription() {\n\t\treturn _esfTournament.getDescription();\n\t}",
"public String getDescription() { return description; }",
"@ApiModelProperty(value = \"A description of the time entry.\")\n /**\n * A description of the time entry.\n *\n * @return description String\n */\n public String getDescription() {\n return description;\n }",
"@Nullable\n public String getDescription() {\n return mDescription;\n }",
"public CharSequence getDescription() {\n return description;\n }",
"public java.lang.String getDescription() {\n return description;\n }",
"@Nullable\n public String getDescription() {\n return this.description;\n }",
"public Optional<String> getDescription() {\n return Optional.ofNullable(description);\n }",
"@Override\n\tpublic String getDescription() {\n\t\treturn description;\n\t}",
"public java.lang.String getDescription() {\n return description;\n }",
"@Override\r\n\tpublic String getDescription() {\n\t\treturn description;\r\n\t}",
"@Override\n public String getDescription()\n {\n return m_description;\n }",
"public String get_description() {\n return description;\n }",
"@ApiModelProperty(value = \"The decoded text description for this amenity code, where available.\")\n public String getDescription() {\n return description;\n }",
"public com.google.protobuf.ByteString\n getDescriptionBytes() {\n java.lang.Object ref = description_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n description_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public Optional<String> desc() {\n\t\t\treturn Optional.ofNullable(_description);\n\t\t}",
"public String getDescription() {\n return description;\n }",
"public String getDescription() {\n return description;\n }",
"public String getDescription() {\n return description;\n }",
"public String getDescription() {\n return description;\n }",
"public String getDescription() {\n return description;\n }",
"public String getDescription() {\n return description;\n }",
"public String getDescription() {\n return description;\n }",
"public String getDescription() {\n return description;\n }",
"public String getDescription() {\n return description;\n }",
"public Optional<String> getDescription() {\n\t\treturn Optional.ofNullable(_description);\n\t}",
"public Optional<String> getDescription() {\n\t\treturn Optional.ofNullable(_description);\n\t}",
"@Override\n public String getDescription() {\n return description;\n }",
"@Nullable\n public abstract String description();",
"public String getDescription() {\n return description;\n }",
"public void setDescription(String description)\n {\n this.description = description.trim();\n }",
"public void setDescription(final String description) {\n this.description = description;\n }",
"@Override\n public com.google.protobuf.ByteString\n getDescriptionBytes() {\n Object ref = description_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n description_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public final String getDescription() { return mDescription; }",
"public String getDescription() {\n return description;\n }",
"public String getDescription() {\n return description; \n }",
"private String makeEventDescription(String description) {\n return \"DESCRIPTION:\" + description + \"\\n\";\n }",
"public void setDescription(String description) {\n mDescription = description;\n }",
"public String getDescription()\r\n\t{\r\n\t\treturn description;\r\n\t}",
"public InterceptorType<T> setDescription(String description)\n {\n childNode.create(\"description\").text(description);\n return this;\n }",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"public java.lang.String getDescription() {\n return description;\n }",
"public java.lang.String getDescription() {\n return description;\n }",
"public java.lang.String getDescription() {\n return description;\n }",
"public java.lang.String getDescription() {\n return description;\n }",
"public java.lang.String getDescription() {\n return description;\n }",
"public java.lang.String getDescription() {\n return description;\n }",
"public java.lang.String getDescription() {\n return description;\n }",
"public java.lang.String getDescription() {\n return description;\n }",
"public java.lang.String getDescription() {\n return description;\n }",
"public String getDescription()\n {\n return description;\n }",
"public void setDescription(String description) {\n this.description = description == null ? null : description.trim();\n }",
"public void setDescription(String description) {\n this.description = description == null ? null : description.trim();\n }",
"public void setDescription(String description) {\n this.description = description == null ? null : description.trim();\n }",
"public void setDescription(String description) {\n this.description = description == null ? null : description.trim();\n }",
"public void setDescription(String description) {\n this.description = description == null ? null : description.trim();\n }",
"public void setDescription(String description) {\n this.description = description == null ? null : description.trim();\n }",
"public void setDescription(String description) {\n this.description = description == null ? null : description.trim();\n }",
"public String getDescription() {\r\n return _description;\r\n }",
"public void setDescription(String _description) {\n this._description = _description;\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString getDescriptionBytes() {\n java.lang.Object ref = description_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n description_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString getDescriptionBytes() {\n java.lang.Object ref = description_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n description_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }"
]
| [
"0.6964355",
"0.626011",
"0.626011",
"0.6166057",
"0.612911",
"0.612911",
"0.6104097",
"0.60875314",
"0.60809577",
"0.6071495",
"0.6068788",
"0.6068788",
"0.6068788",
"0.6068788",
"0.6068788",
"0.60526425",
"0.60526013",
"0.6038845",
"0.6012993",
"0.6012993",
"0.6012993",
"0.6012993",
"0.6012993",
"0.5993394",
"0.598604",
"0.5970138",
"0.5964577",
"0.5963383",
"0.5963166",
"0.59615964",
"0.5950788",
"0.5945239",
"0.5933734",
"0.59315234",
"0.5927057",
"0.59211963",
"0.5920456",
"0.59184563",
"0.5917401",
"0.59132546",
"0.5910995",
"0.59061337",
"0.59034085",
"0.5896324",
"0.58956206",
"0.58956206",
"0.58956206",
"0.58956206",
"0.58956206",
"0.58956206",
"0.58956206",
"0.58956206",
"0.58956206",
"0.5895135",
"0.5895135",
"0.58925664",
"0.58849055",
"0.5881865",
"0.5880172",
"0.5879439",
"0.5870656",
"0.5862176",
"0.58617824",
"0.5857791",
"0.5857464",
"0.58573747",
"0.58555967",
"0.5853314",
"0.58505815",
"0.58505815",
"0.58505815",
"0.58505815",
"0.58505815",
"0.58505815",
"0.58505815",
"0.58505815",
"0.58505815",
"0.58505815",
"0.58505815",
"0.58505815",
"0.58471036",
"0.58471036",
"0.58471036",
"0.58471036",
"0.58471036",
"0.58471036",
"0.58471036",
"0.58471036",
"0.58471036",
"0.5846876",
"0.58413047",
"0.58413047",
"0.58413047",
"0.58413047",
"0.58413047",
"0.58413047",
"0.58413047",
"0.58389914",
"0.5836444",
"0.5833337",
"0.5833337"
]
| 0.0 | -1 |
Optional. The description of the transition route. The maximum length is 500 characters. string description = 8 [(.google.api.field_behavior) = OPTIONAL]; | com.google.protobuf.ByteString getDescriptionBytes(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getRouteDescription() {\n\t\tFlightRoutePersistenceProvider routePersistor = FlightRoutePersistenceProvider.getInstance();\n\t\tByteArrayInputStream inStream;\n\t\tIFlightRoute froute;\n\n\t\tIFlightRouteplanningRemoteService service;\n\t\tBaseServiceProvider provider = MyUI.getProvider();\n\n\t\tString description = \"didnt get description\";\n\t\t// Sends the information to dronology to be saved.\n\t\ttry {\n\t\t\tservice = (IFlightRouteplanningRemoteService) provider.getRemoteManager()\n\t\t\t\t\t.getService(IFlightRouteplanningRemoteService.class);\n\n\t\t\tString id = this.getMainLayout().getControls().getInfoPanel().getHighlightedFRInfoBox().getId();\n\n\t\t\tbyte[] information = service.requestFromServer(id);\n\t\t\tinStream = new ByteArrayInputStream(information);\n\t\t\tfroute = routePersistor.loadItem(inStream);\n\n\t\t\tdescription = froute.getDescription();\n\t\t\tif (description == null) {\n\t\t\t\tdescription = \"No Description\";\n\t\t\t}\n\t\t} catch (DronologyServiceException | RemoteException e1) {\n\t\t\tMyUI.setConnected(false);\n\t\t\te1.printStackTrace();\n\t\t} catch (PersistenceException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\treturn description;\n\t}",
"@NonNull\n public String getDescription() {\n return description;\n }",
"@NonNull\n public String getDescription() {\n return description;\n }",
"@Override\n\tpublic void setDescription(java.lang.String description) {\n\t\t_esfTournament.setDescription(description);\n\t}",
"@Nullable\n public String getDescription() {\n return description;\n }",
"@Nullable\n public String getDescription() {\n return description;\n }",
"public TimeEntry description(String description) {\n this.description = description;\n return this;\n }",
"public static String descriptrionForDisplay(String description){\n /*\n if(description == null || description.equals(CommonConstant.EMPTY_STRING)){\n return null;\n } \n description = description.replaceAll(Serializable.toStringRegex(DESC_OPEN), CommonConstant.EMPTY_STRING);\n description = description.replaceAll(Serializable.toStringRegex(DESC_CLOSE), CommonConstant.EMPTY_STRING);\n description = description.replaceAll(Serializable.toStringRegex(DESC_FIELD_SEPARATOR), CommonConstant.LINE_SEPARATOR); \n */\n return description;\n }",
"public Flow withDescription(String description) {\n this.description = description;\n return this;\n }",
"public java.lang.String getDescription() {\n java.lang.Object ref = description_;\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 description_ = s;\n }\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getDescription() {\n java.lang.Object ref = description_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n description_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getDescription() {\n java.lang.Object ref = description_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n description_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getDescription() {\n java.lang.Object ref = description_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n description_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getDescription() {\n java.lang.Object ref = description_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n description_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getDescription() {\n java.lang.Object ref = description_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n description_ = s;\n return s;\n }\n }",
"public java.lang.String getDescription() {\n java.lang.Object ref = description_;\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 description_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"@ApiModelProperty(value = \"The event long description\")\n public String getDescription() {\n return description;\n }",
"@java.lang.Override\n public java.lang.String getDescription() {\n java.lang.Object ref = description_;\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 description_ = s;\n return s;\n }\n }",
"public java.lang.String getDescription() {\n java.lang.Object ref = description_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n description_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getDescription() {\n java.lang.Object ref = description_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n description_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getDescription() {\n java.lang.Object ref = description_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n description_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getDescription() {\n java.lang.Object ref = description_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n description_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getDescription() {\n java.lang.Object ref = description_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n description_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getDescription() {\n Object ref = description_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n description_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"@Override\n public String getDescription() {\n Object ref = description_;\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 description_ = s;\n return s;\n }\n }",
"public java.lang.String getDescription() {\n java.lang.Object ref = description_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n description_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"@Override\n public String getDescription() {\n return descriptionText;\n }",
"public CharSequence getDescription() {\n return description;\n }",
"@Override\n\tpublic java.lang.String getDescription() {\n\t\treturn _esfTournament.getDescription();\n\t}",
"public String getDescription() { return description; }",
"@ApiModelProperty(value = \"A description of the time entry.\")\n /**\n * A description of the time entry.\n *\n * @return description String\n */\n public String getDescription() {\n return description;\n }",
"@Nullable\n public String getDescription() {\n return mDescription;\n }",
"public CharSequence getDescription() {\n return description;\n }",
"public java.lang.String getDescription() {\n return description;\n }",
"@Nullable\n public String getDescription() {\n return this.description;\n }",
"public Optional<String> getDescription() {\n return Optional.ofNullable(description);\n }",
"@Override\n\tpublic String getDescription() {\n\t\treturn description;\n\t}",
"public java.lang.String getDescription() {\n return description;\n }",
"@Override\r\n\tpublic String getDescription() {\n\t\treturn description;\r\n\t}",
"@Override\n public String getDescription()\n {\n return m_description;\n }",
"public String get_description() {\n return description;\n }",
"@ApiModelProperty(value = \"The decoded text description for this amenity code, where available.\")\n public String getDescription() {\n return description;\n }",
"public com.google.protobuf.ByteString\n getDescriptionBytes() {\n java.lang.Object ref = description_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n description_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public Optional<String> desc() {\n\t\t\treturn Optional.ofNullable(_description);\n\t\t}",
"public String getDescription() {\n return description;\n }",
"public String getDescription() {\n return description;\n }",
"public String getDescription() {\n return description;\n }",
"public String getDescription() {\n return description;\n }",
"public String getDescription() {\n return description;\n }",
"public String getDescription() {\n return description;\n }",
"public String getDescription() {\n return description;\n }",
"public String getDescription() {\n return description;\n }",
"public String getDescription() {\n return description;\n }",
"public Optional<String> getDescription() {\n\t\treturn Optional.ofNullable(_description);\n\t}",
"public Optional<String> getDescription() {\n\t\treturn Optional.ofNullable(_description);\n\t}",
"@Override\n public String getDescription() {\n return description;\n }",
"@Nullable\n public abstract String description();",
"public String getDescription() {\n return description;\n }",
"public void setDescription(String description)\n {\n this.description = description.trim();\n }",
"public void setDescription(final String description) {\n this.description = description;\n }",
"@Override\n public com.google.protobuf.ByteString\n getDescriptionBytes() {\n Object ref = description_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n description_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public final String getDescription() { return mDescription; }",
"public String getDescription() {\n return description;\n }",
"public String getDescription() {\n return description; \n }",
"private String makeEventDescription(String description) {\n return \"DESCRIPTION:\" + description + \"\\n\";\n }",
"public void setDescription(String description) {\n mDescription = description;\n }",
"public String getDescription()\r\n\t{\r\n\t\treturn description;\r\n\t}",
"public InterceptorType<T> setDescription(String description)\n {\n childNode.create(\"description\").text(description);\n return this;\n }",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"public java.lang.String getDescription() {\n return description;\n }",
"public java.lang.String getDescription() {\n return description;\n }",
"public java.lang.String getDescription() {\n return description;\n }",
"public java.lang.String getDescription() {\n return description;\n }",
"public java.lang.String getDescription() {\n return description;\n }",
"public java.lang.String getDescription() {\n return description;\n }",
"public java.lang.String getDescription() {\n return description;\n }",
"public java.lang.String getDescription() {\n return description;\n }",
"public java.lang.String getDescription() {\n return description;\n }",
"public String getDescription()\n {\n return description;\n }",
"public void setDescription(String description) {\n this.description = description == null ? null : description.trim();\n }",
"public void setDescription(String description) {\n this.description = description == null ? null : description.trim();\n }",
"public void setDescription(String description) {\n this.description = description == null ? null : description.trim();\n }",
"public void setDescription(String description) {\n this.description = description == null ? null : description.trim();\n }",
"public void setDescription(String description) {\n this.description = description == null ? null : description.trim();\n }",
"public void setDescription(String description) {\n this.description = description == null ? null : description.trim();\n }",
"public void setDescription(String description) {\n this.description = description == null ? null : description.trim();\n }",
"public String getDescription() {\r\n return _description;\r\n }",
"public void setDescription(String _description) {\n this._description = _description;\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString getDescriptionBytes() {\n java.lang.Object ref = description_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n description_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString getDescriptionBytes() {\n java.lang.Object ref = description_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n description_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }"
]
| [
"0.69639283",
"0.6259211",
"0.6259211",
"0.6164449",
"0.61284757",
"0.61284757",
"0.6103329",
"0.6087432",
"0.60809195",
"0.6071154",
"0.60681975",
"0.60681975",
"0.60681975",
"0.60681975",
"0.60681975",
"0.6052209",
"0.60518515",
"0.6038301",
"0.60125506",
"0.60125506",
"0.60125506",
"0.60125506",
"0.60125506",
"0.5992674",
"0.5985624",
"0.59699327",
"0.59645337",
"0.5962677",
"0.5962435",
"0.59615296",
"0.5950158",
"0.5944735",
"0.5932975",
"0.5930989",
"0.5926745",
"0.5921513",
"0.5919633",
"0.591783",
"0.5916598",
"0.5912874",
"0.591103",
"0.5906697",
"0.5902725",
"0.5896494",
"0.58952224",
"0.58952224",
"0.58952224",
"0.58952224",
"0.58952224",
"0.58952224",
"0.58952224",
"0.58952224",
"0.58952224",
"0.5895203",
"0.5895203",
"0.5891949",
"0.5884334",
"0.5881325",
"0.5879234",
"0.5878057",
"0.5870116",
"0.58620656",
"0.58615476",
"0.5857455",
"0.5857003",
"0.5856478",
"0.5855075",
"0.5852887",
"0.5849951",
"0.5849951",
"0.5849951",
"0.5849951",
"0.5849951",
"0.5849951",
"0.5849951",
"0.5849951",
"0.5849951",
"0.5849951",
"0.5849951",
"0.5849951",
"0.58465594",
"0.58465594",
"0.58465594",
"0.58465594",
"0.58465594",
"0.58465594",
"0.58465594",
"0.58465594",
"0.58465594",
"0.58465064",
"0.5840208",
"0.5840208",
"0.5840208",
"0.5840208",
"0.5840208",
"0.5840208",
"0.5840208",
"0.58388907",
"0.58352923",
"0.58328325",
"0.58328325"
]
| 0.0 | -1 |
The condition to evaluate against [form parameters][google.cloud.dialogflow.cx.v3beta1.Form.parameters] or [session parameters][google.cloud.dialogflow.cx.v3beta1.SessionInfo.parameters]. See the [conditions reference]( At least one of `intent` or `condition` must be specified. When both `intent` and `condition` are specified, the transition can only happen when both are fulfilled. string condition = 2; | java.lang.String getCondition(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setCondition(String condition) {\n\tthis.condition = condition;\n}",
"public String getCondition() {\n return condition;\n }",
"com.google.protobuf.ByteString getConditionBytes();",
"public String getCondition() {\n\treturn condition;\n}",
"public String getCondition() {\n\t\treturn condition;\n\t}",
"protected void sequence_Condition(ISerializationContext context, Condition semanticObject) {\r\n\t\tif (errorAcceptor != null) {\r\n\t\t\tif (transientValues.isValueTransient(semanticObject, GoPackage.Literals.CONDITION__EXP) == ValueTransient.YES)\r\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, GoPackage.Literals.CONDITION__EXP));\r\n\t\t}\r\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\r\n\t\tfeeder.accept(grammarAccess.getConditionAccess().getExpExpressionParserRuleCall_1_0(), semanticObject.getExp());\r\n\t\tfeeder.finish();\r\n\t}",
"public void setCondition( String condition ) {\n Element conditionElement = controlElement.element( ActionSequenceDocument.CONDITION_NAME );\n if ( conditionElement == null ) {\n conditionElement = controlElement.addElement( ActionSequenceDocument.CONDITION_NAME );\n }\n conditionElement.clearContent();\n conditionElement.addCDATA( condition );\n ActionSequenceDocument.fireControlStatementChanged( this );\n }",
"public void setCondition(Expression condition)\n {\n this.condition = condition;\n }",
"String getCondition();",
"cn.infinivision.dataforce.busybee.pb.meta.ExprOrBuilder getConditionOrBuilder();",
"OverallCondition(String condition) {\n this.condition = condition;\n }",
"public Condition getCondition() {\n return condition;\n }",
"private boolean executionCondition(String condition) {\r\n\r\n\t\tboolean result = false;\r\n\t\tif (condition != null) {\r\n\t\t\ttry {\r\n\t\t\t\tresult = Boolean.parseBoolean(ExecutScript(getScriptOfParameters(), getScriptOfValuesAsObjects(),\r\n\t\t\t\t\t\t\"return (\" + condition + \")\").toString());\r\n\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tsetResultstype(resultstype.Failure);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"@Override\n\tpublic void validateConditionValuePair(\n\t\t\tfinal ConditionValuePair pair)\n\t\t\tthrows DomainException {\n\t\t\n\t\tthrow\n\t\t\tnew DomainException(\n\t\t\t\t\"Conditions are not allowed in document prompts.\");\n\t}",
"OclExpression getCondition();",
"cn.infinivision.dataforce.busybee.pb.meta.Expr getCondition();",
"public ParamsRequestCondition getParamsCondition()\n/* */ {\n/* 133 */ return this.paramsCondition;\n/* */ }",
"public boolean addCondition(String condition) {\r\n\t\t// if the condition is not already there...\r\n\t\tif (\r\n\t\t\t\tafterFrom.toString().indexOf( condition.trim() ) < 0 &&\r\n\t\t\t\tafterWhere.toString().indexOf( condition.trim() ) < 0\r\n\t\t) {\r\n\t\t\tif ( !condition.startsWith( \" and \" ) ) {\r\n\t\t\t\tafterWhere.append( \" and \" );\r\n\t\t\t}\r\n\t\t\tafterWhere.append( condition );\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public void setCondition(ExpressionNode condition);",
"public interface Condition {\n /** Used in failure messages to describe what was expected */\n String getDescription();\n \n /** If true we stop retrying. The RetryLoop retries on AssertionError, \n * so if tests fail in this method they are not reported as \n * failures but retried.\n */\n boolean isTrue() throws Exception;\n }",
"public Object getCondition();",
"@Override\n\tpublic String getCondition() {\n\t\treturn \"\";\n\t}",
"public abstract Builder customCondition(RequestCondition<?> paramRequestCondition);",
"io.grpc.user.task.PriceCondition getCondition();",
"public void setConditiondescription(String conditiondescription) {\r\n this.conditiondescription = conditiondescription == null ? null : conditiondescription.trim();\r\n }",
"public void setCondition(WeatherCondition condition) {\n this.condition = condition;\n }",
"Condition createCondition();",
"public static void waitForCondition (String condition) {\n BValue cond = getCond (condition);\n synchronized (cond) {\n if (!cond.v) {\n try {\n cond.wait();\n } catch (InterruptedException e) {}\n }\n }\n }",
"private void assertCondition(Condition condition) {\n\t}",
"public void set( final Condition condition )\n {\n m_condition = condition;\n }",
"public Expression getCondition()\n {\n return this.condition;\n }",
"public static void setCondition (String condition) {\n BValue cond = getCond (condition);\n synchronized (cond) {\n if (cond.v) {\n return;\n }\n cond.v = true;\n cond.notifyAll();\n }\n }",
"Event getCondition();",
"public ExpressionNode getCondition();",
"public boolean evaluateCondition(WMSessionHandle shandle,\n String procId,\n String actId,\n String condition,\n @SuppressWarnings(\"rawtypes\") Map context) throws Exception {\n if (condition == null || condition.trim().length() == 0) {\n return true;\n }\n\n java.lang.Object eval = evaluateExpression(shandle,\n procId,\n actId,\n condition,\n context,\n java.lang.Boolean.class);\n try {\n return ((Boolean) eval).booleanValue();\n } catch (Exception ex) {\n cus.error(shandle, LOG_CHANNEL, \"JavaScriptEvaluator -> The result of condition \"\n + condition + \" cannot be converted to boolean\");\n cus.error(shandle, \"JavaScriptEvaluator -> The result of condition \"\n + condition + \" cannot be converted to boolean\");\n throw ex;\n }\n\n }",
"protected Condition parseSequenceFlowCondition(XmlElement seqFlowElement) {\n\n XmlElement conditionExprElement = seqFlowElement.getElement(\"conditionExpression\");\n\n if (conditionExprElement == null) {\n return null;\n }\n\n String expression = conditionExprElement.getText().trim();\n // Condition expressionCondition = new CheckVariableTrueCondition(expression);\n Condition expressionCondition = new JuelExpressionCondition(expression);\n return expressionCondition;\n }",
"@Override\n\tpublic void setCondition(VehicleCondition condition) {\n\t\tthis.condition = condition;\n\t}",
"public String getConditiondescription() {\r\n return conditiondescription;\r\n }",
"public void setWinCondition(String string) {\n\t\tthis.winCondition = string;\n\t}",
"public interface Condition {\n /** Return the condition state. */\n boolean test();\n /** Return a description of what the condition is testing. */\n String toString();\n}",
"LogicCondition createLogicCondition();",
"@JsonProperty(\"conditions\")\n @ApiModelProperty(value = \"The condition that will trigger the dialog node.\")\n public String getConditions() {\n return conditions;\n }",
"public void setJobCondition(String jobCondition) {\n this.jobCondition = jobCondition;\n }",
"public int getCondition() {\r\n\t\tif(this.condition == null){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn this.condition.ordinal();\r\n\t}",
"public interface Conditioned {\n @Nullable\n ROSCondition getCondition();\n }",
"Condition getCondition(String conditionName, Lock lock);",
"public Condition getCondition(){\n\t\treturn this.cond;\n\t}",
"private void parseCondition() {\n Struct type1 = parseExpr().type;\n\n int op;\n if (RELATIONAL_OPERATORS.contains(nextToken.kind)) {\n scan();\n op = token.kind;\n } else {\n error(\"Relational operator expected\");\n op = Token.NONE;\n }\n\n int opcode;\n switch (token.kind) {\n case Token.GTR:\n opcode = Code.OP_JGT;\n break;\n case Token.GEQ:\n opcode = Code.OP_JGE;\n break;\n case Token.LESS:\n opcode = Code.OP_JLT;\n break;\n case Token.LEQ:\n opcode = Code.OP_JLE;\n break;\n case Token.EQL:\n opcode = Code.OP_JEQ;\n break;\n case Token.NEQ:\n opcode = Code.OP_JNE;\n break;\n default:\n opcode = Code.OP_TRAP;\n error(\"Illegal comparison operator\");\n break;\n }\n\n Struct type2 = parseExpr().type;\n\n if (!type1.compatibleWith(type2)) {\n error(\"Incompatible types in comparison\");\n }\n if (type1.isRefType() && type2.isRefType()) {\n if (op != Token.EQL && op != Token.NEQ) {\n error(\"Reference types can only be compared \"\n + \"for equality and inequality\");\n }\n }\n\n code.putFalseJump(opcode, 42); // Will be fixed later\n }",
"public Filter condition();",
"public void setConditions(Conditions conditions) {\n this.conditions = conditions;\n }",
"public OverallCondition getCondition() {\n return condition;\n }",
"public RequestCondition<?> getCustomCondition()\n/* */ {\n/* 164 */ return this.customConditionHolder.getCondition();\n/* */ }",
"private boolean evaluateCondition(String cond) {\n logger.debug(\" getCondition() : [\" + cond + \"]\");\n \n String resultStr = \"\";\n boolean result = false;\n \n // now evaluate the condition using JavaScript\n Context cx = Context.enter();\n try {\n Scriptable scope = cx.initStandardObjects(null);\n Object cxResultObject = cx.evaluateString(scope, cond\n /** * conditionString ** */\n , \"<cmd>\", 1, null);\n resultStr = Context.toString(cxResultObject);\n \n if (resultStr.equals(\"false\")) { //$NON-NLS-1$\n result = false;\n } else if (resultStr.equals(\"true\")) { //$NON-NLS-1$\n result = true;\n } else {\n throw new Exception(\" BAD CONDITION :: \" + cond + \" :: expected true or false\");\n }\n \n logger.debug(\" >> evaluate Condition - [ \" + cond + \"] results is [\" + result + \"]\");\n } catch (Exception e) {\n logger.error(getName()+\": error while processing \"+ \"[\" + cond + \"]\\n\", e);\n } finally {\n Context.exit();\n }\n \n return result;\n }",
"public void select(Condition condition) {\n int i;\n boolean z = DEBUG;\n if (z) {\n String str = this.mTag;\n Log.d(str, \"select \" + condition);\n }\n int i2 = this.mSessionZen;\n if (i2 != -1 && i2 != 0) {\n final Uri realConditionId = getRealConditionId(condition);\n if (this.mController != null) {\n AsyncTask.execute(new Runnable() { // from class: com.android.systemui.volume.ZenModePanel.5\n @Override // java.lang.Runnable\n public void run() {\n ZenModePanel.this.mController.setZen(ZenModePanel.this.mSessionZen, realConditionId, \"ZenModePanel.selectCondition\");\n }\n });\n }\n setExitCondition(condition);\n if (realConditionId == null) {\n this.mPrefs.setMinuteIndex(-1);\n } else if ((isAlarm(condition) || isCountdown(condition)) && (i = this.mBucketIndex) != -1) {\n this.mPrefs.setMinuteIndex(i);\n }\n setSessionExitCondition(copy(condition));\n } else if (z) {\n Log.d(this.mTag, \"Ignoring condition selection outside of manual zen\");\n }\n }",
"private int addCondition(Question q)\n\t{\n\t\tString condition = \"NOT(\";\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<Element> cond_elements = doc.selectNodes(\"//document/conditions/rows/row[qid=\" + q.getQid() + \"]\");\n\t\tint i = 0;\n\t\tfor (Element c : cond_elements) {\n\t\t\ti++;\n\t\t\tPattern ans_p = Pattern.compile(\"^\\\\d+X(\\\\d+)X(.+?)$\");\n\t\t\tMatcher match = ans_p.matcher(c.elementText(\"cfieldname\"));\n\t\t\tmatch.find();\n\t\t\tString cond_str = \"(\";\n\t\t\tString path = \"$(SE-\" + prop.getProperty(\"dummy.study_event_oid\") + \"/F-\" + survey.getId() + \"/IG-\" + match.group(1) + \"/I-\" + match.group(2) + \")\";\n\n\t\t\tif (c.elementText(\"method\").equals(\"RX\")) {\n\t\t\t\tcond_str += \"MATCH(\";\n\n\t\t\t\tString regex = c.elementText(\"value\");\n\t\t\t\tint regex_length = regex.length();\n\t\t\t\t// Remove beginning whitespace\n\t\t\t\tregex = regex.substring(1, regex_length);\n\n\t\t\t\tcond_str += (regex + \", \" + path + \")\");\n\t\t\t} else {\n\t\t\t\tcond_str += path;\n\t\t\t\tString val = c.elementText(\"value\");\n\t\t\t\tcond_str += (c.elementText(\"method\") + (val.equals(\"\") ? \"NULL\" : val));\n\t\t\t}\n\n\t\t\tcond_str += \")\";\n\t\t\tcondition = condition.concat(cond_str);\n\t\t\tcondition = condition.concat(i < cond_elements.size()? \" AND \" : \")\");\n\t\t}\n\n\t\tif (cond_elements.size() != 0) {\n\t\t\tsurvey.addCondition(new Condition(prop.getProperty(\"imi.syntax_name\"), q.getQid().concat(prop.getProperty(\"ext.cond\")), condition));\n\t\t\tq.setCond(q.getQid().concat(prop.getProperty(\"ext.cond\")));\n\t\t\treturn 0;\n\t\t}\n\t\treturn -1;\n\t}",
"protected void sequence_ConditionAction(EObject context, ConditionAction semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}",
"@Override\n public void enterCondition(FSMParser.ConditionContext ctx) {\n if (ctx.var() != null && ((Var) findComp(ctx.var().NAME().getText())).isInput() &&\n ((Var) findComp(ctx.var().NAME().getText())).getBitSize() < 2) {\n Var inputflag = (Var) findComp(ctx.var().NAME().getText());\n FSMParser.Next_stateContext context = (FSMParser.Next_stateContext) ctx.getParent();\n int nextState = Integer.parseInt(\n context.STATENUMBER().getText().substring(6, context.STATENUMBER().getText().length()));\n\n //checking to see if true or false\n if (Integer.parseInt(ctx.expression().integer().opp.getText()) == 1) {\n this.conditions.get(0).put(inputflag, nextState);\n if (!this.conditionsOrder.contains(inputflag))\n this.conditionsOrder.add(inputflag);\n } else if (Integer.parseInt(ctx.expression().integer().opp.getText()) == 0) {\n this.conditions.get(1).put(inputflag, nextState);\n if (!this.conditionsOrder.contains(inputflag))\n this.conditionsOrder.add(inputflag);\n }\n return;\n\n }\n //finding the 2 components that are compaired\n VerilogComp compare1;\n VerilogComp compare2;\n if (ctx.register() != null) {\n compare1 = findComp(ctx.register().NAME().getText());\n\n } else {\n compare1 = findComp(ctx.var().NAME().getText());\n }\n\n if (ctx.expression().var() != null) {\n compare2 = findComp(ctx.expression().var().NAME().getText());\n } else if (ctx.expression().integer() != null) {\n int temp = Integer.parseInt(ctx.expression().integer().getText());\n FixedNumber tempfixed = new FixedNumber(temp, compare1.getBitSize());\n compare2 = tempfixed;\n this.comps.add(tempfixed);\n\n } else {\n compare2 = findComp(ctx.expression().register().NAME().getText());\n }\n\n // if the opp type is not equals, append the equals ctx number, as we do not want to make\n // another flag if the equals flag exists\n int ctx_opp = (ctx.opp.getType()==19)?16:ctx.opp.getType();\n String text = compare1.getName().substring(0, 1) + compare2.getName().substring(0, 1) + ctx_opp;\n FSMParser.Next_stateContext context = (FSMParser.Next_stateContext) ctx.getParent();\n int nextState = Integer.parseInt(\n context.STATENUMBER().getText().substring(6, context.STATENUMBER().getText().length()));\n\n //if there is no flag for this condition, make a variable and give it to conditionsTrue map\n if (findComp(\"flag_\" + text) == null) {\n\n\n Var output = new Var(\"flag_\" + text,\n 1, false, true, false);\n if (!(this.compInputs.containsKey(compare1.getName() + \"|\" + compare2.getName()))) {\n this.compInputs.put(compare1.getName() + \"|\" + compare2.getName(), new Var[3]);\n }\n\n Var[] flags = this.compInputs.get(compare1.getName() + \"|\" + compare2.getName());\n\n\n // finding the type of condition based on token Num\n //equals and not equals\n if (ctx.opp.getType() == 16 || ctx.opp.getType() == 19) {\n flags[1] = output;\n if (ctx.opp.getType() == 16) {\n this.conditions.get(0).put(output, nextState);\n if (!this.conditionsOrder.contains(output))\n this.conditionsOrder.add(output);\n } else {\n this.conditions.get(1).put(output, nextState);\n if (!this.conditionsOrder.contains(output))\n this.conditionsOrder.add(output);\n }\n //greatethan\n } else if (ctx.opp.getType() == 17) {\n flags[2] = output;\n this.conditions.get(0).put(output, nextState);\n if (!this.conditionsOrder.contains(output))\n this.conditionsOrder.add(output);\n\n //less than\n } else if (ctx.opp.getType() == 18) {\n flags[0] = output;\n this.conditions.get(0).put(output, nextState);\n if (!this.conditionsOrder.contains(output))\n this.conditionsOrder.add(output);\n }\n this.comps.add(output);\n\n\n //if equals flag exists but creating a not equals flag\n } else if (!this.conditions.get(0).containsKey(findComp(\"flag_\" + text)) && ctx.opp.getType() == 17) {\n this.conditions.get(1).put((Var) findComp(\"flag_\" + text), nextState);\n this.conditionsOrder.add((Var) findComp(\"flag_\" + text));\n } else {\n Var output = (Var) findComp(\"flag_\" + text);\n if (ctx.opp.getType() == 19) {\n this.conditions.get(1).put(output, nextState);\n if (!this.conditionsOrder.contains(output))\n this.conditionsOrder.add(output);\n } else if (ctx.opp.getType() == 16 || ctx.opp.getType() == 17\n || ctx.opp.getType() == 18) {\n this.conditions.get(0).put(output, nextState);\n if (!this.conditionsOrder.contains(output))\n this.conditionsOrder.add(output);\n }\n }\n\n }",
"public boolean conditionFulfilled();",
"public final void mT__33() throws RecognitionException {\n try {\n int _type = T__33;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.xtext.example.mydslsample/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDslSample.g:33:7: ( 'Condition' )\n // ../org.xtext.example.mydslsample/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDslSample.g:33:9: 'Condition'\n {\n match(\"Condition\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public String getJobCondition() {\n return jobCondition;\n }",
"protected String getConditionFromAstfCommand(FeedData feed){\n String res = \"\";\n String[]split = Utils.split(feed.getCondition(), \",\");\n for(String value : split){\n if(value.equals(FeedData.ASYNC) || value.equals(FeedData.SYNC))continue;\n\n return value;\n }\n\n return res;\n }",
"@GetMapping(\"/condition\")\n\tpublic String conditional(Model m) {\n\t\t// Elvis Operator\n\t\tSystem.out.println(\"Handle the Conditional Statement\");\n\t\tm.addAttribute(\"isActive\", true);\n\t\t// IF and Else operator\n\t\tm.addAttribute(\"gender\", \"male\");\n\n\t\t// Switch Statement\n\n\t\tList<Integer> list = List.of(1);\n\t\tm.addAttribute(\"myList\", list);\n\t\treturn \"condition\";\n\t}",
"public void testAllMedicalConditionParametersPopulated() {\n Map<String, MedicalCondition> conditions = cache.getConditions(Service.NOTIFY);\n MedicalCondition condition = conditions.get(DIABETES_CONDITION);\n\n assertNotNull(condition);\n\n assertEquals(\"DIAB\", condition.getID());\n assertEquals(\"Diabetes\", condition.getTitle());\n assertEquals(\"diabetes\", condition.getName());\n assertEquals(EMPTY, condition.getType());\n assertEquals(\"DIAB1\", condition.getForm());\n assertEquals(DIABETES_CONDITION, condition.getDomain());\n assertEquals(\"diabetes-with-insulin\", condition.getStart());\n assertEquals(\"diabetes\", condition.getDomain());\n assertEquals(\"diabetes-driving\", condition.getInformation());\n assertTrue(condition.getSynonyms().isEmpty());\n assertEquals(1, condition.getCasp().size());\n assertTrue(condition.getCasp().contains(\"D01\"));\n assertEquals(condition.getCeg(), \"101\");\n assertEquals(Severity.NOTIFIABLE, condition.getSeverity());\n assertEquals(Boolean.TRUE, condition.getEnabled());\n\n assertNotNull(condition.toString());\n }",
"public boolean validCondition(String condition) {\r\n\t\tif (!m_bRequireCondition)\r\n\t\t\treturn true;\r\n \t\treturn m_sValidConditions.contains(condition);\r\n \t}",
"public boolean addQuestion(EcardServiceCondition condition) {\n//\t\tString questionInfo = CodeUtil.decodeBase64(getCondition(condition)\n//\t\t\t\t.getContent());\n\t\t\n\t\tString values[] = ConnectionMessage.getValue(getCondition(condition).getMessage(), \"u_id\",\n\t\t\t\t\"u_ip\", \"g_id\", \"q_title\", \"q_content\", \"q_time\", \"q_value\",\n\t\t\t\t\"province_id\", \"q_stats\");\n\t\tQuestion question = new Question();\n\t\tquestion.getUser().setUid(StringValueUtils.getInt(values[0]));\n\t\tquestion.setQuestion_ip(values[1]);\n\t\tquestion.getLawCategory().setCatId(StringValueUtils.getInt(values[2]));\n\t\tquestion.setTitle(values[3]);\n\t\tquestion.setContent(StringUtils.replace(values[4], \"\\\\\\\\\", \"\\\\\"));\n\t\ttry {\n\t\t\tquestion.setCreatetime(DateUtil.parseDate(values[5]));\n\t\t} catch (ParseException e) {\n\t\t\tquestion.setCreatetime(new Date());\n\t\t}\n\t\tquestion.setScore(StringValueUtils.getInt(values[6]));\n\t\tquestion.getProvince().setAreaId(StringValueUtils.getInt(values[7]));\n\t\tquestion.setVisible(values[8]);\n\t\tif(questionServices.addQuestion(question)>0)return true;\n\t\telse \n\t\t\treturn false;\n\t}",
"public interface ICondition\n{\n\n /**\n * called when we are sure we are done with this condition\n */\n public void dispose();\n\n /**\n * attempt to clone this condition before it will be bound in the\n * instantiation phase. We pass the current bindings so that the condition can\n * do an early rejection if possible.\n * \n * @param model\n * @param variableBindings\n * @return a writable copy of the condition that will be bound\n * @throws CannotMatchException\n * if there is no way this condition can be matched\n */\n public ICondition clone(IModel model, Map<String, Object> variableBindings)\n throws CannotMatchException;\n\n /**\n * Iteratively perform the resolution and binding for this condition. If this\n * condition defines any variables, they are placed into the bindings map for\n * other conditions to exploit. Similarly, it will resolve any bindings that\n * it needs in order to be matched. If at any point the condition determines\n * that it cannot be matched, the exception is to be thrown. Similarly, if\n * isIterative is false, and there are unresolved bindings, the exception\n * should be thrown. <br>\n * Otherwise, the number of unresolved bindings is returned which allows the\n * instantiation calculation determine if another resolution round is\n * required.\n * \n * @return number of unresolved variables\n */\n public int bind(IModel model, Map<String, Object> variableBindings,\n boolean isIterative) throws CannotMatchException;\n}",
"public void appendChildActivity(String condition, BPELActivity activity) {\n\t\tactivitiesOK = false;\n\t\tboolean isOtherwise = condition == null\n\t\t\t\t|| condition.compareToIgnoreCase(\"true\") == 0;\n\t\t// Create a case element, unless the condition is null, in which case we\n\t\t// create an otherwise element.\n\t\tElement caseElement = BPEL.staticDocument\n\t\t\t\t.createElement(isOtherwise ? BPELConstants.stringOtherwise\n\t\t\t\t\t\t: BPELConstants.stringCase);\n\t\t// The case/otherwise element will be a child of this element.\n\t\telement.appendChild(caseElement);\n\t\t// Add the condition atribute in case of a case element.\n\t\tif (!isOtherwise) {\n\t\t\telement.setAttribute(\"condition\", condition);\n\t\t}\n\t\t// The element of the given activity will be a child of the\n\t\t// case/otherwise element.\n\t\tcaseElement.appendChild(activity.getElement());\n\t\t// Map the element onto the activity.\n\t\tmap.put(activity.getElement(), activity);\n\t\t// Map the activity onto its condition. Use \"true\" in case of otherwise\n\t\t// element.\n\t\tif (!isOtherwise) {\n\t\t\tcases.put(activity, condition);\n\t\t} else {\n\t\t\tcases.put(activity, \"true\");\n\t\t}\n\t}",
"public final void mT__169() throws RecognitionException {\n try {\n int _type = T__169;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:169:8: ( 'TCondition' )\n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:169:10: 'TCondition'\n {\n match(\"TCondition\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public DeleteBuilder and(String condition) {\n\t\t\n\t\tdelete.add(condition, Operator.AND);\n\t\treturn this;\n\t}",
"public SearchQuery<?, ?> condition(SearchCondition condition) {\n initSearch();\n BeanInfo searchMetaData = Beans.getBeanInfo(searchRecordTypeDesc.getSearchBasicClass());\n String fieldName = Beans.toInitialLower(condition.getFieldName());\n PropertyInfo propertyInfo = searchMetaData.getProperty(fieldName);\n\n if (propertyInfo != null) {\n Object searchField = processConditionForSearchRecord(searchBasic, condition);\n Beans.setProperty(searchBasic, fieldName, searchField);\n } else {\n SearchFieldOperatorName operatorQName = new SearchFieldOperatorName(condition.getOperatorName());\n String dataType = operatorQName.getDataType();\n SearchFieldType searchFieldType;\n try {\n searchFieldType = SearchFieldOperatorType.getSearchFieldType(dataType);\n } catch (UnsupportedOperationException e) {\n throw new NetSuiteException(new NetSuiteErrorCode(NetSuiteErrorCode.OPERATION_NOT_SUPPORTED),\n i18n.invalidDataType(dataType));\n }\n\n Object searchField = processCondition(searchFieldType, condition);\n customFieldList.add(searchField);\n }\n\n return this;\n }",
"@POST\n @Path(\"/conditions\")\n public void setConditionType(ConditionType conditionType) {\n definitionsService.setConditionType(conditionType);\n }",
"public void setWhereCondition(com.sforce.soap.partner.SoqlWhereCondition whereCondition) {\r\n this.whereCondition = whereCondition;\r\n }",
"private QueryCondition buildConditionForQueryFromCondition(ParameterContext context, \r\n\t\t\tSet<String> includedTables, IConditionalQuery query, Condition condition, Object params[])\r\n\t{\r\n\t\tObject value = null;\r\n\t\t\t\t\r\n\t\t// fetch the value for current condition\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//for non-method level conditions fetch the value\r\n\t\t\tif(condition.index >= 0)\r\n\t\t\t{\r\n\t\t\t\tvalue = PropertyUtils.getProperty(context, condition.getConditionExpression());\r\n\t\t\t\t\r\n\t\t\t\tif(condition.fieldDetails != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tvalue = context.queryExecutionContext.getConversionService().convertToDBType(value, condition.fieldDetails);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//for method level conditions like null-checks and others use default value from condition\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tString strValue = condition.defaultValue;\r\n\t\t\t\t\r\n\t\t\t\t//if no repo context is specified assume empty object\r\n\t\t\t\tObject repoContext = context.queryExecutionContext.getRepositoryExecutionContext();\r\n\t\t\t\trepoContext = (repoContext != null) ? repoContext : Collections.emptyMap(); \r\n\t\t\t\t\r\n\t\t\t\t//if value is present check for expressions and replace them\r\n\t\t\t\tif(strValue != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValue = CommonUtils.replaceExpressions(repoContext, condition.defaultValue, null);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tvalue = ConvertUtils.convert(strValue, condition.fieldDetails.getField().getType());\r\n\t\t\t}\r\n\t\t} catch(Exception ex)\r\n\t\t{\r\n\t\t\tthrow new IllegalStateException(\"An error occurred while fetching condition value for expression -\" + condition.getConditionExpression(), ex);\r\n\t\t}\r\n\t\t\r\n\t\tif(value instanceof Enum)\r\n\t\t{\r\n\t\t\tvalue = \"\" + value;\r\n\t\t}\r\n\t\t\r\n\t\tQueryCondition groupHead = null;\r\n\r\n\t\t// if value is not provided, ignore current condition\r\n\t\tif(value != null || (condition.operator.isNullable() && condition.nullable))\r\n\t\t{\r\n\t\t\t// add tables and conditions to specifies query\r\n\t\t\taddTables(query, condition.table.tableCode, includedTables);\r\n\t\t\t\r\n\t\t\tgroupHead = new QueryCondition(condition.table.tableCode, condition.fieldDetails.getDbColumnName(), condition.operator, value, condition.joinOperator, condition.ignoreCase);\r\n\t\t\tgroupHead.setDataType(condition.fieldDetails.getDbDataType());\r\n\t\t}\r\n\r\n\t\t//if no group conditions are present on this query\r\n\t\tif(condition.getGroupedConditions() == null)\r\n\t\t{\r\n\t\t\treturn groupHead;\r\n\t\t}\r\n\t\t\r\n\t\taddGroupConditions(groupHead, condition.getGroupedConditions(), context, includedTables, query, params);\r\n\t\treturn groupHead;\r\n\t}",
"protected Expression analyzeCondition() throws AnalysisException {\n final var condition = analyzeExpression();\n assertKeyWord(ScriptBasicKeyWords.KEYWORD_THEN);\n return condition;\n }",
"public interface Condition {\n boolean isSatisfied();\n}",
"public abstract boolean execute(Condition condition, Map<String, String> executionParameterMap, Grant grant);",
"public String getFilterCondition() {\n return filterCondition;\n }",
"io.dstore.values.StringValueOrBuilder getConditionListOrBuilder();",
"public DoSometime condition(Condition condition) {\n this.condition = condition;\n return this;\n }",
"void setCondition(ICDICondition condition) throws CDIException;",
"private boolean isCondition() {\n return line.startsWith(\"if \") || line.startsWith(\"else \") ||\n line.startsWith(\"if(\") || line.equals(\"else\");\n }",
"public static Condition createCondition(Patient patient, Encounter encounter, String conditionTypeCode,\n String conditionTypeDisplay, String date){\n // Create a condition object\n Condition condition = new Condition();\n\n // Set Identifier of the condition object\n condition.addIdentifier()\n .setSystem(\"http://www.kh-uzl.de/fhir/condition\")\n .setValue(UUID.randomUUID().toString());\n\n // Set clinical status of the condition\n condition.setClinicalStatus(new CodeableConcept()\n .addCoding(new Coding()\n .setCode(\"active\")\n .setSystem(\"http://terminology.hl7.org/CodeSystem/condition-clinical\")\n .setDisplay(\"Active\")));\n\n // Set verification status of the condition\n condition.setVerificationStatus(new CodeableConcept()\n .addCoding(new Coding()\n .setCode(\"confirmed\")\n .setSystem(\"http://terminology.hl7.org/CodeSystem/condition-ver-status\")\n .setDisplay(\"Confirmed\")));\n\n // Set Identification of the condition, problem or diagnosis\n condition.setCode(new CodeableConcept()\n .addCoding(new Coding()\n .setCode(conditionTypeCode)\n .setSystem(\"http://snomed.info/sct\")\n .setDisplay(conditionTypeDisplay)));\n\n // Set reference to a patient, that the condition belongs to\n condition.setSubject(new Reference()\n .setIdentifier(patient.getIdentifierFirstRep())\n .setReference(patient.fhirType() + \"/\" + patient.getId()));\n\n // Set reference to an encounter, the condition was part of\n condition.setEncounter(new Reference()\n .setIdentifier(encounter.getIdentifierFirstRep())\n .setReference(encounter.fhirType() + \"/\" + encounter.getId()));\n\n // Set date when the condition was first recorded\n condition.setRecordedDateElement(new DateTimeType(date));\n\n return condition;\n }",
"@Override\n\tpublic VehicleCondition getCondition() {\n\t\treturn condition;\n\t}",
"protected void sequence_Condition(EObject context, Condition semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}",
"public Condition(ConditionManager condition)\r\n\t{\r\n\t\tthis.condition = condition;\r\n\t\tinit();\r\n\t}",
"public WeatherCondition getCondition() {\n return condition;\n }",
"public GroupByBuilder and(String condition) {\n\t\t\n\t\tadd(condition, Operator.AND);\n\t\treturn this;\n\t}",
"public void addWhen(Object pCondition, Object pValue);",
"public Locomotive waitForCondition(ExpectedCondition<?> condition) {\n return waitForCondition(condition, configuration.getTimeout());\n }",
"public final void addCondition(final Condition c) {\n m_body.add(c);\n }",
"public void setConditionId(Long conditionId) {\n _conditionId = conditionId;\n }",
"public void setInput(int index, Condition condition) {\n Log.d(\"STATE\", \"SETTING INPUT\");\n if (inputs.size() > index) {\n inputs.set(index, condition);\n } else {\n inputs.add(condition);\n }\n }",
"public void announceConditionSelection(ConditionTag conditionTag) {\n String str;\n int selectedZen = getSelectedZen(0);\n if (selectedZen == 1) {\n str = this.mContext.getString(R$string.interruption_level_priority);\n } else if (selectedZen == 2) {\n str = this.mContext.getString(R$string.interruption_level_none);\n } else if (selectedZen == 3) {\n str = this.mContext.getString(R$string.interruption_level_alarms);\n } else {\n return;\n }\n announceForAccessibility(this.mContext.getString(R$string.zen_mode_and_condition, str, conditionTag.line1.getText()));\n }",
"public void setConditionCode(int conditionCode) {\n\t\t\tthis.conditionCode = conditionCode;\n\t\t}",
"public Attribute(String name, String value, Condition condition) {\n if(name == \"\")\n try {\n throw new Exception(\"Attribute Name is null\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n this.name = name;\n this.value = value;\n this.condition = condition;\n }",
"@Override\n public PaymentP2007_03 where(Field<Boolean> condition) {\n return where(DSL.condition(condition));\n }",
"boolean isSatisfiable(ConditionContext context);",
"public RefactoringStatus getConditionStatus() {\n return fPreconditionStatus;\n }",
"public void addCondition(SetGenerator condition)\n\t{\n\t\tthis.triggerConditions.add(condition);\n\t}",
"private String _buildWhereCondition(Vector conditions){\n String strConditions = \"\";\n if(conditions != null){\n strConditions = clsPopulateFunctions.joinVector(conditions, \" AND \");\n }\n return strConditions;\n }"
]
| [
"0.59849197",
"0.58912766",
"0.5690656",
"0.56535274",
"0.5593838",
"0.55488575",
"0.5511378",
"0.5393282",
"0.5372991",
"0.52916765",
"0.51862913",
"0.51843846",
"0.5170743",
"0.51554525",
"0.50760627",
"0.50559956",
"0.50419074",
"0.5037107",
"0.50306493",
"0.50150985",
"0.49854216",
"0.49834937",
"0.4958515",
"0.4953835",
"0.49270865",
"0.49125662",
"0.49016905",
"0.49013343",
"0.48949727",
"0.48900163",
"0.48794952",
"0.48704892",
"0.48256376",
"0.48252985",
"0.48154876",
"0.47998148",
"0.47805333",
"0.47559956",
"0.4743179",
"0.46900156",
"0.4679838",
"0.4677987",
"0.46693534",
"0.465235",
"0.4647489",
"0.46446627",
"0.46413338",
"0.46407586",
"0.46373388",
"0.46337652",
"0.46320805",
"0.46316776",
"0.46246958",
"0.46210945",
"0.4621088",
"0.4607969",
"0.46073788",
"0.45760867",
"0.45673752",
"0.45567873",
"0.45544836",
"0.45451358",
"0.45393276",
"0.45358816",
"0.45320597",
"0.4529671",
"0.45163894",
"0.45136908",
"0.45105723",
"0.45027906",
"0.44976267",
"0.44949818",
"0.44905603",
"0.44775337",
"0.4463404",
"0.4438287",
"0.44289726",
"0.4427477",
"0.44268546",
"0.44244975",
"0.44173273",
"0.4398987",
"0.43857488",
"0.43832406",
"0.43758777",
"0.43598774",
"0.4356873",
"0.4342939",
"0.4324092",
"0.43153006",
"0.43039834",
"0.4298113",
"0.4293283",
"0.42802066",
"0.42784023",
"0.426833",
"0.4268012",
"0.42568883",
"0.4256888",
"0.42507783"
]
| 0.5791385 | 2 |
The condition to evaluate against [form parameters][google.cloud.dialogflow.cx.v3beta1.Form.parameters] or [session parameters][google.cloud.dialogflow.cx.v3beta1.SessionInfo.parameters]. See the [conditions reference]( At least one of `intent` or `condition` must be specified. When both `intent` and `condition` are specified, the transition can only happen when both are fulfilled. string condition = 2; | com.google.protobuf.ByteString getConditionBytes(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setCondition(String condition) {\n\tthis.condition = condition;\n}",
"public String getCondition() {\n return condition;\n }",
"java.lang.String getCondition();",
"public String getCondition() {\n\treturn condition;\n}",
"public String getCondition() {\n\t\treturn condition;\n\t}",
"protected void sequence_Condition(ISerializationContext context, Condition semanticObject) {\r\n\t\tif (errorAcceptor != null) {\r\n\t\t\tif (transientValues.isValueTransient(semanticObject, GoPackage.Literals.CONDITION__EXP) == ValueTransient.YES)\r\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, GoPackage.Literals.CONDITION__EXP));\r\n\t\t}\r\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\r\n\t\tfeeder.accept(grammarAccess.getConditionAccess().getExpExpressionParserRuleCall_1_0(), semanticObject.getExp());\r\n\t\tfeeder.finish();\r\n\t}",
"public void setCondition( String condition ) {\n Element conditionElement = controlElement.element( ActionSequenceDocument.CONDITION_NAME );\n if ( conditionElement == null ) {\n conditionElement = controlElement.addElement( ActionSequenceDocument.CONDITION_NAME );\n }\n conditionElement.clearContent();\n conditionElement.addCDATA( condition );\n ActionSequenceDocument.fireControlStatementChanged( this );\n }",
"public void setCondition(Expression condition)\n {\n this.condition = condition;\n }",
"String getCondition();",
"cn.infinivision.dataforce.busybee.pb.meta.ExprOrBuilder getConditionOrBuilder();",
"OverallCondition(String condition) {\n this.condition = condition;\n }",
"public Condition getCondition() {\n return condition;\n }",
"private boolean executionCondition(String condition) {\r\n\r\n\t\tboolean result = false;\r\n\t\tif (condition != null) {\r\n\t\t\ttry {\r\n\t\t\t\tresult = Boolean.parseBoolean(ExecutScript(getScriptOfParameters(), getScriptOfValuesAsObjects(),\r\n\t\t\t\t\t\t\"return (\" + condition + \")\").toString());\r\n\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tsetResultstype(resultstype.Failure);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"@Override\n\tpublic void validateConditionValuePair(\n\t\t\tfinal ConditionValuePair pair)\n\t\t\tthrows DomainException {\n\t\t\n\t\tthrow\n\t\t\tnew DomainException(\n\t\t\t\t\"Conditions are not allowed in document prompts.\");\n\t}",
"OclExpression getCondition();",
"cn.infinivision.dataforce.busybee.pb.meta.Expr getCondition();",
"public ParamsRequestCondition getParamsCondition()\n/* */ {\n/* 133 */ return this.paramsCondition;\n/* */ }",
"public boolean addCondition(String condition) {\r\n\t\t// if the condition is not already there...\r\n\t\tif (\r\n\t\t\t\tafterFrom.toString().indexOf( condition.trim() ) < 0 &&\r\n\t\t\t\tafterWhere.toString().indexOf( condition.trim() ) < 0\r\n\t\t) {\r\n\t\t\tif ( !condition.startsWith( \" and \" ) ) {\r\n\t\t\t\tafterWhere.append( \" and \" );\r\n\t\t\t}\r\n\t\t\tafterWhere.append( condition );\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public void setCondition(ExpressionNode condition);",
"public interface Condition {\n /** Used in failure messages to describe what was expected */\n String getDescription();\n \n /** If true we stop retrying. The RetryLoop retries on AssertionError, \n * so if tests fail in this method they are not reported as \n * failures but retried.\n */\n boolean isTrue() throws Exception;\n }",
"public Object getCondition();",
"@Override\n\tpublic String getCondition() {\n\t\treturn \"\";\n\t}",
"public abstract Builder customCondition(RequestCondition<?> paramRequestCondition);",
"io.grpc.user.task.PriceCondition getCondition();",
"public void setConditiondescription(String conditiondescription) {\r\n this.conditiondescription = conditiondescription == null ? null : conditiondescription.trim();\r\n }",
"public void setCondition(WeatherCondition condition) {\n this.condition = condition;\n }",
"public static void waitForCondition (String condition) {\n BValue cond = getCond (condition);\n synchronized (cond) {\n if (!cond.v) {\n try {\n cond.wait();\n } catch (InterruptedException e) {}\n }\n }\n }",
"Condition createCondition();",
"private void assertCondition(Condition condition) {\n\t}",
"public void set( final Condition condition )\n {\n m_condition = condition;\n }",
"public Expression getCondition()\n {\n return this.condition;\n }",
"public static void setCondition (String condition) {\n BValue cond = getCond (condition);\n synchronized (cond) {\n if (cond.v) {\n return;\n }\n cond.v = true;\n cond.notifyAll();\n }\n }",
"Event getCondition();",
"public ExpressionNode getCondition();",
"public boolean evaluateCondition(WMSessionHandle shandle,\n String procId,\n String actId,\n String condition,\n @SuppressWarnings(\"rawtypes\") Map context) throws Exception {\n if (condition == null || condition.trim().length() == 0) {\n return true;\n }\n\n java.lang.Object eval = evaluateExpression(shandle,\n procId,\n actId,\n condition,\n context,\n java.lang.Boolean.class);\n try {\n return ((Boolean) eval).booleanValue();\n } catch (Exception ex) {\n cus.error(shandle, LOG_CHANNEL, \"JavaScriptEvaluator -> The result of condition \"\n + condition + \" cannot be converted to boolean\");\n cus.error(shandle, \"JavaScriptEvaluator -> The result of condition \"\n + condition + \" cannot be converted to boolean\");\n throw ex;\n }\n\n }",
"protected Condition parseSequenceFlowCondition(XmlElement seqFlowElement) {\n\n XmlElement conditionExprElement = seqFlowElement.getElement(\"conditionExpression\");\n\n if (conditionExprElement == null) {\n return null;\n }\n\n String expression = conditionExprElement.getText().trim();\n // Condition expressionCondition = new CheckVariableTrueCondition(expression);\n Condition expressionCondition = new JuelExpressionCondition(expression);\n return expressionCondition;\n }",
"@Override\n\tpublic void setCondition(VehicleCondition condition) {\n\t\tthis.condition = condition;\n\t}",
"public String getConditiondescription() {\r\n return conditiondescription;\r\n }",
"public void setWinCondition(String string) {\n\t\tthis.winCondition = string;\n\t}",
"public interface Condition {\n /** Return the condition state. */\n boolean test();\n /** Return a description of what the condition is testing. */\n String toString();\n}",
"LogicCondition createLogicCondition();",
"@JsonProperty(\"conditions\")\n @ApiModelProperty(value = \"The condition that will trigger the dialog node.\")\n public String getConditions() {\n return conditions;\n }",
"public void setJobCondition(String jobCondition) {\n this.jobCondition = jobCondition;\n }",
"public int getCondition() {\r\n\t\tif(this.condition == null){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn this.condition.ordinal();\r\n\t}",
"public interface Conditioned {\n @Nullable\n ROSCondition getCondition();\n }",
"Condition getCondition(String conditionName, Lock lock);",
"public Condition getCondition(){\n\t\treturn this.cond;\n\t}",
"private void parseCondition() {\n Struct type1 = parseExpr().type;\n\n int op;\n if (RELATIONAL_OPERATORS.contains(nextToken.kind)) {\n scan();\n op = token.kind;\n } else {\n error(\"Relational operator expected\");\n op = Token.NONE;\n }\n\n int opcode;\n switch (token.kind) {\n case Token.GTR:\n opcode = Code.OP_JGT;\n break;\n case Token.GEQ:\n opcode = Code.OP_JGE;\n break;\n case Token.LESS:\n opcode = Code.OP_JLT;\n break;\n case Token.LEQ:\n opcode = Code.OP_JLE;\n break;\n case Token.EQL:\n opcode = Code.OP_JEQ;\n break;\n case Token.NEQ:\n opcode = Code.OP_JNE;\n break;\n default:\n opcode = Code.OP_TRAP;\n error(\"Illegal comparison operator\");\n break;\n }\n\n Struct type2 = parseExpr().type;\n\n if (!type1.compatibleWith(type2)) {\n error(\"Incompatible types in comparison\");\n }\n if (type1.isRefType() && type2.isRefType()) {\n if (op != Token.EQL && op != Token.NEQ) {\n error(\"Reference types can only be compared \"\n + \"for equality and inequality\");\n }\n }\n\n code.putFalseJump(opcode, 42); // Will be fixed later\n }",
"public Filter condition();",
"public void setConditions(Conditions conditions) {\n this.conditions = conditions;\n }",
"public OverallCondition getCondition() {\n return condition;\n }",
"public RequestCondition<?> getCustomCondition()\n/* */ {\n/* 164 */ return this.customConditionHolder.getCondition();\n/* */ }",
"private boolean evaluateCondition(String cond) {\n logger.debug(\" getCondition() : [\" + cond + \"]\");\n \n String resultStr = \"\";\n boolean result = false;\n \n // now evaluate the condition using JavaScript\n Context cx = Context.enter();\n try {\n Scriptable scope = cx.initStandardObjects(null);\n Object cxResultObject = cx.evaluateString(scope, cond\n /** * conditionString ** */\n , \"<cmd>\", 1, null);\n resultStr = Context.toString(cxResultObject);\n \n if (resultStr.equals(\"false\")) { //$NON-NLS-1$\n result = false;\n } else if (resultStr.equals(\"true\")) { //$NON-NLS-1$\n result = true;\n } else {\n throw new Exception(\" BAD CONDITION :: \" + cond + \" :: expected true or false\");\n }\n \n logger.debug(\" >> evaluate Condition - [ \" + cond + \"] results is [\" + result + \"]\");\n } catch (Exception e) {\n logger.error(getName()+\": error while processing \"+ \"[\" + cond + \"]\\n\", e);\n } finally {\n Context.exit();\n }\n \n return result;\n }",
"public void select(Condition condition) {\n int i;\n boolean z = DEBUG;\n if (z) {\n String str = this.mTag;\n Log.d(str, \"select \" + condition);\n }\n int i2 = this.mSessionZen;\n if (i2 != -1 && i2 != 0) {\n final Uri realConditionId = getRealConditionId(condition);\n if (this.mController != null) {\n AsyncTask.execute(new Runnable() { // from class: com.android.systemui.volume.ZenModePanel.5\n @Override // java.lang.Runnable\n public void run() {\n ZenModePanel.this.mController.setZen(ZenModePanel.this.mSessionZen, realConditionId, \"ZenModePanel.selectCondition\");\n }\n });\n }\n setExitCondition(condition);\n if (realConditionId == null) {\n this.mPrefs.setMinuteIndex(-1);\n } else if ((isAlarm(condition) || isCountdown(condition)) && (i = this.mBucketIndex) != -1) {\n this.mPrefs.setMinuteIndex(i);\n }\n setSessionExitCondition(copy(condition));\n } else if (z) {\n Log.d(this.mTag, \"Ignoring condition selection outside of manual zen\");\n }\n }",
"private int addCondition(Question q)\n\t{\n\t\tString condition = \"NOT(\";\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<Element> cond_elements = doc.selectNodes(\"//document/conditions/rows/row[qid=\" + q.getQid() + \"]\");\n\t\tint i = 0;\n\t\tfor (Element c : cond_elements) {\n\t\t\ti++;\n\t\t\tPattern ans_p = Pattern.compile(\"^\\\\d+X(\\\\d+)X(.+?)$\");\n\t\t\tMatcher match = ans_p.matcher(c.elementText(\"cfieldname\"));\n\t\t\tmatch.find();\n\t\t\tString cond_str = \"(\";\n\t\t\tString path = \"$(SE-\" + prop.getProperty(\"dummy.study_event_oid\") + \"/F-\" + survey.getId() + \"/IG-\" + match.group(1) + \"/I-\" + match.group(2) + \")\";\n\n\t\t\tif (c.elementText(\"method\").equals(\"RX\")) {\n\t\t\t\tcond_str += \"MATCH(\";\n\n\t\t\t\tString regex = c.elementText(\"value\");\n\t\t\t\tint regex_length = regex.length();\n\t\t\t\t// Remove beginning whitespace\n\t\t\t\tregex = regex.substring(1, regex_length);\n\n\t\t\t\tcond_str += (regex + \", \" + path + \")\");\n\t\t\t} else {\n\t\t\t\tcond_str += path;\n\t\t\t\tString val = c.elementText(\"value\");\n\t\t\t\tcond_str += (c.elementText(\"method\") + (val.equals(\"\") ? \"NULL\" : val));\n\t\t\t}\n\n\t\t\tcond_str += \")\";\n\t\t\tcondition = condition.concat(cond_str);\n\t\t\tcondition = condition.concat(i < cond_elements.size()? \" AND \" : \")\");\n\t\t}\n\n\t\tif (cond_elements.size() != 0) {\n\t\t\tsurvey.addCondition(new Condition(prop.getProperty(\"imi.syntax_name\"), q.getQid().concat(prop.getProperty(\"ext.cond\")), condition));\n\t\t\tq.setCond(q.getQid().concat(prop.getProperty(\"ext.cond\")));\n\t\t\treturn 0;\n\t\t}\n\t\treturn -1;\n\t}",
"protected void sequence_ConditionAction(EObject context, ConditionAction semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}",
"@Override\n public void enterCondition(FSMParser.ConditionContext ctx) {\n if (ctx.var() != null && ((Var) findComp(ctx.var().NAME().getText())).isInput() &&\n ((Var) findComp(ctx.var().NAME().getText())).getBitSize() < 2) {\n Var inputflag = (Var) findComp(ctx.var().NAME().getText());\n FSMParser.Next_stateContext context = (FSMParser.Next_stateContext) ctx.getParent();\n int nextState = Integer.parseInt(\n context.STATENUMBER().getText().substring(6, context.STATENUMBER().getText().length()));\n\n //checking to see if true or false\n if (Integer.parseInt(ctx.expression().integer().opp.getText()) == 1) {\n this.conditions.get(0).put(inputflag, nextState);\n if (!this.conditionsOrder.contains(inputflag))\n this.conditionsOrder.add(inputflag);\n } else if (Integer.parseInt(ctx.expression().integer().opp.getText()) == 0) {\n this.conditions.get(1).put(inputflag, nextState);\n if (!this.conditionsOrder.contains(inputflag))\n this.conditionsOrder.add(inputflag);\n }\n return;\n\n }\n //finding the 2 components that are compaired\n VerilogComp compare1;\n VerilogComp compare2;\n if (ctx.register() != null) {\n compare1 = findComp(ctx.register().NAME().getText());\n\n } else {\n compare1 = findComp(ctx.var().NAME().getText());\n }\n\n if (ctx.expression().var() != null) {\n compare2 = findComp(ctx.expression().var().NAME().getText());\n } else if (ctx.expression().integer() != null) {\n int temp = Integer.parseInt(ctx.expression().integer().getText());\n FixedNumber tempfixed = new FixedNumber(temp, compare1.getBitSize());\n compare2 = tempfixed;\n this.comps.add(tempfixed);\n\n } else {\n compare2 = findComp(ctx.expression().register().NAME().getText());\n }\n\n // if the opp type is not equals, append the equals ctx number, as we do not want to make\n // another flag if the equals flag exists\n int ctx_opp = (ctx.opp.getType()==19)?16:ctx.opp.getType();\n String text = compare1.getName().substring(0, 1) + compare2.getName().substring(0, 1) + ctx_opp;\n FSMParser.Next_stateContext context = (FSMParser.Next_stateContext) ctx.getParent();\n int nextState = Integer.parseInt(\n context.STATENUMBER().getText().substring(6, context.STATENUMBER().getText().length()));\n\n //if there is no flag for this condition, make a variable and give it to conditionsTrue map\n if (findComp(\"flag_\" + text) == null) {\n\n\n Var output = new Var(\"flag_\" + text,\n 1, false, true, false);\n if (!(this.compInputs.containsKey(compare1.getName() + \"|\" + compare2.getName()))) {\n this.compInputs.put(compare1.getName() + \"|\" + compare2.getName(), new Var[3]);\n }\n\n Var[] flags = this.compInputs.get(compare1.getName() + \"|\" + compare2.getName());\n\n\n // finding the type of condition based on token Num\n //equals and not equals\n if (ctx.opp.getType() == 16 || ctx.opp.getType() == 19) {\n flags[1] = output;\n if (ctx.opp.getType() == 16) {\n this.conditions.get(0).put(output, nextState);\n if (!this.conditionsOrder.contains(output))\n this.conditionsOrder.add(output);\n } else {\n this.conditions.get(1).put(output, nextState);\n if (!this.conditionsOrder.contains(output))\n this.conditionsOrder.add(output);\n }\n //greatethan\n } else if (ctx.opp.getType() == 17) {\n flags[2] = output;\n this.conditions.get(0).put(output, nextState);\n if (!this.conditionsOrder.contains(output))\n this.conditionsOrder.add(output);\n\n //less than\n } else if (ctx.opp.getType() == 18) {\n flags[0] = output;\n this.conditions.get(0).put(output, nextState);\n if (!this.conditionsOrder.contains(output))\n this.conditionsOrder.add(output);\n }\n this.comps.add(output);\n\n\n //if equals flag exists but creating a not equals flag\n } else if (!this.conditions.get(0).containsKey(findComp(\"flag_\" + text)) && ctx.opp.getType() == 17) {\n this.conditions.get(1).put((Var) findComp(\"flag_\" + text), nextState);\n this.conditionsOrder.add((Var) findComp(\"flag_\" + text));\n } else {\n Var output = (Var) findComp(\"flag_\" + text);\n if (ctx.opp.getType() == 19) {\n this.conditions.get(1).put(output, nextState);\n if (!this.conditionsOrder.contains(output))\n this.conditionsOrder.add(output);\n } else if (ctx.opp.getType() == 16 || ctx.opp.getType() == 17\n || ctx.opp.getType() == 18) {\n this.conditions.get(0).put(output, nextState);\n if (!this.conditionsOrder.contains(output))\n this.conditionsOrder.add(output);\n }\n }\n\n }",
"public boolean conditionFulfilled();",
"public final void mT__33() throws RecognitionException {\n try {\n int _type = T__33;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.xtext.example.mydslsample/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDslSample.g:33:7: ( 'Condition' )\n // ../org.xtext.example.mydslsample/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDslSample.g:33:9: 'Condition'\n {\n match(\"Condition\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public String getJobCondition() {\n return jobCondition;\n }",
"protected String getConditionFromAstfCommand(FeedData feed){\n String res = \"\";\n String[]split = Utils.split(feed.getCondition(), \",\");\n for(String value : split){\n if(value.equals(FeedData.ASYNC) || value.equals(FeedData.SYNC))continue;\n\n return value;\n }\n\n return res;\n }",
"@GetMapping(\"/condition\")\n\tpublic String conditional(Model m) {\n\t\t// Elvis Operator\n\t\tSystem.out.println(\"Handle the Conditional Statement\");\n\t\tm.addAttribute(\"isActive\", true);\n\t\t// IF and Else operator\n\t\tm.addAttribute(\"gender\", \"male\");\n\n\t\t// Switch Statement\n\n\t\tList<Integer> list = List.of(1);\n\t\tm.addAttribute(\"myList\", list);\n\t\treturn \"condition\";\n\t}",
"public void testAllMedicalConditionParametersPopulated() {\n Map<String, MedicalCondition> conditions = cache.getConditions(Service.NOTIFY);\n MedicalCondition condition = conditions.get(DIABETES_CONDITION);\n\n assertNotNull(condition);\n\n assertEquals(\"DIAB\", condition.getID());\n assertEquals(\"Diabetes\", condition.getTitle());\n assertEquals(\"diabetes\", condition.getName());\n assertEquals(EMPTY, condition.getType());\n assertEquals(\"DIAB1\", condition.getForm());\n assertEquals(DIABETES_CONDITION, condition.getDomain());\n assertEquals(\"diabetes-with-insulin\", condition.getStart());\n assertEquals(\"diabetes\", condition.getDomain());\n assertEquals(\"diabetes-driving\", condition.getInformation());\n assertTrue(condition.getSynonyms().isEmpty());\n assertEquals(1, condition.getCasp().size());\n assertTrue(condition.getCasp().contains(\"D01\"));\n assertEquals(condition.getCeg(), \"101\");\n assertEquals(Severity.NOTIFIABLE, condition.getSeverity());\n assertEquals(Boolean.TRUE, condition.getEnabled());\n\n assertNotNull(condition.toString());\n }",
"public boolean validCondition(String condition) {\r\n\t\tif (!m_bRequireCondition)\r\n\t\t\treturn true;\r\n \t\treturn m_sValidConditions.contains(condition);\r\n \t}",
"public boolean addQuestion(EcardServiceCondition condition) {\n//\t\tString questionInfo = CodeUtil.decodeBase64(getCondition(condition)\n//\t\t\t\t.getContent());\n\t\t\n\t\tString values[] = ConnectionMessage.getValue(getCondition(condition).getMessage(), \"u_id\",\n\t\t\t\t\"u_ip\", \"g_id\", \"q_title\", \"q_content\", \"q_time\", \"q_value\",\n\t\t\t\t\"province_id\", \"q_stats\");\n\t\tQuestion question = new Question();\n\t\tquestion.getUser().setUid(StringValueUtils.getInt(values[0]));\n\t\tquestion.setQuestion_ip(values[1]);\n\t\tquestion.getLawCategory().setCatId(StringValueUtils.getInt(values[2]));\n\t\tquestion.setTitle(values[3]);\n\t\tquestion.setContent(StringUtils.replace(values[4], \"\\\\\\\\\", \"\\\\\"));\n\t\ttry {\n\t\t\tquestion.setCreatetime(DateUtil.parseDate(values[5]));\n\t\t} catch (ParseException e) {\n\t\t\tquestion.setCreatetime(new Date());\n\t\t}\n\t\tquestion.setScore(StringValueUtils.getInt(values[6]));\n\t\tquestion.getProvince().setAreaId(StringValueUtils.getInt(values[7]));\n\t\tquestion.setVisible(values[8]);\n\t\tif(questionServices.addQuestion(question)>0)return true;\n\t\telse \n\t\t\treturn false;\n\t}",
"public interface ICondition\n{\n\n /**\n * called when we are sure we are done with this condition\n */\n public void dispose();\n\n /**\n * attempt to clone this condition before it will be bound in the\n * instantiation phase. We pass the current bindings so that the condition can\n * do an early rejection if possible.\n * \n * @param model\n * @param variableBindings\n * @return a writable copy of the condition that will be bound\n * @throws CannotMatchException\n * if there is no way this condition can be matched\n */\n public ICondition clone(IModel model, Map<String, Object> variableBindings)\n throws CannotMatchException;\n\n /**\n * Iteratively perform the resolution and binding for this condition. If this\n * condition defines any variables, they are placed into the bindings map for\n * other conditions to exploit. Similarly, it will resolve any bindings that\n * it needs in order to be matched. If at any point the condition determines\n * that it cannot be matched, the exception is to be thrown. Similarly, if\n * isIterative is false, and there are unresolved bindings, the exception\n * should be thrown. <br>\n * Otherwise, the number of unresolved bindings is returned which allows the\n * instantiation calculation determine if another resolution round is\n * required.\n * \n * @return number of unresolved variables\n */\n public int bind(IModel model, Map<String, Object> variableBindings,\n boolean isIterative) throws CannotMatchException;\n}",
"public void appendChildActivity(String condition, BPELActivity activity) {\n\t\tactivitiesOK = false;\n\t\tboolean isOtherwise = condition == null\n\t\t\t\t|| condition.compareToIgnoreCase(\"true\") == 0;\n\t\t// Create a case element, unless the condition is null, in which case we\n\t\t// create an otherwise element.\n\t\tElement caseElement = BPEL.staticDocument\n\t\t\t\t.createElement(isOtherwise ? BPELConstants.stringOtherwise\n\t\t\t\t\t\t: BPELConstants.stringCase);\n\t\t// The case/otherwise element will be a child of this element.\n\t\telement.appendChild(caseElement);\n\t\t// Add the condition atribute in case of a case element.\n\t\tif (!isOtherwise) {\n\t\t\telement.setAttribute(\"condition\", condition);\n\t\t}\n\t\t// The element of the given activity will be a child of the\n\t\t// case/otherwise element.\n\t\tcaseElement.appendChild(activity.getElement());\n\t\t// Map the element onto the activity.\n\t\tmap.put(activity.getElement(), activity);\n\t\t// Map the activity onto its condition. Use \"true\" in case of otherwise\n\t\t// element.\n\t\tif (!isOtherwise) {\n\t\t\tcases.put(activity, condition);\n\t\t} else {\n\t\t\tcases.put(activity, \"true\");\n\t\t}\n\t}",
"public final void mT__169() throws RecognitionException {\n try {\n int _type = T__169;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:169:8: ( 'TCondition' )\n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:169:10: 'TCondition'\n {\n match(\"TCondition\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public DeleteBuilder and(String condition) {\n\t\t\n\t\tdelete.add(condition, Operator.AND);\n\t\treturn this;\n\t}",
"public SearchQuery<?, ?> condition(SearchCondition condition) {\n initSearch();\n BeanInfo searchMetaData = Beans.getBeanInfo(searchRecordTypeDesc.getSearchBasicClass());\n String fieldName = Beans.toInitialLower(condition.getFieldName());\n PropertyInfo propertyInfo = searchMetaData.getProperty(fieldName);\n\n if (propertyInfo != null) {\n Object searchField = processConditionForSearchRecord(searchBasic, condition);\n Beans.setProperty(searchBasic, fieldName, searchField);\n } else {\n SearchFieldOperatorName operatorQName = new SearchFieldOperatorName(condition.getOperatorName());\n String dataType = operatorQName.getDataType();\n SearchFieldType searchFieldType;\n try {\n searchFieldType = SearchFieldOperatorType.getSearchFieldType(dataType);\n } catch (UnsupportedOperationException e) {\n throw new NetSuiteException(new NetSuiteErrorCode(NetSuiteErrorCode.OPERATION_NOT_SUPPORTED),\n i18n.invalidDataType(dataType));\n }\n\n Object searchField = processCondition(searchFieldType, condition);\n customFieldList.add(searchField);\n }\n\n return this;\n }",
"@POST\n @Path(\"/conditions\")\n public void setConditionType(ConditionType conditionType) {\n definitionsService.setConditionType(conditionType);\n }",
"public void setWhereCondition(com.sforce.soap.partner.SoqlWhereCondition whereCondition) {\r\n this.whereCondition = whereCondition;\r\n }",
"private QueryCondition buildConditionForQueryFromCondition(ParameterContext context, \r\n\t\t\tSet<String> includedTables, IConditionalQuery query, Condition condition, Object params[])\r\n\t{\r\n\t\tObject value = null;\r\n\t\t\t\t\r\n\t\t// fetch the value for current condition\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//for non-method level conditions fetch the value\r\n\t\t\tif(condition.index >= 0)\r\n\t\t\t{\r\n\t\t\t\tvalue = PropertyUtils.getProperty(context, condition.getConditionExpression());\r\n\t\t\t\t\r\n\t\t\t\tif(condition.fieldDetails != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tvalue = context.queryExecutionContext.getConversionService().convertToDBType(value, condition.fieldDetails);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//for method level conditions like null-checks and others use default value from condition\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tString strValue = condition.defaultValue;\r\n\t\t\t\t\r\n\t\t\t\t//if no repo context is specified assume empty object\r\n\t\t\t\tObject repoContext = context.queryExecutionContext.getRepositoryExecutionContext();\r\n\t\t\t\trepoContext = (repoContext != null) ? repoContext : Collections.emptyMap(); \r\n\t\t\t\t\r\n\t\t\t\t//if value is present check for expressions and replace them\r\n\t\t\t\tif(strValue != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValue = CommonUtils.replaceExpressions(repoContext, condition.defaultValue, null);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tvalue = ConvertUtils.convert(strValue, condition.fieldDetails.getField().getType());\r\n\t\t\t}\r\n\t\t} catch(Exception ex)\r\n\t\t{\r\n\t\t\tthrow new IllegalStateException(\"An error occurred while fetching condition value for expression -\" + condition.getConditionExpression(), ex);\r\n\t\t}\r\n\t\t\r\n\t\tif(value instanceof Enum)\r\n\t\t{\r\n\t\t\tvalue = \"\" + value;\r\n\t\t}\r\n\t\t\r\n\t\tQueryCondition groupHead = null;\r\n\r\n\t\t// if value is not provided, ignore current condition\r\n\t\tif(value != null || (condition.operator.isNullable() && condition.nullable))\r\n\t\t{\r\n\t\t\t// add tables and conditions to specifies query\r\n\t\t\taddTables(query, condition.table.tableCode, includedTables);\r\n\t\t\t\r\n\t\t\tgroupHead = new QueryCondition(condition.table.tableCode, condition.fieldDetails.getDbColumnName(), condition.operator, value, condition.joinOperator, condition.ignoreCase);\r\n\t\t\tgroupHead.setDataType(condition.fieldDetails.getDbDataType());\r\n\t\t}\r\n\r\n\t\t//if no group conditions are present on this query\r\n\t\tif(condition.getGroupedConditions() == null)\r\n\t\t{\r\n\t\t\treturn groupHead;\r\n\t\t}\r\n\t\t\r\n\t\taddGroupConditions(groupHead, condition.getGroupedConditions(), context, includedTables, query, params);\r\n\t\treturn groupHead;\r\n\t}",
"protected Expression analyzeCondition() throws AnalysisException {\n final var condition = analyzeExpression();\n assertKeyWord(ScriptBasicKeyWords.KEYWORD_THEN);\n return condition;\n }",
"public interface Condition {\n boolean isSatisfied();\n}",
"public abstract boolean execute(Condition condition, Map<String, String> executionParameterMap, Grant grant);",
"public String getFilterCondition() {\n return filterCondition;\n }",
"io.dstore.values.StringValueOrBuilder getConditionListOrBuilder();",
"public DoSometime condition(Condition condition) {\n this.condition = condition;\n return this;\n }",
"void setCondition(ICDICondition condition) throws CDIException;",
"private boolean isCondition() {\n return line.startsWith(\"if \") || line.startsWith(\"else \") ||\n line.startsWith(\"if(\") || line.equals(\"else\");\n }",
"public static Condition createCondition(Patient patient, Encounter encounter, String conditionTypeCode,\n String conditionTypeDisplay, String date){\n // Create a condition object\n Condition condition = new Condition();\n\n // Set Identifier of the condition object\n condition.addIdentifier()\n .setSystem(\"http://www.kh-uzl.de/fhir/condition\")\n .setValue(UUID.randomUUID().toString());\n\n // Set clinical status of the condition\n condition.setClinicalStatus(new CodeableConcept()\n .addCoding(new Coding()\n .setCode(\"active\")\n .setSystem(\"http://terminology.hl7.org/CodeSystem/condition-clinical\")\n .setDisplay(\"Active\")));\n\n // Set verification status of the condition\n condition.setVerificationStatus(new CodeableConcept()\n .addCoding(new Coding()\n .setCode(\"confirmed\")\n .setSystem(\"http://terminology.hl7.org/CodeSystem/condition-ver-status\")\n .setDisplay(\"Confirmed\")));\n\n // Set Identification of the condition, problem or diagnosis\n condition.setCode(new CodeableConcept()\n .addCoding(new Coding()\n .setCode(conditionTypeCode)\n .setSystem(\"http://snomed.info/sct\")\n .setDisplay(conditionTypeDisplay)));\n\n // Set reference to a patient, that the condition belongs to\n condition.setSubject(new Reference()\n .setIdentifier(patient.getIdentifierFirstRep())\n .setReference(patient.fhirType() + \"/\" + patient.getId()));\n\n // Set reference to an encounter, the condition was part of\n condition.setEncounter(new Reference()\n .setIdentifier(encounter.getIdentifierFirstRep())\n .setReference(encounter.fhirType() + \"/\" + encounter.getId()));\n\n // Set date when the condition was first recorded\n condition.setRecordedDateElement(new DateTimeType(date));\n\n return condition;\n }",
"@Override\n\tpublic VehicleCondition getCondition() {\n\t\treturn condition;\n\t}",
"protected void sequence_Condition(EObject context, Condition semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}",
"public Condition(ConditionManager condition)\r\n\t{\r\n\t\tthis.condition = condition;\r\n\t\tinit();\r\n\t}",
"public WeatherCondition getCondition() {\n return condition;\n }",
"public GroupByBuilder and(String condition) {\n\t\t\n\t\tadd(condition, Operator.AND);\n\t\treturn this;\n\t}",
"public void addWhen(Object pCondition, Object pValue);",
"public Locomotive waitForCondition(ExpectedCondition<?> condition) {\n return waitForCondition(condition, configuration.getTimeout());\n }",
"public final void addCondition(final Condition c) {\n m_body.add(c);\n }",
"public void setConditionId(Long conditionId) {\n _conditionId = conditionId;\n }",
"public void setInput(int index, Condition condition) {\n Log.d(\"STATE\", \"SETTING INPUT\");\n if (inputs.size() > index) {\n inputs.set(index, condition);\n } else {\n inputs.add(condition);\n }\n }",
"public void announceConditionSelection(ConditionTag conditionTag) {\n String str;\n int selectedZen = getSelectedZen(0);\n if (selectedZen == 1) {\n str = this.mContext.getString(R$string.interruption_level_priority);\n } else if (selectedZen == 2) {\n str = this.mContext.getString(R$string.interruption_level_none);\n } else if (selectedZen == 3) {\n str = this.mContext.getString(R$string.interruption_level_alarms);\n } else {\n return;\n }\n announceForAccessibility(this.mContext.getString(R$string.zen_mode_and_condition, str, conditionTag.line1.getText()));\n }",
"public void setConditionCode(int conditionCode) {\n\t\t\tthis.conditionCode = conditionCode;\n\t\t}",
"public Attribute(String name, String value, Condition condition) {\n if(name == \"\")\n try {\n throw new Exception(\"Attribute Name is null\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n this.name = name;\n this.value = value;\n this.condition = condition;\n }",
"boolean isSatisfiable(ConditionContext context);",
"@Override\n public PaymentP2007_03 where(Field<Boolean> condition) {\n return where(DSL.condition(condition));\n }",
"public RefactoringStatus getConditionStatus() {\n return fPreconditionStatus;\n }",
"public void addCondition(SetGenerator condition)\n\t{\n\t\tthis.triggerConditions.add(condition);\n\t}",
"private String _buildWhereCondition(Vector conditions){\n String strConditions = \"\";\n if(conditions != null){\n strConditions = clsPopulateFunctions.joinVector(conditions, \" AND \");\n }\n return strConditions;\n }"
]
| [
"0.5984156",
"0.589085",
"0.5791105",
"0.56532186",
"0.5593219",
"0.5547993",
"0.5509832",
"0.5391938",
"0.5373294",
"0.52894974",
"0.5185923",
"0.5184032",
"0.51710886",
"0.51547515",
"0.50745374",
"0.505505",
"0.50406057",
"0.5035835",
"0.5028903",
"0.501441",
"0.49854326",
"0.49827287",
"0.49560457",
"0.49536538",
"0.49261704",
"0.4912045",
"0.490102",
"0.49008468",
"0.48942092",
"0.48892167",
"0.4878775",
"0.48697352",
"0.48261556",
"0.4823967",
"0.48151514",
"0.47988027",
"0.47797737",
"0.475554",
"0.47431082",
"0.46900856",
"0.46793935",
"0.4676845",
"0.46678832",
"0.46529502",
"0.46464497",
"0.46440867",
"0.46406156",
"0.46395135",
"0.463632",
"0.4632332",
"0.46317393",
"0.46303436",
"0.46244752",
"0.46205345",
"0.46203533",
"0.46077624",
"0.460668",
"0.4576572",
"0.45680392",
"0.4556124",
"0.4556043",
"0.45450383",
"0.45380908",
"0.45343226",
"0.45312756",
"0.452775",
"0.451615",
"0.4514063",
"0.45094123",
"0.4500129",
"0.4496993",
"0.44930696",
"0.4488526",
"0.44771343",
"0.44633228",
"0.44381902",
"0.4428207",
"0.44262403",
"0.44255427",
"0.44239658",
"0.4416365",
"0.43977046",
"0.43852887",
"0.43828535",
"0.43742904",
"0.43596134",
"0.43556982",
"0.43424636",
"0.4324224",
"0.43144885",
"0.43031842",
"0.42984766",
"0.4293206",
"0.42798895",
"0.42773676",
"0.42681766",
"0.4267542",
"0.4256603",
"0.42564264",
"0.42488968"
]
| 0.56898385 | 3 |
The fulfillment to call when the condition is satisfied. At least one of `trigger_fulfillment` and `target` must be specified. When both are defined, `trigger_fulfillment` is executed first. .google.cloud.dialogflow.cx.v3beta1.Fulfillment trigger_fulfillment = 3; | boolean hasTriggerFulfillment(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"com.google.cloud.dialogflow.cx.v3beta1.Fulfillment getTriggerFulfillment();",
"com.google.cloud.dialogflow.cx.v3beta1.FulfillmentOrBuilder getTriggerFulfillmentOrBuilder();",
"public Builder setInitialPromptFulfillment(\n com.google.cloud.dialogflow.cx.v3beta1.Fulfillment value) {\n if (initialPromptFulfillmentBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n initialPromptFulfillment_ = value;\n } else {\n initialPromptFulfillmentBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000001;\n onChanged();\n return this;\n }",
"com.google.cloud.dialogflow.cx.v3beta1.Fulfillment getInitialPromptFulfillment();",
"public com.google.cloud.dialogflow.cx.v3beta1.Fulfillment getInitialPromptFulfillment() {\n if (initialPromptFulfillmentBuilder_ == null) {\n return initialPromptFulfillment_ == null\n ? com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.getDefaultInstance()\n : initialPromptFulfillment_;\n } else {\n return initialPromptFulfillmentBuilder_.getMessage();\n }\n }",
"com.google.cloud.dialogflow.cx.v3beta1.FulfillmentOrBuilder\n getInitialPromptFulfillmentOrBuilder();",
"public String getFulfillmentChannel() {\r\n return fulfillmentChannel;\r\n }",
"@java.lang.Override\n public com.google.cloud.dialogflow.cx.v3beta1.Fulfillment getInitialPromptFulfillment() {\n return initialPromptFulfillment_ == null\n ? com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.getDefaultInstance()\n : initialPromptFulfillment_;\n }",
"public Builder mergeInitialPromptFulfillment(\n com.google.cloud.dialogflow.cx.v3beta1.Fulfillment value) {\n if (initialPromptFulfillmentBuilder_ == null) {\n if (((bitField0_ & 0x00000001) != 0)\n && initialPromptFulfillment_ != null\n && initialPromptFulfillment_\n != com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.getDefaultInstance()) {\n getInitialPromptFulfillmentBuilder().mergeFrom(value);\n } else {\n initialPromptFulfillment_ = value;\n }\n } else {\n initialPromptFulfillmentBuilder_.mergeFrom(value);\n }\n bitField0_ |= 0x00000001;\n onChanged();\n return this;\n }",
"public void setFulfillmentChannel(String fulfillmentChannel) {\r\n this.fulfillmentChannel = fulfillmentChannel;\r\n }",
"private com.google.protobuf.SingleFieldBuilderV3<\n com.google.cloud.dialogflow.cx.v3beta1.Fulfillment,\n com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.Builder,\n com.google.cloud.dialogflow.cx.v3beta1.FulfillmentOrBuilder>\n getInitialPromptFulfillmentFieldBuilder() {\n if (initialPromptFulfillmentBuilder_ == null) {\n initialPromptFulfillmentBuilder_ =\n new com.google.protobuf.SingleFieldBuilderV3<\n com.google.cloud.dialogflow.cx.v3beta1.Fulfillment,\n com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.Builder,\n com.google.cloud.dialogflow.cx.v3beta1.FulfillmentOrBuilder>(\n getInitialPromptFulfillment(), getParentForChildren(), isClean());\n initialPromptFulfillment_ = null;\n }\n return initialPromptFulfillmentBuilder_;\n }",
"public Trigger getTrigger() {\n \t\treturn trigger;\n \t}",
"pb4server.FireFightAskReqOrBuilder getFireFightAskReqOrBuilder();",
"TriggeringStatement getTriggeringStatement();",
"public void trigger(List<Entity> _trigger){\n\t\tif(event!=null){\n\t\t\tevent.activate(System.currentTimeMillis(), _trigger);\n\t\t}\n\t}",
"@NonNull\n public ScreenTriggerBuilder setGoal(double goal) {\n this.goal = goal;\n return this;\n }",
"public com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition getAutoForwardTriggeredSend()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition target = null;\n target = (com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition)get_store().find_element_user(AUTOFORWARDTRIGGEREDSEND$16, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public void trigger(Fact fact) {\n\t\t\n\t}",
"public void setTrigger(Trigger trigger) {\n \t\tthis.trigger = trigger;\n \t\tif (this.trigger == null)\n \t\t\tthis.trigger = Trigger.NONE;\n \t}",
"public com.google.cloud.dialogflow.cx.v3beta1.FulfillmentOrBuilder\n getInitialPromptFulfillmentOrBuilder() {\n if (initialPromptFulfillmentBuilder_ != null) {\n return initialPromptFulfillmentBuilder_.getMessageOrBuilder();\n } else {\n return initialPromptFulfillment_ == null\n ? com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.getDefaultInstance()\n : initialPromptFulfillment_;\n }\n }",
"public Builder setInitialPromptFulfillment(\n com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.Builder builderForValue) {\n if (initialPromptFulfillmentBuilder_ == null) {\n initialPromptFulfillment_ = builderForValue.build();\n } else {\n initialPromptFulfillmentBuilder_.setMessage(builderForValue.build());\n }\n bitField0_ |= 0x00000001;\n onChanged();\n return this;\n }",
"public static boolean getTrigger() {\n\t\treturn true;\r\n\t}",
"@Property(\"triggerAction\")\n void setTriggerAction(String triggerAction);",
"public void setFullfillment(int fullfillment) {\r\n this.fullfillment = fullfillment;\r\n }",
"public com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition getAutoReplyTriggeredSend()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition target = null;\n target = (com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition)get_store().find_element_user(AUTOREPLYTRIGGEREDSEND$20, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"protected void sequence_AT_DEFINE_DefinitionTrigger_TRIGGER(ISerializationContext context, DefinitionTrigger semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}",
"public void setAutoForwardTriggeredSend(com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition autoForwardTriggeredSend)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition target = null;\n target = (com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition)get_store().find_element_user(AUTOFORWARDTRIGGEREDSEND$16, 0);\n if (target == null)\n {\n target = (com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition)get_store().add_element_user(AUTOFORWARDTRIGGEREDSEND$16);\n }\n target.set(autoForwardTriggeredSend);\n }\n }",
"public abstract void setTriggerOrAction();",
"public boolean isSetFulfillmentChannel() {\r\n return fulfillmentChannel != null;\r\n }",
"public abstract void onTrigger();",
"public Builder setFillBehavior(\n com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior value) {\n if (fillBehaviorBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n fillBehavior_ = value;\n } else {\n fillBehaviorBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000010;\n onChanged();\n return this;\n }",
"public JWSSignerOption getTriggeringOption() {\n\t\treturn option;\n\t}",
"@java.lang.Override\n public com.google.cloud.dialogflow.cx.v3beta1.FulfillmentOrBuilder\n getInitialPromptFulfillmentOrBuilder() {\n return initialPromptFulfillment_ == null\n ? com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.getDefaultInstance()\n : initialPromptFulfillment_;\n }",
"public void setFulfillmentUpdatesSpecification(FulfillmentUpdatesSpecification fulfillmentUpdatesSpecification) {\n this.fulfillmentUpdatesSpecification = fulfillmentUpdatesSpecification;\n }",
"@Property(\"triggerAction\")\n String getTriggerAction();",
"@NonNull\n public LifeCycleTriggerBuilder setGoal(double goal) {\n this.goal = goal;\n return this;\n }",
"@NonNull\n public RegionTriggerBuilder setGoal(double goal) {\n this.goal = goal;\n return this;\n }",
"public boolean trigger (String name) {\n final TriggerReference trigger = module.getTrigger(name);\n if (trigger == null) {\n Logger.missing(\"TriggerReference\", name);\n return false;\n } else {\n return trigger.get();\n }\n }",
"@NonNull\n public Trigger build() {\n return new Trigger(type, goal, null);\n }",
"public com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.Builder\n getInitialPromptFulfillmentBuilder() {\n bitField0_ |= 0x00000001;\n onChanged();\n return getInitialPromptFulfillmentFieldBuilder().getBuilder();\n }",
"public abstract boolean isTrigger();",
"private com.google.protobuf.SingleFieldBuilderV3<\n com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior,\n com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.Builder,\n com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehaviorOrBuilder>\n getFillBehaviorFieldBuilder() {\n if (fillBehaviorBuilder_ == null) {\n fillBehaviorBuilder_ =\n new com.google.protobuf.SingleFieldBuilderV3<\n com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior,\n com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.Builder,\n com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehaviorOrBuilder>(\n getFillBehavior(), getParentForChildren(), isClean());\n fillBehavior_ = null;\n }\n return fillBehaviorBuilder_;\n }",
"public com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior getFillBehavior() {\n if (fillBehaviorBuilder_ == null) {\n return fillBehavior_ == null\n ? com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior\n .getDefaultInstance()\n : fillBehavior_;\n } else {\n return fillBehaviorBuilder_.getMessage();\n }\n }",
"ITrigger getTrigger(String sTriggerName);",
"public TriggerAccess getTrigger () {\n return this.trigger;\n }",
"public void executeTrigger(Object object);",
"public PayWithAmazonEvent withFulfillmentChannel(String fulfillmentChannel) {\r\n this.fulfillmentChannel = fulfillmentChannel;\r\n return this;\r\n }",
"public final EObject ruleTrigger() throws RecognitionException {\n EObject current = null;\n int ruleTrigger_StartIndex = input.index();\n Token otherlv_0=null;\n Token otherlv_1=null;\n Token otherlv_3=null;\n Token otherlv_5=null;\n Token otherlv_6=null;\n Token otherlv_8=null;\n Token otherlv_9=null;\n Token otherlv_11=null;\n EObject lv_triggerRules_2_0 = null;\n\n EObject lv_triggerRules_4_0 = null;\n\n EObject lv_with_7_0 = null;\n\n EObject lv_when_10_0 = null;\n\n\n enterRule(); \n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 20) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1350:28: ( (otherlv_0= KEYWORD_82 otherlv_1= KEYWORD_4 ( (lv_triggerRules_2_0= ruleQualifiedRuleReference ) ) (otherlv_3= KEYWORD_8 ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) ) )* otherlv_5= KEYWORD_5 (otherlv_6= KEYWORD_58 ( (lv_with_7_0= ruleBlock ) ) )? (otherlv_8= KEYWORD_57 otherlv_9= KEYWORD_4 ( (lv_when_10_0= ruleExpression ) ) otherlv_11= KEYWORD_5 )? ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1351:1: (otherlv_0= KEYWORD_82 otherlv_1= KEYWORD_4 ( (lv_triggerRules_2_0= ruleQualifiedRuleReference ) ) (otherlv_3= KEYWORD_8 ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) ) )* otherlv_5= KEYWORD_5 (otherlv_6= KEYWORD_58 ( (lv_with_7_0= ruleBlock ) ) )? (otherlv_8= KEYWORD_57 otherlv_9= KEYWORD_4 ( (lv_when_10_0= ruleExpression ) ) otherlv_11= KEYWORD_5 )? )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1351:1: (otherlv_0= KEYWORD_82 otherlv_1= KEYWORD_4 ( (lv_triggerRules_2_0= ruleQualifiedRuleReference ) ) (otherlv_3= KEYWORD_8 ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) ) )* otherlv_5= KEYWORD_5 (otherlv_6= KEYWORD_58 ( (lv_with_7_0= ruleBlock ) ) )? (otherlv_8= KEYWORD_57 otherlv_9= KEYWORD_4 ( (lv_when_10_0= ruleExpression ) ) otherlv_11= KEYWORD_5 )? )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1352:2: otherlv_0= KEYWORD_82 otherlv_1= KEYWORD_4 ( (lv_triggerRules_2_0= ruleQualifiedRuleReference ) ) (otherlv_3= KEYWORD_8 ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) ) )* otherlv_5= KEYWORD_5 (otherlv_6= KEYWORD_58 ( (lv_with_7_0= ruleBlock ) ) )? (otherlv_8= KEYWORD_57 otherlv_9= KEYWORD_4 ( (lv_when_10_0= ruleExpression ) ) otherlv_11= KEYWORD_5 )?\n {\n otherlv_0=(Token)match(input,KEYWORD_82,FOLLOW_KEYWORD_82_in_ruleTrigger2463); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_0, grammarAccess.getTriggerAccess().getTriggerKeyword_0());\n \n }\n otherlv_1=(Token)match(input,KEYWORD_4,FOLLOW_KEYWORD_4_in_ruleTrigger2475); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_1, grammarAccess.getTriggerAccess().getLeftParenthesisKeyword_1());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1361:1: ( (lv_triggerRules_2_0= ruleQualifiedRuleReference ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1362:1: (lv_triggerRules_2_0= ruleQualifiedRuleReference )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1362:1: (lv_triggerRules_2_0= ruleQualifiedRuleReference )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1363:3: lv_triggerRules_2_0= ruleQualifiedRuleReference\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getTriggerAccess().getTriggerRulesQualifiedRuleReferenceParserRuleCall_2_0()); \n \t \n }\n pushFollow(FOLLOW_ruleQualifiedRuleReference_in_ruleTrigger2495);\n lv_triggerRules_2_0=ruleQualifiedRuleReference();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getTriggerRule());\n \t }\n \t\tadd(\n \t\t\tcurrent, \n \t\t\t\"triggerRules\",\n \t\tlv_triggerRules_2_0, \n \t\t\"QualifiedRuleReference\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1379:2: (otherlv_3= KEYWORD_8 ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) ) )*\n loop35:\n do {\n int alt35=2;\n int LA35_0 = input.LA(1);\n\n if ( (LA35_0==KEYWORD_8) ) {\n alt35=1;\n }\n\n\n switch (alt35) {\n \tcase 1 :\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1380:2: otherlv_3= KEYWORD_8 ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) )\n \t {\n \t otherlv_3=(Token)match(input,KEYWORD_8,FOLLOW_KEYWORD_8_in_ruleTrigger2509); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \tnewLeafNode(otherlv_3, grammarAccess.getTriggerAccess().getCommaKeyword_3_0());\n \t \n \t }\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1384:1: ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) )\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1385:1: (lv_triggerRules_4_0= ruleQualifiedRuleReference )\n \t {\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1385:1: (lv_triggerRules_4_0= ruleQualifiedRuleReference )\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1386:3: lv_triggerRules_4_0= ruleQualifiedRuleReference\n \t {\n \t if ( state.backtracking==0 ) {\n \t \n \t \t newCompositeNode(grammarAccess.getTriggerAccess().getTriggerRulesQualifiedRuleReferenceParserRuleCall_3_1_0()); \n \t \t \n \t }\n \t pushFollow(FOLLOW_ruleQualifiedRuleReference_in_ruleTrigger2529);\n \t lv_triggerRules_4_0=ruleQualifiedRuleReference();\n\n \t state._fsp--;\n \t if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getTriggerRule());\n \t \t }\n \t \t\tadd(\n \t \t\t\tcurrent, \n \t \t\t\t\"triggerRules\",\n \t \t\tlv_triggerRules_4_0, \n \t \t\t\"QualifiedRuleReference\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n \t }\n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop35;\n }\n } while (true);\n\n otherlv_5=(Token)match(input,KEYWORD_5,FOLLOW_KEYWORD_5_in_ruleTrigger2544); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_5, grammarAccess.getTriggerAccess().getRightParenthesisKeyword_4());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1407:1: (otherlv_6= KEYWORD_58 ( (lv_with_7_0= ruleBlock ) ) )?\n int alt36=2;\n int LA36_0 = input.LA(1);\n\n if ( (LA36_0==KEYWORD_58) ) {\n alt36=1;\n }\n switch (alt36) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1408:2: otherlv_6= KEYWORD_58 ( (lv_with_7_0= ruleBlock ) )\n {\n otherlv_6=(Token)match(input,KEYWORD_58,FOLLOW_KEYWORD_58_in_ruleTrigger2557); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_6, grammarAccess.getTriggerAccess().getWithKeyword_5_0());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1412:1: ( (lv_with_7_0= ruleBlock ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1413:1: (lv_with_7_0= ruleBlock )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1413:1: (lv_with_7_0= ruleBlock )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1414:3: lv_with_7_0= ruleBlock\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getTriggerAccess().getWithBlockParserRuleCall_5_1_0()); \n \t \n }\n pushFollow(FOLLOW_ruleBlock_in_ruleTrigger2577);\n lv_with_7_0=ruleBlock();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getTriggerRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"with\",\n \t\tlv_with_7_0, \n \t\t\"Block\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n\n }\n break;\n\n }\n\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1430:4: (otherlv_8= KEYWORD_57 otherlv_9= KEYWORD_4 ( (lv_when_10_0= ruleExpression ) ) otherlv_11= KEYWORD_5 )?\n int alt37=2;\n int LA37_0 = input.LA(1);\n\n if ( (LA37_0==KEYWORD_57) ) {\n alt37=1;\n }\n switch (alt37) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1431:2: otherlv_8= KEYWORD_57 otherlv_9= KEYWORD_4 ( (lv_when_10_0= ruleExpression ) ) otherlv_11= KEYWORD_5\n {\n otherlv_8=(Token)match(input,KEYWORD_57,FOLLOW_KEYWORD_57_in_ruleTrigger2593); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_8, grammarAccess.getTriggerAccess().getWhenKeyword_6_0());\n \n }\n otherlv_9=(Token)match(input,KEYWORD_4,FOLLOW_KEYWORD_4_in_ruleTrigger2605); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_9, grammarAccess.getTriggerAccess().getLeftParenthesisKeyword_6_1());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1440:1: ( (lv_when_10_0= ruleExpression ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1441:1: (lv_when_10_0= ruleExpression )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1441:1: (lv_when_10_0= ruleExpression )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1442:3: lv_when_10_0= ruleExpression\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getTriggerAccess().getWhenExpressionParserRuleCall_6_2_0()); \n \t \n }\n pushFollow(FOLLOW_ruleExpression_in_ruleTrigger2625);\n lv_when_10_0=ruleExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getTriggerRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"when\",\n \t\tlv_when_10_0, \n \t\t\"Expression\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n otherlv_11=(Token)match(input,KEYWORD_5,FOLLOW_KEYWORD_5_in_ruleTrigger2638); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_11, grammarAccess.getTriggerAccess().getRightParenthesisKeyword_6_3());\n \n }\n\n }\n break;\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 20, ruleTrigger_StartIndex); }\n }\n return current;\n }",
"private Action refuelAt(Position target) {\n\t\tif (position.equals(target)) return new RefuelAction();\n\n\t\treturn moveTowardsPosition(target);\n\t}",
"protected Trigger getContentAssistTrigger() {\n IBindingService service = (IBindingService) PlatformUI.getWorkbench()\n .getService(IBindingService.class);\n Trigger trigger = null;\n TriggerSequence[] sequences = service\n .getActiveBindingsFor(ContentAssistCommandAdapter.CONTENT_PROPOSAL_COMMAND);\n if (sequences.length > 0) {\n Trigger[] triggers = sequences[0].getTriggers();\n if (triggers.length > 0) {\n trigger = triggers[0];\n }\n }\n return trigger;\n }",
"public final EObject ruleETriggers() throws RecognitionException {\n EObject current = null;\n\n EObject lv_triggers_1_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalRMParser.g:2093:2: ( ( () ( (lv_triggers_1_0= ruleETriggerDefinition ) )* ) )\n // InternalRMParser.g:2094:2: ( () ( (lv_triggers_1_0= ruleETriggerDefinition ) )* )\n {\n // InternalRMParser.g:2094:2: ( () ( (lv_triggers_1_0= ruleETriggerDefinition ) )* )\n // InternalRMParser.g:2095:3: () ( (lv_triggers_1_0= ruleETriggerDefinition ) )*\n {\n // InternalRMParser.g:2095:3: ()\n // InternalRMParser.g:2096:4: \n {\n\n \t\t\t\tcurrent = forceCreateModelElement(\n \t\t\t\t\tgrammarAccess.getETriggersAccess().getETriggersAction_0(),\n \t\t\t\t\tcurrent);\n \t\t\t\n\n }\n\n // InternalRMParser.g:2102:3: ( (lv_triggers_1_0= ruleETriggerDefinition ) )*\n loop18:\n do {\n int alt18=2;\n int LA18_0 = input.LA(1);\n\n if ( (LA18_0==RULE_QUALIFIED_NAME) ) {\n alt18=1;\n }\n\n\n switch (alt18) {\n \tcase 1 :\n \t // InternalRMParser.g:2103:4: (lv_triggers_1_0= ruleETriggerDefinition )\n \t {\n \t // InternalRMParser.g:2103:4: (lv_triggers_1_0= ruleETriggerDefinition )\n \t // InternalRMParser.g:2104:5: lv_triggers_1_0= ruleETriggerDefinition\n \t {\n\n \t \t\t\t\t\tnewCompositeNode(grammarAccess.getETriggersAccess().getTriggersETriggerDefinitionParserRuleCall_1_0());\n \t \t\t\t\t\n \t pushFollow(FOLLOW_16);\n \t lv_triggers_1_0=ruleETriggerDefinition();\n\n \t state._fsp--;\n\n\n \t \t\t\t\t\tif (current==null) {\n \t \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getETriggersRule());\n \t \t\t\t\t\t}\n \t \t\t\t\t\tadd(\n \t \t\t\t\t\t\tcurrent,\n \t \t\t\t\t\t\t\"triggers\",\n \t \t\t\t\t\t\tlv_triggers_1_0,\n \t \t\t\t\t\t\t\"org.sodalite.dsl.RM.ETriggerDefinition\");\n \t \t\t\t\t\tafterParserOrEnumRuleCall();\n \t \t\t\t\t\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop18;\n }\n } while (true);\n\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehaviorOrBuilder\n getFillBehaviorOrBuilder() {\n if (fillBehaviorBuilder_ != null) {\n return fillBehaviorBuilder_.getMessageOrBuilder();\n } else {\n return fillBehavior_ == null\n ? com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior\n .getDefaultInstance()\n : fillBehavior_;\n }\n }",
"public boolean conditionFulfilled();",
"public void attack(RobotReference target) {\n if (target != null) {\n turnToVector(target.getLocation());\n pointGunToVector(target.getLocation());\n setAhead(60);\n fire(3);\n\n\n }\n }",
"public FulfillmentUpdatesSpecification getFulfillmentUpdatesSpecification() {\n return this.fulfillmentUpdatesSpecification;\n }",
"void trigger(Entity e);",
"public void setAutoReplyTriggeredSend(com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition autoReplyTriggeredSend)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition target = null;\n target = (com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition)get_store().find_element_user(AUTOREPLYTRIGGEREDSEND$20, 0);\n if (target == null)\n {\n target = (com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition)get_store().add_element_user(AUTOREPLYTRIGGEREDSEND$20);\n }\n target.set(autoReplyTriggeredSend);\n }\n }",
"public void setRetriggerMode( RetriggerMode retriggerMode );",
"public interface WMTrigger extends WorkflowDefinitionObject {\r\n WMActivity getActivity();\r\n\r\n Boolean getMatchEventObjectForCompletion();\r\n\r\n WMPostTransitionRestriction getPostTransitionRestriction();\r\n\r\n Condition getCondition();\r\n\r\n String getTitle();\r\n}",
"boolean getUserChooseTrigger();",
"public void addTrigger(final PgTrigger trigger) {\n triggers.add(trigger);\n }",
"boolean isSimpleTrigger();",
"TriggerPositionType getTriggerPositionType();",
"public ClearTriggerResponse clearTrigger(ClearTriggerRequest request) throws GPUdbException {\n ClearTriggerResponse actualResponse_ = new ClearTriggerResponse();\n submitRequest(\"/clear/trigger\", request, actualResponse_, false);\n return actualResponse_;\n }",
"public T caseReactionTrigger(ReactionTrigger object) {\r\n\t\treturn null;\r\n\t}",
"@NonNull\n public Trigger build() {\n if (UAStringUtil.isEmpty(eventName)) {\n return new Trigger(type, goal, null);\n }\n\n JsonPredicate predicate = JsonPredicate.newBuilder()\n .setPredicateType(JsonPredicate.AND_PREDICATE_TYPE)\n .addMatcher(JsonMatcher.newBuilder()\n .setKey(CustomEvent.EVENT_NAME)\n .setValueMatcher(ValueMatcher.newValueMatcher(JsonValue.wrap(eventName)))\n .build())\n .build();\n return new Trigger(type, goal, predicate);\n }",
"public boolean triggersNow()\n\t{\n\t\tif(!this.canTrigger())\n\t\t\treturn false;\n\n\t\tfor(GameObject object: this.game.actualState.stack())\n\t\t\tif(object instanceof StateTriggeredAbility)\n\t\t\t\tif(((StateTriggeredAbility)object).printedVersionID == this.ID)\n\t\t\t\t\treturn false;\n\n\t\tIdentified source = this.getSource(this.state);\n\t\tint controller;\n\t\tif(source.isGameObject())\n\t\t\tcontroller = ((GameObject)source).controllerID;\n\t\telse\n\t\t\t// it's a player\n\t\t\tcontroller = source.ID;\n\t\tfor(GameObject object: this.game.actualState.waitingTriggers.get(controller))\n\t\t\tif((object instanceof StateTriggeredAbility) && (((StateTriggeredAbility)object).printedVersionID == this.ID))\n\t\t\t\treturn false;\n\n\t\tfor(SetGenerator condition: this.triggerConditions)\n\t\t\tif(!condition.evaluate(this.game, this).isEmpty())\n\t\t\t\treturn true;\n\n\t\treturn false;\n\t}",
"public void fireTurret() {\n\t\tif(!getCreator().hasEffect(\"TurretEffect\")) {\n\t\t\treturn;\n\t\t}\n\t\t//Fire based on what is ordained within the hero's current TurretEffect\n\t\tTurretEffect tE = (TurretEffect)getCreator().getEffect(\"TurretEffect\");\n\t\tTurretFireWrapper fW = tE.getFireFunctionWrapper();\n\t\tif(fW == null) {\n\t\t\treturn; //No active mode selected, so we just exit out. Note that this means that turrets will always fire based on the last active effect\n\t\t}\n\t\tfW.fire(getCreator(), getLoc(),range);\n\t\treturn;\n\t}",
"public static String getTriggerField(){\n return WHAT_IS_THE_SOURCE_OF_FUNDS.getFieldNameValue();\n }",
"public boolean getTrigger(){\n \treturn !trigger.get();\n }",
"public interface TriggerAction {\n\t\tpublic void click();\n\t}",
"@Override\n\tpublic Condition getGoal()\n\t{\n\t\treturn explicitGoal;\n\t}",
"public boolean isDoneFlgTrue() {\n HangarCDef.Flg cdef = getDoneFlgAsFlg();\n return cdef != null ? cdef.equals(HangarCDef.Flg.True) : false;\n }",
"public ForwardChainExpectation when(RequestDefinition requestDefinition) {\n return when(requestDefinition, Times.unlimited());\n }",
"public void trigger(Event event);",
"private boolean giveTriggerTool(Player player, String command) {\n if (player.getInventory().getItemInMainHand().getAmount() == 0) {\n ItemStack st = new ItemStack(Material.STICK);\n ItemMeta meta = st.getItemMeta();\n meta.setDisplayName(\"Trigger Creation Tool\");\n meta.setLore(Arrays.asList(\"Commandss:\", command));\n st.setItemMeta(meta);\n player.getInventory().setItemInMainHand(st);\n\n CommandTrigger ct = new CommandTrigger(command);\n this.hasTool.put(player.getUniqueId(), ct);\n return true;\n }\n return false;\n }",
"public void setDoneFlgAsFlg(HangarCDef.Flg cdef) {\n setDoneFlg(cdef != null ? Boolean.valueOf(cdef.code()) : null);\n }",
"public com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition addNewAutoForwardTriggeredSend()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition target = null;\n target = (com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition)get_store().add_element_user(AUTOFORWARDTRIGGEREDSEND$16);\n return target;\n }\n }",
"protected abstract void createTriggerOrAction();",
"public boolean isFire(Point3d position){\r\n\t\tBlockPos pos = new BlockPos(position.x, position.y, position.z);\r\n\t\tIBlockState state = world.getBlockState(pos); \r\n\t\treturn state.getMaterial().equals(Material.FIRE);\r\n\t}",
"@Override\n public List<TriggerAction> getRequiredAfterTriggers(SwccgGame game, EffectResult effectResult, final PhysicalCard self) {\n List<TriggerAction> actions = super.getRequiredAfterTriggers(game, effectResult, self);\n String playerId = self.getOwner();\n\n // Creatures attack a non-creature if they are present with a valid target at end of owner's battle phase\n // (unless parasite is attached to a host)\n if (TriggerConditions.isEndOfYourPhase(game, effectResult, Phase.BATTLE, playerId)\n && !GameConditions.isDuringAttack(game)\n && !GameConditions.isDuringBattle(game)\n && self.getAttachedTo() == null) {\n GameState gameState = game.getGameState();\n ModifiersQuerying modifiersQuerying = game.getModifiersQuerying();\n if (!modifiersQuerying.hasParticipatedInAttackOnNonCreatureThisTurn(self)) {\n PhysicalCard location = modifiersQuerying.getLocationThatCardIsPresentAt(gameState, self);\n if (location != null) {\n if (!modifiersQuerying.mayNotInitiateAttacksAtLocation(gameState, location, playerId)\n && GameConditions.canSpot(game, self, SpotOverride.INCLUDE_ALL, Filters.nonCreatureCanBeAttackedByCreature(self, false))) {\n actions.add(new InitiateAttackNonCreatureAction(self));\n }\n }\n }\n }\n\n // Check condition(s)\n PhysicalCard host = self.getAttachedTo();\n if (host != null && TriggerConditions.justEatenBy(game, effectResult, host, Filters.any)) {\n\n final RequiredGameTextTriggerAction action = new RequiredGameTextTriggerAction(self, self.getCardId());\n action.setText(\"Detach from host\");\n action.setActionMsg(\"Detach \" + GameUtils.getCardLink(self) + \" from \" + GameUtils.getCardLink(host));\n // Perform result(s)\n action.appendEffect(\n new DetachParasiteEffect(action, self));\n actions.add(action);\n }\n\n return actions;\n }",
"boolean hasInitialPromptFulfillment();",
"@Override\n\tpublic Object Execute() {\n\t\tCCMLogDiff target = (CCMLogDiff) this.facet.getTarget();\n\t\tString parameter = this.facet.getParameters()[0].toString();\n\n\t\tString behaviorName = this.facet.getBehaviorName();\n\t\tif (behaviorName == null) {\n\t\t\tbehaviorName = SystemConstants.BEHAVIOR_CLICK;\n\t\t}\n\t\tswitch (behaviorName.toLowerCase()) {\n\t\tcase CustomizedBehaviorConstants.LOG_IS_CHANGED:\n\t\t\treturn target.isChanged();\n\t\tdefault:\n\t\t\treturn super.Execute();\n\t\t}\n\t}",
"private static void doEffect(Thing caster, Thing spell, Thing target) {\r\n \t\tint magicSkill=Spell.calcMagicSkill(caster,spell);\r\n \t\tint magicDefence=Spell.calcAntiMagic(target);\r\n \t\tint magicPower=Spell.calcMagicPower(caster,spell);\r\n \t\t\r\n \t\t// work out whether spell is effective\r\n \t\tboolean effective=true;\r\n \t\tboolean visible=target.isVisible(Game.hero());\r\n \t\tif ((magicDefence>0)&&spell.getStat(\"SpellUsage\")==Spell.SPELL_OFFENCE) {\r\n \t\t\tmagicSkill+=magicPower/5;\r\n \t\t\tGame.warn(\"Magic test: \"+magicSkill+\" vs. \"+magicDefence);\r\n \t\t\t\r\n \t\t\teffective=magicSkill>=(magicDefence*RPG.luckRandom(caster,target));\r\n \t\t}\r\n \t\t\r\n \t\tif ((caster!=null)&&target.getFlag(\"IsBeing\")&&(spell.getStat(\"SpellUsage\")==Spell.SPELL_OFFENCE)) {\r\n \t\t\tAI.notifyAttack(target,caster);\r\n \t\t}\r\n \t\t\r\n \t\tString hitname=spell.getString(\"HitName\");\r\n \t\tif (effective){\r\n \t\t\tif (hitname!=null) target.message(\"You are hit by the \"+hitname);\r\n \t\t\tEvent e=new Event(\"Effect\");\r\n \t\t\te.set(\"Strength\",magicPower);\r\n \t\t\te.set(\"Caster\",caster);\r\n \t\t\te.set(\"Target\",target);\r\n \t\t\tspell.handle(e);\r\n \t\t} else {\r\n \t\t\tif (visible) Game.message(target.getTheName()+\" \"+target.verb(\"resist\")+\" the \"+hitname);\r\n \t\t}\r\n \t}",
"@java.lang.Override\n public com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior getFillBehavior() {\n return fillBehavior_ == null\n ? com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.getDefaultInstance()\n : fillBehavior_;\n }",
"public void setTarget(String target) {\n this.target = target;\n }",
"@java.lang.Override\n public com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehaviorOrBuilder\n getFillBehaviorOrBuilder() {\n return fillBehavior_ == null\n ? com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.getDefaultInstance()\n : fillBehavior_;\n }",
"public final EObject ruleETriggerDefinition() throws RecognitionException {\n EObject current = null;\n\n Token lv_name_0_0=null;\n Token otherlv_1=null;\n Token this_BEGIN_2=null;\n Token this_END_4=null;\n EObject lv_trigger_3_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalRMParser.g:2138:2: ( ( ( (lv_name_0_0= RULE_QUALIFIED_NAME ) ) otherlv_1= Colon this_BEGIN_2= RULE_BEGIN ( (lv_trigger_3_0= ruleETriggerDefinitionBody ) ) this_END_4= RULE_END ) )\n // InternalRMParser.g:2139:2: ( ( (lv_name_0_0= RULE_QUALIFIED_NAME ) ) otherlv_1= Colon this_BEGIN_2= RULE_BEGIN ( (lv_trigger_3_0= ruleETriggerDefinitionBody ) ) this_END_4= RULE_END )\n {\n // InternalRMParser.g:2139:2: ( ( (lv_name_0_0= RULE_QUALIFIED_NAME ) ) otherlv_1= Colon this_BEGIN_2= RULE_BEGIN ( (lv_trigger_3_0= ruleETriggerDefinitionBody ) ) this_END_4= RULE_END )\n // InternalRMParser.g:2140:3: ( (lv_name_0_0= RULE_QUALIFIED_NAME ) ) otherlv_1= Colon this_BEGIN_2= RULE_BEGIN ( (lv_trigger_3_0= ruleETriggerDefinitionBody ) ) this_END_4= RULE_END\n {\n // InternalRMParser.g:2140:3: ( (lv_name_0_0= RULE_QUALIFIED_NAME ) )\n // InternalRMParser.g:2141:4: (lv_name_0_0= RULE_QUALIFIED_NAME )\n {\n // InternalRMParser.g:2141:4: (lv_name_0_0= RULE_QUALIFIED_NAME )\n // InternalRMParser.g:2142:5: lv_name_0_0= RULE_QUALIFIED_NAME\n {\n lv_name_0_0=(Token)match(input,RULE_QUALIFIED_NAME,FOLLOW_11); \n\n \t\t\t\t\tnewLeafNode(lv_name_0_0, grammarAccess.getETriggerDefinitionAccess().getNameQUALIFIED_NAMETerminalRuleCall_0_0());\n \t\t\t\t\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getETriggerDefinitionRule());\n \t\t\t\t\t}\n \t\t\t\t\tsetWithLastConsumed(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"name\",\n \t\t\t\t\t\tlv_name_0_0,\n \t\t\t\t\t\t\"org.sodalite.dsl.RM.QUALIFIED_NAME\");\n \t\t\t\t\n\n }\n\n\n }\n\n otherlv_1=(Token)match(input,Colon,FOLLOW_6); \n\n \t\t\tnewLeafNode(otherlv_1, grammarAccess.getETriggerDefinitionAccess().getColonKeyword_1());\n \t\t\n this_BEGIN_2=(Token)match(input,RULE_BEGIN,FOLLOW_31); \n\n \t\t\tnewLeafNode(this_BEGIN_2, grammarAccess.getETriggerDefinitionAccess().getBEGINTerminalRuleCall_2());\n \t\t\n // InternalRMParser.g:2166:3: ( (lv_trigger_3_0= ruleETriggerDefinitionBody ) )\n // InternalRMParser.g:2167:4: (lv_trigger_3_0= ruleETriggerDefinitionBody )\n {\n // InternalRMParser.g:2167:4: (lv_trigger_3_0= ruleETriggerDefinitionBody )\n // InternalRMParser.g:2168:5: lv_trigger_3_0= ruleETriggerDefinitionBody\n {\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getETriggerDefinitionAccess().getTriggerETriggerDefinitionBodyParserRuleCall_3_0());\n \t\t\t\t\n pushFollow(FOLLOW_8);\n lv_trigger_3_0=ruleETriggerDefinitionBody();\n\n state._fsp--;\n\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getETriggerDefinitionRule());\n \t\t\t\t\t}\n \t\t\t\t\tset(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"trigger\",\n \t\t\t\t\t\tlv_trigger_3_0,\n \t\t\t\t\t\t\"org.sodalite.dsl.RM.ETriggerDefinitionBody\");\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n\n }\n\n\n }\n\n this_END_4=(Token)match(input,RULE_END,FOLLOW_2); \n\n \t\t\tnewLeafNode(this_END_4, grammarAccess.getETriggerDefinitionAccess().getENDTerminalRuleCall_4());\n \t\t\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public void setTarget(Vector3f target) \n {\n float distance = FastMath.abs(target.y - this.getPosition().y);\n this.motionTarget = target;\n this.motionPath = new MotionPath();\n \n this.motionPath.addWayPoint(this.getPosition());\n\n this.motionPath.addWayPoint(new Vector3f(this.getPosition().x, target.y, this.getPosition().z));\n \n grabberMotion = new MotionEvent(this.node, this.motionPath);\n grabberMotion.setInitialDuration(distance / this.speed);\n }",
"private TrackingResult followTarget(Rect target)\n\t{\n\t\t// Clear any existing target rectangle.\n\t\tcamera.addTarget(null);\n\t\t\n\t\t// Outline the target being tracked.\n\t\tcamera.addTarget(target);\n\t\t\n\t\t// This is field of view size.\n\t\tSize imageSize = camera.getImageSize();\n\t\t\n\t\t// get size of target outline area.\n\t\tint targetArea = target.height * target.width;\n\t\t\n\t\t// If we have just acquired target, record initial size. Size comparison\n\t\t// is how we determine distance to target.\n\t\t\n\t\tif (initialTargetArea == 0) initialTargetArea = targetArea;\n\t\t\n\t\t// Compute center point of target in the camera view image.\n\t\tint targetCenterX = target.x + target.width / 2;\n\t\tint imageCenterX = (int) (imageSize.width / 2);\n\t\t\n\t\t// offset minus indicates target is left of image center,\n\t\t// plus to the right. If target is left, drone needs to turn\n\t\t// left to center the target in the image which is a minus yaw value.\n\t\t\n\t\tint offset = targetCenterX - imageCenterX;\n\n\t\tlogger.fine(\"offset=\" + offset);\n\t\t\n\t\toffset *= .25;\t// Scale offset down;\n\t\t\n\t\t// Determine change in distance from last target acquisition.\n\t\t\n\t\tdouble distance = initialTargetArea - targetArea;\n\t\t\n\t\tlogger.fine(String.format(\"ia=%d ta=%d dist=%.0f\", initialTargetArea, targetArea, distance));\n\t\t\n\t\t//initialTargetArea = targetArea;\n\t\t\n\t\tdouble scaleFactor = 0.0;\n\t\t\n\t\t// If distance is small, call it good otherwise the drone\n\t\t// hunts back and forth. Value must be determined by testing.\n\t\t\n\t\tif (Math.abs(distance) < 2000.0) \n\t\t\tdistance = 0.0;\n\t\telse\n\t\t{\n\t\t\t// Scale distance change to a fwd/back movement value of 20% for flyRC command.\n\t\t\t// For some unknown reason, need more power to fly forward than back and even\n\t\t\t// with 30%, forward seems not reliable.\n\t\t\t// scaleFactor must be positive to preserve the sign of distance value.\n\t\t\t\n\t\t\tscaleFactor = 20.0 / Math.abs(distance);\n\t\t\n\t\t\tdistance = distance * scaleFactor;\n\t\t}\n\t\t\n\t\tlogger.fine(String.format(\"dist=%.1f fact=%f\", distance, scaleFactor));\n\t\t\n\t\treturn new TrackingResult(offset, (int) distance);\n\t}",
"public void setDoneFlg_True() {\n setDoneFlgAsFlg(HangarCDef.Flg.True);\n }",
"public void trigger(PromiseManager pm) {\n\tthrow new SubclassResponsibilityException();\n/*\nudanax-top.st:15949:DetectorEvent methodsFor: 'triggering'!\n{void} trigger: pm {PromiseManager}\n\t\"Send the message across the wire.\"\n\t\n\tself subclassResponsibility!\n*/\n}",
"public RetriggerMode getRetriggerMode();",
"@Override\n public boolean resolve(Player player, PlayerSkills data, DynamicSkill skill, Target target, List<LivingEntity> targets) {\n\n // Requires a target\n if (targets.size() == 0) {\n return false;\n }\n\n DOTHelper helper = data.getAPI().getDOTHelper();\n int level = data.getSkillLevel(skill.getName());\n double damage = skill.getAttribute(DAMAGE, target, level);\n int duration = (int)(skill.getAttribute(DURATION, target, level) * 20);\n int frequency = (int)(skill.getAttribute(FREQUENCY, target, level) * 20);\n boolean lethal = skill.getValue(LETHAL) != 1;\n\n // Apply a DOT to all targets\n for (LivingEntity entity : targets) {\n DOTSet set = helper.getDOTSet(entity);\n set.addEffect(skill.getName(), new DOT(skill, player, duration, damage, frequency, lethal));\n }\n\n return true;\n }",
"@Test\n public void testDuplicateConditionsAndFulfillments() {\n final ThresholdSha256Condition condition = ThresholdSha256Condition.from(\n 2, Lists\n .newArrayList(subcondition1, subcondition1, subcondition2, subcondition3)\n );\n\n // Escrow Only (insufficient)\n ThresholdSha256Fulfillment fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition2, subcondition3),\n Lists.newArrayList(subfulfillment1)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(false));\n\n // Escrow Only (sufficient)\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition2, subcondition3),\n Lists.newArrayList(subfulfillment1, subfulfillment1)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Escrow+Party2\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition3),\n Lists.newArrayList(subfulfillment1, subfulfillment2)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Escrow+Party3\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition2),\n Lists.newArrayList(subfulfillment1, subfulfillment3)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Party2+Party3\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition1),\n Lists.newArrayList(subfulfillment2, subfulfillment3)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Party2+Party3 (w\\o escrow condition)\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(),\n Lists.newArrayList(subfulfillment2, subfulfillment3)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(false));\n }",
"boolean containsTrigger(String sTriggerName);",
"public String getCorporateLoanFulfillmentArrangementUpdateActionTaskReference() {\n return corporateLoanFulfillmentArrangementUpdateActionTaskReference;\n }",
"public void turnAbsolute(int target)\n {\n int heading = 360 - mrGyro.getHeading(); //Set variables to gyro readings\n double turnSpeed = 0.15;\n\n while (Math.abs(heading - target) > 45)\n { //Continue while the robot direction is further than three degrees from the target\n if (heading > target) //if gyro is positive, we will turn right\n {\n movePower(\"left\", 0.5, 0.01);\n }\n\n if (heading < target)\n {\n movePower(\"right\", 0.5, 0.01);\n }\n heading = 360 - mrGyro.getHeading(); //Set variables to gyro readings\n telemetry.addData(\"heading\", String.format(\"%03d\", heading));\n telemetry.update();\n }\n while (Math.abs(heading - target) > 10)\n { //Continue while the robot direction is further than three degrees from the target\n if (heading > target) //if gyro is positive, we will turn right\n {\n movePower(\"left\", 0.1, 0.01);\n }\n\n if (heading < target)\n {\n movePower(\"right\", 0.1, 0.01);\n }\n heading = 360 - mrGyro.getHeading(); //Set variables to gyro readings\n telemetry.addData(\"heading\", String.format(\"%03d\", heading));\n telemetry.update();\n }\n while (Math.abs(heading - target) > 5)\n { //Continue while the robot direction is further than three degrees from the target\n if (heading > target) //if gyro is positive, we will turn right\n {\n movePower(\"left\", 0.01, 0.01);\n }\n\n if (heading < target)\n {\n movePower(\"right\", 0.01, 0.01);\n }\n heading = 360 - mrGyro.getHeading(); //Set variables to gyro readings\n telemetry.addData(\"heading\", String.format(\"%03d\", heading));\n telemetry.update();\n }\n stop();\n }",
"@When(\"^I check whether to show a notification for WOF$\")\n public void i_check_whether_to_show_a_notification_for_WOF() throws Throwable {\n result = car.showWofNotification();\n }",
"public interface EnchantmentTrigger {}"
]
| [
"0.775372",
"0.75121325",
"0.55707115",
"0.50222677",
"0.48693854",
"0.48582926",
"0.48277166",
"0.4808744",
"0.47890952",
"0.47827345",
"0.46985054",
"0.46968833",
"0.46882838",
"0.4663628",
"0.4650023",
"0.45663157",
"0.45433",
"0.45127606",
"0.44884115",
"0.4483764",
"0.44701374",
"0.44672236",
"0.4459278",
"0.44356757",
"0.43902326",
"0.4387245",
"0.43829104",
"0.4358015",
"0.43448642",
"0.4339863",
"0.43345842",
"0.4326907",
"0.43256736",
"0.42955342",
"0.42889023",
"0.42746642",
"0.42482704",
"0.42455578",
"0.42392904",
"0.42337307",
"0.42316407",
"0.42193338",
"0.42094165",
"0.4182783",
"0.418246",
"0.41436604",
"0.41339433",
"0.41069952",
"0.41026205",
"0.40816694",
"0.40816188",
"0.40709049",
"0.4066417",
"0.40641317",
"0.4062964",
"0.40617028",
"0.40487826",
"0.404336",
"0.40329129",
"0.40328044",
"0.40161625",
"0.40151092",
"0.39834958",
"0.3975193",
"0.39596716",
"0.39553332",
"0.39480492",
"0.39456502",
"0.39448535",
"0.3937029",
"0.39246023",
"0.392369",
"0.39083064",
"0.389662",
"0.38915282",
"0.38834554",
"0.38790876",
"0.38777685",
"0.38754904",
"0.38683456",
"0.38652307",
"0.38617373",
"0.3861251",
"0.38494387",
"0.38458836",
"0.3841436",
"0.38405192",
"0.3832105",
"0.38262448",
"0.38148594",
"0.38090453",
"0.3808761",
"0.38013977",
"0.37993616",
"0.3798686",
"0.37964934",
"0.37957466",
"0.37902495",
"0.3789435",
"0.3789253"
]
| 0.6390022 | 2 |
The fulfillment to call when the condition is satisfied. At least one of `trigger_fulfillment` and `target` must be specified. When both are defined, `trigger_fulfillment` is executed first. .google.cloud.dialogflow.cx.v3beta1.Fulfillment trigger_fulfillment = 3; | com.google.cloud.dialogflow.cx.v3beta1.Fulfillment getTriggerFulfillment(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"com.google.cloud.dialogflow.cx.v3beta1.FulfillmentOrBuilder getTriggerFulfillmentOrBuilder();",
"boolean hasTriggerFulfillment();",
"public Builder setInitialPromptFulfillment(\n com.google.cloud.dialogflow.cx.v3beta1.Fulfillment value) {\n if (initialPromptFulfillmentBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n initialPromptFulfillment_ = value;\n } else {\n initialPromptFulfillmentBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000001;\n onChanged();\n return this;\n }",
"com.google.cloud.dialogflow.cx.v3beta1.Fulfillment getInitialPromptFulfillment();",
"public com.google.cloud.dialogflow.cx.v3beta1.Fulfillment getInitialPromptFulfillment() {\n if (initialPromptFulfillmentBuilder_ == null) {\n return initialPromptFulfillment_ == null\n ? com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.getDefaultInstance()\n : initialPromptFulfillment_;\n } else {\n return initialPromptFulfillmentBuilder_.getMessage();\n }\n }",
"com.google.cloud.dialogflow.cx.v3beta1.FulfillmentOrBuilder\n getInitialPromptFulfillmentOrBuilder();",
"public String getFulfillmentChannel() {\r\n return fulfillmentChannel;\r\n }",
"@java.lang.Override\n public com.google.cloud.dialogflow.cx.v3beta1.Fulfillment getInitialPromptFulfillment() {\n return initialPromptFulfillment_ == null\n ? com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.getDefaultInstance()\n : initialPromptFulfillment_;\n }",
"public Builder mergeInitialPromptFulfillment(\n com.google.cloud.dialogflow.cx.v3beta1.Fulfillment value) {\n if (initialPromptFulfillmentBuilder_ == null) {\n if (((bitField0_ & 0x00000001) != 0)\n && initialPromptFulfillment_ != null\n && initialPromptFulfillment_\n != com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.getDefaultInstance()) {\n getInitialPromptFulfillmentBuilder().mergeFrom(value);\n } else {\n initialPromptFulfillment_ = value;\n }\n } else {\n initialPromptFulfillmentBuilder_.mergeFrom(value);\n }\n bitField0_ |= 0x00000001;\n onChanged();\n return this;\n }",
"public void setFulfillmentChannel(String fulfillmentChannel) {\r\n this.fulfillmentChannel = fulfillmentChannel;\r\n }",
"private com.google.protobuf.SingleFieldBuilderV3<\n com.google.cloud.dialogflow.cx.v3beta1.Fulfillment,\n com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.Builder,\n com.google.cloud.dialogflow.cx.v3beta1.FulfillmentOrBuilder>\n getInitialPromptFulfillmentFieldBuilder() {\n if (initialPromptFulfillmentBuilder_ == null) {\n initialPromptFulfillmentBuilder_ =\n new com.google.protobuf.SingleFieldBuilderV3<\n com.google.cloud.dialogflow.cx.v3beta1.Fulfillment,\n com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.Builder,\n com.google.cloud.dialogflow.cx.v3beta1.FulfillmentOrBuilder>(\n getInitialPromptFulfillment(), getParentForChildren(), isClean());\n initialPromptFulfillment_ = null;\n }\n return initialPromptFulfillmentBuilder_;\n }",
"public Trigger getTrigger() {\n \t\treturn trigger;\n \t}",
"pb4server.FireFightAskReqOrBuilder getFireFightAskReqOrBuilder();",
"TriggeringStatement getTriggeringStatement();",
"public void trigger(List<Entity> _trigger){\n\t\tif(event!=null){\n\t\t\tevent.activate(System.currentTimeMillis(), _trigger);\n\t\t}\n\t}",
"@NonNull\n public ScreenTriggerBuilder setGoal(double goal) {\n this.goal = goal;\n return this;\n }",
"public com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition getAutoForwardTriggeredSend()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition target = null;\n target = (com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition)get_store().find_element_user(AUTOFORWARDTRIGGEREDSEND$16, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public void trigger(Fact fact) {\n\t\t\n\t}",
"public void setTrigger(Trigger trigger) {\n \t\tthis.trigger = trigger;\n \t\tif (this.trigger == null)\n \t\t\tthis.trigger = Trigger.NONE;\n \t}",
"public com.google.cloud.dialogflow.cx.v3beta1.FulfillmentOrBuilder\n getInitialPromptFulfillmentOrBuilder() {\n if (initialPromptFulfillmentBuilder_ != null) {\n return initialPromptFulfillmentBuilder_.getMessageOrBuilder();\n } else {\n return initialPromptFulfillment_ == null\n ? com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.getDefaultInstance()\n : initialPromptFulfillment_;\n }\n }",
"public Builder setInitialPromptFulfillment(\n com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.Builder builderForValue) {\n if (initialPromptFulfillmentBuilder_ == null) {\n initialPromptFulfillment_ = builderForValue.build();\n } else {\n initialPromptFulfillmentBuilder_.setMessage(builderForValue.build());\n }\n bitField0_ |= 0x00000001;\n onChanged();\n return this;\n }",
"public static boolean getTrigger() {\n\t\treturn true;\r\n\t}",
"@Property(\"triggerAction\")\n void setTriggerAction(String triggerAction);",
"public void setFullfillment(int fullfillment) {\r\n this.fullfillment = fullfillment;\r\n }",
"public com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition getAutoReplyTriggeredSend()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition target = null;\n target = (com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition)get_store().find_element_user(AUTOREPLYTRIGGEREDSEND$20, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"protected void sequence_AT_DEFINE_DefinitionTrigger_TRIGGER(ISerializationContext context, DefinitionTrigger semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}",
"public void setAutoForwardTriggeredSend(com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition autoForwardTriggeredSend)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition target = null;\n target = (com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition)get_store().find_element_user(AUTOFORWARDTRIGGEREDSEND$16, 0);\n if (target == null)\n {\n target = (com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition)get_store().add_element_user(AUTOFORWARDTRIGGEREDSEND$16);\n }\n target.set(autoForwardTriggeredSend);\n }\n }",
"public abstract void setTriggerOrAction();",
"public boolean isSetFulfillmentChannel() {\r\n return fulfillmentChannel != null;\r\n }",
"public abstract void onTrigger();",
"public Builder setFillBehavior(\n com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior value) {\n if (fillBehaviorBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n fillBehavior_ = value;\n } else {\n fillBehaviorBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000010;\n onChanged();\n return this;\n }",
"public JWSSignerOption getTriggeringOption() {\n\t\treturn option;\n\t}",
"@java.lang.Override\n public com.google.cloud.dialogflow.cx.v3beta1.FulfillmentOrBuilder\n getInitialPromptFulfillmentOrBuilder() {\n return initialPromptFulfillment_ == null\n ? com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.getDefaultInstance()\n : initialPromptFulfillment_;\n }",
"public void setFulfillmentUpdatesSpecification(FulfillmentUpdatesSpecification fulfillmentUpdatesSpecification) {\n this.fulfillmentUpdatesSpecification = fulfillmentUpdatesSpecification;\n }",
"@Property(\"triggerAction\")\n String getTriggerAction();",
"@NonNull\n public LifeCycleTriggerBuilder setGoal(double goal) {\n this.goal = goal;\n return this;\n }",
"@NonNull\n public RegionTriggerBuilder setGoal(double goal) {\n this.goal = goal;\n return this;\n }",
"public boolean trigger (String name) {\n final TriggerReference trigger = module.getTrigger(name);\n if (trigger == null) {\n Logger.missing(\"TriggerReference\", name);\n return false;\n } else {\n return trigger.get();\n }\n }",
"@NonNull\n public Trigger build() {\n return new Trigger(type, goal, null);\n }",
"public com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.Builder\n getInitialPromptFulfillmentBuilder() {\n bitField0_ |= 0x00000001;\n onChanged();\n return getInitialPromptFulfillmentFieldBuilder().getBuilder();\n }",
"public abstract boolean isTrigger();",
"private com.google.protobuf.SingleFieldBuilderV3<\n com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior,\n com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.Builder,\n com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehaviorOrBuilder>\n getFillBehaviorFieldBuilder() {\n if (fillBehaviorBuilder_ == null) {\n fillBehaviorBuilder_ =\n new com.google.protobuf.SingleFieldBuilderV3<\n com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior,\n com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.Builder,\n com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehaviorOrBuilder>(\n getFillBehavior(), getParentForChildren(), isClean());\n fillBehavior_ = null;\n }\n return fillBehaviorBuilder_;\n }",
"public com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior getFillBehavior() {\n if (fillBehaviorBuilder_ == null) {\n return fillBehavior_ == null\n ? com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior\n .getDefaultInstance()\n : fillBehavior_;\n } else {\n return fillBehaviorBuilder_.getMessage();\n }\n }",
"ITrigger getTrigger(String sTriggerName);",
"public TriggerAccess getTrigger () {\n return this.trigger;\n }",
"public void executeTrigger(Object object);",
"public PayWithAmazonEvent withFulfillmentChannel(String fulfillmentChannel) {\r\n this.fulfillmentChannel = fulfillmentChannel;\r\n return this;\r\n }",
"public final EObject ruleTrigger() throws RecognitionException {\n EObject current = null;\n int ruleTrigger_StartIndex = input.index();\n Token otherlv_0=null;\n Token otherlv_1=null;\n Token otherlv_3=null;\n Token otherlv_5=null;\n Token otherlv_6=null;\n Token otherlv_8=null;\n Token otherlv_9=null;\n Token otherlv_11=null;\n EObject lv_triggerRules_2_0 = null;\n\n EObject lv_triggerRules_4_0 = null;\n\n EObject lv_with_7_0 = null;\n\n EObject lv_when_10_0 = null;\n\n\n enterRule(); \n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 20) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1350:28: ( (otherlv_0= KEYWORD_82 otherlv_1= KEYWORD_4 ( (lv_triggerRules_2_0= ruleQualifiedRuleReference ) ) (otherlv_3= KEYWORD_8 ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) ) )* otherlv_5= KEYWORD_5 (otherlv_6= KEYWORD_58 ( (lv_with_7_0= ruleBlock ) ) )? (otherlv_8= KEYWORD_57 otherlv_9= KEYWORD_4 ( (lv_when_10_0= ruleExpression ) ) otherlv_11= KEYWORD_5 )? ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1351:1: (otherlv_0= KEYWORD_82 otherlv_1= KEYWORD_4 ( (lv_triggerRules_2_0= ruleQualifiedRuleReference ) ) (otherlv_3= KEYWORD_8 ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) ) )* otherlv_5= KEYWORD_5 (otherlv_6= KEYWORD_58 ( (lv_with_7_0= ruleBlock ) ) )? (otherlv_8= KEYWORD_57 otherlv_9= KEYWORD_4 ( (lv_when_10_0= ruleExpression ) ) otherlv_11= KEYWORD_5 )? )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1351:1: (otherlv_0= KEYWORD_82 otherlv_1= KEYWORD_4 ( (lv_triggerRules_2_0= ruleQualifiedRuleReference ) ) (otherlv_3= KEYWORD_8 ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) ) )* otherlv_5= KEYWORD_5 (otherlv_6= KEYWORD_58 ( (lv_with_7_0= ruleBlock ) ) )? (otherlv_8= KEYWORD_57 otherlv_9= KEYWORD_4 ( (lv_when_10_0= ruleExpression ) ) otherlv_11= KEYWORD_5 )? )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1352:2: otherlv_0= KEYWORD_82 otherlv_1= KEYWORD_4 ( (lv_triggerRules_2_0= ruleQualifiedRuleReference ) ) (otherlv_3= KEYWORD_8 ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) ) )* otherlv_5= KEYWORD_5 (otherlv_6= KEYWORD_58 ( (lv_with_7_0= ruleBlock ) ) )? (otherlv_8= KEYWORD_57 otherlv_9= KEYWORD_4 ( (lv_when_10_0= ruleExpression ) ) otherlv_11= KEYWORD_5 )?\n {\n otherlv_0=(Token)match(input,KEYWORD_82,FOLLOW_KEYWORD_82_in_ruleTrigger2463); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_0, grammarAccess.getTriggerAccess().getTriggerKeyword_0());\n \n }\n otherlv_1=(Token)match(input,KEYWORD_4,FOLLOW_KEYWORD_4_in_ruleTrigger2475); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_1, grammarAccess.getTriggerAccess().getLeftParenthesisKeyword_1());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1361:1: ( (lv_triggerRules_2_0= ruleQualifiedRuleReference ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1362:1: (lv_triggerRules_2_0= ruleQualifiedRuleReference )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1362:1: (lv_triggerRules_2_0= ruleQualifiedRuleReference )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1363:3: lv_triggerRules_2_0= ruleQualifiedRuleReference\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getTriggerAccess().getTriggerRulesQualifiedRuleReferenceParserRuleCall_2_0()); \n \t \n }\n pushFollow(FOLLOW_ruleQualifiedRuleReference_in_ruleTrigger2495);\n lv_triggerRules_2_0=ruleQualifiedRuleReference();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getTriggerRule());\n \t }\n \t\tadd(\n \t\t\tcurrent, \n \t\t\t\"triggerRules\",\n \t\tlv_triggerRules_2_0, \n \t\t\"QualifiedRuleReference\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1379:2: (otherlv_3= KEYWORD_8 ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) ) )*\n loop35:\n do {\n int alt35=2;\n int LA35_0 = input.LA(1);\n\n if ( (LA35_0==KEYWORD_8) ) {\n alt35=1;\n }\n\n\n switch (alt35) {\n \tcase 1 :\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1380:2: otherlv_3= KEYWORD_8 ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) )\n \t {\n \t otherlv_3=(Token)match(input,KEYWORD_8,FOLLOW_KEYWORD_8_in_ruleTrigger2509); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \tnewLeafNode(otherlv_3, grammarAccess.getTriggerAccess().getCommaKeyword_3_0());\n \t \n \t }\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1384:1: ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) )\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1385:1: (lv_triggerRules_4_0= ruleQualifiedRuleReference )\n \t {\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1385:1: (lv_triggerRules_4_0= ruleQualifiedRuleReference )\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1386:3: lv_triggerRules_4_0= ruleQualifiedRuleReference\n \t {\n \t if ( state.backtracking==0 ) {\n \t \n \t \t newCompositeNode(grammarAccess.getTriggerAccess().getTriggerRulesQualifiedRuleReferenceParserRuleCall_3_1_0()); \n \t \t \n \t }\n \t pushFollow(FOLLOW_ruleQualifiedRuleReference_in_ruleTrigger2529);\n \t lv_triggerRules_4_0=ruleQualifiedRuleReference();\n\n \t state._fsp--;\n \t if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getTriggerRule());\n \t \t }\n \t \t\tadd(\n \t \t\t\tcurrent, \n \t \t\t\t\"triggerRules\",\n \t \t\tlv_triggerRules_4_0, \n \t \t\t\"QualifiedRuleReference\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n \t }\n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop35;\n }\n } while (true);\n\n otherlv_5=(Token)match(input,KEYWORD_5,FOLLOW_KEYWORD_5_in_ruleTrigger2544); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_5, grammarAccess.getTriggerAccess().getRightParenthesisKeyword_4());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1407:1: (otherlv_6= KEYWORD_58 ( (lv_with_7_0= ruleBlock ) ) )?\n int alt36=2;\n int LA36_0 = input.LA(1);\n\n if ( (LA36_0==KEYWORD_58) ) {\n alt36=1;\n }\n switch (alt36) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1408:2: otherlv_6= KEYWORD_58 ( (lv_with_7_0= ruleBlock ) )\n {\n otherlv_6=(Token)match(input,KEYWORD_58,FOLLOW_KEYWORD_58_in_ruleTrigger2557); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_6, grammarAccess.getTriggerAccess().getWithKeyword_5_0());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1412:1: ( (lv_with_7_0= ruleBlock ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1413:1: (lv_with_7_0= ruleBlock )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1413:1: (lv_with_7_0= ruleBlock )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1414:3: lv_with_7_0= ruleBlock\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getTriggerAccess().getWithBlockParserRuleCall_5_1_0()); \n \t \n }\n pushFollow(FOLLOW_ruleBlock_in_ruleTrigger2577);\n lv_with_7_0=ruleBlock();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getTriggerRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"with\",\n \t\tlv_with_7_0, \n \t\t\"Block\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n\n }\n break;\n\n }\n\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1430:4: (otherlv_8= KEYWORD_57 otherlv_9= KEYWORD_4 ( (lv_when_10_0= ruleExpression ) ) otherlv_11= KEYWORD_5 )?\n int alt37=2;\n int LA37_0 = input.LA(1);\n\n if ( (LA37_0==KEYWORD_57) ) {\n alt37=1;\n }\n switch (alt37) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1431:2: otherlv_8= KEYWORD_57 otherlv_9= KEYWORD_4 ( (lv_when_10_0= ruleExpression ) ) otherlv_11= KEYWORD_5\n {\n otherlv_8=(Token)match(input,KEYWORD_57,FOLLOW_KEYWORD_57_in_ruleTrigger2593); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_8, grammarAccess.getTriggerAccess().getWhenKeyword_6_0());\n \n }\n otherlv_9=(Token)match(input,KEYWORD_4,FOLLOW_KEYWORD_4_in_ruleTrigger2605); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_9, grammarAccess.getTriggerAccess().getLeftParenthesisKeyword_6_1());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1440:1: ( (lv_when_10_0= ruleExpression ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1441:1: (lv_when_10_0= ruleExpression )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1441:1: (lv_when_10_0= ruleExpression )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1442:3: lv_when_10_0= ruleExpression\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getTriggerAccess().getWhenExpressionParserRuleCall_6_2_0()); \n \t \n }\n pushFollow(FOLLOW_ruleExpression_in_ruleTrigger2625);\n lv_when_10_0=ruleExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getTriggerRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"when\",\n \t\tlv_when_10_0, \n \t\t\"Expression\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n otherlv_11=(Token)match(input,KEYWORD_5,FOLLOW_KEYWORD_5_in_ruleTrigger2638); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_11, grammarAccess.getTriggerAccess().getRightParenthesisKeyword_6_3());\n \n }\n\n }\n break;\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 20, ruleTrigger_StartIndex); }\n }\n return current;\n }",
"private Action refuelAt(Position target) {\n\t\tif (position.equals(target)) return new RefuelAction();\n\n\t\treturn moveTowardsPosition(target);\n\t}",
"public final EObject ruleETriggers() throws RecognitionException {\n EObject current = null;\n\n EObject lv_triggers_1_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalRMParser.g:2093:2: ( ( () ( (lv_triggers_1_0= ruleETriggerDefinition ) )* ) )\n // InternalRMParser.g:2094:2: ( () ( (lv_triggers_1_0= ruleETriggerDefinition ) )* )\n {\n // InternalRMParser.g:2094:2: ( () ( (lv_triggers_1_0= ruleETriggerDefinition ) )* )\n // InternalRMParser.g:2095:3: () ( (lv_triggers_1_0= ruleETriggerDefinition ) )*\n {\n // InternalRMParser.g:2095:3: ()\n // InternalRMParser.g:2096:4: \n {\n\n \t\t\t\tcurrent = forceCreateModelElement(\n \t\t\t\t\tgrammarAccess.getETriggersAccess().getETriggersAction_0(),\n \t\t\t\t\tcurrent);\n \t\t\t\n\n }\n\n // InternalRMParser.g:2102:3: ( (lv_triggers_1_0= ruleETriggerDefinition ) )*\n loop18:\n do {\n int alt18=2;\n int LA18_0 = input.LA(1);\n\n if ( (LA18_0==RULE_QUALIFIED_NAME) ) {\n alt18=1;\n }\n\n\n switch (alt18) {\n \tcase 1 :\n \t // InternalRMParser.g:2103:4: (lv_triggers_1_0= ruleETriggerDefinition )\n \t {\n \t // InternalRMParser.g:2103:4: (lv_triggers_1_0= ruleETriggerDefinition )\n \t // InternalRMParser.g:2104:5: lv_triggers_1_0= ruleETriggerDefinition\n \t {\n\n \t \t\t\t\t\tnewCompositeNode(grammarAccess.getETriggersAccess().getTriggersETriggerDefinitionParserRuleCall_1_0());\n \t \t\t\t\t\n \t pushFollow(FOLLOW_16);\n \t lv_triggers_1_0=ruleETriggerDefinition();\n\n \t state._fsp--;\n\n\n \t \t\t\t\t\tif (current==null) {\n \t \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getETriggersRule());\n \t \t\t\t\t\t}\n \t \t\t\t\t\tadd(\n \t \t\t\t\t\t\tcurrent,\n \t \t\t\t\t\t\t\"triggers\",\n \t \t\t\t\t\t\tlv_triggers_1_0,\n \t \t\t\t\t\t\t\"org.sodalite.dsl.RM.ETriggerDefinition\");\n \t \t\t\t\t\tafterParserOrEnumRuleCall();\n \t \t\t\t\t\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop18;\n }\n } while (true);\n\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"protected Trigger getContentAssistTrigger() {\n IBindingService service = (IBindingService) PlatformUI.getWorkbench()\n .getService(IBindingService.class);\n Trigger trigger = null;\n TriggerSequence[] sequences = service\n .getActiveBindingsFor(ContentAssistCommandAdapter.CONTENT_PROPOSAL_COMMAND);\n if (sequences.length > 0) {\n Trigger[] triggers = sequences[0].getTriggers();\n if (triggers.length > 0) {\n trigger = triggers[0];\n }\n }\n return trigger;\n }",
"public com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehaviorOrBuilder\n getFillBehaviorOrBuilder() {\n if (fillBehaviorBuilder_ != null) {\n return fillBehaviorBuilder_.getMessageOrBuilder();\n } else {\n return fillBehavior_ == null\n ? com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior\n .getDefaultInstance()\n : fillBehavior_;\n }\n }",
"public boolean conditionFulfilled();",
"public void attack(RobotReference target) {\n if (target != null) {\n turnToVector(target.getLocation());\n pointGunToVector(target.getLocation());\n setAhead(60);\n fire(3);\n\n\n }\n }",
"public FulfillmentUpdatesSpecification getFulfillmentUpdatesSpecification() {\n return this.fulfillmentUpdatesSpecification;\n }",
"void trigger(Entity e);",
"public void setAutoReplyTriggeredSend(com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition autoReplyTriggeredSend)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition target = null;\n target = (com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition)get_store().find_element_user(AUTOREPLYTRIGGEREDSEND$20, 0);\n if (target == null)\n {\n target = (com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition)get_store().add_element_user(AUTOREPLYTRIGGEREDSEND$20);\n }\n target.set(autoReplyTriggeredSend);\n }\n }",
"public void setRetriggerMode( RetriggerMode retriggerMode );",
"boolean getUserChooseTrigger();",
"public interface WMTrigger extends WorkflowDefinitionObject {\r\n WMActivity getActivity();\r\n\r\n Boolean getMatchEventObjectForCompletion();\r\n\r\n WMPostTransitionRestriction getPostTransitionRestriction();\r\n\r\n Condition getCondition();\r\n\r\n String getTitle();\r\n}",
"public void addTrigger(final PgTrigger trigger) {\n triggers.add(trigger);\n }",
"boolean isSimpleTrigger();",
"TriggerPositionType getTriggerPositionType();",
"public ClearTriggerResponse clearTrigger(ClearTriggerRequest request) throws GPUdbException {\n ClearTriggerResponse actualResponse_ = new ClearTriggerResponse();\n submitRequest(\"/clear/trigger\", request, actualResponse_, false);\n return actualResponse_;\n }",
"public T caseReactionTrigger(ReactionTrigger object) {\r\n\t\treturn null;\r\n\t}",
"@NonNull\n public Trigger build() {\n if (UAStringUtil.isEmpty(eventName)) {\n return new Trigger(type, goal, null);\n }\n\n JsonPredicate predicate = JsonPredicate.newBuilder()\n .setPredicateType(JsonPredicate.AND_PREDICATE_TYPE)\n .addMatcher(JsonMatcher.newBuilder()\n .setKey(CustomEvent.EVENT_NAME)\n .setValueMatcher(ValueMatcher.newValueMatcher(JsonValue.wrap(eventName)))\n .build())\n .build();\n return new Trigger(type, goal, predicate);\n }",
"public boolean triggersNow()\n\t{\n\t\tif(!this.canTrigger())\n\t\t\treturn false;\n\n\t\tfor(GameObject object: this.game.actualState.stack())\n\t\t\tif(object instanceof StateTriggeredAbility)\n\t\t\t\tif(((StateTriggeredAbility)object).printedVersionID == this.ID)\n\t\t\t\t\treturn false;\n\n\t\tIdentified source = this.getSource(this.state);\n\t\tint controller;\n\t\tif(source.isGameObject())\n\t\t\tcontroller = ((GameObject)source).controllerID;\n\t\telse\n\t\t\t// it's a player\n\t\t\tcontroller = source.ID;\n\t\tfor(GameObject object: this.game.actualState.waitingTriggers.get(controller))\n\t\t\tif((object instanceof StateTriggeredAbility) && (((StateTriggeredAbility)object).printedVersionID == this.ID))\n\t\t\t\treturn false;\n\n\t\tfor(SetGenerator condition: this.triggerConditions)\n\t\t\tif(!condition.evaluate(this.game, this).isEmpty())\n\t\t\t\treturn true;\n\n\t\treturn false;\n\t}",
"public static String getTriggerField(){\n return WHAT_IS_THE_SOURCE_OF_FUNDS.getFieldNameValue();\n }",
"public void fireTurret() {\n\t\tif(!getCreator().hasEffect(\"TurretEffect\")) {\n\t\t\treturn;\n\t\t}\n\t\t//Fire based on what is ordained within the hero's current TurretEffect\n\t\tTurretEffect tE = (TurretEffect)getCreator().getEffect(\"TurretEffect\");\n\t\tTurretFireWrapper fW = tE.getFireFunctionWrapper();\n\t\tif(fW == null) {\n\t\t\treturn; //No active mode selected, so we just exit out. Note that this means that turrets will always fire based on the last active effect\n\t\t}\n\t\tfW.fire(getCreator(), getLoc(),range);\n\t\treturn;\n\t}",
"public boolean getTrigger(){\n \treturn !trigger.get();\n }",
"public interface TriggerAction {\n\t\tpublic void click();\n\t}",
"@Override\n\tpublic Condition getGoal()\n\t{\n\t\treturn explicitGoal;\n\t}",
"public boolean isDoneFlgTrue() {\n HangarCDef.Flg cdef = getDoneFlgAsFlg();\n return cdef != null ? cdef.equals(HangarCDef.Flg.True) : false;\n }",
"public ForwardChainExpectation when(RequestDefinition requestDefinition) {\n return when(requestDefinition, Times.unlimited());\n }",
"public void trigger(Event event);",
"private boolean giveTriggerTool(Player player, String command) {\n if (player.getInventory().getItemInMainHand().getAmount() == 0) {\n ItemStack st = new ItemStack(Material.STICK);\n ItemMeta meta = st.getItemMeta();\n meta.setDisplayName(\"Trigger Creation Tool\");\n meta.setLore(Arrays.asList(\"Commandss:\", command));\n st.setItemMeta(meta);\n player.getInventory().setItemInMainHand(st);\n\n CommandTrigger ct = new CommandTrigger(command);\n this.hasTool.put(player.getUniqueId(), ct);\n return true;\n }\n return false;\n }",
"public void setDoneFlgAsFlg(HangarCDef.Flg cdef) {\n setDoneFlg(cdef != null ? Boolean.valueOf(cdef.code()) : null);\n }",
"public com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition addNewAutoForwardTriggeredSend()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition target = null;\n target = (com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition)get_store().add_element_user(AUTOFORWARDTRIGGEREDSEND$16);\n return target;\n }\n }",
"protected abstract void createTriggerOrAction();",
"public boolean isFire(Point3d position){\r\n\t\tBlockPos pos = new BlockPos(position.x, position.y, position.z);\r\n\t\tIBlockState state = world.getBlockState(pos); \r\n\t\treturn state.getMaterial().equals(Material.FIRE);\r\n\t}",
"@Override\n public List<TriggerAction> getRequiredAfterTriggers(SwccgGame game, EffectResult effectResult, final PhysicalCard self) {\n List<TriggerAction> actions = super.getRequiredAfterTriggers(game, effectResult, self);\n String playerId = self.getOwner();\n\n // Creatures attack a non-creature if they are present with a valid target at end of owner's battle phase\n // (unless parasite is attached to a host)\n if (TriggerConditions.isEndOfYourPhase(game, effectResult, Phase.BATTLE, playerId)\n && !GameConditions.isDuringAttack(game)\n && !GameConditions.isDuringBattle(game)\n && self.getAttachedTo() == null) {\n GameState gameState = game.getGameState();\n ModifiersQuerying modifiersQuerying = game.getModifiersQuerying();\n if (!modifiersQuerying.hasParticipatedInAttackOnNonCreatureThisTurn(self)) {\n PhysicalCard location = modifiersQuerying.getLocationThatCardIsPresentAt(gameState, self);\n if (location != null) {\n if (!modifiersQuerying.mayNotInitiateAttacksAtLocation(gameState, location, playerId)\n && GameConditions.canSpot(game, self, SpotOverride.INCLUDE_ALL, Filters.nonCreatureCanBeAttackedByCreature(self, false))) {\n actions.add(new InitiateAttackNonCreatureAction(self));\n }\n }\n }\n }\n\n // Check condition(s)\n PhysicalCard host = self.getAttachedTo();\n if (host != null && TriggerConditions.justEatenBy(game, effectResult, host, Filters.any)) {\n\n final RequiredGameTextTriggerAction action = new RequiredGameTextTriggerAction(self, self.getCardId());\n action.setText(\"Detach from host\");\n action.setActionMsg(\"Detach \" + GameUtils.getCardLink(self) + \" from \" + GameUtils.getCardLink(host));\n // Perform result(s)\n action.appendEffect(\n new DetachParasiteEffect(action, self));\n actions.add(action);\n }\n\n return actions;\n }",
"boolean hasInitialPromptFulfillment();",
"@Override\n\tpublic Object Execute() {\n\t\tCCMLogDiff target = (CCMLogDiff) this.facet.getTarget();\n\t\tString parameter = this.facet.getParameters()[0].toString();\n\n\t\tString behaviorName = this.facet.getBehaviorName();\n\t\tif (behaviorName == null) {\n\t\t\tbehaviorName = SystemConstants.BEHAVIOR_CLICK;\n\t\t}\n\t\tswitch (behaviorName.toLowerCase()) {\n\t\tcase CustomizedBehaviorConstants.LOG_IS_CHANGED:\n\t\t\treturn target.isChanged();\n\t\tdefault:\n\t\t\treturn super.Execute();\n\t\t}\n\t}",
"private static void doEffect(Thing caster, Thing spell, Thing target) {\r\n \t\tint magicSkill=Spell.calcMagicSkill(caster,spell);\r\n \t\tint magicDefence=Spell.calcAntiMagic(target);\r\n \t\tint magicPower=Spell.calcMagicPower(caster,spell);\r\n \t\t\r\n \t\t// work out whether spell is effective\r\n \t\tboolean effective=true;\r\n \t\tboolean visible=target.isVisible(Game.hero());\r\n \t\tif ((magicDefence>0)&&spell.getStat(\"SpellUsage\")==Spell.SPELL_OFFENCE) {\r\n \t\t\tmagicSkill+=magicPower/5;\r\n \t\t\tGame.warn(\"Magic test: \"+magicSkill+\" vs. \"+magicDefence);\r\n \t\t\t\r\n \t\t\teffective=magicSkill>=(magicDefence*RPG.luckRandom(caster,target));\r\n \t\t}\r\n \t\t\r\n \t\tif ((caster!=null)&&target.getFlag(\"IsBeing\")&&(spell.getStat(\"SpellUsage\")==Spell.SPELL_OFFENCE)) {\r\n \t\t\tAI.notifyAttack(target,caster);\r\n \t\t}\r\n \t\t\r\n \t\tString hitname=spell.getString(\"HitName\");\r\n \t\tif (effective){\r\n \t\t\tif (hitname!=null) target.message(\"You are hit by the \"+hitname);\r\n \t\t\tEvent e=new Event(\"Effect\");\r\n \t\t\te.set(\"Strength\",magicPower);\r\n \t\t\te.set(\"Caster\",caster);\r\n \t\t\te.set(\"Target\",target);\r\n \t\t\tspell.handle(e);\r\n \t\t} else {\r\n \t\t\tif (visible) Game.message(target.getTheName()+\" \"+target.verb(\"resist\")+\" the \"+hitname);\r\n \t\t}\r\n \t}",
"@java.lang.Override\n public com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior getFillBehavior() {\n return fillBehavior_ == null\n ? com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.getDefaultInstance()\n : fillBehavior_;\n }",
"public void setTarget(String target) {\n this.target = target;\n }",
"@java.lang.Override\n public com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehaviorOrBuilder\n getFillBehaviorOrBuilder() {\n return fillBehavior_ == null\n ? com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.getDefaultInstance()\n : fillBehavior_;\n }",
"public final EObject ruleETriggerDefinition() throws RecognitionException {\n EObject current = null;\n\n Token lv_name_0_0=null;\n Token otherlv_1=null;\n Token this_BEGIN_2=null;\n Token this_END_4=null;\n EObject lv_trigger_3_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalRMParser.g:2138:2: ( ( ( (lv_name_0_0= RULE_QUALIFIED_NAME ) ) otherlv_1= Colon this_BEGIN_2= RULE_BEGIN ( (lv_trigger_3_0= ruleETriggerDefinitionBody ) ) this_END_4= RULE_END ) )\n // InternalRMParser.g:2139:2: ( ( (lv_name_0_0= RULE_QUALIFIED_NAME ) ) otherlv_1= Colon this_BEGIN_2= RULE_BEGIN ( (lv_trigger_3_0= ruleETriggerDefinitionBody ) ) this_END_4= RULE_END )\n {\n // InternalRMParser.g:2139:2: ( ( (lv_name_0_0= RULE_QUALIFIED_NAME ) ) otherlv_1= Colon this_BEGIN_2= RULE_BEGIN ( (lv_trigger_3_0= ruleETriggerDefinitionBody ) ) this_END_4= RULE_END )\n // InternalRMParser.g:2140:3: ( (lv_name_0_0= RULE_QUALIFIED_NAME ) ) otherlv_1= Colon this_BEGIN_2= RULE_BEGIN ( (lv_trigger_3_0= ruleETriggerDefinitionBody ) ) this_END_4= RULE_END\n {\n // InternalRMParser.g:2140:3: ( (lv_name_0_0= RULE_QUALIFIED_NAME ) )\n // InternalRMParser.g:2141:4: (lv_name_0_0= RULE_QUALIFIED_NAME )\n {\n // InternalRMParser.g:2141:4: (lv_name_0_0= RULE_QUALIFIED_NAME )\n // InternalRMParser.g:2142:5: lv_name_0_0= RULE_QUALIFIED_NAME\n {\n lv_name_0_0=(Token)match(input,RULE_QUALIFIED_NAME,FOLLOW_11); \n\n \t\t\t\t\tnewLeafNode(lv_name_0_0, grammarAccess.getETriggerDefinitionAccess().getNameQUALIFIED_NAMETerminalRuleCall_0_0());\n \t\t\t\t\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getETriggerDefinitionRule());\n \t\t\t\t\t}\n \t\t\t\t\tsetWithLastConsumed(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"name\",\n \t\t\t\t\t\tlv_name_0_0,\n \t\t\t\t\t\t\"org.sodalite.dsl.RM.QUALIFIED_NAME\");\n \t\t\t\t\n\n }\n\n\n }\n\n otherlv_1=(Token)match(input,Colon,FOLLOW_6); \n\n \t\t\tnewLeafNode(otherlv_1, grammarAccess.getETriggerDefinitionAccess().getColonKeyword_1());\n \t\t\n this_BEGIN_2=(Token)match(input,RULE_BEGIN,FOLLOW_31); \n\n \t\t\tnewLeafNode(this_BEGIN_2, grammarAccess.getETriggerDefinitionAccess().getBEGINTerminalRuleCall_2());\n \t\t\n // InternalRMParser.g:2166:3: ( (lv_trigger_3_0= ruleETriggerDefinitionBody ) )\n // InternalRMParser.g:2167:4: (lv_trigger_3_0= ruleETriggerDefinitionBody )\n {\n // InternalRMParser.g:2167:4: (lv_trigger_3_0= ruleETriggerDefinitionBody )\n // InternalRMParser.g:2168:5: lv_trigger_3_0= ruleETriggerDefinitionBody\n {\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getETriggerDefinitionAccess().getTriggerETriggerDefinitionBodyParserRuleCall_3_0());\n \t\t\t\t\n pushFollow(FOLLOW_8);\n lv_trigger_3_0=ruleETriggerDefinitionBody();\n\n state._fsp--;\n\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getETriggerDefinitionRule());\n \t\t\t\t\t}\n \t\t\t\t\tset(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"trigger\",\n \t\t\t\t\t\tlv_trigger_3_0,\n \t\t\t\t\t\t\"org.sodalite.dsl.RM.ETriggerDefinitionBody\");\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n\n }\n\n\n }\n\n this_END_4=(Token)match(input,RULE_END,FOLLOW_2); \n\n \t\t\tnewLeafNode(this_END_4, grammarAccess.getETriggerDefinitionAccess().getENDTerminalRuleCall_4());\n \t\t\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public void setTarget(Vector3f target) \n {\n float distance = FastMath.abs(target.y - this.getPosition().y);\n this.motionTarget = target;\n this.motionPath = new MotionPath();\n \n this.motionPath.addWayPoint(this.getPosition());\n\n this.motionPath.addWayPoint(new Vector3f(this.getPosition().x, target.y, this.getPosition().z));\n \n grabberMotion = new MotionEvent(this.node, this.motionPath);\n grabberMotion.setInitialDuration(distance / this.speed);\n }",
"private TrackingResult followTarget(Rect target)\n\t{\n\t\t// Clear any existing target rectangle.\n\t\tcamera.addTarget(null);\n\t\t\n\t\t// Outline the target being tracked.\n\t\tcamera.addTarget(target);\n\t\t\n\t\t// This is field of view size.\n\t\tSize imageSize = camera.getImageSize();\n\t\t\n\t\t// get size of target outline area.\n\t\tint targetArea = target.height * target.width;\n\t\t\n\t\t// If we have just acquired target, record initial size. Size comparison\n\t\t// is how we determine distance to target.\n\t\t\n\t\tif (initialTargetArea == 0) initialTargetArea = targetArea;\n\t\t\n\t\t// Compute center point of target in the camera view image.\n\t\tint targetCenterX = target.x + target.width / 2;\n\t\tint imageCenterX = (int) (imageSize.width / 2);\n\t\t\n\t\t// offset minus indicates target is left of image center,\n\t\t// plus to the right. If target is left, drone needs to turn\n\t\t// left to center the target in the image which is a minus yaw value.\n\t\t\n\t\tint offset = targetCenterX - imageCenterX;\n\n\t\tlogger.fine(\"offset=\" + offset);\n\t\t\n\t\toffset *= .25;\t// Scale offset down;\n\t\t\n\t\t// Determine change in distance from last target acquisition.\n\t\t\n\t\tdouble distance = initialTargetArea - targetArea;\n\t\t\n\t\tlogger.fine(String.format(\"ia=%d ta=%d dist=%.0f\", initialTargetArea, targetArea, distance));\n\t\t\n\t\t//initialTargetArea = targetArea;\n\t\t\n\t\tdouble scaleFactor = 0.0;\n\t\t\n\t\t// If distance is small, call it good otherwise the drone\n\t\t// hunts back and forth. Value must be determined by testing.\n\t\t\n\t\tif (Math.abs(distance) < 2000.0) \n\t\t\tdistance = 0.0;\n\t\telse\n\t\t{\n\t\t\t// Scale distance change to a fwd/back movement value of 20% for flyRC command.\n\t\t\t// For some unknown reason, need more power to fly forward than back and even\n\t\t\t// with 30%, forward seems not reliable.\n\t\t\t// scaleFactor must be positive to preserve the sign of distance value.\n\t\t\t\n\t\t\tscaleFactor = 20.0 / Math.abs(distance);\n\t\t\n\t\t\tdistance = distance * scaleFactor;\n\t\t}\n\t\t\n\t\tlogger.fine(String.format(\"dist=%.1f fact=%f\", distance, scaleFactor));\n\t\t\n\t\treturn new TrackingResult(offset, (int) distance);\n\t}",
"public void trigger(PromiseManager pm) {\n\tthrow new SubclassResponsibilityException();\n/*\nudanax-top.st:15949:DetectorEvent methodsFor: 'triggering'!\n{void} trigger: pm {PromiseManager}\n\t\"Send the message across the wire.\"\n\t\n\tself subclassResponsibility!\n*/\n}",
"public void setDoneFlg_True() {\n setDoneFlgAsFlg(HangarCDef.Flg.True);\n }",
"public RetriggerMode getRetriggerMode();",
"@Override\n public boolean resolve(Player player, PlayerSkills data, DynamicSkill skill, Target target, List<LivingEntity> targets) {\n\n // Requires a target\n if (targets.size() == 0) {\n return false;\n }\n\n DOTHelper helper = data.getAPI().getDOTHelper();\n int level = data.getSkillLevel(skill.getName());\n double damage = skill.getAttribute(DAMAGE, target, level);\n int duration = (int)(skill.getAttribute(DURATION, target, level) * 20);\n int frequency = (int)(skill.getAttribute(FREQUENCY, target, level) * 20);\n boolean lethal = skill.getValue(LETHAL) != 1;\n\n // Apply a DOT to all targets\n for (LivingEntity entity : targets) {\n DOTSet set = helper.getDOTSet(entity);\n set.addEffect(skill.getName(), new DOT(skill, player, duration, damage, frequency, lethal));\n }\n\n return true;\n }",
"@Test\n public void testDuplicateConditionsAndFulfillments() {\n final ThresholdSha256Condition condition = ThresholdSha256Condition.from(\n 2, Lists\n .newArrayList(subcondition1, subcondition1, subcondition2, subcondition3)\n );\n\n // Escrow Only (insufficient)\n ThresholdSha256Fulfillment fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition2, subcondition3),\n Lists.newArrayList(subfulfillment1)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(false));\n\n // Escrow Only (sufficient)\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition2, subcondition3),\n Lists.newArrayList(subfulfillment1, subfulfillment1)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Escrow+Party2\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition3),\n Lists.newArrayList(subfulfillment1, subfulfillment2)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Escrow+Party3\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition2),\n Lists.newArrayList(subfulfillment1, subfulfillment3)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Party2+Party3\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition1),\n Lists.newArrayList(subfulfillment2, subfulfillment3)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Party2+Party3 (w\\o escrow condition)\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(),\n Lists.newArrayList(subfulfillment2, subfulfillment3)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(false));\n }",
"boolean containsTrigger(String sTriggerName);",
"public String getCorporateLoanFulfillmentArrangementUpdateActionTaskReference() {\n return corporateLoanFulfillmentArrangementUpdateActionTaskReference;\n }",
"public void turnAbsolute(int target)\n {\n int heading = 360 - mrGyro.getHeading(); //Set variables to gyro readings\n double turnSpeed = 0.15;\n\n while (Math.abs(heading - target) > 45)\n { //Continue while the robot direction is further than three degrees from the target\n if (heading > target) //if gyro is positive, we will turn right\n {\n movePower(\"left\", 0.5, 0.01);\n }\n\n if (heading < target)\n {\n movePower(\"right\", 0.5, 0.01);\n }\n heading = 360 - mrGyro.getHeading(); //Set variables to gyro readings\n telemetry.addData(\"heading\", String.format(\"%03d\", heading));\n telemetry.update();\n }\n while (Math.abs(heading - target) > 10)\n { //Continue while the robot direction is further than three degrees from the target\n if (heading > target) //if gyro is positive, we will turn right\n {\n movePower(\"left\", 0.1, 0.01);\n }\n\n if (heading < target)\n {\n movePower(\"right\", 0.1, 0.01);\n }\n heading = 360 - mrGyro.getHeading(); //Set variables to gyro readings\n telemetry.addData(\"heading\", String.format(\"%03d\", heading));\n telemetry.update();\n }\n while (Math.abs(heading - target) > 5)\n { //Continue while the robot direction is further than three degrees from the target\n if (heading > target) //if gyro is positive, we will turn right\n {\n movePower(\"left\", 0.01, 0.01);\n }\n\n if (heading < target)\n {\n movePower(\"right\", 0.01, 0.01);\n }\n heading = 360 - mrGyro.getHeading(); //Set variables to gyro readings\n telemetry.addData(\"heading\", String.format(\"%03d\", heading));\n telemetry.update();\n }\n stop();\n }",
"public interface EnchantmentTrigger {}",
"@When(\"^I check whether to show a notification for WOF$\")\n public void i_check_whether_to_show_a_notification_for_WOF() throws Throwable {\n result = car.showWofNotification();\n }"
]
| [
"0.75118184",
"0.6390851",
"0.55707103",
"0.50231856",
"0.4869597",
"0.48588994",
"0.48283374",
"0.48088425",
"0.47888523",
"0.47832134",
"0.46987358",
"0.46975455",
"0.46901008",
"0.46641925",
"0.46521127",
"0.45666906",
"0.45439142",
"0.45149878",
"0.44908616",
"0.44836113",
"0.44724998",
"0.4468061",
"0.4460456",
"0.44354156",
"0.43911442",
"0.43883172",
"0.4383822",
"0.4359225",
"0.43455812",
"0.43416944",
"0.43356612",
"0.4326876",
"0.43257037",
"0.42971584",
"0.42902926",
"0.4274763",
"0.42481676",
"0.4247037",
"0.42405725",
"0.42342272",
"0.4232782",
"0.4219951",
"0.4210227",
"0.4184239",
"0.41832066",
"0.4145204",
"0.41330194",
"0.41074228",
"0.41035044",
"0.40830857",
"0.40820107",
"0.40714085",
"0.4067415",
"0.40640354",
"0.4063911",
"0.40634933",
"0.40505987",
"0.4045243",
"0.40359795",
"0.40340933",
"0.40173858",
"0.40173835",
"0.39842412",
"0.3976422",
"0.39602184",
"0.395678",
"0.39485726",
"0.39465263",
"0.39458504",
"0.39381048",
"0.39265966",
"0.39243165",
"0.39089885",
"0.38972178",
"0.3892374",
"0.3884533",
"0.38809085",
"0.38777333",
"0.3877573",
"0.38701487",
"0.38654235",
"0.38634565",
"0.38631517",
"0.38493457",
"0.38467252",
"0.38432634",
"0.38410926",
"0.38335672",
"0.38270316",
"0.38160676",
"0.38113546",
"0.38100374",
"0.38029715",
"0.38003552",
"0.37985498",
"0.3797204",
"0.37950313",
"0.3791004",
"0.37901407",
"0.37893143"
]
| 0.77540827 | 0 |
The fulfillment to call when the condition is satisfied. At least one of `trigger_fulfillment` and `target` must be specified. When both are defined, `trigger_fulfillment` is executed first. .google.cloud.dialogflow.cx.v3beta1.Fulfillment trigger_fulfillment = 3; | com.google.cloud.dialogflow.cx.v3beta1.FulfillmentOrBuilder getTriggerFulfillmentOrBuilder(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"com.google.cloud.dialogflow.cx.v3beta1.Fulfillment getTriggerFulfillment();",
"boolean hasTriggerFulfillment();",
"public Builder setInitialPromptFulfillment(\n com.google.cloud.dialogflow.cx.v3beta1.Fulfillment value) {\n if (initialPromptFulfillmentBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n initialPromptFulfillment_ = value;\n } else {\n initialPromptFulfillmentBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000001;\n onChanged();\n return this;\n }",
"com.google.cloud.dialogflow.cx.v3beta1.Fulfillment getInitialPromptFulfillment();",
"public com.google.cloud.dialogflow.cx.v3beta1.Fulfillment getInitialPromptFulfillment() {\n if (initialPromptFulfillmentBuilder_ == null) {\n return initialPromptFulfillment_ == null\n ? com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.getDefaultInstance()\n : initialPromptFulfillment_;\n } else {\n return initialPromptFulfillmentBuilder_.getMessage();\n }\n }",
"com.google.cloud.dialogflow.cx.v3beta1.FulfillmentOrBuilder\n getInitialPromptFulfillmentOrBuilder();",
"public String getFulfillmentChannel() {\r\n return fulfillmentChannel;\r\n }",
"@java.lang.Override\n public com.google.cloud.dialogflow.cx.v3beta1.Fulfillment getInitialPromptFulfillment() {\n return initialPromptFulfillment_ == null\n ? com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.getDefaultInstance()\n : initialPromptFulfillment_;\n }",
"public Builder mergeInitialPromptFulfillment(\n com.google.cloud.dialogflow.cx.v3beta1.Fulfillment value) {\n if (initialPromptFulfillmentBuilder_ == null) {\n if (((bitField0_ & 0x00000001) != 0)\n && initialPromptFulfillment_ != null\n && initialPromptFulfillment_\n != com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.getDefaultInstance()) {\n getInitialPromptFulfillmentBuilder().mergeFrom(value);\n } else {\n initialPromptFulfillment_ = value;\n }\n } else {\n initialPromptFulfillmentBuilder_.mergeFrom(value);\n }\n bitField0_ |= 0x00000001;\n onChanged();\n return this;\n }",
"public void setFulfillmentChannel(String fulfillmentChannel) {\r\n this.fulfillmentChannel = fulfillmentChannel;\r\n }",
"private com.google.protobuf.SingleFieldBuilderV3<\n com.google.cloud.dialogflow.cx.v3beta1.Fulfillment,\n com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.Builder,\n com.google.cloud.dialogflow.cx.v3beta1.FulfillmentOrBuilder>\n getInitialPromptFulfillmentFieldBuilder() {\n if (initialPromptFulfillmentBuilder_ == null) {\n initialPromptFulfillmentBuilder_ =\n new com.google.protobuf.SingleFieldBuilderV3<\n com.google.cloud.dialogflow.cx.v3beta1.Fulfillment,\n com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.Builder,\n com.google.cloud.dialogflow.cx.v3beta1.FulfillmentOrBuilder>(\n getInitialPromptFulfillment(), getParentForChildren(), isClean());\n initialPromptFulfillment_ = null;\n }\n return initialPromptFulfillmentBuilder_;\n }",
"public Trigger getTrigger() {\n \t\treturn trigger;\n \t}",
"pb4server.FireFightAskReqOrBuilder getFireFightAskReqOrBuilder();",
"TriggeringStatement getTriggeringStatement();",
"public void trigger(List<Entity> _trigger){\n\t\tif(event!=null){\n\t\t\tevent.activate(System.currentTimeMillis(), _trigger);\n\t\t}\n\t}",
"@NonNull\n public ScreenTriggerBuilder setGoal(double goal) {\n this.goal = goal;\n return this;\n }",
"public com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition getAutoForwardTriggeredSend()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition target = null;\n target = (com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition)get_store().find_element_user(AUTOFORWARDTRIGGEREDSEND$16, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public void trigger(Fact fact) {\n\t\t\n\t}",
"public void setTrigger(Trigger trigger) {\n \t\tthis.trigger = trigger;\n \t\tif (this.trigger == null)\n \t\t\tthis.trigger = Trigger.NONE;\n \t}",
"public com.google.cloud.dialogflow.cx.v3beta1.FulfillmentOrBuilder\n getInitialPromptFulfillmentOrBuilder() {\n if (initialPromptFulfillmentBuilder_ != null) {\n return initialPromptFulfillmentBuilder_.getMessageOrBuilder();\n } else {\n return initialPromptFulfillment_ == null\n ? com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.getDefaultInstance()\n : initialPromptFulfillment_;\n }\n }",
"public Builder setInitialPromptFulfillment(\n com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.Builder builderForValue) {\n if (initialPromptFulfillmentBuilder_ == null) {\n initialPromptFulfillment_ = builderForValue.build();\n } else {\n initialPromptFulfillmentBuilder_.setMessage(builderForValue.build());\n }\n bitField0_ |= 0x00000001;\n onChanged();\n return this;\n }",
"public static boolean getTrigger() {\n\t\treturn true;\r\n\t}",
"@Property(\"triggerAction\")\n void setTriggerAction(String triggerAction);",
"public void setFullfillment(int fullfillment) {\r\n this.fullfillment = fullfillment;\r\n }",
"public com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition getAutoReplyTriggeredSend()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition target = null;\n target = (com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition)get_store().find_element_user(AUTOREPLYTRIGGEREDSEND$20, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"protected void sequence_AT_DEFINE_DefinitionTrigger_TRIGGER(ISerializationContext context, DefinitionTrigger semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}",
"public void setAutoForwardTriggeredSend(com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition autoForwardTriggeredSend)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition target = null;\n target = (com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition)get_store().find_element_user(AUTOFORWARDTRIGGEREDSEND$16, 0);\n if (target == null)\n {\n target = (com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition)get_store().add_element_user(AUTOFORWARDTRIGGEREDSEND$16);\n }\n target.set(autoForwardTriggeredSend);\n }\n }",
"public abstract void setTriggerOrAction();",
"public boolean isSetFulfillmentChannel() {\r\n return fulfillmentChannel != null;\r\n }",
"public abstract void onTrigger();",
"public Builder setFillBehavior(\n com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior value) {\n if (fillBehaviorBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n fillBehavior_ = value;\n } else {\n fillBehaviorBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000010;\n onChanged();\n return this;\n }",
"public JWSSignerOption getTriggeringOption() {\n\t\treturn option;\n\t}",
"@java.lang.Override\n public com.google.cloud.dialogflow.cx.v3beta1.FulfillmentOrBuilder\n getInitialPromptFulfillmentOrBuilder() {\n return initialPromptFulfillment_ == null\n ? com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.getDefaultInstance()\n : initialPromptFulfillment_;\n }",
"public void setFulfillmentUpdatesSpecification(FulfillmentUpdatesSpecification fulfillmentUpdatesSpecification) {\n this.fulfillmentUpdatesSpecification = fulfillmentUpdatesSpecification;\n }",
"@Property(\"triggerAction\")\n String getTriggerAction();",
"@NonNull\n public LifeCycleTriggerBuilder setGoal(double goal) {\n this.goal = goal;\n return this;\n }",
"@NonNull\n public RegionTriggerBuilder setGoal(double goal) {\n this.goal = goal;\n return this;\n }",
"public boolean trigger (String name) {\n final TriggerReference trigger = module.getTrigger(name);\n if (trigger == null) {\n Logger.missing(\"TriggerReference\", name);\n return false;\n } else {\n return trigger.get();\n }\n }",
"@NonNull\n public Trigger build() {\n return new Trigger(type, goal, null);\n }",
"public com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.Builder\n getInitialPromptFulfillmentBuilder() {\n bitField0_ |= 0x00000001;\n onChanged();\n return getInitialPromptFulfillmentFieldBuilder().getBuilder();\n }",
"public abstract boolean isTrigger();",
"private com.google.protobuf.SingleFieldBuilderV3<\n com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior,\n com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.Builder,\n com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehaviorOrBuilder>\n getFillBehaviorFieldBuilder() {\n if (fillBehaviorBuilder_ == null) {\n fillBehaviorBuilder_ =\n new com.google.protobuf.SingleFieldBuilderV3<\n com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior,\n com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.Builder,\n com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehaviorOrBuilder>(\n getFillBehavior(), getParentForChildren(), isClean());\n fillBehavior_ = null;\n }\n return fillBehaviorBuilder_;\n }",
"public com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior getFillBehavior() {\n if (fillBehaviorBuilder_ == null) {\n return fillBehavior_ == null\n ? com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior\n .getDefaultInstance()\n : fillBehavior_;\n } else {\n return fillBehaviorBuilder_.getMessage();\n }\n }",
"ITrigger getTrigger(String sTriggerName);",
"public TriggerAccess getTrigger () {\n return this.trigger;\n }",
"public void executeTrigger(Object object);",
"public PayWithAmazonEvent withFulfillmentChannel(String fulfillmentChannel) {\r\n this.fulfillmentChannel = fulfillmentChannel;\r\n return this;\r\n }",
"public final EObject ruleTrigger() throws RecognitionException {\n EObject current = null;\n int ruleTrigger_StartIndex = input.index();\n Token otherlv_0=null;\n Token otherlv_1=null;\n Token otherlv_3=null;\n Token otherlv_5=null;\n Token otherlv_6=null;\n Token otherlv_8=null;\n Token otherlv_9=null;\n Token otherlv_11=null;\n EObject lv_triggerRules_2_0 = null;\n\n EObject lv_triggerRules_4_0 = null;\n\n EObject lv_with_7_0 = null;\n\n EObject lv_when_10_0 = null;\n\n\n enterRule(); \n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 20) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1350:28: ( (otherlv_0= KEYWORD_82 otherlv_1= KEYWORD_4 ( (lv_triggerRules_2_0= ruleQualifiedRuleReference ) ) (otherlv_3= KEYWORD_8 ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) ) )* otherlv_5= KEYWORD_5 (otherlv_6= KEYWORD_58 ( (lv_with_7_0= ruleBlock ) ) )? (otherlv_8= KEYWORD_57 otherlv_9= KEYWORD_4 ( (lv_when_10_0= ruleExpression ) ) otherlv_11= KEYWORD_5 )? ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1351:1: (otherlv_0= KEYWORD_82 otherlv_1= KEYWORD_4 ( (lv_triggerRules_2_0= ruleQualifiedRuleReference ) ) (otherlv_3= KEYWORD_8 ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) ) )* otherlv_5= KEYWORD_5 (otherlv_6= KEYWORD_58 ( (lv_with_7_0= ruleBlock ) ) )? (otherlv_8= KEYWORD_57 otherlv_9= KEYWORD_4 ( (lv_when_10_0= ruleExpression ) ) otherlv_11= KEYWORD_5 )? )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1351:1: (otherlv_0= KEYWORD_82 otherlv_1= KEYWORD_4 ( (lv_triggerRules_2_0= ruleQualifiedRuleReference ) ) (otherlv_3= KEYWORD_8 ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) ) )* otherlv_5= KEYWORD_5 (otherlv_6= KEYWORD_58 ( (lv_with_7_0= ruleBlock ) ) )? (otherlv_8= KEYWORD_57 otherlv_9= KEYWORD_4 ( (lv_when_10_0= ruleExpression ) ) otherlv_11= KEYWORD_5 )? )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1352:2: otherlv_0= KEYWORD_82 otherlv_1= KEYWORD_4 ( (lv_triggerRules_2_0= ruleQualifiedRuleReference ) ) (otherlv_3= KEYWORD_8 ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) ) )* otherlv_5= KEYWORD_5 (otherlv_6= KEYWORD_58 ( (lv_with_7_0= ruleBlock ) ) )? (otherlv_8= KEYWORD_57 otherlv_9= KEYWORD_4 ( (lv_when_10_0= ruleExpression ) ) otherlv_11= KEYWORD_5 )?\n {\n otherlv_0=(Token)match(input,KEYWORD_82,FOLLOW_KEYWORD_82_in_ruleTrigger2463); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_0, grammarAccess.getTriggerAccess().getTriggerKeyword_0());\n \n }\n otherlv_1=(Token)match(input,KEYWORD_4,FOLLOW_KEYWORD_4_in_ruleTrigger2475); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_1, grammarAccess.getTriggerAccess().getLeftParenthesisKeyword_1());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1361:1: ( (lv_triggerRules_2_0= ruleQualifiedRuleReference ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1362:1: (lv_triggerRules_2_0= ruleQualifiedRuleReference )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1362:1: (lv_triggerRules_2_0= ruleQualifiedRuleReference )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1363:3: lv_triggerRules_2_0= ruleQualifiedRuleReference\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getTriggerAccess().getTriggerRulesQualifiedRuleReferenceParserRuleCall_2_0()); \n \t \n }\n pushFollow(FOLLOW_ruleQualifiedRuleReference_in_ruleTrigger2495);\n lv_triggerRules_2_0=ruleQualifiedRuleReference();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getTriggerRule());\n \t }\n \t\tadd(\n \t\t\tcurrent, \n \t\t\t\"triggerRules\",\n \t\tlv_triggerRules_2_0, \n \t\t\"QualifiedRuleReference\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1379:2: (otherlv_3= KEYWORD_8 ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) ) )*\n loop35:\n do {\n int alt35=2;\n int LA35_0 = input.LA(1);\n\n if ( (LA35_0==KEYWORD_8) ) {\n alt35=1;\n }\n\n\n switch (alt35) {\n \tcase 1 :\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1380:2: otherlv_3= KEYWORD_8 ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) )\n \t {\n \t otherlv_3=(Token)match(input,KEYWORD_8,FOLLOW_KEYWORD_8_in_ruleTrigger2509); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \tnewLeafNode(otherlv_3, grammarAccess.getTriggerAccess().getCommaKeyword_3_0());\n \t \n \t }\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1384:1: ( (lv_triggerRules_4_0= ruleQualifiedRuleReference ) )\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1385:1: (lv_triggerRules_4_0= ruleQualifiedRuleReference )\n \t {\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1385:1: (lv_triggerRules_4_0= ruleQualifiedRuleReference )\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1386:3: lv_triggerRules_4_0= ruleQualifiedRuleReference\n \t {\n \t if ( state.backtracking==0 ) {\n \t \n \t \t newCompositeNode(grammarAccess.getTriggerAccess().getTriggerRulesQualifiedRuleReferenceParserRuleCall_3_1_0()); \n \t \t \n \t }\n \t pushFollow(FOLLOW_ruleQualifiedRuleReference_in_ruleTrigger2529);\n \t lv_triggerRules_4_0=ruleQualifiedRuleReference();\n\n \t state._fsp--;\n \t if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getTriggerRule());\n \t \t }\n \t \t\tadd(\n \t \t\t\tcurrent, \n \t \t\t\t\"triggerRules\",\n \t \t\tlv_triggerRules_4_0, \n \t \t\t\"QualifiedRuleReference\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n \t }\n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop35;\n }\n } while (true);\n\n otherlv_5=(Token)match(input,KEYWORD_5,FOLLOW_KEYWORD_5_in_ruleTrigger2544); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_5, grammarAccess.getTriggerAccess().getRightParenthesisKeyword_4());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1407:1: (otherlv_6= KEYWORD_58 ( (lv_with_7_0= ruleBlock ) ) )?\n int alt36=2;\n int LA36_0 = input.LA(1);\n\n if ( (LA36_0==KEYWORD_58) ) {\n alt36=1;\n }\n switch (alt36) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1408:2: otherlv_6= KEYWORD_58 ( (lv_with_7_0= ruleBlock ) )\n {\n otherlv_6=(Token)match(input,KEYWORD_58,FOLLOW_KEYWORD_58_in_ruleTrigger2557); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_6, grammarAccess.getTriggerAccess().getWithKeyword_5_0());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1412:1: ( (lv_with_7_0= ruleBlock ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1413:1: (lv_with_7_0= ruleBlock )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1413:1: (lv_with_7_0= ruleBlock )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1414:3: lv_with_7_0= ruleBlock\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getTriggerAccess().getWithBlockParserRuleCall_5_1_0()); \n \t \n }\n pushFollow(FOLLOW_ruleBlock_in_ruleTrigger2577);\n lv_with_7_0=ruleBlock();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getTriggerRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"with\",\n \t\tlv_with_7_0, \n \t\t\"Block\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n\n }\n break;\n\n }\n\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1430:4: (otherlv_8= KEYWORD_57 otherlv_9= KEYWORD_4 ( (lv_when_10_0= ruleExpression ) ) otherlv_11= KEYWORD_5 )?\n int alt37=2;\n int LA37_0 = input.LA(1);\n\n if ( (LA37_0==KEYWORD_57) ) {\n alt37=1;\n }\n switch (alt37) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1431:2: otherlv_8= KEYWORD_57 otherlv_9= KEYWORD_4 ( (lv_when_10_0= ruleExpression ) ) otherlv_11= KEYWORD_5\n {\n otherlv_8=(Token)match(input,KEYWORD_57,FOLLOW_KEYWORD_57_in_ruleTrigger2593); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_8, grammarAccess.getTriggerAccess().getWhenKeyword_6_0());\n \n }\n otherlv_9=(Token)match(input,KEYWORD_4,FOLLOW_KEYWORD_4_in_ruleTrigger2605); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_9, grammarAccess.getTriggerAccess().getLeftParenthesisKeyword_6_1());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1440:1: ( (lv_when_10_0= ruleExpression ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1441:1: (lv_when_10_0= ruleExpression )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1441:1: (lv_when_10_0= ruleExpression )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1442:3: lv_when_10_0= ruleExpression\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getTriggerAccess().getWhenExpressionParserRuleCall_6_2_0()); \n \t \n }\n pushFollow(FOLLOW_ruleExpression_in_ruleTrigger2625);\n lv_when_10_0=ruleExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getTriggerRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"when\",\n \t\tlv_when_10_0, \n \t\t\"Expression\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n otherlv_11=(Token)match(input,KEYWORD_5,FOLLOW_KEYWORD_5_in_ruleTrigger2638); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_11, grammarAccess.getTriggerAccess().getRightParenthesisKeyword_6_3());\n \n }\n\n }\n break;\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 20, ruleTrigger_StartIndex); }\n }\n return current;\n }",
"private Action refuelAt(Position target) {\n\t\tif (position.equals(target)) return new RefuelAction();\n\n\t\treturn moveTowardsPosition(target);\n\t}",
"protected Trigger getContentAssistTrigger() {\n IBindingService service = (IBindingService) PlatformUI.getWorkbench()\n .getService(IBindingService.class);\n Trigger trigger = null;\n TriggerSequence[] sequences = service\n .getActiveBindingsFor(ContentAssistCommandAdapter.CONTENT_PROPOSAL_COMMAND);\n if (sequences.length > 0) {\n Trigger[] triggers = sequences[0].getTriggers();\n if (triggers.length > 0) {\n trigger = triggers[0];\n }\n }\n return trigger;\n }",
"public final EObject ruleETriggers() throws RecognitionException {\n EObject current = null;\n\n EObject lv_triggers_1_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalRMParser.g:2093:2: ( ( () ( (lv_triggers_1_0= ruleETriggerDefinition ) )* ) )\n // InternalRMParser.g:2094:2: ( () ( (lv_triggers_1_0= ruleETriggerDefinition ) )* )\n {\n // InternalRMParser.g:2094:2: ( () ( (lv_triggers_1_0= ruleETriggerDefinition ) )* )\n // InternalRMParser.g:2095:3: () ( (lv_triggers_1_0= ruleETriggerDefinition ) )*\n {\n // InternalRMParser.g:2095:3: ()\n // InternalRMParser.g:2096:4: \n {\n\n \t\t\t\tcurrent = forceCreateModelElement(\n \t\t\t\t\tgrammarAccess.getETriggersAccess().getETriggersAction_0(),\n \t\t\t\t\tcurrent);\n \t\t\t\n\n }\n\n // InternalRMParser.g:2102:3: ( (lv_triggers_1_0= ruleETriggerDefinition ) )*\n loop18:\n do {\n int alt18=2;\n int LA18_0 = input.LA(1);\n\n if ( (LA18_0==RULE_QUALIFIED_NAME) ) {\n alt18=1;\n }\n\n\n switch (alt18) {\n \tcase 1 :\n \t // InternalRMParser.g:2103:4: (lv_triggers_1_0= ruleETriggerDefinition )\n \t {\n \t // InternalRMParser.g:2103:4: (lv_triggers_1_0= ruleETriggerDefinition )\n \t // InternalRMParser.g:2104:5: lv_triggers_1_0= ruleETriggerDefinition\n \t {\n\n \t \t\t\t\t\tnewCompositeNode(grammarAccess.getETriggersAccess().getTriggersETriggerDefinitionParserRuleCall_1_0());\n \t \t\t\t\t\n \t pushFollow(FOLLOW_16);\n \t lv_triggers_1_0=ruleETriggerDefinition();\n\n \t state._fsp--;\n\n\n \t \t\t\t\t\tif (current==null) {\n \t \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getETriggersRule());\n \t \t\t\t\t\t}\n \t \t\t\t\t\tadd(\n \t \t\t\t\t\t\tcurrent,\n \t \t\t\t\t\t\t\"triggers\",\n \t \t\t\t\t\t\tlv_triggers_1_0,\n \t \t\t\t\t\t\t\"org.sodalite.dsl.RM.ETriggerDefinition\");\n \t \t\t\t\t\tafterParserOrEnumRuleCall();\n \t \t\t\t\t\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop18;\n }\n } while (true);\n\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehaviorOrBuilder\n getFillBehaviorOrBuilder() {\n if (fillBehaviorBuilder_ != null) {\n return fillBehaviorBuilder_.getMessageOrBuilder();\n } else {\n return fillBehavior_ == null\n ? com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior\n .getDefaultInstance()\n : fillBehavior_;\n }\n }",
"public boolean conditionFulfilled();",
"public void attack(RobotReference target) {\n if (target != null) {\n turnToVector(target.getLocation());\n pointGunToVector(target.getLocation());\n setAhead(60);\n fire(3);\n\n\n }\n }",
"void trigger(Entity e);",
"public FulfillmentUpdatesSpecification getFulfillmentUpdatesSpecification() {\n return this.fulfillmentUpdatesSpecification;\n }",
"public void setAutoReplyTriggeredSend(com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition autoReplyTriggeredSend)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition target = null;\n target = (com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition)get_store().find_element_user(AUTOREPLYTRIGGEREDSEND$20, 0);\n if (target == null)\n {\n target = (com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition)get_store().add_element_user(AUTOREPLYTRIGGEREDSEND$20);\n }\n target.set(autoReplyTriggeredSend);\n }\n }",
"public void setRetriggerMode( RetriggerMode retriggerMode );",
"boolean getUserChooseTrigger();",
"public interface WMTrigger extends WorkflowDefinitionObject {\r\n WMActivity getActivity();\r\n\r\n Boolean getMatchEventObjectForCompletion();\r\n\r\n WMPostTransitionRestriction getPostTransitionRestriction();\r\n\r\n Condition getCondition();\r\n\r\n String getTitle();\r\n}",
"public void addTrigger(final PgTrigger trigger) {\n triggers.add(trigger);\n }",
"boolean isSimpleTrigger();",
"TriggerPositionType getTriggerPositionType();",
"public ClearTriggerResponse clearTrigger(ClearTriggerRequest request) throws GPUdbException {\n ClearTriggerResponse actualResponse_ = new ClearTriggerResponse();\n submitRequest(\"/clear/trigger\", request, actualResponse_, false);\n return actualResponse_;\n }",
"public T caseReactionTrigger(ReactionTrigger object) {\r\n\t\treturn null;\r\n\t}",
"@NonNull\n public Trigger build() {\n if (UAStringUtil.isEmpty(eventName)) {\n return new Trigger(type, goal, null);\n }\n\n JsonPredicate predicate = JsonPredicate.newBuilder()\n .setPredicateType(JsonPredicate.AND_PREDICATE_TYPE)\n .addMatcher(JsonMatcher.newBuilder()\n .setKey(CustomEvent.EVENT_NAME)\n .setValueMatcher(ValueMatcher.newValueMatcher(JsonValue.wrap(eventName)))\n .build())\n .build();\n return new Trigger(type, goal, predicate);\n }",
"public boolean triggersNow()\n\t{\n\t\tif(!this.canTrigger())\n\t\t\treturn false;\n\n\t\tfor(GameObject object: this.game.actualState.stack())\n\t\t\tif(object instanceof StateTriggeredAbility)\n\t\t\t\tif(((StateTriggeredAbility)object).printedVersionID == this.ID)\n\t\t\t\t\treturn false;\n\n\t\tIdentified source = this.getSource(this.state);\n\t\tint controller;\n\t\tif(source.isGameObject())\n\t\t\tcontroller = ((GameObject)source).controllerID;\n\t\telse\n\t\t\t// it's a player\n\t\t\tcontroller = source.ID;\n\t\tfor(GameObject object: this.game.actualState.waitingTriggers.get(controller))\n\t\t\tif((object instanceof StateTriggeredAbility) && (((StateTriggeredAbility)object).printedVersionID == this.ID))\n\t\t\t\treturn false;\n\n\t\tfor(SetGenerator condition: this.triggerConditions)\n\t\t\tif(!condition.evaluate(this.game, this).isEmpty())\n\t\t\t\treturn true;\n\n\t\treturn false;\n\t}",
"public void fireTurret() {\n\t\tif(!getCreator().hasEffect(\"TurretEffect\")) {\n\t\t\treturn;\n\t\t}\n\t\t//Fire based on what is ordained within the hero's current TurretEffect\n\t\tTurretEffect tE = (TurretEffect)getCreator().getEffect(\"TurretEffect\");\n\t\tTurretFireWrapper fW = tE.getFireFunctionWrapper();\n\t\tif(fW == null) {\n\t\t\treturn; //No active mode selected, so we just exit out. Note that this means that turrets will always fire based on the last active effect\n\t\t}\n\t\tfW.fire(getCreator(), getLoc(),range);\n\t\treturn;\n\t}",
"public static String getTriggerField(){\n return WHAT_IS_THE_SOURCE_OF_FUNDS.getFieldNameValue();\n }",
"public boolean getTrigger(){\n \treturn !trigger.get();\n }",
"public interface TriggerAction {\n\t\tpublic void click();\n\t}",
"@Override\n\tpublic Condition getGoal()\n\t{\n\t\treturn explicitGoal;\n\t}",
"public boolean isDoneFlgTrue() {\n HangarCDef.Flg cdef = getDoneFlgAsFlg();\n return cdef != null ? cdef.equals(HangarCDef.Flg.True) : false;\n }",
"public ForwardChainExpectation when(RequestDefinition requestDefinition) {\n return when(requestDefinition, Times.unlimited());\n }",
"public void trigger(Event event);",
"private boolean giveTriggerTool(Player player, String command) {\n if (player.getInventory().getItemInMainHand().getAmount() == 0) {\n ItemStack st = new ItemStack(Material.STICK);\n ItemMeta meta = st.getItemMeta();\n meta.setDisplayName(\"Trigger Creation Tool\");\n meta.setLore(Arrays.asList(\"Commandss:\", command));\n st.setItemMeta(meta);\n player.getInventory().setItemInMainHand(st);\n\n CommandTrigger ct = new CommandTrigger(command);\n this.hasTool.put(player.getUniqueId(), ct);\n return true;\n }\n return false;\n }",
"public void setDoneFlgAsFlg(HangarCDef.Flg cdef) {\n setDoneFlg(cdef != null ? Boolean.valueOf(cdef.code()) : null);\n }",
"public com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition addNewAutoForwardTriggeredSend()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition target = null;\n target = (com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition)get_store().add_element_user(AUTOFORWARDTRIGGEREDSEND$16);\n return target;\n }\n }",
"protected abstract void createTriggerOrAction();",
"public boolean isFire(Point3d position){\r\n\t\tBlockPos pos = new BlockPos(position.x, position.y, position.z);\r\n\t\tIBlockState state = world.getBlockState(pos); \r\n\t\treturn state.getMaterial().equals(Material.FIRE);\r\n\t}",
"@Override\n public List<TriggerAction> getRequiredAfterTriggers(SwccgGame game, EffectResult effectResult, final PhysicalCard self) {\n List<TriggerAction> actions = super.getRequiredAfterTriggers(game, effectResult, self);\n String playerId = self.getOwner();\n\n // Creatures attack a non-creature if they are present with a valid target at end of owner's battle phase\n // (unless parasite is attached to a host)\n if (TriggerConditions.isEndOfYourPhase(game, effectResult, Phase.BATTLE, playerId)\n && !GameConditions.isDuringAttack(game)\n && !GameConditions.isDuringBattle(game)\n && self.getAttachedTo() == null) {\n GameState gameState = game.getGameState();\n ModifiersQuerying modifiersQuerying = game.getModifiersQuerying();\n if (!modifiersQuerying.hasParticipatedInAttackOnNonCreatureThisTurn(self)) {\n PhysicalCard location = modifiersQuerying.getLocationThatCardIsPresentAt(gameState, self);\n if (location != null) {\n if (!modifiersQuerying.mayNotInitiateAttacksAtLocation(gameState, location, playerId)\n && GameConditions.canSpot(game, self, SpotOverride.INCLUDE_ALL, Filters.nonCreatureCanBeAttackedByCreature(self, false))) {\n actions.add(new InitiateAttackNonCreatureAction(self));\n }\n }\n }\n }\n\n // Check condition(s)\n PhysicalCard host = self.getAttachedTo();\n if (host != null && TriggerConditions.justEatenBy(game, effectResult, host, Filters.any)) {\n\n final RequiredGameTextTriggerAction action = new RequiredGameTextTriggerAction(self, self.getCardId());\n action.setText(\"Detach from host\");\n action.setActionMsg(\"Detach \" + GameUtils.getCardLink(self) + \" from \" + GameUtils.getCardLink(host));\n // Perform result(s)\n action.appendEffect(\n new DetachParasiteEffect(action, self));\n actions.add(action);\n }\n\n return actions;\n }",
"boolean hasInitialPromptFulfillment();",
"@Override\n\tpublic Object Execute() {\n\t\tCCMLogDiff target = (CCMLogDiff) this.facet.getTarget();\n\t\tString parameter = this.facet.getParameters()[0].toString();\n\n\t\tString behaviorName = this.facet.getBehaviorName();\n\t\tif (behaviorName == null) {\n\t\t\tbehaviorName = SystemConstants.BEHAVIOR_CLICK;\n\t\t}\n\t\tswitch (behaviorName.toLowerCase()) {\n\t\tcase CustomizedBehaviorConstants.LOG_IS_CHANGED:\n\t\t\treturn target.isChanged();\n\t\tdefault:\n\t\t\treturn super.Execute();\n\t\t}\n\t}",
"private static void doEffect(Thing caster, Thing spell, Thing target) {\r\n \t\tint magicSkill=Spell.calcMagicSkill(caster,spell);\r\n \t\tint magicDefence=Spell.calcAntiMagic(target);\r\n \t\tint magicPower=Spell.calcMagicPower(caster,spell);\r\n \t\t\r\n \t\t// work out whether spell is effective\r\n \t\tboolean effective=true;\r\n \t\tboolean visible=target.isVisible(Game.hero());\r\n \t\tif ((magicDefence>0)&&spell.getStat(\"SpellUsage\")==Spell.SPELL_OFFENCE) {\r\n \t\t\tmagicSkill+=magicPower/5;\r\n \t\t\tGame.warn(\"Magic test: \"+magicSkill+\" vs. \"+magicDefence);\r\n \t\t\t\r\n \t\t\teffective=magicSkill>=(magicDefence*RPG.luckRandom(caster,target));\r\n \t\t}\r\n \t\t\r\n \t\tif ((caster!=null)&&target.getFlag(\"IsBeing\")&&(spell.getStat(\"SpellUsage\")==Spell.SPELL_OFFENCE)) {\r\n \t\t\tAI.notifyAttack(target,caster);\r\n \t\t}\r\n \t\t\r\n \t\tString hitname=spell.getString(\"HitName\");\r\n \t\tif (effective){\r\n \t\t\tif (hitname!=null) target.message(\"You are hit by the \"+hitname);\r\n \t\t\tEvent e=new Event(\"Effect\");\r\n \t\t\te.set(\"Strength\",magicPower);\r\n \t\t\te.set(\"Caster\",caster);\r\n \t\t\te.set(\"Target\",target);\r\n \t\t\tspell.handle(e);\r\n \t\t} else {\r\n \t\t\tif (visible) Game.message(target.getTheName()+\" \"+target.verb(\"resist\")+\" the \"+hitname);\r\n \t\t}\r\n \t}",
"@java.lang.Override\n public com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior getFillBehavior() {\n return fillBehavior_ == null\n ? com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.getDefaultInstance()\n : fillBehavior_;\n }",
"public void setTarget(String target) {\n this.target = target;\n }",
"@java.lang.Override\n public com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehaviorOrBuilder\n getFillBehaviorOrBuilder() {\n return fillBehavior_ == null\n ? com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.getDefaultInstance()\n : fillBehavior_;\n }",
"public final EObject ruleETriggerDefinition() throws RecognitionException {\n EObject current = null;\n\n Token lv_name_0_0=null;\n Token otherlv_1=null;\n Token this_BEGIN_2=null;\n Token this_END_4=null;\n EObject lv_trigger_3_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalRMParser.g:2138:2: ( ( ( (lv_name_0_0= RULE_QUALIFIED_NAME ) ) otherlv_1= Colon this_BEGIN_2= RULE_BEGIN ( (lv_trigger_3_0= ruleETriggerDefinitionBody ) ) this_END_4= RULE_END ) )\n // InternalRMParser.g:2139:2: ( ( (lv_name_0_0= RULE_QUALIFIED_NAME ) ) otherlv_1= Colon this_BEGIN_2= RULE_BEGIN ( (lv_trigger_3_0= ruleETriggerDefinitionBody ) ) this_END_4= RULE_END )\n {\n // InternalRMParser.g:2139:2: ( ( (lv_name_0_0= RULE_QUALIFIED_NAME ) ) otherlv_1= Colon this_BEGIN_2= RULE_BEGIN ( (lv_trigger_3_0= ruleETriggerDefinitionBody ) ) this_END_4= RULE_END )\n // InternalRMParser.g:2140:3: ( (lv_name_0_0= RULE_QUALIFIED_NAME ) ) otherlv_1= Colon this_BEGIN_2= RULE_BEGIN ( (lv_trigger_3_0= ruleETriggerDefinitionBody ) ) this_END_4= RULE_END\n {\n // InternalRMParser.g:2140:3: ( (lv_name_0_0= RULE_QUALIFIED_NAME ) )\n // InternalRMParser.g:2141:4: (lv_name_0_0= RULE_QUALIFIED_NAME )\n {\n // InternalRMParser.g:2141:4: (lv_name_0_0= RULE_QUALIFIED_NAME )\n // InternalRMParser.g:2142:5: lv_name_0_0= RULE_QUALIFIED_NAME\n {\n lv_name_0_0=(Token)match(input,RULE_QUALIFIED_NAME,FOLLOW_11); \n\n \t\t\t\t\tnewLeafNode(lv_name_0_0, grammarAccess.getETriggerDefinitionAccess().getNameQUALIFIED_NAMETerminalRuleCall_0_0());\n \t\t\t\t\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getETriggerDefinitionRule());\n \t\t\t\t\t}\n \t\t\t\t\tsetWithLastConsumed(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"name\",\n \t\t\t\t\t\tlv_name_0_0,\n \t\t\t\t\t\t\"org.sodalite.dsl.RM.QUALIFIED_NAME\");\n \t\t\t\t\n\n }\n\n\n }\n\n otherlv_1=(Token)match(input,Colon,FOLLOW_6); \n\n \t\t\tnewLeafNode(otherlv_1, grammarAccess.getETriggerDefinitionAccess().getColonKeyword_1());\n \t\t\n this_BEGIN_2=(Token)match(input,RULE_BEGIN,FOLLOW_31); \n\n \t\t\tnewLeafNode(this_BEGIN_2, grammarAccess.getETriggerDefinitionAccess().getBEGINTerminalRuleCall_2());\n \t\t\n // InternalRMParser.g:2166:3: ( (lv_trigger_3_0= ruleETriggerDefinitionBody ) )\n // InternalRMParser.g:2167:4: (lv_trigger_3_0= ruleETriggerDefinitionBody )\n {\n // InternalRMParser.g:2167:4: (lv_trigger_3_0= ruleETriggerDefinitionBody )\n // InternalRMParser.g:2168:5: lv_trigger_3_0= ruleETriggerDefinitionBody\n {\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getETriggerDefinitionAccess().getTriggerETriggerDefinitionBodyParserRuleCall_3_0());\n \t\t\t\t\n pushFollow(FOLLOW_8);\n lv_trigger_3_0=ruleETriggerDefinitionBody();\n\n state._fsp--;\n\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getETriggerDefinitionRule());\n \t\t\t\t\t}\n \t\t\t\t\tset(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"trigger\",\n \t\t\t\t\t\tlv_trigger_3_0,\n \t\t\t\t\t\t\"org.sodalite.dsl.RM.ETriggerDefinitionBody\");\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n\n }\n\n\n }\n\n this_END_4=(Token)match(input,RULE_END,FOLLOW_2); \n\n \t\t\tnewLeafNode(this_END_4, grammarAccess.getETriggerDefinitionAccess().getENDTerminalRuleCall_4());\n \t\t\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public void setTarget(Vector3f target) \n {\n float distance = FastMath.abs(target.y - this.getPosition().y);\n this.motionTarget = target;\n this.motionPath = new MotionPath();\n \n this.motionPath.addWayPoint(this.getPosition());\n\n this.motionPath.addWayPoint(new Vector3f(this.getPosition().x, target.y, this.getPosition().z));\n \n grabberMotion = new MotionEvent(this.node, this.motionPath);\n grabberMotion.setInitialDuration(distance / this.speed);\n }",
"private TrackingResult followTarget(Rect target)\n\t{\n\t\t// Clear any existing target rectangle.\n\t\tcamera.addTarget(null);\n\t\t\n\t\t// Outline the target being tracked.\n\t\tcamera.addTarget(target);\n\t\t\n\t\t// This is field of view size.\n\t\tSize imageSize = camera.getImageSize();\n\t\t\n\t\t// get size of target outline area.\n\t\tint targetArea = target.height * target.width;\n\t\t\n\t\t// If we have just acquired target, record initial size. Size comparison\n\t\t// is how we determine distance to target.\n\t\t\n\t\tif (initialTargetArea == 0) initialTargetArea = targetArea;\n\t\t\n\t\t// Compute center point of target in the camera view image.\n\t\tint targetCenterX = target.x + target.width / 2;\n\t\tint imageCenterX = (int) (imageSize.width / 2);\n\t\t\n\t\t// offset minus indicates target is left of image center,\n\t\t// plus to the right. If target is left, drone needs to turn\n\t\t// left to center the target in the image which is a minus yaw value.\n\t\t\n\t\tint offset = targetCenterX - imageCenterX;\n\n\t\tlogger.fine(\"offset=\" + offset);\n\t\t\n\t\toffset *= .25;\t// Scale offset down;\n\t\t\n\t\t// Determine change in distance from last target acquisition.\n\t\t\n\t\tdouble distance = initialTargetArea - targetArea;\n\t\t\n\t\tlogger.fine(String.format(\"ia=%d ta=%d dist=%.0f\", initialTargetArea, targetArea, distance));\n\t\t\n\t\t//initialTargetArea = targetArea;\n\t\t\n\t\tdouble scaleFactor = 0.0;\n\t\t\n\t\t// If distance is small, call it good otherwise the drone\n\t\t// hunts back and forth. Value must be determined by testing.\n\t\t\n\t\tif (Math.abs(distance) < 2000.0) \n\t\t\tdistance = 0.0;\n\t\telse\n\t\t{\n\t\t\t// Scale distance change to a fwd/back movement value of 20% for flyRC command.\n\t\t\t// For some unknown reason, need more power to fly forward than back and even\n\t\t\t// with 30%, forward seems not reliable.\n\t\t\t// scaleFactor must be positive to preserve the sign of distance value.\n\t\t\t\n\t\t\tscaleFactor = 20.0 / Math.abs(distance);\n\t\t\n\t\t\tdistance = distance * scaleFactor;\n\t\t}\n\t\t\n\t\tlogger.fine(String.format(\"dist=%.1f fact=%f\", distance, scaleFactor));\n\t\t\n\t\treturn new TrackingResult(offset, (int) distance);\n\t}",
"public void setDoneFlg_True() {\n setDoneFlgAsFlg(HangarCDef.Flg.True);\n }",
"public void trigger(PromiseManager pm) {\n\tthrow new SubclassResponsibilityException();\n/*\nudanax-top.st:15949:DetectorEvent methodsFor: 'triggering'!\n{void} trigger: pm {PromiseManager}\n\t\"Send the message across the wire.\"\n\t\n\tself subclassResponsibility!\n*/\n}",
"public RetriggerMode getRetriggerMode();",
"@Override\n public boolean resolve(Player player, PlayerSkills data, DynamicSkill skill, Target target, List<LivingEntity> targets) {\n\n // Requires a target\n if (targets.size() == 0) {\n return false;\n }\n\n DOTHelper helper = data.getAPI().getDOTHelper();\n int level = data.getSkillLevel(skill.getName());\n double damage = skill.getAttribute(DAMAGE, target, level);\n int duration = (int)(skill.getAttribute(DURATION, target, level) * 20);\n int frequency = (int)(skill.getAttribute(FREQUENCY, target, level) * 20);\n boolean lethal = skill.getValue(LETHAL) != 1;\n\n // Apply a DOT to all targets\n for (LivingEntity entity : targets) {\n DOTSet set = helper.getDOTSet(entity);\n set.addEffect(skill.getName(), new DOT(skill, player, duration, damage, frequency, lethal));\n }\n\n return true;\n }",
"@Test\n public void testDuplicateConditionsAndFulfillments() {\n final ThresholdSha256Condition condition = ThresholdSha256Condition.from(\n 2, Lists\n .newArrayList(subcondition1, subcondition1, subcondition2, subcondition3)\n );\n\n // Escrow Only (insufficient)\n ThresholdSha256Fulfillment fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition2, subcondition3),\n Lists.newArrayList(subfulfillment1)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(false));\n\n // Escrow Only (sufficient)\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition2, subcondition3),\n Lists.newArrayList(subfulfillment1, subfulfillment1)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Escrow+Party2\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition3),\n Lists.newArrayList(subfulfillment1, subfulfillment2)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Escrow+Party3\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition2),\n Lists.newArrayList(subfulfillment1, subfulfillment3)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Party2+Party3\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition1),\n Lists.newArrayList(subfulfillment2, subfulfillment3)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Party2+Party3 (w\\o escrow condition)\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(),\n Lists.newArrayList(subfulfillment2, subfulfillment3)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(false));\n }",
"boolean containsTrigger(String sTriggerName);",
"public String getCorporateLoanFulfillmentArrangementUpdateActionTaskReference() {\n return corporateLoanFulfillmentArrangementUpdateActionTaskReference;\n }",
"public void turnAbsolute(int target)\n {\n int heading = 360 - mrGyro.getHeading(); //Set variables to gyro readings\n double turnSpeed = 0.15;\n\n while (Math.abs(heading - target) > 45)\n { //Continue while the robot direction is further than three degrees from the target\n if (heading > target) //if gyro is positive, we will turn right\n {\n movePower(\"left\", 0.5, 0.01);\n }\n\n if (heading < target)\n {\n movePower(\"right\", 0.5, 0.01);\n }\n heading = 360 - mrGyro.getHeading(); //Set variables to gyro readings\n telemetry.addData(\"heading\", String.format(\"%03d\", heading));\n telemetry.update();\n }\n while (Math.abs(heading - target) > 10)\n { //Continue while the robot direction is further than three degrees from the target\n if (heading > target) //if gyro is positive, we will turn right\n {\n movePower(\"left\", 0.1, 0.01);\n }\n\n if (heading < target)\n {\n movePower(\"right\", 0.1, 0.01);\n }\n heading = 360 - mrGyro.getHeading(); //Set variables to gyro readings\n telemetry.addData(\"heading\", String.format(\"%03d\", heading));\n telemetry.update();\n }\n while (Math.abs(heading - target) > 5)\n { //Continue while the robot direction is further than three degrees from the target\n if (heading > target) //if gyro is positive, we will turn right\n {\n movePower(\"left\", 0.01, 0.01);\n }\n\n if (heading < target)\n {\n movePower(\"right\", 0.01, 0.01);\n }\n heading = 360 - mrGyro.getHeading(); //Set variables to gyro readings\n telemetry.addData(\"heading\", String.format(\"%03d\", heading));\n telemetry.update();\n }\n stop();\n }",
"public interface EnchantmentTrigger {}",
"@When(\"^I check whether to show a notification for WOF$\")\n public void i_check_whether_to_show_a_notification_for_WOF() throws Throwable {\n result = car.showWofNotification();\n }"
]
| [
"0.77528274",
"0.6390219",
"0.5570705",
"0.50218284",
"0.48690838",
"0.48577476",
"0.48273894",
"0.48085552",
"0.47885585",
"0.47833169",
"0.46985096",
"0.46967518",
"0.46885934",
"0.46631703",
"0.4650827",
"0.45668608",
"0.45428008",
"0.45136872",
"0.4489743",
"0.44834584",
"0.44717407",
"0.4467635",
"0.44605297",
"0.44365",
"0.43901947",
"0.43872985",
"0.4383607",
"0.43591926",
"0.4345417",
"0.43400836",
"0.4334602",
"0.43274215",
"0.4325546",
"0.42958263",
"0.42899933",
"0.42751133",
"0.42489016",
"0.42460138",
"0.42395735",
"0.42336634",
"0.42318964",
"0.42189276",
"0.42087457",
"0.41827428",
"0.41827294",
"0.41437542",
"0.41341293",
"0.41061074",
"0.41032526",
"0.40809268",
"0.40809232",
"0.4070154",
"0.40670973",
"0.4064831",
"0.4062579",
"0.4062254",
"0.40501735",
"0.40444547",
"0.40336502",
"0.40321335",
"0.4016513",
"0.40157545",
"0.39837396",
"0.39743108",
"0.39594018",
"0.3956179",
"0.39476207",
"0.394611",
"0.39445388",
"0.39374527",
"0.39253005",
"0.39234295",
"0.39085537",
"0.38969842",
"0.38923422",
"0.38849145",
"0.3879838",
"0.38773015",
"0.38761333",
"0.38693798",
"0.38635984",
"0.38624275",
"0.38617274",
"0.384988",
"0.38453615",
"0.3842801",
"0.3839875",
"0.383141",
"0.38275513",
"0.38158143",
"0.38100624",
"0.3809091",
"0.38019833",
"0.3799234",
"0.379806",
"0.37969106",
"0.37958494",
"0.3790248",
"0.378914",
"0.3789025"
]
| 0.7511251 | 1 |
The ARN of the user. | public void setArn(String arn) {
this.arn = arn;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getUserArn() {\n return this.userArn;\n }",
"String getArn();",
"public String getArn() {\n return this.arn;\n }",
"public String getArn() {\n return this.arn;\n }",
"public String getArn() {\n return this.arn;\n }",
"public String getArn() {\n return this.arn;\n }",
"@Id\n @Output\n public String getArn() {\n return arn;\n }",
"private String getRoleArn(String accout, String role){\n\t\treturn \"arn:aws:iam::\"+accout+\":role/\"+role;\n\t}",
"public String getUserAlias() {\n return userItem.getUserAlias();\n }",
"public String getARN() {\n return this.aRN;\n }",
"public String getRoleArn() {\n return roleArn;\n }",
"public String getUserAlias() {\n\t\t\treturn userAlias;\n\t\t}",
"public java.lang.String getUserAlias() {\r\n return userAlias;\r\n }",
"public String getAccountId() {\n return (String)(userItem.getId());\n }",
"public void setUserArn(String userArn) {\n this.userArn = userArn;\n }",
"public String toString() {\n return \"RoleName:DisplayName:Affiliate \" + getName() + \":\" + getDisplayName() + \":\" + getAffiliate().displayValue;\n }",
"public User withArn(String arn) {\n setArn(arn);\n return this;\n }",
"public String getSecretArn() {\n return this.secretArn;\n }",
"public String getTypeArn() {\n return this.typeArn;\n }",
"String getTopicArn();",
"public String getResourceArn() {\n return this.resourceArn;\n }",
"public String getResourceArn() {\n return this.resourceArn;\n }",
"public String getResourceArn() {\n return this.resourceArn;\n }",
"public String getOwnerAccountId() {\n return this.ownerAccountId;\n }",
"public String getTargetArn() {\n return targetArn;\n }",
"public String getTableArn() {\n return this.tableArn;\n }",
"@Override\n public String toString(){\n return role;\n }",
"public static QUser alias() {\n return _alias;\n }",
"public String getInstructor() {\n\n\t\treturn instructor;\n\t}",
"public String getNodeARN() {\n return this.nodeARN;\n }",
"public java.lang.String getUserRole() {\r\n return userRole;\r\n }",
"public String roleName() {\n return this.roleName;\n }",
"java.lang.String getAccountId();",
"java.lang.String getAccountId();",
"java.lang.String getAccountId();",
"public String getOwnerString() {\n return String.valueOf(enteredBy);\n }",
"public String getAccountId() {\r\n return (String) getAttributeInternal(ACCOUNTID);\r\n }",
"public String getEnteredBy() {\n return aao.getEnteredBy();\n }",
"public Long getUserAccountId() {\r\n return userAccountId;\r\n }",
"public String getAnalyzerArn() {\n return this.analyzerArn;\n }",
"public String getSourceArn() {\n return this.sourceArn;\n }",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getUserArn() != null)\n sb.append(\"UserArn: \").append(getUserArn()).append(\",\");\n if (getProjectRole() != null)\n sb.append(\"ProjectRole: \").append(getProjectRole()).append(\",\");\n if (getRemoteAccessAllowed() != null)\n sb.append(\"RemoteAccessAllowed: \").append(getRemoteAccessAllowed());\n sb.append(\"}\");\n return sb.toString();\n }",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getArn() != null)\n sb.append(\"Arn: \").append(getArn()).append(\",\");\n if (getUserName() != null)\n sb.append(\"UserName: \").append(\"***Sensitive Data Redacted***\").append(\",\");\n if (getEnabled() != null)\n sb.append(\"Enabled: \").append(getEnabled()).append(\",\");\n if (getStatus() != null)\n sb.append(\"Status: \").append(getStatus()).append(\",\");\n if (getFirstName() != null)\n sb.append(\"FirstName: \").append(\"***Sensitive Data Redacted***\").append(\",\");\n if (getLastName() != null)\n sb.append(\"LastName: \").append(\"***Sensitive Data Redacted***\").append(\",\");\n if (getCreatedTime() != null)\n sb.append(\"CreatedTime: \").append(getCreatedTime()).append(\",\");\n if (getAuthenticationType() != null)\n sb.append(\"AuthenticationType: \").append(getAuthenticationType());\n sb.append(\"}\");\n return sb.toString();\n }",
"@Override\n\tpublic String getAuthority() {\n\t\treturn role;\n\t}",
"public String snapshotRunAsAccountId() {\n return this.snapshotRunAsAccountId;\n }",
"public static String getUser() {\n return annotation != null ? annotation.user() : \"Unknown\";\n }",
"String roleName();",
"public String getRole() {\n \t\treturn (String)attributes.get(\"Role\");\n \t}",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getARN() != null)\n sb.append(\"ARN: \").append(getARN()).append(\",\");\n if (getExcludedRules() != null)\n sb.append(\"ExcludedRules: \").append(getExcludedRules()).append(\",\");\n if (getRuleActionOverrides() != null)\n sb.append(\"RuleActionOverrides: \").append(getRuleActionOverrides());\n sb.append(\"}\");\n return sb.toString();\n }",
"public String getAccountName() {\n return accountName;\n }",
"public String getAccountName() {\n return accountName;\n }",
"public String getAccountName() {\n return accountName;\n }",
"public String getAuditDestinationARN() {\n return this.auditDestinationARN;\n }",
"public String getRoleName() {\n return (String) getAttributeInternal(ROLENAME);\n }",
"public String getAccountName() {\n return this.accountName;\n }",
"@Override\n public String getName() {\n return this.role.getName();\n }",
"public String getInstructor ( )\n\t{\n\t\tif(instructor.length ( )==0 || instructor ==null)\n\t\t{\n\t\t\tinstructor=\"Instructor\";\n\t\t}\n\t\treturn instructor;\n\t\t\n\t}",
"public String getAccountName() {\r\n return accountName;\r\n }",
"public String getAslName() {\n return (String) getAttributeInternal(ASLNAME);\n }",
"@Override\n\tpublic String toString() {\n\t\treturn username;\n\t}",
"public java.lang.String getAccountId() {\n java.lang.Object ref = accountId_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n accountId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getAccountId() {\n java.lang.Object ref = accountId_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n accountId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getAccountId() {\n java.lang.Object ref = accountId_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n accountId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getClusterArn() {\n return this.clusterArn;\n }",
"public String getAssociatedUsername() {\n return associatedUsername;\n }",
"public java.lang.String getUser() {\n return user;\n }",
"@Override\n public String toString() {\n return username;\n }",
"public String getAgentAlias() {\n return (String)getAttributeInternal(AGENTALIAS);\n }",
"public String getUser() {\n\t\t\treturn user;\n\t\t}",
"public static String getIAMUserId(){\n \t\t// There are a few places where we can find this\n \t\tString id = System.getProperty(\"AWS_ACCESS_KEY_ID\");\n \t\tif(id != null) return id;\n \t\tid = System.getProperty(STACK_IAM_ID);\n \t\tif (id == null) return null;\n \t\tid = id.trim();\n \t\tif (\"\".equals(id)) return null;\n \t\treturn id;\n \t}",
"public String getName() {\n return user.getName();\n }",
"public String getInstructor()\n\t{\n\t\tString strInstructor;\n\t\tstrInstructor=this.instructor;\n\t\treturn strInstructor;\n\t}",
"public String getAccountNameNav() {\n\t\treturn keypad.AccountNameNavDrawer.getText();\n\t}",
"public String getUserAccount() {\n return sessionData.getUserAccount();\n }",
"public String getUserURI() {\n return host + userResource;\n }",
"public String getUser() {\n\t\treturn user;\n\t}",
"public String getProviderArn() {\n return this.providerArn;\n }",
"public String getInstructorName() {\n return instructorName;\n }",
"public String aadAuthority() {\n return this.aadAuthority;\n }",
"public String toString() {\n return (\"Principal's username: \" + name);\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"Role : \"+name().toLowerCase();\n\t}",
"public void setARN(String aRN) {\n this.aRN = aRN;\n }",
"public String getUser() {\r\n\t\treturn user;\r\n\t}",
"public String getUser() {\r\n\t\treturn user;\r\n\t}",
"public static String getIAMUserKey(){\n \t\t// There are a few places to look for this\n \t\tString key = System.getProperty(\"AWS_SECRET_KEY\");\n \t\tif(key != null) return key;\n \t\tkey = System.getProperty(STACK_IAM_KEY);\n \t\tif (key == null) return null;\n \t\tkey = key.trim();\n \t\tif (\"\".equals(key)) return null;\n \t\treturn key;\n \t}",
"public String getUser() {\n if(user == null)\n return \"\"; \n return user;\n }",
"@Override\n public String toString(){\n return String.format(\"ApplicationUser ehrId: '%s', shimmerId: '%s', shimKey: '%s', is logged in: '%s'\", applicationUserId.getEhrId(), shimmerId, getApplicationUserId().getShimKey());\n }",
"public String getUser() {\n return user;\n }",
"public String getUser() {\n return user;\n }",
"public String getUser() {\n return user;\n }",
"@XmlAttribute\r\n public String getRole() {\r\n return role;\r\n }",
"public java.lang.String getAccountId() {\n java.lang.Object ref = accountId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n accountId_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getAccountId() {\n java.lang.Object ref = accountId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n accountId_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getAccountId() {\n java.lang.Object ref = accountId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n accountId_ = s;\n }\n return s;\n }\n }",
"public String getDataLakeArn() {\n return this.dataLakeArn;\n }",
"public String toString () {\n\t\treturn \"User, name = \" + this.getName() + \" id = \" + this.getId();\n \t}",
"public String getUserIdentity()\n {\n return userIdentity;\n }"
]
| [
"0.77716017",
"0.7066828",
"0.69880575",
"0.69880575",
"0.69880575",
"0.69880575",
"0.6489828",
"0.63612413",
"0.6148722",
"0.61203575",
"0.60555124",
"0.6000592",
"0.59179157",
"0.58297867",
"0.57366854",
"0.5693056",
"0.56469065",
"0.5559157",
"0.5542567",
"0.54868937",
"0.5414682",
"0.5414682",
"0.5414682",
"0.53850055",
"0.5376325",
"0.537205",
"0.53684676",
"0.5360357",
"0.53532225",
"0.5340453",
"0.53106934",
"0.53079724",
"0.53045386",
"0.53045386",
"0.53045386",
"0.52982306",
"0.5272257",
"0.5260661",
"0.5240882",
"0.52258873",
"0.52119124",
"0.5208858",
"0.5199228",
"0.5190622",
"0.51890606",
"0.517808",
"0.51705307",
"0.5165018",
"0.51639104",
"0.51484984",
"0.51484984",
"0.51484984",
"0.5146445",
"0.5145102",
"0.51283705",
"0.5126464",
"0.51248693",
"0.51154137",
"0.5112693",
"0.51042944",
"0.5103994",
"0.5103994",
"0.5103994",
"0.5099464",
"0.50955665",
"0.50791454",
"0.5073794",
"0.5068705",
"0.50525635",
"0.50512403",
"0.5045066",
"0.5039826",
"0.503306",
"0.5031902",
"0.5018717",
"0.5010327",
"0.50095147",
"0.50070643",
"0.5003642",
"0.5003261",
"0.4997582",
"0.49871653",
"0.49840787",
"0.49840787",
"0.4978194",
"0.49753478",
"0.49725237",
"0.4964904",
"0.4964904",
"0.4964904",
"0.49636284",
"0.49633762",
"0.49633762",
"0.49633762",
"0.49626693",
"0.49605006",
"0.49600717"
]
| 0.53719413 | 28 |
The ARN of the user. | public String getArn() {
return this.arn;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getUserArn() {\n return this.userArn;\n }",
"String getArn();",
"@Id\n @Output\n public String getArn() {\n return arn;\n }",
"private String getRoleArn(String accout, String role){\n\t\treturn \"arn:aws:iam::\"+accout+\":role/\"+role;\n\t}",
"public String getUserAlias() {\n return userItem.getUserAlias();\n }",
"public String getARN() {\n return this.aRN;\n }",
"public String getRoleArn() {\n return roleArn;\n }",
"public String getUserAlias() {\n\t\t\treturn userAlias;\n\t\t}",
"public java.lang.String getUserAlias() {\r\n return userAlias;\r\n }",
"public String getAccountId() {\n return (String)(userItem.getId());\n }",
"public void setUserArn(String userArn) {\n this.userArn = userArn;\n }",
"public String toString() {\n return \"RoleName:DisplayName:Affiliate \" + getName() + \":\" + getDisplayName() + \":\" + getAffiliate().displayValue;\n }",
"public User withArn(String arn) {\n setArn(arn);\n return this;\n }",
"public String getSecretArn() {\n return this.secretArn;\n }",
"public String getTypeArn() {\n return this.typeArn;\n }",
"String getTopicArn();",
"public String getResourceArn() {\n return this.resourceArn;\n }",
"public String getResourceArn() {\n return this.resourceArn;\n }",
"public String getResourceArn() {\n return this.resourceArn;\n }",
"public String getOwnerAccountId() {\n return this.ownerAccountId;\n }",
"public String getTargetArn() {\n return targetArn;\n }",
"public String getTableArn() {\n return this.tableArn;\n }",
"public void setArn(String arn) {\n this.arn = arn;\n }",
"public void setArn(String arn) {\n this.arn = arn;\n }",
"public void setArn(String arn) {\n this.arn = arn;\n }",
"public void setArn(String arn) {\n this.arn = arn;\n }",
"@Override\n public String toString(){\n return role;\n }",
"public static QUser alias() {\n return _alias;\n }",
"public String getInstructor() {\n\n\t\treturn instructor;\n\t}",
"public String getNodeARN() {\n return this.nodeARN;\n }",
"public java.lang.String getUserRole() {\r\n return userRole;\r\n }",
"public String roleName() {\n return this.roleName;\n }",
"java.lang.String getAccountId();",
"java.lang.String getAccountId();",
"java.lang.String getAccountId();",
"public String getOwnerString() {\n return String.valueOf(enteredBy);\n }",
"public String getAccountId() {\r\n return (String) getAttributeInternal(ACCOUNTID);\r\n }",
"public String getEnteredBy() {\n return aao.getEnteredBy();\n }",
"public Long getUserAccountId() {\r\n return userAccountId;\r\n }",
"public String getAnalyzerArn() {\n return this.analyzerArn;\n }",
"public String getSourceArn() {\n return this.sourceArn;\n }",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getUserArn() != null)\n sb.append(\"UserArn: \").append(getUserArn()).append(\",\");\n if (getProjectRole() != null)\n sb.append(\"ProjectRole: \").append(getProjectRole()).append(\",\");\n if (getRemoteAccessAllowed() != null)\n sb.append(\"RemoteAccessAllowed: \").append(getRemoteAccessAllowed());\n sb.append(\"}\");\n return sb.toString();\n }",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getArn() != null)\n sb.append(\"Arn: \").append(getArn()).append(\",\");\n if (getUserName() != null)\n sb.append(\"UserName: \").append(\"***Sensitive Data Redacted***\").append(\",\");\n if (getEnabled() != null)\n sb.append(\"Enabled: \").append(getEnabled()).append(\",\");\n if (getStatus() != null)\n sb.append(\"Status: \").append(getStatus()).append(\",\");\n if (getFirstName() != null)\n sb.append(\"FirstName: \").append(\"***Sensitive Data Redacted***\").append(\",\");\n if (getLastName() != null)\n sb.append(\"LastName: \").append(\"***Sensitive Data Redacted***\").append(\",\");\n if (getCreatedTime() != null)\n sb.append(\"CreatedTime: \").append(getCreatedTime()).append(\",\");\n if (getAuthenticationType() != null)\n sb.append(\"AuthenticationType: \").append(getAuthenticationType());\n sb.append(\"}\");\n return sb.toString();\n }",
"@Override\n\tpublic String getAuthority() {\n\t\treturn role;\n\t}",
"public String snapshotRunAsAccountId() {\n return this.snapshotRunAsAccountId;\n }",
"public static String getUser() {\n return annotation != null ? annotation.user() : \"Unknown\";\n }",
"String roleName();",
"public String getRole() {\n \t\treturn (String)attributes.get(\"Role\");\n \t}",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getARN() != null)\n sb.append(\"ARN: \").append(getARN()).append(\",\");\n if (getExcludedRules() != null)\n sb.append(\"ExcludedRules: \").append(getExcludedRules()).append(\",\");\n if (getRuleActionOverrides() != null)\n sb.append(\"RuleActionOverrides: \").append(getRuleActionOverrides());\n sb.append(\"}\");\n return sb.toString();\n }",
"public String getAccountName() {\n return accountName;\n }",
"public String getAccountName() {\n return accountName;\n }",
"public String getAccountName() {\n return accountName;\n }",
"public String getAuditDestinationARN() {\n return this.auditDestinationARN;\n }",
"public String getRoleName() {\n return (String) getAttributeInternal(ROLENAME);\n }",
"public String getAccountName() {\n return this.accountName;\n }",
"@Override\n public String getName() {\n return this.role.getName();\n }",
"public String getInstructor ( )\n\t{\n\t\tif(instructor.length ( )==0 || instructor ==null)\n\t\t{\n\t\t\tinstructor=\"Instructor\";\n\t\t}\n\t\treturn instructor;\n\t\t\n\t}",
"public String getAccountName() {\r\n return accountName;\r\n }",
"public String getAslName() {\n return (String) getAttributeInternal(ASLNAME);\n }",
"@Override\n\tpublic String toString() {\n\t\treturn username;\n\t}",
"public java.lang.String getAccountId() {\n java.lang.Object ref = accountId_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n accountId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getAccountId() {\n java.lang.Object ref = accountId_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n accountId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getAccountId() {\n java.lang.Object ref = accountId_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n accountId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getClusterArn() {\n return this.clusterArn;\n }",
"public String getAssociatedUsername() {\n return associatedUsername;\n }",
"public java.lang.String getUser() {\n return user;\n }",
"@Override\n public String toString() {\n return username;\n }",
"public String getAgentAlias() {\n return (String)getAttributeInternal(AGENTALIAS);\n }",
"public String getUser() {\n\t\t\treturn user;\n\t\t}",
"public static String getIAMUserId(){\n \t\t// There are a few places where we can find this\n \t\tString id = System.getProperty(\"AWS_ACCESS_KEY_ID\");\n \t\tif(id != null) return id;\n \t\tid = System.getProperty(STACK_IAM_ID);\n \t\tif (id == null) return null;\n \t\tid = id.trim();\n \t\tif (\"\".equals(id)) return null;\n \t\treturn id;\n \t}",
"public String getName() {\n return user.getName();\n }",
"public String getInstructor()\n\t{\n\t\tString strInstructor;\n\t\tstrInstructor=this.instructor;\n\t\treturn strInstructor;\n\t}",
"public String getAccountNameNav() {\n\t\treturn keypad.AccountNameNavDrawer.getText();\n\t}",
"public String getUserAccount() {\n return sessionData.getUserAccount();\n }",
"public String getUserURI() {\n return host + userResource;\n }",
"public String getUser() {\n\t\treturn user;\n\t}",
"public String getProviderArn() {\n return this.providerArn;\n }",
"public String getInstructorName() {\n return instructorName;\n }",
"public String aadAuthority() {\n return this.aadAuthority;\n }",
"public String toString() {\n return (\"Principal's username: \" + name);\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"Role : \"+name().toLowerCase();\n\t}",
"public void setARN(String aRN) {\n this.aRN = aRN;\n }",
"public String getUser() {\r\n\t\treturn user;\r\n\t}",
"public String getUser() {\r\n\t\treturn user;\r\n\t}",
"public static String getIAMUserKey(){\n \t\t// There are a few places to look for this\n \t\tString key = System.getProperty(\"AWS_SECRET_KEY\");\n \t\tif(key != null) return key;\n \t\tkey = System.getProperty(STACK_IAM_KEY);\n \t\tif (key == null) return null;\n \t\tkey = key.trim();\n \t\tif (\"\".equals(key)) return null;\n \t\treturn key;\n \t}",
"public String getUser() {\n if(user == null)\n return \"\"; \n return user;\n }",
"@Override\n public String toString(){\n return String.format(\"ApplicationUser ehrId: '%s', shimmerId: '%s', shimKey: '%s', is logged in: '%s'\", applicationUserId.getEhrId(), shimmerId, getApplicationUserId().getShimKey());\n }",
"public String getUser() {\n return user;\n }",
"public String getUser() {\n return user;\n }",
"public String getUser() {\n return user;\n }",
"@XmlAttribute\r\n public String getRole() {\r\n return role;\r\n }",
"public java.lang.String getAccountId() {\n java.lang.Object ref = accountId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n accountId_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getAccountId() {\n java.lang.Object ref = accountId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n accountId_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getAccountId() {\n java.lang.Object ref = accountId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n accountId_ = s;\n }\n return s;\n }\n }",
"public String getDataLakeArn() {\n return this.dataLakeArn;\n }",
"public String toString () {\n\t\treturn \"User, name = \" + this.getName() + \" id = \" + this.getId();\n \t}",
"public String getUserIdentity()\n {\n return userIdentity;\n }"
]
| [
"0.77716017",
"0.7066828",
"0.6489828",
"0.63612413",
"0.6148722",
"0.61203575",
"0.60555124",
"0.6000592",
"0.59179157",
"0.58297867",
"0.57366854",
"0.5693056",
"0.56469065",
"0.5559157",
"0.5542567",
"0.54868937",
"0.5414682",
"0.5414682",
"0.5414682",
"0.53850055",
"0.5376325",
"0.537205",
"0.53719413",
"0.53719413",
"0.53719413",
"0.53719413",
"0.53684676",
"0.5360357",
"0.53532225",
"0.5340453",
"0.53106934",
"0.53079724",
"0.53045386",
"0.53045386",
"0.53045386",
"0.52982306",
"0.5272257",
"0.5260661",
"0.5240882",
"0.52258873",
"0.52119124",
"0.5208858",
"0.5199228",
"0.5190622",
"0.51890606",
"0.517808",
"0.51705307",
"0.5165018",
"0.51639104",
"0.51484984",
"0.51484984",
"0.51484984",
"0.5146445",
"0.5145102",
"0.51283705",
"0.5126464",
"0.51248693",
"0.51154137",
"0.5112693",
"0.51042944",
"0.5103994",
"0.5103994",
"0.5103994",
"0.5099464",
"0.50955665",
"0.50791454",
"0.5073794",
"0.5068705",
"0.50525635",
"0.50512403",
"0.5045066",
"0.5039826",
"0.503306",
"0.5031902",
"0.5018717",
"0.5010327",
"0.50095147",
"0.50070643",
"0.5003642",
"0.5003261",
"0.4997582",
"0.49871653",
"0.49840787",
"0.49840787",
"0.4978194",
"0.49753478",
"0.49725237",
"0.4964904",
"0.4964904",
"0.4964904",
"0.49636284",
"0.49633762",
"0.49633762",
"0.49633762",
"0.49626693",
"0.49605006",
"0.49600717"
]
| 0.69880575 | 5 |
The ARN of the user. | public User withArn(String arn) {
setArn(arn);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getUserArn() {\n return this.userArn;\n }",
"String getArn();",
"public String getArn() {\n return this.arn;\n }",
"public String getArn() {\n return this.arn;\n }",
"public String getArn() {\n return this.arn;\n }",
"public String getArn() {\n return this.arn;\n }",
"@Id\n @Output\n public String getArn() {\n return arn;\n }",
"private String getRoleArn(String accout, String role){\n\t\treturn \"arn:aws:iam::\"+accout+\":role/\"+role;\n\t}",
"public String getUserAlias() {\n return userItem.getUserAlias();\n }",
"public String getARN() {\n return this.aRN;\n }",
"public String getRoleArn() {\n return roleArn;\n }",
"public String getUserAlias() {\n\t\t\treturn userAlias;\n\t\t}",
"public java.lang.String getUserAlias() {\r\n return userAlias;\r\n }",
"public String getAccountId() {\n return (String)(userItem.getId());\n }",
"public void setUserArn(String userArn) {\n this.userArn = userArn;\n }",
"public String toString() {\n return \"RoleName:DisplayName:Affiliate \" + getName() + \":\" + getDisplayName() + \":\" + getAffiliate().displayValue;\n }",
"public String getSecretArn() {\n return this.secretArn;\n }",
"public String getTypeArn() {\n return this.typeArn;\n }",
"String getTopicArn();",
"public String getResourceArn() {\n return this.resourceArn;\n }",
"public String getResourceArn() {\n return this.resourceArn;\n }",
"public String getResourceArn() {\n return this.resourceArn;\n }",
"public String getOwnerAccountId() {\n return this.ownerAccountId;\n }",
"public String getTargetArn() {\n return targetArn;\n }",
"public String getTableArn() {\n return this.tableArn;\n }",
"public void setArn(String arn) {\n this.arn = arn;\n }",
"public void setArn(String arn) {\n this.arn = arn;\n }",
"public void setArn(String arn) {\n this.arn = arn;\n }",
"public void setArn(String arn) {\n this.arn = arn;\n }",
"@Override\n public String toString(){\n return role;\n }",
"public static QUser alias() {\n return _alias;\n }",
"public String getInstructor() {\n\n\t\treturn instructor;\n\t}",
"public String getNodeARN() {\n return this.nodeARN;\n }",
"public java.lang.String getUserRole() {\r\n return userRole;\r\n }",
"public String roleName() {\n return this.roleName;\n }",
"java.lang.String getAccountId();",
"java.lang.String getAccountId();",
"java.lang.String getAccountId();",
"public String getOwnerString() {\n return String.valueOf(enteredBy);\n }",
"public String getAccountId() {\r\n return (String) getAttributeInternal(ACCOUNTID);\r\n }",
"public String getEnteredBy() {\n return aao.getEnteredBy();\n }",
"public Long getUserAccountId() {\r\n return userAccountId;\r\n }",
"public String getAnalyzerArn() {\n return this.analyzerArn;\n }",
"public String getSourceArn() {\n return this.sourceArn;\n }",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getUserArn() != null)\n sb.append(\"UserArn: \").append(getUserArn()).append(\",\");\n if (getProjectRole() != null)\n sb.append(\"ProjectRole: \").append(getProjectRole()).append(\",\");\n if (getRemoteAccessAllowed() != null)\n sb.append(\"RemoteAccessAllowed: \").append(getRemoteAccessAllowed());\n sb.append(\"}\");\n return sb.toString();\n }",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getArn() != null)\n sb.append(\"Arn: \").append(getArn()).append(\",\");\n if (getUserName() != null)\n sb.append(\"UserName: \").append(\"***Sensitive Data Redacted***\").append(\",\");\n if (getEnabled() != null)\n sb.append(\"Enabled: \").append(getEnabled()).append(\",\");\n if (getStatus() != null)\n sb.append(\"Status: \").append(getStatus()).append(\",\");\n if (getFirstName() != null)\n sb.append(\"FirstName: \").append(\"***Sensitive Data Redacted***\").append(\",\");\n if (getLastName() != null)\n sb.append(\"LastName: \").append(\"***Sensitive Data Redacted***\").append(\",\");\n if (getCreatedTime() != null)\n sb.append(\"CreatedTime: \").append(getCreatedTime()).append(\",\");\n if (getAuthenticationType() != null)\n sb.append(\"AuthenticationType: \").append(getAuthenticationType());\n sb.append(\"}\");\n return sb.toString();\n }",
"@Override\n\tpublic String getAuthority() {\n\t\treturn role;\n\t}",
"public String snapshotRunAsAccountId() {\n return this.snapshotRunAsAccountId;\n }",
"public static String getUser() {\n return annotation != null ? annotation.user() : \"Unknown\";\n }",
"String roleName();",
"public String getRole() {\n \t\treturn (String)attributes.get(\"Role\");\n \t}",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getARN() != null)\n sb.append(\"ARN: \").append(getARN()).append(\",\");\n if (getExcludedRules() != null)\n sb.append(\"ExcludedRules: \").append(getExcludedRules()).append(\",\");\n if (getRuleActionOverrides() != null)\n sb.append(\"RuleActionOverrides: \").append(getRuleActionOverrides());\n sb.append(\"}\");\n return sb.toString();\n }",
"public String getAccountName() {\n return accountName;\n }",
"public String getAccountName() {\n return accountName;\n }",
"public String getAccountName() {\n return accountName;\n }",
"public String getAuditDestinationARN() {\n return this.auditDestinationARN;\n }",
"public String getRoleName() {\n return (String) getAttributeInternal(ROLENAME);\n }",
"public String getAccountName() {\n return this.accountName;\n }",
"@Override\n public String getName() {\n return this.role.getName();\n }",
"public String getInstructor ( )\n\t{\n\t\tif(instructor.length ( )==0 || instructor ==null)\n\t\t{\n\t\t\tinstructor=\"Instructor\";\n\t\t}\n\t\treturn instructor;\n\t\t\n\t}",
"public String getAccountName() {\r\n return accountName;\r\n }",
"public String getAslName() {\n return (String) getAttributeInternal(ASLNAME);\n }",
"@Override\n\tpublic String toString() {\n\t\treturn username;\n\t}",
"public java.lang.String getAccountId() {\n java.lang.Object ref = accountId_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n accountId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getAccountId() {\n java.lang.Object ref = accountId_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n accountId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getAccountId() {\n java.lang.Object ref = accountId_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n accountId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getClusterArn() {\n return this.clusterArn;\n }",
"public String getAssociatedUsername() {\n return associatedUsername;\n }",
"public java.lang.String getUser() {\n return user;\n }",
"@Override\n public String toString() {\n return username;\n }",
"public String getAgentAlias() {\n return (String)getAttributeInternal(AGENTALIAS);\n }",
"public String getUser() {\n\t\t\treturn user;\n\t\t}",
"public static String getIAMUserId(){\n \t\t// There are a few places where we can find this\n \t\tString id = System.getProperty(\"AWS_ACCESS_KEY_ID\");\n \t\tif(id != null) return id;\n \t\tid = System.getProperty(STACK_IAM_ID);\n \t\tif (id == null) return null;\n \t\tid = id.trim();\n \t\tif (\"\".equals(id)) return null;\n \t\treturn id;\n \t}",
"public String getName() {\n return user.getName();\n }",
"public String getInstructor()\n\t{\n\t\tString strInstructor;\n\t\tstrInstructor=this.instructor;\n\t\treturn strInstructor;\n\t}",
"public String getUserAccount() {\n return sessionData.getUserAccount();\n }",
"public String getAccountNameNav() {\n\t\treturn keypad.AccountNameNavDrawer.getText();\n\t}",
"public String getUserURI() {\n return host + userResource;\n }",
"public String getUser() {\n\t\treturn user;\n\t}",
"public String getProviderArn() {\n return this.providerArn;\n }",
"public String getInstructorName() {\n return instructorName;\n }",
"public String toString() {\n return (\"Principal's username: \" + name);\n }",
"public String aadAuthority() {\n return this.aadAuthority;\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"Role : \"+name().toLowerCase();\n\t}",
"public String getUser() {\r\n\t\treturn user;\r\n\t}",
"public String getUser() {\r\n\t\treturn user;\r\n\t}",
"public void setARN(String aRN) {\n this.aRN = aRN;\n }",
"public static String getIAMUserKey(){\n \t\t// There are a few places to look for this\n \t\tString key = System.getProperty(\"AWS_SECRET_KEY\");\n \t\tif(key != null) return key;\n \t\tkey = System.getProperty(STACK_IAM_KEY);\n \t\tif (key == null) return null;\n \t\tkey = key.trim();\n \t\tif (\"\".equals(key)) return null;\n \t\treturn key;\n \t}",
"public String getUser() {\n if(user == null)\n return \"\"; \n return user;\n }",
"@Override\n public String toString(){\n return String.format(\"ApplicationUser ehrId: '%s', shimmerId: '%s', shimKey: '%s', is logged in: '%s'\", applicationUserId.getEhrId(), shimmerId, getApplicationUserId().getShimKey());\n }",
"public String getUser() {\n return user;\n }",
"public String getUser() {\n return user;\n }",
"public String getUser() {\n return user;\n }",
"public java.lang.String getAccountId() {\n java.lang.Object ref = accountId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n accountId_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getAccountId() {\n java.lang.Object ref = accountId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n accountId_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getAccountId() {\n java.lang.Object ref = accountId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n accountId_ = s;\n }\n return s;\n }\n }",
"public String getUserIdentity()\n {\n return userIdentity;\n }",
"@XmlAttribute\r\n public String getRole() {\r\n return role;\r\n }",
"public String toString () {\n\t\treturn \"User, name = \" + this.getName() + \" id = \" + this.getId();\n \t}",
"public String getDataLakeArn() {\n return this.dataLakeArn;\n }"
]
| [
"0.77737033",
"0.70652616",
"0.6986296",
"0.6986296",
"0.6986296",
"0.6986296",
"0.64879984",
"0.63592315",
"0.6151001",
"0.6120382",
"0.60542107",
"0.6002722",
"0.5919939",
"0.5830687",
"0.5737467",
"0.5693264",
"0.5559941",
"0.55425185",
"0.54842174",
"0.5413874",
"0.5413874",
"0.5413874",
"0.5384923",
"0.5376029",
"0.53706354",
"0.53691614",
"0.53691614",
"0.53691614",
"0.53691614",
"0.536877",
"0.5361805",
"0.53529644",
"0.5341465",
"0.53131837",
"0.53080344",
"0.5304718",
"0.5304718",
"0.5304718",
"0.52985275",
"0.5272135",
"0.52605075",
"0.5243091",
"0.522331",
"0.52105904",
"0.52089274",
"0.51985747",
"0.5191414",
"0.51899344",
"0.518284",
"0.51713735",
"0.5165896",
"0.5162453",
"0.5148307",
"0.5148307",
"0.5148307",
"0.5145344",
"0.5145268",
"0.5128223",
"0.5127136",
"0.5124516",
"0.5115218",
"0.511169",
"0.5105297",
"0.5104266",
"0.5104266",
"0.5104266",
"0.5097705",
"0.5096342",
"0.50844043",
"0.5074725",
"0.50678027",
"0.5057488",
"0.50539964",
"0.50478655",
"0.50400054",
"0.503484",
"0.503316",
"0.50229514",
"0.5015411",
"0.5009691",
"0.5005994",
"0.5003489",
"0.5003391",
"0.49972787",
"0.498915",
"0.498915",
"0.49863568",
"0.49809644",
"0.4979829",
"0.4974614",
"0.49699563",
"0.49699563",
"0.49699563",
"0.4963972",
"0.4963972",
"0.4963972",
"0.49637476",
"0.49633628",
"0.4962058",
"0.49614626"
]
| 0.5649144 | 16 |
The email address of the user. Users' email addresses are casesensitive. | public void setUserName(String userName) {
this.userName = userName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String getUserEmailAddress() {\n\t\tUser user = UserDirectoryService.getCurrentUser();\n\t\tString emailAddress = user.getEmail();\n\n\t\treturn emailAddress;\n\t}",
"public String getEmail() {\n return sp.getString(USER_EMAIL, null);\n }",
"public java.lang.String getUserEmail() {\n java.lang.Object ref = userEmail_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n userEmail_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getUserEmail() {\n java.lang.Object ref = userEmail_;\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 userEmail_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getUserEmail() {\r\n return userEmail;\r\n }",
"java.lang.String getUserEmail();",
"public String getUserEmail() {\n return sharedPreferences.getString(PREFERENCE_USER_EMAIL, \"\");\n }",
"public String getUserEmail() {\r\n return userEmail;\r\n }",
"public String getUserEmail() {\r\n return userEmail;\r\n }",
"public String getUserEmail() {\n return userEmail;\n }",
"public final String getEmail() {\n return email;\n }",
"public final String getEmail() {\n\t\treturn email;\n\t}",
"public java.lang.String getEmailAddress() {\n return EmailAddress;\n }",
"public java.lang.CharSequence getEmailAddress() {\n return email_address;\n }",
"public String getEmailAddress() {\r\n\t\treturn emailAddress;\r\n\t}",
"public java.lang.CharSequence getEmailAddress() {\n return email_address;\n }",
"public java.lang.String getEmailAddress();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"public String getEmail()\n\t{\n\t\treturn this._email;\n\t}",
"public String getEmailAddress() {\r\n return email;\r\n }",
"public java.lang.String getEmail() {\n return email;\n }",
"public java.lang.String getEmail() {\n return email;\n }",
"public java.lang.String getEmail() {\n return email;\n }",
"public java.lang.String getEmail() {\n return email;\n }",
"@AutoEscape\n\tpublic String getEmail_address();",
"public String getEmail() {\r\n\t\treturn email;\r\n\t}",
"public String getEmail() {\r\n\t\treturn email;\r\n\t}",
"public String getEmail() {\r\n\t\treturn email;\r\n\t}",
"public String getEmailAddress(){\r\n\t\treturn emailAddress;\r\n\t}",
"public static String getUserEmail() {\r\n return null;\r\n }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n email_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n email_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getEmailAddress() {\r\n return emailAddress;\r\n }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\n\t\treturn Email;\n\t}",
"public java.lang.String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public java.lang.String getEmail () {\n\t\treturn email;\n\t}",
"public String getEmail() {\n return userItem.getEmail();\n }",
"public String getEmailAddress() {\n return email;\n }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n }\n return s;\n }\n }",
"public String getEmail()\n\t{\n\t\treturn this.email;\n\t}",
"public String getEmailAddress() {\n return emailAddress;\n }",
"public String getEmailAddress() {\n return emailAddress;\n }",
"public String getEmailAddress() {\n return emailAddress;\n }",
"public String getEmailAddress() {\n return emailAddress;\n }",
"public String getEmailAddress() {\n return emailAddress;\n }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n email_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getEmail() {\n return email;\n }",
"public java.lang.String getEmail() {\n\t\t\t\tjava.lang.Object ref = email_;\n\t\t\t\tif (!(ref instanceof java.lang.String)) {\n\t\t\t\t\tcom.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n\t\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\t\temail_ = s;\n\t\t\t\t\treturn s;\n\t\t\t\t} else {\n\t\t\t\t\treturn (java.lang.String) ref;\n\t\t\t\t}\n\t\t\t}",
"public java.lang.String getEmail() {\n\t\t\tjava.lang.Object ref = email_;\n\t\t\tif (ref instanceof java.lang.String) {\n\t\t\t\treturn (java.lang.String) ref;\n\t\t\t} else {\n\t\t\t\tcom.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\temail_ = s;\n\t\t\t\treturn s;\n\t\t\t}\n\t\t}",
"public String getEmailAddress() {\n return this.emailAddress;\n }",
"public String getEmailAddress() {\n return emailAddress;\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmailAddress()\r\n {\r\n return emailAddress;\r\n }",
"public String getEmail()\n {\n return emailAddress;\n }",
"public java.lang.String getEmail() {\n return localEmail;\n }",
"@java.lang.Override\n public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n return s;\n }\n }",
"@ApiModelProperty(value = \"User's email. Effect: Controls the value of the corresponding CfgPerson attribute \")\n public String getEmailAddress() {\n return emailAddress;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }"
]
| [
"0.84626836",
"0.83725166",
"0.83345735",
"0.8331046",
"0.822296",
"0.8205672",
"0.807341",
"0.8008404",
"0.8008404",
"0.79544806",
"0.7866207",
"0.7823317",
"0.77799344",
"0.7766912",
"0.77381146",
"0.77204114",
"0.7700737",
"0.767039",
"0.767039",
"0.767039",
"0.767039",
"0.767039",
"0.767039",
"0.76667964",
"0.76658535",
"0.76532406",
"0.76532406",
"0.76532406",
"0.76532406",
"0.76474774",
"0.7641038",
"0.7641038",
"0.7641038",
"0.76346856",
"0.76278543",
"0.7621448",
"0.7621448",
"0.76200795",
"0.7613102",
"0.761019",
"0.7596061",
"0.7595712",
"0.7593074",
"0.7593074",
"0.7593074",
"0.7593074",
"0.7593074",
"0.7593074",
"0.7593074",
"0.7593074",
"0.7593074",
"0.7593074",
"0.7593074",
"0.7593074",
"0.75924045",
"0.7586393",
"0.75797254",
"0.75745046",
"0.75745046",
"0.75745046",
"0.7573074",
"0.7570436",
"0.7570436",
"0.7570436",
"0.7570436",
"0.7570436",
"0.75501245",
"0.7540501",
"0.75261396",
"0.7485679",
"0.74778175",
"0.74619704",
"0.7451824",
"0.7451824",
"0.7451824",
"0.7451824",
"0.7451824",
"0.7451824",
"0.7451824",
"0.7451824",
"0.7451824",
"0.7451824",
"0.7451824",
"0.7451565",
"0.7446063",
"0.7445275",
"0.73972964",
"0.73903507",
"0.7383504",
"0.7383504",
"0.7383504",
"0.7383504",
"0.7383504",
"0.7383504",
"0.7383504",
"0.7383504",
"0.7383504",
"0.7383504",
"0.7383504",
"0.7383504",
"0.7383504"
]
| 0.0 | -1 |
The email address of the user. Users' email addresses are casesensitive. | public String getUserName() {
return this.userName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String getUserEmailAddress() {\n\t\tUser user = UserDirectoryService.getCurrentUser();\n\t\tString emailAddress = user.getEmail();\n\n\t\treturn emailAddress;\n\t}",
"public String getEmail() {\n return sp.getString(USER_EMAIL, null);\n }",
"public java.lang.String getUserEmail() {\n java.lang.Object ref = userEmail_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n userEmail_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getUserEmail() {\n java.lang.Object ref = userEmail_;\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 userEmail_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getUserEmail() {\r\n return userEmail;\r\n }",
"java.lang.String getUserEmail();",
"public String getUserEmail() {\n return sharedPreferences.getString(PREFERENCE_USER_EMAIL, \"\");\n }",
"public String getUserEmail() {\r\n return userEmail;\r\n }",
"public String getUserEmail() {\r\n return userEmail;\r\n }",
"public String getUserEmail() {\n return userEmail;\n }",
"public final String getEmail() {\n return email;\n }",
"public final String getEmail() {\n\t\treturn email;\n\t}",
"public java.lang.String getEmailAddress() {\n return EmailAddress;\n }",
"public java.lang.CharSequence getEmailAddress() {\n return email_address;\n }",
"public String getEmailAddress() {\r\n\t\treturn emailAddress;\r\n\t}",
"public java.lang.CharSequence getEmailAddress() {\n return email_address;\n }",
"public java.lang.String getEmailAddress();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"public String getEmail()\n\t{\n\t\treturn this._email;\n\t}",
"public String getEmailAddress() {\r\n return email;\r\n }",
"public java.lang.String getEmail() {\n return email;\n }",
"public java.lang.String getEmail() {\n return email;\n }",
"public java.lang.String getEmail() {\n return email;\n }",
"public java.lang.String getEmail() {\n return email;\n }",
"@AutoEscape\n\tpublic String getEmail_address();",
"public String getEmail() {\r\n\t\treturn email;\r\n\t}",
"public String getEmail() {\r\n\t\treturn email;\r\n\t}",
"public String getEmail() {\r\n\t\treturn email;\r\n\t}",
"public String getEmailAddress(){\r\n\t\treturn emailAddress;\r\n\t}",
"public static String getUserEmail() {\r\n return null;\r\n }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n email_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n email_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getEmailAddress() {\r\n return emailAddress;\r\n }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\n\t\treturn Email;\n\t}",
"public java.lang.String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public java.lang.String getEmail () {\n\t\treturn email;\n\t}",
"public String getEmail() {\n return userItem.getEmail();\n }",
"public String getEmailAddress() {\n return email;\n }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n }\n return s;\n }\n }",
"public String getEmail()\n\t{\n\t\treturn this.email;\n\t}",
"public String getEmailAddress() {\n return emailAddress;\n }",
"public String getEmailAddress() {\n return emailAddress;\n }",
"public String getEmailAddress() {\n return emailAddress;\n }",
"public String getEmailAddress() {\n return emailAddress;\n }",
"public String getEmailAddress() {\n return emailAddress;\n }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n email_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getEmail() {\n return email;\n }",
"public java.lang.String getEmail() {\n\t\t\t\tjava.lang.Object ref = email_;\n\t\t\t\tif (!(ref instanceof java.lang.String)) {\n\t\t\t\t\tcom.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n\t\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\t\temail_ = s;\n\t\t\t\t\treturn s;\n\t\t\t\t} else {\n\t\t\t\t\treturn (java.lang.String) ref;\n\t\t\t\t}\n\t\t\t}",
"public java.lang.String getEmail() {\n\t\t\tjava.lang.Object ref = email_;\n\t\t\tif (ref instanceof java.lang.String) {\n\t\t\t\treturn (java.lang.String) ref;\n\t\t\t} else {\n\t\t\t\tcom.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\temail_ = s;\n\t\t\t\treturn s;\n\t\t\t}\n\t\t}",
"public String getEmailAddress() {\n return this.emailAddress;\n }",
"public String getEmailAddress() {\n return emailAddress;\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmailAddress()\r\n {\r\n return emailAddress;\r\n }",
"public String getEmail()\n {\n return emailAddress;\n }",
"public java.lang.String getEmail() {\n return localEmail;\n }",
"@java.lang.Override\n public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n return s;\n }\n }",
"@ApiModelProperty(value = \"User's email. Effect: Controls the value of the corresponding CfgPerson attribute \")\n public String getEmailAddress() {\n return emailAddress;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }"
]
| [
"0.84626836",
"0.83725166",
"0.83345735",
"0.8331046",
"0.822296",
"0.8205672",
"0.807341",
"0.8008404",
"0.8008404",
"0.79544806",
"0.7866207",
"0.7823317",
"0.77799344",
"0.7766912",
"0.77381146",
"0.77204114",
"0.7700737",
"0.767039",
"0.767039",
"0.767039",
"0.767039",
"0.767039",
"0.767039",
"0.76667964",
"0.76658535",
"0.76532406",
"0.76532406",
"0.76532406",
"0.76532406",
"0.76474774",
"0.7641038",
"0.7641038",
"0.7641038",
"0.76346856",
"0.76278543",
"0.7621448",
"0.7621448",
"0.76200795",
"0.7613102",
"0.761019",
"0.7596061",
"0.7595712",
"0.7593074",
"0.7593074",
"0.7593074",
"0.7593074",
"0.7593074",
"0.7593074",
"0.7593074",
"0.7593074",
"0.7593074",
"0.7593074",
"0.7593074",
"0.7593074",
"0.75924045",
"0.7586393",
"0.75797254",
"0.75745046",
"0.75745046",
"0.75745046",
"0.7573074",
"0.7570436",
"0.7570436",
"0.7570436",
"0.7570436",
"0.7570436",
"0.75501245",
"0.7540501",
"0.75261396",
"0.7485679",
"0.74778175",
"0.74619704",
"0.7451824",
"0.7451824",
"0.7451824",
"0.7451824",
"0.7451824",
"0.7451824",
"0.7451824",
"0.7451824",
"0.7451824",
"0.7451824",
"0.7451824",
"0.7451565",
"0.7446063",
"0.7445275",
"0.73972964",
"0.73903507",
"0.7383504",
"0.7383504",
"0.7383504",
"0.7383504",
"0.7383504",
"0.7383504",
"0.7383504",
"0.7383504",
"0.7383504",
"0.7383504",
"0.7383504",
"0.7383504",
"0.7383504"
]
| 0.0 | -1 |
The email address of the user. Users' email addresses are casesensitive. | public User withUserName(String userName) {
setUserName(userName);
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String getUserEmailAddress() {\n\t\tUser user = UserDirectoryService.getCurrentUser();\n\t\tString emailAddress = user.getEmail();\n\n\t\treturn emailAddress;\n\t}",
"public String getEmail() {\n return sp.getString(USER_EMAIL, null);\n }",
"public java.lang.String getUserEmail() {\n java.lang.Object ref = userEmail_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n userEmail_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getUserEmail() {\n java.lang.Object ref = userEmail_;\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 userEmail_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getUserEmail() {\r\n return userEmail;\r\n }",
"java.lang.String getUserEmail();",
"public String getUserEmail() {\n return sharedPreferences.getString(PREFERENCE_USER_EMAIL, \"\");\n }",
"public String getUserEmail() {\r\n return userEmail;\r\n }",
"public String getUserEmail() {\r\n return userEmail;\r\n }",
"public String getUserEmail() {\n return userEmail;\n }",
"public final String getEmail() {\n return email;\n }",
"public final String getEmail() {\n\t\treturn email;\n\t}",
"public java.lang.String getEmailAddress() {\n return EmailAddress;\n }",
"public java.lang.CharSequence getEmailAddress() {\n return email_address;\n }",
"public String getEmailAddress() {\r\n\t\treturn emailAddress;\r\n\t}",
"public java.lang.CharSequence getEmailAddress() {\n return email_address;\n }",
"public java.lang.String getEmailAddress();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"public String getEmail()\n\t{\n\t\treturn this._email;\n\t}",
"public String getEmailAddress() {\r\n return email;\r\n }",
"public java.lang.String getEmail() {\n return email;\n }",
"public java.lang.String getEmail() {\n return email;\n }",
"public java.lang.String getEmail() {\n return email;\n }",
"public java.lang.String getEmail() {\n return email;\n }",
"@AutoEscape\n\tpublic String getEmail_address();",
"public String getEmail() {\r\n\t\treturn email;\r\n\t}",
"public String getEmail() {\r\n\t\treturn email;\r\n\t}",
"public String getEmail() {\r\n\t\treturn email;\r\n\t}",
"public String getEmailAddress(){\r\n\t\treturn emailAddress;\r\n\t}",
"public static String getUserEmail() {\r\n return null;\r\n }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n email_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n email_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getEmailAddress() {\r\n return emailAddress;\r\n }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\n\t\treturn Email;\n\t}",
"public java.lang.String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public String getEmail() {\n\t\treturn email;\n\t}",
"public java.lang.String getEmail () {\n\t\treturn email;\n\t}",
"public String getEmail() {\n return userItem.getEmail();\n }",
"public String getEmailAddress() {\n return email;\n }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n }\n return s;\n }\n }",
"public String getEmail()\n\t{\n\t\treturn this.email;\n\t}",
"public String getEmailAddress() {\n return emailAddress;\n }",
"public String getEmailAddress() {\n return emailAddress;\n }",
"public String getEmailAddress() {\n return emailAddress;\n }",
"public String getEmailAddress() {\n return emailAddress;\n }",
"public String getEmailAddress() {\n return emailAddress;\n }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n email_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getEmail() {\n return email;\n }",
"public java.lang.String getEmail() {\n\t\t\t\tjava.lang.Object ref = email_;\n\t\t\t\tif (!(ref instanceof java.lang.String)) {\n\t\t\t\t\tcom.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n\t\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\t\temail_ = s;\n\t\t\t\t\treturn s;\n\t\t\t\t} else {\n\t\t\t\t\treturn (java.lang.String) ref;\n\t\t\t\t}\n\t\t\t}",
"public java.lang.String getEmail() {\n\t\t\tjava.lang.Object ref = email_;\n\t\t\tif (ref instanceof java.lang.String) {\n\t\t\t\treturn (java.lang.String) ref;\n\t\t\t} else {\n\t\t\t\tcom.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\temail_ = s;\n\t\t\t\treturn s;\n\t\t\t}\n\t\t}",
"public String getEmailAddress() {\n return this.emailAddress;\n }",
"public String getEmailAddress() {\n return emailAddress;\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmail() {\r\n return email;\r\n }",
"public String getEmailAddress()\r\n {\r\n return emailAddress;\r\n }",
"public String getEmail()\n {\n return emailAddress;\n }",
"public java.lang.String getEmail() {\n return localEmail;\n }",
"@java.lang.Override\n public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n return s;\n }\n }",
"@ApiModelProperty(value = \"User's email. Effect: Controls the value of the corresponding CfgPerson attribute \")\n public String getEmailAddress() {\n return emailAddress;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }",
"public String getEmail() {\n return email;\n }"
]
| [
"0.84626836",
"0.83725166",
"0.83345735",
"0.8331046",
"0.822296",
"0.8205672",
"0.807341",
"0.8008404",
"0.8008404",
"0.79544806",
"0.7866207",
"0.7823317",
"0.77799344",
"0.7766912",
"0.77381146",
"0.77204114",
"0.7700737",
"0.767039",
"0.767039",
"0.767039",
"0.767039",
"0.767039",
"0.767039",
"0.76667964",
"0.76658535",
"0.76532406",
"0.76532406",
"0.76532406",
"0.76532406",
"0.76474774",
"0.7641038",
"0.7641038",
"0.7641038",
"0.76346856",
"0.76278543",
"0.7621448",
"0.7621448",
"0.76200795",
"0.7613102",
"0.761019",
"0.7596061",
"0.7595712",
"0.7593074",
"0.7593074",
"0.7593074",
"0.7593074",
"0.7593074",
"0.7593074",
"0.7593074",
"0.7593074",
"0.7593074",
"0.7593074",
"0.7593074",
"0.7593074",
"0.75924045",
"0.7586393",
"0.75797254",
"0.75745046",
"0.75745046",
"0.75745046",
"0.7573074",
"0.7570436",
"0.7570436",
"0.7570436",
"0.7570436",
"0.7570436",
"0.75501245",
"0.7540501",
"0.75261396",
"0.7485679",
"0.74778175",
"0.74619704",
"0.7451824",
"0.7451824",
"0.7451824",
"0.7451824",
"0.7451824",
"0.7451824",
"0.7451824",
"0.7451824",
"0.7451824",
"0.7451824",
"0.7451824",
"0.7451565",
"0.7446063",
"0.7445275",
"0.73972964",
"0.73903507",
"0.7383504",
"0.7383504",
"0.7383504",
"0.7383504",
"0.7383504",
"0.7383504",
"0.7383504",
"0.7383504",
"0.7383504",
"0.7383504",
"0.7383504",
"0.7383504",
"0.7383504"
]
| 0.0 | -1 |
Specifies whether the user in the user pool is enabled. | public void setEnabled(Boolean enabled) {
this.enabled = enabled;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isEnabledByUser() {\n return mEnabledByUser;\n }",
"@Override\n public boolean isEnabled() {\n return user.hasBeenActivated;\n }",
"public void setEnabled(Boolean value) { this.myEnabled = value.booleanValue(); }",
"@ApiModelProperty(value = \"User is enabled or disabled. Effect: Controls the value of the corresponding CfgPerson attribute \")\n public Boolean isEnabled() {\n return enabled;\n }",
"public void setEnabled(boolean isEnable) throws SQLException\r\n\t{\r\n\t\tString SQL_USER = \"UPDATE user SET enabled=? WHERE id=?;\";\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Prepare the statement\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\r\n\t\t\t//Bind the variables\r\n\t\t\tstatement.setInt(1, (isEnable ? 1 : 0));\r\n\t\t\tstatement.setInt(2, userId);\r\n\r\n\t\t\t//Execute the update\r\n\t\t\tstatement.executeUpdate();\r\n\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in SQL: Student->setEnabled(boolean \"+ isEnable+ \")\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\t\r\n\t\t}\t\t\r\n\t\t//commit change\r\n\t\tDatabase.get().commit();\r\n\t}",
"@XmlTransient\n\tpublic boolean isCanActivateUser() {\n\t\treturn (isSecurityAdministrator() && isSelfRegistrationEnabled());\n\t}",
"public void setOnlyManageUser(boolean enable) {\n\t\t_onlyManageUser = enable;\n\t}",
"public void setEnabled(boolean value) {\n this.enabled = value;\n }",
"@Test\n\t void testEnabled() {\n\t\tassertTrue(user.isEnabled());\n\t}",
"public void assignAuthorisedUser(final boolean val) {\n authorisedUser = val;\n }",
"@Override\n public Users setEnable(Integer id) {\n Users u = userdao.findUserById(id);\n if (u.isEnabled()) {\n u.setEnabled(false);//if enable is true ,admin changes it to false so user can't login app\n } else {\n u.setEnabled(true);//if enable is false,admin changes it to true,so he gives access for login to user\n }\n userdao.save(u);\n\n return u;\n }",
"public boolean setEnabled(boolean enable);",
"public void setEnabled(boolean value) {\n m_Enabled = value;\n }",
"public boolean isEnabled() throws Exception\r\n\t{\r\n\t\tString SQL_USER = \"SELECT enabled FROM user WHERE id=?;\";\t\t\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\t\t\tstatement.setInt(1, userId);\r\n\t\t\tResultSet result = statement.executeQuery();\r\n\r\n\t\t\t// If this returns true, then the user already exists.\r\n\t\t\tif (!result.next())\r\n\t\t\t{\r\n\t\t\t\tthrow new Exception(\"No student found! (getEnabled)\");\r\n\t\t\t}\r\n\t\t\tif (result.getInt(\"enabled\")==1)\r\n\t\t\t\treturn true;\r\n\t\t\treturn false;\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in getEnabled()\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t}",
"public void setEnabled(boolean aFlag) { _enabled = aFlag; }",
"@Transactional\n\tpublic void enableUser(String userName) {\n\t\tuserInfoDAO.enableUser(userName);\n\t}",
"public void setEnabled(boolean enabled);",
"public void setEnabled(boolean enabled);",
"public boolean hasUserSettings() {\r\n return processModel.getUserInfos() != null;\r\n }",
"public boolean isSetUser() {\n return this.user != null;\n }",
"public boolean isSetUser() {\n return this.user != null;\n }",
"public boolean hasUser(){\n return numUser < MAX_USER;\n }",
"void setEnabled(boolean enabled);",
"void setEnabled(boolean enabled);",
"void setEnabled(boolean enabled);",
"void setEnabled(boolean enabled);",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"final public void setEnabled(boolean value) {\n enabledType = value ? ENABLED_ANY : ENABLED_NONE;\n }",
"public void setEnabled(String tmp) {\n enabled = DatabaseUtils.parseBoolean(tmp);\n }",
"@Override\r\n public void setEnabled(final boolean b) {\r\n _enabled = b;\r\n }",
"@FXML\n\tpublic void enableMyUser(ActionEvent event) {\n\t\tif (!txtDisableMyUser.getText().isEmpty()) {\n\t\t\tSystemUser user = restaurant.returnUser(txtDisableMyUser.getText());\n\n\t\t\tif (user != null) {\n\t\t\t\ttry {\n\t\t\t\t\tuser.setCondition(Condition.ACTIVE);\n\t\t\t\t\trestaurant.saveUsersData();\n\t\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\t\tdialog.setContentText(\"Tu usuario ha sido habilitado\");\n\t\t\t\t\tdialog.setTitle(\"Usuario Deshabilitado\");\n\t\t\t\t\tdialog.show();\n\t\t\t\t\ttxtDisableMyUser.setText(\"\");\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\t\tdialog.setContentText(\"No se ha podido guardar el nuevo estado del usuario\");\n\t\t\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\t\t\tdialog.show();\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"Este usuario no existe\");\n\t\t\t\tdialog.setTitle(\"Error, usuario inexistente\");\n\t\t\t\tdialog.show();\n\t\t\t}\n\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Todos los campos deben de ser llenados\");\n\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\tdialog.show();\n\t\t}\n\t}",
"public boolean enabled(){\n return enabled;\n }",
"public boolean hasUser() {\n return instance.hasUser();\n }",
"@Override\n public boolean isUser() {\n return false;\n }",
"@Override\n public void setRole(User u) {\n loginTrue(u.getName());\n uRole = u.getUserRole();\n switch (uRole) {\n case 1:\n nhanvien.setEnabled(true);\n break;\n case 2:\n quanly.setEnabled(false);\n break;\n case 3:\n break;\n case 4:\n dathang.setEnabled(false);\n break;\n case 5:\n baocao.setEnabled(false);\n break;\n }\n }",
"void setAdminStatus(User user, boolean adminStatus);",
"boolean hasUserManaged();",
"void setUserLocked(boolean b);",
"public void setEnabled(Boolean enabled) {\r\n this.enabled = enabled;\r\n }",
"boolean hasSelectedUser();",
"public void setEnabled(final boolean enabled);",
"public void enable ( ) {\r\n\t\tenabled = true;\r\n\t}",
"public void setEnabled(final boolean theFlag) {\n myEnabled = theFlag;\n }",
"public void isAllowed(String user) {\n \r\n }",
"public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }",
"public void enable()\r\n\t{\r\n\t\tenabled = true;\r\n\t}",
"public boolean hasUser() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"boolean getEnabled();",
"boolean getEnabled();",
"boolean getEnabled();",
"public boolean hasUser() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\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 }",
"public boolean hasUser() {\n return user_ != null;\n }",
"public boolean hasUser() {\n return user_ != null;\n }",
"public boolean getEnabled(){\r\n\t\treturn enabled;\r\n\t}",
"public boolean isSetCreate_user_priv() {\n return this.__isset.create_user_priv;\n }",
"boolean hasEnabled();",
"public void setWhitelisted ( boolean value ) {\n\t\texecute ( handle -> handle.setWhitelisted ( value ) );\n\t}",
"@ApiModelProperty(example = \"false\", required = true, value = \"Flag is true if this permission can only be assigned to users, and not groups or organizations\")\n public Boolean isUserOnly() {\n return userOnly;\n }",
"@Override\n public boolean requiresUser() {\n return false;\n }",
"@Override\n\tpublic boolean isUser(User user) {\n\t\treturn false;\n\t}",
"public boolean hasUser() {\n return user_ != null;\n }",
"public void setEnable(Boolean enable) {\n this.enable = enable;\n }",
"public Boolean isEnable() {\n return this.enable;\n }",
"private boolean shouldUseSimpleUserSwitcher() {\n return Settings.Global.getInt(this.mContext.getContentResolver(), \"lockscreenSimpleUserSwitcher\", this.mContext.getResources().getBoolean(17891459) ? 1 : 0) != 0;\n }",
"public void setEnabled(String enabled) {\r\n\t\tthis.enabled = enabled;\r\n\t}",
"public void setEnabled(boolean enabled) {\r\n\t}",
"public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }",
"public void setUserAdmin(boolean isUserAdmin) {\r\n this.userAdmin = isUserAdmin;\r\n }",
"public boolean isEnable() {\n return enable;\n }",
"@Override\n public boolean isUserActive(String userName) {\n User user = getUserInfo(userName);\n if (user != null) {\n return user.isActive();\n }\n return false;\n }",
"public void enable() {\r\n m_enabled = true;\r\n }",
"@Override\r\n\tpublic boolean updateUser() {\n\t\treturn false;\r\n\t}",
"public void setEnable(Boolean enable) {\n this.enable = enable;\n }",
"public Boolean enable() {\n return this.enable;\n }",
"public Boolean isEnable() {\n\t\treturn enable;\n\t}",
"public void setExistingUser(boolean isExistingUser) {\r\n this.isExistingUser = isExistingUser;\r\n }",
"public boolean getUser () {\n return user;\n }",
"public void flagUser() {\n\t\tsuper.flagUser();\n\t}",
"public void setEnable(Boolean enable) {\n this.enable = enable;\n }",
"public void enableEditUserClasses(boolean state) {\r\n \t\teditUserClasses.setEnabled(state);\r\n \t}",
"public Boolean getEnabled() {\r\n return enabled;\r\n }",
"public void setCurrentUserPremium() {\n\t\tcurrentUser.setPremium(true);\n\t\tuserCatalog.modifyUser(currentUser);\n\t}",
"public boolean isEnable() {\n return _enabled;\n }",
"void setHasLoggedIn(Boolean value);",
"public abstract void setEnabled(Context context, boolean enabled);"
]
| [
"0.67733914",
"0.63554204",
"0.6330268",
"0.631168",
"0.63031644",
"0.6207997",
"0.6186539",
"0.6125218",
"0.6122142",
"0.6075562",
"0.6028029",
"0.60167027",
"0.5976605",
"0.5959231",
"0.59317195",
"0.59098494",
"0.5894573",
"0.5894573",
"0.5815851",
"0.5815704",
"0.5815704",
"0.57988524",
"0.57938385",
"0.57938385",
"0.57938385",
"0.57938385",
"0.5765583",
"0.5765583",
"0.5765583",
"0.5765583",
"0.5765583",
"0.5765583",
"0.5765583",
"0.57620347",
"0.57458055",
"0.5741396",
"0.5708506",
"0.5691987",
"0.568645",
"0.567671",
"0.56624305",
"0.56582",
"0.5657958",
"0.5657801",
"0.5643349",
"0.5632087",
"0.5620003",
"0.5614909",
"0.56015444",
"0.55989337",
"0.5584893",
"0.5576298",
"0.5574453",
"0.55608976",
"0.55608976",
"0.55608976",
"0.5556737",
"0.5555779",
"0.5555779",
"0.55508655",
"0.55508655",
"0.55487466",
"0.55318046",
"0.552921",
"0.5524619",
"0.55243784",
"0.55209255",
"0.5514381",
"0.54931486",
"0.5490117",
"0.5488979",
"0.54865533",
"0.5485499",
"0.547311",
"0.54711187",
"0.54711187",
"0.54711187",
"0.54711187",
"0.54711187",
"0.546456",
"0.54631925",
"0.5461663",
"0.54606164",
"0.5458183",
"0.5449178",
"0.54414696",
"0.5438204",
"0.54367894",
"0.54346967",
"0.5431684",
"0.5415537",
"0.5414497",
"0.5405721",
"0.5401688",
"0.5392223",
"0.5389912",
"0.53877896"
]
| 0.5572733 | 56 |
Specifies whether the user in the user pool is enabled. | public Boolean getEnabled() {
return this.enabled;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isEnabledByUser() {\n return mEnabledByUser;\n }",
"@Override\n public boolean isEnabled() {\n return user.hasBeenActivated;\n }",
"public void setEnabled(Boolean value) { this.myEnabled = value.booleanValue(); }",
"@ApiModelProperty(value = \"User is enabled or disabled. Effect: Controls the value of the corresponding CfgPerson attribute \")\n public Boolean isEnabled() {\n return enabled;\n }",
"public void setEnabled(boolean isEnable) throws SQLException\r\n\t{\r\n\t\tString SQL_USER = \"UPDATE user SET enabled=? WHERE id=?;\";\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Prepare the statement\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\r\n\t\t\t//Bind the variables\r\n\t\t\tstatement.setInt(1, (isEnable ? 1 : 0));\r\n\t\t\tstatement.setInt(2, userId);\r\n\r\n\t\t\t//Execute the update\r\n\t\t\tstatement.executeUpdate();\r\n\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in SQL: Student->setEnabled(boolean \"+ isEnable+ \")\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\t\r\n\t\t}\t\t\r\n\t\t//commit change\r\n\t\tDatabase.get().commit();\r\n\t}",
"@XmlTransient\n\tpublic boolean isCanActivateUser() {\n\t\treturn (isSecurityAdministrator() && isSelfRegistrationEnabled());\n\t}",
"public void setOnlyManageUser(boolean enable) {\n\t\t_onlyManageUser = enable;\n\t}",
"public void setEnabled(boolean value) {\n this.enabled = value;\n }",
"@Test\n\t void testEnabled() {\n\t\tassertTrue(user.isEnabled());\n\t}",
"public void assignAuthorisedUser(final boolean val) {\n authorisedUser = val;\n }",
"@Override\n public Users setEnable(Integer id) {\n Users u = userdao.findUserById(id);\n if (u.isEnabled()) {\n u.setEnabled(false);//if enable is true ,admin changes it to false so user can't login app\n } else {\n u.setEnabled(true);//if enable is false,admin changes it to true,so he gives access for login to user\n }\n userdao.save(u);\n\n return u;\n }",
"public boolean setEnabled(boolean enable);",
"public void setEnabled(boolean value) {\n m_Enabled = value;\n }",
"public boolean isEnabled() throws Exception\r\n\t{\r\n\t\tString SQL_USER = \"SELECT enabled FROM user WHERE id=?;\";\t\t\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\t\t\tstatement.setInt(1, userId);\r\n\t\t\tResultSet result = statement.executeQuery();\r\n\r\n\t\t\t// If this returns true, then the user already exists.\r\n\t\t\tif (!result.next())\r\n\t\t\t{\r\n\t\t\t\tthrow new Exception(\"No student found! (getEnabled)\");\r\n\t\t\t}\r\n\t\t\tif (result.getInt(\"enabled\")==1)\r\n\t\t\t\treturn true;\r\n\t\t\treturn false;\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in getEnabled()\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t}",
"public void setEnabled(boolean aFlag) { _enabled = aFlag; }",
"@Transactional\n\tpublic void enableUser(String userName) {\n\t\tuserInfoDAO.enableUser(userName);\n\t}",
"public void setEnabled(boolean enabled);",
"public void setEnabled(boolean enabled);",
"public boolean isSetUser() {\n return this.user != null;\n }",
"public boolean isSetUser() {\n return this.user != null;\n }",
"public boolean hasUserSettings() {\r\n return processModel.getUserInfos() != null;\r\n }",
"public boolean hasUser(){\n return numUser < MAX_USER;\n }",
"void setEnabled(boolean enabled);",
"void setEnabled(boolean enabled);",
"void setEnabled(boolean enabled);",
"void setEnabled(boolean enabled);",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"final public void setEnabled(boolean value) {\n enabledType = value ? ENABLED_ANY : ENABLED_NONE;\n }",
"public void setEnabled(String tmp) {\n enabled = DatabaseUtils.parseBoolean(tmp);\n }",
"@Override\r\n public void setEnabled(final boolean b) {\r\n _enabled = b;\r\n }",
"@FXML\n\tpublic void enableMyUser(ActionEvent event) {\n\t\tif (!txtDisableMyUser.getText().isEmpty()) {\n\t\t\tSystemUser user = restaurant.returnUser(txtDisableMyUser.getText());\n\n\t\t\tif (user != null) {\n\t\t\t\ttry {\n\t\t\t\t\tuser.setCondition(Condition.ACTIVE);\n\t\t\t\t\trestaurant.saveUsersData();\n\t\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\t\tdialog.setContentText(\"Tu usuario ha sido habilitado\");\n\t\t\t\t\tdialog.setTitle(\"Usuario Deshabilitado\");\n\t\t\t\t\tdialog.show();\n\t\t\t\t\ttxtDisableMyUser.setText(\"\");\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\t\tdialog.setContentText(\"No se ha podido guardar el nuevo estado del usuario\");\n\t\t\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\t\t\tdialog.show();\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"Este usuario no existe\");\n\t\t\t\tdialog.setTitle(\"Error, usuario inexistente\");\n\t\t\t\tdialog.show();\n\t\t\t}\n\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Todos los campos deben de ser llenados\");\n\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\tdialog.show();\n\t\t}\n\t}",
"public boolean enabled(){\n return enabled;\n }",
"public boolean hasUser() {\n return instance.hasUser();\n }",
"@Override\n public boolean isUser() {\n return false;\n }",
"@Override\n public void setRole(User u) {\n loginTrue(u.getName());\n uRole = u.getUserRole();\n switch (uRole) {\n case 1:\n nhanvien.setEnabled(true);\n break;\n case 2:\n quanly.setEnabled(false);\n break;\n case 3:\n break;\n case 4:\n dathang.setEnabled(false);\n break;\n case 5:\n baocao.setEnabled(false);\n break;\n }\n }",
"void setAdminStatus(User user, boolean adminStatus);",
"boolean hasUserManaged();",
"void setUserLocked(boolean b);",
"public void setEnabled(Boolean enabled) {\r\n this.enabled = enabled;\r\n }",
"boolean hasSelectedUser();",
"public void setEnabled(final boolean enabled);",
"public void enable ( ) {\r\n\t\tenabled = true;\r\n\t}",
"public void setEnabled(final boolean theFlag) {\n myEnabled = theFlag;\n }",
"public void isAllowed(String user) {\n \r\n }",
"public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }",
"public void enable()\r\n\t{\r\n\t\tenabled = true;\r\n\t}",
"public boolean hasUser() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }",
"boolean getEnabled();",
"boolean getEnabled();",
"boolean getEnabled();",
"public void setEnabled(boolean enabled) {\r\n this.enabled = enabled;\r\n }",
"public void setEnabled(boolean enabled) {\r\n this.enabled = enabled;\r\n }",
"public boolean hasUser() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public boolean hasUser() {\n return user_ != null;\n }",
"public boolean hasUser() {\n return user_ != null;\n }",
"public boolean getEnabled(){\r\n\t\treturn enabled;\r\n\t}",
"public boolean isSetCreate_user_priv() {\n return this.__isset.create_user_priv;\n }",
"boolean hasEnabled();",
"@ApiModelProperty(example = \"false\", required = true, value = \"Flag is true if this permission can only be assigned to users, and not groups or organizations\")\n public Boolean isUserOnly() {\n return userOnly;\n }",
"public void setWhitelisted ( boolean value ) {\n\t\texecute ( handle -> handle.setWhitelisted ( value ) );\n\t}",
"@Override\n public boolean requiresUser() {\n return false;\n }",
"@Override\n\tpublic boolean isUser(User user) {\n\t\treturn false;\n\t}",
"public boolean hasUser() {\n return user_ != null;\n }",
"public void setEnable(Boolean enable) {\n this.enable = enable;\n }",
"public Boolean isEnable() {\n return this.enable;\n }",
"public void setEnabled(String enabled) {\r\n\t\tthis.enabled = enabled;\r\n\t}",
"private boolean shouldUseSimpleUserSwitcher() {\n return Settings.Global.getInt(this.mContext.getContentResolver(), \"lockscreenSimpleUserSwitcher\", this.mContext.getResources().getBoolean(17891459) ? 1 : 0) != 0;\n }",
"public void setEnabled(boolean enabled) {\r\n\t}",
"public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }",
"public boolean isEnable() {\n return enable;\n }",
"public void setUserAdmin(boolean isUserAdmin) {\r\n this.userAdmin = isUserAdmin;\r\n }",
"public void enable() {\r\n m_enabled = true;\r\n }",
"@Override\n public boolean isUserActive(String userName) {\n User user = getUserInfo(userName);\n if (user != null) {\n return user.isActive();\n }\n return false;\n }",
"@Override\r\n\tpublic boolean updateUser() {\n\t\treturn false;\r\n\t}",
"public void setEnable(Boolean enable) {\n this.enable = enable;\n }",
"public Boolean enable() {\n return this.enable;\n }",
"public Boolean isEnable() {\n\t\treturn enable;\n\t}",
"public void setExistingUser(boolean isExistingUser) {\r\n this.isExistingUser = isExistingUser;\r\n }",
"public boolean getUser () {\n return user;\n }",
"public void flagUser() {\n\t\tsuper.flagUser();\n\t}",
"public void setEnable(Boolean enable) {\n this.enable = enable;\n }",
"public void enableEditUserClasses(boolean state) {\r\n \t\teditUserClasses.setEnabled(state);\r\n \t}",
"public Boolean getEnabled() {\r\n return enabled;\r\n }",
"public void setCurrentUserPremium() {\n\t\tcurrentUser.setPremium(true);\n\t\tuserCatalog.modifyUser(currentUser);\n\t}",
"public boolean isEnable() {\n return _enabled;\n }",
"void setHasLoggedIn(Boolean value);",
"public abstract void setEnabled(Context context, boolean enabled);"
]
| [
"0.6775098",
"0.63565594",
"0.6331958",
"0.6313802",
"0.63045305",
"0.6209358",
"0.6188251",
"0.6127331",
"0.612362",
"0.60765254",
"0.6029914",
"0.60182935",
"0.5979081",
"0.59612423",
"0.59327596",
"0.59109956",
"0.5895865",
"0.5895865",
"0.5816808",
"0.5816808",
"0.58157766",
"0.5798427",
"0.57948595",
"0.57948595",
"0.57948595",
"0.57948595",
"0.5765339",
"0.5765339",
"0.5765339",
"0.5765339",
"0.5765339",
"0.5765339",
"0.5765339",
"0.5763997",
"0.57467306",
"0.5743507",
"0.57098794",
"0.56937075",
"0.56870204",
"0.5677256",
"0.56643087",
"0.56584305",
"0.5657461",
"0.5657388",
"0.56453925",
"0.5631652",
"0.562193",
"0.5616303",
"0.56029063",
"0.5598619",
"0.55869395",
"0.55777913",
"0.5575512",
"0.55748105",
"0.55748105",
"0.55748105",
"0.55748105",
"0.55624247",
"0.55624247",
"0.55624247",
"0.5557817",
"0.5557817",
"0.5557775",
"0.55515677",
"0.55515677",
"0.5551116",
"0.5532084",
"0.5529831",
"0.55257374",
"0.5523827",
"0.5521263",
"0.55155",
"0.5494004",
"0.5491977",
"0.5491444",
"0.54879117",
"0.5487194",
"0.5474753",
"0.5473189",
"0.5473189",
"0.5473189",
"0.5473189",
"0.5473189",
"0.5465476",
"0.5464782",
"0.5462437",
"0.5462118",
"0.54591954",
"0.5451033",
"0.5443489",
"0.54406554",
"0.54364294",
"0.54352605",
"0.5431857",
"0.5417437",
"0.5415318",
"0.54077816",
"0.54020435",
"0.53946143",
"0.5388621",
"0.5388006"
]
| 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.