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 |
---|---|---|---|---|---|---|
/ Get the last reader for the index in argument and register (inc a counter for that reader) | public synchronized IndexReader getReader(File indexDir) throws Exception{
if (!mReaders.containsKey(indexDir)){
setNewReader(indexDir);
return getReader(indexDir);
}
synchronized (mReaders) {
try{
List<ReaderContainer> lReader = mReaders.get(indexDir);
log.debug("getReader :: lReader size = "+lReader.size()+" | nb index files= "+indexDir.listFiles().length);
if (lReader.size() == 0) {
setNewReader(indexDir);
} else {
ReaderContainer readerContainer = lReader.get(lReader.size()-1);
if (readerContainer.isClosable()){
readerContainer.close();
lReader.remove(readerContainer);
log.debug("getReader :: closed = (unRegister) size lreader = "+lReader.size());
setNewReader(indexDir);
}
}
ReaderContainer readerContainer = lReader.get(lReader.size()-1);
readerContainer.incNbSearch();
return readerContainer.getReader();
} catch(Exception ex){
log.fatal("getReader :: mReaders.containsKey(indexDir)" +mReaders.containsKey(indexDir)+" ERR:"+ex);
if (mReaders.containsKey(indexDir)){
List<ReaderContainer> lReader = mReaders.get(indexDir);
log.fatal("getReader :: size reader for this index : "+lReader.size() +" index: "+indexDir.getCanonicalPath());
}
return null;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int readerIndex();",
"private Optional<Integer> nextReaderIndex() {\n Optional<Integer> index = Optional.absent();\n for (int i = 0; i < callReaders.size(); i++) {\n if (callReaders.get(i).hasNext()) {\n index = Optional.of(i);\n break;\n }\n }\n\n return index;\n }",
"protected abstract int readInternal(int index);",
"private void advanceToNextReader(){\r\n\t\tcurrentReader = null;\r\n\t\treaderQueueIndex++;\r\n\t}",
"public int getDataIndexAndIncrement() {\n\t\tint x = dataIndex;\n\t\tnext();\n\t\treturn x;\n\t}",
"int writerIndex();",
"int getReadPosition(int index) {\n/* 170 */ return index - this.origPos + this.readerIndex;\n/* */ }",
"public int read(int i);",
"public int nextInt() {\n int temp = results.get(index);\n index = index + 1;\n System.out.println(index);\n return temp;\n }",
"@Override\n public Integer get() {\n return ++counter;\n }",
"public void lastReaderAdded(){\r\n\t\tdoneAddingReaders = true;\r\n\t}",
"protected long getRecordNumber() {\n\t\treturn _nextRecordNumber.getAndIncrement();\n\t}",
"@Override\n public int nextIndex()\n {\n return idx+1; \n }",
"private static int getRight(int index) {\n\t\treturn getLeft(index) + 1;\n\t}",
"public int getNext(){\n synchronized (ThreadSave.class){\n if(value > 0){\n return 1;\n }\n else if (value < 0){\n return -1;\n }\n else\n return value ++;\n }\n\n }",
"private int getNextRightItemNo()\n\t{\n\t\treturn getAdapterIndexNumber(mRightViewIndex);\n\t}",
"void incrementLinesRead();",
"private int getRealIndex()\r\n\t{\r\n\t\treturn index - 1;\r\n\t}",
"public int getNextUnSafeSequence(){ return value++;}",
"public R next(){\n return (R) listR.get(index++);\n }",
"public R next(){\n return (R) newList.get(index++);\n }",
"public int getNext() {\n return value++;\n }",
"public synchronized void finishWriting() {\n readerNumber++; // readerNumber = -1 + 1 = 0; \n// readerNumber must be 0 at this point \n this.notifyAll(); // notify possible waiting writers or waiting readers \n }",
"public static int getIdentifier(){\n\t\tif(index > ids.size() - 1){\n\t\t\tindex = 0;\n\t\t}\n\t\t// Post increment is used here, returns index then increments index\n\t\treturn ids.get(index++);\n\t}",
"public synchronized void unRegister(File indexDir, IndexReader reader) throws Exception{\r\n \tif (!mReaders.containsKey(indexDir)){\r\n \t\tthrow new Exception(\"Unauthorized operation\");\r\n \t}\r\n \tsynchronized (mReaders) {\r\n\t \tList<ReaderContainer> lReader = mReaders.get(indexDir);\r\n\t \t//\r\n\t \tlog.debug(\"unRegister-STEP1 :: lReader size = \"+lReader.size()+\" | index of reader = \"+lReader.indexOf(new ReaderContainer(reader)));\r\n\t \t//\r\n\t \tReaderContainer readerContainer = lReader.get(lReader.indexOf(new ReaderContainer(reader)));\r\n\t \treaderContainer.decNbSearch();\r\n\t \tif (readerContainer.isClosable()){\r\n\t \t\treaderContainer.close();\r\n\t \t\tlReader.remove(readerContainer);\r\n\t \t\tlog.debug(\"unRegister :: closed = (unRegister) size lreader = \"+lReader.size()+\" | reader = \"+reader);\r\n\t \t\t\r\n\t \t}\r\n\t \tlog.debug(\"unRegister-STEP2 :: lReader size = \"+lReader.size()+\" | index of reader = \"+lReader.indexOf(new ReaderContainer(reader)));\r\n \t}\r\n \t\r\n }",
"private int getNextIndicator() throws IOException {\n if (this.indicator == 0) {\n this.indicator = in.read();\n }\n return this.indicator;\n }",
"public int getIntLE(int index)\r\n/* 775: */ {\r\n/* 776:784 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 777:785 */ return super.getIntLE(index);\r\n/* 778: */ }",
"private Reader getCurrentReader(){\r\n\t\tif (currentReader == null && readerQueueIndex < readerQueue.size()){\r\n\t\t\tsynchronized(readerQueue){\r\n\t\t\t\t// reader queue index is advanced only by the nextReader()\r\n\t\t\t\t// method. Don't do it here.\r\n\t\t\t\tcurrentReader = readerQueue.get(readerQueueIndex);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn currentReader;\r\n\t}",
"public RingBuffer<T> publishReadIndex(int num_elements_read) {\n this.ri=realIndex(this.ri + num_elements_read);\n\n lock.lock();\n try {\n this.count-=num_elements_read;\n not_full.signalAll(); // wake up all writers\n return this;\n }\n finally {\n lock.unlock();\n }\n }",
"private int findNextElement() {\n\t\tif (hasNext()) {\n\t\t\tint value = this.index + 1;\n\t\t\treturn value;\n\n\t\t}\n\t\treturn -1;\n\t}",
"private static void increaseReference(Counter counter) {\n counter.advance(1);\n }",
"public IndexRecord getIteratorNext() {\n iter = (iter == next - 1 ? -1: iter + 1);\n return (iter == -1 ? null : data[iter]);\n }",
"public int nextValue() {\n\t\tint temp = counter;\n\t\tcounter++;\n\t\treturn temp;\n\t}",
"private int next(int index)\n\t{\n\t\tif (index == list.length - 1)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn index + 1;\n\t\t}\n\t}",
"protected int getNextToken(){\n if( currentToken == 1){\n currentToken = -1;\n }else{\n currentToken = 1;\n }\n return currentToken;\n }",
"long getAndIncrement();",
"public Index next() {\n return Index.valueOf(value + 1);\n }",
"com.lesen.rpc.protobuf.LesenRPCProto.LesenRPCResult getReault(int index);",
"public Card giveCard(){\n return this.cardDeck.get(lastIndex++);\n }",
"private int next(int index) {\n return (index + 2) & mask;\n }",
"private long read(int i) {\n while (true) {\n long x = data[i];\n if (!isTag(x)) return value(x);\n reset(i);\n }\n }",
"@Override\n\t\tpublic int nextIndex() {\n\t\t\treturn 0;\n\t\t}",
"public int nextIndex()\n {\n // TODO: implement this method\n return -1;\n }",
"public static int GetIncrement(){\n\t\treturn m_Incrementer;\n\t}",
"public synchronized void finishReading() {\n readerNumber--;\n if (readerNumber == 0) {\n this.notifyAll(); // notify possible waiting writers \n }\n }",
"public synchronized List getBufferForReading() {\n// if some writer is writing, wait until no writer is writing \n while (readerNumber < 0) {\n try {\n this.wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n// when readerNumber >= 0 \n readerNumber++;\n return buffer;\n }",
"IndexData finLastQueuedData();",
"void mark(@Nonnegative int readLimit);",
"public int counter (){\n return currentID;\n }",
"public int getLast() {\n\t\treturn last;\n\t}",
"public synchronized void setNewReader(File indexDir) throws IOException{\r\n \tsynchronized (mReaders) {\r\n \t\ttry{\r\n \tList<ReaderContainer> lReader;\r\n \tif (!mReaders.containsKey(indexDir)){\r\n \t\tlReader = new ArrayList<ReaderContainer>();\r\n \t\tlReader.add(new ReaderContainer(IndexReader.open(FSDirectory.open(indexDir))));\r\n \t\tmReaders.put(indexDir, lReader);\r\n \t} else {\r\n \t\tlReader = mReaders.get(indexDir);\r\n \t\t\r\n \t\tif (lReader.size() > 0){\r\n \t\t\tlog.debug(\"setNewReader-STEP1 :: lReader.size() = \" + lReader.size());\r\n// \t\t\tfor (int i = lReader.size() - 1; i >= 0 ; i--) {\r\n// \t\t\t\tReaderContainer readerContainer = lReader.get(i);\r\n \t\t\tReaderContainer readerContainer = lReader.get(lReader.size() - 1);\r\n \t\t\t\r\n \tif (readerContainer.isClosable()){\r\n \t\treaderContainer.close();\r\n \t\tlReader.remove(readerContainer);\r\n \t}\r\n// \t\t\t}\r\n \t}\r\n \t\tlReader.add(new ReaderContainer(IndexReader.open(FSDirectory.open(indexDir))));\r\n \t\tlog.debug(\"setNewReader :: lReader.size() = \" + lReader.size());\r\n \t}\r\n \t\r\n \t\t} catch(Exception ex){\r\n \t\tlog.fatal(\"setNewReader :: mReaders.containsKey(indexDir)\" +mReaders.containsKey(indexDir)+\" indexDir \"+indexDir.getCanonicalPath()+\" ERR:\"+ex);\r\n \t}\r\n\t\t}\r\n }",
"@Override public int read() throws IOException {\r\n\t\tif (closed) throw new IOException(\"Reader closed\");\r\n\t\tint r = -1;\r\n\t\twhile (r == -1){\r\n\t\t\tReader in = getCurrentReader();\r\n\t\t\tif (in == null){\r\n\t\t\t\tif (doneAddingReaders) return -1;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(100);\r\n\t\t\t\t} catch (InterruptedException iox){\r\n\t\t\t\t\tthrow new IOException(\"Interrupted\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tr = in.read();\r\n\t\t\t\tif (r == -1) advanceToNextReader();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn r;\r\n\t}",
"public Record getRecord(int index) throws IOException{\n\t\t//buff.checkBuffers(index);\n\t\t//buff=new BufferPool();\n\t\t//System.out.println(\"f\");\n\t\tRecord rec = buff.checkBuffers(index);\n\t\t//System.out.println(\"f\");\n\t\tif(rec.getKey()==-1){\n\t\tRecord recs = buff.doLRU(index);\n\t\t\treturn recs;\n\t\t}\n\t\t\n\t\t//buff.checkBuff(index)\n\t\t\n\t\t\n\t\treturn rec;\n\t\t\n\t\t//looks to see if index is in buffer length.\n\t\t//if not. checks which buffer is dirty\n\t\t//if none, still write buffer back to file if all are full\n\t\t//then read in what hasnt been read from index\n\t\t\n\t\t\n\t}",
"private int calculate(int index) {\n return (head + index) % data.length;\n }",
"public int getRear() {\n if(size == 0) return -1;\n return tail.prev.val;\n}",
"public int getReadedRecordNumber();",
"public int getLast() {\n\treturn _last;\n }",
"public int Rear() {\n if (isEmpty())\n return -1;\n return buf[e];\n }",
"public int dequeueRear();",
"public int getHolder() {\n return this.pIndex;\n }",
"protected int getWriterIdxForCellBarcode(String cellBarcode) {\n Integer writerIdx = cellBarcodeWriterIdxMap.get(cellBarcode);\n if (writerIdx == null) {\n if (writerInfoList.size() < NUM_OUTPUTS) {\n writerIdx = addWriter();\n } else {\n // find writer with the fewest reads\n Integer minCount = null;\n for (int idx = 0; idx< writerInfoList.size(); idx++) {\n int readCount = writerInfoList.get(idx).getReadCount();\n if (minCount == null || readCount < minCount) {\n writerIdx = idx;\n minCount = readCount;\n }\n }\n }\n cellBarcodeWriterIdxMap.put(cellBarcode, writerIdx);\n }\n if (writerIdx == null) {\n throw new TranscriptomeException(\"Failed to get a writer\");\n }\n return writerIdx;\n }",
"int getCurrentIdx() {\n return currentIdx;\n }",
"private int nextIndex() {\n return ThreadLocalRandom.current().nextInt(currentIndex, tracks.size());\n }",
"private int getNext(int index) {\n return index + (index & -index);\n }",
"public T next(){\r\n return itrArr[position++];\r\n }",
"@Override\n\t\tpublic int next() {\n\t\t\treturn current++;\n\t\t}",
"@Override\n\tpublic IFieldComparator<Long> setNextReader(IAtomicReaderRef context) throws IOException {\n\t\tmCurrentReaderValues = FieldCache.DEFAULT.getLongs(\n\t\t\t\tcontext.getReader(), mField, mParser, mMissingValue != null);\n\t\treturn super.setNextReader(context);\n\t}",
"private int getNextMutator()\n\t{\n\t\t\n\t\tif (mutatingHeuristics.size()==0)\n\t\t\treturn -1;\n\t\telse\n\t\t\treturn mutatingHeuristics.get(rng.nextInt(mutatingHeuristics.size()));\n\t}",
"public int findNext(Resource resource);",
"protected int lastIdx() {\n return arrayIndex(currentWindowIndex() - 1);\n }",
"public int getInt(int index)\r\n/* 173: */ {\r\n/* 174:190 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 175:191 */ return super.getInt(index);\r\n/* 176: */ }",
"public int getLastIndex() {\n return lastIndex;\n }",
"public int getRear() {\n if (cnt == 0)\n return -1;\n return tail.val;\n }",
"public int next() {\n moveToNextIndex();\n return _hash._set[_index];\n }",
"public int next() {\n\treturn _current < _last ? _data[_current++] : END;\n }",
"public int getNbr_read() {\r\n\t\treturn nbrRead;\r\n\t}",
"@Override\n public Integer next() {\n return nums.get(index++);\n }",
"public int nextIndex(int i) {\n\t\treturn (i + 1) % data.length;\n\t}",
"public T next() {\n return array[current++];\n }",
"public ConcatReader(Reader in){\r\n\t\taddReader(in);\r\n\t\tlastReaderAdded();\r\n\t}",
"public int get_ioreg(int index)\n {\n if ((index < 0) || (index >= IO_REG_COUNT))\n return 0;\n else\n return getDataMemory(index+IO_REG_COUNT);\n }",
"public ConcatReader(Reader[] in){\r\n\t\taddReaders(in);\r\n\t\tlastReaderAdded();\r\n\t}",
"public int nextIndex() {\n\t\t\treturn cursor;\n\t\t}",
"public synchronized int getSynchronisedNext() {\n value++;\n return value;\n }",
"public E getLast() {\r\n\t\tif (tail == null) {\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t} else {\r\n\t\t\treturn indices.get(size - 1).data;\t\r\n\t\t}\r\n\t}",
"public int nextIndex() {\n return curIndex;\n }",
"public long getReadCounter () {\n\t\treturn readCounter;\n\t}",
"abstract int get(int index);",
"protected IndexReader getReader() {\n\t\treturn indexReader;\n\t}",
"public abstract long getIndex();",
"@Override\n public synchronized int getCurrentIndex() {\n return mCurrentIndex;\n }",
"public int peekRear();",
"public int getCurrentRowNumber() throws SQLException {\n/* 174 */ return this.currentPositionInEntireResult + 1;\n/* */ }",
"@Override\n public int countOut() {\n if (callCheck())\n return EMPTY_INDEX;\n int ret = last.getValue();\n last = last.getPrev();\n return ret;\n }",
"public interface IterativeReader\n{\n /**\n * Constant which specifies that the IterativeReader/IterativeWriter is not\n * done with nextRead/nextWrite.\n */\n public static final int CONTINUE = 0;\n /**\n * Constant which specifies that the IterativeReader/IterativeWriter is done\n * with nextRead/nextWrite. This means that the reading/writing is complete\n * and further calls of nextRead/nextWrite are not expected.\n */\n public static final int STOP = 1;\n\n /**\n * Specifies that numBytes bytes are to be read. The InputStream to read\n * from should be stored in the implementing class.\n * @param numBytes Number of bytes to read. This is only indicative. The\n * implementor may read more or less. Reading too less impacts performance\n * due to repeated nextRead calls. Reading too much more than numBytes leads\n * to performance impact due to buffer reallocation in case of\n * SplitInputStream and an IOException due to Empty Buffer in an\n * OutStreamToIterativeReader.<p>\n *\n * The InputStream returned for use by an IterativeReader by directio's\n * classes implement {@link ByteCounter} which can help in keeping track of\n * the number of bytes read or remaining during a nextRead call.\n * @return {@link #CONTINUE} to indicate that there is more to be read and\n * STOP to indicate that the IterativeReader is done with reading.\n * @exception IOException In case of an error during read. Note that data\n * errors can also be handled by returning STOP and storing the error\n * instead of throwing an Exception. This may be desirable for a\n * SplitInputStream since the main Read can continue unhindered by the\n * SubStream's error.\n */\n public int nextRead(int numBytes) throws IOException;\n}",
"private int getIndex() {\n\t\treturn this.index;\r\n\t}",
"static synchronized long getNextSeqNumber() {\n return seqNumber++;\n }",
"public long get(int i) {\n return read(i);\n }",
"public abstract int getNextBlock(int block) throws IOException;",
"public int getcounter() {\n\t\treturn counter;\r\n\t}"
] | [
"0.6906732",
"0.66203475",
"0.6089616",
"0.5944626",
"0.56793886",
"0.56369495",
"0.5613393",
"0.55494565",
"0.5532301",
"0.552472",
"0.55126446",
"0.54780155",
"0.546125",
"0.54502374",
"0.5450125",
"0.5436032",
"0.54181284",
"0.5417633",
"0.5413693",
"0.5411949",
"0.5378583",
"0.5377462",
"0.53512853",
"0.5348522",
"0.5306284",
"0.52995116",
"0.52920413",
"0.52859765",
"0.5263153",
"0.5254135",
"0.5250078",
"0.52493167",
"0.52489704",
"0.52414685",
"0.52397454",
"0.52226716",
"0.5218083",
"0.5214389",
"0.52141076",
"0.52114344",
"0.5206012",
"0.51875",
"0.51707006",
"0.51592594",
"0.5147104",
"0.513163",
"0.512669",
"0.5122225",
"0.5119143",
"0.5118295",
"0.5116309",
"0.51157856",
"0.5112733",
"0.51103544",
"0.51083153",
"0.510691",
"0.51066685",
"0.5098915",
"0.5096435",
"0.5095659",
"0.50899655",
"0.5089009",
"0.5088001",
"0.5085677",
"0.5084102",
"0.5075004",
"0.5070574",
"0.5067299",
"0.50577605",
"0.50571257",
"0.5056851",
"0.5050835",
"0.504958",
"0.50493354",
"0.50487655",
"0.504779",
"0.50471634",
"0.5044436",
"0.5032197",
"0.5028505",
"0.50195277",
"0.50194114",
"0.50182414",
"0.50163096",
"0.50135314",
"0.5010341",
"0.5004464",
"0.49963218",
"0.49952158",
"0.49940717",
"0.49907252",
"0.49889985",
"0.49822012",
"0.4979192",
"0.49769995",
"0.49746615",
"0.49746177",
"0.49668038",
"0.4959758",
"0.49521232"
] | 0.5325518 | 24 |
/ Before changing the reader, check if the latest reader is being used by someone, if not close that reader | public synchronized void setNewReader(File indexDir) throws IOException{
synchronized (mReaders) {
try{
List<ReaderContainer> lReader;
if (!mReaders.containsKey(indexDir)){
lReader = new ArrayList<ReaderContainer>();
lReader.add(new ReaderContainer(IndexReader.open(FSDirectory.open(indexDir))));
mReaders.put(indexDir, lReader);
} else {
lReader = mReaders.get(indexDir);
if (lReader.size() > 0){
log.debug("setNewReader-STEP1 :: lReader.size() = " + lReader.size());
// for (int i = lReader.size() - 1; i >= 0 ; i--) {
// ReaderContainer readerContainer = lReader.get(i);
ReaderContainer readerContainer = lReader.get(lReader.size() - 1);
if (readerContainer.isClosable()){
readerContainer.close();
lReader.remove(readerContainer);
}
// }
}
lReader.add(new ReaderContainer(IndexReader.open(FSDirectory.open(indexDir))));
log.debug("setNewReader :: lReader.size() = " + lReader.size());
}
} catch(Exception ex){
log.fatal("setNewReader :: mReaders.containsKey(indexDir)" +mReaders.containsKey(indexDir)+" indexDir "+indexDir.getCanonicalPath()+" ERR:"+ex);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void checkReadLock() {\r\n return;\r\n }",
"boolean isUsedForReading();",
"public void closeReader() throws IOException{\n if(isOpen){\n csvReader.close();\n }\n\n }",
"public void lastReaderAdded(){\r\n\t\tdoneAddingReaders = true;\r\n\t}",
"public boolean readerTryLock() {\n\t\t// TODO\n\t\t/*\n\t\t * There is nothing stated saying that a thread cannot \n\t\t * try to take the lock multiple times\n\t\t */\n\t\tfinal Thread current = Thread.currentThread();\n\t\tHolders old = null;\n\t\tReaderList newHolder = null;\n\t\t// if lock is null or if instance is not a writer\n\t\tdo {\n\t\t\told = holders.get();\n\t\t\tif (old == null) {\n\t\t\t\tnewHolder = new ReaderList(current, null);\n\t\t\t} else if(old instanceof ReaderList){\n\t\t\t\ttry {\n\t\t\t\t\told = (ReaderList) holders.get();\n\t\t\t\t\tnewHolder = new ReaderList(current, (ReaderList) old);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} while (!holders.compareAndSet(old, newHolder));\n\t\treturn true;\n\t}",
"@Override\n public void close() {\n \ttry {\n \t\tif(reader != null) {\n \t\t\treader.close();\n \t\t}\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n }",
"protected final void close()\n {\n try {\n _reader.close();\n _reader = null;\n } catch ( IOException except ) { }\n }",
"public void checkReadLock() {\n checkNotDeleted();\n super.checkReadLock();\n }",
"public boolean closeRead() throws Exception;",
"private void internalReadUnlock() {\n checkpointLock.readLock().unlock();\n\n if (ASSERTION_ENABLED)\n CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() - 1);\n }",
"@Override\n public void close()\n {\n if (closed) {\n return;\n }\n closed = true;\n\n try {\n stats.addMaxCombinedBytesPerRow(recordReader.getMaxCombinedBytesPerRow());\n recordReader.close();\n }\n catch (IOException e) {\n throw new UncheckedIOException(e);\n }\n }",
"private void ensureRead() throws IOException, BadDescriptorException {\n if (reading) return;\n flushWrite();\n buffer.clear();\n buffer.flip();\n reading = true;\n }",
"void _preCloseFD(FD fd) {\n Seekable s = fd.seekable();\n if (s == null) return;\n\n try {\n for (int i=0; i < gs.locks.length; i++) {\n Seekable.Lock l = gs.locks[i];\n if (l == null) continue;\n if (s.equals(l.seekable()) && l.getOwner() == this) {\n l.release();\n gs.locks[i] = null;\n }\n }\n } catch (IOException e) { throw new RuntimeException(e); }\n }",
"@Override\n\tpublic boolean doReOpen() { return false; }",
"public boolean wasRead(){\n return isRead==null || isRead;\n }",
"private void advanceToNextReader(){\r\n\t\tcurrentReader = null;\r\n\t\treaderQueueIndex++;\r\n\t}",
"public synchronized void finishReading() {\n readerNumber--;\n if (readerNumber == 0) {\n this.notifyAll(); // notify possible waiting writers \n }\n }",
"public void readerUnlock() {\n Holders rootHolder = null;\n Holders newHolder = null;\n final Thread current = Thread.currentThread();\n\n do {\n Holders holder = this.holder.get();\n newHolder = null;\n rootHolder = holder;\n // A reader lock can only exist if the holder is a ReaderList instance.\n if (holder instanceof Writer) {\n throw new IllegalStateException();\n }\n\n // A reader lock can only be unlocked if it exists.\n if (!((ReaderList)holder).contains(current)) {\n throw new IllegalStateException();\n }\n\n // get a new ReaderList without the reader lock of current Thread\n newHolder = ((ReaderList)holder).remove(current);\n\n // Attempt to update ReaderList holder.\n } while (!holder.compareAndSet(rootHolder, newHolder));\n }",
"public synchronized void closeAndRemoveAllOpenedReaders() throws IOException {\n Iterator<Map.Entry<String, TsFileSequenceReader>> iterator =\n closedFileReaderMap.entrySet().iterator();\n while (iterator.hasNext()) {\n Map.Entry<String, TsFileSequenceReader> entry = iterator.next();\n entry.getValue().close();\n if (resourceLogger.isDebugEnabled()) {\n resourceLogger.debug(\"{} closedTsFileReader is closed.\", entry.getKey());\n }\n closedReferenceMap.remove(entry.getKey());\n iterator.remove();\n }\n iterator = unclosedFileReaderMap.entrySet().iterator();\n while (iterator.hasNext()) {\n Map.Entry<String, TsFileSequenceReader> entry = iterator.next();\n entry.getValue().close();\n if (resourceLogger.isDebugEnabled()) {\n resourceLogger.debug(\"{} unclosedTsFileReader is closed.\", entry.getKey());\n }\n unclosedReferenceMap.remove(entry.getKey());\n iterator.remove();\n }\n }",
"private void close() {\n try {\n if (reader != null) {\n this.reader.close();\n }\n if (writer != null) {\n this.writer.close();\n }\n }\n catch (IOException e) {\n log.error(e);\n log.debug(Constants.STREAM_IS_CLOSED);\n }\n }",
"@Test\n\t@Transactional\n\t@DirtiesContext\n\tpublic void testInvalidRestore() throws Exception {\n\n\t\tgetAsItemStream(reader).open(executionContext);\n\t\t\n\t\tFoo foo1 = reader.read();\n\t\tassertEquals(1, foo1.getValue());\n\n\t\tFoo foo2 = reader.read();\n\t\tassertEquals(2, foo2.getValue());\n\n\t\tgetAsItemStream(reader).update(executionContext);\n\t\n\t\tgetAsItemStream(reader).close();\n\n\t\t// create new input source\n\t\treader = createItemReader();\n\t\tgetAsItemStream(reader).open(new ExecutionContext());\n\n\t\tFoo foo = reader.read();\n\t\tassertEquals(1, foo.getValue());\n\n\t\ttry {\n\t\t\tgetAsItemStream(reader).open(executionContext);\n\t\t\tfail();\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\t// expected\n\t\t}\n\t}",
"@Test\n\t@Transactional\n\t@DirtiesContext\n\tpublic void testRollbackAndRestart() throws Exception {\n\n\t\tgetAsItemStream(reader).open(executionContext);\n\t\t\n\t\tFoo foo1 = reader.read();\n\n\t\tgetAsItemStream(reader).update(executionContext);\n\n\t\tFoo foo2 = reader.read();\n\t\tassertTrue(!foo2.equals(foo1));\n\n\t\tFoo foo3 = reader.read();\n\t\tassertTrue(!foo2.equals(foo3));\n\t\n\t\tgetAsItemStream(reader).close();\n\n\t\t// create new input source\n\t\treader = createItemReader();\n\n\t\tgetAsItemStream(reader).open(executionContext);\n\n\t\tassertEquals(foo2, reader.read());\n\t\tassertEquals(foo3, reader.read());\n\t}",
"private void close() {\n/* */ try {\n/* 253 */ if (this.dataReader != null) {\n/* 254 */ this.dataReader.close();\n/* 255 */ this.dataReader = null;\n/* */ } \n/* 257 */ } catch (SQLException e) {\n/* 258 */ logger.log(Level.SEVERE, (String)null, e);\n/* */ } \n/* */ try {\n/* 261 */ if (this.pstmt != null) {\n/* 262 */ this.pstmt.close();\n/* 263 */ this.pstmt = null;\n/* */ } \n/* 265 */ } catch (SQLException e) {\n/* 266 */ logger.log(Level.SEVERE, (String)null, e);\n/* */ } \n/* */ }",
"@Test\n\tpublic void testBadRead(){\n\t\ttry{\n\t\t\tXMLReader reader = new XMLReader(\"nonExistent\");\n\t\t\treader.close();\n\t\t\tfail(\"XMLReader should not have been able to read nonexistent file\");\n\t\t} catch (FileNotFoundException e){\n\t\t}\n\t}",
"public void close() throws IOException {\n reset();\n _reader.close();\n }",
"boolean hasRead();",
"boolean hasForRead();",
"public void releaseReadLock() {\r\n return;\r\n }",
"@Override public void checkpointReadUnlock() {\n if (checkpointLock.writeLock().isHeldByCurrentThread())\n return;\n\n checkpointLock.readLock().unlock();\n\n if (ASSERTION_ENABLED)\n CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() - 1);\n }",
"public void disconnect() {\n if (reader != null) {\n reader.stop();\n }\n\n }",
"protected void tearDown() throws Exception {\n _reader.close();\n }",
"public void readerUnlock() throws Exception, ClassCastException {\n\t\t// TODO\n\t\tif(holders.get() == null){\n\t\t\tthrow new Exception(\"Lock is not held by anyone\");\n\t\t}\n\t\tfinal Thread current = Thread.currentThread();\n\t\tReaderList newList;\n\t\tHolders readerLock;\n\t\tdo {\n\t\t\treaderLock = holders.get(); //return the value - not the instance holders\n\t\t\tif (readerLock instanceof Writer) {\n\t\t\t\tthrow new Exception(\"Lock is not held by any reader\");\n\t\t\t}\n\t\t\tif(!((ReaderList) readerLock).contains(current)){\n\t\t\t\tthrow new Exception(\"Lock not acquired\");\n\t\t\t}\n\t\t\tnewList = ((ReaderList) readerLock).remove(current);\n\t\t} while (!holders.compareAndSet(readerLock, newList));\n\t}",
"public static void close( Reader reader )\n {\n if ( reader != null )\n {\n try\n {\n reader.close();\n }\n catch ( IOException e )\n {\n log.error( \"Error closing reader: \" + reader, e );\n }\n }\n }",
"private void checkClosedResultSet() {\n if(closed) {\n throw new IllegalStateException(\"Resultset is already closed\");\n }\n }",
"protected final Reader getReader()\n {\n return _reader;\n }",
"@Test\n\t@Transactional\n\t@DirtiesContext\n\tpublic void testRollbackOnFirstChunkAndRestart() throws Exception {\n\n\t\tgetAsItemStream(reader).open(executionContext);\n\t\t\n\t\tFoo foo1 = reader.read();\n\n\t\tFoo foo2 = reader.read();\n\t\tassertTrue(!foo2.equals(foo1));\n\n\t\tFoo foo3 = reader.read();\n\t\tassertTrue(!foo2.equals(foo3));\n\t\n\t\tgetAsItemStream(reader).close();\n\n\t\t// create new input source\n\t\treader = createItemReader();\n\n\t\tgetAsItemStream(reader).open(executionContext);\n\n\t\tassertEquals(foo1, reader.read());\n\t\tassertEquals(foo2, reader.read());\n\t}",
"protected final void unlockRead() {\n m_lock.readLock().unlock();\n }",
"private boolean refill() {\n byteBuffer.clear();\n int nRead = loadData();\n byteBuffer.flip();\n if (nRead <= 0) {\n return false;\n }\n return true;\n }",
"private boolean checkOpen(boolean recordException) {\n/* 650 */ if (!isOpen()) {\n/* 651 */ if (recordException) {\n/* 652 */ recordException(new ClosedChannelException());\n/* */ }\n/* 654 */ return false;\n/* */ } \n/* */ \n/* 657 */ return true;\n/* */ }",
"@Override public boolean ready() throws IOException {\r\n\t\tif (closed) throw new IOException(\"Reader closed\");\r\n\t\tReader in = getCurrentReader();\r\n\t\tif (in == null) return false;\r\n\t\treturn in.ready();\r\n\t}",
"protected final boolean didRead (boolean value) { return didRead = value;}",
"@Override\n public boolean isOpen() {\n return rows != null;\n }",
"public void checkWriteLock() {\n checkNotDeleted();\n super.checkWriteLock();\n }",
"private void m44337f() throws BaseException {\n Throwable th = this.f30622n;\n if (th != null) {\n if (th instanceof StreamClosedException) {\n throw new BaseException(1068, \"async reader closed!\");\n }\n DownloadUtils.m44505a(th, \"async_read\");\n }\n throw new BaseException(1069, \"async reader terminated!\");\n }",
"private boolean getNoFallback()\n/* */ {\n/* 1091 */ return this.reader.getNoFallback();\n/* */ }",
"void checkClosed() throws SQLException {\n\n if (result == null) { throw Message.getSQLException(ErrorCode.OBJECT_CLOSED); }\n if (stat != null) {\n stat.checkClosed();\n }\n if (conn != null) {\n conn.checkClosed();\n }\n }",
"public void close() throws IOException {\r\n reader.close();\r\n reader = null;\r\n }",
"public void read() {\n\t\tthis.isRead = true;\n\t}",
"public int closeFile() {\n int test=0;\n try{\n _file=null;\n rows.clear();\n _fis.close();\n _bis.close();\n _dis.close();\n test=1;\n }catch( IOException ioe){\n test=0;\n }\n return test;\n }",
"private boolean streamClosed() {\n boolean closed = false;\n if (nonNull(dataStream) && Objects.nonNull(streamLinkedOrConsumedField)) {\n try {\n closed = (boolean) streamLinkedOrConsumedField.get(dataStream);\n } catch (Exception e) {\n }\n }\n return closed;\n }",
"@Test\n\t@Transactional\n\t@DirtiesContext\n\tpublic void testRestart() throws Exception {\n\n\t\tgetAsItemStream(reader).open(executionContext);\n\t\t\n\t\tFoo foo1 = reader.read();\n\t\tassertEquals(1, foo1.getValue());\n\n\t\tFoo foo2 = reader.read();\n\t\tassertEquals(2, foo2.getValue());\n\n\t\tgetAsItemStream(reader).update(executionContext);\n\t\n\t\tgetAsItemStream(reader).close();\n\n\t\t// create new input source\n\t\treader = createItemReader();\n\n\t\tgetAsItemStream(reader).open(executionContext);\n\n\t\tFoo fooAfterRestart = reader.read();\n\t\tassertEquals(3, fooAfterRestart.getValue());\n\t}",
"public synchronized void dropReaders() throws IOException {\n\t\tif (mReader != null) {\n\t\t\tmReader.decreaseRef();\n\t\t\tmReader = null;\n\t\t}\n\t\tif (mMergeReader != null) {\n\t\t\tmMergeReader.decreaseRef();\n\t\t\tmMergeReader = null;\n\t\t}\n\t\tdecreaseRef();\n\t}",
"@Override\n protected SearcherAndTaxonomy refreshIfNeeded(SearcherAndTaxonomy ref) throws IOException {\n final IndexReader r = ref.searcher.getIndexReader();\n final IndexReader newReader = DirectoryReader.openIfChanged((DirectoryReader) r);\n if (newReader == null) {\n return null;\n } else {\n DirectoryTaxonomyReader tr;\n try {\n tr = TaxonomyReader.openIfChanged(ref.taxonomyReader);\n } catch (Throwable t1) {\n try {\n IOUtils.close(newReader);\n } catch (Throwable t2) {\n t2.addSuppressed(t2);\n }\n throw t1;\n }\n if (tr == null) {\n ref.taxonomyReader.incRef();\n tr = ref.taxonomyReader;\n } else if (taxoWriter != null && taxoWriter.getTaxonomyEpoch() != taxoEpoch) {\n IOUtils.close(newReader, tr);\n throw new IllegalStateException(\n \"DirectoryTaxonomyWriter.replaceTaxonomy was called, which is not allowed when using SearcherTaxonomyManager\");\n }\n\n return new SearcherAndTaxonomy(\n SearcherManager.getSearcher(searcherFactory, newReader, r), tr);\n }\n }",
"public void lock_read() {\n boolean update = false;\n logger.log(Level.INFO,\"lock_read()\"+this.lockState);\n lock.lock();\n logger.log(Level.INFO,\"lock_read : taking mutex : \"+this.lockState);\n \t\tswitch(this.lockState){\n \t\t\tcase RLC :\n \t\t\t\tthis.lockState=State.RLT;\n logger.log(Level.INFO,\"reading in cache\");\n \t\t\tbreak;\n \t\t\tcase WLC:\n \t\t\t\tthis.lockState=State.RLT_WLC;\n \t\t\t\tlogger.log(Level.INFO,\"reading in cache as previous writer\");\n \t\t\tbreak;\n \t\t\tdefault:\n update = true;\n \t\t\tbreak;\t\t\t\t\t\n \t\t}\n lock.unlock();\n logger.log(Level.FINE,\"lock_read : release the lock with :\"+lockState+\".\");\n if(update){\n logger.log(Level.INFO,\"Updating lockState to RLT\");\n \tthis.lockState=State.RLT;\n logger.log(Level.INFO,\"Lockstate was updated to \"+lockState);\n if(this.lockState!=State.RLT){\n logger.log(Level.SEVERE,\"Lock = \"+lockState+\" instead of RLT\");\n }\n this.obj = client.lock_read(this.id);\n if(this.lockState!=State.RLT){\n logger.log(Level.SEVERE,\"Lock = \"+lockState+\" instead of RLT\");\n }\n logger.log(Level.INFO,\"lock_read(): end with \"+lockState);\n }\n \t}",
"boolean isUsedForWriting();",
"public void acquireReadLock() {\r\n return;\r\n }",
"public void reopen() throws IOException {\r\n writer.close();\r\n writer = new BufferedWriter(new java.io.FileWriter(file));\r\n }",
"private void setThisRead()\n {\n justOpened = false;\n FirebaseFirestore.getInstance().collection(\"chats\").document(thisUid).get().addOnSuccessListener(new OnSuccessListener<DocumentSnapshot>()\n {\n @Override\n public void onSuccess(DocumentSnapshot documentSnapshot)\n {\n if (documentSnapshot.exists() && documentSnapshot.getData().get(otherUid) != null)\n {\n ChatData thisData = new ChatData((HashMap<String, Object>) documentSnapshot.getData().get(otherUid));\n if (thisData.isRead())\n return;\n \n HashMap<String, ChatData> mapThis = new HashMap<>();\n thisData.setRead(true);\n mapThis.put(otherUid, thisData);\n FirebaseFirestore.getInstance().collection(\"chats\").document(thisUid).set(mapThis, SetOptions.merge());\n }\n }\n });\n }",
"private boolean isChangedOdoReading(MaintenanceRequest po){\n\t\tboolean isDiff = false;\n\t\tOdometerReading odoReading = null;\n\t\t\n\t\tif(!MALUtilities.isEmpty(po.getCurrentOdo())){\n\t\t\todoReading = odometerService.getOdometerReading(po);\t\t\t\n\t\t\tif(MALUtilities.isEmpty(odoReading)){\n\t\t\t\tisDiff = true;\n\t\t\t} else {\n\t\t\t\tif(po.getCurrentOdo() != odoReading.getReading() || !po.getActualStartDate().equals(odoReading.getReadingDate())){\n\t\t\t\t\tisDiff = true;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn isDiff;\n\t}",
"public synchronized void close() throws IOException {\n\t\tm_reader.close();\n\t}",
"public void decreaseFileReaderReference(TsFileResource tsFile, boolean isClosed) {\n synchronized (this) {\n if (!isClosed && unclosedReferenceMap.containsKey(tsFile.getTsFilePath())) {\n if (unclosedReferenceMap.get(tsFile.getTsFilePath()).decrementAndGet() == 0) {\n closeUnUsedReaderAndRemoveRef(tsFile.getTsFilePath(), false);\n }\n } else if (closedReferenceMap.containsKey(tsFile.getTsFilePath())\n && (closedReferenceMap.get(tsFile.getTsFilePath()).decrementAndGet() == 0)) {\n closeUnUsedReaderAndRemoveRef(tsFile.getTsFilePath(), true);\n }\n }\n tsFile.readUnlock();\n }",
"synchronized public void rdlock() {\n\t\tlong tid = Thread.currentThread().getId();\n\n\t\t// Place myself on queue\n\t\treadersQueue.enq(tid);\n\n\t\t// While its not my turn, wait\n\t\twhile (readersQueue.getFirstItem() != tid\n\t\t\t\t|| activeWriter == true\n\t\t\t\t|| activeReaders >= maxReaders\n\t\t\t\t|| (bias == 'W' && writersQueue.isEmpty() == false)) {\n\t\t\ttry {\n\t\t\t\twait();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t}\n\n\t\t// Its my turn, remove myself from queue\n\t\treadersQueue.deq();\n\n\t\t// DEBUG\n if (activeWriter == true\n \t\t|| activeReaders >= maxReaders\n \t\t|| (bias == 'W' && writersQueue.isEmpty() == false)) {\n \tSystem.out.println(\"BUG IN READER\");\n }\n\n\t\t// I am now an active reader!\n\t\tactiveReaders++;\n\n\t\t// Signal all, so other readers may continue\n\t\tnotifyAll();\n\t}",
"@Test\n\t@Transactional\n\t@DirtiesContext\n\tpublic void testRestartOnSecondPage() throws Exception {\n\n\t\tgetAsItemStream(reader).open(executionContext);\n\t\t\n\t\tFoo foo1 = reader.read();\n\t\tassertEquals(1, foo1.getValue());\n\t\tFoo foo2 = reader.read();\n\t\tassertEquals(2, foo2.getValue());\n\t\tFoo foo3 = reader.read();\n\t\tassertEquals(3, foo3.getValue());\n\t\tFoo foo4 = reader.read();\n\t\tassertEquals(4, foo4.getValue());\n\n\t\tgetAsItemStream(reader).update(executionContext);\n\t\n\t\tgetAsItemStream(reader).close();\n\n\t\t// create new input source\n\t\treader = createItemReader();\n\n\t\tgetAsItemStream(reader).open(executionContext);\n\n\t\tFoo foo5 = reader.read();\n\t\tassertEquals(5, foo5.getValue());\n\n\t\tassertNull(reader.read());\n\t}",
"@Override\n public void close() {\n if (complete.compareAndSet(false, true)) {\n rc = BKException.Code.UnexpectedConditionException;\n writeSet.recycle();\n }\n entryImpl.close();\n }",
"public void close() throws IOException {\n reader.close();\n }",
"void unlockRead(long stamp);",
"@Override\n\t\tpublic void rewind() throws DbException, TransactionAbortedException {\n\t\t\tclose();\n\t\t\topen();\n\t\t}",
"protected final void lockRead() {\n m_lock.readLock().lock();\n }",
"void oldconsume() {\n\t\tfor (;;) {\n\t\t\tif (printoldline > oldinfo.maxLine)\n\t\t\t\tbreak; /* end of file */\n\t\t\tprintnewline = oldinfo.other[printoldline];\n\t\t\tif (printnewline < 0)\n\t\t\t\tshowdelete();\n\t\t\telse if (blocklen[printoldline] < 0)\n\t\t\t\tskipold();\n\t\t\telse showmove();\n\t\t}\n\t}",
"public void writerUnlock() throws Exception {\n\t\t// TODO\n\t\tif(holders.get() instanceof ReaderList){\n\t\t\tthrow new Exception(\"Lock was held by a reader, one should use readerUnlock()\");\n\t\t}else if(holders.get() == null){\n\t\t\tthrow new Exception(\"Lock was not held by anyone\");\n\t\t}\n\t\tfinal Thread current = Thread.currentThread();\n\t\tif(((Writer)holders.get()).thread.equals(current)){\n\t\t\tholders.compareAndSet(holders.get(), null);\n\t\t}else{\n\t\t\tthrow new Exception(\"Lock was not held by this thread \");\n\t\t}\n\t}",
"public void finish() throws Exception {\n\t\tthis.reader.open();\n\t\tthis.reader.autoModeReset();\n\t\tthis.reader.setNotifyMode(AlienClass1Reader.OFF);\n\t\tthis.reader.close();\n\t}",
"StreamReader underlyingReader();",
"@Override\r\n\t\tpublic boolean isClosed() throws SQLException {\n\t\t\treturn false;\r\n\t\t}",
"private void cleanup(InputStream in) {\n try {\n if (reader != null)\n reader.close();\n if (in != null)\n in.close();\n reader = null;\n }\n catch (Exception ex) {\n // ignore!\n }\n }",
"@Override\n public void close()\n {\n synchronized (this) {\n if (closed) {\n return;\n }\n closed = true;\n }\n\n readers.forEach(ExchangeStorageReader::close);\n }",
"public boolean isOwnReader(StatDataFileReader reader) {\n if (reader == null) {\n throw new IllegalArgumentException(\"reader == null!\");\n }\n String name = reader.getClass().getName();\n return name.equals(pluginClassName);\n }",
"synchronized protected void rewind() {\n\t\ttry {\n\t\t\tais.close();\n\t\t} catch (IOException e) {\n\t\t\tthrow new CCSoundException(\"JSPCMAudioRecordingStream::rewind - Error closing the stream before reload\", e);\n\t\t}\n\t\tais = CCSoundIO.getAudioInputStream(meta.fileName());\n\t}",
"public void setRead(){\n \tthis.isRead = true;\n }",
"private void ensureWrite() throws IOException {\n if (!reading) return;\n resetForWrite();\n }",
"protected abstract Reader getReader() throws IOException;",
"public void closeStream() {\n\t\ttry {\n\t\t\tisReaderStatusClosed = true;\n\t\t\tif(buffReader != null) {\n\t\t\t\tbuffReader.close();\n\t\t\t}\n\t\t} catch(Exception e) { }\n\t}",
"private void ensureReadNonBuffered() throws IOException, BadDescriptorException {\n if (reading) {\n if (buffer.hasRemaining()) {\n Ruby localRuntime = getRuntime();\n if (localRuntime != null) {\n throw localRuntime.newIOError(\"sysread for buffered IO\");\n } else {\n throw new IOException(\"sysread for buffered IO\");\n }\n }\n } else {\n // libc flushes writes on any read from the actual file, so we flush here\n flushWrite();\n buffer.clear();\n buffer.flip();\n reading = true;\n }\n }",
"boolean pullingOnce();",
"private void doRecoveryRead() {\n if (!promise.isDone()) {\n startEntryToRead = endEntryToRead + 1;\n endEntryToRead = endEntryToRead + clientCtx.getConf().recoveryReadBatchSize;\n new RecoveryReadOp(lh, clientCtx, startEntryToRead, endEntryToRead, this, null)\n .initiate();\n }\n }",
"@Override\n\t public synchronized void close() throws IOException {\n\t\tin.close();\n\t\topen = false;\n\t }",
"@Override\r\n\tpublic boolean isClosed() throws SQLException {\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean isClosed() throws SQLException {\n\t\treturn false;\r\n\t}",
"private boolean _read(Transaction trans, DBObject obj, int index,\n boolean forUpdate, Filter filter) throws StorageException,\n LockConflict {\n long previousHolder = 0;\n if (forUpdate)\n previousHolder = lock(trans, index);\n\n // Get the location of the row on this page\n int loc = dir.loc(index);\n\n if (!RowHeader.isDeleted(pageBuffer, loc)) {\n // Read the tuple\n pageBuffer.get(loc + RowHeader.getOverhead(), obj);\n\n if (filter == null || filter.passes(obj)) {\n if (forUpdate) {\n // log the lock (needed for multi-versioning undo purposes)\n attachUndo(UNDO_LOCK, 10).getData().putShort((short) index)\n .putLong(previousHolder);\n attachRedo(REDO_LOCK, 10).getData().putShort((short) index)\n .putLong(trans.getTransId());\n }\n return true;\n }\n }\n\n if (forUpdate) {\n // Replace the lock before returning false\n if (previousHolder == 0)\n RowHeader.setLocked(pageBuffer, loc, false);\n else\n RowHeader.setLockHolder(pageBuffer, loc, previousHolder);\n }\n\n return false;\n }",
"public Reader getReader()\n {\n return reader;\n }",
"@Override\n public boolean isClosed() throws SQLException {\n return false;\n }",
"@Override\n\tpublic void closeReader() throws IOException, BracketsParseException {\n\t\ttry {\n\t\t\treader.close();\n\t\t\tif (!marks.isEmpty())\n\t\t\t\tthrow new BracketsParseException(\"]\");\n\t\t} catch (java.io.IOException e) {\n\t\t\tthrow new IOException();\n\t\t}\n\t}",
"final boolean processNextFrame() {\n try {\n // This method call results in one or more onRead* methods being called on this thread.\n reader.processNextFrame();\n\n return !readerSawClose;\n } catch (Throwable t) {\n Util.throwIfFatal(t);\n replyToReaderError(t);\n if (t instanceof IOException && !(t instanceof ProtocolException)) {\n readerListener.onClose(WebSocketProtocol.CLOSE_ABNORMAL_TERMINATION, \"\");\n } else {\n readerListener.onFailure(t, null);\n }\n return false;\n }\n }",
"@Override\n\tpublic boolean isClosed() throws SQLException {\n\t\treturn false;\n\t}",
"boolean hasGetLatestReading();",
"@Override\n\t\tpublic BufferedReader getReader() throws IOException {\n\t\t\treturn null;\n\t\t}",
"@Override\n\tpublic BufferedReader getReader() throws IOException {\n\t\treturn null;\n\t}",
"@Override\n\tpublic BufferedReader getReader() throws IOException {\n\t\treturn null;\n\t}",
"public abstract void endRead(boolean restart);",
"protected boolean afterMerge() throws DBSIOException{return true;}",
"protected boolean upgradeLocks() {\n \t\treturn false;\n \t}",
"@Override\n protected boolean closeLast() {\n if (!super.closeLast()) {\n return false;\n }\n\n // close the corresponding session object.\n // NOTE:\n // because the Session.close() method eventually call this method\n // indirectly after setting the session's open flag to false.\n // So call Session.close() ONLY if the session is open to avoid\n // recursion.\n Session session = getQLEditorSupport().getSession();\n if (session.isOpen()) {\n try {\n session.close();\n } catch (ConnectionException ex) {\n\n // TODO: handle exception\n Exceptions.printStackTrace(ex);\n }\n }\n\n return true;\n }"
] | [
"0.6323008",
"0.62322474",
"0.62014425",
"0.6182321",
"0.6105456",
"0.6065783",
"0.60186636",
"0.59889704",
"0.598833",
"0.59451413",
"0.5878823",
"0.57713974",
"0.57544327",
"0.5743618",
"0.5645277",
"0.56452674",
"0.5617421",
"0.56120765",
"0.560596",
"0.56057215",
"0.56021124",
"0.5578917",
"0.5570232",
"0.5542734",
"0.55381036",
"0.5537943",
"0.5537723",
"0.55233306",
"0.55133784",
"0.550858",
"0.5501429",
"0.5499134",
"0.54949003",
"0.5487647",
"0.54857737",
"0.5479459",
"0.54621667",
"0.54563546",
"0.54543173",
"0.5454109",
"0.54478276",
"0.54471713",
"0.5437624",
"0.5436287",
"0.5432049",
"0.54226786",
"0.5413215",
"0.5404598",
"0.5374072",
"0.5369298",
"0.53428787",
"0.53373635",
"0.5328414",
"0.5325313",
"0.5324858",
"0.53196996",
"0.5314931",
"0.5295932",
"0.52611464",
"0.5252321",
"0.5244196",
"0.52429616",
"0.52421725",
"0.5229444",
"0.52196676",
"0.52031934",
"0.51977015",
"0.51910883",
"0.5187879",
"0.5178921",
"0.5173384",
"0.517297",
"0.51703024",
"0.51680607",
"0.5162253",
"0.51567596",
"0.515337",
"0.5151285",
"0.5150141",
"0.51473373",
"0.51448506",
"0.5143716",
"0.5143338",
"0.5143217",
"0.51414347",
"0.5138897",
"0.5138897",
"0.5110733",
"0.51080126",
"0.5104378",
"0.5101436",
"0.5100727",
"0.50968266",
"0.509498",
"0.50874513",
"0.50856936",
"0.50856936",
"0.5081927",
"0.507865",
"0.50746626",
"0.5061159"
] | 0.0 | -1 |
/ Unregister a reader, if it's the last one using it then close the reader except if it's the only reader for that index! | public synchronized void unRegister(File indexDir, IndexReader reader) throws Exception{
if (!mReaders.containsKey(indexDir)){
throw new Exception("Unauthorized operation");
}
synchronized (mReaders) {
List<ReaderContainer> lReader = mReaders.get(indexDir);
//
log.debug("unRegister-STEP1 :: lReader size = "+lReader.size()+" | index of reader = "+lReader.indexOf(new ReaderContainer(reader)));
//
ReaderContainer readerContainer = lReader.get(lReader.indexOf(new ReaderContainer(reader)));
readerContainer.decNbSearch();
if (readerContainer.isClosable()){
readerContainer.close();
lReader.remove(readerContainer);
log.debug("unRegister :: closed = (unRegister) size lreader = "+lReader.size()+" | reader = "+reader);
}
log.debug("unRegister-STEP2 :: lReader size = "+lReader.size()+" | index of reader = "+lReader.indexOf(new ReaderContainer(reader)));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void closeReader() throws IOException{\n if(isOpen){\n csvReader.close();\n }\n\n }",
"public void close() throws IOException {\r\n reader.close();\r\n reader = null;\r\n }",
"public void disconnect() {\n if (reader != null) {\n reader.stop();\n }\n\n }",
"public synchronized void dropReaders() throws IOException {\n\t\tif (mReader != null) {\n\t\t\tmReader.decreaseRef();\n\t\t\tmReader = null;\n\t\t}\n\t\tif (mMergeReader != null) {\n\t\t\tmMergeReader.decreaseRef();\n\t\t\tmMergeReader = null;\n\t\t}\n\t\tdecreaseRef();\n\t}",
"public synchronized void closeAndRemoveAllOpenedReaders() throws IOException {\n Iterator<Map.Entry<String, TsFileSequenceReader>> iterator =\n closedFileReaderMap.entrySet().iterator();\n while (iterator.hasNext()) {\n Map.Entry<String, TsFileSequenceReader> entry = iterator.next();\n entry.getValue().close();\n if (resourceLogger.isDebugEnabled()) {\n resourceLogger.debug(\"{} closedTsFileReader is closed.\", entry.getKey());\n }\n closedReferenceMap.remove(entry.getKey());\n iterator.remove();\n }\n iterator = unclosedFileReaderMap.entrySet().iterator();\n while (iterator.hasNext()) {\n Map.Entry<String, TsFileSequenceReader> entry = iterator.next();\n entry.getValue().close();\n if (resourceLogger.isDebugEnabled()) {\n resourceLogger.debug(\"{} unclosedTsFileReader is closed.\", entry.getKey());\n }\n unclosedReferenceMap.remove(entry.getKey());\n iterator.remove();\n }\n }",
"protected final void close()\n {\n try {\n _reader.close();\n _reader = null;\n } catch ( IOException except ) { }\n }",
"public void close() throws IOException {\n reader.close();\n }",
"public void close() throws IOException {\n reset();\n _reader.close();\n }",
"@Override\n public void close() {\n \ttry {\n \t\tif(reader != null) {\n \t\t\treader.close();\n \t\t}\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n }",
"public void closeWriter () {\n try {\n writer.close();\n indexDir.close();\n indexHandler = null;\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public synchronized void close() throws IOException {\n\t\tm_reader.close();\n\t}",
"@Override\n public void close()\n {\n if (closed) {\n return;\n }\n closed = true;\n\n try {\n stats.addMaxCombinedBytesPerRow(recordReader.getMaxCombinedBytesPerRow());\n recordReader.close();\n }\n catch (IOException e) {\n throw new UncheckedIOException(e);\n }\n }",
"public void writerUnlock() throws Exception {\n\t\t// TODO\n\t\tif(holders.get() instanceof ReaderList){\n\t\t\tthrow new Exception(\"Lock was held by a reader, one should use readerUnlock()\");\n\t\t}else if(holders.get() == null){\n\t\t\tthrow new Exception(\"Lock was not held by anyone\");\n\t\t}\n\t\tfinal Thread current = Thread.currentThread();\n\t\tif(((Writer)holders.get()).thread.equals(current)){\n\t\t\tholders.compareAndSet(holders.get(), null);\n\t\t}else{\n\t\t\tthrow new Exception(\"Lock was not held by this thread \");\n\t\t}\n\t}",
"public abstract void remove(UIReader reader);",
"@Override public void close() throws IOException {\r\n\t\tif (closed) return;\r\n\t\tfor (Reader reader: readerQueue) {\r\n\t\t\treader.close();\r\n\t\t}\r\n\t\tclosed = true;\r\n\t}",
"@Override\n public void close() {\n dataPageIterator = null;\n DBComponent.BUFFER_MANAGER().unpin(dataPageId, false);\n }",
"private void close() throws CorruptIndexException, IOException {\n\n\t\tidxWriter.forceMerge(1);\n\t\tidxWriter.commit();\n\t\tidxWriter.close();\n\t}",
"public void readerUnlock() throws Exception, ClassCastException {\n\t\t// TODO\n\t\tif(holders.get() == null){\n\t\t\tthrow new Exception(\"Lock is not held by anyone\");\n\t\t}\n\t\tfinal Thread current = Thread.currentThread();\n\t\tReaderList newList;\n\t\tHolders readerLock;\n\t\tdo {\n\t\t\treaderLock = holders.get(); //return the value - not the instance holders\n\t\t\tif (readerLock instanceof Writer) {\n\t\t\t\tthrow new Exception(\"Lock is not held by any reader\");\n\t\t\t}\n\t\t\tif(!((ReaderList) readerLock).contains(current)){\n\t\t\t\tthrow new Exception(\"Lock not acquired\");\n\t\t\t}\n\t\t\tnewList = ((ReaderList) readerLock).remove(current);\n\t\t} while (!holders.compareAndSet(readerLock, newList));\n\t}",
"public void remove() { throw new UnsupportedOperationException(\"Cannot remove from a ReadWrappingIterator\"); }",
"public void readerUnlock() {\n Holders rootHolder = null;\n Holders newHolder = null;\n final Thread current = Thread.currentThread();\n\n do {\n Holders holder = this.holder.get();\n newHolder = null;\n rootHolder = holder;\n // A reader lock can only exist if the holder is a ReaderList instance.\n if (holder instanceof Writer) {\n throw new IllegalStateException();\n }\n\n // A reader lock can only be unlocked if it exists.\n if (!((ReaderList)holder).contains(current)) {\n throw new IllegalStateException();\n }\n\n // get a new ReaderList without the reader lock of current Thread\n newHolder = ((ReaderList)holder).remove(current);\n\n // Attempt to update ReaderList holder.\n } while (!holder.compareAndSet(rootHolder, newHolder));\n }",
"@Override\n public void close()\n {\n synchronized (this) {\n if (closed) {\n return;\n }\n closed = true;\n }\n\n readers.forEach(ExchangeStorageReader::close);\n }",
"public synchronized void finishReading() {\n readerNumber--;\n if (readerNumber == 0) {\n this.notifyAll(); // notify possible waiting writers \n }\n }",
"@Override\n protected synchronized void removeReader(ChannelHandlerReadSubscription subscription) {\n super.removeReader(subscription);\n }",
"@Override\n\t\tpublic void unlock() {\n\n\t\t\tsynchronized (lock) {\n\t\t\t\treaders--;\n\t\t\t\tlock.notifyAll();\n\t\t\t}\n\n\t\t}",
"public static void close( Reader reader )\n {\n if ( reader != null )\n {\n try\n {\n reader.close();\n }\n catch ( IOException e )\n {\n log.error( \"Error closing reader: \" + reader, e );\n }\n }\n }",
"public void close() {\n\t\t\n\t\ttry {\n\t\t\tindexWriter.optimize();\n\t\t\t\n\t\t\tindexWriter.close();\n\t\t\t\n\t\t\tIndexSearcher = new IndexSearcher(idx);\n\t\t\t\n\t\t} catch (CorruptIndexException 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\t\n\t\t\n\t}",
"public void closescan() {\n\t\t\r\n\t}",
"protected final void unlockRead() {\n m_lock.readLock().unlock();\n }",
"public boolean closeRead() throws Exception;",
"public synchronized void close() throws IOException {\n\t\tif (journalWriter == null) {\n\t\t\treturn; // already closed\n\t\t}\n\t\tfor (Entry entry : new ArrayList<Entry>(lruEntries.values())) {\n\t\t\tif (entry.currentEditor != null) {\n\t\t\t\tentry.currentEditor.abort();\n\t\t\t}\n\t\t}\n\t\ttrimToSize();\n\t\tjournalWriter.close();\n\t\tjournalWriter = null;\n\t}",
"public void decreaseFileReaderReference(TsFileResource tsFile, boolean isClosed) {\n synchronized (this) {\n if (!isClosed && unclosedReferenceMap.containsKey(tsFile.getTsFilePath())) {\n if (unclosedReferenceMap.get(tsFile.getTsFilePath()).decrementAndGet() == 0) {\n closeUnUsedReaderAndRemoveRef(tsFile.getTsFilePath(), false);\n }\n } else if (closedReferenceMap.containsKey(tsFile.getTsFilePath())\n && (closedReferenceMap.get(tsFile.getTsFilePath()).decrementAndGet() == 0)) {\n closeUnUsedReaderAndRemoveRef(tsFile.getTsFilePath(), true);\n }\n }\n tsFile.readUnlock();\n }",
"private void close() {\n try {\n if (reader != null) {\n this.reader.close();\n }\n if (writer != null) {\n this.writer.close();\n }\n }\n catch (IOException e) {\n log.error(e);\n log.debug(Constants.STREAM_IS_CLOSED);\n }\n }",
"public void releaseReadLock() {\r\n return;\r\n }",
"@Override\npublic void close() throws IOException, JoinsException, SortException, IndexException {\n\t\n}",
"private void advanceToNextReader(){\r\n\t\tcurrentReader = null;\r\n\t\treaderQueueIndex++;\r\n\t}",
"private void disconnect() {\n if (readerThread != null)\n readerThread.kill();\n if (writerThread != null)\n writerThread.kill();\n if (nonblockReader != null) {\n nonblockReader.close();\n }\n isConnected = false;\n }",
"public synchronized void destroyWriter(WriterPoolMember writer) throws IOException {\n currentActive--; \n writer.close();\n }",
"public void close() throws IOException {\n\t\tin.close();\n \n\t\t// Release the buffer\n\t\tdataIn = null;\n\t\tbuffer = null;\n\t\tif(readRecordsCounter != null) {\n\t\t readRecordsCounter.increment(numRecordsRead);\n\t\t}\n\n\t\t// Return the decompressor\n\t\tif (decompressor != null) {\n\t\t decompressor.reset();\n\t\t CodecPool.returnDecompressor(decompressor);\n\t\t decompressor = null;\n\t\t}\n\t }",
"void releaseReadLock();",
"public void close() {\n\t\tSystem.out.println(\"WordReader.close\");\n\t}",
"public void closeIndexWriter() throws IOException {\n if(indexWriter != null) {\n try {\n indexWriter.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }",
"protected void tearDown() throws Exception {\n _reader.close();\n }",
"private void close() {\n/* */ try {\n/* 253 */ if (this.dataReader != null) {\n/* 254 */ this.dataReader.close();\n/* 255 */ this.dataReader = null;\n/* */ } \n/* 257 */ } catch (SQLException e) {\n/* 258 */ logger.log(Level.SEVERE, (String)null, e);\n/* */ } \n/* */ try {\n/* 261 */ if (this.pstmt != null) {\n/* 262 */ this.pstmt.close();\n/* 263 */ this.pstmt = null;\n/* */ } \n/* 265 */ } catch (SQLException e) {\n/* 266 */ logger.log(Level.SEVERE, (String)null, e);\n/* */ } \n/* */ }",
"@Override\n\tpublic void closeReader() throws IOException, BracketsParseException {\n\t\ttry {\n\t\t\treader.close();\n\t\t\tif (!marks.isEmpty())\n\t\t\t\tthrow new BracketsParseException(\"]\");\n\t\t} catch (java.io.IOException e) {\n\t\t\tthrow new IOException();\n\t\t}\n\t}",
"void removeRow(int row_index) throws IOException;",
"public void close() throws IndexerException {\n\t\t//TODO\n\t\t\n\t}",
"public void stop() {\n isRunning = false;\n\n mReadLogsHandler = null;\n if (mReadLogThread != null) {\n final Thread inherited = mReadLogThread;\n mReadLogThread = null;\n inherited.interrupt();\n }\n\n IOUtilities.closeStream(reader);\n }",
"public void close() throws FormatException, IOException {\n if (in != null) in.close();\n in = null;\n currentId = null;\n }",
"private void disconnectReader() {\n if (mBluetoothGatt == null) {\n updateConnectionState(BluetoothReader.STATE_DISCONNECTED);\n return;\n }\n updateConnectionState(BluetoothReader.STATE_DISCONNECTING);\n mBluetoothGatt.disconnect();\n }",
"public CoreResourceHandle remove(int index) {\n if (index >= 0 && index < doSize()) {\n return doRemove(index);\n }\n throw new IndexOutOfBoundsException();\n }",
"public final void close() {\n LuaValue[] old = array;\n array = new LuaValue[] {old[index]};\n old[index] = null;\n index = 0;\n }",
"public void afterRead(int i) throws IOException {\n if (i == -1) {\n close();\n }\n }",
"void close(boolean evictOnClose) throws IOException;",
"@Override\n public void close() throws IOException\n {\n try {\n mergingIterator.close();\n }\n finally {\n cleanup.run();\n }\n }",
"private void internalReadUnlock() {\n checkpointLock.readLock().unlock();\n\n if (ASSERTION_ENABLED)\n CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() - 1);\n }",
"@Override\n\t public synchronized void close() throws IOException {\n\t\tin.close();\n\t\topen = false;\n\t }",
"public void finish() throws Exception {\n\t\tthis.reader.open();\n\t\tthis.reader.autoModeReset();\n\t\tthis.reader.setNotifyMode(AlienClass1Reader.OFF);\n\t\tthis.reader.close();\n\t}",
"public void closeCSVStream() {\n\t\ttry {\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void jvnInvalidateReader(int joi) throws java.rmi.RemoteException,jvn.JvnException {\n \t\tthis.listJObject.get(joi).jvnInvalidateReader();\n\t}",
"public Serializable jvnInvalidateWriterForReader(int joi) throws java.rmi.RemoteException,jvn.JvnException { \n\t\treturn this.listJObject.get(joi).jvnInvalidateWriterForReader();\n\t}",
"@Override\n public void dispose() {\n if (currentExpression != null) {\n getDirector().disconnectReadExpression(currentExpression);\n }\n currentExpression = null;\n }",
"public void remove() {\n throw new UnsupportedOperationException(\n \"DataSource records may only ever be read once.\");\n }",
"synchronized public void rdlock() {\n\t\tlong tid = Thread.currentThread().getId();\n\n\t\t// Place myself on queue\n\t\treadersQueue.enq(tid);\n\n\t\t// While its not my turn, wait\n\t\twhile (readersQueue.getFirstItem() != tid\n\t\t\t\t|| activeWriter == true\n\t\t\t\t|| activeReaders >= maxReaders\n\t\t\t\t|| (bias == 'W' && writersQueue.isEmpty() == false)) {\n\t\t\ttry {\n\t\t\t\twait();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t}\n\n\t\t// Its my turn, remove myself from queue\n\t\treadersQueue.deq();\n\n\t\t// DEBUG\n if (activeWriter == true\n \t\t|| activeReaders >= maxReaders\n \t\t|| (bias == 'W' && writersQueue.isEmpty() == false)) {\n \tSystem.out.println(\"BUG IN READER\");\n }\n\n\t\t// I am now an active reader!\n\t\tactiveReaders++;\n\n\t\t// Signal all, so other readers may continue\n\t\tnotifyAll();\n\t}",
"@Override\n public void close() throws IOException {\n flushCurrentIndexBlock();\n\n // logger.info(\"Performing final merge\");\n // try {\n //Bin finalMergeBin = geometricParts.getAllShards();\n //doMerge(finalMergeBin, getNextIndexShardFolder(finalMergeBin.size + 1));\n // check point is updated by the merge op.\n\n // } catch (IOException ex) {\n // Logger.getLogger(GeometricRetrieval.class.getName()).log(Level.SEVERE, null, ex);\n //}\n\n }",
"@Override\n\tpublic void close() throws Exception {\n\t\tsuper.close();\n\t\t\n\t\tbnetMap.clear();\n\t\titemIds.clear();\n\t}",
"public void close(){\r\n\t\tif (this.fileWriter != null){\r\n\t\t\ttry {\r\n\t\t\t\tthis.fileWriter.flush();\r\n\t\t\t\tthis.fileWriter.close();\r\n\t\t\t\tthis.fileWriter = null;\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tlogger.error(\"Cannot close the file handle \"+this.myfilename+\". Your results might be lost. Cause: \"+e.getMessage());\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\r\n\t\t}\r\n\t}",
"public synchronized BlackLabIndex getIndexFromReader(String indexName, IndexReader reader, boolean wrapIfNotFound, boolean writeMode) {\n BlackLabIndex blackLabIndex = indexReader2BlackLabIndex.get(reader);\n if (blackLabIndex == null && wrapIfNotFound) {\n // We don't have a BlackLabIndex instance for this IndexReader yet. This can occur if e.g.\n // Solr is in charge of opening IndexReaders. Create a new instance now and register it.\n try {\n blackLabIndex = wrapIndexReader(indexName, reader, false);\n registerIndex(reader, blackLabIndex);\n } catch (ErrorOpeningIndex e) {\n throw new RuntimeException(e);\n }\n }\n return blackLabIndex;\n }",
"@Override\n\tpublic void close() {\n\t\tsuper.close();\n\t\t\n\t\tbnetMap.clear();\n\t\titemIds.clear();\n\t}",
"public void close() throws IndexException {\n }",
"public final void yyclose() throws java.io.IOException {\r\n zzAtEOF = true; /* indicate end of file */\r\n zzEndRead = zzStartRead; /* invalidate buffer */\r\n\r\n if (zzReader != null)\r\n zzReader.close();\r\n }",
"public final void yyclose() throws java.io.IOException {\r\n zzAtEOF = true; /* indicate end of file */\r\n zzEndRead = zzStartRead; /* invalidate buffer */\r\n\r\n if (zzReader != null)\r\n zzReader.close();\r\n }",
"public final void yyclose() throws java.io.IOException {\r\n zzAtEOF = true; /* indicate end of file */\r\n zzEndRead = zzStartRead; /* invalidate buffer */\r\n\r\n if (zzReader != null)\r\n zzReader.close();\r\n }",
"public final void yyclose() throws java.io.IOException {\r\n zzAtEOF = true; /* indicate end of file */\r\n zzEndRead = zzStartRead; /* invalidate buffer */\r\n\r\n if (zzReader != null)\r\n zzReader.close();\r\n }",
"public final void yyclose() throws java.io.IOException {\r\n zzAtEOF = true; /* indicate end of file */\r\n zzEndRead = zzStartRead; /* invalidate buffer */\r\n\r\n if (zzReader != null)\r\n zzReader.close();\r\n }",
"@Override\n public void close()\n {\n notifyLegacyIndexOperationQueue();\n\n }",
"public void Close() throws IOException, ClassNotFoundException {\n\t\tsaveBlock(); \n\t\tmergeAllIndex();\n\t\tsaveToken();\n\t\tdocIdx.close();\n\t}",
"public final void yyclose() throws IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"@Override\n public void close() {\n backingIterator.close();\n outputBuffer.close();\n isClosed = true;\n }",
"private static void j_unlock() {\r\n\t\tFileChannel channel = globalFileChannel;\r\n\t\tFileLock lock = globalFileLock;\r\n\t\tglobalFileChannel = null;\r\n\t\tglobalFileLock = null;\r\n\t\ttry {\r\n\t\t\tlock.release();\r\n\t\t} catch (Throwable t) {\r\n\t\t\t;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tchannel.close();\r\n\t\t} catch (Throwable t) {\r\n\t\t\t;\r\n\t\t}\r\n\t}",
"public void close() throws IOException {\n open = false;\n stream.close();\n }",
"public void flush() {\n synchronized (getLock()) {\n sIndexWritersCache.flush(this);\n sIndexReadersCache.removeIndexReader(this);\n }\n }",
"@Override\r\n\tpublic void delete(int r_idx) throws Exception {\n\r\n\t}",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }",
"public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }"
] | [
"0.6394177",
"0.63647985",
"0.61902213",
"0.61898804",
"0.61553764",
"0.6113237",
"0.6054358",
"0.6007875",
"0.60073483",
"0.59979135",
"0.5911924",
"0.5910779",
"0.583613",
"0.58337957",
"0.58102196",
"0.579812",
"0.57628804",
"0.57265234",
"0.5722915",
"0.57041174",
"0.56921846",
"0.56784874",
"0.5648607",
"0.56327784",
"0.5627224",
"0.56159824",
"0.56073546",
"0.56031764",
"0.5595699",
"0.5587424",
"0.5575083",
"0.5566203",
"0.5558236",
"0.55304736",
"0.5503547",
"0.5464711",
"0.5453379",
"0.54493463",
"0.5424043",
"0.54226536",
"0.5419282",
"0.53995544",
"0.5397759",
"0.5395332",
"0.5392737",
"0.5370006",
"0.53563315",
"0.5353372",
"0.53480655",
"0.5347819",
"0.53419864",
"0.5332984",
"0.53157187",
"0.5315695",
"0.5308393",
"0.5287526",
"0.52792144",
"0.5272364",
"0.5271462",
"0.52648175",
"0.5228845",
"0.5222842",
"0.5221013",
"0.5209324",
"0.52064985",
"0.52011454",
"0.51958877",
"0.5183724",
"0.51724505",
"0.5170318",
"0.5170318",
"0.5170318",
"0.5170318",
"0.5170318",
"0.5169171",
"0.51446164",
"0.5144576",
"0.51391536",
"0.51364756",
"0.5135477",
"0.5131516",
"0.5127521",
"0.51266116",
"0.51266116",
"0.51266116",
"0.51266116",
"0.51266116",
"0.51266116",
"0.51266116",
"0.51266116",
"0.51266116",
"0.51266116",
"0.51266116",
"0.51266116",
"0.51266116",
"0.51266116",
"0.51266116",
"0.51266116",
"0.51266116",
"0.51266116"
] | 0.6972261 | 0 |
Do tasks upsertion This is the place where you may catch and treat exceptions for which tasks upsertion shouldn't be retried (e.g in case of invalid tasks). Otherwise throw exception | private void upsertTasks(UpsertTasksEvent upsertTasksEvent, UpsertTaskInputTopic inputTopic) {
LocalDateTime startTime = LocalDateTime.now();
try {
upsertTasksInternal(upsertTasksEvent, inputTopic);
} catch ( ResourceNotFoundException e) {
LOGGER.error("Upserting tasks for lane {} failed with exception. " +
"Won't be retried as failure is unrecoverable for event: {}", inputTopic, upsertTasksEvent, e);
publishIncrementMetric(DD_ASPECT_UPSERT_TASKS_BY_KAFKA_EVENTS + inputTopic + ".EventCountUnrecoverable");
}
publishHistogramMetric(DD_ASPECT_UPSERT_TASKS_BY_KAFKA_EVENTS + inputTopic + ".EventUpsertDuration",
Duration.between(startTime, LocalDateTime.now()).toMillis());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void tryDoingTasksInQueue() {\n var list = queue.exceptionsList;\n var t2 = new Thread(() -> {\n Retry.Operation op = (list1) -> {\n if (!list1.isEmpty()) {\n LOG.warn(\"Error in accessing queue db to do tasks, trying again..\");\n throw list1.remove(0);\n }\n doTasksInQueue();\n };\n Retry.HandleErrorIssue<QueueTask> handleError = (o, err) -> {\n };\n var r = new Retry<>(op, handleError, numOfRetries, retryDuration,\n e -> DatabaseUnavailableException.class.isAssignableFrom(e.getClass()));\n try {\n r.perform(list, null);\n } catch (Exception e1) {\n e1.printStackTrace();\n }\n });\n t2.start();\n }",
"int insertTask(TaskInfo taskInfo);",
"@Test\n public void insertTaskReplacesOnConflict() {\n mDatabase.taskDao().insertTask(TASK);\n\n // When a task with the same id is inserted\n Task newTask = new Task(\"title2\", \"description2\", \"id\", true);\n mDatabase.taskDao().insertTask(newTask);\n // When getting the task by id from the database\n Task loaded = mDatabase.taskDao().getTaskById(TASK.getId());\n\n // The loaded data contains the expected values\n assertTask(loaded, \"id\", \"title2\", \"description2\", true);\n }",
"@Insert\n long insert(Task task);",
"int insert(_task record);",
"@Override\n public Task then(@NonNull Task<DocumentSnapshot> task) throws Exception {\n boolean alreadyUpvoted = task.getResult().exists();\n\n if (alreadyUpvoted) {\n throw new AlreadyUpvotedException();\n } else {\n // Not currently upvoted\n\n // Creates a HashMap containing a new entry to add to the user's upvoted posts\n HashMap<String, Object> data = new HashMap<>();\n data.put(\"post\", postReference);\n data.put(\"timestamp\", new Date());\n\n // Add the post to the user's upvoted posts\n return userReference.collection(\"upvotedPosts\").document(postReference.getId()).set(data);\n }\n }",
"int insert(Task record);",
"private void processTask(Task task) throws SQLException, DaoException {\n if (!task.isChanged()) {\n processTaskList(task.getSubTaskList());\n return;\n }\n\n if (task.isForDeletion()) {\n deleteTask(task);\n return;\n } else if (task.getId() != -1) {\n updateTask(task);\n } else {\n insertTask(task);\n }\n\n processTaskList(task.getSubTaskList());\n\n }",
"@Test\n\tpublic void updateTask() {\n\t\tfinal Date dueDate = new Date();\n\t\tfinal Template template = new Template(\"Template 1\");\n\t\ttemplate.addStep(new TemplateStep(\"Step 1\", 1.0));\n\t\tfinal Assignment asgn = new Assignment(\"Assignment 1\", dueDate, template);\n\t\tfinal Task task = new Task(\"Task 1\", 1, 1, asgn.getID());\n\t\tasgn.addTask(task);\n\t\t\n\t\tfinal String asgnId = asgn.getID();\n\t\t\n\t\ttry {\n\t\t\tStorageService.addTemplate(template);\n\t\t\tStorageService.addAssignment(asgn);\n\t\t} catch (final StorageServiceException e) {\n\t\t\tfail(e.getMessage());\n\t\t}\n\t\t\n\t\ttask.setPercentComplete(0.174);\n\t\tStorageService.updateTask(task);\n\t\t\n\t\tfinal Assignment afterAsgn = StorageService.getAssignment(asgnId);\n\t\tassertEquals(asgn.fullString(), afterAsgn.fullString());\n\t}",
"public void attemptToUpdate();",
"boolean updateTask(Task updatedTask);",
"public abstract void prepareTasks() throws JobException;",
"int insertSelective(Task record);",
"@Override\n\tpublic Task processTasks(Task task) {\n\t\tint[] solution =knapsackSolverService.solve(task);\n\t\tif(solution!= null) {\n\t\t\ttask =persistTaskAndSolution(task, solution);\n\t\t}\n\t\treturn task;\n\t}",
"private void executeAddAndArchive(Task tryUpdate)\n throws Exception {\n model.addTask(tryUpdate);\n model.archiveTask(helper.getLastAppendedOccurrence(tryUpdate));\n }",
"void retry(Task task);",
"int insertSelective(_task record);",
"int updateByPrimaryKeySelective(Task record);",
"void addTask(Task person) throws UniqueTaskList.DuplicateTaskException;",
"int updateByPrimaryKeySelective(_task record);",
"public void updateTask() {}",
"protected void succeed() throws InvalidKeyException {\n task.succeed();\n }",
"int updateByPrimaryKey(_task record);",
"@Override\n public final boolean doIt() throws JobException {\n tasks = new LinkedHashMap<TaskKey,TaskJob>();\n prepareTasks();\n (new MergeJob()).startJob();\n return true;\n }",
"public abstract TaskResult runTask(TaskKey taskKey) throws JobException;",
"TaskResponse updateTask(TaskRequest taskRequest, Long taskId);",
"private void runWrongUpdateTask2(BdbMapDao<BytesValue> dbLock,\n BdbMapDao<Blog.BlogEntry> blogEntryDao,\n ByteString key,\n AtomicInteger conflictCount) throws InterruptedException {\n for (int i = 0; i < execTimes; ++i) {\n\n // Optimistic lock, still causes a lot of contention\n boolean wasSuccessful = false;\n\n for (int retries = 0; retries < MAX_RETRIES; ++retries) {\n // [1] acquire record\n BytesValue lock = dbLock.get(null, key, () -> null);\n if (lock == null) { // does somebody acquired this record before?\n // ok - version is empty, looks like we are the ones who acquired it first\n // NOTE: we need big endian representation of long here!\n final ByteString versionKey = ByteString.copyFrom(Longs.toByteArray(versionId.incrementAndGet()));\n\n // [2] assign update version\n dbLock.put(null, key, BytesValue.newBuilder().setValue(versionKey).build());\n\n // [3] retrieve version once more, duplicates should be disregarded\n lock = dbLock.get(null, key, () -> null);\n if (lock != null && lock.getValue().equals(versionKey)) {\n // [4] same version, proceed with the update\n final Blog.BlogEntry original = blogEntryDao.get(null, key);\n blogEntryDao.put(null, key, Blog.BlogEntry.newBuilder(original)\n .setLikes(original.getLikes() + 1)\n .build());\n\n // [5] clear lock versions\n dbLock.delete(null, key);\n wasSuccessful = true;\n break;\n }\n }\n conflictCount.incrementAndGet(); // CAS failed, do it all over again\n } // optimistic lock retry loop\n\n if (!wasSuccessful) {\n throw new IllegalStateException();\n }\n }\n }",
"public void recoverTask(int index, Task task) {\n tasks.add(index, task);\n }",
"int updateByPrimaryKey(Task record);",
"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}",
"public Task rescheduleTask(String index, String dateTime) throws DukeException {\n try {\n int intNum = Integer.parseInt(index);\n Task temp = tasks.get(intNum - 1);\n temp = temp.rescheduleTask(dateTime);\n tasks.set(intNum - 1, temp);\n return temp;\n } catch (NumberFormatException e) {\n throw new DukeException(\"Please specify the index of task and number of hours to snooze!\");\n } catch (IndexOutOfBoundsException e) {\n throw new DukeException(\"Task does not exist!\");\n }\n }",
"public void testUpdateUpsert() {\n String[] updateShardActions = new String[] { UpdateAction.NAME + \"[s]\", BulkAction.NAME + \"[s][p]\", BulkAction.NAME + \"[s][r]\" };\n interceptTransportActions(updateShardActions);\n\n String indexOrAlias = randomIndexOrAlias();\n UpdateRequest updateRequest = new UpdateRequest(indexOrAlias, \"id\").upsert(Requests.INDEX_CONTENT_TYPE, \"field\", \"value\")\n .doc(Requests.INDEX_CONTENT_TYPE, \"field1\", \"value1\");\n UpdateResponse updateResponse = internalCluster().coordOnlyNodeClient().update(updateRequest).actionGet();\n assertEquals(DocWriteResponse.Result.CREATED, updateResponse.getResult());\n\n clearInterceptedActions();\n assertSameIndices(updateRequest, updateShardActions);\n }",
"public void updateTasks(List<Task> listOfTasks);",
"int upsert(UserShare5Min record);",
"public void testSaveTableByTimeWithTxTemplateInService() throws Exception {\n\t\tfailed = false;\n\t\tlogger.info(\"loop test 3\");\n\n\t\tExecutorService executor = Executors.newFixedThreadPool(nThreads * 2);\n\t\tList<Callable<Object>> tasks1 = insertTasks();\n\n\t\tList<Callable<Object>> tasks2 = updateTasksFailing2();\n\n\t\tCollection<Callable<Object>> tasks = new ArrayList<>();\n\t\ttasks.addAll(tasks1);\n\t\ttasks.addAll(tasks2);\n\n\t\trunTasks(executor, tasks);\n\n\t\tshutdownExecutor(executor);\n\t\tlogger.info(\"I have {} Tables saved\", getCountTableServiceFailing());\n\t}",
"@Test\n\tpublic void testUpdateTask() {\n\t}",
"@Override\n\tpublic void process(ResultItems resultItems, Task task) {\n\t List<Game> games = \tresultItems.get(\"games\");\n\t if (CollectionUtils.isNotEmpty(games)) {\n\t\tfor (Game game : games) {\n\t\t\tList<Game> gamess= gameDao.findByUrl(game.getUrl());\n\t\t\tif (gamess.size()>0) {\n\t\t\t\tlog.error(\"该数据已经存在,请不要插入\");\n\t\t\t}else {\n\t\t\t\tgameDao.save(game);\n\t\t\t\tlog.error(\"数据插入成功\");\n\t\t\t}\n\t\t}\n\t}\n\t \n\t}",
"@Transactional(Transactional.TxType.REQUIRES_NEW)\n public TaskDef update(TaskDef taskEntity) {\n return TaskDefIntegrationService.update(taskEntity);\n }",
"public void executeTask(Version theTask) {\n\n\tif (_stoppedTasks.contains(theTask)) {\n\t // todo: what to do here???\n\t // this task obviously didn't perform well .. \n\t // and now, there's another request to run it!\n\t if (true) {\n\t\t// either try the task again ... \n\t\t_stoppedTasks.remove(theTask);\n\t } else {\n\t\t// or, refuse to run it at all \n\t\treturn;\n\t }\n\t}\n\t\n\t// System.out.println(\" - - - - - - - - - - - PSL! entered executeTask, parameter version> \" + theTask);\n\t// if (_versionCache.contains(theTask)) return;\n\n\n\t// add the pre-execution task to our knowledge base\n\t// replicate it so that in case of a crash we may recover\n\t_versionCache.addVersion(theTask);\n\treplicate(theTask);\n\n\t// tell replicators that we are about to start executing\n\talertReplicatorsExecutingTask(theTask);\n\n\tString taskName = ((TaskDefinition)theTask.data()).getName();\n\n\t// execute the task and get the next task\n\tVersion nextTask = executeTaskLocal(theTask);\n\t_log.completedTaskLocal(theTask);\n\n\tif (_stoppedTasks.contains(theTask)) {\n\t // this task was supposed to be stopped .. can ignore result\n\t _stoppedTasks.remove(theTask);\n\t _log.ignoreResultsOfStoppedTask(theTask);\n\t} else if (nextTask == null) { \n\t // this only happens if we have reached\n\t // the end of the workflow execution \n\t // tell replicators that everything is done.\n\t System.out.println(\"WORKFLOW IS DONE\");\n\t alertReplicatorsDoneExecutingTask(theTask);\n\t} else {\n\t nextTask.append(taskName);\n\t // todo: we need to find a way to replicate the \n\t // post-execution task in a clean way. The here-under\n\t // commented code does not work as it creates a version clash.\n\t // todo: 16-Feb maybe uncomment this??\n\t // _versionCache.addVersion(nextTask);\n\n\t // set the next task for execution\n\t queueTask(nextTask);\n\t // tell the replicators we are done executing the task, they\n\t // don't have to worry about things anymore.\n\t alertReplicatorsDoneExecutingTask(theTask);\n\t}\n }",
"@Override\n public Task<Boolean> then(@NonNull Task<Long> task) throws Exception {\n return addPostToUserUpvoted(postReference, postObject.getOp()).continueWith(new Continuation<Void, Boolean>() {\n @Override\n public Boolean then(@NonNull Task task) throws Exception {\n // Not upvoting post anymore\n upvotingPost = false;\n return true;\n }\n });\n }",
"int insertDptTask(DptTaskInfo dptTaskInfo);",
"private void registerTaskInstances() {\n\t\t// For all tasks from DB\n\t\tfor (TaskFromDBTrigger trigger : tasksList) {\n\t\t\tif (trigger.isValid()) {\n\t\t\t\ttrigger.initTrigger();\n\t\t\t} else {\n\t\t\t\tlog.error(\"Invalid task from db with ID: \" + trigger.getTaskId());\n\t\t\t}\n\t\t}\n\t}",
"private static void fileUpsertsWithRetry(List<CSVRecord> csvRecords, List<String> columns, Map<String, Class> columnClasses,\n String tableName, Connection connection, String keywordEscapeChar) throws Exception {\n\n DeadlockHandler h = new DeadlockHandler();\n h.setDelayBackOff(true);\n h.setMaxAttempts(20); //this will give it a couple of hours\n while (true) {\n try {\n fileUpsertImpl(csvRecords, columns, columnClasses, tableName, connection, keywordEscapeChar);\n break;\n\n } catch (Exception ex) {\n if (!h.canHandleError(ex)) {\n //if we've had too many goes or its an unexpected error, then log the details of the batch and throw the exception up\n logBatchError(csvRecords, columns);\n throw ex;\n }\n }\n }\n }",
"public void processTasks (List tasks) {\n for (Iterator iter = tasks.iterator(); iter.hasNext(); ) {\n Task t = (Task) iter.next();\n if (t.getPlanElement () == null) {\n\tAsset a = findAsset(t);\n\tPlanElement alloc = createAllocation(t, a);\n\tpublishAddingOfAllocation(alloc);\n }\n else {\n\tObject uid = ((Allocation)t.getPlanElement()).getAsset().getUID();\n\n\t// this will happen when we become aware of changed tasks\n\tif (isInfoEnabled()) {\n\t info (getName () + \" task \" + t.getUID () + \" was already allocated to \" + uid);\n\t}\n\n\tif (!uid.equals(findAsset(t).getUID ())) {\n\t if (isWarnEnabled()) {\n\t warn (getName () + \" task \" + t.getUID () + \" was already allocated to \" + uid + \n\t\t \" but trying to allocate to different asset \" + findAsset(t).getUID());\n\t }\n\t}\n }\n } \n\n tasks.clear();\n }",
"public void testSaveTableByTimeWithTxTemplateInTest() throws Exception {\n\t\tfailed = false;\n\t\tlogger.info(\"loop test 2\");\n\n\t\tExecutorService executor = Executors.newFixedThreadPool(nThreads * 2);\n\t\tList<Callable<Object>> tasks1 = insertTasks();\n\n\t\tList<Callable<Object>> tasks2 = updateTasksFailing();\n\n\t\tCollection<Callable<Object>> tasks = new ArrayList<>();\n\t\ttasks.addAll(tasks1);\n\t\ttasks.addAll(tasks2);\n\n\t\trunTasks(executor, tasks);\n\n\t\tshutdownExecutor(executor);\n\t\tlogger.info(\"I have {} Tables saved\", getCountTableFailing());\n\t}",
"@Override\n public Task<Boolean> then(@NonNull Task task) throws Exception {\n return addPostScoreToUser(postObject.getOp(), -1L).continueWithTask(new Continuation<Long, Task<Boolean>>() {\n @Override\n public Task<Boolean> then(@NonNull Task task) throws Exception {\n // Deletes post from user's upvoted posts\n return userReference.collection(\"upvotedPosts\").document(postReference.getId()).delete().continueWith(new Continuation<Void, Boolean>() {\n @Override\n public Boolean then(@NonNull Task<Void> task) throws Exception {\n return false;\n }\n });\n }\n });\n }",
"org.oasis_open.docs.ns.bpel4people.ws_humantask.types._200803.TTaskAbstract insertNewTaskAbstract(int i);",
"@Override\n public void execute(TaskList tasks, Storage storage) throws DukeException {\n this.task = tasks.doneTask(storage, this.index);\n }",
"@Test\n public void updateTaskAndGetById() {\n mDatabase.taskDao().insertTask(TASK);\n\n // When the task is updated\n Task updatedTask = new Task(\"title2\", \"description2\", \"id\", true);\n mDatabase.taskDao().updateTask(updatedTask);\n\n // When getting the task by id from the database\n Task loaded = mDatabase.taskDao().getTaskById(\"id\");\n\n // The loaded data contains the expected values\n assertTask(loaded, \"id\", \"title2\", \"description2\", true);\n }",
"public boolean isUpsert() {\n return upsert;\n }",
"void put(TaskEntity userEntity);",
"public Task done(String numString) throws DukeException {\n try {\n int num = Integer.parseInt(numString);\n return tasks.set(num - 1, tasks.get(num - 1).completeTask());\n } catch (IndexOutOfBoundsException e) {\n throw new DukeException(\"The task does not exist!\");\n } catch (NumberFormatException e) {\n throw new DukeException(\"Please key in an index!\");\n }\n }",
"public void updateTask(Task task){//needs to depend on row num\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(KEY_ID,task.getId());\n values.put(KEY_LABEL,task.getLabel());\n values.put(KEY_TIME, task.getTime());\n db.update(TABLE_NAME, values, KEY_ID+\" = ?\",\n new String[] { String.valueOf(task.getId()) });\n }",
"@Test\n public void testUpdate() throws Exception {\n String theTaskId = \"999\";\n String query = String.format(\"select empId from %s.%s where taskId = '%s'\",\n tableSchema.schemaName, TASK_TABLE_NAME, theTaskId);\n\n TestConnection connection = methodWatcher.getOrCreateConnection();\n connection.setAutoCommit(false);\n\n // insert good data\n PreparedStatement ps = methodWatcher.prepareStatement(\n String.format(\"insert into %s.%s (taskId, empId, startedAt, finishedAt) values (?,?,?,?)\",\n tableSchema.schemaName, TASK_TABLE_NAME));\n ps.setString(1, theTaskId);\n ps.setInt(2, 101);\n ps.setInt(3, 0600);\n ps.setInt(4, 0700);\n int rows = ps.executeUpdate();\n Assert.assertEquals(1, rows);\n\n ResultSet rs = connection.createStatement().executeQuery(query);\n rs.next();\n Assert.assertEquals(101, rs.getInt(1));\n Assert.assertFalse(\"Only one row expected.\", rs.next());\n\n ps = methodWatcher.prepareStatement(\n String.format(\"update %s.%s set empId = ? where taskId = ?\", tableSchema.schemaName, TASK_TABLE_NAME));\n ps.setInt(1, 102);\n ps.setString(2, theTaskId);\n rows = ps.executeUpdate();\n Assert.assertEquals(1, rows);\n\n rs = connection.createStatement().executeQuery(query);\n rs.next();\n Assert.assertEquals(102, rs.getInt(1));\n Assert.assertFalse(\"Only one row expected.\", rs.next());\n }",
"@Override\n public CommandResult execute() {\n tasks.add(taskToAdd);\n try {\n storage.appendToFile(taskToAdd);\n return new CommandResult(String.format(MESSAGE_SUCCESS, taskToAdd));\n } catch (IOException e) {\n return new CommandResult(e.getMessage());\n }\n }",
"@Insert\n long[] insertAll(Task... tasks);",
"private void importToDB(String id) throws Exception\n\t{\n\t\tboolean locked = false;\n try\n {\n\t\t\tint retries = 0;\n\t\t\tlocked = locker.lockUpload(id);\n\t\t\twhile (!locked && retries < MAX_LOCK_RETRIES)\n\t\t\t{\n\t\t\t\t// Someone may be doing a HEAD or a TERMINATE, wait 50 millisecs ..\n\t\t\t\tThread.sleep(50);\n\t\t\t\tlocked = locker.lockUpload(id);\n\t\t\t\tretries++;\n\t\t\t}\n if (!locked)\n {\n log.error(\"Couldn't lock \" + id);\n throw new TusException.FileLocked();\n }\n whileLocked(id);\n }\n finally\n {\n if (locked)\n {\n locker.unlockUpload(id);\n }\n }\n\t}",
"@Override\n public SyncObjectState call() {\n\n SyncObjectState callState = SyncObjectState.STARTED;\n \n \n long remainingSleep = task.getSleepUntil() - System.currentTimeMillis();\n if (remainingSleep > 0) {\n try {\n Thread.sleep(remainingSleep);\n } catch (InterruptedException ex) {\n logger.warn(buildStandardLogMessage(null, \" Interrupted task-remaining-sleep\"));\n }\n }\n\n // TODO: consider replacing Lock with with IMap, for the automatic GC\n // see https://groups.google.com/forum/#!topic/hzProcessingClient/9YFGh3xwe8I\n Lock hzPidLock = hzProcessingClient.getLock(task.getPid());\n \n // this section must be thread-safe otherwise, we may skip unlocking a lock.\n // see http://docs.hazelcast.org/docs/3.5/manual/html/lock.html\n try {\n logger.info(buildStandardLogMessage(null, \" Locking task, attempt \" + task.getLockAttempt()));\n \n if (hzPidLock.tryLock(1, TimeUnit.SECONDS)) {\n // got lock\n try {\n logger.info(buildStandardLogMessage(null, \" Processing SyncObject\"));\n SystemMetadata mnSystemMetadata = retrieveMNSystemMetadata();\n logger.debug(task.taskLabel() + \" MN system metadata retrieved...\");\n\n processTask(mnSystemMetadata);\n callState = SyncObjectState.SUCCESS;\n \n } catch (RetryableException ex) {\n if (task.getAttempt() < 20) {\n callState = SyncObjectState.RETRY;\n \n logger.warn(buildStandardLogMessage(ex, \" RetryableException raised on attempt \"\n + task.getAttempt() + \" of 20. Sleeping and requeueing.\"));\n\n task.setAttempt(task.getAttempt() + 1);\n task.setSleepUntil(System.currentTimeMillis() + 5000L);\n\n hzProcessingClient.getQueue(synchronizationObjectQueue).put(task);\n \n } else {\n logger.error(buildStandardLogMessage(ex,\" Exceeded retry limit.\"\n + \" Unable to process the SyncObject. Converting to UnrecoverableException\"),ex);\n throw new UnrecoverableException(task.getPid() + \": retry limits reached without success.\",\n ex.getCause());\n }\n } finally {\n hzPidLock.unlock();\n logger.info(buildStandardLogMessage(null, \" Unlocked Pid.\"));\n }\n } else {\n // lock-retry handling\n if (task.getLockAttempt() < 100) {\n callState = SyncObjectState.RETRY;\n \n logger.warn(buildStandardLogMessage(null,\n \" Cannot lock Pid! Requeueing the task. Attempt \" + task.getLockAttempt()));\n\n task.setLockAttempt(task.getLockAttempt() + 1);\n task.setSleepUntil(System.currentTimeMillis() + 1000L);\n hzProcessingClient.getQueue(synchronizationObjectQueue).put(task);\n \n } else {\n callState = SyncObjectState.FAILED;\n \n String message = \"Cannot lock Pid! Reached Max attempts (100), abandoning processing of this pid.\";\n logger.error(buildStandardLogMessage(null, message));\n throw new SynchronizationFailed(\"5000\",message);\n }\n }\n } catch (SynchronizationFailed e) {\n callState = SyncObjectState.FAILED;\n \n logger.error(buildStandardLogMessage(e.getCause(),\"SynchronizationFailed: \" + e.getMessage()),e);\n SyncFailedTask syncFailedTask = new SyncFailedTask(nodeCommunications, task);\n syncFailedTask.submitSynchronizationFailed(e);\n\n } catch (UnrecoverableException e) {\n callState = SyncObjectState.FAILED;\n // this is the proper location to decide whether or not to notify the MemberNode\n // (these are exceptions caused by internal problems)\n \n // in all cases, we need to log\n logger.error(buildStandardLogMessage(e.getCause(),\"UnrecoverableException: \" + e.getMessage()),e);\n \n // report to MN, for now\n\n SyncFailedTask syncFailedTask = new SyncFailedTask(nodeCommunications, task);\n if (e.getCause() instanceof BaseException)\n syncFailedTask.submitSynchronizationFailed(task.getPid(), null,(BaseException) e.getCause());\n \n else \n syncFailedTask.submitSynchronizationFailed(task.getPid(), null,\n new ServiceFailure(\"5000\", this.buildStandardLogMessage(e.getCause(), null)));\n\n\n \n } catch (InterruptedException e) {\n callState = SyncObjectState.FAILED;\n // was handled as Exception before I split this out\n // don't know if we need to handle it any differently,\n logger.error(buildStandardLogMessage(e, \"Interrupted: \" + e.getMessage()), e);\n\n } catch (Exception e) {\n callState = SyncObjectState.FAILED;\n logger.error(this.buildStandardLogMessage(e,e.getMessage()),e);\n\n } finally {\n logger.info(buildStandardLogMessage(null, \" exiting with callState: \" + callState));\n// XXX: Hold until 2.4, because it depends on an update to d1_cn_common\n// MetricLogEntry metricLogEntry = new MetricLogEntry(MetricEvent.SYNCHRONIZATION_TASK_EXECUTION);\n// metricLogEntry.setNodeId(TypeFactory.buildNodeReference(task.getNodeId()));\n// metricLogEntry.setPid(TypeFactory.buildIdentifier(task.getPid()));\n// metricLogEntry.setMessage(\"status=\" + callState);\n// MetricLogClientFactory.getMetricLogClient().logMetricEvent(metricLogEntry);\n }\n return callState;\n }",
"@Override\n public Task<Boolean> then(@NonNull Task<DocumentSnapshot> task) throws Exception {\n boolean alreadyUpvoted = task.getResult().exists();\n\n if (!alreadyUpvoted) {\n // If not, return true\n\n // I don't know how to make just a new task with a boolean result\n // so this is my solution\n return postReference.get().continueWith(new Continuation<DocumentSnapshot, Boolean>() {\n @Override\n public Boolean then(@NonNull Task<DocumentSnapshot> task) throws Exception {\n return true;\n }\n });\n } else {\n // Post was already upvoted\n\n // Get post\n return postReference.get().continueWithTask(new Continuation<DocumentSnapshot, Task<Boolean>>() {\n @Override\n public Task<Boolean> then(@NonNull Task<DocumentSnapshot> task) throws Exception {\n // Creates post object\n final Post postObject = task.getResult().toObject(Post.class);\n\n // Subtracts 1 score from post\n return addScoreToPost(postReference, -1L).continueWithTask(new Continuation<Long, Task<Boolean>>() {\n @Override\n public Task<Boolean> then(@NonNull Task task) throws Exception {\n // Subtracts 1 score from user's post score\n return addPostScoreToUser(postObject.getOp(), -1L).continueWithTask(new Continuation<Long, Task<Boolean>>() {\n @Override\n public Task<Boolean> then(@NonNull Task task) throws Exception {\n // Deletes post from user's upvoted posts\n return userReference.collection(\"upvotedPosts\").document(postReference.getId()).delete().continueWith(new Continuation<Void, Boolean>() {\n @Override\n public Boolean then(@NonNull Task<Void> task) throws Exception {\n return false;\n }\n });\n }\n });\n }\n });\n }\n });\n }\n }",
"boolean updateActiveTask(Task task);",
"@Override\n public void saveTask(TaskEntity task) {\n this.save(task);\n }",
"UpdateResponse upsert(UpdateRequest updateRequest) throws IOException;",
"@Override\n public Task<DocumentReference> then(@NonNull Task<DocumentSnapshot> task) throws Exception {\n int postRegionId = Integer.valueOf(task.getResult().get(\"uid\").toString());\n // Check if user is muted and/or banned from the region\n if (!getUserRank(postRegionId).isMuted() && !getUserRank(postRegionId).isBanned()) {\n // Create post with\n return rapidCreatePost(title, body, photoURL, region).addOnCompleteListener(new OnCompleteListener<DocumentReference>() {\n @Override\n public void onComplete(@NonNull Task<DocumentReference> task) {\n // Let everyone else know we aren't creating a post anymore\n creatingPost = false;\n }\n });\n } else {\n // They are banned and/or muted\n if (getUserRank(postRegionId).isBanned())\n throw new InsufficientPremissionsException(\"User is banned from this region\");\n else\n throw new InsufficientPremissionsException(\"User is muted in this region\");\n }\n }",
"@Override\n public Task<Boolean> then(@NonNull Task task) throws Exception {\n return addPostScoreToUser(postObject.getOp(), 1L).continueWithTask(new Continuation<Long, Task<Boolean>>() {\n @Override\n public Task<Boolean> then(@NonNull Task<Long> task) throws Exception {\n // Add post to user's upvoted posts\n return addPostToUserUpvoted(postReference, postObject.getOp()).continueWith(new Continuation<Void, Boolean>() {\n @Override\n public Boolean then(@NonNull Task task) throws Exception {\n // Not upvoting post anymore\n upvotingPost = false;\n return true;\n }\n });\n }\n });\n }",
"@Override\r\n\tpublic Task addTask(Task task) {\n\t\treturn taskRepository.save(task);\r\n\t}",
"protected void onPostExecute(Void v) {\n if(repeating) {\n Toast.makeText(Dash.this, \"Task will be re-added!\", Toast.LENGTH_LONG).show();\n }\n\n // reload task list\n mTaskRetriever = new TaskRetriever();\n mTaskRetriever.execute((Void) null);\n }",
"private CompletionStage<ReconcileResult<KafkaUserQuotas>> internalUpsert(Reconciliation reconciliation, String username, KafkaUserQuotas desired) {\n LOGGER.debugCr(reconciliation, \"Upserting quotas for user {}\", username);\n\n return patchQuotas(reconciliation, username, desired)\n .handleAsync((r, e) -> {\n if (e != null) {\n LOGGER.warnCr(reconciliation, \"Failed to upsert quotas of user {}\", username, e);\n throw new CompletionException(e);\n } else {\n LOGGER.debugCr(reconciliation, \"Quotas for user {} upserted\", username);\n cache.put(username, desired); // Update the cache\n\n return ReconcileResult.patched(desired);\n }\n }, executor);\n }",
"public int addTask(Task task) {\n\t\treturn (Integer)getHibernateTemplate().save(task);\n\t}",
"@Override\n public Task<Boolean> then(@NonNull Task<DocumentSnapshot> task) throws Exception {\n final Post postObject = task.getResult().toObject(Post.class);\n // Add one score to post\n return addScoreToPost(postReference, 1L).continueWithTask(new Continuation<Long, Task<Boolean>>() {\n @Override\n public Task<Boolean> then(@NonNull Task task) throws Exception {\n // Add one score to user's post score\n return addPostScoreToUser(postObject.getOp(), 1L).continueWithTask(new Continuation<Long, Task<Boolean>>() {\n @Override\n public Task<Boolean> then(@NonNull Task<Long> task) throws Exception {\n // Add post to user's upvoted posts\n return addPostToUserUpvoted(postReference, postObject.getOp()).continueWith(new Continuation<Void, Boolean>() {\n @Override\n public Boolean then(@NonNull Task task) throws Exception {\n // Not upvoting post anymore\n upvotingPost = false;\n return true;\n }\n });\n }\n });\n }\n });\n }",
"@Override\n public void execute(final Task<T> task) {\n }",
"public Task update(Task item) {\n\t\t// set the user id (not sure this is where we should be doing this)\n\t\titem.setUserId(getUserId());\n\t\titem.setEmailAddress(getUserEmail());\n\t\tif (item.getDueDate() == null) {\n\t\t\tCalendar c = Calendar.getInstance();\n\t\t\tc.set(2011, 5, 11);\n\t\t\titem.setDueDate(c.getTime());\n\t\t}\n\t\tPersistenceManager pm = PMF.get().getPersistenceManager();\n\t\ttry {\n\t\t\tpm.makePersistent(item);\n\t\t\treturn item;\n\t\t} finally {\n\t\t\tpm.close();\n\t\t}\n\t}",
"private void handleUnassignedTask(String path) {\n if (ZKSplitLog.isRescanNode(watcher, path)) {\n return;\n }\n Task task = findOrCreateOrphanTask(path);\n if (task.isOrphan() && (task.incarnation.get() == 0)) {\n LOG.info(\"resubmitting unassigned orphan task \" + path);\n // ignore failure to resubmit. The timeout-monitor will handle it later\n // albeit in a more crude fashion\n resubmitTask(path, task, FORCE);\n }\n }",
"private static CompletionStage<Void> persistOrUpdate(ReactiveMongoCollection collection, List<Object> entities) {\n List<WriteModel> bulk = new ArrayList<>();\n for (Object entity : entities) {\n //we transform the entity as a document first\n BsonDocument document = getBsonDocument(collection, entity);\n\n //then we get its id field and create a new Document with only this one that will be our replace query\n BsonValue id = document.get(ID);\n if (id == null) {\n //insert with autogenerated ID\n bulk.add(new InsertOneModel(entity));\n } else {\n //insert with user provided ID or update\n BsonDocument query = new BsonDocument().append(ID, id);\n bulk.add(new ReplaceOneModel(query, entity,\n ReplaceOptions.createReplaceOptions(new UpdateOptions().upsert(true))));\n }\n }\n\n return collection.bulkWrite(bulk).thenApply(b -> null);\n }",
"protected void updateTaskEmailsManually() {\n List<Object> arguments = new ArrayList<Object>();\n String emailToReplace = \"[email protected]\";\n arguments.add(emailToReplace);\n List<Task> results = BeanHelper.getWorkflowDbService().searchTasksAllStores(\"(wfc_owner_email=? )\", arguments, -1).getFirst();\n Map<QName, Serializable> changedProps = new HashMap<QName, Serializable>();\n for (Task task : results) {\n changedProps.clear();\n try {\n String ownerId = task.getOwnerId();\n String newTaskOwnerEmail = BeanHelper.getUserService().getUserEmail(ownerId);\n if (StringUtils.isBlank(newTaskOwnerEmail)) {\n LOG.warn(\"The e-mail of following task was not updated because no user e-mail address was found:\\n\" + task);\n continue;\n }\n changedProps.put(WorkflowCommonModel.Props.OWNER_EMAIL, newTaskOwnerEmail);\n BeanHelper.getWorkflowDbService().updateTaskEntryIgnoringParent(task, changedProps);\n LOG.info(\"Updated task [nodeRef=\" + task.getNodeRef() + \"] e-mail manually: \" + emailToReplace + \" -> \" + newTaskOwnerEmail);\n } catch (Exception e) {\n LOG.error(e);\n continue;\n }\n }\n }",
"@Override\n protected Void doInBackground(Void... v) {\n try {\n repeating = ServerCom.removeTask(mAptID, tempTask.getDescription(), tempTask.getAssignee());\n } catch (Exception e) {\n this.exception = e;\n }\n\n return null;\n }",
"void executeTask(org.apache.ant.common.antlib.Task task) throws org.apache.ant.common.util.ExecutionException;",
"public void serializeExecutionOfTasks(Collection<Task> tasks, Class<? extends Task> taskClass) {\n int tasksRun = 1;\n while (tasksRun > 0) {\n tasksRun = 0;\n for (Iterator<Task> it = tasks.iterator(); it.hasNext(); ) {\n int attempts = 0;\n Task t = it.next();\n while (true) {\n try {\n if (taskClass.isAssignableFrom(t.getClass())) {\n tasksRun++;\n run(t);\n it.remove();\n }\n break;\n } catch (RuntimeException e) {\n if (attempts++ >= retries) {\n throw e;\n }\n log.error(e.toString(), e);\n log.info(\"Retrying \" + attempts + \" of \" + retries);\n }\n }\n }\n }\n }",
"public static int supvCheck(int myId, int taskid, int updatenum){\n try {\n Statement st = conn.createStatement();\n\n //add checkerid in indvprogressupdate for this updatenum\n String addChecker = \"UPDATE progressupdate SET checkerid = %d WHERE updatenum = \" + updatenum ;\n st.executeUpdate(String.format(addChecker, myId));\n\n //remove updatenum from indvsupvupdate in user for supv\n //TODO remove all otherstaskupdate of all group member\n String getMembersCommand = \"SELECT * FROM grouptask WHERE taskid = \" + taskid;\n ResultSet taskInfo = st.executeQuery(getMembersCommand);\n taskInfo.next();\n Long[] members = (Long[])taskInfo.getArray(\"member\").getArray();\n for(Long memberid : members){\n String removeUpdate = \"UPDATE users SET otherstaskupdate = array_remove(otherstaskupdate, '%d') WHERE userid = \" + memberid ;\n st.executeUpdate(String.format(removeUpdate, updatenum));\n }\n\n //update task owner progress(increment) in individual TODO:check deadline, repetition etc.\n //String updateMyIndv = \"UPDATE grouptask SET progress = progress + 1 WHERE taskid =\" + taskid;\n //st.executeUpdate(updateMyIndv);\n\n //add updatenum to indvupdate in user\n ResultSet ownerResult = st.executeQuery(\"SELECT userid FROM progressupdate WHERE updatenum =\" + updatenum);\n ownerResult.next();\n int ownerid = Integer.parseInt(ownerResult.getString(\"userid\"));\n String addIndvUpdate = \"UPDATE users SET mytaskupdate = array_append(mytaskupdate, '%d') WHERE userid=%d;\";\n st.execute(String.format(addIndvUpdate, updatenum , ownerid));\n\n //TODO update progress\n String progressTrackCommand = String.format(\n \"UPDATE progresstrack SET progress = progress+1, checkcount = checkcount+1 WHERE taskid = %d AND memberid = %d\",\n taskid, ownerid);\n st.executeUpdate(progressTrackCommand);\n\n st.close();\n return SUCCESS;\n } catch (SQLException e) {\n return SERVER_FAILURE;\n }\n }",
"private UUID importCollections(final EntityManager em) throws Exception {\n\n logger.debug(\"\\n\\nImport into new app {}\\n\", em.getApplication().getName() );\n\n final ImportService importService = setup.getImportService();\n\n final Import importEntity = importService.schedule(em.getApplication().getUuid(),\n new HashMap<String, Object>() {{\n put( \"path\", organization.getName() + em.getApplication().getName() );\n put( \"organizationId\", organization.getUuid() );\n put( \"applicationId\", em.getApplication().getUuid() );\n put( \"properties\", new HashMap<String, Object>() {{\n put( \"storage_provider\", \"s3\" );\n put( \"storage_info\", new HashMap<String, Object>() {{\n put( \"s3_access_id\",\n System.getProperty( SDKGlobalConfiguration.ACCESS_KEY_ENV_VAR) );\n put( \"s3_key\",\n System.getProperty( SDKGlobalConfiguration.SECRET_KEY_ENV_VAR ) );\n put( \"bucket_location\", bucketName );\n }} );\n }} );\n }});\n\n int maxRetries = 30;\n int retries = 0;\n Import.State state = importService.getState(importEntity.getUuid());\n while ( !state.equals( Import.State.FINISHED )\n && !state.equals( Import.State.FAILED )\n && retries++ < maxRetries ) {\n\n logger.debug(\"Waiting for import ({}) ...\", state.toString());\n Thread.sleep(1000);\n\n state = importService.getState(importEntity.getUuid());\n }\n\n if ( retries >= maxRetries ) {\n throw new RuntimeException(\"Max retries reached\");\n }\n setup.getEntityIndex().refresh(em.getApplicationId());\n\n\n return importEntity.getUuid();\n }",
"boolean addTask(Task newTask);",
"@Test(timeout = TIMEOUT)\n public void optimizeFileTaskLifecycle() throws Exception {\n final Result<TaskResponse> uploadImportTaskResponseResult = docSDKClient.importUsing().upload(new UploadImportRequest(), jpgTest1InputStream);\n assertThat(uploadImportTaskResponseResult.getStatus()).isEqualTo(HttpStatus.SC_OK);\n\n final TaskResponse uploadImportTaskResponse = uploadImportTaskResponseResult.getBody();\n assertThat(uploadImportTaskResponse.getOperation()).isEqualTo(Operation.IMPORT_UPLOAD);\n\n // Optimize\n final OptimizeFilesTaskRequest optimizeFilesTaskRequest = new OptimizeFilesTaskRequest().setInput(uploadImportTaskResponse.getId()).setInputFormat(JPG);\n final Result<TaskResponse> optimizeTaskResponseResult = docSDKClient.tasks().optimize(optimizeFilesTaskRequest);\n assertThat(optimizeTaskResponseResult.getStatus()).isEqualTo(HttpStatus.SC_CREATED);\n\n final TaskResponse optimizeTaskResponse = optimizeTaskResponseResult.getBody();\n assertThat(optimizeTaskResponse.getOperation()).isEqualTo(Operation.OPTIMIZE);\n\n // Wait\n final Result<TaskResponse> waitOptimizeTaskResponseResult = docSDKClient.tasks().wait(optimizeTaskResponse.getId());\n assertThat(waitOptimizeTaskResponseResult.getStatus()).isEqualTo(HttpStatus.SC_OK);\n\n final TaskResponse waitOptimizeTaskResponse = waitOptimizeTaskResponseResult.getBody();\n assertThat(waitOptimizeTaskResponse.getOperation()).isEqualTo(Operation.OPTIMIZE);\n assertThat(waitOptimizeTaskResponse.getStatus()).isEqualTo(Status.FINISHED);\n assertThat(waitOptimizeTaskResponse.getId()).isEqualTo(optimizeTaskResponse.getId());\n\n // Show\n final Result<TaskResponse> showOptimizeTaskResponseResult = docSDKClient.tasks().show(optimizeTaskResponse.getId());\n assertThat(showOptimizeTaskResponseResult.getStatus()).isEqualTo(HttpStatus.SC_OK);\n\n final TaskResponse showOptimizeTaskResponse = showOptimizeTaskResponseResult.getBody();\n assertThat(showOptimizeTaskResponse.getOperation()).isEqualTo(Operation.OPTIMIZE);\n assertThat(showOptimizeTaskResponse.getStatus()).isEqualTo(Status.FINISHED);\n assertThat(showOptimizeTaskResponse.getId()).isEqualTo(optimizeTaskResponse.getId());\n\n // Delete\n final Result<Void> deleteVoidResult = docSDKClient.tasks().delete(optimizeTaskResponse.getId());\n assertThat(deleteVoidResult.getStatus()).isEqualTo(HttpStatus.SC_NO_CONTENT);\n }",
"private boolean flush()\n {\n List<Protos.SchedulerTask> tasks = this.app.getTasks();\n\n //write all tasks to db\n for(Protos.SchedulerTask task : tasks)\n {\n if( !this.dbClient.updateTask(task) )\n {\n LOGGER.error(\"Failed to flush task to persistent storage\");\n return false;\n }\n }\n\n if( !this.dbClient.updateApp(this.getAppId().getValue(), this.app.getData()) )\n {\n LOGGER.error(\"Failed to flush app to persistent storage\");\n return false;\n }\n\n return true;\n }",
"public void checkTask() throws InvalidTask {\n\n int incidenceOfTask = (int) TaskList.taskArrayList.stream()\n .filter(task -> task.toString().contains(command))\n .count();\n if (incidenceOfTask == 0) {\n throw new InvalidTask();\n }\n\n }",
"@Test\n public void testInWorkTasks() throws Exception {\n TaskKey lInWorkTask = new TaskKey( \"4650:600\" );\n\n // assert that the query returns 4 row\n execute( DateUtils.parseDateTimeString( \"15-MAY-2007 01:00\" ), 5, 4650, 100 );\n assertEquals( 4, iDataSet.getRowCount() );\n\n // make the IN WORK task ACTV\n EvtEventTable lTable = EvtEventTable.findByPrimaryKey( lInWorkTask );\n assertEquals( RefEventStatusKey.IN_WORK, lTable.getEventStatus() );\n lTable.setStatus( RefEventStatusKey.ACTV );\n lTable.update();\n\n // assert that the count gets incremented, indicating that the updated 'IN WORK' task is\n // being returned\n execute( DateUtils.parseDateTimeString( \"15-MAY-2007 01:00\" ), 5, 4650, 100 );\n assertEquals( 5, iDataSet.getRowCount() );\n\n // reset the data back to it's original state\n lTable = EvtEventTable.findByPrimaryKey( lInWorkTask );\n lTable.setStatus( RefEventStatusKey.IN_WORK );\n lTable.update();\n }",
"public int updateTask(Task task) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_TASKNAME, task.getTaskName());\n values.put(KEY_STATUS, task.getStatus());\n values.put(KEY_DATE,task.getDateAt());\n\n // updating row\n return db.update(TABLE_TASKS, values, KEY_ID + \" = ?\",\n new String[] { String.valueOf(task.getId()) });\n }",
"private void processTaskList(List<Task> taskList) throws SQLException, DaoException {\n for (Task currentTask : taskList) {\n processTask(currentTask);\n }\n }",
"@Test\n public void insertTaskAndGetTasks() {\n mDatabase.taskDao().insertTask(TASK);\n\n // When getting the tasks from the database\n List<Task> tasks = mDatabase.taskDao().getTasks();\n\n // There is only 1 task in the database\n assertThat(tasks.size(), is(1));\n // The loaded data contains the expected values\n assertTask(tasks.get(0), \"id\", \"title\", \"description\", true);\n }",
"void updateTask(UserDto user);",
"public void createTasks(Integer _optID, String _tupleTag, String _taskType, String _info1, String _info2, String _destIP, String _port, String _location, long timestamp, Object _appSpecific){ \r\n //System.out.print(\"Create tasks\");\r\n boolean flag = false;\r\n String defaultIP = \"-1\";\r\n String defaultPort = \"-1\";\r\n \r\n //use wildcard to let one worker randomly choose the job to run\r\n //System.out.println(\"---What is optID: \" +_optID);\r\n if(_destIP.equals(\"RANDOM\")){\r\n int tempTaskID = getUpdatedTaskID();\r\n \r\n insertIntoParaList(tempTaskID, _optID, _tupleTag, _taskType,defaultIP,_info1,_info2,defaultPort,_location, timestamp,_appSpecific);\r\n flag = true;\r\n addEntryToResultList(_optID,flag);\r\n //------THE TASK IS INSERTED HERE\r\n insertTask(tempTaskID);\r\n }\r\n //send tuples to all\r\n else if(_destIP.equals(\"ALL\")){\r\n //Iterate through all sites that subscribe to certain types of task \r\n //System.out.println(\"infoSys.getSiteList(): \"+infoSys.getSiteList());\r\n Iterator it = infoSys.getSiteList().entrySet().iterator();\r\n while (it.hasNext()) {\r\n Map.Entry entry = (Map.Entry) it.next();\r\n _destIP = ((String) entry.getKey());\r\n ConcurrentHashMap<String, String> subscribeType = (ConcurrentHashMap<String, String>) entry.getValue();\r\n \r\n //option 2, if there is multiple subscribers of a certain taskType in one site\r\n Iterator subIt = subscribeType.entrySet().iterator();\r\n while (subIt.hasNext()) {\r\n Map.Entry subEntry = (Map.Entry) subIt.next();\r\n String[] typeAndAssociate = subEntry.getValue().toString().split(\",\");\r\n if (typeAndAssociate[0].equals(_tupleTag) && typeAndAssociate[1].equals(_taskType)) {\r\n _port = subEntry.getKey().toString();\r\n\r\n int tempTaskID = getUpdatedTaskID();\r\n insertIntoParaList(tempTaskID, _optID, _tupleTag, _taskType,_destIP, _info1,_info2,_port,_location, timestamp,_appSpecific);\r\n //System.out.println(\"Master out: \"+\"--\"+_tupleTag+\"--\"+_taskType+\"--\"+_optID+\"--\"+_destIP+\"--\"+_budget+\"--\"+_deadline+\"--\"+_port);\r\n flag = true;\r\n addEntryToResultList(_optID,flag);\r\n //------THE TASK IS INSERTED HERE\r\n insertTask(tempTaskID);\r\n \r\n }\r\n }\r\n }\r\n }\r\n //if user choose one specific worker, only send the message to it\r\n else{ \r\n //System.out.println(infoSys.getSiteList());\r\n //Check if this subscriber exists\r\n if (infoSys.hasAssociateSubscriber(_destIP, _port)) {\r\n int tempTaskID = getUpdatedTaskID();\r\n //System.out.println(\"Master out: \"+\"--\"+_tupleTag+\"--\"+_taskType+\"--\"+_optID+\"--\"+_destIP+\"--\"+_budget+\"--\"+_deadline+\"--\"+_port);\r\n insertIntoParaList(tempTaskID, _optID, _tupleTag, _taskType,_destIP,_info1,_info2,_port,_location, timestamp,_appSpecific);\r\n flag = true;\r\n addEntryToResultList(_optID,flag);\r\n insertTask(tempTaskID);\r\n } else {\r\n System.out.println(\"Incorrect destIP or destPort for creating task!\");\r\n }\r\n } \r\n //create entry in resultList\r\n addEntryToResultList(_optID,flag);\r\n }",
"@Override\n\tpublic void insertTask(DetailedTask dt) throws SQLException, ClassNotFoundException\n\t{\n\t\t Gson gson = new Gson();\n\t\t Connection c = null;\n\t\t Statement stmt = null;\n\t\t \n\t\t Class.forName(\"org.postgresql.Driver\");\n\t\t c = DriverManager.getConnection(dataBaseLocation, dataBaseUser, dataBasePassword);\n\t\t c.setAutoCommit(false);\n\t\t \n\t\t logger.info(\"Opened database successfully (insertTask)\");\n\n\t\t stmt = c.createStatement();\n\t\t String sql = \"INSERT INTO task (status, id, description, strasse, plz, ort, latitude, longitude,\"\n\t\t + \" typ, information, auftragsfrist, eingangsdatum, items, hilfsmittel, images) \"\n\t\t + \"VALUES ('\"+dt.getStatus()+\"', \"+dt.getId()+\", '\"+dt.getDescription()+\"', '\"\n\t\t +dt.getStrasse()+\"', \"+dt.getPlz()+\", '\"+dt.getOrt()+\"', \"+dt.getLatitude()+\", \"\n\t\t +dt.getLongitude()+\", '\"+dt.getType()+\"', '\"+dt.getInformation()+\"', \"+dt.getAuftragsfrist()\n\t\t +\", \"+dt.getEingangsdatum()+\", '\"+gson.toJson(dt.getItems())+\"', '\"\n\t\t +gson.toJson(dt.getHilfsmittel())+\"', '\"+dt.getImages()+\"' );\";\n\n\t\t stmt.executeUpdate(sql);\n\n\t\t stmt.close();\n\t\t c.commit();\n\t\t c.close();\n\t\t \n\t\t logger.info(\"Task inserted successfully\");\n\t }",
"@Test\n public void updateCompletedAndGetById() {\n mDatabase.taskDao().insertTask(TASK);\n\n // When the task is updated\n mDatabase.taskDao().updateCompleted(TASK.getId(), false);\n\n // When getting the task by id from the database\n Task loaded = mDatabase.taskDao().getTaskById(\"id\");\n\n // The loaded data contains the expected values\n assertTask(loaded, TASK.getId(), TASK.getTitle(), TASK.getDescription(), false);\n }",
"@Override\n\tpublic String upsert(PersonKey key, Person person) {\n\t\tif (repo.save(person) != null) {\n\t\t\treturn (\"Data is successfully inserted/updated\");\n\t\t} else {\n\t\t\treturn (\"Data is not successfully inserted\");\n\t\t}\n\t\t\n\t}",
"public abstract boolean markStaleTasks(TaskRepository repository, Set<AbstractTask> tasks, IProgressMonitor monitor)\n \t\t\tthrows CoreException;",
"public void testSaveTableByTimeAllTransactional() throws Exception {\n\t\tfailed = false;\n\t\tlogger.info(\"loop test 1\");\n\n\t\tExecutorService executor = Executors.newFixedThreadPool(nThreads * 2);\n\t\tList<Callable<Object>> tasks1 = insertTasks();\n\n\t\tList<Callable<Object>> tasks2 = updateTasksPassing();\n\n\t\tCollection<Callable<Object>> tasks = new ArrayList<>();\n\t\ttasks.addAll(tasks1);\n\t\ttasks.addAll(tasks2);\n\n\t\trunTasks(executor, tasks);\n\n\t\tshutdownExecutor(executor);\n\n\t\tlogger.info(\"I have {} Tables saved\", getCountTablePassing());\n\t}",
"@Override\n public String execute(TaskList tasks, Storage storage) throws DukeException {\n try {\n int index = Integer.parseInt(DESCRIPTION);\n if (index > tasks.count()) {\n throw new IllegalArgumentException();\n }\n storage.setDone(index - 1);\n return tasks.setDone(index - 1);\n } catch (IllegalArgumentException e) {\n throw new DukeException(\"There is no such task in existence.\");\n } catch (IOException e) {\n throw new DukeException(\"There is an error reflecting the task as done in the saved data.\");\n }\n }",
"private void updateMeetingWithVersionHandling(SignupMeeting meeting) throws Exception {\n\t\tfor (int i = 0; i < MAX_NUMBER_OF_RETRY; i++) {\n\t\t\ttry {\n\t\t\t\tupdateSignupMeeting(meeting, true);\n\t\t\t\treturn;\n\t\t\t} catch (OptimisticLockingFailureException e) {\n\t\t\t\t// nothing\n\t\t\t}\n\t\t}\n\t\tthrow new SignupUserActionException(\"Some one updated the meeting before your update. Please try again.\");\n\t}",
"WriteResult addMissingUpserted(final ModifyRequest update, final WriteResult writeResult) {\n if (update.isUpsert() && writeConcern.callGetLastError() && !writeResult.isUpdateOfExisting()\n && writeResult.getUpsertedId() == null) {\n DBObject updateDocument = update.getUpdateDocument();\n DBObject query = update.getQuery();\n if (updateDocument.containsField(\"_id\")) {\n CommandResult commandResult = writeResult.getLastError();\n commandResult.put(\"upserted\", updateDocument.get(\"_id\"));\n return new WriteResult(commandResult, writeResult.getLastConcern());\n } else if (query.containsField(\"_id\")) {\n CommandResult commandResult = writeResult.getLastError();\n commandResult.put(\"upserted\", query.get(\"_id\"));\n return new WriteResult(commandResult, writeResult.getLastConcern());\n }\n }\n return writeResult;\n }",
"public abstract void execute(Task t);",
"public void runPendingTasks() {\n/* */ try {\n/* 578 */ this.loop.runTasks();\n/* 579 */ } catch (Exception e) {\n/* 580 */ recordException(e);\n/* */ } \n/* */ \n/* */ try {\n/* 584 */ this.loop.runScheduledTasks();\n/* 585 */ } catch (Exception e) {\n/* 586 */ recordException(e);\n/* */ } \n/* */ }",
"public static boolean insertTask(Task task){\n try{\n String query = \"INSERT INTO TASK VALUES (?,?,?,?)\"; // Setup query for task\n PreparedStatement statement = DatabaseHandler.getConnection().prepareStatement(query); // Setup statement for query\n statement.setString(1, task.getName()); // Add task's name to the statement\n statement.setString(2, task.getColor().toString()); // Add task's colour to the statement\n statement.setString(3, \"false\"); // Task completion variable will always be false when a new task is created/added.\n statement.setString(4, task.getDate().toString()); // Add task's date to the statement\n int result = statement.executeUpdate(); // send out the statement\n return (result > 0);\n } catch (SQLException e) { // If the task wasn't able to be added\n e.printStackTrace(); // Create alert for If the task was unable to be added\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setHeaderText(null);\n alert.setContentText(\"Unable to add new task.\");\n alert.showAndWait();\n }\n return false;\n }"
] | [
"0.63172257",
"0.61723197",
"0.61274755",
"0.5943856",
"0.58033216",
"0.57987833",
"0.5777097",
"0.57719344",
"0.5743913",
"0.5739406",
"0.5690335",
"0.5672492",
"0.5668571",
"0.56621313",
"0.5655954",
"0.56531864",
"0.5597925",
"0.5584693",
"0.5563575",
"0.55419505",
"0.550586",
"0.5496036",
"0.5471244",
"0.54687893",
"0.5466726",
"0.5462171",
"0.5415314",
"0.541319",
"0.5403479",
"0.5349258",
"0.53313565",
"0.5309331",
"0.53065324",
"0.5289544",
"0.5280605",
"0.52554715",
"0.5252921",
"0.52269924",
"0.5179621",
"0.51793563",
"0.5159905",
"0.515764",
"0.5149663",
"0.5120401",
"0.5115161",
"0.5112537",
"0.5100923",
"0.5087105",
"0.507889",
"0.50773543",
"0.5065148",
"0.5057744",
"0.50571626",
"0.5055696",
"0.502941",
"0.5015847",
"0.5015128",
"0.50100523",
"0.49939454",
"0.49855885",
"0.4984107",
"0.49814102",
"0.4965727",
"0.49644306",
"0.496208",
"0.49608302",
"0.49549714",
"0.4953483",
"0.49429953",
"0.49398893",
"0.4938146",
"0.49372107",
"0.4936724",
"0.49336705",
"0.49312115",
"0.48932242",
"0.48903477",
"0.48873928",
"0.4884453",
"0.48832142",
"0.48746043",
"0.48743513",
"0.48726416",
"0.48700166",
"0.48577768",
"0.48573783",
"0.48568487",
"0.48525232",
"0.48375785",
"0.48311394",
"0.48300293",
"0.48227978",
"0.48175916",
"0.4817469",
"0.48145285",
"0.48142457",
"0.4803175",
"0.48000732",
"0.4798699",
"0.4782036"
] | 0.70896673 | 0 |
Submits the sick note form. Note that this method doesn't wait until something happens (e.g. submit button is stale for instance). You may have to add a wait yourself after calling this method. | public void submit() {
driver.findElement(SUBMIT_SELECTOR).click();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void SubmitNurseNote(WebDriver driver) throws Exception{\n\t\tWaits.ForElementToBeClickable(driver, btn_ES_Submit(driver));\n\t\tbtn_ES_Submit(driver).click();\n\t\tVerify.ExactPageHeader(driver, \"Hotbox\");\n\t}",
"public void clickOnSubmitButton() throws FileNotFoundException, IOException, ParseException, InterruptedException\n\t{\n\t\twaitForVisibility(sbmnit);\n\t\tsbmnit.click();\n\t}",
"public static void formSaveButton() throws InterruptedException {\n\t\tif (AndroidLocators.returnUsingId(\"saveForm\").isDisplayed()) {\n\t\t\tAndroidLocators.clickElementusingID(\"saveForm\");\n\t\t\tformSaveAlert();\n\t\t} else if (AndroidLocators.resourceId(\"new UiSelector().resourceId(\\\"in.spoors.effortplus:id/saveForm\\\")\")\n\t\t\t\t.isDisplayed()) {\n\t\t\tAndroidLocators.clickElementusingResourceId(\"in.spoors.effortplus:id/saveForm\");\n\t\t\tformSaveAlert();\n\t\t} else {\n\t\t\tAndroidLocators.clickElementusingXPath(\"//*[@content-desc='Save']\");\n\t\t\tformSaveAlert();\n\t\t}\n\t\tCommonUtils.interruptSyncAndLetmeWork();\n\t\t// verify if popup with i understand message is display then click on it\n\t\ti_understand_alert();\n\t}",
"@When(\"^Click's on Submit Button$\")\n\tpublic void click_s_on_Submit_Button() throws Throwable {\n\t\treviewPageObjects.clickonsubmit();\n\t}",
"public static void SaveNurseNote(WebDriver driver) throws Exception{\n\t\tWaits.ForElementToBeClickable(driver, btn_ES_Save(driver));\n\t\tWebElement stale = Waits.StalenessPreset(driver);\n\t\tbtn_ES_Save(driver).click();\n\t\tWaits.ForElementStaleness(driver, stale);\n\t\tWaits.ForElementToBeClickable(driver, btn_ES_Save(driver));\n\t}",
"@Step\r\n\tpublic void clickSubmit() {\r\n\t\tLOGGER.info(\"Clicking submit\");\r\n\t\tspeedoSubmit.click();\r\n\t}",
"public static void form_Save_And_New() throws InterruptedException {\n\t\tAndroidLocators.resourceId(\"in.spoors.effortplus:id/saveForm\").click();\n\t\tCommonUtils.alertContentXpath();\n\t\tif (AndroidLocators.findElements_With_ResourceId(\"new UiSelector().resourceId(\\\"in.spoors.effortplus:id/formSaveAndNewButton\\\")\")\n\t\t\t\t.size() > 0) {\n\t\t\tAndroidLocators.resourceId(\"in.spoors.effortplus:id/formSaveAndNewButton\").click();\n\t\t\tCommonUtils.interruptSyncAndLetmeWork();\n\t\t\tCommonUtils.waitForElementVisibility(\"//*[@resource-id='in.spoors.effortplus:id/saveForm']\");\n\t\t}\n\t}",
"public void performSubmit() {\n\t\tgetWrappedElement().submit();\n\t}",
"public static void pressSubmit(){\n DriverManager.driver.findElement(Constans.SUBMIT_BUTTON_LOCATOR).click();\n }",
"public void clickOnSubmit() {\r\n\r\n\t\treportStep(\"About to click on Submit button \", \"INFO\");\r\n\r\n\t\tif(clickAfterWait(submitButton)) {\r\n\r\n\t\t\treportStep(\"Successfully clicked on the Submit button \", \"PASS\");\r\n\r\n\t\t}else {\r\n\t\t\tclickAfterWait(submitButton);\r\n\t\t\treportStep(\"Failed to click on the Submit button \", \"INFO\");\r\n\r\n\t\t}\r\n\t}",
"public void textBoxSubmit() throws InterruptedException {\n\t\tdriver.get(\"http://www.google.com\");\n\t\tWebElement input = driver.findElement(By.name(\"q\"));\n\t\tinput.sendKeys(\"React\");\n\t\tThread.sleep(1000);\n\t\tinput.clear();\n\t\tThread.sleep(1000);\n\t\tinput.sendKeys(\"Angular\");\n\t\tThread.sleep(1000);\n\t\tinput.submit();\n\t}",
"private void submit() {\r\n\t\tassignTracked();\r\n\t\tBkitPoma.startLoading(constants.BkitPoma_startLoading_wating());\r\n\t\tpostSubmit();\r\n\t}",
"public Page submitPromoteForm(HtmlPage page) throws Exception {\n String action = \"forcePromotion?name=\" + PROMOTION_NAME;\n HtmlForm submitForm = Util.getFormWithAction(page, action);\n if (submitForm != null) {\n HtmlInput input = submitForm.getInputByValue(\"Force promotion\");\n return input.click();\n } else {\n throw new FormNotFoundException(\"Promote form not found.\");\n }\n }",
"public static void form_Save_As_Draft() throws InterruptedException {\n\t\tAndroidLocators.resourceId(\"in.spoors.effortplus:id/saveForm\").click();\n\t\tCommonUtils.alertContentXpath();\n\t\tif (AndroidLocators.findElements_With_ResourceId(\"new UiSelector().resourceId(\\\"in.spoors.effortplus:id/formSaveDraftButton\\\")\")\n\t\t\t\t.size() > 0) {\n\t\t\tAndroidLocators.resourceId(\"in.spoors.effortplus:id/formSaveDraftButton\").click();\n\t\t} else if (AndroidLocators.findElements_With_Id(\"formSaveDraftButton\").size() > 0) {\n\t\t\tAndroidLocators.clickElementusingID(\"formSaveDraftButton\");\n\t\t\tAndroidLocators.resourceId(\"in.spoors.effortplus:id/formSaveDraftButton\").click();\n\t\t} else {\n\t\t\tAndroidLocators.clickElementusingXPath(\"//*[@text='SAVE AS DRAFT']\");\n\t\t\tAndroidLocators.resourceId(\"in.spoors.effortplus:id/formSaveDraftButton\").click();\n\t\t}\n\t\tCommonUtils.interruptSyncAndLetmeWork();\n\t\tCommonUtils.waitForElementVisibility(\"//*[@resource-id='in.spoors.effortplus:id/action_search']\");\n\t\tverify_Draft_Form_Status();\n\t}",
"public void submit()\n\t{\n\t\tString trackCsv = trackCsvInput.getText();\n\t\tString trackName = trackNameInput.getText();\n\t\t\n\t\tRadioButton selectedButton = (RadioButton) toggleColors.getSelectedToggle();\n\t\tString color = selectedButton.getText().toUpperCase();\n\t\t\n\t\tif (addTrack(trackName, trackCsv, color)) \n\t\t{\n\t\t\tStage currStage = (Stage) trackCsvInput.getScene().getWindow();\n\t\t\tcurrStage.close();\n\t\t\tCTC.ctcController.displayTrack();\n\t\t\tCTC.ctcController.displayLegend();\n\t\t}\n\t\telse\n\t\t\terrorMessage.setVisible(true);\n\t}",
"public void submitText() {\r\n \t\tthis.dialog.clickOK();\r\n \t}",
"public EditMode submitExpectingNotification() {\n submit();\n wait.forElementVisible(notificationForAnon);\n Log.info(\"Notification is visible\");\n\n return this;\n }",
"public void submitFeedback()\r\n {\n if(mechanicList.getValue() == null && ratingButtons.getValue() == null){\r\n MainLayout.displayInformationPrompt(\"Missing Information! You Must Include Both Mechanic Name AND Desired Rating.\");\r\n } else if(mechanicList.getValue() == null){\r\n MainLayout.displayInformationPrompt(\"Missing Information! You Must Include Mechanic Name.\");\r\n } else if(ratingButtons.getValue() == null){\r\n MainLayout.displayInformationPrompt(\"Missing Information! You Must Include Desired Rating.\");\r\n } else {\r\n feedbackController.submitFeedback(mechanicList.getValue(), feedbackMsgField.getValue(), Integer.parseInt(ratingButtons.getValue()));\r\n feedbackController.updateMechanicStars(mechanicList.getValue());\r\n MainLayout.displayInformationPrompt(\"Review Submitted! Thanks For Your feedback!\");\r\n }\r\n }",
"public static Result submitParkingWatch(){\n \tForm<ParkingLocation> filledForm = Form.form(ParkingLocation.class).bindFromRequest();\n \tParkingLocation location = filledForm.get();\n \t\n \t// handle new information\n// \tParkingLocation.logNew(location);\n \t\n \t// render the splash page again\n \treturn ok(index.render(byline, maidForm, parkingForm));\n \t\n }",
"private void setupSubmitButton() {\n\t\tImageIcon submit_button_image = new ImageIcon(parent_frame.getResourceFileLocation() + \"submit.png\");\n\t\tJButton submit_button = new JButton(\"\", submit_button_image);\n\t\tsubmit_button.setBorderPainted(false);\n\t\tsubmit_button.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t//only enable submitting if festival has finished to avoid delayed voice prompts\n\t\t\t\tif(parent_frame.getFestival().isLocked()){\n\t\t\t\t\tfeedback_display.append(\"\\tPlease submit after voice prompt has finished.\\n\");\n\t\t\t\t} else {\n\t\t\t\t\tprocessAttempt(input_from_user.getText());\n\t\t\t\t}\n\t\t\t\tinput_from_user.requestFocusInWindow();//gets focus back to the spell here field\n\t\t\t}\n\t\t});\n\t\tsubmit_button.addMouseListener(new VoxMouseAdapter(submit_button,null));\n\t\tadd(submit_button);\n\t\tsubmit_button.setBounds(32, 598, 177, 100);\n\t}",
"private void onClickSaveButton() {\n // Validate and save form\n if (mDynamicForm.validate()) {\n triggerSubmitForm(mDynamicForm.getForm().getAction(), mDynamicForm.save());\n }\n }",
"private void submitForm() {\n Toast.makeText(this, \"Registering...\", Toast.LENGTH_LONG).show();\n }",
"public void clickSubmitButton(){\n actionsWithOurElements.clickOnElement(buttonSubmit);\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(parent_frame.getFestival().isLocked()){\n\t\t\t\t\tfeedback_display.append(\"\\tPlease submit after voice prompt has finished.\\n\");\n\t\t\t\t} else {\n\t\t\t\t\tprocessAttempt(input_from_user.getText());\n\t\t\t\t\tinput_from_user.requestFocusInWindow(); //gets focus back on the field\n\t\t\t\t}\n\t\t\t}",
"private void saveNote()\n\t{\n\t\tString text = ((EditText) findViewById(R.id.note_edittext)).getText().toString();\n\t\tNoteDbWorker worker = new NoteDbWorker(this);\n\t\tworker.updateNote(user.userName, text);\n\t\tworker.close();\n\t\tToast.makeText(this, getString(R.string.note_saved), Toast.LENGTH_LONG).show();\n\t}",
"public static void click_SubmitButton() {\n\t\tboolean bstatus;\n\n\t\tbstatus = clickElement(btn_Submit);\n\t\tReporter.log(bstatus, \"Submit Button is clicked\", \"Submit Button not clicked\");\n\n\t\t\n\t}",
"public void submitReview() throws ServletException, IOException {\r\n\t\tInteger albumId = Integer.parseInt(request.getParameter(\"albumId\"));\r\n\t\tInteger rating = Integer.parseInt(request.getParameter(\"rating\"));\r\n\t\tString headline = request.getParameter(\"headline\");\r\n\t\tString comment = request.getParameter(\"comment\");\r\n\t\t\r\n\t\tReview newReview = new Review();\r\n\t\tnewReview.setHeadline(headline);\r\n\t\tnewReview.setComment(comment);\r\n\t\tnewReview.setRating(rating);\r\n\t\t\r\n\t\tAlbum album = new Album();\r\n\t\talbum.setAlbumId(albumId);\r\n\t\tnewReview.setAlbum(album);\r\n\t\t\r\n\t\tCustomer customer = (Customer) request.getSession().getAttribute(\"loggedCustomer\");\r\n\t\tnewReview.setCustomer(customer);\r\n\t\t\r\n\t\treviewDAO.create(newReview);\r\n\t\t\r\n\t\tString messagePage = \"frontend/review_done.jsp\";\r\n\t\tRequestDispatcher dispatcher = request.getRequestDispatcher(messagePage);\r\n\t\tdispatcher.forward(request, response);\r\n\t\t\r\n\t\t\r\n\t}",
"public void submit(View v) {\n switch (climb.getCheckedRadioButtonId()) {\n case R.id.climbNoAttempt:\n MainActivity.db.climb = 1;\n break;\n case R.id.climbSuccess:\n MainActivity.db.climb = 2;\n break;\n case R.id.climbFail:\n MainActivity.db.climb = 3;\n break;\n default:\n MainActivity.db.climb = 0;\n break;\n }\n MainActivity.db.comment = comments.getText().toString();\n MainActivity.db.catchTime = catchTimeValue;\n MainActivity.db.climbTime = climbTimeValue;\n Intent submit = new Intent(this, submit.class);\n startActivity(submit);\n }",
"public void Submit_prescription(View v){\n\t\tEditText pres = (EditText) findViewById(R.id.p_prescription);\n\t\tString newprescription = pres.getText().toString();\n\t\t\n\t\t\n\t\tFileOutputStream fop = null;\n\t\ttry {\n\t\t\tfop = new FileOutputStream( new File(this.getApplicationContext().getFilesDir(),\n\t\t\t\t\t\tFILENAME));\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t//check empty case\n\t\tif (newprescription.length() == 0){\n\t\t\tMissPIBox(v);\n\t\t}else if(patient.conditionsEmpty()){\n\t\t\tnoConditionBox(v);\n\t\t}\n\t\telse{\n\t\t\t//let physician edit the new prescription for the target vitalsign\n\t\t\tphysician.addPrescription(patient, newprescription);\n\t\t\tphysician.saveToFile(fop);\n\t\t\tSuccessfulBox(v);\n\t\t}\n\n\t}",
"@Override\n public void Submit() {\n }",
"public void submitButtonPushed() throws IOException {\n\n if (vehicleRegistration.getText().isEmpty() || driverLicense.getText().isEmpty()\n || insuranceProvider.getText().isEmpty() || insuranceNumber.getText().isEmpty()) {\n\n Validator.errorBox(\"Incorrect Info\",\n \"Please Enter Valid Information\");\n\n } else {\n\n Stage stage = main.MainLogin.getPrimaryStage();\n\n Parent signInParent = FXMLLoader.load(getClass()\n .getResource(\"/backgroundcheck/BackGroundCheck.fxml\"));\n\n stage.setScene(new Scene(signInParent));\n\n stage.show();\n }\n }",
"@When(\"^click the submit button$\")\n public void click_the_submit_button() throws Throwable {\n \tSystem.out.println(\"click the button\");\n //throw new PendingException();\n }",
"@Test\n\t@Order(4)\n\tpublic void noteTest() throws InterruptedException {\n\t\tString noteTitle = \"Get groceries\";\n\t\tString noteDescription = \"Need milk and eggs\";\n\t\t// strings for updated note\n\t\tString newTitle = \"Fight crime\";\n\t\tString newDescription = \"Karate is useful\";\n\t\t// get to login\n\t\tdriver.get(baseUrl + \"/login\");\n\t\t// init login page and login\n\t\tLoginPage loginPage = new LoginPage(driver);\n\t\tloginPage.login(username, password);\n\t\t// should be redirected to home page\n\t\t// webdriver gets page\n\t\tdriver.get(baseUrl + \"/home\");\n\t\t// init home page and add note\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.addNote(false, noteTitle, noteDescription);\n\t\t// init result page, click link to go back home\n\t\tResultPage resultPage = new ResultPage(driver);\n\t\t// click link back to home\n\t\tresultPage.clickHomeAnchor();\n\t\t// get first note/newly inserted note\n\t\tNote insertedNote = homePage.getFirstNote();\n\t\t// check to see that the note was posted\n\t\tAssertions.assertEquals(noteTitle, insertedNote.getNoteTitle());\n\t\tAssertions.assertEquals(noteDescription, insertedNote.getNoteDescription());\n\t\t// edit the note\n\t\thomePage.addNote(true, newTitle, newDescription);\n\t\t// click link back to home\n\t\tresultPage.clickHomeAnchor();\n\t\t// get first note/newly updated note\n\t\tNote updatedNote = homePage.getFirstNote();\n\t\tAssertions.assertEquals(newTitle, updatedNote.getNoteTitle());\n\t\tAssertions.assertEquals(newDescription, updatedNote.getNoteDescription());\n\t\t// delete the note\n\t\thomePage.deleteNote();\n\t\t// click link back to home\n\t\tresultPage.clickHomeAnchor();\n\t\t// check to see if the note was deleted\n\t\tAssertions.assertThrows(NoSuchElementException.class, () -> homePage.getFirstNote());\n\t}",
"public static void Submitted() throws IOException, InterruptedException, FindFailed\r\n{\r\nSystem.out.println(\"Review submitted and synced form in Submitted tab\");\t\r\n\t\r\nThread.sleep(5000);\r\ndriver.findElement(By.xpath(\"//android.widget.Button[@content-desc=' ']\")).click();\r\nThread.sleep(5000);\r\nPulse_Acuity.scrnshot();\r\nSystem.out.println(\"-----------------------------------\");\r\n\r\n\t\r\ndriver.findElement(By.xpath(\"//android.widget.Button[@content-desc='Submitted']\")).click();\r\nThread.sleep(4000);\r\nPulse_Acuity.scrnshot();\r\nSystem.out.println(\"-----------------------------------\");\r\n\r\n\r\ndriver.findElement(By.xpath(\"//android.view.View[@content-desc='Job Well Done! 1866']\")).click();\r\nThread.sleep(4000);\r\nPulse_Acuity.scrnshot();\r\nSystem.out.println(\"-----------------------------------\");\r\n\r\n\r\n//driver.findElement(By.xpath(\"//android.widget.Button[@content-desc='Next ']\")).click();\r\nPattern N4= new Pattern(\"C:\\\\Users\\\\prem.gupta\\\\Automation_Project\\\\PULSE\\\\Pulse Images\\\\N4.png\");\r\nscrn.click(N4);\r\nThread.sleep(4000);\r\nPulse_Acuity.scrnshot();\r\nSystem.out.println(\"-----------------------------------\");\r\n\r\n\r\n//driver.findElement(By.xpath(\"//android.widget.Button[@content-desc='Next ']\")).click();\r\nscrn.click(N4);\r\nThread.sleep(4000);\r\nPulse_Acuity.scrnshot();\r\nSystem.out.println(\"-----------------------------------\");\r\n\r\n \r\n//driver.findElement(By.xpath(\"//android.widget.Button[@content-desc='Next ']\")).click();\r\nscrn.click(N4);\r\nThread.sleep(4000);\r\nPulse_Acuity.scrnshot();\r\nSystem.out.println(\"-----------------------------------\");\r\n\r\n\r\n((AndroidDriver)driver).scrollToExact(\"Next \");\r\nThread.sleep(4000);\r\nPulse_Acuity.scrnshot();\r\nSystem.out.println(\"-----------------------------------\");\r\n\r\n\r\n//driver.findElement(By.xpath(\"//android.widget.Button[@content-desc='Next ']\")).click();\r\nscrn.click(N4);\r\nThread.sleep(4000);\r\nPulse_Acuity.scrnshot();\r\nSystem.out.println(\"-----------------------------------\");\r\n\r\n\r\ndriver.findElement(By.xpath(\"//android.widget.Button[@content-desc='Cancel ']\")).click();\r\nThread.sleep(4000);\r\nPulse_Acuity.scrnshot();\r\nSystem.out.println(\"-----------------------------------\");\r\n\r\n\r\ndriver.findElement(By.xpath(\"//android.widget.Image[@content-desc='assignmentsPhone']\")).click();\r\nThread.sleep(4000);\r\nPulse_Acuity.scrnshot();\r\nSystem.out.println(\"-----------------------------------\");\r\n\r\n\r\ndriver.findElement(By.xpath(\"//android.view.View[@content-desc='GENERAL INFORMATION']\")).click();\r\nThread.sleep(4000);\r\nPulse_Acuity.scrnshot();\r\nSystem.out.println(\"-----------------------------------\");\r\n\r\n\r\ndriver.findElement(By.xpath(\"//android.widget.Image[@content-desc='assignmentsPhone']\")).click();\r\nThread.sleep(4000);\r\nPulse_Acuity.scrnshot();\r\nSystem.out.println(\"-----------------------------------\");\r\n\r\n\r\ndriver.findElement(By.xpath(\"//android.view.View[@content-desc='USER CONTACT INFORMATION']\")).click();\r\nThread.sleep(4000);\r\nPulse_Acuity.scrnshot();\r\nSystem.out.println(\"-----------------------------------\");\r\n\r\n\r\n((AndroidDriver)driver).scrollToExact(\"Next \");\r\nThread.sleep(4000);\r\nPulse_Acuity.scrnshot();\r\nSystem.out.println(\"-----------------------------------\");\r\n\r\n\r\n//driver.findElement(By.xpath(\"//android.widget.Button[@content-desc='Next ']\")).click();\r\nscrn.click(N4);\r\nThread.sleep(4000);\r\nPulse_Acuity.scrnshot();\r\nSystem.out.println(\"-----------------------------------\");\r\n\r\n\r\ndriver.findElement(By.xpath(\"//android.widget.Button[@content-desc='OK ']\")).click();\r\nThread.sleep(4000);\r\nPulse_Acuity.scrnshot();\r\nSystem.out.println(\"-----------------------------------\");\r\n\r\n\r\n\r\nSystem.out.println(\"===============================================================\");\r\n}",
"private void submitForm(){\n String toast_message;\n\n int time = getValueOfField(R.id.at_editTextNumberSigned_timeValue);\n int easyNumber = getValueOfField(R.id.at_editTextNumberSigned_levelEasyValue);\n int mediumNumber = getValueOfField(R.id.at_editTextNumberSigned_levelMiddleValue);\n int highNumber = getValueOfField(R.id.at_editTextNumberSigned_levelHighValue);\n int hardcoreNumber = getValueOfField(R.id.at_editTextNumberSigned_levelExpertValue);\n\n // if time is between 0 and 1440 min\n if (time > 0){\n if(time < 24*60){\n // if numbers are positives\n if (easyNumber >= 0 && mediumNumber >= 0 && highNumber >= 0 && hardcoreNumber >= 0){\n\n // save data\n int id = this.controller.getLastIdTraining() + 1;\n\n ArrayList<Level> listLevel = new ArrayList<>();\n listLevel.add(new Level(\"EASY\", easyNumber));\n listLevel.add(new Level(\"MEDIUM\", mediumNumber));\n listLevel.add(new Level(\"HIGHT\", highNumber));\n listLevel.add(new Level(\"HARDCORE\", hardcoreNumber));\n\n Training training = new Training(id, inputCalendar.getTime(), time, listLevel);\n\n this.controller.AddTraining(training);\n\n // init values of Form\n initForm(null);\n\n // redirection to stats page\n Navigation.findNavController(getActivity(),\n R.id.nav_host_fragment).navigate(R.id.navigation_list_training);\n\n toast_message = \"L'entrainement a bien été ajouté !\";\n }else toast_message = \"Erreur:\\nToutes les valeurs de voies ne sont pas positive !\";\n }else toast_message = \"La durée ne doit pas exceder 1440 min.\";\n }else toast_message = \"La durée doit être supérieur à 0 min.\\n\";\n\n // Send alert\n Toast.makeText(getContext(), toast_message, Toast.LENGTH_LONG).show();\n }",
"@FXML\n public void saveNotes() {\n try {\n Interview selectedInterview = this.listInterview.getSelectionModel().getSelectedItem();\n selectedInterview.setNotes(txtNote.getText());\n selectedInterview.setRecommended(chkRecommended.isSelected());\n\n AlertHelper.showInformationAlert(\"Interview information have been saved.\");\n\n // Reset view\n this.populateInterviewInfo(selectedInterview);\n } catch (Exception ex) {\n AlertHelper.showErrorAlert(\"Unable to save notes: \" + ex.getLocalizedMessage());\n }\n }",
"@Test\n\t@TestProperties(name = \"Submit element ${by}:${locator}\", paramsInclude = { \"by\", \"locator\" })\n\tpublic void submitElement() {\n\t\tfindElement(by, locator).submit();\n\t}",
"public void fillFormAndSubmit() throws InterruptedException {\n System.out.print(WDUtil.getWebDriver().findElements(By.xpath(\"//input[@type='checkbox']\")).size() + \" | \");\n UIUtil.waitAndClick(modelSizeTopButton);\n //modelSizeTopButton.click();\n\n }",
"public void submitMessage( TolvenMessageWithAttachments tm ) throws Exception {\r\n\t\tgetDocBean().queueTolvenMessage( tm );\r\n\t}",
"public MainPage submitForm() {\n LOGGER.info(\"Clicked the button 'LOGIN'\");\n clickOnElement(loginButtonLocator);\n return MainPage.Instance;\n }",
"public void clickSaveButtonOnCrossMatchPage() throws InterruptedException {\n setLocatorByXpathAndClick(saveButtonCrossMatchPageLocator);\n Thread.sleep(500);\n }",
"protected void submitAction() {\n\t\ttry {\n\t\t\tString username = userField.getText();\n\t\t\tAbstractAgent loggedClient = parent.getAgent().login(username, new String(passField.getPassword()));\n\t\t\tif (loggedClient instanceof AdminMS) {\n\t\t\t\tAdminUI adminUI = new AdminUI((AdminMS) loggedClient);\n\t\t\t\tparent.setVisible(false);\n\t\t\t\tadminUI.run();\n\t\t\t} else if (loggedClient instanceof IUser) {\n\t\t\t\tUserUI userUI = new UserUI((IUser) loggedClient);\n\t\t\t\tparent.setVisible(false);\n\t\t\t\tuserUI.run();\n\t\t\t}\n\t\t\tif (loggedClient != null)\n\t\t\t\tparent.dispose();\n\t\t} catch (LoginException e) {\n\t\t\tmessageLabel.setText(e.getMessage());\n\t\t} catch (RemoteException e) {\n\t\t\tJOptionPane.showMessageDialog(parent, e);\n\t\t}\n\t}",
"public Page submitForm(HtmlPage page, String formName) throws Exception {\n HtmlForm form = page.getFormByName(formName);\n return this.submit(form);\n }",
"public Page submitForm(HtmlPage page, String formName) throws Exception {\n HtmlForm form = page.getFormByName(formName);\n return this.submit(form);\n }",
"private void submit() throws SQLException, IllegalArgumentException {\r\n\t\t\r\n\t\t//Get all the values\r\n\t\tString fname = \"\", lname = \"\";\r\n\t\tint age = 0, workExp = 0;\r\n\t\tint selfProd = 0, selfQoS = 0, selfExp = 0;\t\t//selfrating values\r\n\t\t\r\n\t\t//Mandatory fields\r\n\t\tfname = tfFirstname.getText();\r\n\t\tlname = tfLastname.getText();\r\n\t\t\r\n\t\tif (fname.equals(\"\") || lname.equals(\"\"))\r\n\t\t\tthrow new IllegalArgumentException(\"Firstname and Lastname are\"\r\n\t\t\t\t\t+ \" mandatory fields!\");\r\n\t\t\r\n\t\t//Non-mandatory fields\r\n\t\ttry {\r\n\t\t\tage = Integer.parseInt(tfAge.getText());\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\tage = -1;\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tworkExp = Integer.parseInt(tfWorkExp.getText());\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\tworkExp = -1;\r\n\t\t}\r\n\t\t\r\n\t\t//slider values are default value (3) if untouched\r\n\t\tselfProd = sliderProd.getValue();\r\n\t\tselfQoS = sliderQoS.getValue();\r\n\t\tselfExp = sliderExp.getValue();\r\n\t\t\r\n\t\t\r\n\t\t//Create insert query for the values which are definitely set\r\n\t\tString query = \"INSERT INTO surveyresults (candidate, lastname, firstname,\"\r\n\t\t\t\t+ \"productivity, quality_of_service, exceeding_expectations) \"\r\n\t\t\t\t+ \"VALUES (\" + this.candidateID + \", '\" + lname + \"', '\" + fname \r\n\t\t\t\t+ \"', \" + selfProd + \", \" + selfQoS + \", \" + selfExp + \");\";\r\n\t\tdbc.executeUpdate(query);\r\n\t\t\r\n\t\t\r\n\t\t//Check the other values: age, workExp\r\n\t\tif (age >= 0) {\r\n\t\t\tquery = \"UPDATE surveyresults SET age = \" + age + \" \"\r\n\t\t\t\t\t+ \"WHERE candidate = \" + this.candidateID + \";\";\r\n\t\t\tdbc.executeUpdate(query);\r\n\t\t}\r\n\t\t\r\n\t\tif (workExp >= 0) {\r\n\t\t\tquery = \"UPDATE surveyresults SET working_experience = \" + workExp\r\n\t\t\t\t\t+ \" WHERE candidate = \" + this.candidateID + \";\";\r\n\t\t\tdbc.executeUpdate(query);\r\n\t\t}\r\n\t\t\t\r\n\t\t\r\n\t\t//set invitation status to completed (link is invalid now)\r\n\t\tquery = \"UPDATE invitations SET status = 'Completed' WHERE \"\r\n\t\t\t\t+ \"candidate = \" + this.candidateID + \";\";\r\n\t\tdbc.executeUpdate(query);\r\n\t}",
"public void clickSubmitOnly() {\r\n\t\tutilities.clickOnElement(btnSubmit);\r\n\t}",
"@FXML\n public void submitHabit() throws IOException {\n String habitString = inputBox.getText();\n Habit habit = new Habit(habitString, readWebPage);\n habitSorter.addHabitRelation(category, habit);\n habitList.addHabit(habit);\n habitList.save();\n// habitSorter.save();\n System.out.println(\"Habit submitted\");\n inputBox.setText(\"\");\n }",
"public void submit() {\r\n String name = itemName.getText().toString();\r\n if (name.equals(\"\")) {\r\n Toast.makeText(this, \"Specify a name for your item!\", Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n String quantity = itemQuantity.getText().toString();\r\n String notes = itemNotes.getText().toString();\r\n String success = \"\";\r\n String path = \"no image\";\r\n if (photo != null) {\r\n path = groupName + \"/ItemsPictures/\"\r\n + currentGroup.getTrueName() + currentGroup.getCreator() + \"-\" + username + \"-\"\r\n + itemName.getText().toString().replaceAll(\" \", \"-\") + \".jpg\";\r\n try {\r\n Image image = new Image(photo, path);\r\n new uploadPic().execute(image).get();\r\n } catch (Exception e) {\r\n Log.e(\"log_error\", \"failed to upload image to server\");\r\n }\r\n }\r\n try {\r\n success = new addItem().execute(name, quantity, notes, groupName, username, path).get();\r\n } catch (Exception e) {\r\n Log.e(\"log_error\", \"failed to add new item\");\r\n }\r\n\r\n Log.e(\"log\", success);\r\n if (success.equals(\"true\")) {\r\n imm.toggleSoftInput(0,0);\r\n startActivity(toItemsList);\r\n }\r\n\r\n }",
"@Test\n public void newTeacher() {\n driver.get(\"http://localhost:3000/teacher\");\n log.info(() -> \"Successfully enter the localhost:3000/teacher for adding a new teacher. time: \" + LocalDateTime.now());\n\n //Button for opening teacher form\n WebElement buttonPlus = driver.findElement(By.xpath(\"/html/body/div/div/main/div[2]/button\"));\n buttonPlus.click();\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n TeacherForm teacherForm = new TeacherForm(driver);\n Assertions.assertTrue(teacherForm.isInitialized());\n log.info(() -> \"Teacher form is initialized! time: \" + LocalDateTime.now());\n //I found save button with xpath\n teacherForm.setSaveButton(\"/html/body/div/div/main/div[2]/div[2]/form/div[4]/button[1]\");\n teacherForm.newTeacher(\"Mirko\",\"Vukovic\", \"[email protected]\");\n\n ReceiptPage newTeacherForm = teacherForm.submitSave();\n log.info(() -> \"Submit new teacher was successfully! time: \" + LocalDateTime.now());\n Assertions.assertTrue(newTeacherForm.isInitialized());\n }",
"private void submitSurvey(Bundle capturedArgs) {\n SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);\n\n Bundle allArgs = new Bundle(capturedArgs);\n allArgs.putString(Store.KEY_FIELD_FIRST_NAME,\n sharedPref.getString(SettingsActivity.KEY_PREF_FIRST_NAME, \"\"));\n allArgs.putString(Store.KEY_FIELD_LAST_NAME,\n sharedPref.getString(SettingsActivity.KEY_PREF_LAST_NAME, \"\"));\n allArgs.putString(Store.KEY_FIELD_GENDER,\n sharedPref.getString(SettingsActivity.KEY_PREF_GENDER, \"\"));\n allArgs.putInt(Store.KEY_FIELD_BIRTH_YEAR,\n sharedPref.getInt(SettingsActivity.KEY_PREF_BIRTH_YEAR, 1990));\n allArgs.putString(Store.KEY_FIELD_STREET,\n sharedPref.getString(SettingsActivity.KEY_PREF_STREET, \"\"));\n allArgs.putString(Store.KEY_FIELD_CITY,\n sharedPref.getString(SettingsActivity.KEY_PREF_CITY, \"\"));\n allArgs.putString(Store.KEY_FIELD_POSTAL_CODE,\n sharedPref.getString(SettingsActivity.KEY_PREF_POSTAL_CODE, \"\"));\n allArgs.putString(Store.KEY_FIELD_EMAIL,\n sharedPref.getString(SettingsActivity.KEY_PREF_EMAIL, \"\"));\n allArgs.putString(Store.KEY_FIELD_PHONE,\n sharedPref.getString(SettingsActivity.KEY_PREF_PHONE, \"\"));\n\n //Send to the API the new SurveyFields instance built by FieldsFactory\n mApiClient.conductSurvey(FieldsFactory.getFields(allArgs));\n\n }",
"private void submitBtnActionPerformed(java.awt.event.ActionEvent evt) {\n correctQuiz();\n JOptionPane.showMessageDialog(null, \"You scored \" + score + \"/5\");\n f.saveScores(name, score);\n new Menu().setVisible(true);\n this.setVisible(false);\n this.dispose();\n }",
"@Override\n\t\t\tpublic void onSuccess() {\n\t\t\t\tToast.makeText(MainActivity.this, \"submit success\", Toast.LENGTH_LONG).show();\n\t\t\t}",
"public void clickOnSave() {\r\n\t\telement(saveButton).waitUntilVisible();\r\n\t\tsaveButton.click();\r\n\t}",
"public Browser submitForm(String name, Args values);",
"public void submitStory(Story story) {\n storyRepository.save(story);\n }",
"public void actionPerformed(ActionEvent e)\r\n {\r\n String text; // text for note\r\n \r\n // handle new note requests\r\n if ((e.getSource() == newNote) && (! snp.isFull()))\r\n {\r\n // get note contents from the user and add a new note to the note pad\r\n text=JOptionPane.showInputDialog(\"Enter description of note:\");\r\n if ((text!=null) && (text.length()!=0))\r\n {\r\n snp.addNote(text);\r\n }\r\n }\r\n \r\n // if pad is non-empty handle navigation and deletion\r\n if (! snp.isEmpty())\r\n {\r\n // handle delete note requests\r\n if (e.getSource() == delNote)\r\n {\r\n // request deletion of the current note from the note pad\r\n snp.deleteNote();\r\n }\r\n \r\n // handle navigation requests to the previous note\r\n if (e.getSource() == prevNote)\r\n {\r\n // request move to previous note in the note pad\r\n snp.previousNote();\r\n }\r\n \r\n // handle navigation requests to the next note\r\n if (e.getSource() == nextNote)\r\n {\r\n // request move to next note in the note pad\r\n snp.nextNote();\r\n } \r\n }\r\n //update GUI with contents of current note \r\n repaint();\r\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n if (e.getSource() == submit) {\n int score = answerCheck();\n try {\n Submit submitButton = new Submit(userid, user.getText(), totalScore.getText(), score);\n setVisible(false);\n } catch (SQLException ex) {\n Logger.getLogger(Play.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }",
"public String submitText();",
"public boolean submitForm (Form aForm) throws Exception {\n try {\n this.fireWorkInProgressEvent(true);\n return (boolean) CMSFormServices.getCurrent().submitForm(aForm);\n } catch (DowntimeException ex) {\n LoggingServices.getCurrent().logMsg(getClass().getName(),\"submitForm\",\n \"Primary Implementation for CMSFormServices failed, going Off-Line...\",\n \"See Exception\", LoggingServices.MAJOR, ex);\n offLineMode();\n setOffLineMode();\n return (boolean) CMSFormServices.getCurrent().submitForm(aForm);\n } finally {\n this.fireWorkInProgressEvent(false);\n }\n }",
"@Then(\"^click on the Login button user nagivate to the next page$\")\r\n\tpublic void click_on_the_Login_button_user_nagivate_to_the_next_page() throws Throwable {\n\t w.submit();\r\n\t}",
"private void submitForm() {\n // Build list params\n List<NameValuePair> list = new ArrayList<>();\n list.add(new BasicNameValuePair(\"tag\", AppConfig.TAG_LOGIN));\n list.add(new BasicNameValuePair(\"username\", editTextLogin.getText().toString()));\n list.add(new BasicNameValuePair(\"password\", editTextPassword.getText().toString()));\n\n ConnectionTask connectionTask = new ConnectionTask(this, list);\n connectionTask.execute();\n }",
"public int contentSubmit(WebDriver driver, int iteration, long fingerprint) throws IOException, NumberFormatException, InterruptedException {\n\t String type = driver.findElement(By.xpath(\"//h1[@class='page-title']\")).getText();\n\t String previousURL = driver.getCurrentUrl();\n\t driver.findElement(By.id(Drupal.submit)).click();\n\t waitUntilUrl(driver, 15, previousURL);\n\t iteration++;\n\t String suffix = \"-\" + getNumberSuffix(iteration);\n\t String success = \"Successful \\\"\" + type + \"\\\" process!\"; \n\t String issue = \"Not a successful \\\"\" + type + \"\\\" process...will try again...\" + \"(attempt #\" + iteration + \")\";\n\t if (iteration > 1) { success = success + \" (on \" + iteration + suffix + \" attempt)\"; }\n\t if (! driver.getCurrentUrl().endsWith(String.valueOf(fingerprint))) { \n\t \tfileWriterPrinter(issue);\n\t \tif( driver.findElements(By.xpath(Drupal.errorMessage)).size() > 0 ) {\n\t \t\tString text = driver.findElement(By.xpath(Drupal.errorConsole)).getText();\n\t \t\tString[] error = text.split(\"\\\\n\");\n\t \t\tString message, prompt;\n\t \t\tif( error.length > 1) { \n\t \t\t\tmessage = error[1];\n\t \t\t\tprompt = error[0] + \": \" + error[1];\n\t \t\t\t} else { message = error[0]; prompt = message; }\n\t \t\t\t\tfileWriterPrinter(prompt);\n\t \t\tif( iteration == 1 ) { getScreenShot(new RuntimeException().getStackTrace()[0], message, driver); }\n\t \t}\n\t \t} else { fileWriterPrinter(success); }\n\t return iteration;\n\t\t }",
"public void submit() {\n fileUploadContainer.upload.submit();\n }",
"public void submitQuiz(View view) {\n String userName = getUserName();\n double quizScore = gradeQuiz();\n String message = generateMessage(userName, quizScore);\n setResultsDisplay(quizScore);\n Toast.makeText(this, message, Toast.LENGTH_LONG).show();\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tbtnSubmit_click(e);\n\t\t\t}",
"public static void main(String[] args) throws InterruptedException {\n\t\tWebDriver dr = new FirefoxDriver();\r\n\t\t//Open a browser\r\n\t\tdr.get(\"https://training-support.net/selenium/simple-form\");\r\n\t\t//Get the title of the page\r\n\t\tString pageTitle = dr.getTitle();\r\n\t\tSystem.out.println(\"The title of the page is: \" +pageTitle);\r\n\t\t// Find element Firstname\r\n\t\t//WebElement Firstname = dr.findElement(By.id(\"firstName\"));\r\n\t\t//WebElement Firstname = dr.findElement(By.xpath(\"//*[@id=\\\"firstName\\\"]\"));\r\n\t\tWebElement Firstname = dr.findElement(By.cssSelector(\"#firstName\"));\r\n\t\tFirstname.sendKeys(\"Athiyan\");\r\n\t\tThread.sleep(1000);\r\n\t\t// Find element Lastname\r\n\t\tWebElement Lastname = dr.findElement(By.id(\"lastName\"));\r\n\t\tLastname.sendKeys(\"Anbarasan\");\r\n\t\tThread.sleep(1000);\r\n\t\t// Find element Email\r\n\t\tWebElement email = dr.findElement(By.id(\"email\"));\r\n\t\temail.sendKeys(\"[email protected]\");\r\n\t\tThread.sleep(1000);\r\n\t\t// Find element ContactNumber\r\n\t\tWebElement contactNumber = dr.findElement(By.id(\"number\"));\r\n\t\tcontactNumber.sendKeys(\"8667487219\");\r\n\t\tThread.sleep(1000);\r\n\t\t// Find element Message\r\n\t\tWebElement message = dr.findElement(By.xpath(\"//*[@id='simpleForm']/div/div[5]/textarea\"));\r\n\t\tmessage.sendKeys(\"Test Message\");\r\n\t\tThread.sleep(2000);\r\n\t\t //Click Submit\r\n dr.findElement(By.cssSelector(\"input[type='submit']\")).click();\r\n //dr.findElement(By.cssSelector(\"\")).click();\r\n \tThread.sleep(3000);\r\n \t\r\n \t//Switch to alert window\r\n\t\tAlert SimpleAlert = dr.switchTo().alert();\r\n\t\t\r\n\t\t//Get text in the alert box and print it\r\n\t\tString alerttext = SimpleAlert.getText();\r\n\t\tSystem.out.println(\"Alert text is: \" + \talerttext);\r\n\t\tAssert.assertEquals(alerttext, \"Thank You for reaching out to us, Athiyan Anbarasan\");\r\n\t\tThread.sleep(2000);\r\n\t\t\r\n\t\t//Close the alert box\r\n\t\tSimpleAlert.accept();\r\n \t\r\n\t\t\r\n //Close the browser\r\n dr.close();\r\n\t}",
"public static void productAfterSaveOKBtn(WebDriver driver) throws InterruptedException {\n\t\tWebElement button = new WebDriverWait(driver, 2)\n\t\t\t\t.until(ExpectedConditions.elementToBeClickable(By.xpath(\"//button[text()='OK']\")));\n\t\tif (button.isDisplayed()) {\n\t\t\tThread.sleep(0);\n\t\t\tbutton.click();\n\t\t}\n\t}",
"public void promptSubmitReview() {\n ZenDialog.builder().withBodyText(C0880R.string.prompt_submit_review).withDualButton(C0880R.string.cancel, 0, C0880R.string.submit, DIALOG_REQ_SUBMIT).create().show(getFragmentManager(), (String) null);\n }",
"public int contentSubmit(WebDriver driver, long fingerprint, int iteration) throws IOException, NumberFormatException, InterruptedException {\n\t String type = driver.findElement(By.xpath(\"//h1[@class='page-title']\")).getText();\n\t String previousURL = driver.getCurrentUrl();\n\t driver.findElement(By.id(Drupal.submit)).click();\n\t waitUntilUrl(driver, 15, previousURL);\n\t iteration++;\n\t String suffix = \"-\" + getNumberSuffix(iteration);\n\t String success = \"Successful \\\"\" + type + \"\\\" process!\"; \n\t String issue = \"Not a successful \\\"\" + type + \"\\\" process...will try again...\" + \"(attempt #\" + iteration + \")\";\n\t if (iteration > 1) { success = success + \" (on \" + iteration + suffix + \" attempt)\"; }\n\t if (! driver.getCurrentUrl().contains(String.valueOf(fingerprint))) { \n\t \tfileWriterPrinter(issue);\n\t \tif( driver.findElements(By.xpath(Drupal.errorMessage)).size() > 0 ) {\n\t \t\tString text = driver.findElement(By.xpath(Drupal.errorConsole)).getText();\n\t \t\tString[] error = text.split(\"\\\\n\");\n\t \t\tString message, prompt;\n\t \t\tif( error.length > 1) { \n\t \t\t\tmessage = error[1];\n\t \t\t\tprompt = error[0] + \": \" + error[1];\n\t \t\t\t} else { message = error[0]; prompt = message; }\n\t \t\t\t\tfileWriterPrinter(prompt);\n\t \t\tif( iteration == 1 ) { getScreenShot(new RuntimeException().getStackTrace()[0], message, driver); }\n\t \t}\n\t \t} else { fileWriterPrinter(success); }\n\t return iteration;\n\t }",
"public void editTopic(WebDriver driver) {\n \n try {\n Thread.sleep(15000);\n } catch (InterruptedException ex) {\n Logger.getLogger(BaseballPage.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n WebElement searchBox = waitForVisibilityOfElement(driver, searchField);\n searchBox.clear();\n searchBox.sendKeys(help.getTitle());\n WebElement search = waitForElement(driver, searchBtn);\n search.click();\n \n WebElement titleName_ = waitForVisibilityOfElement(driver, titleName);\n titleName_.click();\n \n WebElement editBtn = waitForElement(driver, edit);\n editBtn.click();\n \n WebElement tit = waitForVisibilityOfElement(driver, title);\n tit.clear();\n String text = sendText(driver, tit);\n help.setTitle(text);\n System.out.println(\"New Topic Title: \" + text);\n\n WebElement textArea = waitForVisibilityOfElement(driver, textarea);\n textArea.clear();\n String txt = FillData.getRandomText();\n textArea.sendKeys(txt);\n System.out.println(\"New Textarea text: \" + txt);\n \n clickOnElement(driver, send);\n \n Select select = new Select(waitForVisibilityOfElement(driver, jumpTo));\n select.selectByValue(\"f36\");\n clickOnElement(driver, goBtn);\n \n }",
"@Override\n public void RiskSignatureText(String riskSignatureText) {\n waitUntilDisplayed(RiskSignatureSubmitbtn);\n find(RiskSignatureTextbox).sendKeys(riskSignatureText);\n find(RiskSignatureSubmitbtn).click();\n }",
"public Submit_Button()\n\t\t\t{\n\t\t\t\tsuper(\"Submit\");\n\n\t\t\t\taddActionListener(new ActionListener()\n\t\t\t\t{\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t\t\t{\n\t\t\t\t\t\tloadText();\n\n\t\t\t\t\t\t// pass ssn input into patient instance to lookup tuple\n\t\t\t\t\t\tPatient p = new Patient(ssn);\n \n String result = p.search(selected_record_type);\n \n String[] values = result.split(\"\\n\");\n \n\t\t\t\t\t\t// create new instance of output panel to display result\n\t\t\t\t\t\tdisplayNewRecordOutput(new Patient_Record_Output(values));\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}",
"public void submitRating() {\n if (validate() == true) {\n //delete every previous rating for this user\n ctrl.deleteRating(currentUser.getUsername());\n //add individual ratings for this submit\n for (PostDTO p : postList) {\n if (p.getTmpRating() != null) {\n ctrl.addRating(p, new RatingDTO(p.getTmpRating(), currentUser, p), currentUser);\n }\n }\n }\n // fetching the data state from db resets all the previous tmpRatings to 0\n refreshState();\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(parent_frame.getFestival().isLocked()){\n\t\t\t\t\tfeedback_display.append(\"\\tPlease submit after voice prompt has finished.\\n\");\n\t\t\t\t} else {\n\t\t\t\t\tprocessAttempt(input_from_user.getText());\n\t\t\t\t}\n\t\t\t\tinput_from_user.requestFocusInWindow();//gets focus back to the spell here field\n\t\t\t}",
"public void acceptAndProceed()\r\n {\r\n\t driver.findElement(By.id(\"PCNChecked\")).click();\r\n\t driver.findElement(By.xpath(\"/html/body/div[1]/div/div/main/div/main/div/div/div[1]/div/div/form/fieldset/div[3]/div[2]/button\")).click();\r\n }",
"private String handleSave(WikiContext context, Query form) throws ChildContainerException, IOException {\n System.err.println(\"handleSave -- ENTERED\");\n String name = form.get(\"savepage\");\n String wikiText = form.get(\"savetext\");\n \n System.err.println(\"handleSave --got params\");\n if (name == null || wikiText == null) {\n context.raiseAccessDenied(\"Couldn't parse parameters from POST.\");\n }\n \n System.err.println(\"Writing: \" + name);\n context.getStorage().putPage(name, unescapeHTML(wikiText));\n System.err.println(\"Raising redirect!\");\n context.raiseRedirect(context.makeLink(\"/\" + name), \"Redirecting...\");\n System.err.println(\"SOMETHING WENT WRONG!\");\n return \"unreachable code\";\n }",
"private String handleSave(WikiContext context, Query form) throws ChildContainerException, IOException {\n System.err.println(\"handleSave -- ENTERED\");\n String name = form.get(\"savepage\");\n String wikiText = form.get(\"savetext\");\n \n System.err.println(\"handleSave --got params\");\n if (name == null || wikiText == null) {\n context.raiseAccessDenied(\"Couldn't parse parameters from POST.\");\n }\n \n System.err.println(\"Writing: \" + name);\n context.getStorage().putPage(name, unescapeHTML(wikiText));\n System.err.println(\"Raising redirect!\");\n context.raiseRedirect(context.makeLink(\"/\" + name), \"Redirecting...\");\n System.err.println(\"SOMETHING WENT WRONG!\");\n return \"unreachable code\";\n }",
"public void submitSurvey(String surveyId, long userId);",
"@When(\"click submit\")\n\tpublic void click_login() throws InterruptedException {\n\t\tact.getlogin().clickLogin();\n\t\tThread.sleep(50000);\n\n\t}",
"private void submitForm() {\n this.setDisable(true);\n clearErrorMessage();\n if(validateForm()) {\n CharSequence chars = passwordField.getCharacters();\n String username = usernameField.getText();\n this.controller.validateLoginCredentials(username, chars);\n }\n this.setDisable(false);\n }",
"public void selectSubmitButton() {\n\t\tel = Browser.getDriver().findElement(element_submit_button);\n\t\tuihelper.click(el);\n\t}",
"public void saveData(){\n reporter.info(\"Save edited form\");\n clickOnElement(LOCATORS.getBy(COMPONENT_NAME,\"SAVE_BUTTON\"));\n }",
"public void onSubmitRating(View view) {\n Toast.makeText(this, \"Rating Submitted.\", Toast.LENGTH_SHORT).show();\n finish();\n }",
"public void clickOnSendNotification() {\r\n\r\n\t\treportStep(\"About to click on Send Notification button \", \"INFO\");\r\n\r\n\t\tif(clickAfterWait(sendNotificationButton)) {\r\n\r\n\t\t\treportStep(\"Successfully clicked on the Send notification Button \", \"PASS\");\r\n\r\n\t\t}else {\r\n\r\n\t\t\treportStep(\"Failed to click onn the Send Notificationn Buttonn \", \"FAIL\");\r\n\t\t}\r\n\t}",
"public void clickOnSuccessOkBtn() throws Exception {\r\n\t\r\n\t\t\tclickOnButton(btnOKSuccess);\r\n\t\t\tlog(\"clicked on OK button and object is:-\" + btnOKSuccess.toString());\r\n\t\t\tThread.sleep(1000);\r\n\t}",
"public TeacherPage submit() {\n clickSaveButton();\n return this;\n }",
"private void displaySaveSuccess() {\n\t\tString title = \"Event successfully save...\";\n\t\tString msg =\n\t\t\t\t\"To Do List: \" +txtSubject.getText()+ \n\t\t\t\t\"\\nhas been save....\";\n\t\tJOptionPane.showMessageDialog(\n\t\t\t\tnull, msg, title, JOptionPane.INFORMATION_MESSAGE);\n\t}",
"private void saveAndCloseWindow() {\n String tempNote = noteContent.getText();\n\n if (!tempNote.trim().isEmpty()) {\n note.setNoteText(new NoteText(tempNote));\n dialogStage.close();\n } else {\n displayFeedbackLabelEmptyMessage();\n }\n }",
"private void saveForm() {\n\n if (reportWithCurrentDateExists()) {\n // Can't save this case\n return;\n }\n\n boolean isNewReport = (mRowId == null);\n\n // Get field values from the form elements\n\n // Date\n SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n String date = df.format(mCalendar.getTime());\n\n // Value\n Double value;\n try {\n value = Double.valueOf(mValueText.getText().toString());\n } catch (NumberFormatException e) {\n value = 0.0;\n }\n\n // Create/update report\n boolean isSaved;\n if (isNewReport) {\n mRowId = mDbHelper.getReportPeer().createReport(mTaskId, date, value);\n isSaved = (mRowId != 0);\n } else {\n isSaved = mDbHelper.getReportPeer().updateReport(mRowId, date, value);\n }\n\n // Show toast notification\n if (isSaved) {\n int toastMessageId = isNewReport ?\n R.string.message_report_created :\n R.string.message_report_updated;\n Toast toast = Toast.makeText(getApplicationContext(), toastMessageId, Toast.LENGTH_SHORT);\n toast.show();\n }\n }",
"public void postPhoto() throws InterruptedException, IOException, AWTException{\n\t\tString filepath= getTargetFilePath(\"PhotoToUpload\", \"Image\", \"jpeg\");\n\t\tSystem.out.println(\"File path is:\"+ filepath);\n\t\t\n\t\tclick(profileIcon);\n\t\tThread.sleep(1000);\n\t\tclick(PhotoTab);\n\t\tThread.sleep(1000);\n\t\tdriver.findElement(PhotoUpload).sendKeys(filepath);\n\t\tclick(PostBttn);\n\t}",
"private void handleSubmit(){\n // Check if the fields are the properly inserted (no label displayed and no empty fields)\n if (!invalidBirthdayLabel.isVisible() && !invalidConfirmPasswordLabel.isVisible() &&\n !invalidEmailLabel.isVisible() && !invalidNameLabel.isVisible() && !invalidPasswordLabel.isVisible() &&\n !invalidSurnameLabel.isVisible() && !surnameTF.getText().equals(\"\") && !usernameTF.getText().equals(\"\") &&\n !passwordTF.getText().equals(\"\") && !nameTF.getText().equals(\"\") && !emailTF.getText().equals(\"\") &&\n !confirmPasswordTF.getText().equals(\"\") && !country.getValue().toString().equals(\"\")\n ) {\n InvalidFormEntryLabel resultLabel;\n // Get the Date\n LocalDate localDate = birthdayDP.getValue();\n Instant instant = Instant.from(localDate.atStartOfDay(ZoneId.systemDefault()));\n Date date = Date.from(instant);\n\n User user = new User(\n false,\n surnameTF.getText(),\n nameTF.getText(),\n usernameTF.getText(),\n passwordTF.getText(),\n emailTF.getText(),\n date,\n country.getValue().toString());\n\n // Create a connection to MongoDB and insert the user\n UserManager userManager = UserManagerFactory.buildManager();\n\n resultLabel = new InvalidFormEntryLabel(\"\", 800, 600, false);\n try {\n if(userManager.register(user)) {\n resultLabel.setText(\"Sign up successfully done\");\n resultLabel.setVisible(true);\n resultLabel.setStyle(\"-fx-background-color: green;\");\n\n // ADD IT ALSO IN NEO4J\n UserNetworkManager userNetworkManager = UserNetworkManagerFactory.buildManager();\n userNetworkManager.addUser(user);\n }\n } catch (Exception e) {\n resultLabel.setText(\"Username already exists\");\n resultLabel.setVisible(true);\n }\n\n\n sceneNodes.getChildren().add(resultLabel);\n }\n\n }",
"public synchronized void run() {\n String mesg = \"\";\n boolean saved = false;\n // Timeout in 10 seconds (5 loops per second)\n int counter = 50;\n // start to save flag changes\n System.out.println(\"SAVE FLAG WITH domain=\" + domainTextbox.getText() + \" comment=\" + commentTextbox.getText());\n cgiDataPoster saverThread = nfp.saveFlagHistory(flagFileID, domainTextbox.getText(), commentTextbox.getText());\n // check messages\n while (counter > 0) {\n mesg = saverThread.getMessage();\n if (mesg != null && mesg.startsWith(\"Saved\")) {\n System.out.println(\" GOT SAVED MESSAGE\");\n flagFileID = mesg.substring(mesg.indexOf(\"ID=\") + 3);\n mesg = mesg.substring(0, mesg.indexOf(\"ID=\"));\n saved = true;\n counter = 0;\n }\n if (mesg != null && mesg.startsWith(\"Failed\")) {\n System.out.println(\" GOT FAILED MESSAGE\");\n counter = 0;\n }\n question.setText(mesg);\n try {\n Thread.sleep(200);\n }\n catch (Exception e) {\n System.out.println(e);\n }\n counter--;\n }\n // close the panel whether it saved or not\n System.out.println(\"SAVED success=\" + saved);\n repaint();\n // wait 1.5 sec then hide panel\n try {\n Thread.sleep(1500);\n }\n catch (Exception e) {\n System.out.println(e);\n }\n this.close();\n }",
"@FXML\n private void _submitAnswer(ActionEvent _event) {\n Game currentGame = GameFactory.getCurrentGameInstance();\n currentGame.processAnswer(_answerInput.getText());\n Map<String, Object> data = currentGame.createMap();\n updateView(data);\n this._answerInput.setText(\"\");\n if (!currentGame.gameOver) {\n this._submitBtn.setDisable(true);\n this._nxtQuestion.setDisable(false);\n } else {\n this._submitBtn.setDisable(true);\n this._nxtQuestion.setDisable(true);\n }\n }",
"public static void clickNextBtn() {\t\n\t\ttry {\n\t\t\tdriver.findElement(By.id(\"nextquest\")).click();\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Next button in Q&A submit doesnt work\");\n\t\t}\n\t}",
"public SelenideElement submitButton() {\n return formPageRoot().$(By.xpath (\"//button[@type='submit']\")); \n }",
"private void btnSubmit_click(ActionEvent e) {\n\t\tString stuAnswer = \"\";\r\n\t\tif (rdoItemA.isSelected()) {\r\n\t\t\tstuAnswer = \"A\";\r\n\t\t}\r\n\t\tif (rdoItemB.isSelected()) {\r\n\t\t\tstuAnswer = \"B\";\r\n\t\t}\r\n\t\tif (rdoItemC != null) {\r\n\t\t\tif (rdoItemC.isSelected()) {\r\n\t\t\t\tstuAnswer = \"C\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (rdoItemD != null) {\r\n\t\t\tif (rdoItemD.isSelected()) {\r\n\t\t\t\tstuAnswer = \"D\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!stuAnswer.isEmpty()) {\r\n\t\t\tExamItem bean = eiList.get(questionNO - 1);\r\n\r\n\t\t\tif (bean.getStuAnswer() == null || !bean.getStuAnswer().equalsIgnoreCase(stuAnswer)) {\r\n\t\t\t\tbean.setStuAnswer(stuAnswer);\r\n\t\t\t\tif (bean.getStdAnswer().equalsIgnoreCase(stuAnswer)) {\r\n\t\t\t\t\tbean.setMarkResult(1l);\r\n\t\t\t\t\tbean.setGainScore(bean.getStdScore());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbean.setMarkResult(0l);\r\n\t\t\t\t\tbean.setGainScore(0l);\r\n\t\t\t\t}\r\n\t\t\t\texamItemService.update(bean);\r\n\t\t\t}\r\n\t\t}\r\n\t\tLong result = examItemService.countNull(pk.longValue());\r\n\t\tString message = \"\";\r\n\t\tif ((questionNum - result) > 0) {\r\n\t\t\tmessage = \"还有\" + (questionNum - result) + \"道题未写,确认交卷?\";\r\n\t\t} else {\r\n\t\t\tmessage = \"确认交卷?\";\r\n\t\t}\r\n\t\tint option = JOptionPane.showConfirmDialog(null, message, \"系统提示\", JOptionPane.YES_NO_OPTION);\r\n\t\tif (option == JOptionPane.YES_OPTION) {\r\n\t\t\tLong trueItem = examItemService.countTrue(pk.longValue());\r\n\t\t\tLong totalScore = eiList.get(0).getStdScore() * trueItem;\r\n\t\t\tExam exam = examService.load(pk.longValue());\r\n\t\t\texam.setTotalScore(totalScore);\r\n\t\t\texamService.update(exam);\r\n\t\t\tJOptionPane.showMessageDialog(null, \"考试结束,\" + totalScore + \"分\");\r\n\t\t\tif (listFrm != null) {\r\n\t\t\t\tlistFrm.setVisible(true);\r\n\t\t\t\tthis.dispose();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}",
"public void modalSubmit(View view){\n itemDesc = id_txtDesc.getText().toString().trim();\n itemNote = id_txtNote.getText().toString().trim();\n\n if(itemDesc.isEmpty()){\n id_txtDesc.requestFocus();\n id_txtDesc.setError(\"Please enter something!\");\n }else {\n editor.putString(\"descOfItem\", itemDesc); // Storing Description\n editor.putString(\"noteOfItem\", itemNote); // Storing Note\n editor.commit(); // commit changes\n Intent intentScan = new Intent(MainActivity.this, ScanActivity.class);\n intentScan.putExtra(\"scannedList\", scannedList);\n intentScan.putExtra(\"listDescOfItem\", listDescOfItem);\n intentScan.putExtra(\"listNoteOfItem\", listNoteOfItem);\n intentScan.putExtra(\"boolScanContinuous\", id_continuousScan.isChecked() ? true : false);\n modalScan.dismiss();\n startActivity(intentScan);\n finish();\n }\n }",
"private void submitForm() {\n final Dialog dialog = new Dialog(context);\n\t\t dialog.setContentView(R.layout.dialogbox);\n\t\t dialog.setTitle(\"Sucess!\");\n\t\t dialog.setCancelable(false);\n\t dialog.setCanceledOnTouchOutside(false);\n\t\t TextView txt = (TextView) dialog.findViewById(R.id.errorlog);\n\t\t txt.setText(\"Registration Successfull.\");\n\t\t Button dialogButton = (Button) dialog.findViewById(R.id.release);\n\t\t dialogButton.setOnClickListener(new OnClickListener() {\n\t\t\t public void onClick(View vd) {\n\t\t\t\t change.setEnabled(true);\n\t\t\t\t dialog.dismiss();\n\t\t\n\t\t}\n\t\t});\n\t\t dialog.show();\n}",
"public void performSubmit(Action action) {\n performSubmit(action, true);\n }",
"@Test\n\tpublic void postTest() {\n\t\tnew WebDriverWait(driver, 15).until(\n\t\t\t ExpectedConditions.presenceOfElementLocated(By.cssSelector(\"a[onclick*='tdlikecid418']\"))\n\t\t\t);//since the share throught part is load slower than the other parts, so it need wait until it diplayed then commit the test\n\t\t\n\t\t//input the idea\n\t\tdriver.findElement(By.id(\"txtShare\")).sendKeys(\"Unique@@\");\n\t\t//click share button\n\t\tdriver.findElement(By.id(\"btnShareComment\")).click();\n\t\t//look for the lastest idea shared\n\t\tWebElement shareContent=driver.findElement(By.xpath(\"/html/body/div[2]/table/tbody/tr[2]/td/table/tbody/tr/td[1]/table/tbody/tr[3]/td/table/tbody/tr[2]/td/div[1]/table/tbody/tr/td/div/div/table/tbody/tr/td/table/tbody/tr[8]/td/table/tbody/tr[2]/td[2]\"));\n\t\ttry {\n\t\t\t//the lastest on post should be the one above\n\t\t\tassertTrue(shareContent.getText().contains(\"Unique@@\"));\n\t\t} catch (NoSuchElementException nseex) {\n\t\t\tfail();\n\t\t}\n\t}"
] | [
"0.6893053",
"0.6025559",
"0.6018387",
"0.5890912",
"0.5887819",
"0.5854666",
"0.5832337",
"0.5792827",
"0.5629514",
"0.55484915",
"0.5475354",
"0.5467672",
"0.5443922",
"0.53879297",
"0.53161657",
"0.53035605",
"0.5301713",
"0.5287918",
"0.5280489",
"0.5162904",
"0.51037323",
"0.51033103",
"0.5098425",
"0.5074626",
"0.505602",
"0.50409406",
"0.5031835",
"0.5015888",
"0.5012722",
"0.5011784",
"0.5006723",
"0.4996621",
"0.4987432",
"0.49694443",
"0.49335757",
"0.49333802",
"0.4919552",
"0.49172315",
"0.489103",
"0.4881321",
"0.48777986",
"0.486862",
"0.4862243",
"0.4862243",
"0.48463875",
"0.48443055",
"0.4842641",
"0.48341173",
"0.48187095",
"0.48169002",
"0.48154756",
"0.48141795",
"0.48021996",
"0.4798102",
"0.4789085",
"0.47851667",
"0.47526824",
"0.4745942",
"0.473732",
"0.47350964",
"0.47297668",
"0.47139817",
"0.47074866",
"0.47066307",
"0.47005376",
"0.4697219",
"0.46855092",
"0.46844015",
"0.46782014",
"0.46780235",
"0.4673244",
"0.4673183",
"0.4671935",
"0.46628317",
"0.46539363",
"0.4648948",
"0.46422258",
"0.4628098",
"0.46261728",
"0.46260592",
"0.46240392",
"0.4623673",
"0.4622988",
"0.46173835",
"0.46118927",
"0.46116564",
"0.4605606",
"0.46040192",
"0.460174",
"0.45932978",
"0.45896372",
"0.45712793",
"0.45538867",
"0.4548639",
"0.45436648",
"0.4543071",
"0.45365754",
"0.4536213",
"0.45335552",
"0.45304933"
] | 0.62946194 | 1 |
Check if the given name matches the selected person. | public boolean personSelected(String name) {
final WebElement selectElement = driver.findElement(PERSON_SELECTOR);
final String value = selectElement.getAttribute("value");
final WebElement optionElement = selectElement.findElement(By.cssSelector("option[value=\"" + value + "\"]"));
return optionElement.getText().strip().equals(name);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic boolean equals(Object target) {\n\t\treturn name.equals(((Person)target).getName());\n\t}",
"public boolean match(String str){\n if(this.name.equalsIgnoreCase(str))\n return true; \n return false;\n }",
"public boolean isValidName(String proposedName);",
"public boolean match(String name) {\n\t\t\treturn (this.equals(directions.get(name.toUpperCase())));\n\t\t}",
"public boolean isNameEquals(String name) {\n\n return (_name.equalsIgnoreCase(name));//Checks not case sensitive\n }",
"@Override\n public boolean equals(Object person) {\n if(!(person instanceof Person)){\n // If the argument is not a person object return false\n return false;\n }\n // Create person object\n Person btPerson = (Person) person;\n\n // Check equality\n boolean status = (this.getName().equals(btPerson.getName()) &&\n this.getCrossingTime() == btPerson.getCrossingTime());\n return status;\n }",
"public boolean findPerson(Person person){\n for(Person p : personList){\n if(p.equals(person)){return true;}\n }\n return false;\n }",
"public boolean equals(Person otherPerson) {\n return this.name.equals(otherPerson.name);\n }",
"public boolean is(String fName, String lName)\n {\n return firstName.equals(fName) && lastName.equals(lName);\n }",
"private boolean nameEntry() {\n EditText nameField = (EditText) findViewById(R.id.batman_identity);\n String batmanIdentity = nameField.getText().toString();\n\n if (batmanIdentity.equalsIgnoreCase(\"bruce wayne\")) {\n return true;\n }\n\n return false;\n\n }",
"@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n Person person = (Person) o;\n return Objects.equals(name, person.name);\n }",
"public void guessName()\n\t{\n\t\tSystem.out.println(\"Who do you think it is?\");\n\t\tguessName = scan.nextLine();\n\t\tif(guessName.equals(name))\n\t\t{\n\t\t\tSystem.out.println(\"Congratulations, you are correct!\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"You are incorrect\");\n\t\t\tSystem.out.println(\"The correct answer was \" + name);\n\t\t}\n\t}",
"public boolean equals(Person p) {\n if (this.name == p.getName() && this.surname == p.getSurname())\n return true;\n else\n return false;\n }",
"public boolean isNamed(String n) {\n return name.equals(n);\n }",
"public Boolean premiumUserIdMatchesName(Long premiumId, String name);",
"public boolean checkName(String name)\n {\n return true;\n }",
"public boolean nameSchonVorhanden(String name) {\n List<Benutzer> alleBenutzer = getAllBenutzer();\n\n for (Benutzer benutzer : alleBenutzer) {\n if (benutzer.getBenutzerName().equals(name)) {\n return true;\n }\n }\n return false;\n }",
"private boolean checkUserame(String name) throws SQLException {\n\t\tcheckUserameStatement.clearParameters();\n\t\tcheckUserameStatement.setString(1, name);\n\t\tResultSet result = checkUserameStatement.executeQuery();\n\t\tresult.next();\n\t\tboolean out = result.getInt(1) == 1;\n\t\tif (DEBUG) {\n\t\t\tSystem.out.println(\"checkUserame: \"+result.getInt(1)+\"\\n\");\n\t\t}\n\t\tresult.close();\n\t\treturn out;\n\t}",
"public boolean equalsName(String otherName) {\n return name.equals(otherName);\n }",
"static public Person searchPerson(String name) {\n return personMap.get(name);\n }",
"private boolean containsName(String name, Human ... human) {\n boolean result = false;\n\n for(Human h : human) {\n if(h.getName().toLowerCase().contains(name.toLowerCase())) {\n result = true;\n break;\n }\n }\n\n return result;\n }",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"@Override\n public boolean containsNameProfesor(String Name) {\n try {\n Entity retValue = null; \n Connection c = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"SELECT * FROM persona where nombre = ?\");\n\n pstmt.setString(1, Name);\n\n rs = pstmt.executeQuery();\n\n if (rs.next()) {\n return true; \n } \n \n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n return false;\n }",
"public boolean equals(Object ob){\n return name.equals(((PhoneRecord)ob).getName());\n }",
"@Override\r\n\tpublic boolean equals(Object obj) {\r\n\t\tif( !(obj instanceof Person ) ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tPerson p2 = (Person) obj;\r\n\t\treturn vorname.equals(p2.vorname) && nachname.equals(p2.nachname);\r\n\t}",
"private boolean isContactExist(String name) {\n boolean existance;\n existance = contactList.stream()\n .anyMatch(personElement ->\n personElement.getFirstName().equals(name) ||\n personElement.getLastName().equals(name));\n return existance;\n }",
"public boolean checkName(String employeeName) {\r\n\t\tif(this.employeeName == employeeName)\r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}",
"public boolean matches(String name) {\n return aliases.contains(name);\n }",
"public boolean checkStudent(String name) {\n\n // array of columns to fetch\n String[] columns = {\n COLUMN_FIRSTNAME\n };\n SQLiteDatabase db = this.getReadableDatabase();\n\n // selection criteria\n String selection = COLUMN_FIRSTNAME + \" = ?\";\n\n // selection argument\n String[] selectionArgs = {name};\n\n // query user table with condition\n /**\n * Here query function is used to fetch records from user table this function works like we use sql query.\n * SQL query equivalent to this query function is\n * SELECT user_id FROM user WHERE user_email = '[email protected]';\n */\n Cursor cursor = db.query(TABLE_USERLIST, //Table to query\n columns, //columns to return\n selection, //columns for the WHERE clause\n selectionArgs, //The values for the WHERE clause\n null, //group the rows\n null, //filter by row groups\n null); //The sort order\n int cursorCount = cursor.getCount();\n cursor.close();\n db.close();\n\n if (cursorCount > 0) {\n return true;\n }\n\n return false;\n }",
"public boolean checkUserNameIsOccupied(String name) {\n \t\tif (users.size() != 0) {\n \t\t\tfor (int i = 0; i < users.size(); i++) {\n \t\t\t\tif (name.equals(users.get(i).getName())) {\n \t\t\t\t\treturn true;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\treturn false;\n \t}",
"public static boolean validateFellow(String name){\n\n for(String n : fellows)\n {\n if (n.equals(name))\n return true; \n } \n return false;\n }",
"boolean containsStudentWith(String name);",
"private boolean checkName(String name) {\n if (!name.equals(\"\")) {\n //Check si le nom est déjà utilisé\n return myDbA.checkName(name);\n }\n return false;\n }",
"boolean contains(String name);",
"private boolean nameEntered(String gameName) {\n if (gameName.matches(\"\")) {\n Toast.makeText(this, \"You did not enter a game name.\", Toast.LENGTH_SHORT).show();\n return false;\n }\n return true;\n }",
"@SuppressWarnings(\"rawtypes\")\n\tpublic boolean isNameInUse(String name,String idOwner)\n\t{\n\t\topen();\n\t\ttry\n\t\t{\n\t\t\tSystem.out.println(name);\n\t\t\tQuery query=DB.query();\n\t\t\tquery.constrain(Census.class);\n\t\t\tquery.descend(\"idOwner\").constrain(idOwner);\n\t\t\tquery.descend(\"censusName\").constrain(name).endsWith(false);\n\t\t\t\n\t\n\t\t\t\n\t\t\tObjectSet result=query.execute();\n\t\t\t\n\t\t\tif(result.hasNext())\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tclose();\n\t\t}\n\t\t\n\t\treturn false;\n\t\t\n\t}",
"private boolean isNameValid(String name) {\n\n }",
"@Test\n void compareTo_PotentialMatch_OnlyNameMatches()\n {\n runIsMatchTest(AnswerType.yes, AnswerType.no, AnswerType.no, AnswerType.no, ContactMatchType.PotentialMatch);\n }",
"private String checkName(String name){\n\n if(name.isBlank()){\n name = \"guest\";\n }\n int i = 1;\n if(users.contains(name)) {\n while (users.contains(name + i)) {\n i++;\n }\n name+=i;\n }\n return name;\n }",
"public static void searchFriends(String name) {\n\t\tScanner reader = new Scanner(System.in);\t\n\t\tSystem.out.println(\"Please Enter the Profile Name of the Person you need to Search\");\n\t\tString profilename = reader.nextLine();\n\t\t\n\t\t\n\t\tif(profiles.get(index.indexOf(name)).searchFriends(profilename)) {\n\t\t\tSystem.out.println(\"Yes \" + name + \" is a friend of \"+ profilename);\t\n\t\t}else {\n\t\t\tSystem.out.println(\"No \" + name + \" is not a friend of \"+ profilename);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Click Enter to go back to Menu\");\n\t\t\n\t\tString input = reader.nextLine();\n\n\t\t\t\n\t\n\t}",
"private boolean searchPersonNew(Register entity) {\n\t\tboolean res = false;\n\t\tfor(Person ele : viewAll()) {\n\t\t\tif(ele.getName().equals(entity.getName()) && ele.getSurname().equals(entity.getSurname())) {\n\t\t\t\tres = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}",
"public void verifyPresenterNameMatchedOnCourseInfoPage(String name) {\n \t Assert.assertEquals(presenterLabel.getText(),name);\n }",
"public String searchPerson(String name){\n String string = \"\";\n ArrayList<Person> list = new ArrayList<Person>();\n \n for(Person person: getPersons().values()){\n String _name = person.getName();\n if(_name.contains(name)){\n list.add(person);\n }\n }\n list.sort(Comparator.comparing(Person::getName));\n for (int i = 0; i < list.size(); i++){\n string += list.get(i).toString();\n }\n\n return string;\n }",
"public String nameCheck(String name) {\n\t\twhile(true) {\n\t\t\tif(Pattern.matches(\"[A-Z][a-z]{3,10}\", name)){\n\t\t\t\treturn name;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Name should have first capital alphabet and rest small alphabets.\");\n\t\t\t\tSystem.out.println(\"Enter again: \");\n\t\t\t\tname = sc.next();\n\t\t\t}\n\t\t}\n\t}",
"private boolean verifySelection() {\n String caseName = caseNameText.getText().trim();\n if (caseName.length() == 0) {\n MessageDialog.openError(shell, \"Error\", \"Enter a case name.\");\n return false;\n }\n\n File caseDir = new File(locationDir, caseName);\n if (caseDir.exists()) {\n MessageDialog.openError(shell, \"Error\",\n \"Case already exists choose another name.\");\n caseNameText.selectAll();\n caseNameText.setFocus();\n return false;\n }\n\n setReturnValue(caseDir);\n return true;\n }",
"public Person find(String name) {\n\t\tfor (Person person : listOfPeople) {\n\t\t\tif(person.getName().contains(name)) {\n\t\t\t\treturn person;\n\t\t\t}\n\t\t}\n\t\treturn null; // only reached if person with name not found by search.\n\t}",
"@Override\n public boolean equals(Object o) \n {\n if (o == null) return false;\n if (o instanceof Person) {\n Person p = (Person)o;\n return (vorname.equals(p.vorname) && nachname.equals(p.nachname));\n } else\n return false;\n }",
"public boolean checkName(String name)\n\t{\n\t\treturn (robotHM.containsKey(name));\n\t}",
"private boolean exist(List<PlayerTeam> l, String name) {\n boolean ex = false;\n PlayerTeam curr = l.first();\n while (curr != null) {\n if (curr.getName().equals(name))\n return true;\n curr = l.next();\n }\n return ex;\n }",
"@Override\n public boolean equals(Object obj) {\n if (obj instanceof Person) {\n Person comparedObj = (Person) obj;\n return name.equals(comparedObj.getName()) &&\n surname.equals(comparedObj.getSurname()) &&\n birthday.equals(comparedObj.getBirthday());\n }\n return false;\n }",
"public boolean findUserBYName(String name);",
"@Test\n void compareTo_Match_NameAndAddress()\n {\n runIsMatchTest(AnswerType.yes, AnswerType.yes, null,\n null, ContactMatchType.Match,\n true, true, true);\n }",
"@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n Person person = (Person) o;\n return Objects.equals(name, person.name)\n && Objects.equals(surname, person.surname);\n }",
"public void test_findUniqueByNamedOfQuery() {\r\n\t\tPerson person = (Person) this.persistenceService.findUniqueByNamedOfQuery(FIND_PERSON_BY_NAME_EXT, NAME_PARAM[2]);\r\n\t\tassertForFindUniquePerson(person);\r\n\t\t\r\n\t\tperson = (Person) this.persistenceService.findUniqueByNamedOfQuery(FIND_PERSON_BY_NAME, getParamMap(2));\r\n\t\tassertForFindUniquePerson(person);\r\n\t}",
"boolean hasPerson();",
"boolean hasSurname();",
"private boolean personAlreadyExists(AddPeopleRequest addPeopleRequest) {\n // query db for this user\n AddPeopleRequest matchingEntry =\n this.addPersonRequestMongoRepository\n .findPersonByFirstAndLastName(\n addPeopleRequest.getFirstName(),\n addPeopleRequest.getLastName());\n // if the value returned is null.. the value did not exist..\n if (matchingEntry == null) {\n return false;\n } else {\n return true;\n }\n }",
"boolean CheckIfRealPerson(Customer customer);",
"public Boolean comprovaName(String name) {\n\t\treturn (rv.validateName(name));\n\t}",
"public boolean personEquals(Person p) {\n return (this.firstNames.equals(p.firstNames) && this.lastName.equals(p.getLastName()));\n }",
"private boolean isNameUnique(String name) {\n boolean isUnique = true;\n for (User user : this.users) {\n if (user.getName().equals(name)) {\n isUnique = false;\n break;\n }\n }\n return isUnique;\n }",
"public boolean checkUser(String name) {\n String[] columns = {\n PDF_NAME\n };\n SQLiteDatabase db = this.getReadableDatabase();\n\n // selection criteria\n String selection = PDF_NAME + \" = ?\";\n\n // selection argument\n String[] selectionArgs = {name};\n\n // query user table with condition\n /**\n * Here query function is used to fetch records from user table this function works like we use sql query.\n * SQL query equivalent to this query function is\n * SELECT user_id FROM user WHERE user_email = '[email protected]';\n */\n Cursor cursor = db.query(TABLE_NAME, //Table to query\n columns, //columns to return\n selection, //columns for the WHERE clause\n selectionArgs, //The values for the WHERE clause\n null, //group the rows\n null, //filter by row groups\n null); //The sort order\n int cursorCount = cursor.getCount();\n cursor.close();\n db.close();\n\n if (cursorCount > 0) {\n return true;\n }\n\n return false;\n }",
"public boolean nameValidation(String name) {\n\t char[] chars = name.toCharArray();\n\t int tempNum = 0;\n\t for (char c : chars) {\n\t tempNum += 1;\n\t \tif(!Character.isLetter(c)) {\n\t return false;\n\t }\n\t }\n\t if (tempNum == 0)\n\t \treturn false;\n\n\t return true;\n\t}",
"public void voteFor (String name)\n {\n boolean searching = true;\n int index = 0;\n\n while(searching)\n {\n if(index < pList.size())\n {\n Personality objectHolder = pList.get(index);\n String personalityName = objectHolder.getName();\n\n if(name.equals(personalityName))\n {\n objectHolder.increaseVotes(1);\n searching = false;\n }\n }\n else\n {\n System.out.println(\"No personality found with the name : \" + name);\n searching = false;\n }\n\n index++;\n }\n }",
"@SelectProvider(type = ServeInfoSqlProvider.class, method = \"hasSameName\")\n int hasSameName(@Param(\"name\") String name, @Param(\"filterId\") Long filterId);",
"private boolean contains(String name, AssassinNode current) {\n while (current != null) {\n if (current.name.equalsIgnoreCase(name)) {\n return true;\n } else {\n current = current.next;\n }\n }\n return false;\n }",
"public boolean checkName(String name,JTextField t)\n\t{\n\t\tboolean number=true;\t\t \n\t\tboolean result=true;\n\t\ttry \n\t\t{\n\t\t\tDouble num=Double.parseDouble(name); //if s contains sting then it will not be parse and it will throw exception\t\n\t\t}\n\t\tcatch(NumberFormatException e)\n\t\t{\n\t\t\tnumber=false;\n\t\t}\t\n\t\tif(number==true)\n\t\t{\n\t\t\t//it is a number\n\t\t\tresult=false;\n\t\t}\n\t\telse if(number==false) //it is a String\n\t\t{\n\t\t\tif(name.length()>2)\n\t\t\t{\n\t\t\t\tchar[] chars=name.toCharArray();\n\t\t\t\tfor(char c : chars)\n\t\t\t\t{\n\t\t\t\t\tif(Character.isLetter(c))\n\t\t\t\t\t{\tresult=true;\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\tresult=false;\n\t\t\t\t\t\tbreak;\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(name.length()<=2)\n\t\t\t{\t\tresult=false;\t\t}\t\n\t\t}\n\t\treturn result;\n}",
"public static void main(String[] args){\n\n selectedPerson = Members.BOBBY; //+++ selectedPerson can ONLY ever hold one of the enum values as its an object created from the 'Members' enum.\n\n\n if (selectedPerson.equals(Members.BOBBY)){\n System.out.println(\"Bobby!\");\n }\n if (selectedPerson.equals(Members.JERRY)){\n System.out.println(\"Jerry!\");\n }\n }",
"public static boolean Contains(final String name, final Object o) {\n \t\ttry {\n \t\t\tLoad();// For multiple bot instances.\n \t\t\tif (data.containsKey(name)) {\n \t\t\t\tHashMap<String, String> userData = data.get(name);\n \t\t\t\treturn userData.containsKey(o) || userData.containsValue(o);\n \t\t\t}\n \t\t} catch (Exception e) {\n \t\t}\n \t\treturn false;\n \t}",
"private static void searchStaffByName(){\n\t\tshowMessage(\"type the name you are looking for: \\n\");\n\t\tString name = getUserTextTyped();\n\t\tToScreen.listEmployee(EmployeeSearch.employee(employee.getAllEmployee(),name), true);\n\t\t\n\t\t//condition to do another search by name or go back to the main menu\n //if the user decide for doing another search the method is called again, otherwise it will go back to the main menu\n\t\tint tryAgain = askForGoMainMenu(\"Would you like to search for another name or go back to main menu?\\n Type 1 to search someone else \\n Type 0 to go to menu. \\n Choice: \");\n\t\tif(tryAgain == 1){\n\t\t\tsearchStaffByName();\n\t\t} else {\n\t\t\tmain();\n\t\t}\n\t}",
"@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n // instanceof handles nulls\n if (!(other instanceof PersonCard)) {\n return false;\n }\n\n // state check\n PersonCard card = (PersonCard) other;\n return id.getText().equals(card.id.getText())\n && person.equals(card.person);\n }",
"private boolean checkNameChar(String name) {\n\t\tString patternStr = \"[a-zA-Z]+\";\n\t\tPattern pattern = Pattern.compile(patternStr);\n\t\tMatcher matcher = pattern.matcher(name);\n\t\tboolean matchFound = matcher.matches();\n\t\treturn matchFound;\n\t}",
"public static String userNameValid(String name){\n return \"select u_name from users having u_name = '\" + name + \"'\";\n }",
"@Override\n public boolean equals(Object obj){\n if(this == obj) return true;\n if (obj == null || getClass() != obj.getClass()) return false;\n Person o = (Person) obj;\n if(o.name == null && this.name == null) return this.age == o.age;\n if(o.name == null || this.name == null) return false;\n return this.age == o.age && this.name.equals(o.name);\n }",
"public boolean findTeam(String teamName) throws SQLException {\n\t\tConnection conn = DriverManager.getConnection(\"jdbc:sqlite:users\");\n\t\tStatement stmt = conn.createStatement();\n\t\tString SQL = \"select * from leaguestandings where TeamName = '\" + teamName + \"';\";\n\n\t\tResultSet rset = stmt.executeQuery(SQL);\n\n\t\tif (rset.next()) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public static boolean isName(Item item, String name) {\r\n \t\tif(item == null)\r\n \t\t\treturn false;\r\n \t\tString itemName = item.getUnlocalizedName().toLowerCase();\r\n \t\tif(itemName.contains(name))\r\n \t\t\treturn true;\r\n \t\treturn false;\r\n \t}",
"private boolean isCityOrStateExist(String name) {\n return contactList.stream()\n .anyMatch(personElement ->\n personElement.getCity().equals(name) ||\n personElement.getState().equals(name));\n }",
"public boolean equals(String that);"
] | [
"0.6405301",
"0.63850343",
"0.63636136",
"0.63568485",
"0.6322851",
"0.6255567",
"0.62422276",
"0.6161998",
"0.61495334",
"0.6141819",
"0.6090869",
"0.6050626",
"0.603821",
"0.6026324",
"0.60240173",
"0.6022874",
"0.6008451",
"0.6008338",
"0.5985415",
"0.5975163",
"0.59707713",
"0.5961697",
"0.5961697",
"0.5961697",
"0.5961697",
"0.5961697",
"0.5961697",
"0.5961697",
"0.5961697",
"0.5961697",
"0.5961697",
"0.5961697",
"0.5961697",
"0.5961697",
"0.5961697",
"0.5961697",
"0.5961697",
"0.5961697",
"0.5961697",
"0.5961697",
"0.5961697",
"0.5961697",
"0.5961697",
"0.5961697",
"0.59439534",
"0.5885438",
"0.5881062",
"0.58802813",
"0.58791846",
"0.58681715",
"0.5862634",
"0.5811861",
"0.5809423",
"0.5806375",
"0.577991",
"0.5757944",
"0.57486975",
"0.5745772",
"0.57362753",
"0.5672592",
"0.5662936",
"0.56623524",
"0.56576174",
"0.5632797",
"0.5622895",
"0.5612947",
"0.56032455",
"0.5583418",
"0.5579529",
"0.55790836",
"0.557815",
"0.5578073",
"0.5558983",
"0.5550674",
"0.5548979",
"0.55487335",
"0.5542597",
"0.5537127",
"0.55075836",
"0.55027336",
"0.5500448",
"0.54903126",
"0.5490238",
"0.54892486",
"0.5474628",
"0.54696286",
"0.54571456",
"0.5457019",
"0.54492474",
"0.5449024",
"0.5446937",
"0.5446889",
"0.54451144",
"0.5444411",
"0.54439425",
"0.54330146",
"0.5429503",
"0.54220295",
"0.54155904",
"0.54151493"
] | 0.78268766 | 0 |
/reader = Resources.getResourceAsReader("conf/mybatisconfig.xml"); sqlSessionFactory = new SqlSessionFactoryBuilder().build(reader); SqlSession session = sqlSessionFactory.openSession(); | public static void main(String[] args) throws IOException {
InputStream inputStream = Resources.getResourceAsStream("conf/mybatis-config.xml");
SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(inputStream);
SqlSession session=sqlSessionFactory.openSession();
List<Category> cs = session.selectList("listCategory");
for(Category c: cs){
System.out.println(c.toString());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n\n String resource = \"spring/mybatis/mybatis.xml\";\n InputStream inputStream = null;\n try {\n inputStream = Resources.getResourceAsStream(resource);\n }catch (IOException e){\n e.printStackTrace();\n }\n\n SqlSessionFactory sessionFactory = new SqlSessionFactoryBuilder().build(inputStream);\n SqlSession sqlSession = sessionFactory.openSession();\n //sqlSession.getMapper()\n }",
"public static void main(String[] args) throws IOException {\n\t\tString resource = \"mybatis-config.xml\";\r\n\t\tInputStream inputStream = Resources.getResourceAsStream(resource);\r\n\t\t//获得sqlSessionFactory核心对象\r\n\t\t SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(inputStream);\r\n\t\t //获得session对象\r\n\t\t SqlSession session=sqlSessionFactory.openSession();\r\n\t\t List<Goods> goods=null;\r\n\t\t {\r\n\t\t\t //查询所有\r\n\t\t\tgoods= session.selectList(\"com.accp.mybatis.mapper.GoodsMapper.selectAll\");\r\n\t\t\t \r\n\t\t }\r\n\t\t System.out.println(goods);\r\n\t\t {\r\n\t\t\t //按id查询\r\n\t\t\t Goods good=session.selectOne(\"com.accp.mybatis.mapper.GoodsMapper.selectByid\",53);\r\n\t\t\t System.out.println(good);\r\n\t\t }\r\n\t\t \r\n\t\t {\r\n\t\t\t //新增\r\n\t\t\t Goods good=new Goods();\r\n\t\t\t good.setGoodsName(\"lhsb\");\r\n\t\t\t good.setGoodsType(\"sbsb\");\r\n\t\t\t good.setGoodsClassId(3);\r\n\t\t\t good.setGoodsPrice(1234);\r\n\t\t\t \r\n\t\t\t int i=session.insert(\"com.accp.mybatis.mapper.GoodsMapper.insert\", good);\r\n\t\t\t System.out.println(\"受影响行数\"+i);\r\n\t\t\t System.out.println(\"主键\"+good.getGoodsId());\r\n\t\t }\r\n\t\t \r\n\t\t {\r\n\t\t\t //删除\r\n\t\t\t int a=session.delete(\"com.accp.mybatis.mapper.GoodsMapper.delete\", 59);\r\n\t\t }\r\n\t\t {\r\n\t\t\t //模糊查询\r\n\t\t\t goods =session.selectList(\"com.accp.mybatis.mapper.GoodsMapper.selectlike\",\"%电视级%\");\r\n\t\t\t System.out.println(goods);\r\n\t\t }\r\n\t\t \r\n\t\t {\r\n\t\t\t //多条件查询\r\n\t\t\t Map<String,Object> params=new HashMap<String, Object>();\r\n\t\t\t params.put(\"goodsName\", \"%洗衣液%\");\r\n\t\t\t params.put(\"goodsPrice\", 8);\r\n\t\t\t goods=session.selectList(\"com.accp.mybatis.mapper.GoodsMapper.selectlikeandPrice\", params);\r\n\t\t\t System.out.println(goods);\r\n\t\t }\r\n\t\t \r\n\t\t {\r\n\t\t\t Goods good=new Goods();\r\n\t\t\t good.setGoodsId(60);\r\n\t\t\t good.setGoodsName(\"asd\");\r\n\t\t\t good.setGoodsType(\"123\");\r\n\t\t\t good.setGoodsClassId(1);\r\n\t\t\t good.setGoodsPrice(111);\r\n\t\t\t \r\n\t\t\t \r\n\t\t\t int c=session.update(\"com.accp.mybatis.mapper.GoodsMapper.update\", good);\r\n\t\t }\r\n\t\t//提交事物\r\n\t\t session.commit();\r\n\t\t session.close();//关闭连接\r\n\t}",
"public static void main(String[] args) throws IOException {\n\t\tString resource = \"mybatis-config.xml\";\r\n //ʹ��MyBatis�ṩ��Resources�����mybatis�������ļ�����Ҳ���ع�����ӳ���ļ���\r\n Reader reader = Resources.getResourceAsReader(resource); \r\n //����sqlSession�Ĺ���\r\n SqlSessionFactory sessionFactory = new SqlSessionFactoryBuilder().build(reader);\r\n //������ִ��ӳ���ļ���sql��sqlSession\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.addUser\";\r\n// User user=new User(\"usermode\",22,222.22,UserState.AVAILABLE);\r\n// session.insert(statement,user);\r\n// session.commit();\r\n// System.out.println(user.getId());select id,name,age,money,status from t_user\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.getUser\";\r\n// user=session.selectOne(statement, user.getId());\r\n// System.out.println(user.toString()); \r\n \r\n\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.getuser\";\r\n// User user=session.selectOne(statement, 1);\r\n// user=session.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session.commit();\r\n// SqlSession session1 = sessionFactory.openSession();\r\n// user=session1.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session1.commit();\r\n \r\n \r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename1\";\r\n// List<User> users=session.selectList(statement, \"%J%\");\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename2\";\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"name\", \"J\"); \r\n// users=session.selectList(statement, map);\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.findcardbyuserids\";\r\n// List ids = new ArrayList();\r\n// ids.add(\"1\");\r\n// ids.add(\"2\");\r\n// ids.add(\"3\");\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"ids\", ids); \r\n// List<User> users=session.selectList(statement,map);\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\t\t SqlSession session = sessionFactory.openSession();\r\n\t\t String statement=\"com.demo.mybatis.DBMapping.UserMapper.getUserList\"; \r\n\t\t PageHelper.startPage(1, 5, true); \r\n\t\t List<User> users=session.selectList(statement);\r\n\t\t PageInfo<User> pageInfo = new PageInfo<User>(users); \r\n\t\t System.out.println(\"数据总数:\" + pageInfo.getTotal()); \r\n\t\t System.out.println(\"数据总页数:\" + pageInfo.getPages()); \r\n\t\t System.out.println(\"最后一页:\" + pageInfo.getLastPage()); \r\n\t\t for (User u: users)\r\n\t\t {\r\n\t\t\t System.out.println(u.toString());\r\n\t\t } \r\n\t \r\n\r\n\t}",
"public static void main(String[] args) throws IOException {\n String resource = \"D:\\\\Program Files\\\\Java\\\\projects\\\\musclecoder\\\\openplateform-modules\\\\study-mybatis\\\\src\\\\main\\\\resources\\\\mybatis-config.xml\";\n resource = \"mybatis-config.xml\";\n InputStream inputStream = Resources.getResourceAsStream(resource);\n SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(inputStream);\n SqlSession sqlSession = sqlSessionFactory.openSession();\n UserEntity entity = sqlSession.selectOne(\"com.mapper.UserMapper.select\", 1L);\n System.out.println(entity.getId() + \" -> \" + entity.getUserName());\n System.out.println(\"list :\");\n List<UserEntity> list = sqlSession.selectList(\"com.mapper.UserMapper.selectAll\");\n list.forEach(userEntity -> System.out.println(userEntity.getId() + \" -> \" + userEntity.getUserName()));\n\n sqlSession.close();\n inputStream.close();\n }",
"public static void main(String[] args) throws IOException {\n\t\tString resource = \"mybatis-config.xml\";\n\t\tInputStream inputStream = Resources.getResourceAsStream(resource);\n\t\tSqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(inputStream);\n\n\t\tSqlSession session = sqlSessionFactory.openSession();\n\t\ttry {\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tBaseMapper<Video> mapper = session.getMapper(BaseMapper.class);\n\t\t\tmapper.create(new Video());;\n\t\t} finally {\n\t\t\tsession.close();\n\t\t}\n\t}",
"public static void main( String[] args ) throws IOException {\n\n InputStream inputStream= Resources.getResourceAsStream(\"mybatis-conf.xml\");\n\n //获取SqlSessionFactory的对象\n SqlSessionFactory sf= new SqlSessionFactoryBuilder().build(inputStream);\n\n ProductType productType=new ProductType();\n productType.setName(\"ccs\");\n productType.setStatus(1);\n //获取\n SqlSession session=sf.openSession();\n\n\n\n productType.setName(\"c\");\n List<ProductType> productTypes=session.selectList(util.selectMapper(\"productTypeMapper.selectProductType\"),productType);\n\n productTypes.forEach(p-> System.out.println(p));\n\n session.commit();\n session.close();\n\n }",
"public void setSessionFactory(SessionFactory sessionFactory) {\n template = new HibernateTemplate(sessionFactory);\n}",
"@Mapper\npublic interface QuestionDAO {\n String TABLE_NAME = \" question \";\n String INSERT_FIELDS = \" title, content, created_date, user_id, comment_count \";\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS,\n \") values (#{title},#{content},#{createdDate},#{userId},#{commentCount})\"})\n int addQuestion(Question question);\n\n // 使用 xml 配置文件进行 数据库查询语句与程序接口的映射。\n // 对应的 QuestionDAO.xml 文件位于 resources 文件夹 -》com.mattLearn.dao 文件夹中。\n List<Question> selectLatestQuestions(@Param(\"userId\") int userId, @Param(\"offset\") int offset,\n @Param(\"limit\") int limit);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n Question SelectById(int id);\n\n @Update(\" update question set comment_count=#{commentCount} where id = #{id}\")\n int updateCommentCount(@Param(\"commentCount\") int commentCount,\n @Param(\"id\") int id);\n\n}",
"@Mapper\npublic interface ConfigDao {\n\n @Select(\"SELECT * FROM config WHERE `id` = #{id}\")\n Config getConfigById(String id);\n\n}",
"private HibernateToListDAO(){\r\n\t\tfactory = new AnnotationConfiguration().addPackage(\"il.hit.model\") //the fully qualified package name\r\n .addAnnotatedClass(User.class).addAnnotatedClass(Items.class)\r\n .addResource(\"hibernate.cfg.xml\").configure().buildSessionFactory();\r\n\t}",
"@Test\n public void test()\n {\n SqlSession session = SqlBuilder.getSqlSessionFactory().openSession();\n RoleMapper mapper = session.getMapper(RoleMapper.class);\n Role role = mapper.getOneRole(2L);\n System.out.println(role);\n }",
"@Override\n\t\tpublic SessionFactoryImpl call() throws Exception {\n\t\t\tClassPathXmlApplicationContext applicationContext=new ClassPathXmlApplicationContext(\"spring-mybatis.xml\");\n\t\t\t\n\t\t\tSessionFactoryImpl sessionFactoryImpl=(SessionFactoryImpl) applicationContext.getBean(\"sessionFactory\");\n\n\t\t\treturn sessionFactoryImpl;\n\t\t}",
"@SuppressWarnings({ \"deprecation\"})\r\n\tpublic static SessionFactory getSessionFactory() \r\n\t{\r\n //configuration object\r\n Configuration configuration=new Configuration();\r\n //configuring xml file\r\n \tconfiguration.configure(\"hibernate.cfg.xml\");\r\n \t//SessionFactory object\r\n \tsessionFactory=configuration.buildSessionFactory();\r\n //returning sessonFactory+\r\n return sessionFactory;\r\n }",
"@UseClasspathSqlLocator\npublic interface MovieDao {\n\n @SqlQuery\n @RegisterRowMapper(Movie.MovieMapper.class)\n List<Movie> getMovies(@Bind(\"year\") int year);\n\n @SqlQuery\n @RegisterRowMapper(Actor.ActorMapper.class)\n List<Actor> getActors(@BindCountry Country country);\n}",
"@Test\n public void testGetUserById(){\n User user = userMapper.getUserById(2);\n System.out.println(user);\n MybatisUtil.closeSession();\n }",
"@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}",
"public static void main(String[] args) throws IOException {\n\t\tSqlSessionFactory sqlSessionFactory = getsqlSessionFactoryByResourcePath(\"/mybatis/mapper\");\r\n\t\tbaseTest(sqlSessionFactory);\r\n//\t\ttest(sqlSessionFactory);\r\n\t}",
"private static SessionFactory buildSessionFactory() {\n\n try {\n Configuration configuration = new Configuration();\n\n Properties properties = new Properties();\n properties.load(AuthDao.class.getResourceAsStream(\"/db.properties\"));\n configuration.setProperties(properties);\n\n// configuration.addAnnotatedClass(Driver.class);\n// configuration.addAnnotatedClass(DriverStatusChange.class);\n// configuration.addAnnotatedClass(Freight.class);\n// configuration.addAnnotatedClass(Location.class);\n configuration.addAnnotatedClass(Manager.class);\n// configuration.addAnnotatedClass(Order.class);\n// configuration.addAnnotatedClass(OrderDriver.class);\n// configuration.addAnnotatedClass(OrderWaypoint.class);\n// configuration.addAnnotatedClass(Truck.class);\n// configuration.addAnnotatedClass(Waypoint.class);\n\n ServiceRegistry serviceRegistry =\n new StandardServiceRegistryBuilder().applySettings(configuration.getProperties()).build();\n\n return configuration.buildSessionFactory(serviceRegistry);\n\n } catch (IOException e) {\n e.printStackTrace();\n throw new ExceptionInInitializerError(e);\n }\n }",
"public SqlSessionFactory get();",
"@Bean\n @Qualifier(\"batch-operations\")\n @SuppressWarnings(\"SpringJavaAutowiringInspection\")\n public SqlSession myBatisBatchOperationsSession(DataSource dataSource) throws Exception {\n\n SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean();\n sqlSessionFactoryBean.setDataSource(dataSource);\n sqlSessionFactoryBean.setConfigLocation(new ClassPathResource(\"mybatis/mybatis-config.xml\"));\n\n return new SqlSessionTemplate(sqlSessionFactoryBean.getObject(), ExecutorType.BATCH);\n }",
"public static void main(String[] args) throws ClassNotFoundException, SQLException {\n\tApplicationContext context=new ClassPathXmlApplicationContext(\"beans.xml\");\n\tStudentDAO studentDao=context.getBean(\"studentDAO\",StudentDAO.class);\n\tstudentDao.selectAllRows(); \n\t((ClassPathXmlApplicationContext)context).close();\n\n}",
"private static SessionFactory buildSessionFactory() {\n\t\ttry {\n\t\t\t// Create the SessionFactory from hibernate.cfg.xml\n\t\t\tConfiguration configuration = new Configuration().configure();\n\t\t\tServiceRegistry serviceRegistry = new ServiceRegistryBuilder()\n\t\t\t\t\t.applySettings(configuration.getProperties())\n\t\t\t\t\t.buildServiceRegistry();\n\t\t\tSessionFactory sessionFactory = configuration\n\t\t\t\t\t.buildSessionFactory(serviceRegistry);\n\t\t\treturn sessionFactory;\n\t\t} catch (Throwable ex) {\n\t\t}\n\t\treturn null;\n\t}",
"private SessionFactoryUtil() {\r\n try {\r\n LOG.info(\"Configurando hibernate.cfg.xml\");\r\n CfgFile cfgFile = new CfgFile();\r\n Configuration configure = new Configuration().configure(new File(cfgFile.getPathFile()));\r\n cfgFile.toBuildMetaData(configure);\r\n ServiceRegistry serviceRegistry = new StandardServiceRegistryBuilder().applySettings(configure.getProperties()).build();\r\n sessionFactory = configure.buildSessionFactory(serviceRegistry);\r\n LOG.info(\"Configuracion se cargo a memoria de forma correcta\");\r\n } // try\r\n catch (Exception e) {\r\n Error.mensaje(e);\r\n } // catch\r\n }",
"public static void inicializarBD() {\n\t\ts = new StandardServiceRegistryBuilder().configure().build();\r\n\t\tsf = new MetadataSources(s).buildMetadata().buildSessionFactory();\r\n\t}",
"public void generateHibernateConfigOpening()\n {\n String outputFileName = nameToFileNameInRootGenerationDir(mappingFileName, mappingDirName);\n\n // Instantiate the template to generate from.\n ST stringTemplate = hibernateOnlineTemplates.getInstanceOf(FILE_OPEN_TEMPLATE);\n stringTemplate.add(\"catalogue\", model);\n\n fileOutputHandlerOverwrite.render(stringTemplate, outputFileName);\n }",
"@MyBatisRepository\r\npublic interface BackRoleDao extends BaseDao<BackRole> {\r\n}",
"private static void createSessionFactory() {\n\t\ttry {\n\t\t\tif (sessionFactory == null) {\n\n\t\t\t\tProperties properties = new Properties();\n\t\t\t\tproperties.load(ClassLoader.getSystemResourceAsStream(\"hibernate.properties\"));\n\n\t\t\t\tConfiguration configuration = new Configuration();\n\t\t\t\tEntityScanner.scanPackages(\"musala.schoolapp.model\").addTo(configuration);\n\t\t\t\tconfiguration.mergeProperties(properties).configure();\n\t\t\t\tStandardServiceRegistry builder = new StandardServiceRegistryBuilder()\n\t\t\t\t\t\t.applySettings(configuration.getProperties()).build();\n\t\t\t\tsessionFactory = configuration.buildSessionFactory(builder);\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(\"Failed to create session factory object.\");\n\t\t\tex.printStackTrace();\n\t\t}\n\t}",
"public UniqueResourcesAndLocations() {\n this.context = new ClassPathXmlApplicationContext(\"spring-dao.xml\");\n this.jtemp = (JdbcTemplate)context.getBean(\"jt\");\n\t}",
"private static List<Configuration> configure() {\n Map<String, Configuration> configurations = new HashMap<String, Configuration>();\n try {\n Enumeration<URL> resources = Thread.currentThread().getContextClassLoader().getResources(\"jorm.properties\");\n \n while (resources.hasMoreElements()) {\n URL url = resources.nextElement();\n \n Database.get().log.debug(\"Found jorm configuration @ \" + url.toString());\n \n Properties properties = new Properties();\n InputStream is = url.openStream();\n properties.load(is);\n is.close();\n \n String database = null;\n String destroyMethodName = null;\n String dataSourceClassName = null;\n Map<String, String> dataSourceProperties = new HashMap<String, String>();\n int priority = 0;\n \n for (Entry<String, String> property : new TreeMap<String, String>((Map) properties).entrySet()) {\n String[] parts = property.getKey().split(\"\\\\.\");\n if (parts.length < 3 || !parts[0].equals(\"database\")) {\n continue;\n }\n if (database != null && !parts[1].equals(database)) {\n try {\n Configuration conf = configurations.get(database);\n if (conf == null || conf.priority < priority) {\n conf = new Configuration(database, dataSourceClassName, dataSourceProperties, destroyMethodName, priority);\n configurations.put(database, conf);\n Database.get().log.debug(\"Configured \" + conf);\n }\n } catch (Exception ex) {\n Database.get().log.warn(\"Failed to configure database: \" + ex.getMessage());\n }\n database = parts[1];\n destroyMethodName = null;\n dataSourceClassName = null;\n dataSourceProperties = new HashMap<String, String>();\n priority = 0;\n }\n\n if (parts.length == 3 && parts[2].equals(\"destroyMethod\")) {\n destroyMethodName = property.getValue();\n } else if (parts.length == 3 && parts[2].equals(\"priority\")) {\n try {\n priority = Integer.parseInt(property.getValue().trim());\n } catch (Exception ex) {\n \n }\n } else if (parts[2].equals(\"dataSource\")) {\n if (parts.length == 3) {\n dataSourceClassName = property.getValue();\n } else if (parts.length == 4) {\n dataSourceProperties.put(parts[3], property.getValue());\n } else {\n Database.get().log.warn(\"Invalid DataSource property '\" + property.getKey() + \"'\");\n }\n } else {\n Database.get().log.warn(\"Invalid property '\" + property.getKey() + \"'\");\n }\n }\n \n if (database != null) {\n try {\n Configuration conf = configurations.get(database);\n if (conf == null || conf.priority < priority) {\n conf = new Configuration(database, dataSourceClassName, dataSourceProperties, destroyMethodName, priority);\n configurations.put(database, conf);\n Database.get().log.debug(\"Configured \" + conf);\n }\n } catch (Exception ex) {\n Database.get().log.warn(\"Failed to configure database: \" + ex.getMessage());\n }\n }\n }\n \n for (Entry<String, Configuration> entry : configurations.entrySet()) {\n entry.getValue().apply();\n Database.get().log.debug(\"Configured \" + configuration);\n }\n } catch (IOException ex) {\n Database.get().log.warn(\"Failed to configure database: \" + ex.getMessage()); \n }\n \n return new ArrayList<Configuration>(configurations.values());\n }",
"@Before\r\n public void before() {\n AnnotationConfiguration configuration = new AnnotationConfiguration();\r\n configuration.addAnnotatedClass(Customer.class).addAnnotatedClass(OrderLine.class).addAnnotatedClass(Product.class).addAnnotatedClass(SalesOrder.class);\r\n configuration.setProperty(\"hibernate.dialect\", \"org.hibernate.dialect.MySQL5Dialect\");\r\n configuration.setProperty(\"hibernate.connection.driver_class\", \"com.mysql.jdbc.Driver\");\r\n configuration.setProperty(\"hibernate.connection.url\", \"jdbc:mysql://localhost:3306/order_management_db\");\r\n configuration.setProperty(\"hibernate.connection.username\", \"root\");\r\n sessionFactory = configuration.buildSessionFactory();\r\n session = sessionFactory.openSession();\r\n }",
"@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}",
"static void initialize() {\n final StandardServiceRegistry registry = new StandardServiceRegistryBuilder()\r\n .configure() // configures settings from hibernate.cfg.xml\r\n .build();\r\n try {\r\n sessionFactory = new MetadataSources( registry ).buildMetadata().buildSessionFactory();\r\n }\r\n catch (Exception e) {\r\n StandardServiceRegistryBuilder.destroy( registry );\r\n }\r\n }",
"@MyBatisDao\npublic interface ContnDao extends BaseDao<Contn> {\n\n Contn get(@Param(\"id\") int id);\n\n Contn getByContnNo(@Param(\"contnNo\") String contnNo);\n}",
"@Mapper\npublic interface SeckillUserDao {\n\n @Select(\"select * from seckill_user where id = #{id}\")\n public SeckillUser getById(@Param(\"id\")long id);\n\n}",
"@MyBatisRepository\npublic interface ArticleMapper {\n\n /**\n * 根据主键id获取文章\n *\n * @param id\n * @return\n */\n ArticleDO selectByPrimaryKey(Integer id);\n\n /**\n * 获取所有有效状态的文章\n *\n * @return\n */\n List<ArticleDO> getAllArticleList();\n}",
"private static SessionFactory buildSessionFactory() {\n Configuration configObj = new Configuration();\n configObj.configure(\"hibernate.cfg.xml\");\n\n ServiceRegistry serviceRegistryObj = new StandardServiceRegistryBuilder().applySettings(configObj.getProperties()).build();\n\n // Creating Hibernate SessionFactory Instance\n sessionFactoryObj = configObj.buildSessionFactory(serviceRegistryObj);\n return sessionFactoryObj;\n }",
"public interface Dao {\n\tpublic void setMySessionFactory(SessionFactory sf);\n}",
"@Bean\r\n\tpublic SessionFactory getSessionFactory(DataSource dataSource) {\r\n\t\tLocalSessionFactoryBuilder sessionBuilder = new LocalSessionFactoryBuilder(dataSource);\r\n\t\t// -> getting the properties for hibernate\r\n\t\tsessionBuilder.addProperties(getHibernateProperties());\r\n\t\t// -> fully qualified name of the package that contains entity\r\n\t\tsessionBuilder.scanPackages(packageToScan);\r\n\t\treturn sessionBuilder.buildSessionFactory();\r\n\t}",
"public static void main(String[] args) {\n\n ApplicationContext context = new ClassPathXmlApplicationContext(\"applicationContext_work.xml\");\n SqlSessionFactory c = context.getBean(\"C\", SqlSessionFactory.class);\n System.out.println(c);\n\n\n }",
"protected abstract SessionFactory buildSessionFactory() throws Exception;",
"@Profile(\"production\")\r\n @Bean\r\n @DependsOn(\"SessionFactory\") \r\n public EshopDAOImpl getLocaleDAO(SessionFactory sessionFactory, DataSource dataSource) { \r\n \r\n EshopDAOImpl instanceDAOImpl = new EshopDAOImpl();\r\n \r\n //Inject datasource for JDBC.\r\n// instanceDAOImpl.setDataSource(dataSource); \r\n \r\n //Initialize reference to a SessionFactoryBean for database's methods. \r\n instanceDAOImpl.setSessionFactory(sessionFactory);\r\n \r\n return instanceDAOImpl; \r\n }",
"private static SessionFactory buildSessionFact() {\n try {\n\n return new Configuration().configure(\"hibernate.cfg.xml\").buildSessionFactory();\n\n \n } catch (Throwable ex) {\n \n System.err.println(\"Initial SessionFactory creation failed.\" + ex);\n throw new ExceptionInInitializerError(ex);\n }\n }",
"@Bean(name = \"DirectorySqlSessionFactory\")\n public SqlSessionFactory sqlSessionFactory(@Qualifier(\"DirectoryDbSource\") DataSource dataSource1) throws Exception {\n MysqlDataSource dataSource = new MysqlDataSource();\n dataSource.setUser(\"JMAGX6WiGv\");\n dataSource.setPassword(\"XLFoDCSr02\");\n dataSource.setServerName(\"remotemysql.com\");\n dataSource.setDatabaseName(\"JMAGX6WiGv\");\n // comment out everything above\n SqlSessionFactoryBean factoryBean = new SqlSessionFactoryBean();\n factoryBean.setDataSource(dataSource);\n factoryBean.setTypeAliasesPackage(\"com.cameraiq.technology.directory.port\");\n factoryBean.getObject().getConfiguration().setMapUnderscoreToCamelCase(true);\n return factoryBean.getObject();\n }",
"private static SessionFactory buildSessionFactory() {\n\t\ttry {\r\n\t\t\tConfiguration config=new Configuration();\r\n\t\t\tconfig.addClass(Customer.class);\r\n\t\t\treturn config\r\n\t\t\t\t\t.buildSessionFactory(new StandardServiceRegistryBuilder().build());\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow new RuntimeException(\"error building sessions\");\r\n\t\t}\r\n\t}",
"static void initialize() {\n final StandardServiceRegistry registry = new StandardServiceRegistryBuilder()\n .configure() // configures settings from hibernate.cfg.xml\n .build();\n try {\n sessionFactory = new MetadataSources( registry ).buildMetadata().buildSessionFactory();\n }\n catch (Exception e) {\n StandardServiceRegistryBuilder.destroy( registry );\n }\n }",
"private static SessionFactory buildSessionFactory() {\n\t\t// Creating Configuration Instance & Passing Hibernate Configuration File\n\t\tConfiguration configObj = new Configuration();\n\t\tconfigObj.configure(\"hibernate.cfg.xml\");\n\n\t\t// Since Hibernate Version 4.x, ServiceRegistry Is Being Used\n\t\tServiceRegistry serviceRegistryObj = new StandardServiceRegistryBuilder()\n\t\t\t\t.applySettings(configObj.getProperties()).build();\n\n\t\t// Creating Hibernate SessionFactory Instance\n\t\tsessionFactoryObj = configObj.buildSessionFactory(serviceRegistryObj);\n\t\treturn sessionFactoryObj;\n\t}",
"@org.apache.ibatis.annotations.Mapper\npublic interface UserMapper extends Mapper<User>{\n}",
"@Test\n public void shouldGetBooks() {\n AutomappingTest.sqlSessionFactory.getConfiguration().setAutoMappingBehavior(PARTIAL);\n SqlSession sqlSession = AutomappingTest.sqlSessionFactory.openSession();\n try {\n Mapper mapper = sqlSession.getMapper(Mapper.class);\n // no errors throw\n List<Book> books = mapper.getBooks();\n Assert.assertTrue(\"should return results,no errors throw\", (!(books.isEmpty())));\n } finally {\n sqlSession.close();\n }\n }",
"@PostConstruct\r\n\t@Transactional\r\n\tpublic void afterPropertiesSet() throws Exception {\n\t\t\r\n\t\tFile two = new File( context.getRealPath(\"/variants\") );\r\n\t\t//System.out.println(two.getAbsolutePath());\r\n\t\tVariantManager.init(new File[]{two}, false);\r\n\t\t\r\n\t\tJdbcTemplate template = new JdbcTemplate(dataSource);\r\n\t\ttemplate.execute(\"create table if not exists UserConnection (userId varchar(255) not null,\tproviderId varchar(255) not null,\tproviderUserId varchar(255),\trank int not null,\tdisplayName varchar(255),\tprofileUrl varchar(512),\timageUrl varchar(512),\taccessToken varchar(255) not null,\t\t\t\t\tsecret varchar(255),\trefreshToken varchar(255),\texpireTime bigint,\tprimary key (userId(100), providerId(50), providerUserId(150)))\");\r\n\t\ttry{\r\n\t\t\ttemplate.execute(\"create unique index UserConnectionRank on UserConnection(userId, providerId, rank)\");\r\n\t\t}catch(BadSqlGrammarException e){\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t//sf.openSession();\r\n\t\t\r\n//\t\tRowMapper<Object> rm = new RowMapper<Object>() {\r\n//\r\n// public Object mapRow(ResultSet rs, int rowNum) throws SQLException {\r\n// DefaultLobHandler lobHandler = new DefaultLobHandler();\r\n// InputStream stream = lobHandler.getBlobAsBinaryStream(rs, \"turnStates\");\r\n// ObjectInputStream ois;\r\n//\t\t\t\ttry {\r\n//\t\t\t\t\tois = new ObjectInputStream(stream);\r\n//\t\t\t\t\tTurnState ts = (TurnState) ois.readObject();\r\n//\t\t\t\t\tint id = rs.getInt(\"World_id\");\r\n//\t\t\t\t\tgr.addTurnstate(id, ts);\r\n//\t\t\t\t} catch (IOException e) {\r\n//\t\t\t\t\t// TODO Auto-generated catch block\r\n//\t\t\t\t\te.printStackTrace();\r\n//\t\t\t\t} catch (ClassNotFoundException e) {\r\n//\t\t\t\t\t// TODO Auto-generated catch block\r\n//\t\t\t\t\te.printStackTrace();\r\n//\t\t\t\t}\r\n//\r\n// return null;\r\n// }\r\n// };\r\n\t\t\r\n\t\t\r\n//\t\ttemplate.query(\"SELECT * FROM World_turnStates\",rm);\r\n\t\t\r\n\t\t\r\n\t\tUserEntity.NULL_USER = us.getUserEntity(126);\r\n\t\t\r\n\t\tif (UserEntity.NULL_USER == null){\r\n\t\t\tUserEntity.NULL_USER = new UserEntity();\r\n\t\t\tUserEntity.NULL_USER.setId(126);\r\n\t\t\tUserEntity.NULL_USER.setUsername(\"EMPTY\");\r\n\t\t\tus.saveUser(UserEntity.NULL_USER);\r\n\t\t}\r\n\t\t\r\n\t\tTimeZone.setDefault(TimeZone.getTimeZone(\"UTC\"));\r\n\t}",
"public void update(Userlogin u) throws Exception {\n\t\tInputStream is = Resources.getResourceAsStream(\"sqlMapConfig.xml\");\r\n\t\t sqlSessionFactory = new SqlSessionFactoryBuilder().build(is);\r\n\t\t SqlSession sqlsession = sqlSessionFactory.openSession();\r\n\t\t UserloginMapper mapper = sqlsession.getMapper(UserloginMapper.class);\r\n\t\t mapper.updat(u);\r\n\t\t sqlsession.commit();\r\n\t\t System.out.println(u);\r\n\t}",
"public static SessionFactory getSessionFactory() {\n\t\tConfiguration configObj = new Configuration();\n\t\tconfigObj.addAnnotatedClass(com.training.org.User.class);\n\t\tconfigObj.configure(\"hibernate.cfg.xml\");\n\t\t\n\t\t\n\t\n\n\t\t// Since Hibernate Version 4.x, Service Registry Is Being Used\n\t\tServiceRegistry serviceRegistryObj = new StandardServiceRegistryBuilder().applySettings(configObj.getProperties()).build(); \n\n\t\t// Creating Hibernate Session Factory Instance\n\t\tSessionFactory factoryObj = configObj.buildSessionFactory(serviceRegistryObj);\t\t\n\t\treturn factoryObj;\n\t}",
"@org.apache.ibatis.annotations.Mapper\npublic interface TestMapper extends Mapper<Test> {\n Test selectByid(Long id);\n}",
"public interface UserMapper {\n @Insert(\"INSERT INTO USERS (id,name,password) VALUES (#{id},#{name},#{password})\")\n int insert(User user);//插入用户\n @Select(\"SELECT * FROM USERS WHERE id=#{param1} and password=(#{param2})\")\n User checkUser(int id,String password);\n}",
"@Before\npublic void before() throws Exception {\n\n //TODO Test Controller\n //request = new MockHttpServletRequest();\n //response = new MockHttpServletResponse();\n //request.setCharacterEncoding(\"UTF-8\");\n \n //TODO Test mybaties\n //ctx= new ClassPathXmlApplicationContext(\"classpath*:spring-config.xml\");\n //sqlSessionFactory = (SqlSessionFactory) ctx.getBean(\"sqlSessionFactory\");\n //sqlSession = sqlSessionFactory.openSession();\n}",
"@RequestMapping(value = \"/load\")\n public @ResponseBody void load(String username,String password) {\n System.out.print(username+\" \"+password);\n// ApplicationContext ctx = new ClassPathXmlApplicationContext(\"classpath:spring-config.xml\");\n// SQLDao dao = ctx.getBean(\"SQLDao\", SQLDao.class);\n\n }",
"public interface CspPackageDAO extends Mapper<CspPackage> {\n\n CspPackage findUserPackageById(@Param(\"userId\") String userId);\n\n List<CspPackage> findCspPackage();\n\n\n\n}",
"public interface IDataSourceConfiguration {\r\n\r\n\t/**\r\n\t * \r\n\t * @return Nombre del driver \r\n\t */\r\n\tpublic String getDriverName();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param driverName Nombre del driver\r\n\t */\r\n\tpublic void setDriverName(String driverName);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return User name de conexion\r\n\t */\r\n\tpublic String getUserName();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param userName User name de conexion\r\n\t */\r\n\tpublic void setUserName(String userName);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return Password de conexion\r\n\t */\r\n\tpublic String getPassword();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param password Password de conexion\r\n\t */\r\n\tpublic void setPassword(String password);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return URL de conexion. Por ejemplo jdbc:postgresql://55.55.55.55:5432/ehcos\r\n\t */\r\n\tpublic String getUrl();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param url URL de conexion. Por ejemplo jdbc:postgresql://55.55.55.55:5432/ehcos\r\n\t */\r\n\tpublic void setUrl(String url);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return Alternative User name de conexion\r\n\t */\r\n\tpublic String getAltUserName();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param userName Alternative User name de conexion\r\n\t */\r\n\tpublic void setAltUserName(String altUserName);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return Password de conexion\r\n\t */\r\n\tpublic String getAltPassword();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param password Alternative Password de conexion\r\n\t */\r\n\tpublic void setAltPassword(String altPassword);\r\n\t\r\n}",
"@Mapper\npublic interface RoleMapper {\n @Insert(\"insert into T_Role(rname) values (#{rolename})\")\n int insertRole(@Param(\"rolename\") String rolename);\n\n @Update(\"update T_Role set rname=#{rolename} where rid=#{rid}\")\n int updateRole(@Param(\"rolename\") String rolename, String rid);\n\n @Delete(\"delete from T_Role where rid=#{rid}\")\n int deleteRole(@Param(\"rid\")String rid);\n\n @Select(\"select * from T_Role\")\n List<Role> listRole(int pageSize, int offset);\n}",
"public interface SystemRoleMenuDAO extends Mapper<SystemRoleMenu> {\n\n}",
"public interface SaasSmsConfigDictionaryDao extends BaseMapper<SaasSmsConfigDictionary> {\n\n}",
"void closeSessionFactory();",
"@Before\n public void init() throws ConnectionException, IOException {\n\n final ConnectionPool pool = ConnectionPool.getInstance();\n//\n final Connection connection = pool.takeConnection();\n\n final ScriptRunner scriptRunner = new ScriptRunner(connection);\n\n Reader reader = new BufferedReader(new FileReader(UserDaoTest.class.getClassLoader().getResource(\"db_v2.sql\").getPath()));\n\n scriptRunner.runScript(reader);\n\n pool.closeConnection(connection);\n\n }",
"@Autowired\n\t@Bean(name=\"sessionFactory\")\n\tpublic SessionFactory getSessionFactory(DataSource dataSource) {\n\t\tLocalSessionFactoryBuilder sessionBuilder = new LocalSessionFactoryBuilder(dataSource);\n\t\tsessionBuilder.addAnnotatedClasses(Korisnik.class, Rola.class, Predmet.class\n\t\t\t\t, PredmetKorisnika.class, Tema.class, Materijal.class, Komentar.class);\n\t\tsessionBuilder.addProperties(getHibernateProperties());\n\t\t\n\t\treturn sessionBuilder.buildSessionFactory();\n\t}",
"public interface TestScoreDAO\nextends BaseIbatisDAO<TestScore> {\n}",
"public interface ConfigurationService\n{\n /**\n * 根据配置名称查询配置项, 名称需要唯一\n * @param configName\n * @return\n */\n Configuration selectByConfigName(String configName);\n\n}",
"@Mapper\r\n@Component\r\npublic interface ProjectMapper {\r\n\r\n /**\r\n * 通过项目code查询对应项目\r\n * @param pjt_code\r\n * @return\r\n */\r\n @Select(\"select * from jproject where pjt_code=#{0}\")\r\n Project findProjectByCode(String pjt_code);\r\n}",
"@MyBatisMapper\npublic interface RouteFilterDao {\n //for api\n public List<RouteFilter> listRouteFilter(int userId);\n\n public List<RouteFilter> listRouteFilterIncludeModelRoute(int userId);\n\n public List<RouteFilter> listFilterRoutes(int userId);\n\n public RouteFilter getFilterRoutesByFilterId(int userId, int filterId);\n\n //首页列表\n public int findTotalCount();\n\n public List<RouteFilter> listFilterByPage(int pageNo, int pageSize);\n\n //编辑\n public RouteFilter findOne(int filterId);\n\n //根据ID查找出分类同时带有模式\n public RouteFilter findOneWithModel(int filterId);\n\n //根据ID查找出分类同时带有控制器\n public RouteFilter findOneWithControl(int filterId);\n\n public List<Control> listControlByFilterId(int filterId);\n\n //保存\n public void addFilter(RouteFilter routeFilter);\n\n //删除\n public void deleteFilter(int filterId);\n\n //更新\n public void updateFilter(RouteFilter routeFilter);\n\n //根据名称查询\n public List<RouteFilter> findByName(String filterName, int pageNo, int pageSize);\n\n //保存分类模式对应关系\n public void saveFilterModel(Map<String, Object> gruMap);\n\n public void deleteModelFromFilterModelMapping(int groupID);\n\n //保存分类模式对应关系\n public void saveFilterControl(Map<String, Object> gruMap);\n\n public void deleteControlFromFilterControlMapping(int groupID);\n\n}",
"@Mapper\npublic interface UserMapper {\n @Select(\"SELECT * FROM users WHERE name = #{name}\")\n public User findUser(@Param(\"name\") String name);\n}",
"@Dao(CfgHisTableConfigEntity.class)\npublic interface ICfgHisTableConfigDao extends CrudDao<CfgHisTableConfigEntity, String> {\n}",
"public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}",
"@Mapper\npublic interface AyUserMapper {\n// @Select(\"SELECT * FROM ay_user WHERE name='name' AND password='password'\")\n //Param注意是哪个包的\n User findByNameAndPassword(@Param(\"name\") String name,@Param(\"password\") String password);\n}",
"@Component(\"keeperWelfareDao\")\npublic interface IKeeperWelfareMapper extends IMyBatisMapper {\n List<ShopKeeperWelfareDomain> queryWelfare(@Param(\"welfareName\") String welfareName, @Param(\"welfareId\") Integer welfareId, @Param(\"typeId\") Integer typeId,@Param(\"limit\") Integer limit, @Param(\"offset\") Integer offset, @Param(\"areaId\") Integer areaId, @Param(\"netType\") String netType);\n\n int queryWelfareCount(@Param(\"welfareName\") String welfareName, @Param(\"welfareId\") Integer welfareId, @Param(\"typeId\") Integer typeId, @Param(\"areaId\") Integer areaId, @Param(\"netType\") String netType);\n\n void addWelfare(ShopKeeperWelfareDomain shopKeeperWelfareDomain);\n\n void updateWelfare(@Param(\"welfareDomain\") ShopKeeperWelfareDomain shopKeeperWelfareDomain);\n\n void deleteWelfare(@Param(\"welfareId\") Integer welfareId);\n\n int queryWelfareCountByProductId(@Param(\"productId\") String productId);\n\n List<ShopKeeperWelfareDomain> queryWelfareForApp();\n}",
"@mybatisRepository\r\npublic interface StuWrongDao {\r\n List<StuWrong> getUserListPage(StuWrong stuwrong);\r\n List<StuWrong> searchStuWrongListPage(String attribute,String value);\r\n}",
"public interface UserAnnoMapper {\n\n @Select(\"select * from tbl_user where id = #{id}\")\n User findOneById(Long id);\n}",
"public static SessionFactory getSessionFactory() {\r\n\t\tConfiguration configuration = new Configuration().configure();\r\n\t\tStandardServiceRegistryBuilder builder = new StandardServiceRegistryBuilder()\r\n\t\t\t\t.applySettings(configuration.getProperties());\r\n\t\tSessionFactory sessionFactory = configuration\r\n\t\t\t\t.buildSessionFactory(builder.build());\r\n\t\treturn sessionFactory;\r\n\t}",
"public static void main(String[] args) {\n\t\tSessionFactory factory = new Configuration()\n\t\t\t\t.configure(\"hibernate.cfg.xml\")\n\t\t\t\t.addAnnotatedClass(Student.class)\n\t\t\t\t.addAnnotatedClass(Project.class)\n\t\t\t\t.buildSessionFactory();\n\n// create session\nSession session = factory.openSession();\ntry {\t\t\t\n\n\tStudent student = new Student(\"Shivam\",\"[email protected]\");\n\tProject project = new Project(\"Student Management System\",\"java\");\n\tstudent.setProject(project);\n\tsession.beginTransaction();\n\tSystem.out.println(\"Saving Student: \" + student);\n\t\n\tsession.save(student);\t\t\t\t\t\n\t\n\t// commit transaction\n\tsession.getTransaction().commit();\n\t\n\tSystem.out.println(\"Done!\");\n\t\n}\nfinally {\n\tfactory.close();\n\n}\n}",
"@Mapper\npublic interface PersonMapper {\n\n @Select(\"select * from cjh_test_person where id = #{id}\")\n Person getMydomain(@Param(\"id\") int id);\n}",
"@org.apache.ibatis.annotations.Mapper\npublic interface GoodsDao extends Mapper<Goods> {\n @Select(\"select * from tbl_goods\")\n @Results({\n @Result(property = \"cid\",column = \"cid\"),\n @Result(property = \"category\",column = \"cid\",one = @One(select = \"com.czxy.CategoryDao.selectByPrimaryKey\"))\n })\n List<Goods> findAll();\n\n}",
"public NationalityDAO() {\n //sessionFactory = HibernateUtil.getSessionFactory();\n session=HibernateUtil.openSession();\n }",
"@Test\n public void contextLoads() {\n System.out.println(userMapper.selectUserByName(\"hh\").toString());\n\n }",
"public SessionFactory getSessionFactory()\n {\n return sessionFactory;\n }",
"@Test\n\tvoid contextLoads() throws SQLException {\n\t\tSystem.out.println(resultadoDao.getConf_evaluacion(1));\n\n\t}",
"@Mapper\npublic interface SettingMapper {\n @Select(\"SELECT _key, _value FROM setting WHERE _key = #{key}\")\n public Setting findByKey(String key);\n\n @Insert(\"INSERT INTO setting(_key, _value) VALUES (#{key}, #{value)\")\n public void save(Setting setting);\n}",
"@Mapper\npublic interface LocationMapper {\n @Select(\"select * from plugin_location where id = #{id}\")\n MyLocation findOneLocation(@Param(\"id\") String id);\n\n @Select(\"select * from plugin_location\")\n List<MyLocation> findAllLocation();\n\n}",
"public interface SysConfigDao extends BaseDao<SysConfig, String> {\n\t//SysConfig findByCfPlazaNoAndCfConfigNameAndCfPCNo(String cfPlazaNo, String cfConfigName, String cfPCNo);\n\n SysConfig findByCfConfigName(String cfConfigName);\n}",
"public static void main(String[] args) throws Exception {\n //加载bean\n String[] configLocations = new String[]{\"beans.xml\"};\n ClassPathXmlApplicationContext appContext\n = new ClassPathXmlApplicationContext(configLocations);\n SessionFactory sessionFactory = (SessionFactory)appContext.getBean(\"sessionFactory\");\n ComboPooledDataSource dataSource= (ComboPooledDataSource)appContext.getBean(\"dataSource\");\n// Properties properties = new Properties();\n// // 使用InPutStream流读取properties文件\n// BufferedReader bufferedReader = new BufferedReader(new FileReader(\"config/datasource.properties\"));\n// properties.load(bufferedReader);\n// // 获取key对应的value值\n// String driverClass = properties.getProperty(\"mysql.driverClassName\");\n// String jdbcUrl = properties.getProperty(\"mysql.url\");\n// String user = properties.getProperty(\"mysql.username\");\n// String password = properties.getProperty(\"mysql.password\");\n\n// dataSource.setDriverClass(driverClass);\n// dataSource.setJdbcUrl(driverClass);\n// dataSource.setUser(driverClass);\n// dataSource.setPassword(driverClass);\n Session session = sessionFactory.openSession();\n\n\n // session\n// Session session = sessionFactory;\n// User user = new User();\n// user.setName(\"lgd\");\n// user.setAge(22);\n// session.save(user);\n System.out.println(\"userInsert is done.\");\n ClearTable clearTable = JsonIO.getClearTable();\n Boolean single;\n String dept;\n if(clearTable.isAll()){\n single = false;\n dept = \"all\";\n } else if(clearTable.isSmt()){\n single = false;\n dept = \"smt\";\n } else if(clearTable.isDip()){\n single = false;\n dept = \"dip\";\n } else {\n single = true;\n dept = \"single\";\n }\n List<String> tableNameList = JsonIO.getTableNames(dept, single);\n StringBuilder allSingle = new StringBuilder();\n for(String tableName: tableNameList){\n String singleSQL = \"\";\n singleSQL = \"truncate table \" + tableName + \";\";\n Transaction ts = session.beginTransaction();\n Query query = session.createSQLQuery(singleSQL.toString());\n query.executeUpdate();\n ts.commit();\n }\n }",
"@Mapper\npublic interface SkuMapper {\n\n\n @Select(\"select * from Sku\")\n List<SkuParam> getAll();\n\n @Insert(value = {\"INSERT INTO Sku (skuName,price,categoryId,brandId,description) VALUES (#{skuName},#{price},#{categoryId},#{brandId},#{description})\"})\n @Options(useGeneratedKeys=true, keyProperty=\"skuId\")\n int insertLine(Sku sku);\n\n// @Insert(value = {\"INSERT INTO Sku (categoryId,brandId) VALUES (2,1)\"})\n// @Options(useGeneratedKeys=true, keyProperty=\"SkuId\")\n// int insertLine(Sku sku);\n\n @Delete(value = {\n \"DELETE from Sku WHERE skuId = #{skuId}\"\n })\n int deleteLine(@Param(value = \"skuId\") Long skuId);\n\n// @Insert({\n// \"<script>\",\n// \"INSERT INTO\",\n// \"CategoryAttributeGroup(id,templateId,name,sort,createTime,deleted,updateTime)\",\n// \"<foreach collection='list' item='obj' open='values' separator=',' close=''>\",\n// \" (#{obj.id},#{obj.templateId},#{obj.name},#{obj.sort},#{obj.createTime},#{obj.deleted},#{obj.updateTime})\",\n// \"</foreach>\",\n// \"</script>\"\n// })\n// Integer createCategoryAttributeGroup(List<CategoryAttributeGroup> categoryAttributeGroups);\n\n @Update(\"UPDATE Sku SET skuName = #{skuName} WHERE skuId = #{skuId}\")\n int updateLine(@Param(\"skuId\") Long skuId,@Param(\"skuName\")String skuName);\n\n\n @Select({\n \"<script>\",\n \"SELECT\",\n \"s.SkuName,c.categoryName,s.categoryId,b.brandName,s.price\",\n \"FROM\",\n \"Sku AS s\",\n \"JOIN\",\n \"Category AS c ON s.categoryId = c.categoryId\",\n \"JOIN\",\n \"Brand AS b ON s.brandId = b.brandId\",\n \"WHERE 1=1\",\n //范围查询,根据时间\n \"<if test=\\\" null != higherSkuParam.startTime and null != higherSkuParam.endTime \\\">\",\n \"AND s.updateTime >= #{higherSkuParam.startTime}\",\n \"AND s.updateTime <= #{ higherSkuParam.endTime}\",\n \"</if>\",\n //模糊查询,根据类别\n\n \"<if test=\\\"null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName\\\">\",\n \" AND c.categoryName LIKE CONCAT('%', #{higherSkuParam.categoryName}, '%')\",\n \"</if>\",\n\n //模糊查询,根据品牌\n\n \"<if test=\\\"null != higherSkuParam.brandName and ''!=higherSkuParam.brandName\\\">\",\n \" AND b.brandName LIKE CONCAT('%', #{higherSkuParam.brandName}, '%')\",\n \"</if>\",\n\n\n //模糊查询,根据商品名字\n \"<if test=\\\"null != higherSkuParam.skuName and ''!=higherSkuParam.skuName\\\">\",\n \" AND s.skuName LIKE CONCAT('%', #{higherSkuParam.skuName}, '%')\",\n \"</if>\",\n\n\n //根据多个类别查询\n \"<if test=\\\" null != higherSkuParam.categoryIds and higherSkuParam.categoryIds.size>0\\\" >\",\n \"AND s.categoryId IN\",\n \"<foreach collection=\\\"higherSkuParam.categoryIds\\\" item=\\\"data\\\" index=\\\"index\\\" open=\\\"(\\\" separator=\\\",\\\" close=\\\")\\\" >\",\n \" #{data} \",\n \"</foreach>\",\n \"</if>\",\n \"</script>\"\n })\n List<HigherSkuDTO> higherSelect(@Param(\"higherSkuParam\")HigherSkuParam higherSkuParam);\n\n\n\n// \"<if test=\\\" null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName \\\" >\",\n// \" AND c.categoryName LIKE \\\"%#{higherSkuParam.categoryName}%\\\" \",\n// \"</if>\",\n// \"<if test=\\\" null != higherSkuParam.skuName \\\" >\",\n// \"AND s.skuName LIKE \\\"%#{higherSkuParam.skuName}%\\\" \",\n// \"</if>\",\n}",
"@Mapper\npublic interface SRDaLeiDAO {\n\n @Select(\"SELECT `px_sr_dalei`.`id`,\\n\" +\n \" `px_sr_dalei`.`institution_code`,\\n\" +\n \" `px_sr_dalei`.`name`,\\n\" +\n \" `px_sr_dalei`.`createDate`,\\n\" +\n \" `px_sr_dalei`.`updateDate`\\n\" +\n \" FROM `px_sr_dalei` \\n\" +\n \" WHERE institution_code = #{institution_code} \")\n List<SRDaLei> querySRDaLeiListByInstitution(@Param(\"institution_code\") String institution_code);\n\n @Select(\"SELECT `px_sr_dalei`.`id`,\\n\" +\n \" `px_sr_dalei`.`institution_code`,\\n\" +\n \" `px_sr_dalei`.`name`,\\n\" +\n \" `px_sr_dalei`.`createDate`,\\n\" +\n \" `px_sr_dalei`.`updateDate`\\n\" +\n \" FROM `px_sr_dalei` \\n\" +\n \" WHERE institution_code = #{institution_code} \\n\" +\n \" AND id = #{id} \\n\")\n SRDaLei querySRDaLeiById(@Param(\"id\") int id, @Param(\"institution_code\") String institution_code);\n\n @Select(\"SELECT `px_sr_dalei`.`id`,\\n\" +\n \" `px_sr_dalei`.`institution_code`,\\n\" +\n \" `px_sr_dalei`.`name`,\\n\" +\n \" `px_sr_dalei`.`createDate`,\\n\" +\n \" `px_sr_dalei`.`updateDate`\\n\" +\n \" FROM `px_sr_dalei` \\n\" +\n \" WHERE institution_code = #{institution_code} \\n\" +\n \" AND name = #{name} \\n\")\n SRDaLei querySRDaLeiByName(@Param(\"name\") String name, @Param(\"institution_code\") String institution_code);\n\n @Select(\"SELECT `px_sr_dalei`.`id`,\\n\" +\n \" `px_sr_dalei`.`institution_code`,\\n\" +\n \" `px_sr_dalei`.`name`,\\n\" +\n \" `px_sr_dalei`.`createDate`,\\n\" +\n \" `px_sr_dalei`.`updateDate`\\n\" +\n \" FROM `px_sr_dalei` \\n\" +\n \" WHERE institution_code = #{institution_code} \\n\" +\n \" AND name like CONCAT('%',#{name},'%') \\n\")\n List<SRDaLei> querySRDaLeiListByNameWithLike(@Param(\"name\") String name, @Param(\"institution_code\") String institution_code);\n\n @Insert(\" INSERT INTO `px_sr_dalei`\\n\" +\n \"( \\n\" +\n \"`institution_code`,\\n\" +\n \"`name`,\\n\" +\n \"`createDate`,\\n\" +\n \"`updateDate`)\\n\" +\n \"VALUES\\n\" +\n \"( \\n\" +\n \"#{institution_code},\\n\" +\n \"#{name},\\n\" +\n \"now(),\\n\" +\n \"now());\\n\"\n )\n public int insertSRDaLei(SRDaLei srDaLei);\n\n @Update(\" UPDATE `px_sr_dalei`\\n\" +\n \"SET\\n\" +\n \"`name` = #{name},\\n\" +\n \"`updateDate` = now()\\n\" +\n \" WHERE id=#{id} and institution_code=#{institution_code} ;\\n \" )\n public int updateSRDaLei(SRDaLei srDaLei);\n\n @Delete(\" DELETE FROM `px_sr_dalei`\\n\" +\n \" WHERE id=#{id} and name=#{name} and institution_code=#{institution_code} ; \")\n public int deleteSRDaLei(SRDaLei srDaLei);\n}",
"@Mapper\npublic interface CityDao {\n\n /**\n * 根据名字查找城市\n * @param cityName\n * @return\n */\n City findByName(@Param(\"cityName\")String cityName);\n\n void saveCity(City city);\n}",
"public interface ConfigurationDAO\n{\n /**\n * Export table configuration information\n * \n * @param fullTableName\n * full table name, including schema\n * @return column configurations mapped by column name\n */\n public Map<String, ColumnConfig> exportColumns(String fullTableName);\n\n /**\n * Adds column comments to column configs\n * \n * @param fullTableName\n * full table name\n * @param configs\n * ColumnConfig objects mapped to column names\n */\n public void addColumnComments(String fullTableName, Map<String, ColumnConfig> configs);\n\n /**\n * Updates table configuration based on information available from TAP tables table\n * \n * @param fullTableName\n * full name of table to update\n * @param config\n * table configuration\n * @return false if the table does not exist, else true\n */\n public boolean updateTableFromTap(String fullTableName, TableConfig config);\n\n /**\n * Updates columns configuration based on information available from TAP columns table\n * \n * @param fullTableName\n * full name of table that the columns belong to\n * @param configs\n * columns configurations\n */\n public void updateColumnsFromTap(String fullTableName, Map<String, ColumnConfig> configs);\n\n /**\n * Get index definition statements\n * \n * @param fullTableName\n * full name of table that the columns belong to\n * @return index definition statements as Strings in a List\n */\n public Map<String, String> exportIndexDefs(String fullTableName);\n\n /**\n * Get constraints information\n * \n * @param fullDbTableName\n * full database name of table that the columns belong to\n * @param constraintType\n * ConfigurationDAOImpl.FOREIGN_KEYS for foreign keys, ConfigurationDAOImpl.PRIMARY_KEYS for primary keys\n * @return Map constraint name -$gt; encoded constraint string\n */\n public Map<String, String> exportConstraints(String fullDbTableName, String constraintType);\n\n /**\n * Query for strings using the template\n * \n * @param sql\n * sql query with params placeholders\n * @param params\n * an array of params\n * @return a list of String results\n */\n public List<String> queryForStrings(String sql, Object[] params);\n\n /**\n * Get description of given table in given schema\n * \n * @param fullTableName\n * full table name\n * \n * @return table description as a String\n */\n public String exportTableDescription(String fullTableName);\n\n /**\n * Executes a statement\n * \n * @param statement\n * sql statement\n */\n public void execute(String statement);\n\n /**\n * Drops a constraint\n * \n * @param constraint\n * constraint to drop\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void dropConstraint(ConstraintConfig constraint) throws ConfigurationException;\n\n /**\n * Adds a constraint\n * \n * @param constraint\n * constraint to add\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void addConstraint(ConstraintConfig constraint) throws ConfigurationException;\n\n /**\n * Drops an index\n * \n * @param index\n * index to drop\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void dropIndex(IndexConfig index) throws ConfigurationException;\n\n /**\n * Adds an index\n * \n * @param index\n * index to add\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void addIndex(IndexConfig index) throws ConfigurationException;\n\n /**\n * Begin transaction\n */\n public void begin();\n\n /**\n * Commit transaction\n */\n public void commit();\n\n /**\n * Rollback transaction\n */\n public void rollback();\n\n /**\n * Drops column\n * \n * @param columnConfig\n * column configuration object of the column to drop\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void dropColumn(ColumnConfig columnConfig) throws ConfigurationException;\n\n /**\n * Creates column\n * \n * @param columnConfig\n * column attributes\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createColumn(ColumnConfig columnConfig) throws ConfigurationException;\n\n /**\n * Updates column\n * \n * @param current\n * current column attributes\n * @param updated\n * desired column attributes\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void updateColumn(ColumnConfig current, ColumnConfig updated) throws ConfigurationException;\n\n /**\n * Creates foreign key constraint\n * \n * @param constraintConfig\n * constraint configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createConstraint(ConstraintConfig constraintConfig) throws ConfigurationException;\n\n /**\n * Creates index\n * \n * @param indexConfig\n * index configuration\n * @throws ConfigurationException\n * if change is not allowed\n * \n */\n public void createIndex(IndexConfig indexConfig) throws ConfigurationException;\n\n /**\n * Creates a table\n * \n * @param tableConfig\n * table configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createTable(TableConfig tableConfig) throws ConfigurationException;\n\n /**\n * Delete schema from TAP metadata tables\n * \n * @param schemaConfig\n * schema configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void deleteTapSchema(SchemaConfig schemaConfig) throws ConfigurationException;\n\n /**\n * Create schema in TAP metadata tables\n * \n * @param schemaConfig\n * schema configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createTapSchema(SchemaConfig schemaConfig) throws ConfigurationException;\n\n /**\n * Update schema in TAP metadata tables\n * \n * @param newSchema\n * schema configuration\n * @param createOnly\n * do not update the record if it exists\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void updateTapSchema(SchemaConfig newSchema, boolean createOnly) throws ConfigurationException;\n\n /**\n * Delete table from TAP metadata tables\n * \n * @param tableConfig\n * table configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void deleteTapTable(TableConfig tableConfig) throws ConfigurationException;\n\n /**\n * Create table in TAP metadata tables\n * \n * @param tableConfig\n * table configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createTapTable(TableConfig tableConfig) throws ConfigurationException;\n\n /**\n * Update table in TAP metadata tables\n * \n * @param newTable\n * table configuration\n * @param createOnly\n * do not update the record if it exists\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void updateTapTable(TableConfig newTable, boolean createOnly) throws ConfigurationException;\n\n /**\n * Adds missing records and references defined by the table's keys\n * \n * @param cfgTable\n * TableConfig object to process\n * @param createOnly\n * do not update the record if it exists\n * @throws ConfigurationException\n * if change is not allowed\n */\n void updateTapTableReferences(TableConfig cfgTable, boolean createOnly) throws ConfigurationException;\n\n /* =============================================================================== */\n /* Replacements for former JPA repositories functions */\n /* =============================================================================== */\n\n /**\n * Find all TAP schemas\n * \n * @return a collection of TapSchema objects\n */\n public Collection<TapSchema> findAllSchemas();\n\n /**\n * Find all TAP tables\n * \n * @return a collection of TapTable objects\n */\n public Collection<TapTable> findAllTables();\n\n /**\n * Find a TAP schema by name\n * \n * @param schemaName\n * schema name\n * @return TapSchema object\n */\n public TapSchema findOneSchema(String schemaName);\n\n /**\n * Find all TAP columns\n * \n * @return a collection of TapColumn objects\n */\n public Collection<TapColumn> findAllColumns();\n\n /**\n * Find a TAP table by name\n * \n * @param tableName\n * column name\n * @return TapTable object\n */\n public TapTable findOneTable(String tableName);\n\n /**\n * Find all TAP key columns\n * \n * @return a collection of TapKeyColumn objects\n */\n public Collection<TapKeyColumn> findAllKeyColumns();\n\n /**\n * Find a TAP column by its key\n * \n * @param tapColumnPK\n * column key\n * @return TapColumn object\n */\n public TapColumn findOneColumn(TapColumnPK tapColumnPK);\n\n /**\n * Find all TAP keys\n * \n * @return a collection of TapKey objects\n */\n public Collection<TapKey> findAllKeys();\n\n /**\n * Get JdbcTemplate\n * \n * @return JdbcTemplate used by this DAO\n */\n public JdbcTemplate getTemplate();\n\n /**\n * Get schema name\n * \n * @return schema name of any existing table or default schema name\n */\n public String getSchema();\n\n /**\n * Make sure that TAP tables satisfy current version requirements\n * \n * @throws ConfigurationException\n * if there were configuration problems\n */\n void checkTapDbVersion() throws ConfigurationException;\n\n /**\n * Refreshes the object cache, for TAP metadata cached by the application.\n */\n public void refreshObjectCache();\n \n /**\n * Convert project codes to project ids\n * \n * @param projectCodes\n * list of project codes\n * @param schema\n * Schema of the projects table\n * @return projectIds List of project ids for codes\n */\n public List<Long> convertProjectCodesToIds(List<String> projectCodes, String schema);\n \n}",
"@Resource\n\t@Override\n\tpublic void setSqlSessionFactory(SqlSessionFactory sqlSessionFactory) {\n\t\tsuper.setSqlSessionFactory(sqlSessionFactory);\n\t}",
"public static String testConnectionHibernate(Configuration configuration) throws CSException {\n\n\n\t\tSessionFactory sf = null;\n\t\tResultSet rs = null;\n\t\tStatement stmt=null;\n\t\tConnection conn = null;\n\t\tSession session = null;\n\t\ttry {\n\t\t\t//System.out.println(\"testConnectionHibernate*****1\");\n\t\t\tsf = configuration.buildSessionFactory();\n\t\t\t//System.out.println(\"testConnectionHibernate*****2\");\n\t\t\tsession = sf.openSession();\n\t\t\t//System.out.println(\"testConnectionHibernate*****3\");\n\t\t\tconn = session.connection();\n\t\t\t//System.out.println(\"testConnectionHibernate*****4\");\n\t\t\tstmt = conn.createStatement();\n\t\t\t//System.out.println(\"testConnectionHibernate*****5\");\n\t\t\tstmt.execute(\"select count(*) from csm_application\");\n\t\t\t//System.out.println(\"testConnectionHibernate*****6\");\n\t\t\trs = stmt.getResultSet();\n\t\t\t//System.out.println(\"testConnectionHibernate*****7\");\n\n\t\t\t//System.out.println(rs.getMetaData().getColumnCount());\n\n\t\t\treturn DisplayConstants.APPLICATION_DATABASE_CONNECTION_SUCCESSFUL;\n\n\t\t} catch(Throwable t){\n\t\t\tt.printStackTrace();\n\t\t\t// Depending on the cause of the exception obtain message and throw a CSException.\n\t\t\tif(t instanceof SQLGrammarException){\n\t\t\t\tthrow new CSException(DisplayConstants.APPLICATION_DATABASE_CONNECTION_FAILED+\" \"+t.getCause().getMessage());\n\t\t\t}\n\t\t\tif(t instanceof JDBCConnectionException){\n\t\t\t\tif(t.getCause() instanceof CommunicationsException){\n\t\t\t\t\tthrow new CSException(DisplayConstants.APPLICATION_DATABASE_CONNECTION_FAILED_URL_SERVER_PORT);\n\t\t\t\t}\n\t\t\t\tif(t.getCause() instanceof SQLException){\n\t\t\t\t\tthrow new CSException(DisplayConstants.APPLICATION_DATABASE_CONNECTION_FAILED_URL);\n\t\t\t\t}\n\t\t\t\tthrow new CSException(DisplayConstants.APPLICATION_DATABASE_CONNECTION_FAILED+\" \"+t.getMessage());\n\t\t\t}\n\t\t\tif(t instanceof GenericJDBCException){\n\t\t\t\tthrow new CSException(DisplayConstants.APPLICATION_DATABASE_CONNECTION_FAILED_URL_USER_PASS+\" \");\n\t\t\t}\n\t\t\tif(t instanceof CacheException){\n\t\t\t\tthrow new CacheException(\"Please Try Again.\\n \");\n\n\t\t\t}\n\t\t\tif(t instanceof HibernateException){\n\t\t\t\tthrow new CSException(DisplayConstants.APPLICATION_DATABASE_CONNECTION_FAILED+\" \"+t.getMessage());\n\t\t\t}\n\n\t\t\tthrow new CSException(\n\t\t\t\t\tDisplayConstants.APPLICATION_DATABASE_CONNECTION_FAILED_URL_USER_PASS);\n\t\t}finally{\n\t\t\ttry{\n\t\t\t\tsf.close();\n\t\t\t\trs.close();\n\t\t\t\tstmt.close();\n\t\t\t\tconn.close();\n\t\t\t\tsession.close();\n\t\t\t}catch(Exception e){}\n\n\t\t}\n\n\t}",
"private void initiate(){try{\n\t//String dataIni = run.class.getResource(\"../util/DataBase.ini\").getFile();\n //FileInputStream fin=new FileInputStream(dataIni); // 打开文件,从根目录开始寻找\n//\tFileInputStream fin=new FileInputStream(\"src/util/DataBase.ini\"); // 打开文件,从根目录开始寻找\n//\tProperties props=new Properties(); // 建立属性类,读取ini文件\n//\tprops.load(fin); \n//\tdriver=props.getProperty(\"driver\"); //根据键读取值\n//\turl=props.getProperty(\"url\");\n//\tusername=props.getProperty(\"username\");\n//\tuserpassword=props.getProperty(\"userpassword\");\n\t}\n\tcatch(Exception e){e.printStackTrace();}\n\t}",
"public interface CrmDmDbsBmsMapper {\n public static String TABLENAME = \"crm_dm_bds_bms\";\n @Select(\"select * from \"+TABLENAME+\" WHERE staff_city_id=#{cityId, jdbcType=BIGINT} limit 10 \")\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType= JdbcType.BIGINT, id=true),\n @Result(column=\"Saler_id\", property=\"salerId\", jdbcType= JdbcType.BIGINT),\n @Result(column=\"Saler_name\", property=\"salerName\", jdbcType= JdbcType.BIGINT)\n })\n public List<CrmDmBdsBms> findSalerListByCityId(@Param(\"cityId\") Long cityId);\n}",
"@SqlMapper\npublic interface PortalAreaAdminirationMapper {\n List<PortalAreaAdministrationListVo> getPage(PortalAreaAdminirationListCondition condition);\n Integer getCount(PortalAreaAdminirationListCondition condition);\n Integer save(PortalAreaAdminirationListCondition condition);\n Integer delete(PortalAreaAdminirationListCondition condition);\n Integer update(PortalAreaAdminirationListCondition condition);\n}",
"public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}",
"@Resource\npublic interface UserMapper extends Mapper<User> {\n\n public User queryUserByName(String userName);\n}",
"@Mapper\npublic interface WeChatInfoDao {\n\n\n /**\n * 插入微信信息\n * @param wechatInfo\n * @return\n */\n @Insert(\"INSERT INTO wechat_info(parentid,unionid,openid,nickname,sex,province,city,country,headImgUrl,\" +\n \"status,ticket_url,ticket,is_guide,reward) VALUES(#{parentid},#{unionid},#{openid},#{nickname},#{sex},#{province}\" +\n \",#{city},#{country},#{headImgUrl},#{status},#{ticketUrl},#{ticket},#{isGuide},#{reward})\")\n @Options(useGeneratedKeys=true, keyProperty=\"id\")\n int insert(WeChatInfoEntity wechatInfo);\n\n /**\n * 根据openID 查找用户信息\n * @param openid\n * @return\n */\n @Select(\"SELECT * FROM wechat_info WHERE openid = #{openid}\")\n @Results(\n {\n @Result(id = true, column = \"id\", property = \"ID\"),\n @Result(column = \"unionid\", property = \"unionid\"),\n @Result(column = \"parentid\", property = \"parentid\"),\n @Result(column = \"openid\", property = \"openid\"),\n @Result(column = \"ticket_url\", property = \"ticketUrl\"),\n @Result(column = \"ticket\", property = \"ticket\"),\n @Result(column = \"nickname\", property = \"nickname\"),\n @Result(column = \"is_guide\", property = \"isGuide\"),\n @Result(column = \"reward\", property = \"reward\")\n })\n WeChatInfoEntity findByOpenID(@Param(\"openid\") String openid);\n\n /**\n * 根据openID 修改二维码信息\n * @param wechatInfo\n */\n @Update(\"UPDATE wechat_info SET ticket_url=#{ticketUrl},ticket=#{ticket} WHERE openid=#{openid}\")\n void updateTicketUrlByOpenID(WeChatInfoEntity wechatInfo);\n\n /**\n * 取消关注\n * @param wechatInfo\n */\n @Update(\"UPDATE wechat_info SET status=1 WHERE openid=#{openid}\")\n void updateStatusByOpenID(WeChatInfoEntity wechatInfo);\n\n\n /**\n * 更改status 状态\n * @param wechatInfo\n */\n @SelectProvider(type=WeChatInfoSqlProvider.class, method=\"updateByOpenIdSql\")\n void updateStatus(@Param(\"wechatInfo\") WeChatInfoEntity wechatInfo);\n\n @Select(\"SELECT * FROM wechat_info WHERE id = #{ID}\")\n @Results(\n {\n @Result(id = true, column = \"id\", property = \"ID\"),\n @Result(column = \"unionid\", property = \"unionid\"),\n @Result(column = \"parentid\", property = \"parentid\"),\n @Result(column = \"openid\", property = \"openid\"),\n @Result(column = \"ticket_url\", property = \"ticketUrl\"),\n @Result(column = \"ticket\", property = \"ticket\"),\n @Result(column = \"is_guide\", property = \"isGuide\"),\n @Result(column = \"reward\", property = \"reward\")\n })\n WeChatInfoEntity selectWecahtUserByID(@Param(\"ID\")String ID);\n}",
"public static void main(String[] args) {\nSession session=new Configuration().configure().buildSessionFactory().openSession();\r\n\r\n Student std=new Student();\r\n std.setName(\"nikhil\");\r\n session.save(std);\r\n session.beginTransaction().commit();\r\n System.out.println(\"success\");\r\n \r\n\t}",
"public interface IUserRoleDao extends ICommonDao<Integer,UserRole> {\n public static final String REPOSITORY_NAME=\"cn.kanyun.cpa.dao.system.impl.UserRoleDaoImpl\";\n\n Set<UserRole> findRoleByUserId(Integer userId);\n}"
] | [
"0.74819404",
"0.7068522",
"0.7028377",
"0.6655419",
"0.6102199",
"0.6022709",
"0.6008246",
"0.5886724",
"0.5865798",
"0.569887",
"0.56730896",
"0.56685174",
"0.5636201",
"0.5573706",
"0.5549966",
"0.55416775",
"0.554062",
"0.5531431",
"0.5530673",
"0.5486471",
"0.5477317",
"0.5454258",
"0.5388077",
"0.53663176",
"0.5360066",
"0.5353552",
"0.53036314",
"0.52896154",
"0.52847797",
"0.5241324",
"0.5230729",
"0.5223422",
"0.5191715",
"0.5185573",
"0.5151577",
"0.5148063",
"0.514461",
"0.5132874",
"0.5131001",
"0.5126301",
"0.51111364",
"0.5109204",
"0.5108076",
"0.5107227",
"0.5106566",
"0.50944906",
"0.50795776",
"0.5079532",
"0.5058437",
"0.5045718",
"0.5044081",
"0.49925312",
"0.4973898",
"0.4957632",
"0.49552804",
"0.49433568",
"0.4926988",
"0.49222365",
"0.49172717",
"0.49159932",
"0.49001417",
"0.48922807",
"0.48915666",
"0.48865798",
"0.4883742",
"0.48772866",
"0.48763514",
"0.4870027",
"0.4858171",
"0.48580104",
"0.48531133",
"0.48490232",
"0.4845973",
"0.48415",
"0.48401538",
"0.48377272",
"0.48296955",
"0.48255238",
"0.48185852",
"0.48119393",
"0.48075786",
"0.48056453",
"0.47998005",
"0.4799024",
"0.4797882",
"0.4789136",
"0.47754472",
"0.47752133",
"0.47720218",
"0.4762241",
"0.47599098",
"0.4732717",
"0.4726988",
"0.4722211",
"0.47210208",
"0.47178578",
"0.4716901",
"0.4715429",
"0.47090244",
"0.4708033"
] | 0.66007364 | 4 |
Writes changes to underlying player. | protected void apply() {
player.setAutoRoll(autoroll);
player.setMission(mission);
player.setState(state);
player.getCards().setArtillery(cards.getArtillery());
player.getCards().setCavalry(cards.getCavalry());
player.getCards().setInfantry(cards.getInfantry());
player.getCards().setJokers(cards.getJokers());
Member member = player.getMember();
if(score == Score.WIN) {
member.setScore(member.getScore() + player.getGame().getPlayers().size() - 1);
member.setWins(member.getWins() + 1);
} else if(score == Score.LOSS) {
member.setScore(member.getScore() - 1);
member.setLosses(member.getLosses() + 1);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void savePlayerData(OutputStream os) {\n\t\t\n\t}",
"@Override\n\tpublic void savePlayerData(OutputStream os) {\n\n\t}",
"@Override\n\tpublic void savePlayerData(OutputStream arg0) {\n\n\t}",
"@Override\n\tpublic void savePlayerData(OutputStream arg0)\n\t{\n\n\t}",
"public void saveCurrentPlayer() {\n\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/current_player\");\n\t\tBashCmdUtil.bashCmdNoOutput(String.format(\"echo \\\"%s\\\" >> data/current_player\",_currentPlayer));\n\t}",
"public void save()\n\t{\n\t\tif(entity != null)\n\t\t\t((SaveHandler)DimensionManager.getWorld(0).getSaveHandler()).writePlayerData(entity);\n\t}",
"void updatePlayer(Player player);",
"public Player updatePlayer(Player player);",
"private void savePlayers() {\r\n this.passive_players.stream()\r\n .filter(E -> E.isChanged())\r\n .forEach(e -> {\r\n e.save();\r\n });\r\n }",
"@Override\n public void onWrite() {\n onChannelPreWrite();\n }",
"void playerPositionChanged(Player player);",
"@Override\r\n\tpublic void SavePlayerData() {\r\n\r\n Player player = (Player)Player.getPlayerInstance();\r\n\t\t\r\n\t\tString file = \"PlayerInfo.txt\";\r\n\t\tString playerlifepoint = \"\"+player.getLifePoints();\r\n\t\tString playerArmore = player.getArmorDescription();\r\n\t\ttry{\r\n\t\t\tPrintWriter print = new PrintWriter(file);\r\n\t\t\tprint.println(playerlifepoint);\r\n\t\t\tprint.println(playerArmore);\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"public void update(Player player) {\n\t\t\n\t}",
"static void savePlayerData() throws IOException{\n\t\t/*\n\t\t\tFile playerData = new File(\"Players/\" + Player.getName() +\".txt\");\n\t\t\tif (!playerData.exists()) {\n\t\t\t\tplayerData.createNewFile(); \n\t\t\t}\n\t\tObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(\"Players/\" + Player.getName() +\".txt\"));\n\t\toos.writeObject(Player.class);\n\t\toos.close();\n\t\t*/\n\t\t\n\t\tString[] player = Player.getInfoAsStringArray();\n\t\tjava.io.File playerData = new java.io.File(\"Players/\" + player[0] +\".txt\");\n\t\tif (!playerData.exists()){\n\t\t\tplayerData.createNewFile();\n\t\t}\n\t\tjava.io.PrintWriter writer = new java.io.PrintWriter(playerData);\n\t\t//[0] Name, \n\t\twriter.println(\"# Name\");\n\t\twriter.println(player[0]);\n\t\t//[1] Level, \n\t\twriter.println(\"# Level\");\n\t\twriter.println(player[1]);\n\t\t//[2] getRoleAsInt(),\n\t\twriter.println(\"# Role/Class\");\n\t\twriter.println(player[2]);\n\t\t//[3] exp,\n\t\twriter.println(\"# Exp\");\n\t\twriter.println(player[3]);\n\t\t//[4] nextLevelAt,\n\t\twriter.println(\"# Exp Required for Next Level Up\");\n\t\twriter.println(player[4]);\n\t\t//[5] health,\n\t\twriter.println(\"# Current Health\");\n\t\twriter.println(player[5]);\n\t\t//[6] maxHealth,\n\t\twriter.println(\"# Max Health\");\n\t\twriter.println(player[6]);\n\t\t//[7] intelligence,\n\t\twriter.println(\"# Intelligence\");\n\t\twriter.println(player[7]);\n\t\t//[8] dexterity,\n\t\twriter.println(\"# Dexterity\");\n\t\twriter.println(player[8]);\n\t\t//[9] strength,\n\t\twriter.println(\"# Strength\");\n\t\twriter.println(player[9]);\n\t\t//[10] speed,\n\t\twriter.println(\"# Speed\");\n\t\twriter.println(player[10]);\n\t\t//[11] protection,\n\t\twriter.println(\"# Protection\");\n\t\twriter.println(player[11]);\n\t\t//[12] accuracy,\n\t\twriter.println(\"# Accuracy\");\n\t\twriter.println(player[12]);\n\t\t//[13] dodge,\n\t\twriter.println(\"# Dodge\");\n\t\twriter.println(player[13]);\n\t\t//[14] weaponCode,\n\t\twriter.println(\"# Weapon's Code\");\n\t\twriter.println(player[14]);\n\t\t//[15] armorCode,\n\t\twriter.println(\"# Armor's Code\");\n\t\twriter.println(player[15]);\n\t\t//[16] Gold,\n\t\twriter.println(\"# Gold\");\n\t\twriter.println(player[16]);\n\t\twriter.close();\n\t\t\n\t}",
"@Override\n public void writeNewPlayer(Player player){\n if (gameCodeRef == null){\n throw new IllegalStateException(\"GameRoom is not set\");\n }\n DatabaseReference currentRef = database.getReference(gameCodeRef);\n currentRef.child(\"Players\").child(player.getUsername()).setValue(player.getUsername());\n updateNrPlayerValues(\"NumberOfPlayers\");\n }",
"void notifyPlayerChanged(PlayerNumber newPlayer);",
"abstract void updatePlayer();",
"public static void savePlayer(Player player){\n if (player != null){\n try {\n mapper.writeValue(new File(\"Data\\\\PlayerData\\\\\" + getFileName(player) + \".json\"), player);\n } catch ( Exception e ) {\n e.printStackTrace();\n }\n }\n }",
"@Override\n\tpublic void updatePlayer(Joueur joueur) {\n\t\t\n\t}",
"@Override\r\n\tpublic void write() {\n\t\t\r\n\t}",
"@Override\n\tpublic void setPlayer(Player player) {\n\n\t}",
"@Override\r\n\tpublic void SavePlayerName() {\r\n\t\tPlayer player = (Player)Player.getPlayerInstance();\r\n\t\t\r\n\t\tString file = \"PlayerName.txt\";\r\n\t\tString playerName = player.getName();\r\n\t\ttry{\r\n\t\t\tPrintWriter print = new PrintWriter(file);\r\n\t\t\tprint.println(playerName);\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"public static void writePlayerToFile(Player p)\r\n {\r\n try{\r\n //Create an \"players.txt\" file with an ObjectOutputStream\r\n FileOutputStream fileOut = new FileOutputStream(\"players.txt\", true);\r\n ObjectOutputStream objectOut = new ObjectOutputStream(fileOut); \r\n\r\n //Write the Player objetct to the file \r\n objectOut.writeObject(p);\r\n //Close file\r\n objectOut.close();\r\n }catch (IOException ioException) \r\n { \r\n //Output error message \r\n System.out.println(\"Error: The file cannot be created\"); \r\n }//end try\r\n }",
"public void updatePlayer(Player player) {\n\t\t// update the flag GO TO JAIL in Player class\n\t}",
"@Override\n\tpublic void attiva(Player player) {\n\n\t}",
"@Override\n public void write() {\n\n }",
"void otherPlayerMoved()\r\n {\r\n socketWriter.println(\"OPPONENT_MOVED ,\" + getCurrentBoard());\r\n }",
"public void savePlayer(String username, String password, String path, Boolean changed) throws IOException {\r\n ctrlDomain.savePlayer(username, password, path, changed);\r\n }",
"public void setPlayer(Player player) {\r\n this.player = player;\r\n }",
"public void setPlayer(Player player) {\n this.player = player;\n }",
"@Override\r\n public void updateMixer() {\n playerPosition = mixer.getGlobalCoordinates();\r\n playerOrientation = mixer.getGlobalOrientation();\r\n }",
"public void setPlayer(Player myPlayer){\n battlePlayer=myPlayer;\n }",
"public void save()\n\t{\n\t\tfor(PlayerData pd : dataMap.values())\n\t\t\tpd.save();\n\t}",
"public void setPlayer(Player player) {\n this.player = player;\n }",
"public void setPlayer(Player player) {\n this.currentPlayer = player;\n }",
"@Override\r\n public void updateMixer() {\n playerPosition = mixer.getGlobalCoordinates();\r\n }",
"@Override\n public void playerAttributeChange() {\n\n Logger.info(\"HUD Presenter: playerAttributeChange\");\n view.setLives(String.valueOf(player.getLives()));\n view.setMoney(String.valueOf(player.getMoney()));\n setWaveCount();\n }",
"public abstract void changePlayerAt(ShortPoint2D pos, Player player);",
"void writeCurrentBuffer();",
"void sendPacketToPlayer(Player player, Object packet);",
"private synchronized void sendAdvance(){\r\n\t\t\tfor(PrintWriter p : players){\r\n\t\t\t\tif(p != null){\r\n\t\t\t\t\tp.println(\"5\");\r\n\t\t\t\t\tp.println(Integer.toString(x));\r\n\t\t\t\t\tp.println(Integer.toString(y));\r\n\t\t\t\t\tp.flush();\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\t\r\n\t\t\t}\t\r\n\t\t}",
"@Override\n protected void sendUpdatedStateTo(GamePlayer p) {\n PigGameState copy = new PigGameState(pgs);\n p.sendInfo(copy);\n }",
"@Serial\n\tprivate Object writeReplace() {\n\t\treturn new SerialProxy(SerialProxy.TRACK, this);\n\t}",
"@Override\r\n\tpublic void set(final Player t) {\n\r\n\t}",
"void sendPacket(Player player, Object packet);",
"public void setPlayerPosition() throws IOException\r\n\t{\r\n\t\tboolean flag = false;\r\n\t\t\r\n\t\tint X = 0;\r\n\t\tint Y = 0;\r\n\t\t\r\n\t\twhile(flag == false)\r\n\t\t{\r\n\t\t\toStream.writeInt(X);\r\n\t\t\toStream.writeInt(Y);\r\n\t\t\tflag = iStream.readBoolean();\r\n\t\t\tX++;\r\n\t\t\tY++;\r\n\t\t}\r\n\t\tboard.makePlayer(X-1, Y-1);\r\n\t}",
"void sendUpdatePlayer(int x, int y, int color, byte tool);",
"public void ObserverIO() {\r\n\t\twhile(running && !gameover) {\r\n\t\t\tif (engine.begin) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tToClient.writeBoolean(running);\r\n\t\t\t\t\tToClient.writeBoolean(engine.gameOver);\r\n\t\t\t\t\t// Exit the loop if game over\r\n\t\t\t\t\tif(engine.gameOver)\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tturnDelta = engine.getActiveTurn();\r\n\t\t\t\t\tToClient.writeBoolean(turnDelta != recordedTurn);\r\n\t\t\t\t\tif (turnDelta != recordedTurn) {\r\n\t\t\t\t\t\tToClient.writeUTF(engine.OutputData());\r\n\t\t\t\t\t\trecordedTurn = turnDelta;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tyield();\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\tSystem.out.println(\"Thread Connection lost\");\r\n\t\t\t\t\tinterrupt();\r\n\t\t\t\t} \r\n\t\t\t} else {\r\n\t\t\t\tyield();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(engine.gameOver) {\r\n\t\t\ttry {\r\n\t\t\t\tToClient.writeUTF(engine.getGameOverMessage(TYPE));\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}\r\n\t}",
"public void enterPlayerView(){\n\t\tplayerSeen=true;\r\n\t\tplayerMapped=true;\r\n\t}",
"@Override\r\n\tpublic void saveReplay(GameEngine engine, int playerID, CustomProperties prop) {\r\n\t\tsaveOtherSetting(engine, owner.replayProp);\r\n\t\tsavePreset(engine, owner.replayProp, -1 - playerID, \"spf\");\r\n\r\n\t\tif(useMap[playerID] && (fldBackup[playerID] != null)) {\r\n\t\t\tsaveMap(fldBackup[playerID], owner.replayProp, playerID);\r\n\t\t}\r\n\r\n\t\towner.replayProp.setProperty(\"avalanchevs.version\", version);\r\n\t}",
"public void generateAroundPlayer() {\n try {\n DataOutputStream dataOutputStream = new DataOutputStream(SixEngineClient.client.socket.getOutputStream());\n\n dataOutputStream.writeByte(5);\n dataOutputStream.writeInt(getChunkX());\n dataOutputStream.writeInt(getChunkY());\n dataOutputStream.writeInt(getChunkZ());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void writeToClient() throws IOException {\n\t\tclientBuffer.writeTo(clientChannel);\n\t\tif (clientBuffer.isReadyToWrite()) {\n\t\t\tregister();\n\t\t}\n\t}",
"public void PlayerIO() {\r\n\t\tboolean PLAYERTURN = false;\r\n\t\twhile(running && !engine.gameOver && !interrupted()) {\r\n\t\t\tif (engine.begin) {\r\n\t\t\t\thasInput = false;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tToClient.writeBoolean(running);\r\n\t\t\t\t\tengine.GameOverCheck();\r\n\t\t\t\t\tToClient.writeBoolean(engine.gameOver);\r\n\t\t\t\t\t// Exit the loop if game over\r\n\t\t\t\t\tif(engine.gameOver)\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tturnDelta = engine.getActiveTurn();\r\n\t\t\t\t\tisPlayersTurn = turnDelta == PLAYERTURN;\r\n\t\t\t\t\tif (turnDelta != recordedTurn) {\r\n\t\t\t\t\t\t// Set hasInput flag\r\n\t\t\t\t\t\thasInput = true;\r\n\t\t\t\t\t\trecordedTurn = turnDelta;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tToClient.writeBoolean(hasInput);\r\n\t\t\t\t\tToClient.writeBoolean(isPlayersTurn);\r\n\t\t\t\t\t// write the results of opponents turns\r\n\t\t\t\t\tif (hasInput) {\r\n\t\t\t\t\t\tToClient.writeUTF(engine.OutputData());\r\n\t\t\t\t\t} else if (isPlayersTurn) {\r\n\t\t\t\t\t\tengine.HandlePlayerCommand(getValidMove());\r\n\t\t\t\t\t\t// After player finishes his turn the spells will cycle\r\n\t\t\t\t\t\tengine.RunSpellCycles();\r\n\t\t\t\t\t\tengine.EndTurn();\r\n\t\t\t\t\t\t// TODO fix to be single turn system\r\n\t\t\t\t\t\tengine.GameOverCheck();\r\n\t\t\t\t\t\tToClient.writeBoolean(engine.gameOver);\r\n\t\t\t\t\t\tif(engine.gameOver)\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tToClient.writeUTF(engine.OutputData());\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tyield();\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// Push Kill signal\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\tSystem.out.println(\"Socket is dead. Triggering kill switch\");\r\n\t\t\t\t\tengine.KillSwitchHost();\r\n\t\t\t\t\tinterrupt();\r\n\t\t\t\t} \r\n\t\t\t} else {\r\n\t\t\t\tyield();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(engine.gameOver) {\r\n\t\t\ttry {\r\n\t\t\t\tToClient.writeUTF(engine.OutputData());\r\n\t\t\t\tToClient.writeUTF(engine.getGameOverMessage(TYPE));\r\n\t\t\t\tengine.PlayerConnected = false;\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}\r\n\t}",
"static void writeRanking(ArrayList<PlayerInfo> player){\n\t\ttry{\r\n\t\t\tFileOutputStream fos = new FileOutputStream(\"ranking.dat\");\r\n\t\t\tObjectOutputStream oos = new ObjectOutputStream(fos);\r\n\t\t\toos.writeObject(player);\r\n\t\t\toos.flush();\r\n\t\t\toos.close();\r\n\t\t\tfos.close();\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t//return player;\r\n\t}",
"public void setPlayer(Player player) {\n\t\tthis.player = player;\r\n\t}",
"protected void emit(Player p, String message) {\n }",
"public void sendPlayerData() throws JSONException {\n\t\tJSONObject json = new JSONObject();\n\t\tJSONObject json2 = new JSONObject();\n\t\tjson2.put(\"Name\", playerModel.getPlayerName());\n\n\t\tswitch (playerModel.getPlayerColor()) {\n\n\t\tcase PL_BLUE:\n\t\t\tjson2.put(\"Farbe\", \"Blau\");\n\t\t\tbreak;\n\t\tcase PL_RED:\n\t\t\tjson2.put(\"Farbe\", \"Rot\");\n\t\t\tbreak;\n\t\tcase PL_WHITE:\n\t\t\tjson2.put(\"Farbe\", \"Weiß\");\n\t\t\tbreak;\n\t\tcase PL_YELLOW:\n\t\t\tjson2.put(\"Farbe\", \"Orange\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\n\t\t}\n\t\tjson.put(\"Spieler\", json2);\n\t\tlog.info(playerModel + \" verschickt\");\n\t\tcontroller.getClient().send(json);\n\t}",
"public void setPlayer(Player newPlayer) {\n roomPlayer = newPlayer;\n }",
"public void saveAllPlayers() {\n for (Player player : bukkitService.getOnlinePlayers()) {\n savePlayer(player);\n }\n }",
"public void save() {\n\t\tthis.setState(Constants.CWorld.STATE_SAVING);\n\t\tthis.getWorld().saveAll();\n\t\tthis.setState(Constants.CWorld.STATE_ONLINE);\n\t}",
"void write();",
"public void writeToServer() throws IOException {\n\t\tserverBuffer.writeTo(serverChannel);\n\t\tif (serverBuffer.isReadyToWrite()) {\n\t\t\tregister();\n\t\t}\n\t}",
"@Override\n protected void sendUpdatedStateTo(GamePlayer p) {\n //makes sure player exists\n if(p == null){\n return;\n }\n // if there is no state to send, ignore\n if(state == null){\n return;\n }\n //creates a copy of the official state and sends it to the desired player\n StrategoGameState stateForPlayer = new StrategoGameState(state);\n p.sendInfo((stateForPlayer));\n }",
"public void setPlayer(Player player) {\n\t\tthis.player = player;\n\t}",
"public static void writePlayerToFile(ArrayList<Player> players)\r\n {\r\n clearFile(new File(\"players.txt\"));\r\n\r\n for(Player p : players)\r\n {\r\n writePlayerToFile(p);\r\n }//end for\r\n }",
"public void printPlayerStat(Player player);",
"public void saveGame(){\n \tsaveOriginator.writeMap(this.map, this.getObjectives(), this.gameState);\n \tsaveGame.saveGame(saveOriginator);\n }",
"public void setPlayer(Player _player) { // beallit egy ezredest az adott mapElementre, ha az rajta van\n player = _player;\n }",
"public void setPlayer(Player p) {\n\t\tplayer = p;\n\t}",
"public void updateWin(PlayerInterface p) {\n notifyWin(p);\n }",
"private void sendData() {\n final ByteBuf data = Unpooled.buffer();\n data.writeShort(input);\n data.writeShort(output);\n getCasing().sendData(getFace(), data, DATA_TYPE_UPDATE);\n }",
"public void writePlayerFile(String fileName)\r\n\t{\r\n\t\tPrintWriter fileWrite;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tfileWrite = new PrintWriter(new FileOutputStream(fileName));\r\n\t\t\tfileWrite.println(\"Name \" + name);\r\n\t\t\tfileWrite.println(\"HP \" + hp);\r\n\t\t\tfileWrite.println(\"Strength \" + strength);\r\n\t\t\tfileWrite.println(\"Speed \" + speed);\r\n\t\t\tfileWrite.println(\"Weapon \" + weapon);\r\n\t\t\tfileWrite.close();\r\n\t\t}\r\n\t\tcatch(IOException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}",
"public void setOwner(Player player) {\n owner = player;\n }",
"@Override\n public void onPause() {\n super.onPause();\n ObjectOutput out = null;\n String fileName = \"savedGame\";\n File saved = new File(getFilesDir(), fileName);\n\n try {\n out = new ObjectOutputStream(new FileOutputStream(saved, false));\n out.writeObject(player);\n out.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void updatePlayerPanel()\n {\n playerInfoPanel.updateLabel();\n }",
"private void pause() { player.pause();}",
"public void onSaveListen() {\n _gamesList.get(_gamePos).getPlayers().add(playerName);\n // Increment the number of players that have joined the game\n _gamesList.get(_gamePos).setNumPlayers(_gamesList.get(_gamePos).getNumPlayers() + 1);\n\n TextView playersBlock = (TextView) findViewById(R.id.playersBlock);\n playersBlock.setText(\"\");\n List<String> players = _gamesList.get(_gamePos).getPlayers();\n for(int i = 0; i < players.size(); i++) {\n Log.d(\"GamePlayerSize\", Integer.toString(_gamesList.get(_gamePos).getPlayers().size()));\n if (i < players.size() - 1) {\n playersBlock.append(players.get(i) + \", \");\n }\n else {\n // Don't put a comma after the last one\n playersBlock.append(players.get(i));\n }\n }\n\n // Update the shared preferences with the edited game\n SharedPreferences gamesPref = this.getSharedPreferences(GAMES_FILE, MODE_PRIVATE);\n Gson gson = new Gson();\n\n SharedPreferences.Editor prefsEditor = gamesPref.edit();\n\n // Convert the games list into a json string\n String json = gson.toJson(_gamesList);\n Log.d(\"MainActivity\", json);\n\n // Update the _gamesMasterList with the modified _game\n prefsEditor.putString(GAME_KEY, json);\n prefsEditor.commit();\n\n Context context = getApplicationContext();\n CharSequence text = \"You have joined the game!\";\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }",
"public void setPlayer(Player player) {\n\t\t\tthis.player = player;\n\t\t}",
"@Override\n public void landedOn(Player player) {}",
"public void flush() {\n writer.flush();\n }",
"public void update(){\n\t\tupdatePlayerPosition();\n\t\thandleCollisions();\n\t}",
"public void setActivePlayer()\n {\n activePlayer = !activePlayer;\n }",
"@Override\r\n\tpublic void SetPlayerInfo(Context _in_context, String _in_data) {\n\t\tTypeSDKLogger.e(\"SetPlayerInfo\");\r\n\t\tSendInfo(_in_context, _in_data);\r\n\t}",
"public void setCurrentPlayer(Player P){\n this.currentPlayer = P;\n }",
"@Override\r\n\tpublic void SetPlayerInfo(Context _in_context, String _in_data) {\n\t\tTypeSDKLogger.e( \"SetPlayerInfo\");\r\n\t\tSendInfo(_in_context, _in_data);\r\n\t}",
"public void playerWon()\r\n {\r\n \r\n }",
"@Override\n\tpublic void playerJoined(String playerID) {\n\t}",
"private void SetCurrentPlayer() throws IOException\n {\n if( mTeamsComboBox.getSelectedItem() != null )\n {\n String team = mTeamsComboBox.getSelectedItem().toString();\n String position = mPositionComboBox.getSelectedItem().toString();\n String playerData = GetPlayerString(team, position);\n if( playerData != null )\n SetPlayerData(playerData);\n }\n }",
"public void writeChannel() {\n try {\n java.io.FileWriter chWriter = new java.io.FileWriter(chFile);\n chWriter.write(chStored);\n chWriter.close();\n JTVProg.logPrint(this, 3, \"файл канала [\" + this.chName + \"] успешно сохранен\");\n } catch (IOException ex) {\n JTVProg.logPrint(this, 0, \"ошибка записи файла канала [\" + this.chName + \"]\");\n } finally {\n JTVProg.configer.markWrited(this.chFillOrder - 1);\n }\n }",
"private void wins(Player player){\n int win = 1;\n player.setWins(win);\n }",
"private void sendUpdates() {\n\n List<PeerUpdateMessage.Part> parts = new ArrayList<PeerUpdateMessage.Part>();\n for (ActivePlayer peer : player.getSavedNeighbors()) {\n PeerUpdateMessage.Part part = new PeerUpdateMessage.Part(\n peer.character.id, peer.character.getExtrapolatedMotionState());\n parts.add(part);\n }\n\n if (!parts.isEmpty()) {\n PeerUpdateMessage msg = new PeerUpdateMessage(parts);\n new ToClientMessageSink(player.session).sendWithoutConfirmation(msg);\n }\n }",
"public void update() {\n Dashboard.sendToDash(\"/update Servo \" + id + \" \" + servo.getPosition());\n }",
"public void setPlayer(String player) {\r\n this.player = player;\r\n }",
"private void doWrite() throws IOException {\n\t\t\tbb.flip();\n\t\t\tsc.write(bb);\n\t\t\tbb.compact();\n\n\t\t\tupdateInterestOps();\n\t\t}",
"public void write() {\n\t\tint xDist, yDist;\r\n\t\ttry {\r\n\t\t\tif (Pipes.getPipes().get(0).getX() - b.getX() < 0) { // check if pipes are behind bird\r\n\t\t\t\txDist = Pipes.getPipes().get(1).getX() - b.getX();\r\n\t\t\t\tyDist = Pipes.getPipes().get(1).getY() - b.getY() + Pipes.height;\r\n\t\t\t} else {\r\n\t\t\t\txDist = Pipes.getPipes().get(0).getX() - b.getX();\r\n\t\t\t\tyDist = Pipes.getPipes().get(0).getY() - b.getY() + Pipes.height;\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\txDist = -6969;\r\n\t\t\tyDist = -6969;\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(\"Pipe out of bounds\");\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tFile file = new File(\"DATA.txt\");\r\n\t\t\tFileWriter fr = new FileWriter(file, true);\r\n\t\t\tfr.write(xDist + \",\" + yDist + \",\" + b.getYVel() + \",\" + didJump);\r\n\t\t\tfr.write(System.getProperty(\"line.separator\")); // makes a new line\r\n\t\t\tfr.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Wtrie file error\");\r\n\t\t}\r\n\t}",
"public void SerialWriteFile() {\r\n\r\n PrintWriter pwrite = null;\r\n File fileObject = new File(getName());\r\n QuizPlayer q = new QuizPlayer(getName(), getNickname(), getTotalScore());\r\n\r\n try {\r\n ObjectOutputStream outputStream =\r\n new ObjectOutputStream(new FileOutputStream(fileObject));\r\n\r\n outputStream.writeObject(q); //Writes the object to the serialized file.\r\n outputStream.close();\r\n\r\n\r\n } catch (IOException e) {\r\n System.out.println(\"Problem with file output.\");\r\n }\r\n\r\n }",
"public void sendPlayerName(String s) {\n try {\n dOut.writeUTF(s);\n dOut.flush();\n } catch (IOException e) {\n System.out.println(\"Could not send player name\");\n e.printStackTrace();\n }\n }",
"void save(int Wave, Set<UUID> players);",
"private void Win(Player player){\n player.setBalance(player.getBalance() + player.getWager() * 1.5);\n System.out.println();\n System.out.println(player.getName() + \" wins!\");\n System.out.println(player.getName() + \"'s\" + \" balance is now \" + player.getBalance());\n }",
"void registerPlayer() throws IOException;",
"@Override\n public void update() {\n updateBuffs();\n }"
] | [
"0.6944478",
"0.69404244",
"0.68928134",
"0.6853752",
"0.64095455",
"0.63631105",
"0.6331227",
"0.6244082",
"0.6210277",
"0.6164809",
"0.61017627",
"0.608608",
"0.5982316",
"0.59446573",
"0.5943041",
"0.5941335",
"0.593781",
"0.59358317",
"0.59076536",
"0.5896921",
"0.58934164",
"0.587048",
"0.5838127",
"0.5829129",
"0.5819071",
"0.5805175",
"0.5762231",
"0.5759378",
"0.57329184",
"0.5721067",
"0.5714028",
"0.5709895",
"0.57020813",
"0.56818795",
"0.56767154",
"0.566739",
"0.5651964",
"0.5650955",
"0.56447864",
"0.5634391",
"0.56309754",
"0.5618076",
"0.56143767",
"0.560802",
"0.56019825",
"0.5599263",
"0.5582657",
"0.5561756",
"0.5548474",
"0.5541277",
"0.5516965",
"0.5516491",
"0.5509559",
"0.55007076",
"0.5486026",
"0.54821116",
"0.54698163",
"0.54217744",
"0.54148364",
"0.54038084",
"0.54032415",
"0.53947663",
"0.53937805",
"0.5387477",
"0.5373005",
"0.53723717",
"0.5370769",
"0.53667444",
"0.5366013",
"0.5352761",
"0.5352194",
"0.53513396",
"0.5333419",
"0.53314227",
"0.5328267",
"0.5322001",
"0.5316953",
"0.53157675",
"0.530778",
"0.5303647",
"0.53031766",
"0.5298818",
"0.52973247",
"0.52956605",
"0.52884644",
"0.5287793",
"0.52752066",
"0.5274256",
"0.52685684",
"0.52642196",
"0.5263732",
"0.52559584",
"0.52426934",
"0.52403814",
"0.52337533",
"0.52263296",
"0.52253217",
"0.5224723",
"0.5221972",
"0.521494",
"0.52090687"
] | 0.0 | -1 |
called by internal mechanisms, do not call yourself. | public void __setDaoSession(DaoSession daoSession) {
this.daoSession = daoSession;
myDao = daoSession != null ? daoSession.getBMessageDao() : null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final void mo51373a() {\n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"protected void onFirstUse() {}",
"private stendhal() {\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tpublic void grabar() {\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 protected void prot() {\n }",
"@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\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"@Override\n protected void init() {\n }",
"@SuppressWarnings(\"unused\")\n private void _read() {\n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"private void m50366E() {\n }",
"public void smell() {\n\t\t\n\t}",
"public static void SelfCallForLoading() {\n\t}",
"@Override\n\t\t\t\t\t\t\tpublic void onIOException(IOException e, Object state) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n\t\t\tpublic void run() {\n\n\t\t\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\r\n\tpublic void dormir() {\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\n\tprotected void postRun() {\n\n\t}",
"public final void mo91715d() {\n }",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\t\tprotected void reset()\n\t\t{\n\t\t}",
"@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}",
"@Override\r\n\tprotected void processInit() {\n\t\t\r\n\t}",
"@Override\n public int retroceder() {\n return 0;\n }",
"@Override\r\n\tprotected void processInit() {\n\r\n\t}",
"private void initialize() {\n\t\t\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n public void init() {\n }",
"@Override\r\n\tpublic void init() {}",
"private void init() {\n\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n\tpublic void postInit() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void run() {\r\n\t\t// overwrite in a subclass.\r\n\t}",
"protected void additionalProcessing() {\n\t}",
"private void assignment() {\n\n\t\t\t}",
"private final void i() {\n }",
"protected void initialize() {}",
"protected void initialize() {}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"public void method_4270() {}",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n void init() {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n public void init() {\n\n }",
"@Override\r\n\t\t\t\tpublic void autInitProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void autInitProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}",
"@Override\r\n\tprotected void processFinish() {\n\r\n\t}",
"@Override\r\n\tprotected void processFinish() {\n\r\n\t}",
"@Override\r\n\tprotected void processFinish() {\n\r\n\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\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}",
"@Override\n public Object preProcess() {\n return null;\n }",
"@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t}",
"@Override\n public void onCancelled(CancelledException arg0) {\n }",
"@Override\n public void onCancelled(CancelledException arg0) {\n }",
"@Override\n\tpublic void call() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\r\n\tpublic final void init() {\r\n\r\n\t}",
"@Override\n public void init() {}",
"@Override\r\n\tpublic void runn() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"protected boolean func_70814_o() { return true; }",
"@Override\r\n\t\t\tpublic void reset() {\n\t\t\t\t\r\n\t\t\t}"
] | [
"0.6371722",
"0.6260732",
"0.6228073",
"0.616492",
"0.6125714",
"0.6042472",
"0.5979736",
"0.5976913",
"0.5956299",
"0.5942653",
"0.5929282",
"0.5929282",
"0.5929282",
"0.5929282",
"0.5929282",
"0.5929282",
"0.590189",
"0.5893604",
"0.5893604",
"0.58852583",
"0.58852583",
"0.58635277",
"0.5862591",
"0.58231324",
"0.5817122",
"0.5810591",
"0.57913315",
"0.5780044",
"0.5756838",
"0.57432634",
"0.57432634",
"0.5742655",
"0.57168347",
"0.5712824",
"0.5711848",
"0.5705701",
"0.57002705",
"0.57002705",
"0.5696676",
"0.56963664",
"0.56953907",
"0.5685475",
"0.56828934",
"0.5681618",
"0.5681618",
"0.567689",
"0.56753176",
"0.56713015",
"0.56713015",
"0.5670039",
"0.5664569",
"0.56607634",
"0.5648674",
"0.56479615",
"0.56372625",
"0.56206506",
"0.56196487",
"0.5611562",
"0.56115466",
"0.56115437",
"0.56107473",
"0.5609358",
"0.5605373",
"0.5605222",
"0.56039697",
"0.56038797",
"0.56038797",
"0.56032103",
"0.55948544",
"0.55919206",
"0.5588513",
"0.55879956",
"0.55879956",
"0.55874985",
"0.5587093",
"0.5587093",
"0.55782324",
"0.55782324",
"0.55782324",
"0.55770504",
"0.5576767",
"0.5576767",
"0.5576767",
"0.5576767",
"0.5576767",
"0.5575634",
"0.5571351",
"0.5571351",
"0.5563423",
"0.5563423",
"0.55601794",
"0.5559437",
"0.5543968",
"0.55424577",
"0.5542376",
"0.55416346",
"0.554032",
"0.5539361",
"0.5539361",
"0.55289656",
"0.5528763"
] | 0.0 | -1 |
Toone relationship, resolved on first access. | public BUser getBUserSender() {
Long __key = this.Sender;
if (BUserSender__resolvedKey == null || !BUserSender__resolvedKey.equals(__key)) {
if (daoSession == null) {
throw new DaoException("Entity is detached from DAO context");
}
BUserDao targetDao = daoSession.getBUserDao();
BUser BUserSenderNew = targetDao.load(__key);
synchronized (this) {
BUserSender = BUserSenderNew;
BUserSender__resolvedKey = __key;
}
}
return BUserSender;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void oneToOneNoBind() {\n\t\tSystem.out.println(\"============oneToOneNoBind=========\");\n\t\tUser u = new User();\n\t\tAddress a = new Address();\n\t\tList<User> users = Dao.queryForEntityList(User.class, select(), u.all(), \",\", a.all(), from(), u.table(), \",\",\n\t\t\t\ta.table(), \" where \", oneToOne(), u.ID(), \"=\", a.UID(), bind());\n\t\tfor (User user : users) {\n\t\t\tSystem.out.println(user.getUserName());\n\t\t\tAddress address = user.getChildNode(Address.class);\n\t\t\tSystem.out.println(\"\\t\" + address.getAddressName());\n\t\t\tUser user2 = address.getParentNode(User.class);\n\t\t\tAssert.assertTrue(user == user2);\n\t\t}\n\t}",
"@Override\n\t\tpublic Relationship getSingleRelationship(RelationshipType type, Direction dir) {\n\t\t\treturn null;\n\t\t}",
"@Override\n\tprotected Model fetchOne(int id) {\n\t\treturn null;\n\t}",
"@Override\n\t\tpublic Relationship createRelationshipTo(Node otherNode, RelationshipType type) {\n\t\t\treturn null;\n\t\t}",
"private void checkMappedByOneToOne(DeployBeanPropertyAssocOne<?> prop) {\n String mappedBy = prop.getMappedBy();\n // get the mappedBy property\n DeployBeanDescriptor<?> targetDesc = targetDescriptor(prop);\n DeployBeanPropertyAssocOne<?> mappedAssocOne = mappedOneToOne(prop, mappedBy, targetDesc);\n DeployTableJoin tableJoin = prop.getTableJoin();\n if (!tableJoin.hasJoinColumns()) {\n // define Join as the inverse of the mappedBy property\n DeployTableJoin otherTableJoin = mappedAssocOne.getTableJoin();\n otherTableJoin.copyWithoutType(tableJoin, true, tableJoin.getTable());\n }\n\n if (mappedAssocOne.isPrimaryKeyJoin()) {\n // bi-directional PrimaryKeyJoin ...\n mappedAssocOne.setPrimaryKeyJoin(false);\n prop.setPrimaryKeyExport();\n addPrimaryKeyJoin(prop);\n }\n }",
"Relationship createRelationship();",
"@Override\n\t\tpublic boolean hasRelationship() {\n\t\t\treturn false;\n\t\t}",
"public T caseRelationshipDefinition(RelationshipDefinition object) {\n\t\treturn null;\n\t}",
"@OneToOne(mappedBy = \"persona\")\n\tpublic Usuario getUsuario() {\n\t\treturn usuario;\n\t}",
"@Test\n\tpublic void oneToOneWithBind() {\n\t\tSystem.out.println(\"============oneToOneWithBind=========\");\n\t\tUser u = new User();\n\t\tAddress a = new Address();\n\t\tu.configMapping(oneToOne(), u.ID(), a.UID(), bind(u.ADDRESS(), a.USER()));\n\t\tList<User> users = Dao.queryForEntityList(User.class, select(), u.all(), \",\", a.all(), from(), u.table(), \",\",\n\t\t\t\ta.table(), \" where \", u.ID(), \"=\", a.UID());\n\t\tfor (User user : users) {\n\t\t\tSystem.out.println(user.getUserName());\n\t\t\tAddress address = user.getAddress();\n\t\t\tSystem.out.println(\"\\t\" + address.getAddressName());\n\t\t\tUser user2 = address.getUser();\n\t\t\tAssert.assertTrue(user == user2);\n\t\t}\n\t}",
"Optional<DomainRelationshipDTO> findOne(UUID id);",
"@OneToOne(cascade = {CascadeType.ALL}, fetch = FetchType.EAGER)\n @JoinColumn(name = \"N_ID_DIRECCION\", nullable = false)\n public Direccion getDireccion() {\n return direccion;\n }",
"@OneToOne(mappedBy = \"persona\")\n\tpublic Proveedor getProveedor() {\n\t\treturn proveedor;\n\t}",
"public O first()\r\n {\r\n if (isEmpty()) return null; \r\n return first.getObject();\r\n }",
"@Override\n\tpublic Pedido findOne(Long arg0) {\n\t\treturn null;\n\t}",
"public boolean isReferrerAsOne() {\n return _referrerAsOne;\n }",
"public ObjectProp getRelationship() {\n return relationship;\n }",
"public Optional<E> one() {\n return Optional.ofNullable(queryOne());\n }",
"public T caseAssocRelationshipDefinition(AssocRelationshipDefinition object) {\n\t\treturn null;\n\t}",
"public final void mT__102() throws RecognitionException {\n try {\n int _type = T__102;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:72:8: ( 'association-one-to-one' )\n // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:72:10: 'association-one-to-one'\n {\n match(\"association-one-to-one\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"@Override\n\tpublic void activateEntityRelationship(Long id) {\n\t\tentityRelationshipTypeRepository.activateEntityRelationship(id);\n\t}",
"@OneToOne(fetch = FetchType.EAGER)\n/* */ @PrimaryKeyJoinColumn\n/* 56 */ public VfeWorkflowsAdp getVfeWorkflowsAdp() { return this.vfeWorkflowsAdp; }",
"@OneToOne\n @JoinColumn(name = \"ID_HOCSINH\")\n public HocSinh getHocSinh() {\n return hocSinh;\n }",
"@Override\n\tpublic Object selectOne() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Object selectOne() {\n\t\treturn null;\n\t}",
"public void relate(HNode id, Object o);",
"public T caseRelationAdded(RelationAdded object) {\n\t\treturn null;\n\t}",
"public T caseRelationshipNavigation(RelationshipNavigation object) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Personnes findOne(Long id) {\n\t\treturn null;\n\t}",
"public static com.matisse.reflect.MtRelationship getGestionaRelationship(com.matisse.MtDatabase db) {\n return (com.matisse.reflect.MtRelationship)db.getCachedObject(gestionaCID);\n }",
"@Override\n public SideDishEntity findOne(Long id) throws IllegalArgumentException {\n return null;\n }",
"protected PObject createIndependentObject() {\n return createIndependentObjects(1).get(0);\n }",
"public T caseRegularRelationshipDefinition(RegularRelationshipDefinition object) {\n\t\treturn null;\n\t}",
"Corretor findOne(Long id);",
"public void setHasEntity(Boolean setTo) {\n \n hasEntity_ = setTo;\n \n }",
"@ManyToOne\r\n\tpublic User getUser() {\r\n\t\treturn user;\r\n\t}",
"@Override\n\tpublic Editore getOneById(int id) {\n\t\treturn null;\n\t}",
"@Override\n @Transactional(readOnly = true)\n public Fund findOne(Long id) {\n log.debug(\"Request to get Fund : {}\", id);\n Fund fund = fundRepository.findOneWithEagerRelationships(id);\n return fund;\n }",
"@Override\r\n\tpublic OrderInfo selectOne() {\n\t\treturn null;\r\n\t}",
"public Relationship() {\r\n\t}",
"Optional<HousingAssociation> findOne(Long id);",
"RelationalDependency createRelationalDependency();",
"public Relationship getRelationship() {\n\t\treturn relationship;\n\t}",
"@Override\n\tpublic Setting queryone() {\n\t\treturn SettingMapper.queryone();\n\t}",
"@Override\n\tpublic Person findOne(Integer id) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic T queryJoinFirstObj(QueryBuilder mQueryBuilder) {\n\t\tmQueryBuilder.limitIndex = 1;\n\t\tmQueryBuilder.offsetIndex = 0;\n\t\tList<T> list = queryJoinObjs(mQueryBuilder);\n\t\tif (list.size() > 0) {\n\t\t\treturn list.get(0);\n\t\t}\n\t\treturn null;\n\t}",
"@Override\n\tprotected Class<ResourcesRelatedDetail> getEntity() {\n\t\treturn ResourcesRelatedDetail.class;\n\t}",
"public void onRelationshipChanged();",
"public boolean isBizOneToOne() {\n return _bizOneToOne;\n }",
"protected Object readResolve() {\n\t\ttry {\n\t\t\treturn fromLotus(resurrectAgent(), Agent.SCHEMA, getAncestorDatabase());\n\t\t} catch (NotesException e) {\n\t\t\tDominoUtils.handleException(e);\n\t\t\treturn this;\n\t\t}\n\t}",
"public Jode single() {\n return single(false);\n }",
"public Related() {\n }",
"@Override\n\tpublic Entity SelectFirstOrDefault() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Users findOne(Users t) {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic Employee findOne(Long arg0) {\n\t\treturn null;\r\n\t}",
"Relation createRelation();",
"PIMBankObject getDomainObjectRef();",
"@Override\n public LineEntity findOne(Long id) throws IllegalArgumentException {\n return null;\n }",
"@Override\n public void onRelationshipMapLoaded() {\n }",
"@Override\n\tpublic HelloEntity findOne() {\n\t\tLong id = 1L;\n\t\tHelloEntity entity = entityManager.find(HelloEntity.class, id);\n\t\tSystem.out.println(\"findOne: \" + entity.getName());\n\t\treturn null;\n\t}",
"public Object caseForeignKey(ForeignKey object) {\r\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic Optional<Producto> getOne(Producto entity) throws Exception {\n\t\treturn null;\r\n\t}",
"@Cache(usage = NONSTRICT_READ_WRITE)\n @JoinColumn(name = \"assigned_to_userid\")\n @ManyToOne(cascade = PERSIST, fetch = LAZY)\n public TdUserAuth getAssignedToUser() {\n return assignedToUser;\n }",
"public Project getProjectRelatedByProjectId() throws TorqueException\n {\n if (aProjectRelatedByProjectId == null && (this.projectId != 0))\n {\n aProjectRelatedByProjectId = ProjectPeer.retrieveByPK(SimpleKey.keyFor(this.projectId));\n \n /* The following can be used instead of the line above to\n guarantee the related object contains a reference\n to this object, but this level of coupling\n may be undesirable in many circumstances.\n As it can lead to a db query with many results that may\n never be used.\n Project obj = ProjectPeer.retrieveByPK(this.projectId);\n obj.addNewslettersRelatedByProjectId(this);\n */\n }\n return aProjectRelatedByProjectId;\n }",
"@ManyToOne(fetch=FetchType.LAZY)\n\t@JoinColumn(name=\"Kunde_ID\", nullable=false)\n\tpublic Person getPerson1() {\n\t\treturn this.person1;\n\t}",
"public A first() {\n return first;\n }",
"@Override\r\n public BaseVO refer(BaseVO baseVO) {\n return null;\r\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 }",
"public OBOProperty getDefaultRelationship() {\n return DEFAULT_REL; // genotype influences phenotype\n }",
"@Cache(usage = NONSTRICT_READ_WRITE)\n @JoinColumn(name = \"user_id\")\n @ManyToOne(cascade = PERSIST, fetch = LAZY)\n public TdUserAuth getUser() {\n return user;\n }",
"public AllOne() {\n \n }",
"boolean isFirstJoinKit();",
"public T caseIdentPrimary(IdentPrimary object)\n {\n return null;\n }",
"public Project getProjectRelatedByRelProjectId() throws TorqueException\n {\n if (aProjectRelatedByRelProjectId == null && (this.relProjectId != 0))\n {\n aProjectRelatedByRelProjectId = ProjectPeer.retrieveByPK(SimpleKey.keyFor(this.relProjectId));\n \n /* The following can be used instead of the line above to\n guarantee the related object contains a reference\n to this object, but this level of coupling\n may be undesirable in many circumstances.\n As it can lead to a db query with many results that may\n never be used.\n Project obj = ProjectPeer.retrieveByPK(this.relProjectId);\n obj.addNewslettersRelatedByRelProjectId(this);\n */\n }\n return aProjectRelatedByRelProjectId;\n }",
"public TmRelationship() {\n this(\"TM_RELATIONSHIP\", null);\n }",
"@Override\n @Transactional(readOnly = true)\n public ProductDTO findOne(Long id) {\n log.debug(\"Request to get Product : {}\", id);\n Product product = productRepository.findOneWithEagerRelationships(id);\n return productMapper.toDto(product);\n }",
"public void setRelatedTo(java.lang.String value);",
"@Override\n\tpublic Editore getOneByName(String name) {\n\t\treturn null;\n\t}",
"public Optional<E> first() {\n return Optional.ofNullable(queryFirst());\n }",
"public abstract P toEntity();",
"public void setRelationship(Relationship r) {\n\t\trelationship = r;\n\t}",
"public User user(User user) {\n return null;\n }",
"@Override\n @Transactional(readOnly = true)\n public JourneyDTO findOne(Long id) {\n log.debug(\"Request to get Journey : {}\", id);\n Journey journey = journeyRepository.findOne(id);\n return journeyMapper.toDto(journey);\n }",
"@Override\n public Set<Edge<PhysicalObject>> getRelationBetweenObjects() {\n assert false : \"shouldn't call this method\";\n return null;\n }",
"public CodeableConcept relationship() {\n return getObject(CodeableConcept.class, FhirPropertyNames.PROPERTY_RELATIONSHIP);\n }",
"Column referencedColumn();",
"protected void fillValueInOneToManyRel(Object value)\r\n\t{\r\n\t}",
"EReference getRelationReference();",
"public MuseologicalObjectDO getEntity(){\r\n\t\tMuseologicalObjectDO objDO = new MuseologicalObjectDO();\r\n\t\tif(objectId != null) objDO.setId(objectId);\r\n\t\tobjDO.setName(name);\r\n\t\tobjDO.setDate(date.getTime());\r\n\t\tobjDO.setObjectType(objectType);\r\n\t\treturn objDO;\r\n\t}",
"@Override\n public TransferRelation getTransferRelation() {\n return null;\n }",
"@Override\r\n\tpublic Employee getOne(Long arg0) {\n\t\treturn null;\r\n\t}",
"@Override\n @Transactional(readOnly = true)\n public Optional<Avistamiento> findOne(Long id) {\n log.debug(\"Request to get Avistamiento : {}\", id);\n return avistamientoRepository.findOneWithEagerRelationships(id);\n }",
"@Override\n\tpublic OrderEntity findOneById(Long id) {\n\t\treturn oder.getById(id);\n\t}",
"public Jode first() {\n return children().first();\n }",
"@Generated\n public Anexo getAnexo() {\n Long __key = this.anexoId;\n if (anexo__resolvedKey == null || !anexo__resolvedKey.equals(__key)) {\n __throwIfDetached();\n AnexoDao targetDao = daoSession.getAnexoDao();\n Anexo anexoNew = targetDao.load(__key);\n synchronized (this) {\n anexo = anexoNew;\n \tanexo__resolvedKey = __key;\n }\n }\n return anexo;\n }",
"@Override\n\tpublic void orphan(DBSet db, boolean asPack) \n\t{\n\t\tdb.getAddressPersonMap().removeItem(this.recipient.getAddress());\n\t\tdb.getPersonAddressMap().removeItem(this.key, this.recipient.getAddress());\n\n\t\t//UPDATE REFERENCE OF CREATOR\n\t\t// not needthis.creator.setLastReference(this.reference, db);\t\t\n\t\t//UPDATE REFERENCE OF RECIPIENT\n\t\tthis.recipient.removeReference(db);\n\t}",
"@Test(description = \"export interface with one single relationship\")\n public void exportWithOneRelationship()\n throws Exception\n {\n final DataCollection data = new DataCollection(this);\n final RelationshipData rel = data.getRelationship(\"TestRelationship\");\n final InterfaceData inter = data.getInterface(\"TestInterface\").addRelationship(rel);\n data.create();\n\n inter.checkExport(inter.export());\n }",
"public Long getRelateId() {\n return relateId;\n }",
"@Nullable\n public DBObject findOne() {\n return findOne(new BasicDBObject());\n }",
"public CuentaEntity toEntity() {\r\n CuentaEntity cuentaE = super.toEntity();\r\n if (this.tarjeta != null) {\r\n if (!this.tarjeta.isEmpty()) {\r\n List<TarjetaEntity> tarjetasEntity = new ArrayList<>();\r\n for (TarjetaDTO dtoTarjeta : tarjeta) {\r\n tarjetasEntity.add(dtoTarjeta.toEntity());\r\n }\r\n cuentaE.setTarjeta(tarjetasEntity);\r\n }\r\n }\r\n if (this.ordenPagos != null) {\r\n if (!this.ordenPagos.isEmpty()) {\r\n List<OrdenPagoEntity> ordenesEntity = new ArrayList<>();\r\n for (OrdenPagoDTO dtoOrdenPago : ordenPagos) {\r\n ordenesEntity.add(dtoOrdenPago.toEntity());\r\n }\r\n cuentaE.setOrdenPagos(ordenesEntity);\r\n }\r\n }\r\n \r\n if (this.estudiante != null) {\r\n System.out.println(\"---------------------------------------------------343434343\");\r\n EstudianteEntity es = estudiante.toEntity();\r\n cuentaE.setEstudiante(es);\r\n System.out.println(es.getDocumento());\r\n System.out.println(cuentaE.getEstudiante());\r\n System.out.println(cuentaE.getEstudiante().getDocumento());\r\n }\r\n\r\n return cuentaE;\r\n }",
"@Override\n\tpublic Account getSingleAccount() {\n\t\treturn null;\n\t}"
] | [
"0.5862854",
"0.5857389",
"0.57361376",
"0.5697713",
"0.56714755",
"0.5648432",
"0.56100655",
"0.55987066",
"0.55692047",
"0.5493379",
"0.54847467",
"0.5479508",
"0.54721624",
"0.546691",
"0.5385023",
"0.5373879",
"0.5369611",
"0.53155494",
"0.52854615",
"0.525083",
"0.5241759",
"0.5232416",
"0.52096677",
"0.5199185",
"0.5199185",
"0.5183624",
"0.51427734",
"0.5142622",
"0.5125741",
"0.5125064",
"0.5112706",
"0.5100105",
"0.5033676",
"0.50285935",
"0.5020634",
"0.5014138",
"0.4998751",
"0.4986843",
"0.49793777",
"0.49792784",
"0.49787593",
"0.49722737",
"0.49665347",
"0.49600837",
"0.49496937",
"0.49379215",
"0.4935771",
"0.49306753",
"0.4929448",
"0.49117756",
"0.49099568",
"0.49071556",
"0.4906936",
"0.49064386",
"0.48992097",
"0.48956054",
"0.4886147",
"0.488419",
"0.48813176",
"0.48802868",
"0.48584223",
"0.48537752",
"0.48509797",
"0.4850735",
"0.48412818",
"0.48368466",
"0.48347437",
"0.4829943",
"0.48182458",
"0.48171484",
"0.4816364",
"0.48132998",
"0.48109382",
"0.48098192",
"0.48076516",
"0.4802033",
"0.48018909",
"0.47945243",
"0.47839108",
"0.477759",
"0.4774254",
"0.47720897",
"0.4770499",
"0.47696668",
"0.4769197",
"0.4768202",
"0.4767246",
"0.47636926",
"0.47619563",
"0.47585046",
"0.4753322",
"0.47491178",
"0.47465667",
"0.47462755",
"0.4745771",
"0.4742197",
"0.47417676",
"0.4731364",
"0.47302103",
"0.4730008",
"0.4728901"
] | 0.0 | -1 |
Toone relationship, resolved on first access. | public BThread getThread() {
Long __key = this.threadDaoId;
if (thread__resolvedKey == null || !thread__resolvedKey.equals(__key)) {
if (daoSession == null) {
throw new DaoException("Entity is detached from DAO context");
}
BThreadDao targetDao = daoSession.getBThreadDao();
BThread threadNew = targetDao.load(__key);
synchronized (this) {
thread = threadNew;
thread__resolvedKey = __key;
}
}
return thread;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void oneToOneNoBind() {\n\t\tSystem.out.println(\"============oneToOneNoBind=========\");\n\t\tUser u = new User();\n\t\tAddress a = new Address();\n\t\tList<User> users = Dao.queryForEntityList(User.class, select(), u.all(), \",\", a.all(), from(), u.table(), \",\",\n\t\t\t\ta.table(), \" where \", oneToOne(), u.ID(), \"=\", a.UID(), bind());\n\t\tfor (User user : users) {\n\t\t\tSystem.out.println(user.getUserName());\n\t\t\tAddress address = user.getChildNode(Address.class);\n\t\t\tSystem.out.println(\"\\t\" + address.getAddressName());\n\t\t\tUser user2 = address.getParentNode(User.class);\n\t\t\tAssert.assertTrue(user == user2);\n\t\t}\n\t}",
"@Override\n\t\tpublic Relationship getSingleRelationship(RelationshipType type, Direction dir) {\n\t\t\treturn null;\n\t\t}",
"@Override\n\tprotected Model fetchOne(int id) {\n\t\treturn null;\n\t}",
"@Override\n\t\tpublic Relationship createRelationshipTo(Node otherNode, RelationshipType type) {\n\t\t\treturn null;\n\t\t}",
"private void checkMappedByOneToOne(DeployBeanPropertyAssocOne<?> prop) {\n String mappedBy = prop.getMappedBy();\n // get the mappedBy property\n DeployBeanDescriptor<?> targetDesc = targetDescriptor(prop);\n DeployBeanPropertyAssocOne<?> mappedAssocOne = mappedOneToOne(prop, mappedBy, targetDesc);\n DeployTableJoin tableJoin = prop.getTableJoin();\n if (!tableJoin.hasJoinColumns()) {\n // define Join as the inverse of the mappedBy property\n DeployTableJoin otherTableJoin = mappedAssocOne.getTableJoin();\n otherTableJoin.copyWithoutType(tableJoin, true, tableJoin.getTable());\n }\n\n if (mappedAssocOne.isPrimaryKeyJoin()) {\n // bi-directional PrimaryKeyJoin ...\n mappedAssocOne.setPrimaryKeyJoin(false);\n prop.setPrimaryKeyExport();\n addPrimaryKeyJoin(prop);\n }\n }",
"Relationship createRelationship();",
"@Override\n\t\tpublic boolean hasRelationship() {\n\t\t\treturn false;\n\t\t}",
"public T caseRelationshipDefinition(RelationshipDefinition object) {\n\t\treturn null;\n\t}",
"@OneToOne(mappedBy = \"persona\")\n\tpublic Usuario getUsuario() {\n\t\treturn usuario;\n\t}",
"@Test\n\tpublic void oneToOneWithBind() {\n\t\tSystem.out.println(\"============oneToOneWithBind=========\");\n\t\tUser u = new User();\n\t\tAddress a = new Address();\n\t\tu.configMapping(oneToOne(), u.ID(), a.UID(), bind(u.ADDRESS(), a.USER()));\n\t\tList<User> users = Dao.queryForEntityList(User.class, select(), u.all(), \",\", a.all(), from(), u.table(), \",\",\n\t\t\t\ta.table(), \" where \", u.ID(), \"=\", a.UID());\n\t\tfor (User user : users) {\n\t\t\tSystem.out.println(user.getUserName());\n\t\t\tAddress address = user.getAddress();\n\t\t\tSystem.out.println(\"\\t\" + address.getAddressName());\n\t\t\tUser user2 = address.getUser();\n\t\t\tAssert.assertTrue(user == user2);\n\t\t}\n\t}",
"Optional<DomainRelationshipDTO> findOne(UUID id);",
"@OneToOne(cascade = {CascadeType.ALL}, fetch = FetchType.EAGER)\n @JoinColumn(name = \"N_ID_DIRECCION\", nullable = false)\n public Direccion getDireccion() {\n return direccion;\n }",
"@OneToOne(mappedBy = \"persona\")\n\tpublic Proveedor getProveedor() {\n\t\treturn proveedor;\n\t}",
"public O first()\r\n {\r\n if (isEmpty()) return null; \r\n return first.getObject();\r\n }",
"@Override\n\tpublic Pedido findOne(Long arg0) {\n\t\treturn null;\n\t}",
"public boolean isReferrerAsOne() {\n return _referrerAsOne;\n }",
"public ObjectProp getRelationship() {\n return relationship;\n }",
"public Optional<E> one() {\n return Optional.ofNullable(queryOne());\n }",
"public T caseAssocRelationshipDefinition(AssocRelationshipDefinition object) {\n\t\treturn null;\n\t}",
"public final void mT__102() throws RecognitionException {\n try {\n int _type = T__102;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:72:8: ( 'association-one-to-one' )\n // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:72:10: 'association-one-to-one'\n {\n match(\"association-one-to-one\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"@Override\n\tpublic void activateEntityRelationship(Long id) {\n\t\tentityRelationshipTypeRepository.activateEntityRelationship(id);\n\t}",
"@OneToOne(fetch = FetchType.EAGER)\n/* */ @PrimaryKeyJoinColumn\n/* 56 */ public VfeWorkflowsAdp getVfeWorkflowsAdp() { return this.vfeWorkflowsAdp; }",
"@OneToOne\n @JoinColumn(name = \"ID_HOCSINH\")\n public HocSinh getHocSinh() {\n return hocSinh;\n }",
"@Override\n\tpublic Object selectOne() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Object selectOne() {\n\t\treturn null;\n\t}",
"public void relate(HNode id, Object o);",
"public T caseRelationAdded(RelationAdded object) {\n\t\treturn null;\n\t}",
"public T caseRelationshipNavigation(RelationshipNavigation object) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Personnes findOne(Long id) {\n\t\treturn null;\n\t}",
"public static com.matisse.reflect.MtRelationship getGestionaRelationship(com.matisse.MtDatabase db) {\n return (com.matisse.reflect.MtRelationship)db.getCachedObject(gestionaCID);\n }",
"@Override\n public SideDishEntity findOne(Long id) throws IllegalArgumentException {\n return null;\n }",
"protected PObject createIndependentObject() {\n return createIndependentObjects(1).get(0);\n }",
"public T caseRegularRelationshipDefinition(RegularRelationshipDefinition object) {\n\t\treturn null;\n\t}",
"Corretor findOne(Long id);",
"public void setHasEntity(Boolean setTo) {\n \n hasEntity_ = setTo;\n \n }",
"@ManyToOne\r\n\tpublic User getUser() {\r\n\t\treturn user;\r\n\t}",
"@Override\n\tpublic Editore getOneById(int id) {\n\t\treturn null;\n\t}",
"@Override\n @Transactional(readOnly = true)\n public Fund findOne(Long id) {\n log.debug(\"Request to get Fund : {}\", id);\n Fund fund = fundRepository.findOneWithEagerRelationships(id);\n return fund;\n }",
"@Override\r\n\tpublic OrderInfo selectOne() {\n\t\treturn null;\r\n\t}",
"public Relationship() {\r\n\t}",
"Optional<HousingAssociation> findOne(Long id);",
"RelationalDependency createRelationalDependency();",
"public Relationship getRelationship() {\n\t\treturn relationship;\n\t}",
"@Override\n\tpublic Setting queryone() {\n\t\treturn SettingMapper.queryone();\n\t}",
"@Override\n\tpublic Person findOne(Integer id) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic T queryJoinFirstObj(QueryBuilder mQueryBuilder) {\n\t\tmQueryBuilder.limitIndex = 1;\n\t\tmQueryBuilder.offsetIndex = 0;\n\t\tList<T> list = queryJoinObjs(mQueryBuilder);\n\t\tif (list.size() > 0) {\n\t\t\treturn list.get(0);\n\t\t}\n\t\treturn null;\n\t}",
"@Override\n\tprotected Class<ResourcesRelatedDetail> getEntity() {\n\t\treturn ResourcesRelatedDetail.class;\n\t}",
"public void onRelationshipChanged();",
"public boolean isBizOneToOne() {\n return _bizOneToOne;\n }",
"public Jode single() {\n return single(false);\n }",
"protected Object readResolve() {\n\t\ttry {\n\t\t\treturn fromLotus(resurrectAgent(), Agent.SCHEMA, getAncestorDatabase());\n\t\t} catch (NotesException e) {\n\t\t\tDominoUtils.handleException(e);\n\t\t\treturn this;\n\t\t}\n\t}",
"@Override\n\tpublic Entity SelectFirstOrDefault() {\n\t\treturn null;\n\t}",
"public Related() {\n }",
"@Override\n\tpublic Users findOne(Users t) {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic Employee findOne(Long arg0) {\n\t\treturn null;\r\n\t}",
"Relation createRelation();",
"PIMBankObject getDomainObjectRef();",
"@Override\n public LineEntity findOne(Long id) throws IllegalArgumentException {\n return null;\n }",
"@Override\n public void onRelationshipMapLoaded() {\n }",
"@Override\n\tpublic HelloEntity findOne() {\n\t\tLong id = 1L;\n\t\tHelloEntity entity = entityManager.find(HelloEntity.class, id);\n\t\tSystem.out.println(\"findOne: \" + entity.getName());\n\t\treturn null;\n\t}",
"public Object caseForeignKey(ForeignKey object) {\r\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic Optional<Producto> getOne(Producto entity) throws Exception {\n\t\treturn null;\r\n\t}",
"@Cache(usage = NONSTRICT_READ_WRITE)\n @JoinColumn(name = \"assigned_to_userid\")\n @ManyToOne(cascade = PERSIST, fetch = LAZY)\n public TdUserAuth getAssignedToUser() {\n return assignedToUser;\n }",
"public Project getProjectRelatedByProjectId() throws TorqueException\n {\n if (aProjectRelatedByProjectId == null && (this.projectId != 0))\n {\n aProjectRelatedByProjectId = ProjectPeer.retrieveByPK(SimpleKey.keyFor(this.projectId));\n \n /* The following can be used instead of the line above to\n guarantee the related object contains a reference\n to this object, but this level of coupling\n may be undesirable in many circumstances.\n As it can lead to a db query with many results that may\n never be used.\n Project obj = ProjectPeer.retrieveByPK(this.projectId);\n obj.addNewslettersRelatedByProjectId(this);\n */\n }\n return aProjectRelatedByProjectId;\n }",
"@ManyToOne(fetch=FetchType.LAZY)\n\t@JoinColumn(name=\"Kunde_ID\", nullable=false)\n\tpublic Person getPerson1() {\n\t\treturn this.person1;\n\t}",
"public A first() {\n return first;\n }",
"@Override\r\n public BaseVO refer(BaseVO baseVO) {\n return null;\r\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 }",
"public OBOProperty getDefaultRelationship() {\n return DEFAULT_REL; // genotype influences phenotype\n }",
"@Cache(usage = NONSTRICT_READ_WRITE)\n @JoinColumn(name = \"user_id\")\n @ManyToOne(cascade = PERSIST, fetch = LAZY)\n public TdUserAuth getUser() {\n return user;\n }",
"public AllOne() {\n \n }",
"boolean isFirstJoinKit();",
"public T caseIdentPrimary(IdentPrimary object)\n {\n return null;\n }",
"public TmRelationship() {\n this(\"TM_RELATIONSHIP\", null);\n }",
"public Project getProjectRelatedByRelProjectId() throws TorqueException\n {\n if (aProjectRelatedByRelProjectId == null && (this.relProjectId != 0))\n {\n aProjectRelatedByRelProjectId = ProjectPeer.retrieveByPK(SimpleKey.keyFor(this.relProjectId));\n \n /* The following can be used instead of the line above to\n guarantee the related object contains a reference\n to this object, but this level of coupling\n may be undesirable in many circumstances.\n As it can lead to a db query with many results that may\n never be used.\n Project obj = ProjectPeer.retrieveByPK(this.relProjectId);\n obj.addNewslettersRelatedByRelProjectId(this);\n */\n }\n return aProjectRelatedByRelProjectId;\n }",
"@Override\n @Transactional(readOnly = true)\n public ProductDTO findOne(Long id) {\n log.debug(\"Request to get Product : {}\", id);\n Product product = productRepository.findOneWithEagerRelationships(id);\n return productMapper.toDto(product);\n }",
"public void setRelatedTo(java.lang.String value);",
"@Override\n\tpublic Editore getOneByName(String name) {\n\t\treturn null;\n\t}",
"public Optional<E> first() {\n return Optional.ofNullable(queryFirst());\n }",
"public abstract P toEntity();",
"public void setRelationship(Relationship r) {\n\t\trelationship = r;\n\t}",
"@Override\n @Transactional(readOnly = true)\n public JourneyDTO findOne(Long id) {\n log.debug(\"Request to get Journey : {}\", id);\n Journey journey = journeyRepository.findOne(id);\n return journeyMapper.toDto(journey);\n }",
"public User user(User user) {\n return null;\n }",
"@Override\n public Set<Edge<PhysicalObject>> getRelationBetweenObjects() {\n assert false : \"shouldn't call this method\";\n return null;\n }",
"public CodeableConcept relationship() {\n return getObject(CodeableConcept.class, FhirPropertyNames.PROPERTY_RELATIONSHIP);\n }",
"Column referencedColumn();",
"protected void fillValueInOneToManyRel(Object value)\r\n\t{\r\n\t}",
"EReference getRelationReference();",
"public MuseologicalObjectDO getEntity(){\r\n\t\tMuseologicalObjectDO objDO = new MuseologicalObjectDO();\r\n\t\tif(objectId != null) objDO.setId(objectId);\r\n\t\tobjDO.setName(name);\r\n\t\tobjDO.setDate(date.getTime());\r\n\t\tobjDO.setObjectType(objectType);\r\n\t\treturn objDO;\r\n\t}",
"@Override\n public TransferRelation getTransferRelation() {\n return null;\n }",
"@Override\r\n\tpublic Employee getOne(Long arg0) {\n\t\treturn null;\r\n\t}",
"@Override\n @Transactional(readOnly = true)\n public Optional<Avistamiento> findOne(Long id) {\n log.debug(\"Request to get Avistamiento : {}\", id);\n return avistamientoRepository.findOneWithEagerRelationships(id);\n }",
"@Override\n\tpublic OrderEntity findOneById(Long id) {\n\t\treturn oder.getById(id);\n\t}",
"public Jode first() {\n return children().first();\n }",
"@Generated\n public Anexo getAnexo() {\n Long __key = this.anexoId;\n if (anexo__resolvedKey == null || !anexo__resolvedKey.equals(__key)) {\n __throwIfDetached();\n AnexoDao targetDao = daoSession.getAnexoDao();\n Anexo anexoNew = targetDao.load(__key);\n synchronized (this) {\n anexo = anexoNew;\n \tanexo__resolvedKey = __key;\n }\n }\n return anexo;\n }",
"@Test(description = \"export interface with one single relationship\")\n public void exportWithOneRelationship()\n throws Exception\n {\n final DataCollection data = new DataCollection(this);\n final RelationshipData rel = data.getRelationship(\"TestRelationship\");\n final InterfaceData inter = data.getInterface(\"TestInterface\").addRelationship(rel);\n data.create();\n\n inter.checkExport(inter.export());\n }",
"@Override\n\tpublic void orphan(DBSet db, boolean asPack) \n\t{\n\t\tdb.getAddressPersonMap().removeItem(this.recipient.getAddress());\n\t\tdb.getPersonAddressMap().removeItem(this.key, this.recipient.getAddress());\n\n\t\t//UPDATE REFERENCE OF CREATOR\n\t\t// not needthis.creator.setLastReference(this.reference, db);\t\t\n\t\t//UPDATE REFERENCE OF RECIPIENT\n\t\tthis.recipient.removeReference(db);\n\t}",
"public Long getRelateId() {\n return relateId;\n }",
"@Nullable\n public DBObject findOne() {\n return findOne(new BasicDBObject());\n }",
"public CuentaEntity toEntity() {\r\n CuentaEntity cuentaE = super.toEntity();\r\n if (this.tarjeta != null) {\r\n if (!this.tarjeta.isEmpty()) {\r\n List<TarjetaEntity> tarjetasEntity = new ArrayList<>();\r\n for (TarjetaDTO dtoTarjeta : tarjeta) {\r\n tarjetasEntity.add(dtoTarjeta.toEntity());\r\n }\r\n cuentaE.setTarjeta(tarjetasEntity);\r\n }\r\n }\r\n if (this.ordenPagos != null) {\r\n if (!this.ordenPagos.isEmpty()) {\r\n List<OrdenPagoEntity> ordenesEntity = new ArrayList<>();\r\n for (OrdenPagoDTO dtoOrdenPago : ordenPagos) {\r\n ordenesEntity.add(dtoOrdenPago.toEntity());\r\n }\r\n cuentaE.setOrdenPagos(ordenesEntity);\r\n }\r\n }\r\n \r\n if (this.estudiante != null) {\r\n System.out.println(\"---------------------------------------------------343434343\");\r\n EstudianteEntity es = estudiante.toEntity();\r\n cuentaE.setEstudiante(es);\r\n System.out.println(es.getDocumento());\r\n System.out.println(cuentaE.getEstudiante());\r\n System.out.println(cuentaE.getEstudiante().getDocumento());\r\n }\r\n\r\n return cuentaE;\r\n }",
"@Override\n\tpublic Account getSingleAccount() {\n\t\treturn null;\n\t}"
] | [
"0.586295",
"0.5858311",
"0.57361096",
"0.56971985",
"0.5671697",
"0.56491035",
"0.5610516",
"0.5598799",
"0.5569257",
"0.5493518",
"0.5485247",
"0.54806054",
"0.5471793",
"0.54670626",
"0.538438",
"0.53736156",
"0.5369618",
"0.5316193",
"0.5285615",
"0.52508867",
"0.52423453",
"0.52323127",
"0.520882",
"0.51994187",
"0.51994187",
"0.5183174",
"0.5143363",
"0.5143056",
"0.51256925",
"0.5125149",
"0.511209",
"0.50995487",
"0.5033931",
"0.5028473",
"0.5019074",
"0.50129527",
"0.49986815",
"0.49872214",
"0.49795175",
"0.49794674",
"0.49785477",
"0.49722475",
"0.49665508",
"0.49596128",
"0.4949336",
"0.49374688",
"0.49344233",
"0.49306953",
"0.4928615",
"0.49114835",
"0.49114758",
"0.4907113",
"0.4906229",
"0.4905798",
"0.4898427",
"0.48961905",
"0.48846576",
"0.48838615",
"0.48812264",
"0.4880073",
"0.4857676",
"0.48529932",
"0.48491508",
"0.4848314",
"0.4841647",
"0.48367283",
"0.483328",
"0.4829453",
"0.48186237",
"0.48162434",
"0.48156828",
"0.48127836",
"0.48100713",
"0.48081014",
"0.48075226",
"0.48020723",
"0.4798972",
"0.47947353",
"0.47842622",
"0.47772083",
"0.47739667",
"0.4771323",
"0.477076",
"0.47702175",
"0.47691184",
"0.4767127",
"0.4765562",
"0.4764214",
"0.4761802",
"0.47595686",
"0.4752656",
"0.4748729",
"0.474692",
"0.47468874",
"0.47454977",
"0.474258",
"0.47425357",
"0.47303295",
"0.4730251",
"0.473012",
"0.47287092"
] | 0.0 | -1 |
Tomany relationship, resolved on first access (and after reset). Changes to tomany relations are not persisted, make changes to the target entity. | public List<BMessageReceipt> getBMessageReceiptList() {
if (bMessageReceiptList == null) {
if (daoSession == null) {
throw new DaoException("Entity is detached from DAO context");
}
BMessageReceiptDao targetDao = daoSession.getBMessageReceiptDao();
List<BMessageReceipt> bMessageReceiptListNew = targetDao._queryBMessage_BMessageReceiptList(id);
synchronized (this) {
if(bMessageReceiptList == null) {
bMessageReceiptList = bMessageReceiptListNew;
}
}
}
return bMessageReceiptList;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void onRelationshipChanged() {\n\t\tloadData();\n\t}",
"public void onRelationshipChanged();",
"public void setHasEntity(Boolean setTo) {\n \n hasEntity_ = setTo;\n \n }",
"@Override\n public void onRelationshipMapLoaded() {\n }",
"private void makeUnidirectional(DeployBeanPropertyAssocMany<?> oneToMany) {\n DeployBeanDescriptor<?> targetDesc = targetDescriptor(oneToMany);\n Class<?> owningType = oneToMany.getOwningType();\n if (!oneToMany.getCascadeInfo().isSave()) {\n // The property MUST have persist cascading so that inserts work.\n Class<?> targetType = oneToMany.getTargetType();\n String msg = \"Error on \" + oneToMany + \". @OneToMany MUST have \";\n msg += \"Cascade.PERSIST or Cascade.ALL because this is a unidirectional \";\n msg += \"relationship. That is, there is no property of type \" + owningType + \" on \" + targetType;\n throw new PersistenceException(msg);\n }\n\n // mark this property as unidirectional\n oneToMany.setUnidirectional();\n // specify table and table alias...\n BeanTable beanTable = beanTable(owningType);\n // define the TableJoin\n DeployTableJoin oneToManyJoin = oneToMany.getTableJoin();\n if (!oneToManyJoin.hasJoinColumns()) {\n throw new RuntimeException(\"No join columns found to satisfy the relationship \" + oneToMany);\n }\n createUnidirectional(targetDesc, owningType, beanTable, oneToManyJoin);\n }",
"void setAssociatedObject(IEntityObject relatedObj);",
"public void setRelationship(Relationship r) {\n\t\trelationship = r;\n\t}",
"@Override\n\t\tpublic boolean hasRelationship() {\n\t\t\treturn false;\n\t\t}",
"@Test\r\n public void testManyToOneAfterClosed(){\r\n EntityManager em = factory.createEntityManager();\r\n // create MyTestObject1 and a 2 with a reference from 1 to 2.\r\n MyTestObject4 o4 = new MyTestObject4();\r\n o4.setName4(\"04\");\r\n em.persist(o4);\r\n MyTestObject2 o2 = new MyTestObject2(\"ob2\", 123);\r\n o2.setMyTestObject4(o4);\r\n em.persist(o2);\r\n MyTestObject o1 = new MyTestObject();\r\n o1.setMyTestObject2(o2);\r\n em.persist(o1);\r\n em.getTransaction().commit();\r\n // close em\r\n em.close();\r\n\r\n // clean out the caches\r\n clearCaches();\r\n\r\n em = factory.createEntityManager();\r\n // get all MyTestObject2's to get them in 2nd level cache\r\n Query query = em.createQuery(\"select o from MyTestObject2 o\");\r\n List<MyTestObject2> resultList = query.getResultList();\r\n for (MyTestObject2 myTestObject2 : resultList) {\r\n System.out.println(myTestObject2);\r\n }\r\n // close em\r\n em.close();\r\n\r\n em = factory.createEntityManager();\r\n // now get 1's and touch the referenced 2's, ie: getMyTestObject2();\r\n query = em.createQuery(\"select o from MyTestObject o\");\r\n List<MyTestObject> resultList2 = query.getResultList();\r\n for (MyTestObject myTestObject : resultList2) {\r\n System.out.println(myTestObject.getMyTestObject2().getMyTestObject4());\r\n }\r\n em.close();\r\n }",
"public void manyToManyDeleteOwningSideTest() throws Exception {\n EntityManager em = createEntityManager();\n \n em.getTransaction().begin();\n \n EntityA a1 = new EntityA();\n a1.setName(\"EntityA1\");\n EntityB b1 = new EntityB();\n b1.setName(\"EntityB1\");\n\n a1.getBs().add(b1);\n b1.getAs().add(a1);\n\n em.persist(a1);\n\n em.getTransaction().commit();\n\n Integer idA1 = a1.getId();\n Integer idB1 = b1.getId();\n \n em.getTransaction().begin();\n \n // remove the relationship\n a1.getBs().remove(b1);\n b1.getAs().remove(a1);\n\n // remove the non-owning side\n em.remove(a1);\n try {\n em.getTransaction().commit();\n } catch (RuntimeException ex) {\n if (em.getTransaction().isActive()) {\n em.getTransaction().rollback();\n }\n em.close();\n \n throw ex;\n }\n \n clearCache();\n \n assertTrue(\"EntityA a1 should have been removed!\", \n em.createQuery(\"SELECT a FROM EntityA a WHERE a.id = ?1\").setParameter(1, idA1).getResultList().size() == 0);\n assertTrue(\"EntityB b1 should not have been removed!\", \n em.createQuery(\"SELECT b FROM EntityB b WHERE b.id = ?1\").setParameter(1, idB1).getResultList().size() != 0);\n\n em.close();\n }",
"@Override\n\tpublic void activateEntityRelationship(Long id) {\n\t\tentityRelationshipTypeRepository.activateEntityRelationship(id);\n\t}",
"private void switchRelations() throws TransactionAbortedException, DbException {\n // IMPLEMENT ME\n }",
"Relationship createRelationship();",
"@Override\n \tpublic void setIsPartOf(Reference isPartOf) {\n \t\t// do nothing if relationship not changed\n \t\tif (this.isPartOf == isPartOf)\n \t\t\treturn;\n \t\t// remove from inverse relationship\n \t\tif (this.isPartOf != null) {\n \t\t\tthis.isPartOf.getContains().remove(this);\n \t\t}\n \t\t// set forward relationship\n \t\tthis.isPartOf = isPartOf;\n \t\tif (isPartOf == null)\n \t\t\treturn;\n \t\t// set inverse relationship\n \t\tisPartOf.getContains().add(this);\n \t}",
"public void resetRelatesToList(MappingType mapping) {\n\t\tmapping.getRelatesTo().clear();\n\t}",
"@Override\n public void cascadePersist(RDFPersistent rootRDFEntity, RDFEntityManager rdfEntityManager, URI overrideContext) {\n //Preconditions\n assert rdfEntityManager != null : \"rdfEntityManager must not be null\";\n assert roles != null : \"roles must not be null\";\n assert !roles.isEmpty() : \"roles must not be empty for node \" + name;\n\n stateValueBindings.stream().forEach((stateValueBinding) -> {\n stateValueBinding.cascadePersist(\n rootRDFEntity,\n rdfEntityManager,\n overrideContext);\n });\n roles.stream().forEach((role) -> {\n role.cascadePersist(\n rootRDFEntity,\n rdfEntityManager,\n overrideContext);\n });\n rdfEntityManager.persist(this, overrideContext);\n }",
"protected void fillValueInOneToManyRel(Object value)\r\n\t{\r\n\t}",
"@Override\n\tprotected Class<ResourcesRelatedDetail> getEntity() {\n\t\treturn ResourcesRelatedDetail.class;\n\t}",
"@Override\n public void storeToGraph(Set<GraphContext> graphContext) {\n\n graphContext.forEach(entry -> {\n try {\n LineageEntity fromEntity = entry.getFromVertex();\n LineageEntity toEntity = entry.getToVertex();\n\n upsertToGraph(fromEntity, toEntity, entry.getRelationshipType(), entry.getRelationshipGuid());\n } catch (Exception e) {\n log.error(VERTICES_AND_RELATIONSHIP_CREATION_EXCEPTION, e);\n }\n });\n }",
"public ObjectProp getRelationship() {\n return relationship;\n }",
"@Override\n \tpublic void setContributedBy(CitagoraAgent contributedBy) {\n \t\t// do nothing if relationship not changed\n \t\tif (this.contributedBy == contributedBy)\n \t\t\treturn; // no change\n \t\t// remove from inverse relationship\n \t\tif (this.contributedBy != null) {\n \t\t\tthis.contributedBy.getAgentReferences().remove(this);\n \t\t}\n \t\t// set forward relationship\n \t\tthis.contributedBy = contributedBy;\n \t\t// set inverse relationship\n \t\tif (contributedBy == null)\n \t\t\treturn;\n \t\tcontributedBy.getAgentReferences().add(this);\n \t}",
"public void setRelatedTo(java.lang.String value);",
"@Override\n \t\t\t\tpublic void doAttachTo() {\n \n \t\t\t\t}",
"@Override\n public void setRelationships(com.gensym.util.Sequence relationships) throws G2AccessException {\n setAttributeValue (SystemAttributeSymbols.RELATIONSHIPS_, relationships);\n }",
"public void setProductRelatedByRelProductId(Product v) throws TorqueException\n {\n if (v == null)\n {\n setRelProductId( 999);\n }\n else\n {\n setRelProductId(v.getProductId());\n }\n aProductRelatedByRelProductId = v;\n }",
"RelationalDependency createRelationalDependency();",
"public void manyToManyDeleteNonOwningSideTest() throws Exception {\n EntityManager em = createEntityManager();\n \n em.getTransaction().begin();\n \n EntityA a1 = new EntityA();\n a1.setName(\"EntityA1\");\n EntityB b1 = new EntityB();\n b1.setName(\"EntityB1\");\n\n a1.getBs().add(b1);\n b1.getAs().add(a1);\n\n em.persist(a1);\n\n em.getTransaction().commit();\n\n Integer idA1 = a1.getId();\n Integer idB1 = b1.getId();\n \n em.getTransaction().begin();\n // remove the owning side\n em.remove(b1);\n try {\n em.getTransaction().commit();\n } catch (RuntimeException ex) {\n if (em.getTransaction().isActive()) {\n em.getTransaction().rollback();\n }\n em.close();\n \n throw ex;\n }\n \n clearCache();\n \n assertTrue(\"EntityA a1 should have been removed!\", \n em.createQuery(\"SELECT a FROM EntityA a WHERE a.id = ?1\").setParameter(1, idA1).getResultList().size() == 0);\n assertTrue(\"EntityB b1 should have been removed!\", \n em.createQuery(\"SELECT b FROM EntityB b WHERE b.id = ?1\").setParameter(1, idB1).getResultList().size() == 0);\n\n em.close();\n }",
"void unsetFurtherRelations();",
"public void setProductRelatedByRelProductIdKey(ObjectKey key) throws TorqueException\n {\n \n setRelProductId(((NumberKey) key).intValue());\n }",
"public void relate(HNode id, Object o);",
"public void setRelationship( String relationship ) {\n this.relationship = relationship;\n }",
"public void flushEntityCache() {\n super.flushEntityCache();\n }",
"private void checkMappedByOneToMany(DeployBeanInfo<?> info, DeployBeanPropertyAssocMany<?> prop) {\n if (prop.isElementCollection()) {\n // skip mapping check\n return;\n }\n DeployBeanDescriptor<?> targetDesc = targetDescriptor(prop);\n if (targetDesc.isDraftableElement()) {\n // automatically turning on orphan removal and CascadeType.ALL\n prop.setModifyListenMode(BeanCollection.ModifyListenMode.REMOVALS);\n prop.getCascadeInfo().setSaveDelete(true, true);\n }\n\n if (prop.hasOrderColumn()) {\n makeOrderColumn(prop);\n }\n\n if (prop.getMappedBy() == null) {\n // if we are doc store only we are done\n // this allows the use of @OneToMany in @DocStore - Entities\n if (info.getDescriptor().isDocStoreOnly()) {\n prop.setUnidirectional();\n return;\n }\n\n if (!findMappedBy(prop)) {\n if (!prop.isO2mJoinTable()) {\n makeUnidirectional(prop);\n }\n return;\n }\n }\n\n // check that the mappedBy property is valid and read\n // its associated join information if it is available\n String mappedBy = prop.getMappedBy();\n\n // get the mappedBy property\n DeployBeanPropertyAssocOne<?> mappedAssocOne = mappedManyToOne(prop, targetDesc, mappedBy);\n DeployTableJoin tableJoin = prop.getTableJoin();\n if (!tableJoin.hasJoinColumns()) {\n // define Join as the inverse of the mappedBy property\n DeployTableJoin otherTableJoin = mappedAssocOne.getTableJoin();\n otherTableJoin.copyTo(tableJoin, true, tableJoin.getTable());\n }\n\n PropertyForeignKey foreignKey = mappedAssocOne.getForeignKey();\n if (foreignKey != null) {\n ConstraintMode onDelete = foreignKey.getOnDelete();\n switch (onDelete) {\n case SET_DEFAULT:\n case SET_NULL:\n case CASCADE: {\n // turn off cascade delete when we are using the foreign\n // key constraint to cascade the delete or set null\n prop.getCascadeInfo().setDelete(false);\n }\n }\n }\n }",
"private void readEntityRelationships() {\n List<DeployBeanPropertyAssocOne<?>> primaryKeyJoinCheck = new ArrayList<>();\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n checkMappedBy(info, primaryKeyJoinCheck);\n }\n for (DeployBeanPropertyAssocOne<?> prop : primaryKeyJoinCheck) {\n checkUniDirectionalPrimaryKeyJoin(prop);\n }\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n secondaryPropsJoins(info);\n }\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n setInheritanceInfo(info);\n }\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n if (!info.isEmbedded()) {\n registerDescriptor(info);\n }\n }\n }",
"@PostConstruct\n protected void initNewEntity() {\n setNewEntity(getService().create());\n }",
"public void setRelateId(Long relateId) {\n this.relateId = relateId;\n }",
"@Test\n public void manyToOne_setJobExecution() {\n BatchStepExecution many = new BatchStepExecution();\n\n // init\n BatchJobExecution one = new BatchJobExecution();\n one.setId(ValueGenerator.getUniqueLong());\n many.setJobExecution(one);\n\n // make sure it is propagated properly\n assertThat(many.getJobExecution()).isEqualTo(one);\n\n // now set it to back to null\n many.setJobExecution(null);\n\n // make sure null is propagated properly\n assertThat(many.getJobExecution()).isNull();\n }",
"public RelationshipManager createRelationshipManager() throws ServiceException {\r\n initialize(); \r\n return new RelationshipManager(multiDomainMetaService, multiDomainService);\r\n\t}",
"public void setRelation(Relation<L, Tr, T> r) {\n this.relation = r;\n }",
"@Override\n\t\tpublic Relationship createRelationshipTo(Node otherNode, RelationshipType type) {\n\t\t\treturn null;\n\t\t}",
"@Override\n public void updateBys() { updateLabelLists(getRTParent().getEntityTagTypes()); fillCommonRelationshipsMenu(); }",
"protected void sequence_Entity(ISerializationContext context, Entity semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}",
"public Relation setDeepRelation(XDI3Segment contextNodeXri, XDI3Segment arcXri, XDI3Segment targetContextNodeXri);",
"private String replaceIntermediateObjectWithRel(Context context, String strOldRelId ,String strNewRelId ,String strNewRelIdSide,Map attributeMap) throws Exception {\r\n\r\n\t\tString strNewConnId=\"\";\r\n\t\tboolean isRelToRel = true;\r\n\t\tboolean isFrom = true;\r\n\r\n\t\ttry{\r\n\r\n\t\tDomainRelationship domRel = new DomainRelationship(strOldRelId);\r\n //Get the attributes on Relationship\r\n /*Map attributeMap = new HashMap();\r\n attributeMap = domRel.getAttributeMap(context,true);*/\r\n\r\n\r\n\t\t//Get the \"Type\" of rel\r\n\t\tStringList slRelSelects = new StringList(1);\r\n slRelSelects.addElement(DomainRelationship.SELECT_TYPE);\r\n\r\n if(strNewRelIdSide!=null && strNewRelIdSide.equalsIgnoreCase(\"from\")){\r\n \t//New Rel replaces FL/GBOM which is on \"from\" side of Old Rel hence we query now \"to\" side of Old Rel\r\n \tslRelSelects.add(\"to.id\");\r\n slRelSelects.add(\"torel.id\");\r\n\r\n }else if(strNewRelIdSide!=null && strNewRelIdSide.equalsIgnoreCase(\"to\")){\r\n \t//New Rel replaces FL/GBOM which is on \"to\" side of Old Rel hence we query now \"from\" side of Old Rel\r\n \tslRelSelects.add(\"from.id\");\r\n slRelSelects.add(\"fromrel.id\");\r\n }\r\n\r\n Hashtable htRelData = domRel.getRelationshipData(context,slRelSelects);\r\n\r\n String strFromSideOfRel =\"\";\r\n String strToSideOfRel =\"\";\r\n String strRelId =\"\";\r\n String strObjId =\"\";\r\n\r\n StringList slRelTypes = (StringList) htRelData.get(DomainRelationship.SELECT_TYPE);\r\n String strRelType = (String) slRelTypes.get(0);\r\n RelationshipType RelType = new RelationshipType(strRelType);\r\n\r\n\r\n if((StringList) htRelData.get(\"from.id\")!=null || ((StringList)htRelData.get(\"fromrel.id\"))!=null ){\r\n\r\n \tStringList slFromSideOfRel = new StringList();\r\n \tif(!((StringList)htRelData.get(\"from.id\")).isEmpty()){\r\n \t\tslFromSideOfRel = (StringList) htRelData.get(\"from.id\");\r\n \t\tstrFromSideOfRel = (String) slFromSideOfRel.get(0);\r\n\r\n \t\tisRelToRel = false;\r\n \t\t//isFrom = false;\r\n \t\tstrObjId = strFromSideOfRel;\r\n\r\n\r\n \t}else if(!((StringList)htRelData.get(\"fromrel.id\")).isEmpty()){\r\n \t\tslFromSideOfRel = (StringList) htRelData.get(\"fromrel.id\");\r\n \t\tstrFromSideOfRel = (String) slFromSideOfRel.get(0);\r\n\r\n \t\tstrRelId = strFromSideOfRel;\r\n \t\tisFrom = false;\r\n \t}\r\n }\r\n\r\n if((StringList) htRelData.get(\"to.id\")!=null || ((StringList)htRelData.get(\"torel.id\"))!=null ){\r\n\r\n \tStringList slToSideOfRel = new StringList();\r\n \tif(!((StringList)htRelData.get(\"to.id\")).isEmpty()){\r\n \t\tslToSideOfRel = (StringList) htRelData.get(\"to.id\");\r\n \t\tstrToSideOfRel = (String) slToSideOfRel.get(0);\r\n\r\n \t\tisRelToRel = false;\r\n \t\tstrObjId = strToSideOfRel;\r\n \t\tisFrom = false;\r\n \t}else if(!((StringList)htRelData.get(\"torel.id\")).isEmpty()){\r\n\r\n \t\tslToSideOfRel = (StringList) htRelData.get(\"torel.id\");\r\n\r\n \t\tstrToSideOfRel = (String) slToSideOfRel.get(0);\r\n \t\tstrRelId =strToSideOfRel;\r\n \t\t//isFrom = false;\r\n \t}\r\n }\r\n\r\n\r\n if(isRelToRel){\r\n\r\n strNewConnId = connectRelationship(context, RelType, strRelId,strNewRelId, isFrom);\r\n\r\n }else{\r\n\r\n \tstrNewConnId = connectObject(context, RelType, strObjId,strNewRelId, isFrom);\r\n }\r\n\r\n\t\t\t StringList relDataSelects = new StringList();\r\n\t\t\t relDataSelects.addElement(\"frommid.id\");\r\n\t\t\t relDataSelects.addElement(\"tomid.id\");\r\n\r\n\t\t\t Map gbomRelData = domRel.getRelationshipData(context,relDataSelects);\r\n\t\t\t StringList sLFrommid = new StringList();\r\n\t\t\t StringList sLTomid = new StringList();\r\n\r\n\t\t\t sLFrommid = (StringList) gbomRelData.get(\"frommid.id\");\r\n\t\t\t if(!sLFrommid.isEmpty()){\r\n\t\t\t\tfor(int i=0;i<sLFrommid.size();i++){\r\n\r\n\t\t\t\t\tString strFromMid = (String)sLFrommid.get(i);\r\n\t\t\t\t\tsetToRelationship(context,strFromMid,strNewConnId,true);\r\n\t\t\t }\r\n\t\t\t }\r\n\r\n\r\n\t\t\t sLTomid = (StringList) gbomRelData.get(\"tomid.id\");\r\n\t\t\t if(!sLTomid.isEmpty()){\r\n\t\t\t\tfor(int i=0;i<sLTomid.size();i++){\r\n\r\n\t\t\t\t\tString strToMid = (String)sLTomid.get(i);\r\n\t\t\t\t\tsetToRelationship(context,strToMid,strNewConnId,false);\r\n\t\t\t }\r\n\t\t\t }\r\n\r\n\t\t\tDomainRelationship domNewConnId = new DomainRelationship(strNewConnId);\r\n\t\t\tmqlLogRequiredInformationWriter(\"Rel id :: \"+ strNewConnId +\"\\n\");\r\n\t\t mqlLogRequiredInformationWriter(\"Attribute value Map set for this rel id :: \"+ attributeMap +\"\\n\\n\");\r\n\t domNewConnId.setAttributeValues(context, attributeMap);\r\n\r\n\r\n\r\n\t\t}catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn strNewConnId;\r\n\t}",
"@Override\n\tpublic void deactivateEntityRelationship(Long id) {\n\t\tentityRelationshipTypeRepository.deactivateEntityRelationship(id);\n\t}",
"@Override\n\tpublic void savePersonRelation(PersonRelation personRelation) {\n\t\t\n\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 void setInverseRelationship (RelationshipElement inverseRelationship,\n\t\tModel model) throws ModelException\n\t{\n\t\tRelationshipElement old = getInverseRelationship(model);\n\n\t\tif ((old != inverseRelationship) || ((inverseRelationship == null) && \n\t\t\t(getInverseRelationshipName() != null)))\n\t\t{\n\t\t\t// clear old inverse which still points to here\n\t\t\tif (old != null)\n\t\t\t{\n\t\t\t\tRelationshipElement oldInverse = \n\t\t\t\t\told.getInverseRelationship(model);\n\n\t\t\t\tif (this.equals(oldInverse))\n\t\t\t\t\told.changeInverseRelationship(null);\n\t\t\t}\n\n\t\t\t// link from here to new inverse\n\t\t\tchangeInverseRelationship(inverseRelationship);\n\n\t\t\t// link from new inverse back to here\n\t\t\tif (inverseRelationship != null)\n\t\t\t\tinverseRelationship.changeInverseRelationship(this);\n\t\t}\n\t}",
"public Long getRelateId() {\n return relateId;\n }",
"@Test public void springProxies() {\n\t\tlong initialCount = targetRepo.count();\n\t\tContact contact = new Contact();\n\t\tcontact.setFirstname(\"Mickey\");\n\t\tcontact.setLastname(\"Mouse\");\n\t\ttargetRepo.save(contact);\n\t\tAssert.assertEquals(\n\t\t\tinitialCount+1,\n\t\t\ttargetRepo.count()\n\t\t);\n\t}",
"protected void renameAliasReference(String from, String to)\n {\n if(castor.getCastorRelationChoice().getOneToMany().getFromAlias().equals(from))\n castor.getCastorRelationChoice().getOneToMany().setFromAlias(to);\n \n if(castor.getCastorRelationChoice().getOneToMany().getToAlias().equals(from))\n castor.getCastorRelationChoice().getOneToMany().setToAlias(to);\n }",
"public interface Impl extends PersistenceFieldElement.Impl\n\t{\n\t\t/** Get the update action for this relationship element.\n\t\t * @return the update action, one of {@link #NONE_ACTION}, \n\t\t * {@link #NULLIFY_ACTION}, {@link #RESTRICT_ACTION}, \n\t\t * {@link #CASCADE_ACTION}, or {@link #AGGREGATE_ACTION}\n\t\t */\n\t\tpublic int getUpdateAction ();\n\n\t\t/** Set the update action for this relationship element.\n\t\t * @param action - an integer indicating the update action, one of:\n\t\t * {@link #NONE_ACTION}, {@link #NULLIFY_ACTION}, \n\t\t * {@link #RESTRICT_ACTION}, {@link #CASCADE_ACTION}, or \n\t\t * {@link #AGGREGATE_ACTION}\n\t\t * @exception ModelException if impossible\n\t\t */\n\t\tpublic void setUpdateAction (int action) throws ModelException;\n\n\t\t/** Get the delete action for this relationship element.\n\t\t * @return the delete action, one of {@link #NONE_ACTION}, \n\t\t * {@link #NULLIFY_ACTION}, {@link #RESTRICT_ACTION}, \n\t\t * {@link #CASCADE_ACTION}, or {@link #AGGREGATE_ACTION}\n\t\t */\n\t\tpublic int getDeleteAction ();\n\n\t\t/** Set the delete action for this relationship element.\n\t\t * @param action - an integer indicating the delete action, one of:\n\t\t * {@link #NONE_ACTION}, {@link #NULLIFY_ACTION}, \n\t\t * {@link #RESTRICT_ACTION}, {@link #CASCADE_ACTION}, or \n\t\t * {@link #AGGREGATE_ACTION}\n\t\t * @exception ModelException if impossible\n\t\t */\n\t\tpublic void setDeleteAction (int action) throws ModelException;\n\n\t\t/** Determines whether this relationship element should prefetch or not.\n\t\t * @return <code>true</code> if the relationship should prefetch, \n\t\t * <code>false</code> otherwise\n\t\t */\n\t\tpublic boolean isPrefetch ();\n\n\t\t/** Set whether this relationship element should prefetch or not.\n\t\t * @param flag - if <code>true</code>, the relationship is set to \n\t\t * prefetch; otherwise, it is not\n\t\t * @exception ModelException if impossible\n\t\t */\n\t\tpublic void setPrefetch (boolean flag) throws ModelException;\n\n\t\t/** Get the lower cardinality bound for this relationship element.\n\t\t * @return the lower cardinality bound\n\t\t */\n\t\tpublic int getLowerBound ();\n\n\t\t/** Set the lower cardinality bound for this relationship element.\n\t\t * @param lowerBound - an integer indicating the lower cardinality bound\n\t\t * @exception ModelException if impossible\n\t\t */\n\t\tpublic void setLowerBound (int lowerBound) throws ModelException;\n\n\t\t/** Get the upper cardinality bound for this relationship element. \n\t\t * Returns {@link java.lang.Integer#MAX_VALUE} for <code>n</code>\n\t\t * @return the upper cardinality bound\n\t\t */\n\t\tpublic int getUpperBound ();\n\n\t\t/** Set the upper cardinality bound for this relationship element.\n\t\t * @param upperBound - an integer indicating the upper cardinality bound\n\t\t * (use {@link java.lang.Integer#MAX_VALUE} for <code>n</code>)\n\t\t * @exception ModelException if impossible\n\t\t */\n\t\tpublic void setUpperBound (int upperBound) throws ModelException;\n\n\t\t/** Get the collection class (for example Set, List, Vector, etc.)\n\t\t * for this relationship element.\n\t\t * @return the collection class\n\t\t */\n\t\tpublic String getCollectionClass ();\n\n\t\t/** Set the collection class for this relationship element.\n\t\t * @param collectionClass - a string indicating the type of \n\t\t * collection (for example Set, List, Vector, etc.)\n\t\t * @exception ModelException if impossible\n\t\t */\n\t\tpublic void setCollectionClass (String collectionClass)\n\t\t\tthrows ModelException;\n\n\t\t/** Get the element class for this relationship element. If primitive \n\t\t * types are supported, you can use \n\t\t * <code><i>wrapperclass</i>.TYPE.toString()</code> to specify them.\n\t\t * @return the element class\n\t\t */\n\t\tpublic String getElementClass ();\n\n\t\t/** Set the element class for this relationship element.\n\t\t * @param elementClass - a string indicating the type of elements \n\t\t * in the collection. If primitive types are supported, you can use \n\t\t * <code><i>wrapperclass</i>.TYPE.toString()</code> to specify them.\n\t\t * @exception ModelException if impossible\n\t\t */\n\t\tpublic void setElementClass (String elementClass) throws ModelException;\n\n\t\t/** Get the relative name of the inverse relationship field for this \n\t\t * relationship element. In the case of two-way relationships, the two \n\t\t * relationship elements involved are inverses of each other. If this \n\t\t * relationship element does not participate in a two-way relationship, \n\t\t * this returns <code>null</code>. Note that it is possible to have \n\t\t * this method return a value, but because of the combination of \n\t\t * related class and lookup, there may be no corresponding \n\t\t * RelationshipElement which can be found.\n\t\t * @return the relative name of the inverse relationship element\n\t\t * @see #getInverseRelationship\n\t\t */\n\t\tpublic String getInverseRelationshipName ();\n\n\t\t/** Changes the inverse relationship element for this relationship \n\t\t * element. This method is invoked for both sides from \n\t\t * {@link RelationshipElement#setInverseRelationship} and should handle \n\t\t * the vetoable change events, property change events, and setting the \n\t\t * internal variable. \n\t\t * @param inverseRelationship - a relationship element to be used as \n\t\t * the inverse for this relationship element or <code>null</code> if \n\t\t * this relationship element does not participate in a two-way \n\t\t * relationship.\n\t\t * @exception ModelException if impossible\n\t\t */\n\t\tpublic void changeInverseRelationship (\n\t\t\tRelationshipElement inverseRelationship) throws ModelException;\n\t}",
"public TmRelationship() {\n this(\"TM_RELATIONSHIP\", null);\n }",
"@Override\n public Set<Edge<PhysicalObject>> getRelationBetweenObjects() {\n assert false : \"shouldn't call this method\";\n return null;\n }",
"protected void populate(EdaContext xContext, ResultSet rs) \n\tthrows SQLException, IcofException {\n\n\t\tsetId(rs.getLong(ID_COL));\n\t\tsetFromChangeReq(xContext, rs.getLong(FROM_ID_COL));\n\t\tsetToChangeReq(xContext, rs.getLong(TO_ID_COL));\n\t\tsetRelationship(rs.getString(RELATIONSHIP_COL));\n\t\tsetLoadFromDb(true);\n\n\t}",
"public void attach(final E entity) {\n if (entity.getId() != null) return;\n entity.setId(this.getNextId());\n this.entities.add(entity);\n this.id2entity.put(entity.getId(), entity);\n }",
"@Override\n\t@PersistenceContext(unitName=\"PU-POC\")\t\n\tpublic void setEntityManager(EntityManager entityManager) {\n\t\tsuper.setEntityManager(entityManager);\n\t}",
"protected void sequence_AttributeReference_SetAssignment(ISerializationContext context, AttributeReference semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}",
"public Relation setDeepRelation(XDI3Segment contextNodeXri, XDI3Segment arcXri, ContextNode targetContextNode);",
"EReference getRelationReference();",
"private <T> Mono<T> processRelations(\n\t\t\tNeo4jPersistentEntity<?> neo4jPersistentEntity,\n\t\t\tPersistentPropertyAccessor<?> parentPropertyAccessor,\n\t\t\tboolean isParentObjectNew,\n\t\t\tNestedRelationshipProcessingStateMachine stateMachine,\n\t\t\tPropertyFilter includeProperty\n\t) {\n\n\t\tPropertyFilter.RelaxedPropertyPath startingPropertyPath = PropertyFilter.RelaxedPropertyPath.withRootType(neo4jPersistentEntity.getUnderlyingClass());\n\t\treturn processNestedRelations(neo4jPersistentEntity, parentPropertyAccessor, isParentObjectNew,\n\t\t\t\tstateMachine, includeProperty, startingPropertyPath);\n\t}",
"public Relations() {\n relations = new ArrayList();\n }",
"public void setEntityHere(Entity setThis) {\n \n entityHere_ = setThis;\n \n }",
"private void attachEntity(Usuario entity) {\n }",
"public boolean resolve(RelationInjectionManager injection);",
"public <A> void createUnidirectional(DeployBeanDescriptor<?> targetDesc, Class<A> targetType, BeanTable beanTable, DeployTableJoin oneToManyJoin) {\n\n // create the 'shadow' unidirectional property\n // which is put on the target descriptor\n DeployBeanPropertyAssocOne<A> unidirectional = new DeployBeanPropertyAssocOne<>(targetDesc, targetType);\n unidirectional.setUndirectionalShadow();\n unidirectional.setNullable(false);\n unidirectional.setDbRead(true);\n unidirectional.setDbInsertable(true);\n unidirectional.setDbUpdateable(false);\n unidirectional.setBeanTable(beanTable);\n unidirectional.setName(beanTable.getBaseTable());\n unidirectional.setJoinType(true);\n unidirectional.setJoinColumns(oneToManyJoin.columns(), true);\n\n targetDesc.setUnidirectional(unidirectional);\n }",
"@Override\n protected void forceRefresh() {\n if (getEntity() != null) {\n super.forceRefresh();\n }\n }",
"public void updateIdentities() {\n // get a list of the internal conversation addresses\n ArrayList<String> addresses = new ArrayList<>();\n for (int i = 0; i < size(); i++)\n addresses.add(get(i).getFromAddress());\n\n // retrieve and set the identities of the internal addresses\n ArrayList<String> identities = retrieveIdentities(addresses);\n for (int i = 0; i < size(); i++)\n get(i).setIdentity(identities.get(i));\n }",
"public void toEntity(){\n\n }",
"void readAssociations() {\n // proxy the collections for lazy loading\n Class c = getClass();\n for (Field f : c.getDeclaredFields()) {\n for (Annotation a : f.getAnnotations()) {\n if (a.annotationType().equals(HasMany.class)) {\n HasManyProxy proxyHandler = new HasManyProxy(this, f, (HasMany) a);\n associationProxies.add(proxyHandler);\n Classes.setFieldValue(this, f.getName(), Proxy.newProxyInstance(List.class.getClassLoader(),\n new Class[]{List.class}, proxyHandler));\n } else if (a.annotationType().equals(HasAndBelongsToMany.class)) {\n // TODO implement\n } else if (a.annotationType().equals(HasOne.class)) {\n // TODO implement\n } else if (a.annotationType().equals(BelongsTo.class)) {\n BelongsTo belongsTo = (BelongsTo) a;\n if (!(f.getGenericType() instanceof Class))\n throw new IllegalAnnotationException(\"@BelongsTo can only be applied to non-generic fields\");\n ActiveRecord ar = (ActiveRecord) Classes.newInstance(f.getGenericType());\n String fk = ActiveRecords.foriegnKey(f.getGenericType());\n if (!belongsTo.foreignKey().equals(\"\")) fk = belongsTo.foreignKey();\n System.out.println(\"foriegn key = \" + fk);\n Object fkValue = Classes.getFieldValue(this, fk);\n if (fkValue != null) {\n ar.read(fkValue);\n Classes.setFieldValue(this, f.getName(), ar);\n }\n }\n }\n }\n }",
"public CuentaEntity toEntity() {\r\n CuentaEntity cuentaE = super.toEntity();\r\n if (this.tarjeta != null) {\r\n if (!this.tarjeta.isEmpty()) {\r\n List<TarjetaEntity> tarjetasEntity = new ArrayList<>();\r\n for (TarjetaDTO dtoTarjeta : tarjeta) {\r\n tarjetasEntity.add(dtoTarjeta.toEntity());\r\n }\r\n cuentaE.setTarjeta(tarjetasEntity);\r\n }\r\n }\r\n if (this.ordenPagos != null) {\r\n if (!this.ordenPagos.isEmpty()) {\r\n List<OrdenPagoEntity> ordenesEntity = new ArrayList<>();\r\n for (OrdenPagoDTO dtoOrdenPago : ordenPagos) {\r\n ordenesEntity.add(dtoOrdenPago.toEntity());\r\n }\r\n cuentaE.setOrdenPagos(ordenesEntity);\r\n }\r\n }\r\n \r\n if (this.estudiante != null) {\r\n System.out.println(\"---------------------------------------------------343434343\");\r\n EstudianteEntity es = estudiante.toEntity();\r\n cuentaE.setEstudiante(es);\r\n System.out.println(es.getDocumento());\r\n System.out.println(cuentaE.getEstudiante());\r\n System.out.println(cuentaE.getEstudiante().getDocumento());\r\n }\r\n\r\n return cuentaE;\r\n }",
"private void setupDependentEntities(final BwEvent val) throws CalFacadeException {\n if (val.getAlarms() != null) {\n for (BwAlarm alarm: val.getAlarms()) {\n alarm.setEvent(val);\n alarm.setOwnerHref(getUser().getPrincipalRef());\n }\n }\n }",
"public void attach(final Object self)\n throws IllegalArgumentException, IllegalAccessException, NoSuchMethodException,\n InvocationTargetException {\n for (Class<?> currentClass = self.getClass(); currentClass != Object.class; ) {\n if (Proxy.class.isAssignableFrom(currentClass)) {\n currentClass = currentClass.getSuperclass();\n continue;\n }\n for (Field f : currentClass.getDeclaredFields()) {\n final String fieldName = f.getName();\n final Class<?> declaringClass = f.getDeclaringClass();\n\n if (OObjectEntitySerializer.isTransientField(declaringClass, fieldName)\n || OObjectEntitySerializer.isVersionField(declaringClass, fieldName)\n || OObjectEntitySerializer.isIdField(declaringClass, fieldName)) continue;\n\n Object value = OObjectEntitySerializer.getFieldValue(f, self);\n value = setValue(self, fieldName, value);\n OObjectEntitySerializer.setFieldValue(f, self, value);\n }\n currentClass = currentClass.getSuperclass();\n\n if (currentClass == null || currentClass.equals(ODocument.class))\n // POJO EXTENDS ODOCUMENT: SPECIAL CASE: AVOID TO CONSIDER\n // ODOCUMENT FIELDS\n currentClass = Object.class;\n }\n }",
"public final native void setRelationship(String relationship) /*-{\n this.setRelationship(relationship);\n }-*/;",
"@Override\n public void updateRelationship(LineageRelationship lineageRelationship) {\n GraphTraversalSource g = graphFactory.getGraphTraversalSource();\n Iterator<Edge> edge = g.E().has(PROPERTY_KEY_RELATIONSHIP_GUID, lineageRelationship.getGuid());\n if (!edge.hasNext()) {\n log.debug(EDGE_GUID_NOT_FOUND_WHEN_UPDATE, lineageRelationship.getGuid());\n rollbackTransaction(g);\n return;\n }\n commit(graphFactory, g, this::addOrUpdatePropertiesEdge, g, lineageRelationship, PROPERTIES_UPDATE_EXCEPTION);\n }",
"public void Alterar(TarefaEntity tarefaEntity){\n \n\t\tthis.entityManager.getTransaction().begin();\n\t\tthis.entityManager.merge(tarefaEntity);\n\t\tthis.entityManager.getTransaction().commit();\n\t}",
"@Override\n\tpublic void orphan(DBSet db, boolean asPack) \n\t{\n\t\tdb.getAddressPersonMap().removeItem(this.recipient.getAddress());\n\t\tdb.getPersonAddressMap().removeItem(this.key, this.recipient.getAddress());\n\n\t\t//UPDATE REFERENCE OF CREATOR\n\t\t// not needthis.creator.setLastReference(this.reference, db);\t\t\n\t\t//UPDATE REFERENCE OF RECIPIENT\n\t\tthis.recipient.removeReference(db);\n\t}",
"private void checkMappedByManyToMany(DeployBeanPropertyAssocMany<?> prop) {\n // get the bean descriptor that holds the mappedBy property\n String mappedBy = prop.getMappedBy();\n if (mappedBy == null) {\n if (targetDescriptor(prop).isDraftable()) {\n prop.setIntersectionDraftTable();\n }\n return;\n }\n\n // get the mappedBy property\n DeployBeanDescriptor<?> targetDesc = targetDescriptor(prop);\n DeployBeanPropertyAssocMany<?> mappedAssocMany = mappedManyToMany(prop, mappedBy, targetDesc);\n\n // define the relationships/joins on this side as the\n // reverse of the other mappedBy side ...\n DeployTableJoin mappedIntJoin = mappedAssocMany.getIntersectionJoin();\n DeployTableJoin mappendInverseJoin = mappedAssocMany.getInverseJoin();\n\n String intTableName = mappedIntJoin.getTable();\n\n DeployTableJoin tableJoin = prop.getTableJoin();\n mappedIntJoin.copyTo(tableJoin, true, targetDesc.getBaseTable());\n\n DeployTableJoin intJoin = new DeployTableJoin();\n mappendInverseJoin.copyTo(intJoin, false, intTableName);\n prop.setIntersectionJoin(intJoin);\n\n DeployTableJoin inverseJoin = new DeployTableJoin();\n mappedIntJoin.copyTo(inverseJoin, false, intTableName);\n prop.setInverseJoin(inverseJoin);\n\n if (targetDesc.isDraftable()) {\n prop.setIntersectionDraftTable();\n }\n }",
"DefinedProperty relChangeProperty( long relId, int propertyKey, Object value );",
"public void atualizar(RelatorioDAO obj) {\n\t\t\n\t}",
"public void write(Entity localEntity, Object foreignEntity) {\n _propertyGateway.write(localEntity, foreignEntity);\n }",
"@Override\n public void upsertRelationship(LineageRelationship lineageRelationship) {\n GraphTraversalSource g = graphFactory.getGraphTraversalSource();\n LineageEntity firstEnd = lineageRelationship.getSourceEntity();\n LineageEntity secondEnd = lineageRelationship.getTargetEntity();\n\n upsertToGraph(firstEnd, secondEnd, lineageRelationship.getTypeDefName(), lineageRelationship.getGuid());\n\n BiConsumer<GraphTraversalSource, LineageRelationship> addOrUpdatePropertiesEdge = this::addOrUpdatePropertiesEdge;\n commit(graphFactory, g, addOrUpdatePropertiesEdge, g, lineageRelationship,\n UNABLE_TO_ADD_PROPERTIES_ON_EDGE_FROM_RELATIONSHIP_WITH_TYPE +\n lineageRelationship.getTypeDefName() + AND_GUID + lineageRelationship.getGuid());\n }",
"private void updateOrCreate(Resource subject, Property property, Object o) {\r\n\t\tStatement existingRelation = subject.getProperty(property);\r\n\t\tif (existingRelation != null)\r\n\t\t\tsubject.removeAll(property);\r\n\t\tsubject.addProperty(property, _write(o, true));\r\n\t}",
"@Override\n protected void resetEntitySubClass ()\n {\n super.resetEntitySubClass ();\n }",
"@Test\n\tpublic void testSetValueMult1to1OverwriteInverse() {\n\n\t\t// set up\n\t\tPerson martin = new Person(\"\\\"Bl�mel\\\" \\\"Martin\\\" \\\"19641014\\\"\");\n\t\tPerson jojo = new Person(\"\\\"Bl�mel\\\" \\\"Johannes\\\" \\\"19641014\\\"\");\n\t\tTestUser user = new TestUser(\"admin\");\n\t\tuser.setPerson(jojo);\n\t\tAssert.assertSame(jojo, user.getPerson());\n\t\tAssert.assertSame(user, jojo.getUser());\n\t\tAssert.assertNull(martin.getUser());\n\n\t\t// test: relink martin to user (other way round)\n\t\tmartin.setUser(user);\n\t\tAssert.assertSame(martin, user.getPerson());\n\t\tAssert.assertSame(user, martin.getUser());\n\t\tAssert.assertNull(jojo.getUser());\n\t}",
"org.hl7.fhir.ObservationRelated addNewRelated();",
"@Override\n protected void mergeModel_Organization( Model target, Model source, boolean sourceDominant,\n Map<Object, Object> context )\n {\n Organization src = source.getOrganization();\n if ( source.getOrganization() != null )\n {\n Organization tgt = target.getOrganization();\n if ( tgt == null )\n {\n target.setOrganization( tgt = new Organization() );\n mergeOrganization( tgt, src, sourceDominant, context );\n }\n }\n }",
"public void entityReference(String name);",
"public void setProjectRelatedByRelProjectIdKey(ObjectKey key) throws TorqueException\n {\n \n setRelProjectId(((NumberKey) key).intValue());\n }",
"@Override\n public EntityResolver getEntityResolver() {\n return entityResolver;\n }",
"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, Bundles to_add) {\n String fm_pre = \"\", to_pre = \"\";\n\n // DEBUG\n // System.err.println(\"fm_field =\\\"\" + fm_field + \"\\\"\"); System.err.println(\"fm_symbol=\\\"\" + fm_symbol_str + \"\\\"\"); System.err.println(\"fm_typed =\\\"\" + fm_typed + \"\\\"\");\n // System.err.println(\"to_field =\\\"\" + to_field + \"\\\"\"); System.err.println(\"to_symbol=\\\"\" + to_symbol_str + \"\\\"\"); System.err.println(\"to_typed =\\\"\" + to_typed + \"\\\"\");\n\n if (fm_typed) fm_pre = fm_field + BundlesDT.DELIM;\n if (to_typed) to_pre = to_field + BundlesDT.DELIM;\n\n Utils.Symbol fm_symbol = Utils.parseSymbol(fm_symbol_str),\n to_symbol = Utils.parseSymbol(to_symbol_str);\n\n // Keep track of existing relationships, update the longer term ones\n String encoded_relationship_str = Utils.encToURL(fm_field) + BundlesDT.DELIM + Utils.encToURL(fm_symbol_str) + BundlesDT.DELIM + Utils.encToURL(\"\" + fm_typed) + BundlesDT.DELIM +\n\t\t\t\t Utils.encToURL(to_field) + BundlesDT.DELIM + Utils.encToURL(to_symbol_str) + BundlesDT.DELIM + Utils.encToURL(\"\" + to_typed) + BundlesDT.DELIM +\n\t\t\t\t Utils.encToURL(style_str) + BundlesDT.DELIM + Utils.encToURL(\"\" + ignore_ns);\n if (active_relationships.contains(encoded_relationship_str) == false) active_relationships.add(encoded_relationship_str);\n if (built_in == false) updateRecentRelationships(encoded_relationship_str);\n // Is this an addition or from scratch?\n Bundles bundles; if (to_add == null) bundles = getRTParent().getRootBundles(); else bundles = to_add;\n BundlesG globals = bundles.getGlobals();\n // Go through the tablets\n Iterator<Tablet> it_tablet = bundles.tabletIterator();\n while (it_tablet.hasNext()) {\n Tablet tablet = it_tablet.next();\n\t// Check to see if this table will complete both blanks, if so, go through the bundles adding the edges to the graphs\n\tif (KeyMaker.tabletCompletesBlank(tablet,fm_field) && KeyMaker.tabletCompletesBlank(tablet,to_field)) {\n\t // Create the key makers\n\t KeyMaker fm_km = new KeyMaker(tablet,fm_field), to_km = new KeyMaker(tablet,to_field);\n\t // Go through the bundles\n\t Iterator<Bundle> it_bundle = tablet.bundleIterator();\n\t while (it_bundle.hasNext()) {\n\t Bundle bundle = it_bundle.next();\n\t // Create the combinator for the from and to keys\n\t String fm_keys[], to_keys[];\n // Transform the bundle to keys\n\t fm_keys = fm_km.stringKeys(bundle);\n\t to_keys = to_km.stringKeys(bundle);\n\t // Make the relationships\n if (fm_keys != null && fm_keys.length > 0 && to_keys != null && to_keys.length > 0) {\n for (int i=0;i<fm_keys.length;i++) for (int j=0;j<to_keys.length;j++) {\n\t // Check for not sets if the flag is specified\n if (ignore_ns && (fm_keys[i].equals(BundlesDT.NOTSET) || to_keys[j].equals(BundlesDT.NOTSET))) continue;\n\t\t// The key will be a combination of the header and the entity\n String fm_fin = fm_pre + fm_keys[i], to_fin = to_pre + to_keys[j];\n\t\t// If we're in retain mode only, make sure both nodes exist in the set\n\t\tif (retained_nodes != null && retained_nodes.size() > 0 && (retained_nodes.contains(fm_fin) == false || retained_nodes.contains(to_fin) == false)) continue;\n // Set the shape\n if (entity_to_shape.containsKey(fm_fin) == false) entity_to_shape.put(fm_fin, fm_symbol);\n\t\tif (entity_to_shape.containsKey(to_fin) == false) entity_to_shape.put(to_fin, to_symbol);\n // Create the initial world coordinate and transform as appropriate \n\t\tif (entity_to_wxy.containsKey(fm_fin) == false) { \n\t\t entity_to_wxy.put(fm_fin, new Point2D.Double(Math.random()*2 - 1, Math.random()*2 - 1));\n transform(fm_fin); }\n\t\tif (entity_to_wxy.containsKey(to_fin) == false) { \n\t\t entity_to_wxy.put(to_fin, new Point2D.Double(Math.random()*2 - 1, Math.random()*2 - 1));\n\t\t transform(to_fin); }\n // Add the reference back to this object\n graph.addNode(fm_fin); graph.addNode(to_fin);\n digraph.addNode(fm_fin); digraph.addNode(to_fin);\n // Set the weights equal to the number of bundles on the edge\n double previous_weight = graph.getConnectionWeight( graph.getEntityIndex(fm_fin), graph.getEntityIndex(to_fin)),\n di_previous_weight = digraph.getConnectionWeight(digraph.getEntityIndex(fm_fin), digraph.getEntityIndex(to_fin));\n // Check for infinite because the graph class returns infinite if two nodes are not connected\n if (Double.isInfinite( previous_weight)) previous_weight = 0.0;\n if (Double.isInfinite(di_previous_weight)) di_previous_weight = 0.0;\n // Finally, add them to both forms of the graphs\n\t \t graph.addNeighbor(fm_fin, to_fin, previous_weight + 1.0);\n graph.addNeighbor(to_fin, fm_fin, previous_weight + 1.0);\n\t\tdigraph.addNeighbor(fm_fin, to_fin, di_previous_weight + 1.0);\n // System.err.println(\"RTGraphPanel.addRelationship() : \\\"\" + fm_fin + \"\\\" => \\\"\" + to_fin + \"\\\": w=\" + (previous_weight+1.0) + \" | di_w=\" + (di_previous_weight+1.0));\n\t\t graph.addLinkReference( graph.getEntityIndex(fm_fin), graph.getEntityIndex(to_fin), bundle);\n\t\t graph.addLinkReference( graph.getEntityIndex(to_fin), graph.getEntityIndex(fm_fin), bundle);\n\t\tdigraph.addLinkReference(digraph.getEntityIndex(fm_fin), digraph.getEntityIndex(to_fin), bundle);\n // Keep track of the link style\n digraph.addLinkStyle(digraph.getEntityIndex(fm_fin), digraph.getEntityIndex(to_fin), style_str);\n\t }\n\t }\n }\n\t}\n }\n // Nullify the biconnected components\n graph_bcc = null;\n graph2p_bcc = null;\n cluster_cos = null;\n conductance = null;\n // Re-render\n getRTComponent().render();\n }",
"private ManagedObject adopt(final EntityChangeTracker entityChangeTracker, final Object fetchedObject) {\n if(fetchedObject instanceof Persistable) {\n // an entity\n val entity = objectManager.adapt(fetchedObject);\n //fetchResultHandler.initializeEntityAfterFetched((Persistable) fetchedObject);\n entityChangeTracker.recognizeLoaded(entity);\n return entity;\n } else {\n // a value type\n return objectManager.adapt(fetchedObject);\n }\n }",
"public Product getProductRelatedByRelProductId() throws TorqueException\n {\n if (aProductRelatedByRelProductId == null && (this.relProductId != 0))\n {\n aProductRelatedByRelProductId = ProductPeer.retrieveByPK(SimpleKey.keyFor(this.relProductId));\n \n /* The following can be used instead of the line above to\n guarantee the related object contains a reference\n to this object, but this level of coupling\n may be undesirable in many circumstances.\n As it can lead to a db query with many results that may\n never be used.\n Product obj = ProductPeer.retrieveByPK(this.relProductId);\n obj.addNewslettersRelatedByRelProductId(this);\n */\n }\n return aProductRelatedByRelProductId;\n }",
"public void cascadePersist(\n final RDFEntityManager rdfEntityManager,\n final URI overrideContext) {\n //Preconditions\n assert rdfEntityManager != null : \"rdfEntityManager must not be null\";\n\n cascadePersist(this, rdfEntityManager, overrideContext);\n }",
"public void setPrefetch (boolean flag) throws ModelException\n\t{\n\t\tgetRelationshipImpl().setPrefetch(flag);\n\t}",
"@Override\n\t\tpublic Iterable<Relationship> getRelationships() {\n\t\t\treturn null;\n\t\t}",
"private void setUpRelations() {\n g[0].getAuthorities().add(a[0]);\n g[1].getAuthorities().add(a[0]);\n g[1].getAuthorities().add(a[1]);\n g[2].getAuthorities().add(a[2]);\n\n u[0].getGroups().add(g[0]);\n u[0].getOwnAuthorities().add(a[2]);\n u[1].getGroups().add(g[1]);\n u[1].getOwnAuthorities().add(a[2]);\n u[2].getOwnAuthorities().add(a[2]);\n u[2].getOwnAuthorities().add(a[3]);\n u[3].getGroups().add(g[1]);\n u[3].getGroups().add(g[2]);\n merge();\n }",
"boolean isSetFurtherRelations();",
"public void setTransitive(boolean transitive) {\n this.transitive = transitive;\n }",
"@Override\n public Entity getEntity() {\n return super.getEntity();\n }",
"public Relationship getRelationship() {\n\t\treturn relationship;\n\t}"
] | [
"0.5940735",
"0.5846391",
"0.5734578",
"0.56806374",
"0.56424737",
"0.55891424",
"0.55707717",
"0.55027515",
"0.5477861",
"0.54467994",
"0.54185194",
"0.53971165",
"0.5334147",
"0.53232676",
"0.5309395",
"0.5305609",
"0.52375084",
"0.5197301",
"0.5191754",
"0.5176072",
"0.51541835",
"0.51154864",
"0.5097661",
"0.5078938",
"0.50510186",
"0.50438243",
"0.50313264",
"0.50302756",
"0.49699172",
"0.4950706",
"0.49453896",
"0.49361923",
"0.49315247",
"0.4931287",
"0.49240693",
"0.4919452",
"0.49097985",
"0.4904161",
"0.48791388",
"0.48758072",
"0.48656243",
"0.48647627",
"0.4863033",
"0.4862705",
"0.4862213",
"0.4861135",
"0.48499337",
"0.48344773",
"0.48225424",
"0.4819412",
"0.48037782",
"0.4799889",
"0.47930065",
"0.47924644",
"0.47875336",
"0.4781176",
"0.47792107",
"0.47753292",
"0.47687355",
"0.47614112",
"0.47591868",
"0.47412577",
"0.47362298",
"0.4734504",
"0.47342902",
"0.47290325",
"0.47273389",
"0.4723773",
"0.47226778",
"0.47191235",
"0.47122702",
"0.47105753",
"0.47101825",
"0.47052354",
"0.46978354",
"0.4687775",
"0.46848392",
"0.4675657",
"0.4674543",
"0.46740013",
"0.467349",
"0.46720973",
"0.4669922",
"0.46673164",
"0.46644962",
"0.4660943",
"0.46581912",
"0.46519932",
"0.46482593",
"0.4647727",
"0.46464032",
"0.46431497",
"0.46402535",
"0.4635854",
"0.46304938",
"0.46291456",
"0.46291342",
"0.46290404",
"0.4627387",
"0.46198827",
"0.46186247"
] | 0.0 | -1 |
Resets a tomany relationship, making the next get call to query for a fresh result. | public synchronized void resetBMessageReceiptList() {
bMessageReceiptList = null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void unsetFurtherRelations();",
"public void resetRelatesToList(MappingType mapping) {\n\t\tmapping.getRelatesTo().clear();\n\t}",
"void clearAssociations();",
"public void resetIds()\r\n {\r\n this.ids = null;\r\n }",
"public void resetAll() {\n reset(getAll());\n }",
"public void delIncomingRelations();",
"@Override\n public void reset()\n {\n this.titles = new ABR();\n this.years = new ABR();\n this.votes = new ABR();\n this.director = new ABR();\n\n for(int i = 0; i < this.movies.length; i++)\n this.movies.set(i, null);\n }",
"public void delRelations();",
"public void unAssignFromAllGames() {\n for (Game game : getGames()) {\n game.unAssignReferee(this);\n }\n //EntityManager.getInstance().unAssignRefereeFromAllGames(this); //Check:Should be covered with CASCADE\n this.seasons = new ArrayList<>();\n }",
"@Override\n public void reset() {\n iterator = collection.iterator();\n }",
"public void reset ()\n {\n final String METHOD_NAME = \"reset()\";\n this.logDebug(METHOD_NAME + \" 1/2: Started\");\n super.reset();\n this.lid = null;\n this.refId = Id.UNDEFINED;\n this.fromDocType = DocType.UNDEFINED;\n this.logDebug(METHOD_NAME + \" 2/2: Done\");\n }",
"public abstract void resetQuery();",
"public void resetReversePoison() {\n\n Set<AS> prevAdvedTo = this.adjOutRib.get(this.asn * -1);\n\n if (prevAdvedTo != null) {\n for (AS pAS : prevAdvedTo) {\n pAS.withdrawPath(this, this.asn * -1);\n }\n }\n\n this.adjOutRib.remove(this.asn * -1);\n\n this.botSet = new HashSet<>();\n }",
"protected void reset() {\n\t\tadaptees.clear();\n\t}",
"@Override\n\tpublic void resetToExisting() {\n\t\t\n\t}",
"private void reset() {\r\n\t\t\tref.set(new CountDownLatch(parties));\r\n\t\t}",
"public void unAssignFromAllSeasons() {\n for (Season season : getSeasons()) {\n season.unAssignReferee(this);\n }\n //EntityManager.getInstance().unAssignRefereeFromAllSeasons(this); //Check:Should be covered with CASCADE\n this.seasons = new ArrayList<>();\n }",
"public void resetSkills()\r\n\t{\r\n\t\t// TODO Keep Skill List upto date\r\n\t\tfarming = 0;\r\n\t}",
"public void clearPolymorphismTairObjectId() {\n // Override in proxy if lazily loaded; otherwise does nothing\n }",
"private void recreateModel() {\n items = null;\n didItCountAlready = false;\n }",
"public void reset() {\n this.isExhausted = false;\n }",
"private <T extends IEntity> void clearRetrieveValues(T entity) {\n Key pk = entity.getPrimaryKey();\n entity.clear();\n entity.setPrimaryKey(pk);\n }",
"void reset() {\n\t\t\t_orderID = UNMARKED;\n\t\t\t_outgoingEdges.clear();\n\t\t\t//TODO when do we call this? when should we mark all edges as received?\n\t\t\tfor(Edge e : _neighborEdges.keySet()) {\n\t\t\t\t_neighborEdges.put(e, false);\n\t\t\t}\n\t\t}",
"GroupQueryBuilder reset();",
"@Generated\n public synchronized void resetProveedores() {\n proveedores = null;\n }",
"public void manyToManyDeleteOwningSideTest() throws Exception {\n EntityManager em = createEntityManager();\n \n em.getTransaction().begin();\n \n EntityA a1 = new EntityA();\n a1.setName(\"EntityA1\");\n EntityB b1 = new EntityB();\n b1.setName(\"EntityB1\");\n\n a1.getBs().add(b1);\n b1.getAs().add(a1);\n\n em.persist(a1);\n\n em.getTransaction().commit();\n\n Integer idA1 = a1.getId();\n Integer idB1 = b1.getId();\n \n em.getTransaction().begin();\n \n // remove the relationship\n a1.getBs().remove(b1);\n b1.getAs().remove(a1);\n\n // remove the non-owning side\n em.remove(a1);\n try {\n em.getTransaction().commit();\n } catch (RuntimeException ex) {\n if (em.getTransaction().isActive()) {\n em.getTransaction().rollback();\n }\n em.close();\n \n throw ex;\n }\n \n clearCache();\n \n assertTrue(\"EntityA a1 should have been removed!\", \n em.createQuery(\"SELECT a FROM EntityA a WHERE a.id = ?1\").setParameter(1, idA1).getResultList().size() == 0);\n assertTrue(\"EntityB b1 should not have been removed!\", \n em.createQuery(\"SELECT b FROM EntityB b WHERE b.id = ?1\").setParameter(1, idB1).getResultList().size() != 0);\n\n em.close();\n }",
"public synchronized void resetSales() {\n sales = null;\n }",
"public void resetTracking() {\n\t\tllahTrackingOps.clearDocuments();\n\t\ttrackId_to_globalId.clear();\n\t\tglobalId_to_track.clear();\n\t\transac.reset();\n\t}",
"public synchronized void clear() {\n _transient.clear();\n _persistent.clear();\n _references.clear();\n }",
"public void resetModification()\n {\n _modifiedSinceSave = false;\n }",
"public void reset() {\n serverReset(game.generateUIDs(data.getObjectCount()));\n }",
"public void reset() {\r\n\t\t//begin\r\n\t\tproducerList.clear();\r\n\t\tretailerList.clear();\r\n\t\tBroker.resetLists();\r\n\t\t//end\r\n\t}",
"void removeRelated(int i);",
"public void reset() {\n cancelTaskLoadOIFits();\n\n userCollection = new OiDataCollection();\n oiFitsCollection = new OIFitsCollection();\n oiFitsCollectionFile = null;\n selectedDataPointer = null;\n\n fireOIFitsCollectionChanged();\n }",
"public void resetArboles()\r\n {\r\n this.arboles = null;\r\n }",
"void reset()\n {\n reset(values);\n }",
"public void reset(){\n\t\tfrogReposition();\n\t\tlives = 5;\n\t\tend = 0;\n\t}",
"public synchronized void resetOrdenDBList() {\n ordenDBList = null;\n }",
"public void resetData() {\n user = new User();\n saveData();\n }",
"private void resetAll() {\n resetResources();\n resetStory();\n refresh();\n }",
"private void clearOtherId() {\n \n otherId_ = 0;\n }",
"public void unReset () {\n count = lastSave;\n }",
"@Override\n public Builder resetModel(boolean reallyReset) {\n super.resetModel(reallyReset);\n return this;\n }",
"public void clear() {\n entityManager.clear();\n }",
"public void clear()\n\t{\n\t\tobjectToId.clear();\n\t\tidToObject.clear();\n\t}",
"public void reset() {\n context.reset();\n state = State.NAME;\n }",
"public void reset(){\r\n barn.setVisited(Boolean.FALSE);\r\n turkeyTalk.setVisited(Boolean.FALSE);\r\n pigginOut.setVisited(Boolean.FALSE);\r\n seeTheLight.setVisited(Boolean.FALSE);\r\n theGobbling.setVisited(Boolean.FALSE);\r\n youDied1.setVisited(Boolean.FALSE);\r\n threeLittlePigs.setVisited(Boolean.FALSE);\r\n forTheGreaterGood.setVisited(Boolean.FALSE);\r\n farmHouseTurkey.setVisited(Boolean.FALSE);\r\n youWin.setVisited(Boolean.FALSE);\r\n }",
"public void reset() {\r\n properties.clear();\r\n }",
"protected void reset()\n {\n this.shapeDataCache.removeAllEntries();\n this.sector = null;\n }",
"public synchronized void resetCollections() {\n collections = null;\n }",
"public void reset()\n\t{\n\t\tassociations = new Vector<Association>();\n\t\tif(hotspots != null)\n\t\t{\n\t\t\tfor(int i=0; i < hotspots.size(); i++)\n\t\t\t{\n\t\t\t\thotspots.elementAt(i).bound = null;\n\t\t\t\thotspots.elementAt(i).setHighlighted(false);\n\t\t\t}\n\t\t}\n\n\t\tif(movableObjects != null)\n\t\t{\n\t\t\tfor(int i=0; i < movableObjects.size(); i++)\n\t\t\t{\n\t\t\t\tmovableObjects.elementAt(i).resetPos();\n\t\t\t\tmovableObjects.elementAt(i).bound = null;\n\t\t\t}\n\t\t}\n\t\tuser_responses=0;\n\t\tmov = null;\n\t\tstart = null;\n\t\tmpos = null;\n\t\tsetFeedback();\n\t\trepaint();\n\t}",
"public void revertChanges()\n {\n // TODO: Find a good way to revert changes\n // reload patient\n HibernateUtil.currentSession().evict(_dietTreatment.getModel());\n PatientDAO dao = DAOFactory.getInstance().getPatientDAO();\n _patient.setModel(dao.findById(_patient.getPatientId(), false));\n }",
"public void reset() {\n unvisitedPOIs = new LinkedList<>(instance.getPlaceOfInterests());\n unvisitedPOIs.remove(instance.getStartPOI());\n unvisitedPOIs.remove(instance.getEndPOI());\n\n // initially, all the unvisited POIs should be feasible.\n feasiblePOIs = new LinkedList<>(unvisitedPOIs);\n feasiblePOIs.remove(instance.getStartPOI());\n feasiblePOIs.remove(instance.getEndPOI());\n\n tour.reset(instance);\n currDay = 0;\n\n // update features for the feasible POIs\n for (PlaceOfInterest poi : feasiblePOIs)\n updateFeatures(poi);\n }",
"public void resetTipoRecurso()\r\n {\r\n this.tipoRecurso = null;\r\n }",
"public OccList reset()\n {\n size = 0;\n return this;\n }",
"public synchronized void reset() {\n for (TreeManagementModel model : mgrModels.values()) {\n model.reset();\n }\n }",
"public void reset () {\n lastSave = count;\n count = 0;\n }",
"@Override\n public void reset() throws IOException {\n lemmaListIndex = 0;\n lemmaList = Collections.emptyList();\n tagsList.clear();\n super.reset();\n }",
"public void rewind() throws DbException, TransactionAbortedException {\n child1.rewind();\n child2.rewind();\n this.leftMap.clear();\n this.rightMap.clear();\n }",
"public void clearBids(){\n this.bids.clear();\n setRequested();\n }",
"void resetData(ReadOnlyExpenseTracker newData) throws NoUserSelectedException;",
"public void clearAll() {\n\n realm.beginTransaction();\n realm.clear(PhotoGalleryModel.class);\n realm.commitTransaction();\n }",
"public void reset()\n {\n reset(this.map, this.heuristic, this.neighborSelector);\n }",
"public void clearLinks(){\r\n varContextObject=null; \r\n varContextFields=null; \r\n }",
"private void clearRefundTo() {\n refundTo_ = emptyProtobufList();\n }",
"public static void clearPreviousArtists(){previousArtists.clear();}",
"public static void reset()\n\t\t{\n\t\t\tfeatureSet = new THashMap();\n\t\t\tfeatureIds = new TObjectIntHashMap();\n\t\t\tnextID = 1;\t\t\t\n\t\t}",
"public void dispose() {\n\t\tSet<IRI> ids = new HashSet<IRI>(getModelIds());\n\t\tfor (IRI id : ids) {\n\t\t\tunlinkModel(id);\n\t\t}\n\t}",
"public void resetListaId()\r\n {\r\n this.listaId = null;\r\n }",
"public static void reset() {\n\t\tE_Location.THIS.reset();\n\t\tE_Resource.THIS.reset();\n\t\t\n\t\tT_Object.reset();\n\t\tT_Location.reset();\n\t\tT_Resource.reset();\n\t\t\n\t}",
"@Override\n public void resetAllValues() {\n }",
"void resetData(ReadOnlyAddressBook newData);",
"public void resetAllIdCounts() {\n \t\tthis.userCounterIdCounter = 0;\n \t\tthis.questionIdCounter = 0;\n \t\tthis.answerIdCounter = 0;\n \t\tthis.commentIdCounter = 0;\n \t}",
"@Override\r\n\tpublic void resetObject() {\n\t\t\r\n\t}",
"public void resetChanges() {\n\t\tthis.resetStatus();\n\t\ttheStructures.resetStatus();\n\n\t\tfireDocumentInit();\n\t}",
"protected void reset(Opportunities dto)\r\n\t{\r\n\t\tdto.setIdModified( false );\r\n\t\tdto.setSupplierIdModified( false );\r\n\t\tdto.setUniqueProductsModified( false );\r\n\t\tdto.setPortfolioModified( false );\r\n\t\tdto.setRecongnisationModified( false );\r\n\t\tdto.setKeyWordsModified( false );\r\n\t\tdto.setDateCreationModified( false );\r\n\t\tdto.setDateModificationModified( false );\r\n\t}",
"public void reset() {\n tpsAttentePerso = 0;\n tpsAttentePerso2 =0;\n \ttotalTime = 0;\n\tnbVisited = 0;\n moyenne =0;\n }",
"public void reset() {\n \titems.clear();\n \tsetProcessCount(0);\n }",
"public void reset(){\n star.clear();\n planet.clear();\n }",
"public void resetDescendants() {\n MapleFamilyCharacter mfc = getMFC(leaderid);\n if (mfc != null) {\n mfc.resetDescendants(this);\n }\n bDirty = true;\n }",
"public void reset() {\n this.list.clear();\n }",
"public void reset() {\n\t\t\twhile (requisitionItemGrid.getColumnCount() > 0)\n\t\t\t\trequisitionItemGrid.removeColumn(0);\n\n\t\t\tbmoRequisitionType = (BmoRequisitionType)requisitionTypeListBox.getSelectedBmObject();\n\t\t\tif (bmoRequisitionType == null)\n\t\t\t\tbmoRequisitionType = bmoRequisition.getBmoRequisitionType();\n\n\t\t\t// Crea las columnas\n\t\t\tsetColumns();\n\n\t\t\tupdateAmount(id);\n\t\t\tdata.list();\n\t\t\trequisitionItemGrid.redraw();\n\t\t}",
"public void reset() {\n resetData();\n postInvalidate();\n }",
"private void resetIdsToFind()\r\n\t{\r\n\t\t/*\r\n\t\t * Reset all lists of given search items to empty lists, indicating full\r\n\t\t * search without filtering, if no search items are added.\r\n\t\t */\r\n\t\tsetSpectrumIdsTarget(new ArrayList<String>());\r\n\t}",
"public void manyToManyDeleteNonOwningSideTest() throws Exception {\n EntityManager em = createEntityManager();\n \n em.getTransaction().begin();\n \n EntityA a1 = new EntityA();\n a1.setName(\"EntityA1\");\n EntityB b1 = new EntityB();\n b1.setName(\"EntityB1\");\n\n a1.getBs().add(b1);\n b1.getAs().add(a1);\n\n em.persist(a1);\n\n em.getTransaction().commit();\n\n Integer idA1 = a1.getId();\n Integer idB1 = b1.getId();\n \n em.getTransaction().begin();\n // remove the owning side\n em.remove(b1);\n try {\n em.getTransaction().commit();\n } catch (RuntimeException ex) {\n if (em.getTransaction().isActive()) {\n em.getTransaction().rollback();\n }\n em.close();\n \n throw ex;\n }\n \n clearCache();\n \n assertTrue(\"EntityA a1 should have been removed!\", \n em.createQuery(\"SELECT a FROM EntityA a WHERE a.id = ?1\").setParameter(1, idA1).getResultList().size() == 0);\n assertTrue(\"EntityB b1 should have been removed!\", \n em.createQuery(\"SELECT b FROM EntityB b WHERE b.id = ?1\").setParameter(1, idB1).getResultList().size() == 0);\n\n em.close();\n }",
"public void reset()\n {\n // put your code here\n position = 0;\n order = \"\";\n set[0] = 0;\n set[1] = 0;\n set[2] = 0;\n }",
"public void clear() throws ChangeVetoException;",
"void reset(boolean preparingForUpwardPass) {\n\t\t\t_orderID = UNMARKED;\n\t\t\t_outgoingEdges.clear();\n\t\t\t//TODO when do we call this? when should we mark all edges as received?\n\t\t\tfor(Edge e : getIncomingNeighborEdges(preparingForUpwardPass)) {\n\t\t\t\t_neighborEdges.put(e, false);\n\t\t\t}\n\t\t}",
"@Override\r\n\tprotected void ResetBaseObject() {\r\n\t\tsuper.ResetBaseObject();\r\n\r\n\t\t// new Base Object\r\n\t\tbaseEntity = new Chooseval();\r\n\r\n\t\t// new other Objects and set them into Base object\r\n\r\n\t\t// refresh Lists\r\n\t\tbaseEntityList = ChoosevalService.FindAll(\"id\", JPAOp.Asc);\r\n\t}",
"private void resetReference(ThingTimeTriple triple)\r\n/* 221: */ {\r\n/* 222:184 */ this.previousTriples.put(triple.t.getType(), triple);\r\n/* 223:185 */ this.previousTriple = triple;\r\n/* 224: */ }",
"public void reset() {\n super.reset();\n }",
"public void reset() {\r\n\t\tcards.addAll(dealt);\r\n\t\tdealt.clear();\r\n\t}",
"public final void reset() {\n\t\tscore = 0;\n\t\tlives = 10;\n\t\tshields = 3;\n\t}",
"public void reset() {\n\t\tacceptAnswers = false;\n\t\tcurrentQuestion = null;\n\t\tsubmissions = null;\n\t}",
"protected void reset() {\n leftSkier.reset();\n rightSkier.reset();\n }",
"private void resetStory() {\n storyManager.resetAllStories();\n user.setCurrentStoryNode(0);\n }",
"public void clearChangeSet()\r\n\t{\n\t\toriginal = new Hashtable(10);\r\n\t\t//System.out.println(\"111111 in clearChangeSet()\");\r\n\t\tins_mov = new Hashtable(10);\r\n\t\tdel_mod = new Hashtable(10);\r\n\r\n\t\tfor (int i = 0; i < seq.size(); i++) {\r\n\t\t\tReplicated elt = (Replicated) seq.elementAt(i);\r\n\t\t\toriginal.put(elt.getObjectID(), elt);\r\n\t\t}\r\n\t}",
"public void resetParents() {\n businessentityController.setSelected(null);\n }",
"protected final void undo() {\n requireAllNonNull(model, previousResidentBook, previousEventBook);\n model.resetData(previousResidentBook, previousEventBook);\n model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);\n model.updateFilteredEventList(PREDICATE_SHOW_ALL_EVENTS);\n\n }",
"public final void resetFavorites() {\n Favorites favorites = Favorites.INSTANCE;\n favorites.clear();\n favorites.load(this.persistenceWrapper.readFavorites());\n }",
"public void reset() {\n for (Vertex v : vertices) {\n v.path = false;\n v.visited = false;\n }\n b = new BreadthFirst(vertices);\n d = new DepthFirst(vertices);\n p = new Player(vertices);\n }"
] | [
"0.6746963",
"0.6169835",
"0.6005044",
"0.5843066",
"0.56396157",
"0.5581024",
"0.556239",
"0.5501575",
"0.54860204",
"0.54579014",
"0.5418305",
"0.538338",
"0.53609544",
"0.5352021",
"0.5333522",
"0.53251266",
"0.5289436",
"0.52858824",
"0.52719766",
"0.5256134",
"0.52523345",
"0.5246562",
"0.52392215",
"0.52211225",
"0.5206794",
"0.5183552",
"0.5168598",
"0.5110747",
"0.5107493",
"0.50991815",
"0.50953996",
"0.5090997",
"0.509019",
"0.5085402",
"0.50837773",
"0.5078557",
"0.50754964",
"0.50740474",
"0.5073308",
"0.50710464",
"0.5069896",
"0.5066792",
"0.5056982",
"0.5056225",
"0.5044541",
"0.5037473",
"0.5037319",
"0.5035868",
"0.5033888",
"0.5026481",
"0.5019705",
"0.5013057",
"0.5011843",
"0.50100374",
"0.50085145",
"0.5005168",
"0.49977344",
"0.49950024",
"0.4988237",
"0.49878082",
"0.49805602",
"0.4979672",
"0.49790564",
"0.49680623",
"0.4964517",
"0.49489695",
"0.4947247",
"0.49468088",
"0.4942809",
"0.49390826",
"0.4938122",
"0.4935216",
"0.49317706",
"0.49298674",
"0.492957",
"0.4924767",
"0.49223012",
"0.4922203",
"0.49216628",
"0.49188048",
"0.49158338",
"0.4912255",
"0.49119556",
"0.49088237",
"0.49042806",
"0.4901657",
"0.49015325",
"0.49006292",
"0.48981565",
"0.48931918",
"0.48924905",
"0.48910064",
"0.48900214",
"0.48865706",
"0.48858732",
"0.48768044",
"0.48722234",
"0.48700398",
"0.486851",
"0.48655492",
"0.48633918"
] | 0.0 | -1 |
KEEP METHODS put your custom methods here | @Override
public BPath getBPath() {
if (getThread() == null)
{
if (DEBUG) Timber.e("Owner Thread is null");
return null;
}
return getThread().getBPath().addPathComponent(BFirebaseDefines.Path.BMessagesPath, entityID);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private void someUtilityMethod() {\n }",
"private void someUtilityMethod() {\n }",
"public void doGeneralThings() {\n logger.debug(\"Overrided or implememted method - doGeneralThings!\");\n }",
"@Override\n\tpublic void myMethod() {\n\t\t\n\t}",
"public void andThisIsAMethodName(){}",
"private CommonMethods() {\n }",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\r\n\tpublic void method() {\n\t\r\n\t}",
"public void myPublicMethod() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\tpublic void dosomething() {\n\t\t\n\t}",
"public Methods() {\n // what is this doing? -PMC\n }",
"public void method(){}",
"@Override\r\n\tvoid func04() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}",
"@Override\npublic void noninvesters() {\n\t\n}",
"@Override\n\tpublic void anular() {\n\n\t}",
"public void method_201() {}",
"public void method_200() {}",
"abstract protected Set<Method> createMethods();",
"@Override\n public void perish() {\n \n }",
"@Override\n\tvoid methodabstract() {\n\t\t\n\t}",
"public void woke(){\n\n //TODO\n\n }",
"@Override\r\n\tpublic void Method3() {\n\t\t\r\n\t}",
"public void method_203() {}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"static void add() {\r\n\t\tSystem.out.println(\"Overloading Method\");\r\n\t}",
"private void Nice(){\n }",
"@Override\r\n\tpublic void func01() {\n\t\t\r\n\t}",
"@Override\r\npublic int method() {\n\treturn 0;\r\n}",
"protected void additionalProcessing() {\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"public void redibujarAlgoformers() {\n\t\t\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\tpublic void doYouWantTo() {\n\n\t}",
"public void myExtraMethod_login() {\n\tSystem.out.println(\"this is my method that i added to this class and not from interface. This is login\");\n}",
"private FlyWithWings(){\n\t\t\n\t}",
"public void miseAJour();",
"@Override\r\n \tpublic void addMethods(KawaWrap kawa) throws Throwable {\r\n \tkawa.eval(\"(define (sub1 n) (- n 1))\");\r\n \tkawa.eval(\"(define (add1 n) (+ n 1))\");\r\n \t}",
"private void mappingMethods() throws SecurityException, NoSuchMethodException{\n\t\tmappingMethodGet();\n\t\tmappingMethodSet();\n\t}",
"public void method_115() {}",
"public interface CommonEntityMethod extends ToJson,GetFieldValue,SetFieldValue{\n}",
"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 void method_206() {}",
"protected Map method_1552() {\n return super.method_1552();\n }",
"public void smell() {\n\t\t\n\t}",
"public interface Customizable {\n\n /**\n * This method adds based on the parameter passed and the class it is implemented in.\n * @param obj object\n * @return true is added successfully, otherwise false\n */\n boolean add(Object obj);\n\n /**\n * This method removes based on the parameter passed and the class it is implemented in.\n * @param obj object\n * @return true is removed successfully, otherwise false\n */\n boolean remove(Object obj);\n}",
"public void method_202() {}",
"@Override\n\tprotected void logic() {\n\n\t}",
"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}",
"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\tpublic void emprestimo() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"Operations operations();",
"private stendhal() {\n\t}",
"public abstract Object mo26777y();",
"protected Collection method_1554() {\n return this.method_1559();\n }",
"@Override\n\tpublic void buildMethods(JDefinedClass cls) {\n\n\t}",
"protected abstract void switchOnCustom();",
"@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic void Method2() {\n\t\t\r\n\t}",
"public void addBusinessFilterToMethods(ViewerFilter filter);",
"@Override\n\tpublic void method() {\n\t\tSystem.out.println(\"这是第三个实现\");\n\t}",
"@Override\n\tpublic void myMethod2() {\n\t\t\n\t}",
"@Override\n public void defaultMethod() {\n I4.super.defaultMethod();\n }",
"public void method_191() {}",
"void method_115();",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}",
"@Override\n protected void adicionar(Funcionario funcionario) {\n\n }",
"public void addFilterToMethods(ViewerFilter filter);",
"public void method_192() {}",
"private ChainingMethods() {\n // private constructor\n\n }",
"@Override\n\tpublic void some() {\n\t\t\n\t}",
"@Override\r\n\tpublic void Method1() {\n\t\t\r\n\t}",
"@Override\n\tpublic void function() {\n\t\t\n\t}",
"public void my_method();",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"public void method_4270() {}",
"public void wild(){\n\t}",
"public void method_199() {}",
"@Override\n\tpublic void buildDefaultMethods(JDefinedClass cls) {\n\n\t}",
"protected Doodler() {\n\t}",
"public interface MethodsHttpUtils {\n HttpResponse doGet(String url, String mediaType) throws AppServerNotAvailableException, IOException;\n HttpResponse doPost(String url, String mediaType, String dataJson) throws UnsupportedEncodingException, ClientProtocolException, AppServerNotAvailableException;\n HttpResponse doDelete(String url, String mediaType) throws AppServerNotAvailableException;\n HttpResponse doPut(String url, String mediaType, String dataJson) throws AppServerNotAvailableException;\n}",
"public void cocinar(){\n\n }",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void intializeSpecific() {\n\r\n\t}",
"public void logic(){\r\n\r\n\t}",
"@Override\n\tpublic void dosomething2() {\n\t\t\n\t}",
"@Override\n protected void getExras() {\n }",
"private ExtendedOperations(){}",
"@Override\n public int getMethodCount()\n {\n return 1;\n }",
"@Override\n\tpublic void realFun() {\n\n\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@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() {}"
] | [
"0.6209938",
"0.618594",
"0.618594",
"0.60465866",
"0.6014668",
"0.60098",
"0.59371775",
"0.5936077",
"0.5929191",
"0.5929191",
"0.59234256",
"0.5923415",
"0.5899172",
"0.58520025",
"0.5821774",
"0.58198124",
"0.57914096",
"0.57836086",
"0.57836086",
"0.57821524",
"0.5767343",
"0.5696869",
"0.5692887",
"0.5688293",
"0.5684211",
"0.5677572",
"0.5677571",
"0.56640893",
"0.56523794",
"0.5620172",
"0.56197536",
"0.56145906",
"0.56054723",
"0.5605404",
"0.55967",
"0.5594855",
"0.55854857",
"0.55798805",
"0.5565827",
"0.55646235",
"0.5554629",
"0.5553439",
"0.55529124",
"0.5549676",
"0.5548462",
"0.554808",
"0.55144393",
"0.5508054",
"0.5498607",
"0.54868984",
"0.54761195",
"0.54716194",
"0.54689246",
"0.5459488",
"0.5457408",
"0.5450882",
"0.5442558",
"0.5439355",
"0.54393494",
"0.54385",
"0.5426704",
"0.5424378",
"0.5419597",
"0.54091877",
"0.5400069",
"0.53973466",
"0.53972125",
"0.5389844",
"0.53897595",
"0.53827924",
"0.53794473",
"0.53784376",
"0.53778654",
"0.537538",
"0.5373622",
"0.5373622",
"0.53723955",
"0.5370423",
"0.5368479",
"0.53662944",
"0.5363632",
"0.5361715",
"0.5356335",
"0.5352597",
"0.53458315",
"0.5335945",
"0.53324926",
"0.5332114",
"0.5324136",
"0.532343",
"0.5319602",
"0.5310608",
"0.531055",
"0.53064775",
"0.5305672",
"0.53010726",
"0.5287592",
"0.5286784",
"0.52858365",
"0.5282944",
"0.5282555"
] | 0.0 | -1 |
Null safe version of getIsRead | public boolean wasRead(){
return isRead==null || isRead;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasRead();",
"boolean hasForRead();",
"boolean getForRead();",
"boolean getRead();",
"public boolean isRead(){\n \treturn isRead;\n }",
"public Boolean getIsRead() {\n return isRead;\n }",
"public boolean getRead()\n\t{\n\t\treturn this.read;\n\t}",
"public boolean getForRead() {\n return forRead_;\n }",
"boolean isReadAccess();",
"public boolean getRead() {\n return read_;\n }",
"public boolean getForRead() {\n return forRead_;\n }",
"public boolean getRead() {\n\t\treturn read;\n\t}",
"public boolean getRead() {\n return read_;\n }",
"@Override\n\tpublic boolean getCanRead()\n\t{\n\t\treturn inputStream.CanRead;\n\t}",
"abstract protected boolean read();",
"public boolean hasRead() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"public boolean hasRead() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"@Override\n\tpublic boolean readBoolean() throws IOException {\n\t\treturn ( (_buff.get() & 0xFF) != 0 );\n\t}",
"boolean isUsedForReading();",
"public boolean read() {\n return this.read;\n }",
"public Boolean shouldRead() {\n return this.isComplete();\n }",
"protected final boolean didRead (boolean value) { return didRead = value;}",
"public boolean read() {\n return so;\n }",
"boolean hasSendReading();",
"public boolean hasForRead() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasForRead() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"boolean isReadable(ReaderContext context);",
"private boolean canRead() {\n\t\treturn fileStatus;\n\t}",
"boolean isPendingToRead();",
"boolean shouldReadValue();",
"public boolean hasReadMask() {\n return ((bitField0_ & 0x00000100) != 0);\n }",
"private boolean getNoFallback()\n/* */ {\n/* 1091 */ return this.reader.getNoFallback();\n/* */ }",
"boolean hasGetLatestReading();",
"public void setRead(){\n \tthis.isRead = true;\n }",
"@java.lang.Override\n public boolean hasReadMask() {\n return ((bitField0_ & 0x00000010) != 0);\n }",
"public Boolean getreadFlag() {\r\n if(this.getShowFlag()!=null && this.getShowFlag().trim().equalsIgnoreCase(\"NO\")){\r\n return true; \r\n }\r\n else{\r\n return false;\r\n }\r\n }",
"public boolean readBoolean()\r\n/* 381: */ {\r\n/* 382:394 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 383:395 */ return super.readBoolean();\r\n/* 384: */ }",
"public boolean canReadData() {\r\n \t\tboolean can = true;\r\n \t\tif (null == dataFile ) {\r\n \t\t\tcan = false;\r\n \t\t}\r\n \t\treturn can;\r\n \t}",
"@Override\n public boolean isReadRequest() {\n return false;\n }",
"boolean isSeekable();",
"public void read() {\n\t\tthis.isRead = true;\n\t}",
"private boolean readingHasStarted()\n {\n return readingHasStarted;\n }",
"boolean readBoolean();",
"@Override\n public boolean hasReadAccess() {\n return true;\n }",
"public boolean hasSendReading() {\n return sendReading_ != null;\n }",
"public abstract boolean read_boolean();",
"public boolean read() throws IOException\n\t{\n\t\treturn this.read(this.socket);\n\t}",
"public void ownRead();",
"boolean getStream();",
"public boolean readBoolean() throws IOException {\n\n\t\tint b = read();\n\t\tif (b == 1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean isSingleReads() {\n\t\treturn singleReads;\n\t}",
"public boolean closeRead() throws Exception;",
"public boolean hasGetLatestReading() {\n return getLatestReading_ != null;\n }",
"public boolean test(final ClientContext context) {\n return context.readBytes != -1 && context.readByteBuffer.hasRemaining();\n }",
"public boolean readBool() throws IOException {\n return in.readBoolean();\n }",
"public boolean test(final ClientContext context) {\n return context.readBytes != -1;\n }",
"public int getReadStatus() {\n return (readStatus.getUnsignedInt());\n }",
"public boolean isGet();",
"public void setIsRead(boolean isRead) {\n mIsRead = isRead;\n }",
"public boolean isMaybeReadOnly() {\n checkNotUnknown();\n return (flags & ATTR_READONLY) != 0;\n }",
"public boolean readBoolean() {\n return (((readLong() & 1) == 1) ? true : false);\n }",
"@Override\n public boolean isRead(int index)\n {\n if (index == 3)\n {\n return m_Unit != 0;\n }\n return super.isRead(index);\n }",
"public void setIsRead(Boolean isRead) {\n this.isRead = isRead;\n }",
"@Override\n\tpublic boolean getCanSeek()\n\t{\n\t\treturn false;\n\t}",
"public void readSysCall() {\n read = false;\n clientChannel.read(readBuffer, this, readCompletionHandler);\n }",
"Boolean isMessageRead(String msgId);",
"public boolean acquireReadLockNoWait() {\r\n return true;\r\n }",
"public void checkReadLock() {\r\n return;\r\n }",
"public boolean hasSendReading() {\n return sendReadingBuilder_ != null || sendReading_ != null;\n }",
"public boolean hasGetLatestReading() {\n return getLatestReadingBuilder_ != null || getLatestReading_ != null;\n }",
"@Override\n public boolean hasRemaining() throws IOException\n {\n return randomAccessRead.available() > 0;\n }",
"public boolean readBoolean() throws IOException {\n boolean bool = fDataInputStream.readBoolean();\n DebugLog.stdoutPrintln(\"Connection marshalling boolean \" + \n bool, DebugLog.BSF_LOG_L3);\n return bool;\n\t}",
"@SuppressWarnings(\"unused\")\n private void _read() {\n }",
"String byteOrBooleanRead();",
"public boolean isMaybeNotReadOnly() {\n checkNotUnknown();\n return (flags & ATTR_NOTREADONLY) != 0;\n }",
"public int getCommonReadStatus(){\n List<BMessageReceipt> readReceipts;\n resetBMessageReceiptList();\n readReceipts = getBMessageReceiptList();\n\n Boolean delivered = false;\n Boolean read = false;\n\n for ( BMessageReceipt readReceipt : readReceipts) {\n switch (readReceipt.getReadStatus()) {\n case none:\n return none;\n case BMessageReceiptEntity.ReadStatus.delivered:\n delivered = true;\n break;\n case BMessageReceiptEntity.ReadStatus.read:\n read = true;\n break;\n }\n }\n// if(!read){\n// BNetworkManager.sharedManager().getNetworkAdapter().readReceiptsOnFromUI(this);\n// }\n if(delivered){\n return BMessageReceiptEntity.ReadStatus.delivered;\n } else if (read) {\n return BMessageReceiptEntity.ReadStatus.read;\n } else {\n logMessage = \"Message has no readers\";\n if(DEBUG) Log.d(TAG , logMessage);\n return none;\n }\n }",
"@Override\n\tpublic boolean isReadWrite() {\n\t\treturn true;\n\t}",
"@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean readDeviceInfo() {\n\t\tboolean flag = oTest.readDeviceInfo();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}",
"public boolean readBoolean() {\n\t\tif(!isInit) return false;\n\t\tboolean result = false;\n\t\tisListening = true;\n\t\twriteLine(\"Waiting for Boolean input...\");\n\t\twhile(isListening) {\n\t\t\ttry {\n\t\t\t\tresult = Boolean.parseBoolean(inputArea.getText());\n\t\t\t} catch(NumberFormatException nfe) {\n\t\t\t\tresult= false;\n\t\t\t}\n\t\t}\n\t\tinputArea.setText(\"\");\n\t\twriteLine(\"Input: \" + result);\n\t\treturn result;\n\t}",
"public boolean sendReadMessage() {\n return sendReadMessage;\n }",
"public void setRead(boolean read)\n\t{\n\t\tthis.read = read;\n\t}",
"private final boolean hasBufferedInputBytes() {\n return reading && (buffer.hasRemaining() || ungotc != -1);\n }",
"public boolean getInputStream(Consumer<InputStream> inputStreamGetter)\n {\n boolean success = false;\n try (InputStream inputStream = getInputStreamUnsafe())\n {\n if (inputStream != null)\n {\n inputStreamGetter.accept(inputStream);\n success = true;\n }\n else\n {\n // We return success so the caller can decide when to throw errors\n // because it may be normal for this to be null.\n LogTools.debug(1, \"Input stream is null\"); // Print caller info to help identify issues\n }\n }\n catch (IOException ioException)\n {\n DefaultExceptionHandler.MESSAGE_AND_STACKTRACE.handleException(ioException);\n }\n return success;\n }",
"default int readNonBlocking(byte[] buffer) {\n return readNonBlocking(buffer, 0, buffer.length);\n }",
"public boolean isReadOnly() {\n return _readOnly != null && _readOnly;\n }",
"public boolean canReadLatestOfTable()\n {\n \t \treturn getAccessBit(5);\n }",
"boolean isReadOnly();",
"boolean isReadOnly();",
"public boolean hasReadOnly() {\n checkNotUnknown();\n return (flags & ATTR_READONLY_ANY) != 0;\n }",
"private int read()\n\t{\n\t\ttry{\n\t\t\twhile(dev_in.available()==0);\n\t\t\treturn dev_in.read();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\t\n\t\t}\n\t\treturn -1;\n\t}",
"boolean hasGetLatestSensorReadingForUser();",
"public boolean isDataAvailable(){return true;}",
"public synchronized boolean isReadingFromFile(){\n\t\treturn isReadingFromFile;\n\t}",
"public boolean readBooleanNonBlock() {\n return (((readLongNonBlock() & 1) == 1) ? true : false);\n }",
"public static boolean isArray_reading() {\n return false;\n }",
"public static Boolean readBoolean(DataInputStream dis) throws IOException {\r\n\t\tif(dis.readBoolean())\r\n\t\t\treturn new Boolean(dis.readBoolean());\r\n\t\treturn null;\r\n\t}",
"public final boolean isReadOnly() {\n\t\treturn m_info.isReadOnly();\n\t}",
"public boolean isReadOnly();",
"public boolean isReadOnly();",
"public boolean isReadOnly();"
] | [
"0.8278433",
"0.82125014",
"0.820625",
"0.8184006",
"0.7787873",
"0.7656183",
"0.74967474",
"0.7438545",
"0.7428327",
"0.74217033",
"0.73538804",
"0.7337216",
"0.7335713",
"0.7295503",
"0.71608925",
"0.71407074",
"0.7123679",
"0.7110584",
"0.7077705",
"0.7052733",
"0.6900326",
"0.6852785",
"0.68477035",
"0.679525",
"0.6758931",
"0.67578936",
"0.67522806",
"0.6732356",
"0.66752416",
"0.6649864",
"0.6640809",
"0.6512412",
"0.65118283",
"0.6508612",
"0.64908504",
"0.6478393",
"0.64772415",
"0.6360303",
"0.6353176",
"0.63391167",
"0.6327304",
"0.6291547",
"0.6275844",
"0.62700367",
"0.62625885",
"0.62588656",
"0.6230491",
"0.61883193",
"0.6184397",
"0.61821115",
"0.6171508",
"0.6152167",
"0.6148659",
"0.61460525",
"0.61350435",
"0.6113914",
"0.61036503",
"0.61029077",
"0.60625803",
"0.6061241",
"0.60272884",
"0.6013513",
"0.60036844",
"0.6001726",
"0.5971669",
"0.59694755",
"0.59694207",
"0.5943666",
"0.592337",
"0.5908635",
"0.5888206",
"0.5878109",
"0.58684605",
"0.5866219",
"0.58637583",
"0.58622557",
"0.58205956",
"0.5812536",
"0.5812019",
"0.58097845",
"0.5781498",
"0.5781309",
"0.5776144",
"0.57723904",
"0.57669723",
"0.5766775",
"0.5760582",
"0.5760582",
"0.5741709",
"0.5734685",
"0.571034",
"0.5704983",
"0.56950015",
"0.5690693",
"0.56875354",
"0.5677063",
"0.5657857",
"0.56573087",
"0.56573087",
"0.56573087"
] | 0.819846 | 3 |
used for initial creation of receipts | public Boolean updateUserReadReceipt(BUser reader, int messageReceiptStatus){
// Do not set read-receipts for public chats!
if (this.getThread().getTypeSafely() == BThread.Type.Public || this.getThread().getTypeSafely() == BThread.Type.PublicPrivate) {
return false;
}
BMessageReceipt oldBMessageReceipt = getUserReadReceipt(reader);
// Only update receipts that have been initialized
if(oldBMessageReceipt.getReadStatus() == null) return false;
// Make sure a higher status value is not overwritten.
if (oldBMessageReceipt.getReadStatus() >= messageReceiptStatus) return false;
// Remove old user read receipt
removeUserReadReceipt(reader);
createUserReadReceipt(reader, messageReceiptStatus);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String insertStartReceipt() {\r\n\t\tif (receiptS == null) {\r\n\t\t\treceiptS = new Receipt();\r\n\t\t}\r\n\t\treturn SUCCESS;\r\n\t}",
"public abstract void generateReceipt(Transaction trans);",
"public receipt() {\n initComponents();\n \n }",
"public void createInvoice() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t\tsubscribeBroadcast(TickBroadcast.class, tick_msg -> { //subscribe to timer\n\t\t\tif (!tick_msg.isRunning()){ //if reached duration time \n\t\t\t\tLogger.getLogger(\"logger\").log(Level.INFO,getName()+ \" is terminating \");\n\t\t\t\tterminate();\n\t\t\t}\n\t\t\tsetTick(tick_msg.getTick());\n\t\t\t\n\t\t\tif (curr_request!=null){\n\t\t\t\tif (curr_amount>0){\n\t\t\t\t\tLogger.getLogger(\"logger\").log(Level.INFO,getName()+ \" created a pair of \" +curr_request.getShoeType());\n\t\t\t\t\tcurr_amount--;\n\t\t\t\t}\n\t\t\t\telse if (curr_amount==0){\n\t\t\t\t\tLogger.getLogger(\"logger\").log(Level.INFO,getName()+ \" finished producing the restock request for \"+curr_request.getAmount()+\" \"+curr_request.getShoeType());\n\t\t\t\t\tReceipt r= new Receipt(getName(),\"store\",curr_request.getShoeType(),false,curr_tick,curr_request.getCurr_tick(),curr_request.getAmount());\n\t\t\t\t\tcomplete(curr_request,r);\n\t\t\t\t\tif (!restock_orders.isEmpty()){\n\t\t\t\t\t\tcurr_request = restock_orders.remove();\n\t\t\t\t\t\tcurr_amount = curr_request.getAmount();\n\t\t\t\t\t\tif (curr_amount>0){\n\t\t\t\t\t\t\tLogger.getLogger(\"logger\").log(Level.INFO,getName()+ \" created a pair of \" +curr_request.getShoeType());\n\t\t\t\t\t\t\tcurr_amount--;\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\tcurr_request=null;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (!restock_orders.isEmpty()){\n\t\t\t\t\tsetRequest(restock_orders.remove());\n\t\t\t\t\tLogger.getLogger(\"logger\").log(Level.INFO,getName()+ \" created 1 pair of \"+curr_request.getShoeType());\n\t\t\t\t\tcurr_request.setAmount(curr_request.getAmount()-1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tsubscribeRequest(ManufacturingOrderRequest.class, man_req -> {\n\t\t\tLogger.getLogger(\"logger\").log(Level.INFO,getName()+ \" was asked from the store to produce \"+man_req.getAmount()+\" \"+man_req.getShoeType());\n\t\t\tif (curr_request==null){\n\t\t\t\tsetRequest(man_req);\n\t\t\t\tcurr_amount=man_req.getAmount();\n\t\t\t}\n\t\t\telse\n\t\t\t\ttry {\n\t\t\t\t\trestock_orders.put(man_req);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t});\n\t\t\n\t\tlatchObject.countDown();\n\t}",
"public void printReceipt(){\n\t\t//TO DO\n\t\t\n\t}",
"public void initBMessageReceipts(){\n List<BUser> readers;\n readers = getBThreadUsers();\n\n // Do not init for public threads.\n if(this.getThread().getType() == com.braunster.chatsdk.dao.BThread.Type.Public\n || this.getThread().getType() == com.braunster.chatsdk.dao.BThread.Type.PublicPrivate) return;\n\n // If no readers, why should there be receipts?\n if (readers.isEmpty()){ return; }\n\n // add all users in the chat other than yourself\n for (BUser reader : readers) {\n if (getBUserSender().equals(reader)) continue;\n createUserReadReceipt(reader, none);\n }\n this.update();\n }",
"public void startSale() {\r\n System.out.println(\"[CashRegister] startSale\");\r\n System.out.println(\"\");\r\n\r\n //receipt = new Receipt(customerId); \r\n receipt = new Receipt(\"100\");\r\n\r\n //addItemToSale(productId, quantity);\r\n addItemToSale(\"A101\", 10);\r\n\r\n addItemToSale(\"B205\", 6);\r\n\r\n addItemToSale(\"C222\", 12);\r\n\r\n }",
"private TransactionRequest initTransactionRequest() {\n TransactionRequest transactionRequestNew = new\n TransactionRequest(System.currentTimeMillis() + \"\", 20000);\n\n //set customer details\n transactionRequestNew.setCustomerDetails(initCustomerDetails());\n\n\n // set item details\n ItemDetails itemDetails = new ItemDetails(\"1\", 20000, 1, \"Trekking Shoes\");\n\n // Add item details into item detail list.\n ArrayList<ItemDetails> itemDetailsArrayList = new ArrayList<>();\n itemDetailsArrayList.add(itemDetails);\n transactionRequestNew.setItemDetails(itemDetailsArrayList);\n\n\n // Create creditcard options for payment\n CreditCard creditCard = new CreditCard();\n\n creditCard.setSaveCard(false); // when using one/two click set to true and if normal set to false\n\n// this methode deprecated use setAuthentication instead\n// creditCard.setSecure(true); // when using one click must be true, for normal and two click (optional)\n\n creditCard.setAuthentication(CreditCard.AUTHENTICATION_TYPE_3DS);\n\n // noted !! : channel migs is needed if bank type is BCA, BRI or MyBank\n// creditCard.setChannel(CreditCard.MIGS); //set channel migs\n creditCard.setBank(BankType.BCA); //set spesific acquiring bank\n\n transactionRequestNew.setCreditCard(creditCard);\n\n return transactionRequestNew;\n }",
"public Repo_Receipt() {\n initComponents();\n }",
"private long addReceipt() {\n Entity receipt = createReceiptEntity(\n ORIGINAL_PRICE, ORIGINAL_STORE, ORIGINAL_TIMESTAMP, ORIGINAL_CATEGORIES);\n datastore.put(receipt);\n return receipt.getKey().getId();\n }",
"public CreateOrderRequest() {\n\t\t_pcs = new PropertyChangeSupport(this);\n\t}",
"@Override\n protected void onSuccessRequestReceipts(Collection<Receipt> receipts) {\n \tmTxtStatus.setText(\"requestReceipts onSuccess: received \"+receipts.size() + \" receipts\");\n \t}",
"public Receipt(Purchase p) {\r\n this.purch=p;\r\n totalPurch=0;\r\n totalDisc=0;\r\n \r\n db= new FakeDataBase();\r\n c= new Customer(db.getCustomerDbItem(purch.getCustIdx()));\r\n //System.out.println(c.toString());\r\n lineItem = new LineItem[0];\r\n generateLineItems();\r\n }",
"public void prepare()\n {\n // First, we assign the payload a new UUID if it does not already have one\n if(getId() == null)\n setId(UUID.randomUUID());\n \n // Set the submission date to now\n setSubmissionDate(new Date());\n }",
"public void initForAddNew() {\r\n\r\n\t}",
"public PurchaseRequestAttachment() {\r\n }",
"public PurchaseRequestAttachmentContent() {\r\n }",
"public void startNewPurchase() throws VerificationFailedException {\n\t}",
"public void startNewPurchase() throws VerificationFailedException {\n\t}",
"public void resetNew() {\n setC_Payment_ID(0);\t\t//\tforces new Record\n set_ValueNoCheck(\"DocumentNo\", null);\n setDocAction(DOCACTION_Prepare);\n setDocStatus(DOCSTATUS_Drafted);\n setProcessed(false);\n setPosted(false);\n setIsReconciled(false);\n setIsAllocated(false);\n setIsOnline(false);\n setIsDelayedCapture(false);\n //\tsetC_BPartner_ID(0);\n setC_Invoice_ID(0);\n setC_Order_ID(0);\n setC_Charge_ID(0);\n setC_Project_ID(0);\n setIsPrepayment(false);\n }",
"public void file ( Receipt receipt){\r\n\t\t\treciptlist.add(receipt);\r\n\t\t}",
"private void initial(){\n storeAccount(\"201799990001030047\");\n }",
"public String editStartReceipt() {\r\n\t\t\r\n\t\ttry {\r\n\t\t\treceipt = service.selectReceiptInfo(receiptSS);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t\t\r\n\t\treturn SUCCESS;\r\n\t}",
"private ManualMessage() {\n initFields();\n }",
"public void printReceipt(){\n sale.updateExternalSystems();\n sale.printReceipt(totalCost, amountPaid, change);\n }",
"public ReceiptFragment() {\n }",
"public ReplicateObjectMessageFactory() {\n super(null);\n }",
"private void generateReceipt(){\n ArrayList<Product> productList = cart.getProductList();\n ArrayList<Float> costsList = cart.getCostsList();\n for (int i=0; i<productList.size(); i++){\n String quantity = \"\"+productList.get(i).getQuantity();\n String name = \"\"+productList.get(i).getName();\n String cost = \"\"+Math.round(costsList.get(i) * 100.0) / 100.0;\n //String cost = \"\"+costsList.get(i);\n \n reciept.addLine(quantity+\" \"+name+\": \"+cost);\n }\n \n reciept.addLine(\"Total Taxes: \"+Math.round(cart.getTotalTax() * 100.0) / 100.0);\n reciept.addLine(\"Total: \"+ Math.round((cart.getTotalTax()+cart.getTotalCost()) * 100.0) / 100.0);\n // print reciept\n }",
"private void makeDeposit() {\n\t\t\r\n\t}",
"@Override\n\tpublic void fileDeliveryServiceInitializeConfirmation() {\n\t\t\n\t}",
"private void saveReceipt() {\n\n\t\tFinalHttp finalHttp = new FinalHttp();\n\t\tGetServerUrl.addHeaders(finalHttp,true);\n\t\tAjaxParams params = new AjaxParams();\n\t\tparams.put(\"id\", receiptId);\n\t\tparams.put(\"receiptDate\", tv_canshu.getText().toString());\n\t\tparams.put(\"orderId\", orderId);\n\t\tparams.put(\"count\", et_num.getText().toString());\n\t\tparams.put(\"remarks\", et_remark.getText().toString());\n\t\tparams.put(\"receiptAddressId\", receiptAddressId);\n\t\tfinalHttp.post(GetServerUrl.getUrl() + \"admin/buyer/order/saveReceipt\",\n\t\t\t\tparams, new AjaxCallBack<Object>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(Object t) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tJSONObject jsonObject = new JSONObject(t.toString());\n\t\t\t\t\t\t\tString code = JsonGetInfo.getJsonString(jsonObject,\n\t\t\t\t\t\t\t\t\t\"code\");\n\t\t\t\t\t\t\tString msg = JsonGetInfo.getJsonString(jsonObject,\n\t\t\t\t\t\t\t\t\t\"msg\");\n\t\t\t\t\t\t\tif (!\"\".equals(msg)) {\n\t\t\t\t\t\t\t\tToast.makeText(SaveReceipptActivity.this, msg,\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (\"1\".equals(code)) {\n\t\t\t\t\t\t\t\tsetResult(1);\n\t\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsuper.onSuccess(t);\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(Throwable t, int errorNo,\n\t\t\t\t\t\t\tString strMsg) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tToast.makeText(SaveReceipptActivity.this,\n\t\t\t\t\t\t\t\tR.string.error_net, Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\tsuper.onFailure(t, errorNo, strMsg);\n\t\t\t\t\t}\n\n\t\t\t\t});\n\n\t}",
"public PaymentRequestItem(OleInvoiceItem poi, OlePaymentRequestDocument preq, HashMap<String, ExpiredOrClosedAccountEntry> expiredOrClosedAccountList) {\r\n\r\n // copy base attributes w/ extra array of fields not to be copied\r\n PurApObjectUtils.populateFromBaseClass(PurApItemBase.class, poi, this, PurapConstants.PREQ_ITEM_UNCOPYABLE_FIELDS);\r\n\r\n setItemDescription(poi.getItemDescription());\r\n\r\n //New Source Line should be set for PaymentRequestItem\r\n resetAccount();\r\n\r\n // set up accounts\r\n List accounts = new ArrayList();\r\n\r\n for (PurApAccountingLine account : poi.getSourceAccountingLines()) {\r\n InvoiceAccount poa = (InvoiceAccount) account;\r\n\r\n // check if this account is expired/closed and replace as needed\r\n SpringContext.getBean(AccountsPayableService.class).processExpiredOrClosedAccount(poa, expiredOrClosedAccountList);\r\n\r\n //KFSMI-4522 copy an accounting line with zero dollar amount if system parameter allows\r\n if (poa.getAmount().isZero()) {\r\n if (SpringContext.getBean(AccountsPayableService.class).canCopyAccountingLinesWithZeroAmount()) {\r\n accounts.add(new PaymentRequestAccount(this, poa));\r\n }\r\n } else {\r\n accounts.add(new PaymentRequestAccount(this, poa));\r\n }\r\n }\r\n\r\n this.setSourceAccountingLines(accounts);\r\n this.getUseTaxItems().clear();\r\n //List<PurApItemUseTax> newUseTaxItems = new ArrayList<PurApItemUseTax>();\r\n /// this.setUseTaxItems(newUseTaxItems);\r\n //copy use tax items over, and blank out keys (useTaxId and itemIdentifier)\r\n /*\r\n this.getUseTaxItems().clear();\r\n for (PurApItemUseTax useTaxItem : poi.getUseTaxItems()) {\r\n PaymentRequestItemUseTax newItemUseTax = new PaymentRequestItemUseTax(useTaxItem);\r\n this.getUseTaxItems().add(newItemUseTax);\r\n\r\n }\r\n */\r\n\r\n // clear amount and desc on below the line - we probably don't need that null\r\n // itemType check but it's there just in case remove if it causes problems\r\n // also do this if of type service\r\n if ((ObjectUtils.isNotNull(this.getItemType()) && this.getItemType().isAmountBasedGeneralLedgerIndicator())) {\r\n // setting unit price to be null to be more consistent with other below the line\r\n // this.setItemUnitPrice(null);\r\n }\r\n\r\n // copy custom\r\n /*Modified for the jira -5458*/\r\n this.purchaseOrderItemUnitPrice = poi.getPurchaseOrderItem()!=null ? poi.getPurchaseOrderItem().getItemUnitPrice() : null;\r\n// this.purchaseOrderCommodityCode = poi.getPurchaseOrderCommodityCd();\r\n\r\n // set doc fields\r\n this.setPurapDocumentIdentifier(preq.getPurapDocumentIdentifier());\r\n this.setPurapDocument(preq);\r\n }",
"public Invoice()\r\n {\r\n items = new ArrayList<>();\r\n listeners = new ArrayList<>();\r\n }",
"@Override\n\tpublic void prepareInvoice(){\n\t\tSystem.out.println(\"invoice prepared...\");\n\t}",
"private void createTx() throws Exception {\n PublicKey recipient = Seed.getRandomAddress();\n Transaction tx = new Transaction(wallet.pb, recipient, wallet.pr);\n//\t\tSystem.out.println(\"Created a tx\");\n txPool.add(tx);\n//\t\tcache.put(tx.txId, null);\n sendTx(tx);\n }",
"public Invoice(){\r\n this.userName = \"\";\r\n this.InvoiceCode = \"\";\r\n this.items = new ArrayList<>();\r\n this.amount = 0.0;\r\n \r\n }",
"public InitialData(){}",
"public PaymentRequestItem(PurchaseOrderItem poi, PaymentRequestDocument preq, HashMap<String, ExpiredOrClosedAccountEntry> expiredOrClosedAccountList) {\r\n\r\n // copy base attributes w/ extra array of fields not to be copied\r\n PurApObjectUtils.populateFromBaseClass(PurApItemBase.class, poi, this, PurapConstants.PREQ_ITEM_UNCOPYABLE_FIELDS);\r\n\r\n setItemDescription(poi.getItemDescription());\r\n\r\n //New Source Line should be set for PaymentRequestItem\r\n resetAccount();\r\n\r\n // set up accounts\r\n List accounts = new ArrayList();\r\n for (PurApAccountingLine account : poi.getSourceAccountingLines()) {\r\n PurchaseOrderAccount poa = (PurchaseOrderAccount) account;\r\n\r\n // check if this account is expired/closed and replace as needed\r\n SpringContext.getBean(AccountsPayableService.class).processExpiredOrClosedAccount(poa, expiredOrClosedAccountList);\r\n\r\n //KFSMI-4522 copy an accounting line with zero dollar amount if system parameter allows\r\n if (poa.getAmount().isZero()) {\r\n if (SpringContext.getBean(AccountsPayableService.class).canCopyAccountingLinesWithZeroAmount()) {\r\n accounts.add(new PaymentRequestAccount(this, poa));\r\n }\r\n } else {\r\n accounts.add(new PaymentRequestAccount(this, poa));\r\n }\r\n }\r\n\r\n this.setSourceAccountingLines(accounts);\r\n this.getUseTaxItems().clear();\r\n //List<PurApItemUseTax> newUseTaxItems = new ArrayList<PurApItemUseTax>();\r\n /// this.setUseTaxItems(newUseTaxItems);\r\n //copy use tax items over, and blank out keys (useTaxId and itemIdentifier)\r\n /*\r\n this.getUseTaxItems().clear();\r\n for (PurApItemUseTax useTaxItem : poi.getUseTaxItems()) {\r\n PaymentRequestItemUseTax newItemUseTax = new PaymentRequestItemUseTax(useTaxItem);\r\n this.getUseTaxItems().add(newItemUseTax);\r\n\r\n }\r\n */\r\n\r\n // clear amount and desc on below the line - we probably don't need that null\r\n // itemType check but it's there just in case remove if it causes problems\r\n // also do this if of type service\r\n if ((ObjectUtils.isNotNull(this.getItemType()) && this.getItemType().isAmountBasedGeneralLedgerIndicator())) {\r\n // setting unit price to be null to be more consistent with other below the line\r\n this.setItemUnitPrice(null);\r\n }\r\n\r\n // copy custom\r\n this.purchaseOrderItemUnitPrice = poi.getItemUnitPrice();\r\n// this.purchaseOrderCommodityCode = poi.getPurchaseOrderCommodityCd();\r\n\r\n // set doc fields\r\n this.setPurapDocumentIdentifier(preq.getPurapDocumentIdentifier());\r\n this.setPurapDocument(preq);\r\n }",
"public HSRCreateDraftRequestProcessorAction() {\n\t\tlogger.warn(\"***** This constructor is for Test Cases only *****\");\n\t\t\n\t}",
"public void file(OrderReceipt r) {\r\n\t\tthis.receiptissued.add(r);\r\n\t}",
"@Override\r\n\tprotected void initPostProcess(RechargeVo recharge) {\n\t\tsuper.initPostProcess(recharge);\r\n\t\tthis.msgSrc = recharge.getAccount().split(\"\\\\|\")[3];\r\n\t\tthis.msgType = \"bills.getQRCode\";\r\n\t\tthis.requestTimestamp = DUtil.format(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\tthis.billNo = recharge.getAccount().split(\"\\\\|\")[4].concat(DUtil.format(\"yyyyMMHHmmssSSS\")).concat(RandomUtil.randomNumbers(7));\r\n\t\tthis.billDate = DUtil.format(\"yyyy-MM-dd\");\r\n\t\tthis.mid = recharge.getAccount().split(\"\\\\|\")[0];\r\n\t\tthis.tid = recharge.getAccount().split(\"\\\\|\")[1];\r\n\t\tthis.instMid = recharge.getAccount().split(\"\\\\|\")[2];\r\n\t}",
"public static void saveReceipt()\r\n\t{\r\n\t\tPrintWriter listWriter = null;\r\n\t\tPrintWriter contentWriter = null;\r\n\t\tnewReceipt = getTimeStamp();\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tlistWriter = new PrintWriter(new FileOutputStream(RECEIPT_LIST_FILE, true));\r\n\t\t\tcontentWriter = new PrintWriter(RECEIPT_PATH + newReceipt);\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(null,\"File Not Found\");\r\n\t\t}\r\n\t\t\r\n\t\tlistWriter.println(newReceipt);\r\n\t\tfor(int count=0; count < listModel.getSize(); count++)\r\n\t\t\tcontentWriter.println(listModel.elementAt(count));\r\n\t\t\r\n\t\tlistWriter.close();\r\n\t\tcontentWriter.close();\r\n\t\tclearReceipt();\r\n\t}",
"public void generateAcknowledgeReceipt(String receiptBody,\r\n\t\t\tString receiptName) {\n\t\tString contextPath = servletContext.getContextPath();\r\n\r\n\t\tlogger.info(\"Start of generateAcknowledgeReceipt( \" + receiptBody\r\n\t\t\t\t+ \" ) in PdfGeneratorService\");\r\n\t\tlogger.info(\"contextPath :: \" + contextPath);\r\n\t\t// String dest = servletContext.getRealPath(\"/\")+ receiptName;\r\n\t\tString dest = getFileServerPath(receiptName);\r\n\t\tlogger.info(\"fileName :: \" + dest);\r\n\r\n\t\tDocument ackReceipt = new Document();\r\n\t\t\r\n\t\tPdfWriter pdfWriter = null;\r\n\t\tFile f = null;\r\n\t\ttry {\r\n\t\t\tf = new File(dest);\r\n\t\t\tf.createNewFile();\r\n\t\t\tpdfWriter = PdfWriter.getInstance(ackReceipt,\r\n\t\t\t\t\tnew FileOutputStream(f));\r\n\t\t\tackReceipt.open();\r\n\t\t\taddMetaData(ackReceipt);\r\n\t\t\tXMLWorkerHelper worker = XMLWorkerHelper.getInstance();\r\n\t\t\tworker.parseXHtml(pdfWriter, ackReceipt, new StringReader(\r\n\t\t\t\t\treceiptBody));\r\n\t\t\tackReceipt.close();\r\n\t\t\t//logger.error(\"================================ end of e generateAcknowledgeReceipt\");\r\n\t\t} catch (DocumentException e) {\r\n\t\t\tlogger.error(e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tlogger.error(e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tif(pdfWriter!=null){\r\n\t\t\tpdfWriter.flush();\r\n\t\t\tpdfWriter.close();}\r\n\t\t\tif(ackReceipt!=null){\r\n\t\t\t\tackReceipt.close();\r\n\t\t\t}\r\n\t\t\t//System.out.println(\"================PDF================ \"+dest +\" \"+ new File(dest).exists());\r\n\t\t\t//logger.error(\"================PDF================ \"+dest +\" \"+ new File(dest).exists());\r\n\t\t}\r\n\t}",
"private String CreateInvoice() throws Exception {\n\n\t\tgetDriver().get(\"https://stg.autobrain.com/worker/retail_fulfillment/new_invoice\");\n\n\t\t// Add Quantity\n\t\tString s = prop.getProperty(\"no_of_devices\");\n\t\tint quantity = Integer.parseInt(s);\n\n\t\tfor (int i = 0; i < quantity; i++) {\n\t\t\tVisibilityOfElementByXpath(\"//div[@class='input-group number-picker']/span[2]/button\", 15).click();\n\t\t\tThread.sleep(500);\n\t\t}\n\n\t\t// Get invoice auto-generated number\n\t\tinvoice_id_before = VisibilityOfElementByXpath(\"//code[@class='name-preview']\", 15).getText();\n\t\tinvoice_id_before = invoice_id_before.replace(\"#\", \"\");\n\n\t\t// Description\n\t\tVisibilityOfElementByID(\"invoice_description\", 15).sendKeys(\"testing_\" + invoice_id_before);\n\n\t\t// Select account type\n\t\tSelect select = new Select(VisibilityOfElementByID(\"invoice_account_type\", 15));\n\n\t\tif (prop.getProperty(\"account_type\").equalsIgnoreCase(\"Autobrain Family\")) {\n\t\t\tinvoice_account_type = \"personal\";\n\t\t}\n\n\t\telse if (prop.getProperty(\"account_type\").equalsIgnoreCase(\"Autobrain Business\")) {\n\t\t\tinvoice_account_type = \"business\";\n\t\t}\n\n\t\tselect.selectByVisibleText(invoice_account_type);\n\n\t\t// Submit button\n\t\twait(getDriver(), 10).until(ExpectedConditions.visibilityOfElementLocated(By.name(\"commit\"))).click();\n\n\t\t// Validate invoice created\n\t\t// Get invoice auto-generated number\n\t\tString invoice_id_after = VisibilityOfElementByXpath(\"//code[@class='name-preview']\", 15).getText();\n\n\t\tif (!invoice_id_before.equals(invoice_id_after)) {\n\t\t\tSystem.out.println(\"Invoice created successfully!\");\n\t\t}\n\n\t\telse if (invoice_id_before.equals(invoice_id_after)) {\n\t\t\tAssert.assertEquals(true, false, \"Invoice not created successfully!\");\n\t\t}\n\n\t\treturn invoice_name = \"testing_\" + invoice_id_before;\n\n\t}",
"public PurchaseNewTicket() {\n initComponents();\n mLoadMovieName();\n mLoadTime();\n }",
"Message create(MessageInvoice invoice);",
"public void endTransaction() {\r\n Receipt salesReceipt = new Receipt();\r\n salesReceipt.createReceipt(customer, lineItems);\r\n }",
"private MetaSparqlRequest createRollbackPreInsered() {\n\t\treturn createRollbackMT1();\n\t}",
"public void createUserReadReceipt(BUser reader, int messageReceiptStatus){\n\n // Add the read receipt to the local dao database\n BMessageReceipt bMessageReceipt = new BMessageReceipt();\n\n // Add/update a read receipt\n removeUserReadReceipt(reader);\n resetBMessageReceiptList();\n List readReceipts = getBMessageReceiptList();\n\n\n bMessageReceipt.setReader(reader);\n bMessageReceipt.setReaderId(reader.getId());\n bMessageReceipt.setBMessageId(this.getId());\n bMessageReceipt.setReadStatus(messageReceiptStatus);\n\n daoSession.insertOrReplace(bMessageReceipt);\n readReceipts.add(bMessageReceipt);\n DaoCore.updateEntity(this);\n }",
"public synchronized void resetBMessageReceiptList() {\n bMessageReceiptList = null;\n }",
"@Override\r\n\t\tpublic void action() {\n\t\t\t\r\n\t\t\tACLMessage request = new ACLMessage (ACLMessage.REQUEST);\r\n\t\t\trequest.setProtocol(FIPANames.InteractionProtocol.FIPA_REQUEST);\r\n\t\t\trequest.addReceiver(new AID(\"BOAgent\",AID.ISLOCALNAME));\r\n\t\t\trequest.setLanguage(new SLCodec().getName());\t\r\n\t\t\trequest.setOntology(RequestOntology.getInstance().getName());\r\n\t\t\tInformMessage imessage = new InformMessage();\r\n\t\t\timessage.setPrice(Integer.parseInt(price));\r\n\t\t\timessage.setVolume(Integer.parseInt(volume));\r\n\t\t\ttry {\r\n\t\t\t\tthis.agent.getContentManager().fillContent(request, imessage);\r\n\t\t\t} catch (CodecException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (OntologyException 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\tthis.agent.addBehaviour(new AchieveREInitiator(this.agent, request)\r\n\t\t\t{\t\t\t\r\n\t\t\t/**\r\n\t\t\t\t * \r\n\t\t\t\t */\r\n\t\t\t\tprivate static final long serialVersionUID = -8866775600403413061L;\r\n\r\n\t\t\t\tprotected void handleInform(ACLMessage inform)\r\n\t\t\t\t{\t\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}",
"protected EObject createInitialModel() {\r\n \t\tReqIF root = reqif10Factory.createReqIF();\r\n \r\n \t\tReqIFHeader header = reqif10Factory.createReqIFHeader();\r\n \t\troot.setTheHeader(header);\r\n \r\n \t\t// Setting the time gets more and more complicated...\r\n \t\ttry {\r\n \t\t\tGregorianCalendar cal = new GregorianCalendar();\r\n \t\t\tcal.setTime(new Date());\r\n \t\t\theader.setCreationTime(DatatypeFactory.newInstance()\r\n \t\t\t\t\t.newXMLGregorianCalendar(cal));\r\n \t\t} catch (DatatypeConfigurationException e) {\r\n \t\t\tthrow new RuntimeException(e);\r\n \t\t}\r\n \r\n \t\theader.setSourceToolId(\"ProR (http://pror.org)\");\r\n //\t\theader.setAuthor(System.getProperty(\"user.name\"));\r\n \r\n \t\tReqIFContent content = reqif10Factory.createReqIFContent();\r\n \t\troot.setCoreContent(content);\r\n \r\n \t\t// Add a DatatypeDefinition\r\n \t\tDatatypeDefinitionString ddString = reqif10Factory\r\n \t\t\t\t.createDatatypeDefinitionString();\r\n \t\tddString.setLongName(\"T_String32k\");\r\n \t\tddString.setMaxLength(new BigInteger(\"32000\"));\r\n \t\tcontent.getDatatypes().add(ddString);\r\n \r\n \t\t// Add a Specification\r\n \t\tSpecification spec = reqif10Factory.createSpecification();\r\n \t\tspec.setLongName(\"Specification Document\");\r\n \t\tcontent.getSpecifications().add(spec);\r\n \r\n \t\t// Add a SpecType\r\n \t\tSpecObjectType specType = reqif10Factory.createSpecObjectType();\r\n \t\tspecType.setLongName(\"Requirement Type\");\r\n \t\tcontent.getSpecTypes().add(specType);\r\n \r\n \t\t// Add an AttributeDefinition\r\n \t\tAttributeDefinitionString ad = reqif10Factory\r\n \t\t\t\t.createAttributeDefinitionString();\r\n \t\tad.setType(ddString);\r\n \t\tad.setLongName(\"Description\");\r\n \t\tspecType.getSpecAttributes().add(ad);\r\n \r\n \t\t// Configure the Specification View\r\n \t\tProrToolExtension extension = ConfigurationFactory.eINSTANCE\r\n \t\t\t\t.createProrToolExtension();\r\n \t\troot.getToolExtensions().add(extension);\r\n \t\tProrSpecViewConfiguration prorSpecViewConfiguration = ConfigurationFactory.eINSTANCE\r\n \t\t\t\t.createProrSpecViewConfiguration();\r\n \t\textension.getSpecViewConfigurations().add(prorSpecViewConfiguration);\r\n \t\tprorSpecViewConfiguration.setSpecification(spec);\r\n \t\tColumn col = ConfigurationFactory.eINSTANCE.createColumn();\r\n \t\tcol.setLabel(\"Description\");\r\n \t\tcol.setWidth(400);\r\n \t\tprorSpecViewConfiguration.getColumns().add(col);\r\n \r\n \t\tColumn leftHeaderColumn = ConfigFactory.eINSTANCE.createColumn();\r\n \t\tleftHeaderColumn\r\n \t\t\t\t.setWidth(ConfigurationUtil.DEFAULT_LEFT_HEADER_COLUMN_WIDTH);\r\n \t\tleftHeaderColumn\r\n \t\t\t\t.setLabel(ConfigurationUtil.DEFAULT_LEFT_HEADER_COLUMN_NAME);\r\n \t\tprorSpecViewConfiguration.setLeftHeaderColumn(leftHeaderColumn);\r\n \r\n \t\t// Configure the Label configuration\r\n \t\tProrGeneralConfiguration generalConfig = ConfigurationFactory.eINSTANCE\r\n \t\t\t\t.createProrGeneralConfiguration();\r\n \t\tLabelConfiguration labelConfig = ConfigurationFactory.eINSTANCE\r\n \t\t\t\t.createLabelConfiguration();\r\n \t\tlabelConfig.getDefaultLabel().add(\"Description\");\r\n \t\tgeneralConfig.setLabelConfiguration(labelConfig);\r\n \t\textension.setGeneralConfiguration(generalConfig);\r\n \r\n \t\t// Create one Requirement\r\n \t\tSpecObject specObject = reqif10Factory.createSpecObject();\r\n \t\tspecObject.setType(specType);\r\n \t\tcontent.getSpecObjects().add(specObject);\r\n \t\tAttributeValueString value = reqif10Factory.createAttributeValueString();\r\n \t\tvalue.setTheValue(\"Start editing here.\");\r\n \t\tvalue.setDefinition(ad);\r\n \t\tspecObject.getValues().add(value);\r\n \r\n \t\t// Add the requirement to the Specification\r\n \t\tSpecHierarchy specHierarchy = reqif10Factory.createSpecHierarchy();\r\n \t\tspec.getChildren().add(specHierarchy);\r\n \t\tspecHierarchy.setObject(specObject);\t\r\n \t\treturn root;\r\n \t}",
"public void sendReceipt(ActionEvent event) throws IOException, FileNotFoundException, DocumentException {\n HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();\r\n HttpServletResponse response = (HttpServletResponse) FacesContext.getCurrentInstance().getExternalContext().getResponse();\r\n System.err.println(\"hahaha teest\");\r\n// thisOrder = (OrderEntity) event.getComponent().getAttributes().get(\"viewOrder\");\r\n System.out.println(\"No1: in sending invoice\" + thisOrder.getOrderId());\r\n billingSessionBean.createReceipt(thisOrder.getInvoice().getInvoiceId(), currentDate);\r\n thisOrder.setStatus(\"ReceiptSent\");\r\n orderSessionBean.updateOrder(thisOrder);\r\n double amount = thisOrder.getSalePrice();\r\n int receivable = billingSessionBean.viewAccount(2).getId();\r\n int cash = billingSessionBean.viewAccount(1).getId();\r\n System.out.println(\"whats the price now? and account\" + amount + receivable + cash);\r\n billingSessionBean.receivePayment(amount, cash);\r\n billingSessionBean.postPayment(amount, receivable);\r\n System.out.println(\"NO2: After confirming\" + thisOrder.getStatus());\r\n fBEmailSessionBean.sendReceipt(thisOrder.getEmail(), thisOrder.getInvoice().getReceipt());\r\n }",
"@PostConstruct\r\n public void iniciar() {\n notaEntrada.setIdnotaentrada(0);\r\n notaEntrada.setOrdenCompra(new OrdenCompra());\r\n notaEntrada.setNumero(maxNumero() + 1);\r\n notaEntrada.setFechaReg(new Date());\r\n notaEntrada.setFechaDocref(null);\r\n notaEntrada.setNroDocref(\"\");\r\n notaEntrada.setObservacion(\"\");\r\n notaEntrada.setTipoIngreso(\"\");\r\n notaEntrada.setProveedor(new Proveedor());\r\n notaEntrada.setAlmacenDestino(new Almacen());\r\n listNotaEntradaDetalle.clear();\r\n this.producto = null;\r\n }",
"public PrescriptionDetailCreator() {\n detail=new PrescriptionDetail();\n\n }",
"public CartCreateRequest(String email, String ltc) {\n\t\tthis(email, ltc, null, null, null);\n\t}",
"@Override\n\tpublic int createTicket(Booking_ticket bt) {\n\t\treturn btr.createTicket(bt);\n\t}",
"public ReceiptAdapter(Context context,LinkedList<Receipt> receipts) \n {\n super();\n mContext = context;\n rec = receipts;\n inflater = (LayoutInflater) mContext\n \t\t .getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n }",
"private void attemptCreation() {\n newFlat.setAddressLine1(\"\");\n newFlat.setPostcode(\"\");\n newFlat.setNotes(\"\");\n newFlat.setFlatNum(\"\");\n newFlat.setTenant(\"\");\n\n // Reset errors\n actvProperty.setError(null);\n etFlatNum.setError(null);\n etFlatNotes.setError(null);\n flatTenant.setError(null);\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for valid address, if the user entered one\n if (TextUtils.isEmpty(actvProperty.getText().toString())) {\n actvProperty.setError(\"This field is required\");\n cancel = true;\n focusView = actvProperty;\n } else if (!isAddressValid(actvProperty.getText().toString())) {\n actvProperty.setError(\"This address is invalid\");\n cancel = true;\n focusView = actvProperty;\n }\n\n // Check for a valid flat number, if the user entered one\n if (TextUtils.isEmpty(etFlatNum.getText().toString())) {\n etFlatNum.setError(\"This field is required\");\n cancel = true;\n if (focusView == null) {\n focusView = etFlatNum;\n }\n } else if (!isFlatNumValid(\"Flat \" + etFlatNum.getText().toString())) {\n etFlatNum.setError(\"This flat number is in use\");\n cancel = true;\n if (focusView == null) {\n focusView = etFlatNum;\n }\n\n Collections.sort(flatNums);\n\n new AlertDialog.Builder(this)\n .setIcon(android.R.drawable.ic_dialog_alert)\n .setTitle(\"Warning\")\n .setMessage(\"These flats already exist in \" + actvProperty.getText().toString()\n + \":\\n\\n\" + flatNums.toString() + \"\\n\\nPlease enter a unique number.\")\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n })\n .show();\n }\n\n // Check for valid tenant, if the user entered one\n if (TextUtils.isEmpty(flatTenant.getText().toString())) {\n // No need to add a tenant\n } else if (!isTenantValid(flatTenant.getText().toString())) {\n flatTenant.setError(\"This tenant does not exist in the system\");\n cancel = true;\n if (focusView == null) {\n focusView = flatTenant;\n }\n } else if (!isTenantFree(flatTenant.getText().toString())) {\n flatTenant.setError(\"This tenant number is in use\");\n cancel = true;\n if (focusView == null) {\n focusView = flatTenant;\n }\n }\n\n // Check for notes and add default notes if null\n if (TextUtils.isEmpty(etFlatNotes.getText().toString())) {\n etFlatNotes.setText(\"No notes yet. That's okay, you can add some later..\");\n }\n\n if (cancel) {\n // There was an error; don't attempt creation and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n inputMethodManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);\n saveNewFlat();\n }\n }",
"private void selfCheck()\n {\n createSession();\n\n // Verify that we can create a mail body\n ImmutableNotification notification = Notification.builder(Instant.now(), \"message\")\n .siteId(1)\n .projectName(\"project\")\n .projectId(2)\n .workflowName(\"workflow\")\n .revision(\"revision\")\n .attemptId(3)\n .sessionId(4)\n .taskName(\"task\")\n .timeZone(ZoneOffset.UTC)\n .sessionUuid(UUID.randomUUID())\n .sessionTime(OffsetDateTime.now())\n .workflowDefinitionId(5L)\n .build();\n try {\n body(notification);\n }\n catch (Exception e) {\n throw ThrowablesUtil.propagate(e);\n }\n }",
"@Override\n\tpublic void createTicket(TicketData request , StreamObserver<TicketData> responseObserver) {\n\t\tSystem.out.println(\"Requested to store a new Ticket\");\n\n\t\tTicket t = SimpleTicketStore.CreateTicket(\n\t\t\t\trequest.getReporter()\n\t\t\t\t,request.getTopic()\n\t\t\t\t,de.uniba.rz.entities.Status.values()[request.getStatusValue()]\n\t\t\t\t\t\t,request.getDescription()\n\t\t\t\t\t\t,de.uniba.rz.entities.Type.values()[request.getTypeValue()]\n\t\t\t\t\t\t\t\t,Priority.values()[request.getPriorityValue()]\n\t\t\t\t);\n\n\t\tTicketData tdata = Ticket2TicketData(t);\n\n\t\tresponseObserver.onNext(tdata);\n\t\tresponseObserver.onCompleted();\n\n\t}",
"@Override\n\tpublic int create(Proveedor r) {\n\t\treturn 0;\n\t}",
"public void createContract() {\n\r\n\t}",
"private void initData() {\n ContractList conl = new ContractList();\n String iCard = txtindentify.getText().trim();\n if (conl.getacc(iCard) == 0) {\n txtAcc.setText(\"NEW CUSTOMER\");\n\n } else {\n Customer cus = new Customer();\n CustomerList cl = new CustomerList();\n cus = cl.getcus(iCard);\n txtAcc.setText(Integer.toString(cus.acc));\n\n }\n }",
"public void create(Bundle extras) {\n\t\tAsunto=Integer.parseInt(extras.getString(\"Asunto\"));\n\t\tEstado=Integer.parseInt(extras.getString(\"Estado\"));\n\t\tBody=extras.getString(\"Direccion\");\n\t\tType=Integer.parseInt(extras.getString(\"Tipo\"));\n\t\tId=Integer.parseInt(extras.getString(\"IdNotificacion\"));\n\t\tLatitud=Double.parseDouble(extras.getString(\"Latitud\"));\n\t\tLongitud=Double.parseDouble(extras.getString(\"Longitud\"));\n\t}",
"public PaymentRequest() {\r\n items = new ArrayList();\r\n }",
"@Override\n protected void onPreExecute() {\n\n Dialog.setMessage(\"Posting Primary Receipt...\");\n Dialog.setCancelable(false);\n Dialog.show();\n }",
"private void printTxnReceipt(IApplicationManager theAppMgr, String receiptName\n , boolean isFirstPrint) {\n ReceiptLocaleSetter localeSetter = new ReceiptLocaleSetter(compositePOSTransaction.getStore()\n , getCustomer());\n ReceiptFactory receiptFactory = new ReceiptFactory(new Object[] {this\n }, receiptName);\n localeSetter.setLocale(receiptFactory);\n if (isFirstPrint)\n receiptFactory.print(theAppMgr);\n else{\n //\tSystem.out.println(\"666666666666666666666666\");\n receiptFactory.reprint(theAppMgr);\n }}",
"void setNumberPaymentReceipt(int nRicevuta);",
"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 }",
"public void sendReceipt(String fName, String customerEmail,int bookingNo, int numTicks,String movieTitle, String date, String timeslot){\n\t Properties props = makeProps();\r\n\t \r\n\t final String username = \"[email protected]\";\r\n\t final String password = \"movie4050\";\r\n\t \r\n\t try{\r\n\t\t Session session = Session.getDefaultInstance(props, \r\n\t\t\t\t new Authenticator(){\r\n\t\t\t \t\tprotected PasswordAuthentication getPasswordAuthentication() {\r\n\t\t\t \t\t\treturn new PasswordAuthentication(username,password);}});\r\n\t // -- Create a new message --\r\n\t Message msg = new MimeMessage(session);\r\n\t String slot;\r\n\t if(timeslot.equals(\"A\")) {\r\n\t\t slot = \"1 PM\";\r\n\t }else if(timeslot.equals(\"B\")) {\r\n\t\t slot = \"4 PM\";\r\n\t }else if(timeslot.equals(\"C\")) {\r\n\t\t slot = \"7 PM\";\r\n\t }else if(timeslot.equals(\"D\")) {\r\n\t\t slot = \"10 PM\";\r\n\t }else {\r\n\t\t slot = slot = \"Houston, we have a problem.\";\r\n\t }\r\n\t /* from */\r\n\t msg.setFrom(new InternetAddress(username));\r\n \r\n\t /* to */\r\n\t msg.setRecipients(Message.RecipientType.TO, \r\n InternetAddress.parse(customerEmail,false));\r\n\t /* title */\r\n\t msg.setSubject(\"Order Confirmation - Receipt\");\r\n \r\n\t /* text field */ \r\n\t String sendThis = \"Hello \\t\"+fName + \"!\\n\\nHere's your most recent booking for:\\t\"+movieTitle\r\n\t\t\t +\"\\nOrder Number:\\t\" + bookingNo\r\n\t\t\t +\"\\nNumber of tickets purchased:\\t\"+numTicks\r\n\t\t\t +\"\\nDate of showing:\\t\"+ date +\" at:\"+ slot\r\n\t\t\t +\"\\n\\n\\nThank you for choosing :^U\";\r\n\t msg.setText(sendThis);\r\n\t msg.setSentDate(new Date());\r\n\t Transport.send(msg);\r\n \r\n\t System.out.println(\"Message sent.\");\r\n\t }catch (MessagingException e){ \r\n\t\t System.out.println(\"Error: \" + e);\r\n\t }\r\n }",
"SerialResponse createRecipient(PinRecipientPost pinRecipientPost);",
"private void sendAcknoledmentOfReceipt() {\n\t\ttry {\n\t\t\tthis.receiver.sendLetter(new AcknowledgmentOfReceipt(this.receiver, this.sender, this.getDescription()));\n\t\t} catch (NoSuchMoneyException e) {}\n\t}",
"public Receipt( List<AbstractProduct> itemsReceived,\n List<AbstractProduct> itemsOutOfStock,\n List<AbstractProduct> removedItems) {\n this.itemsReceived = itemsReceived;\n this.itemsOutOfStock = itemsOutOfStock;\n this.removedItems = removedItems;\n }",
"@Test\r\n public void testPrintReceipt() {\r\n \r\n instance = new Controller(dbMgr);\r\n instance.printReceipt();\r\n \r\n }",
"public PlEarlyRedemption () {\n\t\tsuper();\n\t}",
"public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tinvoiceEClass = createEClass(INVOICE);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__INVOICE_ID);\n\t\tcreateEReference(invoiceEClass, INVOICE__BILLING_ACCOUNT);\n\t\tcreateEReference(invoiceEClass, INVOICE__CONTACT_MECH);\n\t\tcreateEReference(invoiceEClass, INVOICE__CURRENCY_UOM);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__DESCRIPTION);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__DUE_DATE);\n\t\tcreateEReference(invoiceEClass, INVOICE__INVOICE_ATTRIBUTES);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__INVOICE_DATE);\n\t\tcreateEReference(invoiceEClass, INVOICE__INVOICE_ITEMS);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__INVOICE_MESSAGE);\n\t\tcreateEReference(invoiceEClass, INVOICE__INVOICE_NOTES);\n\t\tcreateEReference(invoiceEClass, INVOICE__INVOICE_STATUSES);\n\t\tcreateEReference(invoiceEClass, INVOICE__INVOICE_TYPE);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__PAID_DATE);\n\t\tcreateEReference(invoiceEClass, INVOICE__PARTY);\n\t\tcreateEReference(invoiceEClass, INVOICE__PARTY_ID_FROM);\n\t\tcreateEReference(invoiceEClass, INVOICE__RECURRENCE_INFO);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__REFERENCE_NUMBER);\n\t\tcreateEReference(invoiceEClass, INVOICE__ROLE_TYPE);\n\t\tcreateEReference(invoiceEClass, INVOICE__STATUS);\n\n\t\tinvoiceAttributeEClass = createEClass(INVOICE_ATTRIBUTE);\n\t\tcreateEReference(invoiceAttributeEClass, INVOICE_ATTRIBUTE__INVOICE);\n\t\tcreateEAttribute(invoiceAttributeEClass, INVOICE_ATTRIBUTE__ATTR_NAME);\n\t\tcreateEAttribute(invoiceAttributeEClass, INVOICE_ATTRIBUTE__ATTR_DESCRIPTION);\n\t\tcreateEAttribute(invoiceAttributeEClass, INVOICE_ATTRIBUTE__ATTR_VALUE);\n\n\t\tinvoiceContactMechEClass = createEClass(INVOICE_CONTACT_MECH);\n\t\tcreateEReference(invoiceContactMechEClass, INVOICE_CONTACT_MECH__INVOICE);\n\t\tcreateEReference(invoiceContactMechEClass, INVOICE_CONTACT_MECH__CONTACT_MECH);\n\t\tcreateEReference(invoiceContactMechEClass, INVOICE_CONTACT_MECH__CONTACT_MECH_PURPOSE_TYPE);\n\n\t\tinvoiceContentEClass = createEClass(INVOICE_CONTENT);\n\t\tcreateEReference(invoiceContentEClass, INVOICE_CONTENT__INVOICE);\n\t\tcreateEReference(invoiceContentEClass, INVOICE_CONTENT__CONTENT);\n\t\tcreateEReference(invoiceContentEClass, INVOICE_CONTENT__INVOICE_CONTENT_TYPE);\n\t\tcreateEAttribute(invoiceContentEClass, INVOICE_CONTENT__FROM_DATE);\n\t\tcreateEAttribute(invoiceContentEClass, INVOICE_CONTENT__THRU_DATE);\n\n\t\tinvoiceContentTypeEClass = createEClass(INVOICE_CONTENT_TYPE);\n\t\tcreateEAttribute(invoiceContentTypeEClass, INVOICE_CONTENT_TYPE__INVOICE_CONTENT_TYPE_ID);\n\t\tcreateEAttribute(invoiceContentTypeEClass, INVOICE_CONTENT_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(invoiceContentTypeEClass, INVOICE_CONTENT_TYPE__HAS_TABLE);\n\t\tcreateEReference(invoiceContentTypeEClass, INVOICE_CONTENT_TYPE__PARENT_TYPE);\n\n\t\tinvoiceItemEClass = createEClass(INVOICE_ITEM);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__INVOICE);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__INVOICE_ITEM_SEQ_ID);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__AMOUNT);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__DESCRIPTION);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__INVENTORY_ITEM);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__INVOICE_ITEM_TYPE);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__OVERRIDE_GL_ACCOUNT);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__OVERRIDE_ORG_PARTY);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__PARENT_INVOICE_ID);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__PARENT_INVOICE_ITEM_SEQ_ID);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__PRODUCT);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__PRODUCT_FEATURE);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__QUANTITY);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__SALES_OPPORTUNITY);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__TAX_AUTH_GEO);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__TAX_AUTH_PARTY);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__TAX_AUTHORITY_RATE_SEQ);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__TAXABLE_FLAG);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__UOM);\n\n\t\tinvoiceItemAssocEClass = createEClass(INVOICE_ITEM_ASSOC);\n\t\tcreateEReference(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__INVOICE_ITEM_ASSOC_TYPE);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__FROM_DATE);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__INVOICE_ID_FROM);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__INVOICE_ID_TO);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__INVOICE_ITEM_SEQ_ID_FROM);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__INVOICE_ITEM_SEQ_ID_TO);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__AMOUNT);\n\t\tcreateEReference(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__PARTY_ID_FROM);\n\t\tcreateEReference(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__PARTY_ID_TO);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__QUANTITY);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__THRU_DATE);\n\n\t\tinvoiceItemAssocTypeEClass = createEClass(INVOICE_ITEM_ASSOC_TYPE);\n\t\tcreateEAttribute(invoiceItemAssocTypeEClass, INVOICE_ITEM_ASSOC_TYPE__INVOICE_ITEM_ASSOC_TYPE_ID);\n\t\tcreateEAttribute(invoiceItemAssocTypeEClass, INVOICE_ITEM_ASSOC_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(invoiceItemAssocTypeEClass, INVOICE_ITEM_ASSOC_TYPE__HAS_TABLE);\n\t\tcreateEReference(invoiceItemAssocTypeEClass, INVOICE_ITEM_ASSOC_TYPE__PARENT_TYPE);\n\n\t\tinvoiceItemAttributeEClass = createEClass(INVOICE_ITEM_ATTRIBUTE);\n\t\tcreateEAttribute(invoiceItemAttributeEClass, INVOICE_ITEM_ATTRIBUTE__ATTR_NAME);\n\t\tcreateEAttribute(invoiceItemAttributeEClass, INVOICE_ITEM_ATTRIBUTE__INVOICE_ID);\n\t\tcreateEAttribute(invoiceItemAttributeEClass, INVOICE_ITEM_ATTRIBUTE__INVOICE_ITEM_SEQ_ID);\n\t\tcreateEAttribute(invoiceItemAttributeEClass, INVOICE_ITEM_ATTRIBUTE__ATTR_DESCRIPTION);\n\t\tcreateEAttribute(invoiceItemAttributeEClass, INVOICE_ITEM_ATTRIBUTE__ATTR_VALUE);\n\n\t\tinvoiceItemTypeEClass = createEClass(INVOICE_ITEM_TYPE);\n\t\tcreateEAttribute(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__INVOICE_ITEM_TYPE_ID);\n\t\tcreateEReference(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__DEFAULT_GL_ACCOUNT);\n\t\tcreateEAttribute(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__HAS_TABLE);\n\t\tcreateEReference(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__INVOICE_ITEM_TYPE_ATTRS);\n\t\tcreateEReference(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__INVOICE_ITEM_TYPE_GL_ACCOUNTS);\n\t\tcreateEReference(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__PARENT_TYPE);\n\n\t\tinvoiceItemTypeAttrEClass = createEClass(INVOICE_ITEM_TYPE_ATTR);\n\t\tcreateEReference(invoiceItemTypeAttrEClass, INVOICE_ITEM_TYPE_ATTR__INVOICE_ITEM_TYPE);\n\t\tcreateEAttribute(invoiceItemTypeAttrEClass, INVOICE_ITEM_TYPE_ATTR__ATTR_NAME);\n\t\tcreateEAttribute(invoiceItemTypeAttrEClass, INVOICE_ITEM_TYPE_ATTR__DESCRIPTION);\n\n\t\tinvoiceItemTypeGlAccountEClass = createEClass(INVOICE_ITEM_TYPE_GL_ACCOUNT);\n\t\tcreateEReference(invoiceItemTypeGlAccountEClass, INVOICE_ITEM_TYPE_GL_ACCOUNT__INVOICE_ITEM_TYPE);\n\t\tcreateEReference(invoiceItemTypeGlAccountEClass, INVOICE_ITEM_TYPE_GL_ACCOUNT__ORGANIZATION_PARTY);\n\t\tcreateEReference(invoiceItemTypeGlAccountEClass, INVOICE_ITEM_TYPE_GL_ACCOUNT__GL_ACCOUNT);\n\n\t\tinvoiceItemTypeMapEClass = createEClass(INVOICE_ITEM_TYPE_MAP);\n\t\tcreateEReference(invoiceItemTypeMapEClass, INVOICE_ITEM_TYPE_MAP__INVOICE_TYPE);\n\t\tcreateEAttribute(invoiceItemTypeMapEClass, INVOICE_ITEM_TYPE_MAP__INVOICE_ITEM_MAP_KEY);\n\t\tcreateEReference(invoiceItemTypeMapEClass, INVOICE_ITEM_TYPE_MAP__INVOICE_ITEM_TYPE);\n\n\t\tinvoiceNoteEClass = createEClass(INVOICE_NOTE);\n\t\tcreateEReference(invoiceNoteEClass, INVOICE_NOTE__INVOICE);\n\n\t\tinvoiceRoleEClass = createEClass(INVOICE_ROLE);\n\t\tcreateEReference(invoiceRoleEClass, INVOICE_ROLE__INVOICE);\n\t\tcreateEReference(invoiceRoleEClass, INVOICE_ROLE__PARTY);\n\t\tcreateEReference(invoiceRoleEClass, INVOICE_ROLE__ROLE_TYPE);\n\t\tcreateEAttribute(invoiceRoleEClass, INVOICE_ROLE__DATETIME_PERFORMED);\n\t\tcreateEAttribute(invoiceRoleEClass, INVOICE_ROLE__PERCENTAGE);\n\n\t\tinvoiceStatusEClass = createEClass(INVOICE_STATUS);\n\t\tcreateEReference(invoiceStatusEClass, INVOICE_STATUS__STATUS);\n\t\tcreateEReference(invoiceStatusEClass, INVOICE_STATUS__INVOICE);\n\t\tcreateEAttribute(invoiceStatusEClass, INVOICE_STATUS__STATUS_DATE);\n\t\tcreateEReference(invoiceStatusEClass, INVOICE_STATUS__CHANGE_BY_USER_LOGIN);\n\n\t\tinvoiceTermEClass = createEClass(INVOICE_TERM);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__INVOICE_TERM_ID);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__DESCRIPTION);\n\t\tcreateEReference(invoiceTermEClass, INVOICE_TERM__INVOICE);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__INVOICE_ITEM_SEQ_ID);\n\t\tcreateEReference(invoiceTermEClass, INVOICE_TERM__INVOICE_TERM_ATTRIBUTES);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__TERM_DAYS);\n\t\tcreateEReference(invoiceTermEClass, INVOICE_TERM__TERM_TYPE);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__TERM_VALUE);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__TEXT_VALUE);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__UOM_ID);\n\n\t\tinvoiceTermAttributeEClass = createEClass(INVOICE_TERM_ATTRIBUTE);\n\t\tcreateEReference(invoiceTermAttributeEClass, INVOICE_TERM_ATTRIBUTE__INVOICE_TERM);\n\t\tcreateEAttribute(invoiceTermAttributeEClass, INVOICE_TERM_ATTRIBUTE__ATTR_NAME);\n\t\tcreateEAttribute(invoiceTermAttributeEClass, INVOICE_TERM_ATTRIBUTE__ATTR_DESCRIPTION);\n\t\tcreateEAttribute(invoiceTermAttributeEClass, INVOICE_TERM_ATTRIBUTE__ATTR_VALUE);\n\n\t\tinvoiceTypeEClass = createEClass(INVOICE_TYPE);\n\t\tcreateEAttribute(invoiceTypeEClass, INVOICE_TYPE__INVOICE_TYPE_ID);\n\t\tcreateEAttribute(invoiceTypeEClass, INVOICE_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(invoiceTypeEClass, INVOICE_TYPE__HAS_TABLE);\n\t\tcreateEReference(invoiceTypeEClass, INVOICE_TYPE__INVOICE_TYPE_ATTRS);\n\t\tcreateEReference(invoiceTypeEClass, INVOICE_TYPE__PARENT_TYPE);\n\n\t\tinvoiceTypeAttrEClass = createEClass(INVOICE_TYPE_ATTR);\n\t\tcreateEReference(invoiceTypeAttrEClass, INVOICE_TYPE_ATTR__INVOICE_TYPE);\n\t\tcreateEAttribute(invoiceTypeAttrEClass, INVOICE_TYPE_ATTR__ATTR_NAME);\n\t\tcreateEAttribute(invoiceTypeAttrEClass, INVOICE_TYPE_ATTR__DESCRIPTION);\n\t}",
"private void setupAddPreReq() {\n\t\tmakeButton(\"Add Pre-Requisite\", (ActionEvent e) -> {\n\t\t\ttry {\n\t\t\t\tint row = table.getSelectedRow();\n\n\t\t\t\tif (row < 0) {\n\t\t\t\t\tJOptionPane.showMessageDialog(getRootPane(), \"Please select a course\", \"Error\",\n\t\t\t\t\t\t\tJOptionPane.OK_OPTION);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tString[] inputs = getInputs(new String[] { \"Course ID of Pre-Req: \" });\n\n\t\t\t\tif (inputs == null)\n\t\t\t\t\treturn;\n\n\t\t\t\tint parentCourseId = adCon.getCourseIdFromRow(row);\n\t\t\t\tint childCourseId = Integer.parseInt(inputs[0]);\n\n\t\t\t\tadCon.addPreReq(parentCourseId, childCourseId);\n\t\t\t\tupdateTextArea(adCon.searchCourseById(parentCourseId));\n\n\t\t\t} catch (NumberFormatException ex) {\n\t\t\t\tJOptionPane.showMessageDialog(getRootPane(), \"Course number must be a number\", \"Error\",\n\t\t\t\t\t\tJOptionPane.OK_OPTION);\n\t\t\t}\n\t\t});\n\t}",
"@Override\n\tpublic String createMsg_request() {\n\t\treturn null;\n\t}",
"Delivery createDelivery();",
"public void createNewOrder()\n\t{\n\t\tnew DataBaseOperationAsyn().execute();\n\t}",
"@Transactional( WorkflowPlugin.BEAN_TRANSACTION_MANAGER )\n void create( Workflow reply );",
"public CardRequest() {\r\n card = new MSRData(); // an empty one\r\n }",
"public AccommodationPledgeServiceImpl()\n {\n \t//Initialise the related Object stores\n \n }",
"@Override\n\tpublic void createDigestEmail() {\n\n\t}",
"public void create() {\n\t\t\n\t}",
"private void createPdf(CartReceiptResponse receiptResponse, HttpServletResponse response, Locale localeObj)\n throws DocumentException, IOException {\n /* Get the output stream for writing PDF object */\n final OutputStream out = response.getOutputStream();\n Document document = new Document();\n PdfWriter writer = PdfWriter.getInstance(document, out);\n document.open();\n\n\t\t/* Start Add Image */ \n /* add Logo image based on application id Getting Image path from Resource bundle*/\n final String logoFileClasspath = getMessage(localeObj, \"pdf.receipt.logoImageUrl\");\n URL path = PdfServlet.class.getClassLoader().getResource(logoFileClasspath);\n if (null == path) {\n throw new FileNotFoundException(\"unable to find logoImage in classpath: \" + logoFileClasspath);\n }\n Image logoImage = Image.getInstance(path);\n\n\t\t/* Start of Bill Submit Section */\n PdfPTable logoImageTable = new PdfPTable(1);/* Table for the Logo Image */\n /* Logo added to PDF cell constructor */\n PdfPCell logoImageCell = new PdfPCell(logoImage);\n PdfPCell logoBlankSpaceCell = new PdfPCell(new Phrase(\" \", getFont(WHITE_COLOR, 8, Font.BOLD)));\n cellAlignment(logoImageCell, Element.ALIGN_CENTER, \"\", 0);\n cellAddingToTable(logoImageTable, logoImageCell, Rectangle.LEFT | Rectangle.TOP | Rectangle.RIGHT, 0, 0);\n\n cellAlignment(logoImageCell, Element.ALIGN_LEFT, \"\", 0);\n cellAddingToTable(logoImageTable, logoBlankSpaceCell, Rectangle.LEFT | Rectangle.RIGHT, 0, 0);\n document.add(logoImageTable);\n /* End Add Logo Image */ \n\n\t\t/* create PDF header section */\n pdfReceiptIdSection(receiptResponse, document, localeObj);\n /* Designing bill transaction information to show biller name and amount*/\n designBillTransactionInfo(receiptResponse, document, localeObj);\n /* create payment method section */\n pdfPaymentMethod(receiptResponse, document, localeObj);\n /* Appending line below the document */\n pdfInfoMessage(document, localeObj);\n /* New page creating for merging existing PdF page in to current PDF */\n document.newPage();\n try {\n getPdfFromAwsLink(writer, localeObj);/* Call to merge existing PDF to current PDf */\n } catch (final Exception e) {\n LOGGER.error(\"trouble while merging PDF disclosure\", e);\n }\n document.close();\n LOGGER.debug(\"End PDF Created \");\n }",
"public String insertEndReceipt() {\r\n\t\tif (receiptSS == null) {\r\n\t\t\treceiptSS = new Receipt();\r\n\t\t}\r\n\t\t\r\n\t\tString loginId = com.omp.admin.common.util.CommonUtil.getLoginId(this.req.getSession());\r\n\t\treceiptSS.setRegId(loginId);\r\n\t\tservice.insertEndReceipt(receiptSS);\r\n\t\treceiptS.setProcessMessage(\"處理完畢.\");//정산적으로 처리되었습니다.\r\n\t\t\r\n\t\treturn SUCCESS;\r\n\t\t\r\n\t}",
"public Purchase(Date date, double amount, String rec, String note){\n\t\tthis(UUID.randomUUID().toString(), date, amount, rec, note);\n\t}",
"public void inicializarItemInvoice() {\r\n\t\ttry {\r\n\t\t\teditarItem = false;\r\n\t\t\trequired = true;\r\n\t\t\tpo = new PO();\r\n\t\t\tlistPos = new ArrayList<PO>();\r\n\t\t\titemInvoice = null;\r\n\t\t\titemPO = null;\r\n\t\t\tpartNumber = null;\r\n\t\t\tBasicFiltroPO filtroPO = new BasicFiltroPO();\r\n\r\n\t\t\tCarga c = facade.getCargaById(invoice.getCarga().getId());\r\n\t\t\tfiltroPO.setFilial(c.getFilial());\r\n\t\t\tlistPos = facade.listarPO(filtroPO);\r\n\t\t\tpoConverter = new ConverterUtil<PO>(listPos);\r\n\r\n\t\t} catch (BusinessException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void initial(){\t\t\r\n\t\tfundRateService=new FundRateService();\r\n\t}",
"@Override\r\n public boolean initialize() {\r\n try {\r\n uid = Double.parseDouble(getActiveAddressBean().getPredicateValueWithException(PushDelivery.NOTIFICATION_ID_KEY));\r\n structure = registerAndGetStructure();\r\n NotificationRegistry.getInstance().addNotification(uid, this);\r\n } catch (Exception e) {\r\n logger.error(e.getMessage(), e);\r\n NotificationRegistry.getInstance().removeNotification(uid);\r\n return false;\r\n }\r\n return true;\r\n }",
"@PostConstruct\n protected void initNewEntity() {\n setNewEntity(getService().create());\n }",
"public Invoice(){//String invoiceId, String customer, String invoiceIssuer, Timestamp invoicingDate, TimeStamp dueDate, BigDecimal netAmount, BigDecimal vat, BigDecimal totalAmount, String currency, String linkToInvoiceDocument, String linkToInvoiceDocumentCopy, String invoicingPeriod, BigDecimal gp, Event event, Timestamp paidDate, BigDecimal amountOpen, String revenueType, String originalInvoiceId) {\r\n }",
"void requestSequenceNumber() {\r\n\t\t// 부모가 가지고있는 메시지의 순서번호(시작 ~ 끝)를 요청 \r\n\t}",
"public void XxGamMaCreateTicket(Number nPayment, \n OAPageContext pageContext) {\n //Buscamos el Payment con el id para poder asociarlo con el nuevo ticket\n // searchPayment(nPayment);\n //Obteniendo el registro actual de XxGamMaTicketPVORowImpl\n XxGamMaPaymentReqVORowImpl rowXxGamMaPaymentReqVO = null;\n rowXxGamMaPaymentReqVO = (XxGamMaPaymentReqVORowImpl)getCurrentRow();\n\n RowIterator riXxGamMaPaymentPVO = null;\n //Verificando que el row no venga vacio\n if (rowXxGamMaPaymentReqVO == null) {\n throw new OAException(\"No es posible crear el ticket\", \n OAException.ERROR);\n\n }\n //Obteniendo el row iterador de ticket para los vuelos\n riXxGamMaPaymentPVO = rowXxGamMaPaymentReqVO.getXxGamMaTicketPVO();\n if (riXxGamMaPaymentPVO == null) {\n throw new OAException(\"No es posible crear el ticket\", \n OAException.ERROR);\n\n }\n XxGamMaTicketPVOImpl voXxGamMaTicketPVOImpl = null;\n //Creamos variable de AM para obtener su referencia\n XxGamModAntAMImpl amXxGamModAnt = null;\n try {\n /** AGAA Obtiene la Filial **/\n String filial = \n (String)pageContext.getTransactionValue(\"orgNameEmp\");\n\n //Obtenemos el AM\n amXxGamModAnt = getXxGamModAntAM();\n //Obtenemos la referencia a la implementacion de la VO deTicket\n voXxGamMaTicketPVOImpl = amXxGamModAnt.getXxGamMaTicketPVO3();\n //Llamamos el metodo para agregar un nuevo vuelo\n voXxGamMaTicketPVOImpl.addNewTicket(filial);\n } catch (Exception e) {\n e.printStackTrace();\n throw new OAException(\"No es posible crear el ticket\", \n OAException.ERROR);\n }\n }",
"private void initTransactions() {\n\n\t transactions = ModelFactory.createDefaultModel();\n\t try\n\t {\n\t\t\ttransactions.read(new FileInputStream(\"transactions.ttl\"),null,\"TTL\");\n\t\t}\n\t catch (FileNotFoundException e) {\n\t \tSystem.out.println(\"Error creating tansactions model\" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"private TPM_DIGEST setupInitialTransDigest()\r\n {\r\n// if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_BROADCOM )\r\n// {\r\n// return null;\r\n// }\r\n// else\r\n// {\r\n// return new TPM_DIGEST();\r\n// }\r\n if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_INFINEON )\r\n {\r\n return new TPM_DIGEST();\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n \r\n }",
"@SuppressWarnings(\"static-access\")\r\n\t@Test\r\n\tpublic void crearRecibosTest() {\r\n\r\n\t\tpd.crearRecibos();\r\n\t\tpd.pm.deletePersistent(pd.r1);\r\n\r\n\t}",
"@Override\r\n\t\t\tpublic void startLicense(long nonce) throws RemoteException {\n\r\n\t\t\t BillingService mBillingService = new BillingService();\r\n\t\t mBillingService.setContext(CheckDonation.this);\r\n\r\n\t\t // Check if billing is supported.\r\n\t\t if (mBillingService.checkBillingSupported()) {\r\n\t\t mBillingService.restoreTransactions();\r\n\t\t }\r\n\t\t mBillingService.unbind();\r\n\t\t\t}"
] | [
"0.6749398",
"0.6357229",
"0.62494683",
"0.6154732",
"0.61162937",
"0.6039121",
"0.5984928",
"0.59235954",
"0.58418113",
"0.5805985",
"0.5786844",
"0.5751941",
"0.5749392",
"0.5740405",
"0.57147914",
"0.5692238",
"0.56876206",
"0.5648085",
"0.5617594",
"0.5617594",
"0.56145936",
"0.5603392",
"0.5598633",
"0.5534739",
"0.55144393",
"0.54882294",
"0.54564106",
"0.5448691",
"0.5446024",
"0.54099846",
"0.54093885",
"0.5403563",
"0.53847903",
"0.5357888",
"0.5344515",
"0.53394943",
"0.5325668",
"0.53215986",
"0.53212935",
"0.5319439",
"0.53182715",
"0.53160423",
"0.5313334",
"0.5312538",
"0.53094757",
"0.5304532",
"0.530253",
"0.52995604",
"0.5297699",
"0.52946556",
"0.5294059",
"0.52715176",
"0.5267734",
"0.52672774",
"0.526492",
"0.52589166",
"0.5257692",
"0.5256678",
"0.5253952",
"0.5252593",
"0.5250762",
"0.5243726",
"0.5220451",
"0.5213346",
"0.52067125",
"0.5202703",
"0.51898193",
"0.51895505",
"0.51784426",
"0.51751256",
"0.51742226",
"0.51608044",
"0.5160653",
"0.51577985",
"0.51409954",
"0.5138619",
"0.51361096",
"0.5133262",
"0.51309395",
"0.51295966",
"0.51270026",
"0.5126166",
"0.51225317",
"0.512077",
"0.51188284",
"0.511724",
"0.5116929",
"0.51116925",
"0.51067686",
"0.51050234",
"0.51049143",
"0.5100209",
"0.50995624",
"0.50949126",
"0.50929403",
"0.509038",
"0.50896317",
"0.508791",
"0.5080468",
"0.50770587",
"0.5074074"
] | 0.0 | -1 |
used for initial creation of receipts and loading existing ones from remote DB | public void createUserReadReceipt(BUser reader, int messageReceiptStatus){
// Add the read receipt to the local dao database
BMessageReceipt bMessageReceipt = new BMessageReceipt();
// Add/update a read receipt
removeUserReadReceipt(reader);
resetBMessageReceiptList();
List readReceipts = getBMessageReceiptList();
bMessageReceipt.setReader(reader);
bMessageReceipt.setReaderId(reader.getId());
bMessageReceipt.setBMessageId(this.getId());
bMessageReceipt.setReadStatus(messageReceiptStatus);
daoSession.insertOrReplace(bMessageReceipt);
readReceipts.add(bMessageReceipt);
DaoCore.updateEntity(this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void initiateStore() {\r\n\t\tURLConnection urlConnection = null;\r\n\t\tBufferedReader in = null;\r\n\t\tURL dataUrl = null;\r\n\t\ttry {\r\n\t\t\tdataUrl = new URL(URL_STRING);\r\n\t\t\turlConnection = dataUrl.openConnection();\r\n\t\t\tin = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));\r\n\t\t\tString inputLine;\r\n\t\t\twhile ((inputLine = in.readLine()) != null) {\r\n\t\t\t\tString[] splittedLine = inputLine.split(\";\");\r\n\t\t\t\t// an array of 4 elements, the fourth element\r\n\t\t\t\t// the first three elements are the properties of the book.\r\n\t\t\t\t// last element is the quantity.\r\n\t\t\t\tBook book = new Book();\r\n\t\t\t\tbook.setTitle(splittedLine[0]);\r\n\t\t\t\tbook.setAuthor(splittedLine[1]);\r\n\t\t\t\tBigDecimal decimalPrice = new BigDecimal(splittedLine[2].replaceAll(\",\", \"\"));\r\n\t\t\t\tbook.setPrice(decimalPrice);\r\n\t\t\t\tfor(int i=0; i<Integer.parseInt(splittedLine[3]); i++)\r\n\t\t\t\t\tthis.addBook(book);\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif(!in.equals(null)) in.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public String insertStartReceipt() {\r\n\t\tif (receiptS == null) {\r\n\t\t\treceiptS = new Receipt();\r\n\t\t}\r\n\t\treturn SUCCESS;\r\n\t}",
"public void initBMessageReceipts(){\n List<BUser> readers;\n readers = getBThreadUsers();\n\n // Do not init for public threads.\n if(this.getThread().getType() == com.braunster.chatsdk.dao.BThread.Type.Public\n || this.getThread().getType() == com.braunster.chatsdk.dao.BThread.Type.PublicPrivate) return;\n\n // If no readers, why should there be receipts?\n if (readers.isEmpty()){ return; }\n\n // add all users in the chat other than yourself\n for (BUser reader : readers) {\n if (getBUserSender().equals(reader)) continue;\n createUserReadReceipt(reader, none);\n }\n this.update();\n }",
"private long addReceipt() {\n Entity receipt = createReceiptEntity(\n ORIGINAL_PRICE, ORIGINAL_STORE, ORIGINAL_TIMESTAMP, ORIGINAL_CATEGORIES);\n datastore.put(receipt);\n return receipt.getKey().getId();\n }",
"private void creates() {\n \tDBPeer.fetchTableColumns();\n \tDBPeer.fetchTableRows();\n \tDBPeer.fetchTableIndexes();\n \t\n for (int i = 0; i < creates.size(); i++) {\n creates.get(i).init();\n }\n \n DBPeer.updateTableColumns();\n DBPeer.updateTableRows();\n DBPeer.updateTableIndexes();\n }",
"public void file ( Receipt receipt){\r\n\t\t\treciptlist.add(receipt);\r\n\t\t}",
"List<Receipt> getAllReceipts() throws DbException;",
"private Entity queryReceipt() {\n Query query = new Query(\"Receipt\");\n PreparedQuery results = datastore.prepare(query);\n return results.asSingleEntity();\n }",
"public static void saveReceipt()\r\n\t{\r\n\t\tPrintWriter listWriter = null;\r\n\t\tPrintWriter contentWriter = null;\r\n\t\tnewReceipt = getTimeStamp();\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tlistWriter = new PrintWriter(new FileOutputStream(RECEIPT_LIST_FILE, true));\r\n\t\t\tcontentWriter = new PrintWriter(RECEIPT_PATH + newReceipt);\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(null,\"File Not Found\");\r\n\t\t}\r\n\t\t\r\n\t\tlistWriter.println(newReceipt);\r\n\t\tfor(int count=0; count < listModel.getSize(); count++)\r\n\t\t\tcontentWriter.println(listModel.elementAt(count));\r\n\t\t\r\n\t\tlistWriter.close();\r\n\t\tcontentWriter.close();\r\n\t\tclearReceipt();\r\n\t}",
"public Repo_Receipt() {\n initComponents();\n }",
"public Receipt getReceipt(Long id) {\n\t\tReceipt receipt = receiptRepository.findOne(id);\n\t\tHibernate.initialize(receipt.getOrder());\n\t\treturn receipt;\n\t}",
"public abstract void generateReceipt(Transaction trans);",
"public static void loadReceipt(String receiptFile)\r\n\t{\r\n\t\tScanner inputStream = null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tinputStream = new Scanner(new File(RECEIPT_PATH + receiptFile));\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(null,\"File Not Found\");\r\n\t\t}\r\n\t\tclearReceipt();\r\n\t\twhile(inputStream.hasNextLine())\r\n\t\t\tlistModel.addElement(inputStream.nextLine());\r\n\t\tinputStream.close();\r\n\t}",
"private void initTransactions() {\n\n\t transactions = ModelFactory.createDefaultModel();\n\t try\n\t {\n\t\t\ttransactions.read(new FileInputStream(\"transactions.ttl\"),null,\"TTL\");\n\t\t}\n\t catch (FileNotFoundException e) {\n\t \tSystem.out.println(\"Error creating tansactions model\" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"private void saveReceipt() {\n\n\t\tFinalHttp finalHttp = new FinalHttp();\n\t\tGetServerUrl.addHeaders(finalHttp,true);\n\t\tAjaxParams params = new AjaxParams();\n\t\tparams.put(\"id\", receiptId);\n\t\tparams.put(\"receiptDate\", tv_canshu.getText().toString());\n\t\tparams.put(\"orderId\", orderId);\n\t\tparams.put(\"count\", et_num.getText().toString());\n\t\tparams.put(\"remarks\", et_remark.getText().toString());\n\t\tparams.put(\"receiptAddressId\", receiptAddressId);\n\t\tfinalHttp.post(GetServerUrl.getUrl() + \"admin/buyer/order/saveReceipt\",\n\t\t\t\tparams, new AjaxCallBack<Object>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(Object t) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tJSONObject jsonObject = new JSONObject(t.toString());\n\t\t\t\t\t\t\tString code = JsonGetInfo.getJsonString(jsonObject,\n\t\t\t\t\t\t\t\t\t\"code\");\n\t\t\t\t\t\t\tString msg = JsonGetInfo.getJsonString(jsonObject,\n\t\t\t\t\t\t\t\t\t\"msg\");\n\t\t\t\t\t\t\tif (!\"\".equals(msg)) {\n\t\t\t\t\t\t\t\tToast.makeText(SaveReceipptActivity.this, msg,\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (\"1\".equals(code)) {\n\t\t\t\t\t\t\t\tsetResult(1);\n\t\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsuper.onSuccess(t);\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(Throwable t, int errorNo,\n\t\t\t\t\t\t\tString strMsg) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tToast.makeText(SaveReceipptActivity.this,\n\t\t\t\t\t\t\t\tR.string.error_net, Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\tsuper.onFailure(t, errorNo, strMsg);\n\t\t\t\t\t}\n\n\t\t\t\t});\n\n\t}",
"public void loadInitialData() {\n\t\t\texecuteTransaction(new Transaction<Boolean>() {\n\t\t\t\t@Override\n\t\t\t\tpublic Boolean execute(Connection conn) throws SQLException {\n\t\t\t\t\tList<Item> inventory;\n\t\t\t\t\tList<Location> locationList;\n\t\t\t\t\tList<User> userList;\n\t\t\t\t\tList<JointLocations> jointLocationsList;\n\t\t\t\t\t//List<Description> descriptionList; \n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinventory = InitialData.getInventory();\n\t\t\t\t\t\tlocationList = InitialData.getLocations(); \n\t\t\t\t\t\tuserList = InitialData.getUsers();\n\t\t\t\t\t\tjointLocationsList = InitialData.getJointLocations();\n\t\t\t\t\t\t//descriptionList = //InitialData.getDescriptions();\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tthrow new SQLException(\"Couldn't read initial data\", e);\n\t\t\t\t\t}\n\n\t\t\t\t\tPreparedStatement insertItem = null;\n\t\t\t\t\tPreparedStatement insertLocation = null; \n\t\t\t\t\tPreparedStatement insertUser = null;\n\t\t\t\t\tPreparedStatement insertJointLocations = null;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// AD: populate locations first since location_id is foreign key in inventory table\n\t\t\t\t\t\tinsertLocation = conn.prepareStatement(\"insert into locations (description_short, description_long) values (?, ?)\" );\n\t\t\t\t\t\tfor (Location location : locationList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinsertLocation.setString(1, location.getShortDescription());\n\t\t\t\t\t\t\tinsertLocation.setString(2, location.getLongDescription());\n\t\t\t\t\t\t\tinsertLocation.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertLocation.executeBatch(); \n\t\t\t\t\t\t\n\t\t\t\t\t\tinsertJointLocations = conn.prepareStatement(\"insert into jointLocations (fk_location_id, location_north, location_south, location_east, location_west) values (?, ?, ?, ?, ?)\" );\n\t\t\t\t\t\tfor (JointLocations jointLocations: jointLocationsList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinsertJointLocations.setInt(1, jointLocations.getLocationID());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(2, jointLocations.getLocationNorth());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(3, jointLocations.getLocationSouth());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(4, jointLocations.getLocationEast());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(5, jointLocations.getLocationWest());\n\t\t\t\t\t\t\tinsertJointLocations.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertJointLocations.executeBatch();\n\t\t\t\t\t\t\n\t\t\t\t\t\tinsertItem = conn.prepareStatement(\"insert into inventory (location_id, item_name) values (?, ?)\");\n\t\t\t\t\t\tfor (Item item : inventory) \n\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t// Auto generate itemID\n\t\t\t\t\t\t\tinsertItem.setInt(1, item.getLocationID());\n\t\t\t\t\t\t\tinsertItem.setString(2, item.getName());\n\t\t\t\t\t\t\tinsertItem.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertItem.executeBatch();\n\t\t\t\t\t\t\n\t\t\t\t\t\tinsertUser = conn.prepareStatement(\"insert into users (username, password) values (?, ?)\");\n\t\t\t\t\t\tfor(User user: userList) {\n\t\t\t\t\t\t\tinsertUser.setString(1, user.getUsername());\n\t\t\t\t\t\t\tinsertUser.setString(2, user.getPassword());\n\t\t\t\t\t\t\tinsertUser.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertUser.executeBatch();\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.println(\"Tables populated\");\n\t\t\t\t\t\t\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tDBUtil.closeQuietly(insertLocation);\t\n\t\t\t\t\t\tDBUtil.closeQuietly(insertItem);\n\t\t\t\t\t\tDBUtil.closeQuietly(insertUser);\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t});\n\t\t}",
"private void initial(){\n storeAccount(\"201799990001030047\");\n }",
"private void initData() {\n Author steinbeck = new Author(\"John\", \"Steinbeck\");\n Publisher p1 = new Publisher(\"Covici Friede\", \"111 Main Street\", \"Santa Cruz\", \"CA\", \"95034\");\n Book omam = new Book(\"Of Mice And Men\", \"11234\", p1);\n \n publisherRepository.save(p1);\n\n steinbeck.getBooks().add(omam);\n omam.getAuthors().add(steinbeck);\n authorRepository.save(steinbeck);\n bookRepository.save(omam);\n\n // Create Crime & Punishment\n Author a2 = new Author(\"Fyodor\", \"Dostoevsky\");\n Publisher p2 = new Publisher( \"The Russian Messenger\", \"303 Stazysky Rao\", \"Rustovia\", \"OAL\", \"00933434-3943\");\n Book b2 = new Book(\"Crime and Punishment\", \"22334\", p2);\n a2.getBooks().add(b2);\n b2.getAuthors().add(a2);\n\n publisherRepository.save(p2);\n authorRepository.save(a2);\n bookRepository.save(b2);\n }",
"private LCSRevisableEntity createEntries(String selectedId) {\n\t\t\n\t\tLCSRevisableEntity revEntity=null;\n\n\t\tLCSProduct product = null;\n\t\tLCSSKU lcsSku = null;\n\t\tString sizedefVR = \"\";\n\t\tString prodVR = \"\";\n\t\tString colorwayVR = \"\";\n\t\tString reventityVR = \"\";\n\t\t\n\t\tLCSLog.debug(\"****************Inside createEntries ***********************\");\n\t\t/*\n\t\t * is found in the request object.\n\t\t */\n\t\t// get division code from request.\n\t\tString divcode = this.requesttable.get(selectedId + \"_DIVISION_CODE\");\n\t\t// get material number from request\n\t\tString materialNumber = divcode\n\t\t\t\t+ this.requesttable.get(selectedId + \"_MATERIALNUMBER\");\n\t\t// get nrf code from request\n\t\tString nrfCode = \"\";\n\t\t// this.requesttable.get(selectedId + \"_NRF_CODE\");\n\t\t// get sourceVersion from request\n\t\tString sourceVersion = this.requesttable.get(selectedId + \"_SOURCE\");\n\t\t// get costsheetVersion from request\n\t\tString costsheetVersion = this.requesttable.get(selectedId + \"_COST\");\n\t\t\n\t\tString specVersion = this.requesttable.get(selectedId + \"_SPEC\");\n\t\t\n\t\tString bomRequestParam = this.requesttable.get(\"BOM\"+selectedId + \"_BOM\");\n\t\tLCSLog.debug(\"bomRequestParam = \"+bomRequestParam);\n\n\t\tString sourceName = \"\";\n\t\tString costName = \"\";\n\t\tString specName = \"\";\n\t\tString IBTINSTOREMONTH = \"\";\n\n\t\ttry {\n\t\t\t// get all the information from sourceVersion and costsheetVersion\n\t\t\tMap<String, String> map = LFIBTUtil.formatSourceOrCostsheetData(\n\t\t\t\t\tsourceVersion, costsheetVersion, specVersion);\n\t\t\t\n\t\t\t// source name\n\t\t\tsourceName = map.get(\"sourceNameKey\");\n\t\t\t// versionId\n\t\t\tsourceVersion = map.get(\"sourceVersionKey\"); \n\t\t\tLCSLog.debug(\"sourceName --- \" + sourceName);\n\t\t\t// costsheet name\n\t\t\tcostName = map.get(\"costNameKey\");\n\n\t\t\t// costsheetId\n\t\t\tcostsheetVersion = map.get(\"costsheetVersionKey\");\n\t\t\tLCSLog.debug(\"costName --- \" + costName);\n\t\t\t\n\t\t\tspecName = map.get(\"specNameKey\");\n\n\t\t\t// costsheetId\n\t\t\tspecVersion = map.get(\"specVersionKey\");\n\t\t\tLCSLog.debug(\"costName --- \" + costName);\t\t\t\n\n\t\t\tCollection<String> bomMOAStringColl = new ArrayList<String>();\n\t\t\tbomMOAStringColl = LFIBTUtil.formatBOMMultiChoiceValues(bomRequestParam);\n\t\t\t\n\t\t\tList<String> idList = LFIBTUtil.getObjects(selectedId);\n\n\t\t\t// parse and get all data\n\t\t\tMap<String, String> idMap = LFIBTUtil\n\t\t\t\t\t.createCustomMapFromList(idList);\n\t\t\t// get product ID\n\t\t\tprodVR = idMap.get(\"prodVR\");\n\n\t\t\tLCSLog.debug(\"prodVR : --\" + prodVR);\n\t\t\t// get the product object from productVR\n\t\t\tproduct = (LCSProduct) LCSProductQuery\n\t\t\t\t\t.findObjectById(\"VR:com.lcs.wc.product.LCSProduct:\"\n\t\t\t\t\t\t\t+ prodVR);\n\n\t\t\tLCSLog.debug(\"product : --\" + product);\n\n\t\t\t// size definition VR\n\t\t\tsizedefVR = idMap.get(\"sizedefVR\");\n\t\t\tLCSLog.debug(\"sizedefVR -- \" + sizedefVR);\n\n\t\t\t// colorway VR\n\t\t\tcolorwayVR = idMap.get(\"colorwayVR\");\n\t\t\tLCSLog.debug(\"colorwayVR : --\" + colorwayVR);\n\t\t\tlcsSku = (LCSSKU) LCSProductQuery\n\t\t\t\t\t.findObjectById(\"VR:com.lcs.wc.product.LCSSKU:\"\n\t\t\t\t\t\t\t+ colorwayVR);\n\n\t\t\t// NRF Code -- Build 5.16\n\t\t\tDouble d = 0.00;\n\t\t\td = (Double) lcsSku.getValue(\"lfNrfColorCode\");\n\t\t\tnrfCode = StringUtils.substringBeforeLast(Double.toString(d), \".\");\n\n\t\t\t/**\n\t\t\t * Build 5.16_3 -> START\n\t\t\t * Formatting NRF code to 3 digits before sending it to SAP\n\t\t\t */\n\t\t\t// getting length of code value\n\t\t\tint nrfCodeValueLength = nrfCode.length();\n\t\t\t// TRUE - if length is 1 or 2 digit\n\t\t\tif (nrfCodeValueLength == 2 || nrfCodeValueLength == 1) {\n\t\t\t\t// converting the value from double to integer\n\t\t\t\tint y = d.intValue();\n\t\t\t\t// formatting the value to be 3 digit always.\n\t\t\t\t// if not, append 0 to left\n\t\t\t\tnrfCode = (String.format(\"%03d\", y)).toString();\n\t\t\t}\n\t\t\t/**\n\t\t\t * Build 5.16_3 -> END\n\t\t\t */\n\n\t\t\t// get the revisable entity VR if applicable\n\t\t\treventityVR = idMap.get(\"reventityVR\");\n\n\t\t\t// Added for Build 6.14\n\t\t\t// ITC-START\n\t\t\tString materialDescription = this.requesttable.get(selectedId\n\t\t\t\t\t+ \"_MATERIALDESC\");\n\t\t\tIBTINSTOREMONTH = this.requesttable.get(selectedId + \"_INSTOREMONTH\");\n\t\t\tString styleNumber = this.requesttable.get(selectedId + \"_STYLE\");\n\t\t\t// ITC-END\n\t\t\t\n\t\t\t//MM : changes : Start ----\n\t\t\tif(!FormatHelper.hasContent(reventityVR))\n\t\t\t\treventityVR = LFIBTMaterialNumberValidator.getExistingMaterialRecords(materialNumber,false);\n\t\t\t//MM : changes : End ----\n\t\t\t/*\n\t\t\t * If the revisable entity VR exists then update the revisable\n\t\t\t * entity else create a new one.\n\t\t\t */\n\t\t\tif (reventityVR != null) \n\t\t\t{\n\t\t\t\tLCSLog.debug(\"sourceVersion -- \" + sourceVersion\n\t\t\t\t\t\t+ \" costsheetVersion - \" + costsheetVersion\n\t\t\t\t\t\t+ \" nrfCode -- \" + nrfCode\n\t\t\t\t\t\t+ \" materialDescription --\" + materialDescription\n\t\t\t\t\t\t+ \" IBTINSTOREMONTH--\" + IBTINSTOREMONTH\n\t\t\t\t\t\t+ \" style Number----\" + styleNumber);\n\n\t\t\t\t// API call to update the revisable entitity with new\n\t\t\t\t// source and cost details.\n\n\t\t\t\t// Updated for Build 6.14\n\t\t\t\tLCSLog.debug(CLASSNAME+\"createEntries()\"+\"calling updateRevisableEntry()\");\n\t\t\t\trevEntity=updateRevisableEntry(reventityVR, sourceVersion,\n\t\t\t\t\t\tcostsheetVersion,specVersion, nrfCode, materialDescription,\n\t\t\t\t\t\tsourceName, costName,specName, IBTINSTOREMONTH, styleNumber,bomMOAStringColl);\n\t\t\t\t\n\t\t\t\tLCSLog.debug(CLASSNAME+\"update revEntity---->\" +revEntity);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// API call to create fresh revisable entities.\n\n\t\t\t\t// Updated for Build 6.14\n\t\t\t\t\n\t\t\t\tLCSLog.debug(CLASSNAME+\"createEntries()\"+\"calling createRevisableEntry()\");\n\t\t\t\trevEntity=createRevisableEntry(product, lcsSku, materialNumber,\n\t\t\t\t\t\tsizedefVR, sourceVersion, costsheetVersion, specVersion, sourceName,\n\t\t\t\t\t\tcostName, specName, nrfCode, styleNumber, materialDescription,\n\t\t\t\t\t\tIBTINSTOREMONTH,bomMOAStringColl);\n\t\t\t\t\n\t\t\t\tLCSLog.debug(CLASSNAME+\"create revEntity---->\" +revEntity);\n\n\t\t\t}\n\t\t\t\n\n\t\t}\n\t\tcatch (WTException e) {\n\t\t\tLCSLog.error(\"WTException occurred!! \" + e.getMessage());\n\t\t}\n\t\tcatch (WTPropertyVetoException e) {\n\t\t\tLCSLog.error(\"WTPropertyVetoException occurred!! \" + e.getMessage());\n\t\t}\n\t\t\t\t\n\t\treturn revEntity;\n\n\t}",
"public void printReceipt(){\n\t\t//TO DO\n\t\t\n\t}",
"public void populateDocumentWithRequisitions() {\r\n LOG.debug(\"populateDocumentWithRequisitions() Entering method.\");\r\n \r\n List<RequisitionDocument> unassignedRequisitions = new ArrayList(SpringContext.getBean(RequisitionService.class).getRequisitionsAwaitingContractManagerAssignment());\r\n List<String>documentHeaderIds = new ArrayList();\r\n for (RequisitionDocument req : unassignedRequisitions) {\r\n documentHeaderIds.add(req.getDocumentNumber());\r\n }\r\n \r\n List<RequisitionDocument> requisitionDocumentsFromDocService = new ArrayList();\r\n try {\r\n if ( documentHeaderIds.size() > 0 )\r\n requisitionDocumentsFromDocService = SpringContext.getBean(DocumentService.class).getDocumentsByListOfDocumentHeaderIds(RequisitionDocument.class, documentHeaderIds);\r\n }\r\n catch (WorkflowException we) {\r\n String errorMsg = \"Workflow Exception caught: \" + we.getLocalizedMessage();\r\n LOG.error(errorMsg, we);\r\n throw new RuntimeException(errorMsg, we);\r\n }\r\n \r\n for (RequisitionDocument req : requisitionDocumentsFromDocService) {\r\n contractManagerAssignmentDetails.add(new ContractManagerAssignmentDetail(this, req));\r\n }\r\n\r\n String[] fieldNames = {PurapPropertyConstants.DELIVERY_CAMPUS_CODE, PurapPropertyConstants.VENDOR_NAME, PurapPropertyConstants.REQUISITION_IDENTIFIER};\r\n DynamicCollectionComparator.sort(contractManagerAssignmentDetails, fieldNames);\r\n LOG.debug(\"populateDocumentWithRequisitions() Leaving method.\"); \r\n }",
"public void createInvoice() {\n\t}",
"public void prepare()\n {\n // First, we assign the payload a new UUID if it does not already have one\n if(getId() == null)\n setId(UUID.randomUUID());\n \n // Set the submission date to now\n setSubmissionDate(new Date());\n }",
"public void startSale() {\r\n System.out.println(\"[CashRegister] startSale\");\r\n System.out.println(\"\");\r\n\r\n //receipt = new Receipt(customerId); \r\n receipt = new Receipt(\"100\");\r\n\r\n //addItemToSale(productId, quantity);\r\n addItemToSale(\"A101\", 10);\r\n\r\n addItemToSale(\"B205\", 6);\r\n\r\n addItemToSale(\"C222\", 12);\r\n\r\n }",
"private void getrec() {\n\t\tcontractDetail.retrieve(stateVariable.getXwordn(), stateVariable.getXwabcd());\n\t\tnmfkpinds.setPgmInd36(! lastIO.isFound());\n\t\tnmfkpinds.setPgmInd66(isLastError());\n\t\t// BR00010 Product not found on Contract_Detail\n\t\tif (nmfkpinds.pgmInd36()) {\n\t\t\tmsgObjIdx = setMsgObj(\"OES0115\", \"XWABCD\", msgObjIdx, messages);\n\t\t\tstateVariable.setZmsage(subString(errmsg, 1, 78));\n\t\t}\n\t\telse {\n\t\t\tif (nmfkpinds.pgmInd66()) {\n\t\t\t\tif (fileds.filests == 1218) {\n\t\t\t\t\tmsgObjIdx = setMsgObj(\"Y3U9999\", \"\", msgObjIdx, messages);\n\t\t\t\t\tstateVariable.setZmsage(subString(errmsg, 1, 78));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmsgObjIdx = setMsgObj(\"OEM0004\", \"\", msgObjIdx, messages);\n\t\t\t\t\tstateVariable.setZmsage(subString(errmsg, 1, 78));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvalidt();\n\t\t\t}\n\t\t}\n\t}",
"@Override\n protected void onSuccessRequestReceipts(Collection<Receipt> receipts) {\n \tmTxtStatus.setText(\"requestReceipts onSuccess: received \"+receipts.size() + \" receipts\");\n \t}",
"@Override\n\tpublic void initialize(HashMap smartyStateMap){\n\t\tif (httpSRequest.getParameter(\"dorestore\")!=null \n\t\t\t\t&& httpSRequest.getParameter(\"dorestore\").equalsIgnoreCase(\"restore\")) {\n\t\t\tConnection conn2 = null;\n\t\t\tPreparedStatement pst = null;\n\t\t\t\n\t\t\ttry {\n\t\t\t\tconn2 = mysql.getConn();\n\t\t\t\tString c_id = httpSRequest.getParameter(\"c_id\");\n\t\t\t\tpst = conn2.prepareStatement(\"insert into p_cases (c_id,c_company_sender, c_createddt, c_createdby, c_rcv_name, c_rcv_hp, c_rcv_state, c_rcv_district,\"\n\t\t\t\t\t\t+ \" c_rcv_addr_rmk, c_rmk, c_deleted, c_status, c_receiptamt, c_qty, c_rcv_paid, c_shipment_cost, c_shipmentcostpaid,\"\n\t\t\t\t\t\t+ \" c_paid_tocust, c_goodscostbalance, c_fragile, c_rural, c_weight, c_bringitemsback, c_sendmoney, c_assignedagent, c_branchcode,\"\n\t\t\t\t\t\t+ \" c_custreceiptnoori, c_settled, c_pmtid, c_pickupagentpmtid, c_sendmoneyflag, c_agentshare, c_agentsharesettled, c_agentpmtid, \"\n\t\t\t\t\t\t+ \" c_server_createddt, c_mbapp_agent_status, c_mbapp_agent_rmk, c_mbapp_agent_updatedt, c_rtnreason, c_custid, c_custhp, c_specialcase,\"\n\t\t\t\t\t\t+ \" c_pickupagent, c_shipmentpaidbycustomer, c_shipmentpaidbysender, c_paidinadvance, c_advancepmtid, c_receiptfromsystem, c_excelnumber, c_specialsendercode, c_priceb4change, c_changedprice,\"\n\t\t\t\t\t\t+ \" c_changedpriceby,c_changedpriceat, c_shipmentprofit, c_partnershare, c_receivedfrom_system, c_receivedfrom_caseid, c_int_batchid, c_sentto_system, c_sentto_caseid, c_productinfo) \"\n\t\t\t\t\t\t+ \" select \"\n\t\t\t\t\t\t+ \" c_id, c_company_sender, c_createddt, c_createdby, c_rcv_name, c_rcv_hp, c_rcv_state, c_rcv_district, \"\n\t\t\t\t\t\t+ \" c_rcv_addr_rmk, c_rmk, c_deleted, c_status, c_receiptamt, c_qty, c_rcv_paid, c_shipment_cost, c_shipmentcostpaid,\"\n\t\t\t\t\t\t+ \" c_paid_tocust, c_goodscostbalance, c_fragile, c_rural, c_weight, c_bringitemsback, c_sendmoney, c_assignedagent, c_branchcode,\"\n\t\t\t\t\t\t+ \" c_custreceiptnoori, c_settled, c_pmtid, c_pickupagentpmtid, c_sendmoneyflag, c_agentshare, c_agentsharesettled, c_agentpmtid,\"\n\t\t\t\t\t\t+ \" c_server_createddt, c_mbapp_agent_status, c_mbapp_agent_rmk, c_mbapp_agent_updatedt, c_rtnreason, c_custid, c_custhp, c_specialcase,\"\n\t\t\t\t\t\t+ \" c_pickupagent, c_shipmentpaidbycustomer, c_shipmentpaidbysender , c_paidinadvance, c_advancepmtid, c_receiptfromsystem, c_excelnumber, c_specialsendercode, c_priceb4change, c_changedprice,\"\n\t\t\t\t\t\t+ \" c_changedpriceby,c_changedpriceat, c_shipmentprofit, c_partnershare, c_receivedfrom_system, c_receivedfrom_caseid, c_int_batchid, c_sentto_system, c_sentto_caseid, c_productinfo \"\n\t\t\t\t\t\t+ \" from p_cases_deleted where c_id =?\");\n\t\t\t\tpst.setString(1, c_id);\n\t\t\t\tpst.executeUpdate();\n\t\t\t\ttry {pst.close();} catch (Exception e) {}\n\t\t\t\t\n\t\t\t\tpst = conn2.prepareStatement(\"delete from p_cases_deleted where c_id =?\");\n\t\t\t\tpst.setString(1, c_id);\n\t\t\t\tpst.executeUpdate();\n\t\t\t\tconn2.commit();\n\t\t\t}catch(Exception e) {\n\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t\ttry {conn2.rollback();}catch(Exception eRoll) {}\n\t\t\t}finally {\n\t\t\t\t\n\t\t\t\ttry {pst.close();} catch (Exception e) {}\n\t\t\t\ttry {conn2.close();} catch (Exception e) {}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tsuper.initialize(smartyStateMap);\n\t}",
"public void createNewOrder()\n\t{\n\t\tnew DataBaseOperationAsyn().execute();\n\t}",
"@Override\r\n\tpublic void createReimbursement(RebsObj reb) {\n\t\tPreparedStatement ps = null;\r\n\t\tPreparedStatement ps2 = null;\r\n\t\tResultSet rs = null; // creating a resultSet which will save any queries\r\n\t\t\r\n\t\t// looks in util/ConnectionUtil.java and saves the url, username and password to \"conn\"\r\n\t\ttry(Connection conn = ConnectionUtil.getConnection();){ \r\n\t\t\t\r\n\t\t\t//int rebs_id = reb.getRebsId(); // REBS_ID IS AUTO INCREMENTING\r\n\t\t\tint user_id = reb.getUserId();\r\n\t\t\t//int man_id = reb.getManagerId(); // not needed\r\n\t\t\tint rebs_type = reb.getRebsType();\r\n\t\t\tint rebs_status = reb.getRebsStatus();\r\n\t\t\tdouble rebs_amount = reb.getRebsAmount();\r\n\t\t\tString rebs_description = reb.getRebsDescription();\r\n\t\t\t// Blob rebs_attachments\r\n\t\t\tTimestamp time_submitted = new Timestamp(System.currentTimeMillis());\t\t\r\n\t\t\t// Timestamp time_resolved\r\n\t\t\t\r\n\t\t\tPart rebs_photo = reb.getRebsPhoto();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd-MMM-YY hh:mm:ss.SSSSSSSSS\");\r\n\t\t\tdateFormat.format(time_submitted);\r\n\t\t\treb.setTimeSubmitted(time_submitted);\r\n\t\t\tSystem.out.println(\"TIME STAMP IN DAO: \" + time_submitted);\r\n\t\t\t\r\n\t\t\tString sql2 = \"SELECT REBS_SEQ.nextval FROM DUAL\"; // trying to get the next table value (for id #)\r\n\t\t\tps2 = conn.prepareStatement(sql2); // uses connection to send string as a prepared statement\r\n\t\t\trs = ps2.executeQuery();\r\n\t\t\t\r\n\t\t\twhile (rs.next()) // goes through all query results (in this case, we should only have 1)\r\n\t\t\t{\r\n\t\t\t\t// get first column of rs, then set it ==\r\n\t\t\t\treb.setRebsId(rs.getInt(1)); \r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tint rebs_id = reb.getRebsId(); // setting rebs_id to the the rebs_seq value\r\n\t\t\t\r\n\t\t\t// you can put this string 'sql' into multiple lines by adding +, and having everything within \"\"\r\n\t\t\t// this sql line will be ran on SQL\r\n\t\t\tString sql = \"INSERT INTO ERS_REIMBURSEMENTS(rebs_id, user_id_author, user_id_resolver, \"\r\n\t\t\t\t\t+ \"rebs_type, rebs_status, rebs_amount, rebs_description, rebs_receipt, \"\r\n\t\t\t\t\t+ \"rebs_submitted, rebs_resolved) \" \r\n\t\t\t\t\t+ \"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\";\r\n\t\t\t\t\t//+ \"RETURNING rebs_id INTO ?\";\r\n\t\t\t\r\n\t\t\t// creating prepared statement\r\n\t\t\tps = conn.prepareStatement(sql); // uses connection to send string as a prepared statement\r\n\t\t\tps.setInt(1, rebs_id); // REBS_ID IS AUTO INCREMENTING\r\n\t\t\tps.setInt(2, user_id);\r\n\t\t\tps.setString(3, null);\r\n\t\t\tps.setInt(4, rebs_type);\r\n\t\t\tps.setInt(5, rebs_status);\r\n\t\t\tps.setDouble(6, rebs_amount);\r\n\t\t\tps.setString(7, rebs_description);\r\n\t\t\t//ps.setString(8, null); this is the attachment\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\t// size must be converted to int otherwise it results in error\r\n\t\t\t\tps.setBinaryStream(8, rebs_photo.getInputStream(), (int) rebs_photo.getSize());\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tps.setTimestamp(9, time_submitted);\r\n\t\t\tps.setString(10, null);\r\n\t\t\t//ps.setInt(11, rebs_id);\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"in DAO, rebs_id: \" + rebs_id);\r\n\t\t\t// rows affected\r\n\t\t\tint affected = ps.executeUpdate();\r\n\t\t\tSystem.out.println(\"Rows inserted: \" + affected);\r\n\t\t\t\r\n\t\t\t\r\n\t\t}catch(SQLException e){\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\tclose(ps);\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Created new reimbursement request!\");\r\n\r\n\t}",
"public static biz.c24.retaildemo.model.java.ReceiptDataModel getInstance()\n {\n if (!initialized)\n {\n synchronized (biz.c24.retaildemo.model.java.ReceiptDataModel.class)\n {\n if (instance == null)\n {\n instance = new biz.c24.retaildemo.model.java.ReceiptDataModel(false);\n instance.init();\n initialized = true;\n }\n }\n }\n return instance;\n }",
"public Receipt(Purchase p) {\r\n this.purch=p;\r\n totalPurch=0;\r\n totalDisc=0;\r\n \r\n db= new FakeDataBase();\r\n c= new Customer(db.getCustomerDbItem(purch.getCustIdx()));\r\n //System.out.println(c.toString());\r\n lineItem = new LineItem[0];\r\n generateLineItems();\r\n }",
"public void loadData () {\n // create an ObjectInputStream for the file we created before\n ObjectInputStream ois;\n try {\n ois = new ObjectInputStream(new FileInputStream(\"DB/Guest.ser\"));\n\n int noOfOrdRecords = ois.readInt();\n Guest.setMaxID(ois.readInt());\n System.out.println(\"GuestController: \" + noOfOrdRecords + \" Entries Loaded\");\n for (int i = 0; i < noOfOrdRecords; i++) {\n guestList.add((Guest) ois.readObject());\n //orderList.get(i).getTable().setAvailable(false);\n }\n } catch (IOException | ClassNotFoundException e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n }",
"@Override\n public void execute(Realm realm) {\n Book newbook = realm.createObject(Book.class, UUID.randomUUID().toString());\n newbook.setBook_name(newBookName);\n newbook.setAuthor_name(newAuthorName);\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t\tsubscribeBroadcast(TickBroadcast.class, tick_msg -> { //subscribe to timer\n\t\t\tif (!tick_msg.isRunning()){ //if reached duration time \n\t\t\t\tLogger.getLogger(\"logger\").log(Level.INFO,getName()+ \" is terminating \");\n\t\t\t\tterminate();\n\t\t\t}\n\t\t\tsetTick(tick_msg.getTick());\n\t\t\t\n\t\t\tif (curr_request!=null){\n\t\t\t\tif (curr_amount>0){\n\t\t\t\t\tLogger.getLogger(\"logger\").log(Level.INFO,getName()+ \" created a pair of \" +curr_request.getShoeType());\n\t\t\t\t\tcurr_amount--;\n\t\t\t\t}\n\t\t\t\telse if (curr_amount==0){\n\t\t\t\t\tLogger.getLogger(\"logger\").log(Level.INFO,getName()+ \" finished producing the restock request for \"+curr_request.getAmount()+\" \"+curr_request.getShoeType());\n\t\t\t\t\tReceipt r= new Receipt(getName(),\"store\",curr_request.getShoeType(),false,curr_tick,curr_request.getCurr_tick(),curr_request.getAmount());\n\t\t\t\t\tcomplete(curr_request,r);\n\t\t\t\t\tif (!restock_orders.isEmpty()){\n\t\t\t\t\t\tcurr_request = restock_orders.remove();\n\t\t\t\t\t\tcurr_amount = curr_request.getAmount();\n\t\t\t\t\t\tif (curr_amount>0){\n\t\t\t\t\t\t\tLogger.getLogger(\"logger\").log(Level.INFO,getName()+ \" created a pair of \" +curr_request.getShoeType());\n\t\t\t\t\t\t\tcurr_amount--;\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\tcurr_request=null;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (!restock_orders.isEmpty()){\n\t\t\t\t\tsetRequest(restock_orders.remove());\n\t\t\t\t\tLogger.getLogger(\"logger\").log(Level.INFO,getName()+ \" created 1 pair of \"+curr_request.getShoeType());\n\t\t\t\t\tcurr_request.setAmount(curr_request.getAmount()-1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tsubscribeRequest(ManufacturingOrderRequest.class, man_req -> {\n\t\t\tLogger.getLogger(\"logger\").log(Level.INFO,getName()+ \" was asked from the store to produce \"+man_req.getAmount()+\" \"+man_req.getShoeType());\n\t\t\tif (curr_request==null){\n\t\t\t\tsetRequest(man_req);\n\t\t\t\tcurr_amount=man_req.getAmount();\n\t\t\t}\n\t\t\telse\n\t\t\t\ttry {\n\t\t\t\t\trestock_orders.put(man_req);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t});\n\t\t\n\t\tlatchObject.countDown();\n\t}",
"@PostConstruct\r\n public void iniciar() {\n notaEntrada.setIdnotaentrada(0);\r\n notaEntrada.setOrdenCompra(new OrdenCompra());\r\n notaEntrada.setNumero(maxNumero() + 1);\r\n notaEntrada.setFechaReg(new Date());\r\n notaEntrada.setFechaDocref(null);\r\n notaEntrada.setNroDocref(\"\");\r\n notaEntrada.setObservacion(\"\");\r\n notaEntrada.setTipoIngreso(\"\");\r\n notaEntrada.setProveedor(new Proveedor());\r\n notaEntrada.setAlmacenDestino(new Almacen());\r\n listNotaEntradaDetalle.clear();\r\n this.producto = null;\r\n }",
"public void printReceipt(){\n sale.updateExternalSystems();\n sale.printReceipt(totalCost, amountPaid, change);\n }",
"private void pushSavedExpenseLineItem(){\n //Cursor cursor = getExpenseStatusCursor(SyncStatus.SAVED_REPORT);\n Cursor cursor = getSavedExpenseLineItemCursor();\n\n if(cursor.getCount() != 0) {\n cursor.moveToFirst();\n\n do {\n final Long expenseBaseId = cursor.getLong(\n cursor.getColumnIndex(ExpenseEntry._ID));\n\n ExpenseLineItem expenseLineItem = new ExpenseLineItem();\n\n expenseLineItem.setDescription(\n cursor.getString(cursor.getColumnIndex(\n ExpenseEntry.COLUMN_DESCRIPTION)));\n\n expenseLineItem.setExpenseReportId(cursor.getInt(\n cursor.getColumnIndex(ExpenseEntry.COLUMN_REPORT_ID)));\n\n expenseLineItem.setExpenseDate(\n cursor.getString(cursor.getColumnIndex(\n ExpenseEntry.COLUMN_EXPENSE_DATE)));\n\n expenseLineItem.setCategory(cursor.getString(cursor.getColumnIndex(\n ExpenseEntry.COLUMN_CATEGORY)));\n\n expenseLineItem.setCost(cursor.getFloat(cursor.getColumnIndex(\n ExpenseEntry.COLUMN_COST)));\n\n expenseLineItem.setHst(cursor.getFloat(cursor.getColumnIndex(\n ExpenseEntry.COLUMN_HST)));\n expenseLineItem.setGst(cursor.getFloat(cursor.getColumnIndex(\n ExpenseEntry.COLUMN_GST)));\n expenseLineItem.setQst(cursor.getFloat(cursor.getColumnIndex(\n ExpenseEntry.COLUMN_QST)));\n expenseLineItem.setCurrency(cursor.getString(cursor.getColumnIndex(\n ExpenseEntry.COLUMN_CURRENCY)));\n expenseLineItem.setRegion(cursor.getString(cursor.getColumnIndex(\n ExpenseEntry.COLUMN_REGION)));\n\n //TODO: receipt\n\n try {\n ERTRestApi.apiAddExpenseLineItem(\n expenseLineItem,\n new ERTRestApi.ERTRestApiListener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Gson gson = new GsonBuilder().setDateFormat\n (\"yyyy-MM-dd'T'HH:mm:ss\").create();\n ExpenseLineItem expenseLineItemResponse =\n gson.fromJson(response.toString(),\n ExpenseLineItem.class\n );\n\n updateExpenseLineItemSyncStatus(expenseBaseId,\n SyncStatus.SYNCED\n );\n\n setExpenseLineItemValuesFromServer(\n expenseBaseId,\n expenseLineItemResponse\n );\n\n }\n },\n\n new ERTRestApi.ERTRestApiErrorListener() {\n @Override\n public void onErrorResponse(ERTRestApi\n .ERTRestApiError error) {\n\n Log.e(LOG_TAG, error.getMessage());\n\n }\n }\n );\n } catch (ERTRestApiException | JSONException e) {\n Log.e(LOG_TAG, e.getMessage());\n }\n\n updateExpenseLineItemSyncStatus(expenseBaseId,SyncStatus.SYNC_IN_PROGRESS);\n\n } while (cursor.moveToNext());\n }\n cursor.close();\n }",
"public void recupera() {\n Cliente clienteActual;\n clienteActual=clienteDAO.buscaId(c.getId());\n if (clienteActual!=null) {\n c=clienteActual;\n } else {\n c=new Cliente();\n }\n }",
"private void loadDescribedTemplateData() {\r\n if (connect == null) {\r\n System.out.println(\"<internal> DescribedTemplateCore.loadDescribedTemplateData() finds no database connection and exits\");\r\n return;\r\n }\r\n\r\n Statement statement = null;\r\n ResultSet resultSet = null;\r\n try {\r\n String strDTNum = String.valueOf(pk_described_template);\r\n statement = connect.createStatement();\r\n\r\n // acquire described template info; note: template to described_template is 1 to many, so from described_template to template is 1:1\r\n resultSet = statement.executeQuery( \"SELECT fk_version_set, fk_template, description_hash, synchronized, hash, enabled, steps \" +\r\n \"FROM described_template \" +\r\n \"JOIN template ON fk_template = pk_template \" +\r\n \"WHERE pk_described_template = \" + strDTNum );\r\n\r\n if ( resultSet.next() ) {\r\n dbDescribedTemplate.fk_version_set = resultSet.getBytes(\"fk_version_set\");\r\n dbDescribedTemplate.fk_template = resultSet.getLong(\"fk_template\");\r\n dbDescribedTemplate.description_hash = resultSet.getBytes(\"description_hash\");\r\n dbDescribedTemplate.dtSynchronized = resultSet.getBoolean(\"synchronized\");\r\n dbDescribedTemplate.template_hash = resultSet.getBytes(\"hash\");\r\n dbDescribedTemplate.enabled = resultSet.getBoolean(\"enabled\");\r\n dbDescribedTemplate.steps = resultSet.getString(\"steps\");\r\n System.out.println(\" <internal> DescribedTemplateCore.loadDescribedTemplateData() loads data from described template record \" + pk_described_template);\r\n if (resultSet.next())\r\n throw new Exception(\"resultSet wrongly has more than one entry\");\r\n } else {\r\n throw new Exception(\"described template data not present\");\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"DescribedTemplateCore.loadDescribedTemplateData() exception for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n\r\n // acquire matching run info\r\n try {\r\n String strTemplateNum = String.valueOf(dbDescribedTemplate.fk_template);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT pk_run, artifacts, start_time, ready_time, end_time, passed \" +\r\n \"FROM run \" +\r\n \"WHERE fk_template = \" + strTemplateNum );\r\n while ( resultSet.next() ) {\r\n DBRun dbRun = new DBRun(resultSet.getLong(\"pk_run\"));\r\n dbRun.artifacts = resultSet.getBytes(\"artifacts\");\r\n dbRun.start_time = resultSet.getDate(\"start_time\");\r\n dbRun.ready_time = resultSet.getDate(\"ready_time\");\r\n dbRun.end_time = resultSet.getDate(\"end_time\");\r\n dbRun.passed = resultSet.getBoolean(\"passed\");\r\n dbDescribedTemplate.pkdtToDBRun.put(pk_described_template, dbRun);\r\n System.out.println(\" <internal> TemplateCore.loadTemplateData() loads data from described_template-matched run record \" + dbRun.pk_run);\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"TemplateCore.loadTemplateData() exception for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n } \r\n \r\n // acquire matching test_instance info; note: described_template to test_instance is 1:1\r\n try {\r\n String strDescribedTemplateNum = String.valueOf(pk_described_template);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT pk_test_instance, fk_run, due_date, phase, synchronized \" +\r\n \"FROM test_instance \" +\r\n \"WHERE fk_described_template = \" + strDescribedTemplateNum);\r\n while ( resultSet.next() ) {\r\n DBTestInstance dbTestInstance = new DBTestInstance(resultSet.getLong(\"pk_test_instance\"));\r\n dbTestInstance.fk_run = resultSet.getLong(\"fk_run\"); // null entry returns 0\r\n dbTestInstance.due_date = resultSet.getDate(\"due_date\");\r\n dbTestInstance.phase = resultSet.getInt(\"phase\");\r\n dbTestInstance.iSynchronized = resultSet.getBoolean(\"synchronized\");\r\n dbDescribedTemplate.pkdtToDBTestInstance.put(pk_described_template, dbTestInstance);\r\n System.out.println(\" <internal> TemplateCore.loadDescribedTemplateData() loads data from described_template-matched test_instance record \" + dbTestInstance.pk_test_instance);\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"DescribedTemplateCore.loadDescribedTemplateData() exception for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n } \r\n\r\n // acquire corresponding multiple lines of data\r\n try {\r\n String strPKDT = String.valueOf(dbDescribedTemplate.pk_described_template);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT pk_dt_line, line, description \" +\r\n \"FROM dt_line \" +\r\n \"WHERE fk_described_template = \" + strPKDT );\r\n while ( resultSet.next() ) {\r\n DBDTLine dtLine = new DBDTLine();\r\n dtLine.pk_dt_line = resultSet.getLong(\"pk_dt_line\"); // null entry returns 0\r\n dtLine.line = resultSet.getInt(\"line\");\r\n dtLine.dtLineDescription = resultSet.getString(\"description\");\r\n System.out.println(\" <internal> DescribedTemplateCore.loadDescribedTemplateData() loads line data from dt_line \" + dtLine.pk_dt_line);\r\n\r\n dbDescribedTemplate.pkdtToDTLine.put(dtLine.pk_dt_line, dtLine);\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"DescribedTemplateCore.loadDescribedTemplateData() exception on dtLine access for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n\r\n // get corresponding artifact information; not every dtLine has corresponding artifact information\r\n for (DBDTLine dtLine: dbDescribedTemplate.pkdtToDTLine.values()) {\r\n try {\r\n String strPKDTLine = String.valueOf(dtLine.pk_dt_line);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT is_primary, reason, pk_artifact, fk_version, fk_content, synchronized, platform, internal_build, name \" +\r\n \"FROM artifact_to_dt_line \" +\r\n \"JOIN artifact ON fk_artifact = pk_artifact \" +\r\n \"WHERE fk_dt_line = \" + strPKDTLine );\r\n if ( resultSet.next() ) {\r\n dtLine.is_primary = resultSet.getBoolean(\"is_primary\");\r\n dtLine.reason = resultSet.getString(\"reason\");\r\n dtLine.pk_artifact = resultSet.getLong(\"pk_artifact\");\r\n dtLine.pk_version = resultSet.getLong(\"fk_version\");\r\n System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads artifact data for dt_line \" + dtLine.pk_dt_line);\r\n\r\n if (resultSet.next())\r\n throw new Exception(\"resultSet wrongly has more than one entry\");\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n } // end for()\r\n\r\n // get corresponding version information; not every dtLine has corresponding version information\r\n for (DBDTLine dtLine: dbDescribedTemplate.pkdtToDTLine.values()) {\r\n try {\r\n String strPKVersion = String.valueOf(dtLine.pk_version);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT version, scheduled_release, actual_release, sort_order \" +\r\n \"FROM version \" +\r\n \"WHERE pk_version = \" + strPKVersion );\r\n if ( resultSet.next() ) {\r\n dtLine.version = resultSet.getString(\"version\");\r\n dtLine.scheduled_release = resultSet.getDate(\"scheduled_release\");\r\n dtLine.actual_release = resultSet.getDate(\"actual_release\");\r\n dtLine.sort_order = resultSet.getInt(\"sort_order\");\r\n System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads version data for dt_line \" + dtLine.pk_dt_line);\r\n\r\n if (resultSet.next())\r\n throw new Exception(\"resultSet wrongly has more than one entry\");\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n } // end for()\r\n\r\n // get corresponding content information; not every dtLine has corresponding content information\r\n for (DBDTLine dtLine: dbDescribedTemplate.pkdtToDTLine.values()) {\r\n try {\r\n String strPKArtifact = String.valueOf(dtLine.pk_artifact);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT pk_content, is_generated \" +\r\n \"FROM content \" +\r\n \"JOIN artifact ON fk_content = pk_content \" +\r\n \"WHERE pk_artifact = \" + strPKArtifact );\r\n if ( resultSet.next() ) {\r\n dtLine.pk_content = resultSet.getBytes(\"pk_content\");\r\n dtLine.is_generated = resultSet.getBoolean(\"is_generated\");\r\n System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads content data for dt_line \" + dtLine.pk_dt_line);\r\n\r\n if (resultSet.next())\r\n throw new Exception(\"resultSet wrongly has more than one entry\");\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n } // end for()\r\n\r\n // get corresponding component information\r\n for (DBDTLine dtLine: dbDescribedTemplate.pkdtToDTLine.values()) {\r\n try {\r\n String strPKVersion = String.valueOf(dtLine.pk_version);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT name \" +\r\n \"FROM component \" +\r\n \"JOIN version ON fk_component = pk_component \" +\r\n \"WHERE pk_version = \" + strPKVersion );\r\n if ( resultSet.next() ) {\r\n dtLine.componentName = resultSet.getString(\"name\");\r\n System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads component data for dt_line \" + dtLine.pk_dt_line);\r\n\r\n if (resultSet.next())\r\n throw new Exception(\"resultSet wrongly has more than one entry\");\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n }\r\n\r\n // get corresponding resource information; not every dtLine has corresponding resource information\r\n for (DBDTLine dtLine: dbDescribedTemplate.pkdtToDTLine.values()) {\r\n try {\r\n String strPKDTLine = String.valueOf(dtLine.pk_dt_line);\r\n statement = connect.createStatement();\r\n resultSet = statement.executeQuery( \"SELECT hash, name, resource.description \" +\r\n \"FROM dt_line \" +\r\n \"JOIN resource ON fk_resource = pk_resource \" +\r\n \"WHERE pk_dt_line = \" + strPKDTLine );\r\n if ( resultSet.next() ) {\r\n dtLine.resourceHash = resultSet.getBytes(\"hash\");\r\n dtLine.resourceName = resultSet.getString(\"name\");\r\n dtLine.resourceDescription = resultSet.getString(\"description\");\r\n System.out.println(\" <internal> TemplateCore.loadTestInstanceData() loads resource data for dt_line \" + dtLine.pk_dt_line);\r\n\r\n if (resultSet.next())\r\n throw new Exception(\"resultSet wrongly has more than one entry\");\r\n }\r\n } catch(Exception e) {\r\n System.out.println(\"TemplateCore.loadTestInstanceData() exception on dtLine access for dtNum \" + pk_described_template + \": \"+ e);\r\n } finally {\r\n safeClose( resultSet ); resultSet = null;\r\n safeClose( statement ); statement = null;\r\n }\r\n } // end for()\r\n }",
"public ActionForward insert(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {\r\n PurchaseOrderItem poi = this.getPurchaseOrderItemFromRequest(request);\r\n this.checkEditPower(poi, request);\r\n\r\n BeanForm purchaseOrderItemReceiptForm = (BeanForm) form;\r\n PurchaseOrderItemReceipt poir = new PurchaseOrderItemReceipt();\r\n purchaseOrderItemReceiptForm.populate(poir, BeanForm.TO_BEAN);\r\n poir.setPurchaseOrderItem(poi);\r\n \r\n PurchaseOrderItemReceiptManager pm = ServiceLocator.getPurchaseOrderItemReceiptManager(request); \r\n if(!pm.checkQty(poir))\r\n throw new BackToInputActionException(\"purchaseOrderItemReceipt.qtyExceeds\"); \r\n\r\n poir=pm.insertPurchaseOrderItemReceipt(poir,this.getCurrentUser(request));\r\n request.setAttribute(\"X_OBJECT\", poir);\r\n request.setAttribute(\"X_ROWPAGE\", \"purchaseOrderItemReceipt/row.jsp\");\r\n\r\n EmailManager em=ServiceLocator.getEmailManager(request);\r\n \r\n Map context=new HashMap();\r\n User emailToUser=null;\r\n if(this.getCurrentUser(request).equals(poir.getReceiver1()))\r\n {\r\n emailToUser=poir.getReceiver2();\r\n context.put(\"x_receiveQty\",poir.getReceiveQty1());\r\n context.put(\"x_receiveDate\",poir.getReceiveDate1());\r\n }\r\n else\r\n {\r\n emailToUser=poir.getReceiver1();\r\n context.put(\"x_receiveQty\",poir.getReceiveQty2());\r\n context.put(\"x_receiveDate\",poir.getReceiveDate2());\r\n \r\n }\r\n context.put(\"x_emailToUser\",emailToUser);\r\n context.put(\"x_receiver\",this.getCurrentUser(request));\r\n context.put(\"x_poir\",poir);\r\n context.put(\"role\", EmailManager.EMAIL_ROLE_RECEIVER);\r\n em.insertEmail(poir.getLogSite(),emailToUser.getEmail(),\"POItemReceive.vm\",context);\r\n \r\n return mapping.findForward(\"success\");\r\n }",
"@PostConstruct\n protected void initNewEntity() {\n setNewEntity(getService().create());\n }",
"public void bootstrap() {\n EntityManager em = CONNECTION_FACTORY.getConnection();\n List<CaixaItemTipo> cits = new ArrayList<>();\n cits.add(CaixaItemTipo.LANCAMENTO_MANUAL);\n cits.add(CaixaItemTipo.DOCUMENTO);\n cits.add(CaixaItemTipo.ESTORNO);\n cits.add(CaixaItemTipo.TROCO);\n \n cits.add(CaixaItemTipo.SUPRIMENTO);\n cits.add(CaixaItemTipo.SANGRIA);\n \n cits.add(CaixaItemTipo.CONTA_PROGRAMADA);\n //cits.add(CaixaItemTipo.PAGAMENTO_DOCUMENTO); 2019-06-10 generalizado com tipo 2\n cits.add(CaixaItemTipo.TRANSFERENCIA);\n \n cits.add(CaixaItemTipo.FUNCIONARIO);\n \n \n em.getTransaction().begin();\n for(CaixaItemTipo cit : cits){\n if(findById(cit.getId()) == null){\n em.persist(cit);\n } else {\n em.merge(cit);\n }\n }\n em.getTransaction().commit();\n\n em.close();\n }",
"@Override\r\n\tpublic void inicializar() {\n\t\tproveedorDatamanager.setProveedorSearch(new Tcxpproveedor());\r\n\t\tproveedorDatamanager.getProveedorSearch().setTsyspersona(new Tsyspersona());\r\n\t\tproveedorDatamanager.setTipoIdColl(bunsysService.buscarObtenerCatalogos(proveedorDatamanager.getLoginDatamanager().getLogin().getPk().getCodigocompania(), ContenidoMessages.getInteger(\"cod_catalogo_tipoid_persona\")));\r\n\t\tproveedorDatamanager.setGrupoProvColl(bunsysService.buscarObtenerCatalogos(proveedorDatamanager.getLoginDatamanager().getLogin().getPk().getCodigocompania(), ContenidoMessages.getInteger(\"cod_catalogo_grupo_prov\")));\r\n\t\tproveedorDatamanager.setEstadoProvColl(bunsysService.buscarObtenerCatalogos(proveedorDatamanager.getLoginDatamanager().getLogin().getPk().getCodigocompania(), ContenidoMessages.getInteger(\"cod_catalogo_estado_persona\")));\r\n\t\tproveedorDatamanager.setProveedorComponente(new ProveedorComponent(proveedorDatamanager.getLoginDatamanager().getLogin().getPk().getCodigocompania()));\r\n\t}",
"List<Receipt> getUserReceipts(long userId) throws DbException;",
"public void initializeOnCreation() \n\t\t\t\tthrows PersistenceException{\n\n\t}",
"public void initForAddNew() {\r\n\r\n\t}",
"public void file(OrderReceipt r) {\r\n\t\tthis.receiptissued.add(r);\r\n\t}",
"private MetaSparqlRequest createRollbackPreInsered() {\n\t\treturn createRollbackMT1();\n\t}",
"@RequestMapping(value = \"/items\", method = RequestMethod.GET)\n public ItemResponse getAllReceipts() {\n\n List items = itemsDBService.getItems();\n List itemNew = new ArrayList();\n for (Object i : items) {\n ItemEntity ie = (ItemEntity) i;\n itemNew.add(Item.builder().itemNumber(ie.getItemNumber())\n .itemUnitCount(ie.getItemUnitCount())\n .itemName(ie.getItemName())\n .itemPrice(ie.getItemPrice())\n .itemUnitPrice(ie.getItemUnitPrice())\n .itemCategory(ie.getItemCategory())\n .itemDiscount(ie.getItemDiscount())\n .itemWarantyEndDate(ie.getItemWarantyEndDate())\n .itemTypeCode(ie.getItemTypeCode())\n .build()\n );\n }\n return ItemResponse.builder().items(itemNew).build();\n }",
"public String editStartReceipt() {\r\n\t\t\r\n\t\ttry {\r\n\t\t\treceipt = service.selectReceiptInfo(receiptSS);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t\t\r\n\t\treturn SUCCESS;\r\n\t}",
"public static void prepopulateBookingData() {\n // Write to the database on a worker thread (so as not to clog up the main thread)\n databaseExecutor.execute(() -> {\n BookingDao dao = dbInstance.bookingDao();\n\n // Start with a fresh database each load\n dao.deleteAllBookings();\n\n Booking stretchBooking = new Booking.BookingBuilder()\n .withType(\"Stretch Tent\")\n .withFirstName(\"Joe\")\n .withLastName(\"Copping\")\n .withAddress(\"1 Pleasant Drive GT53DP\")\n .withCost(800)\n .withDate(LocalDate.of(2021, 8, 1))\n .withNumDays(5)\n .build();\n dao.insertBooking(stretchBooking);\n\n Booking tipiBooking = new Booking.BookingBuilder()\n .withType(\"Tipi\")\n .withFirstName(\"Jason\")\n .withLastName(\"Hitching\")\n .withAddress(\"76 Inway Drive KL25TP\")\n .withCost(233)\n .withDate(LocalDate.of(2021, 6, 3))\n .withNumDays(10)\n .build();\n dao.insertBooking(tipiBooking);\n\n Booking marqueeBooking = new Booking.BookingBuilder()\n .withType(\"Marquee\")\n .withFirstName(\"Daniel\")\n .withLastName(\"Rose\")\n .withAddress(\"26 Flyway Drive TY5YYH\")\n .withCost(500)\n .withDate(LocalDate.of(2022, 1, 22))\n .withNumDays(2)\n .build();\n dao.insertBooking(marqueeBooking);\n\n Booking marqueeBooking2 = new Booking.BookingBuilder()\n .withType(\"Marquee\")\n .withFirstName(\"Daniel\")\n .withLastName(\"Rose\")\n .withAddress(\"26 Flyway Drive TY5YYH\")\n .withCost(500)\n .withDate(LocalDate.of(2022, 1, 22))\n .withNumDays(2)\n .build();\n dao.insertBooking(marqueeBooking2);\n\n Booking tipiBooking2 = new Booking.BookingBuilder()\n .withType(\"Tipi\")\n .withFirstName(\"Jason\")\n .withLastName(\"Hitching\")\n .withAddress(\"76 Inway Drive KL25TP\")\n .withCost(233)\n .withDate(LocalDate.of(2021, 6, 3))\n .withNumDays(10)\n .build();\n dao.insertBooking(tipiBooking2);\n\n Booking tipiBooking3 = new Booking.BookingBuilder()\n .withType(\"Tipi\")\n .withFirstName(\"Jason\")\n .withLastName(\"Hitching\")\n .withAddress(\"76 Inway Drive KL25TP\")\n .withCost(233)\n .withDate(LocalDate.of(2021, 6, 3))\n .withNumDays(10)\n .build();\n dao.insertBooking(tipiBooking3);\n\n Booking tipiBooking4 = new Booking.BookingBuilder()\n .withType(\"Tipi\")\n .withFirstName(\"Jason\")\n .withLastName(\"Hitching\")\n .withAddress(\"76 Inway Drive KL25TP\")\n .withCost(233)\n .withDate(LocalDate.of(2021, 6, 3))\n .withNumDays(10)\n .build();\n dao.insertBooking(tipiBooking4);\n\n Booking stretchBooking2 = new Booking.BookingBuilder()\n .withType(\"Stretch Tent\")\n .withFirstName(\"Joe\")\n .withLastName(\"Copping\")\n .withAddress(\"1 Pleasant Drive GT53DP\")\n .withCost(800)\n .withDate(LocalDate.of(2021, 8, 1))\n .withNumDays(5)\n .build();\n dao.insertBooking(stretchBooking2);\n\n Booking stretchBooking3 = new Booking.BookingBuilder()\n .withType(\"Stretch Tent\")\n .withFirstName(\"Joe\")\n .withLastName(\"Copping\")\n .withAddress(\"1 Pleasant Drive GT53DP\")\n .withCost(800)\n .withDate(LocalDate.of(2021, 8, 1))\n .withNumDays(5)\n .build();\n dao.insertBooking(stretchBooking3);\n\n });\n }",
"public void inicializarItemInvoice() {\r\n\t\ttry {\r\n\t\t\teditarItem = false;\r\n\t\t\trequired = true;\r\n\t\t\tpo = new PO();\r\n\t\t\tlistPos = new ArrayList<PO>();\r\n\t\t\titemInvoice = null;\r\n\t\t\titemPO = null;\r\n\t\t\tpartNumber = null;\r\n\t\t\tBasicFiltroPO filtroPO = new BasicFiltroPO();\r\n\r\n\t\t\tCarga c = facade.getCargaById(invoice.getCarga().getId());\r\n\t\t\tfiltroPO.setFilial(c.getFilial());\r\n\t\t\tlistPos = facade.listarPO(filtroPO);\r\n\t\t\tpoConverter = new ConverterUtil<PO>(listPos);\r\n\r\n\t\t} catch (BusinessException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void initiateOfferQueue() {\n List<Offer> offerList = offerRepository.findAll();\n\n if (!offerList.isEmpty()) {\n\n for (Offer offer : offerList) {\n\n addOfferToOfferBook(offer);\n }\n }\n\n }",
"private void btnGetReceiptActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGetReceiptActionPerformed\n String stringID = textReceiptID.getText();\n if(textReceiptID.getText().isEmpty()){\n JOptionPane.showMessageDialog(rootPane, \"Please Enter a valid ID\");\n return;\n }\n int ID = Integer.parseInt(stringID);\n newHandler.getReceipt(ID);\n \n if(newHandler.getReceiptErrorMsg() != null){\n JOptionPane.showMessageDialog(rootPane, newHandler.getReceiptErrorMsg());\n }\n textReceiptID.setText(Integer.toString(newHandler.getReceiptID()));\n textReceiptDate.setText(newHandler.getReceiptDate());\n textReceiptAmmount.setText(Double.toString(newHandler.getReceiptAmmount()));\n textReceiptType.setText(newHandler.getReceiptType());\n textReceiptDescription.setText(newHandler.getReceiptDescription());\n searched = true;\n }",
"private void createTempDatabase() {\n\t\thandler = new ERXmlDocumentHandler(doc);\n\t\tList<String> filter = initFilter(subjectId);\n\t\tparseEntitys(filter);\n\t}",
"@Transactional( WorkflowPlugin.BEAN_TRANSACTION_MANAGER )\n void create( Workflow reply );",
"public void doCreateItem() {\r\n\t\tlogger.info(\"Se procede a crear el book \" + newItem.getDescription());\r\n\t\tBook entity = newItem.getEntity();\r\n\t\tentity.setUser(Global.activeUser());\r\n\t\tentity.setBookBalance(BigDecimal.ZERO);\r\n\t\tentity.setTotalBudget(BigDecimal.ZERO);\r\n\t\tentity.setTotalIncome(BigDecimal.ZERO);\r\n\t\tentity.setTotalExpenses(BigDecimal.ZERO);\r\n\t\tentity = bookService.create(entity);\r\n\r\n\t\t// Actualizar el mapa de books\r\n\t\tGlobalBook.instance().put(new BookData(entity));\r\n\r\n\t\tlogger.info(\"Se ha creado el book \" + newItem.getDescription());\r\n\t\tnewItem = new BookData(new Book());\r\n\t\tFacesContext.getCurrentInstance().addMessage(null,\r\n\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_INFO, \"Libro creado\", \"Libro creado correctamente\"));\r\n\t}",
"public void load() {\n updater.load(-1); // -1 because Guest ID doesn't matter.\n }",
"@Override\n protected String doInBackground(String... params) {\n try {\n\n responseJSON = \"\";\n\n JSONObject jsonPayment = new JSONObject();\n db.open();\n // to get Primary Receipt from database\n ArrayList<HashMap<String, String>> insmast = db\n .getUnSyncPrimaryReceipt();\n db.close();\n if (insmast != null && insmast.size() > 0) {\n JSONArray array = new JSONArray();\n // To make json string to post payment\n for (HashMap<String, String> insp : insmast) {\n JSONObject jsonins = new JSONObject();\n jsonins.put(\"UniqueId\", insp.get(\"UniqueId\"));\n jsonins.put(\"CustomerId\", insp.get(\"CustomerId\"));\n jsonins.put(\"MaterialId\", insp.get(\"MaterialId\"));\n jsonins.put(\"SkuId\", insp.get(\"SKUId\"));\n jsonins.put(\"Quantity\", insp.get(\"Quantity\"));\n jsonins.put(\"Amount\", insp.get(\"Amount\"));\n jsonins.put(\"TransactionDate\", insp.get(\"CreateDate\"));\n jsonins.put(\"CreateBy\", userId);\n jsonins.put(\"ipAddress\",\n common.getDeviceIPAddress(true));\n jsonins.put(\"Machine\", common.getIMEI());\n array.put(jsonins);\n }\n jsonPayment.put(\"PrimaryReceipt\", array);\n\n sendJSon = jsonPayment.toString();\n\n // To invoke json web service to create payment\n responseJSON = common.invokeJSONWS(sendJSon, \"json\",\n \"InsertPimaryReceipt\", common.url);\n } else {\n return \"No primary receipt pending to be send.\";\n }\n return responseJSON;\n } catch (Exception e) {\n // TODO: handle exception\n return \"ERROR: \" + \"Unable to get response from server.\";\n } finally {\n db.close();\n }\n }",
"public void initRequest() {\n repo.getData();\n }",
"@Override\n public void execute(ProcessBundle bundle) throws Exception {\n HttpServletRequest request = RequestContext.get().getRequest();\n VariablesSecureApp vars = new VariablesSecureApp(request);\n\n try {\n OBContext.setAdminMode();\n // Variable declaration\n // Variable declaration\n String proposalId = null;\n String proposalattrId = null;\n if (bundle.getParams().get(\"Escm_Proposalmgmt_ID\") != null) {\n proposalId = bundle.getParams().get(\"Escm_Proposalmgmt_ID\").toString();\n }\n if (bundle.getParams().get(\"Escm_Proposal_Attr_ID\") != null) {\n proposalattrId = bundle.getParams().get(\"Escm_Proposal_Attr_ID\").toString();\n EscmProposalAttribute proposalAttr = OBDal.getInstance().get(EscmProposalAttribute.class,\n proposalattrId);\n proposalId = proposalAttr.getEscmProposalmgmt().getId();\n }\n EscmProposalMgmt proposalmgmt = OBDal.getInstance().get(EscmProposalMgmt.class, proposalId);\n final String clientId = bundle.getContext().getClient();\n final String orgId = proposalmgmt.getOrganization().getId();\n final String userId = bundle.getContext().getUser();\n User user = OBDal.getInstance().get(User.class, userId);\n String purchaseOrderType = \"PUR\";\n List<EscmPurchaseOrderConfiguration> config = new ArrayList<EscmPurchaseOrderConfiguration>();\n List<Location> bploclist = new ArrayList<Location>();\n List<Warehouse> warehouselist = new ArrayList<Warehouse>();\n List<PriceList> priceListlist = new ArrayList<PriceList>();\n List<PaymentTerm> paymentTermList = new ArrayList<PaymentTerm>();\n Location bplocation = null;\n String yearId = null, transdoctypeId = null;\n SimpleDateFormat d1 = new SimpleDateFormat(\"dd-MM-yyyy\");\n Warehouse warehouse = null;\n PriceList priceList = null;\n PaymentTerm paymentTerm = null;\n String startingDate = \"\", budgetReferenceId = null;\n\n String motContactPerson = \"\";\n String motContactPosition = \"\";\n String description = null;\n String alertWindow = sa.elm.ob.scm.util.AlertWindow.contractUser;\n String windowId = \"2ADDCB0DD2BF4F6DB13B21BBCCC3038C\";\n NextRoleByRuleVO nextApproval = null;\n\n ProposalManagementProcessDAO proposalDAO = new ProposalManagementProcessDAOImpl();\n // get the connection\n Connection conn = OBDal.getInstance().getConnection();\n\n boolean isMinProposalApproved = false;\n if (proposalmgmt.getProposalstatus().equals(\"PAWD\")) {\n isMinProposalApproved = proposalDAO.isMinProposalApproved(proposalmgmt);\n }\n\n if ((proposalmgmt.getProposalappstatus().equals(\"APP\")\n && proposalmgmt.getProposalstatus().equals(\"AWD\"))\n || (proposalmgmt.getProposalstatus().equals(\"PAWD\")\n && (isMinProposalApproved || proposalmgmt.getProposalappstatus().equals(\"APP\")))) {\n\n // based on configuration minvalue , getting purchase order type is purchase order /contract\n if (proposalmgmt.getProposalstatus().equals(\"PAWD\")) {\n config = proposalDAO.getPOTypeBasedOnValue(orgId, proposalmgmt.getAwardamount());\n } else {\n config = proposalDAO.getPOTypeBasedOnValue(orgId, proposalmgmt.getTotalamount());\n }\n\n if (config.size() > 0) {\n purchaseOrderType = config.get(0).getOrdertype();\n\n // Setting mot contact person and position\n\n EscmPurchaseOrderConfiguration configuration = config.get(0);\n motContactPosition = configuration.getMOTContactPosition();\n motContactPerson = configuration.getMOTContactPerson() != null\n ? configuration.getMOTContactPerson().getName()\n : null;\n\n } else {\n\n // Setting mot contact person and position\n\n EscmPurchaseOrderConfiguration configuration = PurchaseAgreementCalloutDAO\n .checkDocTypeConfig(OBContext.getOBContext().getCurrentClient().getId(),\n proposalmgmt.getOrganization().getId(), purchaseOrderType);\n\n motContactPosition = configuration.getMOTContactPosition();\n motContactPerson = configuration.getMOTContactPerson() != null\n ? configuration.getMOTContactPerson().getName()\n : null;\n\n }\n\n // Throw error if contract category is inactive\n if (proposalmgmt != null && proposalmgmt.getContractType() != null\n && !proposalmgmt.getContractType().isActive()) {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\",\n \"@Escm_ContractCategoryInactive@\");\n bundle.setResult(result);\n return;\n }\n\n startingDate = proposalDAO.getPeriodStartDate(clientId);\n budgetReferenceId = proposalDAO.getBudgetFromPeriod(clientId, startingDate);\n if (\"\".equals(budgetReferenceId)) {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\",\n \"@Efin_Budget_Init_Mandatory@\");\n bundle.setResult(result);\n return;\n }\n if (budgetReferenceId != null) {\n if (!proposalmgmt.getEfinBudgetinitial().getId().equals(budgetReferenceId)) {\n // OBError result = OBErrorBuilder.buildMessage(null, \"error\", \"@Escm_YearClosed_Err@\");\n // bundle.setResult(result);\n // return;\n }\n }\n\n // fetching finacial year\n yearId = proposalDAO.getFinancialYear(clientId);\n if (\"\".equals(yearId)) {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\",\n \"@ESCM_FinancialYear_NotDefine@\");\n bundle.setResult(result);\n return;\n }\n\n // fetching warehouse\n warehouselist = proposalDAO.getWarehouse(proposalmgmt.getClient().getId());\n if (warehouselist.size() > 0) {\n warehouse = warehouselist.get(0);\n } else {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\", \"@ESCM_Warehouse_NotDefine@\");\n bundle.setResult(result);\n return;\n }\n\n // fetching bplocation\n bploclist = proposalDAO.getLocation(proposalmgmt.getSupplier().getId());\n if (bploclist.size() > 0)\n bplocation = bploclist.get(0);\n else {\n String message = OBMessageUtils.messageBD(\"ESCM_SuppLoc_NotDefine\");\n message = message.replace(\"%\", proposalmgmt.getSupplier().getName());\n OBError result = OBErrorBuilder.buildMessage(null, \"error\", message);\n bundle.setResult(result);\n return;\n }\n\n // fetching pricelist\n priceListlist = proposalDAO.getPriceList(proposalmgmt.getClient().getId());\n if (priceListlist.size() > 0)\n priceList = priceListlist.get(0);\n else {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\", \"@ESCM_PriceList_NotDefine@\");\n bundle.setResult(result);\n return;\n }\n\n // fetching payment term\n paymentTermList = proposalDAO.getPaymentTerm(proposalmgmt.getClient().getId());\n if (paymentTermList.size() > 0)\n paymentTerm = paymentTermList.get(0);\n else {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\",\n \"@ESCM_PaymentTerm_NotDefine@\");\n bundle.setResult(result);\n return;\n }\n if (user.getBusinessPartner() == null) {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\",\n \"@ESCM_CrtPOfrmProsal_NotBP@\");\n bundle.setResult(result);\n return;\n }\n // default value brought for mot contact person/position so no need validation.\n /*\n * if (user.getBusinessPartner() != null && user.getBusinessPartner().getEhcmPosition() ==\n * null) { OBError result = OBErrorBuilder.buildMessage(null, \"error\",\n * \"@ESCM_LoggUser_PosNotDef@\"); bundle.setResult(result); return; }\n */\n\n // fetching document type\n Object transdoctype = proposalDAO.getTransactionDoc(orgId, clientId);\n if (transdoctype != null) {\n transdoctypeId = (String) transdoctype;\n } else {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\", \"@ESCM_PODocType_NotDefine@\");\n bundle.setResult(result);\n return;\n }\n\n if (transdoctypeId != null && paymentTerm != null && priceList != null && warehouse != null\n && bplocation != null && yearId != null) {\n Order order = OBProvider.getInstance().get(Order.class);\n order.setClient(proposalmgmt.getClient());\n order.setOrganization(proposalmgmt.getOrganization());\n order.setCreatedBy(user);\n order.setUpdatedBy(user);\n order.setSalesTransaction(false);\n order.setDocumentType(OBDal.getInstance().get(DocumentType.class, \"0\"));\n order.setTransactionDocument(OBDal.getInstance().get(DocumentType.class, transdoctypeId));\n order.setDocumentNo(UtilityDAO.getSequenceNo(conn, clientId,\n order.getTransactionDocument().getDocumentSequence().getName(), true));\n order.setDocumentStatus(\"DR\");\n order.setDocumentAction(\"CO\");\n order.setAccountingDate(new java.util.Date());\n order.setOrderDate(new java.util.Date());\n order.setBusinessPartner(proposalmgmt.getSupplier());\n order.setEscmRevision(0L);\n order.setEscmAppstatus(\"DR\");\n order.setEscmFinanyear(OBDal.getInstance().get(Year.class, yearId));\n if (proposalmgmt.getEscmBidmgmt() != null\n && proposalmgmt.getEscmBidmgmt().getBidname() != null) {\n order.setEscmProjectname(proposalmgmt.getEscmBidmgmt().getBidname());\n } else {\n order.setEscmProjectname(proposalmgmt.getBidName());\n }\n // order.setEscmOnboarddateh(new java.util.Date());\n order.setEscmOrdertype(purchaseOrderType);\n // order.setEscmOnboarddategreg(d1.format(new Date()));\n order.setPartnerAddress(bplocation);\n order.setEscmContractduration(null);\n // order.setEscmPeriodtype(\"DT\");\n order.setWarehouse(warehouse);\n order.setPriceList(priceList);\n order.setPaymentTerms(paymentTerm);\n order.setInvoiceTerms(\"D\");\n order.setDeliveryTerms(\"A\");\n order.setFreightCostRule(\"I\");\n order.setFormOfPayment(\"B\");\n order.setDeliveryMethod(\"P\");\n order.setPriority(\"5\");\n order.setEscmAdRole(OBContext.getOBContext().getRole());\n order.setEscmAppstatus(\"DR\");\n order.setEscmAdvpaymntPercntge(BigDecimal.ZERO);\n Currency objCurrency = OBDal.getInstance().get(Currency.class, \"317\");\n order.setCurrency(proposalmgmt.getOrganization().getCurrency() == null ? objCurrency\n : proposalmgmt.getOrganization().getCurrency());\n\n if (proposalmgmt.getProposalstatus().equals(\"PAWD\")) {\n order.setGrandTotalAmount(proposalmgmt.getAwardamount());\n } else {\n order.setGrandTotalAmount(proposalmgmt.getTotalamount());\n }\n\n order.setDocumentStatus(\"DR\");\n order.setEscmDocaction(\"CO\");\n // order.setEscmContractstartdate(new java.util.Date());\n // order.setEscmContractenddate(new java.util.Date());\n order.setEscmBuyername(user);\n order.setEscmRatedategre(d1.format(new Date()));\n if (budgetReferenceId != null)\n order.setEfinBudgetint(\n OBDal.getInstance().get(EfinBudgetIntialization.class, budgetReferenceId));\n order.setEscmProposalmgmt(proposalmgmt);\n // order.setEscmMotcontperson(user.getBusinessPartner().getName());\n // order.setEscmMotcontposition(user.getBusinessPartner().getEhcmPosition());\n order.setEscmMotcontperson(motContactPerson);\n order.setEscmMotcontposition(motContactPosition);\n if (proposalmgmt.getSecondsupplier() != null)\n order.setEscmSecondsupplier(proposalmgmt.getSecondsupplier());\n if (proposalmgmt.getSecondBranchname() != null)\n order.setEscmSecondBranchname(proposalmgmt.getSecondBranchname());\n order.setEscmIssecondsupplier(proposalmgmt.isSecondsupplier());\n if (proposalmgmt.getIBAN() != null)\n order.setEscmSecondIban(proposalmgmt.getIBAN());\n if (proposalmgmt.getSubcontractors() != null)\n order.setEscmSubcontractors(proposalmgmt.getSubcontractors());\n if (proposalmgmt.isTaxLine()) {\n order.setEscmIstax(proposalmgmt.isTaxLine());\n\n }\n if (proposalmgmt.getEfinTaxMethod() != null) {\n order.setEscmTaxMethod(proposalmgmt.getEfinTaxMethod());\n }\n order.setEscmCalculateTaxlines(true);\n if (proposalmgmt.getContractType() != null) {\n order.setEscmContactType(proposalmgmt.getContractType());\n if (proposalmgmt.getContractType().getReceiveType().getSearchKey().equals(\"AMT\")) {\n order.setEscmReceivetype(\"AMT\");\n } else {\n order.setEscmReceivetype(\"QTY\");\n }\n } else {\n order.setEscmContactType(null);\n }\n OBQuery<EscmProposalsourceRef> sourceRef = OBDal.getInstance().createQuery(\n EscmProposalsourceRef.class,\n \"as e where e.escmProposalmgmtLine.id in (select ln.id from \"\n + \"Escm_Proposalmgmt_Line ln where ln.escmProposalmgmt.id=:propId)\");\n sourceRef.setNamedParameter(\"propId\", proposalmgmt.getId());\n List<EscmProposalsourceRef> propSrclist = sourceRef.list();\n if (propSrclist.size() > 0) {\n EscmProposalsourceRef propSrcRef = propSrclist.get(0);\n if (propSrcRef.getRequisition() != null) {\n order.setEscmMaintenanceProject(\n propSrcRef.getRequisition().getEscmMaintenanceProject());\n }\n if (propSrcRef.getRequisition() != null) {\n order.setEscmMaintenanceCntrctNo(\n propSrcRef.getRequisition().getESCMMaintenanceContractNo());\n }\n }\n if (proposalmgmt.getEscmBidmgmt() != null) {\n OBQuery<Escmbidsourceref> bidSrcref = OBDal.getInstance().createQuery(\n Escmbidsourceref.class,\n \"as e where e.escmBidmgmtLine.id in (select bid.id from escm_bidmgmt_line bid where bid.escmBidmgmt.id=:bidId)\");\n bidSrcref.setNamedParameter(\"bidId\", proposalmgmt.getEscmBidmgmt().getId());\n List<Escmbidsourceref> bidSrcList = bidSrcref.list();\n if (bidSrcList.size() > 0) {\n Escmbidsourceref bidSrcRef = bidSrcList.get(0);\n if (bidSrcRef.getRequisition() != null) {\n order.setEscmMaintenanceProject(\n bidSrcRef.getRequisition().getEscmMaintenanceProject());\n order.setEscmMaintenanceCntrctNo(\n bidSrcRef.getRequisition().getESCMMaintenanceContractNo());\n }\n }\n }\n\n OBDal.getInstance().save(order);\n\n proposalmgmt.setDocumentNo(order);\n OBDal.getInstance().save(proposalmgmt);\n\n // Updating the PO reference in PEE(Proposal Attribute)\n // Fetching the PEE irrespective of Proposal Version\n OBQuery<EscmProposalAttribute> proposalAttr = OBDal.getInstance().createQuery(\n EscmProposalAttribute.class,\n \" as a join a.escmProposalevlEvent b where b.status='CO' and a.escmProposalmgmt.proposalno= :proposalID \");\n proposalAttr.setNamedParameter(\"proposalID\", proposalmgmt.getProposalno());\n List<EscmProposalAttribute> proposalAttrList = proposalAttr.list();\n if (proposalAttrList.size() > 0) {\n EscmProposalAttribute proposalAttrObj = proposalAttrList.get(0);\n proposalAttrObj.setOrder(order);\n OBDal.getInstance().save(proposalAttrObj);\n }\n\n OBDal.getInstance().flush();\n\n int ordercount = POcontractAddproposalDAO.insertOrderline(conn, proposalmgmt, order);\n\n if (ordercount == 1) {\n // send an alert to contract user when po is created\n description = sa.elm.ob.scm.properties.Resource\n .getProperty(\"scm.contractuser.alert\", vars.getLanguage())\n .concat(\"\" + proposalmgmt.getProposalno());\n AlertUtility.alertInsertBasedonPreference(order.getId(), order.getDocumentNo(),\n \"ESCM_Contract_User\", order.getClient().getId(), description, \"NEW\", alertWindow,\n \"scm.contractuser.alert\", Constants.GENERIC_TEMPLATE, windowId, null);\n String message = OBMessageUtils.messageBD(\"ESCM_CreatePOForProposal_Success\");\n message = message.replace(\"%\", order.getDocumentNo());\n OBError result = OBErrorBuilder.buildMessage(null, \"success\", message);\n bundle.setResult(result);\n } else {\n OBError result = OBErrorBuilder.buildMessage(null, \"error\",\n \"@ESCM_CreatePOForProsalNotSuccess@\");\n bundle.setResult(result);\n }\n }\n }\n } catch (OBException e) {\n OBDal.getInstance().rollbackAndClose();\n log.error(\" Exception in CreatePOFromProposal: \" + e);\n OBError result = OBErrorBuilder.buildMessage(null, \"error\", e.getMessage());\n bundle.setResult(result);\n return;\n } catch (Exception e) {\n log.error(\"Exeception in CreatePOFromProposal Process:\", e);\n // Throwable t = DbUtility.getUnderlyingSQLException(e);\n final OBError error = OBMessageUtils.translateError(bundle.getConnection(), vars,\n vars.getLanguage(), OBMessageUtils.messageBD(\"HB_INTERNAL_ERROR\"));\n bundle.setResult(error);\n } finally {\n OBContext.restorePreviousMode();\n }\n }",
"@SuppressWarnings(\"static-access\")\r\n\t@Test\r\n\tpublic void crearRecibosTest() {\r\n\r\n\t\tpd.crearRecibos();\r\n\t\tpd.pm.deletePersistent(pd.r1);\r\n\r\n\t}",
"@Override\r\n\tprotected void init() {\r\n\t\tList<Configuracao> configs = servico.listarTodos();\r\n\t\tif (!configs.isEmpty()) {\r\n\t\t\tentidade = configs.get(0);\t// deve haver apenas um registro\r\n\t\t} else {\r\n\t\t\tcreateConfiguracao();\r\n\t\t}\r\n\t\t\r\n carregarTemas();\r\n\t}",
"private void initData() {\n requestServerToGetInformation();\n }",
"public static void test() {\n\n Reservation res1 =\n new Reservation(\n -1,\n \"Standard\",\n \"0000111\",\n Timestamp.valueOf(\"2019-06-11 16:10:00\"),\n Timestamp.valueOf(\"2019-06-15 09:00:00\"),\n \"525 W Broadway\",\n \"Vancouver\");\n ReservationsController.makeReservation(res1);\n\n RentalConfirmation rc1 =\n RentalsController.rentVehicle(res1, \"Mastercard\", \"389275920888492\", \"08/22\");\n\n System.out.println(\"Getting the rental added to the database\");\n Rental check = RentalsController.getRental(rc1.getRid());\n System.out.println(check);\n ArrayList<RentalReportCount> rentals =\n RentalsController.getDailyRentalCount(\"2019-11-20\", null, null);\n if (rentals != null && rentals.isEmpty()) {\n System.out.println(\"list is empty\");\n }\n System.out.println(rentals);\n\n RentalsController.deleteRental(rc1.getRid());\n }",
"public void populate(){\n salesRepRepository.save(new SalesRep(\"Maddy\"));\n salesRepRepository.save(new SalesRep(\"Jegor\"));\n salesRepRepository.save(new SalesRep(\"Natalia\"));\n salesRepRepository.save(new SalesRep(\"Joao\"));\n }",
"private void saveData() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // Insert the book only if mBookId matches DEFAULT_BOOK_ID\n // Otherwise update it\n // call finish in any case\n if (mBookId == DEFAULT_BOOK_ID) {\n mDb.bookDao().insertBook(bookEntry);\n } else {\n //update book\n bookEntry.setId(mBookId);\n mDb.bookDao().updateBook(bookEntry);\n }\n finish();\n }\n });\n }",
"public PaymentRequestItem(OleInvoiceItem poi, OlePaymentRequestDocument preq, HashMap<String, ExpiredOrClosedAccountEntry> expiredOrClosedAccountList) {\r\n\r\n // copy base attributes w/ extra array of fields not to be copied\r\n PurApObjectUtils.populateFromBaseClass(PurApItemBase.class, poi, this, PurapConstants.PREQ_ITEM_UNCOPYABLE_FIELDS);\r\n\r\n setItemDescription(poi.getItemDescription());\r\n\r\n //New Source Line should be set for PaymentRequestItem\r\n resetAccount();\r\n\r\n // set up accounts\r\n List accounts = new ArrayList();\r\n\r\n for (PurApAccountingLine account : poi.getSourceAccountingLines()) {\r\n InvoiceAccount poa = (InvoiceAccount) account;\r\n\r\n // check if this account is expired/closed and replace as needed\r\n SpringContext.getBean(AccountsPayableService.class).processExpiredOrClosedAccount(poa, expiredOrClosedAccountList);\r\n\r\n //KFSMI-4522 copy an accounting line with zero dollar amount if system parameter allows\r\n if (poa.getAmount().isZero()) {\r\n if (SpringContext.getBean(AccountsPayableService.class).canCopyAccountingLinesWithZeroAmount()) {\r\n accounts.add(new PaymentRequestAccount(this, poa));\r\n }\r\n } else {\r\n accounts.add(new PaymentRequestAccount(this, poa));\r\n }\r\n }\r\n\r\n this.setSourceAccountingLines(accounts);\r\n this.getUseTaxItems().clear();\r\n //List<PurApItemUseTax> newUseTaxItems = new ArrayList<PurApItemUseTax>();\r\n /// this.setUseTaxItems(newUseTaxItems);\r\n //copy use tax items over, and blank out keys (useTaxId and itemIdentifier)\r\n /*\r\n this.getUseTaxItems().clear();\r\n for (PurApItemUseTax useTaxItem : poi.getUseTaxItems()) {\r\n PaymentRequestItemUseTax newItemUseTax = new PaymentRequestItemUseTax(useTaxItem);\r\n this.getUseTaxItems().add(newItemUseTax);\r\n\r\n }\r\n */\r\n\r\n // clear amount and desc on below the line - we probably don't need that null\r\n // itemType check but it's there just in case remove if it causes problems\r\n // also do this if of type service\r\n if ((ObjectUtils.isNotNull(this.getItemType()) && this.getItemType().isAmountBasedGeneralLedgerIndicator())) {\r\n // setting unit price to be null to be more consistent with other below the line\r\n // this.setItemUnitPrice(null);\r\n }\r\n\r\n // copy custom\r\n /*Modified for the jira -5458*/\r\n this.purchaseOrderItemUnitPrice = poi.getPurchaseOrderItem()!=null ? poi.getPurchaseOrderItem().getItemUnitPrice() : null;\r\n// this.purchaseOrderCommodityCode = poi.getPurchaseOrderCommodityCd();\r\n\r\n // set doc fields\r\n this.setPurapDocumentIdentifier(preq.getPurapDocumentIdentifier());\r\n this.setPurapDocument(preq);\r\n }",
"private void loadOrder(LocalDate date) throws PersistenceException{\n orders.clear();\n ORDER_FILE = \"Order_\"+ date+\".txt\";\n Scanner scanner;\n File file = new File(ORDER_FILE);\n if(file.exists()){\n \n \n try {\n scanner = new Scanner(\n new BufferedReader(\n new FileReader(ORDER_FILE)));\n } catch (FileNotFoundException e) {\n throw new PersistenceException(\n \"-_- Could not load data into memory.\",e);\n } \n scanner.nextLine();\n String currentLine;\n String[] currentTokens = new String[13]; \n while (scanner.hasNextLine()) {\n currentLine = scanner.nextLine();\n currentTokens = currentLine.split(DELIMITER);\n \n\n Order currentOrder = new Order(Integer.parseInt((currentTokens[0])));\n \n currentOrder.setOrderDate(LocalDate.parse(currentTokens[1]));\n currentOrder.setClientName(currentTokens[2]);\n currentOrder.setState(currentTokens[3]);\n currentOrder.setStateTax(new BigDecimal(currentTokens[4]));\n currentOrder.setProduct(currentTokens[5]);\n currentOrder.setArea(new BigDecimal(currentTokens[6]));\n currentOrder.setMaterialCost(new BigDecimal(currentTokens[7]));\n currentOrder.setLaborCost(new BigDecimal(currentTokens[8]));\n currentOrder.setTotalMaterialCost(new BigDecimal(currentTokens[9]));\n currentOrder.setTotalLaborCost(new BigDecimal(currentTokens[10]));\n currentOrder.setTotalTax(new BigDecimal(currentTokens[11]));\n currentOrder.setTotalCost(new BigDecimal(currentTokens[12]));\n \n orders.put(currentOrder.getOrderNumber(), currentOrder);\n }\n scanner.close();\n } else{\n try{\n file.createNewFile();\n } catch (IOException ex){\n throw new PersistenceException(\"Error! No orders from that date.\", ex);\n }\n }\n }",
"private synchronized void processNewsInitial()\n\t\t\t\tthrows ClientProtocolException, IOException, JSONException {\n\t\t\tlong lastTime = System.currentTimeMillis() / 1000;\n\t\t\tlong startTime = lastTime - Utils.MONTH;\n\t\t\tsetNews(ApiHandler.getData(lastTime, startTime));\n\t\t\tmHandler.sendEmptyMessage(CREATE_LIST);\n\t\t}",
"public PaymentRequestItem(PurchaseOrderItem poi, PaymentRequestDocument preq, HashMap<String, ExpiredOrClosedAccountEntry> expiredOrClosedAccountList) {\r\n\r\n // copy base attributes w/ extra array of fields not to be copied\r\n PurApObjectUtils.populateFromBaseClass(PurApItemBase.class, poi, this, PurapConstants.PREQ_ITEM_UNCOPYABLE_FIELDS);\r\n\r\n setItemDescription(poi.getItemDescription());\r\n\r\n //New Source Line should be set for PaymentRequestItem\r\n resetAccount();\r\n\r\n // set up accounts\r\n List accounts = new ArrayList();\r\n for (PurApAccountingLine account : poi.getSourceAccountingLines()) {\r\n PurchaseOrderAccount poa = (PurchaseOrderAccount) account;\r\n\r\n // check if this account is expired/closed and replace as needed\r\n SpringContext.getBean(AccountsPayableService.class).processExpiredOrClosedAccount(poa, expiredOrClosedAccountList);\r\n\r\n //KFSMI-4522 copy an accounting line with zero dollar amount if system parameter allows\r\n if (poa.getAmount().isZero()) {\r\n if (SpringContext.getBean(AccountsPayableService.class).canCopyAccountingLinesWithZeroAmount()) {\r\n accounts.add(new PaymentRequestAccount(this, poa));\r\n }\r\n } else {\r\n accounts.add(new PaymentRequestAccount(this, poa));\r\n }\r\n }\r\n\r\n this.setSourceAccountingLines(accounts);\r\n this.getUseTaxItems().clear();\r\n //List<PurApItemUseTax> newUseTaxItems = new ArrayList<PurApItemUseTax>();\r\n /// this.setUseTaxItems(newUseTaxItems);\r\n //copy use tax items over, and blank out keys (useTaxId and itemIdentifier)\r\n /*\r\n this.getUseTaxItems().clear();\r\n for (PurApItemUseTax useTaxItem : poi.getUseTaxItems()) {\r\n PaymentRequestItemUseTax newItemUseTax = new PaymentRequestItemUseTax(useTaxItem);\r\n this.getUseTaxItems().add(newItemUseTax);\r\n\r\n }\r\n */\r\n\r\n // clear amount and desc on below the line - we probably don't need that null\r\n // itemType check but it's there just in case remove if it causes problems\r\n // also do this if of type service\r\n if ((ObjectUtils.isNotNull(this.getItemType()) && this.getItemType().isAmountBasedGeneralLedgerIndicator())) {\r\n // setting unit price to be null to be more consistent with other below the line\r\n this.setItemUnitPrice(null);\r\n }\r\n\r\n // copy custom\r\n this.purchaseOrderItemUnitPrice = poi.getItemUnitPrice();\r\n// this.purchaseOrderCommodityCode = poi.getPurchaseOrderCommodityCd();\r\n\r\n // set doc fields\r\n this.setPurapDocumentIdentifier(preq.getPurapDocumentIdentifier());\r\n this.setPurapDocument(preq);\r\n }",
"public receipt() {\n initComponents();\n \n }",
"private void insertData() {\n for (int i = 0; i < 3; i++) {\n RecipeEntity books = factory.manufacturePojo(RecipeEntity.class);\n em.persist(books);\n data.add(books);\n }\n }",
"@Override\n\tpublic void recovery() {\n\t\tRecordTable recordTable = new RecordTable(); \n\t\tjava.util.List<FileRecordInfoModel> lst = null;\n\t\ttry {\n\t\t\tlst = recordTable.findAllRows();\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfor(FileRecordInfoModel model : lst)\n\t\t\t_recordSingle.addParam(model,false);\n\t\t\t// 读取配置,看是否需要扫描文件。--以后加\n\t}",
"Delivery createDelivery();",
"private void processNewObject(SystemMetadata mnSystemMetadata) throws SynchronizationFailed, \n RetryableException, UnrecoverableException {\n\n // TODO: should new objects from replica nodes process or throw SyncFailed?\n // as per V1 logic (TransferObjectTask), this class currently does not check\n // the authoritativeMN field and allows the object to sync.\n logger.debug(task.taskLabel() + \" entering processNewObject...\");\n \n \n try {\n \tvalidateSeriesId(mnSystemMetadata, null); \n } catch (NotAuthorized e) {\n logger.error(buildStandardLogMessage(e, \"NotAuthorized to claim the seriesId\"), e);\n throw SyncFailedTask.createSynchronizationFailed(mnSystemMetadata.getIdentifier().getValue(),\n \"NotAuthorized to claim the seriesId\", e);\n }\n \n try {\n\n // make sure the pid is not reserved by anyone else\n // not going through TLS, so need to build a Session, and will use the submitter\n // in the systemMetadata, since they should have access to their own reservation(?)\n Session verifySubmitter = new Session();\n verifySubmitter.setSubject(mnSystemMetadata.getSubmitter());\n identifierReservationService.hasReservation(verifySubmitter, mnSystemMetadata.getSubmitter(), mnSystemMetadata.getIdentifier());\n logger.debug(task.taskLabel() + \" Pid is reserved by this object's submitter.\");\n\n } catch (NotFound e) {\n logger.debug(task.taskLabel() + \" Pid is not reserved by anyone.\");\n // ok to continue...\n \n } catch (NotAuthorized | InvalidRequest e) {\n throw new UnrecoverableException(task.getPid() + \" - from hasReservation\",e);\n \n } catch (ServiceFailure e) {\n extractRetryableException(e);\n throw new UnrecoverableException(task.getPid() + \" - from hasReservation\",e);\n }\n\n mnSystemMetadata = populateInitialReplicaList(mnSystemMetadata);\n mnSystemMetadata.setSerialVersion(BigInteger.ONE);\n try {\n SystemMetadataValidator.validateCNRequiredNonNullFields(mnSystemMetadata);\n\n createObject(mnSystemMetadata);\n } catch (InvalidSystemMetadata e) {\n throw SyncFailedTask.createSynchronizationFailed(task.getPid(), null, e);\n }\n finally{};\n }",
"public void init() {\n\t\tTypedQuery<Personne> query = em.createQuery(\"SELECT p FROM Personne p\", Personne.class);\n\t\tList<Personne> clients = query.getResultList();\n\t\tif (clients.size()==0) {\n\t\t\tSqlUtils.executeFile(\"exemple.sql\", em);\n\t\t}\n\t}",
"protected void populate(EdaContext xContext, ResultSet rs) \n\tthrows SQLException, IcofException {\n\n\t\tsetId(rs.getLong(ID_COL));\n\t\tsetFromChangeReq(xContext, rs.getLong(FROM_ID_COL));\n\t\tsetToChangeReq(xContext, rs.getLong(TO_ID_COL));\n\t\tsetRelationship(rs.getString(RELATIONSHIP_COL));\n\t\tsetLoadFromDb(true);\n\n\t}",
"public void initialize() {\n Runnable backgroundTask = () -> {\n Configuration configuration = loadApplicationConfiguration();\n\n if (Objects.nonNull(configuration)) {\n EbayService ebayService = new EbayService(configuration);\n\n try {\n List<OrderType> unshippedOrders = ebayService.getUnshippedOrders();\n\n for (OrderType order : unshippedOrders) {\n String orderID = order.getOrderID();\n String numberOfTransaction = Integer.toString(order.getTransactionArray().getTransaction().length);\n String transactionPrice = Double.toString(order.getTotal().getValue());\n\n String paidTime = \"\";\n\n if (order.getPaidTime() != null) {\n paidTime = eBayUtil.toAPITimeString(order.getPaidTime().getTime());\n }\n\n String buyerUserID = order.getBuyerUserID();\n\n Vector dataVector = new Vector();\n\n dataVector.add(orderID);\n dataVector.add(numberOfTransaction);\n dataVector.add(transactionPrice);\n dataVector.add(paidTime);\n dataVector.add(buyerUserID);\n dataVector.add(new JTextField(20));\n dataVector.add(new JButton(\"Create Fulfillment Order\"));\n\n providerTableModel.addRow(dataVector);\n }\n } catch (Exception exception) {\n showErrorMessage(exception.getMessage());\n }\n }\n };\n\n Thread backgroundThread = new Thread(backgroundTask);\n\n backgroundThread.start();\n }",
"public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tinvoiceEClass = createEClass(INVOICE);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__INVOICE_ID);\n\t\tcreateEReference(invoiceEClass, INVOICE__BILLING_ACCOUNT);\n\t\tcreateEReference(invoiceEClass, INVOICE__CONTACT_MECH);\n\t\tcreateEReference(invoiceEClass, INVOICE__CURRENCY_UOM);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__DESCRIPTION);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__DUE_DATE);\n\t\tcreateEReference(invoiceEClass, INVOICE__INVOICE_ATTRIBUTES);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__INVOICE_DATE);\n\t\tcreateEReference(invoiceEClass, INVOICE__INVOICE_ITEMS);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__INVOICE_MESSAGE);\n\t\tcreateEReference(invoiceEClass, INVOICE__INVOICE_NOTES);\n\t\tcreateEReference(invoiceEClass, INVOICE__INVOICE_STATUSES);\n\t\tcreateEReference(invoiceEClass, INVOICE__INVOICE_TYPE);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__PAID_DATE);\n\t\tcreateEReference(invoiceEClass, INVOICE__PARTY);\n\t\tcreateEReference(invoiceEClass, INVOICE__PARTY_ID_FROM);\n\t\tcreateEReference(invoiceEClass, INVOICE__RECURRENCE_INFO);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__REFERENCE_NUMBER);\n\t\tcreateEReference(invoiceEClass, INVOICE__ROLE_TYPE);\n\t\tcreateEReference(invoiceEClass, INVOICE__STATUS);\n\n\t\tinvoiceAttributeEClass = createEClass(INVOICE_ATTRIBUTE);\n\t\tcreateEReference(invoiceAttributeEClass, INVOICE_ATTRIBUTE__INVOICE);\n\t\tcreateEAttribute(invoiceAttributeEClass, INVOICE_ATTRIBUTE__ATTR_NAME);\n\t\tcreateEAttribute(invoiceAttributeEClass, INVOICE_ATTRIBUTE__ATTR_DESCRIPTION);\n\t\tcreateEAttribute(invoiceAttributeEClass, INVOICE_ATTRIBUTE__ATTR_VALUE);\n\n\t\tinvoiceContactMechEClass = createEClass(INVOICE_CONTACT_MECH);\n\t\tcreateEReference(invoiceContactMechEClass, INVOICE_CONTACT_MECH__INVOICE);\n\t\tcreateEReference(invoiceContactMechEClass, INVOICE_CONTACT_MECH__CONTACT_MECH);\n\t\tcreateEReference(invoiceContactMechEClass, INVOICE_CONTACT_MECH__CONTACT_MECH_PURPOSE_TYPE);\n\n\t\tinvoiceContentEClass = createEClass(INVOICE_CONTENT);\n\t\tcreateEReference(invoiceContentEClass, INVOICE_CONTENT__INVOICE);\n\t\tcreateEReference(invoiceContentEClass, INVOICE_CONTENT__CONTENT);\n\t\tcreateEReference(invoiceContentEClass, INVOICE_CONTENT__INVOICE_CONTENT_TYPE);\n\t\tcreateEAttribute(invoiceContentEClass, INVOICE_CONTENT__FROM_DATE);\n\t\tcreateEAttribute(invoiceContentEClass, INVOICE_CONTENT__THRU_DATE);\n\n\t\tinvoiceContentTypeEClass = createEClass(INVOICE_CONTENT_TYPE);\n\t\tcreateEAttribute(invoiceContentTypeEClass, INVOICE_CONTENT_TYPE__INVOICE_CONTENT_TYPE_ID);\n\t\tcreateEAttribute(invoiceContentTypeEClass, INVOICE_CONTENT_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(invoiceContentTypeEClass, INVOICE_CONTENT_TYPE__HAS_TABLE);\n\t\tcreateEReference(invoiceContentTypeEClass, INVOICE_CONTENT_TYPE__PARENT_TYPE);\n\n\t\tinvoiceItemEClass = createEClass(INVOICE_ITEM);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__INVOICE);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__INVOICE_ITEM_SEQ_ID);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__AMOUNT);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__DESCRIPTION);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__INVENTORY_ITEM);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__INVOICE_ITEM_TYPE);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__OVERRIDE_GL_ACCOUNT);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__OVERRIDE_ORG_PARTY);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__PARENT_INVOICE_ID);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__PARENT_INVOICE_ITEM_SEQ_ID);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__PRODUCT);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__PRODUCT_FEATURE);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__QUANTITY);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__SALES_OPPORTUNITY);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__TAX_AUTH_GEO);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__TAX_AUTH_PARTY);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__TAX_AUTHORITY_RATE_SEQ);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__TAXABLE_FLAG);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__UOM);\n\n\t\tinvoiceItemAssocEClass = createEClass(INVOICE_ITEM_ASSOC);\n\t\tcreateEReference(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__INVOICE_ITEM_ASSOC_TYPE);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__FROM_DATE);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__INVOICE_ID_FROM);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__INVOICE_ID_TO);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__INVOICE_ITEM_SEQ_ID_FROM);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__INVOICE_ITEM_SEQ_ID_TO);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__AMOUNT);\n\t\tcreateEReference(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__PARTY_ID_FROM);\n\t\tcreateEReference(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__PARTY_ID_TO);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__QUANTITY);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__THRU_DATE);\n\n\t\tinvoiceItemAssocTypeEClass = createEClass(INVOICE_ITEM_ASSOC_TYPE);\n\t\tcreateEAttribute(invoiceItemAssocTypeEClass, INVOICE_ITEM_ASSOC_TYPE__INVOICE_ITEM_ASSOC_TYPE_ID);\n\t\tcreateEAttribute(invoiceItemAssocTypeEClass, INVOICE_ITEM_ASSOC_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(invoiceItemAssocTypeEClass, INVOICE_ITEM_ASSOC_TYPE__HAS_TABLE);\n\t\tcreateEReference(invoiceItemAssocTypeEClass, INVOICE_ITEM_ASSOC_TYPE__PARENT_TYPE);\n\n\t\tinvoiceItemAttributeEClass = createEClass(INVOICE_ITEM_ATTRIBUTE);\n\t\tcreateEAttribute(invoiceItemAttributeEClass, INVOICE_ITEM_ATTRIBUTE__ATTR_NAME);\n\t\tcreateEAttribute(invoiceItemAttributeEClass, INVOICE_ITEM_ATTRIBUTE__INVOICE_ID);\n\t\tcreateEAttribute(invoiceItemAttributeEClass, INVOICE_ITEM_ATTRIBUTE__INVOICE_ITEM_SEQ_ID);\n\t\tcreateEAttribute(invoiceItemAttributeEClass, INVOICE_ITEM_ATTRIBUTE__ATTR_DESCRIPTION);\n\t\tcreateEAttribute(invoiceItemAttributeEClass, INVOICE_ITEM_ATTRIBUTE__ATTR_VALUE);\n\n\t\tinvoiceItemTypeEClass = createEClass(INVOICE_ITEM_TYPE);\n\t\tcreateEAttribute(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__INVOICE_ITEM_TYPE_ID);\n\t\tcreateEReference(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__DEFAULT_GL_ACCOUNT);\n\t\tcreateEAttribute(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__HAS_TABLE);\n\t\tcreateEReference(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__INVOICE_ITEM_TYPE_ATTRS);\n\t\tcreateEReference(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__INVOICE_ITEM_TYPE_GL_ACCOUNTS);\n\t\tcreateEReference(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__PARENT_TYPE);\n\n\t\tinvoiceItemTypeAttrEClass = createEClass(INVOICE_ITEM_TYPE_ATTR);\n\t\tcreateEReference(invoiceItemTypeAttrEClass, INVOICE_ITEM_TYPE_ATTR__INVOICE_ITEM_TYPE);\n\t\tcreateEAttribute(invoiceItemTypeAttrEClass, INVOICE_ITEM_TYPE_ATTR__ATTR_NAME);\n\t\tcreateEAttribute(invoiceItemTypeAttrEClass, INVOICE_ITEM_TYPE_ATTR__DESCRIPTION);\n\n\t\tinvoiceItemTypeGlAccountEClass = createEClass(INVOICE_ITEM_TYPE_GL_ACCOUNT);\n\t\tcreateEReference(invoiceItemTypeGlAccountEClass, INVOICE_ITEM_TYPE_GL_ACCOUNT__INVOICE_ITEM_TYPE);\n\t\tcreateEReference(invoiceItemTypeGlAccountEClass, INVOICE_ITEM_TYPE_GL_ACCOUNT__ORGANIZATION_PARTY);\n\t\tcreateEReference(invoiceItemTypeGlAccountEClass, INVOICE_ITEM_TYPE_GL_ACCOUNT__GL_ACCOUNT);\n\n\t\tinvoiceItemTypeMapEClass = createEClass(INVOICE_ITEM_TYPE_MAP);\n\t\tcreateEReference(invoiceItemTypeMapEClass, INVOICE_ITEM_TYPE_MAP__INVOICE_TYPE);\n\t\tcreateEAttribute(invoiceItemTypeMapEClass, INVOICE_ITEM_TYPE_MAP__INVOICE_ITEM_MAP_KEY);\n\t\tcreateEReference(invoiceItemTypeMapEClass, INVOICE_ITEM_TYPE_MAP__INVOICE_ITEM_TYPE);\n\n\t\tinvoiceNoteEClass = createEClass(INVOICE_NOTE);\n\t\tcreateEReference(invoiceNoteEClass, INVOICE_NOTE__INVOICE);\n\n\t\tinvoiceRoleEClass = createEClass(INVOICE_ROLE);\n\t\tcreateEReference(invoiceRoleEClass, INVOICE_ROLE__INVOICE);\n\t\tcreateEReference(invoiceRoleEClass, INVOICE_ROLE__PARTY);\n\t\tcreateEReference(invoiceRoleEClass, INVOICE_ROLE__ROLE_TYPE);\n\t\tcreateEAttribute(invoiceRoleEClass, INVOICE_ROLE__DATETIME_PERFORMED);\n\t\tcreateEAttribute(invoiceRoleEClass, INVOICE_ROLE__PERCENTAGE);\n\n\t\tinvoiceStatusEClass = createEClass(INVOICE_STATUS);\n\t\tcreateEReference(invoiceStatusEClass, INVOICE_STATUS__STATUS);\n\t\tcreateEReference(invoiceStatusEClass, INVOICE_STATUS__INVOICE);\n\t\tcreateEAttribute(invoiceStatusEClass, INVOICE_STATUS__STATUS_DATE);\n\t\tcreateEReference(invoiceStatusEClass, INVOICE_STATUS__CHANGE_BY_USER_LOGIN);\n\n\t\tinvoiceTermEClass = createEClass(INVOICE_TERM);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__INVOICE_TERM_ID);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__DESCRIPTION);\n\t\tcreateEReference(invoiceTermEClass, INVOICE_TERM__INVOICE);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__INVOICE_ITEM_SEQ_ID);\n\t\tcreateEReference(invoiceTermEClass, INVOICE_TERM__INVOICE_TERM_ATTRIBUTES);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__TERM_DAYS);\n\t\tcreateEReference(invoiceTermEClass, INVOICE_TERM__TERM_TYPE);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__TERM_VALUE);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__TEXT_VALUE);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__UOM_ID);\n\n\t\tinvoiceTermAttributeEClass = createEClass(INVOICE_TERM_ATTRIBUTE);\n\t\tcreateEReference(invoiceTermAttributeEClass, INVOICE_TERM_ATTRIBUTE__INVOICE_TERM);\n\t\tcreateEAttribute(invoiceTermAttributeEClass, INVOICE_TERM_ATTRIBUTE__ATTR_NAME);\n\t\tcreateEAttribute(invoiceTermAttributeEClass, INVOICE_TERM_ATTRIBUTE__ATTR_DESCRIPTION);\n\t\tcreateEAttribute(invoiceTermAttributeEClass, INVOICE_TERM_ATTRIBUTE__ATTR_VALUE);\n\n\t\tinvoiceTypeEClass = createEClass(INVOICE_TYPE);\n\t\tcreateEAttribute(invoiceTypeEClass, INVOICE_TYPE__INVOICE_TYPE_ID);\n\t\tcreateEAttribute(invoiceTypeEClass, INVOICE_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(invoiceTypeEClass, INVOICE_TYPE__HAS_TABLE);\n\t\tcreateEReference(invoiceTypeEClass, INVOICE_TYPE__INVOICE_TYPE_ATTRS);\n\t\tcreateEReference(invoiceTypeEClass, INVOICE_TYPE__PARENT_TYPE);\n\n\t\tinvoiceTypeAttrEClass = createEClass(INVOICE_TYPE_ATTR);\n\t\tcreateEReference(invoiceTypeAttrEClass, INVOICE_TYPE_ATTR__INVOICE_TYPE);\n\t\tcreateEAttribute(invoiceTypeAttrEClass, INVOICE_TYPE_ATTR__ATTR_NAME);\n\t\tcreateEAttribute(invoiceTypeAttrEClass, INVOICE_TYPE_ATTR__DESCRIPTION);\n\t}",
"private void remplirPrestaraireData() {\n\t}",
"public static void run() {\n try {\n //recreating tables added to update csv data without application restart\n new SqlUtility().setConnection().dropAllTables().createPersonTable().createRecipientTable();\n new CsvPersonParser().run();\n new CsvReсipientParser().run();\n\n List<Person> list;\n list = new SqlUtility().setConnection().grubData();\n String result = \"\";\n result = ListToMessage.converter(list);\n if(!\"\".equals(result)) {\n NotificationSender.sender(result, email, pass, addressList);\n }\n } catch (ClassNotFoundException e){e.printStackTrace();}\n catch (SQLException ee){ee.printStackTrace();}\n catch (ParseException eee) {eee.printStackTrace();}\n\n }",
"@Override\n\tpublic void prepareInvoice(){\n\t\tSystem.out.println(\"invoice prepared...\");\n\t}",
"public void sendReceipt(ActionEvent event) throws IOException, FileNotFoundException, DocumentException {\n HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();\r\n HttpServletResponse response = (HttpServletResponse) FacesContext.getCurrentInstance().getExternalContext().getResponse();\r\n System.err.println(\"hahaha teest\");\r\n// thisOrder = (OrderEntity) event.getComponent().getAttributes().get(\"viewOrder\");\r\n System.out.println(\"No1: in sending invoice\" + thisOrder.getOrderId());\r\n billingSessionBean.createReceipt(thisOrder.getInvoice().getInvoiceId(), currentDate);\r\n thisOrder.setStatus(\"ReceiptSent\");\r\n orderSessionBean.updateOrder(thisOrder);\r\n double amount = thisOrder.getSalePrice();\r\n int receivable = billingSessionBean.viewAccount(2).getId();\r\n int cash = billingSessionBean.viewAccount(1).getId();\r\n System.out.println(\"whats the price now? and account\" + amount + receivable + cash);\r\n billingSessionBean.receivePayment(amount, cash);\r\n billingSessionBean.postPayment(amount, receivable);\r\n System.out.println(\"NO2: After confirming\" + thisOrder.getStatus());\r\n fBEmailSessionBean.sendReceipt(thisOrder.getEmail(), thisOrder.getInvoice().getReceipt());\r\n }",
"CreationData creationData();",
"@FXML\n\t private void loadrenew(ActionEvent event) {\n\t \tif (!isReadyForSubmission) {\n\t Alert alert = new Alert(Alert.AlertType.ERROR);\n\t alert.setTitle(\"Failed\");\n\t alert.setHeaderText(null);\n\t alert.setContentText(\"Please select a book to renew\");\n\t alert.showAndWait();\n\t return;\n\t }\n\n\t Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n\t alert.setTitle(\"Confirm Renew Operation\");\n\t alert.setHeaderText(null);\n\t alert.setContentText(\"Are you sure want to renew the book ?\");\n\n\t Optional<ButtonType> response = alert.showAndWait();\n\t if (response.get() == ButtonType.OK) {\n\t String ac = \"UPDATE ISSUE_LMS SET issueTime = CURRENT_TIMESTAMP, renew_count = renew_count+1 WHERE BOOKID = '\" + Bookid.getText() + \"'\";\n\t System.out.println(ac);\n\t if (dbhandler.execAction(ac)) {\n\t Alert alert1 = new Alert(Alert.AlertType.INFORMATION);\n\t alert1.setTitle(\"Success\");\n\t alert1.setHeaderText(null);\n\t alert1.setContentText(\"Book Has Been Renewed\");\n\t alert1.showAndWait();\n\t } else {\n\t Alert alert1 = new Alert(Alert.AlertType.ERROR);\n\t alert1.setTitle(\"Failed\");\n\t alert1.setHeaderText(null);\n\t alert1.setContentText(\"Renew Has Been Failed\");\n\t alert1.showAndWait();\n\t }\n\t } else {\n\t Alert alert1 = new Alert(Alert.AlertType.INFORMATION);\n\t alert1.setTitle(\"Cancelled\");\n\t alert1.setHeaderText(null);\n\t alert1.setContentText(\"Renew Operation cancelled\");\n\t alert1.showAndWait();\n\t }\n\t }",
"abstract void initPersistance();",
"private static void crearPedidoConStockDeVariedades() throws RemoteException {\n\t\tlong[] idVariedades = { 25, 33 };\n\t\tint[] cantidades = { 2, 3 };\n\t\tPedidoClienteDTO pedido = crearPedido(\"20362134596\", \"test 1\", idVariedades, cantidades);\n\n\t\tpedido = PedidoController.getInstance().crearPedido(pedido).toDTO();\n\n\t\tPedidoController.getInstance().cambiarEstadoPedidoCliente(pedido.getNroPedido(), EstadoPedidoCliente.ACEPTADO);\n\t}",
"public void recargarDatos( ) {\n\t\tPAC_SHWEB_PROVEEDORES llamadaProv = null;\n\t\ttry {\n\t\t\tllamadaProv = new PAC_SHWEB_PROVEEDORES(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuestaCom = null;\n\n\t\ttry {\n\t\t\trespuestaCom = llamadaProv.ejecutaPAC_SHWEB_PROVEEDORES__F_COMUNICADOS_EXPEDIENTE(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"origen\").toString(),\n\t\t\t\t\tnew BigDecimal(UI.getCurrent().getSession().getAttribute(\"expediente\").toString())\n\t\t\t\t\t);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t// Mostramos el estado del expediente\n\t\tPAC_SHWEB_PROVEEDORES llamada = null;\n\t\ttry {\n\t\t\tllamada = new PAC_SHWEB_PROVEEDORES(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuesta = null;\n\t\ttry {\n\t\t\trespuesta = llamada.ejecutaPAC_SHWEB_PROVEEDORES__F_ESTADO_EXPEDIENTE(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tnew BigDecimal(UI.getCurrent().getSession().getAttribute(\"expediente\").toString())\n\t\t\t\t\t);\n\t\t\t\n\t\t\tMap<String, Object> retorno = new HashMap<String, Object>(respuesta);\n\n\t\t\tUI.getCurrent().getSession().setAttribute(\"estadoExpediente\",retorno.get(\"ESTADO\").toString());\n\t\t\t\n\t\t\tprovPantallaConsultaExpedienteInicial.setCaption(\"GESTIÓN DEL EXPEDIENTE Nº \" + UI.getCurrent().getSession().getAttribute(\"expediente\")\n\t\t\t\t\t+ \" ( \" + \n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"estadoExpediente\") + \" ) \");\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\n\t\t}\t\n\t\t\n\t\t// Maestro comunicados\n\n\t\tWS_AMA llamadaAMA = null;\n\t\ttry {\n\t\t\tllamadaAMA = new WS_AMA(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuestaMaestro = null;\n\t\t\n\t\t//System.out.println(\"Llamammos maestro comunicados: \" + UI.getCurrent().getSession().getAttribute(\"tipousuario\").toString().substring(1,1));;\n\t\ttry {\n\t\t\t// pPUSUARIO, pORIGEN, pTPCOMUNI, pTPUSUARIO, pESTADO)\n\t\t\t\n\t\t\trespuestaMaestro = llamadaAMA.ejecutaWS_AMA__MAESTRO_COMUNICADOS(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"origen\").toString(),\n\t\t\t\t\tnull,\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"tipousuario\").toString().substring(1,1),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"estadoExpediente\").toString()\n\t\t\t\t\t);\t\t\t\n\n\t\t\t\n\t\t\tMap<String, Object> retornoMaestro = new HashMap<String, Object>(respuestaMaestro);\n\t\t\tList<Map> valorMaestro = (List<Map>) retornoMaestro.get(\"COMUNICADOS\");\n\t\t\tUI.getCurrent().getSession().setAttribute(\"comunicadosExpediente\",valorMaestro);\n\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\tUI.getCurrent().getSession().setAttribute(\"comunicadosExpediente\",null);\n\t\t}\n\t\t\n\t\t// \t\n\t\t\n\t\t\n\t\t// Validamos si tenemos que mostrar el bot�n de cerrar expediente\n\t\t\n\t\t/*if ( !ValidarComunicado.EsValido(\"CA\") && !ValidarComunicado.EsValido(\"FT\") ) {\n\t\t\tprovPantallaConsultaExpedienteInicial.provDatosDetalleExpediente.btCerrarExpediente.setVisible(false);\n\t\t}\n\t\telse {\n\t\t\tprovPantallaConsultaExpedienteInicial.provDatosDetalleExpediente.btCerrarExpediente.setVisible(true);\n\n\t\t\t\n\t\t\t\n\t\t}*/\n\t\t// Mostramos botonera de cerrar expediente\n\t\t// Validamos si tenemos que mostrar el bot�n de cerrar expediente\n\t\t\n\n\t}",
"private void makeDeposit() {\n\t\t\r\n\t}",
"public interface RemoteStore extends Remote {\n \n /**\n * Get a description of this store\n * @return\n */\n public StoreDescription getDescription() throws RemoteException;\n\n /**\n * Get a catalog of products available through this store.\n * @return ProductCatalog\n */\n public ProductCatalog getCatalog() throws RemoteException;\n \n /**\n * Record the specified transaction. Note that this method is responsible\n * for issuing a Receipt object (this may be null in cases where errors\n * have occurred.)\n * @return Receipt a receipt for the transaction\n * @param transaction the transaction to record\n */\n public Receipt recordTransaction(Transaction t) throws RemoteException;\n}",
"private void init(){\r\n\t\tString fullName = this.person_.getFirstName()+\" \"+this.person_.getLastName();\r\n\t\tboolean alreadyExists = PersonModel.exists(fullName);\r\n\t\t\r\n\t\tif(alreadyExists == true){\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t//need to create person\r\n\t\t\tPersonModel pm = new PersonModel(fullName);\r\n\t\t\tpm.save();\r\n\t\t}\r\n\r\n\t}",
"private void recover() throws IllegalStateException, InvalidRecordLocationException, IOException, IOException {\n \n RecordLocation pos = null;\n int transactionCounter = 0;\n \n log.info(\"Journal Recovery Started from: \" + journal);\n ConnectionContext context = new ConnectionContext();\n \n // While we have records in the journal.\n while ((pos = journal.getNextRecordLocation(pos)) != null) {\n org.activeio.Packet data = journal.read(pos);\n DataStructure c = (DataStructure) wireFormat.unmarshal(data);\n \n if (c instanceof Message ) {\n Message message = (Message) c;\n JournalMessageStore store = (JournalMessageStore) createMessageStore(message.getDestination());\n if ( message.isInTransaction()) {\n transactionStore.addMessage(store, message, pos);\n }\n else {\n store.replayAddMessage(context, message);\n transactionCounter++;\n }\n } else {\n switch (c.getDataStructureType()) {\n case JournalQueueAck.DATA_STRUCTURE_TYPE:\n {\n JournalQueueAck command = (JournalQueueAck) c;\n JournalMessageStore store = (JournalMessageStore) createMessageStore(command.getDestination());\n if (command.getMessageAck().isInTransaction()) {\n transactionStore.removeMessage(store, command.getMessageAck(), pos);\n }\n else {\n store.replayRemoveMessage(context, command.getMessageAck());\n transactionCounter++;\n }\n }\n break;\n case JournalTopicAck.DATA_STRUCTURE_TYPE: \n {\n JournalTopicAck command = (JournalTopicAck) c;\n JournalTopicMessageStore store = (JournalTopicMessageStore) createMessageStore(command.getDestination());\n if (command.getTransactionId() != null) {\n transactionStore.acknowledge(store, command, pos);\n }\n else {\n store.replayAcknowledge(context, command.getClientId(), command.getSubscritionName(), command.getMessageId());\n transactionCounter++;\n }\n }\n break;\n case JournalTransaction.DATA_STRUCTURE_TYPE:\n {\n JournalTransaction command = (JournalTransaction) c;\n try {\n // Try to replay the packet.\n switch (command.getType()) {\n case JournalTransaction.XA_PREPARE:\n transactionStore.replayPrepare(command.getTransactionId());\n break;\n case JournalTransaction.XA_COMMIT:\n case JournalTransaction.LOCAL_COMMIT:\n Tx tx = transactionStore.replayCommit(command.getTransactionId(), command.getWasPrepared());\n if (tx == null)\n break; // We may be trying to replay a commit that\n // was already committed.\n \n // Replay the committed operations.\n tx.getOperations();\n for (Iterator iter = tx.getOperations().iterator(); iter.hasNext();) {\n TxOperation op = (TxOperation) iter.next();\n if (op.operationType == TxOperation.ADD_OPERATION_TYPE) {\n op.store.replayAddMessage(context, (Message) op.data);\n }\n if (op.operationType == TxOperation.REMOVE_OPERATION_TYPE) {\n op.store.replayRemoveMessage(context, (MessageAck) op.data);\n }\n if (op.operationType == TxOperation.ACK_OPERATION_TYPE) {\n JournalTopicAck ack = (JournalTopicAck) op.data;\n ((JournalTopicMessageStore) op.store).replayAcknowledge(context, ack.getClientId(), ack.getSubscritionName(), ack\n .getMessageId());\n }\n }\n transactionCounter++;\n break;\n case JournalTransaction.LOCAL_ROLLBACK:\n case JournalTransaction.XA_ROLLBACK:\n transactionStore.replayRollback(command.getTransactionId());\n break;\n }\n }\n catch (IOException e) {\n log.error(\"Recovery Failure: Could not replay: \" + c + \", reason: \" + e, e);\n }\n }\n break;\n case JournalTrace.DATA_STRUCTURE_TYPE:\n JournalTrace trace = (JournalTrace) c;\n log.debug(\"TRACE Entry: \" + trace.getMessage());\n break;\n default:\n log.error(\"Unknown type of record in transaction log which will be discarded: \" + c);\n }\n }\n }\n \n RecordLocation location = writeTraceMessage(\"RECOVERED\", true);\n journal.setMark(location, true);\n \n log.info(\"Journal Recovered: \" + transactionCounter + \" message(s) in transactions recovered.\");\n }",
"public synchronized void onReceipt(DatagramPacket packet) {\r\n\t\ttry {\r\n\t\t\tthis.notify();\r\n\t\t\t/*\r\n\t\t\t * if we arent receiving change our state to receiving and only take packets\r\n\t\t\t * from this port number\r\n\t\t\t */\r\n\t\t\tint packetPort = packet.getPort();\r\n\t\t\tif (currentPacketPort == null) {\r\n\t\t\t\tcurrentPacketPort = packetPort;\r\n\t\t\t}\r\n\t\t\tif (/*currentPacketPort == packetPort*/true) {\r\n\t\t\t\tbyte[] data = packet.getData();\r\n\t\t\t\tSystem.out.println(printPacketContent(packet) + \" Broker received\");\r\n\t\t\t\t/*\r\n\t\t\t\t * if its a creation check to see if the topic exists and send an ack\r\n\t\t\t\t */\r\n\t\t\t\tif (data[0] == Constants.CREATION) {\r\n\t\t\t\t\t//terminal.println(\"Creation Received From The Publisher\");\r\n\t\t\t\t\tString topic = processMessageFromPacket(packet);\r\n\t\t\t\t\tsendAck(packet);\r\n\t\t\t\t\tcheckTopic(topic, packet);\r\n\t\t\t\t\tcurrentPacketPort = null;\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * if its a publication store the packets in the sorted treemap, change state to\r\n\t\t\t\t\t * receiving pub\r\n\t\t\t\t\t */\r\n\t\t\t\t} else if (data[0] == Constants.PUBLICATION) {\r\n\t\t\t\t\t//terminal.println(\"Publication Received From The Publisher\");\r\n\t\t\t\t\tstate = Constants.BKR_RECEIVING_PUB;\r\n\t\t\t\t\t//add check to see if it is for the currentTransmission\r\n\t\t\t\t\taddToReceivedPackets(packet);\r\n\t\t\t\t\tsendAck(packet);\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * its a subscription add the subscriber to the topic if it exists and send an\r\n\t\t\t\t\t * ack\r\n\t\t\t\t\t */\r\n\t\t\t\t} else if (data[0] == Constants.SUBSCRIPTION) {\r\n\t\t\t\t\t//terminal.println(\"Subscription recieved from Subscriber.\");\r\n\t\t\t\t\tString topic = processMessageFromPacket(packet);\r\n\t\t\t\t\tif (subscriberMap.containsKey(topic)) {\r\n\t\t\t\t\t\tArrayList<Integer> subscriberPorts = subscriberMap.get(topic);\r\n\t\t\t\t\t\tif(!subscriberPorts.contains(packet.getPort())) {\r\n\t\t\t\t\t\t\tsubscriberMap.get(topic).add(packet.getPort());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tsendAck(packet);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tsendAck(packet);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * if its an unsubscription remove that sub from the topics list of port numbers\r\n\t\t\t\t\t */\r\n\t\t\t\t} else if (data[0] == Constants.UNSUBSCRIPTION) {\r\n\t\t\t\t\t//terminal.println(\"Unsubscription recieved from Subscriber.\");\r\n\t\t\t\t\tString topic = processMessageFromPacket(packet);\r\n\t\t\t\t\tif (subscriberMap.containsKey(topic)) {\r\n\t\t\t\t\t\tArrayList<Integer> topicSubscriptions = subscriberMap.get(topic);\r\n\t\t\t\t\t\tfor (int index = 0; index < topicSubscriptions.size(); index++) {\r\n\t\t\t\t\t\t\tif (topicSubscriptions.get(index) == packet.getPort()) {\r\n\t\t\t\t\t\t\t\ttopicSubscriptions.remove(index);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tsendAck(packet);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tsendAck(packet);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * if its an ack remove the acked packet from the queue\r\n\t\t\t\t\t */\r\n\t\t\t\t} else if (data[0] == Constants.ACK) {\r\n\t\t\t\t\t// remove the acked packet from packetsAwaitingAck\r\n\t\t\t\t\t//TODO if the ack has something in the message part that\r\n\t\t\t\t\t//its for a endoftransmission then\r\n\t\t\t\t\tremoveAckedPacketFromPacketsToSend(packet);\t\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * if its the end of a transmission change state back to receiving and publish\r\n\t\t\t\t\t * the packets received\r\n\t\t\t\t\t */\r\n\t\t\t\t} else if (data[0] == Constants.ENDOFTRANSMISSION) {\r\n\t\t\t\t\t//if the end of transmission is for the current publication\r\n\t\t\t\t\t//then invoke publishMessage and change our state to idle\r\n\t\t\t\t\tif (state == Constants.BKR_RECEIVING_PUB && checkIsEndOfCurrentPub(packet)) {\r\n\t\t\t\t\t\tsendAck(packet);\r\n\t\t\t\t\t\tpublishMessage();\r\n\t\t\t\t\t\tstate = Constants.BKR_DEFAULT_STATE;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tsendAck(packet);\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}",
"private void init()\n\t{\n\t\tif (_invData == null)\n\t\t\t_invData = new InvestigateStore.MappedStores();\n\t}",
"@Test\r\n public void testPrintReceipt() {\r\n \r\n instance = new Controller(dbMgr);\r\n instance.printReceipt();\r\n \r\n }",
"int insert(ProcRecInvoice record);",
"public void load2() throws Exception {\n String query = \"select * from catalog_snapshot where item_id = \" + item_id + \" and facility_id = '\" + facility_id + \"'\";\n query += \" and fac_item_id = '\" + this.fac_item_id + \"'\";\n DBResultSet dbrs = null;\n ResultSet rs = null;\n try {\n dbrs = db.doQuery(query);\n rs = dbrs.getResultSet();\n if (rs.next()) {\n setItemId( (int) rs.getInt(\"ITEM_ID\"));\n setFacItemId(rs.getString(\"FAC_ITEM_ID\"));\n setMaterialDesc(rs.getString(\"MATERIAL_DESC\"));\n setGrade(rs.getString(\"GRADE\"));\n setMfgDesc(rs.getString(\"MFG_DESC\"));\n setPartSize( (float) rs.getFloat(\"PART_SIZE\"));\n setSizeUnit(rs.getString(\"SIZE_UNIT\"));\n setPkgStyle(rs.getString(\"PKG_STYLE\"));\n setType(rs.getString(\"TYPE\"));\n setPrice(BothHelpObjs.makeBlankFromNull(rs.getString(\"PRICE\")));\n setShelfLife( (float) rs.getFloat(\"SHELF_LIFE\"));\n setShelfLifeUnit(rs.getString(\"SHELF_LIFE_UNIT\"));\n setUseage(rs.getString(\"USEAGE\"));\n setUseageUnit(rs.getString(\"USEAGE_UNIT\"));\n setApprovalStatus(rs.getString(\"APPROVAL_STATUS\"));\n setPersonnelId( (int) rs.getInt(\"PERSONNEL_ID\"));\n setUserGroupId(rs.getString(\"USER_GROUP_ID\"));\n setApplication(rs.getString(\"APPLICATION\"));\n setFacilityId(rs.getString(\"FACILITY_ID\"));\n setMsdsOn(rs.getString(\"MSDS_ON_LINE\"));\n setSpecOn(rs.getString(\"SPEC_ON_LINE\"));\n setMatId( (int) rs.getInt(\"MATERIAL_ID\"));\n setSpecId(rs.getString(\"SPEC_ID\"));\n setMfgPartNum(rs.getString(\"MFG_PART_NO\"));\n\n //trong 3-27-01\n setCaseQty(BothHelpObjs.makeZeroFromNull(rs.getString(\"CASE_QTY\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n HelpObjs.monitor(1,\n \"Error object(\" + this.getClass().getName() + \"): \" + e.getMessage(), null);\n throw e;\n } finally {\n dbrs.close();\n }\n return;\n }",
"private LCSRevisableEntity createRevisableEntry(LCSProduct product, LCSSKU lcsSKu,\n\t\t\tString materialNumber, String sizedefVR, String sourceVersion,\n\t\t\tString costsheetVersion, String specVersion, String sourceName, String costName,\n\t\t\tString specName, String nrfCode, String styleNumber, String materialDescription,\n\t\t\tString IBTINSTOREMONTH,Collection bomMOAStringColl) throws WTException , WTPropertyVetoException {\n\t\t\n\t\tLCSRevisableEntityLogic revisableEntityLogic = new LCSRevisableEntityLogic();\n\t\t\n\t\tLCSRevisableEntity createRevEntity=null;\n\n\t\tLCSLog.debug(CLASSNAME+\"createRevisableEntry(), this is a fresh entry\");\n\t\t\n\t\tFlexType IBTFlexType = FlexTypeCache\n\t\t.getFlexTypeFromPath(LFIBTConstants.ibtMaterialPath);\n\t\t\n\t\tLCSRevisableEntity ibtMaterialRevObj = LCSRevisableEntity.newLCSRevisableEntity();;\n\t\tString revId = \"\";\n\t\t// Create Blank Revisable Entity Object for the productId\n\t\t\n\t\t\n\t\t//revModel.load(FormatHelper.getObjectId(this.getRevObj()));\n\t\t// create a new model in order to create a new revisable entity.\n\t\t//LCSRevisableEntityClientModel ibtRevEntityModel = new LCSRevisableEntityClientModel();\n\t\t//ibtRevEntityModel.set\n\t\t//ibtRevEntityModel.load(FormatHelper.getObjectId(rev));\n\t\t// set the flextype to ibtRevEntityModel sub type\n\t\tibtMaterialRevObj.setFlexType(IBTFlexType);\n\t\t//System.out.println(\"****************Inside setFlexType ***********************\");\n\t\t//ibtMaterialRevObj.setRevisableEntityName(FormatHelper.format(materialNumber\n\t\t\t//\t+ dateFormat.format(Calendar.getInstance().getTime())));\n\t\t// set the product att in revisable entity child type\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTPRODUCT, product);\n\n\t\t//PLM-170 Adding product ID change\n\t\tString prodId = String.valueOf(((Double)product.getProductARevId()).intValue());\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTPRODUCTID, prodId);\n\t\t//PLM-170 Adding product ID change\n\n\t\t//System.out.println(\"****************Inside product ***********************\"+product);\n\n\t\t// setting the divison att for sap material. \n\t\t// This will drive the ACL functionality.\n\t\tString division = (String) season.getValue(divisionKey);\n\t\tLCSLog.debug(\"division -- \" + division);\n\t\t// setting division att in ibtRevEntityModel\n\t\tibtMaterialRevObj.setValue(\"lfDivision\", division);\n\n\t\t// set the colorway att in revisable entity child type\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTCOLORWAY, lcsSKu);\n\n\t\t// set the size definition version Id\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTMASTERGRID, sizedefVR);\n\t\t// set the sourcing-config version\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTSOURCINGCONFIG, sourceVersion);\n\t\t// set the cost-sheet version\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTCOSTSHEET, costsheetVersion);\n\t\t\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTSPECIFICATION, specVersion);\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.STAGINSPECNAME, specName);\n\t\t// set the source name that is used in the staging area\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTSTAGINGSOURCENAME, sourceName);\n\t\t// set the cost-sheet name to that is entered in staging area\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTSTAGINGCOSTSHEETNAME, costName);\n\t\t//Added for 7.6\n\t\tif (FormatHelper.hasContent(LFIBTConstants.IBTMATERIALSTATUS)) {\n\t\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTMATERIALSTATUS,\n\t\t\t\t\"Create\");\n\t\t}\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTCOSTSHEETSTATUS,\"Sent\");\n\t\t\n\t\t//Added for 7.6\n\t \t//Create BOM MOA Rows..\n\t\t//LFIBTUtil.setBOMMOARows(ibtRevEntityModel, \"lfIBTBOMDetails\", bomMOAStringColl,\"create\");\n\t\t// set the NRF code.\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTNRFCODE, nrfCode);\n\t\t// set style number\n\t\t// Build 6.14\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTSTYLENUMBER, styleNumber);\n\t\t// set material description\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTMATERIALDESC,\n\t\t\t\tmaterialDescription);\n\n\t\t// set In strore Month\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTINSTOREMONTH, IBTINSTOREMONTH);\n\t\t// set SAP material number\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTMATERIALNUMBER, materialNumber);\n\t\t// set the season att\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTMASTERSEASON, this.season);\n\n\t\t// set the boolean value to checked. This check is needed for the\n\t\t// plugin to pick up the revisable entity\n\t\t//ibtRevEntityModel.setValue(LFIBTConstants.IBTUPDATECHECK, Boolean.TRUE);\n\t\t// set the master object\n\t\tibtMaterialRevObj.setValue(\"lfIBTMaster\", this.masterRevEntity);\n\t\t\n\t//\tSystem.out.println(\"****************Inside 11111111 ***********************\");\n\n\t\t\n\t\t\n\t\tLCSRevisableEntity ibtMaterialRev = (LCSRevisableEntity)revisableEntityLogic.saveRevisableEntity(ibtMaterialRevObj);\n\t\t\n\t\t// masterModel.save();\n\t\t\n\t\t//createRevEntity=ibtRevEntityModel.getBusinessObject();\n\t\t//LCSLog.debug(\"slave created : -- \" + ibtMaterialRevObj);\n\t\t\n\t\tLCSLog.debug(CLASSNAME+\"createRevisableEntry(),Calling setBOMMOARows()\");\n\t\tLFIBTUtil.setBOMMOARows(ibtMaterialRev, \"lfIBTBOMDetails\", bomMOAStringColl, \"create\");\n\t\tLCSLog.debug(CLASSNAME+\"createRevisableEntry(),slave created : -- \" + ibtMaterialRev);\n return ibtMaterialRev;\n\t}",
"public void resetNew() {\n setC_Payment_ID(0);\t\t//\tforces new Record\n set_ValueNoCheck(\"DocumentNo\", null);\n setDocAction(DOCACTION_Prepare);\n setDocStatus(DOCSTATUS_Drafted);\n setProcessed(false);\n setPosted(false);\n setIsReconciled(false);\n setIsAllocated(false);\n setIsOnline(false);\n setIsDelayedCapture(false);\n //\tsetC_BPartner_ID(0);\n setC_Invoice_ID(0);\n setC_Order_ID(0);\n setC_Charge_ID(0);\n setC_Project_ID(0);\n setIsPrepayment(false);\n }"
] | [
"0.5762808",
"0.56508183",
"0.5646619",
"0.555531",
"0.5483904",
"0.5458896",
"0.5425669",
"0.53471035",
"0.5342265",
"0.5294996",
"0.52900064",
"0.5250637",
"0.5237278",
"0.52330303",
"0.52132964",
"0.521016",
"0.520216",
"0.5192217",
"0.5167866",
"0.51547366",
"0.5127959",
"0.5122876",
"0.5121826",
"0.50915205",
"0.5075866",
"0.50591874",
"0.5059109",
"0.50449127",
"0.50406694",
"0.5040505",
"0.5036524",
"0.50043815",
"0.5001163",
"0.49857834",
"0.49619746",
"0.49575287",
"0.4957505",
"0.49310192",
"0.493048",
"0.49246123",
"0.4924556",
"0.49082643",
"0.48955777",
"0.48880854",
"0.4884155",
"0.48642474",
"0.4863622",
"0.4850756",
"0.4842545",
"0.48412725",
"0.48334783",
"0.48323232",
"0.48113224",
"0.4808091",
"0.48022863",
"0.4800971",
"0.47956702",
"0.47952467",
"0.47921342",
"0.47909892",
"0.4782821",
"0.4771485",
"0.47671917",
"0.4763721",
"0.47602087",
"0.47602066",
"0.4757578",
"0.47533277",
"0.4751865",
"0.4751759",
"0.47492903",
"0.47488326",
"0.47372025",
"0.47365952",
"0.4733732",
"0.47332877",
"0.47325134",
"0.4729589",
"0.47245216",
"0.47228745",
"0.47222975",
"0.47208187",
"0.47143912",
"0.4711886",
"0.47107127",
"0.47106695",
"0.47106314",
"0.4707828",
"0.47077954",
"0.47015315",
"0.4699947",
"0.46983692",
"0.4697309",
"0.46943203",
"0.4691432",
"0.46889937",
"0.4688065",
"0.46869898",
"0.46865085",
"0.46853986"
] | 0.5132624 | 20 |
Initialize all readers in the list of listeners in the thread to be included in reader list | public void initBMessageReceipts(){
List<BUser> readers;
readers = getBThreadUsers();
// Do not init for public threads.
if(this.getThread().getType() == com.braunster.chatsdk.dao.BThread.Type.Public
|| this.getThread().getType() == com.braunster.chatsdk.dao.BThread.Type.PublicPrivate) return;
// If no readers, why should there be receipts?
if (readers.isEmpty()){ return; }
// add all users in the chat other than yourself
for (BUser reader : readers) {
if (getBUserSender().equals(reader)) continue;
createUserReadReceipt(reader, none);
}
this.update();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void initializeReader() {\n this.fileList = new ArrayList<>();\n this.fileListPosition = new AtomicInteger(0);\n this.currentTextAnnotation = new AtomicReference<>();\n }",
"@Override\r\n\tpublic void initListeners() {\n\t\t\r\n\t}",
"private void initReader(boolean logging) {\n\t\tthis.reader = new RoutingReader(this.myName, this.remoteName, this.dis,\n\t\t\t\tthis.manager, new MessageReader(this.connName, this, logging));\n\t\tnew Thread(this.reader, \"BTReaderThread\").start();\n\t}",
"public void startOnNewTread() {\n stop();\n\n mReadLogsHandler = new ReadLogsHandler();\n\n mReadLogThread = new ReadLogsThread();\n mReadLogThread.start();\n }",
"private void initListener() {\n }",
"public void init() {\r\n\t\ttry {\r\n\t\t\tmessages = new ConcurrentLinkedDeque<>();\r\n\t\t\tout = sock.getOutputStream();\r\n\t\t\tin = sock.getInputStream();\t\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tstartMessageThread();\r\n\t}",
"@Override\n\tprotected void initListeners() {\n\t\t\n\t}",
"protected void initialize() {\n \tm_cameraThread = new CameraThread();\n \tm_cameraThread.start();\n \tm_onTarget = false;\n \tm_moving = false;\n \tm_desiredYaw = Gyro.getYaw();\n \t\n \t\n \tcount = 0;\n }",
"private void startThreads() {\n Listener listener = new Listener();\n Thread listenerThread = new Thread(listener);\n\n listenerThread.start();\n }",
"public void initialize() {\n\t\tloadRaces();\n\t\tloadBets();\n\t\tgenerateRaces(NUMBER_RACES - races.size());\n\t\t\n\t\traces.stream().forEach(race -> {\n\t\t\texecutor.submit(new RaceWorker(race, this));\n\t\t});\n\t\t\n\t\tinitialized = true;\n\t}",
"private void init() {\n progress_bar = (ProgressBar)rootView.findViewById(R.id.progress_bar);\r\n eventList = (RecyclerView) rootView.findViewById(R.id.data);\r\n swipeLayout = (SwipeRefreshLayout) rootView.findViewById(R.id.swipe_container);\r\n swipeLayout.setColorSchemeResources(android.R.color.holo_blue_bright,\r\n android.R.color.holo_green_light,\r\n android.R.color.holo_orange_light,\r\n android.R.color.holo_red_light);\r\n\r\n swipeLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\r\n @Override\r\n public void onRefresh() {\r\n swipeLayout.setRefreshing(true);\r\n executorService.submit(new ThreadGetEvents());\r\n executorService.submit(new ThreadGetVersion());\r\n // new Thread(new ThreadGetVersion()).start();\r\n }\r\n });\r\n }",
"public void initListener() {\n }",
"private void init() {\n listeners = new PropertyChangeSupport(this);\n }",
"private void initReadBlockingTask(int size){ \n for (int i=0; i < size; i++){\n getReadTasks().offer(newReadBlockingTask(false));\n }\n }",
"private void startSensors() {\n for (MonitoredSensor sensor : mSensors) {\n sensor.startListening();\n }\n }",
"private void initListener() {\n initPieceListener();\n initButtonsListener();\n }",
"private void init() {\n // see if a serialized FilterAgent exists\n try {\n FilterAgent tmpFilterAgent = FilterAgent.restoreFromFile(FilterAgent.fileName);\n if (tmpFilterAgent != null) filterAgent = tmpFilterAgent;\n } catch (Exception e) {\n // no error, just catch the exception and use default/new agent\n }\n filterAgent.infoFilter = this;\n filterAgent.addCIAgentEventListener(this); // for trace msgs\n\n newsReaderAgent.addCIAgentEventListener(this);\n newsReaderAgent.initialize(); // intialize it\n newsReaderAgent.startAgentProcessing(); // start it running\n uRLReaderAgent.addCIAgentEventListener(this);\n uRLReaderAgent.initialize(); // initialize it\n uRLReaderAgent.startAgentProcessing(); // start it running\n filterAgent.initialize(); // initialize it\n filterAgent.startAgentProcessing(); // start the Filter agent thread\n openFileDialog = new java.awt.FileDialog(this);\n openFileDialog.setMode(FileDialog.LOAD);\n openFileDialog.setTitle(\"Open\");\n saveFileDialog = new java.awt.FileDialog(this);\n saveFileDialog.setMode(FileDialog.SAVE);\n saveFileDialog.setTitle(\"Save\");\n }",
"public void init() {\n\t\t// init lists\n\t\t_examinationWaiters = new LinkedList();\n\t\t_xrayWaiters = new LinkedList();\n\t\t_backFromXrayWaiters = new LinkedList();\n\t\t_gonePatients = new Vector();\n\n\t\t// init doctors\n\t\t_doctors = new Person[NUMBER_OF_DOCTORS];\n\t\tfor (int i = 0; i < _doctors.length; ++i) {\n\t\t\t_doctors[i] = new Person(\"d\" + (i + 1));\n\t\t}\n\t\t_xrayDoctor = new Person(\"x\");\n\n\t\t// init examination time computing helper arrays\n\t\t_examinationMins =\n\t\t\tnew int[] {\n\t\t\t\t0,\n\t\t\t\tFIRST_EXAMINATION_MIN,\n\t\t\t\tXRAY_EXAMINATION_MIN,\n\t\t\t\tSECOND_EXAMINATION_MIN };\n\t\t_examinationMaxs =\n\t\t\tnew int[] {\n\t\t\t\t0,\n\t\t\t\tFIRST_EXAMINATION_MAX,\n\t\t\t\tXRAY_EXAMINATION_MAX,\n\t\t\t\tSECOND_EXAMINATION_MAX };\n\n\t\t// create enterAmbulanceEvents\n\t\tVector v = new Vector();\n\t\tint i = 0;\n\t\tfor (int t = OPEN_TIME + getPoisson();\n\t\t\tt < CLOSE_TIME;\n\t\t\tt += getPoisson()) {\n\t\t\tv.add(\n\t\t\t\tnew Event(Event.NEW_PATIENT, t, new Person(\"p\" + (++i)), null));\n\t\t}\n\n\t\t// init eventQueue\n\t\t_eventQueue = new EventQueue(v);\n\n\t\t// init timer\n\t\ttime = OPEN_TIME;\n\t}",
"public void initialize() {\n\n\t\t// Initialize taskList\n\t\tthis.taskList = new LinkedList<Task>();\n\n\t\t// create a new thread for total size of pool\n\t\tfor (int i = 0; i < this.poolSize; ++i) {\n\t\t\tthreadPool.add(new WorkerThread(this));\n\t\t}\n\n\t\t// Start each thread in thread pool\n\t\tfor (WorkerThread t : threadPool) {\n\t\t\tnew Thread(t).start();\n\t\t}\n\n\t}",
"private void setListeners() {\n\n }",
"private void init() {\n sensorEnabled = false;\n contextEventHistory = new ArrayList<ContextEvent>(CONTEXT_EVENT_HISTORY_SIZE);\n }",
"@Override\r\n\tprotected void initListener() {\n\t\tsuper.initListener();\r\n\t}",
"private void init(RnsReader inputRnsReader){\n\t\tsynchronized(this.getVehicleLock()){\n\t\t\tsetRnsRoot();\n\t\t\t//connections first because they are needed for\n\t\t\t//computing next places\n\t\t\tsetConnections(inputRnsReader); \n\t\t\tsetRoads(inputRnsReader);\n\t\t\tsetPlaces(inputRnsReader);\t\t\n\t\t}\n\t}",
"public void initialize() {\n service = Executors.newCachedThreadPool();\n }",
"public void init() {\n initiateConfig();\n initiateKafkaStuffs();\n log.info(\"Kafka consumer and producer for topic [{}] started.\", topic);\n\n service.submit(() -> {\n while (true) {\n try {\n ConsumerRecords<String, byte[]> records = consumer.poll(3000);\n for (ConsumerRecord<String, byte[]> record : records) {\n log.info(\"Reveive kafka message from topic [{}] with key [{}]\", topic, record.key());\n repository.get(record.key()).offer(record.value());\n accounter.incrementAndGet();\n }\n while (accounter.get() != 0) {\n Thread.sleep(5);\n }\n consumer.commitSync();\n } catch (Exception e) {\n log.warn(\"Something wrong happened during message pulling process\", e);\n consumer.close();\n consumer = null;\n initiateConsumer();\n }\n }\n });\n }",
"public void init(){\n\t\t//this.lock = new ReentrantLock();\n\t\t//jobscheduler.setLock(this.lock);\n\t\tthis.poller.inspect();\n\t\tschedule(this.poller.refresh());\t\t\t\t\n\t}",
"public void initReceiver() {\n }",
"public void initialize() {\n this.loadDownloadList();\n }",
"@Override\r\n\tpublic void initListener() {\n\r\n\t}",
"protected void init() {\n new AsyncTask<Void, Void, Void>() {\n @Override\n protected Void doInBackground(Void... params) {\n RosFragmentActivity.this.init(nodeMainExecutorService);\n //Let everyone know that init is called\n synchronized (mNodeInitListeners) {\n for (final NodeInitListener nodeInitListener : mNodeInitListeners) {\n nodeInitListener.onNodeInit(nodeMainExecutorService, getMasterUri());\n }\n mNodeInitListeners.clear();\n }\n return null;\n }\n }.execute();\n }",
"@PostConstruct\r\n public void init() {\r\n \t//registerNotificationCallback(null); //to register taskexecution engine as default\r\n ThreadFactory namedThreadFactory = new ThreadFactoryBuilder().setNameFormat(\"MARM-thread-%d\").build();\r\n \texecutor = Executors.newFixedThreadPool(10, namedThreadFactory);\r\n\r\n ThreadFactory brokerThreadFactory = new ThreadFactoryBuilder().setNameFormat(\"Broker-thread-%d\").build();\r\n brokerExecutor = Executors.newFixedThreadPool(10, brokerThreadFactory);\r\n\r\n ThreadFactory logThreadFactory = new ThreadFactoryBuilder().setNameFormat(\"LOG-thread-%d\").setPriority(Thread.MIN_PRIORITY).build();\r\n logExecutor = Executors.newFixedThreadPool(10, logThreadFactory);\r\n broker.registerInputListener(this);\r\n broker.registerControlListener(this);\r\n }",
"private void initListener()\n {\n listenerTimer = new Timer();\n listenerTimer.schedule(new RemoteListner(this), 1000, 2000);\n }",
"private void initialize() {\n this.pm10Sensors = new ArrayList<>();\n this.tempSensors = new ArrayList<>();\n this.humidSensors = new ArrayList<>();\n }",
"public void init() {\n Thread run = new Thread(new Run());\n run.start();\n }",
"private RRCPConnectionListener() {\n mainThread = new Thread(this);\n }",
"private void startRead() {\n ExecutorService service = Executors.newFixedThreadPool(this.countReadThreads);\n while (!this.files.isEmpty() || !this.isWorkSearch()) {\n service.submit(this.threads.getReadThread());\n }\n service.shutdown();\n }",
"private void initInputListeners() {\n focusGrabber = new FocusGrabber();\r\n mouseClickScroller = new MouseClickScroller();\r\n cursorChanger = new CursorChanger();\r\n wheelScroller = new MouseWheelScroller();\r\n keyScroller = new KeyScroller();\r\n }",
"private void startClient(){\n if (started) return;\n\n// //GET RID OF THIS!!\n// sensorReadingArrayList = new ArrayList<MHLSensorReading>();\n\n started = true;\n clientThread = new Thread(new MHLClientThread(ip, port, userID));\n clientThread.start();\n }",
"public SensorReader() {\n\t\tinit();\n\t}",
"private void setupImageReader() {\n mImageReader = ImageReader.newInstance(mPreviewSize.getWidth(), mPreviewSize.getHeight(),\n ImageFormat.JPEG, 2);\n mImageReader.setOnImageAvailableListener(new ImageReader.OnImageAvailableListener() {\n @Override\n public void onImageAvailable(ImageReader reader) {\n mCameraHandler.post(new imageSaver(reader.acquireNextImage()));\n }\n }, mCameraHandler);\n }",
"@Override\n\t\tpublic void setReadListener(ReadListener arg0) {\n\t\t\t\n\t\t}",
"public void init() {\n\t\tfor (Node node : nodes)\n\t\t\tnode.init();\n\t}",
"public void initMultiPlayer() {\r\n\t\tnew ConnectThread().start();\r\n\t}",
"public synchronized void beginRead() {\n\t\tSystem.out.println(\"READER BEGIN: \" + Thread.currentThread().getId());\t\n\t\tint readTurn = currentTurn;\n\t\tcurrentTurn++;\n\t\t\n\t\twhile(readTurn!=nextTurn || numWriters > 0 ){\n\t\t\ttry {\n//\t\t\t\tSystem.out.println(\"READER BLOCKED: \" + Thread.currentThread().getId());\t\n\t\t\t\twait();\n//\t\t\t\tSystem.out.println(\"READER UNBLOCKED: \" + Thread.currentThread().getId());\t\n\n\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t//number of readers at front of the queue\n\t\t//(unblocked reader)\n\t\tnumReaders ++;\n\n\t}",
"private void ccListenerStarter(){\n\t\t\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\t//spin off new ccListener\n\t\t\t\t\n\t\t\t\tThread listenerThread = new Thread(\n\t\t\t\t\t\tnew ClientCommunicatorListener(\n\t\t\t\t\t\t\t\tccSocket.getInputStream(), db, this));\n\t\t\t\t\n\t\t\t\tlistenerThread.start();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}",
"@Override\r\n public void initialize() {\n Properties props = new Properties();\r\n props.put(\"bootstrap.servers\", bootstrapServers);\r\n props.put(\"group.id\", groupId);\r\n props.put(\"enable.auto.commit\", \"false\");\r\n props.put(\"key.deserializer\", keyDeserializer);\r\n props.put(\"value.deserializer\", valueDeserializer);\r\n consumer = new KafkaConsumer<>(props);\r\n consumer.subscribe(topics);\r\n while (isCrawling) {\r\n ConsumerRecords<String, String> records = consumer.poll(pollInterval);\r\n for (ConsumerRecord<String, String> record : records) {\r\n Document d = new Document(record.key());\r\n d.setField(\"data\", record.value());\r\n d.setField(\"topic\", record.topic());\r\n d.setField(\"offset\",record.offset());\r\n d.setField(\"partition\",record.partition());\r\n d.setField(\"timestamp\",record.timestamp());\r\n feed(d);\r\n }\r\n }\r\n }",
"void init() {\n try {\n // Start the send and receive threads and exit\n //scheduler.scheduleThread(new Thread(new UDPTransportThread(this, UDPTransportThread.RUN_SEND_THREAD)));\n //scheduler.scheduleThread(new Thread(new UDPTransportThread(this, UDPTransportThread.RUN_RCV_THREAD)));\n //scheduler.scheduleThread(new Thread(new UDPTransportThread(this, UDPTransportThread.RUN_GC_THREAD)));\n } catch (IllegalThreadStateException e) {\n Debug.exit(\"Fatal Error: \" + e.toString());\n }\n }",
"private void init() {\n articleList = new ArrayList<>();\n newsAdapter = new NewsAdapter(getContext(), articleList, mListener, this);\n\n recyclerViewNews.setHasFixedSize(false);\n RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getContext());\n\n recyclerViewNews.setLayoutManager(layoutManager);\n recyclerViewNews.setAdapter(newsAdapter);\n }",
"@Override\n protected void initializeEventList()\n {\n }",
"private void init() {\n filmCollection = new FilmCollection();\n cameraCollection = new CameraCollection();\n }",
"protected void started() {\n for(MinMaxListener listener : listeners) {\n listener.started();\n }\n }",
"public void initReloj(){\r\n Thread r1 = new Thread(this,\"Reloj\");\r\n r1.start();\r\n }",
"@Before\n public void init() {\n this.queue.push(\"work1\");\n this.queue.push(\"work2\");\n this.queue.push(\"work3\");\n this.queue.push(\"work4\");\n this.it = queue.iterator();\n }",
"@Override\n\tprotected void initListener() {\n\n\t}",
"public void threadManager() {\n /**Retrieve all data stored in \"preference\"*/\n if (mNodeThingUtils.getAllSavedThing() != null) {\n\n Map<String, String> getAllSensor = mNodeThingUtils.getAllSavedThing();\n Set<String> keys = getAllSensor.keySet();\n\n /**It checks to see if he has already been registered*/\n if (!threadControl.containsKey(String.valueOf(keys))) {\n for (Iterator i = keys.iterator(); i.hasNext(); ) {\n String key = (String) i.next();\n /**This control is used to separate the thread type from the sensor type*/\n if (!key.matches(Constant.Regexp.THREAD_CONTROL) && key.length() != 2) {\n\n /**Creates a new thread and registers it as \"nodename: thingname\"\n * of type \"map\" so that it is easy to check later*/\n threadControl.put(key, new ThreadUtils(mContext));\n }\n }\n } else {\n LogUtils.logger(TAG, \"There is a thread named as \" + keys);\n }\n }\n }",
"public static void init() {\r\n load();\r\n registerEventListener();\r\n }",
"private void initSensor(){\n sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n\n registerListeners();\n }",
"private void init() {\n sensorEnabled = false;\n activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);\n contextEventHistory = new ArrayList<ContextEvent>(CONTEXT_EVENT_HISTORY_SIZE);\n }",
"public void initialize() {\n this.loadNewsList();\n }",
"public void init() {\n // TODO start asynchronous download of heavy resources\n }",
"private IOHandler(){\n download_queue = new ArrayList<>(); \n initialize();\n }",
"private void initialLockers() {\n for (int i = 0; i < board.length; i++) {\n for (int j = 0; j < board[0].length; j++) {\n board[i][j] = new ReentrantLock();\n }\n }\n }",
"private void initializeEvents() {\r\n\t}",
"protected void attachListeners() {\n\t\t\n\t}",
"void initialise() {\n this.sleep = false;\n this.owner = this;\n renewNeighbourClusters();\n recalLocalModularity();\n }",
"public void initializeIOBuffers(){\n for(int i=0; i<outputBuffer.length; i++){\n outputBuffer[i] = new LinkedBlockingQueue();\n inputBuffer[i] = new LinkedBlockingQueue();\n }\n }",
"public void init(){\n\n carQueue = new CarQueue();\n gasStation = new GasStation(30,8, carQueue);\n\n gasStation.initialize();\n\n cars = new AddCarThread(carQueue);\n addCars = new Thread(cars);\n }",
"public Thread[] getReaders(String monitoredNickname, ClientGUI clientGUI, Client client) {\n\t\tRunnable rMessages = new ThreadPrivateConnection(scMessages, monitoredNickname, clientGUI,\n\t\t\t\tclient, true);\n\t\tRunnable rFiles = new ThreadPrivateConnection(scFiles, monitoredNickname, clientGUI, client,\n\t\t\t\tfalse);\n\t\tThread[] readers = { new Thread(rMessages), new Thread(rFiles) };\n\t\treturn readers;\n\t}",
"public void initialize() {\n\n list.add(user1);\n list.add(user2);\n list.add(user3);\n }",
"private void initializeLists() {\n this.sensorsPm10 = new ArrayList<>();\n this.sensorsTempHumid = new ArrayList<>();\n }",
"public void lastReaderAdded(){\r\n\t\tdoneAddingReaders = true;\r\n\t}",
"public void initListeners() {\n\t\tlogoGrabListener = new LogoGrabListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onResponse(JSONObject response) {\n\t\t\t\tLog.i(TAG, \"LogoGrab Application responded with: \" + response.toString());\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onError(String error) {\n\t\t\t\tLog.e(TAG, error);\n\t\t\t}\n\t\t};\n\t\t\n\t\t// set LogoGrabListener\n\t\tLogoGrabInterface.setLogoGrabListener(logoGrabListener);\n\t\t\n\t\t\n\t\t// init OnClickListener\n\t\tonClickListener = new OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tLogoGrabInterface.startLogoGrab(MainActivity.this);\n\t\t\t}\n\t\t};\n\t\t\n\t\t// set OnClickListener\n\t\tlogoGrabButton.setOnClickListener(onClickListener);\n\t}",
"public SubscriptionManager() {\n subscribers = new ArrayList<>();\n pendingUpdates = new ArrayBlockingQueue<>(1024);\n executionThread = null;\n\n System.out.println(\"SUBSCRIPTION MANAGER INITIALIZED!\");\n }",
"@Override\n public void initialize() {\n time = 0;\n //noinspection ConstantConditions\n this.runningTasks.addAll(getInitialNode().getTasks());\n for (Node node : nodes) {\n node.initialize();\n }\n }",
"private void notifyListeners() {\n for (SerialConnectionReadyListener listener : listeners) {\n listener.SerialConnectionReady(this);\n }\n }",
"public void init() {\n\t\t\n\t\t\n\t\tprepareGaborFilterBankConcurrent();\n\t\t\n\t\tprepareGaborFilterBankConcurrentEnergy();\n\t}",
"private void setListener2(BluetoothReader reader) {\n mBluetoothReader2\n .setOnAuthenticationCompleteListener(new OnAuthenticationCompleteListener() {\n\n @Override\n public void onAuthenticationComplete(\n BluetoothReader bluetoothReader, final int errorCode) {\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (errorCode == BluetoothReader.ERROR_SUCCESS) {\n mTxtAuthentication\n .setText(\"Authentication Success!\");\n mEditApdu.setText(\"FF CA 00 00 00\");\n mAuthentication.setEnabled(false);\n } else {\n mTxtAuthentication\n .setText(\"Authentication Failed!\");\n }\n }\n });\n }\n\n });\n\n /* Wait for receiving ATR string. */\n mBluetoothReader2\n .setOnAtrAvailableListener(new OnAtrAvailableListener() {\n\n @Override\n public void onAtrAvailable(BluetoothReader bluetoothReader,\n final byte[] atr, final int errorCode) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (atr == null) {\n mTxtATR.setText(getErrorString(errorCode));\n } else {\n mTxtATR.setText(Utils.toHexString(atr));\n }\n }\n });\n }\n\n });\n\n /* Wait for power off response. */\n mBluetoothReader2\n .setOnCardPowerOffCompleteListener(new OnCardPowerOffCompleteListener() {\n\n @Override\n public void onCardPowerOffComplete(\n BluetoothReader bluetoothReader, final int result) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mTxtATR.setText(getErrorString(result));\n }\n });\n }\n\n });\n\n /* Wait for response APDU. */\n mBluetoothReader2\n .setOnResponseApduAvailableListener(new OnResponseApduAvailableListener() {\n\n @Override\n public void onResponseApduAvailable(\n BluetoothReader bluetoothReader, final byte[] apdu,\n final int errorCode) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mTxtResponseApdu.setText(getResponseString(\n apdu, errorCode));\n // InnerTes(\"tes\");\n }\n });\n }\n\n });\n mBluetoothReader2\n .setOnResponseApduAvailableListener(new OnResponseApduAvailableListener() {\n\n @Override\n public void onResponseApduAvailable(\n BluetoothReader bluetoothReader, final byte[] apdu,\n final int errorCode) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mTxtScan.setText(getResponseString(\n apdu, errorCode));\n String uid = mTxtScan.getText().toString();\n uid_final= uid;\n final String uid2=mTxtScan.getText().toString();\n /*** Kirim Variabel String uid ke ChildviewHolder **/\n /** code start here **/\n Tes tes = new Tes() {\n\n\n @Override\n public String onClickTes(String uid) {\n return null;\n }\n\n @Override\n public String getUid() {\n return mTxtScan.getText().toString();\n\n }\n };\n tes.onClickTes(uid);\n uid_final = tes.getUid();\n Log.d(\"uidFinal_listener\",\" \"+uid_final);\n requestUid(tes);\n\n\n //uid_final=\"tes\";\n // InnerTes(\"tes\");\n// rvTxtScan.setText(getResponseString(\n// apdu, errorCode));\n getInfoCard(uid);\n }\n\n\n });\n\n\n\n }\n\n });\n\n\n /* Wait for escape command response. */\n mBluetoothReader2\n .setOnEscapeResponseAvailableListener(new OnEscapeResponseAvailableListener() {\n\n @Override\n public void onEscapeResponseAvailable(\n BluetoothReader bluetoothReader,\n final byte[] response, final int errorCode) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mTxtEscapeResponse.setText(getResponseString(\n response, errorCode));\n }\n });\n }\n\n });\n\n /* Wait for device info available. */\n mBluetoothReader2\n .setOnDeviceInfoAvailableListener(new OnDeviceInfoAvailableListener() {\n\n @Override\n public void onDeviceInfoAvailable(\n BluetoothReader bluetoothReader, final int infoId,\n final Object o, final int status) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (status != BluetoothGatt.GATT_SUCCESS) {\n Toast.makeText(ReaderActivity.this,\n \"Failed to read device info!\",\n Toast.LENGTH_SHORT).show();\n return;\n }\n switch (infoId) {\n case BluetoothReader.DEVICE_INFO_SYSTEM_ID: {\n // mTxtSystemId.setText(Utils.toHexString((byte[]) o));\n }\n break;\n case BluetoothReader.DEVICE_INFO_MODEL_NUMBER_STRING:\n // mTxtModelNo.setText((String) o);\n break;\n case BluetoothReader.DEVICE_INFO_SERIAL_NUMBER_STRING:\n // mTxtSerialNo.setText((String) o);\n break;\n case BluetoothReader.DEVICE_INFO_FIRMWARE_REVISION_STRING:\n // mTxtFirmwareRev.setText((String) o);\n break;\n case BluetoothReader.DEVICE_INFO_HARDWARE_REVISION_STRING:\n // mTxtHardwareRev.setText((String) o);\n break;\n case BluetoothReader.DEVICE_INFO_MANUFACTURER_NAME_STRING:\n //mTxtManufacturerName.setText((String) o);\n break;\n default:\n break;\n }\n }\n });\n }\n\n });\n\n /* Wait for battery level available. */\n if (mBluetoothReader2 instanceof Acr1255uj1Reader) {\n ((Acr1255uj1Reader) mBluetoothReader2)\n .setOnBatteryLevelAvailableListener(new OnBatteryLevelAvailableListener() {\n\n @Override\n public void onBatteryLevelAvailable(\n BluetoothReader bluetoothReader,\n final int batteryLevel, int status) {\n Log.i(TAG, \"mBatteryLevelListener data: \" + batteryLevel);\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n // mTxtBatteryLevel2.setText(getBatteryLevelString(batteryLevel));\n }\n });\n\n }\n\n });\n }\n\n /* Handle on battery status available. */\n if (mBluetoothReader2 instanceof Acr3901us1Reader) {\n ((Acr3901us1Reader) mBluetoothReader2)\n .setOnBatteryStatusAvailableListener(new OnBatteryStatusAvailableListener() {\n\n @Override\n public void onBatteryStatusAvailable(\n BluetoothReader bluetoothReader,\n final int batteryStatus, int status) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n // mTxtBatteryStatus2.setText(getBatteryStatusString(batteryStatus));\n }\n });\n }\n\n });\n }\n\n /* Handle on slot status available. */\n mBluetoothReader2\n .setOnCardStatusAvailableListener(new OnCardStatusAvailableListener() {\n\n @Override\n public void onCardStatusAvailable(\n BluetoothReader bluetoothReader,\n final int cardStatus, final int errorCode) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (errorCode != BluetoothReader.ERROR_SUCCESS) {\n mTxtSlotStatus\n .setText(getErrorString(errorCode));\n } else {\n mTxtSlotStatus\n .setText(getCardStatusString(cardStatus));\n }\n }\n });\n }\n\n });\n\n mBluetoothReader2\n .setOnEnableNotificationCompleteListener(new OnEnableNotificationCompleteListener() {\n\n @Override\n public void onEnableNotificationComplete(\n BluetoothReader bluetoothReader, final int result) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (result != BluetoothGatt.GATT_SUCCESS) {\n /* Fail */\n Toast.makeText(\n ReaderActivity.this,\n \"The device is unable to set notification!\",\n Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(ReaderActivity.this,\n \"The device is ready to use!\",\n Toast.LENGTH_SHORT).show();\n }\n }\n });\n }\n\n });\n }",
"protected void initialize() {\n\t\tright = left = throttle = turn = forward = 0;\n\t}",
"public static void initialize()\n {\n // Initiate election\n Runnable sender = new BullyAlgorithm(\"Sender\",\"election\");\n new Thread(sender).start();\n }",
"private void initThread() {\r\n\t\tthreadPreviewDataToImageData = new ThreadPreviewDataToImageData();\r\n\t\t// threadPreviewDataToFakePictureImageData = new\r\n\t\t// ThreadPreviewDataToFakePictureImageData();\r\n\t\t// threadPreviewYUVDecode = new ThreadPreviewYUVDecode();\r\n\r\n\t\tthreadPreviewDataToImageData.start();\r\n\t\t/*\r\n\t\t * if (CameraConfigure.isUseFakeImageData) { //\r\n\t\t * threadPreviewDataToFakePictureImageData.start(); } else {\r\n\t\t * //threadPreviewYUVDecode.start(); }\r\n\t\t */\r\n\r\n\t\t/** preview callback to ThreadPreviewDataToImageData */\r\n\t\tif (null == BlockingQueuePreviewData.getBlockingQueuePreviewData()) {\r\n\t\t\tnew BlockingQueuePreviewData();\r\n\t\t}\r\n\t\t/** ThreadPreviewDataToImageData to ThreadQRcodeDecode */\r\n\t\tif (null == BlockingQueueGrayByteData.getBlockingQueueGrayByteData()) {\r\n\t\t\tnew BlockingQueueGrayByteData();\r\n\t\t}\r\n\t\t/** ThreadPreviewDataToImageData to ThreadBarcodeDecode */\r\n\t\tif (null == BlockingQueueGrayByteDataArray\r\n\t\t\t\t.getBlockingQueueGrayByteDataArray()) {\r\n\t\t\tnew BlockingQueueGrayByteDataArray();\r\n\t\t}\r\n\t\t/** ThreadPreviewDataToImageData to ThreadBCardScanning */\r\n\t\tif (null == BlockingQueueGrayByteDataPreviewData\r\n\t\t\t\t.getBlockingQueueGrayByteDataPreviewData()) {\r\n\t\t\tnew BlockingQueueGrayByteDataPreviewData();\r\n\t\t}\r\n\t\t/*\r\n\t\t * if (null == BlockingQueueByteArray.getBlockingQueueByteArray()) { new\r\n\t\t * BlockingQueueByteArray(); }\r\n\t\t */\r\n\r\n\t\t/*\r\n\t\t * if (null == BlockingQueueFakePictureImageData\r\n\t\t * .getBlockingQueueFakePictureImageData()) { new\r\n\t\t * BlockingQueueFakePictureImageData(); }\r\n\t\t */\r\n\t}",
"private void init() {\n\r\n\t\tmyTerminal.inputSource.addUserInputEventListener(this);\r\n//\t\ttextSource.addUserInputEventListener(this);\r\n\r\n\t}",
"public void init() {\n cupDataChangeListener = new CupDataChangeListener(dataBroker);\n }",
"public void initialize() {\n\t\t//start the processor thread\n\t\t//logger.debug(processorName+\" starting processor thread\");\n\t\tprocessorThread.start();\n\t\t\n\t\t//logger.debug(processorName+\" initialized\");\n\t}",
"public void ListenThread() \n {\n Thread t = new Thread(new IncomingReader(writer, reader));\n t.start();\n \n }",
"protected void onStart() {\n // Allocate while starting to improve chances of thread-local\n // isolation\n queue = new Runnable[INITIAL_QUEUE_CAPACITY];\n // Initial value of seed need not be especially random but\n // should differ across threads and must be nonzero\n int p = poolIndex + 1;\n seed = p + (p << 8) + (p << 16) + (p << 24); // spread bits\n }",
"@Override\r\n \tpublic void initialize() {\n \t\tThreadRenamingRunnable.setThreadNameDeterminer(ThreadNameDeterminer.CURRENT);\r\n \r\n \t\tInetSocketAddress address;\r\n \r\n \t\tif (m_host == null) {\r\n \t\t\taddress = new InetSocketAddress(m_port);\r\n \t\t} else {\r\n \t\t\taddress = new InetSocketAddress(m_host, m_port);\r\n \t\t}\r\n \r\n \t\tm_queue = new LinkedBlockingQueue<ChannelBuffer>(m_queueSize);\r\n \r\n \t\tExecutorService bossExecutor = Threads.forPool().getCachedThreadPool(\"Cat-TcpSocketReceiver-Boss-\" + address);\r\n \t\tExecutorService workerExecutor = Threads.forPool().getCachedThreadPool(\"Cat-TcpSocketReceiver-Worker\");\r\n \t\tChannelFactory factory = new NioServerSocketChannelFactory(bossExecutor, workerExecutor);\r\n \t\tServerBootstrap bootstrap = new ServerBootstrap(factory);\r\n \r\n \t\tbootstrap.setPipelineFactory(new ChannelPipelineFactory() {\r\n \t\t\tpublic ChannelPipeline getPipeline() {\r\n \t\t\t\treturn Channels.pipeline(new MyDecoder(), new MyHandler());\r\n \t\t\t}\r\n \t\t});\r\n \r\n \t\tbootstrap.setOption(\"child.tcpNoDelay\", true);\r\n \t\tbootstrap.setOption(\"child.keepAlive\", true);\r\n \t\tbootstrap.bind(address);\r\n \r\n \t\tm_logger.info(\"CAT server started at \" + address);\r\n \t\tm_factory = factory;\r\n \t}",
"public void requestAllSensors() {\n mSensorManager.registerListener(this, mRotationSensor, SENSOR_DELAY_MICROS);\n }",
"LateListenerNotifier()\r\n/* :17: */ {\r\n/* :18:858 */ this.l = l;\r\n/* :19: */ }",
"public static void initCommunicationClientThread(){\r\n new CommunicationClientThread();\r\n }",
"@Override\r\n\tprotected void setListeners() {\n\t\t\r\n\t}",
"protected void installListeners() {\n }",
"protected void installListeners() {\n }",
"void startConnectionReader()\n {\n if (! synchronousMode)\n {\n connectionReader.start();\n }\n }",
"private void initEventList(){\r\n\t\t/*\r\n\t\t * we save a valid event list in internal storage so we can load them in\r\n\t\t * our main activity. So we make sure there is either a valid one alreay in storage\r\n\t\t * or we get a fresh one from our server and save it in storage.\r\n\t\t */\r\n\t\t\r\n\t\t// first try to get an existing eventlist from storage\r\n\t\tJSONObject eventList = FileUtils.readEventListFromStorage(this);\r\n\t\t\r\n\t\tif(eventList != null) {\r\n\t\t\tif(eventListIsValid(eventList)){\r\n\t\t\t\tstartMuseek();\r\n\t\t\t} else {\r\n\t\t\t\tServerConnector.getEventListFromServer(mServerListener, mLocation);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tServerConnector.getEventListFromServer(mServerListener, mLocation);\r\n\t\t}\r\n\t\t\r\n\t}",
"protected void installListeners() {\n\t}",
"private void init() {\n AdvertisingRequest();// 广告列表请求线程\n setapiNoticeControllerList();\n }",
"public void init() {\n ContainerProperties containerProperties = buildContainerProperties();\n this.messageListenerContainer = buildMessageListenerContainer( consumerFactory, containerProperties );\n }",
"private void initList() {\n long now = System.nanoTime();\n loadConfig();\n SlogEx.d(TAG, \"load config use:\" + (System.nanoTime() - now));\n }",
"public void run()\n {\n parentProvider.getConnection()\n .removeAsyncStanzaListener(this);\n\n // init ssList\n ssContactList.init(contactChangesListener);\n\n // as we have dispatched the contact list and Roster is ready\n // lets start the jingle nodes discovery\n parentProvider.startJingleNodesDiscovery();\n }",
"public void initialize()\n throws Exception\n {\n final DNAThreadPoolMonitor monitor = new DNAThreadPoolMonitor();\n ContainerUtil.enableLogging( monitor, m_logger );\n setMonitor( monitor );\n setup();\n }",
"private void init() {\n mEventBus = new AsyncEventBus(new HandlerExecutor());\n mEventBus.register(this);\n }"
] | [
"0.653488",
"0.61845",
"0.61261857",
"0.61045605",
"0.6030467",
"0.5987457",
"0.59717166",
"0.597123",
"0.59678066",
"0.5959909",
"0.58412206",
"0.58114517",
"0.58015037",
"0.5765232",
"0.57315946",
"0.5702542",
"0.56969166",
"0.5695044",
"0.565556",
"0.56473464",
"0.56446797",
"0.5627039",
"0.5598581",
"0.55872554",
"0.5583748",
"0.558218",
"0.55793583",
"0.55786586",
"0.55759346",
"0.55745935",
"0.55715895",
"0.55536807",
"0.5551923",
"0.554528",
"0.55065864",
"0.549913",
"0.54979956",
"0.5479039",
"0.54732424",
"0.5473219",
"0.5466121",
"0.54591507",
"0.5455773",
"0.5452466",
"0.54390746",
"0.5436034",
"0.54273045",
"0.5415979",
"0.54130816",
"0.5405015",
"0.5394121",
"0.53889257",
"0.5384708",
"0.537933",
"0.5378747",
"0.53761303",
"0.5373575",
"0.53723615",
"0.5371889",
"0.53663665",
"0.53575283",
"0.53575164",
"0.53468835",
"0.53425026",
"0.5330628",
"0.53268766",
"0.53107536",
"0.53063685",
"0.5302051",
"0.5297534",
"0.528574",
"0.5261068",
"0.5260914",
"0.5259596",
"0.52536845",
"0.5252751",
"0.5250638",
"0.5250101",
"0.5249107",
"0.5246613",
"0.52464443",
"0.5246178",
"0.5243904",
"0.52420473",
"0.52405953",
"0.52330655",
"0.5221299",
"0.5219229",
"0.52102727",
"0.52079535",
"0.52079445",
"0.52079445",
"0.5204918",
"0.5199122",
"0.5195996",
"0.51943",
"0.51904404",
"0.5177412",
"0.517704",
"0.51744",
"0.5161131"
] | 0.0 | -1 |
Returns the ReadStatus that is representative lowest common read Status of all users in Map | public int getCommonReadStatus(){
List<BMessageReceipt> readReceipts;
resetBMessageReceiptList();
readReceipts = getBMessageReceiptList();
Boolean delivered = false;
Boolean read = false;
for ( BMessageReceipt readReceipt : readReceipts) {
switch (readReceipt.getReadStatus()) {
case none:
return none;
case BMessageReceiptEntity.ReadStatus.delivered:
delivered = true;
break;
case BMessageReceiptEntity.ReadStatus.read:
read = true;
break;
}
}
// if(!read){
// BNetworkManager.sharedManager().getNetworkAdapter().readReceiptsOnFromUI(this);
// }
if(delivered){
return BMessageReceiptEntity.ReadStatus.delivered;
} else if (read) {
return BMessageReceiptEntity.ReadStatus.read;
} else {
logMessage = "Message has no readers";
if(DEBUG) Log.d(TAG , logMessage);
return none;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public IsolationLevel lowestCommon(IsolationLevel level) {\r\n return (ordinal() >= level.ordinal()) ? level : this;\r\n }",
"public ReadPreference getPreferredRead() {\n if (preferredRead != null && !preferredRead.isEmpty()) {\n return MONGO_READ_PREF.get(preferredRead);\n }\n return ReadPreference.primaryPreferred();\n }",
"private String servernameWithLowestLoad(ArrayList<Message> messages){\n int lowest = Integer.parseInt(messages.get(0).values.get(\"load\"));\n String servername = messages.get(0).values.get(\"servername\");\n for(int i = 1; i < messages.size(); i++){\n int load = Integer.parseInt(messages.get(i).values.get(\"load\"));\n if(load < lowest){\n lowest = load;\n servername = messages.get(i).values.get(\"servername\");\n }\n }\n return servername;\n }",
"public int getReadStatus() {\n return (readStatus.getUnsignedInt());\n }",
"org.hl7.fhir.Integer getReadCoverage();",
"public TreeMap<String, User> getClientUsersMap() {\n TreeMap<String, User> clients = new TreeMap<>();\n usersConnected.values().stream().forEach((user) -> {\n clients.put(user.getName(), user.toClientUser());\n });\n return clients;\n }",
"@Override\n\tpublic long getStatusByUserId();",
"long countAllByUserIdAndRead(String userId, boolean read);",
"@Override\n\tpublic long getStatusByUserId() {\n\t\treturn model.getStatusByUserId();\n\t}",
"private Point lowestFInOpen() {\n\t\tPoint lowestP = null;\n\t\tfor (Point p : openset) {\n\t\t\tif (lowestP == null) \n\t\t\t\tlowestP = p;\n\t\t\telse if (fscores.get(p) < fscores.get(lowestP))\n\t\t\t\tlowestP = p;\n\t\t}\n\t\treturn lowestP;\n\t}",
"private static @Nullable Integer commonMin(List<ArgumentCount> counts) {\n // min=5, min=3, min=0 -> min=0\n // min=5, min=3, min=0, min=null -> min=null\n int commonMin = Integer.MAX_VALUE;\n for (ArgumentCount count : counts) {\n final Optional<Integer> min = count.getMinCount();\n if (!min.isPresent()) {\n return null;\n }\n commonMin = Math.min(commonMin, min.get());\n }\n if (commonMin == Integer.MAX_VALUE) {\n return null;\n }\n return commonMin;\n }",
"private int getPriorityForPresenceStatus(String statusName)\n {\n Integer priority = statusToPriorityMappings.get(\n statusName.replaceAll(\" \", \"_\").toUpperCase());\n if(priority == null)\n return resourcePriorityAvailable;\n\n return priority;\n }",
"public void preComputeBestReplicaMapping() {\n Map<String, Map<String, Map<String, String>>> collectionToShardToCoreMapping = getZkClusterData().getCollectionToShardToCoreMapping();\n\n for (String collection : collectionNames) {\n Map<String, Map<String, String>> shardToCoreMapping = collectionToShardToCoreMapping.get(collection);\n\n for (String shard : shardToCoreMapping.keySet()) {\n Map<String, String> coreToNodeMap = shardToCoreMapping.get(shard);\n\n for (String core : coreToNodeMap.keySet()) {\n String currentCore = core;\n String node = coreToNodeMap.get(core);\n SolrCore currentReplica = new SolrCore(node, currentCore);\n try {\n currentReplica.loadStatus();\n //Ok this replica is the best. Let us just use that for all the cores\n fillUpAllCoresForShard(currentReplica, coreToNodeMap);\n break;\n } catch (Exception e) {\n logger.info(ExceptionUtils.getFullStackTrace(e));\n continue;\n }\n }\n shardToBestReplicaMapping.put(shard, coreToBestReplicaMappingByHealth);\n }\n\n }\n }",
"public Map<String, Integer> getDataBestContacts() {\n\t\tHashMap<String, Integer> result = new HashMap<String, Integer>();\n\t\tcurrentUser.getContacts().stream().forEach(contact -> {\n\t\t\tif (result.size() < 4)\n\t\t\t\tresult.put(contact.getName(), contact.getMessages().size());\n\t\t\telse {\n\t\t\t\tOptional<Entry<String, Integer>> lowestOp = result.entrySet().stream()\n\t\t\t\t\t\t.min((e1, e2) -> Integer.compare(e1.getValue(), e2.getValue()));\n\t\t\t\tif (lowestOp != null) {\n\t\t\t\t\tEntry<String, Integer> lowest = lowestOp.get();\n\t\t\t\t\tif (lowest.getValue() < contact.getMessages().size()) {\n\t\t\t\t\t\tresult.remove(lowest.getKey());\n\t\t\t\t\t\tresult.put(contact.getName(), contact.getMessages().size());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn result;\n\t}",
"public Map<TopicAndPartition, Long> getEarliestOffsets() {\n\n Map<TopicAndPartition, Long> returnOffsetsMap = new HashMap<>();\n\n for (String topic : topicList) {\n returnOffsetsMap.putAll(getEarliestOffsets(topic));\n }\n\n return returnOffsetsMap;\n }",
"public int lowestHighscore()\n {\n FileReader filereader;\n PrintWriter writer;\n int lowHighScore = 0;\n try{\n \n filereader = new FileReader(getLevel());\n BufferedReader bufferedreader = new BufferedReader(filereader);\n \n \n String finalLine =\"\";\n for(int i = 0;i<5;i++)\n {\n finalLine = bufferedreader.readLine();\n }\n lowHighScore = Integer.parseInt(finalLine.split(\":\")[1]);\n \n }\n catch(IOException e){}\n return lowHighScore;\n }",
"java.util.Map<java.lang.String, ch.epfl.dedis.proto.StatusProto.Response.Status>\n getSystemMap();",
"private int setDocMaps() throws IOException {\n final int numReaders = mergeState.readers.size();\n\n // Remap docIDs\n mergeState.docMaps = new MergeState.DocMap[numReaders];\n mergeState.docBase = new int[numReaders];\n\n int docBase = 0;\n\n int i = 0;\n while (i < mergeState.readers.size()) {\n\n final AtomicReader reader = mergeState.readers.get(i);\n\n mergeState.docBase[i] = docBase;\n final MergeState.DocMap docMap = MergeState.DocMap.build(reader);\n mergeState.docMaps[i] = docMap;\n docBase += docMap.numDocs();\n\n i++;\n }\n\n return docBase;\n }",
"public Integer mostCommon() {\n Integer common = list.get(0);\n int commonCount = countOccurrence(common);\n\n for(Integer currentNumber : list) {\n int currentCount = countOccurrence(currentNumber);\n if (currentCount > commonCount) {\n common = currentNumber;\n commonCount = currentCount;\n }\n }\n\n\n return common;\n }",
"private String findMin(Map<String, Node> nodeList)\n\t{\n\t\tint min = Integer.MAX_VALUE;\n\t\tString sommet = null;\n\t\t\n\t\tfor (String nodeName : nodeList.keySet()) {\n\t\t\tint distance = nodeList.get(nodeName).getDistanceFromOrigin();\n\n\t\t\tif(min > distance) {\n\t\t\t\tmin = distance;\n\t\t\t\tsommet = nodeName;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn sommet;\n\t}",
"private Node lowestCostThrough(List<Node> openSet, Map<Node, Double> costThrough){\n Node lowest = openSet.get(0);\n\n for(Node n: openSet){\n if(costThrough.get(n) < costThrough.get(lowest)){\n lowest = n;\n }\n }\n return lowest;\n }",
"public int minXValue (Map <String,ArrayList<Point>> map){\r\n \tint min = 0 , i = 0;\r\n \t\tfor (String key : map.keySet()) {\r\n \t\t\tif ( min < map.get(key).get(i).getX())\r\n \t\t\t\tmin = (int) map.get(key).get(i).getX();\r\n \t\t\ti++;\r\n \t\t}\r\n \treturn min;\t\r\n }",
"private List<String> getTop(Map<String, AtomicLong> map, int count){\n\t\tMap<String, Long> convertedMap = map.entrySet().stream().collect(\r\n\t\t\t\tCollectors.toMap(\tMap.Entry::getKey, \r\n\t\t\t\t\t\t\t\t\te -> Long.valueOf(e.getValue().get())));\r\n\t\t\r\n\t\treturn Util.getTopByValue(convertedMap, count);\r\n\t}",
"@Override\n\tpublic Rank getMin(Set<StrategyState<State,Memory>> strategyStates) {\n\t\tValidate.notEmpty(strategyStates);\n\t\tRankFunction<State> rankFunction = this.getRankFunction(strategyStates.iterator().next().getMemory());\n\t\treturn rankFunction.getMinimum(GRUtils.getStatesFrom(strategyStates));\n\t}",
"private GeobatchRunInfo searchUnique(String runUid) {\n GeobatchRunInfo result = null;\n SearchFilter filter = new AndFilter(new FieldFilter(BaseField.NAME, runUid,\n SearchOperator.EQUAL_TO), new CategoryFilter(CATEGORY_NAME,\n SearchOperator.EQUAL_TO));\n ResourceList list = geostoreClient.searchResources(filter, 0,\n Integer.MAX_VALUE, true, false);\n if (list.getList() != null && !list.getList().isEmpty()) {\n result = getRunStatus(list.getList().get(0));\n }\n return result;\n }",
"public List<AccessRequestStatusItem> getAccessRequestStatusExternal() {\n List sortedList = new ArrayList(getAccessRequestStatus());\n Collections.sort(sortedList);\n return Collections.unmodifiableList(sortedList);\n }",
"private int getGlobalRanking() {\n\t\tint globalRanking = 0;\n\t\ttry{\n\t\t\t//Retrieve list of all players and order them by global score\n\t\t\tArrayList<Player> allPlayers = dc.getAllPlayerObjects();\n\t\t\tCollections.sort(allPlayers, new Comparator<Player>(){\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic int compare(Player p1, Player p2) {\n\t\t\t\t\treturn p2.getGlobalScore() - p1.getGlobalScore();\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\n\t\t\t//Search for the user in the ordered list\n\t\t\tglobalRanking = allPlayers.indexOf(dc.getCurrentPlayer()) +1;\n\n\t\t} catch(DatabaseException e) {\n\t\t\tactivity.showNegativeDialog(\"Error\", e.prettyPrint(), \"OK\");\n\t\t}\n\t\treturn globalRanking;\n\t}",
"public IsolationLevel highestCommon(IsolationLevel level) {\r\n return (ordinal() <= level.ordinal()) ? level : this;\r\n }",
"private List<Entry<String, Integer>> getCommonList(\r\n Map<String, Integer> count, int top) {\r\n \r\n final List<Entry<String, Integer>> topList = new ArrayList<>();\r\n \r\n final Set<Integer> setCount = new HashSet();\r\n setCount.addAll(count.values());\r\n setCount.remove(1);\r\n \r\n final List<Integer> counts = new ArrayList<>(setCount);\r\n Collections.sort(counts, Collections.reverseOrder());\r\n \r\n if (counts.isEmpty()) {\r\n return topList;\r\n }\r\n \r\n if (counts.size() < top) {\r\n top = counts.size();\r\n }\r\n \r\n final int countCommon = counts.get(top - 1);\r\n \r\n final Stream<Entry<String, Integer>> common = count.entrySet().stream()\r\n .filter(entry -> entry.getValue() >= countCommon);\r\n final Map<String, Integer> commonMap = new HashMap();\r\n common.forEach(entry -> commonMap.put(entry.getKey(), entry.getValue()));\r\n \r\n for (int i = 0; i < top; i++) {\r\n final int cc = counts.get(i);\r\n commonMap.entrySet().stream()\r\n .filter(entry -> entry.getValue() == cc)\r\n .forEach(entry -> topList.add(entry));\r\n }\r\n \r\n return topList;\r\n }",
"public SortedMap<String,Long>\n getResources()\n {\n TreeMap<String, Long> toReturn = new TreeMap<String, Long>();\n \n getResourcesHelper(toReturn);\n \n if(!toReturn.isEmpty()) {\n return Collections.unmodifiableSortedMap(toReturn);\n }\n\n return null;\n }",
"public int minYValue (Map <String,ArrayList<Point>> map){\r\n \tint min = 0 , i = 0;\r\n \t\tfor (String key : map.keySet()) {\r\n \t\t\tif ( min < map.get(key).get(i).getY())\r\n \t\t\t\tmin = (int) map.get(key).get(i).getY();\r\n \t\t\ti++;\r\n \t\t}\r\n \treturn min;\t\r\n }",
"@Override\n\tpublic User getMinimumSpaceAcc() {\n\t\tint minSize = 5121;\n\t\tUser minSpaceUser = null;\n\t\tfor (int i = 0; i<counter; i++)\n\t\t\tif (users[i].getAvailableSpace() < minSize){\n\t\t\t\tminSpaceUser = users[i];\n\t\t\t\tminSize = users[i].getAvailableSpace();\n\t\t\t}\n\t\treturn minSpaceUser;\n\t}",
"protected Optional<Counter> earliestCounter() {\n return servers.stream().filter(x -> x.isAvailable())\n .min(Comparator.comparing(Counter::getNumInQ));\n }",
"public String getReadConsistency() {\n return this.readConsistency;\n }",
"public int minkeys() {\n\t\tint min = 0;\n\t\tif (parentref == null) {\n\t\t\treturn 1;\n\t\t}\n\t\tmin = (int)Math.ceil((degree) / 2.0) - 1;\n\t\t//min = (int)Math.ceil(degree / 2.0);\n\t\treturn Math.max(min, 0);\n\t}",
"public int getLowestChromID();",
"com.google.ads.googleads.v13.enums.FeedMappingStatusEnum.FeedMappingStatus getStatus();",
"private static Vertex lowestFInOpen(List<Vertex> openList) {\n\t\tVertex cheapest = openList.get(0);\n\t\tfor (int i = 0; i < openList.size(); i++) {\n\t\t\tif (openList.get(i).getF() < cheapest.getF()) {\n\t\t\t\tcheapest = openList.get(i);\n\t\t\t}\n\t\t}\n\t\treturn cheapest;\n\t}",
"@Override\n public int lowestRequest() {\n int c = Long.numberOfTrailingZeros( get() );\n if ( c == 64 ) {\n c = -1;\n }\n return c;\n }",
"protected Optional<Counter> earliestAcceptableCounter() {\n return servers.stream().filter(x -> x.canTakeServeEvent())\n .min(Comparator.comparing(Counter::getNumInQ));\n }",
"org.naru.park.ParkController.CommonActionOrBuilder getGetLatestSensorReadingForUserOrBuilder();",
"private static int[] FindLowest(int[][] terrainMap) {\n\n int[] lowestPosition = {-1, -1};\n int lowestValue = terrainMap[0][0];\n\n int i, j;\n\n for (i = 0; i < terrainMap.length; i++) {\n for (j = 0; j < terrainMap[0].length; j++) {\n if (terrainMap[i][j] < lowestValue) {\n lowestValue = terrainMap[i][j];\n lowestPosition[0] = i;\n lowestPosition[1] = j;\n }\n }\n\n }\n\n return lowestPosition;\n\n }",
"private void loadPreviousStatuses(String userUid) {\n final String token = prefs.getString(getString(R.string.v_token), \"\");\n final String state = prefs.getString(getString(R.string.v_state), \"\");\n final String pin = prefs.getString(getString(R.string.v_pin), \"\");\n final long expiry = prefs.getLong(getString(R.string.v_expiry), 0);\n final int registrationCnt = prefs.getInt(getString(R.string.v_registered), 0);\n\n final String path = userUid + \"/\" + getString(R.string.firebase_path) + state + \"/\" + pin + \"/\" + token;\n\n FirebaseAnalytics.getInstance(this).setUserProperty(\"COVIDDetection\", token);\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n dbRef = database.getReference(path + \"/\" + getString(R.string.firebase_path_registration));\n\n Map<String, Object> registration = new HashMap<>();\n registration.put(\"token\", token);\n registration.put(\"state\", state);\n registration.put(\"pin\", pin);\n registration.put(\"time\", new Date().getTime());\n registration.put(\"expTime\", expiry);\n dbRef.child(Integer.toString(registrationCnt)).setValue(registration);\n\n dbRef = database.getReference(path);\n dbRef.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot snapshot) {\n if (snapshot != null) {\n for (DataSnapshot userData : snapshot.getChildren()) {\n if(userData.getKey() == getString(R.string.firebase_path_location)) {\n for (DataSnapshot userLocations : userData.getChildren()) {\n personStatuses.add(Integer.parseInt(userLocations.getKey()), (Map<String, Object>) userLocations.getValue());\n }\n }\n }\n }\n }\n\n @Override\n public void onCancelled(DatabaseError error) {\n // TODO: Handle gracefully\n }\n });\n\n LocationRequest request = new LocationRequest();\n //Specify how often your app should request the device’s location//\n request.setInterval(remoteConfig.getLong(\"LOCATION_REQUEST_INTERVAL\"));\n request.setFastestInterval(remoteConfig.getLong(\"LOCATION_REQUEST_INTERVAL_FASTEST\"));\n //Get the most accurate location data available//\n request.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n FusedLocationProviderClient client = LocationServices.getFusedLocationProviderClient(this);\n int permission = ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION);\n\n //If the app currently has access to the location permission...//\n if (permission == PackageManager.PERMISSION_GRANTED) {\n //...then request location updates//\n setStatusMessage(R.string.tracking);\n\n // Hold a partial wake lock to keep CPU awake when the we're tracking location.\n PowerManager powerManager = (PowerManager) getSystemService(POWER_SERVICE);\n mWakelock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, \"myapp:MyWakelockTag\");\n mWakelock.acquire();\n\n client.requestLocationUpdates(request, new LocationCallback() {\n @Override\n public void onLocationResult(LocationResult locationResult) {\n //Get a reference to the database, so your app can perform read and write operations//\n Location location = locationResult.getLastLocation();\n if (location != null) {\n onLocationChanged(location);\n }\n }\n }, null);\n }\n }",
"public Map<String, Object> getStatus() throws IOException {\n String httpResponse = httpGet(baseUrl.resolve(\"/_status\"));\n return mapper.readValue(httpResponse, new TypeReference<Map<String, Object>>() {\n });\n }",
"@Override\n public int compare(Integer a, Integer b) {\n if (base.get(a) >= base.get(b)) {\n return 1;\n } else {\n return -1;\n } // returning 0 would merge keys\n }",
"private int getCommonUsers(Set<String> setA, Set<String> setB)\n\t{\n\t\tif(setA == null || setB == null || setA.isEmpty() || setB.isEmpty()) {\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tint commonUsers = Sets.intersection(setA, setB).size();\n\t\t//LOG.info(\"Find common users between \" + setA.toString() + \", \" + setB.toString() + \", \" + commonUsers);\n\t\treturn commonUsers;\n\t}",
"@Override\n\tpublic String getStatusByUserName() {\n\t\treturn model.getStatusByUserName();\n\t}",
"@Nullable\n protected abstract Map.Entry<K, V> onGetLowestEntry();",
"public String getHighestRank() {\n try {\n FileInputStream fis = new FileInputStream(this.databaseName + \".config\");\n\n // Reading in the number of normal records from the .config file starting from offset 104 bytes (where the number for HIGHEST-RANK begins)\n fis.getChannel().position(104);\n byte[] highestRank = new byte[5];\n \n fis.read(highestRank, 0, 5);\n fis.close();\n return new String(highestRank).trim();\n } catch (IOException ex) {\n ex.printStackTrace();\n return \"Error\";\n }\n }",
"private static Map<Integer, Integer> readState(String stateFile) throws Exception {\n\n Map<Integer, Integer> ret = new HashMap<>();\n\n File f = new File(stateFile);\n if (f.exists()) {\n //LOG.info(\"File exists\");\n List<String> lines = FileUtils.readLines(f, null);\n for (String line: lines) {\n //LOG.info(\"Line: \" + line);\n String[] toks = line.split(\":\");\n String channelId = toks[0];\n String messageId = toks[1];\n ret.put(Integer.valueOf(channelId), Integer.valueOf(messageId));\n }\n }\n\n //LOG.info(\"Read from file into map size \" + ret.size());\n\n return ret;\n }",
"UserStatus getStatus();",
"public static void main(String[] args) {\n\t\t\r\n\t\tTreeMap<Integer,String> map = new TreeMap<Integer,String>();\r\n\t\t\r\n map.put(2000, \"A\");\r\n map.put(5000, \"E\");\r\n map.put(6000, \"F\");\r\n map.put(7000, \"G\");\r\n map.put(3000, \"C\");\r\n map.put(4000, \"D\");\r\n map.put(2100, \"B\");\r\n System.out.println(map);\r\n System.out.println(\"max\"+map.lastKey());\r\n System.out.println(\"min\"+map.firstKey());\r\n \r\n Set<Integer> setLessThen3k = map.headMap(3000).keySet();\r\n System.out.println(\"setLessThen3k---\"+setLessThen3k);\r\n \r\n Set<Integer> setLessgreater3k = map.tailMap(3000).keySet();\r\n System.out.println(\"setLessThen3k---\"+setLessgreater3k);\r\n \r\n \r\n\r\n\t\tTreeMap<String,Integer> Usermap = new TreeMap<String,Integer>();\r\n\t\t\r\n\t\tUsermap.put( \"A\",2000);\r\n\t\tUsermap.put( \"F\",8000);\r\n\t\tUsermap.put( \"G\",7000);\r\n\t\tUsermap.put( \"C\",3000);\r\n\t\tUsermap.put( \"D\",3000);\r\n\t\tUsermap.put( \"E\",9000);\r\n\t\tUsermap.put( \"B\",8000);\r\n System.out.println(map);\r\n System.out.println(\"max\"+Usermap.lastKey());\r\n System.out.println(\"min\"+Usermap.firstKey());\r\n \r\n\r\n \r\n \r\n\t}",
"public int findMin() {\n\t\tint min = (int)data.get(0);\n\t\tfor (int count = 1; count < data.size(); count++)\n\t\t\tif ((int)data.get(count) < min)\n\t\t\t\tmin = (int)data.get(count);\n\t\treturn min;\n\t}",
"public static int getValue( String readMode ) {\n if ( readMode.trim().equalsIgnoreCase( SINGLE_READ ) ) {\n return -1;\n } else if ( readMode.trim().equalsIgnoreCase( MULTIPLE_READ ) ) {\n return -1;\n } else if ( readMode.trim().equalsIgnoreCase( XML_READ_CLASS ) ) {\n return XML_READ_VALUE;\n } else if ( readMode.trim().equalsIgnoreCase( TEXT_READ_CLASS ) ) {\n return TEXT_READ_VALUE;\n } else {\n return UNDEFINED_READ_VALUE;\n }\n }",
"public int getState(String username){\r\n int index = f.searchForUsername(username);\r\n //If the users 'state' is 1 then they are able to add new users, so return true.\r\n return f.user[index].getState();\r\n }",
"public char FirstAppearingOnce()\n {\n int minPos = Integer.MAX_VALUE;\n char ch = '#';\n for (int i = 0; i < map.length; i++) {\n if (map[i] >= 0) {\n if (map[i] < minPos) {\n minPos = map[i];\n ch = (char)i;\n }\n }\n }\n return ch;\n }",
"private static int binaryCompare(final Resource r1, final Resource r2) throws IOException {\n try (InputStream in1 = new BufferedInputStream(r1.getInputStream());\n InputStream in2 =\n new BufferedInputStream(r2.getInputStream())) {\n\n for (int b1 = in1.read(); b1 != -1; b1 = in1.read()) {\n final int b2 = in2.read();\n if (b1 != b2) {\n return b1 > b2 ? 1 : -1;\n }\n }\n return in2.read() == -1 ? 0 : -1;\n }\n }",
"public List getOwnerUsersList(Map map) {\n\t String currentUser = UserUtil.getCurrentPrincipalUser();\r\n\t\t List ls = (List)map.get(currentUser);\r\n//\t\t System.out.println(\"map.size()\"+currentUser) ;\r\n//\t\t System.out.println(map.size()) ;\r\n\t\treturn ls;\r\n\t}",
"public long getReadCounter () {\n\t\treturn readCounter;\n\t}",
"org.naru.park.ParkController.CommonAction getGetLatestSensorReadingForUser();",
"public int getMinRangingReadings() {\n return getNumberOfDimensions() + 1;\n }",
"private static int minimum() {\n\t\tint popSize = 0;\n\t\tChromosome thisChromo = null;\n\t\tChromosome thatChromo = null;\n\t\tint winner = 0;\n\t\tboolean foundNewWinner = false;\n\t\tboolean done = false;\n\n\t\twhile (!done) {\n\t\t\tfoundNewWinner = false;\n\t\t\tpopSize = population.size();\n\t\t\tfor (int i = 0; i < popSize; i++) {\n\t\t\t\tif (i != winner) { // Avoid self-comparison.\n\t\t\t\t\tthisChromo = population.get(i);\n\t\t\t\t\tthatChromo = population.get(winner);\n\t\t\t\t\tif (thisChromo.conflicts() < thatChromo.conflicts()) {\n\t\t\t\t\t\twinner = i;\n\t\t\t\t\t\tfoundNewWinner = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (foundNewWinner == false) {\n\t\t\t\tdone = true;\n\t\t\t}\n\t\t}\n\t\treturn winner;\n\t}",
"Map<String, Double> getStatus();",
"public Tile gameGetStatus(int r, int c) {\n\t\treturn gameBoard.getTileStatus(r, c);\n\t}",
"public java.util.Map<java.lang.String, ch.epfl.dedis.proto.StatusProto.Response.Status> getSystemMap() {\n return internalGetSystem().getMap();\n }",
"Integer getStatus();",
"public String getLowestChromKey();",
"private HashMap<Integer, Long> getAllUserId(){\n\t\tHashMap<Integer, Long> UserAndFaceId = null;\n\t\tRecommenderDbService dbService1 = null;\n\t\ttry {\n\t\t\tdbService1 = RecommenderDbServiceCreator.createCloud();\n\t\t\tUserAndFaceId = dbService1.getAllFaceAndUserIdV2();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally {\n\t\t\tif (dbService1 != null) {\n\t\t\t\ttry {\n\t\t\t\t\tdbService1.close();\n\t\t\t\t} catch (SQLException | IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn UserAndFaceId;\n\t}",
"public java.util.Map<java.lang.String, ch.epfl.dedis.proto.StatusProto.Response.Status> getSystemMap() {\n return internalGetSystem().getMap();\n }",
"public static Health combine(Collection<Health> states) {\n Health res = GREEN;\n for (Health state : states) {\n if (state.ordinal() > res.ordinal()) {\n res = state;\n }\n }\n return res;\n }",
"public int getCBRStatus();",
"public int getMinRssiReadings() {\n return getMinReadings();\n }",
"@Override\r\n\tpublic UserCustomer searchcommoninfo(Long userid) {\n\t\tUserCustomer search = userCustomerMapper.getUserMessagebyuserid(userid);\r\n\t\treturn userCustomerMapper.searchupdatemess(search.getProfileid());\r\n\t}",
"protected ValuePosition getMinimum() {\n\t\t// Calcule la position et la durée d'exécution de la requête la plus courte dans le tableau des requêtes\n\t\tValuePosition minimum = new ValuePosition();\n\t\tminimum.position = 0;\n\t\tfor(int pos=0; pos<requests.length; pos++) {\n\t\t\tRequest request = requests[pos];\n\t\t\tif(request == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(minimum.value == null || request.getElapsedTime() < minimum.value) {\n\t\t\t\tminimum.position = pos;\n\t\t\t\tminimum.value = request.getElapsedTime();\n\t\t\t}\n\t\t}\n\t\treturn minimum;\n\t}",
"org.naru.park.ParkController.CommonAction getGetLatestReading();",
"com.google.ads.googleads.v14.common.ParentalStatusInfo getParentalStatus();",
"public org.naru.park.ParkController.CommonActionOrBuilder getGetLatestSensorReadingForUserOrBuilder() {\n return getGetLatestSensorReadingForUser();\n }",
"ProbeLevel minimumLevel();",
"@Override\n\t public Consistency getDefaultConsistency() {\n\t return Consistency.READ_YOUR_OWN_WRITES;\n\t }",
"public ReadOperationResultType getResultType()\n {\n if(resultType == null) resultType = ReadOperationResultType.ALL;\n return resultType;\n }",
"@Override\n public ClusterStatus getCurrentClusterStatus() {\n if (getMemberList().size() > 1) {\n return CLUSTER_FUNCTIONAL;\n }\n // when only one node is connected return degraded\n if (getMemberList().size() == 1) {\n return CLUSTER_DEGRADED;\n }\n // consider all other states as illegal\n return CLUSTER_ILLEGAL;\n }",
"@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/oauths/{name}/status\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<OAuth> readOAuthStatus(\n @Path(\"name\") String name, \n @QueryMap ReadOAuthStatus queryParameters);",
"public void readUserMap(){\n DatabaseReference usersRef = FirebaseDatabase.getInstance().getReference().child(\"users\");\n usersRef.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n GenericTypeIndicator<HashMap<String, User>> hash = new GenericTypeIndicator<HashMap<String, User>>() {};\n users = dataSnapshot.getValue(hash);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }",
"private String getAccountPriorityForStatus(String statusName)\n {\n return parentProvider.getAccountID().getAccountPropertyString(\n ProtocolProviderFactory.RESOURCE_PRIORITY + \"_\" +\n statusName.replaceAll(\" \", \"_\").toUpperCase());\n }",
"public org.naru.park.ParkController.CommonAction getGetLatestSensorReadingForUser() {\n if (getLatestSensorReadingForUserBuilder_ == null) {\n return getLatestSensorReadingForUser_ == null ? org.naru.park.ParkController.CommonAction.getDefaultInstance() : getLatestSensorReadingForUser_;\n } else {\n return getLatestSensorReadingForUserBuilder_.getMessage();\n }\n }",
"private Hit getLevelHit(final Ray r, final TestCounter c) {\n double minDist = Double.POSITIVE_INFINITY;\n Triangle curBest = null;\n for(final Triangle t : tri) {\n final double dist = t.hit(r, c);\n if(r.isValidDistance(dist) && dist < minDist) {\n minDist = dist;\n curBest = t;\n }\n }\n return new Hit(r, curBest, minDist, c);\n }",
"private GlobalState search(Map<String,String> stateMapping) {\n GlobalState desired = new GlobalState(nodes,binding);\n desired.addMapping(stateMapping);\n for(GlobalState g : globalStates) {\n if(g.equals(desired))\n return g;\n }\n return null;\n }",
"private static int checkStatus(String param) throws IOException {\n\t\tURL url = new URL(Utils.getURL() + \"/status?who=\" + param + \"&login=\" + login + \"&password=\" + password);\n\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t\tString resp;\n\t\ttry (InputStream is = conn.getInputStream()) {\n\t\t\tGson gson = new GsonBuilder().create();\n\t\t\tByteArrayOutputStream bos = new ByteArrayOutputStream();\n\t\t\tbyte[] buff = new byte[10240];\n\t\t\tint r;\n\t\t\tdo {\n\t\t\t\tr = is.read(buff);\n\t\t\t\tif (r > 0) bos.write(buff, 0, r);\n\t\t\t} while (r != -1);\n\t\t\tresp = new String(bos.toByteArray(), StandardCharsets.UTF_8);\n\t\t\tMap<String, Boolean> onlineMap = gson.fromJson(resp, TreeMap.class);\n\t\t\tUtils.printOnlineStats(onlineMap);\n\t\t}\n\t\treturn conn.getResponseCode();\n\t}",
"long closest(double lon, double lat) {\n double smallestDist = Double.MAX_VALUE;\n long smallestId = 0;\n Iterable<Node> v = world.values();\n for (Node n : v) {\n double tempLat = n.getLat();\n double tempLon = n.getLon();\n double tempDist = distance(lon, lat, tempLon, tempLat);\n if (tempDist < smallestDist) {\n smallestDist = tempDist;\n smallestId = n.getId();\n }\n }\n return smallestId;\n }",
"org.naru.park.ParkController.CommonActionOrBuilder getGetLatestReadingOrBuilder();",
"List<ProfileStatusReader> getActiveProfiles();",
"public PrimEdge calculateMinimum() {\n int minWage = Integer.MAX_VALUE;\n PrimEdge result = null;\n for (Map.Entry<Integer, PrimEdge> entry : dtable.entrySet()) {\n if (entry.getValue().getWage() < minWage) {\n result = entry.getValue();\n minWage = entry.getValue().getWage();\n }\n }\n return result;\n }",
"@Override\n\tpublic Consistency getDefaultConsistency() {\n\t\treturn Consistency.READ_YOUR_OWN_WRITES;\n\t}",
"com.nhcsys.webservices.getmessages.getmessagestypes.v1.PriorityType.Enum getPriority();",
"public Score lowestScore()\n {\n Score lowest = new Score();\n int smallSoFar = 201;\n if(scores[0] == null)\n {\n return null;\n }\n else\n {\n for(int i = 0; i < scores.length; i++)\n {\n lowest = scores[0];\n if(scores[i] == null)\n {\n break;\n }\n if(scores[i].getScore() < lowest.getScore())\n {\n lowest = scores[i];\n }\n \n }\n return lowest;\n } \n }",
"public Resource findNearestResource(){\n\t\tResource nearestResource = null;\n\t\tfloat distanceToCurrentResource = 0f;\n\t\tfor (Resource resource : MapData.getInstance().getResources()) {\n\t\t\tif(resource.isResourceMaxed()) continue;\n\t\t\tif (resource.getCenter().dst2(getCenter()) < 4000000) {\n\t\t\t\tif (nearestResource == null) {\n\t\t\t\t\tnearestResource = resource;\n\t\t\t\t\tdistanceToCurrentResource = nearestResource\n\t\t\t\t\t\t\t.getCenter().dst2(this.getCenter());\n\t\t\t\t} else {\n\t\t\t\t\tfloat distanceToNewResource = resource.getCenter()\n\t\t\t\t\t\t\t.dst2(this.getCenter());\n\t\t\t\t\tnearestResource = (distanceToNewResource < distanceToCurrentResource) ? resource\n\t\t\t\t\t\t\t: nearestResource;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn nearestResource;\n\t}",
"public void getInactiveUsersBasedOnComments(){\n Map<Integer,User> users = DataStore.getInstance().getUsers();\n List<User> usersCommentList = new ArrayList<>(users.values());\n \n Comparator<User> test3 = new Comparator<User>() {\n @Override\n public int compare(User u1, User u2) {\n return u1.getComments().size() - u2.getComments().size();\n }\n };\n Collections.sort(usersCommentList, test3);\n \n System.out.println(\"\\nTop five inactive users based on comments:\");\n for(int i = 0; i<usersCommentList.size() && i <5; i++){\n System.out.println(\"User ID :\" + usersCommentList.get(i).getId() +\" \"+ \"No. of Comments:\" + usersCommentList.get(i).getComments().size());\n }\n }",
"public org.naru.park.ParkController.CommonAction getGetLatestSensorReadingForUser() {\n return getLatestSensorReadingForUser_ == null ? org.naru.park.ParkController.CommonAction.getDefaultInstance() : getLatestSensorReadingForUser_;\n }",
"public org.naru.park.ParkController.CommonActionOrBuilder getGetLatestSensorReadingForUserOrBuilder() {\n if (getLatestSensorReadingForUserBuilder_ != null) {\n return getLatestSensorReadingForUserBuilder_.getMessageOrBuilder();\n } else {\n return getLatestSensorReadingForUser_ == null ?\n org.naru.park.ParkController.CommonAction.getDefaultInstance() : getLatestSensorReadingForUser_;\n }\n }",
"public GuessGameStat getGameStatus(String username) {\n GuessGameStat guessGameStat = (GuessGameStat) super.getGameStatus(username);\n if (guessGameStat == null) {\n guessGameStat = new GuessGameStat(username);\n }\n return guessGameStat;\n }"
] | [
"0.5053181",
"0.4925301",
"0.48671448",
"0.4785146",
"0.47557464",
"0.4731274",
"0.4718448",
"0.4683746",
"0.4670675",
"0.4629703",
"0.46070856",
"0.45889017",
"0.45734477",
"0.4553262",
"0.45489088",
"0.4541884",
"0.45309535",
"0.45235065",
"0.45066202",
"0.4500968",
"0.4487497",
"0.44821677",
"0.4480334",
"0.4476905",
"0.44593167",
"0.44389966",
"0.4431505",
"0.44247544",
"0.44217923",
"0.44156638",
"0.4409362",
"0.44053602",
"0.4384425",
"0.43558007",
"0.43551105",
"0.4348962",
"0.43365383",
"0.43282616",
"0.4326871",
"0.43207344",
"0.43038726",
"0.43028653",
"0.43024018",
"0.43020248",
"0.42974073",
"0.42883772",
"0.42657012",
"0.42642322",
"0.42635685",
"0.42631224",
"0.42611834",
"0.42596623",
"0.42568395",
"0.4256258",
"0.42510825",
"0.42483574",
"0.42467874",
"0.42305323",
"0.42298374",
"0.42273945",
"0.42225358",
"0.42212576",
"0.42206344",
"0.4220286",
"0.42188355",
"0.4218343",
"0.42128983",
"0.42091113",
"0.4201227",
"0.41921985",
"0.41865325",
"0.41820723",
"0.4181804",
"0.41809824",
"0.41692993",
"0.41636088",
"0.4163353",
"0.41582957",
"0.41385788",
"0.41358885",
"0.41353047",
"0.41346672",
"0.41319227",
"0.41314697",
"0.41289538",
"0.41235808",
"0.41235194",
"0.4117244",
"0.41157347",
"0.41117653",
"0.4107765",
"0.41051224",
"0.4104837",
"0.40928486",
"0.4077181",
"0.40763426",
"0.40739992",
"0.4067608",
"0.4065922",
"0.40622082"
] | 0.6447678 | 0 |
Mandatory empty constructor for the fragment manager to instantiate the fragment (e.g. upon screen orientation changes). | public MyLocationsFragment() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public FragmentMy() {\n }",
"public RickAndMortyFragment() {\n }",
"public MainActivityFragment() {\n }",
"public MainActivityFragment() {\n }",
"public RegisterFragment() {\n // Required empty public constructor\n }",
"public VehicleFragment() {\r\n }",
"public EmployeeFragment() {\n }",
"public RegisterFragment() {\n }",
"public HomeFragment() {}",
"public ExploreFragment() {\n\n }",
"public WkfFragment() {\n }",
"public WelcomeFragment() {}",
"public FavoriteFragment() {\n }",
"public MainActivityFragment(){\n\n }",
"public HomeSectionFragment() {\n\t}",
"public HistoryFragment() {\n }",
"public HistoryFragment() {\n }",
"public PhotoGalleryFragment() {\n }",
"public DisplayFragment() {\n\n }",
"public ForecastFragment() {\n }",
"protected abstract Fragment createFragment();",
"public Fragment_Tutorial() {}",
"public VideoFragment() {\n }",
"public ViewPagerFragment() {\n }",
"public progFragment() {\n }",
"public EventHistoryFragment() {\n\t}",
"public AddReminderFragment() {\n }",
"public HomeFragment() {\n // Required empty public constructor\n }",
"public CuartoFragment() {\n }",
"public LogFragment() {\n }",
"public RestaurantFragment() {\n }",
"public GalleryActivityFragment() { //Constructor which has no function, but is required\n }",
"public BookListFragment() {\n }",
"public PeopleFragment() {\n // Required empty public constructor\n }",
"public PersonDetailFragment() {\r\n }",
"public FriendsListFragment() {\n }",
"public MyGoodsFragment() {\n }",
"public BackEndFragment() {\n }",
"public VantaggiFragment() {\n // Required empty public constructor\n }",
"public MovieListFragment() {\n }",
"public CustomerFragment() {\n }",
"public StintFragment() {\n }",
"public CreatePatientFragment() {\n\n }",
"public ArticleDetailFragment() {\n }",
"public ArticleDetailFragment() {\n }",
"public ArticleDetailFragment() {\n }",
"public PlaylistFragment() {\n }",
"public DeviceModuleDetailFragment() {\n }",
"public void createFragment() {\n\n }",
"public ArticleDetailFragment() { }",
"public VenueDetailFragment() {\r\n\t}",
"public RepositoryFragment() {\n }",
"public NoteActivityFragment() {\n }",
"public RouteFragment() {\n }",
"public ItemFragment() {\n }",
"public RoomStatusFragment()\n {\n }",
"public PlaceholderFragment() {\n }",
"public MovieGridFragment() {\n }",
"public RecipeVideoFragment() {\n }",
"public RelayListFragment() {\n }",
"public ItemListFragment() {\n }",
"public FeedFragment() {\n }",
"@RequiresApi(api = Build.VERSION_CODES.O)\n public MainPages_MyProfile_Fragment() {\n Log.i(\"Init\", \"Initialize profile fragment...\");\n this.selected = R.id.profile_info_item;\n this.infoFragment = Info_Profile_Fragment.getInstance();\n this.imageFragment = Image_Profile_Fragment.getInstance();\n }",
"public MovieDetailFragment() {\n }",
"public MovieDetailFragment() {\n }",
"public MainFragment2() {\r\n super();\r\n }",
"public CreateEventFragment() {\n // Required empty public constructor\n }",
"public CarModifyFragment() {\n }",
"public ProductsFragment() {\n }",
"public DialogFragment() {\n Log.d(TAG,\"Construction\");\n // Required empty public constructor\n }",
"public SyncMigrationFragment()\n {\n super();\n }",
"public AddressDetailFragment() {\n }",
"public ShoppingListFragment() {\n }",
"@Override\r\n\tpublic void onFragmentCreate(Bundle savedInstanceState) {\n\t}",
"public RestaurantDetailFragment() {\n }",
"public UpdaterFragment() {\n // Required empty public constructor\n }",
"public AboutUsFragment() {\n // Required empty public constructor\n }",
"private void initFragment(Fragment fragment) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n FragmentTransaction transaction = fragmentManager.beginTransaction();\n transaction.add(R.id.contentFrame, fragment);\n transaction.commit();\n }",
"public MovieDetailFragment() {\n\n }",
"public NewShopFragment() {\n }",
"public NoteListFragment() {\n }",
"public static FragmentTousWanted newInstance() {\n FragmentTousWanted fragment = new FragmentTousWanted();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }",
"public SistudiaMainFragment() {\r\n // Required empty public constructor\r\n }",
"public PatientDetailLogsFragment() {\n }",
"public SettingsFragment() {\n // Empty constructor required for fragment subclasses\n }",
"public StepsFragment() {\n }",
"public ChatThreadDetailFragment() {\n }",
"public FExDetailFragment() {\n \t}",
"public SwapListFragment() {\n }",
"public CategoryFragment() {\n }",
"public ProfileFragment() {\n\n }",
"public CategoriesFragment() {\n }",
"public UsersFragment() {\n }",
"public EmailFragment() {\n }",
"public WalletFragment(){}",
"public MenuCategoryFragment() {\n\n }",
"public ItemDetailFragment() {\n }",
"public ItemDetailFragment() {\n }",
"public ItemDetailFragment() {\n }",
"public ItemDetailFragment() {\n }"
] | [
"0.80315286",
"0.7699558",
"0.767644",
"0.767644",
"0.75390023",
"0.7535283",
"0.7532307",
"0.7522787",
"0.7507683",
"0.7412924",
"0.7406995",
"0.7376808",
"0.7376239",
"0.7366176",
"0.7326723",
"0.7302857",
"0.7302857",
"0.72952265",
"0.7288",
"0.72855604",
"0.72822803",
"0.7270511",
"0.7267437",
"0.7263299",
"0.72600394",
"0.7250717",
"0.7250302",
"0.7238231",
"0.72382134",
"0.72368115",
"0.72341585",
"0.7233127",
"0.7222499",
"0.72220856",
"0.7210519",
"0.720044",
"0.7198516",
"0.7185286",
"0.7176694",
"0.71750623",
"0.7165263",
"0.71367043",
"0.7123715",
"0.7110434",
"0.7110434",
"0.7110434",
"0.71041536",
"0.71018326",
"0.7096521",
"0.7089143",
"0.70709896",
"0.70622796",
"0.7058746",
"0.7056469",
"0.7048354",
"0.7041889",
"0.70335567",
"0.7027441",
"0.7018453",
"0.701575",
"0.70102125",
"0.7004706",
"0.7001192",
"0.69999045",
"0.69999045",
"0.69863445",
"0.6983739",
"0.69734865",
"0.6967487",
"0.69615185",
"0.6961359",
"0.6943322",
"0.69369555",
"0.6923253",
"0.69230497",
"0.6923014",
"0.6911553",
"0.6908773",
"0.69082904",
"0.6908038",
"0.69054246",
"0.6893383",
"0.68908066",
"0.6889107",
"0.6868549",
"0.6850988",
"0.6838114",
"0.6835363",
"0.6832114",
"0.68304634",
"0.6828959",
"0.682786",
"0.6806927",
"0.6803154",
"0.6802393",
"0.68013483",
"0.6797921",
"0.6797921",
"0.6797921",
"0.6797921"
] | 0.7089653 | 49 |
TODO: Customize parameter initialization | @SuppressWarnings("unused")
public static MyLocationsFragment newInstance(int columnCount) {
MyLocationsFragment fragment = new MyLocationsFragment();
Bundle args = new Bundle();
args.putInt(ARG_COLUMN_COUNT, columnCount);
fragment.setArguments(args);
return fragment;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tprotected void initParams() {\n\t\t\n\t}",
"private LocalParameters() {\n\n\t}",
"private Params()\n {\n }",
"Parameter createParameter();",
"protected void setupParameters() {\n \n \n\n }",
"public BaseParameters(){\r\n\t}",
"protected void parametersInstantiation_EM() {\n }",
"Param createParam();",
"Param createParam();",
"Param createParam();",
"private void initParameters() {\n Annotation[][] paramsAnnotations = method.getParameterAnnotations();\n for (int i = 0; i < paramsAnnotations.length; i++) {\n if (paramsAnnotations[i].length == 0) {\n contentBuilder.addUnnamedParam(i);\n } else {\n for (Annotation annotation : paramsAnnotations[i]) {\n Class<?> annotationType = annotation.annotationType();\n if (annotationType.equals(PathParam.class)\n && pathBuilder != null) {\n PathParam param = (PathParam) annotation;\n pathBuilder.addParam(param.value(), i);\n } else if (annotationType.equals(QueryParam.class)) {\n QueryParam param = (QueryParam) annotation;\n queryBuilder.addParam(param.value(), i);\n } else if (annotationType.equals(HeaderParam.class)) {\n HeaderParam param = (HeaderParam) annotation;\n headerBuilder.addParam(param.value(), i);\n } else if (annotationType.equals(NamedParam.class)) {\n NamedParam param = (NamedParam) annotation;\n contentBuilder.addNamedParam(param.value(), i);\n } else {\n contentBuilder.addUnnamedParam(i);\n }\n }\n }\n }\n }",
"public Parameters() {\n\t}",
"public LightParameter()\r\n\t{\r\n\t}",
"public ListParameter()\r\n\t{\r\n\t}",
"private DBParameter() {\n }",
"private Parameter(int key, String name, String value){\n this.key = key;\n this.name = name;\n this.value = value;\n }",
"@Override\n\tprotected void setParameterValues() {\n\t}",
"String toParameter();",
"void setParameters() {\n\t\t\n\t}",
"private FunctionParametersValidator() {}",
"public interface Params\n{\n\tpublic static final String DEFAULT_PATH=\"default_path\";\n\tpublic static final String DEFAULT_NAME=\"default_name\";\n\tpublic static final String MODE=\"mode\";\n\tpublic static final String FILE_TYPE=\"file_type\";\n}",
"public UserParameter() {\n }",
"public void getParameters(Parameters parameters) {\n\n }",
"public ParamJson() {\n\t\n\t}",
"@Override\r\n public void setParameter(String parameters) {\r\n // dummy\r\n }",
"public CustomEntitiesTaskParameters() {}",
"PARAM createPARAM();",
"ParamMap createParamMap();",
"public ModuleParams()\n\t{\n\t}",
"public Setparam() {\r\n super();\r\n }",
"public ParameterNotFoundException()\n\t{\n\t\tsuper();\n\t}",
"@Override \n\t\tprotected int getNumParam() {\n\t\t\treturn 1;\n\t\t}",
"public StratmasParameterFactory() \n {\n this.typeMapping = createTypeMapping();\n }",
"ParameterSource createParameterSource();",
"java.lang.String getParameterValue();",
"MessageParameter createMessageParameter();",
"@Override\n\tprotected void initParamsForFragment() {\n\n\t}",
"public Parameterized() {\n setParameters(null);\n }",
"public PowerMethodParameter() {\r\n\t\t\r\n\t\t//constructor fara parametru, utilizat in cazul in care utilizatorul nu introduce\r\n\t\t//fisierul sursa si nici fiesierul destinatie ca parametrii in linia de comanda\r\n\t\tSystem.out.println(\"****The constructor without parameters PowerMethodParameter has been called****\");\r\n\t\tSystem.out.println(\"You did not specify the input file and the output file\");\r\n\t\t\r\n\t}",
"ParameterList getParameters();",
"public Final_parametre() {\r\n\t}",
"public HandicapParameterSet() {\n }",
"@Override\n protected void collectParameters(Consumer<Parameter<?>> parameterCollector) {\n }",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void init(Object[] parameters) {\n\n\t}",
"Parameter getParameter();",
"protected void initDefaultParameters(String name) {\n\t\t// default parameter - name\n\t\tCaselessParameter cslpar =\n\t\t\tnew CaselessParameter(ISchemaComponent.KEY_NAME, false, new Caseless(name));\n\t\tcslpar.setParameterEvent(new NameChanger());\n\t\tparameters.addParameter(cslpar);\n\t\t\n\t\t// default parameter - component orientation\n\t\tGenericParameter<Orientation> orientpar =\n\t\t\tnew GenericParameter<Orientation>(ISchemaComponent.KEY_ORIENTATION, false,\n\t\t\t\t\tnew Orientation());\n\t\torientpar.getConstraint().setPossibleValues(Orientation.allAllowed);\n\t\tparameters.addParameter(orientpar);\n\t}",
"@Override\n\tprotected void validateParameterValues() {\n\t\t\n\t}",
"public interface Params {\n }",
"private ConfigurationObject createParamReference(int num, String name) throws Exception {\r\n ConfigurationObject param = new DefaultConfigurationObject(\"param\" + num);\r\n param.setPropertyValue(PROPERTY_NAME, name);\r\n\r\n return param;\r\n }",
"public ModuleParams() {\n }",
"@Override\r\n public void load() throws ParamContextException {\n\r\n }",
"public JsonPath()\r\n {\r\n numberOfParameters = 2;\r\n }",
"public void getParameters(Parameters parameters) {\n\n\t}",
"public MetaParameter() {\n m_aParams = new ArrayList();\n }",
"public void initTsnParams(){\n }",
"ParameterIdentification createParameterIdentification();",
"public DISPPARAMS() {\n\t\t\tsuper();\n\t\t}",
"private ConfigurationObject createParam(int num, String type, String value) throws Exception {\r\n ConfigurationObject param = new DefaultConfigurationObject(\"param\" + num);\r\n param.setPropertyValue(PROPERTY_TYPE, type);\r\n param.setPropertyValue(PROPERTY_VALUE, value);\r\n\r\n return param;\r\n }",
"private ConfigParamSpecification(Name simpleName, TypeName returnType) {\n this.simpleName = simpleName;\n this.returnType = returnType;\n }",
"public Map getParameters();",
"protected void initOtherParams() {\n\n\t\t// init other params defined in parent class\n\t\tsuper.initOtherParams();\n\n\t\t// the Component Parameter\n\t\t// first is default, the rest are all options (including default)\n\t\tcomponentParam = new ComponentParam(Component.AVE_HORZ, Component.AVE_HORZ,\n\t\t\t\tComponent.RANDOM_HORZ, Component.GREATER_OF_TWO_HORZ);\n\n\t\t// the stdDevType Parameter\n\t\tStringConstraint stdDevTypeConstraint = new StringConstraint();\n\t\tstdDevTypeConstraint.addString(StdDevTypeParam.STD_DEV_TYPE_TOTAL);\n\t\tstdDevTypeConstraint.addString(StdDevTypeParam.STD_DEV_TYPE_INTER);\n\t\tstdDevTypeConstraint.addString(StdDevTypeParam.STD_DEV_TYPE_INTRA);\n\t\tstdDevTypeConstraint.addString(StdDevTypeParam.STD_DEV_TYPE_NONE);\n\t\tstdDevTypeConstraint.setNonEditable();\n\t\tstdDevTypeParam = new StdDevTypeParam(stdDevTypeConstraint);\n\n\t\t// add these to the list\n\t\totherParams.addParameter(componentParam);\n\t\totherParams.addParameter(stdDevTypeParam);\n\n\t}",
"NamedParameter createNamedParameter();",
"public Parameters getParameters();",
"@Implementation\n protected String getParameters(String keys) {\n return null;\n }",
"default HxParameter createParameter(final Class<?> cls) {\n return createParameter(cls.getName());\n }",
"public interface Parametralizable {\n\n /**\n * Gets reprezentation of the contents as the URL parameters.\n * @return reprezentation of the contents as the URL parameters\n */\n String toParameter();\n}",
"protected ParameterList(){\n //title = t;\n //cellWorld = cw;\n }",
"public MParameterSystem() {\n\t\tsuper();\n\t}",
"@Test\n\tpublic void testGetRequestParameter() {\n\t}",
"ComponentParameterInstance createComponentParameterInstance();",
"@Override\n protected void elaboraParametri() {\n super.elaboraParametri();\n titoloPagina = TITOLO_PAGINA;\n }",
"public void setParametersToDefaultValues()\n/* 65: */ {\n/* 66:104 */ super.setParametersToDefaultValues();\n/* 67:105 */ this.placeholder = _placeholder_DefaultValue_xjal();\n/* 68: */ }",
"CollectionParameter createCollectionParameter();",
"public JParameterRecord() {\n super(JParameter.PARAMETER);\n }",
"ParameterDefinitionFactory getParameterDefinitionFactory();",
"public DefaultExecuterParameters() {\n\t\tnumAuthorsAtStart = 5;\n\t\tnumPublicationsAtStart = 20;\n\t\tnumCreationAuthors = 0;\n\t\tnumCreationYears = 10;\n\n\t\tyearInformation = new DefaultYearInformation();\n\t\tpublicationParameters = new DefaultPublicationParameters();\n\t\tpublicationParameters.setYearInformation(yearInformation);\n\t\tauthorParameters = new DefaultAuthorParameters();\n\t\ttopicParameters = new DefaultTopicParameters();\n\t}",
"public SqlContainerCreateUpdateParameters() {\n }",
"@Override\n\t\tpublic String getParameter(String name) {\n\t\t\treturn null;\n\t\t}",
"public ParametersBuilder() {\n this(Parameters.DEFAULT);\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"ParameterBinding createParameterBinding();",
"public bwq(String paramString1, String paramString2)\r\n/* 10: */ {\r\n/* 11: 9 */ this.a = paramString1;\r\n/* 12:10 */ this.f = paramString2;\r\n/* 13: */ }",
"@Override\n public boolean setInitParameter(String name, String value) {\n return false;\n }",
"protected abstract Object getConsequenceParameter(Object consequence);",
"private Parameter(com.google.protobuf.GeneratedMessageLite.Builder builder) {\n super(builder);\n\n }",
"private void buildOtherParams() {\n\t\tmClient.putRequestParam(\"attrType\", \"1\");\r\n\t}",
"@Override\r\n\tpublic void init() {}",
"@Override\n\tpublic Annotation[] getParameterAnnotations() {\n\t\treturn new Annotation[]{};\n\t}",
"IParameter getParameter();",
"public void setParameters(Map<String, String> param) {\n\n // check the occurrence of required parameters\n if(!(param.containsKey(\"Indri:mu\") && param.containsKey(\"Indri:lambda\"))){\n throw new IllegalArgumentException\n (\"Required parameters for IndriExpansion model were missing from the parameter file.\");\n }\n\n this.mu = Double.parseDouble(param.get(\"Indri:mu\"));\n if(this.mu < 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"Indri:mu\") + \", mu is a real number >= 0\");\n\n this.lambda = Double.parseDouble(param.get(\"Indri:lambda\"));\n if(this.lambda < 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"Indri:lambda\") + \", lambda is a real number between 0.0 and 1.0\");\n\n if((param.containsKey(\"fb\") && param.get(\"fb\").equals(\"true\"))) {\n this.fb = \"true\";\n\n this.fbDocs = Integer.parseInt(param.get(\"fbDocs\"));\n if (this.fbDocs <= 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"fbDocs\") + \", fbDocs is an integer > 0\");\n\n this.fbTerms = Integer.parseInt(param.get(\"fbTerms\"));\n if (this.fbTerms <= 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"fbTerms\") + \", fbTerms is an integer > 0\");\n\n this.fbMu = Integer.parseInt(param.get(\"fbMu\"));\n if (this.fbMu < 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"fbMu\") + \", fbMu is an integer >= 0\");\n\n this.fbOrigWeight = Double.parseDouble(param.get(\"fbOrigWeight\"));\n if (this.fbOrigWeight < 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"fbOrigWeight\") + \", fbOrigWeight is a real number between 0.0 and 1.0\");\n\n if (param.containsKey(\"fbInitialRankingFile\") && param.get(\"fbInitialRankingFile\") != \"\") {\n this.fbInitialRankingFile = param.get(\"fbInitialRankingFile\");\n try{\n this.initialRanking = readRanking();\n }\n catch (Exception e){\n e.printStackTrace();\n }\n }\n\n if (param.containsKey(\"fbExpansionQueryFile\") && param.get(\"fbExpansionQueryFile\") != \"\")\n this.fbExpansionQueryFile = param.get(\"fbExpansionQueryFile\");\n }\n }",
"public Http()\n {\n numberOfParameters = -1;\n }",
"public void setParameterNameValuePairs(entity.LoadParameter[] value);",
"public void init(Object[] initialParams) {\n\t \n\t}",
"@Override\n protected String getName() {return _parms.name;}",
"@Override\n\tpublic void initRequest() {\n\n\t}",
"@Test\n\tpublic void testParameterizedConstructor() {\n\t\tQuestionsEntity questions=new QuestionsEntity(1,\"SOX\",\"Have all changes has been approved\",\"Yes\");\n\t assertEquals(\"Yes\",questions.getResponse());\n\t}",
"HxParameter createParameter(final String className);",
"@Override\n public Serializable[] getParameterArray() {\n return new Serializable[]{ name, ownerName, defaultNamespaceName };\n }",
"@Override\n\tpublic boolean isParam() {\n\t\treturn false;\n\t}",
"@Override\n\t\tpublic void init() {\n\t\t}"
] | [
"0.7448214",
"0.71421653",
"0.7040167",
"0.688528",
"0.6882766",
"0.6739142",
"0.66899866",
"0.65924996",
"0.65924996",
"0.65924996",
"0.65721244",
"0.6531869",
"0.64020884",
"0.63855916",
"0.62994415",
"0.6293869",
"0.6286753",
"0.6285116",
"0.62805855",
"0.6262726",
"0.624883",
"0.62411606",
"0.6236188",
"0.6210527",
"0.61296535",
"0.61247313",
"0.6123394",
"0.6120612",
"0.6114309",
"0.6106979",
"0.61059093",
"0.60774183",
"0.60547924",
"0.60519236",
"0.6044351",
"0.60432374",
"0.60358953",
"0.60286635",
"0.6025331",
"0.60181475",
"0.6016108",
"0.60096824",
"0.6005315",
"0.5992928",
"0.59752107",
"0.5974654",
"0.59644175",
"0.5962775",
"0.5958126",
"0.5949572",
"0.59459007",
"0.5932345",
"0.5917841",
"0.5914896",
"0.5912462",
"0.5909821",
"0.58978933",
"0.589201",
"0.58768964",
"0.5861025",
"0.5857641",
"0.5857586",
"0.5843707",
"0.5842451",
"0.5840822",
"0.58383924",
"0.5836887",
"0.5823961",
"0.581902",
"0.5814248",
"0.5813994",
"0.5812607",
"0.5812022",
"0.58077747",
"0.580516",
"0.5797965",
"0.57960516",
"0.5788532",
"0.5786465",
"0.5783551",
"0.5779579",
"0.5764072",
"0.57488316",
"0.5745934",
"0.5742846",
"0.57242745",
"0.57177776",
"0.57130694",
"0.57108796",
"0.570984",
"0.57085353",
"0.5706875",
"0.5704472",
"0.5702316",
"0.5701326",
"0.5699705",
"0.5696841",
"0.5694167",
"0.569387",
"0.56904036",
"0.5690388"
] | 0.0 | -1 |
This interface must be implemented by activities that contain this fragment to allow an interaction in this fragment to be communicated to the activity and potentially other fragments contained in that activity. See the Android Training lesson Communicating with Other Fragments for more information. | public interface MyLocationsFragmentListener {
void MyLocationsClickListener(Location location);
void MyLocationsPressListener(Location location);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface OnFragmentInteractionListener {\n void onFragmentMessage(String TAG, Object data);\n}",
"public interface FragmentInteraction {\n void switchToBoardView();\n void switchToPinsView();\n void switchToPins(PDKBoard pdkBoard);\n void switchToDescription(PDKPin pin);\n}",
"public interface IFragmentView {\n public Activity getActivity();\n public void onItemClick(int position);\n}",
"public interface OnFragmentInteractionListener {\n void onMainFragmentInteraction(String string);\n }",
"@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n if (context instanceof RequestFragmentInterface) {\n mInterface = (RequestFragmentInterface) context;\n } else {\n throw new RuntimeException(context.toString()\n + \" must implement OnFragmentInteractionListener\");\n }\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onCallBellPressed(MessageReason reason);\n }",
"void onFragmentInteraction();",
"void onFragmentInteraction();",
"void onFragmentInteraction();",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n\n\n void onFragmentInteraction(String mId, String mProductName, String mItemRate, int minteger, int update);\n }",
"public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction();\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onComidaSelected(int comidaId);\n }",
"public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Qualification q);\n }",
"public interface OnFragmentInteractionListener {\n void onReceiverAcceptRequest(int nextState, String requestId);\n }",
"public interface FragMainLife\n{\n\tpublic void onResumeFragMainLife();\n}",
"public interface OnFragmentListener {\n\n void onAction(Intent intent);\n}",
"public interface IBaseFragmentActivity {\n void onFragmentExit(BaseFragment fragment);\n\n void onFragmentStartLoading(BaseFragment fragment);\n\n void onFragmentFinishLoad(BaseFragment fragment);\n}",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(String string);\n }",
"void onFragmentInteraction(Object ref);",
"public interface OnParametersFragmentInteractionListener {\n public void startTask();\n }",
"public interface OnFragmentInteractionListener {\n // Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Parcelable selectedItem);\n }",
"public interface FragmentInterface {\r\n void fragmentBecameVisible();\r\n}",
"public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(String key);\n }",
"public interface OnFragmentInteractionListener {\n void newList();\n\n void searchList();\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void pasarALista();\n }",
"public interface MainGameActivityCallBacks {\n public void onMsgFromFragmentToMainGame(String sender, String strValue);\n}",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n\n /**\n * This interface's single method. The hosting Activity must implement this interface and\n * provide an implementation of this method so that this Fragment can communicate with the\n * Activity.\n *\n * @param spotId\n */\n// void onFragmentInteraction(Uri uri);\n void onFragmentInteraction(int spotId);\n// void onFragmentInteraction(LatLng spotPosition);\n\n }",
"public interface IFragment {\n void onFragmentRefresh();\n\n void onMenuClick();\n}",
"public interface FragmentInterface {\n\n void onCreate();\n\n void initLayout();\n\n void updateLayout();\n\n void sendInitialRequest();\n}",
"public interface OnFragmentInteractionListener {\n void onFragmentInteraction(String accessToken, String network);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(View v);\n }",
"public interface OnFragmentInteractionListener {\n void swapFragments(SetupActivity.SetupActivityFragmentType type);\n\n void addServer(String name, String ipAddress, String port);\n }",
"public interface OnFragmentInteractionListener {\n\t\tvoid restUp(IGameState gameState);\n\t\tvoid restartGame();\n\t}",
"public interface OnFragmentInteractionListener\n {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface PersonalFragmentView extends BaseMvpView {\n\n}",
"public interface OnFragmentInteractionListener {\n void onFinishCreatingRequest();\n }",
"void onFragmentInteraction(View v);",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(ArrayList<Recepie> recepieList);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(String id);\n }",
"void onFragmentInteractionMain();",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void showRestaurantDetail(Map<String, Object> objectMap);\n\n public void showAddRestaurantFragment(String location);\n }",
"public interface FragmentNavigator {\n\n void SwitchFragment(Fragment fragment);\n}",
"public interface FragmentModellnt {\n void FragmentM(OnFinishListener onFinishListener,String dataId);\n}",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n //void onFragmentInteraction(Uri uri);\n }",
"void onFragmentInteraction(String id);",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(ArrayList naleznosci, String KLUCZ);\n }",
"public interface OnFragmentInteractionListener {\r\n // TODO: Update argument type and name\r\n void onEditFragmentInteraction(Student student);\r\n }",
"public interface OnFragmentInteractionListener {\n void onStartFragmentStarted();\n\n void onStartFragmentStartTracking();\n\n void onStartFragmentStopTracking();\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n Long onFragmentInteraction();\n }",
"public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Uri uri);\n void onFragmentInteraction(String id);\n}",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public interface IBaseFragment extends IBaseView {\n /**\n * 出栈到目标fragment\n * @param targetFragmentClass 目标fragment\n * @param includeTargetFragment 是否包涵目标fragment\n * true 目标fragment也出栈\n * false 出栈到目标fragment,目标fragment不出栈\n */\n void popToFragment(Class<?> targetFragmentClass, boolean includeTargetFragment);\n\n /**\n * 跳转到新的fragment\n * @param supportFragment 新的fragment继承SupportFragment\n */\n void startNewFragment(@NonNull SupportFragment supportFragment);\n\n /**\n * 跳转到新的fragment并出栈当前fragment\n * @param supportFragment\n */\n void startNewFragmentWithPop(@NonNull SupportFragment supportFragment);\n\n /**\n * 跳转到新的fragment并返回结果\n * @param supportFragment\n * @param requestCode\n */\n void startNewFragmentForResult(@NonNull SupportFragment supportFragment,int requestCode);\n\n /**\n * 设置fragment返回的result\n * @param requestCode\n * @param bundle\n */\n void setOnFragmentResult(int requestCode, Bundle bundle);\n\n /**\n * 跳转到新的Activity\n * @param clz\n */\n void startNewActivity(@NonNull Class<?> clz);\n\n /**\n * 携带数据跳转到新的Activity\n * @param clz\n * @param bundle\n */\n void startNewActivity(@NonNull Class<?> clz,Bundle bundle);\n\n /**\n * 携带数据跳转到新的Activity并返回结果\n * @param clz\n * @param bundle\n * @param requestCode\n */\n void startNewActivityForResult(@NonNull Class<?> clz,Bundle bundle,int requestCode);\n\n /**\n * 当前Fragment是否可见\n * @return true 可见,false 不可见\n */\n boolean isVisiable();\n\n /**\n * 获取当前fragment绑定的activity\n * @return\n */\n Activity getBindActivity();\n\n}",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onSocialLoginInteraction();\n }",
"public interface OnFragmentInteractionListener {\n /**\n * On fragment interaction.\n *\n * @param uri the uri\n */\n// TODO: Update argument type and name\n public void onFragmentInteraction(Uri uri);\n }",
"public interface OnFragmentListener {\n void onClick(Fragment fragment);\n}",
"public interface OnFragmentInteractionListener {\n void playGame(Uri location);\n }",
"public interface LoginFragmentListener {\n public void OnRegisterClicked();\n public void OnLoginClicked(String User, String Pass);\n}",
"public interface MoveFragment {\n\n\n public void moveFragment(Fragment selectedFragment);\n\n}",
"public interface OnProductItemFragmentInteraction{\r\n public void itemSelected(Producto product);\r\n }",
"public interface ChangeFragmentListener {\n void changeFragment();\n}",
"public interface FragmentInterface {\n public void fragmentResult(Fragment fragment, String title);\n}",
"@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n //this registers this fragment to recieve any EventBus\n EventBus.getDefault().register(this);\n }",
"void onFragmentInteraction(int position);",
"public interface AddFarmFragmentView extends BaseView {\n\n\n}",
"void OpenFragmentInteraction();",
"public interface OnFragmentInteractionListener {\n\t\t// TODO: Update argument type and name\n\t\tpublic void onFragmentInteraction(Uri uri);\n\t}",
"public interface FragmentDataObserver {\n void getDataFromActivity(String data);\n\n}",
"public interface OnFragInteractionListener {\n\n // replace top fragment with this fragment\n interface OnMainFragInteractionListener {\n void onWifiFragReplace();\n void onHistoryFragReplace();\n void onHistoryWithOsmMapFragReplace();\n void onMainFragReplace();\n }\n\n // interface for WifiPresenterFragment\n interface OnWifiScanFragInteractionListener {\n void onGetDataAfterScanWifi(ArrayList<WifiLocationModel> list);\n void onAllowToSaveWifiHotspotToDb(String ssid, String pass, String encryption, String bssid);\n }\n\n // interface for HistoryPresenterFragment\n interface OnHistoryFragInteractionListener {\n // get wifi info\n void onGetWifiHistoryCursor(Cursor cursor);\n // get mobile network generation\n void onGetMobileHistoryCursor(Cursor cursor);\n // get wifi state and date\n void onGetWifiStateAndDateCursor(Cursor cursor);\n }\n\n interface OnMapFragInteractionListerer {\n void onGetWifiLocationCursor(Cursor cursor);\n }\n}",
"public interface PesonageFragmentView extends MvpView {\n\n}",
"public interface OnUsersFragmentInteractionListener {\n void onListFragmentInteraction(User item);\n }",
"public interface MainScreeInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteractionMain();\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onClickNextTurn();\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction();\n\n void changeBottomNavSelection(int menuItem);\n }",
"public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Uri uri);\n}",
"public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Uri uri);\n }",
"public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Uri uri);\n }",
"public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Uri uri);\n }",
"public interface OnFragmentInteractionListener {\n void onSignoutClicked();\n\n void onExtraScopeRequested();\n }",
"public interface OnListFragmentInteractionListener {\n void onListFragmentInteraction(Note note);\n}",
"interface OnMainFragInteractionListener {\n void onWifiFragReplace();\n void onHistoryFragReplace();\n void onHistoryWithOsmMapFragReplace();\n void onMainFragReplace();\n }"
] | [
"0.73235685",
"0.720846",
"0.71351564",
"0.71232235",
"0.71222746",
"0.70140475",
"0.69755626",
"0.69755626",
"0.69755626",
"0.69729954",
"0.6966197",
"0.696411",
"0.6959307",
"0.6952445",
"0.6942727",
"0.6933436",
"0.6929703",
"0.6927678",
"0.6921319",
"0.69094676",
"0.69028056",
"0.6895372",
"0.68927324",
"0.6880999",
"0.6880026",
"0.68737274",
"0.6863129",
"0.6859932",
"0.68595344",
"0.68575877",
"0.68548816",
"0.68428016",
"0.68379664",
"0.68289196",
"0.6816404",
"0.68150723",
"0.68089",
"0.67847985",
"0.67684835",
"0.6767703",
"0.6767703",
"0.6767703",
"0.6767703",
"0.6767703",
"0.6767703",
"0.6767703",
"0.6767703",
"0.6767703",
"0.6764629",
"0.67597383",
"0.67551434",
"0.67517775",
"0.6697843",
"0.6680465",
"0.66718787",
"0.6669894",
"0.6668262",
"0.6660333",
"0.66598123",
"0.6653774",
"0.6650875",
"0.66430604",
"0.66430604",
"0.66430604",
"0.66430604",
"0.66430604",
"0.66430604",
"0.66430604",
"0.66430604",
"0.66430604",
"0.66430604",
"0.66430604",
"0.66427493",
"0.66369635",
"0.66343427",
"0.66307056",
"0.66244084",
"0.6624361",
"0.66167486",
"0.66087484",
"0.66085523",
"0.6607902",
"0.660529",
"0.65965044",
"0.6595662",
"0.6587234",
"0.657059",
"0.65690625",
"0.65600747",
"0.6558892",
"0.6553822",
"0.6548976",
"0.6547096",
"0.6541556",
"0.65379137",
"0.6532477",
"0.6532477",
"0.6532477",
"0.6518218",
"0.65166336",
"0.65164554"
] | 0.0 | -1 |
Bass is the lowest note, D (below 1st ledger) | public int toMidi(Note n) {
int normIndex = n.getNoteIndex() + numOffset + (7 * octaveOffset);
int numOctaves = normIndex/7;
int midiAddend = MIDI_OFFSETS[normIndex - (7*numOctaves)];
return 38 + midiAddend + 12*numOctaves; // 37 is low D
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int minNoteValue();",
"@Override\n public Note getLowestNote() {\n List<Note> currentNotes = this.getNotes();\n int size = currentNotes.size();\n Note lowestNote = null;\n\n for (int i = 0; i < size; i++) {\n Note currentNote = currentNotes.get(i);\n\n if (currentNote.isLower(lowestNote)) {\n lowestNote = currentNote;\n }\n }\n if (lowestNote == null) {\n throw new IllegalArgumentException(\"No Notes To Compare\");\n }\n return lowestNote;\n }",
"@Override\n public Note getLowest() {\n if (this.sheet.isEmpty()) {\n throw new IllegalArgumentException(\"No note is added.\");\n }\n Note currentLow = new Note(this.low.getDuration(), this.low.getOctave(),\n this.low.getStartMeasure(), this.low.getPitch(), this.low\n .getIsHead(), this.low.getInstrument(), this.low.getVolume());\n for (int i = 0; i < this.sheet.size(); i++) {\n for (Note n : this.sheet.get(i)) {\n if (currentLow.compareTo(n) == 1) {\n currentLow = n;\n }\n }\n }\n return currentLow;\n }",
"public int getMinimun(){\n int lowGrade = grades[0]; //assume que grades[0] é a menor nota\n \n //faz um loop pelo array de notas\n for(int grade: grades){\n //se nota for mais baixa que lowGrade, essa note é atribuida a lowGrade\n if(grade < lowGrade){\n lowGrade = grade;\n }\n }\n \n return lowGrade;\n }",
"public PrimEdge calculateMinimum() {\n int minWage = Integer.MAX_VALUE;\n PrimEdge result = null;\n for (Map.Entry<Integer, PrimEdge> entry : dtable.entrySet()) {\n if (entry.getValue().getWage() < minWage) {\n result = entry.getValue();\n minWage = entry.getValue().getWage();\n }\n }\n return result;\n }",
"private double findMin(){\r\n Set<Map.Entry<Double, Double>> list = heap.entrySet();\r\n double minKey = heap.firstKey();\r\n double minVal = MAX_WEIGHT;\r\n if (list != null){\r\n for (Map.Entry<Double, Double> entry: list){\r\n if (minVal > entry.getValue()){\r\n minVal = entry.getValue();\r\n minKey = entry.getKey();\r\n }\r\n }\r\n }\r\n return minKey;\r\n }",
"org.apache.xmlbeans.XmlDecimal xgetSingleBetMinimum();",
"private static int min_coins(int[] d, int k) {\n\t\t\n\t\treturn -1;\n\t}",
"java.math.BigDecimal getSingleBetMinimum();",
"public int getLowestChromID();",
"public int getAdc_min ()\n {\n return adc_min_;\n }",
"public static double findMin(double[] da) {\n\n\t\t// fjern = \"0.0\" når metoden implementeres for ikke få forkert minimum\n\t\tdouble min = da[0];\n\t\t\n\t\t// TODO\n\t\t// OPPGAVE - START\n\t\tfor(double d : da) {\n\t\t\tif(d < min) {\n\t\t\t\tmin = d;\n\t\t\t}\n\t\t}\n\t\t// OPPGAVE - SLUT\n\t\treturn min;\n\t}",
"java.math.BigDecimal getWagerMinimum();",
"private double getLowest()\n {\n if (currentSize == 0)\n {\n return 0;\n }\n else\n {\n double lowest = scores[0];\n for (int i = 1; i < currentSize; i++)\n {\n if (scores[i] < lowest)\n {\n scores[i] = lowest;\n }\n }\n return lowest;\n }\n }",
"public double min(){\r\n\t\t//variable for min val\r\n\t\tdouble min = this.data[0];\r\n\t\t\r\n\t\tfor (int i = 1; i < this.data.length; i++){\r\n\t\t\t//if the minimum is more than the current index, change min to that value\r\n\t\t\tif (min > this.data[i]){\r\n\t\t\t\tmin = this.data[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\t//return the minimum val\r\n\t\treturn min;\r\n\t}",
"public float getminP() {\n Reading minPressureReading = null;\n float minPressure = 0;\n if (readings.size() >= 1) {\n minPressure = readings.get(0).pressure;\n for (int i = 1; i < readings.size(); i++) {\n if (readings.get(i).pressure < minPressure) {\n minPressure = readings.get(i).pressure;\n }\n }\n } else {\n minPressure = 0;\n }\n return minPressure;\n }",
"public int getMin() {\r\n // get root\r\n RedBlackTree.Node<Grade> min = rbt.root;\r\n // loop to left of tree\r\n while (min.leftChild != null) {\r\n min = min.leftChild;\r\n }\r\n\r\n return min.data.getGrade();\r\n }",
"public int getMin() {\n\t\t\treturn harr[0];\n\t\t}",
"private Pair Flats(double[] notes){\n\t\t//Bb (at 10) is the first one\n\t\t//Also, Cb = B and Fb = E\n\t\tdouble error = 0;\n\t\tint bestkey = 7;\n\t\t//First check for the keys with Cb and Fb\n\t\tint[] drkeys = new int[]{1, 6, 8};\n\t\tfor(int i: drkeys){\n\t\t\terror += notes[i+1];\n\t\t}\n\t\terror += notes[0];\n\t\tif (notes[5]<notes[4]){\n\t\t\terror+=notes[5];\n\t\t}\n\t\telse{\n\t\t\terror+=notes[4];\n\t\t\tbestkey = 6;\n\t\t}\n\t\tfor(int i=0; i<6; i++){\n\t\t\tdouble tp = flatsError(notes, i);\n\t\t\tif (tp < error){\n\t\t\t\terror = tp;\n\t\t\t\tbestkey =i;\n\t\t\t}\n\t\t}\n\t\treturn new Pair(error, bestkey);\n\t}",
"private int getStartOfBEDentry(final BEDentry entry ) {\n\t\tif( entry.getStrand().equals(\"+\") ) { \n\t\t\treturn entry.getChromStart(); \n\t\t} else {\n\t\t\treturn entry.getChromEnd(); \n\t\t}\n\t}",
"static void minimumBribes(int[] q) {\r\n int bribes = 0;\r\n boolean valid = true;\r\n int index = 1;\r\n \r\n // We get the length of the input array\r\n int size = q.length; \r\n \r\n // We cycle through the input array\r\n for (int i = 0; i < size; i++) {\r\n int actual = q[i];\r\n \r\n // We check if the current person has surely swapped position more than two times since it appears before they are supposed to\r\n if (actual > index) {\r\n int difference = actual - index;\r\n if (difference > 2) {\r\n valid = false;\r\n break;\r\n }\r\n }\r\n \r\n // We check the number of bribes by counting how many persons with bigger IDs have already swapped place with the current one\r\n // NOTE: We can safely begin to check from position (actual-2) since higher numbers of swaps would have been caught by the previous if condition\r\n for (int j = actual-2; j < index; j++) {\r\n if (j < 0) {\r\n continue;\r\n }\r\n if (actual < q[j]) {\r\n bribes += 1;\r\n }\r\n }\r\n \r\n index += 1;\r\n }\r\n \r\n // Checks if the result is valid, and if so, it prints it\r\n if (valid == false) {\r\n System.out.println(\"Too chaotic\");\r\n }\r\n else {\r\n System.out.println(bribes);\r\n }\r\n}",
"public double min() {\n/* 305 */ Preconditions.checkState((this.count != 0L));\n/* 306 */ return this.min;\n/* */ }",
"private static int min(int d1,int d2){\n\t\treturn d1<d2?d1:d2;\n\t}",
"double getLeft(double min);",
"public int minSeq() {\n lock.lock();\n int globalMin = dones[me];\n\n for(int i=0;i<dones.length;i++) {\n if(dones[i] < globalMin) {\n globalMin = dones[i];\n }\n }\n\n /*\n Iterator<Map.Entry<Integer,Instance<T>>> iter = (Iterator<Map.Entry<Integer,Instance<T>>>)seqMap.entrySet().iterator();\n while(iter.hasNext()) {\n int key = iter.next().getKey();\n if(key <= globalMin && seqMap.get(key).getStatus() == Status.DECIDED) iter.remove();\n }\n */\n lock.unlock();\n return globalMin+1;\n }",
"private static double min(Double[] darray){\n\t\tdouble min = darray[0];\n\t\tfor ( double dd : darray){\n\t\t\tmin = Math.min(min,dd);\n\t\t}\n\t\treturn min;\n\t}",
"int maxNoteValue();",
"public double getLowestGrade(){\n double lowestGrade = 100;\n for (int i = 0; i<students.size(); i++){\n if (students.get(i).getGrades()< lowestGrade)\n lowestGrade = students.get(i).getGrades();\n } // end for\n return lowestGrade;\n }",
"public int minimumPenalty() {\n return dp[dp.length-1];\n }",
"double getMin();",
"double getMin();",
"public int minkeys() {\n\t\tint min = 0;\n\t\tif (parentref == null) {\n\t\t\treturn 1;\n\t\t}\n\t\tmin = (int)Math.ceil((degree) / 2.0) - 1;\n\t\t//min = (int)Math.ceil(degree / 2.0);\n\t\treturn Math.max(min, 0);\n\t}",
"public int getMinimumValue() {\n/* 276 */ return -this.s.getMaximumValue();\n/* */ }",
"public double getMinimumDouble() {\n/* 201 */ return this.min;\n/* */ }",
"int min() {\n\t\t// added my sort method in the beginning to sort our array\n\t\tint n = array.length;\n\t\tint temp = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 1; j < (n - i); j++) {\n\t\t\t\tif (array[j - 1] > array[j]) {\n\t\t\t\t\ttemp = array[j - 1];\n\t\t\t\t\tarray[j - 1] = array[j];\n\t\t\t\t\tarray[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// finds the first term in the array --> first term should be min if\n\t\t// sorted\n\t\tint x = array[0];\n\t\treturn x;\n\t}",
"public double minimumDue(){\n return ((this.creditHours*this.feePerCreditHour)-this.scholarshipAmount+((this.healthInsurancePerAnnum*4)/12))/2;\n }",
"protected final int getMin() {\n\treturn(this.min);\n }",
"static int findMin(double[] pq)\n\t{\n\t\tint ind = -1; \n\t\tfor (int i = 0; i < pq.length; ++i)\n\t\t\tif (pq[i] >= 0 && (ind == -1 || pq[i] < pq[ind]))\n\t\t\t\tind = i;\n\t\treturn ind;\n\t}",
"org.apache.xmlbeans.XmlDecimal xgetWagerMinimum();",
"public abstract int getMinimumValue();",
"public Bid getLowestBid() {\n return jobBids.get(jobBids.size() - 1);\n }",
"private static String findHighParent_B(BabelSynset bs) throws IOException {\n\t\tdouble weight = 0.0;\n\t\tString id = null;\n\t\tArrayList<String> B_parentsDouble = new ArrayList<String>();\n\t\tList<BabelSynsetIDRelation> edges = bs.getEdges(BabelPointer.ANY_HYPERNYM);\n\t\t\n\t\tfor(BabelSynsetIDRelation b : edges) {\n\t\t\tweight += b.getWeight();\n\t\t}\n\t\tif(weight == 0.0) return edges.get(0).getTarget();\n\t\t\n\t\tweight = 0.0;\n\t\tfor(BabelSynsetIDRelation b : edges) {\n\t\t\tString b_id = b.getTarget();\n\t\t\tif(!B_parentsDouble.contains(b_id) || (B_parentsDouble.contains(b_id) && b.getWeight() != 0.0)) {\n\t\t\t\tdouble temp_weight = b.getWeight();\n\t\t\t\tif(temp_weight > weight && !B_Ancestors.contains(b_id)) {\n\t\t\t\t\tweight = temp_weight;\n\t\t\t\t\tid = b_id;\n\t\t\t\t}\n\t\t\t\tB_parentsDouble.add(b_id);\n\t\t\t}\n\t\t}\n\t\tif(id == null) id = \"bn:00031027n\";\n\t\treturn id;\n\t}",
"static int minVal(int a, int b, int c, int d){ //minVal function evaluates the lowest value takes 4 ints and returns an int\n \n //logic: (logic table)\n //\n int[] val = new int[]{a, b, c, d}; //loads it into a array to make it easier to cycle through\n if(a == minVal(val[0], val[1])){//if a is smaller than b\n if (a == minVal(val[0], val[2])){// if a is smaller than c\n if(a == minVal(val[0], val[3])) //if a is smaller than d, return a\n return a;\n return val[3]; // if d is not smaller than a but a is smaller than the rest return d\n }//end if\n else if(c == minVal(val[2], val[3])) //if a is smaller than b but not smaller than c, check if c is smaller than d\n return val[2];//return c\n return val[3];// if a is smaller than b but not smaller than c, and c is not smaller than d, return d \n }//end if \n else{ //if(b == minVal(val[0], val[1])){ //if b is smaller than a\n if (b == minVal(val[1], val[2])){ //if b is smaller than c\n if(b == minVal(val[1], val[3])) //if b is smaller than d, return b\n return b;\n return val[3];// if d is not smaller than a but a is smaller than the rest return d\n }//end if\n else if(c == minVal(val[2], val[3]))//if a is smaller than b but not smaller than c, check if c is smaller than d\n return val[2];//return c\n return val[3];// if a is smaller than b but not smaller than c, and c is not smaller than d, return d \n }//end else\n \n }",
"Double getMinimumValue();",
"E minVal();",
"private int getBinJ(Location l)\r\n {\r\n return (int)((l.getY()-bl.getY())/dj);\r\n }",
"int min() {\n return min;\r\n }",
"int calculateMinimumHP(int[][] dungeon) {\n int m = dungeon.length;\n assert (m > 0);\n int n = dungeon[0].length;\n int[] dp = new int[n + 1];\n for (int j = n - 1; j >= 0; j--) dp[j] = Integer.MAX_VALUE;\n dp[n] = 1;\n\n for (int i = m - 1; i >= 0; i--) {\n for (int j = n - 1; j >= 0; j--)\n dp[j] = Math.max(1, Math.min(dp[j], dp[j + 1]) - dungeon[i][j]);\n //System.out.println(Arrays.toString(dp));\n dp[n] = Integer.MAX_VALUE;\n }\n return dp[0];\n }",
"public int findMin() {\n\t\tint min = (int)data.get(0);\n\t\tfor (int count = 1; count < data.size(); count++)\n\t\t\tif ((int)data.get(count) < min)\n\t\t\t\tmin = (int)data.get(count);\n\t\treturn min;\n\t}",
"private int minWeightST(int weights[], Boolean mstSet[]){\r\n int min = Integer.MAX_VALUE;\r\n int minIndex = -1;\r\n\r\n for(int v=0; v<rideCount; v++){\r\n if(!mstSet[v] && weights[v]<min){\r\n min = weights[v];\r\n minIndex = v;\r\n }\r\n }\r\n return minIndex;\r\n }",
"private double min(double a, double b) {\n if (a > b) {\n return b;\n }\n return a;\n }",
"public T findLowest(){\n T lowest = array[0]; \n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()<lowest.doubleValue())\n {\n lowest = array[i]; \n } \n }\n return lowest;\n }",
"java.math.BigDecimal getMultipleBetMinimum();",
"private int minWeight(int dist[], Boolean sptSet[]){\n int min = Integer.MAX_VALUE;\r\n int minIndex = -1;\r\n\r\n for(int n = 0; n< rideCount; n++){\r\n if(!sptSet[n] && dist[n] <= min) {\r\n min = dist[n];\r\n minIndex = n;\r\n }\r\n }\r\n return minIndex;\r\n }",
"private double getMin() {\n return Collections.min(values.values());\n }",
"private static Vertex lowestFInOpen(List<Vertex> openList) {\n\t\tVertex cheapest = openList.get(0);\n\t\tfor (int i = 0; i < openList.size(); i++) {\n\t\t\tif (openList.get(i).getF() < cheapest.getF()) {\n\t\t\t\tcheapest = openList.get(i);\n\t\t\t}\n\t\t}\n\t\treturn cheapest;\n\t}",
"double getArchiveMinInt();",
"public double minValue() {\n return 0;\r\n }",
"org.apache.xmlbeans.XmlDecimal xgetMultipleBetMinimum();",
"public int calculateMinimumHP(int[][] dungeon) {\n int rows = dungeon.length;\n int columns = dungeon[0].length;\n\n //init dp table\n int[][] dp = new int[rows][columns];\n\n dp[rows-1][columns-1] = Math.max(1 - dungeon[rows-1][columns-1],1);\n\n //last row\n for(int j = columns-2; j>=0; j--){\n dp[rows-1][j]=Math.max(dp[rows-1][j+1]-dungeon[rows-1][j], 1);\n }\n\n //last column\n for (int i = rows-2; i >=0 ; i--) {\n dp[i][columns-1]= Math.max(dp[i+1][columns-1]-dungeon[i][columns-1],1);\n }\n\n for (int i = rows - 2; i >= 0; i--) {\n for (int j = columns - 2; j >= 0; j--) {\n\n int down = Math.max(dp[i + 1][j] - dungeon[i][j], 1);\n int right = Math.max(dp[i][j + 1] - dungeon[i][j], 1);\n dp[i][j] = Math.min(right, down);\n\n }\n }\n\n return dp[0][0];\n }",
"public int findMin() {\r\n\t\treturn this.min.value;\r\n\t}",
"int getMin( int min );",
"int minPriority(){\n if (priorities.length == 0)\n return -1;\n\n int index = 0;\n int min = priorities[index];\n\n for (int i = 1; i < priorities.length; i++){\n if ((priorities[i]!=(-1))&&(priorities[i]<min)){\n min = priorities[i];\n index = i;\n }\n }\n return values[index];\n }",
"public double min() {\n\t\tif (count() > 0) {\n\t\t\treturn _min.get();\n\t\t}\n\t\treturn 0.0;\n\t}",
"public byte get_min() {\n return (byte)getSIntBEElement(offsetBits_min(), 8);\n }",
"static void minimumBribes(int[] q) {\nint count =0;\nboolean isprint = true;\nint first = 1;\nint second = 2;\nint third = 3;\n\n for(int i=0;i< q.length-1;i++){\n \n if (q[i] == first) {\n first = second;\n second = third;\n third++;\n }else if(q[i]== second){\n second = third;\n third++;\n count++;\n }else if(q[i]==third){\n third++;\n count++;\n count++;\n }else{\n isprint = false;\n }\n }\n\n // if((q[i-1]-q[i]) > 2){\n // System.out.println(\"Too chaotic\");\n // isprint = false;\n // break; \n // }else if((q[i-1]-q[i])==1){\n // count++;\n // }else if((q[i-1]-q[i])==2){\n // count+=2;\n // }\n \n //}\n if(isprint){\n System.out.println(count);\n }else{\n System.out.println(\"Too chaotic\");\n }\n }",
"int getMindestvertragslaufzeit();",
"private double getMin() {\n return min;\n }",
"public int getMin()\n\t{\n\t\treturn min;\n\t}",
"public String getLowestChromKey();",
"@Test\n public void min() {\n assertEquals(2103, SuggestionUtil.min(2103, 2103, 2103));\n\n // EP: two numbers same and one different\n assertEquals(2103, SuggestionUtil.min(2103, 2104, 2103));\n\n // EP: all three numbers different\n assertEquals(2103, SuggestionUtil.min(2103, 2104, 2105));\n }",
"public double getAboveGroundBiomass(double dbh) {\n\t\tdouble beta0 = -2.5356, beta1 = 2.4349;\r\n\t\treturn Math.exp(beta0 + beta1 * Math.log(dbh));\r\n\t}",
"public double getMinimum()\n {\n return Math.min(first, second);\n }",
"public String min()\r\n\t {\r\n\t\t if(this.min != null)\r\n\t\t {\r\n\t\t\t return this.min.getValue(); \r\n\t\t }\r\n\t\t return null;\r\n\t }",
"private Node getLowestNode(Set<Node> openSet)\r\n {\r\n // find the node with the least f\r\n double minF = Double.MAX_VALUE;\r\n Node[] openArray = openSet.toArray(new Node[0]);\r\n\r\n Node q = null;\r\n for (int i = 0; i < openArray.length; ++i)\r\n {\r\n if (openArray[i].f < minF) \r\n {\r\n minF = openArray[i].f;\r\n q = openArray[i];\r\n }\r\n }\r\n return q;\r\n }",
"public double minDifference()\n {\n double minD = 1000.0; // setting unreasonably high\n double testD = 0.0;\n \n for (int i=0; i < data.length -1; i++) // stopping 1 early because reading ahead\n {\n testD = Math.abs(data[i]-data[i+1]);\n if (testD < minD)\n {\n minD = testD;\n }\n }\n \n \n return minD;\n }",
"public int findSmallest() {\n\t/*\n\t Cases:\n\t If last or only node, return datum\n\n\t Otherwise:\n\t Return whatever is smaller: \n\t The datum of the current node,\n\t or the datum of the next node \n\t*/ \n\tif (next == null) return datum; \n\telse {\n\t int nextDatum = next.findSmallest();\n\t if (nextDatum < datum) return nextDatum;\n\t else return datum;\n\t}\n }",
"public int getMin(){\n\t\treturn min;\n\t}",
"public int getbestline() {\n\t\tint i=0;\n\t\tint biggest=0;\n\t\tint keep_track=0;\n\t\twhile(i < amount.length) {\n\t\t\tif(Faucets.amount[i] > biggest) {\n\t\t\t\tbiggest = Faucets.amount[i];\n\t\t\t\tkeep_track = i;\n\t\t\t}\n\t\t\ti+=1;\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"Keep_Track = \\\"\" + keep_track + \"\\\"\");\n\t\treturn keep_track;\n\t\t\n\t}",
"public Point getMin () {\r\n\r\n\treturn getA();\r\n }",
"public Number getMinimum() {\n return ((ADocument) getDocument()).min;\n }",
"static int findMin0(int[] nums) {\r\n \r\n // **** sanity check ****\r\n if (nums.length == 1)\r\n return nums[0];\r\n\r\n // **** check if there is no rotation ****\r\n if (nums[nums.length - 1] > nums[0])\r\n return nums[0];\r\n\r\n // **** loop looking for the next smallest value ****\r\n for (int i = 0; i < nums.length - 1; i++) {\r\n if (nums[i] > nums[i + 1])\r\n return nums[i + 1];\r\n }\r\n\r\n // **** min not found ****\r\n return -1;\r\n }",
"public int getMinimum() {\r\n return min;\r\n }",
"public double getMinimum() {\n return (min);\n }",
"java.math.BigDecimal getFractionalMinimum();",
"@Override\n public Note getHighestNote() {\n List<Note> currentNotes = this.getNotes();\n int size = currentNotes.size();\n Note highestNote = null;\n\n for (int i = 0; i < size; i++) {\n Note currentNote = currentNotes.get(i);\n\n if (currentNote.ishigher(highestNote)) {\n highestNote = currentNote;\n }\n }\n if (highestNote == null) {\n throw new IllegalArgumentException(\"No Notes To Compare\");\n }\n return highestNote;\n }",
"public double getMinimumValue() { return this.minimumValue; }",
"public double getLow() {return low;}",
"static void minimumBribes(int[] q) {\n int swaps = 0;\n for (int i = 0; i < q.length; i++) {\n if ((q[i] - (i+1)) > 2) {\n System.out.println(\"Too chaotic\");\n return;\n }\n for (int j = i + 1; j < q.length; j++) {\n if (q[i] > q[j]) {\n int t = q[j];\n q[j] = q[i];\n q[i] = t;\n swaps++;\n }\n }\n }\n\n System.out.println(swaps);\n }",
"private static int getFirst( final Comparable[] c ) {\n\t\tfor ( int i = c.length - 2; i >= 0; --i )\n\t\t\tif ( c[ i ].compareTo( c[ i + 1 ] ) < 0 )\n\t\t\t\treturn i;\n\t\treturn -1;\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t\tint[] notes = {1, 4, 10, 15, 15, 20, 19, 17};\n\t\t\n\t\tArrays.sort(notes);\n \n \n \n int min = notes[0];\n System.out.println(\"Le nombre le plus petit est \" + min);\n \n int max= notes[notes.length - 1];\n System.out.println(\"Le nombre le plus grand est \" + max);\n\n\t}",
"private Point lowestFInOpen() {\n\t\tPoint lowestP = null;\n\t\tfor (Point p : openset) {\n\t\t\tif (lowestP == null) \n\t\t\t\tlowestP = p;\n\t\t\telse if (fscores.get(p) < fscores.get(lowestP))\n\t\t\t\tlowestP = p;\n\t\t}\n\t\treturn lowestP;\n\t}",
"public int minCost(int[][] costs) {\n\nif(costs== null || costs.length == 0)\nreturn 0;\n// int n_houses = costs.length ;\nint lastR = costs[0][0];\nint lastB = costs[0][1];\nint lastG = costs[0][2];\nint currR,currB,currG ;\nfor(int i = 1; i< costs.length ; i++ ){\ncurrR = costs[i][0] + Math.min(lastB,lastG);\ncurrB = costs[i][1] + Math.min(lastR,lastG);\ncurrG = costs[i][2] + Math.min(lastR,lastB);\nlastR = currR;\nlastB = currB;\nlastG = currG;\n}\n// return Math.min(Math.min(lastR,lastB),lastG);\nreturn Math.min(Math.min(lastR,lastB),lastG);\n}",
"public double getMinDoubleValue();",
"static void d() {\n\t\t\t\tint B[] = new int[12];\n\t\t\t\tint tam = 0, tam1 = 0;\n\t\t\t\tB[0] = 12;\n\t\t\t\tB[1] = 21;\n\t\t\t\tB[2] = 47;\n\t\t\t\tB[3] = 9;\n\t\t\t\tB[4] = 56;\n\t\t\t\tB[5] = 43;\n\t\t\t\tB[6] = 50;\n\t\t\t\tB[7] = 54;\n\t\t\t\tB[8] = 51;\n\t\t\t\tB[9] = 41;\n\t\t\t\tB[10] = 97;\n\t\t\t\tB[11] = 12;\n\t\t\t\tint max = B[0];\n\t\t\t\tfor (int i = 1; i < B.length; i++) {\n\t\t\t\t\tif (B[i] > max) {\n\t\t\t\t\t\tmax = B[i];\n\t\t\t\t\t\ttam = i;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor (int i = tam; i > 0; i--) {\n\t\t\t\t\tB[i] = B[i - 1];\n\t\t\t\t}\n\t\t\t\tB[0] = max;\n\n\t\t\t\tinMang(B);\n\n\t\t\t\tmax = B[1];\n\t\t\t\ttam = 0;\n\t\t\t\tfor (int i = 2; i < B.length; i++) {\n\t\t\t\t\tif (B[i] > max) {\n\t\t\t\t\t\tmax = B[i];\n\t\t\t\t\t\ttam = i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor (int i = tam; i > 1; i--) {\n\t\t\t\t\tB[i] = B[i - 1];\n\t\t\t\t}\n\t\t\t\tB[1] = max;\n\t\t\t\tinMang(B);\n\n\t\t\t\tmax = B[2];\n\t\t\t\ttam = 0;\n\t\t\t\tfor (int i = 3; i < B.length; i++) {\n\t\t\t\t\tif (B[i] > max) {\n\t\t\t\t\t\tmax = B[i];\n\t\t\t\t\t\ttam = i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor (int i = tam; i > 2; i--) {\n\t\t\t\t\tB[i] = B[i - 1];\n\t\t\t\t}\n\t\t\t\tB[2] = max;\n\t\t\t\tinMang(B);\n\t}",
"public Node binomialHeapMinimum() {\n\t\tNode y = null;\n\t\tNode x = this.head;\n\t\tint min = Integer.MAX_VALUE;\n\t\twhile(x!=null) {\n\t\t\tif (x.key < min) {\n\t\t\t\tmin = x.key;\n\t\t\t\ty = x;\n\t\t\t}\n\t\t\tx = x.rightSibling;\n\t\t}\n\t\treturn y;\n\t}",
"protected final double getMinDifference() {\r\n \r\n double difference = 0;\r\n \r\n for(int i = 0; i < this.D; i++) {\r\n difference += Math.pow(this.f.max(i)-this.f.min(i), 2)*0.001;\r\n }\r\n \r\n return difference;\r\n \r\n }",
"public int getMin() {\n return min;\n }",
"public int getMin() {\n return min;\n }",
"public int getMin() {\n return min;\n }",
"public double lower()\n\t{\n\t\treturn _dblLower;\n\t}"
] | [
"0.71274215",
"0.6221653",
"0.61725956",
"0.61530465",
"0.60377294",
"0.5882717",
"0.58216184",
"0.5787721",
"0.5777335",
"0.5769574",
"0.5768248",
"0.5751711",
"0.57226855",
"0.5705118",
"0.5657874",
"0.5640948",
"0.56407964",
"0.5632304",
"0.56036913",
"0.559403",
"0.5575979",
"0.5575802",
"0.55694264",
"0.5537702",
"0.5536882",
"0.55365837",
"0.5534207",
"0.55208707",
"0.5509863",
"0.5508973",
"0.5508973",
"0.55069566",
"0.5496486",
"0.548748",
"0.548663",
"0.5473524",
"0.54587495",
"0.54454887",
"0.54238623",
"0.5420588",
"0.541507",
"0.54115754",
"0.5403614",
"0.53998387",
"0.5396143",
"0.5390781",
"0.5390626",
"0.5372154",
"0.53569514",
"0.53510237",
"0.5348147",
"0.53438365",
"0.53399646",
"0.5338381",
"0.53367525",
"0.5328494",
"0.53284585",
"0.5325164",
"0.53241074",
"0.5311689",
"0.53115",
"0.53109455",
"0.5310049",
"0.5281857",
"0.5276188",
"0.5273102",
"0.52622724",
"0.5257976",
"0.52570474",
"0.5247848",
"0.5245429",
"0.5243286",
"0.5237933",
"0.5233064",
"0.52248913",
"0.5224461",
"0.52232087",
"0.5219355",
"0.52137417",
"0.5211159",
"0.5202171",
"0.5193227",
"0.5193106",
"0.5182841",
"0.5174486",
"0.5167924",
"0.51653457",
"0.5165194",
"0.5161142",
"0.5158817",
"0.5158526",
"0.5154248",
"0.51541555",
"0.5150033",
"0.5148896",
"0.51484025",
"0.5144868",
"0.514173",
"0.514173",
"0.514173",
"0.5141312"
] | 0.0 | -1 |
Created by Arkadiy on 02.04.2016. | public interface OnBackPressListener {
/**
* @return boolean Return true if back press was handled
*/
boolean backPressHandled();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void interr() {\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n void init() {\n }",
"@Override\n public void init() {\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\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 init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"private void poetries() {\n\n\t}",
"public void mo38117a() {\n }",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\n public void init() {}",
"@Override\n public int describeContents() { return 0; }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\r\n\tpublic void init() {}",
"private void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n protected void init() {\n }",
"public void mo4359a() {\n }",
"Petunia() {\r\n\t\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 Rekenhulp()\n\t{\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\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 init() {\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n public void initialize() { \n }",
"private void strin() {\n\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"private TMCourse() {\n\t}",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void init() {\n\t\t}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"private void kk12() {\n\n\t}"
] | [
"0.60876215",
"0.5962583",
"0.581534",
"0.58027947",
"0.57584816",
"0.57584816",
"0.5713526",
"0.57057077",
"0.56977785",
"0.56779444",
"0.56387573",
"0.56211746",
"0.5613571",
"0.5611182",
"0.5591739",
"0.5580987",
"0.5574681",
"0.55657005",
"0.55535203",
"0.55476826",
"0.5524286",
"0.5507543",
"0.55062926",
"0.55056983",
"0.54988116",
"0.5493888",
"0.54904217",
"0.54904217",
"0.54904217",
"0.54904217",
"0.54904217",
"0.54904217",
"0.54897714",
"0.54897714",
"0.54897714",
"0.54897714",
"0.54897714",
"0.54889286",
"0.54889286",
"0.54844004",
"0.54651016",
"0.54564375",
"0.545388",
"0.54465204",
"0.5443903",
"0.54411596",
"0.54365855",
"0.5435187",
"0.54181516",
"0.5416944",
"0.5416944",
"0.54163253",
"0.5406869",
"0.5402561",
"0.5402077",
"0.5402077",
"0.5402077",
"0.54014283",
"0.53986293",
"0.5392356",
"0.538874",
"0.538641",
"0.538641",
"0.53826046",
"0.5376018",
"0.5370939",
"0.5370939",
"0.5370939",
"0.5368608",
"0.5360563",
"0.5355661",
"0.534527",
"0.534527",
"0.534527",
"0.53255916",
"0.531267",
"0.531267",
"0.531267",
"0.531267",
"0.531267",
"0.531267",
"0.531267",
"0.5309406",
"0.5304177",
"0.5303754",
"0.53028387",
"0.52923036",
"0.5282106",
"0.5281252",
"0.52780867",
"0.52762705",
"0.52713186",
"0.5255699",
"0.5255489",
"0.5254846",
"0.5253463",
"0.5245395",
"0.5243138",
"0.5243138",
"0.5243138",
"0.5242841"
] | 0.0 | -1 |
When an object implementing interface Runnable is used to create a thread, starting the thread causes the object's run method to be called in that separately executing thread. The general contract of the method run is that it may take any action whatsoever. | @Override
public void run() {
/* try {
Thread.sleep(100);
} catch (InterruptedException e) {
e.printStackTrace();
}*/
System.out.println(Thread.currentThread().getName());
AddDataFromFile();
Thread.yield();
/* try {
Thread.sleep(100);
} catch (InterruptedException e) {
e.printStackTrace();
}*/
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface Startable extends Runnable {\n \n /**\n * Waits until the thread this object is running in is finished before returning.\n */\n public void join();\n \n /**\n * Checks whether the component is done with its work.\n * @return <code>true</code> if the component is finished its work\n */\n public boolean isDone();\n \n /**\n * Sets the thread that this object is running in.\n * \n * @param t the thread that this object is running in\n */\n public void setThread(Thread t);\n\n /**\n * Gets the thread that this object is running in.\n * \n * @return the thread that this object is running in\n */\n public Thread getThread();\n\n}",
"public void run(){\n //logic to execute in a thread \n }",
"private void startRunnableThread() {\n customRunnable = new CustomRunnable();\n customThread = new CustomThread(customRunnable);\n customRunnable.setTag(customThread.tag);\n customThread.start();\n\n }",
"void startThread();",
"ThreadStart createThreadStart();",
"public final void run() {\r\n }",
"void runInThread(Runnable runnable) {\n try {\n Thread thread = new Thread(runnable::run);\n thread.start();\n } catch (Exception ex) {\n log.info(ex.getMessage());\n }\n\n }",
"@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tinvoke();\n\t\t\t\t\t}",
"public interface MainThread {\n void post(Runnable runnable);\n}",
"public MyRunnable(){\t\n\t}",
"@Override\n // Thread creation\n // Run method from the Runnable class.\n public void run() {\n p.println(\"Current thread = \" + Thread.currentThread().getName());\n // Shows when a task is being executed concurrently with another thread,\n // then puts the thread to bed (I like saying that)\n try {\n p.println(\"Doing a task during : \" + name);\n Thread.currentThread().sleep(time);\n }\n // Exception for when a thread is interrupted.\n catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"public void start() {\n // EFFECTS: starts a new thread from this instance.\n (new Thread(instance)).start();\n }",
"public void run() {\r\n }",
"@Override\r\n public Thread newThread(Runnable r) {\n Thread t = new Thread(r, \"example-runner\");\r\n t.setDaemon(true);\r\n return t;\r\n }",
"@Override\r\n\tpublic Thread newThread(Runnable arg0) {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tabstract public void run();",
"public void run();",
"public void run();",
"public void run();",
"public void run();",
"public void run();",
"public void start() {\n\n\t\tif (worker.isAlive()) {\n\t\t\tthrow new IllegalStateException(\n\t\t\t \"Worker thread is still alive, unexpected.\");\n\t\t}\n\n\t\tif (runflag.get()) {\n\t\t\tthrow new IllegalStateException(\n\t\t\t \"Runflag is inconsistant with thread, unexpected.\");\n\t\t}\n\n\t\trunflag.set(true);\n\t\tworker.start();\n\t}",
"public void createThread() {\n }",
"public void run() {\n }",
"public void run() {\n }",
"public void run() {\n }",
"public void run() {\n }",
"public synchronized void start() {\n\t\tif (running)\n\t\t\treturn;\n\t\tthread = new Thread(this);\n\t\tthread.start();\n\t\trunning = true;\n\t}",
"public void start ()\n {\n Thread th = new Thread (this);\n // start this thread\n th.start ();\n\n }",
"public void run()\n {\n }",
"public void run()\n {\n }",
"public void start() {\n if (runner == null) {\n runner = new Thread(this, \"Runner\");\n runner.start();\n }\n }",
"@Override\r\n\tpublic abstract void run();",
"public synchronized void start() {\r\n\t\tthread = new Thread(this);\r\n\t\tthread.start();\r\n\t\tisRunning = true;\r\n\t }",
"public void run()\n\t{\n\t}",
"public void run () { run (true); }",
"public IThread createThread() throws IllegalWriteException, BBException;",
"public synchronized void dispatch(Runnable runnable) {\n\t\tif (!isStart) {\n\t\t\tthrow new IllegalStateException();\n\t\t}\n\t\tif (runnable != null) {\n\t\t\tqueue.push(runnable);\n\t\t} else {\n\t\t\tthrow new NullPointerException();\n\t\t}\n\t}",
"public void start() {\n\t\tmyThread = new Thread(this); myThread.start();\n\t}",
"@Override\n public void startThread() {\n Log.d(TAG, \"Starting \" + getName() + \" thread!\");\n if (!started)\n start();\n running = enabled;\n doStartAction();\n }",
"interface Runnable {\n void execute() throws Throwable;\n default void run() {\n try {\n execute();\n } catch(Throwable t) {\n throw new RuntimeException(t);\n }\n }\n }",
"@Override\n abstract public void run();",
"public interface Interactor extends Runnable {\n void run();\n}",
"@Override\n protected Thread createThread(final Runnable runnable, final String name) {\n return new Thread(runnable, Thread.currentThread().getName() + \"-exec\");\n }",
"public void start() {\n if (!started) {\n thread = new Thread(this);\n thread.start();\n started = true;\n }\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tSystem.out.println(\"Thread working\");\n\t\t\t}",
"public void run() {\n }",
"@Override\n\tpublic Thread newThread(Runnable r) {\n\t\t\n\t\tThread th = new Thread(r,\" custum Thread\");\n\t\treturn th;\n\t}",
"public void run() {/* THE CODE HERE IS A THE @OVERRIDE FOR START() METHOD */\n\t}",
"public void run() {\n\n }",
"public void run()\n {\n\n }",
"public void start() {\n thread = new Thread(this);\n thread.setPriority(Thread.MIN_PRIORITY);\n thread.start();\n }",
"public synchronized void start() {\n if (!running) {\n running = true;\n thread = new Thread(this);\n thread.start();\n }\n }",
"public synchronized void start() {\n if (!running) {\n running = true;\n thread = new Thread(this);\n thread.start();\n }\n }",
"public void run() {\n\n\n }",
"@Override\r\n public void run() {}",
"public void start()\n\t{\n\t\tthread = new Thread(this);\n\t\tthread.start();\n\t}",
"public void run(){\n\t}",
"@Override\n\tpublic void run() {\n\t\tsuper.run();\n\t}",
"public synchronized void start() {\n if (!this.isRunning) {\n isRunning = true;\n thread = new Thread(this);\n thread.start();\n }\n }",
"private interface CheckedRunnable {\n void run() throws Exception;\n }",
"public void startThread(){\n\t\trunning = true;\n\t\tthread = new Thread(this);\n\t\tthread.start();\n\t}",
"public void Start() {\r\n\t\tthread.run();\r\n\t}",
"private void start(){\n isRunning = true;\n thread = new Thread(this);\n thread.start();\n }",
"public void run() {\n\t}",
"public void run() {\n\t}",
"public Thread startThread() {\n Thread thread = createThread();\n thread.start();\n return thread;\n }",
"private void startNormalThread() {\n customThread = new CustomThread();\n customThread.start();\n }",
"public void run() {\n super.run();\n }",
"public void start(){\n thread.start();\n }",
"@Override\npublic void run() {\n perform();\t\n}",
"@Override\n public void run()\n {\n super.run();\n }",
"@Override\n\tpublic void run()\n\t{\n\t}",
"public static void run(){}",
"private Thread startTestThread(Runnable runnable) {\n Thread t = new Thread(runnable);\n t.setDaemon(true);\n return t;\n }",
"@Override\n protected void runInListenerThread(Runnable runnable) {\n runnable.run();\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\"ok, here is \" + Thread.currentThread().getName() + \" \" + \"thread, i'll do something here..\");\n\t\t\t}",
"public void start() {\n\t\tai = new Thread(this);\n\t\tai.start();\n\t}",
"public void run() {\r\n\t\t// overwrite in a subclass.\r\n\t}",
"public abstract void run();",
"public abstract void run();",
"public abstract void run();",
"public static OnRun onRun( Runnable run )\n\t{\n\t\treturn new OnRun( run );\n\t}",
"public void run() {\n System.out.println(ANSI_GREEN + \"Hello from anonymous class thread\");\n }",
"public static void run() {\n }",
"public void start() {\r\n isRunning = true;\r\n Thread thread = new myThread();\r\n thread.start();\r\n }",
"@Override\n public void run() {\n }",
"public void start() {\n\t\tif(t == null) {\n\t\t\tt = new Thread(this);\n\t\t\tt.start();\n\t\t}\n\t}",
"public synchronized void start() {\r\n\r\n\t\tif (!running) {\r\n\t\t\trunning = true;\r\n\t\t\tnew Thread(this, name).start();\r\n\t\t}\r\n\t}",
"public void start() {\n\n\t\tisRunning = true;\n\t\tthread = new Thread(this);\n\t\tthread.start();\n\n\t}",
"@Override\n public synchronized void start()\n {\n if (run)\n return;\n run = true;\n super.start();\n }",
"private static void ThreadCreationOldWay() {\r\n\t\tThread t1 = new Thread(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tSystem.out.println(\"This is a runnable method done in old fashion < 1.8\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tt1.start();\r\n\t}",
"void runInAudioThread(Runnable runnable) {\n executor.execute(runnable);\n }",
"public void start() {\r\n\t\trunning = true;\r\n\t\tt = new Thread(this);\r\n\t\tt.start();\r\n\t}",
"@Override\n\tpublic void run() {\n\t\tLog.i(tag, \"run\");\n\t}",
"public void run()\r\n\t{\r\n\t\t\r\n\t}",
"public final void run() {\n //We get a hold on the thread where this unit is going to be executed\n //so shutdown() can interrupt it if called.\n thread = Thread.currentThread();\n running = true;\n \n try {\n init();\n } catch (RuntimeException ex) {\n stop();\n aborted = true;\n onRunAborted(ex);\n }\n\n try {\n if (!isFinished() && !isStopping()) {\n internalRun();\n }\n } catch (RuntimeException ex) {\n aborted = true;\n onRunAborted(ex);\n throw ex;\n } finally {\n try {\n cleanup();\n } catch (RuntimeException ex) {\n onRunAborted(ex);\n }\n\n running = false;\n //Remove the thread reference\n thread = null;\n }\n }",
"public static void main(String args[ ]){\r\nMythread rt = new Mythread(); /* main thread created the runnable object*/\r\nThread t = new Thread(rt); /*main thread creates child thread and passed the runnable object*/\r\nt.start();\r\nfor(int i=0; i<10; i++){\r\nSystem.out.println(\"Main Thread\");\r\n}\r\n}",
"public void start() {\r\n running = true;\r\n new Thread(this).start();;\r\n }",
"public Thread startAndRun() {\r\n\t\tThread gameThread = new Thread(this, \"Coffee Bean Game Thread\");\r\n\t\tgameThread.start();\r\n\r\n\t\treturn gameThread;\r\n\t}",
"public void startThread(View view) {\n //startNormalThread();\n startRunnableThread();\n }"
] | [
"0.70486647",
"0.69597656",
"0.68883115",
"0.67373145",
"0.6644344",
"0.6578161",
"0.65179926",
"0.64961547",
"0.64943063",
"0.6465665",
"0.6443635",
"0.64434725",
"0.63917446",
"0.63879454",
"0.6379522",
"0.6372614",
"0.6365644",
"0.6365644",
"0.6365644",
"0.6365644",
"0.6365644",
"0.635816",
"0.63444424",
"0.6343813",
"0.6343813",
"0.6343813",
"0.6343813",
"0.6342508",
"0.63391775",
"0.6327277",
"0.6327277",
"0.6324864",
"0.6322937",
"0.63044643",
"0.62999827",
"0.6297874",
"0.628196",
"0.62771165",
"0.62700784",
"0.62620467",
"0.6259564",
"0.62507623",
"0.6249143",
"0.6247489",
"0.6246156",
"0.6242443",
"0.6237669",
"0.6228293",
"0.62272686",
"0.62208885",
"0.6220756",
"0.6207702",
"0.6205109",
"0.6205109",
"0.61735237",
"0.6170319",
"0.616902",
"0.6168809",
"0.6165251",
"0.61642617",
"0.616105",
"0.6159043",
"0.6153514",
"0.61508286",
"0.6148351",
"0.6148351",
"0.6145686",
"0.61352545",
"0.61250436",
"0.61101574",
"0.6104578",
"0.60942656",
"0.6089291",
"0.60797274",
"0.6078567",
"0.6074785",
"0.6072855",
"0.6071753",
"0.6070143",
"0.60668176",
"0.60668176",
"0.60668176",
"0.6064968",
"0.60648245",
"0.6064678",
"0.60624",
"0.6061024",
"0.60567206",
"0.6045435",
"0.60337025",
"0.6029297",
"0.6017678",
"0.6012949",
"0.601168",
"0.60010666",
"0.59948033",
"0.5991198",
"0.5990117",
"0.59832036",
"0.59819764",
"0.5981051"
] | 0.0 | -1 |
=================================================================================== Line Separator ============== | public static String getLineSeparator() {
// /- - - - - - - - - - - - - - - - - - - - - -
// Because 'CR + LF' caused many trouble!
// And Now 'LF' have little trouble.
//
// return System.getProperty("line.separator");
// - - - - - - - - - -/
return "\n";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getLineSeparator();",
"private static void printSeparatorLine() {\r\n System.out.print(\"\\n----------------------------------------------------------\" +\r\n \"----------------------------------------------------------\");\r\n }",
"private String getLineSeparator(String givenStr) {\n if (givenStr.indexOf(\"\\r\\n\") == -1) {\n return \"\\n\";\n } else {\n return \"\\r\\n\";\n }\n }",
"private void printSeparator() {\r\n\t\tthis.printLineGap();\r\n\t}",
"public String getSourceLineSeparator ();",
"public String getLineSeparator() {\n return lineSeparator;\n }",
"public String getExtractLineSeparator ();",
"protected String getSeparator() {\n return isNewLineParameters() ? NEW_LINE_SEPARATOR : ONE_LINE_SEPARATOR;\n }",
"public String getDefaultExtractLineSeparator ();",
"private Line createSeparator(int length){\n\n Line sep = new Line();\n sep.setEndX(length);\n sep.setStroke(Color.DARKGRAY);\n return sep;\n\n }",
"public void setExtractLineSeparator (String linesep);",
"public void setDefaultExtractLineSeparator (String linesep);",
"private void lineBreak()\n\t{\n\t\tlog += String.format(\"%n\");\n\t\tfor(int i = 0; i < 25; i++)\n\t\t\tlog += \"-\";\n\t\tlog += String.format(\"%n\");\n\t}",
"String getSeparator();",
"public void setSourceLineSeparator (String linesep);",
"private void linefeed() {\n try {\n out.write(lineSeparator);\n } catch (java.io.IOException ioe) {\n }\n ;\n }",
"private void addLine()\n\t{\n\t\tlines.add(printerFormatter.markEOL());\n\t}",
"public String showLine() {\n return \"----------------------------------------------------------\" + System.lineSeparator();\n }",
"public String getDefaultSourceLineSeparator ();",
"public String Line() {\n return \"==================================================================================================================\";\n }",
"private String createDashedLine(){\n return \"- \".repeat(Math.max(0, this.columns));\n }",
"public static String lineBreak() {\n return \"\\n*****************************************************\\n\";\n }",
"public void separator() {\n LOGGER_BASE.separator();\n }",
"public void setDefaultSourceLineSeparator (String linesep);",
"public void linefeed() {\r\n\t\tconsole.print(LINESEP);\r\n\t}",
"public abstract void newLine();",
"public static void buildSeparator(StringBuilder sb, int lineLength) {\n sb.append(\"-\".repeat(Math.max(0, lineLength)));\n sb.append(\"\\n\");\n }",
"public static String newline() {\n return System.getProperty(JavaSystemProperty.LINE_SEPARATOR);\n }",
"private void newline() {\n if (enableSplitting) {\n if (out.length() != 0) {\n out.append(System.lineSeparator());\n }\n out.append(\" \".repeat(depth)); // two spaces indent is sufficient\n } else {\n out.append(\" \"); // just a separator between two tokens\n }\n }",
"private static String appendSeparatorLine(String left, String middle, String right, int padding, int... sizes) {\n boolean first = true;\n StringBuilder ret = new StringBuilder();\n for (int size : sizes) {\n if (first) {\n first = false;\n ret.append(left).append(Strings.repeat(\"-\", size + padding * 2));\n } else {\n ret.append(middle).append(Strings.repeat(\"-\", size + padding * 2));\n }\n }\n return ret.append(right).append(BotConfig.EOL).toString();\n }",
"boolean separatorLine(String mode);",
"public static void printDivider() {\n System.out.println(Message.LINE_DIVIDER);\n }",
"@Override\n\tpublic String getSeparator() {\n\t\treturn null;\n\t}",
"void showNewLine(String lineNumber, String directionId);",
"public void setLineSeparator(String linsep) {\n lineSeparator = linsep;\n }",
"protected void drawSeparator(Graphics g,int x,int y,int w,int h)\n {\n g.setColor(new Color(0x868686));\n g.drawLine(x+0,y+0,x+w-1,y+0);\n g.drawLine(x+0,y+0,x+0,y+1);\n g.drawLine(x+w-1,y+0,x+w-1,y+1);\n g.setColor(Color.black);\n g.drawLine(x+1,y+1,x+w-2,y+1);\n\n g.setColor(new Color(0x868686));\n g.drawLine(x+0,y+0,x+0,y+h-1);\n g.setColor(Color.black);\n g.drawLine(x+1,y+1,x+1,y+h-1);\n\n g.setColor(new Color(0xD7D3CB));\n g.drawLine(x+0,y+h-1,x+w-1,y+h-1);\n\n g.setColor(new Color(0xD7D3CB));\n g.drawLine(x+w-1,y+1,x+w-1,y+h-1);\n }",
"public void newLine() {\n text.append(\"\\n\");\n }",
"public void setLineSeparator(String separator) {\r\n defaultFormat.lineSeparator = separator;\r\n }",
"@SuppressWarnings(\"unchecked\")\n public void insertarLineaSeparacion() {\n Tag hr = new Tag(\"hr\");\n hr.addAttribute(new Attribute(\"style\", \"width: 100%; height: 2px;\"));\n // <hr style=\"width: 100%; height: 2px;\">\n body.add(hr);\n }",
"public static void printSeparator() {\n\t\tfor (int i = 1; i <= 7; i++) {\n\t\t\tSystem.out.print(\"+\");\n\t\t\tfor (int j = 1; j <= 5; j++) {\n\t\t\t\tSystem.out.print(\"-\");\n\n\t\t\t}\n\n\t\t}\n\t\tSystem.out.println(\"+\");\n\n\t}",
"private void newline() {}",
"@Override\n public String postProcess(final String line) {\n var lineSeparatorIndex = line.lastIndexOf(RECORD_SEPARATOR_CHARACTER);\n return lineSeparatorIndex >= 0 ? line.substring(0, lineSeparatorIndex) : line;\n }",
"private String getSeparator(List<String> file)\n {\n String line = file.get(0);\n \n if (line.contains(\" \") || line.contains(\" ,\")) {\n /* for these delimeters the \"data\" and \"quantidade\" column are not\n * separated correctly, so we need to add one space to support them.\n */\n for (int i = 0; i < file.size(); i++) {\n String l = file.get(i);\n String a = l.substring(0, 16);\n String b = l.substring(16, l.length() - 1);\n file.set(i, a + \" \" + b);\n }\n }\n\n return FileUtil.SEPARATOR(line);\n }",
"private void addLineSeperator(final PdfPTable paymentSectionTable, final PdfPCell paymentSectionBlankSpaceCell) {\n LineSeparator line = new LineSeparator(1, 100, null, Element.ALIGN_CENTER, -2);\n PdfPCell horizontalLineCell = new PdfPCell(new Phrase(\" \", getFont(WHITE_COLOR, 8, Font.BOLD)));\n cellAlignment(horizontalLineCell, Element.ALIGN_LEFT, GRAY_COLOR, 0);\n horizontalLineCell.addElement(line);\n cellAddingToTable(paymentSectionTable, horizontalLineCell, Rectangle.NO_BORDER, 3, 0);\n cellAlignment(paymentSectionBlankSpaceCell, Element.ALIGN_LEFT, WHITE_COLOR, 0);\n cellAddingToTable(paymentSectionTable, paymentSectionBlankSpaceCell, Rectangle.NO_BORDER, 3, 0);\n }",
"public void showLine() {\n System.out.print(LINE_SEPARATOR);\n }",
"public void newLine() {\n\t\tcommandLine.append(\"\\n\");\n\t}",
"public void newLine()\n {\n rst += NEW_LINE;\n }",
"@Override\n public String getLineJoin() {\n return graphicsEnvironmentImpl.getLineJoin(canvas);\n }",
"public String getSeparator() {\n\t\treturn separator;\n\t}",
"public void newLine()\n\t{\n\t\toutput.append(\"\\n\");\n\t}",
"private Token scanNewlineSeparator() {\n Pair<Integer, Integer> pos = new Pair<>(in.line(), in.pos());\n c = in.read();\n return new Token(\"\\n\", TokenType.SEPARATOR, pos);\n }",
"public String getLineEndingStyle() {\n/* 412 */ return getCOSObject().getNameAsString(COSName.LE, \"None\");\n/* */ }",
"public void addEmptyLine() {\n addLine(\"\");\n }",
"public String getSeparator() {\n\t\treturn mSeparator;\n\t}",
"public abstract AbstractLine newLine() throws IOException;",
"public String getRowSeparator()\n\t{\n\t\treturn rowSeparator;\n\t}",
"public void drawLine() {\n for(int i=0; i < nCols; i++) {\n System.out.print(\"----\");\n }\n System.out.println(\"\");\n }",
"protected String[] parseLine() {\n ArrayList<String> lines = new ArrayList<String>();\n StringBuffer line = new StringBuffer(current);\n while (line.length() > style.lineWidth) {\n int index = split(line);\n lines.add(line.substring(0, index));\n line = new StringBuffer(line.substring(index));\n if (line.length() != 0)\n line.insert(0, continueIndentString());\n }\n if (line.length() != 0)\n lines.add(line.toString());\n return lines.toArray(new String[0]);\n }",
"protected static String showLineSeparators(String string) {\n\tif (string == null) return null;\n\tStringBuffer buffer = new StringBuffer();\n\tint length = string.length();\n\tfor (int i = 0; i < length; i++) {\n\t\tchar car = string.charAt(i);\n\t\tswitch (car) {\n\t\t\tcase '\\n': \n\t\t\t\tbuffer.append(\"\\\\n\\n\"); //$NON-NLS-1$\n\t\t\t\tbreak;\n\t\t\tcase '\\r':\n\t\t\t\tif (i < length-1 && string.charAt(i+1) == '\\n') {\n\t\t\t\t\tbuffer.append(\"\\\\r\\\\n\\n\"); //$NON-NLS-1$\n\t\t\t\t\ti++;\n\t\t\t\t} else {\n\t\t\t\t\tbuffer.append(\"\\\\r\\n\"); //$NON-NLS-1$\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbuffer.append(car);\n\t\t\t\tbreak;\n\t\t}\n\t}\n\treturn buffer.toString();\n}",
"public void setLineSeparator(String lineSeparator) {\n\n this.lineSeparator = lineSeparator;\n }",
"public String getNewLine() {\n return newLine;\n }",
"@Override\n\tprotected String getItemSeparator() {\n\t\treturn SVG_PATHSEG_LIST_SEPARATOR;\n\t}",
"public void addSeparator() {\n\t\tmenuToolBar.addSeparator();\n\t}",
"private static String getEdgeLine(\r\n IEdge edge,\r\n char sep) throws Exception\r\n {\r\n String strInfo; // Returned value\r\n\r\n IHalfEdge orientEdge; // Oriented edge\r\n \r\n // We cretae the info fields for the edge,\r\n // using the top-down orientation\r\n \r\n if (edge.getDirect().getEdgeType() == OrientedEdgeType.SuperClassOf)\r\n {\r\n orientEdge = edge.getDirect();\r\n }\r\n else\r\n {\r\n orientEdge = edge.getInverse();\r\n }\r\n \r\n // We creaste the LINE\r\n \r\n strInfo = Integer.toString(orientEdge.getOpposite().getTarget().getID())\r\n + sep\r\n + Integer.toString(orientEdge.getTarget().getID())\r\n + sep + Double.toString(edge.getCondProbability())\r\n + sep + Double.toString(edge.getWeight()) + \"\\n\";\r\n \r\n // We write the titles\r\n \r\n return (strInfo);\r\n }",
"static void afficherLigneSep(int taille) {\n System.out.print(\" \");\n for (int i = 0; i < taille - 1; i++) {\n System.out.print(\"---+\");\n }\n System.out.println(\"---\");\n }",
"public String[] displayLineSeparators(String[] input) {\n\t\tfor (int i = 0; i < input.length; i++) {\n\t\t\tif (input[i] != null) {\n\t\t\t\tinput[i] = input[i].replaceAll(\"\\\\n\", \"\\\\\\\\n\");\n\t\t\t\tinput[i] = input[i].replaceAll(\"\\\\r\", \"\\\\\\\\r\");\n\t\t\t}\n\t\t}\n\t\treturn input;\n\n\t}",
"String getLineDelimiter(int line) throws BadLocationException;",
"Rule ListSeparator() {\n // No effect on value stack\n return Sequence(AnyOf(\",;\"), WhiteSpace());\n }",
"public SeparatorControl() {\n _separator = new JSeparator();\n }",
"public static String getSeparator() {\n return System.getProperty(\"file.separator\");\n }",
"public Log nuevaLinea() {\n cadenas.add(\"\\n\");\n return this;\n }",
"public void appendLine() {\n\t\t\tmBuilder.append(NewLineChar);\n\t\t\tlastAppendNewLine = true;\n\t\t}",
"java.lang.String getCustomBreak();",
"protected String getLastSeparator() {\n return \"and\";\n }",
"@Override\n\tprotected void endOfLine() {\n\t}",
"public String toString() {\n\t\treturn \"LINE:(\"+startPoint.getX()+\"-\"+startPoint.getY() + \")->(\" + endPoint.getX()+\"-\"+endPoint.getY()+\")->\"+getColor().toString();\n\t}",
"public String getLine() {\n \treturn this.lineColor;\n }",
"private void lineColor() {\n\n\t}",
"public boolean getNeedLineBreak() {\n\t\treturn true;\n\t}",
"private Line addLine() {\n\t\t// Create a new line\n\t\tLine line = new Line(doily.settings.getPenScale(), \n\t\t\t\tdoily.settings.getPenColor(), doily.settings.isReflect());\n\t\tdoily.lines.add(line);\n\t\treturn line;\n\t}",
"public static void printLine() {\r\n if (!isDisabled()) {\r\n print(LINE_SEPARATOR);\r\n }\r\n }",
"private boolean addNewLineAfterSemocolon(Token<CppTokenId> current) {\n if (!ts.isLastLineToken()) {\n ts.addAfterCurrent(current, 1, getIndent(), true);\n return true;\n }\n return false;\n }",
"@Override\n public NodeKind getKind() {\n return NodeKind.LINE_TERMINATOR;\n }",
"private String joinLines() {\n StringBuilder S = new StringBuilder();\n for (String L : testLines) {\n S.append(L);\n S.append(NL);\n }\n return S.toString();\n }",
"public LineDash getLineDash(\n )\n {return lineDash;}",
"public static String trimLineSeparator(String line) {\n int n = line.length();\n if (n == 0) {\n return line;\n }\n char ch = line.charAt(n - 1);\n if (ch == '\\n' || ch == '\\r') {\n n--;\n }\n else {\n return line;\n }\n if (n > 0) {\n char ch2 = line.charAt(n - 1);\n if ((ch2 == '\\n' || ch2 == '\\r') && ch2 != ch) {\n n--;\n }\n }\n return line.substring(0, n);\n\n }",
"private String sep(String path) {\n return path == null ? \"\" : \"/\" + path;\n }",
"@Override\n\tprotected String getPathSeparator() {\n\t\treturn null;\n\t}",
"protected Convention.Key getBlankLinesAfterKey()\n {\n return ConventionKeys.BLANK_LINES_AFTER_HEADER;\n }",
"private void drawLineSeg(int entryNum, GPoint from, GPoint to) {\n\t\tGLine line = new GLine(from.getX(), from.getY(),\n\t\t\t\t\t\t\t to.getX(), to.getY());\n\t\tline.setColor(getColor(entryNum));\n\t\tadd(line);\n\t}",
"private static void addLineBreak(XWPFParagraph paragraph) {\n requireNonNull(paragraph);\n\n XWPFRun run = paragraph.createRun();\n run.addCarriageReturn();\n }",
"@SuppressWarnings(\"unchecked\")\n public PropertyValue<String> getLineJoin() {\n return (PropertyValue<String>) new PropertyValue(nativeGetLineJoin());\n }",
"public static String getPathSeparator() {\n return File.separator;\n }",
"public String getFileSeparator() {\n\t\treturn File.separator;\n\t}",
"@Override\n protected String stringifySeparator() {\n return \" != \";\n }",
"private void addSeparator() {\n JSeparator separator = new JSeparator( SwingConstants.VERTICAL );\n separator.setPreferredSize( new Dimension( 2, 24 ) );\n toolPanel.add(separator);\n\t}",
"private void makePreformattedLines(LayoutContext lc) {\n int end = -1;\n int max = text.length;\n boolean isLastLine = false;\n\n do {\n int beg = end + 1;\n do {\n if (++end >= max) {\n isLastLine = true;\n break;\n }\n } while (text[end] != '\\n');\n addLine(beg, end, true, lc, false);\n } while (!isLastLine);\n }",
"public void setSeparator(String separator) {\n\t\tthis.separator = separator;\n\t}",
"Line createLine();",
"private void drawLines() {\n int min = BORDER_SIZE;\n int max = PANEL_SIZE - min;\n int pos = min;\n g2.setColor(LINE_COLOR);\n for (int i = 0; i <= GUI.SIZE[1]; i++) {\n g2.setStroke(new BasicStroke(i % GUI.SIZE[0] == 0 ? 5 : 3));\n g2.drawLine(min, pos, max, pos);\n g2.drawLine(pos, min, pos, max);\n pos += CELL_SIZE;\n }\n }"
] | [
"0.84090155",
"0.7924732",
"0.77766645",
"0.7680915",
"0.7661113",
"0.753033",
"0.7508908",
"0.74919397",
"0.72470003",
"0.7238111",
"0.721886",
"0.7122984",
"0.7109777",
"0.7038132",
"0.69335777",
"0.69284976",
"0.6914528",
"0.6865073",
"0.68567735",
"0.68458825",
"0.6844121",
"0.68302083",
"0.6772355",
"0.67447937",
"0.67050105",
"0.6686602",
"0.6674545",
"0.66719747",
"0.66485184",
"0.664385",
"0.6635793",
"0.6613014",
"0.6604597",
"0.65957963",
"0.6524242",
"0.650943",
"0.65080744",
"0.6504885",
"0.6470933",
"0.64525414",
"0.6446877",
"0.6439676",
"0.6421801",
"0.64181525",
"0.64092994",
"0.6407821",
"0.640742",
"0.63858575",
"0.6383945",
"0.6379639",
"0.63566506",
"0.6338022",
"0.63229144",
"0.6319789",
"0.62685",
"0.6246598",
"0.62207276",
"0.6215379",
"0.6202311",
"0.6184638",
"0.61794513",
"0.61577934",
"0.614827",
"0.6148171",
"0.61302656",
"0.607241",
"0.60657805",
"0.6048208",
"0.60338324",
"0.6026212",
"0.60116154",
"0.59942526",
"0.59596455",
"0.59461284",
"0.5918132",
"0.5917539",
"0.58899695",
"0.5884385",
"0.5874202",
"0.58689064",
"0.5861879",
"0.58608305",
"0.5855744",
"0.584921",
"0.5835129",
"0.58306855",
"0.58193564",
"0.58012855",
"0.57971",
"0.57912344",
"0.57903606",
"0.57829463",
"0.57752526",
"0.57689273",
"0.57490534",
"0.5746051",
"0.5743734",
"0.5740238",
"0.57381696",
"0.57379884"
] | 0.79658514 | 1 |
/ Executes a job on a VM. If a JobEvent (Success,Failure) or an InterruptedException happens, the exception is rethrown to the physical machine. | public void setJob(Job job) throws JobEvent, InterruptedException {
this.job = job;
try {
job.run();
}
catch (JobEvent | InterruptedException rethrow)
{
this.job = null;
throw rethrow;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"T execute(String jobName) throws Exception;",
"void execute(Runnable job);",
"public abstract void processJob() throws Exception;",
"@Override\n public Void run() throws Exception {\n Callable<Job> jobCreator = ReflectionUtils.newInstance(jobConfig.getJobCreator(), jobConfiguration);\n Job job = jobCreator.call();\n job.submit();\n\n // Blocking mode is only for testing\n if(waitForCompletition) {\n job.waitForCompletion(true);\n }\n\n // And generate event with further job details\n EventRecord event = getContext().createEventRecord(\"job-created\", 1);\n Map<String, Field> eventMap = ImmutableMap.of(\n \"tracking-url\", Field.create(job.getTrackingURL()),\n \"job-id\", Field.create(job.getJobID().toString())\n );\n event.set(Field.create(eventMap));\n getContext().toEvent(event);\n return null;\n }",
"public abstract void execute(VirtualMachine vm);",
"@Test\n\tpublic void testLaunchJob() throws Exception {\n\t\tJobExecution jobExecution = jobLauncherTestUtils.launchJob();\n\t\tassertEquals(BatchStatus.COMPLETED, jobExecution.getStatus());\n\n\t}",
"@Override\n\tpublic ResponseEntity<String> handle(PiazzaJobType jobRequest) throws InterruptedException {\n\t\tlogger.log(\"Executing a Service.\", Severity.DEBUG);\n\n\t\tExecuteServiceJob job = (ExecuteServiceJob) jobRequest;\n\t\t// Check to see if this is a valid request\n\t\tif (job != null) {\n\t\t\t// Get the ResourceMetadata\n\t\t\tExecuteServiceData esData = job.data;\n\t\t\tResponseEntity<String> handleResult = handle(esData);\n\t\t\tResponseEntity<String> result = new ResponseEntity<>(handleResult.getBody(), handleResult.getStatusCode());\n\t\t\tlogger.log(\"The result is \" + result, Severity.DEBUG);\n\n\t\t\t// TODO Use the result, send a message with the resource Id and jobId\n\t\t\treturn result;\n\t\t} else {\n\t\t\tlogger.log(\"Job is null\", Severity.ERROR);\n\t\t\treturn new ResponseEntity<>(\"Job is null\", HttpStatus.BAD_REQUEST);\n\t\t}\n\t}",
"public void menuJobTest() throws Exception;",
"void postJobExecutionEvent(JobExecutionEvent jobExecutionEvent);",
"@Override\n public void exceptionWhileExecutingJob(String jobId, Throwable exception) {\n LOG.exceptionWhileExecutingJob(jobId, exception);\n }",
"protected abstract void executeInternal(JobExecutionContext context) throws JobExecutionException;",
"public abstract TaskResult runTask(TaskKey taskKey) throws JobException;",
"@Override\n\tpublic void runJob(final Runnable job)\n\t{\n\t\tThread thread = new Thread(new Runnable()\n\t\t{\n\t\t\tpublic void run()\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tjob.run();\n\t\t\t\t}\n\t\t\t\tcatch (Exception e)\n\t\t\t\t{\n\t\t\t\t\tM_log.warn(\"runJob: \", e);\n\t\t\t\t}\n\t\t\t\tfinally\n\t\t\t\t{\n\t\t\t\t\t// clear any bound current values\n\t\t\t\t\tthreadLocalService().clear();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tthread.setDaemon(true);\n\t\tthread.start();\n\t}",
"@Override\n public void execute() throws InterruptedException {\n getStats().addValue(\"sensor_name\", mEnvironment.getSensor().getName());\n\n ValidatingSensorEventListener listener = new ValidatingSensorEventListener(mVerifications);\n listener.setLogEvents(mLogEvents);\n\n doExecute(listener);\n\n boolean failed = false;\n StringBuilder sb = new StringBuilder();\n for (ISensorVerification verification : mVerifications) {\n failed |= evaluateResults(verification, sb);\n }\n\n if (failed) {\n String msg = SensorCtsHelper\n .formatAssertionMessage(\"VerifySensorOperation\", mEnvironment, sb.toString());\n getStats().addValue(SensorStats.ERROR, msg);\n Assert.fail(msg);\n }\n }",
"static JobResult runWithExceptionHandling(JobMetadata metadata, Job delegate, Map<String, Object> params) {\n try {\n JobResult result = delegate.run(params);\n return result != null ? result : JobResult.unknown(metadata, \"Job returned null result\");\n } catch (Exception e) {\n // not logging the failure here.. JobLogDecorator will do the logging\n return JobResult.failure(metadata, e);\n }\n }",
"public void execute(JobExecutionContext context)\n\t\t\tthrows JobExecutionException {\n\t\ttry {\n int zero = 0;\n int calculation = 4815 / zero;\n } \n catch (Exception e) {\n log.info(\"--- Error in job!\");\n JobExecutionException e2 = \n new JobExecutionException(e);\n // this job will refire immediately\n e2.refireImmediately();\n throw e2;\n }\n\t\t\n\t}",
"public void execute() throws AeBusinessProcessException;",
"String submitJob(JPPFJob job, JobStatusListener listener);",
"public interface JobSimulator {\n\n /**\n * Starts the job in simulation mode in a separate thread.\n *\n * @param job The job to simulate.\n *\n * @return A {@link Future} containing the simulation results after the execution finishes.\n */\n Future<Map<String, SimulationResult>> simulateJob(Job job);\n\n /**\n * Cancels all running simulations of the provided job.\n *\n * @param jobId The job's ID.\n */\n void cancelAllSimulations(String jobId);\n\n /**\n * Cancels all running simulations that are active for too long without processing any events.\n */\n void cancelStaleSimulations();\n\n /**\n * Called by Spring if a {@link JobTriggerEvent} is fired. Takes care, that the event is handed over to the correct job, if it\n * is currently executed in simulation mode.\n *\n * @param jobTriggerEvent The event to hand over to a simulated job.\n */\n @SuppressWarnings(\"unused\")\n void onJobTriggerEvent(JobTriggerEvent jobTriggerEvent);\n\n}",
"@Override\n\tfinal public void execute(ICustomContext context) {\n\n\t\tfinal Job job = initializeJob(context);\n\t\tconfigureJob(job);\n\n\t\t// Callback\n\t\tbeforeJobExecution();\n\n\t\t// Job is run\n\t\tjob.schedule();\n\t}",
"@Override\n public CommandResult execute(CommandInvocation commandInvocation) throws CommandException, InterruptedException {\n\n log.error(\"Not implemented yet!\");\n return CommandResult.FAILURE;\n }",
"public void jobToBeExecuted(JobExecutionContext jobExecutionContext) {}",
"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 void execute(JobExecutionContext context) throws JobExecutionException {\n\t\tSystem.out.println(this.getClass().getSimpleName());\n\t\tthis.run();\n\t}",
"String submitJob(JPPFJob job);",
"@Override\n\tpublic boolean onJobError(ApiJob job) {\n\t\treturn false;\n\t}",
"@Test\n public void testScrapeReservationsBookedOnJob() throws Exception {\n Job j = new ScrapeReservationsBookedOnJob();\n j.setStatus( JobStatus.submitted );\n j.setParameter( \"booked_on_date\", BookingsPageScraper.DATE_FORMAT_YYYY_MM_DD.format( new Date() ) );\n int jobId = dao.insertJob( j );\n\n // this should now run the job\n processorService.processJobs();\n\n // verify that the job completed successfully\n Job jobVerify = dao.fetchJobById( jobId );\n Assert.assertEquals( JobStatus.completed, jobVerify.getStatus() );\n }",
"public final void run() {\n\t\ttry (Restore restore = ComponentBoundary.push(loggerName(), this)) {\t\t\n\t\t\tif (!stateHandler.waitToWhen(new IsExecutable(), new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tstop = false;\n\t\t\t\t\t// it's possible to reset children and then execute again so this\n\t\t\t\t\t// is just in case there was no reset.\n\t\t\t\t\tstopChildStateReflector();\n\t\t\t\t\t\n\t\t\t\t\tgetStateChanger().setState(ParentState.EXECUTING);\n\t\t\t\t}\t\t\t\t\t\n\t\t\t})) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tlogger().info(\"Executing.\");\n\n\t\t\ttry {\n\t\t\t\tif (!stop) {\n\t\t\t\t\tconfigure();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!stop) {\n\t\t\t\t\texecute();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// we ignore state while executing but now we need to update.\n\t\t\t\t// dependent on our child states.\n\t\t\t\tstartChildStateReflector();\n\t\t\t}\n\t\t\tcatch (final Throwable e) {\n\t\t\t\tlogger().error(\"Job Exception.\", e);\n\t\t\t\t\n\t\t\t\tstateHandler.waitToWhen(new IsAnyState(), new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tgetStateChanger().setStateException(e);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\t\n\t\t\tlogger().info(\"Execution finished.\");\n\t\t}\n\t}",
"public void deploy() throws JobException {\n\t\tassertRunningInJobMasterMainThread();\n\n\t\tfinal LogicalSlot slot = assignedResource;\n\n\t\t// make sure exactly one deployment call happens from the correct state\n\t\t// note: the transition from CREATED to DEPLOYING is for testing purposes only\n\t\tExecutionState previous = this.state;\n\t\tif (previous == SCHEDULED || previous == CREATED) {\n\t\t\tif (!transitionState(previous, DEPLOYING)) {\n\t\t\t\t// race condition, someone else beat us to the deploying call.\n\t\t\t\t// this should actually not happen and indicates a race somewhere else\n\t\t\t\tthrow new IllegalStateException(\"Cannot deploy task: Concurrent deployment call race.\");\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// vertex may have been cancelled, or it was already scheduled\n\t\t\tthrow new IllegalStateException(\"The vertex must be in CREATED or SCHEDULED state to be deployed. Found state \" + previous);\n\t\t}\n\n\t\tif (this != slot.getPayload()) {\n\t\t\tthrow new IllegalStateException(\n\t\t\t\tString.format(\"The execution %s has not been assigned to the assigned slot.\", this));\n\t\t}\n\n\t\ttry {\n\n\t\t\t// race double check, did we fail/cancel and do we need to release the slot?\n\t\t\tif (this.state != DEPLOYING) {\n\t\t\t\tslot.releaseSlot(new FlinkException(\"Actual state of execution \" + this + \" (\" + state + \") does not match expected state DEPLOYING.\"));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfinal TaskDeploymentDescriptor deployment = TaskDeploymentDescriptorFactory\n\t\t\t\t.fromExecutionVertex(vertex, attemptNumber)\n\t\t\t\t.createDeploymentDescriptor(\n\t\t\t\t\tslot.getAllocationId(),\n\t\t\t\t\tslot.getPhysicalSlotNumber(),\n\t\t\t\t\ttaskRestore,\n\t\t\t\t\tproducedPartitions.values());\n\n\t\t\t// null taskRestore to let it be GC'ed\n\t\t\t// 手动GC\n\t\t\ttaskRestore = null;\n\n\t\t\tfinal TaskManagerGateway taskManagerGateway = slot.getTaskManagerGateway();\n\n\t\t\tfinal ComponentMainThreadExecutor jobMasterMainThreadExecutor =\n\t\t\t\tvertex.getExecutionGraph().getJobMasterMainThreadExecutor();\n\n\t\t\t// 调用submitTask\n\t\t\tCompletableFuture.supplyAsync(() -> taskManagerGateway.submitTask(deployment, rpcTimeout), executor)\n\t\t\t\t.thenCompose(Function.identity())\n\t\t\t\t.whenCompleteAsync(\n\t\t\t\t\t(ack, failure) -> { },\n\t\t\t\t\tjobMasterMainThreadExecutor);\n\n\t\t}\n\t\tcatch (Throwable t) {\n\t\t\tmarkFailed(t);\n\n\t\t\tif (isLegacyScheduling()) {\n\t\t\t\tExceptionUtils.rethrow(t);\n\t\t\t}\n\t\t}\n\t}",
"private void doStuff(SerializableWARCBatchJob job) {\n job.processRecord(null, new ByteArrayOutputStream());\n job.handleException(testException, new File(\"aFile\"), 0L);\n job.processRecord(null, new ByteArrayOutputStream());\n }",
"@Test\n public void testExecute() throws Exception {\n ServerIdentificationInputs intputs = Inputs.getServerIdentificationInputsForAmazon();\n PowerMockito.mockStatic(ComputeFactory.class);\n PowerMockito.doReturn(computeServiceMock).when(ComputeFactory.class, \"getComputeService\", intputs);\n Mockito.doReturn(\"\").when(computeServiceMock).suspend(REGION, SERVER_ID);\n\n Map<String, String> result = toTest.execute(intputs);\n\n Assert.assertEquals(result.get(Outputs.RETURN_CODE), \"0\");\n Assert.assertEquals(result.get(Outputs.RETURN_RESULT), \"server suspended\");\n verify(computeServiceMock).suspend(REGION, SERVER_ID);\n verifyNoMoreInteractions(computeServiceMock);\n }",
"private void handleJobLaunchSuccess() {\n EventBus eventbus = EventBus.getInstance();\n \n JobLaunchedEvent event = new JobLaunchedEvent(tagCaller, fieldName.getValue());\n eventbus.fireEvent(event);\n \n // close dialog now that job has launched\n closeDialog();\n \n MessageBox.info(I18N.DISPLAY.analysisSubmitted(), I18N.DISPLAY.analysisSubmittedMsg(), null);\n \n }",
"protected boolean executeJobImpl(JobScheduled job) {\n\t\tthrow new UnsupportedOperationException();\n\t}",
"public interface Job {\n\n public enum Status {\n IDLE,\n RUNNING,\n SUCCESS,\n ERROR,\n FAIL\n }\n\n /**\n * @return the job ID.\n */\n public default JobId getId() {\n return getContext().getId();\n }\n\n /**\n * @return the job status\n */\n public Status getStatus();\n\n /**\n * @return the job priority\n */\n public Priority getPriority();\n\n /**\n * @return The context of this job.\n */\n public JobContext getContext();\n\n /**\n * Run the job using the {@link XProcEngine}.\n */\n public void run(XProcEngine engine);\n\n}",
"Collection<String> submitJob(Job job) throws JobExecutionException;",
"private AvmTransactionResult runExternalInvoke(KernelInterface parentKernel, TransactionTask task, TransactionContext ctx) {\n AvmTransactionResult.Code error = null;\n\n // Sanity checks around energy pricing and nonce are done in the caller.\n // balance check\n Address sender = ctx.getSenderAddress();\n\n BigInteger transactionCost = BigInteger.valueOf(ctx.getTransaction().getEnergyLimit() * ctx.getTransactionEnergyPrice()).add(ctx.getTransferValue());\n if (!parentKernel.accountBalanceIsAtLeast(sender, transactionCost)) {\n error = AvmTransactionResult.Code.REJECTED_INSUFFICIENT_BALANCE;\n }\n\n // exit if validation check fails\n if (error != null) {\n AvmTransactionResult result = new AvmTransactionResult(ctx.getTransaction().getEnergyLimit(), ctx.getTransaction().getEnergyLimit());\n result.setResultCode(error);\n return result;\n }\n\n /*\n * After this point, no rejection should occur.\n */\n\n // Deduct the total energy cost\n parentKernel.adjustBalance(sender, BigInteger.valueOf(ctx.getTransaction().getEnergyLimit() * ctx.getTransactionEnergyPrice()).negate());\n\n // Run the common logic with the parent kernel as the top-level one.\n AvmTransactionResult result = commonInvoke(parentKernel, task, ctx);\n\n // Refund energy for transaction\n long energyRemaining = result.getEnergyRemaining() * ctx.getTransactionEnergyPrice();\n parentKernel.refundAccount(sender, BigInteger.valueOf(energyRemaining));\n\n // Transfer fees to miner\n parentKernel.adjustBalance(ctx.getMinerAddress(), BigInteger.valueOf(result.getEnergyUsed() * ctx.getTransactionEnergyPrice()));\n\n return result;\n }",
"@Test\n public void testAllocationScraperJob() throws Exception {\n AllocationScraperJob j = new AllocationScraperJob();\n j.setStatus( JobStatus.submitted );\n j.setStartDate( Calendar.getInstance().getTime() );\n j.setDaysAhead( 27 );\n int jobId = dao.insertJob( j );\n\n // this should now run the job\n processorService.processJobs();\n\n // verify that the job completed successfully\n Job jobVerify = dao.fetchJobById( jobId );\n Assert.assertEquals( JobStatus.completed, jobVerify.getStatus() );\n }",
"@Test\n public void _02submitJob() throws ApiException {\n // Change the default deletion after first retrieval to manual deletion for the manual deletion test\n ocrJob.getSettings().getLifecycle().setType(Lifecycle.TypeEnum.TIME);\n ocrJob.getSettings().engine(OCRSettings.EngineEnum.ADVANCED);\n OCRJobResponse response = api.submitJob(ocrJob.getJobId(), ocrJob);\n Assert.assertNotNull(response);\n Assert.assertNotNull(response.getJob());\n Assert.assertEquals(OCRJobResponse.StatusEnum.PROCESSING, response.getStatus());\n }",
"@Override\n public SaturnJobReturn handleJavaJob(String jobName,\n Integer shardItem,\n String shardParam,\n SaturnJobExecutionContext saturnJobExecutionContext) throws InterruptedException {\n if (0 == shardItem) {\n jobService.job();\n } else {\n System.out.println(\"==================================\");\n System.out.println(\"I am the first piece called !\");\n System.out.println(\"==================================\");\n }\n StringBuilder msg = new StringBuilder();\n msg.append(\"job : \" + jobName + \", \");\n msg.append(\"shardItem : \" + shardItem + \", \");\n msg.append(\"shardParam : \" + shardParam);\n return new SaturnJobReturn(msg.toString());\n }",
"JobResponse apply();",
"public void printJobFailed(PrintJobEvent pje) ;",
"public final void run() {\n final long contextID = Nodex.instance.getContextID();\n Runnable runner = new Runnable() {\n public void run() {\n try {\n final T result = execute();\n NodexInternal.instance.executeOnContext(contextID, new Runnable() {\n public void run() {\n completionHandler.onEvent(new Completion(result));\n }\n });\n } catch (final Exception e) {\n NodexInternal.instance.executeOnContext(contextID, new Runnable() {\n public void run() {\n completionHandler.onEvent(new Completion(e));\n }\n });\n } catch (Throwable t) {\n //Not much we can do, just log it\n t.printStackTrace(System.err);\n }\n }\n };\n\n NodexInternal.instance.executeInBackground(runner);\n }",
"private static void runStandalone(ApplicationContext context) throws InterruptedException {\r\n\t\tJobParameters jobParameters = new JobParametersBuilder()\r\n\t\t\t.addString(\"user\", \"satadru02\").toJobParameters(); \r\n \t\r\n \tJobLauncher launcher = (JobLauncher)context.getBean(JobLauncher.class);\r\n \tJob dbToCsvJob = (Job)context.getBean(Job.class);\r\n \t\r\n \tJobExecution jobExecution = null;\r\n \ttry{\r\n \t jobExecution = launcher.run(dbToCsvJob, jobParameters);\r\n \t}catch(JobExecutionException e)\r\n \t{\r\n \t\tSystem.out.println(\"#### OOPS #### Job Launch Exception !!\" + e.getMessage());\r\n \t\tSystem.exit(0);\r\n\t }\r\n \t\r\n \tBatchStatus batchStatus = jobExecution.getStatus();\r\n \twhile(batchStatus.isRunning()){\r\n \t\tSystem.out.println(\"..... Batch Is running .....................\");\r\n \t\tThread.sleep(5000);\r\n \t}\r\n\t\t\tExitStatus exitStatus = jobExecution.getExitStatus();\r\n\t\t\tString exitCode = exitStatus.getExitCode();\r\n\t\t\tSystem.out.println(String.format(\"###### Exit status: %s\", exitCode));\r\n\r\n\t\t\tif(exitStatus.equals(ExitStatus.COMPLETED)){\r\n\t\t\t\tSystem.out.println(\"####### COMPLETED STATUS #######\");\r\n\t\t\t}\r\n\t}",
"public JobChangeDTO jobChange(final JobChangeDTO jobChangeDTO) throws ApplicationCustomException;",
"public interface IJobChangeEvent {\n \t/**\n \t * The amount of time in milliseconds to wait after scheduling the job before it \n \t * should be run, or <code>-1</code> if not applicable for this type of event. \n \t * This value is only applicable for the <code>scheduled</code> event.\n \t * \n \t * @return the delay time for this event\n \t */\n \tpublic long getDelay();\n \n \t/**\n \t * The job on which this event occurred.\n \t * \n \t * @return the job for this event\n \t */\n \tpublic Job getJob();\n \n \t/**\n \t * The result returned by the job's run method, or <code>null</code> if\n \t * not applicable. This value is only applicable for the <code>done</code> event.\n \t * \n \t * @return the status for this event\n \t */\n \tpublic IStatus getResult();\n }",
"public void jobExecutionVetoed(JobExecutionContext jobExecutionContext) {}",
"@Asynchronous\n @TransactionTimeout(value = 30000, unit = TimeUnit.SECONDS) \n public void executeTask(Timer timer)\n {\n try\n {\n \t//setType(\"SCP_TO_SAP\");\n run();\t\n }\n catch(Exception e)\n {\n \tString msg = MessageFormatorUtil.getParameterizedStringFromException(e);\n \tlogger.log(Level.SEVERE, \"Exception occured in CustomerLoadingJob#executeTask for Timer: \"+timer.getInfo()+\", Task: \"+this.processId + \"(\" + this.jobName +\")\" +\", Reason for failure: \"+msg, e);\n }\n }",
"@Override\n\tpublic void execute() throws Exception {\n\t\tthis.done = false;\n\t\tthis.error = null;\n\n\t\tint timeout = value(this.timeout, 60000);\n\t\tint interval = value(this.interval, 1000);\n\t\tlong started = System.currentTimeMillis();\n\t\ttry {\n\t\t\tdo {\n\t\t\t\tboolean checked = check();\n\t\t\t\tif (checked || this.done || this.error != null || (System.currentTimeMillis() - started) > timeout) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tsynchronized (lock) {\n\t\t\t\t\tlock.wait(interval);\n\t\t\t\t}\n\t\t\t} while (true);\n\n\t\t} catch (Exception x) {\n\t\t\terror = new AssertionError(x);\n\t\t}\n\n\t\tif (error != null) {\n\t\t\tthrow error;\n\t\t}\n\n\t\tif (!done) {\n\t\t\tfail(\"Wait timeout: \" + timeout + \" ms\");\n\t\t}\n\t}",
"void invokeRunnableInVMs(boolean catchErrors, CacheSerializableRunnable runnable,\n VM... vms) {\n for (VM vm : vms) {\n try {\n vm.invoke(runnable);\n } catch (Exception e) {\n if (!catchErrors) {\n throw e;\n }\n }\n }\n }",
"public void execute() throws org.apache.ant.common.util.ExecutionException {\n try {\n executeMethod.invoke(worker, null);\n } catch (java.lang.Throwable t) {\n throw new org.apache.ant.common.util.ExecutionException(t);\n }\n }",
"public interface Job {\n\n /** unique id for this job that is used as a reference in the service methods */\n String getId();\n\n /** job executor identification that has acquired this job and is going to execute it */\n String getLockOwner();\n\n /** in case this is a timer, it is the time that the timer should fire, in case this \n * is a message, it is null. */\n Date getDueDate();\n\n /** in case this is a timer, it is the time that the timer should fire, in case this \n * is a message, it is null.\n * @deprecated call {@link #getDueDate()} instead */\n @Deprecated\n Date getDuedate();\n\n /** exception that occurred during the last execution of this job. The transaction \n * of the job execution is rolled back. A synchronization is used to create \n * a separate transaction to update the exception and decrement the retries. */\n String getException();\n\n /** number of retries left. This is only decremented when an exception occurs during job \n * execution. The transaction of the job execution is rolled back. A synchronization is used to create \n * a separate transaction to update the exception and decrement the retries. */\n int getRetries();\n\n /** indicates if this job should be executed separate from any other job \n * in the same process instance */\n boolean isExclusive();\n\n /** the related execution */\n Execution getExecution();\n\n /** the related process instance */\n Execution getProcessInstance();\n\n Date getLockExpirationTime();\n\n}",
"@Override\r\n\tpublic void jobFailed(Job failedJob, Job retry) {\n\t\tgetCloudsim().log(\"WARNING: Job failed: \" + failedJob.getID());\r\n\t}",
"@Override\n public void run() {\n if (checkFailure()) {\n throw new InvalidInputException(\"任务结果计算器暂时无法工作,因为未满足条件\");\n } else {\n analysisDistribution();\n File file = writeFile();\n task.setResult(OSSWriter.upload(file));\n task.setHasResult(true);\n taskController.update(task);\n }\n }",
"abstract void doJob();",
"@Override\n public void execute() throws Exception {\n try{\n Logger.getLogger(IdentityReconciliationProcessor.class.getName()).log(Level.INFO, \n \"Starting OIM Identity Migration from LDAP to DB [RECON].\");\n validateInputParams();\n OIMClient client = getOIMClient();\n //Invoking scheduler service\n SchedulerService schService = client.getService(SchedulerService.class);\n JobDetails jobDetails = schService.getJobDetail(jobName);\n jobDetails.setRetrycount(5);\n HashMap<String, JobParameter> attributes = new HashMap<String, JobParameter>();\n // Add mandatory attributes\n addMandatoryAttributes(attributes);\n // Parse input parameter to add Job parameters/attribute.\n getJobDetailAttributes(attributes);\n jobDetails.setAttributes(attributes);\n schService.updateJob(jobDetails);\n Logger.getLogger(IdentityReconciliationProcessor.class.getName()).log(Level.INFO, \"Stating Reconciliation Job : \" + jobName);\n schService.triggerNow(jobName);\n // Invoke Time to poll status of Job. Exit on success.\n ReconciliationUtil reconUtil = new ReconciliationUtil();\n reconUtil.pollJobStatus(schService,jobName);\n }catch (Exception exception){\n throw exception;\n }\n }",
"public static Map<VmProxy, JobProxy> scatterSubmitJob(final Map<VmProxy, JobProxy> vmJobMap, long timeout) throws TimeoutException {\n final Object monitor = new Object();\n\n for (final VmProxy vmProxy : vmJobMap.keySet()) {\n Handler<JobProxy> submitJobHandler = new Handler<JobProxy>() {\n public void handle(JobProxy jobStruct) {\n vmJobMap.put(vmProxy, jobStruct);\n if (ScatterGatherPattern.areComplete(vmJobMap.values())) {\n synchronized (monitor) {\n monitor.notify();\n }\n }\n }\n };\n vmProxy.submitJob(vmJobMap.get(vmProxy), submitJobHandler, submitJobHandler);\n }\n\n ScatterGatherPattern.monitorSleep(monitor, timeout);\n if (!ScatterGatherPattern.areComplete(vmJobMap.values()))\n throw new TimeoutException(\"scatter submit_job timedout after \" + timeout + \"ms.\");\n\n return vmJobMap;\n }",
"public String execute() {\n\t\t\n\t\tjobs = new ArrayList<Map<String, String>>();\n\t\tMap<String, String> job = new HashMap<String, String>();\n\t\tjob.put(\"title\", \"Java Developer\");\n\t\tjob.put(\"description\", \"Java Developer 1\");\n\t\tjob.put(\"location\", \"london\");\n\t\tjobs.add(job);\n\t\t\n\t\tjob = new HashMap<String, String>();\n\t\tjob.put(\"title\", \"Java Developer\");\n\t\tjob.put(\"description\", \"Java Developer 1\");\n\t\tjob.put(\"location\", \"london\");\n\t\tjobs.add(job);\n\t\t\n \n\t\treturn \"SUCCESS\";\n \n\t}",
"@Override \r\n public void execute(JobExecutionContext executionContext) \r\n throws JobExecutionException {\n try { \r\n // Retrieve the state object. \r\n JobContext jobContext = (JobContext) executionContext \r\n .getJobDetail().getJobDataMap().get(\"jobContext\"); \r\n \r\n // Update state. \r\n jobContext.setState(new Date().toString()); \r\n \r\n // This is just a simulation of something going wrong. \r\n int number = 0; \r\n number = 123 / number; \r\n } catch (Exception e) { \r\n throw new JobExecutionException(e); \r\n } \r\n }",
"public void run() {\n try {\n Thread.sleep(2000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n LOG.error(\"Submit: {} - run {}/{}\", topologies.get(jobIndex).name, ((jobCounter - 1) % runs) + 1, runs);\n client.submitTopology(topologies.get(jobIndex), null);\n }",
"public OperationStatus execute(T operation) throws AbstractAgentException;",
"abstract Object doPMJob() throws PackageManagerException;",
"@Override\n public void killJob(JobID jobid) throws IOException {\n if (null == jobid) {\n LOG.info(\"Null jobid object sent to JobTracker.killJob()\");\n return;\n }\n \n JobInProgress job = jobTable.get(jobid);\n \n if (null == job) {\n LOG.info(\"killJob(): JobId \" + jobid.toString() + \" is not a valid job\");\n return;\n }\n \n job.kill();\n }",
"void execute() throws Exception;",
"@Test\n public void testSplitRoomReservationReportJob() throws Exception {\n Job allocJob = new AllocationScraperJob();\n allocJob.setStatus( JobStatus.completed );\n dao.insertJob( allocJob );\n\n // setup a job to find all bookings spanning different rooms\n Job j = new SplitRoomReservationReportJob();\n j.setStatus( JobStatus.submitted );\n j.setParameter( \"allocation_scraper_job_id\", String.valueOf( allocJob.getId() ) );\n int jobId = dao.insertJob( j );\n\n // this should now run the job\n processorService.processJobs();\n\n // verify that the job completed successfully\n Job jobVerify = dao.fetchJobById( jobId );\n Assert.assertEquals( JobStatus.completed, jobVerify.getStatus() );\n }",
"public void run(IProgressMonitor monitor) throws CoreException {\n \t\t\t\t\t\t\t\tstatus[2] = TestBarrier.STATUS_RUNNING;\n \t\t\t\t\t\t\t\t//let job two finish\n \t\t\t\t\t\t\t\tstatus[1] = TestBarrier.STATUS_WAIT_FOR_DONE;\n \t\t\t\t\t\t\t\t//ensure this job does something so the build listener runs\n \t\t\t\t\t\t\t\truleFile.touch(null);\n \t\t\t\t\t\t\t\t//wait for the ok to complete\n \t\t\t\t\t\t\t\tTestBarrier.waitForStatus(status, 2, TestBarrier.STATUS_WAIT_FOR_DONE);\n \t\t\t\t\t\t\t}",
"@Test\n public void _03getJob() throws ApiException {\n OCRJobResponse response = api.getJob(ocrJob.getJobId());\n Assert.assertNotNull(response);\n Assert.assertTrue(response.getStatus() == OCRJobResponse.StatusEnum.PROCESSING || response.getStatus() == OCRJobResponse.StatusEnum.DONE);\n }",
"private void runWithJobId() {\n if (jobName.isPresent()) {\n handleBadRequest(ERROR_BOTH_JOB_ID_AND_NAME);\n return;\n }\n if (numJobsToDelete.isPresent()) {\n handleBadRequest(ERROR_BOTH_JOB_ID_AND_NUMBER_OF_JOBS);\n return;\n }\n if (daysOld.isPresent()) {\n handleBadRequest(ERROR_BOTH_JOB_ID_AND_DAYS_OLD);\n return;\n }\n response.setPayload(requestDeletion(ImmutableSet.of(jobId.get()), true /* verbose */));\n }",
"private void scheduleJob() {\n\n }",
"void onHadoopJobFailure(LmmpJob job, String failReason);",
"public void execute() {\n\t\tlaunch();\n\t}",
"@DISPID(17)\r\n\t// = 0x11. The runtime will prefer the VTID if present\r\n\t@VTID(19)\r\n\tint postJobReturnCode();",
"public abstract void run()\n\t\tthrows Exception;",
"public void execute(final JobExecutionContext jobExecutionContext) throws JobExecutionException {\n System.out.println(\"Job is executing ....\");\n }",
"interface Runnable {\n void execute() throws Throwable;\n default void run() {\n try {\n execute();\n } catch(Throwable t) {\n throw new RuntimeException(t);\n }\n }\n }",
"@Override\n public void perform(Run<?,?> build, FilePath workspace, Launcher launcher, final TaskListener listener) {\n \ttry {\n\t\t\tenvironmentMap = build.getEnvironment((TaskListener)listener);\n\t\t\tthis.testrunid = replaceEnvironmentVariables((String)\"%TESTRUNID%\", environmentMap);\n\t\t\tthis.jobname = replaceEnvironmentVariables((String)\"%JOB_NAME%\", environmentMap);\n\t\t\tthis.projectname = replaceEnvironmentVariables((String)\"%PROJECTNAME%\", environmentMap);\n\t\t\tthis.type = replaceEnvironmentVariables((String)\"%TYPE%\", environmentMap);\n \t} catch (IOException | InterruptedException e) {\n \t\tContactPolarion(listener);\n\t\t\te.printStackTrace();\n\t\t\tlistener.getLogger().println(e.getMessage());\n\t\t}\n \t\n \t\n //Create a callable to execute job on slave\n \tCallable<Integer, IOException> task = new Callable<Integer, IOException>() {\n \t\n \t\tprivate static final long serialVersionUID = 1L;\n\n \t\tpublic Integer call() throws IOException {\n \t\t\t// This code will run on the build slave\n \t\t\tint ret=90;\n \t\t\ttestCases = new ArrayList<String>();\n \t\t\trealIds = new ArrayList<String>();\n \t \tString path = \"./workspace/\"+jobname;\n\t\t\t\tlistener.getLogger().println(\"IL PATH DEL TESTRUN E' \"+path);\n \t\t\t/* folders = listFilesForFolder(new File(path),listener);\n \t\t\t// cerco il TestRun nell'svn di Polarion\n \tcheck:\tfor(String folder : folders){\n \t \tlistener.getLogger().println(\"confronto: \"+testrunid+\" - \"+folder);\n \t\t\t\tif(testrunid.equals(folder)){ \t\t\t\t\t\n \t\t\t\t\t// prelevo i TestCase relativi al TestRun\n \t\t\t\t\t */\n \t\t\t\t\ttestCases = getTestCases(path,listener);\n \t\t\t\t\tString nometestrun = \"Executed - \"+testrunid+\".xml\";\n \t\t\t\t\tif(!testCases.isEmpty()){\n \t\t\t\t\t\t// prelevo l'ID vero dei Test Case\n\t\t\t\t\t\t\trealIds = getRealTestCaseIdFromPolarion(listener,testCases);\n\t\t\t\t\t\t\tif(type.equals(\"TestMTP\")){ // ESECUZIONE SU MTP\n\t\t\t\t\t\t\t\tlistener.getLogger().println(\"eseguo MTP\");\n\t\t\t\t\t\t\t\tfor(String realId : realIds){\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/* Per l'esecuzione con lo stub (va messa fuori il for per funzionare)\n\t\t \t\t\t\t\tCreaXMLStub stub = new CreaXMLStub(testCases);\n\t\t\t\t\t\t\t\tstub.doTest(\"C:/JenkinsSlave/workspace/\"+jobname+\"/Temp/\"+nometestrun,listener);*/\n\t\t\t\t\t\t\t}else if(type.equals(\"TestMX\")){ // ESECUZIONE SU MICROMAX\n\t\t\t\t\t\t\t\tif(!scenario){\n\t\t\t\t\t\t\t\t\tArrayList<Integer> returnCodes = new ArrayList<Integer>();\n\t\t\t\t\t\t\t\t\tfor(String realId : realIds){\n\t\t\t\t\t\t\t\t\t\t// stampo il realId del test case\n\t\t\t\t\t\t\t \tlistener.getLogger().println(\"TC: \"+realId);\n\t\t\t\t\t\t\t\t\t\tlistener.getLogger().println(\"eseguo MX\");\n\t\t\t\t\t\t\t\t\t\tString[] parameters = realId.split(\",\");\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tProcessBuilder builder = new ProcessBuilder(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"MxVGUI\", \"/n\", \"/r\", mxpath+File.separator+parameters[0]+File.separator+parameters[1]+\".mxp\", mxpath+File.separator+parameters[0]+\"/ScenariosAndTestCases/\"+parameters[2]); \n\t\t\t\t\t\t\t\t\t\t\tbuilder.redirectErrorStream(true); \n\t\t\t\t\t\t\t\t\t\t\tProcess p = builder.start();\n\t\t\t\t\t\t\t\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));\n\t\t\t\t\t\t\t\t\t\t\tString line;\n\t\t\t\t\t\t\t\t\t\t\twhile ((line = reader.readLine()) != null)\n\t\t\t\t\t\t\t\t\t\t\t\tlistener.getLogger().println(\"tasklist: \" + line);\n\t\t\t\t\t\t\t\t\t\t\tret=p.waitFor();\n\t\t\t\t\t\t\t\t\t\t\treturnCodes.add(ret);\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tlistener.getLogger().println(\"eseguito MX \"+ret);\n\t\t\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\t\tContactPolarion(listener);\n\t\t\t\t\t\t\t\t\t\t\tlistener.getLogger().println(e.getMessage());\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//Scrive i risultati in base al valore di ritorno di MxVDEV\n\t\t\t\t\t\t\t\t\twriteTestResults(\"C:/JenkinsSlave/Results/\"+nometestrun, testCases, returnCodes);\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//Converto tutti i risultati nel formato desiderato leggendo i log\n\t\t\t\t\t\t\t\t//convertTestCaseResults(realIds, \"C:/JenkinsSlave/workspace/\"+jobname+\"/Temp/\"+nometestrun, testCases);\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//convertScenarioResults(testCases, new ArrayList<String>(), mxpath+File.separator+parameters[0]+\"/ScenariosAndTestCases/\"+testrunid ,testrunid);\n\t\t\t\t\t\t\t\t\tString[] parameters = realIds.get(0).split(\",\");\n\t\t\t\t\t\t\t\t\tScenario scenario = new Scenario(testrunid,realIds,mxpath+File.separator+parameters[0]+\"/ScenariosAndTestCases/\");\n\t\t\t\t\t\t\t\t\tif(scenario.createScenario()){\n\t\t\t\t\t\t\t\t\t\tlistener.getLogger().println(\"Scenario creato\");\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tProcessBuilder builder = new ProcessBuilder(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"MxVGUI\", \"/n\", \"/r\", mxpath+File.separator+parameters[0]+File.separator+parameters[1]+\".mxp\", mxpath+File.separator+parameters[0]+\"/ScenariosAndTestCases/\"+testrunid+\".mxs\"); \n\t\t\t\t\t\t\t\t\t\t\tbuilder.redirectErrorStream(true); \n\t\t\t\t\t\t\t\t\t\t\tProcess p = builder.start();\n\t\t\t\t\t\t\t\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));\n\t\t\t\t\t\t\t\t\t\t\tString line;\n\t\t\t\t\t\t\t\t\t\t\twhile ((line = reader.readLine()) != null)\n\t\t\t\t\t\t\t\t\t\t\t\tlistener.getLogger().println(\"tasklist: \" + line);\n\t\t\t\t\t\t\t\t\t\t\tret=p.waitFor();\n\t\t\t\t\t\t\t\t\t\t\tlistener.getLogger().println(\"eseguito MX \"+ret);\n\t\t\t\t\t\t\t\t\t\t\tconvertScenarioResults(testCases, new ArrayList<String>(), mxpath+File.separator+parameters[0]+\"/ScenariosAndTestCases/\"+testrunid ,testrunid);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\t\t\tContactPolarion(listener);\n\t\t\t\t\t\t\t\t\t\t\tlistener.getLogger().println(e.getMessage());\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\tlistener.getLogger().println(\"creazione dello scenario non riuscita\");\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else{ // CONDIZIONE EVENTUALI ERRORI\n\t\t\t\t\t\t\t\tContactPolarion(listener);\n\t\t\t\t\t\t\t\tlistener.getLogger().println(\"condizione inaspettata\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tpublishTest(\"C:/JenkinsSlave/Results/\",sharedpasswd,shareduser,nometestrun, listener, projectname);\n\t\t\t\t\t \t}else{\n\t\t\t\t\t \t\tContactPolarion(listener);\n\t\t\t\t\t \t\tlistener.getLogger().println(\"Nessun tc impostato. Setto tr a open\");\n\t\t\t\t\t \t//}\n\t\t\t\t\t \t//break check;\n \t\t\t\t//}\n \t\t\t}\n \t\t\treturn ret; \t\n \t\t}\n\n\t\t\tprivate void writeTestResults(String file, ArrayList<String> testCases, ArrayList<Integer> returnCodes) {\n\t\t\t\ttry {\t\t\n\t\t\t\t\tFileWriter writer = new FileWriter(file);\n\t\t\t\t\tlistener.getLogger().println(\"inizio ad aggiungere test case\"); \t\t\t \n\t\t\t\t\twriter.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\");\n\t\t\t\t\twriter.write(\"<testsuite>\\n\");\n\t\t\t\t\tIterator<String> ittest = testCases.iterator();\n\t\t\t\t\tIterator<Integer> itrets = returnCodes.iterator();\n\t\t\t\t\twhile (itrets.hasNext() && ittest.hasNext()) {\n\t\t\t\t\t\twriter.write(\"\\t<testcase classname=\\\"TC\\\" name=\\\"\"+ittest.next()+\"\\\">\\n\");\n\t\t\t\t\t\tint ret=itrets.next();\n\t\t\t\t\t\tswitch (ret) {\n\t\t\t case 0: writer.write(\"\\t</testcase>\\n\");\n\t\t\t break;\n\t\t\t case 1: writer.write(\"\\t\\t<failure>\\n\\t\\t\\tScenario ran and one or more test cases were evaluated as failing\\n\\t\\t</failure>\\n\");\n\t\t\t\t\t\t\t\t writer.write(\"\\t</testcase>\\n\");\n\t\t\t\t\t\t\t\t break;\n\t\t\t case 2: writer.write(\"\\t\\t<error>\\n\\t\\t\\tA run-time error occurred during execution of the Scenario, usually caused by an error in VMC code\\n\\t\\t</error>\\n\");\n\t\t\t\t\t\t\t\t writer.write(\"\\t</testcase>\\n\");\n\t\t\t break;\n\t\t\t case 3: writer.write(\"\\t\\t<error>\\n\\t\\t\\tScenario execution was aborted, or some of the test cases were unable to be run\\n\\t\\t</error>\\n\");\n\t\t\t\t\t\t\t\t writer.write(\"\\t</testcase>\\n\");\n\t\t\t break;\n\t\t\t case 4: writer.write(\"\\t\\t<error>\\n\\t\\t\\tThe Scenario contained no runnable test cases, or was set to run forever\\n\\t\\t</error>\\n\");\n\t\t\t\t\t\t\t\t writer.write(\"\\t</testcase>\\n\");\n\t\t\t break;\n\t\t\t case 5: writer.write(\"\\t\\t<error>\\n\\t\\t\\tScenario was not run at all, usually due to project setup error\\n\\t\\t</error>\\n\");\n\t\t\t\t\t\t\t\t writer.write(\"\\t</testcase>\\n\");\n\t\t\t break;\n\t\t\t case 6: writer.write(\"\\t\\t<error>\\n\\t\\t\\tA Scenario that is part of a regression test is missing\\n\\t\\t</error>\\n\");\n\t\t\t\t\t\t\t\t writer.write(\"\\t</testcase>\\n\");\n\t\t\t break;\n\t\t\t default: writer.write(\"\\t\\t<error>\\n\\t\\t\\tUnknown error\\n\\t\\t</error>\\n\");\n\t\t\t \t\t writer.write(\"\\t</testcase>\\n\");;\n\t \t break;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\twriter.write(\"</testsuite>\\n\");\n\t\t\t\t\twriter.flush();\n\t\t\t\t\twriter.close();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tContactPolarion(listener);\n\t\t\t\t\tlistener.getLogger().println(e.getMessage());\n\t\t\t\t\tlistener.getLogger().println(\"dotest: \\n\"+e.getMessage());\n\t\t\t\t}\n\t\t\t}\n \t\t\n \t\tprivate void convertTestCaseResults(ArrayList<String> realIds,String file, ArrayList<String> tests) {\n\t\t\t\t// TODO Auto-generated method stub\n \t\t\ttry {\t\t\n \t\t\t\tFileWriter writer = new FileWriter(file);\n \t\t\t\tlistener.getLogger().println(\"inizio ad aggiungere test case\"); \t\t\t \n \t\t\t\twriter.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\");\n \t\t\t\twriter.write(\"<testsuite>\\n\");\n \t\t\t\tIterator<String> itreal = realIds.iterator();\n \t\t\t\tIterator<String> ittest = tests.iterator();\n \t\t\t\twhile (itreal.hasNext() && ittest.hasNext()) {\n\t \t\t\t\t//Legge il file mxlog\n\t \t\t\t\tFile tr = new File(\"C:/Users/utente/Desktop/InvertSample/ScenariosAndTestCases/\"+itreal.next()+\".mxlog\");\t \n\t \t \tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n\t \t\t DocumentBuilder db;\n\t \t\t\ttry {\n\t \t\t\t\tdb = dbf.newDocumentBuilder();\n\t \t\t\t\tDocument doc = db.parse(tr);\n\t \t\t\t doc.getDocumentElement().normalize();\n\t \t\t\t XPath xpath = XPathFactory.newInstance().newXPath();\n\t \t\t\t XPathExpression xExpress = xpath.compile(\"//Str\");\n\t \t\t\t NodeList nl = (NodeList) xExpress.evaluate(doc, XPathConstants.NODESET);\n\t \t\t\t int index = nl.getLength()-1; \n\t \t\t\t if(nl != null){\n\t\t \t\t\t\t\twriter.write(\"\\t<testcase classname=\\\"TC\\\" name=\\\"\"+ittest.next()+\"\\\">\\n\");\n\t\t \t\t\t\t\tString esito=nl.item(index).getTextContent();\n\t\t \t\t\t\t\tesito=esito.substring(esito.lastIndexOf(\" \")+1);\n\t\t \t\t\t\t\tlistener.getLogger().println(esito); \n\t\t \t\t\t\t\tif(esito.equals(\"PASS\")){\n\t\t \t\t\t\t\t\twriter.write(\"\\t</testcase>\\n\");\n\t\t \t\t\t\t\t}\n\t\t \t\t\t\t\telse if(esito.equals(\"FAILURE\")){\n\t\t \t\t\t\t\t\twriter.write(\"\\t\\t<failure>\\n\\t\\t\\tProva testo difetto failure (4-7)\\n\\t\\t</failure>\\n\");\n\t\t \t\t\t\t\t\twriter.write(\"\\t</testcase>\\n\");\n\t\t \t\t\t\t\t}else{\n\t\t \t\t\t\t\t\twriter.write(\"\\t\\t<error>\\n\\t\\t\\tProva testo difetto errore(5-9)\\n\\t\\t</error>\\n\");\n\t\t \t\t\t\t\t\twriter.write(\"\\t</testcase>\\n\");\n\t\t \t\t\t\t\t}\n\t\t \t\t\t }else{\n\t\t\t \t\t\t \tlistener.getLogger().println(\"nl vuota\");\n\t\t\t \t\t\t }\n\t \t\t\t} catch (ParserConfigurationException | SAXException | IOException | XPathExpressionException e) {\n\t \t\t\t\tContactPolarion(listener);\n\t \t\t\t\tlistener.getLogger().println(e.getMessage());\n\t \t\t\t}\n \t\t\t\t}\n \t\t\twriter.write(\"</testsuite>\\n\");\n \t\t\t\twriter.flush();\n \t\t\t\twriter.close();\n \t\t\t\n \t\t\t} catch (Exception e) {\n \t\t\t\tContactPolarion(listener);\n \t\t\t\tlistener.getLogger().println(e.getMessage());\n \t\t\t\tlistener.getLogger().println(\"dotest: \\n\"+e.getMessage());\n \t\t\t}\t\n\t\t\t}\n \t\t\n \t\tprivate void convertScenarioResults(ArrayList<String> testcases, ArrayList<String> blocktests, String file, String testrun) {\n\t\t\t\t// TODO Auto-generated method stub\n \t\t\ttry {\t\t\n \t\t\t\tFileWriter writer = new FileWriter(\"C:/JenkinsSlave/Results/Executed - \"+testrun+\".xml\");\n \t\t\t\tFile tr = new File(file+\".mxlog\");\t \n \t\t\t DocumentBuilder db;\n \t\t \tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n \t\t\t\tdb = dbf.newDocumentBuilder();\n \t\t\t\tDocument doc = db.parse(tr);\n \t\t\t doc.getDocumentElement().normalize();\n \t\t\t XPath xpath = XPathFactory.newInstance().newXPath();\n \t\t\t XPathExpression xExpress = xpath.compile(\"//Str\");\n \t\t\t NodeList nl = (NodeList) xExpress.evaluate(doc, XPathConstants.NODESET);\n \t\t\t ArrayList<String> ciao = new ArrayList<String>();\n \t\t\t if(nl != null){\n \t\t\t \twriter.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\");\n \t\t\t\t\twriter.write(\"<testsuite>\\n\");\n \t\t\t\t int index=0;\n \t\t\t\t for(String testcase: testcases){\n \t\t\t\t \twriter.write(\"\\t<testcase classname=\\\"TC\\\" name=\\\"\"+testcase+\"\\\">\\n\");\n \t\t\t\t \tString testo=nl.item(index).getTextContent();\n \t\t\t\t \twhile(!testo.startsWith(\"Post \")){\n \t\t\t\t \t\tindex++;\n \t\t\t\t \t\ttesto=nl.item(index).getTextContent();\n \t\t\t\t \t}\n \t\t\t\t\t\t\tif(testo.substring(testo.lastIndexOf(\" \")+1).equals(\"passed.\")){\n \t\t\t\t\t\t\t\twriter.write(\"\\t</testcase>\\n\");\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\telse if(testo.substring(testo.lastIndexOf(\" \")+1).equals(\"failed.\")){\n \t\t\t\t\t\t\t\twriter.write(\"\\t\\t<failure>\\n\\t\\t\\tTest Case was evaluated as failed\\n\\t\\t</failure>\\n\");\n \t\t\t\t\t\t\t\twriter.write(\"\\t</testcase>\\n\");\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\tindex++;\n \t\t\t\t \t}\n \t\t\t\t for(String block: blocktests){\n \t\t\t\t \twriter.write(\"\\t<testcase classname=\\\"TC\\\" name=\\\"\"+block+\"\\\">\\n\");\n \t\t\t\t \twriter.write(\"\\t\\t<error>\\n\\t\\t\\tTest Case not found\\n\\t\\t</error>\\n\");\n \t\t\t\t\t\twriter.write(\"\\t</testcase>\\n\");\n \t\t\t\t }\n \t\t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\twriter.write(\"</testsuite>\\n\");\n \t\t\t\t\twriter.flush();\n \t\t\t\t\twriter.close();\n \t\t\t }else{\n \t\t\t \tContactPolarion(listener);\n \t\t\t }\n \t\t\t\t \n \t\t\t\t}catch(Exception e){\n \t\t\t\t\tContactPolarion(listener);\n \t\t\t\t\tlistener.getLogger().println(e.getMessage());\n \t\t\t\t}\n\t\t\t}\n\n\n \t\t\n\t\t\t@Override\n \t\tpublic void checkRoles(RoleChecker arg0) throws SecurityException {\n \t\t\t// TODO Auto-generated method stub\t\n \t\t}\n \t};\n\n \t// Get a \"channel\" to the build machine and run the task there\n \ttry {\n\t\t\tlauncher.getChannel().call(task);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tContactPolarion(listener);\n\t\t\tlistener.getLogger().println(e.getMessage());\n\t\t}\t\t\t\n\t\t}",
"@Override\n public boolean onStepThrowable(FlowStep flowStep , Throwable throwable) {\n HadoopStepStats stats = (HadoopStepStats)flowStep.getFlowStepStats();\n String jobName = flowStep.getName();\n\n //get job node\n DAGNode<CascadingJob> node = dagNodeNameMap.get(jobName);\n if (node == null) {\n log.warn(\"Unrecognized jobId reported for succeeded job: \" + stats.getJobID());\n return false;\n }\n addCompletedJobStats(node.getJob(), stats);\n pushEvent(currentFlowId, new Event.JobFailedEvent(node));\n return false;\n }",
"@Test(expected = WorkflowExecutionException.class)\n public void testExecuteWorkflowExecutionException() {\n action.execute(state);\n action.execute(state);\n }",
"@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\texecutable.feedbackExecutionError();\r\n\t\t\t\t\t}",
"public boolean submitJob(String experimentID,String taskID, String gatewayID, String tokenId) throws GFacException;",
"@Override\n\tpublic void submitJobEmployee(int je_id, String caller) {\n\n\t}",
"@Override\n\tpublic boolean doJobs() {\n\n\t\tERRCODE = \"0\";\n\t\tERRDESC = \"succ\";\n\n\t\tcalPrice();\n\n\t\treturn true;\n\n\t}",
"public void execute() {\n TestOrchestratorContext context = factory.createContext(this);\n\n PipelinesManager pipelinesManager = context.getPipelinesManager();\n ReportsManager reportsManager = context.getReportsManager();\n TestDetectionOrchestrator testDetectionOrchestrator = context.getTestDetectionOrchestrator();\n TestPipelineSplitOrchestrator pipelineSplitOrchestrator = context.getPipelineSplitOrchestrator();\n\n pipelinesManager.initialize(testTask.getPipelineConfigs());\n reportsManager.start(testTask.getReportConfigs(), testTask.getTestFramework());\n pipelineSplitOrchestrator.start(pipelinesManager);\n\n testDetectionOrchestrator.startDetection();\n testDetectionOrchestrator.waitForDetectionEnd();\n LOGGER.debug(\"test - detection - ended\");\n\n pipelineSplitOrchestrator.waitForPipelineSplittingEnded();\n pipelinesManager.pipelineSplittingEnded();\n LOGGER.debug(\"test - pipeline splitting - ended\");\n\n pipelinesManager.waitForExecutionEnd();\n reportsManager.waitForReportEnd();\n\n LOGGER.debug(\"test - execution - ended\");\n }",
"@Override\r\n\tpublic void doConcurrentJob() {\n\t\tthis.vop.interatorTheVector();\r\n\t}",
"void invoke(T event);",
"@Override\n\tpublic void execute(JobExecutionContext arg0) throws JobExecutionException {\n\t\t new SchoolMsgService().writeIntoSchoolMsg_ReceivedStu();\n//\t\t System.out.println(\"just test: \" + new Date());\n\t}",
"@Test\n public void testUnpaidDepositReportJob() throws Exception {\n Job allocScraperJob = new AllocationScraperJob();\n allocScraperJob.setStatus( JobStatus.completed );\n dao.insertJob( allocScraperJob );\n\n // setup a job to scrape allocation info\n Job j = new UnpaidDepositReportJob();\n j.setStatus( JobStatus.submitted );\n j.setParameter( \"allocation_scraper_job_id\", String.valueOf( allocScraperJob.getId() ) );\n int jobId = dao.insertJob( j );\n\n // this should now run the job\n processorService.processJobs();\n\n // verify that the job completed successfully\n Job jobVerify = dao.fetchJobById( jobId );\n Assert.assertEquals( JobStatus.completed, jobVerify.getStatus() );\n }",
"protected abstract void execute() throws InterruptedException, SenseException;",
"@DISPID(13)\r\n\t// = 0xd. The runtime will prefer the VTID if present\r\n\t@VTID(15)\r\n\tint jobReturnCode();",
"public void scheduleJobs();",
"void failure(ServiceExecutionEvent e) {\n\n }",
"@Override\n public void testTaskManagerFailure(\n TestEnvironment testEnv,\n ExternalContext<RowData> externalContext,\n ClusterControllable controller)\n throws Exception {\n }",
"private static void scheduleJob(Context context, JobInfo job) {\n JobScheduler jobScheduler =\n (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE);\n int result = jobScheduler.schedule(job);\n Assert.assertEquals(JobScheduler.RESULT_SUCCESS, result);\n if (DEBUG) {\n Log.d(TAG, \"Scheduling result is \" + result);\n }\n }",
"public abstract boolean execute(String[] args) throws InterruptedException;",
"public void execute(Runnable command) {\r\n if(dead)\r\n throw new RejectedExecutionException(getClass().getSimpleName()+\" has been shut down\");\r\n else\r\n command.run();\r\n }",
"public void execute() {\n if (hasError())\n return;\n\n runLocally();\n runRemotely();\n }",
"V call() throws StatusRuntimeException;",
"public void run() {\n jobDescriptor j = null;\n\n while (!exit) {\n try {\n // wait for work\n syncObject.acquire();\n\n // get next job descriptor\n j = jobQueue.poll();\n if (j == null)\n continue;\n\n j.outputObject.started();\n\n if (!executor.executeTask(new MyRunnable(j.codeToBeExecuted, j.outputObject))) {\n j.outputObject.error(\"... cancelled!\");\n }\n } catch (Throwable e) {\n logger.error(e.getMessage());\n }\n }\n }",
"public void run()\n\t{\n\t\t\n\t\t\n\t\tString[] args = new String[] { };\n\t\ttry \n\t\t{\n\t\t\tToolRunner.run(this, args);\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tlogger.error(\"Hadoop job execution failed\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"JobResponse apply(Context context);",
"public void execute() throws BuildException {\n \tServiceClientFactory scf=super.getServiceClientFactory();\n\n \ttry {\n \t\tApplicationManagerClient amClient=new ApplicationManagerClient(scf);\n \t\tamClient.deployApplication(applicationName,version);\n \t\t\n \t\t// Log success message for feedback\n \t\tlog(\"Successfully deployed application: \" + applicationName + \"/\" + version);\n\n \t} catch (Exception e){\n \t\tthrow new BuildException(\"Error deploying application:\"+e.getMessage());\n \t}\n }"
] | [
"0.6203446",
"0.58774424",
"0.575881",
"0.5582176",
"0.54633164",
"0.5415063",
"0.53832316",
"0.5382785",
"0.5375711",
"0.53463256",
"0.53018254",
"0.5269343",
"0.52327454",
"0.52196324",
"0.52142406",
"0.5196152",
"0.51803416",
"0.51731014",
"0.51179284",
"0.50582176",
"0.50560147",
"0.5048326",
"0.5041687",
"0.50415105",
"0.50054306",
"0.4915379",
"0.4912268",
"0.49097168",
"0.4908767",
"0.48916492",
"0.48878023",
"0.48750502",
"0.48604408",
"0.48581305",
"0.48477322",
"0.4847369",
"0.4846736",
"0.4836319",
"0.48258406",
"0.4823583",
"0.4819827",
"0.4814262",
"0.4807996",
"0.480266",
"0.4789584",
"0.47866166",
"0.47830185",
"0.47751322",
"0.47746864",
"0.47608867",
"0.4760399",
"0.47491467",
"0.47347975",
"0.47330904",
"0.47324756",
"0.47222754",
"0.47188357",
"0.47123107",
"0.4705062",
"0.46958315",
"0.46802366",
"0.4680143",
"0.4679022",
"0.466934",
"0.46620548",
"0.46614906",
"0.46569985",
"0.46470952",
"0.46435153",
"0.46415707",
"0.46375734",
"0.46276358",
"0.46191263",
"0.46183577",
"0.4616331",
"0.46053946",
"0.46049702",
"0.46016824",
"0.45992815",
"0.4594884",
"0.4591068",
"0.45849514",
"0.4584007",
"0.45838058",
"0.45819122",
"0.4578824",
"0.4576838",
"0.45717973",
"0.45706898",
"0.45706782",
"0.45603848",
"0.45600885",
"0.45581052",
"0.45538518",
"0.45537394",
"0.45486572",
"0.45480084",
"0.45467672",
"0.4539333",
"0.4534049"
] | 0.5715368 | 3 |
TODO Autogenerated method stub | public static void main(String[] args) {
float x=1;
int y=2;
float z=3;
int a=4;
int b=5;
float result =x/y ;
System.out.println (result);
result =x+y ;
System.out.println ("9+2=" +result);
result =x-y ;
System.out.println ("9-2=" +result);
result =x*y ;
System.out.println ("9-2=" +result);
if (x==b)
{
System.out.println ("true");
}
else
{
System.out.println ("false");
}
if (x!=a)
{
System.out.println ("true");
}
else
{
System.out.println ("false");
}
if (z<b)
{
System.out.println ("b is grather ");
}
else
{
System.out.println ("b is less");
}
} | {
"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}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\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\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
] | 0.0 | -1 |
Instantiates a new onionoo parser. | public OnionooParser() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Parser() {}",
"private Parser () { }",
"public Parser()\n {\n //nothing to do\n }",
"public OpenOfficeXMLDocumentParser() {\r\n }",
"public PjxParser()\r\n {\r\n LOG.info(this + \" instantiated\");\r\n }",
"Parse createParse();",
"public Parser()\n{\n //nothing to do\n}",
"protected ASTParser createASTParser() {\n ASTParser parser = ASTParser.newParser(this.testLevel);\n return parser;\n }",
"public Parser() {\n\t\tpopulateMaps();\n\t}",
"private static DocumentBuilder instantiateParser()\n throws IOException {\n\n DocumentBuilder parser = null;\n\n try {\n DocumentBuilderFactory fac = DocumentBuilderFactory.newInstance();\n fac.setNamespaceAware( true );\n fac.setValidating( false );\n fac.setIgnoringElementContentWhitespace( false );\n parser = fac.newDocumentBuilder();\n return parser;\n } catch ( ParserConfigurationException e ) {\n throw new IOException( \"Unable to initialize DocumentBuilder: \" + e.getMessage() );\n }\n }",
"public OptionParser() {\n\n\t}",
"private Parser makeParser(String input) throws LexicalException {\r\n\t\tshow(input); //Display the input \r\n\t\tScanner scanner = new Scanner(input).scan(); //Create a Scanner and initialize it\r\n\t\tshow(scanner); //Display the Scanner\r\n\t\tParser parser = new Parser(scanner);\r\n\t\treturn parser;\r\n\t}",
"public DOMParser() { ; }",
"public Parser(Tokenizer tokenizer) {\n this.tokenizer = tokenizer;\n }",
"public NameParser()\n {\n this(null);\n }",
"private PLPParser makeParser(String input) throws LexicalException {\n\t\t\tshow(input); //Display the input \n\t\t\tPLPScanner scanner = new PLPScanner(input).scan(); //Create a Scanner and initialize it\n\t\t\tshow(scanner); //Display the Scanner\n\t\t\tPLPParser parser = new PLPParser(scanner);\n\t\t\treturn parser;\n\t\t}",
"public StringParser() {\n this(ParserOptions.DEFAULT);\n }",
"public ParseOptions() {}",
"private Parser() {\n objetos = new ListaEnlazada();\n }",
"@Before public void initParser() {\n\t\tparser = new CliParserImpl(\"-\", \"--\");\n\t}",
"public CanonicalTreeParser() {\n \t\t// Nothing necessary.\n \t}",
"abstract protected Parser createSACParser();",
"protected StreamParser()\n {\n }",
"public SmartScriptParser(String text) {\n lexer = new SmartScriptLexer(text);\n documentNode = new DocumentNode();\n stack = new ObjectStack();\n parse();\n\n}",
"@Override\n public ViolationsParser createParser() {\n return new JsLintParser();\n }",
"public static Parser getInstance() {\n\t\tif (theOne == null) {\n\t\t\ttheOne = new Parser();\n\t\t}\n\t\treturn theOne;\n\t}",
"Object create(InputSource is) throws IOException, SAXException, ParserConfigurationException;",
"public CrossrefUnixrefSaxParser() {\n }",
"public FastqParser() {\n\t\tsuper();\n\t}",
"@Before\n public void buildParser() throws Exception {\n parser = new com.putable.siteriter.msmith19.SDLParserImpl();\n }",
"public Game() \n {\n parser = new Parser();\n }",
"public ModemPMParser()\n\t{\n\t\tsuper();\n\t}",
"public OrotParser() {\n createPackagesJson();\n }",
"public CGXParser() {\n super();\n }",
"public XPathParser(Object o) {\n this.source = o;\n this.contextNode = defaultContextNode;\n }",
"public JsonParser createParser(DataInput in)\n/* */ throws IOException\n/* */ {\n/* 920 */ IOContext ctxt = _createContext(in, false);\n/* 921 */ return _createParser(_decorate(in, ctxt), ctxt);\n/* */ }",
"public Parser(java_cup.runtime.Scanner s) {super(s);}",
"public Parser(java_cup.runtime.Scanner s) {super(s);}",
"public Parser(java_cup.runtime.Scanner s) {super(s);}",
"public Parser(java_cup.runtime.Scanner s) {super(s);}",
"public Parser(java_cup.runtime.Scanner s) {super(s);}",
"public Parser(java_cup.runtime.Scanner s) {super(s);}",
"private UserParser() {\n }",
"public abstract ArgumentParser makeParser();",
"public static Parser getInstance(Context ctx){\n if(instance == null){\n instance = new Parser(ctx);\n }\n return instance;\n }",
"public JsonParser createParser(InputStream in)\n/* */ throws IOException, JsonParseException\n/* */ {\n/* 809 */ IOContext ctxt = _createContext(in, false);\n/* 810 */ return _createParser(_decorate(in, ctxt), ctxt);\n/* */ }",
"@Before\n\tpublic void initParser() {\n\t\tXMLTagParser.init(file);\n\t}",
"public synchronized void init() throws IOException\n {\n parserIn = new PipedOutputStream();\n PipedInputStream in = new PipedInputStream();\n parserIn.connect( in );\n antlrSchemaConverterLexer lexer = new antlrSchemaConverterLexer( in );\n parser = new antlrSchemaConverterParser( lexer );\n }",
"CParser getParser();",
"public parser(Scanner s) {super(s);}",
"public Lex()\n {\n num_tags = Tags.num_tags;\n }",
"private static void loadParser() {\n if(parser_ == null)\n parser_ = ConfigIOFactory.getInstance(\"json\");\n }",
"public SimpleHtmlParser createNewParserFromHereToText(String text) throws ParseException {\n return new SimpleHtmlParser(getStringToTextAndSkip(text));\n }",
"public parser(java_cup.runtime.Scanner s) {super(s);}",
"public parser(java_cup.runtime.Scanner s) {super(s);}",
"public parser(java_cup.runtime.Scanner s) {super(s);}",
"public parser(java_cup.runtime.Scanner s) {super(s);}",
"public parser(java_cup.runtime.Scanner s) {super(s);}",
"public parser(java_cup.runtime.Scanner s) {super(s);}",
"public parser(java_cup.runtime.Scanner s) {super(s);}",
"public parser(java_cup.runtime.Scanner s) {super(s);}",
"public void initParser() {;\r\n lp = DependencyParser.loadFromModelFile(\"edu/stanford/nlp/models/parser/nndep/english_SD.gz\");\r\n tokenizerFactory = PTBTokenizer\r\n .factory(new CoreLabelTokenFactory(), \"\");\r\n }",
"public Grammar() {\n }",
"public Parser(ParserTokenManager tm) {\r\n token_source = tm;\r\n token = new Token();\r\n jj_ntk = -1;\r\n }",
"public IntegerParserTest() {\n super(new IntegerParser());\n }",
"public ApkParser() {}",
"public AstParser(AstParserTokenManager tm) {\n token_source = tm;\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 9; i++) jj_la1[i] = -1;\n }",
"private PitchParser() {\n\n }",
"public ConfigParserHandler() {\n\t}",
"public StringParseable getParser(String input) {\n\t\treturn new XMLStringParser(input);\n\t}",
"public void init() {\r\n\t\ttry {\r\n\t\t\tSAXParserFactory factory = SAXParserFactory.newInstance();\r\n\t\t\t//factory.setValidating(true);\r\n\t\t\t//factory.setFeature(\r\n\t\t\t//\t\t\"http://apache.org/xml/features/validation/schema\", true);\r\n\t\t\tfactory.setNamespaceAware(true);\r\n\t\t\t_parser = factory.newSAXParser();\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog.error(e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t\tLoggerUtilsServlet.logErrors(e);\r\n\t\t}\r\n\t}",
"public Game() {\n parser = new Parser();\n }",
"public Programa(ProgramaTokenManager tm) {\n if (jj_initialized_once) {\n System.out.println(\"ERROR: Second call to constructor of static parser. \");\n System.out.println(\" You must either use ReInit() or set the JavaCC option STATIC to false\");\n System.out.println(\" during parser generation.\");\n throw new Error();\n }\n jj_initialized_once = true;\n token_source = tm;\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 2; i++) jj_la1[i] = -1;\n }",
"public SchemaParser() throws IOException\n {\n init();\n }",
"public ArgumentsParser() {\n this(new String[0]);\n }",
"public CommandParser(){\n setLanguage(\"ENGLISH\");\n commandTranslations = getPatterns(new String[] {TRANSLATION});\n commands = new ArrayList<>();\n addErrors();\n }",
"public Parser(String[] userInput) {\n this.command = userInput[0];\n if (userInput.length > 1) {\n this.description = userInput[1];\n }\n }",
"public BasicLineParser() {\n/* 99 */ this(null);\n/* */ }",
"protected SAXParser() {\n // Does nothing.\n }",
"public AdvConditionParser()\n{\n //nothing to do\n}",
"public ParserImpl(final Namespace namespace) {\n this(namespace, true);\n }",
"public TallerLP(java.io.InputStream stream, String encoding) {\n if (jj_initialized_once) {\n System.out.println(\"ERROR: Second call to constructor of static parser. \");\n System.out.println(\" You must either use ReInit() or set the JavaCC option STATIC to false\");\n System.out.println(\" during parser generation.\");\n throw new Error();\n }\n jj_initialized_once = true;\n try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }\n token_source = new TallerLPTokenManager(jj_input_stream);\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 2; i++) jj_la1[i] = -1;\n }",
"public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}",
"public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}",
"public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}",
"public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}",
"public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}",
"public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}",
"public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}",
"public Magazzino() {\r\n }",
"public static Parser getInstance() {\n return instance;\n }",
"public ParseAce_old ()\n{\n initialize ();\n}",
"private TraceParser genParser() throws ParseException {\n TraceParser parser = new TraceParser();\n parser.addRegex(\"^(?<VTIME>)(?<TYPE>)$\");\n parser.addPartitionsSeparator(\"^--$\");\n return parser;\n }",
"public CoolParser(java_cup.runtime.Scanner s) {super(s);}",
"public XMLParser(Context context) {\r\n\t\tmContext = context;\r\n\r\n\t}",
"public EPPSchemaCachingParser() {\n\t\ttry {\n\t\t\tinit();\n\t\t}\n\t\t catch (EPPParserException e) {\n\t\t\tcat.error(\"Couldn't instantiate parser instance\", e);\n\t\t}\n\t}",
"public interface Parser {\n\n}",
"public Parser(URL url) {\n \t\t\ttry {\n \t\t\t\tload(url.openStream());\n \t\t\t} catch (Exception e) {\n \t\t\t\t// continue ... actual parsing will report errors\n \t\t\t}\n \t\t}",
"public ProcessInstrumenter(){\n\t\tparser = new DOMParser();\n\t\tnoActivity.add(\"variables\");\n\t\tnoActivity.add(\"correlationSets\");\n\t\tnoActivity.add(\"partnerLinks\");\n\t\tnoActivity.add(\"eventHandlers\");\n\t\tnoActivity.add(\"faultHandlers\");\n\t\tnoActivity.add(\"compensationHandlers\");\n\t}",
"private CoverageParser() {\n }"
] | [
"0.74536",
"0.7209789",
"0.7102555",
"0.684771",
"0.68221766",
"0.6814816",
"0.67515796",
"0.67298734",
"0.66991526",
"0.6529011",
"0.64690346",
"0.6428506",
"0.61974627",
"0.61400336",
"0.61290646",
"0.6126124",
"0.6096476",
"0.6093076",
"0.609152",
"0.6089176",
"0.6048338",
"0.5984926",
"0.5971581",
"0.5961276",
"0.59486246",
"0.5920901",
"0.59134126",
"0.58984464",
"0.5896592",
"0.5887795",
"0.58689064",
"0.5852703",
"0.5844878",
"0.5827046",
"0.5799215",
"0.5794166",
"0.57890904",
"0.57890904",
"0.57890904",
"0.57890904",
"0.57890904",
"0.57890904",
"0.57735014",
"0.5771361",
"0.5759478",
"0.57572687",
"0.57504034",
"0.57456523",
"0.5739705",
"0.5719567",
"0.5713777",
"0.5707682",
"0.5697144",
"0.5691673",
"0.5691673",
"0.5691673",
"0.5691673",
"0.5691673",
"0.5691673",
"0.5691673",
"0.5691673",
"0.56873995",
"0.56817627",
"0.5676554",
"0.56676084",
"0.56594366",
"0.5653408",
"0.56479996",
"0.5642215",
"0.5637828",
"0.56164503",
"0.56084037",
"0.5603641",
"0.5591191",
"0.5590574",
"0.5590205",
"0.55840766",
"0.558151",
"0.5581188",
"0.55799013",
"0.55602777",
"0.5558342",
"0.55565655",
"0.55565655",
"0.55565655",
"0.55565655",
"0.55565655",
"0.55565655",
"0.55565655",
"0.5556351",
"0.5554871",
"0.5543006",
"0.5539431",
"0.55243814",
"0.5515672",
"0.55043066",
"0.5501348",
"0.5492428",
"0.546999",
"0.54683036"
] | 0.849553 | 0 |
Build a null relay. | private Relay nullRelayBuilder() {
Relay relay = new Relay();
relay.setAdvertisedBandwidth(null);
relay.setAllegedFamily(null);
relay.setASName(null);
relay.setASNumber(null);
relay.setBandwidthBurst(null);
relay.setBandwidthRate(null);
relay.setCityName(null);
relay.setConsensusWeight(null);
relay.setConsensusWeightFraction(null);
relay.setContact(null);
relay.setCountryCode(null);
relay.setCountryName(null);
relay.setDirAddress(null);
relay.setExitPolicy(null);
relay.setExitPolicySummary(null);
relay.setExitPolicyV6Summary(null);
relay.setFamily(null);
relay.setFirstSeen(null);
relay.setFlags(null);
relay.setHostName(null);
relay.setLastChangedAddressOrPort(null);
relay.setLastRestarted(null);
relay.setLastSeen(null);
relay.setLatitude(null);
relay.setLongitude(null);
relay.setMeasured(null);
relay.setMiddleProbability(null);
relay.setNickname(null);
relay.setObservedBandwidth(null);
relay.setOrAddresses(null);
relay.setPlatform(null);
relay.setRecommendedVersion(null);
relay.setRegionName(null);
relay.setRunning(null);
return relay;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Relay(){}",
"private Relay relayBuilder(JSONObject jsonRelay) {\n\t\tRelay relay = new Relay();\n\n\t\tif (isPresent(jsonRelay, \"advertised_bandwidth\")) {\n\t\t\trelay.setAdvertisedBandwidth((Integer) jsonRelay.get(\"advertised_bandwidth\"));\n\t\t} else {\n\t\t\trelay.setAdvertisedBandwidth(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"alleged_family\")) {\n\t\t\tArrayList<String> allegedFamily = new ArrayList<String>();\n\t\t\tJSONArray jsonAllegedFamily = jsonRelay.getJSONArray(\"alleged_family\");\n\t\t\tfor (int i = 0; i < jsonAllegedFamily.length(); i++) {\n\t\t\t\tallegedFamily.add(jsonAllegedFamily.getString(i));\n\t\t\t}\n\t\t\trelay.setAllegedFamily(allegedFamily);\n\t\t} else {\n\t\t\trelay.setAllegedFamily(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"as_name\")) {\n\t\t\trelay.setASName(jsonRelay.getString(\"as_name\"));\n\t\t} else {\n\t\t\trelay.setASName(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"as_number\")) {\n\t\t\trelay.setASNumber(jsonRelay.getString(\"as_number\"));\n\t\t} else {\n\t\t\trelay.setASNumber(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"bandwidth_burst\")) {\n\t\t\trelay.setBandwidthBurst((Integer) jsonRelay.get(\"bandwidth_burst\"));\n\t\t} else {\n\t\t\trelay.setBandwidthBurst(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"bandwidth_rate\")) {\n\t\t\trelay.setBandwidthRate((Integer) jsonRelay.get(\"bandwidth_rate\"));\n\t\t} else {\n\t\t\trelay.setBandwidthRate(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"city_name\")) {\n\t\t\trelay.setCityName(jsonRelay.getString(\"city_name\"));\n\t\t} else {\n\t\t\trelay.setCityName(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"consensus_weight\")) {\n\t\t\trelay.setConsensusWeight((Integer) jsonRelay.get(\"consensus_weight\"));\n\t\t} else {\n\t\t\trelay.setConsensusWeight(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"consensus_weight_fraction\")) {\n\t\t\trelay.setConsensusWeightFraction((Double) jsonRelay.get(\"consensus_weight_fraction\"));\n\t\t} else {\n\t\t\trelay.setConsensusWeightFraction(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"contact\")) {\n\t\t\trelay.setContact(jsonRelay.getString(\"contact\"));\n\t\t} else {\n\t\t\trelay.setContact(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"country\")) {\n\t\t\trelay.setCountryCode(jsonRelay.getString(\"country\"));\n\t\t} else {\n\t\t\trelay.setCountryCode(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"country_name\")) {\n\t\t\trelay.setCountryName(jsonRelay.getString(\"country_name\"));\n\t\t} else {\n\t\t\trelay.setCountryName(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"dir_address\")) {\n\t\t\trelay.setDirAddress(jsonRelay.getString(\"dir_address\"));\n\t\t} else {\n\t\t\trelay.setDirAddress(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"effective_family\")) {\n\t\t\tArrayList<String> effectiveFamily = new ArrayList<String>();\n\t\t\tJSONArray jsonEffectiveFamily = jsonRelay.getJSONArray(\"effective_family\");\n\t\t\tfor (int i = 0; i < jsonEffectiveFamily.length(); i++) {\n\t\t\t\teffectiveFamily.add(jsonEffectiveFamily.getString(i));\n\t\t\t}\n\n\t\t\trelay.setFamily(effectiveFamily);\n\t\t} else {\n\t\t\trelay.setEffectiveFamily(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"exit_policy\")) {\n\t\t\tArrayList<String> exitPolicy = new ArrayList<String>();\n\t\t\tJSONArray jsonExitPolicy = jsonRelay.getJSONArray(\"exit_policy\");\n\t\t\tfor (int i = 0; i < jsonExitPolicy.length(); i++) {\n\t\t\t\texitPolicy.add(jsonExitPolicy.getString(i));\n\t\t\t}\n\t\t\trelay.setExitPolicy(exitPolicy);\n\t\t} else {\n\t\t\trelay.setExitPolicy(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"exit_policy_summary\")) {\n\t\t\tExitPolicySummary exitPolicySummary = new ExitPolicySummary();\n\t\t\tJSONObject jsonExitPolicySummary = jsonRelay.getJSONObject(\"exit_policy_summary\");\n\n\t\t\tif (isPresent(jsonExitPolicySummary, \"accept\")) {\n\t\t\t\tArrayList<String> accept = new ArrayList<String>();\n\t\t\t\tJSONArray jsonAccept = jsonExitPolicySummary.getJSONArray(\"accept\");\n\t\t\t\tfor (int i = 0; i < jsonAccept.length(); i++) {\n\t\t\t\t\taccept.add(jsonAccept.getString(i));\n\t\t\t\t}\n\t\t\t\texitPolicySummary.setAccept(accept);\n\n\t\t\t}\n\n\t\t\tif (isPresent(jsonExitPolicySummary, \"reject\")) {\n\t\t\t\tArrayList<String> reject = new ArrayList<String>();\n\t\t\t\tJSONArray jsonReject = jsonExitPolicySummary.getJSONArray(\"reject\");\n\t\t\t\tfor (int i = 0; i < jsonReject.length(); i++) {\n\t\t\t\t\treject.add(jsonReject.getString(i));\n\t\t\t\t}\n\t\t\t\texitPolicySummary.setReject(reject);\n\t\t\t}\n\n\t\t\trelay.setExitPolicySummary(exitPolicySummary);\n\t\t} else {\n\t\t\trelay.setExitPolicySummary(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"exit_policy_v6_summary\")) {\n\t\t\tExitPolicyV6Summary exitPolicyV6Summary = new ExitPolicyV6Summary();\n\t\t\tJSONObject jsonExitPolicyV6Summary = jsonRelay.getJSONObject(\"exit_policy_v6_summary\");\n\n\t\t\tif (isPresent(jsonExitPolicyV6Summary, \"accept\")) {\n\t\t\t\tArrayList<String> accept = new ArrayList<String>();\n\t\t\t\tJSONArray jsonAccept = jsonExitPolicyV6Summary.getJSONArray(\"accept\");\n\t\t\t\tfor (int i = 0; i < jsonAccept.length(); i++) {\n\t\t\t\t\taccept.add(jsonAccept.getString(i));\n\t\t\t\t}\n\t\t\t\texitPolicyV6Summary.setAccept(accept);\n\n\t\t\t}\n\n\t\t\tif (isPresent(jsonExitPolicyV6Summary, \"reject\")) {\n\t\t\t\tArrayList<String> reject = new ArrayList<String>();\n\t\t\t\tJSONArray jsonReject = jsonExitPolicyV6Summary.getJSONArray(\"reject\");\n\t\t\t\tfor (int i = 0; i < jsonReject.length(); i++) {\n\t\t\t\t\treject.add(jsonReject.getString(i));\n\t\t\t\t}\n\t\t\t\texitPolicyV6Summary.setReject(reject);\n\t\t\t}\n\n\t\t\trelay.setExitPolicyV6Summary(exitPolicyV6Summary);\n\t\t} else {\n\t\t\trelay.setExitPolicyV6Summary(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"exit_probability\")) {\n\t\t\trelay.setExitProbability((Double) jsonRelay.get(\"exit_probability\"));\n\t\t} else {\n\t\t\trelay.setExitProbability(null);\n\t\t}\n\t\tif (isPresent(jsonRelay, \"family\")) {\n\t\t\tArrayList<String> family = new ArrayList<String>();\n\t\t\tJSONArray jsonFamily = jsonRelay.getJSONArray(\"family\");\n\t\t\tfor (int i = 0; i < jsonFamily.length(); i++) {\n\t\t\t\tfamily.add(jsonFamily.getString(i));\n\t\t\t}\n\n\t\t\trelay.setFamily(family);\n\t\t} else {\n\t\t\trelay.setFamily(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"fingerprint\")) {\n\t\t\trelay.setFingerprint(jsonRelay.getString(\"fingerprint\"));\n\t\t} else {\n\t\t\trelay.setFingerprint(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"first_seen\")) {\n\t\t\trelay.setFirstSeen(jsonRelay.getString(\"first_seen\"));\n\t\t} else {\n\t\t\trelay.setFirstSeen(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"flags\")) {\n\t\t\tArrayList<String> flags = new ArrayList<String>();\n\t\t\tJSONArray jsonFlags = jsonRelay.getJSONArray(\"flags\");\n\t\t\tfor (int i = 0; i < jsonFlags.length(); i++) {\n\t\t\t\tflags.add(jsonFlags.getString(i));\n\t\t\t}\n\n\t\t\trelay.setFlags(flags);\n\t\t} else {\n\t\t\trelay.setFlags(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"guard_probability\")) {\n\t\t\trelay.setGuardProbability((Double) jsonRelay.get(\"guard_probability\"));\n\t\t} else {\n\t\t\trelay.setGuardProbability(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"host_name\")) {\n\t\t\trelay.setHostName(jsonRelay.getString(\"host_name\"));\n\t\t} else {\n\t\t\trelay.setHostName(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"last_changed_address_or_port\")) {\n\t\t\trelay.setLastChangedAddressOrPort(jsonRelay.getString(\"last_changed_address_or_port\"));\n\t\t} else {\n\t\t\trelay.setLastChangedAddressOrPort(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"last_restarted\")) {\n\t\t\trelay.setLastRestarted(jsonRelay.getString(\"last_restarted\"));\n\t\t} else {\n\t\t\trelay.setLastRestarted(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"last_seen\")) {\n\t\t\trelay.setLastSeen(jsonRelay.getString(\"last_seen\"));\n\t\t} else {\n\t\t\trelay.setLastSeen(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"latitude\")) {\n\t\t\trelay.setLatitude((Double) jsonRelay.get(\"latitude\"));\n\t\t} else {\n\t\t\trelay.setLatitude(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"longitude\")) {\n\t\t\trelay.setLongitude((Double) jsonRelay.get(\"longitude\"));\n\t\t} else {\n\t\t\trelay.setLongitude(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"measured\")) {\n\t\t\trelay.setMeasured((Boolean) jsonRelay.get(\"measured\"));\n\t\t} else {\n\t\t\trelay.setMeasured(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"middle_probability\")) {\n\t\t\trelay.setMiddleProbability((Double) jsonRelay.get(\"middle_probability\"));\n\t\t} else {\n\t\t\trelay.setMiddleProbability(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"nickname\")) {\n\t\t\trelay.setNickname(jsonRelay.getString(\"nickname\"));\n\t\t} else {\n\t\t\trelay.setNickname(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"observed_bandwidth\")) {\n\t\t\trelay.setObservedBandwidth((Integer) jsonRelay.get(\"observed_bandwidth\"));\n\t\t} else {\n\t\t\trelay.setObservedBandwidth(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"or_addresses\")) {\n\t\t\tArrayList<String> orAddresses = new ArrayList<String>();\n\t\t\tJSONArray jsonORAddresses = jsonRelay.getJSONArray(\"or_addresses\");\n\t\t\tfor (int i = 0; i < jsonORAddresses.length(); i++) {\n\t\t\t\torAddresses.add(jsonORAddresses.getString(i));\n\t\t\t}\n\n\t\t\trelay.setOrAddresses(orAddresses);\n\t\t} else {\n\t\t\trelay.setOrAddresses(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"platform\")) {\n\t\t\trelay.setPlatform(jsonRelay.getString(\"platform\"));\n\t\t} else {\n\t\t\trelay.setPlatform(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"recommended_version\")) {\n\t\t\trelay.setRecommendedVersion((Boolean) jsonRelay.get(\"recommended_version\"));\n\t\t} else {\n\t\t\trelay.setRecommendedVersion(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"region_name\")) {\n\t\t\trelay.setRegionName(jsonRelay.getString(\"region_name\"));\n\t\t} else {\n\t\t\trelay.setRegionName(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"running\")) {\n\t\t\trelay.setRunning((Boolean) jsonRelay.get(\"running\"));\n\t\t} else {\n\t\t\trelay.setRunning(null);\n\t\t}\n\n\t\treturn relay;\n\n\t}",
"public final Nfa buildNoAccept() {\n return buildInternal();\n }",
"private NoneMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"@Override\n public Object build() {\n return null;\n }",
"@Override\n public Object build() {\n return null;\n }",
"private MessageNone(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public static Builder create(){\n return new Builder(Tribit.ZERO);\n }",
"public Builder clearS2BRelay() {\n copyOnWrite();\n instance.clearS2BRelay();\n return this;\n }",
"@Override public Type make_nil(byte nil) { return make(nil,_any); }",
"public Builder clearChatWithServerRelay() {\n copyOnWrite();\n instance.clearChatWithServerRelay();\n return this;\n }",
"public Builder clearRecursiveNull() {\n \n recursiveNull_ = false;\n onChanged();\n return this;\n }",
"@Override\n\tpublic Control build() {\n\t\treturn null;\n\t}",
"public Builder clearComputeSumNull() {\n \n computeSumNull_ = false;\n onChanged();\n return this;\n }",
"private Element generateEmptyOutboundElem(XmlProcessor hqmfXmlProcessor) {\n\t\tElement outboundRelElem = hqmfXmlProcessor.getOriginalDoc().createElement(OUTBOUND_RELATIONSHIP);\n\t\toutboundRelElem.setAttribute(TYPE_CODE, \"COMP\");\n\t\treturn outboundRelElem;\n\t}",
"public Builder()\n {\n this(\"\", \"\");\n }",
"private RelayConfig () {}",
"public Builder clearToDayNull() {\n \n toDayNull_ = false;\n onChanged();\n return this;\n }",
"public Builder clearVpnTunnel() {\n if (vpnTunnelBuilder_ == null) {\n if (stepInfoCase_ == 11) {\n stepInfoCase_ = 0;\n stepInfo_ = null;\n onChanged();\n }\n } else {\n if (stepInfoCase_ == 11) {\n stepInfoCase_ = 0;\n stepInfo_ = null;\n }\n vpnTunnelBuilder_.clear();\n }\n return this;\n }",
"public Builder clearPlainTransferFrom() {\n if (plainTransferFromBuilder_ == null) {\n if (dataCase_ == 5) {\n dataCase_ = 0;\n data_ = null;\n onChanged();\n }\n } else {\n if (dataCase_ == 5) {\n dataCase_ = 0;\n data_ = null;\n }\n plainTransferFromBuilder_.clear();\n }\n return this;\n }",
"public Builder clearActiveNull() {\n \n activeNull_ = false;\n onChanged();\n return this;\n }",
"static PlanetWithoutNamePositionRadius builder() {\n return null;\n }",
"protected Gateway(boolean noInit) {\n genClient = null;\n }",
"public None()\n {\n \n }",
"public static Object builder() {\n\t\treturn null;\n\t}",
"@Override\n\tprotected Payment createTarget() {\n\t\treturn null;\n\t}",
"public Builder clearDestinationPort() {\n \n destinationPort_ = 0;\n onChanged();\n return this;\n }",
"public static Object builder() {\n\t\treturn null;\r\n\t}",
"public final Nfa build() {\n accepts();\n return buildNoAccept();\n }",
"public PBFTReply createNullReplyMessage(PBFTRequest request){\n return new PBFTReply(request, null, getLocalServerID(), getCurrentViewNumber());\n }",
"public Network () {\n buildNetwork();\n }",
"@Override\n public void buildNetwork() {\n }",
"public Builder clearFromDayNull() {\n \n fromDayNull_ = false;\n onChanged();\n return this;\n }",
"public Builder() {\n super(((org.xms.g.utils.XBox) null));\n }",
"public Builder clearTo() {\n bitField0_ = (bitField0_ & ~0x00000004);\n to_ = 0;\n onChanged();\n return this;\n }",
"public ZABEMobileNetwork build() {\n return new ZABEMobileNetwork(buildUnknownFields());\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 Builder() {}",
"public Builder() {}",
"public Builder() {}",
"public Builder clearDestination() {\n if (destinationBuilder_ == null) {\n destination_ = null;\n onChanged();\n } else {\n destination_ = null;\n destinationBuilder_ = null;\n }\n\n return this;\n }",
"public static TreeNode makeNull(ArrowType type) {\n return new NullNode(type);\n }",
"public Builder clearTo() {\n \n to_ = 0L;\n onChanged();\n return this;\n }",
"public Builder() {\n this(Graphs.<N, E>createUndirected());\n }",
"public Builder clearTreeNodeIdNull() {\n \n treeNodeIdNull_ = false;\n onChanged();\n return this;\n }",
"public Builder clearPlainTransfer() {\n if (plainTransferBuilder_ == null) {\n if (dataCase_ == 2) {\n dataCase_ = 0;\n data_ = null;\n onChanged();\n }\n } else {\n if (dataCase_ == 2) {\n dataCase_ = 0;\n data_ = null;\n }\n plainTransferBuilder_.clear();\n }\n return this;\n }",
"@Override\n\tprotected Transaction createTarget() {\n\t\treturn null;\n\t}",
"public Builder clearTo() {\n\n to_ = getDefaultInstance().getTo();\n onChanged();\n return this;\n }",
"public void makeEmpty()\n {\n root = nil;\n }",
"public Builder clearNodeCharacteristicIdNull() {\n \n nodeCharacteristicIdNull_ = false;\n onChanged();\n return this;\n }",
"public Builder clearForumIdNull() {\n \n forumIdNull_ = false;\n onChanged();\n return this;\n }",
"public Builder clearChangeHeadpicRelay() {\n copyOnWrite();\n instance.clearChangeHeadpicRelay();\n return this;\n }",
"public Builder clearTxnid() {\n \n txnid_ = 0L;\n onChanged();\n return this;\n }",
"@Override\n\tpublic String monHoc() {\n\t\treturn null;\n\t}",
"public Builder clearCampaignIdNull() {\n \n campaignIdNull_ = false;\n onChanged();\n return this;\n }",
"public Builder clearCastleId() {\n \n castleId_ = 0L;\n onChanged();\n return this;\n }",
"public Builder clearVpnGateway() {\n if (vpnGatewayBuilder_ == null) {\n if (stepInfoCase_ == 10) {\n stepInfoCase_ = 0;\n stepInfo_ = null;\n onChanged();\n }\n } else {\n if (stepInfoCase_ == 10) {\n stepInfoCase_ = 0;\n stepInfo_ = null;\n }\n vpnGatewayBuilder_.clear();\n }\n return this;\n }",
"public Builder clearSendMessage() {\n if (sendMessageBuilder_ == null) {\n if (typeCase_ == 4) {\n typeCase_ = 0;\n type_ = null;\n onChanged();\n }\n } else {\n if (typeCase_ == 4) {\n typeCase_ = 0;\n type_ = null;\n }\n sendMessageBuilder_.clear();\n }\n return this;\n }",
"public Builder clearSnPort() {\n \n snPort_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearSnPort() {\n \n snPort_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearHost() {\n\n host_ = getDefaultInstance().getHost();\n onChanged();\n return this;\n }",
"public Builder clearBrokerId() {\n brokerId = null;\n fieldSetFlags()[1] = false;\n return this;\n }",
"public Builder clearBrokerId() {\n brokerId = null;\n fieldSetFlags()[1] = false;\n return this;\n }",
"public Builder clearDayNull() {\n \n dayNull_ = false;\n onChanged();\n return this;\n }",
"public Builder clearTreeNodeIdForVariantMatrixNull() {\n \n treeNodeIdForVariantMatrixNull_ = false;\n onChanged();\n return this;\n }",
"public static Value makeNone() {\n return theNone;\n }",
"public Builder setGenerateNull(boolean generateNull){\n mGenerateNull = generateNull;\n return this;\n }",
"protected Depot() {\n\t\tthis(null);\n\t}",
"public Builder clearCampaignNameNull() {\n \n campaignNameNull_ = false;\n onChanged();\n return this;\n }",
"public Builder clearDestination() {\n \n destination_ = getDefaultInstance().getDestination();\n onChanged();\n return this;\n }",
"public Builder clearIsBcast() {\n \n isBcast_ = false;\n onChanged();\n return this;\n }",
"private Builder() {}",
"public Telefone() {\n\t\t\n\t}",
"public Builder clearCalledOnNullInput() {\n\n calledOnNullInput_ = false;\n onChanged();\n return this;\n }",
"public Telefone() {\n\t}",
"private PlainDelegatedOutput(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public Builder clearBitcoinAddress() {\n bitField0_ = (bitField0_ & ~0x00000010);\n bitcoinAddress_ = getDefaultInstance().getBitcoinAddress();\n onChanged();\n return this;\n }",
"public Builder clearSender() {\n \n sender_ = getDefaultInstance().getSender();\n onChanged();\n return this;\n }",
"@NonNull\n public Trigger build() {\n return new Trigger(type, goal, null);\n }",
"static <InputOutput> Result<Actor<InputOutput>> noSender() {\n return Result.empty();\n }",
"@Nonnull\n public static <T> Sink<T> noop() {\n return fromProcessor(\"noop\", preferLocalParallelismOne(noopP()));\n }",
"public static VehicleRoutingSolution emptySolution() {\n VehicleRoutingSolution solution = new VehicleRoutingSolution();\n solution.setVisitList(new ArrayList<>());\n solution.setDepotList(new ArrayList<>());\n solution.setVehicleList(new ArrayList<>());\n solution.setScore(HardSoftLongScore.ZERO);\n return solution;\n }",
"public MessageBus()\r\n\t{\r\n\t\tthis(null);\r\n\t}",
"private void clearBuild() {\n bitField0_ = (bitField0_ & ~0x00000004);\n build_ = 0L;\n }",
"public PeerBuilder behindFirewall() {\n\t\tthis.behindFirewall = true;\n\t\treturn this;\n\t}",
"public LinkBuilder() {\n }",
"public Builder clearOrigin() {\n if (originBuilder_ == null) {\n origin_ = null;\n onChanged();\n } else {\n origin_ = null;\n originBuilder_ = null;\n }\n\n return this;\n }",
"public Builder clearOrigin() {\n if (originBuilder_ == null) {\n origin_ = null;\n onChanged();\n } else {\n origin_ = null;\n originBuilder_ = null;\n }\n\n return this;\n }",
"abstract T build();",
"public Builder() { }",
"public Builder clearPort() {\n\n port_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearPort() {\n\n port_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearPort() {\n \n port_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearPort() {\n \n port_ = 0;\n onChanged();\n return this;\n }",
"public Builder setForumIdNull(boolean value) {\n \n forumIdNull_ = value;\n onChanged();\n return this;\n }",
"public Builder clearChangeNameRelay() {\n copyOnWrite();\n instance.clearChangeNameRelay();\n return this;\n }",
"public Builder clearDirect() {\n bitField0_ = (bitField0_ & ~0x00000008);\n direct_ = false;\n onChanged();\n return this;\n }",
"public Builder clearField0() {\n bitField0_ = (bitField0_ & ~0x00000001);\n field0_ = false;\n onChanged();\n return this;\n }",
"private void serializeNull(final StringBuffer buffer)\n {\n buffer.append(\"N;\");\n }",
"public void makeEmpty() {\n root = null;\n }"
] | [
"0.62519354",
"0.6246191",
"0.5758694",
"0.5682075",
"0.5669573",
"0.5669573",
"0.5611919",
"0.553191",
"0.54674387",
"0.54308635",
"0.53737587",
"0.5318284",
"0.5276697",
"0.5260318",
"0.5232823",
"0.52251524",
"0.5220013",
"0.5177119",
"0.5161612",
"0.5158985",
"0.51541746",
"0.5137369",
"0.5134411",
"0.5105316",
"0.5102369",
"0.5087692",
"0.5082809",
"0.5076481",
"0.5070713",
"0.5049862",
"0.5013143",
"0.5011337",
"0.49916142",
"0.49859145",
"0.49858004",
"0.4969325",
"0.4965686",
"0.49655542",
"0.49655542",
"0.49655542",
"0.49654678",
"0.496448",
"0.49590468",
"0.49576887",
"0.494338",
"0.49383405",
"0.49232626",
"0.4916631",
"0.49124044",
"0.49094853",
"0.49093553",
"0.49014154",
"0.4895016",
"0.48903084",
"0.48848984",
"0.48845914",
"0.48811224",
"0.488077",
"0.4876597",
"0.4876597",
"0.48681432",
"0.484831",
"0.484831",
"0.4847038",
"0.48456943",
"0.4838973",
"0.4837688",
"0.4830631",
"0.48213005",
"0.48204753",
"0.48160484",
"0.48104337",
"0.4806397",
"0.4804499",
"0.4796308",
"0.47908857",
"0.4789979",
"0.47876993",
"0.47861758",
"0.4782538",
"0.47810957",
"0.4779589",
"0.47758332",
"0.47755322",
"0.47754788",
"0.47736707",
"0.47731194",
"0.47731194",
"0.47643578",
"0.4761319",
"0.47550714",
"0.47550714",
"0.47541654",
"0.47541654",
"0.47539094",
"0.4750075",
"0.4749816",
"0.47493005",
"0.47489893",
"0.4747444"
] | 0.80599165 | 0 |
Relay builder. Will return a relay from a JSONObject | private Relay relayBuilder(JSONObject jsonRelay) {
Relay relay = new Relay();
if (isPresent(jsonRelay, "advertised_bandwidth")) {
relay.setAdvertisedBandwidth((Integer) jsonRelay.get("advertised_bandwidth"));
} else {
relay.setAdvertisedBandwidth(null);
}
if (isPresent(jsonRelay, "alleged_family")) {
ArrayList<String> allegedFamily = new ArrayList<String>();
JSONArray jsonAllegedFamily = jsonRelay.getJSONArray("alleged_family");
for (int i = 0; i < jsonAllegedFamily.length(); i++) {
allegedFamily.add(jsonAllegedFamily.getString(i));
}
relay.setAllegedFamily(allegedFamily);
} else {
relay.setAllegedFamily(null);
}
if (isPresent(jsonRelay, "as_name")) {
relay.setASName(jsonRelay.getString("as_name"));
} else {
relay.setASName(null);
}
if (isPresent(jsonRelay, "as_number")) {
relay.setASNumber(jsonRelay.getString("as_number"));
} else {
relay.setASNumber(null);
}
if (isPresent(jsonRelay, "bandwidth_burst")) {
relay.setBandwidthBurst((Integer) jsonRelay.get("bandwidth_burst"));
} else {
relay.setBandwidthBurst(null);
}
if (isPresent(jsonRelay, "bandwidth_rate")) {
relay.setBandwidthRate((Integer) jsonRelay.get("bandwidth_rate"));
} else {
relay.setBandwidthRate(null);
}
if (isPresent(jsonRelay, "city_name")) {
relay.setCityName(jsonRelay.getString("city_name"));
} else {
relay.setCityName(null);
}
if (isPresent(jsonRelay, "consensus_weight")) {
relay.setConsensusWeight((Integer) jsonRelay.get("consensus_weight"));
} else {
relay.setConsensusWeight(null);
}
if (isPresent(jsonRelay, "consensus_weight_fraction")) {
relay.setConsensusWeightFraction((Double) jsonRelay.get("consensus_weight_fraction"));
} else {
relay.setConsensusWeightFraction(null);
}
if (isPresent(jsonRelay, "contact")) {
relay.setContact(jsonRelay.getString("contact"));
} else {
relay.setContact(null);
}
if (isPresent(jsonRelay, "country")) {
relay.setCountryCode(jsonRelay.getString("country"));
} else {
relay.setCountryCode(null);
}
if (isPresent(jsonRelay, "country_name")) {
relay.setCountryName(jsonRelay.getString("country_name"));
} else {
relay.setCountryName(null);
}
if (isPresent(jsonRelay, "dir_address")) {
relay.setDirAddress(jsonRelay.getString("dir_address"));
} else {
relay.setDirAddress(null);
}
if (isPresent(jsonRelay, "effective_family")) {
ArrayList<String> effectiveFamily = new ArrayList<String>();
JSONArray jsonEffectiveFamily = jsonRelay.getJSONArray("effective_family");
for (int i = 0; i < jsonEffectiveFamily.length(); i++) {
effectiveFamily.add(jsonEffectiveFamily.getString(i));
}
relay.setFamily(effectiveFamily);
} else {
relay.setEffectiveFamily(null);
}
if (isPresent(jsonRelay, "exit_policy")) {
ArrayList<String> exitPolicy = new ArrayList<String>();
JSONArray jsonExitPolicy = jsonRelay.getJSONArray("exit_policy");
for (int i = 0; i < jsonExitPolicy.length(); i++) {
exitPolicy.add(jsonExitPolicy.getString(i));
}
relay.setExitPolicy(exitPolicy);
} else {
relay.setExitPolicy(null);
}
if (isPresent(jsonRelay, "exit_policy_summary")) {
ExitPolicySummary exitPolicySummary = new ExitPolicySummary();
JSONObject jsonExitPolicySummary = jsonRelay.getJSONObject("exit_policy_summary");
if (isPresent(jsonExitPolicySummary, "accept")) {
ArrayList<String> accept = new ArrayList<String>();
JSONArray jsonAccept = jsonExitPolicySummary.getJSONArray("accept");
for (int i = 0; i < jsonAccept.length(); i++) {
accept.add(jsonAccept.getString(i));
}
exitPolicySummary.setAccept(accept);
}
if (isPresent(jsonExitPolicySummary, "reject")) {
ArrayList<String> reject = new ArrayList<String>();
JSONArray jsonReject = jsonExitPolicySummary.getJSONArray("reject");
for (int i = 0; i < jsonReject.length(); i++) {
reject.add(jsonReject.getString(i));
}
exitPolicySummary.setReject(reject);
}
relay.setExitPolicySummary(exitPolicySummary);
} else {
relay.setExitPolicySummary(null);
}
if (isPresent(jsonRelay, "exit_policy_v6_summary")) {
ExitPolicyV6Summary exitPolicyV6Summary = new ExitPolicyV6Summary();
JSONObject jsonExitPolicyV6Summary = jsonRelay.getJSONObject("exit_policy_v6_summary");
if (isPresent(jsonExitPolicyV6Summary, "accept")) {
ArrayList<String> accept = new ArrayList<String>();
JSONArray jsonAccept = jsonExitPolicyV6Summary.getJSONArray("accept");
for (int i = 0; i < jsonAccept.length(); i++) {
accept.add(jsonAccept.getString(i));
}
exitPolicyV6Summary.setAccept(accept);
}
if (isPresent(jsonExitPolicyV6Summary, "reject")) {
ArrayList<String> reject = new ArrayList<String>();
JSONArray jsonReject = jsonExitPolicyV6Summary.getJSONArray("reject");
for (int i = 0; i < jsonReject.length(); i++) {
reject.add(jsonReject.getString(i));
}
exitPolicyV6Summary.setReject(reject);
}
relay.setExitPolicyV6Summary(exitPolicyV6Summary);
} else {
relay.setExitPolicyV6Summary(null);
}
if (isPresent(jsonRelay, "exit_probability")) {
relay.setExitProbability((Double) jsonRelay.get("exit_probability"));
} else {
relay.setExitProbability(null);
}
if (isPresent(jsonRelay, "family")) {
ArrayList<String> family = new ArrayList<String>();
JSONArray jsonFamily = jsonRelay.getJSONArray("family");
for (int i = 0; i < jsonFamily.length(); i++) {
family.add(jsonFamily.getString(i));
}
relay.setFamily(family);
} else {
relay.setFamily(null);
}
if (isPresent(jsonRelay, "fingerprint")) {
relay.setFingerprint(jsonRelay.getString("fingerprint"));
} else {
relay.setFingerprint(null);
}
if (isPresent(jsonRelay, "first_seen")) {
relay.setFirstSeen(jsonRelay.getString("first_seen"));
} else {
relay.setFirstSeen(null);
}
if (isPresent(jsonRelay, "flags")) {
ArrayList<String> flags = new ArrayList<String>();
JSONArray jsonFlags = jsonRelay.getJSONArray("flags");
for (int i = 0; i < jsonFlags.length(); i++) {
flags.add(jsonFlags.getString(i));
}
relay.setFlags(flags);
} else {
relay.setFlags(null);
}
if (isPresent(jsonRelay, "guard_probability")) {
relay.setGuardProbability((Double) jsonRelay.get("guard_probability"));
} else {
relay.setGuardProbability(null);
}
if (isPresent(jsonRelay, "host_name")) {
relay.setHostName(jsonRelay.getString("host_name"));
} else {
relay.setHostName(null);
}
if (isPresent(jsonRelay, "last_changed_address_or_port")) {
relay.setLastChangedAddressOrPort(jsonRelay.getString("last_changed_address_or_port"));
} else {
relay.setLastChangedAddressOrPort(null);
}
if (isPresent(jsonRelay, "last_restarted")) {
relay.setLastRestarted(jsonRelay.getString("last_restarted"));
} else {
relay.setLastRestarted(null);
}
if (isPresent(jsonRelay, "last_seen")) {
relay.setLastSeen(jsonRelay.getString("last_seen"));
} else {
relay.setLastSeen(null);
}
if (isPresent(jsonRelay, "latitude")) {
relay.setLatitude((Double) jsonRelay.get("latitude"));
} else {
relay.setLatitude(null);
}
if (isPresent(jsonRelay, "longitude")) {
relay.setLongitude((Double) jsonRelay.get("longitude"));
} else {
relay.setLongitude(null);
}
if (isPresent(jsonRelay, "measured")) {
relay.setMeasured((Boolean) jsonRelay.get("measured"));
} else {
relay.setMeasured(null);
}
if (isPresent(jsonRelay, "middle_probability")) {
relay.setMiddleProbability((Double) jsonRelay.get("middle_probability"));
} else {
relay.setMiddleProbability(null);
}
if (isPresent(jsonRelay, "nickname")) {
relay.setNickname(jsonRelay.getString("nickname"));
} else {
relay.setNickname(null);
}
if (isPresent(jsonRelay, "observed_bandwidth")) {
relay.setObservedBandwidth((Integer) jsonRelay.get("observed_bandwidth"));
} else {
relay.setObservedBandwidth(null);
}
if (isPresent(jsonRelay, "or_addresses")) {
ArrayList<String> orAddresses = new ArrayList<String>();
JSONArray jsonORAddresses = jsonRelay.getJSONArray("or_addresses");
for (int i = 0; i < jsonORAddresses.length(); i++) {
orAddresses.add(jsonORAddresses.getString(i));
}
relay.setOrAddresses(orAddresses);
} else {
relay.setOrAddresses(null);
}
if (isPresent(jsonRelay, "platform")) {
relay.setPlatform(jsonRelay.getString("platform"));
} else {
relay.setPlatform(null);
}
if (isPresent(jsonRelay, "recommended_version")) {
relay.setRecommendedVersion((Boolean) jsonRelay.get("recommended_version"));
} else {
relay.setRecommendedVersion(null);
}
if (isPresent(jsonRelay, "region_name")) {
relay.setRegionName(jsonRelay.getString("region_name"));
} else {
relay.setRegionName(null);
}
if (isPresent(jsonRelay, "running")) {
relay.setRunning((Boolean) jsonRelay.get("running"));
} else {
relay.setRunning(null);
}
return relay;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Gateway(org.json.JSONObject jsonObject) {\n this();\n genClient.setJsonObject(jsonObject);\n }",
"private Relay nullRelayBuilder() {\n\t\tRelay relay = new Relay();\n\n\t\trelay.setAdvertisedBandwidth(null);\n\t\trelay.setAllegedFamily(null);\n\t\trelay.setASName(null);\n\t\trelay.setASNumber(null);\n\t\trelay.setBandwidthBurst(null);\n\t\trelay.setBandwidthRate(null);\n\t\trelay.setCityName(null);\n\t\trelay.setConsensusWeight(null);\n\t\trelay.setConsensusWeightFraction(null);\n\t\trelay.setContact(null);\n\t\trelay.setCountryCode(null);\n\t\trelay.setCountryName(null);\n\t\trelay.setDirAddress(null);\n\t\trelay.setExitPolicy(null);\n\t\trelay.setExitPolicySummary(null);\n\t\trelay.setExitPolicyV6Summary(null);\n\t\trelay.setFamily(null);\n\t\trelay.setFirstSeen(null);\n\t\trelay.setFlags(null);\n\t\trelay.setHostName(null);\n\t\trelay.setLastChangedAddressOrPort(null);\n\t\trelay.setLastRestarted(null);\n\t\trelay.setLastSeen(null);\n\t\trelay.setLatitude(null);\n\t\trelay.setLongitude(null);\n\t\trelay.setMeasured(null);\n\t\trelay.setMiddleProbability(null);\n\t\trelay.setNickname(null);\n\t\trelay.setObservedBandwidth(null);\n\t\trelay.setOrAddresses(null);\n\t\trelay.setPlatform(null);\n\t\trelay.setRecommendedVersion(null);\n\t\trelay.setRegionName(null);\n\t\trelay.setRunning(null);\n\n\t\treturn relay;\n\t}",
"@Override\n public AmqpNotifyMessageStructure<JSONObject> apply(JSONObject jsonObject) {\n return AmqpNotifyMessageStructureBuilder.converter(jsonObject);\n }",
"protected abstract JSONObject build();",
"public Relay(){}",
"private JsonObjectBuilder merchantToJsonBuilder(Merchant merchant) {\n\n // Any way to avoid converting to a String?\n String jsonMerchant = jsonb.toJson(merchant);\n try (JsonReader jsonReader = Json.createReader(new StringReader(jsonMerchant))) {\n JsonObject merchantJson = jsonReader.readObject();\n JsonObjectBuilder merchantBuilder = Json.createObjectBuilder();\n merchantJson.forEach((k, v) -> {\n merchantBuilder.add(k, v);\n });\n return merchantBuilder;\n }\n }",
"private void setChatWithServerRelay(\n ChatWithServer.Relay.Builder builderForValue) {\n rsp_ = builderForValue.build();\n rspCase_ = 3;\n }",
"ChatWithServer.Relay getChatWithServerRelay();",
"public ChatMember(JsonObject json) {\n\n }",
"public static JSONBuilder newInstance(){\n return new JSONBuilder();\n }",
"public Builder setChatWithServerRelay(ChatWithServer.Relay value) {\n copyOnWrite();\n instance.setChatWithServerRelay(value);\n return this;\n }",
"public Gateway(String json) throws IllegalArgumentException {\n this();\n genClient.initJsonObject(json);\n }",
"public ActorModel buildActorModel(JSONObject jsonObject){\n try{\n ActorModel actorModel = new ActorModel();\n actorModel.setId(jsonObject.getString(\"id\"));\n actorModel.setName(jsonObject.getString(\"name\"));\n actorModel.setImage(context.getString(R.string.master_url) + context.getString(R.string.cast_image_url) + jsonObject.getString(\"id\") + \".jpg\");\n actorModel.setRating(Float.parseFloat(jsonObject.getString(\"m_rating\")));\n actorModel.setAverageRating(Float.parseFloat(jsonObject.getString(\"rating\")));\n actorModel.setType(jsonObject.getString(\"type\"));\n actorModel.setTotalMovies(Integer.parseInt(jsonObject.getString(\"total_movies\")));\n return actorModel;\n }catch (Exception e){\n EmailHelper emailHelper = new EmailHelper(context, EmailHelper.TECH_SUPPORT, \"Error: ModelHelper\", e.getMessage() + \"\\n\" + StringHelper.convertStackTrace(e));\n emailHelper.sendEmail();\n }\n return new ActorModel();\n }",
"public String build() {\n this.message_string = \"{\";\n\n if (this.recipient_id != null) {\n this.message_string += \"\\\"recipient\\\": {\\\"id\\\": \\\"\" + this.recipient_id + \"\\\"},\";\n }\n\n if ((this.message_text != null)\n && !(this.message_text.equals(\"\"))\n && !(this.buttons.isEmpty())) {\n this.message_string += \"\\\"message\\\": {\";\n this.message_string += \"\\\"attachment\\\": {\";\n this.message_string += \"\\\"type\\\": \\\"template\\\",\";\n this.message_string += \"\\\"payload\\\": {\";\n this.message_string += \"\\\"template_type\\\": \\\"button\\\",\";\n this.message_string += \"\\\"text\\\": \\\"\" + this.message_text + \"\\\",\";\n this.message_string += \"\\\"buttons\\\":[\";\n for (int j = 0; j < this.buttons.size(); j++) {\n HashMap<String, String> button = this.buttons.get(j);\n this.message_string += \"{\";\n if (!button.get(\"type\").equals(\"\")) {\n this.message_string += \"\\\"type\\\":\\\"\" + button.get(\"type\") + \"\\\",\";\n }\n if (!button.get(\"title\").equals(\"\")) {\n this.message_string += \"\\\"title\\\":\\\"\" + button.get(\"title\") + \"\\\",\";\n }\n if (!button.get(\"url\").equals(\"\")) {\n this.message_string += \"\\\"url\\\":\\\"\" + button.get(\"url\") + \"\\\",\";\n }\n if (!button.get(\"payload\").equals(\"\")) {\n this.message_string += \"\\\"payload\\\":\\\"\" + button.get(\"payload\") + \"\\\",\";\n }\n if (!button.get(\"webview_height_ratio\").equals(\"\")) {\n this.message_string +=\n \"\\\"webview_height_ratio\\\":\\\"\"\n + button.get(\"webview_height_ratio\")\n + \"\\\",\";\n }\n this.message_string = this.message_string.replaceAll(\",$\", \"\");\n this.message_string += \"},\";\n }\n this.message_string = this.message_string.replaceAll(\",$\", \"\");\n this.message_string += \"]\";\n this.message_string += \"}\";\n this.message_string += \"}\";\n this.message_string += \"}\";\n }\n\n this.message_string = this.message_string.replaceAll(\",$\", \"\");\n\n this.message_string += \"}\";\n\n return this.message_string;\n }",
"public Builder setChatWithServerRelay(\n ChatWithServer.Relay.Builder builderForValue) {\n copyOnWrite();\n instance.setChatWithServerRelay(builderForValue);\n return this;\n }",
"private ChatResponse(Builder builder) {\n super(builder);\n }",
"public abstract void fromJson(JSONObject jsonObject);",
"@Test\n public void fromJson() throws VirgilException, WebAuthnException {\n AuthenticatorMakeCredentialOptions options = AuthenticatorMakeCredentialOptions.fromJSON(MAKE_CREDENTIAL_JSON);\n AttestationObject attObj = authenticator.makeCredential(options);\n }",
"private TeledonResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private Triplet(Builder builder) {\n super(builder);\n }",
"public static JsonObjectBuilder object() {\n return new JsonObjectBuilder();\n }",
"public CommandPacket(JSONObject json) throws JSONException {\n this.type = Packet.getPacketType(json);\n this.clientRequestId = json.getInt(CLIENTREQUESTID);\n if (json.has(LNSREQUESTID)) {\n this.LNSRequestId = json.getInt(LNSREQUESTID);\n } else {\n this.LNSRequestId = -1;\n }\n this.senderAddress = json.getString(SENDERADDRESS);\n this.senderPort = json.getInt(SENDERPORT);\n this.command = json.getJSONObject(COMMAND);\n }",
"private Monster(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"public MotorData(JSONObject motor) {\n\t\tthis.port = (String) motor.get(\"port\");\n\t\tthis.type = (String) motor.get(\"type\");\n\t\tthis.encoderValue = (long) motor.get(\"encoder-value\");\n\t}",
"private flight(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }",
"private LesenRPCResult(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"public MinecraftJson() {\n }",
"private MessageUpdateMonsterByCommand(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"public JSONBuilder() {\n\t\tthis(null, null);\n\t}",
"private Quest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private RpcMessage(Builder builder) {\n super(builder);\n }",
"private LesenRPCResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private Payload(Builder builder) {\n super(builder);\n }",
"private Builder() {\n super(TransferSerialMessage.SCHEMA$);\n }",
"private Command(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"public JSONObject makeJSONOffer(JSONObject angebot, JSONObject nachfrage) {\n\t\tJSONObject json = new JSONObject();\n\t\tJSONObject json2 = new JSONObject();\n\t\ttry {\n\t\t\tjson.put(\"Handel anbieten\", json2);\n\t\t\tjson2.put(\"Angebot\", angebot);\n\t\t\tjson2.put(\"Nachfrage\", nachfrage);\n\t\t} catch (JSONException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn json;\n\t}",
"private MsgMigrateContractResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private TurnReply(com.google.protobuf.GeneratedMessage.Builder builder) {\n super(builder);\n }",
"public static Message parse(JSONObject json) throws JSONException {\n\t\tString text = json.getString(\"text\");\n\t\tDate createdDate = null;\n\t\tif(json.has(\"created_at\")) createdDate = DateParser.parse(json.getString(\"created_at\"));\n\t\tPerson person = Person.parse(json.getJSONObject(\"person\"));\n\t\tString url = null;\n\t\tif(json.has(\"url\")) url = json.getString(\"url\");\n\t\treturn new Message(text, person, createdDate, url);\n\t}",
"@Override\n public void convertToJson(JsonObjectBuilder jsonObjectBuilder) throws JsonException {\n addNotRequired(jsonObjectBuilder,\"publicKeyInfo\",publicKeyInfo);\n addNotRequired(jsonObjectBuilder,\"nodeAddress\",nodeAddress);\n addNotRequired(jsonObjectBuilder,\"nodePort\",nodePort);\n addNotRequired(jsonObjectBuilder,\"mainNet\",mainNet);\n if(publicKeyInfo != null && nodeAddress != null){\n add(jsonObjectBuilder,\"connectString\", getConnectString());\n }\n }",
"public Builder mergeChatWithServerRelay(ChatWithServer.Relay value) {\n copyOnWrite();\n instance.mergeChatWithServerRelay(value);\n return this;\n }",
"public static Tweet fromJSON(JSONObject jsonObject) throws JSONException{\n Tweet tweet = new Tweet();\n\n //extract the values from JSON\n tweet.body = jsonObject.getString(\"text\");\n tweet.uid = jsonObject.getLong(\"id\");\n tweet.createdAt = jsonObject.getString(\"created_at\");\n tweet.user = User.fromJSON(jsonObject.getJSONObject(\"user\"));\n tweet.tweetId = Long.parseLong(jsonObject.getString(\"id_str\"));\n //tweet.extendedEntities = ExtendedEntities.fromJSON\n return tweet;\n\n }",
"private void getStateRelay(){\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(URL)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n ServiceAPI serviceAPI = retrofit.create(ServiceAPI.class);\n final Call<RelayModel> relayModel = serviceAPI.getStateRelay();\n relayModel.enqueue(new Callback<RelayModel>() {\n @Override\n public void onResponse(Call<RelayModel> call, Response<RelayModel> response) {\n switchButtonLamp.setChecked(response.body().getLamp());\n switchButtonFan.setChecked(response.body().getFan());\n //switchButtonSpray.setChecked(response.body().getSpray());\n switchButtonExhaustFan.setChecked(response.body().getExhaust());\n\n }\n\n @Override\n public void onFailure(Call<RelayModel> call, Throwable t) {\n\n }\n });\n }",
"private knock_rs(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private void setChatWithServerRelay(ChatWithServer.Relay value) {\n if (value == null) {\n throw new NullPointerException();\n }\n rsp_ = value;\n rspCase_ = 3;\n }",
"public ChatWithServer.Relay getChatWithServerRelay() {\n if (rspCase_ == 3) {\n return (ChatWithServer.Relay) rsp_;\n }\n return ChatWithServer.Relay.getDefaultInstance();\n }",
"public static Builder createJson(String text) {\n return builder().setType(Type.TEXT_JSON).setText(text);\n }",
"private CSTeamInvite(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private transitFlight(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }",
"private String buildCastString(JSONObject jsonObject){\n String castString = \"\";\n try {\n if (!jsonObject.getString(\"director\").isEmpty())\n castString = castString.concat(jsonObject.getString(\"director\") + \"!~\");\n if(!jsonObject.getString(\"actor\").isEmpty())\n castString = castString.concat(jsonObject.getString(\"actor\") + \"!~\");\n if(!jsonObject.getString(\"actress\").isEmpty())\n castString = castString.concat(jsonObject.getString(\"actress\") + \"!~\");\n if(!jsonObject.getString(\"screenplay\").isEmpty())\n castString = castString.concat(jsonObject.getString(\"screenplay\") + \"!~\");\n if(!jsonObject.getString(\"music\").isEmpty())\n castString = castString.concat(jsonObject.getString(\"music\") + \"!~\");\n\n if(castString.endsWith(\"!~\"))\n castString = castString.substring(0, castString.length() - 2);\n }catch (Exception e){\n EmailHelper emailHelper = new EmailHelper(context, EmailHelper.TECH_SUPPORT, \"Error: ModelHelper\", e.getMessage() + \"\\n\" + StringHelper.convertStackTrace(e));\n emailHelper.sendEmail();\n }\n return castString;\n }",
"private RelayConfig () {}",
"private void setChangeHeadpicRelay(\n ChangeHeadpic.RelayToFriend.Builder builderForValue) {\n rsp_ = builderForValue.build();\n rspCase_ = 21;\n }",
"public protocol.ChatData.ChatItem.Builder getChatDataBuilder() {\n bitField0_ |= 0x00000001;\n onChanged();\n return getChatDataFieldBuilder().getBuilder();\n }",
"public abstract VKRequest mo118416a(JSONObject jSONObject);",
"private ReflectionResponse(Builder builder) {\n super(builder);\n }",
"public Builder setChangeHeadpicRelay(\n ChangeHeadpic.RelayToFriend.Builder builderForValue) {\n copyOnWrite();\n instance.setChangeHeadpicRelay(builderForValue);\n return this;\n }",
"@MavlinkMessageBuilder\n public static Builder builder() {\n return new Builder();\n }",
"@MavlinkMessageBuilder\n public static Builder builder() {\n return new Builder();\n }",
"@MavlinkMessageBuilder\n public static Builder builder() {\n return new Builder();\n }",
"@MavlinkMessageBuilder\n public static Builder builder() {\n return new Builder();\n }",
"private Wrapper(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"public Builder() {\n this.obj = new Yhzh();\n }",
"private DataObject(Builder builder) {\n super(builder);\n }",
"private ActivityLZ(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"TorrentJsonParser getJsonParser();",
"private static Handler buildChain() {\n Handler ForAbroad = new ForAbroad();\n\n //chain.XmlHandler is the successor of chain.Mp3Handler.\n Handler ForCountry = new ForCountry(ForAbroad);\n\n return new ForCity(ForCountry);\n }",
"protected abstract Object buildJsonObject(R response);",
"@NonNull\n public Trigger build() {\n JsonPredicate predicate;\n\n if (UAStringUtil.isEmpty(screenName)) {\n predicate = null;\n } else {\n predicate = JsonPredicate.newBuilder()\n .addMatcher(JsonMatcher.newBuilder()\n .setValueMatcher(ValueMatcher.newValueMatcher(JsonValue.wrap(screenName)))\n .build())\n .build();\n }\n\n return new Trigger(Trigger.SCREEN_VIEW, goal, predicate);\n }",
"private MonsterState(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"public Message createMessageFromJson(JSONObject messageJson){\n\n try {\n this.setBody( messageJson.get(\"body\").toString());\n\n //recupèrer l'objet contact\n JSONObject contactObject = (JSONObject) messageJson.get(\"contact\");\n this.getContact().setName(contactObject.get(\"name\").toString());\n this.getContact().setNumber( contactObject.get(\"number\").toString());\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return this;\n }",
"public Builder(final JsonObject jsonObject) {\n final JsonObject prototype = Validator.of(jsonObject).get();\n final JsonArray jsonNames = (JsonArray) prototype.get(\"names\");\n if (jsonNames != null) {\n names.addAll(jsonNames.stream().map(Object::toString).collect(Collectors.toList()));\n }\n final long page = getLong(prototype, \"page\");\n if (page >= 0) {\n this.page = (int) page;\n } else {\n throw new IllegalArgumentException(WRONG_PAGE_VALUE);\n }\n final long total = getLong(prototype, \"total\");\n if (total >= 0) {\n this.total = (int) total;\n } else {\n throw new IllegalArgumentException(WRONG_TOTAL_VALUE);\n }\n }",
"private Item(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private MessageRespawnMonster(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private AnswerResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"@Override\n public JsonWrapper buildExtend0(JsonWrapper wrapper) {\n wrapper.putString(1, StringUtil.implode(huConfirmList, \",\"));\n wrapper.putInt(2, moFlag);\n wrapper.putInt(3, toPlayCardFlag);\n wrapper.putInt(4, moSeat);\n if (moSeatPair != null) {\n String moSeatPairVal = moSeatPair.getId() + \"_\" + moSeatPair.getValue();\n wrapper.putString(5, moSeatPairVal);\n }\n if (autoDisBean != null) {\n wrapper.putString(6, autoDisBean.buildAutoDisStr());\n\n } else {\n wrapper.putString(6, \"\");\n }\n if (zaiCard != null) {\n wrapper.putInt(7, zaiCard.getId());\n }\n wrapper.putInt(8, sendPaoSeat);\n wrapper.putInt(9, firstCard ? 1 : 0);\n if (beRemoveCard != null) {\n wrapper.putInt(10, beRemoveCard.getId());\n }\n wrapper.putInt(12, maxPlayerCount);\n wrapper.putString(\"startLeftCards\", startLeftCardsToJSON());\n wrapper.putInt(13, ceiling);\n wrapper.putInt(15, isLianBanker);\n wrapper.putInt(\"catCardCount\", catCardCount);\n\n wrapper.putInt(17, jiaBei);\n wrapper.putInt(18, jiaBeiFen);\n wrapper.putInt(19, jiaBeiShu);\n wrapper.putInt(20, autoPlayGlob);\n wrapper.putInt(21, autoTimeOut);\n JSONArray tempJsonArray = new JSONArray();\n for (int seat : tempActionMap.keySet()) {\n tempJsonArray.add(tempActionMap.get(seat).buildData());\n }\n wrapper.putString(\"22\", tempJsonArray.toString());\n wrapper.putInt(24, finishFapai);\n wrapper.putInt(25, below);\n wrapper.putInt(26, belowAdd);\n wrapper.putInt(27, paoHu);\n \n wrapper.putInt(28, disCardCout1);\n \n \n wrapper.putInt(29, randomSeat);\n wrapper.putInt(30, noDui);\n wrapper.putInt(31, fanZhongZhuang);\n wrapper.putInt(32, daNiaoWF);\n wrapper.putInt(33, xiaoQiDuiWF);\n wrapper.putInt(34, daNiaoVal);\n wrapper.putInt(35, suiJiZhuang);\n wrapper.putInt(36, qiangzhiHu);\n \n \n return wrapper;\n }",
"private ComplexMessage(Builder builder) {\n super(builder);\n }",
"private TradeMsgGunInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private PublicChatRequest(Builder builder) {\n super(builder);\n }",
"public Cause(JSONObject json) {\n\n try {\n this.id = json.getInt(ID_COLUMN);\n this.description = json.getString(DESCRIPTION_COLUMN);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {\n this.description = Html.fromHtml(this.description, Html.FROM_HTML_MODE_LEGACY).toString();\n } else {\n this.description = Html.fromHtml(this.description).toString();\n }\n this.money = json.getString(MONEY_COLUMN);\n this.votes = json.getString(VOTES_COLUMN);\n\n this.association = new Association(json.getJSONObject(ASSOCIATION_COLUMN));\n this.videos = parseUrlArray(json.getJSONArray(\"videos\"));\n this.documents = parseUrlArray(json.getJSONArray(JSONFields.DOCUMENTS_ARRAY_COLUMN));\n\n initializeYouTubeThumbnailLink();\n } catch (JSONException e) {\n e.printStackTrace();\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n }",
"private TeledonRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private Command(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }",
"public abstract Builder zza(String str);",
"private S_SynBagItem(Builder builder) {\n super(builder);\n }",
"public Builder setJson(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n json_ = value;\n onChanged();\n return this;\n }",
"public Builder setJson(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n json_ = value;\n onChanged();\n return this;\n }",
"public Builder setJson(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n json_ = value;\n onChanged();\n return this;\n }",
"private Builder() {\n super(maestro.payloads.FlyerFeaturedItem.SCHEMA$);\n }",
"public Builder(String shortSwitch) {\n this.shortSwitches = new HashSet<String>();\n this.shortSwitches.add(shortSwitch);\n longSwitches = new HashSet<String>();\n }",
"private GetMerchantByParkingResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"public ApiGatewayIdentity(final JSONObject jsonObject) {\n\n // parse the source ip\n this.sourceIp = jsonObject.optString(\"sourceIp\");\n\n // parse the user agent\n this.userAgent = jsonObject.optString(\"userAgent\");\n }",
"private UTruck(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public abstract T zzb(JSONObject jSONObject);",
"private ActionCommand(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private AdStitchDetail(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private PBZJHUserPlayInfo(Builder builder) {\n super(builder);\n }",
"private QuestAcceptRequestProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private Telemetry(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"public static CommandViewBuilder builder(String commandBlock)\n\t{\n\t\treturn new CommandViewBuilder(commandBlock);\n\t}",
"private TransformedMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private flightLeg(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }"
] | [
"0.5868922",
"0.576657",
"0.56461287",
"0.5633243",
"0.5625849",
"0.5425557",
"0.5329747",
"0.5299477",
"0.5273157",
"0.52599365",
"0.5179177",
"0.5171477",
"0.51516783",
"0.51047933",
"0.51035357",
"0.50539774",
"0.49585402",
"0.48901808",
"0.48713174",
"0.4845628",
"0.48170948",
"0.48164225",
"0.4812249",
"0.48112506",
"0.4809448",
"0.4800018",
"0.47842786",
"0.47825792",
"0.47781602",
"0.47409937",
"0.4739948",
"0.47334906",
"0.47291505",
"0.47133183",
"0.46976095",
"0.46888566",
"0.46881473",
"0.46839935",
"0.46807796",
"0.46770483",
"0.46655974",
"0.46610066",
"0.46559048",
"0.4651115",
"0.46406206",
"0.463527",
"0.46299028",
"0.4617707",
"0.46172178",
"0.46160388",
"0.46085647",
"0.46071097",
"0.46044877",
"0.46037826",
"0.46004525",
"0.45979765",
"0.45946294",
"0.45946294",
"0.45946294",
"0.45946294",
"0.45823738",
"0.45812562",
"0.45788738",
"0.4576401",
"0.45414957",
"0.45406833",
"0.45337406",
"0.45319906",
"0.45308632",
"0.45204252",
"0.4516354",
"0.4512574",
"0.45047805",
"0.44998205",
"0.44972494",
"0.44914642",
"0.44900763",
"0.44890952",
"0.44837424",
"0.4483296",
"0.4477692",
"0.44716275",
"0.44657582",
"0.44648474",
"0.44648474",
"0.44648474",
"0.4463746",
"0.4463446",
"0.4459147",
"0.44575998",
"0.4453711",
"0.44534287",
"0.4452232",
"0.44473997",
"0.4442379",
"0.44416198",
"0.44416192",
"0.44354394",
"0.44345522",
"0.44343084"
] | 0.8171983 | 0 |
Checks if a key is present in a JSONObject. | private boolean isPresent(JSONObject object, String key) {
return !(object.isNull(key));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean hasKey(String key) {\r\n\t\tif (objectMap.containsKey(key))\r\n\t\t\treturn true;\r\n\r\n\t\treturn false;\r\n\t}",
"boolean hasKey(String key);",
"public boolean containsKey(String key);",
"boolean containsKey(Object key) throws NullPointerException;",
"public boolean existsKey(String inKey);",
"public boolean containsKey(Object key) {\n\t\treturn false;\r\n\t}",
"boolean containsKey(K key);",
"boolean containsKey(K key);",
"@Override\r\n\tpublic boolean containsKey(Object key) {\r\n\t\tif (key == null) throw new NullPointerException();\r\n\t\treturn get(key) != null;\r\n\t}",
"public boolean hasKey(String key) {\n return data.containsKey(key);\n }",
"public boolean containsKey(Object key)\r\n/* 386: */ {\r\n/* 387:556 */ return this.headers.containsKey(key);\r\n/* 388: */ }",
"private boolean contains(String key) {\n return contains(dict, key);\n }",
"public boolean existsKey(String bucket, String inKey);",
"public boolean containsKey(Key key) ;",
"public boolean existsKeyInS3(String inKey);",
"public boolean containsKey(K key)\r\n\t{\r\n\t\treturn data.contains(new Entry(key,null));\r\n\t}",
"public synchronized boolean hasKey(K key) {\n return getValue(key) != null;\n }",
"public static Object checkKey(JSONObject object, String searchedKey) {\n\tboolean exists = object.containsKey(searchedKey);\n\tObject obj = null;\n\tif (exists) {\n\t\tobj = object.get(searchedKey);\n\t}\n\tif (!exists) {\n\t\tSet<String> keys = object.keySet();\n\t\tfor (String key : keys) {\n\t\t\tif (object.get(key) instanceof JSONObject) {\n\t\t\t\tobj = checkKey((JSONObject) object.get(key), searchedKey);\n\t\t\t}\n\t\t}\n\t}\n\treturn obj;\n}",
"@Override\n\t\t\tpublic boolean containsKey(Object key) {\n\t\t\t\treturn false;\n\t\t\t}",
"boolean isKeyInCache(Object key);",
"@Override\n public boolean containsKey(K key) {\n if (key == null) {\n throw new IllegalArgumentException(\"argument to containsKey() is null\");\n }\n return get(key) != null;\n }",
"@Override\n\tpublic boolean containsKey(Object key) {\n\t\treturn false;\n\t}",
"public boolean containsKey(String key) {\n \treturn (getNode(key) != null);\n }",
"public boolean containsKey(K key) {\r\n\t\tif (get(key) == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"@Override\r\n public boolean containsKey(K key) {\r\n int index = getIndex(key);\r\n if (index != -1) {\r\n IDictionary<K, V> temp = chains[index];\r\n if (temp!= null && temp.containsKey(key)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"public boolean contains(String key) {\r\n\t\treturn getValue(key) != null;\r\n\t}",
"public abstract boolean containsKey(K key);",
"public boolean existsKeyInS3(String inBucket, String inKey);",
"public boolean containsKey(final String key) {\n return key != null && _properties.containsKey(key);\n }",
"@Request(id = 6, retryable = true, response = ResponseMessageConst.BOOLEAN)\n Object containsKey(String name, Data key);",
"public boolean isKeyExists(String key) {\n\t\tSystem.out.println(\"Checking for key : \" + key + \" existance\");\n\t\tboolean keyExist = false;\n\t\tMap<String, List<String>> dictMap = getDictionary();\n\t\tif (dictMap != null && dictMap.isEmpty() != true) {\n\t\t\tif (dictMap.containsKey(key))\n\t\t\t\tkeyExist = true;\n\t\t}\n\t\treturn keyExist;\n\t}",
"public boolean contains(String key){\r\n\t\treturn get(key) != null;\r\n\t}",
"boolean has(String key);",
"@Override\n public boolean isKeyPresent(K key){\n return (this.cache.get(key) != null);\n }",
"public boolean containsKey(String key)\n\t{\n\t\tverifyParseState();\n\t\treturn values.containsKey(key);\n\t}",
"public boolean containsKey (String key)\n\t{\n\t\treturn properties.containsKey(key);\n\t}",
"public boolean contains(Key key);",
"public boolean contains(String key);",
"public boolean containsKey(String key) {\n\t\treturn containsKey(entries, key);\n\t}",
"public boolean contains(Key key) {\n return get(key) != null;\n }",
"public boolean contains(String key)\r\n { return get(key) != null; }",
"public boolean containsKey(K key) {\n return keys[findIndex(key)] != null;\n }",
"@Override\n public boolean containsKey(Object key) {\n return entries.containsKey(key);\n }",
"public boolean contains(K key);",
"public boolean hasProperty( String key );",
"private String check_Key(String key) throws JsonException {\r\n\t\tif (key == null || key.isEmpty()) {\r\n\t\t\tthrow new JsonException(\"The key must not null, or empty\");\r\n\t\t}\r\n\r\n\t\treturn key;\r\n\t}",
"public boolean containsKey(int key) {\n return getElement(key) != null;\n }",
"public boolean contains(Key key) {\n\t\treturn get(key) != null;\n\t}",
"public boolean contains(String key) {\n return find(key) != null;\n }",
"public boolean containsKey(Object key) {\n return map.containsKey(key);\n }",
"public boolean containsKey(Object key) {\n return map.containsKey(key);\n }",
"boolean contains(String key);",
"boolean contains(String key);",
"boolean hasKey();",
"boolean hasKey();",
"boolean hasKey();",
"boolean hasKey();",
"boolean hasKey();",
"boolean hasProperty(String key);",
"public boolean containsKey(K key) {\n\t\t\n\t\t\n\t\treturn keySet.contains(key);\n }",
"@Override\n\tpublic boolean containsKey(Object key) {\n\t\treturn map.containsKey(key);\n\t}",
"@Override\n public boolean containsKey(K key) {\n return containsKeyHelper(root, key);\n }",
"public native Boolean has(K key);",
"public boolean containsKey(Object k) {\n\t\treturn keys[findKeyIndex(k)] != null;\n\t}",
"public boolean contains(K key) \n {\n boolean result = false;\n int keyIndex = locateIndex(key);\n if ((keyIndex < numberOfEntries) && \n key.equals(dictionary[keyIndex].getKey()))\n result = true;\n return result;\n }",
"@Override\n public boolean contains(String key) {\n if (key == null) {\n throw new IllegalArgumentException(\"argument to contains() is null\");\n }\n return get(root, key, 0) != null;\n }",
"public boolean containsKey(K key)\r\n\t{\r\n\t\tint slot = findSlot(key, false);\r\n\t\treturn slot >= 0;\r\n\t}",
"public boolean containsKey(Object key)\n {\n // check if the cache needs flushing\n checkFlush();\n\n return getEntryInternal(key) != null;\n }",
"public boolean contains(String key) {\n\t \tNode node = get(key);\n\t return node!=null && node.value!=null;\n\t }",
"@Override\r\n\tpublic boolean exists(T key) {\r\n\t\treturn existsRec(raiz, key);\r\n\t}",
"boolean containsKey(CoreLabel key);",
"public boolean containsKey(Object key) {\r\n if (cacheDelegate != null) {\r\n cacheDelegate.keyLookup(key);\r\n }\r\n\r\n if (key == null) {\r\n return false;\r\n }\r\n\r\n CacheData<K, V> cacheData = getEntry(key);\r\n if (cacheData != null) {\r\n // see if the key passed in matches this one\r\n if ((cacheData.validateKey(key, cacheDelegate)) != null) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"public boolean exists(String key) {\n\t\treturn fileData.containsKey(key);\n\t}",
"@Override\n\t\tpublic boolean hasProperty(String key) {\n\t\t\treturn false;\n\t\t}",
"boolean nameExists(Key name);",
"@Override\n\tpublic boolean containsKey(Object arg0) {\n\t\treturn false;\n\t}",
"public Boolean containsKey(K key) {\n return this.entries.ormap(kvp -> kvp.left.equals(key));\n }",
"public boolean containsKey(String key) throws Exception {\n //return properties.containsKey(key);\n if (config != null) {\n Configuration[] props = config.getChildren(\"property\");\n for (int i = 0; i < props.length; i++) {\n if (props[i].getAttribute(\"name\") != null && props[i].getAttribute(\"name\").equals(key)) return true;\n }\n }\n return false;\n }",
"public boolean hasData(String key) {\n\t\treturn data.containsKey(key);\n\t}",
"public boolean definesKey( final String key ) {\n return values.containsKey( key );\n }",
"@Override\n\t\t\tpublic boolean contains(String key) {\n\t\t\t\treturn false;\n\t\t\t}",
"public boolean hasProperty(String key) {\n return commandData.containsKey(key);\n }",
"public boolean containsKey(String key) {\n int index = hashOf(key);\n return index < capacity && values[index] != null;\n }",
"@Override\n\tpublic boolean containsKey(Object key) {\n\t\tString uKey = key.toString().toUpperCase();\n\t\treturn super.containsKey(uKey);\n\t}",
"public boolean containsKey(String key) {\n return cacheMap.containsKey(key);\n }",
"public String getJSONObjectKey();",
"boolean containsKey(String keyLabel);",
"public boolean containsKey(final K key)\n {\n return this.hashMap.containsKey(key);\n }",
"public boolean contains(String key) {\r\n return attributeMap.containsKey(key)\r\n || (parent.isPresent() && parent.get().contains(key));\r\n }",
"public boolean extContainsKey(String key) {\n\t\treturn containsKey(key);\n\t}",
"public boolean containsKey(String key) {\n if (!index.containsKey(key)) return false;\n else if (index.get(key).isEmpty()) return false;\n else return true;\n }",
"public boolean contains (String key)\n {\n use (key);\n return map.containsKey (key);\n }",
"public boolean containsKey(TKey key) {\n return !(bstFind(key, mRoot) == null);\n }",
"final boolean hasKey(final E key) {\r\n for (int i=0;i<kcount;i++) {\r\n if (equal(key, (E)k[i])) return true;\r\n }\r\n return false;\r\n }",
"public boolean containsKey(K key)\n {\n AssociationList<K, V> bucket = this.get(this.find(key));\n return (bucket != null) && (bucket.containsKey(key));\n }",
"public static boolean m5909h(JSONObject jSONObject, String str) {\n return (jSONObject != null && jSONObject.has(str) && jSONObject.isNull(str) == null) ? true : null;\n }",
"@Override\n public synchronized boolean containsKey(Object key) {\n if ((System.currentTimeMillis() - this.lastCheck) > this.CACHE_TIME) {\n update();\n }\n if (this.ignoreCase) {\n return this.keyMap.containsKey(key.toString().toLowerCase());\n }\n return super.containsKey(key.toString());\n }",
"public boolean contains(long key){\n for (int i = 0; i < numKeys; i++){\n if (keys[i].key == key){\n return true;\n }\n }\n return false;\n }",
"public boolean containsSearchKey(String key) {\n if (this.name.toLowerCase().contains(key) || this.name.toLowerCase().contains(Dictionary.parseKey(key))) {\n return true;\n }\n if (this.address.toLowerCase().contains(key) || this.address.toLowerCase().contains(Dictionary.parseKey(key))) {\n return true;\n }\n return this.faculty.toLowerCase().contains((key))\n || this.faculty.toLowerCase().contains(Dictionary.parseKey(key));\n }",
"@Override\n\tpublic synchronized boolean exists(String key) {\n\t\treturn getFile(key).exists();\n\t}"
] | [
"0.6841971",
"0.6810645",
"0.6808585",
"0.6759217",
"0.67227983",
"0.6682613",
"0.6620266",
"0.6620266",
"0.66080064",
"0.65858054",
"0.65759116",
"0.6514486",
"0.6488808",
"0.64709413",
"0.6461279",
"0.6448171",
"0.64448893",
"0.6420136",
"0.6370756",
"0.63340825",
"0.6333063",
"0.63233316",
"0.6311943",
"0.6271726",
"0.6255508",
"0.6240499",
"0.6236289",
"0.62331444",
"0.62253994",
"0.6223501",
"0.621075",
"0.6208413",
"0.6207645",
"0.6187484",
"0.6176819",
"0.615083",
"0.61456966",
"0.6126889",
"0.6102812",
"0.60985637",
"0.60858595",
"0.6072165",
"0.606651",
"0.6058824",
"0.6056873",
"0.60565954",
"0.60321665",
"0.60177886",
"0.6017773",
"0.6002239",
"0.6002239",
"0.59743357",
"0.59743357",
"0.59737366",
"0.59737366",
"0.59737366",
"0.59737366",
"0.59737366",
"0.5969001",
"0.59670323",
"0.5959023",
"0.59405285",
"0.59357387",
"0.5932216",
"0.5911913",
"0.58977467",
"0.5896124",
"0.5886031",
"0.58577716",
"0.58576345",
"0.58511144",
"0.5847946",
"0.58331895",
"0.58206356",
"0.58198994",
"0.58009696",
"0.5798925",
"0.57895535",
"0.5783355",
"0.57793957",
"0.57728297",
"0.5770647",
"0.57505494",
"0.57452303",
"0.5741574",
"0.5741136",
"0.5729572",
"0.5714378",
"0.57066923",
"0.5706119",
"0.56994283",
"0.5695696",
"0.5685812",
"0.5671194",
"0.5667296",
"0.5664547",
"0.5656581",
"0.56425506",
"0.56424004",
"0.5641926"
] | 0.7447661 | 0 |
Method use locally to read a JSON file. | private static String readAll(Reader rd) throws IOException {
StringBuilder sb = new StringBuilder();
int cp;
while ((cp = rd.read()) != -1) {
sb.append((char) cp);
}
return sb.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private JsonObject loadJSONFile(String jsonFilePath) throws IOException {\r\n\tInputStream is = new FileInputStream(jsonFilePath);\r\n\tJsonReader jsonReader = Json.createReader(is);\r\n\tJsonObject json = jsonReader.readObject();\r\n\tjsonReader.close();\r\n\tis.close();\r\n\treturn json;\r\n }",
"@Test\n\tpublic void readJSONFromFile() {\n\t\t\n\t\tJsonPath jsonFile = new JsonPath(new File (\"C:\\\\Users\\\\cmlzd\\\\Desktop\\\\employees.json\"));\n\t\t\n\t\tSystem.out.println(jsonFile.getString(\"items.email\"));\n\t\t\n\t\t\n\t}",
"private JSONObject readJSONFile(Path path) throws ExtensionManagementException {\n\n if (Files.exists(path) && Files.isRegularFile(path)) {\n try {\n String jsonString = FileUtils.readFileToString(path.toFile(), UTF8);\n return new JSONObject(jsonString);\n } catch (JSONException e) {\n throw new ExtensionManagementException(\"Error while parsing JSON file: \" + path, e);\n } catch (IOException e) {\n throw new ExtensionManagementException(\"Error while reading JSON file: \" + path, e);\n }\n } else {\n throw new ExtensionManagementException(\"JSON file not found: \" + path);\n }\n }",
"private static JSONObject fileReader(String path) throws Exception{\r\n return (JSONObject) jsonParser.parse(new String(Files.readAllBytes(Paths.get(path))));\r\n }",
"public static void initialize() {\r\n\t\tjson = new JSONFile(filePath);\t\r\n\t}",
"public Integer loadJSONFile()\n {\n JSONParser parser = new JSONParser();\n try{\n\n Object obj = parser.parse(new FileReader(\"/Users/rnuka/Desktop/sample.json\"));\n JSONObject jsonObj = (JSONObject)obj;\n\n Long age = (Long)jsonObj.get(\"age\");\n System.out.println(\"age:\"+age);\n\n String name = (String)jsonObj.get(\"name\");\n System.out.println(\"name:\" + name);\n\n JSONArray address = (JSONArray)jsonObj.get(\"address\");\n\n for(Object str : address){\n System.out.println(str);\n }\n\n\n\n }catch(Exception e){\n e.printStackTrace();\n }\n return 1;\n }",
"private static String readJsonFile (String fileName) {\n if (!fileName.endsWith(\".json\")){\n throw new IllegalArgumentException(\"Invalid file name\");\n }\n String jsonStr = \"\";\n try{\n isFileExistOrCreatIt(fileName);\n File jsonFile = new File(\"src//main//resources\"+\"//\"+fileName);\n Reader reader = new InputStreamReader(new FileInputStream(jsonFile),\"utf-8\");\n int ch = 0;\n StringBuffer sb = new StringBuffer();\n while((ch = reader.read())!=-1){\n sb.append((char) ch);\n }\n reader.close();\n jsonStr = sb.toString();\n return jsonStr;\n\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }",
"private static JsonObject readJSON(String path) {\n\n\t\tString fileContents = \"\";\n\t\tBufferedReader reader = null;\n\n\t\ttry {\n\t\t\treader = new BufferedReader(new FileReader(path));\n\t\t} catch (FileNotFoundException e) {\n\t\t\tfail(ErrorMessage.inputFileNotFoundError);\n\t\t}\n\n\t\tString line;\n\n\t\ttry {\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tfileContents += line;\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tfail(ErrorMessage.readFileError);\n\t\t}\n\n\t\ttry {\n\t\t\treader.close();\n\t\t} catch (IOException e) {\n\t\t\tfail(ErrorMessage.closeFileError);\n\t\t}\n\n\t\tJsonObject jsonLicense = Json.createReader(new StringReader(fileContents)).readObject();\n\n\t\treturn jsonLicense;\n\t}",
"private void readFromJSON(String filename) {\n JSONParser parser = new JSONParser();\n\n try\n {\n Object obj = parser.parse(new FileReader(filename));\n JSONObject jsonObject = (JSONObject) obj;\n Menu drinks = getMenu(jsonObject, \"Drink\");\n Menu types = getMenu(jsonObject, \"Type\");\n Menu toppings = getMenu(jsonObject, \"Toppings\");\n Menu sizes = getMenu(jsonObject, \"Size\");\n menuMap.put(\"Drink\", drinks);\n menuMap.put(\"Size\", sizes);\n menuMap.put(\"Toppings\", toppings);\n menuMap.put(\"Type\", types);\n\n } catch (FileNotFoundException e) {\n System.out.println(\"Not found menu.json, exit now.\");\n System.exit(1);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n }",
"public JSONObject LoadJson(String filename) {\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\t\tnew FileInputStream(filename), \"UTF-8\"));\n\t\t\tStringBuffer buffer = new StringBuffer(1024);\n\t\t\tString line;\n\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tbuffer.append(line);\n\t\t\t}\n\t\t\treader.close();\n\n\t\t\treturn new JSONObject(buffer.toString());\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.format(\"[Error]Failed to open file %s!\", filename);\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (JSONException e) {\n\t\t\tSystem.err.format(\"[Error]Failed to parse json file %s!\", filename);\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}",
"public String fileToString(String file){\n String path = new File(\"./Users/Colin/AndroidStudioProjects/FlightCompare/app/json/flights.json\").getAbsolutePath();\n File fileObj = new File(path);\n Log.d(\"Reading JSON file\", \"File exists: \" + fileObj.exists());\n Log.d(\"Reading JSON file\", \"File is directory: \" + fileObj.isDirectory());\n Log.d(\"Reading JSON file\", \"File can read: \" + fileObj.canRead());\n Log.d(\"Reading JSON file\", \"Current directory: \" + path);\n Log.d(\"Reading JSON file\", \"The path is: \" + file);\n try(Scanner in = new Scanner(new File(file))){\n StringBuilder sb = new StringBuilder();\n while(in.hasNextLine()){\n sb.append(in.nextLine());\n sb.append('\\n');\n }\n in.close();\n\n return sb.toString();\n }\n catch (FileNotFoundException ex){\n ex.printStackTrace();\n }\n return null;\n }",
"public String readJsonFile(String fileName)\n {\n FileInputStream fileInputStream = null;\n String text;\n StringBuilder stringBuilder = new StringBuilder();\n\n try\n {\n fileInputStream = mainContext.openFileInput(fileName);\n InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream);\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n\n while((text = bufferedReader.readLine()) != null)\n {\n stringBuilder.append(text).append(\"\\n\");\n }\n }\n catch (IOException e)\n {\n System.out.println(e.getMessage());\n }\n\n return stringBuilder.toString();\n }",
"private void read() {\n\n\t\t\t\tString road=getActivity().getFilesDir().getAbsolutePath()+\"product\"+\".txt\";\n\n\t\t\t\ttry {\n\t\t\t\t\tFile file = new File(road); \n\t\t\t\t\tFileInputStream fis = new FileInputStream(file); \n\t\t\t\t\tint length = fis.available(); \n\t\t\t\t\tbyte [] buffer = new byte[length]; \n\t\t\t\t\tfis.read(buffer); \n\t\t\t\t\tString res1 = EncodingUtils.getString(buffer, \"UTF-8\"); \n\t\t\t\t\tfis.close(); \n\t\t\t\t\tjson(res1.toString());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} \n\t\t\t}",
"public String loadJSONFromAsset() {\n String json;\n String file = \"assets/words.json\";\n\n try {\n InputStream is = this.getClass().getClassLoader().getResourceAsStream(file);\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n json = new String(buffer, \"UTF-8\");\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }",
"public static Books readJSON(){\n Gson gson = new GsonBuilder().create();\n Books books = new Books();\n try {\n books = gson.fromJson(new JsonReader(new FileReader(\"books.json\")), Books.class);\n } catch (IOException e){\n e.printStackTrace();\n }\n return books;\n }",
"public String parseJSON(){\r\n String json = null;\r\n try{\r\n InputStream istream = context.getAssets().open(\"restaurantopeninghours.json\");\r\n int size = istream.available();\r\n byte[] buffer = new byte[size];\r\n istream.read(buffer);\r\n istream.close();\r\n json = new String(buffer, \"UTF-8\");\r\n }catch (IOException ex){\r\n ex.printStackTrace();\r\n return null;\r\n }\r\n return json;\r\n }",
"public static JsonObject readFile(String path) throws FileNotFoundException\n\t{\n\t\tJsonReaderFactory factory = Json.createReaderFactory(null);\n\t\tInputStream is = new FileInputStream(path);\n\t\tJsonReader rdr = factory.createReader(is, java.nio.charset.StandardCharsets.UTF_8);\n\t\tJsonObject obj = rdr.readObject();\n\t\trdr.close();\n\t\treturn obj;\n\t}",
"public static String getJSONData( String filePath, boolean assetFile )\n {\n FileReader reader = null;\n String jsonData = null;\n\n if( assetFile )\n {\n AssetManager mgr = WeatherLionApplication.getAppContext().getAssets();\n String filename;\n\n try\n {\n filename = WeatherLionApplication.OPEN_SOURCE_LICENCE;\n InputStream in = mgr.open( filename, AssetManager.ACCESS_BUFFER );\n Writer writer = new StringWriter();\n char[] buffer = new char[ 1024 ];\n\n try\n {\n Reader assetReader = new BufferedReader( new InputStreamReader( in, StandardCharsets.UTF_8 ) );\n int n;\n\n while ( ( n = assetReader.read( buffer ) ) != -1 )\n {\n writer.write( buffer, 0, n) ;\n }// end of while loop\n }// end of try block\n catch ( IOException e )\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE, e.getMessage(),\n TAG + \"::getJSONData [line: \" +\n UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n\n jsonData = writer.toString();\n\n in.close();\n }// end of try block\n catch ( IOException e )\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE, e.getMessage(),\n TAG + \"::getJSONData [line: \" +\n UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n }// end of if block\n else\n {\n try\n {\n File file = new File( filePath );\n\n // if the is a file present then it will contain a list with at least on object\n if( file.exists() )\n {\n reader = new FileReader( file );\n jsonData = reader.toString();\n }// end of if block\n\n }// end of try block\n catch ( FileNotFoundException | JsonSyntaxException e )\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE, e.getMessage(),\n TAG + \"::getJSONData [line: \" +\n UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n finally\n {\n // close the file reader object\n if( reader != null )\n {\n try\n {\n reader.close();\n } // end of try block\n catch (IOException e)\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE,\n e.getMessage(),TAG + \"::getJSONData [line: \"\n + UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n }// end of if block\n }// end of finally block\n }// end of else block\n\n return jsonData;\n }",
"private static JsonReader readJSONFromAsset(Context context) throws IOException {\n AssetManager assetManager = context.getAssets();\n JsonReader reader;\n try {\n reader = new JsonReader(new InputStreamReader(assetManager.open(\"questionlist.json\")));\n } finally {\n\n }\n return reader;\n }",
"public static void readFile(String filename) {\n JSONParser jsonParser = new JSONParser();\n try (Reader reader = new FileReader(filename)) {\n JSONObject jo = (JSONObject) jsonParser.parse(reader);\n\n SHORT_PERIOD = (int) (long) jo.get(\"shortPeriod\");\n LONG_PERIOD = (int) (long) jo.get(\"longPeriod\");\n AVG_AMOUNT_PERIOD = (int) (long) jo.get(\"avgAmountPeriod\");\n SESSION_INTERVAL = (int) (long) jo.get(\"sessionInterval\");\n\n\n } catch (IOException | ParseException e) {\n e.printStackTrace();\n }\n }",
"public static String readJsonObject(String filename) {\r\n\t\tBufferedReader br = null;\r\n\t\tFileReader fr = null;\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tString sCurrentLine;\r\n\t\ttry {\r\n\r\n\t\t\tfr = new FileReader(filename);\r\n\t\t\tbr = new BufferedReader(fr);\r\n\t\t\t\r\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) {\r\n\t\t\t\tsb.append(sCurrentLine);\r\n\t\t\t}\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)\r\n\t\t\t\t\tbr.close();\r\n\t\t\t\tif (fr != null)\r\n\t\t\t\t\tfr.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\t\treturn sb.toString();\r\n\t}",
"public static JSONArray parsedFile() {\n JSONParser parser = new JSONParser();\n try {\n String filePath = new File(\"\").getAbsolutePath();\n if (!filePath.substring(filePath.length()-3, filePath.length()).equals(\"src\")) {\n filePath = filePath.concat(\"/src\");\n }\n filePath = filePath.concat(\"/cardData/data.json\");\n FileReader file = new FileReader(filePath);\n Object parsedFile = parser.parse(file);\n return (JSONArray) parsedFile;\n } catch (IOException e) {\n e.printStackTrace();\n System.exit(0);\n } catch (ParseException p) {\n System.out.println(\"Caught a Parsing Exception\" + p.getMessage());\n p.printStackTrace();\n System.exit(0);\n }\n return null;\n }",
"private void loadJSON() throws FileNotFoundException\n\t{\n\n\t\tGsonBuilder builder= new GsonBuilder();\n\t\tGson gson = builder.create();\n\t\t\t\t\n\t\t//get a list of folders in the data directory\n\t\t\n\t\tFile[] directories = new File(\"data\").listFiles();\n\n\t\t//Loop through folders in data directory\n\t\tfor(File folder : directories)\n\t\t\t{\n\t\t\t\t//get a list of files inside the folder\n\t\t\t\tFile[] jsonItems = new File(folder.toString()).listFiles();\n\t\t\t\t\n\t\t\t\t//Loop through files inside the folder \n\t\t\t\tfor(File file : jsonItems)\n\t\t\t\t{\n\t\t\t\t\t//Store in directory map... substring to remove the \"data/\" portion... placed by filename to foldername\n\t\t\t\t\tString dir = file.toString().substring(5);\n\t\t\t\t\t\n\t\t\t\t\t//Generate player data from gson\n\t\t\t\t\tJsonReader reader = new JsonReader(new FileReader(file));\n\t\t\t\t\tPlayer player = gson.fromJson(reader, Player.class);\n\t\t\t\t\t\n\t\t\t\t\t//Store it in the map tied to it's directory\n\t\t\t\t\tplayerData.put(dir, player);\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public static HashMap<String,String> read_json_file(String filepath){\n HashMap<String,String> map = new HashMap<String,String>();\n try{\n BufferedReader bufferedReader = new BufferedReader(new FileReader(filepath));\n Gson gson = new Gson();\n Object json = gson.fromJson(bufferedReader, Object.class);\n map = new Gson().fromJson(\n json.toString(), new TypeToken<HashMap<String, String>>() {}.getType()\n );\n } catch (FileNotFoundException e ) {\n e.printStackTrace();\n }\n return map;\n }",
"public static LinkedTreeMap<String, Object> importJsonData( String filePath, boolean assetFile )\n {\n FileReader reader = null;\n LinkedTreeMap<String, Object> fileData = null;\n\n if( assetFile )\n {\n AssetManager mgr = WeatherLionApplication.getAppContext().getAssets();\n String filename;\n\n try\n {\n filename = WeatherLionApplication.OPEN_SOURCE_LICENCE;\n InputStream in = mgr.open( filename, AssetManager.ACCESS_BUFFER );\n Writer writer = new StringWriter();\n char[] buffer = new char[ 1024 ];\n\n try\n {\n Reader assetReader = new BufferedReader( new InputStreamReader( in, StandardCharsets.UTF_8 ) );\n int n;\n\n while ( ( n = assetReader.read( buffer ) ) != -1 )\n {\n writer.write( buffer, 0, n) ;\n }// end of while loop\n }// end of try block\n catch ( IOException e )\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE, e.getMessage(),\n TAG + \"::importJsonData [line: \" +\n UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n\n Gson gson = new Gson();\n\n // convert the file JSON into a list of objects\n fileData = gson.fromJson( writer.toString(),\n new TypeToken<LinkedTreeMap<String, Object>>(){}.getType() );\n\n in.close();\n }// end of try block\n catch ( IOException e )\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE, e.getMessage(),\n TAG + \"::importJsonData [line: \" +\n UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n }// end of if block\n else\n {\n try\n {\n File file = new File( filePath );\n\n // if the is a file present then it will contain a list with at least on object\n if( file.exists() )\n {\n reader = new FileReader( file );\n Gson gson = new Gson();\n\n // convert the file JSON into a list of objects\n fileData = gson.fromJson( reader,\n new TypeToken<LinkedTreeMap<String, Object>>(){}.getType() );\n }// end of if block\n\n }// end of try block\n catch ( FileNotFoundException | JsonSyntaxException e )\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE, e.getMessage(),\n TAG + \"::importJsonData [line: \" +\n UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n finally\n {\n // close the file reader object\n if( reader != null )\n {\n try\n {\n reader.close();\n } // end of try block\n catch (IOException e)\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE,\n e.getMessage(),TAG + \"::importJsonData [line: \"\n + UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n }// end of if block\n }// end of finally block\n }// end of else block\n\n return fileData;\n }",
"public JSONArray readFromJSON(){\n\n JSONArray jsonArray=null;\n\n try {\n InputStream inputStream =context.getResources().getAssets().open(FILE_NAME);\n int size = inputStream.available();\n byte[] data = new byte[size];\n inputStream.read(data);\n inputStream.close();\n String json = new String(data, \"UTF-8\");\n jsonArray = new JSONArray(json);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return jsonArray;\n }",
"public JSONObject getJSONFromFile() throws IOException\n\t{\n\t\tInputStream is = context.getResources().openRawResource(R.raw.schedule);\n\t\tWriter writer = new StringWriter();\n\t\tchar[] buffer = new char[1024];\n\t\ttry {\n\t\t Reader reader = new BufferedReader(new InputStreamReader(is, \"UTF-8\"));\n\t\t int n;\n\t\t while ((n = reader.read(buffer)) != -1) {\n\t\t writer.write(buffer, 0, n);\n\t\t }\n\t\t} finally {\n\t\t is.close();\n\t\t}\n\n\t\tString jsonString = writer.toString();\n\t\tJSONObject jObj=null;\n\t\t\n\t\t// try parse the string to a JSON object\n\t\ttry {\n\t\t\tjObj = new JSONObject(jsonString);\n\t\t} catch (JSONException e) {\n\t\t\tLog.e(\"JSON Parser\", \"Error parsing data \" + e.toString());\n\t\t}\n\t\t\t\n\t\treturn jObj;\n\t\t// return JSON String\n\n\t}",
"private static void loadJsonFile() throws FileNotFoundException {\n Log.println(Log.INFO, \"FileAccessing\", \"Loading settings file.\");\n StringBuilder stringBuilder = new StringBuilder();\n InputStreamReader inputStreamReader = new InputStreamReader(context.openFileInput(\"settingDetails.json\"), StandardCharsets.UTF_8);\n try (BufferedReader reader = new BufferedReader(inputStreamReader)) {\n String line = reader.readLine();\n while (line != null) {\n stringBuilder.append(line).append('\\n');\n line = reader.readLine();\n }\n } catch (IOException e) {\n Log.println(Log.ERROR, \"FileAccessing\", \"Settings file reading error.\");\n throw new FileNotFoundException();\n }\n if (stringBuilder.toString().equals(\"\")) {\n Log.println(Log.INFO, \"FileAccessing\", \"Settings file does not exist.\");\n throw new FileNotFoundException();\n }\n\n Gson gson = new Gson();\n JsonObject jsonObject = gson.fromJson(stringBuilder.toString(), JsonObject.class);\n if (jsonObject == null) {\n throw new FileNotFoundException();\n }\n JsonArray mappingControls = (JsonArray) jsonObject.get(\"mappingControls\");\n\n TaskDetail.actionToTask.clear();\n for (JsonElement o : mappingControls) {\n JsonObject individualMapping = (JsonObject) o;\n byte combinedAction = individualMapping.get(\"combinedAction\").getAsByte();\n int outerControl = individualMapping.get(\"task\").getAsInt();\n TaskDetail.actionToTask.put(combinedAction, TaskDetail.taskDetails.get(outerControl));\n }\n\n int setting = 0;\n JsonArray generalSettings = (JsonArray) jsonObject.get(\"generalSettings\");\n for (JsonElement o : generalSettings) {\n JsonObject individualSetting = (JsonObject) o;\n int status = individualSetting.get(\"status\").getAsInt();\n SettingDetail.settingDetails.get(setting++).changeSetting(status);\n }\n\n DeviceDetail.deviceDetails.clear();\n JsonArray deviceList = (JsonArray) jsonObject.get(\"devices\");\n for (JsonElement o : deviceList) {\n JsonObject individualDevice = (JsonObject) o;\n String deviceName = individualDevice.get(\"name\").getAsString();\n String deviceMac = individualDevice.get(\"mac\").getAsString();\n DeviceDetail.deviceDetails.add(new DeviceDetail(deviceMac, deviceName));\n }\n\n SensitivitySetting.sensitivitySettings.clear();\n JsonArray sensitivityList = (JsonArray) jsonObject.get(\"sensitivities\");\n for (JsonElement o : sensitivityList) {\n JsonObject individualSensitivity = (JsonObject) o;\n int multiplicativeFactor = individualSensitivity.get(\"factor\").getAsInt();\n int sensitivity = individualSensitivity.get(\"sensitivity\").getAsInt();\n SensitivitySetting.sensitivitySettings.add(new SensitivitySetting(multiplicativeFactor, sensitivity));\n }\n\n int currentDevice = jsonObject.get(\"currentlySelected\").getAsInt();\n DeviceDetail.setIndexSelected(currentDevice);\n\n updateAllSetting(false);\n }",
"private static JSONTile parse(String configFile) {\n Gson gson = new Gson();\n\n try (BufferedReader reader = new BufferedReader(\n new InputStreamReader(new FileInputStream(configFile), StandardCharsets.UTF_8))) {\n return gson.fromJson(reader, JSONTile.class);\n } catch (IOException e) {\n throw new IllegalArgumentException(\"Error when reading file: \" + configFile, e);\n }\n }",
"static JsonResource forFile( File file ) {\n return new JsonResource() {\n @Override\n public <T> T readFrom( ReadMethod<T> consumer ) throws IOException {\n try ( FileInputStream stream = new FileInputStream(file) ) {\n return consumer.read(stream);\n }\n }\n };\n }",
"private String loadJSONFromAsset(){\n String json = null;\n AssetManager assetManager = getAssets();\n try{\n InputStream IS = assetManager.open(\"datosFases.json\");\n int size = IS.available();\n byte[] buffer = new byte[size];\n IS.read(buffer);\n IS.close();\n json = new String(buffer,\"UTF-8\");\n\n } catch (IOException ex){\n ex.printStackTrace();\n return null;\n }\n\n return json;\n }",
"private String loadJSONFromAsset() {\n String json = null;\n try {\n //AssetManager assetManager = getAssets();\n InputStream is = getAssets().open(\"sa.json\");\n //InputStream is = getResources().openRawResource(\"sa.json\");\n int size = is.available();\n\n byte[] buffer = new byte[size];\n\n is.read(buffer);\n\n is.close();\n\n json = new String(buffer, \"UTF-8\");\n Log.i(\"Json\",json);\n\n\n } catch (Exception ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n\n }",
"public JSONObject parse(String jsonFileName) {\n JSONObject jsonObject = null;\n JSONParser jsonParser = new JSONParser();\n Reader jsonFileReader = this.resourceFileLoader.loadJsonReader(jsonFileName);\n\n try {\n jsonObject = (JSONObject) jsonParser.parse(jsonFileReader);\n } catch(Exception e) {\n this.exceptionLogger.log(e);\n }\n\n return jsonObject;\n }",
"private static ConfigImpl loadJson(Path path) throws IOException {\n final ConfigImpl ret;\n try (FileInputStream stream = new FileInputStream(path.toFile())) {\n try (InputStreamReader reader = new InputStreamReader(stream, UTF_8)) {\n ret = loadJson(reader);\n }\n }\n return ret;\n }",
"private JSONObject importFlowJSON (Path pathToFolder) {\n // Create a JSONParser to parse the content of the file\n JSONParser parser = new JSONParser();\n\n // The JSONObject instance that will be returned\n JSONObject flow;\n\n try{\n // Read and parse the json file\n flow = (JSONObject) parser.parse(new FileReader(pathToFolder.toString() + \"/\" + FLOW_FILE_NAME));\n // If the file has been found and parsed we return it as a JSONObject\n return flow;\n } catch (ParseException | IOException e) {\n // If the file hasn't been found we return null\n e.printStackTrace();\n return null;\n }\n }",
"public String loadJSONFromAsset(Context context) {\n json = null;\n try {\n InputStream is = getApplicationContext().getAssets().open(\"techdrop.json\");\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n json = new String(buffer, \"UTF-8\");\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }",
"public static List<DataItem> importFromJSON(Context context){\n FileReader reader = null;\n File file = new File(Environment.getExternalStorageDirectory(), FILE_NAME);\n\n try {\n //Instantiate FileReader with file\n reader = new FileReader(file);\n //Populate DataItems class and return result\n Gson gson = new Gson();\n DataItems dataItems = gson.fromJson(reader, DataItems.class);\n return dataItems.getDataItems();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }finally {\n if (reader != null) {\n try {\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return null;\n }",
"public static JsonObject parseFromFile(String file) {\n\t\tJsonObject res = null;\n\t\ttry {\n\t\t\tJsonStreamParser parser = new JsonStreamParser(new FileReader(file));\n\t\t\tif (parser.hasNext())\n\t\t\t\tres = parser.next().getAsJsonObject();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn res;\n\t}",
"public String loadJSONFromAsset() {\n String json = null;\n try {\n InputStream is = getAssets().open(\"election-county-2012.json\");\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n json = new String(buffer, \"UTF-8\");\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }",
"public String loadJSONFromAsset() {\n String json;\n try {\n InputStream is = getAssets().open(\"track_v0649.json\");\n int size = is.available();\n byte[] buffer = new byte[size];\n\n is.read(buffer);\n is.close();\n json = new String(buffer, \"UTF-8\");\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }",
"public JsonReader(String file) {\n this.file = file;\n }",
"public void readInventoryMainJsonFile() throws IOException, ParseException {\n\n\t\t// Providing read-only access to JSON data.\n\t\tJSONParser parser = new JSONParser();\n\n\t\t// Reading the external JSON file.\n\t\tFileReader reader = new FileReader(\".\\\\resources\\\\InventoryMain.json\");\n\n\t\t// Creating main object to store JSONParser, JSONObject and JSONArray.\n\t\tObject inventoryMain = parser.parse(reader);\n\n\t\t// Parsing object to JSONObject from InventoryMain.json file.\n\t\tJSONObject inventoryObj = (JSONObject) inventoryMain;\n\n\t\t// Getting the arrays of JSON file.\n\t\tJSONArray riceArray = (JSONArray) inventoryObj.get(\"Rice\");\n\t\tJSONArray pulseArray = (JSONArray) inventoryObj.get(\"Pulses\");\n\t\tJSONArray wheatArray = (JSONArray) inventoryObj.get(\"Wheat\");\n\n\t\t// Getting details of rice.\n\t\tSystem.out.println(\"Details of Rice are: \");\n\t\tfor (int i = 0; i < riceArray.size(); i++) {\n\t\t\tJSONObject riceDetails = (JSONObject) riceArray.get(i);\n\n\t\t\tString name = (String) riceDetails.get(\"name\");\n\t\t\tlong weight = (long) riceDetails.get(\"weight\");\n\t\t\tlong price = (long) riceDetails.get(\"price\");\n\n\t\t\tSystem.out.println(\"\\nName: \" + name);\n\t\t\tSystem.out.println(\"Weight: \" + weight);\n\t\t\tSystem.out.println(\"Price per KG is: \" + price);\n\n\t\t\t// Calculating price of different types of rice.\n\t\t\tlong ricePrice = weight * price;\n\t\t\tSystem.out.println(\"\\nTotal price of \" + riceDetails.get(\"name\") + \" is \" + ricePrice);\n\n\t\t}\n\n\t\t// Getting details of Pulse.\n\t\tSystem.out.println(\"\\nDetails of Pulse are: \");\n\t\tfor (int j = 0; j < pulseArray.size(); j++) {\n\t\t\tJSONObject pulseDetails = (JSONObject) pulseArray.get(j);\n\n\t\t\tString name = (String) pulseDetails.get(\"name\");\n\t\t\tlong weight = (long) pulseDetails.get(\"weight\");\n\t\t\tlong price = (long) pulseDetails.get(\"price\");\n\n\t\t\tSystem.out.println(\"\\nName: \" + name);\n\t\t\tSystem.out.println(\"Weight: \" + weight);\n\t\t\tSystem.out.println(\"Price per KG is: \" + price);\n\n\t\t\t// Calculating price of different types of Pulses.\n\t\t\tlong pulsePrice = weight * price;\n\t\t\tSystem.out.println(\"\\nTotal price of \" + pulseDetails.get(\"name\") + \" is \" + pulsePrice);\n\n\t\t}\n\t\t// Getting details of Wheat.\n\t\tSystem.out.println(\"\\nDetails of Wheat are: \");\n\t\tfor (int i = 0; i < wheatArray.size(); i++) {\n\t\t\tJSONObject wheatDetails = (JSONObject) wheatArray.get(i);\n\n\t\t\tString name = (String) wheatDetails.get(\"name\");\n\t\t\tlong weight = (long) wheatDetails.get(\"weight\");\n\t\t\tlong price = (long) wheatDetails.get(\"price\");\n\n\t\t\tSystem.out.println(\"\\nName: \" + name);\n\t\t\tSystem.out.println(\"Weight: \" + weight);\n\t\t\tSystem.out.println(\"Price per KG is: \" + price);\n\t\t\t// Calculating price of different types of Wheat.\n\t\t\tlong wheatPrice = weight * price;\n\t\t\tSystem.out.println(\"\\nTotal price of \" + wheatDetails.get(\"name\") + \" is \" + wheatPrice);\n\n\t\t}\n\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tprivate void readMapFromFile() {\r\n\t\ttry {\r\n\t\t\tType type = new TypeToken<HashMap<String, Country>>() {}.getType();\r\n\t\t\tthis.daoMap = (HashMap<String, Country>) gson.fromJson(new FileReader(path), type);\r\n\t\t} catch (JsonSyntaxException | JsonIOException | FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}",
"public static void main(String[] args) throws FileNotFoundException {\r\n\t\tJsonParser parser = Json.createParser(new FileReader(JSON_FILE_NAME));\r\n\t\t\r\n\t\t// parse the file\r\n\t\twhile (parser.hasNext()) {\r\n\t\t\tJsonParser.Event event = parser.next();\r\n\t\t\tif (event.equals(JsonParser.Event.KEY_NAME)) {\r\n\t\t\t\tString key = parser.getString();\r\n\t\t\t\tparser.next();\r\n\t\t\t\tString value = parser.getString();\r\n\t\t\t\tSystem.out.printf(\">> %s: %s\\n\", key, value);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}",
"@GetMapping(\"/getJson\")\r\n\tpublic HashMap<String, Object> getJsonValue() throws IOException {\n\r\n\t\tHashMap<String, Object> globalVariable = null;\r\n\t\tObjectMapper mapper = new ObjectMapper();\r\n\t\tString path = \"rules/backUp.json\";\r\n\r\n\t\tResourceLoader resource = new DefaultResourceLoader();\r\n\t\torg.springframework.core.io.Resource resource2 = resource.getResource(\"classpath:\" + path);\r\n\r\n\t\tReader reader = new InputStreamReader(resource2.getInputStream());\r\n\t\tSystem.out.println(\"reader ouput \" + reader.toString());\r\n\t\tString fileData = FileCopyUtils.copyToString(reader);\r\n\t\tSystem.out.println(\" filedate is \" + fileData);\r\n\r\n\t\tTypeReference<HashMap<String, Object>> typeRef = new TypeReference<HashMap<String, Object>>() {\r\n\t\t};\r\n\t\tHashMap<String, Object> readValue = mapper.readValue(fileData, typeRef);\r\n\t\treturn readValue;\r\n\t}",
"private String loadJSONFromAsset() {\n String json = null;\n try {\n InputStream is = getAssets().open(\"playerData.json\");\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n json = new String(buffer, \"UTF-8\");\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }",
"public void load() throws IOException {\r\n\t\tFile file = new File(projectDir, TERN_PROJECT);\r\n\t\tif (file.exists()) {\r\n\t\t\tJSONParser parser = new JSONParser();\r\n\t\t\ttry {\r\n\t\t\t\tJSONObject result = (JSONObject) parser.parse(new FileReader(\r\n\t\t\t\t\t\tfile));\r\n\t\t\t\tsuper.putAll(result);\r\n\t\t\t} catch (ParseException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public String loadJSONFromAsset() {\n String json = null;\n try {\n json = new String(buffer, \"UTF-8\");\n } catch (UnsupportedEncodingException e1) {\n e1.printStackTrace();\n }\n\n return json;\n }",
"public String getJson()\n {\n String json=null;\n try\n {\n // Opening cities.json file\n InputStream is = getAssets().open(\"cities.json\");\n // is there any content in the file\n int size = is.available();\n byte[] buffer = new byte[size];\n // read values in the byte array\n is.read(buffer);\n // close the stream --- very important\n is.close();\n // convert byte to string\n json = new String(buffer, \"UTF-8\");\n }\n catch (IOException ex)\n {\n ex.printStackTrace();\n return json;\n }\n return json;\n }",
"public static String loadJSONFromAsset(Context context,String filePath) {\n String json = null;\n try {\n InputStream is = context.getAssets().open(filePath);\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n json = new String(buffer, ENCODING);\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }",
"@Override\n public void fromFile(final String file) {\n // Model会关心文件路径,所以这里需要这个操作\n this.jsonFile = file;\n final JsonObject data = Ut.ioJObject(this.jsonFile);\n this.fromJson(data);\n }",
"protected JSONArray readJsonFromLocalResources(InputStream resources) {\n\n InputStream is = resources;\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n\n if (is != null) {\n\n int ctr;\n try {\n ctr = is.read();\n while (ctr != -1) {\n byteArrayOutputStream.write(ctr);\n ctr = is.read();\n }\n\n if (byteArrayOutputStream.size() > 0) {\n Logger.d(\"JSON= \" + byteArrayOutputStream.toString());\n return new JSONArray(byteArrayOutputStream.toString());\n }\n\n } catch (IOException e) {\n Logger.e(\"Could not read the json file, IOException\" + e);\n } catch (JSONException ex) {\n Logger.e(\"Could not parse into json object, JSONException\" + ex);\n } finally {\n\n try {\n is.close();\n } catch (IOException ex) {\n Logger.e(\"Could not close InputStream, IOException\" + ex);\n }\n }\n }\n\n Logger.d(\"Could not return json object\"); //Let's hope not to hit this line\n return null;\n }",
"private void readSettingsFromJson(String jsonFilePath) throws FileNotFoundException {\n File jsonFile = new File(jsonFilePath);\n GsonBuilder builder = new GsonBuilder().setPrettyPrinting();\n Gson gson = builder.create();\n if (jsonFile.exists()) {\n // try to read the settings from provided file\n FileReader fileReader = new FileReader(jsonFile);\n serverConfig = gson.fromJson(fileReader, ServerConfig.class);\n log.info(\"reading config from file {}\", jsonFile.getAbsoluteFile());\n } else {\n // file was not found, fall back to default config\n log.warn(\"settings file {} not found, falling back to default config\", jsonFile.getAbsoluteFile());\n serverConfig = ServerConfig.getDefaultConfig();\n String jsonStr = gson.toJson(serverConfig);\n\n try (PrintWriter out = new PrintWriter(jsonFile)) {\n out.print(jsonStr);\n }\n }\n\n // additionally create a map for easy access to repositories based on identifier\n for (ServerRepository serverRepository : serverConfig.getRepositories()) {\n this.serverRepositories.put(serverRepository.getIdentifier(), serverRepository);\n }\n }",
"@VisibleForTesting\n interface JsonReader {\n /**\n * Returns the contents of the JSON file that is pointed to by the given {@code resId} as\n * a string.\n *\n * @param context The current Context.\n * @param resId The resource id of the JSON file.\n * @return A string representation of the file or {@code null} if an error occurred.\n */\n @Nullable\n String jsonFileToString(Context context, @RawRes int resId);\n }",
"public void init() {\n\n mJokes = new ArrayList<>();\n\n StringBuilder sBuilder = new StringBuilder();\n\n try {\n\n InputStream in = getClass().getResourceAsStream(\"/jokes.json\");\n BufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\n String mLine = reader.readLine();\n while (mLine != null) {\n //process line\n sBuilder.append(mLine);\n mLine = reader.readLine();\n }\n\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n String jsonString = sBuilder.toString();\n\n if( jsonString != null ){\n\n JsonParser parser = new JsonParser();\n JsonObject jsonObject = parser.parse(jsonString).getAsJsonObject();\n\n JsonArray jokesArray = jsonObject.getAsJsonArray(\"jokes\");\n\n for (JsonElement element : jokesArray) {\n String joke = element.getAsJsonObject().get(\"joke\").getAsString();\n mJokes.add(joke);\n }\n }\n\n }",
"@Override\n public Object loadFromJson(Context context) {\n Gson gson = new Gson();\n String json = FileManager.getInstance().loadFromFile(getFileName(), context);\n if(json.equals(\"\")) {\n return null;\n }\n\n return gson.fromJson(json, MatchStorage.class);\n\n }",
"public static void readJSON() throws IOException {\n\t\tBufferedReader br = new BufferedReader(new FileReader(f));\n\t\tString line;\n\t\tif((line = br.readLine()) != null) {\n\t\t\tString [] flightStates = parseJSON(line);\n\t\t\tfor(String state : flightStates) {\n\t\t\t\tFlightState fs = new FlightState(state);\n\t\t\t\tsendToKafka(fs);\n\t\t\t}\n\t\t}\n\t\tbr.close();\n\t}",
"public JSONDocument parse (File fl){\n JSONDocument temp = null;\n String data = \"\";\n if (fl != null){\n try (FileReader fr = new FileReader(fl)){\n int c;\n while((c = fr.read()) != -1) data += (char)c;\n temp = this.parseString(this.cleanString(data));\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }else throw new IllegalArgumentException(\"File cannot be null\");\n return temp;\n }",
"public static JSONObject loadMOTD() {\n File JSONFile = new File(plugin.getDataFolder() + \"/motd.json\");\n \n if (!JSONFile.exists()){\n Logger.getLogger(MOTDHandler.class.getName()).log(Level.INFO, \"motd.json was not found in the config directory. Attempting to create a blank file.\");\n boolean worked = saveMOTD(new JSONObject());\n if (worked) Logger.getLogger(MOTDHandler.class.getName()).log(Level.INFO, \"motd.json created!\");\n else Logger.getLogger(MOTDHandler.class.getName()).log(Level.INFO, \"JawaToolBox was unable to generate the blank motd.json. This is likely a permissions problem.\");\n return new JSONObject();\n }\n\n try {\n String source = new String(Files.readAllBytes(Paths.get(JSONFile.toURI())));\n return new JSONObject(source);\n } catch (FileNotFoundException ex) {\n return new JSONObject();\n } catch (IOException ex) {\n Logger.getLogger(MOTDHandler.class.getName()).log(Level.SEVERE, \"Something went wrong JawaToolBox wasn't able to read the motd.json. Check directory permissions.\");\n Logger.getLogger(MOTDHandler.class.getName()).log(Level.SEVERE, null, ex);\n return new JSONObject();\n }\n }",
"public static Quote[] readFromJson(String filename) throws IOException {\n File file = new File(filename);\n file.createNewFile();\n Gson read = new Gson();\n InputStream inStream = new FileInputStream(filename);\n BufferedReader buffer = new BufferedReader(new InputStreamReader(inStream));\n Quote[] quotes = read.fromJson(buffer, Quote[].class);\n buffer.close();\n return quotes;\n }",
"public static String loadJSONFromAsset(Context context, String fileName) {\n String jsonString = null;\n try {\n InputStream is = context.getAssets().open(fileName);\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n jsonString = new String(buffer, StandardCharsets.UTF_8);\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return jsonString;\n }",
"public static JSONObject loadJSONObjectFromAsset(Context context) {\n String jsonStr = null;\n JSONObject jsonObject = null;\n try {\n //here we need context to access ASSETS --> ANDROID TUTORIAL / codeBlock - Patterns / Application.java\n InputStream is = context.getAssets().open(\"listHomeItem.json\");\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n jsonStr = new String(buffer, \"UTF-8\");\n\n jsonObject = new JSONObject(jsonStr);\n\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n return jsonObject;\n }",
"public static JsonObject fileToJson(File jsonFile) {\n Gson gson = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting().create();\n JsonObject jsonObject = null;\n\n try {\n Reader reader = new FileReader(jsonFile);\n jsonObject = gson.fromJson(reader, JsonObject.class);\n } catch (FileNotFoundException e) {\n //log.error(\"FileNotFound Exception occurred when converting JSON file to JSON Object\", e); //todo: FileNotFound exception occured. error message?\n e.printStackTrace();\n }\n\n return jsonObject;\n }",
"public static void loadPracticeListFromFile() {\n JSONParser jsonParser = new JSONParser();\n\n try (FileReader reader = new FileReader(\"src/practiceList.json\")) {\n // Read JSON file\n Object object = jsonParser.parse(reader);\n\n //Iterate over word list array\n JSONArray wordList = (JSONArray) object;\n for (Object o : wordList) {\n\n JSONObject next = (JSONObject) o;\n String extra = \"\";\n\n if (((String) next.get(\"wordType\")).equalsIgnoreCase(\"verb\")) {\n extra = \"to \";\n }\n\n Word loadedWord = new Word(extra + next.get(\"english\"), (String) next.get(\"welsh\"), (String) next.get(\"wordType\"));\n\n addIntoPracticedWords(loadedWord);\n }\n\n } catch (ParseException | IOException e) {\n System.out.println(\"PracticeList file not found, will be created on exit.\");\n }\n }",
"public String loadJSONFile(int resourceIdentifier) {\n if (resourceIdentifier != 0) {\n InputStream input = getResources().openRawResource(resourceIdentifier);\n java.util.Scanner s = new java.util.Scanner(input).useDelimiter(\"\\\\A\");\n return s.hasNext() ? s.next() : null;\n } else {\n return null;\n }\n }",
"public static JSONObject readJSONFromFile(File file) throws IOException, ParseException {\n JSONParser parser = new JSONParser();\n Reader reader = new FileReader(file);\n JSONObject jsonObject = (JSONObject) parser.parse(reader);\n return jsonObject;\n }",
"public String getJSONString(String fileName){\n\n String line = \"\";\n String jsonString = \"\";\n\n try {\n FileReader fileReader = new FileReader(fileName);\n\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n\n while ((line = bufferedReader.readLine()) != null) {\n jsonString+=line+'\\n';\n }\n bufferedReader.close();\n }\n catch (FileNotFoundException ex){\n System.out.println(\"Unable to open file '\" + fileName + \"'\");\n }\n catch (IOException ex) {\n System.out.println( \"Error reading file '\" + fileName +\"'\");\n }\n\n return jsonString;\n }",
"public static JsonObject getTestVectors(String filename) throws \n IOException {\n InputStream is = JsonUtil.class.getClassLoader().getResourceAsStream(filename);\n JsonReader reader = new JsonReader(new InputStreamReader(is, UTF_8));\n JsonElement elem = JsonParser.parseReader(reader);\n return elem.getAsJsonObject();\n }",
"public void ReadJson() {\n System.out.println(\"Read Json Method in the Mother Class\");\n }",
"private void inflateFromFile() {\n\t\t\n\t\tFile file = null;\t\t\n\t\ttry {\n\t\t\tfile = new File(FILE_PATH);\n\t\t} catch (NullPointerException e) {\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t\tFileReader reader = null;\t\t\n\t\ttry {\n\t\t\treader = new FileReader(file);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Can't find source (json file)\");\n\t\t\tSystem.err.println(e.getMessage());\n\t\t\tSystem.exit(1);\n\t\t\t\n\t\t}\n\t\t\n\t\tJSONObject jsonObject = new JSONObject(\n\t\t\t\tnew JSONTokener(reader)\n\t\t\t\t);\n\t\t\n\t\tJSONArray array = jsonObject.getJSONArray(\"students\");\n\t\t\n\t\tfor (int i = 0; i < array.length(); i++) {\t\t\t\n\t\t\tJSONObject student = array.getJSONObject(i);\t\t\t\n\t\t\tString name = student.getString(\"name\");\n\t\t\tString secondName = student.getString(\"secondName\");\n\t\t\tString surname = student.getString(\"surname\");\n\t\t\tString birthday = student.getString(\"birthday\");\n\t\t\tString facultet = student.getString(\"facultet\");\n\t\t\tint groupNumber = student.getInt(\"groupNumber\");\n\t\t\t\n\t\t\tDate dateBirthday = null; \n\t\t\t//делаем Date из строки\t\t\t\n\t\t\ttry {\n\t\t\t\tdateBirthday = new SimpleDateFormat(\"dd.MM.yyyy\").parse(birthday);\n\t\t\t} catch(ParseException e) {\n\t\t\t\tSystem.err.println(\"Can't understand the date format from source.\");\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tstudents.add(\n\t\t\t\t\tStudent.get(name, secondName, surname, dateBirthday, facultet, groupNumber)\n\t\t\t\t\t);\t\t\t\n\t\t}\t\t\t\n\t}",
"@SuppressWarnings(\"unused\")\n public AppCMSPageUI getDataFromFile(String fileName) {\n StringBuilder buf = new StringBuilder();\n try {\n InputStream json = currentActivity.getAssets().open(fileName);\n BufferedReader in =\n new BufferedReader(new InputStreamReader(json, \"UTF-8\"));\n String str;\n\n while ((str = in.readLine()) != null) {\n buf.append(str);\n }\n\n in.close();\n } catch (Exception e) {\n //Log.e(TAG, \"Error getting data from file: \" + e.getMessage());\n }\n\n Gson gson = new Gson();\n\n return gson.fromJson(buf.toString().trim(), AppCMSPageUI.class);\n }",
"public static OMDBJsonResponse getMoviesFromJSON(File jsonFile)\n {\n Gson gson = new Gson();\n OMDBJsonResponse searchResult = null;\n\n //using try \"with resources\"\n try(\n FileReader fileReader = new FileReader(jsonFile);\n JsonReader jsonReader = new JsonReader(fileReader);\n )\n {\n searchResult = gson.fromJson(jsonReader, OMDBJsonResponse.class);\n } catch (Exception e)\n {\n e.printStackTrace();\n }\n return searchResult;\n }",
"<T> T readJson(FsPath path, Class<T> clazz);",
"public String readJsonResponse(String filePath){\n\t\tBufferedReader br = null;\n\t\tString jsonString=\"\";\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(filePath));\n\t\t\tString line=\"\";\n\t\t\twhile((line = br.readLine()) != null){\n\t\t\t\tjsonString += line +\"\\n\";\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treportObj.AddDataToTestReport(\"Exception in readJsonResponse. \"+e.getMessage(), false);\n\t\t}finally {\n\t\t\ttry {\n\t\t\t\tif(br != null){\n\t\t\t\t\tbr.close();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn jsonString;\n\t}",
"public String readtexto() {\n String texto=\"\";\n try\n {\n BufferedReader fin =\n new BufferedReader(\n new InputStreamReader(\n openFileInput(\"datos.json\")));\n\n texto = fin.readLine();\n fin.close();\n }\n catch (Exception ex)\n {\n Log.e(\"Ficheros\", \"Error al leer fichero desde memoria interna\");\n }\n\n\n\n return texto;\n }",
"public static ResponseUserObj parseGSON() throws FileNotFoundException {\n\n Gson gson = new Gson();\n\n ResponseUserObj data = gson.fromJson(new JsonReader(new FileReader(\"classwork/json/example.json\")), ResponseUserObj.class);\n\n return data;\n }",
"private String readJsonFile(InputStream inputStream) {\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n\n byte bufferByte[] = new byte[1024];\n int length;\n try {\n while ((length = inputStream.read(bufferByte)) != -1) {\n outputStream.write(bufferByte, 0, length);\n }\n outputStream.close();\n inputStream.close();\n } catch (IOException e) {\n\n }\n return outputStream.toString();\n }",
"public String loadJSONFromAsset (String strJson) {\n String json = null;\n try {\n InputStream is = getAssets().open(strJson);\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n json = new String(buffer, \"UTF-8\");\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }",
"private JSONObject getAssetJson(String filename) {\n return new JSONObject(\n resourceHandler.getResourceFileAsString(ResourceHandler.VALORANT_BASE_PATH + \"Data/\" + filename)\n );\n }",
"private void loadWorld() {\n try {\n world = jsonReader.read();\n System.out.println(\"Loaded world from \" + JSON_STORE);\n } catch (IOException | InvalidDataException e) {\n System.out.println(\"Unable to read from file: \" + JSON_STORE);\n }\n }",
"private JSONObject readJsonFromUrl(String url) throws IOException, JSONException {\r\n\t\tInputStream is = new URL(url).openStream();\r\n\t\ttry {\r\n\t\t\tBufferedReader rd = new BufferedReader(new InputStreamReader(is, Charset.forName(\"UTF-8\")));\r\n\t\t\tString jsonText = readAll(rd);\r\n\t\t\tJSONObject json = new JSONObject(jsonText);\r\n\t\t\treturn json;\r\n\t\t} finally { //finally will always execute, if an try block exists. Doesnt matter if there is an Exception or not.\r\n\t\t\tis.close();\r\n\t\t}\r\n\t}",
"void loadFromFile() {\n\t\ttry {\n\t\t\tFile directory = GameApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS);\n\t\t\tFile source = new File(directory, FILE_NAME);\n\t\t\tMap<String, Scoreboard> scoreboards = new HashMap<String, Scoreboard>();\n\t\t\tif (source.exists()) {\n\t\t\t\tJsonReader reader = new JsonReader(new FileReader(source));\n\t\t\t\treader.beginArray();\n\t\t\t\twhile (reader.hasNext()) {\n\t\t\t\t\tScoreboard scoreboard = readScoreboard(reader);\n\t\t\t\t\tscoreboards.put(scoreboard.getName(), scoreboard);\n\t\t\t\t}\n\t\t\t\treader.endArray();\n\t\t\t\treader.close();\n\t\t\t} else {\n\t\t\t\tsource.createNewFile();\n\t\t\t}\n\t\t\tthis.scoreboards = scoreboards;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static Level readJson(String jsonName) {\n\n InputStream levelInputStream;\n try {\n levelInputStream = new FileInputStream(jsonName);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n return null;\n }\n JsonReader levelReader = Json.createReader(levelInputStream);\n\n JsonObject fileObject = levelReader.readObject();\n JsonObject levelInfo = fileObject.getJsonObject(\"Level Info\");\n JsonObject tiles = fileObject.getJsonObject(\"Tiles\");\n JsonArray rows = (JsonArray) tiles.get(\"rows\");\n\n int rowCount = levelInfo.getInt(\"rowCount\");\n int colCount = levelInfo.getInt(\"columnCount\");\n JsonArray enemies = (JsonArray) levelInfo.get(\"Enemies\");\n Position playerStart = new Position(levelInfo.getInt(\"playerX\"), levelInfo.getInt(\"playerY\"));\n\n AbstractTile[][] tileArray = new AbstractTile[colCount][rowCount];\n\n Iterator<JsonValue> rowsIterator = rows.iterator();\n\n while (rowsIterator.hasNext()) {\n // Convert from jsonValue to jsonObject, then get the array of tiles\n JsonObject currentRowObject = (JsonObject) rowsIterator.next();\n JsonArray currentRow = (JsonArray) currentRowObject.get(\"objects\");\n\n // Iterate through each row of tiles\n Iterator<JsonValue> currentRowIterator = currentRow.iterator();\n while (currentRowIterator.hasNext()) {\n JsonObject currentTile = (JsonObject) currentRowIterator.next();\n JsonValue type = currentTile.get(\"Tile Type\");\n JsonValue row = currentTile.get(\"row\");\n JsonValue column = currentTile.get(\"column\");\n JsonValue rotated = currentTile.get(\"Rotation\");\n boolean isRotated = false;\n if (rotated.toString().equals(\"\\\"Horizontal\\\"\")) {\n isRotated = false;\n } else if (rotated.toString().equals(\"\\\"Vertical\\\"\")) {\n isRotated = true;\n }\n String tileName = type.toString();\n int tileRow = stringToInt(row.toString());\n int tileColumn = stringToInt(column.toString());\n AbstractTile tileObject;\n if (tileName.equals(\"\\\"Key\\\"\")) {\n JsonValue colour = currentTile.get(\"Colour\");\n String tileColour = colour.toString();\n tileColour = tileColour.substring(1, tileColour.length() - 1);\n tileObject = new Key(tileColour);\n } else if (tileName.equals(\"\\\"ExitPortal\\\"\")) {\n tileObject = new ExitPortal();\n } else if (tileName.equals(\"\\\"ExitLock\\\"\")) {\n tileObject = new ExitLock(isRotated);\n } else if (tileName.equals(\"\\\"InfoField\\\"\")) {\n JsonValue infoText = currentTile.get(\"InfoText\");\n String tileInfoText = infoText.toString();\n tileObject = new InfoField(tileInfoText);\n } else if (tileName.equals(\"\\\"LockedDoor\\\"\")) {\n JsonValue colour = currentTile.get(\"Colour\");\n String tileColour = colour.toString();\n tileColour = tileColour.substring(1, tileColour.length() - 1);\n tileObject = new LockedDoor(isRotated, tileColour);\n } else if (tileName.equals(\"\\\"Treasure\\\"\")) {\n tileObject = new Treasure();\n } else if (tileName.equals(\"\\\"DeathTile\\\"\")) {\n tileObject = new DeathTile();\n } else if (tileName.equals(\"\\\"Wall\\\"\")) {\n tileObject = new Wall();\n // Free tile\n } else {\n tileObject = new FreeTile();\n }\n tileArray[tileColumn][tileRow] = tileObject;\n }\n }\n\n ArrayList<AbstractActor> enemiesArrayList = new ArrayList<AbstractActor>();\n\n Iterator<JsonValue> enemiesIterator = enemies.iterator();\n JsonObject currentEnemyObject;\n\n while (enemiesIterator.hasNext()) {\n AbstractActor currentEnemy;\n currentEnemyObject = (JsonObject) enemiesIterator.next();\n int xstartPos = currentEnemyObject.getInt(\"startingX\");\n int ystartPos = currentEnemyObject.getInt(\"startingY\");\n JsonValue aiType = currentEnemyObject.get(\"AI Type\");\n int tickSpeed = currentEnemyObject.getInt(\"Tick Speed\");\n JsonValue movement = currentEnemyObject.get(\"Movement String\");\n\n Position aiStartPos = new Position(xstartPos, ystartPos);\n\n String aiTypeString = aiType.toString();\n String movementString = movement.toString();\n aiTypeString = aiTypeString.substring(1, aiTypeString.length() - 1);\n movementString = movementString.substring(1, movementString.length() - 1);\n\n if (aiTypeString.equals(\"PatternEnemy\")) {\n currentEnemy = new PatternEnemy(aiStartPos, tickSpeed, movementString);\n enemiesArrayList.add(currentEnemy);\n } else if (aiTypeString.equals(\"StalkerEnemy\")) {\n currentEnemy = new StalkerEnemy(aiStartPos, tickSpeed);\n enemiesArrayList.add(currentEnemy);\n }\n\n }\n\n Player returnPlayer = new Player(playerStart);\n Set<AbstractActor> returnEnemies = new HashSet<AbstractActor>();\n returnEnemies.addAll(enemiesArrayList);\n int maxTime = levelInfo.getInt(\"timeLimit\");\n Level returnLevel = new Level(maxTime, returnPlayer, tileArray, returnEnemies);\n return returnLevel;\n\n }",
"public void readFromFile() {\n\n\t}",
"public static ArrayList<Course> loadJsonByFileName(String jsonFileName) throws NullPointerException{\n if (jsonFileName == null){\n throw new NullPointerException(ErrorMessage.NULL_JSON_FILE_NAME);\n }\n String jsonFile = Data.getFileContentsAsString(jsonFileName);\n return loadJson(jsonFile);\n }",
"private void loadData() {\n FileInputStream fis;\n\n try {\n fis = openFileInput(DATA_FILE);\n user = (User) new JsonReader(fis).readObject();\n fis.close();\n } catch(Exception e) {\n Log.i(\"Exception :\", e.toString());\n }\n }",
"public void gatherLevelJson(String filename) {\r\n\t\tif(level == 0) { // Get level editor level\r\n\t\t\tPreferences prefs = GDXRoot.getPreferences();\r\n\t\t\tif(prefs.contains(filename)) {\r\n\t\t\t\tlevelAssets = new JsonReader().parse(prefs.getString(filename));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tFileHandle file = Gdx.files.internal(filename);\r\n\t\t\tString text = file.readString();\r\n\t\t\tlevelAssets = new JsonReader().parse(text);//directory.getEntry( String.format(\"level%d\", level), JsonValue.class);\r\n\t\t}\r\n\t}",
"public void retrieveTodo() {\r\n File file = new File(\"C:\\\\Users\\\\Dalia\\\\Desktop\\\\CPSC 210\\\\Project\\\\project_b2h3b\\\\data\");\r\n JFileChooser chooser = new JFileChooser(file);\r\n int userSelection = chooser.showOpenDialog(null);\r\n File f = chooser.getSelectedFile();\r\n if (userSelection == JFileChooser.APPROVE_OPTION) {\r\n fileName = f.getAbsolutePath();\r\n reader = new MyTodoJsonReader(fileName);\r\n try {\r\n myTodo = reader.readMyToDoList();\r\n todoListGui();\r\n } catch (IOException ioException) {\r\n JOptionPane.showMessageDialog(null, \"File doesn't exist!\");\r\n }\r\n }\r\n }",
"@Override\n public String toString() {return \"Json-File Reader\";}",
"public String loadJSONFromAsset(Context context) {\n String json = null;\n try {\n InputStream is;\n int id = context.getResources().getIdentifier(\"sentiment\", \"raw\", context.getPackageName());\n is = context.getResources().openRawResource(id);\n\n int size = is.available();\n\n byte[] buffer = new byte[size];\n\n is.read(buffer);\n\n is.close();\n\n json = new String(buffer, \"UTF-8\");\n\n\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n\n }",
"public Tamagotchi read() throws IOException {\n String jsonData = readFile(source);\n JSONObject jsonObject = new JSONObject(jsonData);\n return tamagotchiToJson(jsonObject);\n }",
"public static List<User> getUserFromJson(String filename){\n \tString s = readJsonFile(filename);\n \tList<User> users = JSONObject.parseArray(s, User.class);\n \treturn users;\n }",
"public JSONObject readJsonFromUrl() throws IOException, JSONException {\n\t\tInputStream inputStream = new URL(url).openStream();\n\t\ttry {\n\t\t\tBufferedReader bufferedReader = new BufferedReader(\n\t\t\t\t\tnew InputStreamReader(inputStream, Charset.forName(\"UTF-8\")));\n\t\t\tString jsonText = readAllBytes(bufferedReader);\n\t\t\tJSONObject jsonObject = new JSONObject(jsonText);\n\t\t\treturn jsonObject;\n\t\t} finally {\n\t\t\tinputStream.close();\n\t\t}\n\n\t}",
"private static JSONObject readJsonFromUrl(String url) throws IOException, JSONException {\n\t\tInputStream is = new URL(url).openStream();\n\t\ttry {\n\t\t\tBufferedReader rd = new BufferedReader(new InputStreamReader(is, Charset.forName(\"UTF-8\")));\n\t\t\tString jsonText = readAll(rd);\n\t\t\tJSONObject json = new JSONObject(jsonText);\n\t\t\treturn json;\n\t\t} finally {\n\t\t\tis.close();\n\t\t}\n\t}",
"public void retrieveData(){\n\t\tloaderImage.loadingStart();\n\t\tJsonClient js = new JsonClient();\n\t\tjs.retrieveData(JSON_URL, this);\n\t}",
"public static void load(){\n StringBuilder maleNamesString = new StringBuilder();\n try (Scanner maleNamesFile = new Scanner(mnames)){\n while (maleNamesFile.hasNext()) {\n maleNamesString.append(maleNamesFile.next());\n }\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n //Create a string from the fnames.json file\n StringBuilder femaleNamesString = new StringBuilder();\n try (Scanner femaleNamesFile = new Scanner(fnames)){\n while (femaleNamesFile.hasNext()) {\n femaleNamesString.append(femaleNamesFile.next());\n }\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n //Create a string from the snames.json file\n StringBuilder surNamesString = new StringBuilder();\n try (Scanner surNamesFile = new Scanner(snames)){\n while (surNamesFile.hasNext()) {\n surNamesString.append(surNamesFile.next());\n }\n\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n //Create a string from the locations.json file\n StringBuilder locationsString = new StringBuilder();\n try (Scanner locationsFile = new Scanner(locationsJson)){\n while (locationsFile.hasNext()) {\n locationsString.append(locationsFile.next());\n }\n\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n maleNames = (Names)convertJsonToObject(maleNamesString.toString(), new Names());\n\n femaleNames = (Names)convertJsonToObject(femaleNamesString.toString(), new Names());\n\n surNames = (Names)convertJsonToObject(surNamesString.toString(), new Names());\n\n locations = (Locations)convertJsonToObject(locationsString.toString(), new Locations());\n }",
"public JSONObject reader_File(JSONObject obj)\n {\n CSVReader reader = null;\n try\n {\n\n String path = obj.get(\"path\").toString(); //retrieve path of file from json obj\n JSONObject json = (JSONObject)obj.get(\"query\"); //retrieve json object that has query from json obj\n\n reader = new CSVReader(new FileReader(path), ',');\n\n String [] nextLine;\n\n //Read one line at a time\n JSONObject json3 = new JSONObject();\n\n //need to use JSONArray\n JSONArray jArr = new JSONArray(); //create an object of JSONArray\n while ((nextLine = reader.readNext()) != null)\n {\n\n JSONObject json2 = search(json, nextLine); //return json object that contains all the value of each lines if query matches\n\n if(!json2.isEmpty()){ //check whether json2 is empty\n jArr.add(json2); //insert json2 in in jsonArray\n\n }\n\n }\n json3.put(\"response\", jArr); //insert jArr in json3\n return json3;\n\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n finally {\n try {\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return null;\n }",
"@Nullable\n static public JSONObject readJson(final @NotNull String url) {\n\n StringBuilder builder = new StringBuilder();\n HttpClient client = new DefaultHttpClient();\n HttpGet httpGet = new HttpGet(url);\n JSONObject finalResult = null;\n try {\n HttpResponse response = client.execute(httpGet);\n StatusLine statusLine = response.getStatusLine();\n int statusCode = statusLine.getStatusCode();\n if (statusCode == 200) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(response.getEntity().getContent(), \"UTF-8\"));\n String line;\n while ((line = reader.readLine()) != null) {\n builder.append(line).append(\"\\n\");\n }\n finalResult = new JSONObject(new JSONTokener(builder.toString()));\n } else {\n Logger.e(TAG, \"Failed to download status file.\");\n }\n } catch (JSONException e) {\n Logger.e(TAG, e.getMessage());\n } catch (ClientProtocolException e) {\n Logger.e(TAG, e.getMessage());\n } catch (IOException e) {\n Logger.e(TAG, e.getMessage());\n }\n return finalResult;\n }",
"public void load(){\n // Recover docIDs\n try(Reader reader = new FileReader(\"postings/docIDs.json\")){\n this.docIDs = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, String>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try(Reader reader = new FileReader(\"postings/docLengths.json\")){\n this.docLengths = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, Integer>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try(Reader reader = new FileReader(\"postings/titleToNumber.json\")){\n this.titleToNumber = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, Integer>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public TranscriptEntry(String filename) {\n JSONParser jsonParser = new JSONParser();\n try (FileReader reader = new FileReader(filename)){\n Object obj = jsonParser.parse(reader);\n\n JSONObject entry = (JSONObject) obj;\n JSONObject myCourse = (JSONObject) entry.get(\"course\");\n course = parseCourse(myCourse);\n grade = (String) entry.get(\"grade\");\n inProgress = (boolean) entry.get(\"inProgress\");\n courseComplete = (boolean) entry.get(\"courseComplete\");\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public List<State> JsonReader() {\n ObjectMapper mapper = new ObjectMapper();\n List<State> stateList = new ArrayList<>();\n try {\n stateList = mapper.readValue(new File(\"stateList.json\"), new TypeReference<List<State>>(){});\n return stateList;\n } catch (IOException e) {\n System.err.println(\"stateList.json not found or is empty.\");\n System.err.println(\"stateList.json will be initialized.\");\n JSONWriter(stateList);\n } finally {\n System.out.print(\"\");\n }\n return stateList;\n }"
] | [
"0.75475883",
"0.7433471",
"0.7265773",
"0.71463895",
"0.70085204",
"0.6963862",
"0.695233",
"0.69289994",
"0.68985534",
"0.6871779",
"0.683722",
"0.67988116",
"0.6732343",
"0.67096347",
"0.6663499",
"0.6662259",
"0.66581476",
"0.66509837",
"0.6636566",
"0.65997386",
"0.6577768",
"0.6570203",
"0.6563555",
"0.6556646",
"0.6517219",
"0.65094125",
"0.64944315",
"0.6492761",
"0.6472503",
"0.63994807",
"0.6397051",
"0.6380164",
"0.6340288",
"0.63385594",
"0.63199043",
"0.6317439",
"0.631381",
"0.6310902",
"0.62903726",
"0.6281264",
"0.62732726",
"0.62564194",
"0.62519604",
"0.625052",
"0.62495375",
"0.6238761",
"0.6227775",
"0.62251586",
"0.6224234",
"0.62239826",
"0.62172043",
"0.62028295",
"0.61933154",
"0.6177676",
"0.6174534",
"0.61650133",
"0.6145415",
"0.6129176",
"0.6124264",
"0.60913634",
"0.6074963",
"0.604794",
"0.60389036",
"0.6013368",
"0.60057503",
"0.5986022",
"0.5977186",
"0.5969261",
"0.5967963",
"0.5967455",
"0.5961845",
"0.5942851",
"0.5927641",
"0.5922329",
"0.5920314",
"0.58817935",
"0.5846661",
"0.5827359",
"0.580055",
"0.57948714",
"0.57908636",
"0.5778883",
"0.5772939",
"0.57469255",
"0.5746886",
"0.5746674",
"0.57363594",
"0.57309735",
"0.5719861",
"0.5708148",
"0.5705793",
"0.56960255",
"0.56896204",
"0.5674845",
"0.56650156",
"0.5644126",
"0.56322837",
"0.56280917",
"0.5627618",
"0.5623279",
"0.56138796"
] | 0.0 | -1 |
Read JSON from URL. | private static JSONObject readJsonFromUrl(String url) throws IOException, JSONException {
InputStream is = new URL(url).openStream();
try {
BufferedReader rd = new BufferedReader(new InputStreamReader(is, Charset.forName("UTF-8")));
String jsonText = readAll(rd);
JSONObject json = new JSONObject(jsonText);
return json;
} finally {
is.close();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public JSONObject readJsonFromUrl() throws IOException, JSONException {\n\t\tInputStream inputStream = new URL(url).openStream();\n\t\ttry {\n\t\t\tBufferedReader bufferedReader = new BufferedReader(\n\t\t\t\t\tnew InputStreamReader(inputStream, Charset.forName(\"UTF-8\")));\n\t\t\tString jsonText = readAllBytes(bufferedReader);\n\t\t\tJSONObject jsonObject = new JSONObject(jsonText);\n\t\t\treturn jsonObject;\n\t\t} finally {\n\t\t\tinputStream.close();\n\t\t}\n\n\t}",
"private JSONObject readJsonFromUrl(String url) throws IOException, JSONException {\r\n\t\tInputStream is = new URL(url).openStream();\r\n\t\ttry {\r\n\t\t\tBufferedReader rd = new BufferedReader(new InputStreamReader(is, Charset.forName(\"UTF-8\")));\r\n\t\t\tString jsonText = readAll(rd);\r\n\t\t\tJSONObject json = new JSONObject(jsonText);\r\n\t\t\treturn json;\r\n\t\t} finally { //finally will always execute, if an try block exists. Doesnt matter if there is an Exception or not.\r\n\t\t\tis.close();\r\n\t\t}\r\n\t}",
"public JSONObject readJsonFromUrl(String url) throws IOException, JSONException {\n InputStream is = new URL(url).openStream();\n try {\n BufferedReader rd = new BufferedReader(new InputStreamReader(is, Charset.forName(\"UTF-8\")));\n String jsonText = readAll(rd);\n JSONObject json = new JSONObject(jsonText);\n return json;\n } finally {\n is.close();\n }\n }",
"@Nullable\n static public JSONObject readJson(final @NotNull String url) {\n\n StringBuilder builder = new StringBuilder();\n HttpClient client = new DefaultHttpClient();\n HttpGet httpGet = new HttpGet(url);\n JSONObject finalResult = null;\n try {\n HttpResponse response = client.execute(httpGet);\n StatusLine statusLine = response.getStatusLine();\n int statusCode = statusLine.getStatusCode();\n if (statusCode == 200) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(response.getEntity().getContent(), \"UTF-8\"));\n String line;\n while ((line = reader.readLine()) != null) {\n builder.append(line).append(\"\\n\");\n }\n finalResult = new JSONObject(new JSONTokener(builder.toString()));\n } else {\n Logger.e(TAG, \"Failed to download status file.\");\n }\n } catch (JSONException e) {\n Logger.e(TAG, e.getMessage());\n } catch (ClientProtocolException e) {\n Logger.e(TAG, e.getMessage());\n } catch (IOException e) {\n Logger.e(TAG, e.getMessage());\n }\n return finalResult;\n }",
"public JSONObject getJSONFromUrl(String url) {\n\n\t\t// Making HTTP request\n\t\ttry {\n\t\t\t// defaultHttpClient\n\t\t\tDefaultHttpClient httpClient = new DefaultHttpClient();\n\t\t\tHttpPost httpPost = new HttpPost(url);\n\n\t\t\tHttpResponse httpResponse = httpClient.execute(httpPost);\n\t\t\tHttpEntity httpEntity = httpResponse.getEntity();\n\t\t\tis = httpEntity.getContent();\t\t\t\n\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ClientProtocolException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\t\tis, \"iso-8859-1\"), 8);\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString line = null;\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tsb.append(line + \"\\n\");\n\t\t\t}\n\t\t\tis.close();\n\t\t\tjson = sb.toString();\n\t\t} catch (Exception e) {\n\t\t\tLog.e(\"Buffer Error\", \"Error converting result \" + e.toString());\n\t\t}\n\n\t\t// try parse the string to a JSON object\n\t\ttry {\n\t\t\tjObj = new JSONObject(json);\n\t\t} catch (JSONException e) {\n\t\t\tLog.e(\"JSON Parser\", \"Error parsing data \" + e.toString());\n\t\t}\n\n\t\t// return JSON String\n\t\treturn jObj;\n\n\t}",
"protected JSONObject getJSONObject(String url) throws IOException, JSONException {\n Log.d(this.TAG, \"Loading JSON Object: \" + url);\n return new JSONObject(this.fetchJSON(url));\n }",
"private JSONObject getJSONFromUrl(String url) {\n\t\tInputStream inputStream = null;\n\t\tString jsonString = \"\";\n\t\tJSONObject jsonObject = null;\n\t\tboolean sendMessageError = false;\n\t\t\n\t\ttry {\n DefaultHttpClient httpClient = new DefaultHttpClient();\n HttpPost httpPost = new HttpPost(url);\n\n HttpResponse httpResponse = httpClient.execute(httpPost);\n HttpEntity httpEntity = httpResponse.getEntity();\n inputStream = httpEntity.getContent();\n\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n sendMessageError = true;\n } catch (ClientProtocolException e) {\n e.printStackTrace();\n sendMessageError = true;\n } catch (IOException e) {\n e.printStackTrace();\n sendMessageError = true;\n }\n\t\t\n\t\ttry {\n BufferedReader reader = new BufferedReader(new InputStreamReader(\n \t\tinputStream, \"iso-8859-1\"), 8);\n StringBuilder stringbuilder = new StringBuilder();\n String line = null;\n while ((line = reader.readLine()) != null) {\n \tstringbuilder.append(line + \"\\n\");\n }\n jsonString = stringbuilder.toString();\n } catch (Exception e) {\n \te.printStackTrace();\n \tsendMessageError = true;\n }\n\t\t\n\t\ttry {\n\t\t\tinputStream.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tsendMessageError = true;\n\t\t}\n\n\t\ttry {\n\t\t\tjsonObject = new JSONObject(jsonString);\n } catch (Exception e) {\n \te.printStackTrace();\n \tsendMessageError = true;\n }\n\t\t\n\t\tif (sendMessageError)\n\t\t\tsendMessageToObservers(new MessageErrorOccurred());\n\t\t\n\t\treturn jsonObject;\n\t}",
"public static JsonNode get(String url) {\n try {\n URL u = new URL(url);\n HttpURLConnection c = (HttpURLConnection) u.openConnection();\n c.setRequestMethod(\"GET\");\n c.setRequestProperty(\"Content-length\", \"0\");\n c.setUseCaches(false);\n c.setAllowUserInteraction(false);\n c.connect();\n int status = c.getResponseCode();\n switch (status) {\n case 200:\n case 201:\n BufferedReader br = new BufferedReader(new InputStreamReader(c.getInputStream()));\n StringBuilder sb = new StringBuilder();\n String line;\n while ((line = br.readLine()) != null) {\n sb.append(line+\"\\n\");\n }\n br.close();\n return Json.parse(sb.toString());\n }\n\n } catch (MalformedURLException e) {\n Logger.error(e.getMessage());\n e.printStackTrace();\n } catch (IOException e) {\n Logger.error(e.getMessage());\n e.printStackTrace();\n }\n return null;\n }",
"public static String getJSON(String url){\n \t\t\n \t\tStringBuilder builder = new StringBuilder();\n \t HttpClient client = new DefaultHttpClient();\n \t HttpGet httpGet = new HttpGet(url);\n \t try {\n \t HttpResponse response = client.execute(httpGet);\n \t HttpEntity entity = response.getEntity();\n \t InputStream content = entity.getContent();\n \t BufferedReader reader = new BufferedReader(new InputStreamReader(content));\n \t \n \t String line;\n \t while ((line = reader.readLine()) != null) {\n \t builder.append(line);\n \t }\n \t } catch (Exception e) {}\n \t\t\n \t\treturn builder.toString(); \n \t}",
"public static String downloadJSON(String url) {\n String json=null, line;\n\n InputStream stream = getHttpConnection(url);\n if (stream != null) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(stream));\n StringBuilder out = new StringBuilder();\n try {\n while ((line = reader.readLine()) != null) {\n out.append(line);\n }\n reader.close();\n json = out.toString();\n } catch (IOException ex) {\n Log.d(\"MyDebugMsg\", \"IOException in downloadJSON()\");\n ex.printStackTrace();\n }\n }\n return json;\n }",
"@Nullable\n protected JSONObject fetchObjectForURL(URL url) throws IOException, JSONException {\n HttpURLConnection conn = getConnection(url);\n BufferedReader in = null;\n if (conn == null) return null;\n try {\n in = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n StringBuilder buffer = new StringBuilder();\n String line;\n while ((line = in.readLine()) != null) {\n buffer.append(line);\n }\n return new JSONObject(buffer.toString());\n } finally {\n if (in != null) try { in.close(); } catch (IOException ex) {\n Log.e(\"aqx1010\", \"can not close input stream\", ex);\n }\n }\n\n }",
"public static JsonResult getJson(final String url)\r\n {\r\n return getJson(url, new JsonResult());\r\n }",
"String getJsonData(String urlString) throws IOException\n\t{\n\t\tBufferedReader reader = null;\n\t\ttry\n\t\t{\n\t\t\t// Create URL\n\t\t\tURL url = new URL(urlString);\n\t\t\t// Create URL stream\n\t\t\treader = new BufferedReader(new InputStreamReader(url.openStream()));\n\t\t\tStringBuffer buffer = new StringBuffer();\n\n\t\t\tint read;\n\n\t\t\tchar[] chars = new char[1024];\n\n\t\t\t// Copies individual characters into buffer until there aren't anymore to read.\n\t\t\twhile ((read = reader.read(chars)) != -1)\n\t\t\t\tbuffer.append(chars, 0, read);\n\n\t\t\treturn buffer.toString();\n\t\t}\n\t\tcatch (Exception ex)\n\t\t{\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\t// Close the stream\n\t\t\tif (reader != null)\n\t\t\t\treader.close();\n\t\t}\n\n\t\treturn null;\n\t}",
"protected String fetchJSON(String requestedUrl) throws IOException {\n Log.d(this.TAG, \"Hitting URL \" + requestedUrl);\n URL url = new URL(requestedUrl);\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n /* TODO: Set connection headers (User-agent, etc) */\n\n int status = connection.getResponseCode();\n if (status != HttpURLConnection.HTTP_OK) {\n throw new IOException(\"Bad URL: \" + requestedUrl);\n }\n\n InputStream in = connection.getInputStream();\n BufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\n StringBuilder stringBuilder = new StringBuilder();\n String line;\n\n while ((line = reader.readLine()) != null) {\n stringBuilder.append(line);\n }\n\n connection.disconnect();\n return stringBuilder.toString();\n }",
"public JSONObject retrieve() throws IOException, JSONException {\n HTTPGetter getter = new HTTPGetter(url, TAG);\n InputStream in = getter.performRequest();\n if(in == null) return null;\n\n String jsonString = converter.getString(in);\n return new JSONObject(jsonString);\n }",
"public void downloadJSON(String url){\n //Build request for raw JSON data\n StringRequest jsonRequest = new StringRequest(Request.Method.GET, url, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n try {\n //When data is received, convert to JSONObject and try to parse\n jsonResponse = new JSONObject(response);\n parseJSON(jsonResponse);\n } catch (JSONException JSONE) {\n //Print error if there was one\n JSONE.printStackTrace();\n ErrorUtils.errorDialog(BookDetailsActivity.this, \"Data Error\", \"There was an error with the data format. Please try again later.\");\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n //Print error\n ErrorUtils.errorDialog(BookDetailsActivity.this, \"Could not connect to the server\", \"Could not connect to the server at this time, please try again later.\");\n }\n });\n //Start the JSON request\n queue.add(jsonRequest);\n }",
"private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n // If the URL is null, then return early.\n if (url == null) {\n return jsonResponse;\n }\n\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(10000 /* milliseconds */);\n urlConnection.setConnectTimeout(15000 /* milliseconds */);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // If the request was successful (response code 200),\n // then read the input stream and parse the response.\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error response code: \" + urlConnection.getResponseCode());\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problem retrieving the posts JSON results.\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n inputStream.close();\n }\n }\n\n\n return jsonResponse;\n }",
"@Override\n protected Void doInBackground(Void... arg0) {\n HttpURLConnection urlConnection = null;\n\n try {\n URL data = new URL(url);\n urlConnection = (HttpURLConnection) data.openConnection();\n\n int responseCode = urlConnection.getResponseCode();\n\n if (responseCode == HttpURLConnection.HTTP_OK) {\n\n readJsonStream(urlConnection.getInputStream());\n }\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n urlConnection.disconnect();\n return null;\n }",
"public static GitInfo readURL(BufferedReader url){\n\t\treturn (new Gson()).fromJson(url, GitInfo.class);\n\n\t}",
"public JSONArray getJSONFromUrl(String url) {\n HttpParams httpParameters = new BasicHttpParams();\n // Set the timeout in milliseconds until a connection is established.\n // The default value is zero, that means the timeout is not used.\n int timeoutConnection = 3000;\n HttpConnectionParams.setConnectionTimeout(httpParameters, timeoutConnection);\n // Set the default socket timeout (SO_TIMEOUT)\n // in milliseconds which is the timeout for waiting for data.\n int timeoutSocket = 5000;\n HttpConnectionParams.setSoTimeout(httpParameters, timeoutSocket);\n\n DefaultHttpClient httpclient = new DefaultHttpClient(httpParameters);\n HttpGet httpget = new HttpGet(url);\n\n // Depends on your web service\n httpget.setHeader(\"Content-type\", \"application/json\");\n InputStream inputStream = null;\n String result = null;\n try {\n HttpResponse response = httpclient.execute(httpget);\n HttpEntity entity = response.getEntity();\n\n inputStream = entity.getContent();\n BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, \"UTF-8\"), 8);\n StringBuilder sb = new StringBuilder();\n\n String line;\n while ((line = reader.readLine()) != null)\n {\n sb.append(line).append(\"\\n\");\n }\n result = sb.toString();\n\n } catch (Exception e) {\n // Oops\n Log.i(TAG,e.toString());\n Log.i(TAG,\"reader read line didn't work\");\n }\n finally {\n try{\n if(inputStream != null)inputStream.close();\n }\n catch(Exception squish){\n Log.i(TAG,squish.toString());\n Log.i(TAG,\"sqish! inputstream did not work!\");\n }\n }\n\n if(result == null){\n Log.i(TAG,\"result was NULL\");\n return null;\n }\n try {\n Log.i(TAG,\"WE fetched this data \"+result);\n\n // Send the url along with article data\n return new JSONArray(result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return null;\n\n }",
"private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n // if the url is null, return the response early;\n if (url == null) {\n return jsonResponse;\n }\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.setReadTimeout(10000 /* milliseconds */);\n urlConnection.setConnectTimeout(15000 /* milliseconds */);\n urlConnection.connect();\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error response code \" + urlConnection.getResponseCode());\n }\n\n } catch (IOException e) {\n // TODO: Handle the exception\n Log.e(LOG_TAG, \"Problem retrieving from the url\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n // function must handle java.io.IOException here\n inputStream.close();\n }\n }\n return jsonResponse;\n }",
"public static String getJSONFromAPI(String url){\n String retorno = \"\";\n try {\n URL apiEnd = new URL(url);\n int codigoResposta;\n HttpURLConnection conexao;\n InputStream is;\n\n conexao = (HttpURLConnection) apiEnd.openConnection();\n conexao.setRequestMethod(Common.METHOD_GET);\n conexao.setReadTimeout(15000);\n conexao.setConnectTimeout(15000);\n conexao.connect();\n\n codigoResposta = conexao.getResponseCode();\n if(codigoResposta < HttpURLConnection.HTTP_BAD_REQUEST){\n is = conexao.getInputStream();\n }else{\n is = conexao.getErrorStream();\n }\n\n retorno = converterInputStreamToString(is);\n is.close();\n conexao.disconnect();\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }catch (IOException e){\n e.printStackTrace();\n }\n\n return retorno;\n }",
"public static String getJsonByUrl(String url) {\r\n\r\n\t\tString json = null;\r\n\t\ttry {\r\n\t\t\tjson = encryptBeforegetHtml(url, 20);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tif (null == json || json.length() == 0) {\r\n\t\t\t\tjson = encryptBeforegetHtml(url, 20);\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn json;\r\n\t}",
"static String getResponseFromHttpUrl(URL url) throws IOException {\n String jsonReturn = \"\";\n HttpsURLConnection urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setConnectTimeout(CONNECTION_TIMEOUT); //connection is closed after 7 seconds\n\n try {\n InputStream inputStream = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(inputStream);\n scanner.useDelimiter(\"\\\\A\");\n\n if(!scanner.hasNext()){\n return null;\n }\n\n while(scanner.hasNext()){\n jsonReturn = jsonReturn.concat(scanner.next());\n }\n return jsonReturn;\n\n } catch (Exception e){\n e.printStackTrace();\n } finally {\n urlConnection.disconnect();\n }\n\n return null;\n }",
"private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n // If the URL is null, then return early.\n if (url == null) {\n return jsonResponse;\n }\n\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(10000 /* milliseconds */);\n urlConnection.setConnectTimeout(15000 /* milliseconds */);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // If the request was successful (response code 200),\n // then read the input stream and parse the response.\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error response code: \" + urlConnection.getResponseCode());\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problem retrieving the earthquake JSON results.\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n // Closing the input stream could throw an IOException, which is why\n // the makeHttpRequest(URL url) method signature specifies than an IOException\n // could be thrown.\n inputStream.close();\n }\n }\n return jsonResponse;\n }",
"public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }",
"private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n //Si la URL es null se devuelve inediatamente.\n if (url == null) {\n return jsonResponse;\n }\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(100000 /* Milisegundos.*/);\n urlConnection.setConnectTimeout(100000 /* Milisegundos.*/);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // Si la request se realiza correctamente (código de respuesta 200) se lee el input\n // stream y se le hace parse a la respuesta.\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error de conexión: \" + urlConnection.getResponseCode());\n }\n // Aquí simplemente hacemos catch a la IOException.\n\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problema obteniendo los datos en JSON del servidor\", e);\n // Independientemente de que se lance una exception o no en el bloque finally se realiza\n // una desconexión (o se \"cierra\" como en el caso del inputStream) para poder reusarlo.\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n inputStream.close();\n }\n }\n // Se devuelve como resultado el JsonResponse que albergará la String inputStream.\n return jsonResponse;\n }",
"public void loadJson(){\n new DownloadJsonTask().execute(URL3);\n// new DownloadJsonTask().execute(URL2);\n }",
"private void loadFromURL(String url) throws IOException {\n URL destination = new URL(url);\r\n URLConnection conn = destination.openConnection();\r\n Reader r = new InputStreamReader(conn.getInputStream());\r\n load(r);\r\n }",
"public String getJSON(String address){\n \t\n \tStringBuilder builder = new StringBuilder();\n \tHttpClient client = new DefaultHttpClient();\n \tHttpGet httpGet = new HttpGet(address);\n \ttry{\n \t\tHttpResponse response = client.execute(httpGet);\n \t\tStatusLine statusLine = response.getStatusLine();\n \t\tint statusCode = statusLine.getStatusCode();\n \t\tif(statusCode == 200){\n \t\t\tHttpEntity entity = response.getEntity();\n \t\t\tInputStream content = entity.getContent();\n \t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(content));\n \t\t\tString line;\n \t\t\twhile((line = reader.readLine()) != null){\n \t\t\t\tbuilder.append(line);\n \t\t\t}\n \t\t} else {\n \t\t\tLog.e(\"ShyHi\",\"Failed to get JSON object\");\n \t\t}\n \t}catch(ClientProtocolException e){\n \t\te.printStackTrace();\n \t} catch (IOException e){\n \t\te.printStackTrace();\n \t}\n \treturn builder.toString();\n }",
"public JSONArray request(String url) throws IOException, JSONException {\r\n\r\n\t\t// request method is GET\r\n\t\tDefaultHttpClient httpClient = new DefaultHttpClient();\r\n\t\tHttpGet httpGet = new HttpGet(url);\r\n\r\n\t\tHttpResponse httpResponse = httpClient.execute(httpGet);\r\n\t\tHttpEntity httpEntity = httpResponse.getEntity();\r\n\t\tis = httpEntity.getContent();\r\n\r\n\t\ttry {\r\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\r\n\t\t\t\t\tis, \"iso-8859-1\"), 8);\r\n\t\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\tString line = null;\r\n\t\t\twhile ((line = reader.readLine()) != null) {\r\n\t\t\t\tsb.append(line + \"\\n\");\r\n\t\t\t}\r\n\t\t\tis.close();\r\n\t\t\tjson = sb.toString();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLog.e(\"Buffer Error\", \"Error converting result \" + e.toString());\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tjArr = new JSONArray(json);\r\n\t\t} catch (JSONException e) {\r\n\t\t\tLog.e(\"JSON Parser\", \"Error parsing data \" + e.toString());\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\t// return JSON String\r\n\t\treturn jArr;\r\n\r\n\t}",
"protected JSONObject doInBackground(String...url){\n String MYURL = \" http://thevisitapp.com/api/destinations/read?identifiers=10011\";\n\n HttpRequest request = new HttpRequest();\n return request.getJSONFromUrl(MYURL);\n }",
"private String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.setReadTimeout(10000 /* milliseconds */);\n urlConnection.setConnectTimeout(15000 /* milliseconds */);\n urlConnection.connect();\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n return jsonResponse;\n }\n\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problem Http Request\", e);\n } catch (Exception e) {\n Log.e(LOG_TAG, \"Problem Http Request\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n // function must handle java.io.IOException here\n inputStream.close();\n }\n }\n return jsonResponse;\n }",
"public String[] readJson(String url) {\n InputStream is = null;\n String[] strArray ={\"\"} ;\n try {\n is = NetworkUtils.OpenHttpConnection(url, this);\n //leitura\n streamReader = new BufferedReader(new InputStreamReader(is, \"UTF-8\"));\n jsonStrBuilder = new StringBuilder();\n Log.i(\"1° aqui\", \"ok\");\n String inputStr;\n //add ao StringBuilder\n while ((inputStr = streamReader.readLine()) != null) {\n jsonStrBuilder.append(inputStr);\n Log.i(\"@@@JSON :\", jsonStrBuilder.toString());\n }\n //transformado em JSONObject\n// JSONObject jObj = new JSONObject(jsonStrBuilder.toString());\n//\n// JSONArray jArray = jObj.getJSONArray(\"tasks\");\n// strArray = new String[jArray.length()];\n\n// for(int i = 0; i < jArray.length(); i++){\n// JSONObject jObject = jArray.getJSONObject(i);\n// strArray[i] = jObject.getString(\"title\");\n// }\n strArray[0] = jsonStrBuilder.toString();\n\n Log.i(\"@@@strArray :\", strArray.toString());\n }catch(IOException ie){\n Log.i(\"readJson\", ie.getLocalizedMessage());\n }\n\n return strArray;\n }",
"private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n // If the URL is null, then return early.\n if (url == null) {\n return jsonResponse;\n }\n\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(10000);\n urlConnection.setConnectTimeout(15000);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // If the request was successful (response code 200),\n // then read the input stream and parse the response.\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error response code: \" + urlConnection.getResponseCode());\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problem retrieving the Guardian JSON results.\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n inputStream.close();\n }\n }\n return jsonResponse;\n }",
"private String readUrl(String nearbySearchUrl) throws Exception {\n\n String data = \"\";\n InputStream inputStream = null;\n HttpURLConnection urlConnection = null;\n\n // read JSON line by line and store in a string\n\n try {\n\n URL url = new URL(nearbySearchUrl);\n\n Log.d(TAG, \"readUrl: \" + url);\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.connect();\n\n\n inputStream = urlConnection.getInputStream();\n BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));\n StringBuffer stringBuffer = new StringBuffer();\n\n String line = \"\";\n while ((line = reader.readLine()) != null)\n stringBuffer.append(line);\n\n\n data = stringBuffer.toString();\n reader.close();\n\n } catch (MalformedURLException e) {\n Log.d(TAG, \"readUrl: malformedURLException\");\n e.printStackTrace();\n } catch (IOException e) {\n Log.d(TAG, \"readUrl: IOException\");\n e.printStackTrace();\n } finally {\n\n // if there is an exception we must close the connections and input stream\n inputStream.close();\n urlConnection.disconnect();\n }\n\n Log.d(TAG, \"readUrl: \" + data);\n return data;\n\n }",
"private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n // if url null, return\n if(url == null) {\n return jsonResponse;\n }\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection= (HttpURLConnection)url.openConnection();\n urlConnection.setReadTimeout(10000/*milliseconds*/);\n urlConnection.setConnectTimeout(15000/*milliseconds*/);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n Log.v(LOG_TAG,\"Network request made\");\n\n // if the request was successful(response code 200)\n //then read the input stream and parse the output\n if(urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n }\n else{\n Log.e(LOG_TAG,\"Error Response code: \" + urlConnection.getResponseCode());\n }\n }\n catch (IOException e) {\n Log.e(LOG_TAG,\"Problem retrieving the earthquake JSON results\",e);\n }\n finally {\n if(urlConnection != null) {\n urlConnection.disconnect();\n }\n if(inputStream != null) {\n inputStream.close();\n }\n }\n return jsonResponse;\n }",
"public String loadListLatestItem(String url) throws IOException, JSONException {\n\t\tDefaultHttpClient httpClient = new DefaultHttpClient();\r\n\t\tHttpGet httpGet = new HttpGet(url);\r\n\r\n\t\tHttpResponse httpResponse = httpClient.execute(httpGet);\r\n\t\tHttpEntity httpEntity = httpResponse.getEntity();\r\n\t\tis = httpEntity.getContent();\r\n\r\n\t\ttry {\r\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\r\n\t\t\t\t\tis, \"iso-8859-1\"), 8);\r\n\t\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\tString line = null;\r\n\t\t\twhile ((line = reader.readLine()) != null) {\r\n\t\t\t\tsb.append(line + \"\\n\");\r\n\t\t\t}\r\n\t\t\tis.close();\r\n\t\t\tjson = sb.toString();\r\n\t\t} catch (Exception e) {\t\t\t\r\n\t\t\tLog.e(\"Buffer Error\", \"Error converting result \" + e.toString());\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// return JSON String\r\n\t\treturn json;\r\n\r\n\t}",
"public static String getUrlContentAsJsonString(String url) throws Exception {\n// HttpClient httpClient = new HttpClient();\n// httpClient.getParams().setSoTimeout(1500);\n// GetMethod gm = new GetMethod(url);\n// gm.setRequestHeader(\"accept\", \"application/json\"); // needed for spatial portal JSON web services\n// gm.setFollowRedirects(true);\n// httpClient.executeMethod(gm);\n// String content = gm.getResponseBodyAsString();\n\n HttpClient httpClient = new HttpClient();\n // DM: set this to HTTP/1.0\n httpClient.getParams().setParameter(\"http.protocol.version\", HttpVersion.HTTP_1_0);\n httpClient.getParams().setSoTimeout(10000);\n logger.debug(\"Retrieving the following URL: \" + url);\n GetMethod gm = new GetMethod(url);\n gm.setRequestHeader(\"Accept\", \"application/json\"); // needed for spatial portal JSON web services\n gm.setFollowRedirects(true);\n httpClient.executeMethod(gm);\n String responseString = gm.getResponseBodyAsString();\n if(logger.isDebugEnabled()){\n logger.debug(\"Response: \" + responseString);\n }\n return responseString;\n }",
"@Override\n\t\tprotected String doInBackground(String... url) {\n\t\t\tString output = \"\";\n\t\t\tHttpClient httpclient = new DefaultHttpClient();\n\t\t\tHttpResponse response;\n\t\t\ttry {\n\t\t\t\tresponse = httpclient.execute(new HttpGet(url[0]));\n\t\t\t\tStatusLine statusLine = response.getStatusLine();\n\t\t\t\tif (statusLine.getStatusCode() == HttpStatus.SC_OK) {\n\t\t\t\t\tByteArrayOutputStream out = new ByteArrayOutputStream();\n\t\t\t\t\tresponse.getEntity().writeTo(out);\n\t\t\t\t\tout.close();\n\t\t\t\t\toutput = out.toString();\n\t\t\t\t} else {\n\t\t\t\t\t// Close the connection\n\t\t\t\t\tresponse.getEntity().getContent().close();\n\t\t\t\t\tthrow new IOException(statusLine.getReasonPhrase());\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.e(\"GetJsonTask\",\n\t\t\t\t\t\t\"Could not get the data. This is the error message: \"\n\t\t\t\t\t\t\t\t+ e.getMessage());\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tjson = output;\n\t\t\treturn output;\n\t\t}",
"private static JSONArray getResponseFromHttpUrl(URL url) throws IOException {\n\n Log.d(TAG, \"sending GET http request\");\n\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(3000);\n urlConnection.setConnectTimeout(5000);\n String result = \"\";\n JSONArray ja = null;\n JSONObject jo = null;\n try {\n InputStream in = urlConnection.getInputStream();\n BufferedReader buffer = new BufferedReader(new InputStreamReader(in));\n String line = \"\";\n while (line != null) {\n line = buffer.readLine();\n result += line;\n }\n\n ja = new JSONArray(result);\n } catch (JSONException e) {\n try {\n jo = new JSONObject(result);\n } catch (JSONException eo) {\n eo.printStackTrace();\n }\n e.printStackTrace();\n } finally {\n urlConnection.disconnect();\n }\n\n if (jo != null) {\n ja = new JSONArray();\n ja.put(jo);\n }\n return ja;\n }",
"public static String leituraJSON(String urlItens) {\n\n BufferedReader reader;\n String line;\n StringBuilder responseContent = new StringBuilder();\n\n try {\n URL url = new URL(urlItens);\n conn = (HttpURLConnection) url.openConnection();\n\n //request setup\n conn.setRequestMethod(\"GET\");\n conn.setConnectTimeout(5000);\n conn.setReadTimeout(5000);\n\n int status = conn.getResponseCode();\n // Se o status for 200 == conexão feita com sucesso\n\n if (status > 299) {\n reader = new BufferedReader(new InputStreamReader(conn.getErrorStream()));\n } else {\n reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n }\n while ((line = reader.readLine()) != null) {\n responseContent.append(line);\n }\n reader.close(); // encerra o buffer\n\n } catch (IOException e) {\n } finally {\n conn.disconnect(); // fecha a conexão\n }\n\n return responseContent.toString();\n }",
"private static String makeHTTPRequest(URL url) throws IOException {\n\n // Create an empty json string\n String jsonResponse = \"\";\n\n //IF url is null, return early\n if (url == null) {\n return jsonResponse;\n }\n\n // Create an Http url connection, and an input stream, making both null for now\n HttpURLConnection connection = null;\n InputStream inputStream = null;\n\n try {\n\n // Try to open a connection on the url, request that we GET info from the connection,\n // Set read and connect timeouts, and connect\n connection = (HttpURLConnection) url.openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setReadTimeout(10000 /*Milliseconds*/);\n connection.setConnectTimeout(15000 /*Milliseconds*/);\n connection.connect();\n\n // If response code is 200 (aka, working), then get and read from the input stream\n if (connection.getResponseCode() == 200) {\n\n Log.v(LOG_TAG, \"Response code is 200: Aka, everything is working great\");\n inputStream = connection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n\n } else {\n // if response code is not 200, Log error message\n Log.v(LOG_TAG, \"Error Response Code: \" + connection.getResponseCode());\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n Log.v(LOG_TAG, \"Error making http request: \" + e);\n } finally {\n // If connection and inputStream are NOT null, close and disconnect them\n if (connection != null) {\n connection.disconnect();\n }\n\n if (inputStream != null) {\n // Closing the input stream could throw an IOException, which is why\n // the makeHttpRequest(URL url) method signature specifies that an IOException\n // could be thrown.\n inputStream.close();\n }\n }\n\n return jsonResponse;\n }",
"public static void readFromUrl(URL url) {\n try {\n BufferedReader in = new BufferedReader(\n new InputStreamReader(\n url.openStream()));\n\n String inputLine;\n\n while ((inputLine = in.readLine()) != null) {\n System.out.println(inputLine);\n }\n\n in.close();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }",
"private void downloadJSON() {\n new downloadJsonAsync().execute(Urls.GET_TAGS, Urls.GET_REST);\n }",
"public DtResponse readInfoGralJsonStream(InputStream in) throws IOException {\n InputStreamReader isReader = new InputStreamReader(in);\n //Creating a BufferedReader object\n BufferedReader breader = new BufferedReader(isReader);\n StringBuffer sb = new StringBuffer();\n String str;\n while((str = breader.readLine())!= null){\n sb.append(str);\n }\n Log.i(TAG, sb.toString());\n JsonReader reader = new JsonReader(new StringReader(sb.toString()));\n List<DtResponse> res = null;\n try {\n return readRESTMessage(reader);\n } finally {\n reader.close();\n }\n }",
"@Nullable\n private String getJSON(String url, int timeout) {\n HttpURLConnection c = null;\n try {\n URL u = new URL(url);\n c = (HttpURLConnection) u.openConnection();\n c.setRequestMethod(\"GET\");\n c.setRequestProperty(\"Content-length\", \"0\");\n c.setUseCaches(false);\n c.setAllowUserInteraction(false);\n c.setConnectTimeout(timeout);\n c.setReadTimeout(timeout);\n c.connect();\n int status = c.getResponseCode();\n\n switch (status) {\n case 200:\n case 201:\n BufferedReader br = new BufferedReader(new InputStreamReader(c.getInputStream()));\n StringBuilder sb = new StringBuilder();\n String line;\n while ((line = br.readLine()) != null) {\n sb.append(line);\n sb.append(\"\\n\");\n }\n br.close();\n return sb.toString();\n }\n\n } catch (MalformedURLException ex) {\n Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);\n } finally {\n if (c != null) {\n try {\n c.disconnect();\n } catch (Exception ex) {\n Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex);\n }\n }\n }\n return null;\n }",
"public static String getHTTP(String urlToRead) throws Exception {\n // reference: https://stackoverflow.com/questions/34691175/how-to-send-httprequest-and-get-json-response-in-android/34691486\n HttpClient httpclient = new DefaultHttpClient();\n HttpGet httpget = new HttpGet(urlToRead);\n\n HttpResponse response = httpclient.execute(httpget);\n\n if (response.getStatusLine().getStatusCode() == 200) {\n String server_response = EntityUtils.toString(response.getEntity());\n return server_response;\n } else {\n System.out.println(\"no response from server\");\n }\n return \"\";\n }",
"public void read(final URL url) throws IOException, DataFormatException {\r\n\r\n final URLConnection connection = url.openConnection();\r\n final int fileSize = connection.getContentLength();\r\n\r\n if (fileSize < 0) {\r\n throw new FileNotFoundException(url.getFile());\r\n }\r\n\r\n final String mimeType = connection.getContentType();\r\n decoder = SoundRegistry.getSoundProvider(mimeType);\r\n\r\n if (decoder == null) {\r\n throw new DataFormatException(\"Unsupported format\");\r\n }\r\n\r\n decoder.read(url.openStream());\r\n }",
"JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }",
"private static String makeHttpRequest(URL url) throws IOException {\n String JSONResponse = null;\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(Constants.URL_REQUEST_METHOD);\n urlConnection.setReadTimeout(Constants.URL_READ_TIME_OUT);\n urlConnection.setConnectTimeout(Constants.URL_CONNECT_TIME_OUT);\n urlConnection.connect();\n\n if (urlConnection.getResponseCode() == Constants.URL_SUCCESS_RESPONSE_CODE) {\n inputStream = urlConnection.getInputStream();\n JSONResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Response code : \" + urlConnection.getResponseCode());\n // If received any other code(i.e 400) return null JSON response\n JSONResponse = null;\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Error Solving JSON response : makeHttpConnection() block\");\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n inputStream.close();\n // Input stream throws IOException when trying to close, that why method signature\n // specify about IOException\n }\n }\n return JSONResponse;\n }",
"@Override\n protected String doInBackground(String... params) {\n\n String uri = params[0];\n\n BufferedReader bufferedReader = null;\n try {\n URL url = new URL(uri);\n HttpURLConnection con = (HttpURLConnection) url.openConnection();//creating connection\n StringBuilder sb = new StringBuilder();\n\n bufferedReader = new BufferedReader(new InputStreamReader(con.getInputStream()));// getting the json string\n\n String json;\n json = bufferedReader.readLine();\n\n return json.trim(); //returning the json string\n\n }catch(Exception e){\n return null;\n }\n\n }",
"public Reader openHttp2Reader(URL url) throws IOException {\r\n return new InputStreamReader(openHttpEntity(url).getContent());\r\n }",
"public void processUrl() {\n try {\n\n JsonNode rootNode = getJsonRootNode(getJsonFromURL()); // todo: pass url in this method (to support multi-urls)\n getValuesFromJsonNodes(rootNode);\n setAndFormatValues();\n\n } catch (Exception e) {\n System.out.println(\"ERROR: caught error in processUrl()\");\n e.printStackTrace();\n }\n }",
"public java.io.Reader getReader (URL url) throws java.io.IOException;",
"private static JsonObject readJSON(String path) {\n\n\t\tString fileContents = \"\";\n\t\tBufferedReader reader = null;\n\n\t\ttry {\n\t\t\treader = new BufferedReader(new FileReader(path));\n\t\t} catch (FileNotFoundException e) {\n\t\t\tfail(ErrorMessage.inputFileNotFoundError);\n\t\t}\n\n\t\tString line;\n\n\t\ttry {\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tfileContents += line;\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tfail(ErrorMessage.readFileError);\n\t\t}\n\n\t\ttry {\n\t\t\treader.close();\n\t\t} catch (IOException e) {\n\t\t\tfail(ErrorMessage.closeFileError);\n\t\t}\n\n\t\tJsonObject jsonLicense = Json.createReader(new StringReader(fileContents)).readObject();\n\n\t\treturn jsonLicense;\n\t}",
"public JSONObject getJson(String url, Map<String, String> params){\n\t\tInputStream in = null;\n\t\tJSONObject json = null;\n\t\tif(params == null){\n\t\t\tin = doGet(url);\n\t\t}else{\n\t\t\tin = doPost(url, params);\n\t\t}\n\t\tif(in == null){\n\t\t\tjson = ConvertUtil.convert2Json(\"0x10\", \"connect failed\");\n\t\t\treturn json;\n\t\t}\n\t\tString jsonStr = ConvertUtil.convertStream2String(in);\n\t\ttry {\n\t\t\tjson = new JSONObject(jsonStr);\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tjson = ConvertUtil.convert2Json(\"0x11\", \"build json error\");\n\t\t}\n\t\treturn json;\n\t}",
"public void loadFromSource(Object aSrc)\n{\n WebURL url = WebURL.getURL(aSrc);\n String jsonText = url.getText();\n loadFromString(jsonText);\n}",
"public Integer loadJSONFile()\n {\n JSONParser parser = new JSONParser();\n try{\n\n Object obj = parser.parse(new FileReader(\"/Users/rnuka/Desktop/sample.json\"));\n JSONObject jsonObj = (JSONObject)obj;\n\n Long age = (Long)jsonObj.get(\"age\");\n System.out.println(\"age:\"+age);\n\n String name = (String)jsonObj.get(\"name\");\n System.out.println(\"name:\" + name);\n\n JSONArray address = (JSONArray)jsonObj.get(\"address\");\n\n for(Object str : address){\n System.out.println(str);\n }\n\n\n\n }catch(Exception e){\n e.printStackTrace();\n }\n return 1;\n }",
"private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }",
"String getJSON();",
"public native Object load( String url, OnJSONLoadCallback onLoad);",
"@Override\n\tpublic String getJsonString(String queryURL) {\n\t\t\n\t\tURL url = null;\n\t\t\n\t\tHttpURLConnection httpConn = null;\n\t\t\n\t\ttry {\n\t\t\turl = new URL(queryURL);\n\t\t\t\n\t\t\thttpConn = (HttpURLConnection) url.openConnection();\n\t\t\t\n\t\t\thttpConn.setRequestMethod(\"GET\");\n\t\t\thttpConn.setRequestProperty(\"X-Naver-Client-Id\", NaverSecret.NAVER_CLIENT_ID);\n\t\t\thttpConn.setRequestProperty(\"X-Naver-Client-Secret\", NaverSecret.NAVER_CLIENT_SECRET);\n\t\t\t\n\t\t\tint httpStatusCode = httpConn.getResponseCode();\n\t\t\t\n\t\t\tInputStreamReader is = null;\n\t\t\t\n\t\t\tif(httpStatusCode == 200) {\n\t\t\t\tis = new InputStreamReader(httpConn.getInputStream());\n\t\t\t} else {\n\t\t\t\tis = new InputStreamReader(httpConn.getErrorStream());\n\t\t\t}\n\t\t\t\n\t\t\tBufferedReader buffer = null;\n\t\t\tbuffer = new BufferedReader(is);\n\t\t\t\n\t\t\tStringBuffer sBuffer = new StringBuffer();\n\t\t\t\n\t\t\twhile(true) {\n\t\t\t\tString reader = buffer.readLine();\n\t\t\t\tif(reader == null) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tsBuffer.append(reader);\n\t\t\t}\n\t\t\tlog.debug(\"확인 sBuffer : \" + sBuffer);\n\t\t\treturn sBuffer.toString();\n\t\t\t\n\t\t\t\n\t\t} catch (MalformedURLException 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\t\n\t\treturn null;\n\t}",
"public static JSONObject getJSONFromUrl(String url, List<NameValuePair> parametros){\n InputStream inputStream = null;\n\n HttpParams httpParams = new BasicHttpParams();\n\n HttpConnectionParams.setConnectionTimeout(httpParams, 15000);\n HttpConnectionParams.setSoTimeout(httpParams, 15000);\n\n HttpClient httpClient = new DefaultHttpClient(httpParams);\n HttpPost httpPost = new HttpPost(url);\n\n Log.d(JSONParser.class.getCanonicalName(),url + \" \" + parametros.toString());\n\n try {\n httpPost.setEntity(new UrlEncodedFormEntity(parametros));\n HttpResponse httpRes = httpClient.execute(httpPost);\n inputStream = httpRes.getEntity().getContent();\n } catch (Exception e) {\n e.printStackTrace();\n }\n /*\n * Parsear respuesta del servidor\n */\n BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));\n StringBuilder stringBuilder = new StringBuilder();\n String line;\n\n try {\n while((line=reader.readLine())!=null){\n stringBuilder.append(line);\n }\n inputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n JSONObject json = null;\n try {\n json = new JSONObject(stringBuilder.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return json;\n }",
"public static String leerJSONDesdeUrl(String urlALeer) {\n URL url = null;\n StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();\n StrictMode.setThreadPolicy(policy);\n BufferedReader br_delaurl = null;\n String todo = \"\";\n try {\n url = new URL(urlALeer);\n br_delaurl = new BufferedReader(new InputStreamReader(url.openStream()));\n String linea;\n while ((linea = br_delaurl.readLine()) != null) {\n todo += linea;\n }\n } catch (Exception e) {\n e.printStackTrace();\n todo = null;\n } finally {\n if (br_delaurl != null) {\n try {\n br_delaurl.close();\n } catch (IOException e) {\n e.printStackTrace();\n todo = null;\n }\n }\n return todo;\n }\n }",
"public static Books readJSON(){\n Gson gson = new GsonBuilder().create();\n Books books = new Books();\n try {\n books = gson.fromJson(new JsonReader(new FileReader(\"books.json\")), Books.class);\n } catch (IOException e){\n e.printStackTrace();\n }\n return books;\n }",
"public static final <T extends JsonResult> T getJson(final String url, final T json)\r\n {\r\n HttpSimpleResponse response = getHttpFetcher().fetch(url);\r\n String httpResponse = response.getResponse();\r\n\r\n json.setHttpResponse(response);\r\n\r\n if (httpResponse.length() > 0)\r\n {\r\n if (httpResponse.startsWith(\"[\"))\r\n {\r\n try\r\n {\r\n json.setJsonArray(new JSONArray(httpResponse));\r\n }\r\n catch (final JSONException e)\r\n {\r\n Log.e(TAG, \"Could not convert to JSON array.\", e);\r\n }\r\n }\r\n else if (httpResponse.startsWith(\"{\"))\r\n {\r\n try\r\n {\r\n json.setJsonObject(new JSONObject(httpResponse));\r\n }\r\n catch (final JSONException e)\r\n {\r\n Log.e(TAG, \"Could not convert to JSON object.\", e);\r\n }\r\n }\r\n else if (httpResponse.startsWith(\"\\\"\"))\r\n {\r\n if (httpResponse.endsWith(\"\\\"\"))\r\n {\r\n json.setJsonString(httpResponse.subSequence(1, httpResponse.length() - 1).toString());\r\n }\r\n }\r\n }\r\n\r\n return json;\r\n }",
"public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != null) {\n \t sb.append(line);\n }\n reader.close();\n return new JSONObject(sb.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }",
"@Test\r\n public void testParseConnection() throws MalformedURLException {\r\n JsonArray array = null;\r\n JsonParser parser = new JsonParser();\r\n URL url = new URL(\"https://en.wikipedia.org/w/api.php?action=query&format=json&prop=revisions&titles=\\\" + \\\"Ball State\\\" + \\\"&rvprop=timestamp|user&rvlimit=24&redirects\");\r\n InputStream inputstream = getClass().getClassLoader().getResourceAsStream(\"sample.json\");\r\n assert inputstream != null;\r\n Reader reader = new InputStreamReader(inputstream);\r\n JsonElement rootElement = parser.parse(reader);\r\n JsonObject rootObject = rootElement.getAsJsonObject();\r\n JsonObject pages = rootObject.getAsJsonObject(\"query\").getAsJsonObject(\"pages\");\r\n for (Map.Entry<String, JsonElement> entry : pages.entrySet()) {\r\n JsonObject entryObject = entry.getValue().getAsJsonObject();\r\n array = entryObject.getAsJsonArray(\"revisions\");\r\n }\r\n System.out.println(array);\r\n System.out.println(url);\r\n }",
"public static String readFromUrl(String url) throws IOException\n {\n InputStream is = new URL(url).openStream();\n\n StringBuilder sb = null;\n\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(is, \"UTF-8\"));\n\n String line;\n while ((line = br.readLine()) != null)\n {\n if (sb == null)\n sb = new StringBuilder();\n\n sb.append(line);\n }\n\n return sb.toString();\n\n } finally {\n is.close();\n }\n }",
"public static JSONObject getJSON(String append) {\n try {\n URL url = new URL(BASE_URL + append);\n BufferedReader reader = null;\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n connection.setRequestMethod(\"GET\");\n connection.connect();\n\n InputStream stream = connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(stream);\n reader = new BufferedReader(inputStreamReader);\n\n StringBuffer buffer = new StringBuffer();\n\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n buffer.append(line);\n }\n\n String json = buffer.toString();\n return new JSONObject(json);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }",
"public void retrieveData(){\n\t\tloaderImage.loadingStart();\n\t\tJsonClient js = new JsonClient();\n\t\tjs.retrieveData(JSON_URL, this);\n\t}",
"public static String postHTTPJson(String urlToRead, JSONObject jsonToPost) throws IOException {\n //reference: https://stackoverflow.com/a/19912858\n HttpClient httpclient = new DefaultHttpClient();\n HttpPost httpPost = new HttpPost(urlToRead);\n\n httpPost.addHeader(\"content-type\", \"application/json\");\n StringEntity params = new StringEntity(jsonToPost.toString());\n httpPost.setEntity(params);\n HttpResponse response = httpclient.execute(httpPost);\n\n if (response.getStatusLine().getStatusCode() == 200) {\n String server_response = EntityUtils.toString(response.getEntity());\n return server_response;\n } else {\n throw new Resources.NotFoundException();\n }\n }",
"public JSONObject LoadJson(String filename) {\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\t\tnew FileInputStream(filename), \"UTF-8\"));\n\t\t\tStringBuffer buffer = new StringBuffer(1024);\n\t\t\tString line;\n\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tbuffer.append(line);\n\t\t\t}\n\t\t\treader.close();\n\n\t\t\treturn new JSONObject(buffer.toString());\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.format(\"[Error]Failed to open file %s!\", filename);\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (JSONException e) {\n\t\t\tSystem.err.format(\"[Error]Failed to parse json file %s!\", filename);\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}",
"static String getResponseFromHttpUrl(URL url) throws IOException {\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n try {\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n\n boolean hasInput = scanner.hasNext();\n String response = null;\n if (hasInput) {\n response = scanner.next();\n }\n scanner.close();\n return response;\n } finally {\n urlConnection.disconnect();\n }\n }",
"private Object readJSON() throws JSONException\n {\n switch(read(3))\n {\n case zipObject:\n return readObject();\n case zipArrayString:\n return readArray(true);\n case zipArrayValue:\n return readArray(false);\n case zipEmptyObject:\n return new JSONObject();\n case zipEmptyArray:\n return new JSONArray();\n case zipTrue:\n return Boolean.TRUE;\n case zipFalse:\n return Boolean.FALSE;\n default:\n return JSONObject.NULL;\n }\n }",
"private JsonObject loadJSONFile(String jsonFilePath) throws IOException {\r\n\tInputStream is = new FileInputStream(jsonFilePath);\r\n\tJsonReader jsonReader = Json.createReader(is);\r\n\tJsonObject json = jsonReader.readObject();\r\n\tjsonReader.close();\r\n\tis.close();\r\n\treturn json;\r\n }",
"public void GetCall(String url) throws ClientProtocolException, IOException {\n\t\tCloseableHttpClient httpclient=HttpClients.createDefault();\n\t\tHttpGet httpget=new HttpGet(url);\n\t//lohith\n\t\tCloseableHttpResponse closeablehttpresponse=httpclient.execute(httpget);\n\t\tint responsestatuscode=closeablehttpresponse.getStatusLine().getStatusCode();\n\t\tSystem.out.println(\"responsestatuscode: \"+responsestatuscode);\n\t\t\n\t\tString response=EntityUtils.toString(closeablehttpresponse.getEntity(),\"UTF-8\");\n\t\tSystem.out.println(\"ClientResponse: \"+response);\n\t\tJSONObject jsonobject= new JSONObject(response);\n\t\t\n\t\tSystem.out.println(\"jsonobject: \"+jsonobject);\n\t\t\n\t\t\n\t}",
"private JSONObject readJSONFile(Path path) throws ExtensionManagementException {\n\n if (Files.exists(path) && Files.isRegularFile(path)) {\n try {\n String jsonString = FileUtils.readFileToString(path.toFile(), UTF8);\n return new JSONObject(jsonString);\n } catch (JSONException e) {\n throw new ExtensionManagementException(\"Error while parsing JSON file: \" + path, e);\n } catch (IOException e) {\n throw new ExtensionManagementException(\"Error while reading JSON file: \" + path, e);\n }\n } else {\n throw new ExtensionManagementException(\"JSON file not found: \" + path);\n }\n }",
"public JsonParser createParser(URL url)\n/* */ throws IOException, JsonParseException\n/* */ {\n/* 782 */ IOContext ctxt = _createContext(url, true);\n/* 783 */ InputStream in = _optimizedStreamFromURL(url);\n/* 784 */ return _createParser(_decorate(in, ctxt), ctxt);\n/* */ }",
"public void accessWebService() {\n\r\n JsonReadTask task = new JsonReadTask();\r\n // passes values for the urls string array\r\n task.execute(new String[] { url });\r\n }",
"private static String makeHttpRequest(URL newsUrl) throws IOException{\n String jsonResponse = \"\";\n\n // If the URL is null, then return early.\n if (newsUrl == null) {\n //returns no data\n return jsonResponse;\n }\n\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n\n //Create the connection\n try {\n urlConnection = (HttpURLConnection) newsUrl.openConnection();\n urlConnection.setReadTimeout(10000 /* milliseconds */);\n urlConnection.setConnectTimeout(15000 /* milliseconds */);\n urlConnection.setRequestMethod(\"GET\");\n //Establish an HTTP connection with the server\n urlConnection.connect();\n\n //Test to see what response we get\n // If the request was successful (response code 200),\n // then read the input stream and parse the response.\n if (urlConnection.getResponseCode() == 200){\n //Valid connection\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(TAG, \"makeHttpRequest: Error Code: \" + urlConnection.getResponseCode());\n }\n } catch (IOException e){\n Log.e(TAG, \"makeHttpRequest: Problem retrieving the news JSON results\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null){\n // Closing the input stream could throw an IOException, which is why\n // the makeHttpRequest(URL url) method signature specifies than an IOException\n // could be thrown.\n inputStream.close();\n }\n }\n return jsonResponse;\n }",
"public String parseJSON(){\r\n String json = null;\r\n try{\r\n InputStream istream = context.getAssets().open(\"restaurantopeninghours.json\");\r\n int size = istream.available();\r\n byte[] buffer = new byte[size];\r\n istream.read(buffer);\r\n istream.close();\r\n json = new String(buffer, \"UTF-8\");\r\n }catch (IOException ex){\r\n ex.printStackTrace();\r\n return null;\r\n }\r\n return json;\r\n }",
"private String getResponseFromHttpUrl(URL url) throws IOException {\n HttpsURLConnection urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.addRequestProperty(\"Authorization\",\"Bearer JVNDXWXVDDQN2IJUJJY7NQXCPS23M7DX\");\n try{\n InputStream in = urlConnection.getInputStream();\n\n Scanner scanner = new Scanner(in);\n scanner.useDelimiter(\"\\\\A\");\n boolean hasInput = scanner.hasNext();\n if(hasInput){\n return scanner.next();\n }else{\n return null;\n }\n }finally {\n urlConnection.disconnect();\n }\n }",
"public void getJSON() throws JSONException {\n url = setUrl();\n System.out.println(\"after setAsyncUrl url = \" + url);\n OkHttpClient client = new OkHttpClient();\n Request request = new Request.Builder()\n .url(url)\n .build();\n client.newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n e.printStackTrace();\n }\n\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n if(response.isSuccessful()){\n jString = new String(response.body().string());\n if(V)System.out.println(\"jString = \" + jString);\n try {\n addSearchFragment(jString); // add retrieved search fragments to screen\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }\n });\n }",
"@Test\n\tpublic void readJSONFromFile() {\n\t\t\n\t\tJsonPath jsonFile = new JsonPath(new File (\"C:\\\\Users\\\\cmlzd\\\\Desktop\\\\employees.json\"));\n\t\t\n\t\tSystem.out.println(jsonFile.getString(\"items.email\"));\n\t\t\n\t\t\n\t}",
"private static BufferedReader newReader(URL url) throws IOException {\n return newReader(url.openConnection().getInputStream());\n }",
"private static JsonReader readJSONFromAsset(Context context) throws IOException {\n AssetManager assetManager = context.getAssets();\n JsonReader reader;\n try {\n reader = new JsonReader(new InputStreamReader(assetManager.open(\"questionlist.json\")));\n } finally {\n\n }\n return reader;\n }",
"private JsonObject postAsJson(URL url, String json) {\n // System.out.format(\"postAsJson URL: %s JSON: \\n%s\\n\", url.toString(), json);\n HttpsURLConnection urlConnection;\n InputStream inputStream = null;\n OutputStream outputStream = null;\n JsonObject jsonObject = null;\n try {\n urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setRequestProperty(\"Cache-Control\", \"no-cache\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setRequestProperty(\"User-Agent\", \"Jediverse CLI\");\n urlConnection.setUseCaches(false);\n urlConnection.setRequestMethod(Literals.POST.name());\n if (settingsJsonObject != null) {\n String authorization = String.format(\"Bearer %s\", Utils.getProperty(settingsJsonObject, Literals.access_token.name()));\n urlConnection.setRequestProperty(\"Authorization\", authorization);\n // System.out.format(\"Setting authorization header: %s\\n\", authorization);\n }\n if (json != null) {\n urlConnection.setRequestProperty(\"Content-type\", \"application/json; charset=UTF-8\");\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-length\", Integer.toString(json.length()));\n outputStream = urlConnection.getOutputStream();\n outputStream.write(json.getBytes());\n outputStream.flush();\n int responseCode = urlConnection.getResponseCode();\n System.out.format(\"Response code: %d\\n\", responseCode);\n }\n urlConnection.setInstanceFollowRedirects(true);\n inputStream = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(inputStream);\n jsonObject = gson.fromJson(isr, JsonObject.class);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n Utils.close(inputStream, outputStream);\n }\n return jsonObject;\n }",
"private String readContents(final URL url) throws IOException {\n \t\tfinal BufferedReader in =\n \t\t\tnew BufferedReader(new InputStreamReader(url.openStream()));\n \t\tfinal StringBuilder sb = new StringBuilder();\n \t\twhile (true) {\n \t\t\tfinal String line = in.readLine();\n \t\t\tif (line == null) break; // eof\n \t\t\tsb.append(line);\n \t\t}\n \t\tin.close();\n \t\treturn sb.toString();\n \t}",
"public JSONObject postJSONRequest(String url)throws Exception{\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\tString responseString = executeRequest(url);\n\t\tresponseJSON = parseJSONResponse(responseString);\n\t\t\n return responseJSON;\n\n\t}",
"private void parseJSON(String response)\n {\n try\n {\n // Using orj.json, get the file string and convert it to an object\n JSONObject object = (JSONObject) new JSONTokener(response).nextValue();\n\n // The Winnipeg Transit JSON results usually have nested values\n // We can identify the request by the first key of the first level\n\n // The method names() will retrieve an JSONArray with the key names\n JSONArray objectNames = object.names();\n\n // Retrieve the first key of the first level\n String firstKey = objectNames.getString(0);\n\n if (firstKey.equals(\"status\"))\n {\n parseStatus(object.getJSONObject(firstKey));\n }\n else if (firstKey.equals(\"stop-schedule\"))\n {\n parseStopSchedule(object.getJSONObject(firstKey));\n }\n }\n catch (JSONException e)\n {\n e.printStackTrace();\n }\n }",
"private void getJSONResponse(){\r\n String jsonResponse = null; //unparsed json response\r\n try { \r\n //URL\r\n URL url = new URL(\"\"\r\n + \"https://global.api.pvp.net/api/lol/static-data/\" + this.regionCode + \"/v1.2/champion?champData=image&api_key=\" + this.objLoLSearch.getApiKey());\r\n //retrieve JSON\r\n BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String strTemp = \"\";\r\n while (null != (strTemp = br.readLine())) {\r\n jsonResponse = strTemp;\r\n }\r\n //System.out.println(jsonResponse);\r\n parseJSONResponse(jsonResponse); //parse the json response into usable values\r\n \r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ProtocolException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }",
"private static JSONObject fileReader(String path) throws Exception{\r\n return (JSONObject) jsonParser.parse(new String(Files.readAllBytes(Paths.get(path))));\r\n }",
"public JSONObject URLGet(String link) throws JSONException {\r\n\t\t\r\n\t\tJSONObject json = null;\r\n\t\tif(isHttps(link))\r\n\t\t\tjson = HttpsGet(link);\r\n\t\telse\r\n\t\t\tjson = HttpGet(link);\r\n\t\treturn json;\r\n\t}",
"public PersonajeVO getPersonaje(String url) {\n\t\tGson gson = new Gson();\n\t\tHttpClient httpClient = new DefaultHttpClient();\n\t\tPersonajeVO data = new PersonajeVO();\n\t\t java.lang.reflect.Type aType = new TypeToken<PersonajeVO>()\n\t\t{}.getType();\n\t\t gson = new Gson();\n\t\t httpClient = WebServiceUtils.getHttpClient();\n\t\t try {\n\t\t HttpResponse response = httpClient.execute(new HttpGet(url));\n\t\t HttpEntity entity = response.getEntity();\n\t\t Reader reader = new InputStreamReader(entity.getContent());\n\t\t data = gson.fromJson(reader, aType);\n\t\t } catch (Exception e) {\n\t\t Log.i(\"json array\",\"While getting server response server generate error. \");\n\t\t }\n\t\t return data;\n\t}",
"<T> T readJson(FsPath path, Class<T> clazz);",
"public static String makeHTTPRequest(URL url, Context context) throws IOException {\n // If the url is empty, return early\n String jsonResponse = null;\n if (url == null) {\n return jsonResponse;\n }\n final Context mContext = context;\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(10000 /* milliseconds */);\n urlConnection.setConnectTimeout(15000 /* milliseconds */);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // If the request was successful, the response code should be 200. Read the input stream and\n // parse the response.\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromInputStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error response code: \" + urlConnection.getResponseCode());\n }\n } catch (IOException e) {\n //use a handler to create a toast on the UI thread\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(mContext, \"Error: Issue with fetching JSON results from Guardian API.\", Toast\n .LENGTH_SHORT)\n .show();\n }\n });\n\n Log.e(LOG_TAG, \"Error: Issue with fetching JSON results from Guardian API. \", e);\n } finally {\n // Close connection\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n // Close stream\n if (inputStream != null) {\n inputStream.close();\n }\n }\n return jsonResponse;\n }",
"public static void main(String args[]) {\n try {\n URL url = new URL(USGS_REQUEST_URL);\n HttpURLConnection con = (HttpURLConnection) url.openConnection();\n con.setRequestMethod(\"GET\");\n\n InputStream inputStream = con.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream, StandardCharsets.UTF_8);\n\n StringBuilder JSON_DATA = new StringBuilder();\n\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n\n while (true) {\n String line = bufferedReader.readLine();\n if(line == null)\n break;\n JSON_DATA.append(line);\n }\n\n System.out.println(JSON_DATA);\n con.disconnect();\n }\n catch (IOException ex) {\n ex.printStackTrace();\n }\n }",
"private void readFromJSON(String filename) {\n JSONParser parser = new JSONParser();\n\n try\n {\n Object obj = parser.parse(new FileReader(filename));\n JSONObject jsonObject = (JSONObject) obj;\n Menu drinks = getMenu(jsonObject, \"Drink\");\n Menu types = getMenu(jsonObject, \"Type\");\n Menu toppings = getMenu(jsonObject, \"Toppings\");\n Menu sizes = getMenu(jsonObject, \"Size\");\n menuMap.put(\"Drink\", drinks);\n menuMap.put(\"Size\", sizes);\n menuMap.put(\"Toppings\", toppings);\n menuMap.put(\"Type\", types);\n\n } catch (FileNotFoundException e) {\n System.out.println(\"Not found menu.json, exit now.\");\n System.exit(1);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n }"
] | [
"0.7982967",
"0.7951624",
"0.7691734",
"0.7146962",
"0.69775784",
"0.6936332",
"0.68937796",
"0.6852991",
"0.68010837",
"0.6781162",
"0.67742157",
"0.6577659",
"0.65726423",
"0.63617194",
"0.6321303",
"0.62915343",
"0.6269153",
"0.6257897",
"0.6245914",
"0.6174572",
"0.6164289",
"0.615025",
"0.6113423",
"0.6111124",
"0.6109245",
"0.60848206",
"0.6036488",
"0.6026619",
"0.60238636",
"0.6018978",
"0.60079825",
"0.59986836",
"0.59978265",
"0.5985416",
"0.5980104",
"0.5974302",
"0.59689796",
"0.5924338",
"0.5911999",
"0.59102243",
"0.58901036",
"0.5888032",
"0.5874385",
"0.5858594",
"0.5855092",
"0.5827",
"0.5821901",
"0.57866365",
"0.5776198",
"0.5751542",
"0.57299614",
"0.57256484",
"0.57073367",
"0.5700543",
"0.569208",
"0.56867063",
"0.56812334",
"0.56691116",
"0.5653821",
"0.5643162",
"0.5639836",
"0.5614683",
"0.5595979",
"0.5592524",
"0.557354",
"0.5571368",
"0.5561725",
"0.5542107",
"0.5522611",
"0.5520693",
"0.55006236",
"0.5449032",
"0.542823",
"0.5423848",
"0.5422893",
"0.5419655",
"0.54189026",
"0.5399067",
"0.53957695",
"0.53947705",
"0.53669333",
"0.53543717",
"0.53488743",
"0.53437364",
"0.5331135",
"0.531856",
"0.53175706",
"0.53167677",
"0.53114027",
"0.5303806",
"0.52998376",
"0.52991706",
"0.52965665",
"0.5291057",
"0.5288679",
"0.5281192",
"0.5275582",
"0.5264711",
"0.52610576",
"0.52592057"
] | 0.78956294 | 2 |
TODO Autogenerated method stub | public static void main(String[] args) {
Thread Th1 = new MyThreadPriority("First",1);
// actually we only need constructor
Thread Th2 = new MyThreadPriority("Second",5);
Thread Th3 = new MyThreadPriority("Third",10);
} | {
"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 |
60 inches forward Push Cap ball 53 right 60 inches forward 63 degrees right 20 inches forward read beacon color 4 inches forward press beacon | @Override
public void runOpMode() throws InterruptedException {
CommonAutonomous commonAutonomous = new CommonAutonomous(AllianceColor.BLUE, hardwareMap, this);
waitForStart();
commonAutonomous.wallPos1ToBeacon1();
commonAutonomous.pressBeacon();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void loop() {\n telemetry.addData(\"loop count:\", mLoopCount++);\n telemetry.addData(\"version: \", \"1.3\");\n\n int[] topScan;\n int[] middleScan;\n int[] bottomScan;\n\n // get most recent frame from camera (may be same as last time or null)\n CameraLib.CameraImage frame = mCamAcqFr.loop();\n\n // log debug info ...\n if (frame != null) {\n\n // process the current frame\n // ... \"move toward the light...\"\n\n // log data about the most current image to driver station every loop so it stays up long enough to read\n Camera.Size camSize = frame.cameraSize();\n telemetry.addData(\"preview camera size: \", String.valueOf(camSize.width) + \"x\" + String.valueOf(camSize.height));\n telemetry.addData(\"preview data size:\", frame.dataSize());\n telemetry.addData(\"preview rgb(center):\", String.format(\"%08X\", frame.getPixel(camSize.width / 2, camSize.height / 2)));\n telemetry.addData(\"frame number: \", mCamAcqFr.frameCount());\n\n // log text representations of several significant scanlines\n\n topScan = frame.scanlineValue(camSize.height / 3);\n middleScan = frame.scanlineValue(camSize.height / 2);\n bottomScan = frame.scanlineValue(camSize.height * 2 / 3);\n\n //telemetry.addData(\"value a(1/3): \", topScan);\n //telemetry.addData(\"value b(1/2): \", middleScan);\n //telemetry.addData(\"value c(2/3): \", bottomScan);\n\n final int bandSize = 10;\n telemetry.addData(\"hue a(1/3): \", frame.scanlineHue(camSize.height / 3, bandSize));\n telemetry.addData(\"hue b(1/2): \", frame.scanlineHue(camSize.height / 2, bandSize));\n telemetry.addData(\"hue c(2/3): \", frame.scanlineHue(2*camSize.height / 3, bandSize));\n\n int topThresh = threshFind(topScan);\n int middleThresh = threshFind(middleScan);\n int bottomThresh = threshFind(bottomScan);\n\n telemetry.addData(\"Top Thresh\", topThresh);\n telemetry.addData(\"Middle Thresh\", middleThresh);\n telemetry.addData(\"Bottom Thresh\", bottomThresh);\n\n int topPos = findAvgOverThresh(topScan, topThresh);\n int middlePos = findAvgOverThresh(middleScan, middleThresh);\n int bottomPos = findAvgOverThresh(bottomScan, bottomThresh);\n\n telemetry.addData(\"Top Pos\", topPos);\n telemetry.addData(\"Middle Pos\", middlePos);\n telemetry.addData(\"Bottom Pos\", bottomPos);\n }\n }",
"public static void main(String[] args) {\n\t\t\tColorSensor colorSensor = new ColorSensor(SensorPort.S3);\n\t\t\tcolorSensor.setRGBMode();\n\t\t\tColor rgb; \n\t\t\t\n\t\t\tEV3LargeRegulatedMotor motora = new EV3LargeRegulatedMotor (MotorPort.A);\n\t\t\tEV3LargeRegulatedMotor motorb = new EV3LargeRegulatedMotor (MotorPort.C);\n\t\t\tEV3TouchSensor touchsensor = new EV3TouchSensor (SensorPort.S2);\n\t\t\tEV3IRSensor irSensor = new EV3IRSensor (SensorPort.S1);\n\t\t\t\n\t\t\tWheel wheel1 = WheeledChassis.modelWheel(motora , 2.5).offset(-5.0);\n\t\t Wheel wheel2 = WheeledChassis.modelWheel(motorb , 2.5).offset(5.0);\n\t\t \n\t\t Chassis chassis = new WheeledChassis(new Wheel[] { wheel1, wheel2 }, WheeledChassis.TYPE_DIFFERENTIAL);\n\t\t\t\n\t\t\t\n\t\t\t//is pressed method? do we need to make float values and fetching samples?\n\t\t MovePilot pilot = new MovePilot(chassis);\n\t\t \n\t\t Button.waitForAnyPress(); \n\t\t \n\t\t\tdouble [] hsvmiddle = new double[3];\n\t\t\tdouble [] hsvfloor = new double [3];\n\t\t\tdouble [] hsvline = new double [3];\n\t\t\t\n\t\t\tdouble [] pickupColor = new double [3];\n\t\t\t\n\t\t\t\n\t\t\t\trgb = colorSensor.getColor();\n\t\t\t\thsvmiddle= RGBtoHSV(rgb);\n\t\t\t\t\n\t\t\t\t//rotate to the left to pickup wood color\n\t\t\t\tpilot.rotate(-20);\n\t\t\t\t\n\t\t\t\trgb = colorSensor.getColor();\n\t\t\t\thsvfloor= RGBtoHSV(rgb);\n\t\t\t\t\n\t\t\t\t//rotate to the right to pick up black line\n\t\t\t\tpilot.rotate(30);\n\t\t\t\t\n\t\t\t\trgb = colorSensor.getColor();\n\t\t\t\thsvline= RGBtoHSV(rgb);\n\t\t\t\t\n\t\t\t\t//rotate back to center\n\t\t\t\tpilot.rotate(-10);\n\t\t\t\n\t\t\twhile(Button.ESCAPE.isUp())\n\t\t\t{\n\t\t\t\trgb = colorSensor.getColor();\n\t\t\t\tpickupColor = RGBtoHSV(rgb);\n\t\t\t\t\n\t /*System.out.println(\"RGB = \"+\n\t \" [\" + rgb.getRed() + \",\" + rgb.getGreen() + \",\" + rgb.getBlue() \n\t +\"]\\n \" + \"HSV = \" + \"[ \" + hsv[0] + \",\" + hsv[1] + \",\" + hsv[2] + \",\" +\" ]\");\n\t\t\t\t//delay a second so we don't see so many outputs on the screen\n\t //need to apply to actual line following strategy*/\n\t\t\t\tDelay.msDelay(1000);\n\t\t\t\t\n\t\t\t\t//touch sensor info\n\t\t\t\tSampleProvider distance = touchsensor.getTouchMode();\n\t\t\t\tfloat[] sample = new float[1];\n\t\t\t\t\n\t\t\t\t//ir info\n\t\t\t\tfloat[] sample2 = new float[1];\n\t\t\t\t\n\t\t\t\tpilot.forward();\n\t\t\t\t\n\t\t\t\twhile (!Button.ESCAPE.isDown()) {\n\t\t\t\t\t//when the robot is on the wood it will rotate and fix itself back on the middle\n\t\t\t\t\t if ((((hsvfloor[0]-5)<pickupColor[0])&&((hsvfloor[0]+5>pickupColor[0])))) { \n\t\t\t\t\t\t System.out.println(\"floor\");\n\t\t\t\t\t\t\tpilot.rotate(-4); \n\t\t\t\t\t }\n\t\t\t\t\t //when the robot is on black it will rotate and fix its self back on the middle\n\t\t\t\t\t else if ((((hsvline[0]-5)<pickupColor[0])&&((hsvline[0]+5>pickupColor[0])))) {\n\t\t\t\t\t\t System.out.println(\"black line\");\n\t\t\t\t\t\t\tpilot.rotate(4);\n\t\t\t\t\t}\n\t\t\t\t\t //when the robot is in the middle, it will go forward\n\t\t\t\t\t else if ((((hsvmiddle[0]-5)<pickupColor[0])&&((hsvmiddle[0]+5>pickupColor[0])))) {\n\t\t\t\t\t\t System.out.println (\"middle\");\n\t\t\t\t\t\t pilot.forward();\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t\t //need to implement when the robot sees a new color (red) then it with turn or do as it is called to to\n\t\t\t\t\t /*else if ((((hsvred[0]-5)<pickupColor[0])&&((hsvred[0]+5>pickupColor[0])))) {\n\t\t\t\t\t\t \n //touch sensor code\n\t\t\t\t\t distance.fetchSample(sample, 0);\n\t\t\t\t\t\tif (sample[0]== 1) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//pilot.travel(-10);\n\t\t\t\t\t\t\t//pilot.rotate(-90);\n\t\t\t\t\t\t\t//pilot.travel(20);\n\t\t\t\t\t\t\t//pilot.rotate(90);\n\t\t\t\t\t\t\t//pilot.forward();\n\t\t\t\t\t\t}\n\n \n\t\t\t\t\t }*/\n\t\t\t\t\t \n\t\t\t\t\t //when the robot sees silver, then it should recognize that it is at the end of the maze and call to the stacking method to retrace its steps\n\t\t\t\t\t /*else if ((hsvsilver[0]-5<pickupcolor[0])&&(hsvsilver[0]+5<pickupcolor[0])){\n\t\t\t\t\t * end the maze and call the stacking method\n\t\t\t\t\t }*/\n\t\t\t\t\t \n\t\t\t\t\t \t\t\t\t\t\t\n\t\t\t\t\t//ir code\n\t\t\t\t\tdistance.fetchSample(sample, 0);\n\t\t\t\t\t\tif (sample2[0]<=18) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tpilot.travel(-10);\n\t\t\t\t\t\t\tpilot.rotate(-90);\n\t\t\t\t\t\t\tpilot.travel(20);\n\t\t\t\t\t\t\tpilot.rotate(90);\n\t\t\t\t\t\t\tpilot.forward();\n\t\t\t\t\t\t}\n\t\t\t\t\t \n\t\t\t}\n\t\t\t\t\n\t\t\t\t//add hsv for silver end of the maze, and add red for intersections\n\t\t\t\t/*if the robot sees red and cannot turn to the right (ir sensor) then go straight\n\t\t\t\t * \tthen if it cant go forward, turn around and when you get back to the red line then turn left\n\t\t\t\t * if the robot sees red and can turn right, then turn right\n\t\t\t\t * if the robot hits something in front of itself, then have the robot turn around to the right\t\t\t\t\n\t\t\t\t * \n\t\t\t\t */\n\t\t\t\t\n //intersection strategy\n /*if ((red color is sensed using the color sensor) && (ir sensor is activated (there is an obstacle))) {\n pilot.rotate(90); //turn left\n pilot.forward();\n }\n if (touch is pressed) {\n pilot.rotate(180); //turn all the way around\n pilot.forward();\n if (red color is sensed) {\n pilot.rotate(-90); //turn right\n }\n }\n if (touch is pressed) {\n pilot.rotate(180); //turn all the way around\n pilot.forward(); \n }\n \n if ((ir is pressed) && !(touch is pressed)) {\n pilot.rotate(90); //turn left\n if (touch is pressed) {\n pilot.rotate(-90);\n pop that sequence off the stack\n pilot.forward();\n }\n else { //touch is not pressed, no obstacles ahead\n pilot.forward();\n }\n }\n \n //25 is an arbitrary # that we are using to represent the max # of intersections\n for (i=1; i < 25; ++i) {\n //everything that's happening in the entire program has to be in this for loop\n Stack<String> stack = new Stack<String>();\n stack.push(\"i\"); //naming each sequence/intersection by its #\n printStack(stack);\n\n }\n //if we program the robot to turn left at intersections, the IR must be on the right\n //question box: how do we structure our code so that every part works together in unison?\n */\n\t\t\t\n\t\t\t\n\t\t\t\t \n\t\t\t\n\t\t\t//free up resources\n\t\t\tcolorSensor.close();\n\t\t\t\n\t\t}\n\n\t}",
"@Override\n\tpublic void onBlue() {\n\t\taddSequential(new DriveStraightByDistance(PEG_STRAIGHT - ROBOT_LENGTH / 2), 3.5);\n\t\t//TODO: might need to change to a little less\n\t\taddSequential(new TurnDegrees(90), 2.5);\n\t\taddSequential(new DriveStraightByDistance(EXTRA_DIS), 4);\n\t\taddSequential(new OpenPlacer2());\n\t\taddSequential(new ArcadeDriveByValues(-0.5, -0.5), 1);// TODO change commad\n\t\taddSequential(new ClosePlacer());\n\t\t\n\t}",
"private static void processGroundCal()\n\t{\n\t\tif (testMotor != null) {\n\t\t\tSystem.out.println(\"Calibrating arm to floor position\");\n\t\t\ttestMotor.setPosition(SOFT_ENCODER_LIMIT_FLOOR);\n\t\t}\n\t}",
"@Override\n public void teleopPeriodic() {\n \n boolean targetFound = false; \n int Xpos = -1; int Ypos = -1; int Height = -1; int Width = -1; Double objDist = -1.0; double []objAng = {-1.0,-1.0};\n\n //Getting the number of blocks found\n int blockCount = pixy.getCCC().getBlocks(false, Pixy2CCC.CCC_SIG1, 25);\n\t\tSystem.out.println(\"Found \" + blockCount + \" blocks!\"); // Reports number of blocks found\n\t\tif (blockCount <= 0) {\n System.err.println(\"No blocks found\");\n }\n ArrayList <Block> blocks = pixy.getCCC().getBlocks();\n Block largestBlock = null;\n\n //verifies the largest block and store it in largestBlock\n for (Block block:blocks){\n if (block.getSignature() == Pixy2CCC.CCC_SIG1) {\n\n\t\t\t\tif (largestBlock == null) {\n\t\t\t\t\tlargestBlock = block;\n\t\t\t\t} else if (block.getWidth() > largestBlock.getWidth()) {\n\t\t\t\t\tlargestBlock = block;\n }\n\t\t\t}\n }\n //loop\n while (pixy.getCCC().getBlocks(false, Pixy2CCC.CCC_SIG1, 25)>=0 && ButtonLB){\n\n if (largestBlock != null){\n targetFound = true; \n Xpos = largestBlock.getX();\n Ypos = largestBlock.getY();\n Height = largestBlock.getHeight();\n Width = largestBlock.getWidth();\n\n objDist = RobotMap.calculateDist((double)Height, (double)Width, (double)Xpos, (double)Ypos);\n objAng = RobotMap.calculateAngle(objDist, Xpos, Ypos);\n \n }\n //print out values to Dashboard\n SmartDashboard.putBoolean(\"Target found\", targetFound);\n SmartDashboard.putNumber (\"Object_X\", Xpos);\n SmartDashboard.putNumber (\"Object_Y\", Ypos);\n SmartDashboard.putNumber (\"Height\", Height);\n SmartDashboard.putNumber(\"Width\", Width);\n SmartDashboard.putNumber (\"Distance\", objDist);\n SmartDashboard.putNumber(\"X Angle\", objAng[0]);\n SmartDashboard.putNumber(\"Y Angle\", objAng[1]);\n }\n }",
"public BeaconAnalysis() {\n this.left = BeaconColor.UNKNOWN;\n this.right = BeaconColor.UNKNOWN;\n this.confidence = 0.0f;\n this.location = new Rectangle();\n this.leftButton = null;\n this.rightButton = null;\n }",
"@Override\n public void runOpMode() throws InterruptedException{\n\n LeftWheel = hardwareMap.dcMotor.get(\"LeftWheel\");\n RightWheel = hardwareMap.dcMotor.get(\"RightWheel\");\n LLAMA = hardwareMap.dcMotor.get(\"LLAMA\");\n RightWheel.setDirection(DcMotor.Direction.REVERSE);\n beaconFlagSensor = hardwareMap.i2cDevice.get(\"color sensor\");\n LeftWheel.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n RightWheel.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n buttonPusher = hardwareMap.servo.get(\"Button Pusher\");\n buttonPusher.setDirection(Servo.Direction.REVERSE);\n\n LeftWheel.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n RightWheel.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n LLAMA.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n beaconFlagReader= new I2cDeviceSynchImpl(beaconFlagSensor, I2cAddr.create8bit(0x3c), false);\n beaconFlagReader.engage();\n\n double PUSHER_MIN = 0;\n double PUSHER_MAX = 1;\n buttonPusher.scaleRange(PUSHER_MIN,PUSHER_MAX);\n\n if(beaconFlagLEDState){\n beaconFlagReader.write8(3, 0); //Set the mode of the color sensor using LEDState\n }\n else{\n beaconFlagReader.write8(3, 1); //Set the mode of the color sensor using LEDState\n }\n\n\n waitForStart();\n //Go forward to position to shoot\n long iniForward = 0;\n //Shoot LLAMA\n long shootLLAMA=0 ;\n //Turn towards Wall\n long turnToWall= 0;\n //Approach Wall\n long wallApproach= 0;\n //Correct to prepare for button\n long correctForButton= 0;\n long correctForButton2=0 ;\n //Use sensors to press button\n /** This is sensor*/\n //Go forward\n long toSecondButton= 0;\n //Use Sensors to press button\n /** This is sensor*/\n //turn to center\n\n //charge\n long chargeTime= 0;\n\n //Go forward to position to shoot\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(iniForward);\n\n STOP();\n\n //Shoot LLAMA\n LLAMA.setPower(1);\n\n sleep(shootLLAMA);\nSTOP();\n //Turn towards Wall\n LeftWheel.setPower(-1);\n RightWheel.setPower(1);\n\n sleep(turnToWall);\n\n STOP();\n //Approach Wall\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(wallApproach);\n\n STOP();\n //Correct to prepare for button\n\n LeftWheel.setPower(1);\n RightWheel.setPower(-1);\n\n sleep(correctForButton);\n\n STOP();\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(correctForButton2);\n\n STOP();\n topCache = beaconFlagReader.read(0x04, 1);\n //Use sensors to press button\n if ((topCache[0] & 0xFF) <=4 && (topCache[0] & 0xFF) > 0 &&(topCache[0] & 0xFF) <16) {\n while (((topCache[0] & 0xFF) <=4 && (topCache[0] & 0xFF) > 0 &&\n (topCache[0] & 0xFF) <16) && opModeIsActive()) {\n\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n sleep(100);\n LeftWheel.setPower(0);\n RightWheel.setPower(0);\n topCache = beaconFlagReader.read(0x04, 1);\n\n if ((topCache[0] & 0xFF) >=7 && (topCache[0] & 0xFF) >= 0){\n telemetry.addLine(\"Color Detected, Pressing Button...\");\n telemetry.update();\n buttonPusher.setPosition(PUSHER_MAX);\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(100);\n\n STOP();\n break;\n }\n }\n\n }\n\n else if ((topCache[0] & 0xFF) >=7 && (topCache[0] & 0xFF) >= 0) {\n telemetry.addLine(\"Color Detected, Pressing Button...\");\n telemetry.update();\n buttonPusher.setPosition(PUSHER_MAX);\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(100);\n\n STOP();\n }\n\n //Go forward\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(toSecondButton);\n\n STOP();\n //Use Sensors to press button\n topCache = beaconFlagReader.read(0x04, 1);\n //Use sensors to press button\n if ((topCache[0] & 0xFF) <=4 && (topCache[0] & 0xFF) > 0 &&(topCache[0] & 0xFF) <16) {\n while (((topCache[0] & 0xFF) <=4 && (topCache[0] & 0xFF) > 0 &&\n (topCache[0] & 0xFF) <16) && opModeIsActive()) {\n\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n sleep(100);\n LeftWheel.setPower(0);\n RightWheel.setPower(0);\n topCache = beaconFlagReader.read(0x04, 1);\n\n if ((topCache[0] & 0xFF) >=7 && (topCache[0] & 0xFF) >= 0){\n telemetry.addLine(\"Color Detected, Pressing Button...\");\n telemetry.update();\n buttonPusher.setPosition(PUSHER_MAX);\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(100);\n\n STOP();\n break;\n }\n }\n\n }\n\n else if ((topCache[0] & 0xFF) >=7 && (topCache[0] & 0xFF) >= 0) {\n telemetry.addLine(\"Color Detected, Pressing Button...\");\n telemetry.update();\n buttonPusher.setPosition(PUSHER_MAX);\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(100);\n\n STOP();\n }\n\n //turn to center\n\n\n //charge\n }",
"public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {\n mRgba = inputFrame.rgba();\n Imgproc.resize(mRgba, mRgba, new Size(100,100));\n // Rotate mRgba 90 degrees\n Core.transpose(mRgba, mRgbaT);\n Imgproc.resize(mRgbaT, mRgbaF, mRgbaF.size(), 0,0, 0);\n Core.flip(mRgbaF, mRgba, 1 );\n //Blurs for smoother edgges\n Imgproc.blur(mRgba, mRgba, new Size(8,8));\n\n //Adds the counter to the instantiation of each object as it counts the frame number\n Object blue = new Object(\"blue\", counter);\n Object green = new Object(\"green\", counter);\n Object red = new Object(\"red\", counter);\n\n Mat threshold = new Mat();\n Mat HSV = new Mat();\n //Changes from BGR to HSV as HSV allow much easier colour ranges for creating a binary mat\n Imgproc.cvtColor(mRgba,HSV,Imgproc.COLOR_RGB2HSV);\n //Creates blue binary mat\n Core.inRange(HSV, blue.HSVMin, blue.HSVMax, threshold);\n morphOps(threshold);\n trackFilteredObject(blue,threshold,HSV,mRgba, blue.type, counter);\n\n //TODO disabled the green markers for now\n /*\n Imgproc.cvtColor(mRgba,HSV,Imgproc.COLOR_BGR2HSV);\n Core.inRange(HSV, green.HSVMin, green.HSVMax, threshold);\n morphOps(threshold);\n trackFilteredObject(green,threshold,HSV,mRgba, green.type, counter);\n */\n //creates red binary mat\n Imgproc.cvtColor(mRgba,HSV,Imgproc.COLOR_BGR2HSV);\n Core.inRange(HSV, red.HSVMin, red.HSVMax, threshold);\n morphOps(threshold);\n trackFilteredObject(red,threshold,HSV,mRgba, red.type, counter);\n\n //Colours the line that registers if a step has occured accordingly\n if(redGreenLine || blueGreenLine){\n Imgproc.line(mRgba, new Point(0, 150), new Point(500, 150), new Scalar(0, 255, 0), 2);\n }\n else if(!redGreenLine && !redGreenLine){\n Imgproc.line(mRgba, new Point(0, 150), new Point(500, 150), new Scalar(255, 0, 0), 2);\n }\n //Will write each frame to storage once the reoord button is pressed. This is used for setting ground truth data\n if(enableVideo) {\n Mat output = new Mat();\n Imgproc.cvtColor(mRgba, output, Imgproc.COLOR_RGB2BGR);\n Imgproc.resize(output, output, new Size(100,100));\n Imgcodecs.imwrite(fileName + BUILDING_NAME + FLOOR_NUMBER + \"(\" + startLat + \",\" + startLong + \")\" + \"to\" + \"(\" + endLat + \",\" + endLong + \")\" + Integer.toString(counter) + \".bmp\", output);\n }\n\n counter++;\n\n return mRgba; // This function must return\n }",
"@Override\n public void loop() {\n telemetry.addData(\"Status\", \"Running: \" + runtime.toString());\n\n //zAccumulated = mrGyro.getIntegratedZValue(); //Set variables to gyro readings\n\n heading = 360 - mrGyro.getHeading(); //Reverse direction of heading to match the integrated value\n if (heading == 360)\n {\n heading = 0;\n }\n\n xVal = mrGyro.rawX() / 128; //Lowest 7 bits are noise\n yVal = mrGyro.rawY() / 128;\n zVal = mrGyro.rawZ() / 128;\n\n //The below two if() statements ensure that the mode of the color sensor is changed only once each time the touch sensor is pressed.\n //The mode of the color sensor is saved to the sensor's long term memory. Just like flash drives, the long term memory has a life time in the 10s or 100s of thousands of cycles.\n //This seems like a lot but if your program wrote to the long term memory every time though the main loop, it would shorten the life of your sensor.\n\n if (!buttonState && gamepad1.x) { //If the touch sensor is just now being pressed (was not pressed last time through the loop but now is)\n buttonState = true; //Change touch state to true because the touch sensor is now pressed\n LEDState = !LEDState; //Change the LEDState to the opposite of what it was\n if(LEDState)\n {\n BallSensorreader.write8(3, 0); //Set the mode of the color sensor using LEDState\n }\n else\n {\n BallSensorreader.write8(3, 1); //Set the mode of the color sensor using LEDState\n }\n }\n\n if (!gamepad1.x) //If the touch sensor is now pressed\n buttonState = false; //Set the buttonState to false to indicate that the touch sensor was released\n\n BallSensorcache = BallSensorreader.read(0x04, 1);\n\n if (gamepad2.a)\n liftSpeed = 1;\n if (gamepad2.b)\n liftSpeed = 0.5;\n\n driveSpeed = 1;\n\n if (gamepad1.right_bumper)\n driveSpeed = 0.5;\n\n if (gamepad1.left_bumper)\n driveSpeed = 0.25;\n\n // Run wheels in tank mode (note: The joystick goes negative when pushed forwards, so negate it)\n frontLeft = ( gamepad1.left_stick_x - gamepad1.left_stick_y - gamepad1.right_stick_x)/2 * driveSpeed; //Front right\n frontRight = ( gamepad1.left_stick_x + gamepad1.left_stick_y - gamepad1.right_stick_x)/2 * driveSpeed; //Front left\n backLeft = (-gamepad1.left_stick_x - gamepad1.left_stick_y - gamepad1.right_stick_x)/2 * driveSpeed; //Back right\n backRight = (-gamepad1.left_stick_x + gamepad1.left_stick_y - gamepad1.right_stick_x)/2 * driveSpeed; //Back left\n Lift = gamepad2.left_stick_y * liftSpeed;\n\n robot.FL_drive.setPower(frontLeft);\n robot.FR_drive.setPower(frontRight);\n robot.BL_drive.setPower(backLeft);\n robot.BR_drive.setPower(backRight);\n robot.Lift.setPower(Lift);\n\n // Left servo going in means more\n if (gamepad2.left_bumper)\n leftPosition += LEFT_SPEED;\n else if (gamepad2.y)\n leftPosition = LEFT_MIN_RANGE;\n\n // Right servo going in means less\n if (gamepad2.right_bumper)\n rightPosition -= RIGHT_SPEED;\n else if (gamepad2.y)\n rightPosition = RIGHT_MAX_RANGE;\n\n if (gamepad2.x)\n {\n rightPosition = 0.96;\n leftPosition = 0.44;\n }\n\n if (gamepad1.a)\n target = target + 45;\n if (gamepad1.b)\n target = target - 45;\n\n //turnAbsolute(target);\n\n // Move both servos to new position.\n leftPosition = Range.clip(leftPosition, robot.LEFT_MIN_RANGE, robot.LEFT_MAX_RANGE);\n robot.Left.setPosition(leftPosition);\n rightPosition = Range.clip(rightPosition, robot.RIGHT_MIN_RANGE, robot.RIGHT_MAX_RANGE);\n robot.Right.setPosition(rightPosition);\n\n // Send telemetry message to signify robot running;\n telemetry.addData(\"Left\", \"%.2f\", leftPosition);\n telemetry.addData(\"Right\", \"%.2f\", rightPosition);\n telemetry.addData(\"frontLeft\", \"%.2f\", frontLeft);\n telemetry.addData(\"frontRight\", \"%.2f\", frontRight);\n telemetry.addData(\"backLeft\", \"%.2f\", backLeft);\n telemetry.addData(\"backRight\", \"%.2f\", backRight);\n telemetry.addData(\"Lift\", \"%.2f\", Lift);\n\n //display values\n telemetry.addData(\"1 #A\", BallSensorcache[0] & 0xFF);\n\n telemetry.addData(\"3 A\", BallSensorreader.getI2cAddress().get8Bit());\n\n telemetry.addData(\"1. heading\", String.format(\"%03d\", heading)); //Display variables to Driver Station Screen\n telemetry.addData(\"2. target\", String.format(\"%03d\", target));\n telemetry.addData(\"3. X\", String.format(\"%03d\", xVal));\n telemetry.addData(\"4. Y\", String.format(\"%03d\", yVal));\n telemetry.addData(\"5. Z\", String.format(\"%03d\", zVal));\n\n telemetry.update(); //Limited to 100x per second\n\n }",
"public HashMap<SensorPosition, Integer> receiveGripperSensorData();",
"@Override\n public void robotPeriodic()\n {\n /**\n * The method GetColor() returns a normalized color value from the sensor and can be\n * useful if outputting the color to an RGB LED or similar. To\n * read the raw color, use GetRawColor().\n *\n * The color sensor works best when within a few inches from an object in\n * well lit conditions (the built in LED is a big help here!). The farther\n * an object is the more light from the surroundings will bleed into the\n * measurements and make it difficult to accurately determine its color.\n */\n Color detectedColor = colorSensorV3.getColor();\n\n /**\n * The sensor returns a raw IR value of the infrared light detected.\n */\n double IR = colorSensorV3.getIR();\n\n /**\n * Open Smart Dashboard or Shuffleboard to see the color detected by the\n * sensor.\n */\n SmartDashboard.putNumber(\"Red\", detectedColor.red);\n SmartDashboard.putNumber(\"Green\", detectedColor.green);\n SmartDashboard.putNumber(\"Blue\", detectedColor.blue);\n SmartDashboard.putNumber(\"IR\", IR);\n\n /**\n * In addition to RGB IR values, the color sensor can also return an\n * infrared proximity value. The chip contains an IR led which will emit\n * IR pulses and measure the intensity of the return. When an object is\n * close the value of the proximity will be large (max 2047 with default\n * settings) and will approach zero when the object is far away.\n *\n * Proximity can be used to roughly approximate the distance of an object\n * or provide a threshold for when an object is close enough to provide\n * accurate color values.\n */\n int proximity = colorSensorV3.getProximity();\n\n SmartDashboard.putNumber(\"Proximity\", proximity);\n\n\n }",
"@Test\n @Tag(\"bm1000\")\n public void testBEACONFD() {\n CuteNetlibCase.doTest(\"BEACONFD.SIF\", \"33592.4858072\", null, NumberContext.of(7, 4));\n }",
"@Override\n\tpublic void onRed() {\n\t\taddSequential(new DriveStraightByDistance(PEG_STRAIGHT - ROBOT_LENGTH / 2), 3.5);\n\t\t//TODO: might need to change to a little less\n\t\taddSequential(new TurnDegrees(90), 2.5);\n\t\taddSequential(new DriveStraightByDistance(EXTRA_DIS), 4);\n\t\taddSequential(new OpenPlacer2());\n\t\taddSequential(new ArcadeDriveByValues(-0.5, -0.5), 1);// TODO change commad\n\t\taddSequential(new ClosePlacer());\n\t}",
"protected abstract void onReceiveBatteryFrame(int[] value);",
"@Override\n public void loop() {\n\n telemetry.addData(\"Status\", \"TeleOp Mode Running\");\n\n // Sets the power level for each driving motors\n double leftPower;\n double rightPower;\n\n // sets the power level for lifting the grippers\n double armPower;\n\n // get power value from gamepad1 (person 1) y position for driving\n leftPower = -gamepad1.left_stick_y;\n rightPower = gamepad1.right_stick_y;\n\n leftPower = Range.clip(leftPower, -0.7, 0.7);\n rightPower = Range.clip(rightPower, -0.7, 0.7);\n\n // gently raise or lower the arm (restricted to -0.5 lower | 0.5 raise)\n // get power value from gamepad2 (person 2) y position for extending arm\n\n armPower = -gamepad2.right_stick_y; // ensure the motor goes in the correct direction (full power possible)\n armPower = Range.clip(armPower, -0.5, 0.5);\n\n // Servo control: 0-0degrees, 0.5=90 degrees, 1.0=180 degrees\n // HS-485-HB servos\n\n // The settings for gripper arms positions (person 2)\n\n // forward position or grabbed block\n if (gamepad2.y) {\n leftGrab.setPosition(1); // set position to 0 degrees\n rightGrab.setPosition(0);\n leftTop.setPosition(0.6);\n rightTop.setPosition(0.4);\n telemetry.addData(\"pressed\", \"Y\");\n\n // side position\n } else if (gamepad2.b) {\n leftGrab.setPosition(0.82); // set position to 45 degrees\n rightGrab.setPosition(0.18);\n leftTop.setPosition(1);\n rightTop.setPosition(0);\n telemetry.addData(\"pressed\", \"B\");\n\n // ready to grab position \\ /\n } else if (gamepad2.a) {\n leftGrab.setPosition(0.9167); // set position to 15 degrees\n rightGrab.setPosition(0.0833);\n leftTop.setPosition(1);\n rightTop.setPosition(0);\n telemetry.addData(\"pressed\", \"A\");\n\n // stowed\n } else if (gamepad2.right_bumper) {\n leftGrab.setPosition(0);\n rightGrab.setPosition(1);\n telemetry.addData(\"pressed\", \"X\");\n }\n\n if(gamepad1.b) {\n\n colorArm.setPosition(0.25); // stowed colorArm\n telemetry.addData(\"pressed\", \"B\");\n\n }\n\n\n // top grap positions set\n if (gamepad2.left_bumper) {\n leftTop.setPosition(0.4);\n rightTop.setPosition(0.6);\n telemetry.addData(\"Info\", \"STOWED\");\n\n }\n /*\n else if (gamepad2.dpad_up) {\n leftTop.setPosition(0.9);\n rightTop.setPosition(0.1);\n telemetry.addData(\"Info\", \"UP\");\n\n }\n else if (gamepad2.dpad_down) {\n\n leftTop.setPosition(0.45);\n rightTop.setPosition(0.55);\n telemetry.addData(\"Info\", \"DOWN\");\n\n }\n */\n\n // Send calculated power to wheels\n leftDrive.setPower(leftPower);\n rightDrive.setPower(rightPower);\n armMotor.setPower(armPower);\n // extendingArm.setPower(extendingArmPower);\n\n // Show the elapsed game time and current status of robot's hardware.\n telemetry.addData(\"Status\", \"Run Time: \" + runtime.toString());\n telemetry.addData(\"Motors\", \"left (%.2f), right (%.2f)\", leftDrive.getPower(), rightDrive.getPower());\n telemetry.addData(\"Arm Motor\", \"(%.2f)\", armMotor.getPower());\n telemetry.addData(\"Left Grab Servo Position\", leftGrab.getPosition());\n telemetry.addData(\"Right Grab Servo Position\", rightGrab.getPosition());\n telemetry.addData(\"Left Top Servo Position\", leftTop.getPosition());\n telemetry.addData(\"Right Top Servo Position\", rightTop.getPosition());\n telemetry.addData(\"Color Arm Position\", colorArm.getPosition());\n telemetry.update();\n }",
"public void speckle() {\n\t\tint r = (height / res) - 1;\n\t\tint c = (width / res);\n\t\tfor (int i = 0; i < c; i++)\t\t{\n\t\t\tint x = rng.nextInt(25);\t\t\t\n\t\t\tif (x == 0) { // 1/25 chance of changing bottom row pixel to black\t \n\t\t\t\tvalues[r][i] = color1;\t\t\t\t\n\t\t\t}\n\t\t\telse if (x == 1) { // 1/25 chance of changing bottom row pixel to white\n\t\t\t\tvalues[r][i] = color2;\n\t\t\t}\n\t\t\t// 23/25 chance of leaving bottom pixel alone\n\t\t}\n\t}",
"private void m20376b() {\n if (this.c) {\n String str = cz.f23362a;\n this.b.startScan();\n this.f23492h = SystemClock.elapsedRealtime();\n C6019a c6019a = this.f23491g;\n c6019a.f24636f++;\n return;\n }\n str = cz.f23362a;\n }",
"public static void main(String[] args) {\n//\t\tmotorGrab.setSpeed(360);\r\n//\t\tdouble rotationGrab=(-0.02)*90/0.01;\r\n//\t\tmotorGrab.rotate(-(int)rotationGrab);\r\n//\t\t\r\n\t\t\r\n\t\tposFork.add(rack11); posFork.add(rack21);posFork.add(rack31);posFork.add(rack41);\r\n\t\tposFork.add(rack42); posFork.add(rack32);posFork.add(rack22);posFork.add(rack12);\r\n\t\tposFork.add(rack13); posFork.add(rack23);posFork.add(rack33);posFork.add(rack43);\r\n\t\tposFork.add(rack44); posFork.add(rack34);posFork.add(rack24);posFork.add(rack14);\r\n\t\tpositionFork=new double[3];\r\n\t\tpositionFork[0]=0.30;\r\n\t\tpositionFork[1]=0.05;\r\n\t\tpositionFork[2]=0.05;\r\n\r\n\t\tgoToInitialState();\r\n\t\tint i=0;\r\n\t\twhile(i<15)\r\n\t\t{\r\n\t\t\tscanPos(i);\r\n\t\t\tmoveFork(posFork.get(i).getCoordinates(),posFork.get(i+1).getCoordinates());\r\n\t\t\ti++;\r\n\t\t}\r\n\t\t// This moment the full rack is scanned, starting from the first shelf on the first row. The code below, could be written inside the while loop.\r\n\t\t// Then, we can for example break the while loop immediately when one column seems to be empty.\r\n\t\t// The code below will also be used to check if the class works\r\n\t\t// Idea if the movement of the motors is not accurate enough: use the color sensor to decide what the position of the robot is.\r\n\t\tint[] emptyOrMistake=new int[16];//0: right color, 1: empty, 2: wrong color \r\n\t\tfor(int j=0;j<16;j++)\r\n\t\t{\r\n\t\t\tif(posFork.get(j).getColorBlock()!=posFork.get(j).getColorShelf() && posFork.get(j).getColorBlock()!=5 )\r\n\t\t\t{\r\n\t\t\t\temptyOrMistake[j]=2;\r\n\t\t\t}\r\n\t\t\tif(posFork.get(j).getColorBlock()==5)\r\n\t\t\t{\r\n\t\t\t\temptyOrMistake[j]=1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\twhile(Button.readButtons()==0) {\r\n\t\tfor(int k=0;k<16;k++)\r\n\t\t{\r\n\t\t\tSystem.out.println(emptyOrMistake[k]);\r\n\t\t}\r\n\t\t}\r\n\t\t// conditions for this class to be called: the robot shouldn't have a box on its fork, it should not have an assignment to deliver a box\r\n\t\t// it is not very efficient to scan each time a box is placed in the warehouse --> it could be an idea to give the robot different assignements after scanning one time\r\n\t\t\r\n\t}",
"public void scanFrame() {\n\n //Scanner inaktiv, så scanTimeren kan blive angivet i millisekunder.\n if (scannerInactive) {\n scanTimer = millis();\n }\n\n //Scanner bliver sat til aktiv, når timeren har nået den værdi angivet i timeBetweenScan.\n if (!scannerInactive) {\n /*\n if (scanTimer % timeBetweenScan > timeBetweenScan-100 && millis() > 10000) {\n scanTimer = timeBetweenScan-99;\n scannerInactive = false;*/\n \n //Minx og maxX biver sat alt efter hvilken zone der skal scannes, baseret på et timeslot.\n minX = scanAreaW/4*time.getCurrentTimeSlotInt()+scanAreaX+1;\n maxX = scanAreaW/4*(time.getCurrentTimeSlotInt()+1)+scanAreaX-2;\n\n //Checker først om scanneren har ikke overskredet både X og Y-grænsen.\n //En pille blev\n if (y >= maxY && x >= maxX) {\n //Ingen piller blev i scanningsloopet.\n //Her resettes scannerens X og Y til standard, og vi sender en OSC-besked til enheden, at der ingen piller er.\n x = minX;\n y = minY;\n \n timeslotBools[time.getCurrentTimeSlotInt()] = true;\n\n //oscBesked\n msg = new OscMessage(\"/pill\");\n msg.add(false);\n oscP5.send(msg, unitAddress);\n\n } else { //Ingen af koordinaterne har ramt deres max.\n\n if (y >= maxY) {\n //Hvis Y-koordinaten har ramt kanten af boksen, resetter vi dens værdi, og begynde på næste række, X.\n x += 5;\n y = minY;\n } else {\n //Ingen af checks'ne var succesfulde, så det antages at ingen maks-grænse er noget, og den næste Y-koordinat kan læses.\n y += 5;\n }\n\n }\n \n //Pixels'ne indenfor scannings-regionen bliver tjekket imod pillerne i XML-filen.\n loadPixels();\n println(\"currentscan @frame: \" + x + \" \" + y + \" : currentcolor: \" + pixels[y*width+x]);\n for (int i = 0; i < xmlHandler.children.length-1; ++i) {\n xmlHandler.load(i+1);\n if(pixels[y*width+x] > xmlHandler.outputMinRange && pixels[y*width+x] < xmlHandler.outputMaxRange) {\n //Pille er blevet genkendet.\n //uielement.informationDialog(\"pille ramt: \" + pillTimeSlot(x));\n timeslotBools[time.getCurrentTimeSlotInt()] = false;\n x = minX;\n y = minY;\n //oscBesked\n msg = new OscMessage(\"/pill\");\n msg.add(true);\n oscP5.send(msg, unitAddress);\n }\n }\n\n //Tegner en boks om den pixel der bliver scannet.\n rectMode(RADIUS);\n noFill();\n stroke(scannerColor);\n rect(x, y, 10, 10);\n \n }\n\n }",
"public void pos60() throws InterruptedException{\r\n bucketOverSweeper();\r\n sleep(2500);\r\n motorShoulder.setTargetPosition(-1160);\r\n motorElbow.setTargetPosition(2271);\r\n motorElbow.setPower(POWER_ELBOW_FAST);\r\n motorShoulder.setPower(POWER_SHOULDER_FAST);\r\n sleep(1000);\r\n\r\n servoBucket.setPosition(0.5);\r\n sleep(500);\r\n\r\n motorElbow.setTargetPosition(3075);\r\n motorShoulder.setTargetPosition(-1300);\r\n motorElbow.setPower(POWER_ELBOW_FAST);\r\n motorShoulder.setPower(POWER_SHOULDER_FAST);\r\n sleep(1000);\r\n\r\n motorElbow.setTargetPosition(3500);\r\n motorElbow.setPower(POWER_ELBOW_SLOW);\r\n sleep(500);\r\n\r\n servoBucket.setPosition(MAX_BUCKET);\r\n sleep(500);\r\n\r\n motorElbow.setTargetPosition(3600);\r\n motorElbow.setPower(POWER_ELBOW_FAST);\r\n sleep(1000);\r\n\r\n servoBucket.setPosition(0.85);\r\n\r\n servoBucket.setPosition(0.80);\r\n sleep(500);\r\n\r\n servoBucket.setPosition(0.70);\r\n sleep(500);\r\n\r\n servoBucket.setPosition(0.65);\r\n sleep(500);\r\n\r\n servoBucket.setPosition(0.60);\r\n sleep(500);\r\n\r\n servoBucket.setPosition(0.55);\r\n sleep(500);\r\n\r\n servoBucket.setPosition(0.50);\r\n sleep(500);\r\n\r\n servoBucket.setPosition(0.40);\r\n sleep(500);\r\n\r\n servoBucket.setPosition(0.30);\r\n sleep(500);\r\n\r\n motorElbow.setTargetPosition(3000);\r\n motorElbow.setPower(POWER_ELBOW_FAST);\r\n sleep(500);\r\n\r\n posBucket = MAX_BUCKET;\r\n posElbow = 3000;\r\n posShoulder = -1275;\r\n sleep(3000);\r\n returnBucket();\r\n\r\n }",
"private void colorCalibration()\n {\n\n if(ntRedColorCalibration.getBoolean(false))\n {\n if(colorCalibrationEnabled)\n {\n /* NON-OPERATIONAL SENSOR\n kRedTargetRedValue = detectedColor.red;\n kRedTargetGreenValue = detectedColor.green;\n kRedTargetBlueValue = detectedColor.blue;\n */\n ntRedRValue.forceSetDouble(kRedTargetRedValue);\n ntRedGValue.forceSetDouble(kRedTargetGreenValue);\n ntRedBValue.forceSetDouble(kRedTargetBlueValue);\n kRedTarget = new Color(new Color8Bit((int) (kRedTargetRedValue * 255), \n (int) (kRedTargetGreenValue * 255), (int) (kRedTargetBlueValue * 255)));\n\n updateColorMatcher();\n }\n colorCalibrationEnabled = false;\n ntRedColorCalibration.setBoolean(false);\n }\n \n if(ntGreenColorCalibration.getBoolean(false))\n {\n if(colorCalibrationEnabled)\n {\n /* NON-OPERATIONAL SENSOR\n kGreenTargetRedValue = detectedColor.red;\n kGreenTargetGreenValue = detectedColor.green;\n kGreenTargetBlueValue = detectedColor.blue; \n */\n ntGreenRValue.forceSetDouble(kGreenTargetRedValue);\n ntGreenGValue.forceSetDouble(kGreenTargetGreenValue);\n ntGreenBValue.forceSetDouble(kGreenTargetBlueValue);\n kGreenTarget = new Color(new Color8Bit((int) (kGreenTargetRedValue * 255), \n (int) (kGreenTargetGreenValue * 255), (int) (kGreenTargetBlueValue * 255)));\n\n updateColorMatcher();\n }\n colorCalibrationEnabled = false;\n ntGreenColorCalibration.setBoolean(false);\n }\n\n if(ntBlueColorCalibration.getBoolean(false))\n {\n if(colorCalibrationEnabled)\n {\n /* NON-OPERATIONAL SENSOR\n kBlueTargetRedValue = detectedColor.red;\n kBlueTargetGreenValue = detectedColor.green;\n kBlueTargetBlueValue = detectedColor.blue;\n */\n ntBlueRValue.forceSetDouble(kBlueTargetRedValue);\n ntBlueGValue.forceSetDouble(kBlueTargetGreenValue);\n ntBlueBValue.forceSetDouble(kBlueTargetBlueValue);\n kBlueTarget = new Color(new Color8Bit((int) (kBlueTargetRedValue * 255), \n (int) (kBlueTargetGreenValue * 255), (int) (kBlueTargetBlueValue * 255)));\n\n updateColorMatcher();\n }\n colorCalibrationEnabled = false;\n ntBlueColorCalibration.setBoolean(false);\n }\n\n if(ntYellowColorCalibration.getBoolean(false))\n {\n if(colorCalibrationEnabled)\n {\n /* NON-OPERATIONAL SENSOR\n kYellowTargetRedValue = detectedColor.red;\n kYellowTargetGreenValue = detectedColor.green;\n kYellowTargetBlueValue = detectedColor.blue;\n */\n ntYellowRValue.forceSetDouble(kYellowTargetRedValue);\n ntYellowGValue.forceSetDouble(kYellowTargetGreenValue);\n ntYellowBValue.forceSetDouble(kYellowTargetBlueValue);\n kYellowTarget = new Color(new Color8Bit((int) (kYellowTargetRedValue * 255), \n (int) (kYellowTargetGreenValue * 255), (int) (kYellowTargetBlueValue * 255)));\n\n updateColorMatcher();\n }\n colorCalibrationEnabled = false;\n ntYellowColorCalibration.setBoolean(false);\n }\n ntColorCalibrationEnabled.setBoolean(colorCalibrationEnabled);\n }",
"public void frame()\n{\n for(int cc=1;cc<8;cc++)\n {if (cc==7)\n {\n line(w1+cos(cc*TWO_PI/7)*radiu*1/3, h1+sin(cc*TWO_PI/7)*radiu*1/3, w1+cos(TWO_PI/7)*radiu*1/3, h1+sin(TWO_PI/7)*radiu*1/3);\n line(w1+cos(cc*TWO_PI/7)*radiu*2/3, h1+sin(cc*TWO_PI/7)*radiu*2/3, w1+cos(TWO_PI/7)*radiu*2/3, h1+sin(TWO_PI/7)*radiu*2/3); \n line(w1+cos(cc*TWO_PI/7)*radiu*1, h1+sin(cc*TWO_PI/7)*radiu*1, w1+cos(TWO_PI/7)*radiu*1, h1+sin(TWO_PI/7)*radiu*1);\n}\n else{\n line(w1+cos(cc*TWO_PI/7)*radiu*1/3, h1+sin(cc*TWO_PI/7)*radiu*1/3, w1+cos((cc+1)*TWO_PI/7)*radiu*1/3, h1+sin((cc+1)*TWO_PI/7)*radiu*1/3);\n line(w1+cos(cc*TWO_PI/7)*radiu*2/3, h1+sin(cc*TWO_PI/7)*radiu*2/3, w1+cos((cc+1)*TWO_PI/7)*radiu*2/3, h1+sin((cc+1)*TWO_PI/7)*radiu*2/3);\n line(w1+cos(cc*TWO_PI/7)*radiu*1, h1+sin(cc*TWO_PI/7)*radiu*1, w1+cos((cc+1)*TWO_PI/7)*radiu*1, h1+sin((cc+1)*TWO_PI/7)*radiu*1);\n \n}\n }\n for(int dd=1;dd<8;dd++)\n {if (dd==7)\n {\n line(w2+cos(dd*TWO_PI/7)*radiu*1/3, h2+sin(dd*TWO_PI/7)*radiu*1/3, w2+cos(TWO_PI/7)*radiu*1/3, h2+sin(TWO_PI/7)*radiu*1/3);\n line(w2+cos(dd*TWO_PI/7)*radiu*2/3, h2+sin(dd*TWO_PI/7)*radiu*2/3, w2+cos(TWO_PI/7)*radiu*2/3, h2+sin(TWO_PI/7)*radiu*2/3);\n line(w2+cos(dd*TWO_PI/7)*radiu*1, h2+sin(dd*TWO_PI/7)*radiu*1, w2+cos(TWO_PI/7)*radiu*1, h2+sin(TWO_PI/7)*radiu*1);\n \n}\n else{\n line(w2+cos(dd*TWO_PI/7)*radiu*1/3, h2+sin(dd*TWO_PI/7)*radiu*1/3, w2+cos((dd+1)*TWO_PI/7)*radiu*1/3, h2+sin((dd+1)*TWO_PI/7)*radiu*1/3);\n line(w2+cos(dd*TWO_PI/7)*radiu*2/3, h2+sin(dd*TWO_PI/7)*radiu*2/3, w2+cos((dd+1)*TWO_PI/7)*radiu*2/3, h2+sin((dd+1)*TWO_PI/7)*radiu*2/3);\n line(w2+cos(dd*TWO_PI/7)*radiu*1, h2+sin(dd*TWO_PI/7)*radiu*1, w2+cos((dd+1)*TWO_PI/7)*radiu*1, h2+sin((dd+1)*TWO_PI/7)*radiu*1);\n }\n }\n pushMatrix();\n translate(w1, h1);\n stroke(0);\n strokeWeight(1);\n star(0, 0, 0, 70, 7);\n popMatrix();\n pushMatrix();\n translate(w2, h2);\n stroke(0);\n strokeWeight(1);\n star(0, 0, 0, 70, 7);\n popMatrix();\n fill(255);\n ellipse(w3, h3, 140, 140);\n stroke(0);\n strokeWeight(1);\n textSize(20);\n fill(50);\n //label the weekends7\n text(\"bike\", w1+cos(TWO_PI/7)*(radiu+10), h1+sin(TWO_PI/7)*(radiu+10)); \n text(\"bus\", w1+cos(2*TWO_PI/7)*(radiu+55), h1+sin(2*TWO_PI/7)*(radiu+15)); \n text(\"car\", w1+cos(3*TWO_PI/7)*(radiu+40), h1+sin(3*TWO_PI/7)*(radiu+10)); \n text(\"subway\", w1+cos(4*TWO_PI/7)*(radiu+85), h1+sin(4*TWO_PI/7)*(radiu+10)); \n text(\"taxi\", w1+cos(5*TWO_PI/7)*(radiu+10), h1+sin(5*TWO_PI/7)*(radiu+10)); \n text(\"train\", w1+cos(6*TWO_PI/7)*(radiu+10), h1+sin(6*TWO_PI/7)*(radiu+10)); \n text(\"walk\", w1+cos(7*TWO_PI/7)*(radiu+10), h1+sin(7*TWO_PI/7)*(radiu+10)); \n //label the weekdays\n text(\"bike\", w2+cos(TWO_PI/7)*(radiu+10), h2+sin(TWO_PI/7)*(radiu+10)); \n text(\"bus\", w2+cos(2*TWO_PI/7)*(radiu+55), h2+sin(2*TWO_PI/7)*(radiu+15)); \n text(\"car\", w2+cos(3*TWO_PI/7)*(radiu+40), h2+sin(3*TWO_PI/7)*(radiu+10)); \n text(\"subway\", w2+cos(4*TWO_PI/7)*(radiu+85), h2+sin(4*TWO_PI/7)*(radiu+10)); \n text(\"taxi\", w2+cos(5*TWO_PI/7)*(radiu+10), h2+sin(5*TWO_PI/7)*(radiu+10)); \n text(\"train\", w2+cos(6*TWO_PI/7)*(radiu+10), h2+sin(6*TWO_PI/7)*(radiu+10)); \n text(\"walk\", w2+cos(7*TWO_PI/7)*(radiu+10), h2+sin(7*TWO_PI/7)*(radiu+10));\n}",
"public void mo7192B() {\n View m = mo23948m();\n if (m != null) {\n this.f15664t0.onEnterDiscoverMode();\n boolean z = this.f15653i0 > 0;\n int i = this.f15653i0;\n m.performHapticFeedback(0);\n ObjectAnimator ofFloat = ObjectAnimator.ofFloat(this.f15643Y, View.TRANSLATION_Y, new float[]{0.0f, (float) (-C3200e0.m10183a((Context) mo23920b(), -100))});\n ObjectAnimator ofFloat2 = ObjectAnimator.ofFloat(this.f15643Y, View.ALPHA, new float[]{1.0f, 0.0f});\n ObjectAnimator ofFloat3 = ObjectAnimator.ofFloat(this.f15637S, View.TRANSLATION_X, new float[]{0.0f, (float) C3200e0.m10183a((Context) mo23920b(), -100)});\n ObjectAnimator ofFloat4 = ObjectAnimator.ofFloat(this.f15637S, View.ALPHA, new float[]{1.0f, 0.0f});\n ObjectAnimator ofFloat5 = ObjectAnimator.ofFloat(this.f15641W, View.TRANSLATION_X, new float[]{0.0f, (float) C3200e0.m10183a((Context) mo23920b(), 100)});\n ObjectAnimator ofFloat6 = ObjectAnimator.ofFloat(this.f15641W, View.ALPHA, new float[]{1.0f, 0.0f});\n ofFloat6.addListener(new C6250b());\n float scaleX = this.f15639U.getScaleX();\n ObjectAnimator ofFloat7 = ObjectAnimator.ofFloat(this.f15639U, View.SCALE_X, new float[]{1.0f, 0.0f});\n ofFloat7.setDuration(200);\n ofFloat7.setInterpolator(C7657c.m18641a());\n float scaleY = this.f15639U.getScaleY();\n ObjectAnimator ofFloat8 = ObjectAnimator.ofFloat(this.f15639U, View.SCALE_Y, new float[]{1.0f, 0.0f});\n ofFloat8.setDuration(200);\n ofFloat8.setInterpolator(C7657c.m18641a());\n ofFloat8.addListener(new C6251c(scaleX, scaleY));\n ObjectAnimator ofFloat9 = ObjectAnimator.ofFloat(this.f15646b0, View.SCALE_X, new float[]{0.0f, 1.0f});\n ofFloat9.setStartDelay(200);\n ofFloat9.setInterpolator(C7657c.m18650f());\n ObjectAnimator ofFloat10 = ObjectAnimator.ofFloat(this.f15646b0, View.SCALE_Y, new float[]{0.0f, 1.0f});\n ofFloat10.setStartDelay(200);\n ofFloat10.setInterpolator(C7657c.m18650f());\n ofFloat10.addListener(new C6252d(z, i));\n AnimatorSet animatorSet = new AnimatorSet();\n animatorSet.playTogether(new Animator[]{ofFloat, ofFloat2, ofFloat3, ofFloat4, ofFloat5, ofFloat6, ofFloat7, ofFloat8, ofFloat9, ofFloat10});\n animatorSet.start();\n this.f15651g0 = true;\n ((MeUserManager) this.f15668x0.get()).mo8754a(true);\n if (this.f15648d0.getComposition() == null) {\n C8507d.m19679a((Context) mo9304A(), (int) R.raw.lottie_discover_globe).mo23032b(new C6210h(this));\n }\n }\n }",
"private void dist2Pos2Beacons(){\n double dist = Math.sqrt(Math.pow(posReceiver[0][0] - posReceiver[1][0], 2) + Math.pow(posReceiver[0][1] - posReceiver[1][1], 2));\n //Wenn Distanz ist größer als summe der Radien, dann gibt es keine Überschneidungen\n if (dist > (radius[0] + radius[1])) {\n //Berechne mittlere Distanz zwischen den Empfängern, da sich Kreise nicht überschneiden\n xPos_func = (posReceiver[0][0] + posReceiver[1][0]) / 2;\n yPos_func = (posReceiver[0][1] + posReceiver[1][1]) / 2;\n }\n else {\n double[][] pos = circlepoints2(posReceiver[0][0], posReceiver[0][1], posReceiver[1][0], posReceiver[1][1], radius[0], radius[1]);\n //Schnittpunkte sind identisch, Beacon ist exakt zu lokalisieren\n if ((pos[0][0] == pos[1][0]) && (pos[0][1] == pos[1][1])) {\n xPos_func = pos[0][0];\n yPos_func = pos[0][1];\n }else {\n xPos_func = (pos[0][0] + pos[1][0]) / 2;\n yPos_func = (pos[0][1] + pos[1][1]) / 2;\n errRad_func = Math.abs(dist -(radius[0] + radius[1]));\n }\n }\n }",
"private void testGrab()\n {\n if(gamepad1.y) {\n //move to position where it touches block ----might have to change angle based on trial----\n //Drastic angles at the moment for testing\n servoLeft.setPosition(0.5);\n //servoRight.setPosition(0.5);\n }\n }",
"public void gingerbreadMan ()\n {\n\tColor cookieBrown = new Color (204, 102, 0);\n\tColor cookieDarkBrown = new Color (170, 85, 0);\n\tColor offWhite = new Color (255, 250, 205);\n\tColor darkBrown = new Color (255, 250, 205);\n\tColor pink = new Color (250, 128, 114);\n\tColor blue = new Color (74, 206, 244);\n\tColor darkGreen = new Color (119, 119, 0);\n\n\n\t//for loop to animate the gingerbread man running forward\n\tfor (int y = 0 ; y < 530 ; y++)\n\t{\n\t //erase\n\t c.setColor (darkGreen);\n\t c.fillRect (-106 + y, 340, 106, 120);\n\t //left arm\n\t c.setColor (cookieBrown);\n\t for (int x = 0 ; x < 20 ; x++)\n\t {\n\t\tc.drawLine (-95 + y, 390 - x, -60 + y, 395 - x);\n\t }\n\t c.fillOval (-105 + y, 371, 20, 20);\n\t //right arm\n\t c.setColor (cookieDarkBrown);\n\t for (int x = 0 ; x < 20 ; x++)\n\t {\n\t\tc.drawLine (-50 + y, 400 - x, -10 + y, 390 - x);\n\t }\n\t c.fillOval (-20 + y, 371, 20, 20);\n\t //left leg\n\t for (int x = 0 ; x < 20 ; x++)\n\t {\n\t\tc.drawLine (-45 + y, 430 - x, -90 + y, 445 - x);\n\t }\n\t c.fillOval (-100 + y, 425, 20, 20);\n\t c.setColor (cookieBrown);\n\t //right leg\n\t for (int x = 0 ; x < 20 ; x++)\n\t {\n\t\tc.drawLine (-65 + x + y, 430, -50 + x + y, 450);\n\t }\n\t c.fillOval (-50 + y, 440, 20, 20);\n\t //head\n\t c.fillOval (-70 + y, 340, 40, 40);\n\t //body\n\t c.setColor (cookieBrown);\n\t c.fillOval (-75 + y, 375, 40, 60);\n\t //facial features\n\t c.setColor (Color.black);\n\t c.fillOval (-50 + y, 353, 3, 5);\n\t c.fillOval (-40 + y, 355, 3, 5);\n\t c.drawArc (-55 + y, 355, 20, 15, 190, 120);\n\t c.setColor (pink);\n\t c.fillOval (-58 + y, 358, 7, 7);\n\t c.fillOval (-38 + y, 362, 7, 7);\n\t c.setColor (offWhite);\n\t //left eyebrow\n\t for (int x = 0 ; x < 5 ; x++)\n\t {\n\t\tc.drawArc (-60 + x + y, 346, 20, 20, 110, 40);\n\t }\n\t //limb features of white icing\n\t for (int x = 0 ; x < 5 ; x++)\n\t {\n\t\t//right hand\n\t\tc.drawArc (-15 - x + y, 370, 20, 20, 150, 90);\n\t\t//left hand\n\t\tc.drawArc (-115 + x + y, 371, 20, 20, 320, 90);\n\t\t//right leg\n\t\tc.drawArc (-45 + y, 445 - x, 20, 20, 100, 80);\n\t\t//left leg\n\t\tc.drawArc (-110 + x + y, 425, 20, 20, 320, 80);\n\t }\n\t //candy buttons\n\t c.setColor (blue);\n\t c.fillOval (-50 + y, 390, 7, 7);\n\t c.fillOval (-50 + y, 400, 7, 7);\n\t //to delay the animation\n\t try\n\t {\n\t\tsleep (1);\n\t }\n\t catch (Exception e)\n\t {\n\t }\n\n\n\t}\n\n }",
"@Override\n public void onSensorChanged(SensorEvent event) {\n if (timerFlag) {\n sendInfo(\"heart\", (sim_flag ? bpm/sim_scale : bpm));\n timerFlag = false;\n\n HR_i++;\n if(HR_i>9) {\n HR_i = 0;\n over = true;\n }\n\n if (over)\n {\n HeartRateAvg = 0;\n for (int i=0;i<10;i++)\n {\n HeartRateAvg = HeartRateAvg + HeartRate[i];\n }\n HeartRateAvg = HeartRateAvg/10;\n if ((bpm>HeartRateAvg*1.3 || bpm<HeartRateAvg*0.7) && !sendAttackFlag && sendAttackFlagCnt>15)\n {\n sendInfo(\"attack\",0);\n sendAttackFlag = true;\n Toast.makeText(getApplicationContext(), \"HeartAttack\", Toast.LENGTH_SHORT).show();\n }\n sendAttackFlagCnt++;\n if (sendAttackFlag) {\n sendAttackFlagCnt++;\n if (sendAttackFlagCnt>10)\n {\n sendAttackFlagCnt=0;\n sendAttackFlag = false;\n }\n }\n }\n HeartRate[HR_i] = bpm;\n sendInfo (\"avg\", HeartRateAvg);\n }\n\n // Update the accelerometer\n if (flag) {\n if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n final float alpha = (float) 0.8;\n // Isolate the force of gravity with the low-pass filter.\n gravity[0] = alpha * gravity[0] + (1 - alpha) * event.values[0];\n gravity[1] = alpha * gravity[1] + (1 - alpha) * event.values[1];\n gravity[2] = alpha * gravity[2] + (1 - alpha) * event.values[2];\n\n // Remove the gravity contribution with the high-pass filter.\n linear_acceleration[0] = event.values[0] - gravity[0];\n linear_acceleration[1] = event.values[1] - gravity[1];\n linear_acceleration[2] = event.values[2] - gravity[2];\n\n totAcc = Math.sqrt(linear_acceleration[0] * linear_acceleration[0] +\n linear_acceleration[1] * linear_acceleration[1] +\n linear_acceleration[2] * linear_acceleration[2]);\n\n fallAcc = linear_acceleration[2];\n }\n\n // Update the heart rate\n if (event.sensor.getType() == Sensor.TYPE_HEART_RATE) {\n bpm = event.values[0];\n if (sim_flag)\n bpm = bpm/sim_scale;\n\n String message = String.valueOf ((int) bpm) + \" bpm\";\n heart.setText(message);\n }\n\n flag = false;\n\n FallCounter = ((totAcc > threshold) ? FallCounter + 1 : 0);\n\n if (FallCounter == 5 && !detected) {\n fallDetectionAction();\n }\n }\n }",
"@Override\n public void robotPeriodic() {\n double high = m_filter.calculate(m_photoHigh.getValue());// * kValueToInches;\n double low = m_filter.calculate(m_photoLow.getValue()); //* kValueToInches;\n if (low<=6){\n BallPresent = true;\n //stop motor if ultrasonic sensor median falls below 6 inches indicating a ball is blocking the sensor\n m_RightMotor.set(ControlMode.PercentOutput, 0);\n } else {\n BallPresent = false;\n //stop motor if ultrasonic sensor median falls below 6 inches indicating a ball is blocking the sensor\n m_RightMotor.set(ControlMode.PercentOutput, 0.5);\n }\n /*Shuffleboard.getTab(\"Shooter\").add(\"Ball Present\", BallPresent)\n .withWidget(BuiltInWidgets.kBooleanBox)\n .withPosition(0, 0)\n .withSize(1, 1)\n .withProperties(Map.of(\"colorWhenTrue\",\"green\",\"colorWhenFalse\",\"black\"));*/\n SmartDashboard.putNumber(\"High\", high);\n SmartDashboard.putNumber(\"Low\", low); \n /*Shuffleboard.getTab(\"Shooter\").add(\"Ultrasonic 1\", currentDistance)\n .withWidget(BuiltInWidgets.kGraph)\n .withPosition(0, 2)\n .withSize(4, 4);*/\n // convert distance error to a motor speed\n //double currentSpeed = (kHoldDistance - currentDistance) * kP;\n\n // drive robot\n //m_robotDrive.arcadeDrive(currentSpeed, 0);\n }",
"public BufferedImage getThresh(BufferedImage img, int left, int right, int top, int bottom) { // Method to get thresholded image \n\t\t//Vision.logger.debug(\"Starting thresholding\");\n\n\t\t//stops it fucking up the locations before we've given it the thresholds\n\t\tif (worldState.isClickingDone()){\n\n\t\t\tnewBluePixels = new ArrayList<Point>();\n\t\t\tnewYellowPixels = new ArrayList<Point>();\n\t\t\tArrayList<Point> bluePixels = new ArrayList<Point>();\n\t\t\tArrayList<Point> yellowPixels = new ArrayList<Point>();\n\t\t\t/*pitch = worldState.getRoom();\n\t\t\twidth = right-left;\n\t\t\theight = top-bottom;*/\n\n\t\t\t/*\n Initialising to one to stop java dividing by 0 when it shouldn't\n\t\t\t */\n\t\t\tredCountA = 0;\n\t\t\tredCountB = 0;\n\t\t\tredCountC = 0;\n\t\t\tredCountD = 0;\n\t\t\tredCountE = 0;\n\t\t\tredCentroidA.setLocation(0,0);\n\t\t\tredCentroidB.setLocation(0,0);\n\t\t\tredCentroidC.setLocation(0,0);\n\t\t\tredCentroidD.setLocation(0,0);\n\t\t\tredCentroidE.setLocation(0,0);\n\n\t\t\tblueCountA = 0;\n\t\t\tblueCountB = 0;\n\t\t\tblueCountC = 0;\n\t\t\tblueCountD = 0;\n\t\t\tblueCountE = 0;\n\t\t\tblueCentroidA.setLocation(0,0);\n\t\t\tblueCentroidB.setLocation(0,0);\n\t\t\tblueCentroidC.setLocation(0,0);\n\t\t\tblueCentroidD.setLocation(0,0);\n\t\t\tblueCentroidE.setLocation(0,0);\n\n\t\t\tyellowCountA = 0;\n\t\t\tyellowCountB = 0;\n\t\t\tyellowCountC = 0;\n\t\t\tyellowCountD = 0;\n\t\t\tyellowCountE = 0;\n\t\t\tyellowCentroidA.setLocation(0,0);\n\t\t\tyellowCentroidB.setLocation(0,0);\n\t\t\tyellowCentroidC.setLocation(0,0);\n\t\t\tyellowCentroidD.setLocation(0,0);\n\t\t\tyellowCentroidE.setLocation(0,0);\n\n\t\t\t//Vision.logger.debug(\"Iterating image\");\n\t\t\tfor (int i = left; i < right; i++) {\n\t\t\t\tfor (int j = top; j < bottom; j++) {\n\t\t\t\t\t//Vision.logger.debug(\"Oh dear (i,j) = \" + Integer.toString(i) + \",\" + Integer.toString(j) + \")\");\n\t\t\t\t\tc = new Color(img.getRGB(i,j));\n\n\t\t\t\t\tGB = Math.abs((c.getBlue() - c.getGreen()));\n\t\t\t\t\tRG = Math.abs((c.getRed() - c.getGreen()));\n\t\t\t\t\t//RB = Math.abs((c.getRed() - c.getBlue()));\n\n\t\t\t\t\tif(isRed(c, GB)){ // was inside RB > 50 && RG > 50\n\t\t\t\t\t\timg.setRGB(i, j, Color.red.getRGB()); //Red Ball\n\t\t\t\t\t\trandy = Math.random();\n\t\t\t\t\t\tif (randy > 0 && randy <= 0.2){\t\t\t\t\t\t \n\t\t\t\t\t\t\tredCountA++;\n\t\t\t\t\t\t\tredCentroidA.setLocation(redCentroidA.getX() + i, redCentroidA.getY() + j);\n\t\t\t\t\t\t}else if (randy > 0.2 && randy <= 0.4){\n\t\t\t\t\t\t\tredCountB++;\n\t\t\t\t\t\t\tredCentroidB.setLocation(redCentroidB.getX() + i, redCentroidB.getY() + j);\n\t\t\t\t\t\t}else if (randy > 0.4 && randy <= 0.6){\n\t\t\t\t\t\t\tredCountC++;\n\t\t\t\t\t\t\tredCentroidC.setLocation(redCentroidC.getX() + i, redCentroidC.getY() + j);\n\t\t\t\t\t\t}else if (randy > 0.6 && randy <= 0.8){\n\t\t\t\t\t\t\tredCountD++;\n\t\t\t\t\t\t\tredCentroidD.setLocation(redCentroidD.getX() + i, redCentroidD.getY() + j);\n\t\t\t\t\t\t}else if (randy > 0.8 && randy <= 1){\n\t\t\t\t\t\t\tredCountE++;\n\t\t\t\t\t\t\tredCentroidE.setLocation(redCentroidE.getX() + i, redCentroidE.getY() + j);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\telse if (isYellow(c)) {\n\t\t\t\t\t\tsetCs(i,j,right,left,top,bottom, img);\n\t\t\t\t\t\tif (isYellow(cS) && isYellow(cE) && isYellow(cEE) && isYellow(cEN) && isYellow(cSS) && isYellow(cSW) ){\n\t\t\t\t\t\t\timg.setRGB(i, j, Color.yellow.getRGB()); // Yellow robot\n\t\t\t\t\t\t\tyellowRobotX.add(i);\n\t\t\t\t\t\t\tyellowRobotY.add(j);\n\t\t\t\t\t\t\trandy = Math.random();\n\t\t\t\t\t\t\tif (randy > 0 && randy <= 0.2){\t\t\t\t\t\t \n\t\t\t\t\t\t\t\tyellowCountA++;\n\t\t\t\t\t\t\t\tyellowCentroidA.setLocation(yellowCentroidA.getX() + i, yellowCentroidA.getY() + j);\n\t\t\t\t\t\t\t}else if (randy > 0.2 && randy <= 0.4){\n\t\t\t\t\t\t\t\tyellowCountB++;\n\t\t\t\t\t\t\t\tyellowCentroidB.setLocation(yellowCentroidB.getX() + i, yellowCentroidB.getY() + j);\n\t\t\t\t\t\t\t}else if (randy > 0.4 && randy <= 0.6){\n\t\t\t\t\t\t\t\tyellowCountC++;\n\t\t\t\t\t\t\t\tyellowCentroidC.setLocation(yellowCentroidC.getX() + i, yellowCentroidC.getY() + j);\n\t\t\t\t\t\t\t}else if (randy > 0.6 && randy <= 0.8){\n\t\t\t\t\t\t\t\tyellowCountD++;\n\t\t\t\t\t\t\t\tyellowCentroidD.setLocation(yellowCentroidD.getX() + i, yellowCentroidD.getY() + j);\n\t\t\t\t\t\t\t}else if (randy > 0.8 && randy <= 1){\n\t\t\t\t\t\t\t\tyellowCountE++;\n\t\t\t\t\t\t\t\tyellowCentroidE.setLocation(yellowCentroidE.getX() + i, yellowCentroidE.getY() + j);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tyellowPixels.add(new Point(i,j));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (isBlue(c)){\n\t\t\t\t\t\tsetCs(i,j,right,left,top,bottom, img);\n\t\t\t\t\t\tif (isBlue(cS) && isBlue(cE) && isBlue(cEE) && isBlue(cEN) && isBlue(cSS) && isBlue(cSW) ){\n\t\t\t\t\t\t\timg.setRGB(i, j, Color.blue.getRGB()); // Blue robot \n\t\t\t\t\t\t\tblueRobotX.add(i);\n\t\t\t\t\t\t\tblueRobotY.add(j);\n\t\t\t\t\t\t\trandy = Math.random();\n\t\t\t\t\t\t\tif (randy > 0 && randy <= 0.2){\t\t\t\t\t\t \n\t\t\t\t\t\t\t\tblueCountA++;\n\t\t\t\t\t\t\t\tblueCentroidA.setLocation(blueCentroidA.getX() + i, blueCentroidA.getY() + j);\n\t\t\t\t\t\t\t}else if (randy > 0.2 && randy <= 0.4){\n\t\t\t\t\t\t\t\tblueCountB++;\n\t\t\t\t\t\t\t\tblueCentroidB.setLocation(blueCentroidB.getX() + i, blueCentroidB.getY() + j);\n\t\t\t\t\t\t\t}else if (randy > 0.4 && randy <= 0.6){\n\t\t\t\t\t\t\t\tblueCountC++;\n\t\t\t\t\t\t\t\tblueCentroidC.setLocation(blueCentroidC.getX() + i, blueCentroidC.getY() + j);\n\t\t\t\t\t\t\t}else if (randy > 0.6 && randy <= 0.8){\n\t\t\t\t\t\t\t\tblueCountD++;\n\t\t\t\t\t\t\t\tblueCentroidD.setLocation(blueCentroidD.getX() + i, blueCentroidD.getY() + j);\n\t\t\t\t\t\t\t}else if (randy > 0.8 && randy <= 1){\n\t\t\t\t\t\t\t\tblueCountE++;\n\t\t\t\t\t\t\t\tblueCentroidE.setLocation(blueCentroidE.getX() + i, blueCentroidE.getY() + j);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbluePixels.add(new Point(i,j));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//make blue thresholds for the different pitches in that [pitch][x] style\n\t\t\t\t\t}\n\t\t\t\t\telse if (isGreen(c,GB,RG)) {\n\t\t\t\t\t\timg.setRGB(i,j, Color.green.getRGB()); // GreenPlates \n\t\t\t\t\t\tif (Point.distance(\tworldState.getBlueRobot().getPosition().getCentre().x,\n\t\t\t\t\t\t\t\tworldState.getBlueRobot().getPosition().getCentre().y,\n\t\t\t\t\t\t\t\ti,j) < 34) {\n\t\t\t\t\t\t\tblueGreenPlate.add(new Point(i,j));\n\t\t\t\t\t\t} \n\t\t\t\t\t\tif (Point.distance(\tworldState.getYellowRobot().getPosition().getCentre().x,\n\t\t\t\t\t\t\t\tworldState.getYellowRobot().getPosition().getCentre().y,\n\t\t\t\t\t\t\t\ti,j) < 34){\n\t\t\t\t\t\t\tyellowGreenPlate.add(new Point(i,j));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (redCountA == 0) redCountA++;\n\t\t\tif (redCountB == 0) redCountB++;\n\t\t\tif (redCountC == 0) redCountC++;\n\t\t\tif (redCountD == 0) redCountD++;\n\t\t\tif (redCountE == 0) redCountE++;\n\t\t\tif (blueCountA == 0) blueCountA++;\n\t\t\tif (blueCountB == 0) blueCountB++;\n\t\t\tif (blueCountC == 0) blueCountC++;\n\t\t\tif (blueCountD == 0) blueCountD++;\n\t\t\tif (blueCountE == 0) blueCountE++;\n\t\t\tif (yellowCountA == 0) yellowCountA++;\n\t\t\tif (yellowCountB == 0) yellowCountB++;\n\t\t\tif (yellowCountC == 0) yellowCountC++;\n\t\t\tif (yellowCountD == 0) yellowCountD++;\n\t\t\tif (yellowCountE == 0) yellowCountE++;\n\n\n\t\t\t//TODO: Run these points through the parralax fix\n\t\t\ttotalRedX = 0;\n\t\t\ttotalRedY = 0;\n\t\t\tnumRedCentroids = 0;\n\n\n\t\t\tredCentroidA.setLocation(redCentroidA.getX()/redCountA, redCentroidA.getY()/redCountA);\n\t\t\tredCentroidB.setLocation(redCentroidB.getX()/redCountB, redCentroidB.getY()/redCountB);\n\t\t\tredCentroidC.setLocation(redCentroidC.getX()/redCountC, redCentroidC.getY()/redCountC);\n\t\t\tredCentroidD.setLocation(redCentroidD.getX()/redCountD, redCentroidD.getY()/redCountD);\n\t\t\tredCentroidE.setLocation(redCentroidE.getX()/redCountE, redCentroidE.getY()/redCountE);\n\n\t\t\ttotalYellowX = 0;\n\t\t\ttotalYellowY = 0;\n\t\t\tnumYellowCentroids = 0;\n\n\n\t\t\tyellowCentroidA.setLocation(yellowCentroidA.getX()/yellowCountA, yellowCentroidA.getY()/yellowCountA);\n\t\t\tyellowCentroidB.setLocation(yellowCentroidB.getX()/yellowCountB, yellowCentroidB.getY()/yellowCountB);\n\t\t\tyellowCentroidC.setLocation(yellowCentroidC.getX()/yellowCountC, yellowCentroidC.getY()/yellowCountC);\n\t\t\tyellowCentroidD.setLocation(yellowCentroidD.getX()/yellowCountD, yellowCentroidD.getY()/yellowCountD);\n\t\t\tyellowCentroidE.setLocation(yellowCentroidE.getX()/yellowCountE, yellowCentroidE.getY()/yellowCountE);\n\n\t\t\ttotalBlueX = 0;\n\t\t\ttotalBlueY = 0;\n\t\t\tnumBlueCentroids = 0;\n\n\n\t\t\tblueCentroidA.setLocation(blueCentroidA.getX()/blueCountA, blueCentroidA.getY()/blueCountA);\n\t\t\tblueCentroidB.setLocation(blueCentroidB.getX()/blueCountB, blueCentroidB.getY()/blueCountB);\n\t\t\tblueCentroidC.setLocation(blueCentroidC.getX()/blueCountC, blueCentroidC.getY()/blueCountC);\n\t\t\tblueCentroidD.setLocation(blueCentroidD.getX()/blueCountD, blueCentroidD.getY()/blueCountD);\n\t\t\tblueCentroidE.setLocation(blueCentroidE.getX()/blueCountE, blueCentroidE.getY()/blueCountE);\n\n\t\t\tc = new Color(img.getRGB((int)redCentroidA.getX(), (int)redCentroidA.getY()));\n\t\t\tif (isRed(c, GB)) {\n\t\t\t\ttotalRedX += redCentroidA.getX();\n\t\t\t\ttotalRedY += redCentroidA.getY();\n\t\t\t\tnumRedCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)redCentroidB.getX(), (int)redCentroidB.getY()));\n\t\t\tif (isRed(c, GB)) {\n\t\t\t\ttotalRedX += redCentroidB.getX();\n\t\t\t\ttotalRedY += redCentroidB.getY();\n\t\t\t\tnumRedCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)redCentroidC.getX(), (int)redCentroidC.getY()));\n\t\t\tif (isRed(c, GB)) {\n\t\t\t\ttotalRedX += redCentroidC.getX();\n\t\t\t\ttotalRedY += redCentroidC.getY();\n\t\t\t\tnumRedCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)redCentroidD.getX(), (int)redCentroidD.getY()));\n\t\t\tif (isRed(c, GB)) {\n\t\t\t\ttotalRedX += redCentroidD.getX();\n\t\t\t\ttotalRedY += redCentroidD.getY();\n\t\t\t\tnumRedCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)redCentroidE.getX(), (int)redCentroidE.getY()));\n\t\t\tif (isRed(c, GB)) {\n\t\t\t\ttotalRedX += redCentroidE.getX();\n\t\t\t\ttotalRedY += redCentroidE.getY();\n\t\t\t\tnumRedCentroids++;\n\t\t\t}\n\n\t\t\tif (numRedCentroids == 0){\n\t\t\t\tnumRedCentroids++;\n\t\t\t}\n\n\t\t\tredX = (int)(totalRedX/numRedCentroids);\n\t\t\tredY = (int)(totalRedY/numRedCentroids);\n\n\t\t\tc = new Color(img.getRGB((int)yellowCentroidA.getX(), (int)yellowCentroidA.getY()));\n\t\t\tif (isYellow(c)) {\n\t\t\t\ttotalYellowX += yellowCentroidA.getX();\n\t\t\t\ttotalYellowY += yellowCentroidA.getY();\n\t\t\t\tnumYellowCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)yellowCentroidB.getX(), (int)yellowCentroidB.getY()));\n\t\t\tif (isYellow(c)) {\n\t\t\t\ttotalYellowX += yellowCentroidB.getX();\n\t\t\t\ttotalYellowY += yellowCentroidB.getY();\n\t\t\t\tnumYellowCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)yellowCentroidC.getX(), (int)yellowCentroidC.getY()));\n\t\t\tif (isYellow(c)) {\n\t\t\t\ttotalYellowX += yellowCentroidC.getX();\n\t\t\t\ttotalYellowY += yellowCentroidC.getY();\n\t\t\t\tnumYellowCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)yellowCentroidD.getX(), (int)yellowCentroidD.getY()));\n\t\t\tif (isYellow(c)) {\n\t\t\t\ttotalYellowX += yellowCentroidD.getX();\n\t\t\t\ttotalYellowY += yellowCentroidD.getY();\n\t\t\t\tnumYellowCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)yellowCentroidE.getX(), (int)yellowCentroidE.getY()));\n\t\t\tif (isYellow(c)) {\n\t\t\t\ttotalYellowX += yellowCentroidE.getX();\n\t\t\t\ttotalYellowY += yellowCentroidE.getY();\n\t\t\t\tnumYellowCentroids++;\n\t\t\t}\n\n\t\t\tif (numYellowCentroids == 0){\n\t\t\t\tnumYellowCentroids++;\n\t\t\t}\n\n\t\t\tyellowX = (int)(totalYellowX/numYellowCentroids);\n\t\t\tyellowY = (int)(totalYellowY/numYellowCentroids);\n\n\t\t\tc = new Color(img.getRGB((int)blueCentroidA.getX(), (int)blueCentroidA.getY()));\n\t\t\tif (isBlue(c)) {\n\t\t\t\ttotalBlueX += blueCentroidA.getX();\n\t\t\t\ttotalBlueY += blueCentroidA.getY();\n\t\t\t\tnumBlueCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)blueCentroidB.getX(), (int)blueCentroidB.getY()));\n\t\t\tif (isBlue(c)) {\n\t\t\t\ttotalBlueX += blueCentroidB.getX();\n\t\t\t\ttotalBlueY += blueCentroidB.getY();\n\t\t\t\tnumBlueCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)blueCentroidC.getX(), (int)blueCentroidC.getY()));\n\t\t\tif (isBlue(c)) {\n\t\t\t\ttotalBlueX += blueCentroidC.getX();\n\t\t\t\ttotalBlueY += blueCentroidC.getY();\n\t\t\t\tnumBlueCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)blueCentroidD.getX(), (int)blueCentroidD.getY()));\n\t\t\tif (isBlue(c)) {\n\t\t\t\ttotalBlueX += blueCentroidD.getX();\n\t\t\t\ttotalBlueY += blueCentroidD.getY();\n\t\t\t\tnumBlueCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)blueCentroidE.getX(), (int)blueCentroidE.getY()));\n\t\t\tif (isBlue(c)) {\n\t\t\t\ttotalBlueX += blueCentroidE.getX();\n\t\t\t\ttotalBlueY += blueCentroidE.getY();\n\t\t\t\tnumBlueCentroids++;\n\t\t\t}\n\n\t\t\tif (numBlueCentroids == 0){\n\t\t\t\tnumBlueCentroids++;\n\t\t\t}\n\n\t\t\tblueX = (int)(totalBlueX/numBlueCentroids);\n\t\t\tblueY = (int)(totalBlueY/numBlueCentroids);\n\n\t\t\tblueGreenPlate4Points = plate.getCorners(blueGreenPlate);\n\t\t\tyellowGreenPlate4Points = plate.getCorners(yellowGreenPlate);\n\n\t\t\tworldState.getBlueRobot().getPosition().setCorners(blueGreenPlate4Points);\n\t\t\tworldState.getYellowRobot().getPosition().setCorners(yellowGreenPlate4Points);\n\n\t\t\tPoint fixBall = new Point(redX,redY);\n\t\t\tif ((redX != 0) && (redY != 0)) {\n\t\t\t\tif (worldState.getBarrelFix()){\n\t\t\t\t\tworldState.setBallPosition(fixBall);\n\t\t\t\t}else{ \n\t\t\t\t\tworldState.setBallPosition(DistortionFix.barrelCorrected(fixBall));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tPoint fixBlue = new Point(blueX,blueY);\n\t\t\tif ((blueX != 0) && (blueY != 0)) {\n\t\t\t\tif (worldState.getBarrelFix()){\n\t\t\t\t\tworldState.setBlueRobotPosition(fixParallax(fixBlue,worldState.getBlueRobot()));\n\t\t\t\t}else{\n\t\t\t\t\tworldState.setBlueRobotPosition(fixParallax(DistortionFix.barrelCorrected(fixBlue),worldState.getBlueRobot()));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tPoint fixYell = new Point(yellowX,yellowY);\n\t\t\tif ((yellowX != 0) && (yellowY != 0)) {\n\t\t\t\tif (worldState.getBarrelFix()){\n\t\t\t\t\tworldState.setYellowRobotPosition(fixParallax(fixYell,worldState.getYellowRobot()));\n\t\t\t\t}else{\n\t\t\t\t\tworldState.setYellowRobotPosition(fixParallax(DistortionFix.barrelCorrected(fixYell),worldState.getYellowRobot()));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor(Point p : bluePixels){\n\n\t\t\t\tif( plate.isInRectangle(p,blueGreenPlate4Points) ){\n\t\t\t\t\tif (worldState.getBarrelFix()){\n\t\t\t\t\t\tnewBluePixels.add(fixParallax(p,worldState.getBlueRobot()));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tnewBluePixels.add(fixParallax(DistortionFix.barrelCorrected(p),worldState.getBlueRobot()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(Point p : yellowPixels){\n\n\t\t\t\tif( plate.isInRectangle(p,yellowGreenPlate4Points) ){\n\t\t\t\t\tif (worldState.getBarrelFix()){\n\t\t\t\t\t\tnewYellowPixels.add(fixParallax(p,worldState.getYellowRobot()));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tnewYellowPixels.add(fixParallax(DistortionFix.barrelCorrected(p),worldState.getYellowRobot()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tworldState.setBluePixels(newBluePixels);\n\t\t\tworldState.setYellowPixels(newYellowPixels);\n\n\t\t\t//The above is supposed to filter the pixels and pick up only the T pixels, but the orientation then is always with the (0,0) point \n\n\n\t\t\tblueGreenPlate.clear();\n\t\t\tyellowGreenPlate.clear();\n\n\t\t}\n\n\t\treturn img;\n\n\t}",
"@Override\n public void loop() {\n rightArm.setTargetPosition((int)(.125* TICKS_PER_WHEEL_ROTATION*8));\n leftArm.setTargetPosition((int)(.125* TICKS_PER_WHEEL_ROTATION*8));\nrightArm.setPower(.6);\nleftArm.setPower(.6);\nif(runtime.seconds()>4&& stage==-1){\n stage++;\n}\n// telemetry.addData(\"IsAligned\" , detector.getAligned()); // Is the bot aligned with the gold mineral?\n// telemetry.addData(\"X Pos\" , detector.getXPosition()); // Gold X position.\n\n //Point screenpos = detector.getScreenPosition();\n if(stage==0) {\n Rect bestRect = detector.getFoundRect();\n\n double xPos = bestRect.x + (bestRect.width / 2);\n\n if (xPos < alignXMax && xPos > alignXMin) {\n aligned = true;\n } else {\n aligned = false;\n }\n telemetry.addData(\"aligned \", aligned);\n\n telemetry.addData(\"xpos \", xPos);\n telemetry.addData(\"amax \", alignXMax);\n telemetry.addData(\"amin \", alignXMin);\n if(!(xPos>0)){\n rightWheel.setPower(0);\n leftWheel.setPower(0);\n telemetry.addLine(\"not detected\");\n }\n else if (xPos > alignXMax) {\n double power = ((xPos - alignXMax) / scale) * .3 + .4;\n rightWheel.setPower(power);\n leftWheel.setPower(-power);\n telemetry.addData(\"powL: \", power);\n telemetry.addLine(\"turning left\");\n runtime.reset();\n } else if (xPos < alignXMin) {\n double power = ((alignXMin - xPos) / scale) * .3 + .4;\n rightWheel.setPower(-power);\n leftWheel.setPower(power);\n telemetry.addData(\"powR: \", power);\n telemetry.addLine(\"turning right\");\n runtime.reset();\n } else {\n rightWheel.setPower(0);\n leftWheel.setPower(0);\n telemetry.addLine(\"found\");\n telemetry.addData(\"secks: \", runtime.seconds());\n if(runtime.seconds()>.1){\n runtime.reset();\n stage++;\n resetDriveEncoders();\n }\n }\n\n\n }\n else if (stage==1){\n rightWheel.setTargetPosition(-3*TICKS_PER_WHEEL_ROTATION);\n leftWheel.setTargetPosition(-3*TICKS_PER_WHEEL_ROTATION);\n leftWheel.setPower(.5);\n rightWheel.setPower(.5);\n if(runtime.seconds()>5){\n rightWheel.setPower(0);\n leftWheel.setPower(0);\n }\n\n }\n\n\n telemetry.addData(\"stage: \", stage);\n telemetry.update();\n }",
"public void setup() {\n kinect = new SimpleOpenNI(this);\n\n gesture = new Gesture();\n\n //pumpController = new PumpController(this);\n\n if(kinect.isInit()==false){\n println(\"kinect can not find\");\n exit();\n return;\n }\n\n kinect.setMirror(true);\n kinect.enableDepth();\n kinect.enableHand();\n kinect.enableUser();\n kinect.startGesture(SimpleOpenNI.GESTURE_HAND_RAISE);\n \n\n /*stroke(255,0,0);\n strokeWeight(2);*/\n background(200,0,0);\n stroke(0,0,255);\n strokeWeight(3);\n smooth();\n\n size(kinect.depthWidth(), kinect.depthHeight());\n}",
"@Override\n\tpublic void run() {\n\t\tsuper.run();\n\t\twhile (true) {\n\n//\t\t\tSystem.out.println(jp + \"/\" + g + \"/\" + h);\n\t\t\tfor (int i = 1; i < inc.length; i++) {\n\t\t\t\tfor (int j = 0; j < 2; j++) {\n\t\t\t\t\tinc[i - 1][j] = inc[i][j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tinc[4][0] = x;\n\t\t\tinc[4][1] = h;\n\t\t\tif (jp == 0) {\n\t\t\t\tg = g + 0.098;\n\t\t\t\th = (int) (h + g);\n\t\t\t} else {\n\t\t\t\tg = g - 0.098;\n\t\t\t\th = (int) (h - g);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tth.sleep(10);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t// p1 = left\n\t\t\t// p2 = up\n\t\t\t// p3 = right\n\t\t\t// p4 = down\n\n\t\t\tp1 = x;\n\t\t\tp2 = h;\n\t\t\tp3 = x + 30;\n\t\t\tp4 = h + 30;\n\n\t\t\tif (p4 + 33 >= 0) {\n\t\t\t\ttry {\n\t\t\t\t\tif (bi.getRGB(p3+5, p4 + 35) == red || bi.getRGB(p1 + 5, p4 + 35) == red) {\n\t\t\t\t\t\tjp = 1;\n\t\t\t\t\t\tdoublejump = 1;\n\t\t\t\t\t\tg = g - m * 0.98;\n\t\t\t\t\t\tif (g <= 1) {\n\t\t\t\t\t\t\tg = 0;\n\t\t\t\t\t\t}\n//\t\t\t\t\t\tSystem.out.println(\"a\");\n\t\t\t\t\t} else if (g <= 0) {\n\t\t\t\t\t\tjp = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif (bi.getRGB(p1 + 5, p2+30) == red || bi.getRGB(p3, p2+30) == red) {\n\t\t\t\t\t\tSystem.out.println(\"a\");\n\t\t\t\t\t\tjp = 0;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n//\t\t\tif (h > botton) {\n//\t\t\t\tjp = 1;\n//\t\t\t\tg = g - m * 0.98;\n//\t\t\t\tif (g <= 2) {\n//\t\t\t\t\tg = 0;\n//\t\t\t\t}\n//\t\t\t} else if (g <= 0) {\n//\t\t\t\tjp = 0;\n//\t\t\t}\n//\t\t\tbotton = 100000;\n\t\t\t\n\t\t\trepaint();\n\t\t\trevalidate();\n\t\t}\n\t}",
"public int mo9772v() {\n int i = this.f9082i;\n if (this.f9080g - i < 4) {\n mo9768h(4);\n i = this.f9082i;\n }\n byte[] bArr = this.f9079f;\n this.f9082i = i + 4;\n return ((bArr[i + 3] & 255) << 24) | (bArr[i] & 255) | ((bArr[i + 1] & 255) << 8) | ((bArr[i + 2] & 255) << 16);\n }",
"@Override\n public void loop() { \n\n double forward = gamepad1.left_stick_y;\n double turn = gamepad1.right_stick_x;\n double collect = gamepad2.left_trigger - gamepad2.right_trigger;\n double wristPower = gamepad1.left_trigger - gamepad1.right_trigger;\n\n if (forward > 0)\n forward = Math.pow(forward, 2);\n else if (forward < 0)\n forward = -Math.pow(forward, 2);\n\n if (turn > 0)\n turn = Math.pow(turn, 2);\n else if (turn < 0)\n turn = -Math.pow(turn, 2);\n//\n// else if(turn < 0)\n// turn = -Math.pow(turn, 2);\n telemetry.addData(\"Forward Power\", forward);\n telemetry.addData(\"Turn Power\", turn);\n left.setPower(Range.clip(forward - turn, -1, 1));\n right.setPower(Range.clip(forward + turn, -1, 1));\n collection.setPower(0.8 * (Range.clip(collect, -1.0, 1.0)));\n wrist.setPower((Range.clip(wristPower, -1, 1)));\n\n //regular servo code\n// if(gamepad1.x && !wristUp) //wrist up\n// {\n// wrist.setPosition(.9);\n// wristUp = true;\n// }\n// else if(gamepad1.x && wristUp) //wrist down\n// { wrist.setPosition(-.9);\n// wristUp = false;\n// }\n// else if(gamepad1.left_trigger > 0 && wrist.getPosition() <= .95)\n// {\n// wrist.setPosition(wrist.getPosition() + 0.005);\n// }\n// else if(gamepad1.right_trigger > 0 && wrist.getPosition() >= -.95)\n// {\n// wrist.setPosition(wrist.getPosition() - 0.005);\n// }\n\n if (lift.getCurrentPosition() >= 0 || lift.getCurrentPosition() <= 3200 || liftOverride){\n if (gamepad2.left_stick_y > 0.2)\n lift.setPower(-1);\n else if (gamepad2.left_stick_y < -0.2)\n lift.setPower(1);\n else\n lift.setPower(0);\n }\n if(gamepad2.right_bumper && gamepad2.y)\n {\n liftOverride = true;\n }\n else if(liftOverride == true)\n {\n lift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lift.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n liftOverride = false;\n }\n telemetry.addData(\"bucket posiition\", bucket.getPosition());\n telemetry.update();\n\n if (gamepad2.a) //bucket dump\n {\n bucket.setPosition(0.75);\n } else if (gamepad2.b) //bucket down\n {\n bucket.setPosition(0);\n } else if (gamepad2.x) //endgame\n bucket.setPosition(0.4);\n if (gamepad2.dpad_up && bucket.getPosition() <= 0.9975)\n bucket.setPosition(bucket.getPosition() + .0025);\n else if (gamepad2.dpad_down && bucket.getPosition() >= -0.9975)\n bucket.setPosition(bucket.getPosition() - .0025);\n\n\n //Press to keep bucket up for endgame\n //NOTE: D-Pad will not work unless gamepad2 B is pressed to end the override\n// if(gamepad2.a && bucketOverride == false) {\n// bucket.setPower(-.4);\n// bucketOverride = true;\n// }\n// else if (gamepad2.a && bucketOverride == true)\n// {\n// bucket.setPower(0);\n// bucketOverride = false;\n// }\n\n if (gamepad1.right_bumper) {\n extension.setPower(1);\n } else if (gamepad1.left_bumper) {\n extension.setPower(-1);\n } else extension.setPower(0);\n\n telemetry.update();\n }",
"@Override\n public void loop() {\n double X = x;\n double Y = y;\n telemetry.addData(\"X\", X);\n telemetry.addData(\"Y\", Y);\n telemetry.addData(\"angle\", angle);\n telemetry.addData(\"EncDr: \",EncDr);\n telemetry.addData(\"EncSp: \",EncSp);\n telemetry.addData(\"EncSt: \",EncSt);\n telemetry.addData(\"MovingAngle:\", Math.toDegrees(Math.atan(gamepad2.right_stick_x / (-gamepad2.right_stick_y))));\n telemetry.update();\n\n }",
"public int getBeacon() {\n \treturn this.beacon;\n }",
"private void turnBeaconOn( byte rollingProxyID[]) {\n\t\t\t\n\t\t\t// rollingProxyID length is well known...\n\t\t\tassert( rollingProxyID.length == Crypto.ROLLING_PROXIMITY_IDENTIFIER_LEN);\n\t\t\t\n\t\t\t// the UUID is MSB\n\t\t\tString beaconUUID = Beacon.proxyToHex( rollingProxyID, true);\n\t\t\tassert( beaconUUID != null && beaconUUID.length() == Beacon.UUID_HEX_LEN);\n\t\t\t\n\t\t\tassert( beaconUUID.length() == UUID_HEX_LEN);\n\t\t\t\n\t\t\t// get the hcitool cmd string(s). see man hcitool\n\t\t\t\n\t\t\t// we need to query the HW to get the TX power. but do this only once...\n\t\t\tint txPower = readHCITxPower();\n\t\t\t\n\t\t\tString hciToolCmds[];\n\t\t\ttry {\n\t\t\t\thciToolCmds = getHCIToolCmds( this.beacon.getAppType(), rollingProxyID, txPower, this.beacon.useRandomAddr());\n\t\t\t} catch (Exception e1) {\n\t\t\t\tlogger.severe( e1.getMessage());\n\t\t\t\te1.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tfinal String envVars[] = { \n\t\t\t\t\t// \"BEACON_UUID=\" + beaconUUID,\n\t\t\t\t\t\"SET_ADV_PARAMS_CMD=\" + hciToolCmds[0],\n\t\t\t\t\t\"SET_ADV_DATA_CMD=\" + hciToolCmds[1],\n\t\t\t\t\t\"SET_ADV_ENABLE_CMD=\" + hciToolCmds[2]\n\t\t\t\t\t} ;\n\t\t\t\n\t\t\tfinal String cmd = \"./scripts/beacon_start\";\n\t\t\t\n\t\t\t// we seem to be getting some unsolicited events...\n\t\t\tboolean status = runScript( cmd, envVars, this.beacon, null);\n\t\t\n\t\t}",
"public synchronized Color scan(){\n \tcolorRGBSensor.fetchSample(sample, 0);\n color.setR(sample[0]*1024);\n color.setG(sample[1]*1024);\n color.setB(sample[2]*1024);\n return color;\n }",
"public static void main(String[] args) throws Exception {\n\t\tBTConnection btc = Bluetooth.waitForConnection();\n\t\tDataInputStream dis = btc.openDataInputStream();\n\t\tDataOutputStream dos = btc.openDataOutputStream();\n\t\tUltrasonicSensor sonar = new UltrasonicSensor(SensorPort.S4);\n\t\tMotor.C.setSpeed(50);\n\t\tLCD.drawString(\"READY\", 0, 10);\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\tbyte cmd = dis.readByte();\n\t\t\t\t\n\t\t\t\tLCD.drawInt(cmd,1,0,0);\n\t\t\t\tfloat param = dis.readFloat();\n\t\t\t\tLCD.drawInt((int) (param + 0.5f),4,0,1);\n\t\t\t\t\n\t\t\t\tswitch (cmd) {\n\t\t\t\tcase ROTATE: \n\t\t\t\t\tMotor.C.rotate((int) (param + 0.5f));\n\t\t\t\t\tdos.writeFloat(0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ROTATETO: \n\t\t\t\t\tMotor.C.rotateTo((int) (param + 0.5f));\n\t\t\t\t\tdos.writeFloat(0);\n\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\tcase RANGE:\n\t\t\t\t\tfloat mean,sum,dist;\n\t\t\t\t\tint j,l;\n\t\t\t\t\t\n\t\t\t\t\twhile (Motor.C.isMoving());\n\t\t\t\t \n\t\t\t\t mean = 0;\n\t\t\t\t \n\t\t\t\t l = j = 25; // try 25 times\n\t\t\t\t Thread.sleep(100);\n\t\t\t\t sum = sonar.getDistance();\n\n\t\t\t\t for (int k = 1; k < l; k++){\n\t\t\t\t \t\tdist = sonar.getDistance();\n\t\t\t\t \t\tif(dist == 255) j--;\n\t\t\t\t \t\telse \t\t\tsum += dist;\n\t\t\t\t }\n\n\t\t\t\t\tThread.sleep(100);\n\t\t\t\t\tmean = (1.0f*sum)/(1.0f*j);\n\t\t\t\t\tdos.writeFloat(mean);\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase STOP:\n\t\t\t\t\tSystem.exit(1);\n\t\t\t\tdefault:\n\t\t\t\t\tdos.writeFloat(-1);\n\t\t\t\t}\n\t\t\t\tdos.flush();\n\t\t\t\t\n\t\t\t} catch (IOException ioe) {\n\t\t\t\tSystem.err.println(\"IO Exception\");\n\t\t\t\tThread.sleep(2000);\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void loop() {\n gp1y = (-1 * gamepad1.left_stick_y);\n // calculations bloc\n // speed - while our technical value is within the range of [-1,1], we'll just keep it\n // positive.\n if (gamepad1.right_bumper) {\n speed = -1 * gamepad1.right_trigger;\n } else {\n speed = gamepad1.right_trigger;\n }\n // angle - this is calculated using the direction our stick is pointing. should be in a\n // range of [0,2pi] like a unit circle. terrible things, unit circles.\n // this means the stick held right should be 2pi.\n angle = Math.atan2(gp1y, gamepad1.left_stick_x);\n // corrections to ensure our angle is like a unit circle instead of delivering a coordinate\n if (angle <= 0) {\n angle += Math.PI * 2;\n }\n /*\n if (gamepad1.left_stick_x == 0 && gamepad1.left_stick_y == 0){\n angle = (Math.PI)/2;\n }\n */\n\n // rotation magnitude\n if (gamepad1.left_bumper){\n rotate = gamepad1.left_trigger * -1;\n } else {\n rotate = gamepad1.left_trigger;\n }\n // alternative rotation mag.\n if (gamepad1.right_stick_x != 0){\n rotate = gamepad1.right_stick_x;\n }\n\n\n //DEBUG: dump outputs\n /*\n telemetry.addData(\"REQUIRED INFORMATION\", \"\");\n telemetry.addData(\"speed:\", speed);\n telemetry.addData(\"angle:\", angle);\n telemetry.addData(\"angle (pi):\", angle/Math.PI);\n telemetry.addData(\"rot. magnitude:\", rotate);\n */\n // calc voltage multipliers\n if (gamepad1.left_stick_x == 0 && gamepad1.left_stick_y == 0) {\n speed = 0;\n }\n voltageMultiplier[0] = speed * Math.cos(angle - (Math.PI/4)) + rotate;\n voltageMultiplier[1] = speed * Math.sin(angle - (Math.PI/4)) - rotate;\n voltageMultiplier[2] = speed * Math.sin(angle - (Math.PI/4)) + rotate;\n voltageMultiplier[3] = speed * Math.cos(angle - (Math.PI/4)) - rotate;\n if (rotate == 0) {\n for (int i = 0; i < 4; i++) {\n voltageMultiplier[i] *= Math.sqrt(2);\n }\n }\n //DEBUG: voltage multiplier output\n /*\n telemetry.addData(\"VOLTAGE MULTIPLIERS (unnormalized)\", \"\");\n telemetry.addData(\"VM1\", voltageMultiplier[0]);\n telemetry.addData(\"VM2\", voltageMultiplier[1]);\n telemetry.addData(\"VM3\", voltageMultiplier[2]);\n telemetry.addData(\"VM4\", voltageMultiplier[3]);\n */\n // begin normalization process\n // store the biggest voltage multiplier\n double topStore = 1;\n for (int x = 0; x < 4; x++){\n if (Math.abs(voltageMultiplier[x]) > topStore) {\n topStore = Math.abs(voltageMultiplier[x]);\n }\n }\n // followed by dividing them all by the top one\n // additionally, do a sanity check that ensures we don't actually do this\n // if our top stored number is \"0\" because that would make NaN and do bad\n // things ;~\n for (int x = 0; x < 4; x++) {\n voltageMultiplier[x] /= topStore;\n }\n /*\n telemetry.addData(\"VOLTAGE MULTIPLIERS (normalized)\", \"\");\n telemetry.addData(\"VM1\", voltageMultiplier[0]);\n telemetry.addData(\"VM2\", voltageMultiplier[1]);\n telemetry.addData(\"VM3\", voltageMultiplier[2]);\n telemetry.addData(\"VM4\", voltageMultiplier[3]);\n */\n if (gamepad1.b) {\n for (int i = 0; i < 4; i++) {\n voltageMultiplier[i] = 0;\n }\n }\n\n if(gamepad1.y){\n robot.arm.setPosition(1); // outwards\n }\n if(gamepad1.x){\n robot.arm.setPosition(0.4); // back up towards robot\n }\n // TODO: gripper implementation and locking setup\n\n if (!(robot.limitTop.getState() && gamepad2.left_stick_y < 0)) {\n robot.lift.setPower(gamepad2.left_stick_y / 2);\n } else if (robot.limitTop.getState()) {\n robot.lift.setPower(0);\n }\n\n // hold a to open gripper to limit.\n // press b to unlock\n if (gamepad2.a){\n robot.gripper.setPower(-GRIPPER_POWER);\n robot.gripper.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n } else if (gamepad2.b){\n robot.gripper.setPower(GRIPPER_POWER);\n robot.gripper.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.FLOAT);\n } else {\n robot.gripper.setPower(0);\n }\n\n telemetry.addData(\"ZPB\", robot.gripper.getZeroPowerBehavior());\n telemetry.addData(\"gp2 y\", gamepad2.left_stick_y);\n telemetry.addData(\"top limiter\", robot.limitTop.getState());\n\n robot.flDrive.setPower(voltageMultiplier[0]);\n robot.frDrive.setPower(voltageMultiplier[1]);\n robot.rlDrive.setPower(voltageMultiplier[2]);\n robot.rrDrive.setPower(voltageMultiplier[3]);\n }",
"void doThreshDisplay(){\n\t /// init colors\n\t int greenFill = color(125,125,0, 65);\n\t int redFill = color(255,0,0,65);\n\t int blueFill = color(0,0,255, 85);\n\t //\n\t float spacing = 15;\n\t // \n\t textFont(SanSerif);\n\t /// hint(ENABLE_NATIVE_FONTS) ;\n\t \n\t /// position\n\t float dPosY3 = 0-height/2;\n\t float dPosY2 = 0-height/2 + spacing;\n\t float dPosY1 = 0-height/2 + spacing + spacing;\n\t \n\t /// make the text flush with the display bar\n\t float dPosX3 = 0-width/2 + (threshold3 * .5f) + 10f;\n\t float dPosX2 = 0-width/2 + (threshold2 * .5f) + 10f;\n\t float dPosX1 = 0-width/2 + (threshold1 * .5f) + 10f;\n\t \n\t // thresh 3 -- green squares\n\t strokeWeight(1);\n\t \n\t fill(greenFill);\n\t stroke(64,208,0);\n\t rect(0-width/2, dPosY3, threshold3 * .5f, 10f);\n\t fill(255,255,0);\n\t text(\"BACKGROUND: \" + threshold3 * .5, dPosX3, dPosY3 + 10);\n\t \n\t \n\t /// thresh 2 -- red circles\n\t fill(redFill);\n\t stroke(204,0,0);\n\t /// rotate(-15);\n\t rect(0-width/2,dPosY2, threshold2 * .5f, 10f);\n\t fill(204,0,0);\n\t text(\"MIDDLEGROUND: \" + threshold2 * .5f, dPosX2, dPosY2 + 10f);\n\t \n\t //// thresh 1 -- blue triangles\n\t fill(blueFill);\n\t stroke(0,24,255);\n\t /// rotate(-15);\n\t rect(0-width/2, dPosY1, threshold1 * .5f, 10f);\n\t fill(0,24,255);\n\t text(\"FOREGROUND: \" + threshold1 * .5, dPosX1, dPosY1 + 10);\n\t \n\t \n\n\n\t}",
"public void skystonePos1() {\n // This method will drive the robot to Skystone Position 1 (Closest to the bridge)\n // Blinked in: Change color SOLID BLUE to indicate we successfully Drove to the stone\n }",
"public final void mo3855c() {\n StringBuilder sb;\n String str;\n int i;\n C0735ko koVar = this.f3511b;\n C0544go goVar = C0544go.f2351M;\n Boolean bool = Boolean.TRUE;\n koVar.getClass();\n String b = C0432eo.m1607b(C0489fo.BLUETOOTH);\n if (b == null) {\n b = C0200av.m970a(-22762010006700L);\n }\n String str2 = b;\n if (!str2.isEmpty() || goVar.mo2961a()) {\n int i2 = -999;\n if (Build.VERSION.SDK_INT < 28) {\n String str3 = goVar.f2410c;\n if (goVar == C0544go.f2374g || goVar == C0544go.f2376h || goVar == C0544go.f2352N) {\n str3 = C0200av.m970a(-25996120380588L);\n }\n try {\n i2 = ((Integer) (C0735ko.f3016e.getParameterTypes().length == 4 ? C0735ko.f3016e.invoke(C0735ko.f3015d, new Object[]{Integer.valueOf(goVar.f2409b), 1, str2, str3}) : C0735ko.f3016e.invoke(C0735ko.f3015d, new Object[]{Integer.valueOf(goVar.f2409b), 1, str2}))).intValue();\n } catch (Exception e) {\n Throwable d = C0279ch.m1107d(-26979667891372L, C0279ch.m1118o(e, C0279ch.m1104a(-26756329591980L, C0279ch.m1106c(C0200av.m970a(-26077724759212L)), e, C0200av.m970a(-26726264820908L), -26919538349228L), -26949603120300L), e);\n if (d != null) {\n C0279ch.m1115l(-27091337041068L, new StringBuilder(), d, C0200av.m970a(-27061272269996L), d);\n } else {\n C0550gu.m1819a(C0200av.m970a(-27125696779436L), C0200av.m970a(-27155761550508L));\n }\n C0550gu.m1821c(e);\n i = -999;\n }\n } else if (koVar.f3020a == null) {\n C0550gu.m1819a(C0200av.m970a(-24411277448364L), C0200av.m970a(-24441342219436L));\n i = 1;\n String a = C0200av.m970a(-26322537895084L);\n StringBuilder sb2 = new StringBuilder();\n C0279ch.m1113j(-26352602666156L, sb2, 35, -26374077502636L, bool, -26386962404524L, str2);\n C0279ch.m1111h(-26412732208300L, sb2, i);\n str = a;\n sb = sb2;\n } else {\n String a2 = C0200av.m970a(-24518651630764L);\n try {\n if (C0735ko.f3017f.getParameterTypes().length == 3) {\n C0735ko.f3017f.invoke(koVar.f3020a, new Object[]{Integer.valueOf(goVar.f2409b), 1, a2});\n } else {\n C0735ko.f3017f.invoke(koVar.f3020a, new Object[]{Integer.valueOf(goVar.f2409b), 1, str2, a2});\n }\n i2 = 0;\n } catch (Throwable th) {\n Throwable e2 = C0279ch.m1108e(-26979667891372L, C0279ch.m1123t(th, C0279ch.m1105b(-26756329591980L, C0279ch.m1106c(C0200av.m970a(-24600256009388L)), th, C0200av.m970a(-26726264820908L), -26919538349228L), -26949603120300L), th);\n if (e2 != null) {\n C0279ch.m1115l(-27091337041068L, new StringBuilder(), e2, C0200av.m970a(-27061272269996L), e2);\n } else {\n C0550gu.m1819a(C0200av.m970a(-27125696779436L), C0200av.m970a(-27155761550508L));\n }\n C0550gu.m1821c(th);\n }\n }\n i = i2;\n String a3 = C0200av.m970a(-26322537895084L);\n StringBuilder sb22 = new StringBuilder();\n C0279ch.m1113j(-26352602666156L, sb22, 35, -26374077502636L, bool, -26386962404524L, str2);\n C0279ch.m1111h(-26412732208300L, sb22, i);\n str = a3;\n sb = sb22;\n } else {\n str = C0200av.m970a(-26107789530284L);\n sb = new StringBuilder();\n C0279ch.m1112i(-26137854301356L, sb, 35, -26206573778092L);\n }\n C0279ch.m1117n(sb, str, 100);\n AudioManager audioManager = this.f3511b.f3020a;\n if (audioManager != null) {\n audioManager.startBluetoothSco();\n }\n }",
"public void teleopPeriodic() {\n\n \t//NetworkCommAssembly.updateValues();\n \t\n\t\t// both buttons pressed simultaneously, time to cal to ground\n\t\tif (gamepad.getRawButton(FRONT_ARM_GROUND_CAL_BUTTON1) && gamepad.getRawButton(FRONT_ARM_GROUND_CAL_BUTTON2)) {\n\t\t\tprocessGroundCal();\n\t\t}\n\n\t\t// PID CONTROL ONLY\n\t\tdouble armDeltaPos = gamepad.getRawAxis(1);\n\t\tif (Math.abs(armDeltaPos) < ARM_DEADZONE) {\n\t\t\tarmDeltaPos = 0.0f;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tarmDeltaPos *= ARM_POS_MULTIPLIER;\n\t\t\tdouble currPos = testMotor.getPosition();\n\t\t\t\n\t\t\tif (((currPos > SOFT_ENCODER_LIMIT_MAX) && armDeltaPos > 0.0) || ((currPos < SOFT_ENCODER_LIMIT_FLOOR) && armDeltaPos < 0.0)) {\n\t\t\t\tSystem.out.println(\"SOFT ARM LIMIT HIT! Setting armDeltaPos to zero\");\n\t\t\t\tarmDeltaPos = 0.0;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tdouble newPos = currPos + armDeltaPos;\n\t\t\ttestMotor.set(newPos);\n\t\t\tSystem.out.println(\"Setting new front arm pos = \" + newPos);\t\n\t\t}\t\t\n\n \t/*\n\t\tdouble newArmPos = gamepad.getRawAxis(1);\n\t\tif(Math.abs(newArmPos) <= ARM_DEADZONE) {\n\t\t\tnewArmPos = 0.0;\n\t\t}\n\t\tdouble newMotorPos = (newArmPos * ARM_SPEED_MULTIPLIER) + testMotor.getPosition();\n\t\tpositionMoveByCount(newMotorPos);\n\t\tSystem.out.println(\"input = \" + newArmPos + \" target pos = \" + newMotorPos + \" enc pos = \" + testMotor.getPosition());\n \t*/\n \t\n\t\t// PercentVbus test ONLY!!\n \t/*\n\t\tdouble armSpeed = gamepad.getRawAxis(1);\n\t\tif (Math.abs(armSpeed) < ARM_DEADZONE) {\n\t\t\tarmSpeed = 0.0f;\n\t\t}\t\n\t\tarmSpeed *= ARM_MULTIPLIER;\n\t\t\n\t\tdouble pos= testMotor.getPosition();\n\t\tif (((pos > SOFT_ENCODER_LIMIT_1) && armSpeed < 0.0) || ((pos < SOFT_ENCODER_LIMIT_2) && armSpeed > 0.0))\n\t\t\tarmSpeed = 0.0;\n\t\ttestMotor.set(armSpeed);\n\t\t\n\t\tSystem.out.println(\"armSpeed = \" + armSpeed + \" enc pos = \" + testMotor.getPosition());\n\t\t */ \n }",
"void type1(byte[] byteBuffer){\n conType \t= byteBuffer[2] & 0b00001111;\n lasX \t\t= readAsUnsignedByte(byteBuffer[3]); //left analog stick\n lasY \t\t= readAsUnsignedByte(byteBuffer[4]); //value from 0 to 255.\n rasX \t\t= readAsUnsignedByte(byteBuffer[5]); //right analog stick\n rasY \t\t= readAsUnsignedByte(byteBuffer[6]);\n fbA \t\t= boolFrByte(byteBuffer[7],7);\n fbB \t\t= boolFrByte(byteBuffer[7],6);\n fbX \t\t= boolFrByte(byteBuffer[7],5);\n fbY \t\t= boolFrByte(byteBuffer[7],4);\n dpD \t\t= boolFrByte(byteBuffer[7],3);\n dpR \t\t= boolFrByte(byteBuffer[7],2);\n dpL \t\t= boolFrByte(byteBuffer[7],1);\n dpU \t\t= boolFrByte(byteBuffer[7],0);\n btnStart \t= boolFrByte(byteBuffer[8],7);\n btnSelect \t= boolFrByte(byteBuffer[8],6);\n stickL \t\t= boolFrByte(byteBuffer[8],5);\n stickR \t\t= boolFrByte(byteBuffer[8],4);\n shL \t\t= boolFrByte(byteBuffer[8],3); //shoulder button\n shR \t\t= boolFrByte(byteBuffer[8],2);\n trigL \t\t= boolFrByte(byteBuffer[8],1); //trigger button\n trigR \t\t= boolFrByte(byteBuffer[8],0);\n }",
"public void loop()\n {\n double rightPower, leftPower;\n double gearRatio = gamepad1.right_bumper ? 0.7 : 0.2;\n // If right_bumper is down, the gearRatio is 0.7. Otherwise, the gearRatio is 0.3\n \n rightPower = gearRatio * gamepad1.left_stick_y;\n leftPower = gearRatio * gamepad1.right_stick_y;\n \n leftpower = Range.clip(leftpower, -1, 1); //gamepad controllers have a value of 1 when you push it to its maximum foward\n rightpower = Range.clip(rightpower, -1, 1); //limiting the range of each power, min first then max\n \n motorR.setPower(rightPower);\n motroL.setPower(leftPower);\n \n telemetry.addData(\"Gear Ratio \", gearRatio);\n telemetry.addData(\"Right Power \", rightPower);\n telemetry.addData(\"Left Power \", leftPower);\n \n \n }",
"public void turnToCorrectColor() {\n\n String gameData = DriverStation.getInstance().getGameSpecificMessage();\n if (gameData.length() != 0) {\n Color colorNeeded;\n\n switch (gameData.charAt(0)) {\n case 'B':\n colorNeeded = blue;\n break;\n case 'G':\n colorNeeded = green;\n break;\n case 'R':\n colorNeeded = red;\n break;\n case 'Y':\n colorNeeded = yellow;\n break;\n default:\n colorNeeded = null;\n break;\n }\n\n boolean onColor = false;\n while (!onColor) {\n wheelTurner.set(0.4);\n ColorMatchResult result = colorMatcher.matchClosestColor(colorSensor.getColor());\n\n if (result == colorMatcher.matchClosestColor(colorNeeded)) {\n wheelTurner.stopMotor();\n onColor = true;\n }\n System.out.print(colorSensor.getRed() + \" \" + colorSensor.getBlue() + \" \" + colorSensor.getGreen());\n }\n\n }\n }",
"private static int CalulateColorFromTrafficCell(TrafficCell i_cell,\nint i_mode, boolean i_drawVehicles) {\nint t_color = 0;\n// byte t_alpha = 0;\n// byte t_red = 0;\n// byte t_green = 0;\n// byte t_blue = 0;\n// t_color = Color.argb(t_alpha, t_red, t_green, t_blue);\nt_color = Color.BLACK;\n\nswitch (i_mode) {\ncase 0: // cell type\nswitch (i_cell.type) {\ncase EMPTY:\nt_color = Color.DKGRAY;\nbreak;\ncase NORMAL:\nt_color = Color.GRAY;\nbreak;\ncase SINK:\nt_color = Color.RED;\nbreak;\ncase SOURCE:\nt_color = Color.BLUE;\nbreak;\ncase TRAFFIC_LIGHT:\nt_color = Color.YELLOW;\nbreak;\ndefault:\nt_color = Color.BLACK;\nbreak;\n}\nbreak;\ncase 1: //street direction\nswitch(i_cell.streetDirection)\n{\ncase NORTH:\nt_color = Color.BLUE;\nbreak;\ncase SOUTH:\nt_color = Color.RED;\nbreak;\ncase EAST:\nt_color = Color.YELLOW;\nbreak;\ncase WEST:\nt_color = Color.GREEN;\nbreak;\ndefault:\nt_color = Color.BLACK;\nbreak;\n}\nbreak;\ncase 2:\n}\n\nif(i_drawVehicles)\n{\nif(i_cell.vehicle!=null)\n{\nt_color = Color.CYAN;\n}\n}\n\nreturn t_color;\n}",
"@Test\n\tpublic void leftRighBlackCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(19,38);\n\t\td.set(20,40);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(40);\n\t\tassertTrue(5==test_arr.get(0).getX() && 3==test_arr.get(0).getY());\n\n\t}",
"private void sepiaTone(){\n int len= currentIm.getRows() * currentIm.getCols();\n \n for (int p= 0; p < len; p= p+1) {\n int rgb= currentIm.getPixel(p);\n int red= DM.getRed(rgb);\n int blue= DM.getBlue(rgb);\n int green= DM.getGreen(rgb);\n int alpha= DM.getAlpha(rgb);\n \n double brightness = 0.3 * red + 0.6 * green + 0.1 * blue;\n \n currentIm.setPixel(p,\n (alpha << 24) | ((int)brightness << 16) | ((int)(brightness*0.6) << 8) | \n (int)(brightness*0.4));\n \n }\n }",
"public void turnOnce() {\n\n Color currentColor = colorSensor.getColor();\n int colorChange = 0;\n // TODO: You can increase the speed here depending on how good the color sensor\n // reads color changes for added efficency.\n wheelTurner.set(.25);\n\n while (colorChange < 9) {\n ColorMatchResult match = colorMatcher.matchClosestColor(colorSensor.getColor());\n // checks if the current color that is being sensed checks out with our stored\n if (match != colorMatcher.matchClosestColor(currentColor)) {\n colorChange++;\n currentColor = colorSensor.getColor();\n }\n\n }\n wheelTurner.stopMotor();\n }",
"int canon_600_color (int ratio[], int mar)\n{\n int clipped=0, target, miss;\n\n if (flash_used != 0.0) {\n if (ratio[1] < -104)\n { ratio[1] = -104; clipped = 1; }\n if (ratio[1] > 12)\n { ratio[1] = 12; clipped = 1; }\n } else {\n if (ratio[1] < -264 || ratio[1] > 461) return 2;\n if (ratio[1] < -50)\n { ratio[1] = -50; clipped = 1; }\n if (ratio[1] > 307)\n { ratio[1] = 307; clipped = 1; }\n }\n target = flash_used != 0.0 || ratio[1] < 197\n\t? -38 - (398 * ratio[1] >> 10)\n\t: -123 + (48 * ratio[1] >> 10);\n if (target - mar <= ratio[0] &&\n target + 20 >= ratio[0] && clipped == 0) return 0;\n miss = target - ratio[0];\n if ( Math.abs(miss) >= mar*4) return 2;\n if (miss < -20) miss = -20;\n if (miss > mar) miss = mar;\n ratio[0] = target - miss;\n return 1;\n}",
"public void teleopPeriodic() \n {\n // NIVision.Rect rect = new NIVision.Rect(10, 10, 100, 100);\n /*\n NIVision.IMAQdxGrab(session, frame, 1);\n //NIVision.imaqDrawShapeOnImage(frame, frame, rect,\n // DrawMode.DRAW_VALUE, ShapeMode.SHAPE_OVAL, 0.0f);\n */\n \n //cam.getImage(frame);\n //camServer.setImage(frame);\n \n //CameraServer.getInstance().setImage(frame);\n \n if(verticalLift.limitSwitchHit())\n verticalLift.resetEnc();\n \n Scheduler.getInstance().run();\n }",
"public void updateData(LEDConnector connector, char side, float distance, float ownSpeedKmh) throws InterruptedException, IOException {\r\n int green = 0;\r\n int red = 0;\r\n int blue = 0;\r\n\r\n //Init LED Strip Data\r\n int maxLED = 53;\r\n int maxBrightness = 127;\r\n\r\n float relDist;\r\n\r\n byte pos = 0;\r\n\r\n //TTC = Time to Collision.. (Pattern begins at 20 seconds)\r\n relDist = distCalc(side, distance, ownSpeedKmh);\r\n\r\n if (relDist < 0) {\r\n return;\r\n }\r\n\r\n if (relDist > 1) {\r\n return;\r\n }\r\n\r\n// Ausgeklammer, Quadratfunktionen\r\n switch (side) {\r\n case 'l':\r\n pos = 17;\r\n //red = (int) (Math.pow((1 - relDist),2) * maxBrightness);\r\n red = (int) ((1 - relDist) * maxBrightness);\r\n green = maxBrightness - red;\r\n break;\r\n case 'L':\r\n pos = (byte) ((1 - relDist) * maxLED);\r\n //red = (int) (Math.pow((1 - relDist),2) * maxBrightness);\r\n red = (int) ((1 - relDist) * maxBrightness);\r\n green = maxBrightness - red;\r\n if (pos == 0) {\r\n return;\r\n }\r\n break;\r\n case 'r':\r\n pos = 17;\r\n //red = (int) (Math.pow((1 - relDist),2) * maxBrightness);\r\n red = (int) ((1 - relDist) * maxBrightness);\r\n green = maxBrightness - red + 1;\r\n break;\r\n case 'R':\r\n pos = (byte) ((relDist) * maxLED);\r\n red = (int) (Math.pow((relDist), 2) * maxBrightness);\r\n //red = (int) ((relDist) * maxBrightness);\r\n green = maxBrightness - red;\r\n if (pos == 0) {\r\n return;\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n byte[] data = new byte[]{\r\n (byte) ((char) blue),\r\n (byte) ((char) red),\r\n (byte) ((char) green), // color\r\n (byte) pos, // \r\n (byte) side // side\r\n };\r\n\r\n //senden der der Daten\r\n connector.sendMessage(data);\r\n }",
"public final void mo4755a(android.view.View r13, boolean r14) {\n /*\n r12 = this;\n wl.smartled.views.RainbowPalette r13 = r12.f2425b\n int r13 = r13.mo5192a()\n wl.smartled.c.a r0 = p021wl.smartled.p024c.C0528a.m1795a()\n java.util.List r0 = r0.mo4937c()\n r1 = 1\n r2 = 0\n r3 = 2\n if (r0 == 0) goto L_0x0041\n java.util.Iterator r4 = r0.iterator()\n L_0x0017:\n boolean r5 = r4.hasNext()\n if (r5 == 0) goto L_0x0041\n java.lang.Object r5 = r4.next()\n java.lang.String r5 = (java.lang.String) r5\n java.lang.String r6 = \"ELK_\"\n boolean r6 = r5.startsWith(r6)\n if (r6 == 0) goto L_0x0032\n java.lang.String r6 = \"^ELK_.+CT.*\"\n L_0x002d:\n java.util.regex.Pattern r6 = java.util.regex.Pattern.compile(r6, r3)\n goto L_0x0035\n L_0x0032:\n java.lang.String r6 = \"^ELK-.+CT.*\"\n goto L_0x002d\n L_0x0035:\n java.util.regex.Matcher r5 = r6.matcher(r5)\n boolean r5 = r5.find()\n if (r5 == 0) goto L_0x0017\n r4 = 1\n goto L_0x0042\n L_0x0041:\n r4 = 0\n L_0x0042:\n if (r0 == 0) goto L_0x0072\n java.util.Iterator r0 = r0.iterator()\n L_0x0048:\n boolean r5 = r0.hasNext()\n if (r5 == 0) goto L_0x0072\n java.lang.Object r5 = r0.next()\n java.lang.String r5 = (java.lang.String) r5\n java.lang.String r6 = \"ELK_\"\n boolean r6 = r5.startsWith(r6)\n if (r6 == 0) goto L_0x0063\n java.lang.String r6 = \"^ELK_.+W.*\"\n L_0x005e:\n java.util.regex.Pattern r6 = java.util.regex.Pattern.compile(r6, r3)\n goto L_0x0066\n L_0x0063:\n java.lang.String r6 = \"^ELK-.+W.*\"\n goto L_0x005e\n L_0x0066:\n java.util.regex.Matcher r5 = r6.matcher(r5)\n boolean r5 = r5.find()\n if (r5 == 0) goto L_0x0048\n r0 = 1\n goto L_0x0073\n L_0x0072:\n r0 = 0\n L_0x0073:\n int r5 = p021wl.smartled.views.RainbowPalette.f2751e\n if (r13 != r5) goto L_0x0093\n wl.smartled.c.c r13 = p021wl.smartled.p024c.C0530c.m1816a()\n r13.mo4945b(r14)\n if (r0 == 0) goto L_0x0082\n r11 = 2\n goto L_0x00d5\n L_0x0082:\n wl.smartled.c.c r13 = p021wl.smartled.p024c.C0530c.m1816a()\n r13.mo4944a(r14)\n if (r4 != 0) goto L_0x00d4\n wl.smartled.c.c r13 = p021wl.smartled.p024c.C0530c.m1816a()\n r13.mo4947c(r14)\n goto L_0x00d2\n L_0x0093:\n int r3 = p021wl.smartled.views.RainbowPalette.f2750d\n if (r13 != r3) goto L_0x00b4\n wl.smartled.c.c r13 = p021wl.smartled.p024c.C0530c.m1816a()\n r13.mo4947c(r14)\n if (r4 == 0) goto L_0x00a3\n r1 = 3\n r11 = 3\n goto L_0x00d5\n L_0x00a3:\n wl.smartled.c.c r13 = p021wl.smartled.p024c.C0530c.m1816a()\n r13.mo4944a(r14)\n if (r0 != 0) goto L_0x00d4\n wl.smartled.c.c r13 = p021wl.smartled.p024c.C0530c.m1816a()\n r13.mo4945b(r14)\n goto L_0x00d2\n L_0x00b4:\n wl.smartled.c.c r13 = p021wl.smartled.p024c.C0530c.m1816a()\n r13.mo4944a(r14)\n if (r4 != 0) goto L_0x00c4\n wl.smartled.c.c r13 = p021wl.smartled.p024c.C0530c.m1816a()\n r13.mo4947c(r14)\n L_0x00c4:\n if (r0 != 0) goto L_0x00cd\n wl.smartled.c.c r13 = p021wl.smartled.p024c.C0530c.m1816a()\n r13.mo4945b(r14)\n L_0x00cd:\n if (r4 != 0) goto L_0x00d4\n if (r0 == 0) goto L_0x00d2\n goto L_0x00d4\n L_0x00d2:\n r11 = 0\n goto L_0x00d5\n L_0x00d4:\n r11 = 1\n L_0x00d5:\n wl.smartled.f.a r5 = p021wl.smartled.p027f.C0538a.m1861a()\n android.content.Context r6 = r12.getContext()\n wl.smartled.c.a r13 = p021wl.smartled.p024c.C0528a.m1795a()\n java.util.List r7 = r13.mo4941e()\n wl.smartled.c.c r13 = p021wl.smartled.p024c.C0530c.m1816a()\n boolean r8 = r13.mo4946b()\n wl.smartled.c.c r13 = p021wl.smartled.p024c.C0530c.m1816a()\n boolean r9 = r13.mo4948c()\n wl.smartled.c.c r13 = p021wl.smartled.p024c.C0530c.m1816a()\n boolean r10 = r13.mo4949d()\n r5.mo4990a(r6, r7, r8, r9, r10, r11)\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p021wl.smartled.fragment.ColorChangeFragment.mo4755a(android.view.View, boolean):void\");\n }",
"C7716a mo24085b();",
"@Override\n public void loop() { //Starts this loop after you press the START Button\n /**\n * Functional control of up down lift with no limit switches Meet 0 ready\n */\n double liftposition = robot.liftUpDown.getCurrentPosition();\n double liftrotposition = robot.liftRotate.getCurrentPosition();\n telemetry.addData(\"Lift Position\",\"%5.2f\",liftposition);\n telemetry.addData(\"LiftRot Position\", \"%5.2f\", liftrotposition);\n // telemetry.addData(\"Block Stack\", BlockStack);\n telemetry.update();\n\n/**Main drive controls\n * Driver 1\n */\n\n/**\n * Drag servos\n */\n if (gamepad1.a){ //release\n robot.drag1.setPosition(0);\n robot.drag2.setPosition(1);\n } else if (gamepad1.b){//grab\n robot.drag1.setPosition(1);\n robot.drag2.setPosition(0);\n }\n\n/**Mast and Lift controls\n *\n *\n * Driver Two\n *\n *\n*/\n\n/**\n * Need controls to\n * Maybe predetermined locations based on number of pushes of a button.\n */\n\n /**\n * Functional arm rotation with limit switches and encoder limits. Meet 2 ready\n */\n\n //Twists lift up after verifying that rotate up limit switch is not engaged and that step count is less than 5400\n if ( gamepad2.dpad_up && robot.rotateup.getState() == true){\n robot.liftRotate.setPower(1.0);\n }\n else if (gamepad2.dpad_down && robot.rotatedown.getState() == true){ //Twists lift down\n robot.liftRotate.setPower(-1.0);\n }\n //required or lift rotate motor continues to run in last direction (breaks the motor shaft)\n else robot.liftRotate.setPower(0);\n\n /**\n * claw controls a= open b= close\n * FUNCTIONAL Meet 2 ready\n */\n if (gamepad2.a){\n robot.claw1.setPosition(0);\n robot.claw2.setPosition(1);\n } else if (gamepad2.b){\n robot.claw1.setPosition(1);\n robot.claw2.setPosition(0);\n }\n\n /**\n * Lift controls with limit switches and encoder position Meet 2 ready\n * right_trigger = lift\n * left_trigger = down\n */\n\n if ( gamepad2.right_trigger>= 0.2 && robot.liftup.getState()) {\n triggerpress=true;\n robot.liftUpDown.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.liftUpDown.setPower(.9);\n robot.liftRotate.setPower(.15);\n }\n if (gamepad2.left_trigger>=0.2){\n triggerpress=true;\n robot.liftUpDown.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.liftUpDown.setPower(-0.9);\n robot.liftRotate.setPower(-0.15);\n }\n if (gamepad2.left_trigger<.2 && gamepad2.right_trigger<.2 && triggerpress ){\n robot.liftUpDown.setPower(0);\n robot.liftRotate.setPower(0);\n triggerpress=false;\n }\n\n int x;\n int y;\n double motorDelayTime;\n //Necessary Debounce to keep bumper from being seen as multiple touches\n/* motorDelayTime=.1;\n if (robot.liftUpDown.getCurrentPosition()<50){\n BlockStack =0;\n }\n //skips servos unless runtime is greater than 20 ms.\n if( runtime.time() > motorDelayTime ) {\n //Need to move 5.5 inches on position 2, subsequent blocks will only need to move up 4 inches.\n x = robot.liftUpDown.getCurrentPosition();\n y= robot.liftRotate.getCurrentPosition();\n if (gamepad2.right_bumper ) {\n\n BlockStack= BlockStack + 1;\n robot.liftUpDown.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.liftUpDown.setTargetPosition(x + robot.floorheight);\n robot.liftUpDown.setPower(.9);\n robot.liftRotate.setTargetPosition(y + robot.floorheightrotate);\n robot.liftRotate.setPower(.1);\n bumperpress=true;\n\n //don't want to drive the cable too far loose checks that we can move a full block down\n } else if (gamepad2.left_bumper && x >= robot.floorheight ) {\n BlockStack= BlockStack - 1;\n robot.liftUpDown.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.liftUpDown.setTargetPosition(x - robot.floorheight);\n robot.liftUpDown.setPower(-.5);\n}\n\n runtime.reset();\n robot.liftUpDown.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n }*/\n\n /**\n * Limit switch tests that reset the encoders Meet 1 ready\n * * liftdown also allows the X button to work\n * * rotatedown also allows the Y button to work\n */\n\n if (robot.rotatedown.getState() == false) {\n robot.liftRotate.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot.liftRotate.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n }\n }",
"public void usa(){\n stroke(1);\n //back guns\n fill(0);\n rect(73,192,4,15);\n rect(224,192,4,15);\n rect(71,207,8,15);\n rect(222,207,8,15);\n rect(66,207,3,15);\n rect(232,207,3,17);\n rect(122,109,4,15);\n rect(175,110,4,15);\n rect(121,120,6,15);\n rect(174,120,6,15);\n rect(116,124,3,15);\n rect(182,124,3,15);\n\n //wings\n fill(1,0,74);//dark blue\n beginShape();\n vertex(14,286);\n vertex(61,236);\n vertex(88,308);\n vertex(51,334);\n vertex(14,313);\n endShape(CLOSE);\n beginShape();\n vertex(286,287);\n vertex(286,312);\n vertex(247,335);\n vertex(212,309);\n vertex(238,238);\n endShape(CLOSE);\n\n fill(200);//white\n beginShape();\n vertex(38,307);\n vertex(74,307);\n vertex(80,314);\n vertex(81,337);\n vertex(68,345);\n vertex(38,327);\n endShape(CLOSE);\n beginShape();\n vertex(219,316);\n vertex(226,308);\n vertex(262,308);\n vertex(262,326);\n vertex(231,345);\n vertex(219,336);\n endShape(CLOSE);\n\n fill(192,0,11);//red\n beginShape();\n vertex(96,191);\n vertex(61,230);\n vertex(60,269);\n vertex(96,312);\n vertex(101,300);\n vertex(100,247);\n vertex(112,232);\n vertex(132,232);\n vertex(131,186);\n endShape(CLOSE);\n beginShape();\n vertex(204,191);\n vertex(240,230);\n vertex(240,270);\n vertex(205,312);\n vertex(200,302);\n vertex(200,248);\n vertex(193,238);\n vertex(185,231);\n vertex(170,230);\n vertex(170,186);\n endShape(CLOSE);\n\n //white\n fill(200);\n beginShape();\n vertex(70,217);\n vertex(74,220);\n vertex(81,210);\n vertex(85,213);\n vertex(75,227);\n vertex(72,229);\n vertex(71,231);\n vertex(73,233);\n vertex(73,268);\n vertex(71,272);\n vertex(76,277);\n vertex(82,274);\n vertex(89,283);\n vertex(90,297);\n vertex(66,272);\n vertex(65,235);\n vertex(68,229);\n vertex(62,228);\n endShape(CLOSE);\n beginShape();\n vertex(228,217);\n vertex(225,218);\n vertex(218,211);\n vertex(215,213);\n vertex(223,227);\n vertex(226,226);\n vertex(230,230);\n vertex(227,233);\n vertex(228,270);\n vertex(229,272);\n vertex(223,276);\n vertex(218,276);\n vertex(210,283);\n vertex(211,296);\n vertex(235,273);\n vertex(234,233);\n vertex(232,228);\n vertex(237,227);\n endShape(CLOSE);\n\n //guns\n //white\n fill(200);\n beginShape();\n vertex(121,301);\n vertex(98,313);\n vertex(102,336);\n vertex(119,342);\n vertex(139,336);\n vertex(141,313);\n endShape(CLOSE);//l\n beginShape();\n vertex(159,312);\n vertex(162,336);\n vertex(180,342);\n vertex(200,336);\n vertex(202,313);\n vertex(180,302);\n endShape(CLOSE);\n\n //black\n fill(0);\n rect(105,315,30,30);\n rect(166,315,30,30);\n quad(105,344,109,355,131,355,135,344);\n quad(166,344,170,355,192,355,196,344);\n //green\n fill(0,0,67);\n rect(103,253,33,62);//l\n rect(164,252,33,62);//r\n //white\n fill(200);\n bezier(103,252,107,230,132,230,136,252);//l\n bezier(164,252,169,230,192,230,197,252);//r\n rect(103,280,33,25);//l\n rect(164,280,33,25);//r\n rect(104,319,33,26,3);//l\n rect(165,319,33,26,3);//r\n rect(115,310,7,28,8);//l\n rect(178,310,7,28,8);//r\n //green\n fill(0,0,67);\n rect(105,284,10,15);\n rect(124,284,10,15);\n rect(167,285,10,15);\n rect(185,284,10,15);\n\n //body-wings\n //green\n fill(0,0,67);//blue\n bezier(107,154,101,162,98,169,98,187);\n bezier(191,153,199,164,202,172,203,187);\n quad(107,154,98,186,98,223,107,224);\n quad(191,153,203,186,202,223,192,223);\n fill(192,0,11);//red\n quad(134,112,108,147,107,239,132,230);\n quad(165,112,192,147,193,239,168,230);\n //black\n fill(0);\n quad(130,122,130,142,111,164,111,147);\n quad(169,122,188,147,188,165,169,144);\n //white\n fill(200);\n beginShape();\n vertex(131,154);\n vertex(129,202);\n vertex(118,202);\n vertex(112,181);\n vertex(110,179);\n vertex(110,171);\n endShape(CLOSE);\n beginShape();\n vertex(170,154);\n vertex(190,172);\n vertex(190,182);\n vertex(188,181);\n vertex(182,201);\n vertex(172,201);\n endShape(CLOSE);\n\n //green\n fill(192,0,11);\n quad(134,193,166,193,154,342,146,342);\n fill(192,0,11);\n quad(142,180,159,180,152,352,148,352);\n //white\n fill(200);\n ellipse(150,374,6,50);\n\n //head\n fill(1,1,75);\n ellipse(149.5f,72,33,25);\n ellipse(149.5f,94,30,170);\n fill(0);\n ellipse(149.5f,94,20,160);\n fill(154,155,84);\n ellipse(149.5f,94,17,77);\n strokeWeight(2);\n line(143,74,158,74);\n line(142,104,158,104);\n strokeWeight(1);\n fill(200);\n bezier(143,15,147,2,153,2,155.5f,15);\n }",
"private boolean m0(int[] r6, int[] r7) {\n /*\n r5 = this;\n boolean r0 = super.onStateChange(r6)\n android.content.res.ColorStateList r1 = r5.f10944b\n r2 = 0\n if (r1 == 0) goto L_0x0010\n int r3 = r5.O\n int r1 = r1.getColorForState(r6, r3)\n goto L_0x0011\n L_0x0010:\n r1 = 0\n L_0x0011:\n int r3 = r5.O\n r4 = 1\n if (r3 == r1) goto L_0x0019\n r5.O = r1\n r0 = 1\n L_0x0019:\n android.content.res.ColorStateList r1 = r5.f10947e\n if (r1 == 0) goto L_0x0024\n int r3 = r5.P\n int r1 = r1.getColorForState(r6, r3)\n goto L_0x0025\n L_0x0024:\n r1 = 0\n L_0x0025:\n int r3 = r5.P\n if (r3 == r1) goto L_0x002c\n r5.P = r1\n r0 = 1\n L_0x002c:\n android.content.res.ColorStateList r1 = r5.b0\n if (r1 == 0) goto L_0x0037\n int r3 = r5.Q\n int r1 = r1.getColorForState(r6, r3)\n goto L_0x0038\n L_0x0037:\n r1 = 0\n L_0x0038:\n int r3 = r5.Q\n if (r3 == r1) goto L_0x0043\n r5.Q = r1\n boolean r1 = r5.a0\n if (r1 == 0) goto L_0x0043\n r0 = 1\n L_0x0043:\n b.c.a.d.q.b r1 = r5.j\n if (r1 == 0) goto L_0x0052\n android.content.res.ColorStateList r1 = r1.f2389b\n if (r1 == 0) goto L_0x0052\n int r3 = r5.R\n int r1 = r1.getColorForState(r6, r3)\n goto L_0x0053\n L_0x0052:\n r1 = 0\n L_0x0053:\n int r3 = r5.R\n if (r3 == r1) goto L_0x005a\n r5.R = r1\n r0 = 1\n L_0x005a:\n int[] r1 = r5.getState()\n r3 = 16842912(0x10100a0, float:2.3694006E-38)\n boolean r1 = b0(r1, r3)\n if (r1 == 0) goto L_0x006d\n boolean r1 = r5.u\n if (r1 == 0) goto L_0x006d\n r1 = 1\n goto L_0x006e\n L_0x006d:\n r1 = 0\n L_0x006e:\n boolean r3 = r5.S\n if (r3 == r1) goto L_0x0088\n android.graphics.drawable.Drawable r3 = r5.w\n if (r3 == 0) goto L_0x0088\n float r0 = r5.d()\n r5.S = r1\n float r1 = r5.d()\n int r0 = (r0 > r1 ? 1 : (r0 == r1 ? 0 : -1))\n if (r0 == 0) goto L_0x0087\n r0 = 1\n r1 = 1\n goto L_0x0089\n L_0x0087:\n r0 = 1\n L_0x0088:\n r1 = 0\n L_0x0089:\n android.content.res.ColorStateList r3 = r5.X\n if (r3 == 0) goto L_0x0093\n int r2 = r5.T\n int r2 = r3.getColorForState(r6, r2)\n L_0x0093:\n int r3 = r5.T\n if (r3 == r2) goto L_0x00a4\n r5.T = r2\n android.content.res.ColorStateList r0 = r5.X\n android.graphics.PorterDuff$Mode r2 = r5.Y\n android.graphics.PorterDuffColorFilter r0 = b.c.a.d.n.a.a(r5, r0, r2)\n r5.W = r0\n goto L_0x00a5\n L_0x00a4:\n r4 = r0\n L_0x00a5:\n android.graphics.drawable.Drawable r0 = r5.m\n boolean r0 = i0(r0)\n if (r0 == 0) goto L_0x00b4\n android.graphics.drawable.Drawable r0 = r5.m\n boolean r0 = r0.setState(r6)\n r4 = r4 | r0\n L_0x00b4:\n android.graphics.drawable.Drawable r0 = r5.w\n boolean r0 = i0(r0)\n if (r0 == 0) goto L_0x00c3\n android.graphics.drawable.Drawable r0 = r5.w\n boolean r6 = r0.setState(r6)\n r4 = r4 | r6\n L_0x00c3:\n android.graphics.drawable.Drawable r6 = r5.q\n boolean r6 = i0(r6)\n if (r6 == 0) goto L_0x00d2\n android.graphics.drawable.Drawable r6 = r5.q\n boolean r6 = r6.setState(r7)\n r4 = r4 | r6\n L_0x00d2:\n if (r4 == 0) goto L_0x00d7\n r5.invalidateSelf()\n L_0x00d7:\n if (r1 == 0) goto L_0x00dc\n r5.l0()\n L_0x00dc:\n return r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.material.chip.a.m0(int[], int[]):boolean\");\n }",
"@Override\n public void process() {\n getTelemetry().addData(\" start move\", \"BaseColor %s relic side %s\", baseColor.name(), (relicSide)?\"true\" :\"false\" );\n getTelemetry().update();\n if (JewelSensorAutoArmProcessor.JewelColor.RED.equals(baseColor)){\n if (relicSide) {\n RedRelicCorner();\n } else{\n RedNonRelicCorner();\n }\n }else{\n if (relicSide) {\n BlueRelicCorner();\n } else{\n BlueNonRelicCorner();\n }\n }\n releaseGlyph();\n }",
"void object_calculations_touch_ground(){\n\n if (down_angle < 0 && up_angle > 0)//base case\n {\n double temp = up_angle;\n up_angle = down_angle;\n down_angle = temp;\n base_case();\n } else if ((down_angle > 0 && up_angle > 0) && (down_angle < up_angle))//smaller object\n {\n double temp = up_angle;\n up_angle = down_angle;\n down_angle = temp;\n measure_small_object();\n } else if (up_angle < 0 && down_angle > 0)//base case\n base_case();\n else //smaller object\n measure_small_object();\n }",
"public void run() {\n\n EV3ColorSensor sensor = new EV3ColorSensor(usPort); // usSensor is the instance\n SampleProvider sensorProvider = sensor.getMode(\"Red\");\n MeanFilter filter = new MeanFilter(sensorProvider, 4);\n float[] sample = new float[sensor.sampleSize()];\n boolean inLine = false; // Flags whether the sensor is currently seeing a line\n boolean makeCorrection = false; // Tells the class to correct the odometer values\n double[] position = odometer.getXYT(); // Current odometer values\n Direction direction = Direction.INIT; // Direction of the robot's movement\n\n long correctionStart, correctionEnd;\n\n while (true) {\n correctionStart = System.currentTimeMillis();\n\n // Trigger correction (When do I have information to correct?)\n filter.fetchSample(sample, 0);\n boolean lineDetected = sample[0] < LINE_COLOR_VALUE;\n\n if (lineDetected) {\n if (!inLine) {\n inLine = true;\n makeCorrection = true;\n lineCount++;\n Sound.beep();\n }\n } else\n inLine = false;\n\n // Calculate new (accurate) robot position\n if (makeCorrection && lineCount < ((SQUARE_SIZE - 1) * 4)) {\n makeCorrection = false;\n position = odometer.getXYT();\n\n // Get the direction of movement according to the angle\n double theta = position[2];\n if (theta > 45 && theta < 135) {\n direction = Direction.EAST;\n } else if (theta > 135 && theta < 225) {\n direction = Direction.SOUTH;\n } else if (theta > 225 && theta < 315) {\n direction = Direction.WEST;\n } else {\n direction = Direction.NORTH;\n }\n\n // Update odometer with new calculated (and more accurate) vales\n double correctedX, correctedY;\n switch (direction) {\n case NORTH:\n correctedY = (YN * TILE_SIZE) - SENSOR_OFFSET;\n YN++;\n odometer.setXYT(position[0], correctedY, position[2]);\n // System.out.println(\"Correcting Y to: \" + correctedY);\n break;\n case EAST:\n correctedX = (XE * TILE_SIZE) - SENSOR_OFFSET;\n XE++;\n odometer.setXYT(correctedX, position[1], position[2]);\n // System.out.println(\"Correcting X to: \" + correctedX);\n break;\n case SOUTH:\n YS--;\n correctedY = (YS * TILE_SIZE) + SENSOR_OFFSET;\n odometer.setXYT(position[0], correctedY, position[2]);\n // System.out.println(\"Correcting Y to: \" + correctedY);\n break;\n case WEST:\n XW--;\n correctedX = (XW * TILE_SIZE) + SENSOR_OFFSET;\n odometer.setXYT(correctedX, position[1], position[2]);\n // System.out.println(\"Correcting X to: \" + correctedX);\n break;\n }\n }\n\n // this ensure the odometry correction occurs only once every period\n correctionEnd = System.currentTimeMillis();\n if (correctionEnd - correctionStart < CORRECTION_PERIOD) {\n try {\n Thread.sleep(CORRECTION_PERIOD - (correctionEnd - correctionStart));\n } catch (InterruptedException e) {\n // there is nothing to be done here\n }\n }\n }\n }",
"@Override\n public void periodic() {\n\n colorCalibrationEnabled = ntColorCalibrationEnabled.getBoolean(false);\n\n /* NON-OPERATIONAL SENSOR\n colorMatchResult = colorMatcher.matchClosestColor(colorSensor.getColor());\n */\n\n if(colorMatchResult.color == kRedTarget)\n {\n colorIsRed = true;\n colorIsGreen = false;\n colorIsBlue = false;\n colorIsYellow = false;\n }\n else if(colorMatchResult.color == kGreenTarget)\n {\n colorIsRed = false;\n colorIsGreen = true;\n colorIsBlue = false;\n colorIsYellow = false;\n }\n else if(colorMatchResult.color == kBlueTarget)\n {\n colorIsRed = false;\n colorIsGreen = false;\n colorIsBlue = true;\n colorIsYellow = false;\n }\n else if(colorMatchResult.color == kYellowTarget)\n {\n colorIsRed = false;\n colorIsGreen = false;\n colorIsBlue = false;\n colorIsYellow = true;\n }\n\n ntColorIsRed.setBoolean(colorIsRed);\n ntColorIsGreen.setBoolean(colorIsGreen);\n ntColorIsBlue.setBoolean(colorIsBlue);\n ntColorIsYellow.setBoolean(colorIsYellow);\n\n colorCalibration();\n\n numberOfTurnsToRotate = ntScdNumberOfTurnsToRotate.getDouble(69.0);\n ntStsNumberOfTurnsToRotate.forceSetDouble(numberOfTurnsToRotate);\n }",
"public double[] robomove() {\n Limelight.setLedMode(Limelight.LightMode.iOn);\n \n double x = Limelight.getTx();\n double y = Limelight.getTy();\n double area = Limelight.getTa();\n\n float Kp = (float)SmartDashboard.getNumber(\"Kp_Limelight\", -0.03);//-0.06f;\n float min_command = (float)SmartDashboard.getNumber(\"min_command_limelight\", 0.01);//0.01f;\n\n double heading_error = -x;\n float steering_adjust = 0.0f;\n if (x > 1.0) {\n steering_adjust = (float) (Kp * heading_error - min_command);\n } else if (x < 1.0) {\n steering_adjust = (float) (Kp * heading_error + min_command);\n }\n\n if (steering_adjust < .01 && steering_adjust > -.01 && Limelight.isTarget()) {\n isDone = true;\n }\n\n if (Limelight.isTarget()){\n Robot.ledDrive.setLightsPattern(Robot.ledDrive.GREEN);\n } else{\n Robot.ledDrive.setLightsPattern(Robot.ledDrive.RED);\n }\n \n MathUtil.clamp(steering_adjust, -.3, .3);\n\n if (Math.abs(steering_adjust) < .1){\n steering_adjust = Math.signum(steering_adjust) * 0.1f;\n }\n\n return new double[] {(double) steering_adjust, (double) -steering_adjust};\n }",
"@Override\n public void onSensorChanged(SensorEvent event) {\n float distance = event.values[0];\n Log.e(\"xuawang\", \"d: \"+distance);\n if(distance > 5) {\n //far\n if(mIsDarkMode){\n darkScreen(false, getWindow());\n am.setMode(AudioManager.MODE_NORMAL);\n am.setSpeakerphoneOn(true);\n am.setBluetoothScoOn(false);\n }\n mIsDarkMode = false;\n } else {\n //close enough\n if(!mIsDarkMode){\n darkScreen(true, getWindow());\n am.setMode(AudioManager.MODE_IN_CALL);\n am.setSpeakerphoneOn(false);\n am.setBluetoothScoOn(true);\n }\n mIsDarkMode = true;\n }\n }",
"@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR2)\n private void beaconManagerSetup(){\n\n Log.i(\"beaconManager\",\"beaconManagerSetup\");\n\n //Beacon manager setup\n beaconManager = BeaconManager.getInstanceForApplication(this);\n beaconManager.bind(this);\n beaconManager.getBeaconParsers().add(new BeaconParser().\n setBeaconLayout(\"m:2-3=0215,i:4-15,i:16-19,i:20-23,p:24-24\"));\n\n //setBeaconLayout(\"m:2-3=0215,i:4-19,i:20-23,i:24-27,p:28-28\"));\n // Detect the Eddystone main identifier (UID) frame:\n beaconManager.getBeaconParsers().add(new BeaconParser().\n setBeaconLayout(\"s:0-1=feaa,m:2-2=00,p:3-3:-41,i:4-13,i:14-19\"));\n\n // Detect the Eddystone telemetry (TLM) frame:\n beaconManager.getBeaconParsers().add(new BeaconParser().\n setBeaconLayout(\"x,s:0-1=feaa,m:2-2=20,d:3-3,d:4-5,d:6-7,d:8-11,d:12-15\"));\n\n // Detect the Eddystone URL frame:\n beaconManager.getBeaconParsers().add(new BeaconParser().\n setBeaconLayout(\"s:0-1=feaa,m:2-2=10,p:3-3:-41,i:4-20\"));\n\n //beaconManager.setForegroundScanPeriod(ONE_SECOND);\n //beaconManager.setForegroundBetweenScanPeriod(2*ONE_SECOND);\n\n\n beaconManager.setForegroundScanPeriod(50);\n beaconManager.setForegroundBetweenScanPeriod(0);\n beaconManager.removeAllMonitorNotifiers();\n //beaconManager.removeAllRangeNotifiers();\n\n // Get the details for all the beacons we encounter.\n region = new Region(\"justGiveMeEverything\", null, null, null);\n bluetoothManager = (BluetoothManager)\n getSystemService(Context.BLUETOOTH_SERVICE);\n //ActivityCompat.requestPermissions(this, PERMISSIONS_STORAGE, 1001);\n }",
"private void m3387b(android.view.MotionEvent r7) {\n /*\n r6 = this;\n r0 = 0;\n r6.f2686t = r0;\n r1 = r7.getAction();\n r2 = 1;\n if (r1 != r2) goto L_0x0012;\n L_0x000a:\n r1 = r6.isEnabled();\n if (r1 == 0) goto L_0x0012;\n L_0x0010:\n r1 = 1;\n goto L_0x0013;\n L_0x0012:\n r1 = 0;\n L_0x0013:\n r3 = r6.isChecked();\n if (r1 == 0) goto L_0x004a;\n L_0x0019:\n r1 = r6.f2690x;\n r4 = 1000; // 0x3e8 float:1.401E-42 double:4.94E-321;\n r1.computeCurrentVelocity(r4);\n r1 = r6.f2690x;\n r1 = r1.getXVelocity();\n r4 = java.lang.Math.abs(r1);\n r5 = r6.f2691y;\n r5 = (float) r5;\n r4 = (r4 > r5 ? 1 : (r4 == r5 ? 0 : -1));\n if (r4 <= 0) goto L_0x0045;\n L_0x0031:\n r4 = android.support.v7.widget.bg.m3615a(r6);\n r5 = 0;\n if (r4 == 0) goto L_0x003f;\n L_0x0038:\n r1 = (r1 > r5 ? 1 : (r1 == r5 ? 0 : -1));\n if (r1 >= 0) goto L_0x003d;\n L_0x003c:\n goto L_0x0043;\n L_0x003d:\n r2 = 0;\n goto L_0x0043;\n L_0x003f:\n r1 = (r1 > r5 ? 1 : (r1 == r5 ? 0 : -1));\n if (r1 <= 0) goto L_0x003d;\n L_0x0043:\n r1 = r2;\n goto L_0x004b;\n L_0x0045:\n r1 = r6.getTargetCheckedState();\n goto L_0x004b;\n L_0x004a:\n r1 = r3;\n L_0x004b:\n if (r1 == r3) goto L_0x0050;\n L_0x004d:\n r6.playSoundEffect(r0);\n L_0x0050:\n r6.setChecked(r1);\n r6.m3383a(r7);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.support.v7.widget.SwitchCompat.b(android.view.MotionEvent):void\");\n }",
"@Override\n public void run() {\n ElapsedTime time = new ElapsedTime();\n time.reset();\n sleep(3000);\n sh.hitRing();\n sleep(600);\n sh.hitRing();\n sleep(600);\n sh.hitRing();\n sleep(600);\n //sh.pivotStop.setPosition(.55);\n sh.hitRing();\n sleep(500);\n //sh.pivotDown();\n sh.hitRing();\n sleep(500);\n sh.withdraw();\n sh.lift.setPower(0);\n sh.lift.setPower(0);\n wobble.wobbleUp();\n sh.pivotStop.setPosition(1);\n loop.end();\n\n\n }",
"@Override\r\n\tprotected void action() {\r\n\t\tdistance = ir.getDistance();\r\n\t\ttimer = getTimer.getTimer();\r\n\t\tcolorID = color.getColorID();\r\n\t\tdirection = random.nextInt(4) + 1;\r\n\t\tDoge.message(6, \"Random: \" + Integer.toString(direction));\r\n\r\n\t\tif (colorID == Color.YELLOW) { // If sensor is on yellow, stop motor\r\n\t\t\tmotor.halt();\r\n\t\t\ttail.wagTail(4,700);\r\n\t\t\twhile (colorID == Color.YELLOW) {\r\n\t\t\t\tcolorID = color.getColorID();\r\n\t\t\t\tDelay.msDelay(500);\r\n\t\t\t}\r\n\t\t} else if (distance > 5 && distance <= 50) { //If something is in front, change direction\r\n\t\t\tif (lastTurn == 0) { \r\n\t\t\t\tmotor.rollRight();\r\n\t\t\t} else if (lastTurn == 1) {\r\n\t\t\t\tmotor.rollLeft();\r\n\t\t\t}\r\n\t\t\twhile (distance > 5 && distance <= 50 && colorID != Color.YELLOW) { // Delay to to\r\n\t\t\t\tDelay.msDelay(1000);\t\t\t\t\t\t\t\t\t\t//give some time\r\n\t\t\t\tdistance = ir.getDistance();\t\t\t\t\t\t\t\t//to turn\r\n\t\t\t\tcolorID = color.getColorID();\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\tswitch (direction) { // Switch for random movement orders\r\n\t\t\tcase 1:\r\n\t\t\t\tmotor.gentleLeft(700);\r\n\t\t\t\tlastTurn = 0;\r\n\t\t\t\tDoge.message(4, \"Gentle left\");\r\n\t\t\t\tDelay(distance, timer, colorID);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 2:\r\n\t\t\t\tmotor.gentleRight(700);\r\n\t\t\t\tlastTurn = 1;\r\n\t\t\t\tDoge.message(4, \"Gentle right\");\r\n\t\t\t\tDelay(distance, timer, colorID);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 3:\r\n\t\t\t\tmotor.sharpLeft(700);\r\n\t\t\t\tlastTurn = 0;\r\n\t\t\t\tDoge.message(4, \"Sharp left\");\r\n\t\t\t\tDelay(distance, timer, colorID);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 4:\r\n\t\t\t\tmotor.sharpRight(700);\r\n\t\t\t\tlastTurn = 1;\r\n\t\t\t\tDoge.message(4, \"Sharp right\");\r\n\t\t\t\tDelay(distance, timer, colorID);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t}\r\n\t}",
"private void dist2Pos3Beacons()\n {\n //Betrachtung bei 3 Empfaengern\n double dist12 = Math.sqrt(Math.pow(posReceiver[0][0] - posReceiver[1][0], 2) + Math.pow(posReceiver[0][1] - posReceiver[1][1], 2));\n double dist13 = Math.sqrt(Math.pow(posReceiver[0][0] - posReceiver[2][0], 2) + Math.pow(posReceiver[0][1] - posReceiver[2][1], 2));\n double dist23 = Math.sqrt(Math.pow(posReceiver[1][0] - posReceiver[2][0], 2) + Math.pow(posReceiver[1][1] - posReceiver[2][1], 2));\n\n boolean temp12 = Math.abs(radius[0] - radius[1]) > dist12;\n boolean temp23 = Math.abs(radius[1] - radius[2]) > dist23;\n boolean temp13 = Math.abs(radius[0] - radius[2]) > dist13;\n\n //Zwei Kreise innerhalb eines anderen Kreises\n if ((temp12 && temp23) || (temp12 && temp13) || (temp23 && temp13))\n {\n double f0 = (dist12 / radius[0] + dist13 / radius[0]) / 2;\n double f1 = (dist12 / radius[1] + dist23 / radius[1]) / 2;\n double f2 = (dist12 / radius[2] + dist13 / radius[2]) / 2;\n\n radius[0] = radius[0] * f0;\n radius[1] = radius[1] * f1;\n radius[2] = radius[2] * f2;\n }\n //Kreis 2 in Kreis 1\n if ((Math.abs(radius[0] - radius[1]) > dist12) && (radius[0] > radius[1]))\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]}};\n double[] rad =new double[]{radius[0],radius[1],radius[2]};\n calcCircleInCircle(posRec, rad, dist13);\n }\n //Kreis 1 in Kreis 2\n else if ((Math.abs(radius[0] - radius[1]) > dist12) && (radius[1] > radius[0]))\n {\n double[][] posRec = new double[][]{{posReceiver[1][0],posReceiver[1][1]},{posReceiver[0][0],posReceiver[0][1]},{posReceiver[2][0],posReceiver[2][1]}};\n double[] rad =new double[]{radius[1],radius[0],radius[2]};\n calcCircleInCircle(posRec, rad, dist23);\n }\n //Kreis 3 in Kreis 1\n else if ((Math.abs(radius[0] - radius[2]) > dist13) && (radius[0] > radius[2]))//Kreis 3 in 1\n {\n double[][] posRec = new double[][]{{posReceiver[2][0],posReceiver[2][1]},{posReceiver[0][0],posReceiver[0][1]},{posReceiver[1][0],posReceiver[1][1]}};\n double[] rad =new double[]{radius[2],radius[0],radius[1]};\n calcCircleInCircle(posRec, rad, dist12);\n }\n //Kreis 1 in Kreis 3\n else if ((Math.abs(radius[0] - radius[2]) > dist13) && (radius[2] > radius[0]))//Kreis 1 in 3\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[1][0],posReceiver[1][1]}};\n double[] rad =new double[]{radius[0],radius[2],radius[1]};\n calcCircleInCircle(posRec, rad, dist23);\n }\n //Kreis 3 in Kreis 2\n else if ((Math.abs(radius[1] - radius[2]) > dist23) && (radius[1] > radius[2]))//Kreis 3 in 2\n {\n double[][] posRec = new double[][]{{posReceiver[2][0],posReceiver[2][1]},{posReceiver[1][0],posReceiver[1][1]},{posReceiver[0][0],posReceiver[0][1]}};\n double[] rad =new double[]{radius[2],radius[1],radius[0]};\n calcCircleInCircle(posRec, rad, dist12);\n }\n //Kreis 2 in Kreis 3\n else if ((Math.abs(radius[1] - radius[2]) > dist23) && (radius[2] > radius[1]))//Kreis 2 ind 3\n {\n double[][] posRec = new double[][]{{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[0][0],posReceiver[0][1]}};\n double[] rad =new double[]{radius[1],radius[2],radius[0]};\n calcCircleInCircle(posRec, rad, dist13);\n }\n //Kein Kreis liegt innerhalb eines Anderen\n else\n {\n\n if ((dist12 > (radius[0] + radius[1])) && (dist13 > (radius[0] + radius[2])) && (dist23 > (radius[1] + radius[2])))\n {\n double p1[] = new double[2];\t//x\n double p2[] = new double[2];\t//y\n\n double norm12 = norm(posReceiver[0][0], posReceiver[0][1], posReceiver[1][0], posReceiver[1][1]);\n // Verbindungspunkte Kreis 1 und 2\n p1[0] = posReceiver[0][0] + (radius[0]/ norm12) * (posReceiver[1][0] - posReceiver[0][0]); //x-P1\n p1[1] = posReceiver[0][1] + (radius[0]/ norm12) * (posReceiver[1][1] - posReceiver[0][1]); //y-P1\n p2[0] = posReceiver[1][0] + (radius[1]/ norm12) * (posReceiver[0][0] - posReceiver[1][0]); //x-P2\n p2[1] = posReceiver[1][1] + (radius[1]/ norm12) * (posReceiver[0][1] - posReceiver[1][1]); //y-P2\n double m12[] = new double[2];\n m12[0] = p1[0] + 0.5 * (p2[0] - p1[0]);\t//x\n m12[1] = p1[1] + 0.5 * (p2[1] - p1[1]);\t//y\n\n\n double norm23 = norm(posReceiver[1][0], posReceiver[1][1], posReceiver[2][0], posReceiver[2][1]);\n // Verbindungspunkte Kreis 2 und 3\n p1[0] = posReceiver[1][0] + (radius[1]/ norm23) * (posReceiver[2][0] - posReceiver[1][0]); //x-P1\n p1[1] = posReceiver[1][1] + (radius[1]/ norm23) * (posReceiver[2][1] - posReceiver[1][1]); //y-P1\n p2[0] = posReceiver[2][0] + (radius[2]/ norm23) * (posReceiver[1][0] - posReceiver[2][0]); //x-P2\n p2[1] = posReceiver[2][1] + (radius[2]/ norm23) * (posReceiver[1][1] - posReceiver[2][1]); //y-P2\n double m23[] = new double[2];\n m23[0] = p1[0] + 0.5 * (p2[0] - p1[0]);\t//x\n m23[1] = p1[1] + 0.5 * (p2[1] - p1[1]);\t//y\n\n\n double norm31 = norm(posReceiver[2][0], posReceiver[2][1], posReceiver[0][0], posReceiver[0][1]);\n // Verbindungspunkte Kreis 3 und 1\n p1[0] = posReceiver[2][0] + (radius[2]/ norm31) * (posReceiver[0][0] - posReceiver[2][0]); //x-P1\n p1[1] = posReceiver[2][1] + (radius[2]/ norm31) * (posReceiver[0][1] - posReceiver[2][1]); //y-P1\n p2[0] = posReceiver[0][0] + (radius[0]/ norm31) * (posReceiver[2][0] - posReceiver[0][0]); //x-P2\n p2[1] = posReceiver[0][1] + (radius[0]/ norm31) * (posReceiver[2][1] - posReceiver[0][1]); //y-P2\n double m31[] = new double[2];\n m31[0] = p1[0] + 0.5 * (p2[0] - p1[0]);\t//x\n m31[1] = p1[1] + 0.5 * (p2[1] - p1[1]);\t//y\n\n\n // Norm der drei Punkte berechnen\n double a_p = Math.sqrt((m12[0] * m12[0]) + (m12[1] * m12[1]));\n double b_p = Math.sqrt((m23[0] * m23[0]) + (m23[1] * m23[1]));\n double c_p = Math.sqrt((m31[0] * m31[0]) + (m31[1] * m31[1]));\n\n double denominator = 2 * (((m12[0] * m23[1]) - (m12[1] * m23[0])) + (m23[0] * m31[1] - m23[1] * m31[0]) + (m31[0] * m12[1] - m31[1] * m12[0]));\n xPos_func = (1/ denominator)*(((b_p * b_p - c_p * c_p)*(-m12[1]) + (c_p * c_p - a_p * a_p)* (-m23[1]) + (a_p * a_p - b_p * b_p)*(-m31[1])));\n yPos_func = (1/ denominator)*(((b_p * b_p - c_p * c_p)*m12[0] + (c_p * c_p - a_p * a_p)* m23[0] + (a_p * a_p - b_p * b_p)*m31[0]));\n errRad_func = norm(xPos_func, yPos_func, m12[0], m12[1]);\n\n }\n // Kreis 1 und 3 schneiden sich\n else if ((dist12 > (radius[0] + radius[1])) && (dist23 > (radius[1] + radius[2])))\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[1][0],posReceiver[1][1]}};\n double[] rad = new double[]{radius[0],radius[2],radius[1]};\n calc2Circle(posRec,rad);\n }\n //Kreis 2 und 3 schneide sich\n else if ((dist12 > (radius[0] + radius[1])) && (dist13 > (radius[0] + radius[2])))\n {\n double[][] posRec = new double[][]{{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[0][0],posReceiver[0][1]}};\n double[] rad = new double[]{radius[1],radius[2],radius[0]};\n calc2Circle(posRec,rad);\n }\n //Kreis 1 und 2 schneiden sich\n else if ((dist13 > (radius[0] + radius[2])) && (dist23 > (radius[1] + radius[2])))\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]}};\n double[] rad = new double[]{radius[0],radius[1],radius[2]};\n calc2Circle(posRec,rad);\n }\n else if ((dist12 > (radius[0] + radius[1])))\n {\n double[][] posRec = new double[][]{\n {posReceiver[0][0],posReceiver[0][1]},\n {posReceiver[1][0],posReceiver[1][1]},\n {posReceiver[2][0],posReceiver[2][1]}};\n double[] rad = new double[]{radius[0],radius[1],radius[2]};\n calc1Circle(posRec,rad);\n }\n else if ((dist23 > (radius[1] + radius[2])))\n {\n double[][] posRec = new double[][]{\n {posReceiver[1][0],posReceiver[1][1]},\n {posReceiver[2][0],posReceiver[2][1]},\n {posReceiver[0][0],posReceiver[0][1]}};\n double[] rad = new double[]{radius[1],radius[2],radius[0]};\n calc1Circle(posRec,rad);\n }\n else if ((dist13 > (radius[0] + radius[2])))\n {\n double[][] posRec = new double[][]{\n {posReceiver[0][0],posReceiver[0][1]},\n {posReceiver[2][0],posReceiver[2][1]},\n {posReceiver[1][0],posReceiver[1][1]}};\n double[] rad = new double[]{radius[0],radius[2],radius[1]};\n calc1Circle(posRec,rad);\n }\n else\n {\n double x1 = 0, y1 = 0, x2 = 0, y2 = 0, x3 = 0, y3 = 0;\n //Kreisschnittpunkte\n //Kreisschnittpunkte\n //Kreisschnittpunkte\n double pos12[][] = circlepoints2(posReceiver[0][0], posReceiver[0][1], posReceiver[1][0], posReceiver[1][1], radius[0], radius[1]);\n double pos23[][] = circlepoints2(posReceiver[1][0], posReceiver[1][1], posReceiver[2][0], posReceiver[2][1], radius[1], radius[2]);\n double pos13[][] = circlepoints2(posReceiver[0][0], posReceiver[0][1], posReceiver[2][0], posReceiver[2][1], radius[0], radius[2]);\n\n if(radius[0] >= norm(pos23[0][0],pos23[0][1], posReceiver[0][0],posReceiver[0][1]))\n {\n x1 = pos23[0][0];\n y1 = pos23[0][1];\n }\n else if(radius[0] >= norm(pos23[1][0], pos23[1][1], posReceiver[0][0],posReceiver[0][1]))\n {\n x1 = pos23[1][0];\n y1 = pos23[1][1];\n }\n\n if(radius[1] >= norm(pos13[0][0], pos13[0][1], posReceiver[1][0],posReceiver[1][1]))\n {\n x2 = pos13[0][0];\n y2 = pos13[0][1];\n }\n else if(radius[1] >= norm(pos13[1][0], pos13[1][1], posReceiver[1][0],posReceiver[1][1]))\n {\n x2 = pos13[1][0];\n y2 = pos13[1][1];\n }\n\n if(radius[2] >= norm(pos12[0][0], pos12[0][1], posReceiver[2][0],posReceiver[2][1]))\n {\n x3 = pos12[0][0];\n y3 = pos12[0][1];\n }\n else if(radius[2] >= norm(pos12[1][0], pos12[1][1], posReceiver[2][0],posReceiver[2][1]))\n {\n x3 = pos12[1][0];\n y3 = pos12[1][1];\n }\n\n double tempD = x1 * y2 + x2 * y3 + x3 * y1 - x1 * y3 - x2 * y1 - x3 * y2;\n\n xPos_func = (0.5*(\n -y1*(y2*y2)\n +y1*(y3*y3)\n -y1*(x2*x2)\n +y1*(x3*x3)\n\n +y2*(y1*y1)\n -y2*(y3*y3)\n +y2*(x1*x1)\n -y2*(x3*x3)\n\n -y3*(y1*y1)\n +y3*(y2*y2)\n -y3*(x1*x1)\n +y3*(x2*x2)\n ))/ tempD;\n\n yPos_func = (0.5*(\n +x1*(x2*x2)\n -x1*(x3*x3)\n +x1*(y2*y2)\n -x1*(y3*y3)\n\n -x2*(x1*x1)\n +x2*(x3*x3)\n -x2*(y1*y1)\n +x2*(y3*y3)\n\n +x3*(x1*x1)\n -x3*(x2*x2)\n +x3*(y1*y1)\n -x3*(y2*y2)\n ))/ tempD;\n\n errRad_func = norm(x1, y1, xPos_func, yPos_func);\n }\n }\n }",
"@Override\r\n\t\t\tpublic void onSensorChanged(SensorEvent event)\r\n\t\t\t{\n\t\t\t\tx=event.values[0];\r\n\t\t\t\ty=event.values[1];\r\n\t\t\t\tz=event.values[2];\r\n\t\t\t\t//balle\r\n\t\t\t\tmx-=(int)x;\r\n\t\t\t\tmy+=(int)y;\r\n\t\t\t\tif (mx<40)\r\n\t\t\t\t{\r\n\t\t\t\t\tmx=40;\r\n\t\t\t\t}\r\n\t\t\t\tif (mx>1190)\r\n\t\t\t\t{\r\n\t\t\t\t\tmx=1190;\r\n\t\t\t\t}\r\n\t\t\t\tif (my<50)\r\n\t\t\t\t{\r\n\t\t\t\t\tmy=50;\r\n\t\t\t\t}\r\n\t\t\t\tif (my>700)\r\n\t\t\t\t{\r\n\t\t\t\t\tmy=700;\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\t\t//departBalle\r\n\t\r\n\t\t\t\tdepartBalle.setPos_x(mx);\r\n\t\t\t\tdepartBalle.setPos_y(my);\r\n\t\t\tSystem.out.println(\"\"+mx+\":\"+my);\r\n\t\t\t\t\r\n\r\n\r\n\t\t\t}",
"@Override\n public void teleopPeriodic() {\n Scheduler.getInstance().run();\n SmartDashboard.putNumber(\"right encoder\", drive.getRightEncoder());\n SmartDashboard.putNumber(\"left encoder\", drive.getLeftEncoder());\n \n PixyCamBlock centerBlock = PixyCam2.GetCentermostBlock();\n boolean targetInRange = false ;\n \n if(centerBlock == null)\n {\n targetInRange = false;\n SmartDashboard.putString(\"center block data \", \"null\"); \n }\n else if(centerBlock.yCenter < 200)\n {\n targetInRange = true;\n String out = \"Center Block, X: \"+centerBlock.xCenter + \" Y: \"+centerBlock.yCenter;\n SmartDashboard.putString(\"center block data \", out); \n }\n\n String targetValue = Boolean.toString(targetInRange);\n SmartDashboard.putString(\"target good?\", targetValue);\n \n \n SmartDashboard.putBoolean(\"isFlipped\", flipped);\n }",
"public void grabFoundationFingers() {\n tailLeft.setPosition(.4);\n tailRight.setPosition(0.4 );\n }",
"private void scan(ScannedRobotEvent e) {\n double radarTurn = Utils.normalRelativeAngle(headOnBearing - p.getRadarHeadingRadians());\n double extraTurn = Math.min(Math.atan(36.0/e.getDistance()), Rules.RADAR_TURN_RATE_RADIANS);\n //adding a little bit more backwards turn when compensating backwards\n radarTurn += (radarTurn < 0 ? -extraTurn-6/Math.PI : extraTurn);\n p.setTurnRadarRightRadians(radarTurn);\n }",
"public void TeleopCode() {\n\t\tMLeft.set(-Controls.joy2.getRawAxis(5)+ 0.06); //(Controls.joy2.getRawAxis5 + 0.06);\n\t}",
"public void pos90() throws InterruptedException {\r\n bucketOverSweeper();\r\n sleep(2500);\r\n\r\n posElbow = 2200;\r\n posShoulder = 0;\r\n posBucket = 1.0;\r\n motorElbow.setTargetPosition(posElbow);\r\n motorShoulder.setTargetPosition(posShoulder);\r\n servoBucket.setPosition(posBucket);\r\n motorElbow.setPower(POWER_ELBOW_FAST);\r\n motorShoulder.setPower(POWER_SHOULDER_SLOW);\r\n\r\n posBucket = 0.2;\r\n servoBucket.setPosition(posBucket);\r\n sleep(1000);\r\n\r\n posBucket = 0.4;\r\n servoBucket.setPosition(posBucket);\r\n sleep(1000);\r\n\r\n posBucket = 0.5;\r\n servoBucket.setPosition(posBucket);\r\n sleep(200);\r\n\r\n posBucket = 0.4;\r\n servoBucket.setPosition(posBucket);\r\n sleep(200);\r\n\r\n posBucket = 0.3;\r\n servoBucket.setPosition(posBucket);\r\n sleep(200);\r\n\r\n posBucket = 0.2;\r\n servoBucket.setPosition(posBucket);\r\n sleep(200);\r\n\r\n posBucket = 0.15;\r\n servoBucket.setPosition(posBucket);\r\n sleep(2500);\r\n\r\n returnBucket();\r\n }",
"public void strength1(float x, float y){\n noStroke();\n fill(80);\n rect(x+7,y,66,6);\n bezier(x+7,y,x,y+1,x,y+5,x+7,y+6);\n bezier(x+73,y,x+80,y+1,x+80,y+5,x+73,y+6);\n rect(x+7,y+1,13,3);//1st blue ba\n bezier(x+7,y+1,x+1,y+2.5f,x+1,y+3.5f,x+7,y+4);\n}",
"protected void tickHue(){\r\n if(rUP){\r\n R++;\r\n if(R>=maxR) rUP = false;\r\n }else{\r\n R--;\r\n if(R<=minR) rUP = true;\r\n }\r\n if(gUP){\r\n G++;\r\n if(G>=maxG) gUP = false;\r\n }else{\r\n G--;\r\n if(G<=minG) gUP = true;\r\n }\r\n if(bUP){\r\n B++;\r\n if(B>=maxB) bUP = false;\r\n }else{\r\n B--;\r\n if(B<=minB) bUP = true;\r\n }\r\n \r\n }",
"public void readSensor() {\n try {\n Log.i(TAG, \"trying to read from sensors\");\n distance = this.bufferedReader.readLine();\n // if (distance != null && distance != \"0\") {\n Log.i(TAG, distance);\n\n // MainActivity.distance.setText(distance);\n Log.i(TAG, \"done with sensors\");\n //setBackgroundColor(Integer.parseInt(distance));\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private void drawHeart2 (float sx, float sy, float sz, Appearance[] app)\n {\n\tfloat x, y, z, r;\n \n BranchGroup tBG = new BranchGroup();\n\ttBG.setCapability (BranchGroup.ALLOW_DETACH);\n\n System.out.println(\"Aqui\");\n \n\tx = sx+0f; y = sy+0.04f; z = sz+0f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[0]);\n\t//tBG.addChild (makeText (new Vector3d (sx+0,sy+1.1,sz+0), \"AP\"));\n\n\tx = sx-0.2f; y = sy-0.1f; z = sz+0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[1]);\n\t//tBG.addChild (makeText (new Vector3d (sx-2,sy+0,sz+1.5), \"IS_\"));\n\n\tx = sx+0.2f; y = sy-0.1f; z = sz+0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[2]);\n\t//tBG.addChild (makeText (new Vector3d (sx+2,sy+0,sz+1.5), \"IL\"));\n\n\tx = sx-0.32f; y = sy-0.1f; z = sz+0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[3]);\n\t//tBG.addChild (makeText (new Vector3d (sx-2.5,sy+0,sz+0.5), \"SI\"));\n\n\tx = sx+0.32f; y = sy-0.1f; z = sz+0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[4]);\n\t//tBG.addChild (makeText (new Vector3d (sx+2.5,sy+0,sz+0.5), \"LI\"));\n\n\tx = sx-0.32f; y = sy-0.1f; z = sz-0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[5]);\n\t//tBG.addChild (makeText (new Vector3d (sx-2.5,sy+0,sz-0.5), \"SA\"));\n\n\tx = sx+0.32f; y = sy-0.1f; z = sz-0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[6]);\n\t//tBG.addChild (makeText (new Vector3d (sx+2.5,sy+0,sz-0.5), \"LA\"));\n\n\tx = sx-0.2f; y = sy-0.1f; z = sz-0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[7]);\n\t//tBG.addChild (makeText (new Vector3d (sx-2,sy+0,sz-1.5), \"AS_\"));\n\n\tx = sx+0.2f; y = sy-0.1f; z = sz-0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[8]);\n\t//tBG.addChild (makeText (new Vector3d (sx+2,sy+0,sz-1.5), \"AL\"));\n\n\tsceneBG.addChild (tBG);\n }",
"@Override\n public void onReceive() {\n //下班充电状态\n boolean isRobotWorking = RobotManager.getInstance().isRobotWorking();\n int robotStatus = RobotManager.getInstance().getRobotStatus();\n boolean isCancellingCharge = RobotManager.getInstance().getIsCancellingCharge();\n boolean isGoing2Charge = RobotManager.getInstance().getIsGoing2Charge();\n int chargeState = RobotManager.getInstance().getChargeState();\n\n if (robotStatus == 4) {\n if (isRobotWorking) {\n translateAnimator.start();\n return;\n }\n }\n\n if (!isRobotWorking && robotStatus != 4 && !isCancellingCharge) {\n if (chargeState == 0) {\n translateAnimator.cancel();\n choseImage(4);\n return;\n }\n }\n\n if (robotStatus != 2 && RobotManager.getInstance().battery.get() != -1 && RobotManager.getInstance().battery.get() <= ConstantValue.batteryThreshold && chargeState == 0) {\n translateAnimator.cancel();\n choseImage(4);\n return;\n } else if ((robotStatus == 2) && isRobotWorking && RobotManager.getInstance().battery.get() >= ConstantValue.batteryCeil) {\n //充电完成开始巡游 //上班时间\n LogcatHelper.logd(StatisticsConstant.STARTMOVE, \"\", StatisticsConstant.WORKENDCHARGE);\n RobotManager.getInstance().setRobotStatus(0);\n translateAnimator.start();\n return;\n } else if (robotStatus == 2 && chargeState == 0) {\n RobotManager.getInstance().setRobotStatus(2);\n translateAnimator.cancel();\n choseImage(4);\n return;\n } else if (robotStatus == 3 && chargeState == 0) {\n translateAnimator.cancel();\n choseImage(4);\n return;\n }\n }",
"@Test\n\tpublic void upDownBlackCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(21,48);\n\t\td.set(27,70);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(70);\n\t\tassertTrue(3==test_arr.get(0).getX() && 5==test_arr.get(0).getY());\n\n\t}",
"public void lightPosition() throws Exception {\n\t\tGlobal.colorSensorSwitch = true;\n\t\tGlobal.secondLine = \"light positionning\";\n\t\tThread.sleep(Global.THREAD_SLEEP_TIME); // wait color sensor to get its values\n\n\t\t// reset X\n\t\t// move until sensor sees black line\n\t\tmove(Global.KEEP_MOVING, true);\n\t\twhile (!Global.BlackLineDetected) {\n\n\t\t}\n\t\t// move back to black line\n\t\tmove(0 - Global.ROBOT_LENGTH, false);\n\t\tThread.sleep(250);\n\n\t\t// reset angle\n\t\t// turn until color sensor sees a black line then turn to 90 degree\n\t\tturn(0 - Global.KEEP_MOVING, true);\n\t\twhile (!Global.BlackLineDetected) {\n\n\t\t}\n\t\tturn(Global.COLOR_SENSOR_OFFSET_ANGLE, false);\n\n\t\t// reset Y\n\t\t// move until sensor sees black line\n\t\tmove(Global.KEEP_MOVING, true);\n\t\twhile (!Global.BlackLineDetected) {\n\n\t\t}\n\t\t// move back to black line\n\t\tmove(0 - Global.ROBOT_LENGTH, false);\n\t\tThread.sleep(250);\n\n\t\tturn(Global.KEEP_MOVING, true);\n\t\twhile (!Global.BlackLineDetected) {}\n\t\tturn(Global.COLOR_SENSOR_OFFSET_ANGLE_SMALL, false);\n\n\t\t// turn off color sensor\n\t\tGlobal.colorSensorSwitch = false;\n\n\t\t// wait color sensor is turned off\n\t\tThread.sleep(200);\n\n\t\t// rjeset coordinates\n\t\tGlobal.angle = 0;\n\t\tGlobal.X = -1;\n\t\tGlobal.Y = -1;\n\t\t\n\t\tGlobal.secondLine = \"\";\n\t}",
"@Test\n\tpublic void upDownWhiteCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(21,48);\n\t\td.set(8,37);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(37);\n\t\tassertTrue(3==test_arr.get(0).getX() && 4==test_arr.get(0).getY());\n\t}",
"public void targetCrochet() {\n\t\twhile(true) {\n\t\t\tm_camera.read(m_originalImage);\n\t\t\ttry {\n\t\t\t\tThread.sleep(0);\n\t\t\t}\n\t\t\tcatch (java.lang.InterruptedException e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (m_originalImage.cols() != 0)\n\t\t\t\t\tbreak;\n\t\t}\n\t\tm_srcImage = m_originalImage.clone();\n\t\tm_hsvImage = m_srcImage.clone();\n\t\tMat backupImage = m_originalImage.clone();\n\t\tImgproc.cvtColor(m_srcImage, m_hsvImage, Imgproc.COLOR_BGR2HSV);\n\t\t\n\t\t/*\n\t\t * Permet de faire le choix de l'intervale de couleur\n\t\t * \n\t\t * Param1 = source, Param2 = 3 valeur minimum HSV, Param3 = 3 valeur maximum HSV, Param 4 = destination\n\t\t *\n\t\t */\n\t\tCore.inRange(m_hsvImage, m_minHSV , m_maxHSV, m_hsvOverlay); // Valeur pour le tape\n\n\t\t//Core.multiply(m_hsvOverlay, new Scalar(0.75, 0.75, 0.75), m_hsvOverlay);\n\t\t//Core.multiply(m_hsvOverlay, new Scalar(0.3, 1, 1), m_hsvOverlay);\n\n\t\t//Nous allons utiliser le maintenant inutile hsvImage comme Mat de swap...\n\t\tImgproc.cvtColor(m_hsvOverlay, m_hsvImage, Imgproc.COLOR_GRAY2BGR);\n\t\t\n\t\t\n\t\t/*\n\t\t * findContour va trouver les contours des objets de l'image\n\t\t * \n\t\t */\n\t\tList<MatOfPoint> contours = new ArrayList<MatOfPoint>();\n\t\tImgproc.findContours(m_hsvOverlay, contours, new Mat(), Imgproc.RETR_LIST, Imgproc.CHAIN_APPROX_SIMPLE);\n\n\t\t//Core.multiply(srcImage, new ScacurrentFPSlar(0,0,0), srcImage);\n\n\t\t//Appliquer le masque...\n\n\t\t//Imgproc.cvtColor(m_hsvOverlay, m_hsvOverlay, Imgproc.COLOR_GRAY2BGR);\n\t\t//Core.bitwise_and(srcImage, m_hsvOverlay, srcImage);\n\n\t\tList<MatOfInt> convexhulls = new ArrayList<MatOfInt>(contours.size());\n\t\tList<MatOfPoint> targetHulls = new ArrayList<>();\n\t\tList<RotatedRect> rRects = new ArrayList<>();\n\t\tList<Double> orientations = new ArrayList<Double>();\n//\t\t//Dessiner les rectangles\n\t\tList<RotatedRect> selectedRect = new ArrayList<>();\n\t\tRotatedRect biggestRect = new RotatedRect();\n\t\tRotatedRect second = new RotatedRect();\n\t\tdouble biggestArea = 0;\n\t\tdouble secondBiggest = 0;\n\t\tPoint crochetPos = new Point();\n\t\tfor (int i = 0; i < contours.size(); i++)\n\t\t{\n//\t\t\t//Trier les contours qui ont une bounding box\n\t\t\tconvexhulls.add(i, new MatOfInt(6));\n\t\t\tdouble tempArea = Imgproc.contourArea(contours.get(i));\n\t\t\tif (tempArea > 100)\n\t\t\t{\n\t\t\t\tImgproc.convexHull(contours.get(i), convexhulls.get(i));\n\t\t\t\t//double contourSolidity = Imgproc.contourArea(contours.get(i))/Imgproc.contourArea(convexhulls.get(i));\n\t\t\t\t//Imgproc.drawContours(m_srcImage, contours, i, new Scalar(255, 255, 255), -1);\n\t\t\t\tMatOfPoint2f points = new MatOfPoint2f(contours.get(i).toArray());\n\t\t\t\tRotatedRect rRect = Imgproc.minAreaRect(points);\n\t\t\t\tMatOfPoint2f approx = new MatOfPoint2f();\n\t\t\t\tdouble epsilon = 0.012*Math.pow(Imgproc.arcLength(new MatOfPoint2f(contours.get(i).toArray()),true), 1.3);\n\t\t\t\tImgproc.approxPolyDP(new MatOfPoint2f(contours.get(i).toArray()),approx,epsilon,true);\n\t\t\t\tdouble convexArea = Imgproc.contourArea(approx);\n\t\t\t\tdouble ratio = rRect.size.area() / convexArea;\n\t\t\t\tImgproc.putText(m_srcImage, String.valueOf(ratio), new Point(30, i*70), 1, 1, new Scalar(255, 20, 20));\n\t\t\t\tImgproc.putText(m_srcImage, \"angle :\" + String.valueOf(Math.abs(rRect.angle%90)), rRect.center, 1, 1, new Scalar(155, 120, 20));\n\t\t\t\tMatOfPoint approxpoints = new MatOfPoint();\n\t\t\t\tapprox.convertTo(approxpoints, CvType.CV_32S);\n\t\t\t\tList<MatOfPoint> matofapprox = new ArrayList<>();\n\t\t\t\tmatofapprox.add(approxpoints);\n\t\t\t\tImgproc.drawContours(m_srcImage, matofapprox, 0, new Scalar(20, 25, 200), 5);\n\n\t\t\t\t//If its a tetragon, (ex, rectangle, trapezoid), add the convex hulls to the list\n\t\t\t\tif(approx.rows()==4) {\n\t\t\t\t\ttargetHulls.add(approxpoints);\n\t\t\t\t\trRects.add(rRect);\n\t\t\t\t}\n\t\t\t\tif (tempArea > biggestArea)\n\t\t\t\t{\n\t\t\t\t\tbiggestRect = rRect;\n\t\t\t\t\tbiggestArea = tempArea;\n\t\t\t\t}\n\t\t\t\tPoint[] vertices = new Point[4];\n\t\t\t\trRect.points(vertices);\n\t\t\t\tdouble Center_Y = rRect.center.y;\n\t\t\t\tdouble Center_X = rRect.center.x;\n\n\t\t\t\tScalar color = new Scalar(255, 0, 0);\n\n\t\t\t\tImgproc.line(m_srcImage, new Point(Center_X, Center_Y - 50), new Point(Center_X, Center_Y + 50), color, 2);\n\t\t\t\t//System.out.println(contourSolidity);\n\t\t\t}\n\t\t}\n\n\t\tArrayList<Tuple<Target, Target>> ListOfPairs = new ArrayList<>();\n\t\t//We need to make pairs of targets for further calculation\n\t\t//First we should sort the targetHulls by position along x\n\t\tArrayList<Target> ListOfTargets = new ArrayList<>();\n\t\tfor(int i = 0; i < targetHulls.size(); i++){\n\t\t\tListOfTargets.add(new Target(rRects.get(i), targetHulls.get(i)));\n\t\t}\n\n\t\tCollections.sort(ListOfTargets, new Comparator<Target>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Target o1, Target o2) {\n\t\t\t\treturn o1.rect.center.x < o2.rect.center.x ? -1 : o1.rect.center.x == o2.rect.center.x ? 0:1;\n\t\t\t}\n\t\t});\n\n\t\tBoolean skip = false;\n\t\tfor(int i = 0; i < ListOfTargets.size(); i++){\n\t\t\tdouble angle = Math.abs(ListOfTargets.get(i).rect.angle%90);\n\t\t\tif(skip){\n\t\t\t\tskip = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(angle > 60 && angle < 90 && i+1<targetHulls.size()) {\n\t\t\t\tListOfPairs.add(new Tuple(ListOfTargets.get(i), ListOfTargets.get(i+1)));\n\t\t\t\tskip = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tdouble highestDistance = 0;\n\t\tint chosenIndex = 0;\n\t\tfor(int i = 0; i<ListOfPairs.size(); i++){\n\t\t\tTuple<Target, Target> tempTarget = ListOfPairs.get(i);\n\t\t\t//Calculate mean point:\n\t\t\tPoint mean = new Point((tempTarget.x.rect.center.x + tempTarget.y.rect.center.x)/2, (tempTarget.x.rect.center.y + tempTarget.y.rect.center.y)/2);\n\t\t\t//Calcualte distance\n\t\t\tdouble distance = Math.sqrt(Math.pow((tempTarget.x.rect.center.x - tempTarget.y.rect.center.x),2) + Math.pow(tempTarget.x.rect.center.y = tempTarget.y.rect.center.y, 2));\n\t\t\t//calculate angle of mean point\n\t\t\tdouble degree = Math.atan(((mean.x-CENTRE_IMAGE_X)*CONV_PIXEL2CM)/FOV_LENGHT)*2;\n\t\t\tdegree = Math.toDegrees(degree);\n\t\t\tif(distance > highestDistance) {\n\t\t\t\tchosenIndex = i;\n\t\t\t\tm_degree = degree;\n\t\t\t\ttables.setAngle(degree, 0);\n\t\t\t\tSystem.out.println(degree);\n\t\t\t}\n\t\t\tMatOfPoint combinedPoints = new MatOfPoint();\n\t\t\tArrayList<Mat> concatList = new ArrayList<>();\n\t\t\tconcatList.add(tempTarget.x.hull);\n\t\t\tconcatList.add(tempTarget.y.hull);\n\t\t\tCore.vconcat(concatList, combinedPoints);\n\t\t\tArrayList<MatOfPoint> pointsList = new ArrayList<>();\n\t\t\tpointsList.add(combinedPoints);\n\t\t\tRect boundingRect = Imgproc.boundingRect(combinedPoints);\n\t\t\tPoint[] vertices = new Point[4];\n\t\t\tRotatedRect rRect = new RotatedRect();\n\t\t\trRect.angle = 0;\n\t\t\trRect.size = boundingRect.size();\n\t\t\trRect.center = new Point(boundingRect.x + (boundingRect.size().width/2), boundingRect.y + (boundingRect.size().height/2));\n\t\t\trRect.points(vertices);\n\t\t\tfor (int j = 0; j < 4; j++) //Dessiner un rectangle avec rotation\n\t\t\t{\n\t\t\t\tImgproc.line(m_srcImage, vertices[j], vertices[(j+1)%4], new Scalar(20,200,40), 5);\n\t\t\t}\n\t\t\tImgproc.drawMarker(m_srcImage, mean, new Scalar(40, 200, 200), Imgproc.MARKER_CROSS, 40, 1, Imgproc.LINE_AA);\n\t\t}\n\n\t\tCore.add(m_srcImage, backupImage, m_srcImage);\n\t}",
"public void grab() {\n\t\tif (climbMode == false) {\n\t\t\tif (bumperL) {\n\t\t\t\tmotorGL.set(-1);\n\t\t\t\tmotorGR.set(1);\n\t\t\t} \n\t\t\telse if (bumperR) {\n\t\t\t\tmotorGL.set(1);\n\t\t\t\tmotorGR.set(-1);\n\t\t\t}\t\n\t\t\telse {\n\t\t\t\tmotorGL.set(0);\n\t\t\t\tmotorGR.set(0);\n\t\t\t}\n\t\t}\n\t}",
"public synchronized void m29983k() {\n if (this.f23294u.isEmpty()) {\n if (this.f23286B == null) {\n this.f23286B = new C7030c(7, null, this.f23290J);\n }\n if (this.f23286B.f23372f == null) {\n this.f23286B = new C7030c(7, null, this.f23290J);\n }\n if (XGPushConfig.enableDebug) {\n C6864a.m29298c(\"TpnsChannel\", \"Action -> send heartbeat \");\n }\n m29967a(-1, this.f23286B);\n if ((f23266a > 0 && f23266a % 3 == 0) || f23266a == 2) {\n C6901c.m29459a().mo33104a((Runnable) new Runnable() {\n public void run() {\n C7056i.m30212h(C6973b.m29776f());\n }\n });\n }\n }\n m29985m();\n C6860a.m29257b(C6973b.m29776f());\n C7059f.m30231a(C6973b.m29776f()).mo34155a();\n m29980i();\n if (XGPushConfig.isLocationEnable(C6973b.m29776f())) {\n if (f23264F == 0) {\n f23264F = C7055h.m30167a(C6973b.m29776f(), Constants.LOC_REPORT_TIME, 0);\n }\n long currentTimeMillis = System.currentTimeMillis();\n if (f23264F == 0 || Math.abs(currentTimeMillis - f23264F) > ((long) f23281p)) {\n final JSONObject reportLocationJson = CustomDeviceInfos.getReportLocationJson(C6973b.m29776f());\n C6901c.m29459a().mo33104a((Runnable) new Runnable() {\n public void run() {\n C7046a.m30130b(C6973b.m29776f(), \"location\", reportLocationJson);\n }\n });\n f23264F = currentTimeMillis;\n C7055h.m30171b(C6973b.m29776f(), Constants.LOC_REPORT_TIME, currentTimeMillis);\n }\n }\n }",
"Light getEWlight();",
"@Override\n public void onReceive(Context context, Intent intent) {\n Log.d(\"ALARMA\", \"alarma\");\n AlarmUtils.scheduleAlarmHeartRate();\n BleDevice device = new BleDevice(new DeviceManager().getDevice().getMacAddress());\n\n device.connect();\n /*\n while(!device.readSteps(new StepsListener() {\n @Override\n public void onStepsRead(int value) {\n Log.d(\"ALARMA\", value+\"\");\n }\n })){\n }\n */\n\n while(!device.readHeartRate(new HeartRateListener() {\n @Override\n public void onHeartRateRead(int value) {\n Log.d(\"ALARMA\", value+\"\");\n\n Measurement measurement = new Measurement(new SessionManager().getId(), value, currentTimeMillis()/1000);\n new ApiHelper().uploadHeartRateMeasure(measurement, new SessionManager().getJWT());\n }\n }));\n }",
"void updateBeaconPosition(int beaconID);",
"public static void main( String[] args)\r\n\t{\r\n\t\t\r\n\t\tNetworkTable piVals = NetworkTable.getTable(\"piTable\"); \r\n\t\t\r\n\t\tdouble startPro = 0; \r\n\t\tlong startMills = Instant.now().toEpochMilli(); \r\n\t\t//double start = System.currentTimeMillis();\r\n\t\t\r\n\t//\tString address = \"roboRIO-5822-FRC.local\";\r\n\t\t\r\n\t\t\t\t\r\n\t\tSystem.loadLibrary(Core.NATIVE_LIBRARY_NAME);\r\n\t\t\r\n\t\tVideoCapture capture = new VideoCapture();\r\n\t\t\r\n\t\t//this link has changed, check with code on the pi right now \r\n\t\tcapture.open(\"http://10.58.22.72/mjpg/video.mjpg\");\r\n\t\t\r\n\t\tMat bgr = new Mat(); \r\n\t\tMat hsvConvert = new Mat(); \r\n\t\tMat hsv = new Mat();\r\n\t\tMatOfPoint test = new MatOfPoint(); \r\n\t\tArrayList<MatOfPoint> contours = new ArrayList<MatOfPoint>();\r\n\t\tArrayList<MatOfPoint> finalContours = new ArrayList<MatOfPoint>();\r\n\t\tMatOfPoint biggest = null; \r\n\t\tMat mhierarchy = new Mat(); //have no clue why hierarchy is needed. Still need to figure this one out. \r\n\t\tdouble centerX; \r\n\t\tdouble distance;\r\n\t\tdouble [] nums = new double [4]; \r\n\t\tnums = null; \r\n\t\t//int greta = 0; \r\n\t\t\r\n\t\twhile (true) \r\n\t\t{\r\n\t\t\t\r\n\t\t\tstartPro = piVals.getNumber(\"RioTime\",0); \r\n\t\t\tcontours.clear(); \r\n\t\t\tfinalContours.clear(); \r\n\r\n\t\t\tcapture.read(bgr);\r\n\t\t\t//Imgcodecs.imwrite(\"greenCart.jpg\",bgr);\t\r\n\t\t\tImgproc.cvtColor(bgr, hsvConvert, Imgproc.COLOR_BGR2HSV); //using RGB does not work. MUST use BGR. We are still unsure of the reasons. \r\n\t\t\tCore.inRange(hsvConvert, new Scalar (13, 39, 135), new Scalar (92, 118, 255), hsv); //those two Scalar values are the the max and min HSV values respectively. Those were determined in GRIP. \r\n\t\t\tImgproc.findContours(hsv, contours, mhierarchy, Imgproc.RETR_LIST, Imgproc.CHAIN_APPROX_SIMPLE); //first enum lets you control things about hierarchy, I chose option with no hierarchy \r\n\r\n\t\t\tint idex=0; \r\n\t\t\tint size = contours.size();\r\n\t\t\t\r\n\t\t\t//changed to a for loop \r\n\t\t\tfor (idex=0; idex < contours.size(); idex++)\r\n\t\t\t{\r\n\t\t\t\ttest = contours.get(idex); \r\n\t\t\t\tif (Imgproc.contourArea(test)>100)\r\n\t\t\t\t{\r\n\t\t\t\t\tfinalContours.add(test); \r\n\t\t\t\t}\r\n\t\t\t\tidex++; \r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (finalContours.size()>0)\r\n\t\t\t{\r\n\t\t\t\tnums = findCenterXDistance(finalContours.get(0).toList());\r\n\t\t\t\t//System.out.println(\"CENTER X COORIDINATE OF CONTOUR \" +0+ \": \" + nums[2]);\r\n\t\t\t\tSystem.out.println(\"DISTANCE TO CONTOUR \" +0+ \": \" + (12*nums[3]));\r\n\t\t\t\tpiVals.putNumber(\"Center\", nums[2]);\r\n\t\t\t\tpiVals.putNumber(\"Distance\", (12*nums[3])); \r\n\t\t\t\tpiVals.putNumber(\"Start Time\", startPro); \r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\t//for (int count = 0; count < finalContours.size(); count++)\r\n\t\t\t//{ \r\n\t\t\t\t\r\n\t\t\t//\tnums = findCenterXDistance(finalContours.get(count).toList());\r\n\t\t\t\t//System.out.println(\"CENTER X COORIDINATE OF CONTOUR \" +count+ \": \" + nums[2]);\r\n\t\t\t//\tSystem.out.println(\"DISTANCE TO CONTOUR \" +count+ \": \" + (12*nums[3]));\r\n\t\t\t//\trobot.Send(rioMillis, true, nums[2], nums[3]); \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t//}\t\t\r\n\t\t\t\t\r\n\t\t}\r\n\t}",
"public Thresholding(ThresholdsState ts) { // Sets the constants for thresholding for each pitch \n\t\tredBallThresh[0][0] = 130;\n\t\tredBallThresh[0][1] = 90;\n\t\tredBallThresh[0][2] = 90;\n\t\tredBallThresh[1][0] = 170;\n\t\tredBallThresh[1][1] = 170;\n\t\tredBallThresh[1][2] = 170;\n\t\tyellowRobotThresh[0][0] = 140;\n\t\tyellowRobotThresh[0][1] = 140;\n\t\tyellowRobotThresh[0][2] = 170;\n\t\tyellowRobotThresh[1][0] = 150;\n\t\tyellowRobotThresh[1][1] = 190;\n\t\tyellowRobotThresh[1][2] = 140;\n\t\tblueRobotThresh[0][0] = 120;\n\t\tblueRobotThresh[0][1] = 170;\n\t\tblueRobotThresh[0][2] = 90;\n\t\tblueRobotThresh[1][0] = 160;\n\t\tblueRobotThresh[1][1] = 230;\n\t\tblueRobotThresh[1][2] = 215;\n\n\n\t\tgreenPlatesThresh[0][0] = 120;\n\t\tgreenPlatesThresh[1][0] = 205;\n\n\n\t\tthis.ts = ts;\n\n\t}",
"@Override\n public void loop() {\n telemetry.addData(\"Status\", \"Running\"); //inform the driver\n\n //Calculate the power to set to each motor\n\n //left side you subtract right_stick_x\n double FrontLeftVal = (gamepad1.left_stick_y - gamepad1.left_stick_x - gamepad1.right_stick_x) * Power; //front subtract left_stick_x\n double BackLeftVal = (gamepad1.left_stick_y + gamepad1.left_stick_x - gamepad1.right_stick_x) * Power; //back subtract left_stick_x\n\n //right side you add right_stick_x\n double FrontRightVal = (gamepad1.left_stick_y + gamepad1.left_stick_x + gamepad1.right_stick_x) * Power; //front add left_stick_x\n double BackRightVal = (gamepad1.left_stick_y - gamepad1.left_stick_x + gamepad1.right_stick_x) * Power; //back subtract left_stick_x\n\n FLM.setPower(FrontLeftVal); //set the power to the motor\n FRM.setPower(FrontRightVal);\n BLM.setPower(BackLeftVal);\n BRM.setPower(BackRightVal);\n\n if (gamepad1.y) {\n if (!YPressed1) {\n YPressed1 = true;\n if (DragArm.getPosition() < DragArmDownPosition) {\n DragArm.setPosition(DragArmDownPosition);\n } else {\n DragArm.setPosition(DragArmRestPosition);\n }\n }\n } else if (YPressed1) YPressed1 = false;\n\n if (gamepad2.a) {\n SetLiftPosition(Position1Inches);\n } else if (gamepad2.b) {\n SetLiftPosition(Position2Inches);\n } else if (gamepad2.y) {\n SetLiftPosition(Position3Inches);\n } else if (gamepad2.left_bumper) {\n if (UpLift.getCurrentPosition() >= Position1Inches * UpInchesToTicks) {\n SetLiftPosition(UpLift.getCurrentPosition() - 756);\n } else {\n SetLiftPosition(Position0Inches);\n }\n } else {\n UpLift.setPower(0);\n }\n\n if (gamepad2.left_trigger == 1) {\n if (!LeftTrigger2) {\n LeftTrigger2= true;\n if (LiftGrab.getPosition() != LiftGrabGrabPosition)\n LiftGrab.setPosition(LiftGrabGrabPosition);\n else LiftGrab.setPosition(LiftGrabRestPosition);\n }\n } else if (LeftTrigger2) LeftTrigger2= false;\n\n if (gamepad2.right_trigger == 1) {\n if (!RightTrigger2) {\n RightTrigger2 = true;\n if (UpLift.getCurrentPosition() > Position2Inches) {\n if (LiftSwivel.getPosition() != LiftSwivelRestPosition)\n LiftSwivel.setPosition(LiftSwivelRestPosition);\n else LiftSwivel.setPosition(LiftSwivelOutPosition);\n }\n }\n } else if (RightTrigger2) RightTrigger2 = false;\n\n if (gamepad1.b) {\n if (!BPressed1) {\n BPressed1 = true;\n if (BigSuck.getPower() == BigSuckPower) {\n SmallSuck.setPower(0);\n BigSuck.setPower(0);\n\n DragArm.setPosition(DragArmRestPosition);\n } else {\n BigSuck.setPower(BigSuckPower);\n SmallSuck.setPower(SmallSuckPower);\n DragArm.setPosition(DragArmUpPosition);\n }\n }\n } else if (BPressed1) BPressed1 = false;\n\n if (gamepad1.x) {\n if (!XPressed1) {\n XPressed1 = true;\n if (BigSuck.getPower() == -BigSuckPower) {\n BigSuck.setPower(0);\n SmallSuck.setPower(0);\n } else {\n BigSuck.setPower(-BigSuckPower);\n SmallSuck.setPower(-SmallSuckPower);\n }\n }\n } else if (XPressed1) XPressed1 = false;\n\n if (gamepad1.a) {\n if (!A1) {\n A1 = true;\n if (Push.getPosition() == PushRestPosition) {\n Push.setPosition(PushPushPosition);\n } else {\n Push.setPosition(PushRestPosition);\n }\n }\n } else if (A1) A1 = false;\n\n telemetry.addData(\"Up Position\", UpLift.getCurrentPosition());\n telemetry.update(); //update the telemetry\n }",
"private int getCloseColor(int[] prgb) {\n \t\t\tfloat[] phsv = { 0, 0, 0 };\n \t\t\trgbToHsv(prgb[0], prgb[1], prgb[2], phsv);\n \t\t\t\n \t\t\tfloat hue = phsv[0];\n \t\t\tfloat val = phsv[2] * 100 / 256;\n \n \t\t\tint closest = -1;\n \n \t\t\tfinal int white = 15;\n \t\t\tfinal int black = 1;\n \t\t\tfinal int grey = 14;\n \t\t\t\n \t\t\tif (phsv[1] < (hue >= 30 && hue < 75 ? 0.66f : 0.33f)) {\n \t\t\t\tif (val >= 70) {\n \t\t\t\t\tclosest = white;\n \t\t\t\t} else if (val >= 10) {\n \t\t\t\t\t// dithering will take care of the rest\n \t\t\t\t\tclosest = grey;\n \t\t\t\t} else {\n \t\t\t\t\tclosest = black;\n \t\t\t\t}\n \t\t\t}\n \t\t\telse {\n \t\t\t\tclosest = getClosestColorByDistance(palette, firstColor, 16, prgb, 12);\n \t\t\t\t\n \t\t\t\t// see how the color matches\n \t\t\t\tif (closest == black) {\n \t\t\t\t\tif (phsv[1] > 0.9f) {\n \t\t\t\t\t\tif ((hue >= 75 && hue < 140) && (val >= 5 && val <= 33)) {\n \t\t\t\t\t\t\tclosest = 12;\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\t/*else {\n \t\t\t\t\tint rigid = rigidMatch(phsv, hue, val);\n \t\t\t\t\tif (phsv[1] < 0.5f && (rigid == 1 || rigid == 14 || rigid == 15)) {\n \t\t\t\t\t\tclosest = rigid;\n \t\t\t\t\t}\n \t\t\t\t}*/\n \t\t\t}\n \t\t\t\n \t\t\t//closest = rigidMatch(phsv, hue, val);\n \t\t\t\n \t\t\treturn closest;\n \t\t}",
"public void keyPressed() {\n\t if (key == CODED) {\n\t ///// geometry per pixel\n\t if (keyCode == UP) {\n\t skip+=1;\n\t } \n\t if (keyCode == DOWN) {\n\t if (skip >= 5){\n\t skip-=1;\n\t }\n\t }\n\t ///// scale ratio (fits the kinect image to the canvas)\n\t if (keyCode == LEFT) {\n\t kScale-=100;\n\t } \n\t if (keyCode == RIGHT) {\n\t kScale+=100;\n\t } \n\t \n\t }\n\t \n\t ///// adjust Kinect tilt\n\t if(keyPressed) {\n\t if (key == 'a' || key == 'A') {\n\t deg++;\n\t } else if (key == 'z' || key == 'Z') {\n\t \n\t deg--;\n\t }\n\t deg = constrain(deg,0,30);\n\t kinect.tilt(deg);\n\t \n\t ///// adjust depth threshold\n\t } if (key == 's' || key == 'S') { /// thresh 1\n\t if(threshold1 < threshold2){\n\t threshold1 +=10;\n\t println(\"threshold1: \" + threshold1);\n\t }\n\t } if (key == 'x' || key == 'X') { /// thresh 1\n\t if(threshold1 > 0 ){\n\t threshold1 -=10;\n\t println(\"threshold1: \" + threshold1);\n\t }\n\t } if (key == 'd' || key == 'D') { /// thresh 2\n\t if(threshold2 < threshold3){\n\t threshold2 +=10;\n\t println(\"threshold2: \" + threshold2);\n\t }\n\t } if (key == 'c' || key == 'C') { /// thresh 2\n\t if(threshold2 > threshold1){\n\t threshold2 -=10;\n\t println(\"threshold2: \" + threshold2); \n\t }\n\t }if (key == 'f' || key == 'F') { /// thresh 3\n\t if(threshold3 < threshold4){\n\t threshold3 +=10;\n\t println(\"threshold2: \" + threshold2);\n\t }\n\t }if (key == 'v' || key == 'v') { /// thresh 3\n\t if(threshold3 > threshold2){\n\t println(\"threshold3: \" + threshold3);\n\t threshold3 -=10;\n\t }\n\t //// this does opacity for the objects\n\t }if (key == 'g' || key == 'V') { /// thresh 3\n\t if(threshold3 > threshold2){\n\t ///// println(\"threshold3: \" + threshold3);\n\t objOpacity +=10;\n\t }\n\t }if (key == 'b' || key == 'B') { /// thresh 3\n\t if(threshold3 > threshold2){\n\t //// println(\"threshold3: \" + threshold3);\n\t objOpacity -=10;\n\t }\n\t }if (key == ' ') { /// toddgle threshold display\n\t if(displayThreshold == true){\n\t displayThreshold = false;\n\t } else if (displayThreshold == false){\n\t displayThreshold = true;\n\t }\n\t }\n\t /// end key pressed\n\t \n\t //// end\n\t}",
"@Override\r\n\t\t\tpublic void monitor()\r\n\t\t\t{\n\t\t\t\twhile(true)\r\n\t\t\t\t{\r\n\t\t\t\t\tRandom rm= new Random();\r\n\t\t\t\t\tint bp=rm.nextInt(200);\r\n\t\t\t\t\tSystem.out.println(bp);\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tThread.sleep(100);\r\n\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(bp>140)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"High BP\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}",
"public void run() {\n while (true) {\n lcd.clear();\n int[] colorIds = new int [15];\n for (int i = 0; i < colorIds.length;i++) {\n colorIds[colorSensor.getColorID()+1] += 1;\n int currentMax = colorIds[0];\n int currentMaxIndex = 0;\n for(int j = 1; j < colorIds.length; j++) {\n if(colorIds[j] > currentMax) {\n currentMaxIndex = j;\n currentMax = colorIds[j];\n }\n }\n String color = getColorString(currentMaxIndex);\n //if (color.equals(\"Black\"))\n //DriveUtil.setSpeed(80);\n if (color.equals(\"Orange\") || color.equals(\"Green\") || color.equals(\"Yellow\") || color.equals(\"Blue\")) {\n //DriveUtil.stopMotors();\n DriveUtil.setSpeed(1);\n lcd.drawString(\"Object Detected\", 1, 1);\n lcd.drawString(color, 1, 2);\n colorsDetected.add(color);\n Sound.twoBeeps();\n try {\n Thread.sleep(10000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n DriveUtil.setSpeed(FORWARD_SPEED);\n //break;\n }\n }\n }\n }",
"public final void mo3856d() {\n StringBuilder sb;\n String str;\n int i;\n C0735ko koVar = this.f3511b;\n C0544go goVar = C0544go.f2351M;\n Boolean bool = Boolean.TRUE;\n koVar.getClass();\n String b = C0432eo.m1607b(C0489fo.BLUETOOTH);\n if (b == null) {\n b = C0200av.m970a(-22762010006700L);\n }\n String str2 = b;\n if (!str2.isEmpty() || goVar.mo2961a()) {\n int i2 = -999;\n if (Build.VERSION.SDK_INT < 28) {\n String str3 = goVar.f2410c;\n if (goVar == C0544go.f2374g || goVar == C0544go.f2376h || goVar == C0544go.f2352N) {\n str3 = C0200av.m970a(-25996120380588L);\n }\n try {\n i2 = ((Integer) (C0735ko.f3016e.getParameterTypes().length == 4 ? C0735ko.f3016e.invoke(C0735ko.f3015d, new Object[]{Integer.valueOf(goVar.f2409b), 1, str2, str3}) : C0735ko.f3016e.invoke(C0735ko.f3015d, new Object[]{Integer.valueOf(goVar.f2409b), 1, str2}))).intValue();\n } catch (Exception e) {\n Throwable d = C0279ch.m1107d(-26979667891372L, C0279ch.m1118o(e, C0279ch.m1104a(-26756329591980L, C0279ch.m1106c(C0200av.m970a(-26077724759212L)), e, C0200av.m970a(-26726264820908L), -26919538349228L), -26949603120300L), e);\n if (d != null) {\n C0279ch.m1115l(-27091337041068L, new StringBuilder(), d, C0200av.m970a(-27061272269996L), d);\n } else {\n C0550gu.m1819a(C0200av.m970a(-27125696779436L), C0200av.m970a(-27155761550508L));\n }\n C0550gu.m1821c(e);\n i = -999;\n }\n } else if (koVar.f3020a == null) {\n C0550gu.m1819a(C0200av.m970a(-24411277448364L), C0200av.m970a(-24441342219436L));\n i = 1;\n String a = C0200av.m970a(-26322537895084L);\n StringBuilder sb2 = new StringBuilder();\n C0279ch.m1113j(-26352602666156L, sb2, 35, -26374077502636L, bool, -26386962404524L, str2);\n C0279ch.m1111h(-26412732208300L, sb2, i);\n str = a;\n sb = sb2;\n } else {\n String a2 = C0200av.m970a(-24518651630764L);\n try {\n if (C0735ko.f3017f.getParameterTypes().length == 3) {\n C0735ko.f3017f.invoke(koVar.f3020a, new Object[]{Integer.valueOf(goVar.f2409b), 1, a2});\n } else {\n C0735ko.f3017f.invoke(koVar.f3020a, new Object[]{Integer.valueOf(goVar.f2409b), 1, str2, a2});\n }\n i2 = 0;\n } catch (Throwable th) {\n Throwable e2 = C0279ch.m1108e(-26979667891372L, C0279ch.m1123t(th, C0279ch.m1105b(-26756329591980L, C0279ch.m1106c(C0200av.m970a(-24600256009388L)), th, C0200av.m970a(-26726264820908L), -26919538349228L), -26949603120300L), th);\n if (e2 != null) {\n C0279ch.m1115l(-27091337041068L, new StringBuilder(), e2, C0200av.m970a(-27061272269996L), e2);\n } else {\n C0550gu.m1819a(C0200av.m970a(-27125696779436L), C0200av.m970a(-27155761550508L));\n }\n C0550gu.m1821c(th);\n }\n }\n i = i2;\n String a3 = C0200av.m970a(-26322537895084L);\n StringBuilder sb22 = new StringBuilder();\n C0279ch.m1113j(-26352602666156L, sb22, 35, -26374077502636L, bool, -26386962404524L, str2);\n C0279ch.m1111h(-26412732208300L, sb22, i);\n str = a3;\n sb = sb22;\n } else {\n str = C0200av.m970a(-26107789530284L);\n sb = new StringBuilder();\n C0279ch.m1112i(-26137854301356L, sb, 35, -26206573778092L);\n }\n C0550gu.m1820b(str, sb.toString());\n AudioManager audioManager = this.f3511b.f3020a;\n if (audioManager != null) {\n audioManager.stopBluetoothSco();\n }\n }",
"private void combinedEdgeDetection() {\n if(isDetectingEdge())\n {\n if(currentCount == 0)\n {\n debugTimer.start();\n }\n currentCount++;\n// SmartDashboard.putInt(\"current count: \", currentCount);\n }\n else{//otherwise, leave the count at 0\n currentCount = 0;\n }\n //once the count reaches the minimum required for detection\n if(currentCount >= minDetectionCount)\n {\n //invert the current state of detection\n currentlyDetecting = !currentlyDetecting;\n// SmartDashboard.putDouble(\"timer count: \", debugTimer.get());\n debugTimer.stop();\n debugTimer.reset();\n }\n\t}",
"public void action() {\n\t\tsuppressed = false;\r\n\t\tpilot.setLinearSpeed(8);\r\n\t\tpilot.setLinearAcceleration(4);\r\n\t\tColorThread.updatePos = false;\r\n\t\tColorThread.updateCritical = false;\r\n\t\t//create a array to save the map information\r\n\t\tfor (int a = 0; a < 8; a++) {\r\n\t\t\tfor (int b = 0; b < 8; b++) {\r\n\t\t\t\trobot.probability[a][b] = -1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int a = 0; a < 8; a++) {\r\n\t\t\tfor (int b = 0; b < 8; b++) {\r\n\t\t\t\tif (a == 0 || a == 7 || b == 0 || b == 7) {\r\n\t\t\t\t\trobot.probability[a][b] = 100;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int a = 0; a < 6; a++) {\r\n\t\t\tfor (int b = 0; b < 6; b++) {\r\n\t\t\t\tif (robot.map[a][b].getOccupied() == 1) {\r\n\t\t\t\t\trobot.probability[a + 1][b + 1] = 100;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Step1: use ArrayList to save all of the probability situation.\r\n\t\tfloat front, left, right, back;\r\n\t\tfront = USThread.disSample[0];\r\n\t\trobot.setmotorM(90);\r\n\t\tDelay.msDelay(1000);\r\n\t\tleft = USThread.disSample[0];\r\n\t\trobot.setmotorM(-180);\r\n\t\tDelay.msDelay(1000);\r\n\t\tright = USThread.disSample[0];\r\n\t\trobot.setmotorM(90);\r\n\t\tDelay.msDelay(1000);\r\n\t\trobot.correctHeading(180);\r\n\t\tDelay.msDelay(1000);\r\n\t\tback = USThread.disSample[0];\r\n\t\trobot.correctHeading(180);\r\n\t\tfor (int a = 1; a < 7; a++) {\r\n\t\t\tfor (int b = 1; b < 7; b++) {\r\n\t\t\t\tif (robot.probability[a][b] == -1) {\r\n\t\t\t\t\tif (((robot.probability[a][b + 1] == 100 && front < 0.25)\r\n\t\t\t\t\t\t\t|| (robot.probability[a][b + 1] == -1 && front > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a + 1][b] == 100 && right < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a + 1][b] == -1 && right > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a][b - 1] == 100 && back < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a][b - 1] == -1 && back > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a - 1][b] == 100 && left < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a - 1][b] == -1 && left > 0.25))) {\r\n\t\t\t\t\t\t//direction is north\r\n\t\t\t\t\t\trobot.listOfPro.add(new ProPoint(0, 0, a, b));\r\n\t\t\t\t\t\t//System.out.println(\"0 \"+a+\" \"+b);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (((robot.probability[a + 1][b] == 100 && front < 0.25)\r\n\t\t\t\t\t\t\t|| (robot.probability[a + 1][b] == -1 && front > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a][b - 1] == 100 && right < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a][b - 1] == -1 && right > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a - 1][b] == 100 && back < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a - 1][b] == -1 && back > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a][b + 1] == 100 && left < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a][b + 1] == -1 && left > 0.25))) {\r\n\t\t\t\t\t\t// direction is east\r\n\t\t\t\t\t\trobot.listOfPro.add(new ProPoint(1, 0, a, b));\r\n\t\t\t\t\t\t//System.out.println(\"1 \"+a+\" \"+b);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (((robot.probability[a][b - 1] == 100 && front < 0.25)\r\n\t\t\t\t\t\t\t|| (robot.probability[a][b - 1] == -1 && front > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a - 1][b] == 100 && right < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a - 1][b] == -1 && right > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a][b + 1] == 100 && back < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a][b + 1] == -1 && back > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a + 1][b] == 100 && left < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a + 1][b] == -1 && left > 0.25))) {\r\n\t\t\t\t\t\t// direction is sourth\r\n\t\t\t\t\t\trobot.listOfPro.add(new ProPoint(2, 0, a, b));\r\n\t\t\t\t\t\t//System.out.println(\"2 \"+a+\" \"+b);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (((robot.probability[a - 1][b] == 100 && front < 0.25)\r\n\t\t\t\t\t\t\t|| (robot.probability[a - 1][b] == -1 && front > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a][b + 1] == 100 && right < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a][b + 1] == -1 && right > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a + 1][b] == 100 && back < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a + 1][b] == -1 && back > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a][b - 1] == 100 && left < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a][b - 1] == -1 && left > 0.25))) {\r\n\t\t\t\t\t\t// direction is west\r\n\t\t\t\t\t\trobot.listOfPro.add(new ProPoint(3, 0, a, b));\r\n\t\t\t\t\t\t//System.out.println(\"3 \"+a+\" \"+b);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Step 2: use loop to take control of robot walk and check the location correction\r\n\t\tboolean needLoop = true;\r\n\t\tint loopRound = 0;\r\n\t\twhile (needLoop) {\r\n\t\t\t// One of way to leave the loop is at the hospital\r\n\t\t\tif ((ColorThread.leftColSample[0] >= 0.2 && ColorThread.leftColSample[1] < 0.2\r\n\t\t\t\t\t&& ColorThread.leftColSample[1] >= 0.14 && ColorThread.leftColSample[2] <= 0.8)\r\n\t\t\t\t\t&& (ColorThread.rightColSample[0] >= 0.2 && ColorThread.rightColSample[1] < 0.2\r\n\t\t\t\t\t\t\t&& ColorThread.rightColSample[1] >= 0.11 && ColorThread.rightColSample[2] <= 0.08)) {\r\n\t\t\t\trobot.updatePosition(0, 0);\r\n\t\t\t\tint numOfAtYellow = 0;\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif (robot.listOfPro.get(i).getNowX() == 1 && robot.listOfPro.get(i).getNowY() == 1) {\r\n\t\t\t\t\t\tnumOfAtYellow++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(numOfAtYellow == 1) {\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif (robot.listOfPro.get(i).getNowX() == 1 && robot.listOfPro.get(i).getNowY() == 1) {\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\trobot.setDirection(false);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 3) {\r\n\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// do not to set the heading, because the default value is 0.\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t}else {\r\n\t\t\t\t\t//have two way to go to the yellow part\r\n\t\t\t\t\tfront = USThread.disSample[0];\r\n\t\t\t\t\trobot.setmotorM(90);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tleft = USThread.disSample[0];\r\n\t\t\t\t\trobot.setmotorM(-180);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tright = USThread.disSample[0];\r\n\t\t\t\t\trobot.setmotorM(90);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\trobot.correctHeading(180);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tback = USThread.disSample[0];\r\n\t\t\t\t\trobot.correctHeading(180);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tif(front<0.25 && right<0.25 && left>0.25 && back>0.25) {\r\n\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t}else if(front<0.25 && right>0.25 && back>0.25 && left<0.25) {\r\n\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t}else if(front>0.25 && right>0.25 && back<0.25 && left<0.25) {\r\n\t\t\t\t\t\t// do not to set the heading, because the default value is 0.\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\trobot.setDirection(false);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tneedLoop = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t//Another way to leave the loop is the robot arrive the green cell.\r\n\t\t\tif ((ColorThread.leftColSample[0] <= 0.09 && ColorThread.leftColSample[1] >= 0.17\r\n\t\t\t\t\t&& ColorThread.leftColSample[2] <= 0.09)\r\n\t\t\t\t\t&& (ColorThread.rightColSample[0] <= 0.09 && ColorThread.rightColSample[1] >= 0.014\r\n\t\t\t\t\t\t\t&& ColorThread.rightColSample[2] <= 0.11)) {\r\n\t\t\t\trobot.updatePosition(5, 0);\r\n\t\t\t\tint numOfAtGreen = 0;\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif (robot.listOfPro.get(i).getNowX() == 6 && robot.listOfPro.get(i).getNowY() == 1) {\r\n\t\t\t\t\t\tnumOfAtGreen++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(numOfAtGreen==1) {\r\n\t\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowX() == 6 && robot.listOfPro.get(i).getNowY() == 1) {\r\n\t\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\t\trobot.setDirection(false);\r\n\t\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 3) {\r\n\t\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// do not to set the heading, because the default value is 0.\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else {\r\n\t\t\t\t\tfront = USThread.disSample[0];\r\n\t\t\t\t\trobot.setmotorM(90);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tleft = USThread.disSample[0];\r\n\t\t\t\t\trobot.setmotorM(-180);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tright = USThread.disSample[0];\r\n\t\t\t\t\trobot.setmotorM(90);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\trobot.correctHeading(180);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tback = USThread.disSample[0];\r\n\t\t\t\t\trobot.correctHeading(180);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tif(front<0.25 && right<0.25 && left>0.25 && back>0.25) {\r\n\t\t\t\t\t\trobot.setDirection(false);\r\n\t\t\t\t\t}else if(front<0.25 && right>0.25 && back>0.25 && left<0.25) {\r\n\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t}else if(front>0.25 && right>0.25 && back<0.25 && left<0.25) {\r\n\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// do not to set the heading, because the default value is 0.\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tneedLoop = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t//The third way of leave the loop is the robot have already know his position and direction.\r\n\t\t\tint maxStepNumber = 0;\r\n\t\t\tint numberOfMaxSteps = 0;\r\n\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\tif (robot.listOfPro.get(i).getSteps() > maxStepNumber) {\r\n\t\t\t\t\tmaxStepNumber = robot.listOfPro.get(i).getSteps();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\tif (robot.listOfPro.get(i).getSteps() == maxStepNumber) {\r\n\t\t\t\t\tnumberOfMaxSteps++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (numberOfMaxSteps == 1) {\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif (robot.listOfPro.get(i).getSteps() == maxStepNumber) {\r\n\t\t\t\t\t\trobot.updatePosition(robot.listOfPro.get(i).getNowX() - 1,\r\n\t\t\t\t\t\t\t\trobot.listOfPro.get(i).getNowY() - 1);\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\trobot.setDirection(false);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 3) {\r\n\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// do not to set the heading, because the default value is 0.\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tneedLoop = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t//The below part are the loops.\r\n\t\t\tfront = USThread.disSample[0];\r\n\t\t\trobot.setmotorM(90);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tleft = USThread.disSample[0];\r\n\t\t\trobot.setmotorM(-180);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tright = USThread.disSample[0];\r\n\t\t\trobot.setmotorM(90);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\trobot.correctHeading(180);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tback = USThread.disSample[0];\r\n\t\t\trobot.correctHeading(180);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\t// move\r\n\t\t\t\r\n\t\t\tif (front > 0.25) {\r\n\t\t\t\trobot.getPilot().travel(25);\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif(robot.listOfPro.get(i).getSteps()==loopRound) {\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 0) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() + 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() + 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() - 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() - 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (left > 0.25) {\r\n\t\t\t\trobot.correctHeading(-90);\r\n\t\t\t\trobot.getPilot().travel(25);\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif(robot.listOfPro.get(i).getSteps()==loopRound) {\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 0) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(3);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() - 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(0);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() + 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(1);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() + 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(2);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() - 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (right > 0.25) {\r\n\t\t\t\trobot.correctHeading(90);\r\n\t\t\t\trobot.getPilot().travel(25);\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif(robot.listOfPro.get(i).getSteps()==loopRound) {\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 0) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(1);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() + 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(2);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() - 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(3);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() - 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(0);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() + 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\trobot.correctHeading(180);\r\n\t\t\t\trobot.getPilot().travel(25);\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif(robot.listOfPro.get(i).getSteps()==loopRound) {\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 0) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(2);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() - 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(3);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() - 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(0);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() + 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(1);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() + 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// It time to check the around situation\r\n\t\t\tfront = USThread.disSample[0];\r\n\t\t\trobot.setmotorM(90);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tleft = USThread.disSample[0];\r\n\t\t\trobot.setmotorM(-180);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tright = USThread.disSample[0];\r\n\t\t\trobot.setmotorM(90);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\trobot.correctHeading(180);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tback = USThread.disSample[0];\r\n\t\t\trobot.correctHeading(180);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t//System.out.println(robot.listOfPro.get(i).getSteps());\r\n\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 0) {\r\n\t\t\t\t\t\tif (((front < 0.25\r\n\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro.get(i).getNowY()\r\n\t\t\t\t\t\t\t\t\t\t+ 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (front > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() + 1] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((left < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t- 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (left > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() - 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((right < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (right > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() + 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((back < 0.25 && robot.probability[robot.listOfPro.get(i)\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getNowX()][robot.listOfPro.get(i).getNowY() - 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (back > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() - 1] == -1))) {\r\n\t\t\t\t\t\t\t//It is correct when the robot have the same data information with estimate information\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setSteps(robot.listOfPro.get(i).getSteps() + 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\tif (((left < 0.25\r\n\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro.get(i).getNowY()\r\n\t\t\t\t\t\t\t\t\t\t+ 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (left > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() + 1] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((back < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t- 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (back > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() - 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((front < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (front > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() + 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((right < 0.25 && robot.probability[robot.listOfPro.get(i)\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getNowX()][robot.listOfPro.get(i).getNowY() - 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (right > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() - 1] == -1))) {\r\n\t\t\t\t\t\t\t//It is correct when the robot have the same data information with estimate information\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setSteps(robot.listOfPro.get(i).getSteps() + 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\tif (((back < 0.25\r\n\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro.get(i).getNowY()\r\n\t\t\t\t\t\t\t\t\t\t+ 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (back > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() + 1] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((right < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t- 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (right > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() - 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((left < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (left > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() + 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((front < 0.25 && robot.probability[robot.listOfPro.get(i)\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getNowX()][robot.listOfPro.get(i).getNowY() - 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (front > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() - 1] == -1))) {\r\n\t\t\t\t\t\t\t//It is correct when the robot have the same data information with estimate information\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setSteps(robot.listOfPro.get(i).getSteps() + 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (((right < 0.25\r\n\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro.get(i).getNowY()\r\n\t\t\t\t\t\t\t\t\t\t+ 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (right > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() + 1] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((front < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t- 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (front > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() - 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((back < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (back > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() + 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((left < 0.25 && robot.probability[robot.listOfPro.get(i)\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getNowX()][robot.listOfPro.get(i).getNowY() - 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (left > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() - 1] == -1))) {\r\n\t\t\t\t\t\t\t//It is correct when the robot have the same data information with estimate information\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setSteps(robot.listOfPro.get(i).getSteps() + 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tloopRound++;\r\n\t\t}\r\n\t\t// if is out the while loop, it will find the heading and the position of robot right now.\r\n\t\t//Step 3: It is time to use wavefront to come back to the hospital\r\n\t\trobot.restoreDefault();\r\n\t\trobot.RunMode = 1;\r\n\t\tColorThread.updatePos = true;\r\n\t\tColorThread.updateCritical = true;\r\n\t}",
"public void actionPerformed(ActionEvent e)\n {\n if(y >= 550) //if the beaker is not filled\n {\n lab6.setBounds(510,y,230,60); \n lab6.setVisible(true); //displays blue bar image\n value += 5; //point value of blue\n y -= 60; //sets up to fill first half of beaker\n }\n else\n {\n //if beaker is full resets value and y coordinate\n y = 610;\n value = 0;\n }\n \n }"
] | [
"0.58688587",
"0.58404005",
"0.57126194",
"0.5583763",
"0.5534154",
"0.54954547",
"0.54189235",
"0.5418712",
"0.54023504",
"0.53959036",
"0.5386353",
"0.5370941",
"0.5337491",
"0.52974963",
"0.52958554",
"0.52787995",
"0.5275923",
"0.52554697",
"0.52541405",
"0.52533114",
"0.52449125",
"0.52448505",
"0.5242197",
"0.5226043",
"0.521743",
"0.5209864",
"0.5196722",
"0.51957124",
"0.5194823",
"0.5190098",
"0.51845795",
"0.51644087",
"0.5158406",
"0.5150891",
"0.51295114",
"0.5128957",
"0.51067847",
"0.51064116",
"0.51027286",
"0.510261",
"0.50969994",
"0.50907564",
"0.50885123",
"0.50816846",
"0.5080602",
"0.5079278",
"0.5072143",
"0.5069605",
"0.50687134",
"0.5068435",
"0.5068375",
"0.50659865",
"0.50641596",
"0.5062955",
"0.5057281",
"0.50556016",
"0.5052661",
"0.5050317",
"0.5047545",
"0.50430644",
"0.50321025",
"0.50319624",
"0.5027574",
"0.50142103",
"0.501414",
"0.501224",
"0.5011404",
"0.5011231",
"0.50027704",
"0.500072",
"0.49983147",
"0.4996158",
"0.4992597",
"0.49878377",
"0.49874392",
"0.4984876",
"0.49717468",
"0.49655443",
"0.4962184",
"0.49490044",
"0.49450877",
"0.49435702",
"0.4941296",
"0.4940508",
"0.4940093",
"0.49386668",
"0.49381763",
"0.4936096",
"0.49336112",
"0.493127",
"0.49297258",
"0.49274814",
"0.49252447",
"0.49217668",
"0.49215087",
"0.49137044",
"0.49078202",
"0.49072123",
"0.49055707",
"0.49021527",
"0.49015138"
] | 0.0 | -1 |
Handler for closing navigation first and performing action onClick after a certain delay | @Override
public boolean onNavigationItemSelected(@NonNull final MenuItem menuItem) {
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
switch (menuItem.getItemId()) {
case R.id.activity1:
Intent activity1 = new Intent(MainActivity.this, NavActivity1.class);
startActivity(activity1);
overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left); //Animation for opening activity
Toast.makeText(MainActivity.this, "Activity 1", Toast.LENGTH_SHORT).show();
break;
case R.id.activity2:
Intent activity2 = new Intent(MainActivity.this, NavActivity2.class);
startActivity(activity2);
overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left); //Animation for opening activity
Toast.makeText(MainActivity.this, "Activity 2", Toast.LENGTH_SHORT).show();
break;
case R.id.activity3:
Intent activity3 = new Intent(MainActivity.this, NavActivity3.class);
startActivity(activity3);
overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left); //Animation for opening activity
Toast.makeText(MainActivity.this, "Activity 3", Toast.LENGTH_SHORT).show();
break;
}
}
}, 200);
//...............
drawerLayout.closeDrawer(GravityCompat.START);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void closeActivity() {\n final Handler handler = new Handler(Looper.getMainLooper());\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n finish();\n }\n }, 250);\n }",
"public void finishActivity() {\r\n if (handler != null)\r\n handler.postDelayed(new Runnable() {\r\n @Override\r\n public void run() {\r\n finish();\r\n }\r\n }, 1000);\r\n\r\n }",
"@Override\n public void backToMainMenu() {\n try {\n Thread.sleep((long)480000);\n }\n catch (InterruptedException var1_1) {\n var1_1.printStackTrace();\n }\n if (this.activityActive && !this.getClass().equals((Object)SampleActivity.class)) {\n AudioDemo.Sound().playSound(\"a9\");\n try {\n Thread.sleep((long)10000);\n }\n catch (InterruptedException var2_2) {\n var2_2.printStackTrace();\n }\n this.finishInputMoney(false);\n }\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tGlobalClaass.activitySlideBackAnimation(context);\n\t\t\t\tfinish();\n\t\t\t}",
"@Override\n public void onBackPressed() {\n DrawerLayout drawer = findViewById(R.id.drawer_layout);\n if (drawer.isDrawerOpen(GravityCompat.START)) {\n drawer.closeDrawer(GravityCompat.START);\n } else {\n // salir de la app\n if (exit) {\n finish();\n } else {\n Toast.makeText(this, R.string.alert_close_message,\n Toast.LENGTH_SHORT).show();\n exit = true;\n new CountDownTimer(3000, 1000) {\n\n @Override\n public void onTick(long l) {\n\n }\n\n @Override\n public void onFinish() {\n exit = false;\n }\n }.start();\n }\n }\n }",
"@Override\n public void run() {\n try {\n Thread.sleep(2000);\n Intent i = new Intent(ScreenLogo.this, MusicProject.class);\n startActivity(i);\n ScreenLogo.this.finish();\n //handler.sendMessage(handler.obtainMessage(1));\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }",
"@Override\n\t\t public void onClick(View view) {\n\t\t \n\t\t finish();\n\t\t }",
"public void onBackPressed() {\n if (doubleBackToExitPressedOnce) {\n this.finish();\n super.onBackPressed();\n return;\n }\n\n this.doubleBackToExitPressedOnce = true;\n Toast.makeText(this, \"Please click BACK again to exit the game\", Toast.LENGTH_SHORT).show();\n\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n doubleBackToExitPressedOnce=false;\n }\n }, 2000);\n }",
"@Override\n public void onBackPressed() {\n if (doubleBackToExitPressedOnce) {\n super.onBackPressed();\n return;\n }\n\n this.doubleBackToExitPressedOnce = true;\n Toast.makeText(this, \"Please click BACK again to exit\", Toast.LENGTH_SHORT).show();\n\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n doubleBackToExitPressedOnce=false;\n }\n }, 2000);\n }",
"@Override\n public void onBackPressed() {\n if (backClickOnce) {\n finishAffinity();\n } else {\n backClickOnce = true;\n Toast.makeText(this, R.string.click_back_again_to_exit, Toast.LENGTH_SHORT).show();\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n backClickOnce = false;\n }\n }, 2000);\n }\n }",
"@Override\n public void onBackPressed() {\n if (exit) {\n System.exit(0);\n } else {\n Toast.makeText(this, \"Press Back again to Exit.\",\n Toast.LENGTH_SHORT).show();\n exit = true;\n new Handler().postDelayed(new Runnable() { //3 sn içinde iki defa basıldı mı kontrolu için\n @Override\n public void run() {\n exit = false;\n }\n }, 3 * 1000);\n }\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tfinish();\n\t\t\t\tactivityAnimationClose();\n\t\t\t}",
"@Override\n public void onBackPressed() {\n if (doubleBackToExitPressedOnce) {\n super.onBackPressed();\n updatePICstatus2();\n return;\n }\n this.doubleBackToExitPressedOnce = true;\n Toast.makeText(this, \"Please click Back again to exit\", Toast.LENGTH_SHORT).show();\n\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n doubleBackToExitPressedOnce = false;\n }\n }, 3000);\n }",
"private void waitForSplashAnimation(int duration) {\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n clearAndStartActivity(new Intent(SplashActivity.this, MainMenuActivity.class));\n }\n\n }, duration);\n }",
"@Override\n public void onClick(View view) {\n newtimer.cancel();\n finish();\n }",
"@Override\n public void onBackPressed() {\n if (doubleBackToExitPressedOnce) {\n super.onBackPressed();\n return;\n }\n this.doubleBackToExitPressedOnce = true;\n Toast.makeText(getApplicationContext(), \"Tap again to exit\",Toast.LENGTH_SHORT).show();\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n doubleBackToExitPressedOnce=false;\n }\n }, 2000);\n }",
"@Override\n public void onBackPressed() {\n if (doubleBackToExitPressedOnce) {\n super.onBackPressed();\n PlaceHolderFragment.newInstance().clearVariables();\n return;\n }\n this.doubleBackToExitPressedOnce = true;\n Toast.makeText(this, Tag.BACK, Toast.LENGTH_SHORT).show();\n\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n doubleBackToExitPressedOnce = false;\n }\n }, 3000);\n }",
"public void run() {\n mHandler.postDelayed(new Runnable() {\n public void run() {\n finish();\n startActivity(new Intent(getApplicationContext(), LoginActivity.class));\n }\n }, 3000);\n }",
"private void goToMainScreen() {\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n Intent mainIntent;\n\n MainActivity act = new MainActivity();\n Intent intent = new Intent(getApplication(), MainActivity.class);\n startActivity(intent);\n finish();\n }\n }, SPLASH_DISPLAY_LENGHT);\n }",
"@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\taccountRemainTitle.Aarrw(R.drawable.arrow_down);\r\n\t\t\t\tAccountRemainActivity.this.finish();\r\n\t\t\t}",
"private void handleActionBaz() {\n Notifier.cancelTimer(this);\n }",
"protected boolean navigationClick(int status, int time) {\n\t\t\t\tif(!isAnimating()){\n\t\t\t\t\tMenuModel menu = (MenuModel) root.getCookie(root.getCurrentNode());\n\t\t\t\t\tif(menu.isChild()){\n\t\t\t\t\t\tonMenuSelected(menu);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\treturn super.navigationClick(status, time);\n\t\t\t}",
"@Override\r\n public void onClick(View v) {\n finish();\r\n IntentToStartView();\r\n }",
"private static GeneralClickAction clickAndPressBackIfAccidentallyLongClicked() {\n return new GeneralClickAction(\n Tap.SINGLE, GeneralLocation.CENTER, Press.FINGER, ViewActions.pressBack());\n }",
"protected void onExit() {\r\n\t\tnew DelayAsyncTask(this, 500).execute();\r\n\t}",
"public void closeLink() {\n this.titleBarEnabled = false;\n fadeOutView(this.scrollView);\n fadeOutView(this.composerLayout);\n fadeOutView(this.titleBar);\n supportFinishAfterTransition();\n }",
"@Override\n public void onClick(View v) {\n finish ();\n }",
"@Override\n public boolean onNavigationItemSelected(final MenuItem item) {\n item.setChecked(true);\n mNavItemId = item.getItemId();\n\n mDrawerLayout.closeDrawer(GravityCompat.START);\n mDrawerActionHandler.postDelayed(new Runnable() {\n @Override\n public void run() {\n navigateTo((item.getItemId()));\n }\n }, DRAWER_CLOSE_DELAY_MS);\n return true;\n }",
"@Override\n\tpublic void onBackPressed() {\n\t\tif (lastClickTime <= 0) {\n\t\t\tToast.makeText(this, resources.getString(R.string.ToastPressAgain), Toast.LENGTH_SHORT).show();\n\t\t\tlastClickTime = System.currentTimeMillis();\n\t\t} else {\n\t\t\tlong currentClickTime = System.currentTimeMillis();\n\t\t\tif ((currentClickTime - lastClickTime) < 1000) {\n\t\t\t\t// 退出\n\t\t\t\t// finish();\n\t\t\t\t// 关闭整个程序\n\t\t\t\tSysApplication.getInstance().exit();\n\t\t\t} else {\n\t\t\t\tToast.makeText(this, resources.getString(R.string.ToastPressAgain), Toast.LENGTH_SHORT).show();\n\t\t\t\tlastClickTime = System.currentTimeMillis();\n\t\t\t}\n\t\t}\n\t}",
"@Override\n protected void clickAction(int numClicks) {\n exit(true);\n }",
"@Override\n public void onClick(View v) {\n finish();\n }",
"@Override\n public void onClick(View view) {\n finish();\n }",
"@Override\n public void onClick(View view) {\n finish();\n }",
"@Override\n public void onClick(View view) {\n finish();\n }",
"@Override\n public void onClick(View view) {\n finish();\n }",
"@Override\n public void onClick(View view) {\n finish();\n }",
"@Override\n public void onClick(View view) {\n finish();\n }",
"@Override\n public void onClick(View view) {\n finish();\n }",
"@Override\n public void onClick(View view) {\n finish();\n }",
"@Override\n public void onClick(View view) {\n finish();\n }",
"public void onClick(View view) {\n\t finish();\n\t }",
"@Override\n public void onClick(View v)\n {\n finish();\n }",
"public void click() {\n this.lastActive = System.nanoTime();\n }",
"@Override\n public void onClick(View v) {\n\n finish();\n }",
"@Override\n\t\t\tpublic void onClick(View view) {\n\t\t\t\t\n\t\t\t\tfinish();\n\t\t\t\t\n\t\t\t\tmApplication.exit();\n\t\t\t}",
"@Override\n public void onClick(View view) {\n finish();\n }",
"@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n\n // Handle navigation view item clicks here.\n final int id = item.getItemId();\n\n mHandler.postDelayed(new Runnable() {\n @Override\n public void run() {\n onNavigationItemSelected(id);\n }\n }, 300);\n\n if (id != R.id.nav_home) {\n return false;\n }\n return true;\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tfinish();\n\t\t\t\tIntent refreshIntent = new Intent(getIntent());\n\t\t\t\tstartActivity(refreshIntent);\n\t\t\t\toverridePendingTransition(0, 0);\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tms.stop();\n\t\t\t\tmp.stop();\n\t\t\t\tfinish();\n\t\t\t}",
"@Override\r\n public void onClick(View v) {\n finish();\r\n }",
"@Override\r\n public void onClick(View v) {\n finish();\r\n }",
"@Override\r\n public void onClick(View v) {\n finish();\r\n }",
"@Override\n public void onBackPressed() {\n if (lastBackPressTime < System.currentTimeMillis() - 2500) {\n toast = Toast.makeText(this, R.string.toast_close_app, Toast.LENGTH_SHORT);\n toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0);\n toast.show();\n lastBackPressTime = System.currentTimeMillis();\n return;\n } else {\n if (toast != null) {\n toast.cancel();\n }\n }\n super.onBackPressed();\n }",
"public void back_nowShowing(View view){\n finish();\n }",
"@Override\n public void onClick(View v) {\n finish();\n\n }",
"@Override\n public void onBackPressed() {\n /*startAppAd.onBackPressed();\n super.onBackPressed();*/\n\n if(blnExit)\n {\n super.onBackPressed();\n return;\n }\n this.blnExit = true;\n // startAppAd.onBackPressed();\n\n\n Toast.makeText(ActHome.this,\"Please click BACK again to EXIT.\",Toast.LENGTH_SHORT).show();\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n blnExit = false;\n }\n },2000);\n }",
"public void onClick(View v) {\n delayDays(180);\n delayLaunches(360);\n dialog.dismiss();\n }",
"public void onClick(DialogInterface dialog,int id) {\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n Intent intent = new Intent(context, TappingActivity.class);\n startActivity(intent);\n }\n }, 50);\n }",
"public abstract void click(long ms);",
"@Override\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\tfinish();\n\t\t\t\t}",
"@Override\n\t\t\tpublic void onClickLeftBut() {\n\t\t\t\tfinish();\n\t\t\t}",
"@Override\n public void onClick(View v) {\n finish();\n }",
"@Override\n public void onClick(View v) {\n finish();\n }",
"@Override\n public void onClick(View v) {\n finish();\n }",
"@Override\n public void onClick(View v) {\n finish();\n }",
"@Override\n public void onClick(View v) {\n finish();\n }",
"@Override\n public void onClick(View v) {\n finish();\n }",
"@Override\n public void onClick(View v) {\n finish();\n }",
"@Override\n public void onClick(View v) {\n finish();\n }",
"@Override\n public void onClick(View v) {\n finish();\n }",
"@Override\n public void onClick(View v) {\n finish();\n }",
"@Override\n public void onClick(View v) {\n finish();\n }",
"@Override\n public void onClick(View v) {\n finish();\n }",
"@Override\n public void onClick(View v) {\n finish();\n }",
"@Override\n public void onClick(View v) {\n finish();\n }",
"@Override\n public void onClick(View v) {\n finish();\n }",
"@Override\n public void onClick(View v) {\n finish();\n }",
"@Override\n public void onClick(View v) {\n finish();\n }",
"@Override\n public void onClick(View v) {\n finish();\n }",
"@Override\n public void onClick(View v) {\n finish();\n }",
"@Override\n public void onClick(View v) {\n finish();\n }",
"@Override\n public void onClick(View v) {\n finish();\n }",
"@Override\n public void onClick(View v) {\n finish();\n }",
"@Override\n public void onClick(View v) {\n finish();\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdismiss();\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdismiss();\n\t\t\t}",
"@Override\r\n public void onClick(View arg0) {\n finish();\r\n }",
"@Override\n public void onClick(View arg0) {\n finish();\n }",
"@Override\r\n public void onBackPressed() {\r\n\r\n if (backPressedTime + 2000 > System.currentTimeMillis()) {\r\n finish();\r\n } else {\r\n Toast.makeText(QuestionActivity.this, \"Press Back Again Close Quiz\", Toast.LENGTH_SHORT).show();\r\n }\r\n backPressedTime = System.currentTimeMillis();\r\n }",
"@Override\n public void onClick(View v) {\n\n finish();\n }",
"@Override\n public void onClick(View v)\n {\n finish();\n }",
"@Override\n public void onClick(View v)\n {\n finish();\n }",
"@Override\n public void onClick(View view){\n finish();\n }",
"@Override\n public void onClick(View v){\n finish();\n }",
"@Override\n public void onClick(View v) {\n finish();\n }",
"@Override\n public void onAdClosed() {\n finish();\n }",
"@Override\r\n\t\tpublic void onClick(View v) {\n\t\t\tfinish();\r\n\t\t\toverridePendingTransition(0,R.anim.slide_out_buttom);\r\n\t\t}",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tfinishActivity();\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tfinish();\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tfinish();\n\t\t\t}"
] | [
"0.63996404",
"0.6274017",
"0.6186425",
"0.6178752",
"0.6044553",
"0.5980402",
"0.5976096",
"0.59398955",
"0.5901955",
"0.5898964",
"0.588284",
"0.58499247",
"0.58474267",
"0.5838419",
"0.5835224",
"0.5805315",
"0.5804579",
"0.57846385",
"0.57684475",
"0.5767572",
"0.5755338",
"0.5753817",
"0.5753813",
"0.57482463",
"0.5745762",
"0.5739611",
"0.57302666",
"0.57126516",
"0.57084453",
"0.570588",
"0.5696349",
"0.56958514",
"0.56958514",
"0.56958514",
"0.56958514",
"0.56958514",
"0.56958514",
"0.56958514",
"0.56958514",
"0.56958514",
"0.5691464",
"0.5691397",
"0.56891066",
"0.56881",
"0.5683714",
"0.56820047",
"0.56797874",
"0.5673617",
"0.56726325",
"0.56706697",
"0.56706697",
"0.56706697",
"0.56585515",
"0.56526256",
"0.5648619",
"0.56473106",
"0.56416726",
"0.5639096",
"0.5638131",
"0.56338936",
"0.5633721",
"0.5622368",
"0.5622368",
"0.5622368",
"0.5622368",
"0.5622368",
"0.5622368",
"0.5622368",
"0.5622368",
"0.5622368",
"0.5622368",
"0.5622368",
"0.5622368",
"0.5622368",
"0.5622368",
"0.5622368",
"0.5622368",
"0.5622368",
"0.5622368",
"0.5622368",
"0.5622368",
"0.5622368",
"0.5622368",
"0.5622368",
"0.5622206",
"0.5622206",
"0.56169033",
"0.5607641",
"0.5604434",
"0.5601869",
"0.5595538",
"0.5595538",
"0.5592513",
"0.55910987",
"0.5590483",
"0.55877537",
"0.5582746",
"0.5581808",
"0.55792165",
"0.55792165"
] | 0.60112846 | 5 |
Extrato com dados brutos, agrupados por instituicao, pac e tipo pessoa (PJ e PF) | List<GestaoEmpresarialLegadoDTO> gerarExtratoDIRF(Integer idInstituicao, Date dataInicio) throws BancoobException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void crearNuevaPoblacion() {\n\t\t/* Nos quedamos con los mejores individuos. Del resto, cruzamos la mitad, los mejores,\n\t\t * y el resto los borramos.*/\n\t\tList<IIndividuo> poblacion2 = new ArrayList<>();\n\t\tint numFijos = (int) (poblacion.size()/2);\n\t\t/* Incluimos el 50%, los mejores */\n\t\tpoblacion2.addAll(this.poblacion.subList(0, numFijos));\n\t\t\n\t\t/* De los mejores, mezclamos la primera mitad \n\t\t * con todos, juntandolos de forma aleatoria */\n\t\tList<IIndividuo> temp = poblacion.subList(0, numFijos+1);\n\t\tfor(int i = 0; i < temp.size()/2; i++) {\n\t\t\tint j;\n\t\t\tdo {\n\t\t\t\tj = Individuo.aleatNum(0, temp.size()-1);\n\t\t\t}while(j != i);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tpoblacion2.addAll(cruce(temp.get(i), temp.get(j)));\n\t\t\t} catch (CruceNuloException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t//this.poblacion.clear();\n\t\tthis.poblacion = poblacion2;\n\t}",
"public void gerarparcelascontrato(int id, int idcliente, int idgrupofinanceiro) {\n\t\tContrato contrato = repo.findById(id).get();\n\t\t// contrato.setCliente(clientes);\n\t\t// contrato.setFinanceiroContrato(financeiroContrato);\n\t\trepo.save(contrato);\n\t\tMovimentoContrato movement = movimentoContratoRepository.findByContratoIdAndStatus(id,\n\t\t\t\tStatusActiv.ABERTO.getDescricao());\n\t\tif (movement == null) {\n\t\t\tmovement = new MovimentoContrato();\n\t\t\tmovement.setDataMovimento(new Date());\n\t\t\tmovement.setStatus(StatusActiv.ABERTO.getDescricao());\n\t\t\tmovement.setTipomovimento(TipoMovimentoEnum.entradaContrato.getDescricao());\n\t\t}\n\t\tmovement.setValor(contrato.getTotal());\n\t\tmovement.setContrato(contrato);\n\t\tmovement.setHistorico(contrato.getFinanceiroContrato());\n\t\tmovement.setParcela(contrato.getPeriodo());\n\n\t\tmovement.setName(\"Contrato Nº \" + String.valueOf(id) + \" Cliente: \" + contrato.getClientename());\n\t\tmovement = movimentoContratoRepository.save(movement);\n\n\t\tfichaLeituraRepository\n\t\t\t\t.deleteAll(fichaLeituraRepository.findByContratoIdAndStatus(id, StatusActiv.ABERTO.getDescricao()));\n\t\texcluirParcelas(movement);\n\t\tmovement.setValor(contrato.getTotal());\n\t\tDateTime dt;\n\t\tDateTime dt12;\n\n\t\t//if (movement.getFaturasQuit().size() > 0) {\n\n\t\t\t//dt = new DateTime(movement.getFaturasQuit().get(0).getDataVencimento());\n\t\t\tdt = new DateTime();\n\t\t\tint ano = dt.getYear();\n\t\t\tint mes = dt.getMonthOfYear();\n\t\t\tdt = new DateTime(ano, mes, contrato.getDiaVencimento(), 8, 0); \n\t\t\tdt12 = new DateTime(ano, mes, contrato.getDiaLeitura(), 8, 0); \n\n\t\t/*} \n\t\telse {\n\t\t\tdt = new DateTime();\n\t\t\tint ano = dt.getYear();\n\t\t\tint mes = dt.getMonthOfYear();\n\t\t\tdt12 = new DateTime(ano, mes, contrato.getDiaLeitura(), 8, 0);\n\t\t}*/\n\t\t/*DateTime dt1 = new DateTime(new Date());\n\t\tfor (Fatura itemmovimento : movement.getFaturasQuit()) {\n\t\t\tdt1 = new DateTime(itemmovimento.getDataVencimento());\n\t\t\tif (dt1.isAfter(dt)) {\n\t\t\t\tdt = dt1;\n\t\t\t}\n\t\t\tif (dt1.isAfter(dt12)) {\n\t\t\t\tdt12 = dt1;\n\t\t\t}\n\n\t\t}\n\t\tdt1 = dt12;*/\n\t\tDateTime plusPeriod = new DateTime();\n\t\tDateTime plusPeriodleitura = new DateTime();\n\t\tFatura itemmovimento;\n\t\tint j = movement.getParcela() - movement.getFaturasQuit().size();\n\t\tList<Integer> indiceparcalas = new LinkedList<Integer>();\n\t\tindiceparcalas = maxparcela(movement, j);\n\t\tdouble valr1 = contrato.getTotal();// getValorAberto() / j;\n\n\t\tList<FichaLeitura> fichas = new ArrayList<>();\n\t\tfor (int i = 0; i < j; i++) {\n\t\t\titemmovimento = new Fatura(movement, (movement.getValor() - movement.getValorAberto()));\n\t\t\tplusPeriod = dt.plus(org.joda.time.Period.months(i));\n\t\t\tplusPeriodleitura = dt12.plus(org.joda.time.Period.months(i));\n\t\t\tint dayOfWeekEndDateNumber = Integer.valueOf(plusPeriod.dayOfWeek().getAsString());\n\t\t\tint DaysToAdd;\n\t\t\t// se final de semana\n\t\t\tif (dayOfWeekEndDateNumber == 6 || dayOfWeekEndDateNumber == 7) {\n\t\t\t\tDaysToAdd = 8 - dayOfWeekEndDateNumber;\n\t\t\t\tplusPeriod = plusPeriod.plusDays(DaysToAdd);\n\t\t\t\tdayOfWeekEndDateNumber = Integer.valueOf(plusPeriod.dayOfWeek().getAsString());\n\t\t\t}\n\n\t\t\tdayOfWeekEndDateNumber = Integer.valueOf(plusPeriodleitura.dayOfWeek().getAsString());\n\n\t\t\t// se final de semana\n\t\t\tif (dayOfWeekEndDateNumber == 6 || dayOfWeekEndDateNumber == 7) {\n\t\t\t\tDaysToAdd = 8 - dayOfWeekEndDateNumber;\n\t\t\t\tplusPeriodleitura = plusPeriodleitura.plusDays(DaysToAdd);\n\t\t\t\tdayOfWeekEndDateNumber = Integer.valueOf(plusPeriod.dayOfWeek().getAsString());\n\t\t\t}\n\n\t\t\titemmovimento.setParcela(indiceparcalas.get(i));\n\t\t\titemmovimento.setValor(contrato.getTotal());\n\t\t\titemmovimento.setDataVencimento(plusPeriod.toDate());\n\t\t\titemmovimento.setDataleitura(plusPeriodleitura.toDate());\n\t\t\titemmovimento.setInstantCreation(new Date());\n\t\t\titemmovimento.setStatus(StatusActiv.ABERTO.getDescricao());\n\t\t\titemmovimento.setMovimentoFinanceiro(movement);\n\t\t\titemmovimento.setContrato(contrato);\n\t\t\titemmovimento.setDataMovimento(movement.getDataMovimento());\n\t\t\titemmovimento.setTipomovimento(TipoMovimentoEnum.entradaContrato.getDescricao());\n\n\t\t\t/*\n\t\t\t * FichaLeitura fichaLeitura = new FichaLeitura(contrato, equipamentoContrato,\n\t\t\t * itemmovimento.getDataleitura(), StatusActiv.ABERTO.getDescricao());\n\t\t\t */\n\n\t\t\tCentroCusto centroCusto = centroCustoRepository.findById(movement.getHistorico().getCentrocusto().getId())\n\t\t\t\t\t.get();\n\t\t\tcentroCusto.setSaldoReceber(centroCusto.getSaldoReceber() + (contrato.getTotal()));\n\n\t\t\tcentroCustoRepository.save(centroCusto);\n\t\t\titemmovimento = faturaRepository.save(itemmovimento);\n\t\t\tfor (EquipamentosContrato equipamentoContrato : contrato.getEquipamentosContratos()) {\n\t\t\t\tfichas.add(new FichaLeitura(contrato, equipamentoContrato, itemmovimento.getDataleitura(),\n\t\t\t\t\t\tStatusActiv.ABERTO.getDescricao(), itemmovimento));\n\t\t\t}\n\n\t\t}\n\t\tfichaLeituraRepository.saveAll(fichas);\n\n\t}",
"private static List<Billetes> generarBilletes(String fecha, Pasajero p){\n\t\tList<Billetes> billetes = new ArrayList<>();\n\t\t\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tBilletes billete = new Billetes();\n\t\t\tbillete.setId(i);\n\t\t\tbillete.setFecha(fecha);\n\t\t\t\n\t\t\tchar c1 = (char)new Random().nextInt(50);\n\t\t\tchar c2 = (char)new Random().nextInt(50);\n\t\t\t\n\t\t\t/*\n\t\t\t * \n\t\t\t */\n\t\t\tbillete.setAsiento(\"\" + c1 + c2 + new Random().nextInt(100) + new Random().nextInt(50));\n\t\t\tbillete.setPasajero(p); \n\t\t\tbillete.setVuelo(p.getVuelos().get(new Random().nextInt(p.getVuelos().size())));\n\t\t\t\n\t\t\tbilletes.add(billete);\n\t\t}\n\t\t\n\t\treturn billetes;\n\t}",
"public List<SinistroPendente_FaixaVO> validaSelecionaSinistroPendente_Faixa(int tipo) {\n\n\t\tDecimalFormat percentForm = new DecimalFormat(\"0.00%\");\n\t\tDecimalFormat roundForm = new DecimalFormat(\"0.00\");\n\n\t\tList<SinistroPendente_FaixaVO> listaTratadaTotais = new ArrayList<SinistroPendente_FaixaVO>();\n\t\tList<SinistroPendente_FaixaVO> listaSinistroPendente = null;\n\t\tList<SinistroPendente_FaixaVO> listaFinal = new ArrayList<SinistroPendente_FaixaVO>();\n\n\t\tswitch (tipo) {\n\t\tcase 1: // faixa tempo\n\t\t\tlistaSinistroPendente = listaSinistroPendenteTempo;\n\t\t\tbreak;\n\t\tcase 2:// faixa valor\n\t\t\tlistaSinistroPendente = listaSinistroPendenteValor;\n\t\t\tbreak;\n\t\t}\n\n\t\tint totalNumSinistrosPendentes_Administrativo = 0;\n\t\tint totalNumSinistrosPendentes_Judicial = 0;\n\t\tint totalNumSinistrosPendentes_Total = 0;\n\n\t\tBigDecimal totalValorSinistrosPendentes_Administrativo = new BigDecimal(\"0\");\n\t\tBigDecimal totalValorSinistrosPendentes_Judicial = new BigDecimal(\"0\");\n\t\tBigDecimal totalValorSinistrosPendentes_Total = new BigDecimal(\"0\");\n\n\t\tString textoGrupoAnterior = \"\";\n\n\t\t// ============================\n\t\t// esse obj serve apenas para a lista nao ficar vazia\n\t\tSinistroPendente_FaixaVO totaNulo = new SinistroPendente_FaixaVO();\n\t\ttotaNulo.setGrupo(\"vazio\");\n\t\t// ============================\n\n\t\tlistaTratadaTotais.add(totaNulo);\n\t\tfor (int i = 0; i < listaSinistroPendente.size(); i++) {\n\n\t\t\tif (i == 0) {\n\n\t\t\t\ttextoGrupoAnterior = listaSinistroPendente.get(i).getGrupo();\n\n\t\t\t\ttotalNumSinistrosPendentes_Administrativo += listaSinistroPendente.get(i)\n\t\t\t\t\t\t.getNumSinistrosPendentes_Administrativo();\n\t\t\t\ttotalNumSinistrosPendentes_Judicial += listaSinistroPendente.get(i).getNumSinistrosPendentes_Judicial();\n\t\t\t\ttotalNumSinistrosPendentes_Total += listaSinistroPendente.get(i).getNumSinistrosPendentes_Total();\n\n\t\t\t\ttotalValorSinistrosPendentes_Administrativo = totalValorSinistrosPendentes_Administrativo\n\t\t\t\t\t\t.add(new BigDecimal(listaSinistroPendente.get(i).getValorSinistrosPendentes_Administrativo()));\n\t\t\t\ttotalValorSinistrosPendentes_Judicial = totalValorSinistrosPendentes_Judicial\n\t\t\t\t\t\t.add(new BigDecimal(listaSinistroPendente.get(i).getValorSinistrosPendentes_Judicial()));\n\t\t\t\ttotalValorSinistrosPendentes_Total = totalValorSinistrosPendentes_Total\n\t\t\t\t\t\t.add(new BigDecimal(listaSinistroPendente.get(i).getValorSinistrosPendentes_Total()));\n\n\t\t\t} else if (listaSinistroPendente.get(i).getGrupo().equals(textoGrupoAnterior)) {\n\n\t\t\t\ttextoGrupoAnterior = listaSinistroPendente.get(i).getGrupo();\n\n\t\t\t\ttotalNumSinistrosPendentes_Administrativo += listaSinistroPendente.get(i)\n\t\t\t\t\t\t.getNumSinistrosPendentes_Administrativo();\n\t\t\t\ttotalNumSinistrosPendentes_Judicial += listaSinistroPendente.get(i).getNumSinistrosPendentes_Judicial();\n\t\t\t\ttotalNumSinistrosPendentes_Total += listaSinistroPendente.get(i).getNumSinistrosPendentes_Total();\n\n\t\t\t\ttotalValorSinistrosPendentes_Administrativo = totalValorSinistrosPendentes_Administrativo\n\t\t\t\t\t\t.add(new BigDecimal(listaSinistroPendente.get(i).getValorSinistrosPendentes_Administrativo()));\n\t\t\t\ttotalValorSinistrosPendentes_Judicial = totalValorSinistrosPendentes_Judicial\n\t\t\t\t\t\t.add(new BigDecimal(listaSinistroPendente.get(i).getValorSinistrosPendentes_Judicial()));\n\t\t\t\ttotalValorSinistrosPendentes_Total = totalValorSinistrosPendentes_Total\n\t\t\t\t\t\t.add(new BigDecimal(listaSinistroPendente.get(i).getValorSinistrosPendentes_Total()));\n\n\t\t\t} else if (!(listaSinistroPendente.get(i).getGrupo().equals(textoGrupoAnterior))) {\n\n\t\t\t\tSinistroPendente_FaixaVO totalVO = new SinistroPendente_FaixaVO();\n\t\t\t\ttotalVO.setGrupo(textoGrupoAnterior);\n\t\t\t\ttotalVO.setFaixa(\"Total\");\n\t\t\t\ttotalVO.setValorSinistrosPendentes_Administrativo(\n\t\t\t\t\t\ttotalValorSinistrosPendentes_Administrativo.toString());\n\t\t\t\ttotalVO.setValorSinistrosPendentes_Judicial(totalValorSinistrosPendentes_Judicial.toString());\n\t\t\t\ttotalVO.setValorSinistrosPendentes_Total(totalValorSinistrosPendentes_Total.toString());\n\t\t\t\ttotalVO.setNumSinistrosPendentes_Administrativo(totalNumSinistrosPendentes_Administrativo);\n\t\t\t\ttotalVO.setNumSinistrosPendentes_Judicial(totalNumSinistrosPendentes_Judicial);\n\t\t\t\ttotalVO.setNumSinistrosPendentes_Total(totalNumSinistrosPendentes_Total);\n\t\t\t\tlistaTratadaTotais.add(totalVO);\n\n\t\t\t\ttextoGrupoAnterior = listaSinistroPendente.get(i).getGrupo();\n\n\t\t\t\ttotalValorSinistrosPendentes_Administrativo = new BigDecimal(\"0\");\n\t\t\t\ttotalValorSinistrosPendentes_Administrativo = totalValorSinistrosPendentes_Administrativo\n\t\t\t\t\t\t.add(new BigDecimal(listaSinistroPendente.get(i).getValorSinistrosPendentes_Administrativo()));\n\n\t\t\t\ttotalValorSinistrosPendentes_Judicial = new BigDecimal(\"0\");\n\t\t\t\ttotalValorSinistrosPendentes_Judicial = totalValorSinistrosPendentes_Judicial\n\t\t\t\t\t\t.add(new BigDecimal(listaSinistroPendente.get(i).getValorSinistrosPendentes_Judicial()));\n\n\t\t\t\ttotalValorSinistrosPendentes_Total = new BigDecimal(\"0\");\n\t\t\t\ttotalValorSinistrosPendentes_Total = totalValorSinistrosPendentes_Total\n\t\t\t\t\t\t.add(new BigDecimal(listaSinistroPendente.get(i).getValorSinistrosPendentes_Total()));\n\n\t\t\t\ttotalNumSinistrosPendentes_Administrativo = 0;\n\t\t\t\ttotalNumSinistrosPendentes_Administrativo += listaSinistroPendente.get(i)\n\t\t\t\t\t\t.getNumSinistrosPendentes_Administrativo();\n\n\t\t\t\ttotalNumSinistrosPendentes_Judicial = 0;\n\t\t\t\ttotalNumSinistrosPendentes_Judicial += listaSinistroPendente.get(i).getNumSinistrosPendentes_Judicial();\n\n\t\t\t\ttotalNumSinistrosPendentes_Total = 0;\n\t\t\t\ttotalNumSinistrosPendentes_Total += listaSinistroPendente.get(i).getNumSinistrosPendentes_Total();\n\n\t\t\t}\n\n\t\t}\n\t\tboolean insere = false;\n\t\tfor (int i = 0; i < listaTratadaTotais.size(); i++) {\n\t\t\tif (listaTratadaTotais.get(i).getGrupo().equalsIgnoreCase(textoGrupoAnterior)) {\n\t\t\t\tinsere = false;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tinsere = true;\n\t\t\t}\n\t\t}\n\t\tif (insere) {\n\t\t\tSinistroPendente_FaixaVO totaVO = new SinistroPendente_FaixaVO();\n\t\t\ttotaVO.setGrupo(textoGrupoAnterior);\n\t\t\ttotaVO.setFaixa(\"Total\");\n\t\t\ttotaVO.setValorSinistrosPendentes_Administrativo(totalValorSinistrosPendentes_Administrativo.toString());\n\t\t\ttotaVO.setValorSinistrosPendentes_Judicial(totalValorSinistrosPendentes_Judicial.toString());\n\t\t\ttotaVO.setValorSinistrosPendentes_Total(totalValorSinistrosPendentes_Total.toString());\n\n\t\t\ttotaVO.setNumSinistrosPendentes_Administrativo(totalNumSinistrosPendentes_Administrativo);\n\t\t\ttotaVO.setNumSinistrosPendentes_Judicial(totalNumSinistrosPendentes_Judicial);\n\t\t\ttotaVO.setNumSinistrosPendentes_Total(totalNumSinistrosPendentes_Total);\n\t\t\tlistaTratadaTotais.add(totaVO);\n\t\t}\n\t\tlistaTratadaTotais.remove(0);// remove o obj inserido acima com o texto\n\t\t\t\t\t\t\t\t\t\t// \"nulo\"\n\n\t\t// ###################################################\n\t\t// ###################################################\n\t\t// parte para calcular as porcentagens\n\t\t// ###################################################\n\n\t\t// este 'for' serve para vincular a lista de pendentes com a lista de\n\t\t// totais atraves do indice da lista de totais\n\t\ttextoGrupoAnterior = \"\";\n\t\tint tamLista = listaSinistroPendente.size();\n\t\tfor (int i = 0; i < tamLista; i++) {\n\t\t\tfor (int j = 0; j < listaTratadaTotais.size(); j++) {\n\t\t\t\tif (listaSinistroPendente.get(i).getGrupo().equalsIgnoreCase(listaTratadaTotais.get(j).getGrupo())) {\n\t\t\t\t\t// Exemplo: Na listaSinistroPendente na posicao i=5 o\n\t\t\t\t\t// produto eh \"Auto Correntista\". Na listaTratadaTotais\n\t\t\t\t\t// esse produto \"Auto Correntista\" eh j=1. Entao assim\n\t\t\t\t\t// saberei onde esta o total de \"Auto Correntista\" na\n\t\t\t\t\t// listaTratadaTotais.\n\t\t\t\t\tlistaSinistroPendente.get(i).setIndiceListaTotais(j);\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// este 'for' serve para organizar as listas de pendentes e a lista de\n\t\t// totais\n\t\tint inseriu = 0;\n\t\tint ultimoIndice = 0;\n\t\tfor (int j = 0; j < listaSinistroPendente.size(); j++) {\n\n\t\t\tif (listaSinistroPendente.get(j).getIndiceListaTotais() != ultimoIndice) {\n\t\t\t\tinseriu = 0;\n\t\t\t}\n\t\t\tif (inseriu == 0) {\n\t\t\t\tlistaFinal.add(listaTratadaTotais.get(listaSinistroPendente.get(j).getIndiceListaTotais()));\n\t\t\t\tultimoIndice = listaSinistroPendente.get(j).getIndiceListaTotais();\n\t\t\t\tinseriu = 1;\n\t\t\t}\n\n\t\t\tlistaFinal.add(listaSinistroPendente.get(j));\n\n\t\t}\n\n\t\tfor (int i = 0; i < listaFinal.size(); i++) {\n\t\t\tif (!(listaFinal.get(i).getFaixa().equalsIgnoreCase(\"Total\"))) {\n\n\t\t\t\tint indice = listaFinal.get(i).getIndiceListaTotais();\n\t\t\t\ttry {\n\t\t\t\t\tlistaFinal.get(i).setNumPercentSinistrosPendentes_Administrativo(\n\t\t\t\t\t\t\tpercentForm.format((double) (listaFinal.get(i).getNumSinistrosPendentes_Administrativo())\n\t\t\t\t\t\t\t\t\t/ (listaTratadaTotais.get(indice).getNumSinistrosPendentes_Administrativo())));\n\t\t\t\t\tlistaFinal.get(i).setValorPercentSinistrosPendentes_Administrativo(percentForm.format(\n\t\t\t\t\t\t\tnew BigDecimal(listaFinal.get(i).getValorSinistrosPendentes_Administrativo()).divide(\n\t\t\t\t\t\t\t\t\tnew BigDecimal(\n\t\t\t\t\t\t\t\t\t\t\tlistaTratadaTotais.get(indice).getValorSinistrosPendentes_Administrativo()),\n\t\t\t\t\t\t\t\t\t6, RoundingMode.HALF_DOWN)));\n\n\t\t\t\t} catch (ArithmeticException ae) {\n\t\t\t\t\tlistaFinal.get(i).setNumPercentSinistrosPendentes_Administrativo(\"0%\");\n\t\t\t\t\tlistaFinal.get(i).setValorPercentSinistrosPendentes_Administrativo(\"0%\");\n\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tlistaFinal.get(i).setNumPercentSinistrosPendentes_Judicial(\n\t\t\t\t\t\t\tpercentForm.format((double) (listaFinal.get(i).getNumSinistrosPendentes_Judicial())\n\t\t\t\t\t\t\t\t\t/ (listaTratadaTotais.get(indice).getNumSinistrosPendentes_Judicial())));\n\n\t\t\t\t\tlistaFinal.get(i).setValorPercentSinistrosPendentes_Judicial(percentForm\n\t\t\t\t\t\t\t.format(new BigDecimal(listaFinal.get(i).getValorSinistrosPendentes_Judicial()).divide(\n\t\t\t\t\t\t\t\t\tnew BigDecimal(\n\t\t\t\t\t\t\t\t\t\t\tlistaTratadaTotais.get(indice).getValorSinistrosPendentes_Judicial()),\n\t\t\t\t\t\t\t\t\t6, RoundingMode.HALF_DOWN)));\n\n\t\t\t\t} catch (ArithmeticException ae) {\n\t\t\t\t\tlistaFinal.get(i).setNumPercentSinistrosPendentes_Judicial(\"0%\");\n\t\t\t\t\tlistaFinal.get(i).setValorPercentSinistrosPendentes_Judicial(\"0%\");\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tlistaFinal.get(i).setNumPercentSinistrosPendentes_Total(\n\t\t\t\t\t\t\tpercentForm.format((double) (listaFinal.get(i).getNumSinistrosPendentes_Total())\n\t\t\t\t\t\t\t\t\t/ (listaTratadaTotais.get(indice).getNumSinistrosPendentes_Total())));\n\n\t\t\t\t\tlistaFinal.get(i).setValorPercentSinistrosPendentes_Total(percentForm\n\t\t\t\t\t\t\t.format(new BigDecimal(listaFinal.get(i).getValorSinistrosPendentes_Total()).divide(\n\t\t\t\t\t\t\t\t\tnew BigDecimal(listaTratadaTotais.get(indice).getValorSinistrosPendentes_Total()),\n\t\t\t\t\t\t\t\t\t6, RoundingMode.HALF_DOWN)));\n\n\t\t\t\t} catch (ArithmeticException ae) {\n\t\t\t\t\tlistaFinal.get(i).setNumPercentSinistrosPendentes_Total(\"0%\");\n\t\t\t\t\tlistaFinal.get(i).setValorPercentSinistrosPendentes_Total(\"0%\");\n\t\t\t\t}\n\n\t\t\t} // if\n\t\t} // for\n\n\t\tfor (int i = 0; i < listaFinal.size(); i++) {\n\n\t\t\tlistaFinal.get(i).setValorSinistrosPendentes_Administrativo(uteis.insereSeparadoresMoeda(roundForm\n\t\t\t\t\t.format(Double.parseDouble(listaFinal.get(i).getValorSinistrosPendentes_Administrativo()))));\n\t\t\tlistaFinal.get(i).setValorSinistrosPendentes_Judicial(uteis.insereSeparadoresMoeda(\n\t\t\t\t\troundForm.format(Double.parseDouble(listaFinal.get(i).getValorSinistrosPendentes_Judicial()))));\n\t\t\tlistaFinal.get(i).setValorSinistrosPendentes_Total(uteis.insereSeparadoresMoeda(\n\t\t\t\t\troundForm.format(Double.parseDouble(listaFinal.get(i).getValorSinistrosPendentes_Total()))));\n\n\t\t}\n\n\t\treturn listaFinal;\n\t}",
"private static Bala tipoBala(int idPj, Vector2 posicionRelativaRecibido, int tamanoBala) {\n Bala bala;\n Array<TextureRegion> arrayTexturas = Util.ficherosEnDirectorio(Gdx.files.internal(\"Balas/\" + idPj));\n switch (idPj) {\n //Balas con forma rectangular\n case 1:\n case 4:\n case 7:\n bala = new BalaRect(posicionRelativaRecibido, velocidadBalas, arrayTexturas, idPj, tamanoBala);\n break;\n //Balas con forma circular\n case 2:\n bala = new BalaCirc(posicionRelativaRecibido, velocidadBalas, arrayTexturas, idPj, tamanoBala);\n break;\n //Balas con forma poligonal\n case 3:\n case 5:\n case 6:\n case 8:\n case 9:\n case 10:\n bala = new BalaPol(posicionRelativaRecibido, velocidadBalas, arrayTexturas, idPj, tamanoBala);\n break;\n default:\n arrayTexturas = Util.ficherosEnDirectorio(Gdx.files.internal(\"Balas/1\"));\n bala = new BalaRect(posicionRelativaRecibido, velocidadBalas, arrayTexturas, idPj, tamanoBala);\n break;\n }\n return bala;\n }",
"private static void grabarYllerPaciente() {\r\n\t\tPaciente paciente = new Paciente(\"Juan\", \"Garcia\", \"65\", \"casa\", \"2\", \"1998\");\r\n\t\tPaciente pacienteDos = new Paciente(\"MArta\", \"Garcia\", \"65\", \"casa\", \"3\", \"1998\");\r\n\t\tPaciente pacienteTres = new Paciente(\"MAria\", \"Garcia\", \"65\", \"casa\", \"4\", \"1998\");\r\n\t\tString ruta = paciente.getIdUnico();\r\n\t\tString rutaDos = pacienteDos.getIdUnico();\r\n\t\tString rutaTres = pacienteTres.getIdUnico();\r\n\t\tDTO<Paciente> dtoPacienteDos = new DTO<>(\"src/Almacen/\" + rutaDos + \".dat\");\r\n\t\tDTO<Paciente> dtoPaciente = new DTO<>(\"src/Almacen/\" + ruta + \".dat\");\r\n\t\tDTO<Paciente> dtoPacienteTres = new DTO<>(\"src/Almacen/\" + rutaTres + \".dat\");\r\n\t\tif (dtoPaciente.grabar(paciente) == true) {\r\n\r\n\t\t\tSystem.out.println(paciente.getNombre() + \" grabado\");\r\n\t\t}\r\n\t\t;\r\n\t\tif (dtoPacienteDos.grabar(pacienteDos) == true) {\r\n\r\n\t\t\tSystem.out.println(pacienteDos.getNombre() + \" grabado\");\r\n\t\t}\r\n\t\t;\r\n\t\tif (dtoPacienteTres.grabar(pacienteTres) == true) {\r\n\t\t\tSystem.out.println(pacienteTres.getNombre() + \" grabado\");\r\n\t\t}\r\n\t\t;\r\n\t\tPaciente pacienteLeer = dtoPaciente.leer();\r\n\t\tSystem.out.println(pacienteLeer);\r\n\t\tSystem.out.println(pacienteLeer.getNombre());\r\n\t}",
"private List<PlanTrabajo> generarPlanesTrabajo( Date fecPrgn, \n\t\t\tList<Cuadrilla> cuadrillas,Map<Long, GrupoAtencion> mpGrupos, \n\t\t\tMap<Long, Long> asignaciones ){\n\t\t\n\t\t\tList<PlanTrabajo> planTrabajoList = new ArrayList<PlanTrabajo>();\n\t\t\tSet<Long> grupos = asignaciones.keySet();\t\n\t\t\tlong np = 1;\n\t\t\tfor (Long ngrupo : grupos) {\n\t\t\t\t Long ncuadrilla = asignaciones.get(ngrupo);\n\t\t\t\t GrupoAtencion grupoAtencion = mpGrupos.get(ngrupo);\n\t\t\t\t //GrupoAtencion grupoAtencion = asignar(cuadrilla, idx, mpGruposCached);\n\t\t\t\t PlanTrabajo planTrabajo = new PlanTrabajo(np);\n\t\t\t\t int nsp = 1;\n\t\t\t\t planTrabajo.setFechaProgramacion(new Timestamp(fecPrgn.getTime()));\n\t\t\t\t int i = cuadrillas.indexOf( new Cuadrilla(ncuadrilla));\n\t\t\t\t if(i!=-1){\n\t\t\t\t\t \n\t\t\t\t\t Cuadrilla cuadrilla = cuadrillas.get(i);\n\t\t\t\t\t planTrabajo.setCuadrilla(cuadrilla);\n\t\t\t\t\t planTrabajo.setGrupoAtencion(grupoAtencion);\n\t\t\t\t\t \n\t\t\t\t\t if(grupoAtencion!=null){\n\t\t\t\t\t\t for( GrupoAtencionDetalle d : grupoAtencion.getGrupoAtencionDetalles()){\n\t\t\t\t\t\t\t // añadiendo las solicitudes de servicio\t\n\t\t\t\t\t\t\t SolicitudServicio s = d.getSolicitudServicio();\n\t\t\t\t\t\t\t //System.out.println(\" #### añadiendo solicitud \"+s.getNumeroSolicitud());\n\t\t\t\t\t\t\t if(planTrabajo.getPlanTrabajoDetalles()==null){\n\t\t\t\t\t\t\t\t planTrabajo.setPlanTrabajoDetalles(new ArrayList<PlanTrabajoDetalle>());\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t PlanTrabajoDetalle pd = new PlanTrabajoDetalle(np, nsp);\n\t\t\t\t\t\t\t pd.setSolicitudServicio(s);\n\t\t\t\t\t\t\t //planTrabajo.addPlanTrabajoDetalle( new PlanTrabajoDetalle(s));;\n\t\t\t\t\t\t\t planTrabajo.addPlanTrabajoDetalle(pd);\n\t\t\t\t\t\t\t nsp++;\n\t\t\t\t\t\t }\n\t\t\t\t\t\t planTrabajoList.add(planTrabajo);\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t np++;\n\t\t\t}\n\t\t\t\n\t\treturn planTrabajoList;\n\t}",
"private Map<Integer, Map<String,Object>> getCombinaciones( List<GrupoAtencion> grupos, List<Cuadrilla> cuadrillas){\n\t\t\n\n\t\tMap<Long, Map<String, Double>> mpgrupos = new LinkedHashMap<Long, Map<String, Double>>();\n\t\t// aplicando todos contra todos\n\t\t\n\t\tfor (GrupoAtencion g : grupos) {\n\t\t\t\n\t\t\tMap<String, Double>mpcants = getCantidadPorTipoSolicitudes(g);\n\t\t\t// añdiendo \n\t\t\tmpgrupos.put(g.getNumeroGrupoAtencion(), mpcants); \n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tMap<Long, Map<String, Double>> mpcuadrillas = new LinkedHashMap<Long, Map<String, Double>>();\n\t\t\n\t\tfor(Cuadrilla c : cuadrillas){\n\t\t\tMap<String, Double> mpproms = getPromedioHabilidades(c);\n\t\t\tmpcuadrillas.put(c.getNumeroCuadrilla(),mpproms );\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t// todos contra todos;\n\t\t\n\t\tIterator<Long> it = mpgrupos.keySet().iterator();\n\t\t\n\t\t// combinaciones\n\t\tMap<Integer, Map<String,Object>> mpcomb = new LinkedHashMap<Integer, Map<String,Object>>();\n\t\tint idxcomb = 1; // indice de combinacion\n\t\twhile(it.hasNext()){\n\t\t\t\n\t\t\tLong ng = it.next();// número de grupos\n\t\t\tMap<String, Double> mpcants = mpgrupos.get(ng); // cantidades\n\t\t\t\n\t\t\tIterator<Long> itp = mpcuadrillas.keySet().iterator();\n\t\t\twhile(itp.hasNext()){\n\t\t\t\tLong nc = itp.next();// número de cuadrilla\n\t\t\t\tMap<String, Double> mpproms = mpcuadrillas.get(nc); // promedios\n\t\t\t\tMap<String,Object> mp = new LinkedHashMap<>();\n\t\t\t\t//System.out.println(mpproms.toString());\n\t\t\t\t\n\t\t\t\tmp.put(\"ng\",ng);// numero grupo\n\t\t\t\tmp.put(\"nc\",nc); // numero cuadrilla\n\t\t\t\t// añadiendo cantidades de tipos de solicitudes\n\t\t\t\tmp = addMap(mp, mpcants);\n\t\t\t\t// añadiendo promedio de habilidades\n\t\t\t\tmp = addMap(mp, mpproms);\n\t\t\t\t\n\t\t\t\tmpcomb.put(idxcomb, mp);\n\t\t\t\t//System.out.println(mp.toString());\n\t\t\t\tidxcomb++;\n\t\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\treturn mpcomb ;\n\t}",
"public void repartirGanancias() {\n\t\t \n\t\t System.out.println(\"JUGADORES EN GANANCIAS:\");\n\t\t for(int i = 0; i < idJugadores.length;i++) {\n\t\t\t System.out.println(\"idJugador [\"+i+\"] : \"+idJugadores[i]);\n\t\t }\n\t\t System.out.println(\"GANADORES EN GANANCIA\");\n\t\t for(int i = 0; i < ganador.size();i++) {\n\t\t\t System.out.println(\"Ganador [\"+i+\"] : \"+ganador.get(i));\n\t\t }\n\t\t if(ganador.size() >= 1) {\n\t\t\t for(int i = 0; i < idJugadores.length; i++) {\n\n\t\t\t\t if(contieneJugador(ganador, idJugadores[i])) {\n\t\t\t\t\t System.out.println(\"Entra ganador \"+idJugadores[i]);\n\t\t\t\t\t if(verificarJugadaBJ(manosJugadores.get(i))) {\n\t\t\t\t\t\t System.out.println(\"Pareja nombre agregado: \"+idJugadores[i]);\n\t\t\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(idJugadores[i],25));\n\t\t\t\t\t }else {\n\t\t\t\t\t\t System.out.println(\"Pareja nombre agregado --> \"+idJugadores[i]);\n\t\t\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(idJugadores[i],20));\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t } \n\t\t }else {\n\t\t\t System.out.println(\"no ganó nadie\");\n\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(\"null\",0));\n\t\t }\n\t }",
"public void creaAddebitiGiornalieri(AddebitoFissoPannello pannello,\n int codConto,\n Date dataInizio,\n Date dataFine) {\n /* variabili e costanti locali di lavoro */\n boolean continua = true;\n Modulo modAddFisso;\n ArrayList<CampoValore> campiFissi;\n Campo campoQuery;\n CampoValore campoVal;\n ArrayList<WrapListino> lista;\n ArrayList<AddebitoFissoPannello.Riga> righeDialogo = null;\n int quantita;\n\n try { // prova ad eseguire il codice\n\n modAddFisso = this.getModulo();\n campiFissi = new ArrayList<CampoValore>();\n\n /* recupera dal dialogo il valore obbligatorio del conto */\n if (continua) {\n campoQuery = modAddFisso.getCampo(Addebito.Cam.conto.get());\n campoVal = new CampoValore(campoQuery, codConto);\n campiFissi.add(campoVal);\n }// fine del blocco if\n\n /* recupera dal dialogo il pacchetto di righe selezionate */\n if (continua) {\n righeDialogo = pannello.getRigheSelezionate();\n }// fine del blocco if\n\n /* crea il pacchetto delle righe di addebito fisso da creare */\n if (continua) {\n\n /* traverso tutta la collezione delle righe selezionate nel pannello */\n for (AddebitoFissoPannello.Riga riga : righeDialogo) {\n lista = ListinoModulo.getPrezzi(riga.getCodListino(),\n dataInizio,\n dataFine,\n true,\n false);\n quantita = riga.getQuantita();\n for (WrapListino wrapper : lista) {\n this.creaAddebitoFisso(codConto, dataInizio, wrapper, quantita);\n }\n } // fine del ciclo for-each\n }// fine del blocco if\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }",
"@Override\r\n\tpublic Bloco0 criarBloco(MovimentoMensalIcmsIpi movimentoMensalIcmsIpi) {\n\t\tLOG.log(Level.INFO, \"Montando o BLOCO 0, com INICIO em: {0} e TERMINO: {1} \", movimentoMensalIcmsIpi.getDataInicio());\r\n\t\tBloco0 bloco0 = new Bloco0();\r\n\t\t\r\n\t\t/**\r\n\t\t * TODO (Para ver/pensar melhor)\r\n\t\t * Ver se eu tenho que fazer alguma validação aqui. Ex.: irá preecher registro X para aquele Mês?\r\n\t\t * Tentar capturar possiveis erros.: Ex o famosão -> @NullPointerException\r\n\t\t */\r\n\t\t\r\n\t\tbloco0.setReg0000(reg0000Service.montarGrupoDeRegistroSimples(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0001(reg0001Service.montarGrupoDeRegistroSimples(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0005(reg0005Service.montarGrupoDeRegistroSimples(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0100(reg0100Service.montarGrupoDeRegistroSimples(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0150(reg0150Service.montarGrupoDeRegistro(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0190(reg0190Service.montarGrupoDeRegistro(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0200(reg0200Service.montarGrupoDeRegistro(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0400(reg0400Service.montarGrupoDeRegistro(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0450(reg0450Service.montarGrupoDeRegistro(movimentoMensalIcmsIpi));\r\n//\t\tbloco0.setReg0460(reg0460Service.montarGrupoDeRegistro(movimentoMensalIcmsIpi));\r\n//\t\tbloco0.setReg0990(montarEncerramentoDoBloco0(bloco0));\r\n\t\t\r\n\t\tLOG.log(Level.INFO, \"Montagem do BLOCO 0, TEMINADA! {0} \" ,bloco0);\r\n\t\treturn bloco0;\r\n\t}",
"public void carregar(DadosGrafico dados){\r\n \r\n }",
"public void cargarPantalla() throws Exception {\n Long oidCabeceraMF = (Long)conectorParametroSesion(\"oidCabeceraMF\");\n\t\tthis.pagina(\"contenido_matriz_facturacion_consultar\");\n\n DTOOID dto = new DTOOID();\n dto.setOid(oidCabeceraMF);\n dto.setOidPais(UtilidadesSession.getPais(this));\n dto.setOidIdioma(UtilidadesSession.getIdioma(this));\n MareBusinessID id = new MareBusinessID(\"PRECargarPantallaConsultarMF\"); \n Vector parametros = new Vector();\n \t\tparametros.add(dto);\n parametros.add(id);\n \t\tDruidaConector conector = conectar(\"ConectorCargarPantallaConsultarMF\", parametros);\n if (oidCabeceraMF!=null)\n asignarAtributo(\"VAR\",\"varOidCabeceraMF\",\"valor\",oidCabeceraMF.toString());\n\t\t asignar(\"COMBO\", \"cbTiposOferta\", conector, \"dtoSalida.resultado_ROWSET\");\n\t\t///* [1]\n\n\n\n\t\ttraza(\" >>>>cargarEstrategia \");\n\t\t//this.pagina(\"contenido_catalogo_seleccion\"); \n\t\t \n\t\tComposerViewElementList cv = crearParametrosEntrada();\n\t\tConectorComposerView conectorV = new ConectorComposerView(cv, this.getRequest());\n\t\tconectorV.ejecucion();\n\t\ttraza(\" >>>Se ejecuto el conector \");\n\t\tDruidaConector resultados = conectorV.getConector();\n\t\tasignar(\"COMBO\", \"cbEstrategia\", resultados, \"PRECargarEstrategias\");\n\t\ttraza(\" >>>Se asignaron los valores \");\n\t\t// */ [1]\n\t\t\n\n }",
"public static Gruppo[] sortGroup(List<Passeggero> lista){\n\t\t\n\t\t//creo mappa hash contentente id gruppo e gruppo, dimensione iniziale pari al numero di passeggeri\n\t\t//da analizzare (caso peggiore per migliorare le prestaioni)\n\t\tHashMap<ObjectId, Gruppo> map = new HashMap<ObjectId, Gruppo>(lista.size(), 1f);\n\t\t\n\t\tIterator<Passeggero> i = lista.iterator();\n\t\t\n\t\t//inserisco passeggeri nei rispettivi gruppi con complessià n (simile ad ordinamento lineare)\n\t\twhile (i.hasNext()) {\n\t\t\tPasseggero passeggero = (Passeggero) i.next();\n\t\t\tObjectId groupId = passeggero.getIdGruppo();\n\t\t\t//controllo se il gruppo esiste già nella lista\n\t\t\tGruppo g = map.get(groupId);\n\t\t\t//se non esiste creo un nuovo gruppo\n\t\t\tif(g == null){\n\t\t\t\tg = new Gruppo(groupId);\n\t\t\t\tmap.put(groupId, g);\n\t\t\t}\n\t\t\t//inserisco il passeggero nella lista di quel gruppo\n\t\t\tg.add(passeggero);\n\t\t}\n\t\t\n\t\t//ordino gruppi per peso (merge sort)\n\t\tGruppo[] gruppi = map.values().toArray(new Gruppo[0]);\n\t\tArrays.sort(gruppi, Collections.reverseOrder());\n\t\t\n\t\treturn gruppi;\n\t}",
"private void populaParteCorpo()\n {\n ParteCorpo p1 = new ParteCorpo(\"Biceps\");\n parteCorpoDAO.insert(p1);\n ParteCorpo p2 = new ParteCorpo(\"Triceps\");\n parteCorpoDAO.insert(p2);\n ParteCorpo p3 = new ParteCorpo(\"Costas\");\n parteCorpoDAO.insert(p3);\n ParteCorpo p4 = new ParteCorpo(\"Lombar\");\n parteCorpoDAO.insert(p4);\n ParteCorpo p5 = new ParteCorpo(\"Peito\");\n parteCorpoDAO.insert(p5);\n ParteCorpo p6 = new ParteCorpo(\"Panturrilha\");\n parteCorpoDAO.insert(p6);\n ParteCorpo p7 = new ParteCorpo(\"Coxas\");\n parteCorpoDAO.insert(p7);\n ParteCorpo p8 = new ParteCorpo(\"Gluteos\");\n parteCorpoDAO.insert(p8);\n ParteCorpo p9 = new ParteCorpo(\"Abdomen\");\n parteCorpoDAO.insert(p9);\n ParteCorpo p10 = new ParteCorpo(\"Antebraço\");\n parteCorpoDAO.insert(p10);\n ParteCorpo p11 = new ParteCorpo(\"Trapezio\");\n parteCorpoDAO.insert(p11);\n ParteCorpo p12 = new ParteCorpo(\"Ombro\");\n parteCorpoDAO.insert(p12);\n }",
"public List<Faturamento> gerarFaturamento(Banco banco,Date competenciaBase,\tint dataLimite, UsuarioInterface usuario, Date dataGeracaoPlanilha, Collection<TetoPrestadorFaturamento> tetos) throws Exception {\n\t\tSession session = HibernateUtil.currentSession();\n\t\tsession.setFlushMode(FlushMode.COMMIT);\n\t\tCriteria criteria = session.createCriteria(Prestador.class);\n\t\tList<Faturamento> faturamentos = new ArrayList<Faturamento>();\n\t\tList<AbstractFaturamento> todosFaturamentos = new ArrayList<AbstractFaturamento>();\n\t\tif (banco != null)\n\t\t\tcriteria.add(Expression.eq(\"informacaoFinanceira.banco\",banco));\n//\t\t\tcriteria.add(Expression.not(Expression.in(\"idPrestador\", AbstractFinanceiroService.getIdsPrestadoresNaoPagos())));\n\t\t\tcriteria.add(Expression.eq(\"idPrestador\",528079L));\n\t\t\t\n\t\tList<Prestador> prestadores = criteria.list();\n\n//\t\tsaveImpostos();\n\t\tint quantPrest = prestadores.size();\n\t\tint countPrest = 0;\n\t\tDate competenciaAjustada = ajustarCompetencia(competenciaBase);\n\t\t\n//\t\talimentaLista();\n\t\t\n\t\tfor (Prestador prestador : prestadores) {\n\t\t\tSystem.out.println(++countPrest + \"/\" + quantPrest + \" - Prestador: \" + prestador.getPessoaJuridica().getFantasia());\n\t\t\tif(!prestador.getTipoPrestador().equals(Prestador.TIPO_PRESTADOR_ANESTESISTA)){\n//\t\t\t\tgerarFaturamento(competenciaBase, faturamentos, competenciaAjustada, prestador, usuario, dataGeracaoPlanilha, tetos);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"Gerando os faturamentos dos procedimentos...\");\n \t\t\t\tgerarFaturamento(competenciaBase, faturamentos, competenciaAjustada, (PrestadorAnestesista)prestador, usuario);\n\t\t\t\tSystem.out.println(\"Gerando os faturamentos das guias...\");\n//\t\t\t\tgerarFaturamento(competenciaBase, faturamentos, competenciaAjustada, prestador, usuario, dataGeracaoPlanilha, tetos);\n\t\t\t\tSystem.out.println(\"Concluído Coopanest!\");\n\t\t\t}\t\t\t\t\n\t\t}\n\t\t\n\t\treturn faturamentos;\n\t}",
"public void buscarPessoa(){\n\t\tstrCelular = CareFunctions.limpaStrFone(strCelular);\n\t\t System.out.println(\"Preparar \" + strCelular);//\n\t\t \n\t\tif (strCelular.trim().length() > 0){\n\t\t\tSystem.out.println(\"Buscar \" + strCelular);//\n\t\t\tList<Usuario> lstusuario = usuarioDAO.listPorcelular(strCelular);\n\t\t\tSystem.out.println(\"Buscou \" + lstusuario.size());\n\t\t\tsetBooIdentifiquese(false);\n\t\t\tif (lstusuario.size() > 0){\n\t\t\t\tusuario = lstusuario.get(0);\n\t\t\t\tsetBooSelecionouUsuario(true);\n\t\t\t}else{\n\t\t\t\tsetBooSelecionouUsuario(false);\t\t\t\t\n\t\t\t\tsetBooCadastrandose(true);\n\t\t\t\tusuario = new Usuario();\n\t\t\t\tusuario.setUsu_celular(strCelular);\n\t\t\t}\n\t\t\tFacesContext.getCurrentInstance().addMessage(\n\t\t\t\t\tnull,\n\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_INFO,\n\t\t\t\t\t\t\t\"Ahoe\", \"Bem Vindo\"));\t\n\t\t}else{\n\t\t\tSystem.out.println(\"Buscar \" + strCelular);//\n\t\t\tFacesContext.getCurrentInstance().addMessage(\n\t\t\t\t\tnull,\n\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_INFO,\n\t\t\t\t\t\t\t\"Você deve informar o Celular\", \"Não foi possível pesquisar\"));\t\t\t\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\tString nombre = leerTexto(\"Ingrese un nombre:\");\r\n\tint edad = leerNumero(\"Ingrese su edad:\");\r\n\tString rut = leerTexto(\"Ingresa el RUT:\");\r\n\tchar genero = leerTexto(\"Ingresa el genero: (M/F/O)\").charAt(0);\r\n\tfloat peso = leerNumero(\"Ingrese peso:\");\r\n\tfloat altura = leerNumero(\"Ingrese la altura:\");\r\n\tPersona claudia = new Persona(nombre, rut, edad, genero, peso, altura);\r\n\t\r\n\tnombre = leerTexto(\"Ingrese un nombre:\");\r\n\tedad = leerNumero(\"Ingrese su edad:\");\r\n\trut = leerTexto(\"Ingresa el RUT:\");\r\n\tgenero = leerTexto(\"Ingresa el genero: (M/F/O)\").charAt(0);\r\n\tPersona juliano = new Persona(nombre, rut, edad, genero);\r\n\t\r\n\tPersona noelia = new Persona();\r\n\tnoelia.setNombre(leerTexto(\"Ingresa un nombre\"));\r\n\tnoelia.setEdad(leerNumero(\"Ingresa la edad\"));\r\n\tnoelia.setRut(leerTexto(\"Ingresa el RUT\"));\r\n\tnoelia.setGenero(leerTexto(\"Ingresa el genero\").charAt(0));\r\n\tnoelia.setAltura(leerNumero(\"Ingresa la altura\"));\r\n\tnoelia.setPeso(leerNumero(\"Ingresa el peso\"));\r\n\t\r\n\tPersona[] perso = new Persona[3];\r\n\tperso[0] = claudia;\r\n\tperso[1] = juliano;\r\n\tperso[2] = noelia;\r\n\t\r\n\tfor (Persona persona : perso) {\r\n\t\tif (persona.calcularIMC()==Persona.PESO_BAJO) {\r\n\t\t\tescribir(\"Pongale sus buenas cazuelas\");\r\n\t\t}else {\r\n\t\t\tif (persona.calcularIMC()==Persona.PESO_IDEAL) {\r\n\t\t\t\tescribir(\"Estamos tiki taka\");\r\n\t\t\t}else {\r\n\t\t\t\tescribir(\"Menos coffe break!\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Mayor de edad\r\n\t\tescribir(\"La persona \" + persona.getNombre() + \" es mayor de edad? \" + persona.esMayorDeEdad());\r\n\t\t//Mostrar el toString()\r\n\t\tescribir(persona.toString());\r\n\t }\r\n\t}",
"private void posicionePosicoes() {\n\t\tGroupLayout gl = new GroupLayout(this);\n\n\t\tgl.setAutoCreateContainerGaps(true);\n\t\tgl.setAutoCreateGaps(true);\n\n\t\tsetLayout(gl);\n\n\t\t// Horizontal\n\t\t{\n\t\t\tSequentialGroup sgDados = gl.createSequentialGroup();\n\t\t\tSequentialGroup sgProgresso = gl.createSequentialGroup();\n\n\t\t\tParallelGroup pg = gl.createParallelGroup(Alignment.LEADING);\n\n\t\t\tsgDados.addComponent(lQntDados).addComponent(tfQntDados)\n\t\t\t\t\t.addComponent(btCadastrar).addComponent(barraProgresso);\n\t\t\tsgProgresso.addComponent(lresultado).addComponent(tfResultado);\n\t\t\tpg.addGroup(sgDados).addGroup(sgProgresso);\n\t\t\tgl.setHorizontalGroup(pg);\n\n\t\t}\n\n\t\t// Vertical\n\t\t{\n\t\t\tParallelGroup pgDados = gl.createParallelGroup(Alignment.CENTER);\n\t\t\tParallelGroup pgResultado = gl\n\t\t\t\t\t.createParallelGroup(Alignment.LEADING);\n\n\t\t\tSequentialGroup sg = gl.createSequentialGroup();\n\n\t\t\tpgDados.addComponent(lQntDados).addComponent(tfQntDados)\n\t\t\t\t\t.addComponent(btCadastrar).addComponent(barraProgresso);\n\t\t\tpgResultado.addComponent(lresultado).addComponent(tfResultado);\n\n\t\t\tsg.addGroup(pgDados).addGroup(pgResultado);\n\n\t\t\tgl.setVerticalGroup(sg);\n\n\t\t}\n\n\t}",
"private void cargarNotasAclaratorias() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\tparametros.put(\"nro_ingreso\", admision_seleccionada.getNro_ingreso());\r\n\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\tparametros.put(\"tipo_hc\", \"\");\r\n\t\tparametros.put(\"tipo\", INotas.NOTAS_ACLARATORIAS);\r\n\t\ttabboxContendor\r\n\t\t\t\t.abrirPaginaTabDemanda(false, \"/pages/nota_aclaratoria.zul\",\r\n\t\t\t\t\t\t\"NOTAS ACLARATORIAS\", parametros);\r\n\t}",
"private void cargarTarjetaTuberculosis() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\tparametros.put(\"nro_ingreso\", admision_seleccionada.getNro_ingreso());\r\n\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE, admision_seleccionada);\r\n\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\tIRutas_historia.PAGINA_HC_TUBERCULOSIS,\r\n\t\t\t\tIRutas_historia.LABEL_HC_TUBERCULOSIS, parametros);\r\n\t}",
"List<CatalogoAprobadorDTO> buscarAprobador(int cveADM, String numEmpleado, Integer claveNivel, Integer centroCostoOP) throws SIATException;",
"public GenerarInformePlanificacion(Curso[] cursos, Apoderado[] apoderados) {\n this.apoderados = new PlanificacionApoderado[apoderados.length];\n for (int i = 0; i < apoderados.length; i++) {\n this.apoderados[i] = new PlanificacionApoderado();\n }\n\n int cantidadCurso = 0;\n\n for (int apTotal = 0; apTotal < this.apoderados.length; apTotal++) {\n this.apoderados[apTotal].nombre = apoderados[apTotal].getNombre();\n this.apoderados[apTotal].apellido = apoderados[apTotal].getApellido();\n this.apoderados[apTotal].run = apoderados[apTotal].getRun();\n for (int cantPupilos = 0; cantPupilos < apoderados[apTotal].getPupilos().size(); cantPupilos++) {\n\n PlanificacionAlumno alumnoAgregar = new PlanificacionAlumno();\n alumnoAgregar.nombre = apoderados[apTotal].getPupilos().get(cantPupilos).getNombre();\n alumnoAgregar.apellido = apoderados[apTotal].getPupilos().get(cantPupilos).getApellido();\n alumnoAgregar.run = apoderados[apTotal].getPupilos().get(cantPupilos).getRun();\n for (int j = 0; j < 16; j++) {\n for (int alum = 0; alum < 30; alum++) {\n if (cursos[j].getAlumnos()[alum].getRun().equals(apoderados[apTotal].getPupilos().get(cantPupilos).getRun())) {\n cantidadCurso = j;\n break;\n }\n }\n }\n for (int i = 0; i < 50; i++) {\n alumnoAgregar.plan[i] = cursos[cantidadCurso].getAsignaturas()[(int) i / 10].getPlan()[i % 10];\n }\n this.apoderados[apTotal].pupilos.add(alumnoAgregar);\n\n }\n }\n\n }",
"protected void creaPagine() {\n Pagina pag;\n Pannello pan;\n\n try { // prova ad eseguire il codice\n\n /* crea la pagina e aggiunge campi e pannelli */\n pag = this.addPagina(\"generale\");\n\n pan = PannelloFactory.orizzontale(this);\n pan.add(Cam.data);\n pan.add(Cam.importo.get());\n pan.add(Cam.note.get());\n pag.add(pan);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }",
"public static void main(String[] args) {\n\t\tPessoa PF1 = new PessoaFisica(1,\"Michel\",\"31/03/1988\",\"15785465-01\",\"145.217.365-54\");\n\t\tPF1.AdicionaContato(\"898\",\"222\");\n\t\tPF1.AdicionaEndereco(\"avenida das gar�as\", 1110, \"padre cicero\", \"petrolina\", \"PE\", \"56326000\");\n\t\t\n\t\t// criando cliente pessoa Juridica\n\t\tPessoa PJ1 = new PessoaJuridica(2,\"Tectronic\",\"TECLTDA\",\"10-1009290/0001\");\n\t\tPJ1.AdicionaContato(\"00000\",\"11111\");\n\t\tPJ1.AdicionaEndereco(\"avenida do bambu\", 878, \"jo�oo pio 10\", \"juazeiro\", \"BA\", \"56326000\");\n\t\t\n\t\t// criando objetos produtoodutos\n\t\t/*Produto produto1 = new Produto(10, \"impressora\",35,1,100);\n\t\tProduto produto2 = new Produto(11, \"MicroSystem\",550, 2,80);\n\t\tProduto produto3 = new Produto(12, \"Faqueiro Ipanema\",75, 3,70);\n\t\tProduto produto4 = new Produto(13, \"Mangueira de Jardim\",19, 4,80);\n\t\tProduto produto5 = new Produto(14, \"Mouse multilaser\",25,5,90);*/\n \n Facade fachada = new Facade();\n fachada.incializarProdutos();\n \n\n\t\t// algumas forma de pagamento\n\t\t/*FormaPagamento Pagamento1 = new CartaoCredito(1,\"visa\",\"credito\", 3, \"Mariano Ribeiro\", \"10/10/23\", \"54212345212\",\"132\");\n\t\tFormaPagamento Pagamento2 = new CartaoCredito(2,\"mastercard\",\"debito\", 1, \"Juliana Marinalva\", \"12/09/29\", \"232356789\",\"787\");\n\t\tFormaPagamento Pagamento3 = new Boleto(3,\"19/04/2017\",\"12345678912\",\"Sanatander\");\n\t\tFormaPagamento Pagamento4 = new Boleto(4,\"20/04/2017\",\"12232344423\",\"Banco do Brasil\");\t\t*/\n \n \n\t\t//------------------------------------------------------------------------------------------------------------------------\n\t\t// criando um pedido com cliente e numero de itemens\n\t\tPedido pedido1 = new Pedido(30,PF1,3);\n\t\t\t\t\n\t\t// adicionando produtos como itens da lista de pedido\n\t\t/*ItemPedido item1 = new ItemPedido(20,produto1,3);\n\t\tItemPedido item2 = new ItemPedido(21,produto2,9);\n\t\tItemPedido item3 = new ItemPedido(22,produto3,2);\n\t\tItemPedido item4 = new ItemPedido(23,produto4,4);\n\t\tItemPedido item5 = new ItemPedido(24,produto5,1);*/\n\t\t\n\t\t// adicionando itens a lista de pedido\n\t\t/*pedido1.AdicionandoItemLista(item1,0);\n\t\tpedido1.AdicionandoItemLista(item3,1);\n\t\tpedido1.AdicionandoItemLista(item5,2);*/\n\t\t\t\t\n\t\t//forma de pagamento para o pedido 1\n\t\t//pedido1.setPagamento(Pagamento3);\n\n\t\t// Mostrar dados\n\t\tpedido1.mostrarPedido();\n\t\tSystem.out.println(\"Valor total com desconto: \" + Pedido.desconto(pedido1.getValorTotal(),(float)0.1));\n\t\tpedido1.getPagamento().realizaPagamento(true, \"16/04/17\");\n\t\t\n\t\t\n\t\t\n\t}",
"private void crearElementos() {\n\n\t\tRotonda rotonda1 = new Rotonda(new Posicion(400, 120), \"5 de octubre\");\n\t\tthis.getListaPuntos().add(rotonda1);\n\n\t\tCiudad esquel = new Ciudad(new Posicion(90, 180), \"Esquel\");\n\t\tthis.getListaPuntos().add(esquel);\n\n\t\tCiudad trelew = new Ciudad(new Posicion(450, 200), \"Trelew\");\n\t\tthis.getListaPuntos().add(trelew);\n\n\t\tCiudad comodoro = new Ciudad(new Posicion(550, 400), \"Comodoro\");\n\t\tthis.getListaPuntos().add(comodoro);\n\n\t\tCiudad rioMayo = new Ciudad(new Posicion(350, 430), \"Rio Mayo\");\n\t\tthis.getListaPuntos().add(rioMayo);\n\n\t\t// --------------------------------------------------------\n\n\t\tRutaDeRipio rutaRipio = new RutaDeRipio(230, 230, rotonda1, esquel);\n\t\tthis.getListaRuta().add(rutaRipio);\n\n\t\tRutaPavimentada rutaPavimentada1 = new RutaPavimentada(380, 100, trelew, comodoro);\n\t\tthis.getListaRuta().add(rutaPavimentada1);\n\n\t\tRutaPavimentada rutaPavimentada2 = new RutaPavimentada(800, 120, esquel, comodoro);\n\t\tthis.getListaRuta().add(rutaPavimentada2);\n\n\t\tRutaDeRipio rutaripio3 = new RutaDeRipio(380, 100, trelew, comodoro);\n\t\tthis.getListaRuta().add(rutaripio3);\n\n\t\tRutaEnConstruccion rutaConst1 = new RutaEnConstruccion(180, 70, rioMayo, comodoro);\n\t\tthis.getListaRuta().add(rutaConst1);\n\n\t\tRutaPavimentada rutaPavimentada3 = new RutaPavimentada(600, 110, rioMayo, esquel);\n\t\tthis.getListaRuta().add(rutaPavimentada3);\n\t}",
"public EnemigoGenerico[] cargaBichos()\n {\n \n //Crear la bicheria (hardCoded)\n CoordCasilla[] origen={new CoordCasilla(1,1), new CoordCasilla(18,1), new CoordCasilla(14,8), new CoordCasilla(17,17), new CoordCasilla(13,5)};\n CoordCasilla[] destino={new CoordCasilla(6,18) , new CoordCasilla(1,1), new CoordCasilla(1,8), new CoordCasilla(18,1) , new CoordCasilla(13,18) };\n \n \n DefBicho pelota=this.atlasBicheria.get(\"Pelota Maligna\");\n EnemigoGenerico bichos[]=new EnemigoGenerico[origen.length];\n \n for(int x=0;x<origen.length;x++)\n {\n List<CoordCasilla> camino = this.getCamino(origen[x], destino[x]);\n Gdx.app.log(\"CAMINO:\", \"DESDE (\"+origen[x].x+\",\"+origen[x].y+\") HASTA ( \"+destino[x].x+\",\"+destino[x].y+\")\");\n for (CoordCasilla cc : camino)\n Gdx.app.log(\"CASILLA.\", String.format(\"(%2d ,%2d )\", cc.x, cc.y));\n \n \n bichos[x] = new EnemigoGenerico(pelota, this.mapaAnimaciones.get(pelota.archivoAnim), pelota.pv, pelota.tasaRegen, pelota.velocidad, camino, pelota.distanciaPercepcion, pelota.ataques);\n }\n \n return bichos;\n }",
"@Override\n\tpublic List<String[]> partecipazioneUtentiAiGruppi() throws DAOException{\n\t\t\n\t\tList<String[]> risultato = null;\n\t\tConnection connection = null;\n\t\tPreparedStatement statement = null;\n\t\tResultSet resultSet = null;\n\t\tString[] stringa = null;\n\t\t\n\t\ttry {\n\t\t\trisultato = new ArrayList<String[]>();\n\t\t\tconnection = DataSource.getInstance().getConnection();\n\t\t\tstatement = connection.prepareStatement(\"SELECT DISTINCT COUNT (ISCRIZIONE_GRUPPO.ID_UTENTE)*100/ATTIVITA.NUMERO_PARTECIPANTI AS PARTECIPAZIONE, ISCRIZIONE_GRUPPO.ID_GRUPPO, GRUPPO.DESCRIZIONE FROM GRUPPO INNER JOIN ISCRIZIONE_GRUPPO ON ISCRIZIONE_GRUPPO.ID_GRUPPO = GRUPPO.ID INNER JOIN ATTIVITA ON GRUPPO.ID_ATTIVITA = ATTIVITA.ID GROUP BY (ISCRIZIONE_GRUPPO.ID_UTENTE, ISCRIZIONE_GRUPPO.ID_GRUPPO, GRUPPO.ID_ATTIVITA, ATTIVITA.NUMERO_PARTECIPANTI, GRUPPO.DESCRIZIONE) ORDER BY PARTECIPAZIONE DESC\");\n\t\t\tresultSet = statement.executeQuery();\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tstringa = new String[4];\n\t\t\t\tDouble perc = BigDecimal.valueOf(resultSet.getDouble(1)).setScale(2, RoundingMode.HALF_UP).doubleValue();\n\t\t\t\tstringa[0] = String.valueOf(resultSet.getLong(2));\n\t\t\t\tstringa[1] = resultSet.getString(3);\n\t\t\t\tstringa[2] = String.valueOf(perc);\n\t\t\t\tstringa[3] = String.valueOf(100-perc);\n\t\t\t\trisultato.add(stringa);\n\t\t\t}\n\t\t} catch (SQLException | DAOException e) {\n\t\t\tthrow new DAOException(\"ERRORE partecipazioneUtentiAiGruppi utenteAdmin\" + e.getMessage(), e);\n\t\t} finally {\n\t\t\tDataSource.getInstance().close(resultSet);\n\t\t\tDataSource.getInstance().close(statement);\n\t\t\tDataSource.getInstance().close(connection);\n\t\t}\n\t\treturn risultato;\n\t}",
"@Override\n public ComprobanteContable createAsientoDiarioBoleto(Boleto boleto) throws CRUDException {\n\n Optional op;\n ComprobanteContable comprobante = new ComprobanteContable();\n //ComprobanteContablePK pk = new ComprobanteContablePK();\n //pk.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n comprobante.setEstado(ComprobanteContable.EMITIDO);\n //comprobante.setComprobanteContablePK(pk);\n\n //creamos el concepto\n StringBuilder buff = new StringBuilder();\n\n // DESCRIPCION \n // AEROLINEA/ # Boleto / Pasajero / Rutas\n /*Aerolinea a = em.find(Aerolinea.class, boleto.getIdAerolinea().getIdAerolinea());\n if (a != null) {\n buff.append(a.getNumero());\n }*/\n buff.append(boleto.getIdAerolinea().getNumero());\n\n buff.append(\"/\");\n\n //numero boleto\n buff.append(\"#\");\n buff.append(boleto.getNumero());\n buff.append(\"/\");\n\n //Pasajero\n buff.append(boleto.getNombrePasajero().toUpperCase());\n\n // Rutas \n buff.append(\"/\");\n buff.append(boleto.getIdRuta1() != null ? boleto.getIdRuta1() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta2() != null ? boleto.getIdRuta2() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta3() != null ? boleto.getIdRuta3() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta4() != null ? boleto.getIdRuta4() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta5() != null ? boleto.getIdRuta5() : \"\");\n\n //jala el nombre cliente\n Cliente c = em.find(Cliente.class, boleto.getIdCliente().getIdCliente());\n op = Optional.ofNullable(c);\n\n if (!op.isPresent()) {\n throw new CRUDException(\"No se encontro un Cliente para el boleto\");\n }\n\n comprobante.setIdCliente(c);\n comprobante.setConcepto(buff.toString());\n comprobante.setFactorCambiario(boleto.getFactorCambiario());\n comprobante.setFecha(boleto.getFechaEmision());\n comprobante.setFechaInsert(boleto.getFechaInsert());\n comprobante.setIdEmpresa(boleto.getIdEmpresa());\n comprobante.setIdUsuarioCreador(boleto.getIdUsuarioCreador());\n comprobante.setTipo(ComprobanteContable.Tipo.ASIENTO_DIARIO);\n\n Integer numero = getNextComprobantePK(boleto.getFechaEmision(), ComprobanteContable.Tipo.ASIENTO_DIARIO);\n comprobante.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n comprobante.setIdNumeroGestion(numero);\n\n return comprobante;\n }",
"private String agrupar(Grupo grupo) throws CeldaEnemigaException, NoTransitablebleException, FueraDeMapaException {\n grupo.setTipo(Juego.TGRUPO);\n for (Personaje p : this.getPersonajes()) {\n grupo.anhadirPersonaje(p);\n p.setGrupo(grupo);\n }\n // Una vez añadidos, restauro la lista de personajes de la celda y añado el grupo\n this.restartPersonajes();\n this.anhadePersonaje(grupo);\n this.setTipo();\n\n String s = \"Se ha creado el \" + grupo.getNombre() + \" de la civilización \" + Juego.getCivilizacionActiva() + \"\\n\" + grupo;\n return s;\n }",
"public void buscarGrado() {\n \tGrado grado = new Grado();\n \tgrado.setDescripcionSeccion(\"Primaria\");\n \tgrado.setNumGrado(4);\n \tgrado.setDescripcionUltimoGrado(\"NO\");\n \tString respuesta = negocio.buscarGrado(\"\", grado);\n \tSystem.out.println(respuesta);\n }",
"public void mostrarFatura() {\n\n int i;\n System.err.println(\"Fatura do contrato:\\n\");\n\n if (hospedesCadastrados.isEmpty()) {//caso nao existam hospedes\n System.err.println(\"Nao existe hospedes cadastrados\\n\");\n\n } else {\n System.err.println(\"Digite o cpf do hospede:\\n\");\n\n listarHospedes();\n int cpf = verifica();\n for (i = 0; i < hospedesCadastrados.size(); i++) {//roda os hospedes cadastrados\n if (hospedesCadastrados.get(i).getCpf() == cpf) {//pega o hospede pelo cpf\n if (hospedesCadastrados.get(i).getContrato().isSituacao()) {//caso a situacao do contrato ainda estaja ativa\n\n System.err.println(\"Nome do hospede:\" + hospedesCadastrados.get(i).getNome());\n System.err.println(\"CPF:\" + hospedesCadastrados.get(i).getCpf() + \"\\n\");\n System.err.println(\"Servicos pedidos:\\nCarros:\");\n if (!(hospedesCadastrados.get(i).getContrato().getCarrosCadastrados() == null)) {\n System.err.println(hospedesCadastrados.get(i).getContrato().getCarrosCadastrados().toString());\n System.err.println(\"Total do serviço de aluguel de carros R$:\" + hospedesCadastrados.get(i).getContrato().getContaFinalCarros() + \"\\n\");//;\n } else {\n System.err.println(\"\\nO hospede nao possui carros cadastrados!\\n\");\n }\n System.err.println(\"Quartos:\");\n if (!(hospedesCadastrados.get(i).getContrato().getQuartosCadastrados() == null)) {\n System.err.println(hospedesCadastrados.get(i).getContrato().getQuartosCadastrados().toString());\n System.err.println(\"Total do servico de quartos R$:\" + hospedesCadastrados.get(i).getContrato().getContaFinalQuartos() + \"\\n\");//;\n } else {\n System.err.println(\"\\nO hospede nao possui Quartos cadastrados!\\n\");\n }\n System.err.println(\"Restaurante:\");\n System.err.println(\"Total do servico de restaurante R$: \" + hospedesCadastrados.get(i).getContrato().getValorRestaurante() + \"\\n\");\n System.err.println(\"Total de horas de BabySitter contratatas:\" + hospedesCadastrados.get(i).getContrato().getHorasBaby() / 45 + \"\\n\"\n + \"Total do servico de BabySitter R$:\" + hospedesCadastrados.get(i).getContrato().getHorasBaby() + \"\\n\");\n System.err.println(\"Total Fatura final: R$\" + hospedesCadastrados.get(i).getContrato().getContaFinal());\n //para limpar as disponibilidades dos servicos\n //carros, quarto, contrato e hospede\n //é necessario remover o hospede?\n// \n\n } else {//caso o contrato esteja fechado\n System.err.println(\"O hospede encontra-se com o contrato fechado!\");\n }\n }\n\n }\n }\n }",
"private void cargarFichaLepra_discapacidades() {\r\n\r\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\r\n\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\r\n\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\r\n\t\tparameters.put(\"nro_identificacion\", tbxNro_identificacion.getValue());\r\n\t\tparameters.put(\"fecha_actual\", new Date());\r\n\r\n\t\t// log.info(\"parameters\" + parameters);\r\n\t\tseguimiento_control_pqtService.setLimit(\"limit 25 offset 0\");\r\n\r\n\t\t// log.info(\"parameters>>>>\" + parameters);\r\n\t\tBoolean fecha_tratamiento = seguimiento_control_pqtService\r\n\t\t\t\t.existe_fecha_fin_tratamiento(parameters);\r\n\t\t// log.info(\"fecha_tratamiento>>>>\" + fecha_tratamiento);\r\n\r\n\t\tif (fecha_tratamiento) {\r\n\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\tadmision_seleccionada);\r\n\t\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\tIRutas_historia.PAGINA_VALORACION_DISCAPACIDADES_LEPRA,\r\n\t\t\t\t\tIRutas_historia.LABEL_VALORACION_DISCAPACIDADES_LEPRA,\r\n\t\t\t\t\tparametros);\r\n\t\t}\r\n\t}",
"private void grabarProyectoCarrerasOferta() {\r\n try {\r\n if (!sessionProyecto.getEstadoActual().getCodigo().equalsIgnoreCase(EstadoProyectoEnum.INICIO.getTipo())) {\r\n return;\r\n }\r\n for (ProyectoCarreraOferta proyectoCarreraOferta : sessionProyecto.getCarrerasSeleccionadasTransfer()) {\r\n Carrera c = carreraService.find(proyectoCarreraOferta.getCarreraId());\r\n List<ProyectoCarreraOferta> proyectoCarreraOfertas = proyectoCarreraOfertaService.buscar(\r\n new ProyectoCarreraOferta(sessionProyecto.getProyectoSeleccionado(), null, null, Boolean.TRUE));\r\n \r\n Long pcoId = devuelveProyectoCarreraId(proyectoCarreraOfertas, proyectoCarreraOferta);\r\n proyectoCarreraOferta = proyectoCarreraOfertaService.buscarPorId(new ProyectoCarreraOferta(pcoId));\r\n if (proyectoCarreraOferta == null) {\r\n proyectoCarreraOferta = new ProyectoCarreraOferta(sessionProyecto.getProyectoSeleccionado(), c.getId(), sessionProyecto.getOfertaAcademicaSeleccionada().getId(),\r\n Boolean.TRUE);\r\n if (contieneCarrera(proyectoCarreraOfertas, proyectoCarreraOferta) == false) {\r\n proyectoCarreraOfertaService.guardar(proyectoCarreraOferta);\r\n this.grabarIndividuoPCO(proyectoCarreraOferta);\r\n logDao.create(logDao.crearLog(\"ProyectoCarreraOferta\", proyectoCarreraOferta.getId() + \"\", \"CREAR\", \"Carrera=\"\r\n + proyectoCarreraOferta.getCarreraId() + \"|Oferta=\" + proyectoCarreraOferta.getOfertaAcademicaId() + \"|Proyecto= \"\r\n + proyectoCarreraOferta.getProyectoId().getId(), sessionUsuario.getUsuario()));\r\n }\r\n }\r\n proyectoCarreraOferta.setEsActivo(true);\r\n proyectoCarreraOfertaService.actualizar(proyectoCarreraOferta);\r\n logDao.create(logDao.crearLog(\"ProyectoCarreraOferta\", proyectoCarreraOferta.getId() + \"\", \"EDITAR\", \"Carrera=\"\r\n + proyectoCarreraOferta.getCarreraId() + \"|Oferta=\" + proyectoCarreraOferta.getOfertaAcademicaId()\r\n + \"|Proyecto= \" + proyectoCarreraOferta.getProyectoId().getId(), sessionUsuario.getUsuario()));\r\n }\r\n } catch (Exception e) {\r\n LOG.info(e.getMessage());\r\n }\r\n }",
"public void creaAziendaAgricola(){\n\t\tCantina nipozzano = creaCantina(\"Nipozzano\");\t\n\t\tBotte[] bottiNipozzano = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiNipozzano.length; i++){\n\t\t\tbottiNipozzano[i] = creaBotte(nipozzano, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\t\t\n\t\tVigna mormoreto = creaVigna(\"Mormoreto\", 330, 25, EsposizioneVigna.sud, \"Terreni ricchi di sabbia, ben drenati. Discreta presenza di calcio. pH neutro o leggermente alcalino\");\n\t\tFilare[] filariMormoreto = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMormoreto.length;i++){\n\t\t\tfilariMormoreto[i] = creaFilare(mormoreto, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\t\n\t\tVigna montesodi = creaVigna(\"Montesodi\", 400, 20, EsposizioneVigna.sud_ovest, \"Arido e sassoso, di alberese, argilloso e calcareo, ben drenato, poco ricco di sostanza organica\");\n\t\tFilare[] filariMontesodi = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMontesodi.length;i++){\n\t\t\tfilariMontesodi[i] = creaFilare(montesodi, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t/*\n\t\t * CANTINA: POMINO - VIGNETO BENEFIZIO\n\t\t */\n\t\t\n\t\tCantina pomino = creaCantina(\"Pomino\");\n\t\tBotte[] bottiPomino = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiPomino.length; i++){\n\t\t\tbottiPomino[i] = creaBotte(pomino, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\n\t\tVigna benefizio = creaVigna(\"Benefizio\", 700, 9, EsposizioneVigna.sud_ovest, \"Terreni ricchi di sabbia, forte presenza di scheletro. Molto drenanti. Ricchi in elementi minerali. PH acido o leggermente acido.\");\n\t\tFilare[] filariBenefizio = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariBenefizio.length;i++){\n\t\t\tfilariBenefizio[i] = creaFilare(benefizio, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(nipozzano);\n\t\taziendaAgricolaDAO.saveLuogo(mormoreto);\n\t\taziendaAgricolaDAO.saveLuogo(montesodi);\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(pomino);\n\t\taziendaAgricolaDAO.saveLuogo(benefizio);\n\t\t\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Giulio d'Afflitto\"));\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Francesco Ermini\"));\n\n\t\t\n\t}",
"public void llenadoDeCombos() {\n PerfilDAO asignaciondao = new PerfilDAO();\n List<Perfil> asignacion = asignaciondao.listar();\n cbox_perfiles.addItem(\"\");\n for (int i = 0; i < asignacion.size(); i++) {\n cbox_perfiles.addItem(Integer.toString(asignacion.get(i).getPk_id_perfil()));\n }\n \n }",
"public void publicarPropuestas() {\n try {\n //SISTEMA VERIFICA QUE LOS COMPROMISOS PARA EL PERIODO HAYAN SIDO INGRESADO\n if (this.listaCompromiso == null || this.listaCompromiso.isEmpty()) {\n //MUESTRA MENSAJE: 'DEBE INGRESAR LOS COMPROMISOS PARA PODER PUBLICAR ', NO ES POSIBLE PUBLICAR LOS RESULTADOS \n addErrorMessage(keyPropertiesFactory.value(\"cu_ne_6_lbl_mensaje_add_comprimiso_faltantes\"));\n return;\n }\n String mensajeValidacion = validarCompromisosPeriodoByPropuestaNacesidad(this.propuestaSeleccionada);\n if (mensajeValidacion != null) {\n addErrorMessage(keyPropertiesFactory.value(mensajeValidacion));\n return;\n }\n if (IConstantes.CONSTANTES_ESTADO_PROPUESTA_NECESIDAD_PRE_APROBADA.compareTo(this.propuestaSeleccionada.getConstantes().getIdConstantes()) != 0) {\n addErrorMessage(\"La propuesta debe estar en estado Pre-Aprobado\");\n return;\n }\n /*byte[] bitesPdf;\n //GENERAMOS EL REPORTE - CREADOR DE REPORTES\n try {\n HashMap mapa = new HashMap();\n mapa.put(\"p_id_periodo\", periodoSeleccionado.getIdPeriodo().intValue());\n bitesPdf = GeneradorReportesServicio.getInstancia().generarReporte(mapa, \"reporte15.jasper\");\n } catch (Exception e) {\n adicionaMensajeError(\"ERROR, Se presentaron errores al general el reporte JASPER\");\n Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, \"CU-NE-06(publicarPropuestas)\", e);\n return;\n }*/\n String iniciaCodigoVic = keyPropertiesFactory.value(\"cu_ne_6_codigo_proyecto_inicia_generacion\");\n if (iniciaCodigoVic.contains(\"-----NOT FOUND-----\")) {\n addErrorMessage(keyPropertiesFactory.value(\"cu_ne_6_error_no_existe_codigo_proyecto_inicia_generacion\"));\n return;\n }\n //EL SISTEMA CAMBIA EL ESTADO DE TODAS LAS PROPUESTAS DEL LISTADO DE ''PRE-APROBADA ' A 'APROBADA' \n //Y LOS DE ESTADO 'REVISADA' A 'NO APROBADA' \n List<SieduPropuestaAsignada> lstPropuestaasignada = this.servicePropuestaAsignada.findByVigencia(this.propuestaSeleccionada);\n List<Long> lstLong = new ArrayList<>();\n for (SieduPropuestaAsignada s : lstPropuestaasignada) {\n lstLong.add(s.getPropuestaNecesidad().getIdPropuestaNecesidad());\n }\n Proyecto proyecto = new Proyecto();\n int contarProyecto = iProyectoLocal.contarProyectoByVigencia(lstLong);\n Constantes constantes = iConstantesLocal.getConstantesPorIdConstante(IConstantes.DURACION_PROYECTOS_INSTITUCIONALES);\n int numeroMesesEstimacionProyecto = Integer.parseInt(constantes.getValor());\n UsuarioRol usuarioRol = new UsuarioRol(loginFaces.getPerfilUsuarioDTO().getRolUsuarioPorIdRolDTO(IConstantesRole.EVALUADOR_DE_PROPUESTAS_DE_NECESIDADES_EN_LA_VICIN).getIdUsuarioRol());\n if (this.propuestaSeleccionada.getConstantes().getIdConstantes().equals(IConstantes.CONSTANTES_ESTADO_PROPUESTA_NECESIDAD_PRE_APROBADA)) {\n EjecutorNecesidad ejecutorNecesidadResponsable = iEjecutorNecesidadLocal.getEjecutorNecesidadPorPropuestaNecesidadYRolResponsable(this.propuestaSeleccionada.getIdPropuestaNecesidad());\n if (ejecutorNecesidadResponsable == null || ejecutorNecesidadResponsable.getUnidadPolicial() == null || ejecutorNecesidadResponsable.getUnidadPolicial().getSiglaFisica() == null) {\n addErrorMessage(\"Error, Verifique la sigla física de la Unidad Policial asociada a la propuesta: \" + this.propuestaSeleccionada.getTema());\n return;\n }\n\n this.propuestaSeleccionada.setConstantes(new Constantes(IConstantes.CONSTANTES_ESTADO_PROPUESTA_NECESIDAD_APROBADA));\n //POR CADA PROPROPUESTA APROBADA SE CREA UN PROYECTO\n //CREA UN PROYECTO DE INVESTIGACIÓN POR CADA PROPUESTA CON EL ESTADO 'APROBADA', \n //ASIGNÁNDOLE EL CÓDIGO DE INVESTIGACIÓN DE ACUERDO AL MÉTODO ESTABLECIDO(VER REQUERIMIENTOS ESPECIALES), \n //ASIGNÁNDOLE EL ÁREA Y LA LÍNEA DE INVESTIGACIÓN Y EL TEMA PROPUESTO COMO TITULO PROPUESTO\n //VIC - [Consecutivo de proyectos en el periodo][Año]- [Código interno de la Unidad Policial o Escuela]\n String codigoInternoUnidad = ejecutorNecesidadResponsable.getUnidadPolicial().getSiglaFisica();\n String codigoProyecto = iniciaCodigoVic.concat(\"-\");//VIC \n contarProyecto += 1;\n codigoProyecto = codigoProyecto.concat(String.valueOf(contarProyecto));//[Consecutivo de proyectos en el periodo]\n codigoProyecto = codigoProyecto.concat(String.valueOf(lstPropuestaasignada.get(0).getSieduPropuestaAsignadaPK().getVigencia()));//[Año]\n codigoProyecto = codigoProyecto.concat(\"-\");\n codigoProyecto = codigoProyecto.concat(codigoInternoUnidad);//[Código interno de la Unidad Policial o Escuela]\n Date fechaHoy = new Date();\n proyecto.setCodigoProyecto(codigoProyecto);\n proyecto.setLinea(this.propuestaSeleccionada.getLinea());\n proyecto.setTituloPropuesto(this.propuestaSeleccionada.getTema());\n proyecto.setTema(this.propuestaSeleccionada.getTema());\n proyecto.setPeriodo(this.propuestaSeleccionada.getPeriodo());\n proyecto.setUsuarioRol(usuarioRol);\n proyecto.setEstado(new Constantes(IConstantes.TIPO_ESTADO_PROYECTO_EN_EJECUCION));\n proyecto.setUnidadPolicial(ejecutorNecesidadResponsable.getUnidadPolicial());\n proyecto.setPropuestaNecesidad(this.propuestaSeleccionada);\n proyecto.setFechaEstimadaInicio(fechaHoy);\n Calendar fechaFinalEstimadaProyecto = Calendar.getInstance();\n fechaFinalEstimadaProyecto.setTime(fechaHoy);\n fechaFinalEstimadaProyecto.add(Calendar.MONTH, numeroMesesEstimacionProyecto);\n proyecto.setFechaEstimadaFinalizacion(fechaFinalEstimadaProyecto.getTime());\n proyecto.setFechaActualizacion(fechaHoy);\n //CREAMOS LOS COMPROMISOS PROYECTOS\n List<CompromisoProyecto> listaCompromisosProyecto = new ArrayList<CompromisoProyecto>();\n //CONSULTAMOS LOS COMPROMISOS DE ESTE PERIODO\n List<CompromisoPeriodo> listaComprimiso = iCompromisoPeriodoLocal.buscarCompromisoPeriodoByIdPropuestaNecesidad(this.propuestaSeleccionada);\n for (CompromisoPeriodo unCompromisoPeriodo : listaComprimiso) {\n CompromisoProyecto compromisoProyecto = new CompromisoProyecto();\n compromisoProyecto.setCompromisoPeriodo(unCompromisoPeriodo);\n compromisoProyecto.setProyecto(proyecto);\n compromisoProyecto.setEstado(new Constantes(IConstantes.ESTADO_COMPROMISO_PROYECTO_PENDIENTE));\n compromisoProyecto.setFechaCreacion(new Date());\n compromisoProyecto.setMaquina(loginFaces.getPerfilUsuarioDTO().getMaquinaDTO().getIpLoginRemotoUsuario());\n compromisoProyecto.setUsuarioRegistro(loginFaces.getPerfilUsuarioDTO().getIdentificacion());\n compromisoProyecto.setUsuarioRolRegistra(usuarioRol);\n listaCompromisosProyecto.add(compromisoProyecto);\n }\n //CREAMOS LAS UNIDADES EJECUTORAS PARA EL PROYECTO\n List<EjecutorNecesidadDTO> listadoEjecutorNecesidadDTOPropuesta = iEjecutorNecesidadLocal.getEjecutorNecesidadDTOPorPropuestaNecesidad(this.propuestaSeleccionada.getIdPropuestaNecesidad());\n List<EjecutorNecesidad> listaEjecutorNecesidadProyecto = new ArrayList<EjecutorNecesidad>();\n for (EjecutorNecesidadDTO unaEjecutorNecesidadDTO : listadoEjecutorNecesidadDTOPropuesta) {\n EjecutorNecesidad ejecutorNecesidadLocal = new EjecutorNecesidad();\n ejecutorNecesidadLocal.setPropuestaNecesidad(new PropuestaNecesidad(this.propuestaSeleccionada.getIdPropuestaNecesidad()));\n ejecutorNecesidadLocal.setProyecto(proyecto);\n ejecutorNecesidadLocal.setRol(new Constantes(unaEjecutorNecesidadDTO.getIdRol()));\n ejecutorNecesidadLocal.setUnidadPolicial(this.iUnidadPolicialLocal.obtenerUnidadPolicialPorId(unaEjecutorNecesidadDTO.getIdUnidadPolicial()));\n listaEjecutorNecesidadProyecto.add(ejecutorNecesidadLocal);\n }\n proyecto.setEjecutorNecesidadList(listaEjecutorNecesidadProyecto);\n proyecto.setCompromisoProyectoList(listaCompromisosProyecto);\n\n } else if (this.propuestaSeleccionada.getConstantes().getIdConstantes().equals(\n IConstantes.CONSTANTES_ESTADO_PROPUESTA_NECESIDAD_REVISADA)) {\n this.propuestaSeleccionada.setConstantes(new Constantes(IConstantes.CONSTANTES_ESTADO_PROPUESTA_NECESIDAD_NO_APROBADA));\n }\n\n //ACTUALIZAMOS EL CAMPO ROL_ACTUAL\n //CON EL OBJETIVO SE SABER EN DONDE SE ENCUENTRA LA PROPUESTA\n //ESTO SE REALIZA PARA CORREGIR \n //LA INCIDENCIA #0002754: Mientras no se publiquen los resultados de las necesidades, el estado debe ser 'Enviada a VICIN'.\n this.propuestaSeleccionada.setRolActual(IConstantes.PROPUESTA_NECESIDAD_PUBLICADA_JEFE_UNIDAD);\n /* \n\n //GENERAMOS EL NOMBRE DEL ARCHIVO DEL REPORTE\n String nombreReporteUnico = \"PROP_NECES_PERIODO\".concat(\"_\").concat(String.valueOf(System.currentTimeMillis())).concat(\".pdf\");\n String nombreReporte = \"PROP_NECES_PERIODO_\" + (periodoSeleccionado.getAnio() == null ? periodoSeleccionado.getIdPeriodo().toString() : periodoSeleccionado.getAnio().toString()) + \".pdf\";\n */\n //SE ACTUALIZAN LAS PROPUESTAS DE NECESIDAD\n servicePropuestaNecesidad.guardarPropuestaYgenerarProyecto(\n this.propuestaSeleccionada,\n proyecto);\n\n addInfoMessage(keyPropertiesFactory.value(\"cu_ne_6_lbl_mensaje_propuestas_actualizadas_ok_publicar\"));\n\n navigationFaces.redirectFacesCuNe01();\n\n } catch (Exception e) {\n\n addErrorMessage(keyPropertiesFactory.value(\"general_mensaje_error_exception\"));\n Logger.getLogger(this.getClass().getName()).log(Level.SEVERE,\n \"CU-NE-06 Evaluar propuestas de necesidades de investigación - (publicarPropuestas)\", e);\n\n }\n\n }",
"private void gerarLaudosProcedimentosEspeciaisDiversos(\r\n\t\t\tMpmPrescricaoMedica prescricao, List<MpmLaudo> laudoList)\r\n\t\t\tthrows BaseException {\r\n\r\n\t\tMap<MpmPrescricaoProcedimento, FatProcedHospInternos> procedimentosMap = this\r\n\t\t\t\t.getConfirmarPrescricaoMedicaRN()\r\n\t\t\t\t.listarProcedimentosDiversosGeracaoLaudos(prescricao);\r\n\r\n\t\tMpmLaudo laudo = null;\r\n\r\n\t\tIParametroFacade parametroFacade = this.getParametroFacade();\r\n\r\n\t\tint codigoHemodialise = parametroFacade\r\n\t\t\t\t.buscarAghParametro(\r\n\t\t\t\t\t\tAghuParametrosEnum.P_AGHU_PROCEDIMENTO_HOSPITALAR_INTERNO_HEMODIALISE)\r\n\t\t\t\t.getVlrNumerico().intValue();\r\n\t\tint codigoDialise = parametroFacade\r\n\t\t\t\t.buscarAghParametro(\r\n\t\t\t\t\t\tAghuParametrosEnum.P_AGHU_PROCEDIMENTO_HOSPITALAR_INTERNO_DIALISE)\r\n\t\t\t\t.getVlrNumerico().intValue();\r\n\r\n\t\tfor (MpmPrescricaoProcedimento procedimento : procedimentosMap.keySet()) {\r\n\r\n\t\t\tInteger codigoProcedimentoInterno = procedimentosMap.get(\r\n\t\t\t\t\tprocedimento).getSeq();\r\n\t\t\tboolean gerarLaudo = true;\r\n\r\n\t\t\tif (codigoProcedimentoInterno == codigoHemodialise\r\n\t\t\t\t\t|| codigoProcedimentoInterno == codigoDialise) {\r\n\t\t\t\tgerarLaudo = !this.getConfirmarPrescricaoMedicaRN()\r\n\t\t\t\t\t\t.verificarPacienteContaApac();\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif (gerarLaudo) {\r\n\r\n\t\t\t\tlaudo = new MpmLaudo();\r\n\t\t\t\tlaudo.setDthrInicioValidade(prescricao.getDthrInicio());\r\n\r\n\t\t\t\tDate dataFimValidade = prescricao.getDthrInicio();\r\n\t\t\t\tif (procedimento.getDuracaoTratamentoSolicitado() != null) {\r\n\t\t\t\t\tdataFimValidade = DateUtil.adicionaDias(dataFimValidade,\r\n\t\t\t\t\t\t\tprocedimento.getDuracaoTratamentoSolicitado()\r\n\t\t\t\t\t\t\t\t\t.intValue() - 1);\r\n\t\t\t\t}\r\n\t\t\t\tlaudo.setDthrFimValidade(dataFimValidade);\r\n\t\t\t\tlaudo.setDthrFimPrevisao(dataFimValidade);\r\n\r\n\t\t\t\tlaudo.setJustificativa(procedimento.getJustificativa());\r\n\t\t\t\tlaudo.setContaDesdobrada(false);\r\n\t\t\t\tlaudo.setImpresso(false);\r\n\t\t\t\t// #51803\r\n\t\t\t\tif (procedimento.getDuracaoTratamentoSolicitado() == null\r\n\t\t\t\t\t\t|| procedimento.getDuracaoTratamentoSolicitado() == 0) {\r\n\t\t\t\t\tlaudo.setDuracaoTratSolicitado((short) 1);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tlaudo.setDuracaoTratSolicitado(procedimento\r\n\t\t\t\t\t\t\t.getDuracaoTratamentoSolicitado());\r\n\t\t\t\t}\r\n\t\t\t\tlaudo.setLaudoManual(false);\r\n\t\t\t\tlaudo.setAtendimento(prescricao.getAtendimento());\r\n\t\t\t\tlaudo.setPrescricaoProcedimento(procedimento);\r\n\t\t\t\tlaudo.setProcedimentoHospitalarInterno(procedimentosMap\r\n\t\t\t\t\t\t.get(procedimento));\r\n\r\n\t\t\t\tthis.adicionarLaudoLista(laudoList, laudo);\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}",
"public void ganarDineroPorAutomoviles() {\n for (Persona p : super.getMundo().getListaDoctores()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n for (Persona p : super.getMundo().getListaCocineros()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n for (Persona p : super.getMundo().getListaAlbaniles()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n for (Persona p : super.getMundo().getListaHerreros()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n for (Persona p : super.getMundo().getListaCocineros()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n }",
"private void cargaComentarios() {\n\t\ttry{\n\t\t\t String Sjson= Utils.doHttpConnection(\"http://codigo.labplc.mx/~mikesaurio/taxi.php?act=pasajero&type=getcomentario&placa=\"+placa);\n\t\t JSONObject json= (JSONObject) new JSONTokener(Sjson).nextValue();\n\t\t JSONObject json2 = json.getJSONObject(\"message\");\n\t\t JSONObject jsonResponse = new JSONObject(json2.toString());\n\t\t JSONArray cast2 = jsonResponse.getJSONArray(\"calificacion\");\n\t\t\t ArrayList<ComentarioBean> arrayComenario= new ArrayList<ComentarioBean>();\n\t\t\t for (int i=0; i<cast2.length(); i++) {\n\t\t\t \tJSONObject oneObject = cast2.getJSONObject(i);\n\t\t\t\t\t\t try {\n\t\t\t\t\t\t\t ComentarioBean\t comentarioBean = new ComentarioBean();\n\t\t\t\t\t\t\t comentarioBean.setComentario((String) oneObject.getString(\"comentario\"));\n\t\t\t\t\t\t\t Float calif =Float.parseFloat((String) oneObject.getString(\"calificacion\"));\n\t\t\t\t\t\t\t comentarioBean.setCalificacion(calif);\n\t\t\t\t\t\t\t comentarioBean.setId_facebook((String) oneObject.getString(\"id_face\"));\n\t\t\t\t\t\t\t comentarioBean.setFecha_comentario((String) oneObject.getString(\"hora_fin\"));\n\t\t\t\t\t\t\t arrayComenario.add(comentarioBean);\n\t\t\t\t\t\t\t sumaCalificacion+=calif;\n\t\t\t\t\t\t } catch (JSONException e) { \n\t\t\t\t\t\t\t DatosLogBean.setDescripcion(Utils.getStackTrace(e));\n\t\t\t\t\t\t }\n\t\t\t }\n\t\t\t autoBean.setArrayComentarioBean(arrayComenario);\n\t\t\t if(cast2.length()>0){\n\t\t\t \t float califParcial = (sumaCalificacion/cast2.length());\n\t\t\t \t PUNTOS_USUARIO =usuarioCalifica(califParcial); //(int) (califParcial * 20 /5);\n\t\t\t \t autoBean.setCalificacion_usuarios(califParcial);\n\t\t\t }else{\n\t\t\t \t autoBean.setCalificacion_usuarios(0);\n\t\t\t }\n\t\t\t}catch(JSONException e){\n\t\t\t\tDatosLogBean.setDescripcion(Utils.getStackTrace(e));\n\t\t\t}\n\t}",
"public Map<Long, GrupoAtencion> getGruposAtentionGenerados(Integer accion, Long numeroProgramacion) {\n\t\tlogger.info(\" ### getGruposAtentionGenerados ### \");\n\t\t\n\t\tMap<Long, GrupoAtencion> mpGrupos = Collections.EMPTY_MAP;\n\t\t\n\t\ttry{\n\t\t\t\n\t\t\tif(accion!=null && accion.equals(ConstantBusiness.ACCION_NUEVA_PROGRAMACION)){\n\t\t\t\tmpGrupos = new LinkedHashMap<Long, GrupoAtencion>();\n\t\t\t\tlogger.info(\" mostrando mostrando grupos temporales \");\n\t\t\t\t\n\t\t\t\tmpGrupos.putAll(mpGruposCached);\n\t\t\t\t\n\t\t\t}else if(accion!=null && accion.equals(ConstantBusiness.ACCION_EDITA_PROGRAMACION)){\n\t\t\t\tmpGrupos = new LinkedHashMap<Long, GrupoAtencion>();\n\t\t\t\tlogger.info(\" mostrando mostrando grupos bd \");\n\t\t\t\tList<GrupoAtencion> grupoAtencionLíst = grupoAtencionDao.getGruposAtencionPorProgramacion(numeroProgramacion);\n\t\t\t\tList<GrupoAtencion> _grupoAtencionLíst = new ArrayList<>();\n\t\t\t\t\n\t\t\t\tList<GrupoAtencionDetalle> _grupoDetalleAtencionLíst = new ArrayList<>();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tfor (GrupoAtencion g : grupoAtencionLíst) {\n\t\t\t\t\tlogger.info(\" grupo generado :\"+g.getDescripcion());\n\t\t\t\t\t//clonando grupos \n\t\t\t\t\tlogger.info(\" ### clonando grupo : \"+g.getNumeroGrupoAtencion());\n\t\t\t\t\tGrupoAtencion grupoAtencion = (GrupoAtencion) g.clone();\n\t\t\t\t\tfor(GrupoAtencionDetalle d: g.getGrupoAtencionDetalles()){\n\t\t\t\t\t\t\n\t\t\t\t\t\tlogger.info(\"### numero de solicitud :\"+d.getSolicitudServicio().getNumeroSolicitud());\n\t\t\t\t\t\t\n\t\t\t\t\t\t_grupoDetalleAtencionLíst.add((GrupoAtencionDetalle)d.clone());\n\t\t\t\t\t }\n\t\t\t\t\t\n\t\t\t\t\t_grupoAtencionLíst.add(grupoAtencion);\n\t\t\t\t}\n\n\t\t\t\tlogger.info(\" mapeando objetos clonados \");\n\t\t\t\tfor (GrupoAtencion g : _grupoAtencionLíst) {\n\t\t\t\t\tg.setGrupoAtencionDetalles(new ArrayList<GrupoAtencionDetalle>());\n\t\t\t\t\tfor (GrupoAtencionDetalle d : _grupoDetalleAtencionLíst) {\n\t\t\t\t\t\tif( d.getGrupoAtencion()!=null && \n\t\t\t\t\t\t\t\td.getGrupoAtencion().getNumeroGrupoAtencion()==g.getNumeroGrupoAtencion()){\n\t\t\t\t\t\t\tg.getGrupoAtencionDetalles().add(d);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tmpGrupos.put(g.getNumeroGrupoAtencion(), g);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tthis.mpGruposCached = mpGrupos;\n\t\t\t\t\n\t\t\t\tmostrarGrupos(mpGrupos);\n\t\t\t}\n\t\t\t\n\t\t\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn mpGrupos;\n\t}",
"void cargarDatos(Persona beanTabla) {\n this.oPersona = beanTabla;\n oFondoSolidaridad = new FondoSolidaridad();\n\n if (oPersona != null) {\n oBlFondoPrevision = new FondoPrevisionBl();\n listFondos = oBlFondoPrevision.listar(oPersona.getIdpersona());\n oFondoSolidaridad.setPersona(oPersona);\n if (listFondos.isEmpty()) {\n JOptionPane.showMessageDialog(null, \"La persona no tiene fondos\", \"ATENCION\", JOptionPane.ERROR_MESSAGE);\n } else {\n for (FondoSolidaridad obj : listFondos) {\n oModeloFondoPrevision.add(obj);\n }\n\n }\n\n } else {\n JOptionPane.showMessageDialog(null, \"Verifique sus datos\", \"ATENCION\", JOptionPane.ERROR_MESSAGE);\n }\n }",
"private void creaModuloMem() {\n /* variabili e costanti locali di lavoro */\n ArrayList<Campo> campi = new ArrayList<Campo>();\n ModuloRisultati modulo;\n Campo campo;\n\n try { // prova ad eseguire il codice\n\n campo = CampoFactory.intero(Campi.Ris.codicePiatto.getNome());\n campi.add(campo);\n\n campo = CampoFactory.testo(Campi.Ris.nomePiatto.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"piatto\");\n campo.setToolTipLista(\"nome del piatto\");\n campo.decora()\n .etichetta(\"nome del piatto\"); // le etichette servono per il dialogo ricerca\n campo.setLarghezza(250);\n campi.add(campo);\n\n campo = CampoFactory.testo(Campi.Ris.categoria.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"categoria\");\n campo.setToolTipLista(\"categoria del piatto\");\n campo.setLarghezza(80);\n campi.add(campo);\n\n campo = CampoFactory.intero(Campi.Ris.quanteVolte.getNome());\n campo.setVisibileVistaDefault();\n campo.setLarghezza(80);\n campo.setTitoloColonna(\"quante volte\");\n campo.setToolTipLista(\n \"quante volte questo piatto è stato offerto nel periodo analizzato\");\n campo.decora().etichetta(\"quante volte\");\n campi.add(campo);\n\n campo = CampoFactory.intero(Campi.Ris.quantiCoperti.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"coperti\");\n campo.setToolTipLista(\"numero di coperti che avrebbero potuto ordinare\");\n campo.decora().etichetta(\"n. coperti\");\n campo.setLarghezza(80);\n campi.add(campo);\n\n campo = CampoFactory.intero(Campi.Ris.quanteComande.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"comande\");\n campo.setToolTipLista(\"numero di comande effettive\");\n campo.decora().etichetta(\"n. comande\");\n campo.setLarghezza(80);\n campo.setTotalizzabile(true);\n campi.add(campo);\n\n campo = CampoFactory.percentuale(Campi.Ris.gradimento.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"gradimento\");\n campo.setToolTipLista(\n \"percentuale di gradimento (è il 100% se tutti i coperti potenziali lo hanno ordinato)\");\n campo.decora().etichetta(\"% gradimento\");\n campo.setLarghezza(80);\n campi.add(campo);\n\n modulo = new ModuloRisultati(campi);\n setModuloRisultati(modulo);\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n\n }",
"private void gerarLaudoPermanenciaMaior(MpmPrescricaoMedica prescricao,\r\n\t\t\tList<MpmLaudo> laudoList, FatConvenioSaudePlano convenioSaudePlano,\r\n\t\t\tAghParametros seqLaudoMaiorPermanencia) {\r\n\t\tMpmTipoLaudoConvenio tipoLaudoConvenio = this\r\n\t\t\t\t.getMpmTipoLaudoConvenioDAO()\r\n\t\t\t\t.obterTempoValidadeTipoLaudoPermanenciaMaior(\r\n\t\t\t\t\t\tseqLaudoMaiorPermanencia.getVlrNumerico().shortValue(),\r\n\t\t\t\t\t\tconvenioSaudePlano);\r\n\r\n\t\tif (tipoLaudoConvenio != null) {\r\n\r\n\t\t\tShort quantidadeDiasFaturamento = 0;\r\n\t\t\tShort diasPermanenciaMaior = 0;\r\n\r\n\t\t\tMpmTipoLaudo tipoLaudoMaiorPermanencia = this.getMpmTipoLaudoDAO()\r\n\t\t\t\t\t.obterPorChavePrimaria(\r\n\t\t\t\t\t\t\tseqLaudoMaiorPermanencia.getVlrNumerico()\r\n\t\t\t\t\t\t\t\t\t.shortValue());\r\n\r\n\t\t\tif (prescricao.getAtendimento().getInternacao() != null) {\r\n\t\t\t\tif (prescricao.getAtendimento()\r\n\t\t\t\t\t\t.getInternacao().getItemProcedimentoHospitalar() != null){\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (prescricao.getAtendimento()\r\n\t\t\t\t\t.getInternacao().getItemProcedimentoHospitalar()\r\n\t\t\t\t\t.getQuantDiasFaturamento() != null){\r\n\t\t\t\t\t\tquantidadeDiasFaturamento = prescricao.getAtendimento()\r\n\t\t\t\t\t\t.getInternacao().getItemProcedimentoHospitalar()\r\n\t\t\t\t\t\t.getQuantDiasFaturamento();\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdiasPermanenciaMaior = prescricao.getAtendimento()\r\n\t\t\t\t\t.getInternacao().getItemProcedimentoHospitalar()\r\n\t\t\t\t\t.getDiasPermanenciaMaior();\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\tif (diasPermanenciaMaior == null || diasPermanenciaMaior > 0){\r\n\t\t\t\t\r\n\t\t\t\tInteger adicionalDias = 0;\r\n\t\t\t\tif (quantidadeDiasFaturamento != null) {\r\n\t\t\t\t\tadicionalDias = (quantidadeDiasFaturamento * 2) + 1;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (DateUtil.validaDataTruncadaMaiorIgual(new Date(), DateUtil\r\n\t\t\t\t\t\t.adicionaDias(prescricao.getAtendimento().getInternacao()\r\n\t\t\t\t\t\t\t\t.getDthrInternacao(), adicionalDias))) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (this.getMpmLaudoDAO()\r\n\t\t\t\t\t\t\t.obterCountLaudosPorTipoEAtendimento(\r\n\t\t\t\t\t\t\t\t\tprescricao.getAtendimento(),\r\n\t\t\t\t\t\t\t\t\ttipoLaudoMaiorPermanencia) <= 0) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tMpmLaudo laudo = new MpmLaudo();\r\n\t\t\t\t\t\tlaudo.setDthrInicioValidade(prescricao.getAtendimento()\r\n\t\t\t\t\t\t\t\t.getInternacao().getDthrInternacao());\r\n\t\t\t\t\t\tlaudo.setContaDesdobrada(false);\r\n\t\t\t\t\t\tlaudo.setImpresso(false);\r\n\t\t\t\t\t\tlaudo.setLaudoManual(false);\r\n\t\t\t\t\t\tlaudo.setAtendimento(prescricao.getAtendimento());\r\n\t\t\t\t\t\tlaudo.setTipoLaudo(tipoLaudoMaiorPermanencia);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tlaudoList.add(laudo);\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}",
"public void generTirarDados() {\n\r\n\t}",
"public ArrayList<String> Info_Disc_Pel_Compras_usu(String genero, String usuario) {\r\n ArrayList<String> Lista_nombre = Info_Disco_Pel_Rep1(genero);\r\n ArrayList<String> Lista_datos_compras = new ArrayList();\r\n String line;\r\n try (BufferedReader br = new BufferedReader(new FileReader(\"src/Archivos/Compra_Peliculas.txt\"))) {\r\n while ((line = br.readLine()) != null) {\r\n String[] info_disco_compra = line.split(\";\");\r\n for (int s = 0; s < Lista_nombre.size(); s++) {\r\n if (Lista_nombre.get(s).equals(info_disco_compra[3]) & info_disco_compra[0].equals(usuario)) {\r\n Lista_datos_compras.add(info_disco_compra[3]);\r\n Lista_datos_compras.add(info_disco_compra[5]);\r\n }\r\n }\r\n }\r\n } catch (IOException ex) {\r\n System.out.println(ex);\r\n }\r\n return Lista_datos_compras;\r\n }",
"private void creaAddebitiGiornoConto(Date data, int codConto) {\n /* variabili e costanti locali di lavoro */\n boolean continua;\n Filtro filtro;\n int[] interi;\n ArrayList<Integer> codici = null;\n Modulo modAddFisso;\n Modulo modConto;\n boolean chiuso;\n\n try { // prova ad eseguire il codice\n\n /* controllo se il conto e' aperto */\n modConto = Albergo.Moduli.Conto();\n chiuso = modConto.query().valoreBool(Conto.Cam.chiuso.get(), codConto);\n continua = (!chiuso);\n\n if (continua) {\n\n /* filtro che isola gli addebiti fissi da eseguire\n * per il giorno e il conto dati */\n filtro = this.getFiltroFissiGiornoConto(data, codConto);\n continua = filtro != null;\n\n /* crea elenco dei codici addebito fisso da elaborare */\n if (continua) {\n modAddFisso = Albergo.Moduli.AddebitoFisso();\n interi = modAddFisso.query().valoriChiave(filtro);\n codici = Lib.Array.creaLista(interi);\n }// fine del blocco if\n\n /* crea un addebito effettivo per ogni addebito fisso */\n if (codici != null) {\n for (int cod : codici) {\n this.creaSingoloAddebito(cod, data);\n } // fine del ciclo for-each\n }// fine del blocco if\n\n }// fine del blocco if\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }",
"public List<String> pot(ReportePlazaDTO reportePlazaDTO) {\n List<CustomOutputFile> lista = new ArrayList<CustomOutputFile>();\n List<String> listaString = new ArrayList<String>();\n\n String qnaCaptura = reportePlazaDTO.getQnaCaptura();\n String qnaCaptura2 = \"\";\n\n if (new Integer(qnaCaptura) % 2 == 0) {\n qnaCaptura2 = String.valueOf((new Integer(qnaCaptura) - 1));\n } else {\n qnaCaptura2 = qnaCaptura;\n }\n\n\n if (reportePlazaDTO.getOrigen().equalsIgnoreCase(\"e\")) {\n\n lista = \n super.persistence().get(QueryTdPlazaDAO.class).findBypotEscenario(qnaCaptura);\n listaString.add(\"ID del Cargo,Nombre del Cargo\");\n } else if (reportePlazaDTO.getOrigen().equalsIgnoreCase(\"i\")) {\n lista = \n super.persistence().get(QueryTdPlazaDAO.class).findBypotInmueble(qnaCaptura);\n listaString.add(\"Id Domicilio,Calle,Número Exterior,Número Interior,Colonia,Municipio,Estado/Entidad Fef.,País,Código Postal,Tipo de Oficina\");\n } else if (reportePlazaDTO.getOrigen().equalsIgnoreCase(\"a\")) {\n lista = \n super.persistence().get(QueryTdPlazaDAO.class).findBypotAltas(qnaCaptura, \n qnaCaptura2);\n listaString.add(\"ID del Servidor Público,Nombre,Primer Apellido,Segundo Apellido,Tipo Vacancia,Telefono Directo,Conmutador,Extensión,Fax,Email,ID Domicilio,Nivel de Puesto,Id del Cargo,ID del Cargo Superior,Nivel_Jerarquico\");\n } else if (reportePlazaDTO.getOrigen().equalsIgnoreCase(\"b\")) {\n lista = \n super.persistence().get(QueryTdPlazaDAO.class).findBypotBajas(qnaCaptura, \n qnaCaptura2);\n listaString.add(\"ID del Servidor Público\");\n } else if (reportePlazaDTO.getOrigen().equalsIgnoreCase(\"d\")) {\n lista = \n super.persistence().get(QueryTdPlazaDAO.class).findBypotDirectorio(qnaCaptura, \n qnaCaptura2);\n listaString.add(\"Unidad,RFC,ID del Servidor Público,Nombre,Primer Apellido,Segundo Apellido,Tipo Vacancia,Telefono Directo,Conmutador,Extensión,Fax,Email,ID Domicilio,Nivel de Puesto,Id del Cargo,ID del Cargo Superior,Nivel_Jerarquico\");\n } else if (reportePlazaDTO.getOrigen().equalsIgnoreCase(\"r\")) {\n lista = \n super.persistence().get(QueryTdPlazaDAO.class).findBypotRemuneraciones(qnaCaptura, \n qnaCaptura2);\n listaString.add(\"Id Puesto,Nombre,Tipo,SubTipo,Sueldo Base,Compensación Garantizada, Total Bruto, Total Neto,Nombre 01 Remuneracion,Monto 01 Remuneracion,Nombre 02 Remuneracion,Monto 02 Remuneracion,Nombre 03 Remuneracion,Monto 03 Remuneracion,Nombre 04 Remuneracion,Monto 04 Remuneracion,Nombre 05 Remuneracion,Monto 05 Remuneracion,Nombre 06 Remuneracion,Monto 06 Remuneracion,Nombre 07 Remuneracion,Monto 07 Remuneracion,Nombre 08 Remuneracion,Monto 08 Remuneracion,Nombre 09 Remuneracion,Monto 09 Remuneracion,Nombre 10 Remuneracion,Monto 10 Remuneracion,Nombre 11 Remuneracion,Monto 11 Remuneracion,Nombre 12 Remuneracion,Monto 12 Remuneracion,Nombre 13 Remuneracion,Monto 13 Remuneracion,Nombre 14 Remuneracion,Monto 14 Remuneracion,Nombre 15 Remuneracion,Monto 15 Remuneracion,Institucional,Colectivo de Retiro,Gastos Médicos,Separación Individualizado,Riesgos de Trabajo,Nombre Otros Seguros 1,Monto Otros Seguros 1,Nombre Otros Seguros 2,Monto Otros Seguros 2,Nombre Otros Seguros 3,Monto Otros Seguros 3,Nombre Otros Seguros 4,Monto Otros Seguros 4,Nombre Otros Seguros 5,Monto Otros Seguros 5,Nombre Otros Seguros 6,Monto Otros Seguros 6,Nombre Otros Seguros 7,Monto Otros Seguros 7,Nombre Otros Seguros 8,Monto Otros Seguros 8,Nombre Otros Seguros 9,Monto Otros Seguros 9,Nombre Otros Seguros 10,Monto Otros Seguros 10,Nombre Otros Seguros 11,Monto Otros Seguros 11,Nombre Otros Seguros 12,Monto Otros Seguros 12,Nombre Otros Seguros 13,Monto Otros Seguros 13,Nombre Otros Seguros 14,Monto Otros Seguros 14,Nombre Otros Seguros15,Monto Otros Seguros 15,Prima Vacacional,Primas de Antigüedad,Gratificación de Fin de Año,Pagas de Defunción,Ayuda para Despensa,Vacaciones,Nombre Prest. Econom 1,Monto Prest. Econom 1,Nombre Prest. Econom 2,Monto Prest. Econom 2,Nombre Prest. Econom 3,Monto Prest. Econom 3,Nombre Prest. Econom 4,Monto Prest. Econom 4,Nombre Prest. Econom 5,Monto Prest. Econom 5,Nombre Prest. Econom 6,Monto Prest. Econom 6,Nombre Prest.Econom 7,Monto Prest. Econom 7,Nombre Prest. Econom 8,Monto Prest. Econom 8,Nombre Prest. Econom 9,Monto Prest. Econom 9,Nombre Prest. Econom 10,Monto Prest. Econom 10,Nombre Prest. Econom 11,Monto Prest. Econom 11,Nombre Prest. Econom 12,Monto Prest. Econom 12,Nombre Prest. Econom 13,Monto Prest. Econom 13,Nombre Prest. Econom 14,Monto Prest. Econom 14,Nombre Prest. Econom 15,Monto Prest. Econom 15,Asistencia Legal,Asignación de Vehículo y/o Apoyo Económico ,Equipo de Telefonía Celular,Gastos de Alimentación,Nombre Prest. Inherentes al Puesto 1,Monto Prest. Inherentes al Puesto 1,Nombre Prest. Inherentes al Puesto 2,Monto Prest. Inherentes al Puesto 2,Nombre Prest. Inherentes al Puesto 3,Monto Prest. Inherentes al Puesto 3,Nombre Prest. Inherentes al Puesto 4,Monto Prest. Inherentes al Puesto 4,Nombre Prest. Inherentes al Puesto 5,Monto Prest. Inherentes al Puesto 5,Nombre Prest. Inherentes al Puesto 6,Monto Prest. Inherentes al Puesto 6,Nombre Prest. Inherentes al Puesto 7,Monto Prest. Inherentes al Puesto 7,Nombre Prest. Inherentes al Puesto 8,Monto Prest. Inherentes al Puesto 8,Nombre Prest. Inherentes al Puesto 9,Monto Prest. Inherentes al Puesto 9,Nombre Prest. Inherentes al Puesto 10,Monto Prest. Inherentes al Puesto 10,Nombre Prest. Inherentes al Puesto 11,Monto Prest. Inherentes al Puesto 11,Nombre Prest. Inherentes al Puesto 12,Monto Prest. Inherentes al Puesto 12,Nombre Prest. Inherentes al Puesto 13,Monto Prest. Inherentes al Puesto 13,Nombre Prest. Inherentes al Puesto 14,Monto Prest. Inherentes al Puesto 14,Nombre Prest. Inherentes al Puesto 15,Monto Prest. Inherentes al Puesto 15,ISSSTE / IMSS,FOVISSSTE / INFONAVIT,SAR,Nombre 01 Prest.Seg Social,Monto 01 Prest.Seg Social,Nombre 02 Prest.Seg Social,Monto 02 Prest.Seg Social,Nombre 03 Prest.Seg Social,Monto 03 Prest.Seg Social,Nombre 04 Prest.Seg Social,Monto 04 Prest.Seg Social,Nombre 05 Prest.Seg Social,Monto 05 Prest.Seg Social,Nombre 06 Prest.Seg Social,Monto 06 Prest.Seg Social,Nombre 07 Prest.Seg Social,Monto 07 Prest.Seg Social,Nombre 08 Prest.Seg Social,Monto 08 Prest.Seg Social,Nombre 09 Prest.Seg Social,Monto 09 Prest.Seg Social,Nombre 10 Prest.Seg Social,Monto 10 Prest.Seg Social,Nombre 11 Prest.Seg Social,Monto 11 Prest.Seg Social,Nombre 12 Prest.Seg Social,Monto 12 Prest.Seg Social,Nombre 13 Prest.Seg Social,Monto 13 Prest.Seg Social,Nombre 14 Prest.Seg Social,Monto 14 Prest.Seg Social,Nombre 15 Prest.Seg Social,Monto 15 Prest.Seg Social,Préstamos,Becas,Indemnizaciones,Nombre Otro Tipo Incentivo 01,Monto. Otro Tipo Incentivo 01,Nombre Otro Tipo Incentivo 02,Monto. Otro Tipo Incentivo 02,Nombre Otro Tipo Incentivo 03,Monto. Otro Tipo Incentivo 03,Nombre Otro Tipo Incentivo 04,Monto. Otro Tipo Incentivo 04,Nombre Otro Tipo Incentivo05,Monto. Otro Tipo Incentivo 05,Nombre Otro Tipo Incentivo 06,Monto. Otro Tipo Incentivo 06,Nombre Otro Tipo Incentivo 07,Monto. Otro Tipo Incentivo 07,Nombre Otro Tipo Incentivo 08,Monto. Otro Tipo Incentivo 08,Nombre Otro Tipo Incentivo 09,Monto. Otro Tipo Incentivo 09,Nombre Otro Tipo Incentivo 10,Monto. Otro Tipo Incentivo10,Nombre Otro Tipo Incentivo 11,Monto. Otro Tipo Incentivo 11,Nombre Otro Tipo Incentivo 12,Monto. Otro Tipo Incentivo12,Nombre Otro Tipo Incentivo 13,Monto. Otro Tipo Incentivo 13,Nombre Otro Tipo Incentivo 14,Monto. Otro Tipo Incentivo 14,Nombre Otro Tipo Incentivo 15,Monto. Otro Tipo Incentivo 15\");\n } else if (reportePlazaDTO.getOrigen().equalsIgnoreCase(\"f\")) {\n lista = \n super.persistence().get(QueryTdPlazaDAO.class).findBypotFuncion((reportePlazaDTO.getQnaCaptura().substring(0, \n 4)));\n listaString.add(\"Identificador de la Facultad,Fundamento Legal,Documento Registrado,Unidad Administrativa,Nombre de la Unidad Administrativa\");\n } else if (reportePlazaDTO.getOrigen().equalsIgnoreCase(\"s\")) {\n lista = \n super.persistence().get(QueryTdPlazaDAO.class).findBypotEstadistico(qnaCaptura);\n listaString.add(\"NIVEL,G,H,HH,I,J,K,L,M,N,O,Total\");\n }\n\n if (lista != null) {\n for (CustomOutputFile row: lista) {\n listaString.add(row.getRegistro());\n }\n } else\n listaString = null;\n return listaString;\n\n }",
"public static void main(String[] args) {\n Perro perro = new Perro(1, \"Juanito\", \"Frespuder\", 'M');\n Gato gato = new Gato(2, \"Catya\", \"Egipcio\", 'F', true);\n Tortuga paquita = new Tortuga(3, \"Pquita\", \"Terracota\", 'F', 12345857);\n\n SetJuego equipo = new SetJuego(4, \"Gato equipo\", 199900, \"Variado\", \"16*16*60\", 15, \"Gatos\");\n PelotaMorder pelotita = new PelotaMorder(1, \"bola loca\", 15000, \"Azul\", \"60 diam\");\n\n System.out.println(perro.toString());//ToString original de \"mascotas\"\n System.out.println(gato.toString());//ToString sobrescrito\n System.out.println(paquita.toString());\n\n System.out.println(equipo);//ToString sobrescrito (tambien se ejecuta sin especificarlo)\n System.out.println(pelotita.toString());//Original de \"Juguetes\"\n\n //metodos clase mascota\n perro.darCredito();//aplicado de la interface darcredito\n paquita.darDeAlta(\"Terracota\",\"Paquita\");\n equipo.devolucion(4,\"Gato Equipo\");\n\n //vamos a crear un arraylist\n ArrayList<String> servicios = new ArrayList<String>();\n servicios.add(\"Inyectologia\");\n servicios.add(\"Peluqueria\");\n servicios.add(\"Baño\");\n servicios.add(\"Desparacitacion\");\n servicios.add(\"Castracion\");\n\n System.out.println(\"Lista de servicios: \" + servicios + \", con un total de \" + servicios.size());\n\n servicios.remove(3);//removemos el indice 3 \"Desparacitacion\"\n\n System.out.println(\"Se ha removido un servicio..................\");\n System.out.println(\"Lista de servicios: \" + servicios + \", con un total de \" + servicios.size());\n\n\n //creamos un vector\n Vector<String> promociones = new Vector<String>();\n\n promociones.addElement(\"Dia perruno\");\n promociones.addElement(\"Gatutodo\");\n promociones.addElement(\"10% Descuento disfraz de perro\");\n promociones.addElement(\"Jornada de vacunacion\");\n promociones.addElement(\"Serpiente-Promo\");\n\n System.out.println(\"Lista de promos: \" + promociones);\n System.out.println(\"Total de promos: \" + promociones.size());\n\n promociones.remove(4);//removemos 4 \"Serpiente-Promo\"\n System.out.println(\"Se ha removido una promocion..................\");\n\n System.out.println(\"Lista de promos: \" + promociones);\n System.out.println(\"Total de promos: \" + promociones.size());\n\n String[] dias_Semana = {\"Lunes\",\"Martes\",\"Miercoles\",\"Jueves\",\"Viernes\", \"Sabado\",\"Domingo\"};\n\n try{\n System.out.println(\"Elemento 6 de servicios: \" + dias_Semana[8]);\n } catch (ArrayIndexOutOfBoundsException e){\n System.out.println(\"Ey te pasaste del indice, solo hay 5 elementos\");\n } catch (Exception e){\n System.out.println(\"Algo paso, el problema es que no se que...\");\n System.out.println(\"La siguiente linea ayudara a ver el error\");\n e.printStackTrace();//solo para desarrolladores\n }finally {\n System.out.println(\"------------------------El curso termino! Pero sigue el de Intro a Android!!!!--------------------------\");\n }\n\n }",
"public void transcribir() \r\n\t{\r\n\t\tpalabras = new ArrayList<List<CruciCasillas>>();\r\n\t\tmanejadorArchivos = new CruciSerializacion();\r\n\t\tint contador = 0;\r\n\t\t\r\n\t\tmanejadorArchivos.leer(\"src/Archivos/crucigrama.txt\");\r\n\t\t\r\n\t\tfor(int x = 0;x<manejadorArchivos.getPalabras().size();x++){\r\n\t\t\t\r\n\t\t\tcontador++;\r\n\t\t\t\r\n\t\t\tif (contador == 4) {\r\n\t\t\t\r\n\t\t\t\tList<CruciCasillas> generico = new ArrayList<CruciCasillas>();\r\n\t\t\t\t\r\n\t\t\t\tfor(int y = 0; y < manejadorArchivos.getPalabras().get(x).length();y++)\r\n\t\t\t\t{\r\n\t\t\t\t\t\tgenerico.add(new CruciCasillas(manejadorArchivos.getPalabras().get(x).charAt(y)));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (y == (manejadorArchivos.getPalabras().get(x).length() - 1)) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tpalabras.add(generico);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tcontador = 0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t}",
"public void postuler(int p_id,int g_id) throws RemoteException{\r\n\t\t\t\t\t\t\r\n\t\t String requete = \"SELECT p_maxGroup, p_minEtud, p_maxEtud FROM projet WHERE p_id=\"+p_id;\r\n\t\t\tSystem.out.println(\"requete :\" + requete);\r\n\t\t DataSet data = database.executeQuery(requete);\r\n\t\t\t if (!data.hasMoreElements()) {\r\n\t\t\t\t System.out.println(\"Projet id inexistant\");\r\n\t\t\t\t return;\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t int maxGroup = Integer.parseInt(data.getColumnValue(\"p_maxGroup\"));\r\n\t\t\t int minEtud = Integer.parseInt(data.getColumnValue(\"p_minEtud\"));\r\n\t\t\t int maxEtud = Integer.parseInt(data.getColumnValue(\"p_maxEtud\"));\r\n\t\t\t \r\n\t\t\t //recuperation des membres du groupe\r\n\t\t\t int nbMembre = this.getMember(g_id).size();\r\n\t\t\t if(nbMembre>maxEtud || nbMembre < minEtud){\r\n\t\t\t\t System.out.println(\"Vous ne pouvez pas postuler\");\r\n\t\t\t\t return;\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t //Recuparation du nombre de groupe qui ont deja postuler a ce projet\r\n\t\t\t requete = \"SELECT COUNT(a_idgroupe) as nbGroupe FROM association WHERE a_idProjet=\"+p_id;\r\n\t\t\t System.out.println(\"requete :\" + requete);\r\n\t\t\t data = database.executeQuery(requete);\r\n\t\t\t int nbGroupe = 0;\r\n\t\t\t if (data.hasMoreElements()) {\r\n\t\t\t \tnbGroupe = Integer.parseInt(data.getColumnValue(\"nbGroupe\"));\r\n\t\t\t }\r\n\t\t\t if(nbGroupe>maxGroup){\r\n\t\t\t\t System.out.println(\"Vous ne pouvez pas postuler Nbgroupe max atteint\");\r\n\t\t\t\t return;\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t //Creation d'un nouveau groupe\r\n\t\t\t requete = \"INSERT INTO association VALUES (\" + g_id + \", \"+ p_id + \", DEFAULT)\";\r\n\t\t\t System.out.println(\"requete :\" + requete);\r\n\t\t\t database.executeUpdate(requete);\r\n\t\t\t System.out.println(\"Vous avez postuler\");\r\n\t\t\r\n\t\t}",
"public static List<Punto> getPuntos(){\n\t\t\n\t\tList<Punto> puntos = new ArrayList<Punto>();\n\t\ttry{\n\n\t\t\t//-12.045916, -75.195270\n\t\t\t\n\t\t\tPunto p1 = new Punto(1,-12.037512,-75.183327,0.0);\n\t\t\tp1.setDatos(getDatos(\"16/06/2017 09:00:00\", 2 , 1));\n\t\t\t\n\t\t\tPunto p2 = new Punto(2,-12.041961,-75.184786,0.0);\n\t\t\tp2.setDatos(getDatos(\"16/06/2017 09:00:00\",1 , 2));\n\t\t\t\n\t\t\tPunto p3 = new Punto(3,-12.0381,-75.1841,0.0);\n\t\t\tp3.setDatos(getDatos(\"16/06/2017 09:00:00\",2 , 2));\n\t\t\t\n\t\t\tPunto p4 = new Punto(4,-12.041542,-75.185816,0.0);\n\t\t\tp4.setDatos(getDatos(\"16/06/2017 11:00:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p5 = new Punto(5,-12.037764,-75.181096,0.0);\n\t\t\tp5.setDatos(getDatos(\"16/06/2017 11:15:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p6 = new Punto(6,-12.042801,-75.190108,0.0);\n\t\t\tp6.setDatos(getDatos(\"16/06/2017 11:00:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p7 = new Punto(7,-12.04364,-75.184014,0.0);\n\t\t\tp7.setDatos(getDatos(\"16/06/2017 11:00:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p8 = new Punto(8,-12.045739,-75.185387,0.0);\n\t\t\tp8.setDatos(getDatos(\"16/06/2017 11:30:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p9 = new Punto(9,-12.04683,-75.187361,0.0);\n\t\t\tp9.setDatos(getDatos(\"16/06/2017 11:50:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p10 = new Punto(10,-12.050775,-75.187962,0.0);\n\t\t\tp10.setDatos(getDatos(\"16/06/2017 12:30:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p11 = new Punto(11,-12.053797,-75.184271,0.0);\n\t\t\tp11.setDatos(getDatos(\"16/06/2017 13:00:00\",0 , 0));\n\t\t\t\n\t\t\tpuntos.add(p8);\n\t\t\tpuntos.add(p9);\n\t\t\tpuntos.add(p3);\n\t\t\tpuntos.add(p4);\n\t\t\tpuntos.add(p5);\n\t\t\tpuntos.add(p6);\n\t\t\tpuntos.add(p7);\n\t\t\tpuntos.add(p10);\n\t\t\tpuntos.add(p1);\n\t\t\tpuntos.add(p2);\n\t\t\tpuntos.add(p11);\n\t\t\t\n\t\t\t\n\t\t}catch(Exception e ){\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t\treturn puntos;\n\t\n\t}",
"private void cargarFichaLepra_control() {\r\n\r\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\r\n\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\r\n\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\r\n\t\tparameters.put(\"nro_identificacion\", tbxNro_identificacion.getValue());\r\n\r\n\t\tficha_inicio_lepraService.setLimit(\"limit 25 offset 0\");\r\n\r\n\t\t// log.info(\"parameters>>>>\" + parameters);\r\n\t\tBoolean ficha_inicio = ficha_inicio_lepraService\r\n\t\t\t\t.existe_paciente_lepra(parameters);\r\n\t\t// log.info(\"ficha_inicio>>>>\" + ficha_inicio);\r\n\r\n\t\tif (ficha_inicio) {\r\n\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\tadmision_seleccionada);\r\n\t\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\tIRutas_historia.PAGINA_SEGUIMIENTO_TRATAMIENTO_LEPRA,\r\n\t\t\t\t\tIRutas_historia.LABEL_SEGUIMIENTO_TRATAMIENTO_LEPRA,\r\n\t\t\t\t\tparametros);\r\n\t\t}\r\n\t}",
"public void lerDados(String dadosInstituicao)\n {\n if (dadosInstituicao == null)\n {\n //AxellIO.println(\"[Instituicao]: Parametro dadosInstituicao nulo - funcao lerDados(String)\");\n }\n \n else\n {\n MyString dados = new MyString(dadosInstituicao);\n String[] splitedData = dados.split('\\t');\n int cursor = 0;\n \n try\n {\n setCodigo( AxellIO.isSpecificString(splitedData[cursor], 'd') ? AxellIO.getInt(splitedData[cursor++]) : null );\n setNome( !AxellIO.isSpecificString(splitedData[cursor], 'f') ? splitedData[cursor++] : null );\n setSigla( !AxellIO.isSpecificString(splitedData[cursor], 'f') ? splitedData[cursor++] : null );\n setCodigoMantenedora( AxellIO.isSpecificString(splitedData[cursor], 'd') ? AxellIO.getInt(splitedData[cursor++]) : null );\n setMantenedora( !AxellIO.isSpecificString(splitedData[cursor], 'f') ? splitedData[cursor++] : null );\n setCategoria( AxellIO.isSpecificString(splitedData[cursor], 'd') ? AxellIO.getInt(splitedData[cursor++]) : null );\n setOrganizacao( AxellIO.isSpecificString(splitedData[cursor], 'd') ? AxellIO.getInt(splitedData[cursor++]) : null );\n setCodigoMunicipio( AxellIO.isSpecificString(splitedData[cursor], 'd') ? AxellIO.getInt(splitedData[cursor++]) : null );\n setMunicipio( !AxellIO.isSpecificString(splitedData[cursor], 'f') ? splitedData[cursor++] : null );\n setUf( !AxellIO.isSpecificString(splitedData[cursor], 'f') ? splitedData[cursor++] : null );\n setRegiao( !AxellIO.isSpecificString(splitedData[cursor], 'f') ? splitedData[cursor++] : null );\n setTecnico( AxellIO.isSpecificString(splitedData[cursor], 'd') ? AxellIO.getInt(splitedData[cursor++]) : null );\n setPeriodico( AxellIO.isSpecificString(splitedData[cursor], 'd') ? AxellIO.getInt(splitedData[cursor++]) : null );\n setLivro( AxellIO.isSpecificString(splitedData[cursor], 'd') ? AxellIO.getInt(splitedData[cursor++]) : null );\n setReceita( AxellIO.isSpecificString(splitedData[cursor], 'f') ? AxellIO.getDouble(splitedData[cursor++]) : null );\n setTransferencia( AxellIO.isSpecificString(splitedData[cursor], 'f') ? AxellIO.getDouble(splitedData[cursor++]) : null );\n setOutraReceita( AxellIO.isSpecificString(splitedData[cursor], 'f') ? AxellIO.getDouble(splitedData[cursor++]) : null );\n setDespesaDocente( AxellIO.isSpecificString(splitedData[cursor], 'f') ? AxellIO.getDouble(splitedData[cursor++]) : null );\n setDespesaTecnico( AxellIO.isSpecificString(splitedData[cursor], 'f') ? AxellIO.getDouble(splitedData[cursor++]) : null );\n setDespesaEncargo( AxellIO.isSpecificString(splitedData[cursor], 'f') ? AxellIO.getDouble(splitedData[cursor++]) : null );\n setDespesaCusteio( AxellIO.isSpecificString(splitedData[cursor], 'f') ? AxellIO.getDouble(splitedData[cursor++]) : null );\n setDespesaInvestimento( AxellIO.isSpecificString(splitedData[cursor], 'f') ? AxellIO.getDouble(splitedData[cursor++]) : null );\n setDespesaPesquisa( AxellIO.isSpecificString(splitedData[cursor], 'f') ? AxellIO.getDouble(splitedData[cursor++]) : null );\n setDespesaOutras( AxellIO.isSpecificString(splitedData[cursor], 'f') ? AxellIO.getDouble(splitedData[cursor++]) : null );\n }\n\n catch (ArrayIndexOutOfBoundsException exception)\n {\n //AxellIO.println(\"[Instituicao]: Dados da instituicao incompletos - funcao lerDados(String)\");\n }\n \n setDadosInstituicaoTabulado( dados.toString() );\n setDadosInstituicao( concatFields() );\n }\n }",
"private void gerarLaudosProcedimentosCirurgicos(\r\n\t\t\tMpmPrescricaoMedica prescricao, List<MpmLaudo> laudoList) throws ApplicationBusinessException {\r\n\r\n\t\tMap<MpmPrescricaoProcedimento, FatProcedHospInternos> procedimentosMap = this\r\n\t\t\t\t.getConfirmarPrescricaoMedicaRN()\r\n\t\t\t\t.listarProcedimentosCirurgicosGeracaoLaudos(prescricao);\r\n\r\n\t\tMpmLaudo laudo = null;\r\n\r\n\t\tfor (MpmPrescricaoProcedimento procedimento : procedimentosMap.keySet()) {\r\n\r\n\t\t\tlaudo = new MpmLaudo();\r\n\t\t\tlaudo.setDthrInicioValidade(prescricao.getDthrInicio());\r\n\r\n\t\t\tDate dataFimValidade = prescricao.getDthrInicio();\r\n\t\t\tif (procedimento.getDuracaoTratamentoSolicitado() != null) {\r\n\t\t\t\tdataFimValidade = DateUtil.adicionaDias(dataFimValidade,\r\n\t\t\t\t\t\tprocedimento.getDuracaoTratamentoSolicitado()\r\n\t\t\t\t\t\t\t\t.intValue() - 1);\r\n\t\t\t}\r\n\t\t\tlaudo.setDthrFimValidade(dataFimValidade);\r\n\t\t\tlaudo.setDthrFimPrevisao(dataFimValidade);\r\n\r\n\t\t\tlaudo.setJustificativa(procedimento.getJustificativa());\r\n\t\t\tlaudo.setContaDesdobrada(false);\r\n\t\t\tlaudo.setImpresso(false);\r\n\t\t\tlaudo.setDuracaoTratSolicitado(procedimento\r\n\t\t\t\t\t.getDuracaoTratamentoSolicitado());\r\n\t\t\tlaudo.setLaudoManual(false);\r\n\t\t\tlaudo.setAtendimento(prescricao.getAtendimento());\r\n\t\t\tlaudo.setPrescricaoProcedimento(procedimento);\r\n\t\t\tlaudo.setProcedimentoHospitalarInterno(procedimentosMap\r\n\t\t\t\t\t.get(procedimento));\r\n\r\n\t\t\tthis.adicionarLaudoLista(laudoList, laudo);\r\n\r\n\t\t}\r\n\r\n\t}",
"private void calcularOtrosIngresos(Ingreso ingreso)throws Exception{\n\t\tfor(IngresoDetalle ingresoDetalle : ingreso.getListaIngresoDetalle()){\r\n\t\t\tif(ingresoDetalle.getIntPersPersonaGirado().equals(ingreso.getBancoFondo().getIntPersonabancoPk())\r\n\t\t\t&& ingresoDetalle.getBdAjusteDeposito()==null){\r\n\t\t\t\tbdOtrosIngresos = ingresoDetalle.getBdMontoAbono();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n public ComprobanteContable createComprobante(Aerolinea a, Boleto boleto, Cliente cliente, String tipo, NotaDebito nota) throws CRUDException {\n\n ComprobanteContable comprobante = new ComprobanteContable();\n //ComprobanteContablePK pk = new ComprobanteContablePK();\n //pk.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n\n //creamos el concepto\n StringBuilder buff = new StringBuilder();\n\n // DESCRIPCION \n // AEROLINEA/ # Boleto / Pasajero / Rutas\n buff.append(a.getNumero());\n\n buff.append(\"/\");\n\n //numero boleto\n buff.append(\"#\");\n buff.append(boleto.getNumero());\n buff.append(\"/\");\n\n //Pasajero\n buff.append(boleto.getNombrePasajero().toUpperCase());\n\n // Rutas\n buff.append(\"/\");\n buff.append(boleto.getIdRuta1() != null ? boleto.getIdRuta1() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta2() != null ? boleto.getIdRuta2() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta3() != null ? boleto.getIdRuta3() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta4() != null ? boleto.getIdRuta4() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta5() != null ? boleto.getIdRuta5() : \"\");\n\n //jala el nombre cliente\n comprobante.setIdCliente(cliente);\n comprobante.setConcepto(buff.toString());\n comprobante.setFactorCambiario(boleto.getFactorCambiario());\n comprobante.setFecha(boleto.getFechaEmision());\n comprobante.setFechaInsert(boleto.getFechaInsert());\n comprobante.setIdEmpresa(boleto.getIdEmpresa());\n comprobante.setIdUsuarioCreador(boleto.getIdUsuarioCreador());\n comprobante.setTipo(tipo);\n comprobante.setEstado(ComprobanteContable.EMITIDO);\n //comprobante.setComprobanteContablePK(pk);\n\n //ComprobanteContablePK numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n Integer numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n comprobante.setIdNumeroGestion(numero);\n comprobante.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n return comprobante;\n }",
"public void cargaDatosInicialesSoloParaAdicionDeCuenta() throws Exception {\n GestionContableWrapper gestionContableWrapper = parParametricasService.factoryGestionContable();\n gestionContableWrapper.getNormaContable3();\n parAjustesList = parParametricasService.listaTiposDeAjuste(obtieneEnumTipoAjuste(gestionContableWrapper.getNormaContable3()));\n //Obtien Ajuste Fin\n //Activa formulario para automatico modifica \n if (selectedEntidad.getNivel() >= 3) {\n numeroEspaciadorAdicionar = 260;\n }\n\n if (selectedEntidad.getNivel() == 3) {\n swParAutomatico = false;\n numeroEspaciadorAdicionar = 230;\n }\n if (selectedEntidad.getNivel() == 2) {\n swParAutomatico = true;\n swActivaBoton = true;\n numeroEspaciadorAdicionar = 200;\n }\n if (selectedEntidad.getNivel() == 1) {\n swParAutomatico = true;\n numeroEspaciadorAdicionar = 130;\n cntParametroAutomaticoDeNivel2 = cntParametroAutomaticoService.obtieneObjetoDeParametroAutomatico(selectedEntidad);\n }\n\n mascaraNuevoOpcion = \"N\";\n cntEntidad = (CntEntidad) getCntEntidadesService().find(CntEntidad.class, selectedEntidad.getIdEntidad());\n mascaraNivel = getCntEntidadesService().generaCodigoNivelesSubAndPadre(selectedEntidad, \"N\");\n mascaraSubNivel = getCntEntidadesService().generaCodigoNivelesSubAndPadre(selectedEntidad, \"S\");\n longitudNivel = getCntEntidadesService().controlaLongitudNumero(selectedEntidad, \"N\");\n longitudSubNivel = getCntEntidadesService().controlaLongitudNumero(selectedEntidad, \"S\");\n }",
"Object obtenerPolizasPorFolioSolicitudNoCancelada(int folioSolicitud,String formatoSolicitud);",
"@Override\n\tpublic void crearPoblacion() {\n\t\tif(this.terminales == null || this.funciones == null) {\n\t\t\tSystem.out.println(\"Error. Los terminales y las funciones tienen que estar inicializados\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tpoblacion = new ArrayList<>();\n\t\tfor(int i = 0; i < this.numIndividuos; i++) {\n\t\t\tIndividuo ind = new Individuo();\n\t\t\tind.crearIndividuoAleatorio(this.profundidad, this.terminales, this.funciones);\n\t\t\tthis.poblacion.add(ind);\n\t\t}\n\t}",
"private void cargarRegistro() {\n\t\tif (filaId != null) {\n\t\t\tCursor bar = bdHelper.getBar(filaId);\n // Indicamos que queremos controlar el Cursor\n\t\t\tstartManagingCursor(bar);\n\n\t\t\t// Obtenemos el campo categoria\n\t\t\tString categoria = bar.getString(bar.getColumnIndexOrThrow(BaresBDAdapter.CAMPO_CATEGORIA));\n\t\t\t// Seleccionamos la categoría en el Spinner\n\t\t\tfor (int i=0; i<categoriaSpinner.getCount();i++){\n\t\t\t\t// Cargamos una de la opciones del listado desplegable\n\t\t\t\tString s = (String) categoriaSpinner.getItemAtPosition(i);\n\t\t\t\t// Si coindice con la que está en la BD la seleccionamos en el listado desplegable\n\t\t\t\tif (s.equalsIgnoreCase(categoria)){\n\t\t\t\t\tcategoriaSpinner.setSelection(i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Obtenemos el campo relacion calidad-precio\n\t\t\tString relacion = bar.getString(bar.getColumnIndexOrThrow(BaresBDAdapter.CAMPO_RELACION));\n\t\t\t// Seleccionamos en el Spinner la relacion c-p\n\t\t\tfor (int i=0; i<relacionSpinner.getCount();i++){\n\t\t\t\t// Cargamos una de la opciones del listado desplegable\n\t\t\t\tString s = (String) relacionSpinner.getItemAtPosition(i);\n\t\t\t\t// Si coindice con la que está en la BD la seleccionamos en el listado desplegable\n\t\t\t\tif (s.equalsIgnoreCase(relacion)){\n\t\t\t\t\trelacionSpinner.setSelection(i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Obtenemos el campo del acompañante\n\t\t\tString acompanante = bar.getString(bar.getColumnIndexOrThrow(BaresBDAdapter.CAMPO_ACOMPANANTE));\n\t\t\t// Seleccionamos el formato en el Spinner\n\t\t\tfor (int i=0; i<acompananteSpinner.getCount();i++){\n\t\t\t\t// Cargamos una de la opciones del listado desplegable\n\t\t\t\tString s = (String) acompananteSpinner.getItemAtPosition(i);\n\t\t\t\t// Si coindice con la que está en la BD la seleccionamos en el listado desplegable\n\t\t\t\tif (s.equalsIgnoreCase(acompanante)){\n\t\t\t\t\tacompananteSpinner.setSelection(i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Rellenamos las Vistas\n\t\t\tnombreText.setText(bar.getString(bar.getColumnIndexOrThrow(BaresBDAdapter.CAMPO_NOMBRE)));\n\t\t\tdireccionText.setText(bar.getString(bar.getColumnIndexOrThrow(BaresBDAdapter.CAMPO_DIRECCION)));\n\t\t\tnotasText.setText(bar.getString(bar.getColumnIndexOrThrow(BaresBDAdapter.CAMPO_NOTAS)));\n\t\t\tprecioText.setText(bar.getString(bar.getColumnIndexOrThrow(BaresBDAdapter.CAMPO_PRECIO)));\n\t\t\tvaloracionRB.setRating(bar.getFloat(bar.getColumnIndexOrThrow(BaresBDAdapter.CAMPO_VALORACION)));\n\n // Tratamos las fechas del registro\n\t\t\tlong fecha = bar.getLong(bar.getColumnIndexOrThrow(BaresBDAdapter.CAMPO_FEC_ULT_VIS));\n\t\t\tprimeraFecha.setTimeInMillis(fecha);\n\t\t\tfecha = bar.getLong(bar.getColumnIndexOrThrow(BaresBDAdapter.CAMPO_FEC_PRI_VIS));\n\t\t\tif (fecha>0) {\n\t\t\t\tultimaFecha=Calendar.getInstance();\n\t\t\t\tultimaFecha.setTimeInMillis(fecha);\n\t\t\t}\n\t\t\t// Dejamos de controlar el cursor de la BD\n\t\t\tstopManagingCursor(bar);\n\t\t}\n\t}",
"public List<Listas_de_las_Solicitudes> Mostrar_las_peticiones_que_han_llegado_al_Usuario_Administrador(int cedula) {\n\t\t//paso3: Obtener el listado de peticiones realizadas por el usuario\n\t\tEntityManagerFactory entitymanagerfactory = Persistence.createEntityManagerFactory(\"LeyTransparencia\");\n\t\tEntityManager entitymanager = entitymanagerfactory.createEntityManager();\n\t\tentitymanager.getEntityManagerFactory().getCache().evictAll();\n\t\tQuery consulta4=entitymanager.createQuery(\"SELECT g FROM Gestionador g WHERE g.cedulaGestionador =\"+cedula);\n\t\tGestionador Gestionador=(Gestionador) consulta4.getSingleResult();\n\t\t//paso4: Obtener por peticion la id, fecha y el estado\n\t\tList<Peticion> peticion=Gestionador.getEmpresa().getPeticions();\n\t\tList<Listas_de_las_Solicitudes> peticion2 = new ArrayList();\n\t\t//paso5: buscar el area de cada peticion\n\t\tfor(int i=0;i<peticion.size();i++){\n\t\t\tString almcena=\"\";\n\t\t\tString sarea=\"no posee\";\n\t\t\tBufferedReader in;\n\t\t\ttry{\n\t\t\t\tin = new BufferedReader(new InputStreamReader(new FileInputStream(\"C:/area/area\"+String.valueOf(peticion.get(i).getIdPeticion())+\".txt\"), \"utf-8\"));\n\t\t\t\ttry {\n\t\t\t\t\twhile((sarea=in.readLine())!=null){\n\t\t\t\t\t\tint s=0;\n\t\t\t\t\t\talmcena=sarea;\n\t\t\t\t\t}\n\t\t\t\t\tin.close();\n\t\t\t\t\tSystem.out.println(almcena);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\t//paso6: Mostrar un listado de peticiones observando el id, la fecha de realizacion de la peticion, hora de realizacion de la peticion, y el estado actual de la peticion\n\t\t\tListas_de_las_Solicitudes agregar=new Listas_de_las_Solicitudes();\n\t\t\tagregar.setId(String.valueOf(peticion.get(i).getIdPeticion()));\n\t\t\tagregar.setFechaPeticion(peticion.get(i).getFechaPeticion());\n\t\t\tagregar.setNombreestado(peticion.get(i).getEstado().getTipoEstado());\n\t\t\tagregar.setArea(almcena);\n\t\t\tpeticion2.add(agregar);\n\t\t\t\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"el usuario existe\");\n\t\treturn peticion2;\n\t\t//aun no se\n\t}",
"public static void main(String[] args) {\n\t\tScanner lectorInt = new Scanner(System.in);\n\t\tScanner lectorString = new Scanner(System.in);\n\t\tSystem.out.println(\"Ingrese información de pasajero\");\n\t\tSystem.out.println(\"Ingrese nombre: \");\n\t\tString nombre = lectorString.nextLine();\n\t\tSystem.out.println(\"Ingrese apellido: \");\n\t\tString apellido = lectorString.nextLine();\n\t\tSystem.out.println(\"Ingrese edad: \");\n\t\tint edad = lectorInt.nextInt();\n\t\tSystem.out.println(\"Que tipo de pasajero es: 1:Pasajero Vip 2:Pasajero Económico \");\n\t\tint opcion = lectorInt.nextInt();\n\t\tString membresia = \"\";\n\t\tString descuento = \"\";\n\t\tif (opcion == 1) {\n\t\t\tSystem.out.println(\"Ingrese Código de Membresía\");\n\t\t\tmembresia = lectorString.nextLine();\n\n\t\t} else {\n\t\t\tSystem.out.println(\"Ingrese Código de Descuento\");\n\t\t\tdescuento = lectorString.nextLine();\n\t\t}\n\n\t\tPasajeroVip pasajero1 = new PasajeroVip();\n\t\tpasajero1.setNombre(nombre);\n\t\tpasajero1.setApellido(apellido);\n\t\tpasajero1.setCodigoMembresia(membresia);\n\t\tpasajero1.setEdad(edad);\n\n\t\tPasajeroVip pasajero2 = new PasajeroVip(\"Juan\", \"Tandre\", \"as2345\", 23);\n\n\t\tPasajeroEconomico pasajeroEconomico1 = new PasajeroEconomico();\n\t\tpasajeroEconomico1.setNombre(\"Helena\");\n\t\tpasajeroEconomico1.setApellido(\"Frias\");\n\t\tpasajeroEconomico1.setCodigoDescuento(\"1234df\");\n\t\tpasajeroEconomico1.setEdad(25);\n\n\t\tPasajero[][] asientos = new Pasajero[4][5];\n\t\tasientos[0][0] = pasajero1;\n\t\tasientos[0][1] = pasajero2;\n\t\tasientos[0][2] = pasajero1;\n\t\tasientos[0][3] = pasajeroEconomico1;\n\t\tasientos[1][0] = pasajero1;\n\t\tasientos[1][1] = pasajeroEconomico1;\n\n\t\tint opcionSalir = 0;\n\t\tdo {\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"Ingrese datos del asiento, 0:continuar, -1:SALIR\");\n\t\t\topcionSalir = lectorInt.nextInt();\n\t\t\tif (opcionSalir == 0) {\n\t\t\t\tSystem.out.print(\"Ingrese fila del asiento: \");\n\t\t\t\tint fila = lectorInt.nextInt();\n\t\t\t\tSystem.out.print(\"Ingrese columna del asiento: \");\n\t\t\t\tint columna = lectorInt.nextInt();\n\t\t\t\tSystem.out.println(\"Los datos del pasajero son: \");\n\t\t\t\tSystem.out.println(asientos[fila][columna]);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Va ha salir del sistema\");\n\t\t\t}\n\t\t} while (opcionSalir != -1);\n\n\t}",
"private void setUpGroupBy(){\n\t\tEPPropiedad pro = new EPPropiedad();\n\t\tpro.setNombre(\"a1.p2\");\n\t\tpro.setPseudonombre(\"\");\n\t\texpresionesGroupBy.add(pro);\n\t\tpro = new EPPropiedad();\n\t\tpro.setNombre(\"a1.p3\");\n\t\tpro.setPseudonombre(\"\");\n\t\texpresionesGroupBy.add(pro);\n\t}",
"public static void main(String args[]){\n int x = 10;\r\n List<Perro> perros = new ArrayList();\r\n \r\n Perro perro=new Perro();\r\n \r\n Persona persona = new Persona();\r\n persona.setAltura(5.5);\r\n persona.setColorPiel(\"Blanca\");\r\n persona.setEdad(16);\r\n persona.setGenero('f');\r\n persona.setNacionalidad(\"Japonesa\");\r\n persona.setPeso(130);\r\n persona.setTipoDePelo(\"Lacio\"); \r\n persona.setOcupacion(\"Dinero\");\r\n \r\n //Se dan todas las características\r\n perro.setNombre(\"Manuel\");\r\n perro.setColor(\"Negro\");\r\n perro.setTamano(10.2);\r\n perro.setRaza(\"Golden\");\r\n perro.setTipoDePelo(\"Crespo\");\r\n perro.setAdoptado(false);\r\n perro.setGenero('H');\r\n \r\n perros.add(perro);//Se añade a la instancia\r\n \r\n perro = new Perro();//Se limpia y se vuelve a llamar la instancia\r\n perro.setNombre(\"Igor\");\r\n perro.setColor(\"Negro\");\r\n perro.setTamano(10.2);\r\n perro.setRaza(\"Golden\");\r\n perro.setTipoDePelo(\"Lacio\");\r\n perro.setAdoptado(false);\r\n perro.setGenero('H');\r\n \r\n perros.add(perro);\r\n \r\n perro = new Perro();\r\n perro.setNombre(\"Luli\");\r\n perro.setColor(\"Negro\");\r\n perro.setTamano(10.2);\r\n perro.setRaza(\"Siberiano\");\r\n perro.setTipoDePelo(\"Crespo\");\r\n perro.setAdoptado(false);\r\n perro.setGenero('H');\r\n \r\n perros.add(perro);\r\n //****************CUANDO EJECUTES ESTO VE COMENTADO LOS BLOQUES QUE NO QUIERES QUE SE USEN*************\r\n //foreach y for hace la misma funcion\r\n //Uso de for\r\n for (Perro perro1:perros){\r\n System.out.println(perro1.getNombre());\r\n System.out.println(perro1.getColor());\r\n System.out.println(perro1.getTamano());\r\n System.out.println(perro1.getRaza());\r\n System.out.println(perro1.getTipoDePelo());\r\n }\r\n \r\n //Formas de uso del for each\r\n perros.forEach(perro1->\r\n System.out.println(perro1.getNombre()));\r\n \r\n perros.forEach(perro1 ->{//Se define una variable que es perro1 y esta recorrera toda la lista\r\n System.out.println(perro1.getNombre());\r\n System.out.println(perro1.getColor());\r\n System.out.println(perro1.getTamano());\r\n System.out.println(perro1.getRaza());\r\n System.out.println(perro1.getTipoDePelo()); \r\n System.out.println();\r\n \r\n });\r\n \r\n \r\n System.out.println(\"Blanco\".equals(perro.color)? \"Si es blanco\":\"No es blanco\");\r\n \r\n //Uso del if\r\n if (((4/2==0)&&(10/5 !=0))||(100/20==0)){\r\n System.out.println(\"Es bisiesto\");\r\n }else{\r\n System.out.println(\"No es bisiesto\");\r\n }\r\n \r\n //Uso del switcH\r\n switch(x){\r\n case 6:\r\n System.out.println(\"Es verdadero\");\r\n break;\r\n case 2:\r\n System.out.println(\"Es falso\");\r\n break;\r\n default:\r\n System.out.println(\"No es ninguna\");\r\n \r\n //Uso de la lista de un item en especifico \r\n System.out.println(\"Nombre: \" + perros.get(2).getNombre());//El número del get\r\n System.out.println(\"Color: \"+perros.get(2).getColor());//define que item es que tomará\r\n System.out.println(\"Raza: \"+perros.get(2).getRaza());\r\n \r\n \r\n //Demostración del uso de getters\r\n System.out.println(\"Nombre: \");\r\n System.out.println(\"Altura: \" + persona.getAltura());\r\n System.out.println(\"Color: \" + persona.getColorPiel());\r\n System.out.println(\"Edad: \"+persona.getEdad());\r\n System.out.println(\"Genero: \"+persona.getGenero());\r\n System.out.println(\"Nacionalidad: \"+persona.getNacionalidad());\r\n System.out.println(\"Peso: \"+persona.getPeso());\r\n System.out.println(\"Tipo de Pelo: \"+persona.getTipoDePelo());\r\n \r\n }\r\n \r\n}",
"private void mostraPesquisa(List<BeansLivro> livros) {\n // Limpa a tabela sempre que for solicitado uma nova pesquisa\n limparTabela();\n \n if (livros.isEmpty()) {\n JOptionPane.showMessageDialog(rootPane, \"Nenhum registro encontrado.\");\n } else { \n // Linha em branco usada no for, para cada registro é criada uma nova linha \n String[] linha = new String[] {null, null, null, null, null, null, null};\n // P/ cada registro é criada uma nova linha, cada linha recebe os campos do registro\n for (int i = 0; i < livros.size(); i++) {\n tmLivro.addRow(linha);\n tmLivro.setValueAt(livros.get(i).getId(), i, 0);\n tmLivro.setValueAt(livros.get(i).getExemplar(), i, 1);\n tmLivro.setValueAt(livros.get(i).getAutor(), i, 2);\n tmLivro.setValueAt(livros.get(i).getEdicao(), i, 3);\n tmLivro.setValueAt(livros.get(i).getAno(), i, 4);\n tmLivro.setValueAt(livros.get(i).getDisponibilidade(), i, 5); \n } \n }\n }",
"private void cargarFichaLepra_convivientes() {\r\n\r\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\r\n\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\r\n\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\r\n\t\tparameters.put(\"nro_identificacion\", tbxNro_identificacion.getValue());\r\n\t\tparameters.put(\"fecha_actual\", new Date());\r\n\r\n\t\t// log.info(\"parameters\" + parameters);\r\n\t\tseguimiento_control_pqtService.setLimit(\"limit 25 offset 0\");\r\n\r\n\t\t// log.info(\"parameters>>>>\" + parameters);\r\n\t\tBoolean fecha_tratamiento = seguimiento_control_pqtService\r\n\t\t\t\t.existe_fecha_fin_tratamiento(parameters);\r\n\t\t// log.info(\"fecha_tratamiento>>>>\" + fecha_tratamiento);\r\n\r\n\t\tif (fecha_tratamiento) {\r\n\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\tadmision_seleccionada);\r\n\t\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\tIRutas_historia.PAGINA_CONTROL_CONVIVIENTES_LEPRA,\r\n\t\t\t\t\tIRutas_historia.LABEL_CONTROL_CONVIVIENTES_LEPRA,\r\n\t\t\t\t\tparametros);\r\n\t\t}\r\n\t}",
"public static List<Command> sacarABalonParado(GameSituations gs) {\n\t\tLinkedList<Command> comandos = new LinkedList<Command>();\n\t\t\n\t\tint rematan[] = gs.canKick();\n\t\tif(rematan.length > 0) {\n\t\t\t// para el saque de puerta, saca al centro del campo, con un angulo d 45� para evitar rivales\n\t\t\tif(gs.ballPosition().equals(HBConstants.POSICION_SAQUE_PUERTA_IZDA) || gs.ballPosition().equals(HBConstants.POSICION_SAQUE_PUERTA_DCHA)) {\n\t\t\t\tcomandos.add(new CommandHitBall(rematan[0], Constants.centroCampoJuego, HBConstants.FUERZA_GOLPEO_MAXIMA, HBConstants.ANGULO_GOLPEO_DESPEJE));\n\t\t\t}\n\t\t\t// para el saque de centro, saca al centro del campo propio\n\t\t\telse if(gs.ballPosition().equals(Constants.centroCampoJuego)) { \n\t\t\t\tcomandos.add(new CommandHitBall(rematan[0], HBConstants.POSICION_CENTRO_CAMPO_PROPIO, HBConstants.FUERZA_GOLPEO_MEDIA, HBConstants.ANGULO_GOLPEO_PASE));\n\t\t\t}\n\t\t\t// para el saque de corner, saca al punto de penalty\n\t\t\telse if(gs.ballPosition().equals(Constants.cornerSupIzq) || gs.ballPosition().equals(Constants.cornerSupDer)) { \n\t\t\t\tcomandos.add(new CommandHitBall(rematan[0], Constants.penalSup, HBConstants.FUERZA_GOLPEO_MAXIMA, HBConstants.ANGULO_GOLPEO_CUELGUE));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tList<Command> comandosDePase = PaseAlHuecoSimulado.pasar(gs, rematan[0]);\n\t\t\t\tif(comandosDePase != null)\n\t\t\t\t\tcomandos.addAll(comandosDePase);\n\t\t\t\telse\n\t\t\t\t\tcomandos.add(new CommandHitBall(rematan[0], Constants.penalSup, HBConstants.FUERZA_GOLPEO_MAXIMA, false));\n\t\t\t}\n\t\t}\n\t\treturn comandos;\n\t}",
"public void buscarDatos() throws Exception {\r\n\t\ttry {\r\n\t\t\tString codigo_empresa = empresa.getCodigo_empresa();\r\n\t\t\tString codigo_sucursal = sucursal.getCodigo_sucursal();\r\n\t\t\tString parameter = lbxParameter.getSelectedItem().getValue()\r\n\t\t\t\t\t.toString();\r\n\t\t\tString value = tbxValue.getValue().toUpperCase().trim();\r\n\r\n\t\t\tMap<String, Object> parameters = new HashMap();\r\n\t\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\r\n\t\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\r\n\t\t\tparameters.put(\"parameter\", parameter);\r\n\t\t\tparameters.put(\"value\", \"%\" + value + \"%\");\r\n\r\n\t\t\tgetServiceLocator().getHis_partoService().setLimit(\r\n\t\t\t\t\t\"limit 25 offset 0\");\r\n\r\n\t\t\tList<His_parto> lista_datos = getServiceLocator()\r\n\t\t\t\t\t.getHis_partoService().listar(parameters);\r\n\t\t\trowsResultado.getChildren().clear();\r\n\r\n\t\t\tfor (His_parto his_parto : lista_datos) {\r\n\t\t\t\trowsResultado.appendChild(crearFilas(his_parto, this));\r\n\t\t\t}\r\n\r\n\t\t\tgridResultado.setVisible(true);\r\n\t\t\tgridResultado.setMold(\"paging\");\r\n\t\t\tgridResultado.setPageSize(20);\r\n\r\n\t\t\tgridResultado.applyProperties();\r\n\t\t\tgridResultado.invalidate();\r\n\t\t\tgridResultado.setVisible(true);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t\tMessagebox.show(e.getMessage(), \"Mensaje de Error !!\",\r\n\t\t\t\t\tMessagebox.OK, Messagebox.ERROR);\r\n\t\t}\r\n\t}",
"public void comprarCasasEHoteis(int idPropriedade) throws Exception {\n\n this.terminarAVez();\n\n if (this.build == true) {\n\n if (this.hipotecaAtiva && this.tabuleiro.getLugarById(idPropriedade).estaHipotecada()) {\n if(verificaSeTodosOsGruposTemHipoteca(listaJogadores.get(jogadorAtual())))\n throw new Exception(\"Unavailable command\");\n throw new Exception(\"Can't build on mortgaged properties\");\n }\n \n if (idPropriedade <= 0 || idPropriedade > 40) {\n throw new Exception(\"Place doesn't exist\");\n\n }\n if (!this.tabuleiro.getLugarById(idPropriedade).isPropriedade()) {\n throw new Exception(\"Can only build on properties\");\n\n }\n \n\n if (!this.tabuleiro.verificaSeGrupoAindaPodeTerConstrucoes(idPropriedade)) {\n this.listaJogadores.get(jogadorAtual()).getComandos().remove(\"build\");\n }\n\n \n if (this.listaJogadores.get(jogadorAtual()).getComandos().contains(\"build\")) {\n\n if (!this.listaJogadores.get(jogadorAtual()).getPropriedades().contains(this.tabuleiro.getLugarById(idPropriedade).getNome())) {\n throw new Exception(\"Player is not the owner of this property\");\n\n } else if (this.listaJogadores.get(jogadorAtual()).getPropriedades().contains(this.tabuleiro.getLugarById(idPropriedade).getNome()) && !this.listaJogadores.get(jogadorAtual()).verificaSeTemGrupo(idPropriedade)) {\n throw new Exception(\"Doesn't hold monopoly for this group\");\n }\n //Procedimento para compra de casas e hoteis\n if (this.tabuleiro.verificaSePodeConstruirNoTerreno(idPropriedade) == true) {\n if (hipotecaAtiva) {\n verificaSeGrupoTemHipoteca(idPropriedade);\n \n }\n RealizarProtocoloDeCompraDeCasasEHoteis(idPropriedade);\n if(hipotecaAtiva && !verificaSeTemLugarSemConstrucao(listaJogadores.get(jogadorAtual())))\n listaJogadores.get(jogadorAtual()).removerComandoMortgage();\n\n\n } else {\n throw new Exception(\"Uneven distribution of houses\");\n }\n\n\n } else {\n\n throw new Exception(\"Unavailable command\");\n\n\n }\n } else {\n throw new Exception(\"Build nao esta ativo\");\n }\n }",
"public void buscarComprobantesEntreFechas(){\n listaComprobantes = this.getEjbFacadeComprobantes().buscarEntreFechasConEstadoSinRendicionExterna(desde,hasta);\n \n System.out.println(\"listaComprobantes cantidad >> \" + listaComprobantes.size());\n }",
"public HashMap<String, String> cargarValoresParametrosGeneralesPlantillasGrupos(){\n\t\tHashMap<String, String> valoresParametros = new HashMap<String, String>();\n//\t\ttry {\n\t\n//\t\tString cargofirmantepr =parametrosGeneralesService.getParametroGeneralByCodigo(\"CARPR\").getValor();\n//\t\tString nombrefirmantepr =parametrosGeneralesService.getParametroGeneralByCodigo(\"NOMBPR\").getValor();\n//\t\tString cargofirmanteresol =parametrosGeneralesService.getParametroGeneralByCodigo(\"CARRESOL\").getValor();\n//\t\tString nombrefirmanteresol =parametrosGeneralesService.getParametroGeneralByCodigo(\"NOMBRESOL\").getValor();\n//\t\tvaloresParametros.put(\"CARPR\", cargofirmantepr);\n//\t\tvaloresParametros.put(\"NOMBPR\", nombrefirmantepr);\n//\t\tvaloresParametros.put(\"CARRESOL\", cargofirmanteresol);\n//\t\tvaloresParametros.put(\"NOMBRESOL\", nombrefirmanteresol);\n//\t\t} catch (PersistenciaException e) {\n//\t\t\t// TODO Auto-generated catch block\n//\t\t\te.printStackTrace();\n//\t\t}\n\t\t\n\t\treturn valoresParametros;\n\t}",
"private void inizia() throws Exception {\n this.setAllineamento(Layout.ALLINEA_CENTRO);\n this.creaBordo(\"Coperti serviti\");\n\n campoPranzo=CampoFactory.intero(\"a pranzo\");\n campoPranzo.setLarghezza(60);\n campoPranzo.setModificabile(false);\n campoCena=CampoFactory.intero(\"a cena\");\n campoCena.setLarghezza(60);\n campoCena.setModificabile(false);\n campoTotale=CampoFactory.intero(\"Totale\");\n campoTotale.setLarghezza(60); \n campoTotale.setModificabile(false);\n\n this.add(campoPranzo);\n this.add(campoCena);\n this.add(campoTotale);\n }",
"public void cargarEpicrisis() {\r\n\t\tif (admision_seleccionada != null\r\n\t\t\t\t&& admision_seleccionada.getAtendida()) {\r\n\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\tadmision_seleccionada);\r\n\t\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\tIRutas_historia.PAGINA_HC_EPICRISIS,\r\n\t\t\t\t\tIRutas_historia.LABEL_HC_EPICRISIS, parametros);\r\n\t\t}\r\n\r\n\t}",
"public GrupoBodegaLogic()throws SQLException,Exception {\r\n\t\tsuper();\r\n\t\t\r\n\t\ttry\t{\t\t\t\t\t\t\r\n\t\t\tthis.grupobodegaDataAccess = new GrupoBodegaDataAccess();\r\n\t\t\t\r\n\t\t\tthis.grupobodegas= new ArrayList<GrupoBodega>();\r\n\t\t\tthis.grupobodega= new GrupoBodega();\r\n\t\t\t\r\n\t\t\tthis.grupobodegaObject=new Object();\r\n\t\t\tthis.grupobodegasObject=new ArrayList<Object>();\r\n\t\t\t\t\r\n\t\t\t/*\r\n\t\t\tthis.connexion=new Connexion();\r\n\t\t\tthis.datosCliente=new DatosCliente();\r\n\t\t\tthis.arrDatoGeneral= new ArrayList<DatoGeneral>();\r\n\t\t\t\r\n\t\t\t//INICIALIZA PARAMETROS CONEXION\r\n\t\t\tthis.connexionType=Constantes.CONNEXIONTYPE;\r\n\t\t\tthis.parameterDbType=Constantes.PARAMETERDBTYPE;\r\n\t\t\t\r\n\t\t\tif(Constantes.CONNEXIONTYPE.equals(ConnexionType.HIBERNATE)) {\r\n\t\t\t\tthis.entityManagerFactory=ConstantesCommon.JPAENTITYMANAGERFACTORY;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.datosDeep=new DatosDeep();\r\n\t\t\tthis.isConDeep=false;\r\n\t\t\t*/\r\n\t\t\t\r\n\t\t\tthis.grupobodegaDataAccess.setConnexionType(this.connexionType);\r\n\t\t\tthis.grupobodegaDataAccess.setParameterDbType(this.parameterDbType);\r\n\t\t\t\r\n\t\t\t\r\n\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tthis.invalidValues=new InvalidValue[0];\r\n\t\t\tthis.stringBuilder=new StringBuilder();\r\n\t\t\tthis.conMostrarMensajesStringBuilder=true;\r\n\t\t\t\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t \r\n }",
"@Override\n public ComprobanteContable createComprobante(\n Aerolinea a, Boleto boleto, Cliente cliente, String tipo) throws CRUDException {\n Optional op;\n ComprobanteContable comprobante = new ComprobanteContable();\n //ComprobanteContablePK pk = new ComprobanteContablePK();\n //pk.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n comprobante.setEstado(ComprobanteContable.EMITIDO);\n //comprobante.setComprobanteContablePK(pk);\n //creamos el concepto\n StringBuilder buff = new StringBuilder();\n\n // DESCRIPCION \n // AEROLINEA/ # Boleto / Pasajero / Rutas\n buff.append(a.getNumero());\n\n buff.append(\"/\");\n\n //numero boleto\n buff.append(\"#\");\n buff.append(boleto.getNumero());\n buff.append(\"/\");\n\n //Pasajero\n buff.append(boleto.getNombrePasajero().toUpperCase());\n\n // Rutas\n buff.append(\"/\");\n buff.append(boleto.getIdRuta1() != null ? boleto.getIdRuta1() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta2() != null ? boleto.getIdRuta2() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta3() != null ? boleto.getIdRuta3() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta4() != null ? boleto.getIdRuta4() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta5() != null ? boleto.getIdRuta5() : \"\");\n\n //jala el nombre cliente\n comprobante.setIdCliente(cliente);\n comprobante.setConcepto(buff.toString());\n comprobante.setFactorCambiario(boleto.getFactorCambiario());\n comprobante.setFecha(boleto.getFechaEmision());\n comprobante.setFechaInsert(boleto.getFechaInsert());\n comprobante.setIdEmpresa(boleto.getIdEmpresa());\n comprobante.setIdUsuarioCreador(boleto.getIdUsuarioCreador());\n comprobante.setTipo(tipo);\n\n //ComprobanteContablePK numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n Integer numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n comprobante.setIdNumeroGestion(numero);\n comprobante.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n\n return comprobante;\n }",
"private void cargarRemisiones() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\tparametros.put(\"nro_ingreso\", admision_seleccionada.getNro_ingreso());\r\n\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\tparametros.put(\"tipo_hc\", \"\");\r\n\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE, admision_seleccionada);\r\n\r\n\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\tIRutas_historia.PAGINA_REMISIONES, \"REMISIONES\", parametros);\r\n\t}",
"public Map<String,Object> generaParametrosRegistroContador (NdtContadorPublicoAutDTO ndtContadorPublicoAutDTO) throws RuntimeException {\r\n\t\tfinal Map<String, Object> iReportParameter = new HashMap<String, Object>();\r\n\t\t\r\n\t\tparametrosLayout(iReportParameter);\r\n\t\t\r\n\t\ttry {\r\n\t\t\tif (ndtContadorPublicoAutDTO != null) {\r\n\t\t\t\tiReportParameter.put(\"fecha\", UtileriaFechas.parseDateToString(new Date(), \"dd/MM/yyyy\"));\r\n\t\t\t\tiReportParameter.put(\"numTramiteNotaria\", ndtContadorPublicoAutDTO.getListNdtCpaTramites() != null ? \r\n\t\t\t\t\t\tndtContadorPublicoAutDTO.getListNdtCpaTramites().get(0) != null ? \r\n\t\t\t\t\t\tndtContadorPublicoAutDTO.getListNdtCpaTramites().get(0).getNumTramiteNotaria() != null ? \r\n\t\t\t\t\t\tndtContadorPublicoAutDTO.getListNdtCpaTramites().get(0).getNumTramiteNotaria() : \"\" : \"\" : \"\");\r\n\t\t\t\tiReportParameter.put(\"nombreCompleto\", ndtContadorPublicoAutDTO.getUsuarioSesion() != null ? \r\n\t\t\t\t\t\tndtContadorPublicoAutDTO.getUsuarioSesion().getNombreCompleto() != null ? \r\n\t\t\t\t\t\tndtContadorPublicoAutDTO.getUsuarioSesion().getNombreCompleto() : \"\" : \"\");\r\n\t\t\t\tiReportParameter.put(\"RFC\", ndtContadorPublicoAutDTO.getUsuarioSesion() != null ? \r\n\t\t\t\t\t\tndtContadorPublicoAutDTO.getUsuarioSesion().getRfc() != null ? \r\n\t\t\t\t\t\tndtContadorPublicoAutDTO.getUsuarioSesion().getRfc() : \"\" : \"\");\r\n\t\t\t\tiReportParameter.put(\"CURP\", ndtContadorPublicoAutDTO.getUsuarioSesion() != null ? \r\n\t\t\t\t\t\tndtContadorPublicoAutDTO.getUsuarioSesion().getCurp() != null ? \r\n\t\t\t\t\t\tndtContadorPublicoAutDTO.getUsuarioSesion().getCurp() : \"\" : \"\");\r\n\t\t\t\tStringBuilder domicilioFiscal = null;\r\n\t\t\t\tif (ndtContadorPublicoAutDTO.getPersonaFiscal() != null && ndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal() != null) {\r\n\t\t\t\t\tdomicilioFiscal = new StringBuilder();\r\n\t\t\t\t\tdomicilioFiscal.append(ndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getCalle() != null ? \r\n\t\t\t\t\t\t\tndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getCalle() +\" \" : \"\");\r\n\t\t\t\t\tdomicilioFiscal.append(ndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getNumExterior1() != null ? \r\n\t\t\t\t\t\t\tndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getNumExterior1() +\"\" : \"\");\r\n\t\t\t\t\tdomicilioFiscal.append(ndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getNumExteriorAlf() != null ? \r\n\t\t\t\t\t\t\tndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getNumExteriorAlf() +\" \" : \"\");\r\n\t\t\t\t\tdomicilioFiscal.append(ndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getNumInterior() != null ? \r\n\t\t\t\t\t\t\tndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getNumInterior() +\" \" : \"\");\r\n\t\t\t\t\tdomicilioFiscal.append(ndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getNumInteriorAlf() != null ? \r\n\t\t\t\t\t\t\tndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getNumInteriorAlf() +\" \" : \"\");\r\n\t\t\t\t\tif (ndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getAsentamiento() != null) {\r\n\t\t\t\t\t\tif (ndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getAsentamiento().getLocalidad() != null && \r\n\t\t\t\t\t\t\t\tndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getAsentamiento().getLocalidad().getMunicipio() != null && \r\n\t\t\t\t\t\t\t\tndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getAsentamiento().getLocalidad().getMunicipio().getEntidadFederativa() != null) {\r\n\t\t\t\t\t\t\tdomicilioFiscal.append(ndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getAsentamiento().getLocalidad().getMunicipio().getEntidadFederativa().getNombre() != null ?\r\n\t\t\t\t\t\t\t\t\tndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getAsentamiento().getLocalidad().getMunicipio().getEntidadFederativa().getNombre() +\" \" : \"\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (ndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getAsentamiento().getLocalidad() != null && \r\n\t\t\t\t\t\t\t\tndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getAsentamiento().getLocalidad().getMunicipio() != null) {\r\n\t\t\t\t\t\t\tdomicilioFiscal.append(ndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getAsentamiento().getLocalidad().getMunicipio().getNombre() != null ?\r\n\t\t\t\t\t\t\t\t\tndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getAsentamiento().getLocalidad().getMunicipio().getNombre() +\" \" : \"\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdomicilioFiscal.append(ndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getAsentamiento().getNombre() != null ? \r\n\t\t\t\t\t\t\t\tndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getAsentamiento().getNombre() +\" \" : \"\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (ndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getCodigoPostal() != null) {\r\n\t\t\t\t\t\tdomicilioFiscal.append(ndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getCodigoPostal().getCodigoPostal() != null ?\r\n\t\t\t\t\t\t\t\tndtContadorPublicoAutDTO.getPersonaFiscal().getDomicilioFiscal().getCodigoPostal().getCodigoPostal() : \"\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tiReportParameter.put(\"domicilioFiscal\", domicilioFiscal.toString() != null ? domicilioFiscal.toString() : \"\");\r\n\t\t\t\t\r\n\t\t\t\tString numeroCedula = \"\";\r\n\t\t\t\tif (ndtContadorPublicoAutDTO.getListNdtR1DatosPersonales() != null && !ndtContadorPublicoAutDTO.getListNdtR1DatosPersonales().isEmpty()) {\r\n\t\t\t\t\tnumeroCedula = ndtContadorPublicoAutDTO.getListNdtR1DatosPersonales().get(0).getCedulaProfesional();\r\n\t\t\t\t\tif (numeroCedula == null) {\r\n\t\t\t\t\t\tnumeroCedula = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tiReportParameter.put(\"numeroCedulaProfesional\", numeroCedula);\r\n\t\t\t\tiReportParameter.put(\"razonSocialDespacho\", ndtContadorPublicoAutDTO.getNdtDespachosDTO() != null ? \r\n\t\t\t\t\t\tndtContadorPublicoAutDTO.getNdtDespachosDTO().getRazonSocial() != null ? \r\n\t\t\t\t\t\tndtContadorPublicoAutDTO.getNdtDespachosDTO().getRazonSocial() : \"\" : \"\");\r\n\t\t\t\tiReportParameter.put(\"razonSocialColegio\", ndtContadorPublicoAutDTO.getNdtColegioDTO() != null ? \r\n\t\t\t\t\t\tndtContadorPublicoAutDTO.getNdtColegioDTO().getRazonSocial() != null ? \r\n\t\t\t\t\t\tndtContadorPublicoAutDTO.getNdtColegioDTO().getRazonSocial() : \"\" : \"\");\r\n\t\t\t\tString tipoCurp = \"\";\r\n\t\t\t\tif (ndtContadorPublicoAutDTO.getUsuarioSesion() != null && ndtContadorPublicoAutDTO.getUsuarioSesion().getCurp() != null) {\r\n\t\t\t\t\ttipoCurp = ndtContadorPublicoAutDTO.getUsuarioSesion().getCurp().substring(12, 13);\r\n\t\t\t\t\tif (tipoCurp != \"NE\") {\r\n\t\t\t\t\t\ttipoCurp = \"Mexicana\";\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\ttipoCurp = \"Extranjera\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tiReportParameter.put(\"nacionalidad\", tipoCurp);\r\n\t\t\t\tiReportParameter.put(\"cadenaOriginal\", ndtContadorPublicoAutDTO.getCadenaOriginal() != null ? \r\n\t\t\t\t\t\tndtContadorPublicoAutDTO.getCadenaOriginal() : \"\");\r\n\t\t\t\tString selloDigitalIMSS = \"\";\r\n\t\t\t\tif (ndtContadorPublicoAutDTO.getListNdtCpaTramites() != null && !ndtContadorPublicoAutDTO.getListNdtCpaTramites().isEmpty()) {\r\n\t\t\t\t\tselloDigitalIMSS = ndtContadorPublicoAutDTO.getListNdtCpaTramites().get(0).getSelloDigitalImss();\r\n\t\t\t\t\tif (selloDigitalIMSS == null) {\r\n\t\t\t\t\t\tselloDigitalIMSS = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tiReportParameter.put(\"selloDigitalIMSS\", selloDigitalIMSS);\r\n\t\t\t}\r\n\t\t} catch (Exception ex) {\r\n\t\t\tlogger.error(\"ERROR: al generar los par\\u00e1metros preliminares del reporte de solicitud de registro de un contador publico.\", ex);\r\n\t\t\tthrow new RuntimeException(\"ERROR: al generar los par\\u00e1metros preliminares del reporte de solicitud de registro de un contador publico.\", ex);\r\n\t\t}\r\n\t\treturn iReportParameter;\r\n\t}",
"private void cargarFichaLepra_inicio() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\tparametros.put(\"nro_ingreso\", admision_seleccionada.getNro_ingreso());\r\n\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE, admision_seleccionada);\r\n\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\tIRutas_historia.PAGINA_INICIO_TRATAMIENTO_LEPRA,\r\n\t\t\t\tIRutas_historia.LABEL_INICIO_TRATAMIENTO_LEPRA, parametros);\r\n\t}",
"public void repartirGananciasDealer() {\n\t\t if(contieneJugador(ganador,\"dealer\")) {\n\t\t\t if(verificarJugadaBJ(manosJugadores.get(3))) {\n\t\t\t\t System.out.println(\"Pareja nombre agregado dealer\");\n\t\t\t\t int cantidadGanancia = verificarCantidadGanadores() + 15;\n\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(\"dealer\", cantidadGanancia));\n\t\t\t }else {\n\t\t\t\t System.out.println(\"Pareja nombre agregado --> dealer\");\n\t\t\t\t int cantidadGanancia = verificarCantidadGanadores()+10;\n\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(\"dealer\",cantidadGanancia));\n\t\t\t }\n\t\t }else {\n\t\t\t int cantidadGanancia = verificarCantidadGanadores();\n\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(\"dealer\",cantidadGanancia));\n\t\t }\n\t\t \n\t }",
"public void adicionarServicos() {\n int i;\n if (hospedesCadastrados.isEmpty()) {\n System.err.println(\"Não existem hospedes cadastrados!\\n\");\n } else {\n\n System.err.println(\"Digite o cpf do hospede que deseja adicionar servicos:\");\n listarHospedes();\n int cpf = verifica();\n for (i = 0; i < hospedesCadastrados.size(); i++) {\n if (hospedesCadastrados.get(i).getCpf() == cpf) {//pega o indice i do objeo pessoa, pega o id da pessoa e compara com o id da pessoa digitada\n if (hospedesCadastrados.get(i).getContrato().isSituacao()) {//verifica se a situaçao do contrato ainda está aberta para esse hospede\n\n System.err.println(\"O que deseja editar do contrato\\n\");\n //adicionar carro, trocar de quarto, adicionar conta de restaurante,\n //encerrar contrato\n\n System.err.println(\"Adicionar carro (1):\\nAdicionar restaurante (2):\\n\"\n + \"Adicionar horas de BabySitter (3):\\nAdicionar quarto(4):\\n\");\n int caso = verifica();\n switch (caso) {\n case 1://carro\n if (carrosCadastrados.isEmpty()) {\n System.err.println(\"Nao existem carros cadastrados!\\n\");\n } else {\n listarCarros();\n System.err.println(\"Digite o id do carro que deseja contratar:\\n\");\n int idCarro = verifica();\n\n for (int j = 0; j < carrosCadastrados.size(); j++) {\n if (carrosCadastrados.get(j).getId() == idCarro) {\n if (carrosCadastrados.get(j).isEstado()) {\n System.err.println(\"Esse carro já está cadastrado.\\n\");\n } else {\n hospedesCadastrados.get(i).getContrato().setCarros(carrosCadastrados.get(j));\n carrosCadastrados.get(j).setEstado(true);\n }\n }\n }\n }\n break;\n\n case 2://restaurante\n System.err.println(\"Digite o quanto deseja gastar no restaurente\\n\");\n double valorRestaurante = ler.nextDouble();\n// idd();\n// int idRestaurante = id;\n// Restaurante restaurante = new Restaurante(idRestaurante, valorRestaurante);\n hospedesCadastrados.get(i).getContrato().setValorRestaurante(valorRestaurante);\n break;\n case 3://babysitter\n System.err.println(\"Digite o tempo gasto no BabySytter em horas\\n\");\n double tempoBaby = ler.nextDouble();\n hospedesCadastrados.get(i).getContrato().setHorasBaby(tempoBaby);\n break;\n case 4://quartos\n\n if (quartosCadastrados.isEmpty()) {\n\n } else {\n System.err.println(\"Digite o numero do quarto que deseja contratar:\\n\");\n listarQuartos();\n int num = verifica();\n System.err.println(\"Digite a quantidade de dis que pretente alugar o quarto:\\n\");\n int dias = verifica();\n for (int j = 0; j < quartosCadastrados.size(); j++) {\n if (num == quartosCadastrados.get(j).getNumero()) {//verifica se o numero digitado é igual ao numero do quarto do laco\n if (quartosCadastrados.get(j).getEstado()) {//verifica se o estado do quarto está como true\n System.err.println(\"Este quarto já está cadastrado em um contrato\");\n } else {//se o estado tiver em true é porque o quarto ja está cadastrado\n\n hospedesCadastrados.get(i).getContrato().setQuartos(quartosCadastrados.get(j));\n hospedesCadastrados.get(i).getContrato().getQuartosCadastrados().get(j).setDias(dias);\n hospedesCadastrados.get(i).getContrato().getQuartosCadastrados().get(j).setEstado(true);//seta o estado do quarto como ocupado\n System.err.println(\"Quarto cadastrado!\\n\");\n }\n\n }\n\n }\n\n//remove all remove todas as pessoas com tal nome\t\n }\n break;\n\n }\n } else {\n System.err.println(\"O contrato deste Hospede encontra-se encerrado\");\n break;\n }\n }\n }\n }\n }",
"private void populateFields() {\n pedidos = pdao.listaTodos();\n cCliente = new HashSet();\n cEstado = new HashSet();\n cCidade = new HashSet();\n cFornecedor = new HashSet();\n\n for (int i = 0; i < pedidos.size(); i++) {\n cCliente.add(pedidos.get(i).getCliente().getNome());\n cEstado.add(pedidos.get(i).getCliente().getEstado());\n cCidade.add(pedidos.get(i).getCliente().getCidade());\n for (int j = 0; j < pedidos.get(i).getItens().size(); j++) {\n cFornecedor.add(pedidos.get(i).getItens().get(j).getProduto().getFornecedor().getNome());\n }\n }\n\n clientes = new ArrayList<>(cCliente);\n fornecedores = new ArrayList<>(cFornecedor);\n\n Iterator i = cCliente.iterator();\n while (i.hasNext()) {\n jCBCliente.addItem(i.next());\n }\n\n i = null;\n i = cEstado.iterator();\n while (i.hasNext()) {\n jCBEstado.addItem(i.next());\n }\n\n i = null;\n i = cCidade.iterator();\n while (i.hasNext()) {\n jCBCidade.addItem(i.next());\n }\n i = null;\n i = cFornecedor.iterator();\n while (i.hasNext()) {\n jCBFornecedor.addItem(i.next());\n }\n\n }",
"public void abrir(String name, String rfc, Double sueldo, Double aguinaldo2,// Ya esta hecho es el vizualizador\r\n\t\t\tDouble primav2, Double myH2, Double gF, Double sGMM2, Double hip, Double donat, Double subR,\r\n\t\t\tDouble transp, String NivelE, Double colegiatura2) {\r\n\t\tthis.nombre=name;//\r\n\t\tthis.RFC=rfc;//\r\n\t\tthis.SueldoM=sueldo;//\r\n\t\tthis.Aguinaldo=aguinaldo2;//\r\n\t\tthis.PrimaV=primav2;//\r\n\t\tthis.MyH=myH2;//\r\n\t\tthis.GatsosFun=gF;//\r\n\t\tthis.SGMM=sGMM2;//\r\n\t\tthis.Hipotecarios=hip;//\r\n\t\tthis.Donativos=donat;//\r\n\t\tthis.SubRetiro=subR;//\r\n\t\tthis.TransporteE=transp;//\r\n\t\tthis.NivelE=NivelE;//\r\n\t\tthis.Colegiatura=colegiatura2;//\r\n\t\t\r\n\t\tthis.calculo(this.nombre, this.RFC, this.SueldoM, this.Aguinaldo, this.PrimaV,this.MyH,this.GatsosFun,\r\n\t\t\t\tthis.SGMM,this.Hipotecarios,this.Donativos,this.SubRetiro,this.TransporteE,this.NivelE,this.Colegiatura);\r\n\t\t\r\n\t\tpr.Imprimir(this.nombre, this.RFC, this.SueldoM,this.IngresoA,this.Aguinaldo,this.PrimaV,this.MyH,this.GatsosFun,this.SGMM,this.Hipotecarios,this.Donativos,this.SubRetiro,this.TransporteE,this.NivelE,this.Colegiatura,this.AguinaldoE,this.AguinaldoG,this.PrimaVE,this.PrimaVG,this.TotalIngresosG,this.MaxDedColeg,this.TotalDedNoRetiro,this.DedPerm,this.MontoISR,this.CuotaFija,this.PorcExced,this.PagoEx,this.Total);\r\n\t\t\r\n\t}",
"public void buscarDatos() throws Exception {\n\t\ttry {\n\t\t\tString parameter = lbxParameter.getSelectedItem().getValue()\n\t\t\t\t\t.toString();\n\t\t\tString value = tbxValue.getValue().toUpperCase().trim();\n\n\t\t\tMap<String, Object> parameters = new HashMap<String, Object>();\n\t\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\n\t\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\n\n\t\t\tif (parameter.equalsIgnoreCase(\"fecha_inicial\")) {\n\t\t\t\tparameters.put(\"fecha_string\", value);\n\t\t\t} else {\n\t\t\t\tparameters.put(\"parameter\", parameter);\n\t\t\t\tparameters.put(\"value\", \"%\" + value + \"%\");\n\t\t\t}\n\t\t\tif (admision != null) {\n\t\t\t\tparameters.put(\"identificacion\",\n\t\t\t\t\t\tadmision.getNro_identificacion());\n\t\t\t}\n\n\t\t\tgetServiceLocator().getFicha_epidemiologia_nnService().setLimit(\n\t\t\t\t\t\"limit 25 offset 0\");\n\n\t\t\tList<Ficha_epidemiologia_n3> lista_datos = getServiceLocator()\n\t\t\t\t\t.getFicha_epidemiologia_nnService().listar(\n\t\t\t\t\t\t\tFicha_epidemiologia_n3.class, parameters);\n\t\t\trowsResultado.getChildren().clear();\n\n\t\t\tfor (Ficha_epidemiologia_n3 ficha_epidemiologia_n3 : lista_datos) {\n\t\t\t\trowsResultado.appendChild(crearFilas(\n\t\t\t\t\t\tficha_epidemiologia_n3, this));\n\t\t\t}\n\n\t\t\tgridResultado.setVisible(true);\n\t\t\tgridResultado.setMold(\"paging\");\n\t\t\tgridResultado.setPageSize(20);\n\n\t\t\tgridResultado.applyProperties();\n\t\t\tgridResultado.invalidate();\n\n\t\t} catch (Exception e) {\n\t\t\tMensajesUtil.mensajeError(e, \"\", this);\n\t\t}\n\t}",
"public void cadastrar(Jogo j, EstatisticasGenero g, EstatisticasPlataforma p) {\n\t\tboolean plataforma = plataforma();\n\t\tif(validar() == true)\n\t\t\tif(plataforma == true) {\n\t\t\t\tDados.arrayJogos.add(j);\n\t\t\t\tcadastrarEstatisticaGenero(g.getGeneroJogo());\n\t\t\t\tcadastrarEstatisticaPlataforma(p.getPlataformaJogo());\n\t\t\t}\n\t}",
"public void buscarDatos() throws Exception {\n\t\ttry {\n\t\t\tString parameter = lbxParameter.getSelectedItem().getValue()\n\t\t\t\t\t.toString();\n\t\t\tString value = tbxValue.getValue().toUpperCase().trim();\n\n\t\t\tMap<String, Object> parameters = new HashMap<String, Object>();\n\t\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\n\t\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\n\n\t\t\tif (admision != null) {\n\t\t\t\tparameters.put(\"identificacion\",\n\t\t\t\t\t\tadmision.getNro_identificacion());\n\t\t\t}\n\n\t\t\tif (parameter.equalsIgnoreCase(\"fecha_inicial\")) {\n\t\t\t\tparameters.put(\"fecha_string\", value);\n\t\t\t} else {\n\t\t\t\tparameters.put(\"parameter\", parameter);\n\t\t\t\tparameters.put(\"value\", \"%\" + value + \"%\");\n\t\t\t}\n\n\t\t\tgetServiceLocator().getHisc_urgencia_odontologicoService()\n\t\t\t\t\t.setLimit(\"limit 25 offset 0\");\n\n\t\t\tList<Hisc_urgencia_odontologico> lista_datos = getServiceLocator()\n\t\t\t\t\t.getHisc_urgencia_odontologicoService().listar(parameters);\n\t\t\trowsResultado.getChildren().clear();\n\n\t\t\tfor (Hisc_urgencia_odontologico hisc_urgencia_odontologico : lista_datos) {\n\t\t\t\trowsResultado.appendChild(crearFilas(\n\t\t\t\t\t\thisc_urgencia_odontologico, this));\n\t\t\t}\n\n\t\t\tgridResultado.setVisible(true);\n\t\t\tgridResultado.setMold(\"paging\");\n\t\t\tgridResultado.setPageSize(20);\n\n\t\t\tgridResultado.applyProperties();\n\t\t\tgridResultado.invalidate();\n\n\t\t} catch (Exception e) {\n\t\t\tMensajesUtil.mensajeError(e, \"\", this);\n\t\t}\n\t}",
"private AtualizarContaPreFaturadaHelper parserRegistroTipo3(String linha) {\r\n\t\tAtualizarContaPreFaturadaHelper retorno = new AtualizarContaPreFaturadaHelper();\r\n\r\n\t\tInteger index = 0;\r\n\r\n\t\t// Tipo de registro\r\n\t\tretorno.tipoRegistro = linha.substring(index, index + REGISTRO_TIPO);\r\n\t\tindex += REGISTRO_TIPO;\r\n\r\n\t\t// Matricula do imovel\r\n\t\tretorno.matriculaImovel = linha.substring(index, index\r\n\t\t\t\t+ MATRICULA_IMOVEL);\r\n\t\tindex += MATRICULA_IMOVEL;\r\n\r\n\t\t// Codigo da Categoria\r\n\t\tretorno.codigoCategoria = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_3_CODIGO_CATEGORIA);\r\n\t\tindex += REGISTRO_TIPO_3_CODIGO_CATEGORIA;\r\n\r\n\t\t// Codigo da Subcategoria\r\n\t\tretorno.codigoSubCategoria = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_3_CODIGO_SUBCATEGORIA);\r\n\t\tindex += REGISTRO_TIPO_3_CODIGO_SUBCATEGORIA;\r\n\r\n\t\t// Consumo faturado de agua\r\n\t\tretorno.consumoFaturadoAguaFaixa = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_3_CONSUMO_FATURADO_AGUA_FAIXA);\r\n\t\tindex += REGISTRO_TIPO_3_CONSUMO_FATURADO_AGUA_FAIXA;\r\n\r\n\t\t// Valor tarifa minima de agua\r\n\t\tretorno.valorFaturadoAguaFaixa = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_3_VALOR_FATURADO_AGUA_FAIXA);\r\n\t\tindex += REGISTRO_TIPO_3_VALOR_FATURADO_AGUA_FAIXA;\r\n\r\n\t\t// Limite Inicial do Consumo na Faixa\r\n\t\tretorno.limiteInicialConsumoFaixa = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_3_LIMITE_INICIAL_CONSUMO_FAIXA);\r\n\t\tindex += REGISTRO_TIPO_3_LIMITE_INICIAL_CONSUMO_FAIXA;\r\n\r\n\t\t// Limite Final do consumo na Faixa\r\n\t\tretorno.limiteFinalConsumoFaixa = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_3_LIMITE_FINAL_CONSUMO_FAIXA);\r\n\t\tindex += REGISTRO_TIPO_3_LIMITE_FINAL_CONSUMO_FAIXA;\r\n\r\n\t\t// Valor da Tarifa Agua na Faixa\r\n\t\tretorno.valorTarifaAguaFaixa = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_3_VALOR_TARIFA_AGUA_FAIXA);\r\n\t\tindex += REGISTRO_TIPO_3_VALOR_TARIFA_AGUA_FAIXA;\r\n\r\n\t\t// Valor da Tarifa Esgoto na Faixa\r\n\t\tretorno.valorTarifaEsgotoFaixa = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_3_VALOR_TARIFA_ESGOTO_FAIXA);\r\n\t\tindex += REGISTRO_TIPO_3_VALOR_TARIFA_ESGOTO_FAIXA;\r\n\r\n\t\t// Consumo faturado de esgoto\r\n\t\tretorno.consumoFaturadoEsgotoFaixa = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_3_CONSUMO_FATURADO_ESGOTO_FAIXA);\r\n\t\tindex += REGISTRO_TIPO_3_CONSUMO_FATURADO_ESGOTO_FAIXA;\r\n\r\n\t\t// Valor tarifa minima de agua\r\n\t\tretorno.valorFaturadoEsgotoFaixa = linha.substring(index, index\r\n\t\t\t\t+ REGISTRO_TIPO_3_VALOR_FATURADO_ESGOTO_FAIXA);\r\n\t\tindex += REGISTRO_TIPO_3_VALOR_FATURADO_ESGOTO_FAIXA;\r\n\r\n\t\treturn retorno;\r\n\t}",
"public ArrayList<String> Info_Disc_Pel_Compras(String genero) {\r\n ArrayList<String> Lista_nombre = Info_Disco_Pel_Rep4(genero);\r\n ArrayList<String> Lista_datos_compras = new ArrayList();\r\n String line;\r\n try (BufferedReader br = new BufferedReader(new FileReader(\"src/Archivos/Compra_Peliculas.txt\"))) {\r\n while ((line = br.readLine()) != null) {\r\n String[] info_disco_compra = line.split(\";\");\r\n for (int s = 0; s < Lista_nombre.size(); s++) {\r\n if (Lista_nombre.get(s).equals(info_disco_compra[3])) {\r\n Lista_datos_compras.add(info_disco_compra[3]);\r\n Lista_datos_compras.add(info_disco_compra[5]);\r\n }\r\n }\r\n }\r\n } catch (IOException ex) {\r\n System.out.println(ex);\r\n }\r\n return Lista_datos_compras;\r\n }",
"private void criaBlocos() {\n\t\tif (fase == 1) {\n\t\t\tfor (int i = 0; i < blocoArray; i++) {\n\t\t\t\tint x = (i % 10) * 25 + 2;\n\t\t\t\t\n\t\t\t\tlinhaUm[i] = new Bloco(Color.GRAY);\n\t\t\t\tlinhaUm[i].setPosition(new Point(x, 27));\n\t\t\t\tlinhaDois[i] = new Bloco(Color.RED);\n\t\t\t\tlinhaDois[i].setPosition(new Point(x, 36));\n\t\t\t\tlinhaTres[i] = new Bloco(Color.BLUE);\n\t\t\t\tlinhaTres[i].setPosition(new Point(x, 45));\n\t\t\t\tlinhaQuatro[i] = new Bloco(Color.YELLOW);\n\t\t\t\tlinhaQuatro[i].setPosition(new Point(x, 54));\n\t\t\t\tlinhaCinco[i] = new Bloco(Color.MAGENTA);\n\t\t\t\tlinhaCinco[i].setPosition(new Point(x, 63));\n\t\t\t\tlinhaSeis[i] = new Bloco(Color.GREEN);\n\t\t\t\tlinhaSeis[i].setPosition(new Point(x, 72));\n\n\t\t\t}\n\t\t} else if (fase == 2) {\n\t\t\tint y = 8;\n\t\t\tfor (int i = 0; i < blocoArray; i++) {\n\t\t\t\ty += 9;\n\t\t\t\t\n\t\t\t\tlinhaUm[i] = new Bloco(Color.GRAY);\n\t\t\t\tlinhaUm[i].setPosition(new Point(2, y));\n\t\t\t\tlinhaDois[i] = new Bloco(Color.RED);\n\t\t\t\tlinhaDois[i].setPosition(new Point(46, y));\n\t\t\t\tlinhaTres[i] = new Bloco(Color.BLUE);\n\t\t\t\tlinhaTres[i].setPosition(new Point(92, y));\n\t\t\t\tlinhaQuatro[i] = new Bloco(Color.YELLOW);\n\t\t\t\tlinhaQuatro[i].setPosition(new Point(138, y));\n\t\t\t\tlinhaCinco[i] = new Bloco(Color.MAGENTA);\n\t\t\t\tlinhaCinco[i].setPosition(new Point(184, y));\n\t\t\t\tlinhaSeis[i] = new Bloco(Color.GREEN);\n\t\t\t\tlinhaSeis[i].setPosition(new Point(230, y));\n\t\t\t}\n\t\t}else{\n\t\t\tint contFalPon = 0;\n\t\t\tfor (int i = 0; i < blocoArray; i++) {\n\t\t\t\tint x = (i % 10) * 25 + 2;\n\t\t\t\t\n\t\t\t\tlinhaUm[i] = new Bloco(Color.RED);\n\t\t\t\tif(i >= 2 && i <= 7){\n\t\t\t\t\tlinhaUm[i].setPosition(new Point(x, 20));\n\t\t\t\t}else{linhaUm[i].naoDesenha(); contFalPon++;}\n\t\t\t\t\n\t\t\t\tlinhaDois[i] = new Bloco(Color.RED);\n\t\t\t\tif(i >= 2 && i <= 7){\n\t\t\t\t\tlinhaDois[i].setPosition(new Point(x, 29));\n\t\t\t\t}else{linhaDois[i].naoDesenha(); contFalPon++;}\n\t\t\t\t\n\t\t\t\tif(i == 3 || i == 6){\n\t\t\t\t\tlinhaTres[i] = new Bloco(Color.BLACK);\n\t\t\t\t}else{linhaTres[i] = new Bloco(Color.RED);}\n\t\t\t\tif(i >= 1 && i <= 8){\n\t\t\t\t\tlinhaTres[i].setPosition(new Point(x, 38));\n\t\t\t\t}else{linhaTres[i].naoDesenha(); contFalPon++;}\n\t\t\t\t\n\t\t\t\tif(i == 3 || i == 6){\n\t\t\t\t\tlinhaQuatro[i] = new Bloco(Color.BLACK);\n\t\t\t\t}else{linhaQuatro[i] = new Bloco(Color.RED);}\n\t\t\t\tif(i >= 1 && i <= 8){\n\t\t\t\t\tlinhaQuatro[i].setPosition(new Point(x, 47));\n\t\t\t\t}else{linhaQuatro[i].naoDesenha(); contFalPon++;}\n\t\t\t\t\n\t\t\t\tlinhaCinco[i] = new Bloco(Color.RED);\n\t\t\t\tlinhaCinco[i].setPosition(new Point(x, 56));\n\t\t\t\tlinhaSeis[i] = new Bloco(Color.RED);\n\t\t\t\tlinhaSeis[i].setPosition(new Point(x, 65));\n\n\t\t\t}\n\t\t\tmudaFase -= contFalPon * 100;\n\t\t}//fecha else para formar a fase 3\n\n\t}",
"public void buscarMarcacion(){\n\t\t\n \tif(!FuncionesFechas.validaFecha(fCargaI, fCargaF))\n \t{\t\n \t\tlistaMarcacion=null;\n \t\tlistaMarcacionPDF=null;\n \t\treturn ;}\n \tMarcacionDespatch marcacionDespatch=new MarcacionDespatch();\n\t\ttry {\n\t\t\t//listaMarcacion=marcacionDespatch.getMarcacionesPorCodigo(PGP_Usuario.getV_codpersonal());\n\t\t\t/*for(int i=0;i<listaMarcacion.size();i++)\n\t\t\t{\n\t\t\t\tif(listaMarcacion.get(i).getdFecha().after(fCargaI) && listaMarcacion.get(i).getdFecha().before(fCargaF)){\n\t\t\t\t\tSystem.out.println(\"Entroo\\nLista [\"+(i+1)+\"]:\"+listaMarcacion.get(i).getdFecha());\n\t\t\t\t}\n\t\t\t}*/\n\t\t\t\n\t\t\tlistaMarcacion=marcacionDespatch.getMarcacionesPorCodigoFecha(PGP_Usuario.getV_codpersonal(),fCargaI,fCargaF);//\"44436285\"\n\t\t\tMap parametros = new HashMap();\t\t\t\n\t\t\tparametros.put(\"PARAM_NRODOC\", PGP_Usuario.getV_codpersonal());\n\t\t\tparametros.put(\"PARAM_STR_FI\", FuncionesFechas.getFormatDateDDMMYYYY(fCargaI));\n\t\t\tparametros.put(\"PARAM_STR_FF\", FuncionesFechas.getFormatDateDDMMYYYY(fCargaF));\n\t\t\tlistaMarcacionPDF=marcacionDespatch.reporteMisMarcaciones(parametros);\n\t\t} catch (Exception e) {\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n }",
"public String agrupar() throws ParametroIncorrectoException, NoAgrupableException, CeldaEnemigaException, NoTransitablebleException, FueraDeMapaException {\n if(this.getEdificio() != null){\n throw new NoAgrupableException(\"Dentro de un edificio no se puede agrupar\");\n }\n if (this.getPersonajes().size() <= 1) {\n throw new NoAgrupableException(\"No hay personajes suficientes para agrupar\");\n }\n // Crea e inicializa el grupo\n Grupo grupo = new Grupo();\n grupo.inicializaNombre(Juego.getCivilizacionActiva());\n Juego.getCivilizacionActiva().anhadeGrupo(grupo);\n return agrupar(grupo);\n }",
"public void buscarEstudiante(String codEstudiante){\n estudianteModificar=new Estudiante();\n estudianteGradoModificar=new EstudianteGrado();\n StringBuilder query=new StringBuilder();\n query.append(\"select e.idestudiante,e.nombre,e.apellido,e.ci,e.cod_est,e.idgrado,e.idcurso,g.grado,c.nombre_curso \" );\n query.append(\" from estudiante e \");\n query.append(\" inner join grado g on e.idgrado=g.idgrado \");\n query.append(\" inner join cursos c on e.idcurso=c.idcurso \");\n query.append(\" where idestudiante=? \");\n try {\n PreparedStatement pst=connection.prepareStatement(query.toString());\n pst.setInt(1, Integer.parseInt(codEstudiante));\n ResultSet resultado=pst.executeQuery();\n //utilizamos una condicion porque la busqueda nos devuelve 1 registro\n if(resultado.next()){\n //cargando la informacion a nuestro objeto categoriaModificarde tipo categoria\n estudianteModificar.setCodEstudiante(resultado.getInt(1));\n estudianteModificar.setNomEstudiante(resultado.getString(2));\n estudianteModificar.setApEstudiante(resultado.getString(3));\n estudianteModificar.setCiEstudiante(resultado.getInt(4));\n estudianteModificar.setCodigoEstudiante(resultado.getString(5));\n estudianteModificar.setIdgradoEstudiante(resultado.getInt(6));\n estudianteModificar.setIdCursoEstudiante(resultado.getInt(7));\n estudianteGradoModificar.setNomGrado(resultado.getString(8));\n estudianteGradoModificar.setNomCurso(resultado.getString(9));\n }\n } catch (SQLException e) {\n System.out.println(\"Error de conexion\");\n e.printStackTrace();\n }\n }",
"public List<FaturamentoVO> validaSelecionaSinistros(String ano, int tipo) {\n\t\tDecimalFormat roundForm = new DecimalFormat(\"0.00\");\n\n\t\tDecimalFormat percentForm = new DecimalFormat(\"0%\");\n\n\t\tUteis uteis = new Uteis();\n\t\tString anoAnterior = Integer.toString((Integer.parseInt(uteis.cortaRetornaAno(ano)) - 1));\n\n\t\tList<FaturamentoVO> listaTratada = new ArrayList<FaturamentoVO>();\n\n\t\tList<FaturamentoVO> listaAnoParam = dadosFaturamentoDetalhado;\n\t\tList<FaturamentoVO> listaAnoAnterior = dadosFaturamentoDetalhadoAnoAnterior;\n\n\t\tString quantidadeTextoBancoDados = \"\";\n\t\tString quantidadeTextoApresentacao = \"\";\n\t\tString valorTextoBancoDados = \"\";\n\t\tString valorTextoApresentacao = \"\";\n\n\t\tswitch (tipo) {\n\t\tcase 1: // AVISADO\n\t\t\tquantidadeTextoBancoDados = \"QT SINISTROS AVISADOS\";\n\t\t\tquantidadeTextoApresentacao = \" Quantidade \";\n\t\t\tvalorTextoBancoDados = \"SINISTROS AVISADOS\";\n\t\t\tvalorTextoApresentacao = \"Valor\";\n\t\t\tbreak;\n\t\tcase 2: // INDENIZADO\n\t\t\tquantidadeTextoBancoDados = \"QT SINISTROS INDENIZADOS\";\n\t\t\tquantidadeTextoApresentacao = \" Quantidade \";\n\t\t\tvalorTextoBancoDados = \"SINISTROS INDENIZADOS\";\n\t\t\tvalorTextoApresentacao = \"Valor\";\n\t\t\tbreak;\n\t\tcase 3: // PENDENTE\n\t\t\tquantidadeTextoBancoDados = \"QT SINISTROS PENDENTES\";\n\t\t\tquantidadeTextoApresentacao = \" Quantidade \";\n\t\t\tvalorTextoBancoDados = \"SINISTROS PENDENTES\";\n\t\t\tvalorTextoApresentacao = \"Valor\";\n\t\t\tbreak;\n\t\tcase 4: // DESPESA\n\t\t\tquantidadeTextoBancoDados = \"QT SINISTROS - DESPESAS\";\n\t\t\tquantidadeTextoApresentacao = \" Quantidade \";\n\t\t\tvalorTextoBancoDados = \"SINISTROS - DESPESAS\";\n\t\t\tvalorTextoApresentacao = \"Valor\";\n\t\t\tbreak;\n\n\t\t}\n\n\t\tfor (int i = 0; i < listaAnoParam.size(); i++) {\n\t\t\tif (listaAnoParam.get(i).getProduto().equals(quantidadeTextoBancoDados)) {\n\n\t\t\t\tFaturamentoVO sinistroVOtratado = new FaturamentoVO();\n\t\t\t\tString mesesTratado[] = new String[13];\n\n\t\t\t\tsinistroVOtratado.setAno(uteis.cortaRetornaAno(ano));\n\t\t\t\tsinistroVOtratado.setProduto(quantidadeTextoApresentacao);\n\n\t\t\t\tint somaTotal = 0;\n\t\t\t\tfor (int k = 0; k <= 12; k++) {\n\n\t\t\t\t\tif (k != 12) {\n\t\t\t\t\t\tsomaTotal += Integer.parseInt(listaAnoParam.get(i).getMeses()[k]);\n\n\t\t\t\t\t\tmesesTratado[k] = uteis.insereSeparadores(listaAnoParam.get(i).getMeses()[k]);\n\n\t\t\t\t\t} else { // total\n\n\t\t\t\t\t\tmesesTratado[k] = uteis.insereSeparadores(String.valueOf(somaTotal));\n\n\t\t\t\t\t}\n\t\t\t\t\tsinistroVOtratado.setMeses(mesesTratado);\n\t\t\t\t}\n\t\t\t\tlistaTratada.add(sinistroVOtratado);\n\n\t\t\t} else if (listaAnoParam.get(i).getProduto().equals(valorTextoBancoDados)) {\n\n\t\t\t\tFaturamentoVO faturamentoVOtratado = new FaturamentoVO();\n\t\t\t\tString mesesTratado[] = new String[13];\n\n\t\t\t\tfaturamentoVOtratado.setAno(uteis.cortaRetornaAno(ano));\n\t\t\t\tfaturamentoVOtratado.setProduto(valorTextoApresentacao);\n\n\t\t\t\tdouble somaTotal = 0.0;\n\t\t\t\tfor (int k = 0; k <= 12; k++) {\n\n\t\t\t\t\tif (k != 12) {\n\n\t\t\t\t\t\tsomaTotal += Double.parseDouble(listaAnoParam.get(i).getMeses()[k]);\n\n\t\t\t\t\t\tString tratada = roundForm.format(Double.parseDouble(listaAnoParam.get(i).getMeses()[k]));\n\n\t\t\t\t\t\tmesesTratado[k] = uteis.insereSeparadores(tratada);\n\n\t\t\t\t\t} else { // total\n\n\t\t\t\t\t\tString tratada = roundForm.format(somaTotal);\n\n\t\t\t\t\t\tmesesTratado[k] = uteis.insereSeparadores(tratada);\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfaturamentoVOtratado.setMeses(mesesTratado);\n\t\t\t\t}\n\t\t\t\tlistaTratada.add(faturamentoVOtratado);\n\n\t\t\t}\n\t\t} // for anoParam\n\n\t\tfor (int i = 0; i < listaAnoAnterior.size(); i++) {\n\t\t\tif (listaAnoAnterior.get(i).getProduto().equals(quantidadeTextoBancoDados)) {\n\n\t\t\t\tFaturamentoVO sinistroVOtratado = new FaturamentoVO();\n\t\t\t\tString mesesTratado[] = new String[13];\n\n\t\t\t\tsinistroVOtratado.setAno(anoAnterior);\n\t\t\t\tsinistroVOtratado.setProduto(quantidadeTextoApresentacao);\n\n\t\t\t\tint somaTotal = 0;\n\t\t\t\tfor (int k = 0; k <= 12; k++) {\n\n\t\t\t\t\tif (k != 12) {\n\n\t\t\t\t\t\tsomaTotal += Integer.parseInt(listaAnoAnterior.get(i).getMeses()[k]);\n\n\t\t\t\t\t\tmesesTratado[k] = uteis.insereSeparadores(listaAnoAnterior.get(i).getMeses()[k]);\n\n\t\t\t\t\t} else { // total\n\n\t\t\t\t\t\tmesesTratado[k] = uteis.insereSeparadores(String.valueOf(somaTotal));\n\n\t\t\t\t\t}\n\t\t\t\t\tsinistroVOtratado.setMeses(mesesTratado);\n\n\t\t\t\t}\n\t\t\t\tlistaTratada.add(sinistroVOtratado);\n\n\t\t\t} else if (listaAnoAnterior.get(i).getProduto().equals(valorTextoBancoDados)) {\n\t\t\t\tFaturamentoVO faturamentoVOtratado = new FaturamentoVO();\n\t\t\t\tString mesesTratado[] = new String[13];\n\n\t\t\t\tfaturamentoVOtratado.setAno(anoAnterior);\n\t\t\t\tfaturamentoVOtratado.setProduto(valorTextoApresentacao);\n\n\t\t\t\tdouble somaTotal = 0.0;\n\t\t\t\tfor (int k = 0; k <= 12; k++) {\n\n\t\t\t\t\tif (k != 12) {\n\n\t\t\t\t\t\tsomaTotal += Double.parseDouble(listaAnoAnterior.get(i).getMeses()[k]);\n\n\t\t\t\t\t\tString tratada = roundForm.format(Double.parseDouble(listaAnoAnterior.get(i).getMeses()[k]));\n\n\t\t\t\t\t\tmesesTratado[k] = uteis.insereSeparadores(tratada);\n\n\t\t\t\t\t} else { // total\n\n\t\t\t\t\t\tString tratada = roundForm.format(somaTotal);\n\n\t\t\t\t\t\tmesesTratado[k] = uteis.insereSeparadores(tratada);\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfaturamentoVOtratado.setMeses(mesesTratado);\n\t\t\t\t}\n\t\t\t\tlistaTratada.add(faturamentoVOtratado);\n\n\t\t\t}\n\t\t} // for anoAnterior\n\n\t\tbyte qtdAnoParam = 0;\n\t\tbyte qtdAnoAnterior = 2;\n\n\t\tbyte vlrAnoParam = 1;\n\t\tbyte vlrAnoAnterior = 3;\n\n\t\t// *******************************************\n\t\t// *******************************************\n\t\t// Variacao 16/15 QTD\n\t\tString[] mesesQtdTratado = new String[13];\n\t\tdouble totalQtd = 0.0D;\n\t\tFaturamentoVO variacaoQtdVO = new FaturamentoVO();\n\n\t\tfor (int j = 0; j <= 12; j++) {\n\t\t\tBigDecimal bigQtdAnoParam = new BigDecimal(\n\t\t\t\t\tDouble.parseDouble(listaTratada.get(qtdAnoParam).getMeses()[j].replace(\".\", \"\")));\n\n\t\t\ttry {\n\t\t\t\ttotalQtd = Double.parseDouble((bigQtdAnoParam.divide(\n\t\t\t\t\t\tnew BigDecimal(listaTratada.get(qtdAnoAnterior).getMeses()[j].replace(\".\", \"\")), 4,\n\t\t\t\t\t\tRoundingMode.HALF_DOWN)).toString()) - 1;\n\t\t\t} catch (Exception e) {\n\t\t\t\ttotalQtd = 0D;\n\t\t\t}\n\n\t\t\tmesesQtdTratado[j] = percentForm.format(totalQtd);\n\n\t\t}\n\t\tvariacaoQtdVO.setProduto(\"Variação Qtd.\");\n\t\tvariacaoQtdVO.setMeses(mesesQtdTratado);\n\t\tlistaTratada.add(variacaoQtdVO);\n\n\t\t// *******************************************\n\t\t// *******************************************\n\t\t// Variacao 16/15 Valor\n\t\tString[] mesesVlrTratado = new String[13];\n\t\tdouble totalVlr = 0.0D;\n\t\tFaturamentoVO variacaoVlrVO = new FaturamentoVO();\n\n\t\tfor (int j = 0; j <= 12; j++) {\n\n\t\t\tBigDecimal bigVlrAnoParam = new BigDecimal(\n\t\t\t\t\tDouble.parseDouble(listaTratada.get(vlrAnoParam).getMeses()[j].replace(\".\", \"\").replace(\",\", \".\")));\n\n\t\t\ttry {\n\t\t\t\ttotalVlr = Double.parseDouble((bigVlrAnoParam.divide(\n\t\t\t\t\t\tnew BigDecimal(\n\t\t\t\t\t\t\t\tlistaTratada.get(vlrAnoAnterior).getMeses()[j].replace(\".\", \"\").replace(\",\", \".\")),\n\t\t\t\t\t\t4, RoundingMode.HALF_DOWN)).toString()) - 1;\n\t\t\t} catch (Exception e) {\n\t\t\t\ttotalVlr = 0D;\n\t\t\t}\n\n\t\t\tmesesVlrTratado[j] = percentForm.format(totalVlr);\n\n\t\t}\n\t\tvariacaoVlrVO.setProduto(\"Variação Valor\");\n\t\tvariacaoVlrVO.setMeses(mesesVlrTratado);\n\t\tlistaTratada.add(variacaoVlrVO);\n\n\t\t// *******************************************\n\t\t// *******************************************\n\t\t// Aviso Medio anoParam - anoAtual\n\t\tString[] mesesAvisoMedioAnoParamTratado = new String[13];\n\t\tdouble totalAvisoMedioAnoParam = 0.0D;\n\t\tFaturamentoVO variacaoAvisoMedioAnoParamVO = new FaturamentoVO();\n\n\t\tfor (int j = 0; j <= 12; j++) {\n\n\t\t\tBigDecimal bigVlrAnoParam = new BigDecimal(\n\t\t\t\t\tDouble.parseDouble(listaTratada.get(vlrAnoParam).getMeses()[j].replace(\".\", \"\").replace(\",\", \".\")));\n\n\t\t\ttry {\n\t\t\t\ttotalAvisoMedioAnoParam = Double.parseDouble((bigVlrAnoParam.divide(\n\t\t\t\t\t\tnew BigDecimal(listaTratada.get(qtdAnoParam).getMeses()[j].replace(\".\", \"\").replace(\",\", \".\")),\n\t\t\t\t\t\t2, RoundingMode.HALF_DOWN)).toString());\n\t\t\t} catch (Exception e) {\n\t\t\t\ttotalAvisoMedioAnoParam = 0D;\n\t\t\t}\n\t\t\tmesesAvisoMedioAnoParamTratado[j] = uteis.insereSeparadoresMoeda(roundForm.format(totalAvisoMedioAnoParam));\n\n\t\t}\n\t\tvariacaoAvisoMedioAnoParamVO.setAno(uteis.cortaRetornaAno(ano));\n\t\tvariacaoAvisoMedioAnoParamVO.setProduto(\"Aviso Médio\");\n\t\tvariacaoAvisoMedioAnoParamVO.setMeses(mesesAvisoMedioAnoParamTratado);\n\t\tlistaTratada.add(variacaoAvisoMedioAnoParamVO);\n\n\t\t// *******************************************\n\t\t// *******************************************\n\t\t// Aviso Medio anoAnterior\n\t\tString[] mesesAvisoMedioAnoAnteriorTratado = new String[13];\n\t\tdouble totalAvisoMedioAnoAnterior = 0.0D;\n\t\tFaturamentoVO variacaoAvisoMedioAnoAnteriorVO = new FaturamentoVO();\n\n\t\tfor (int j = 0; j <= 12; j++) {\n\n\t\t\tBigDecimal bigVlrAnoAnterior = new BigDecimal(Double\n\t\t\t\t\t.parseDouble(listaTratada.get(vlrAnoAnterior).getMeses()[j].replace(\".\", \"\").replace(\",\", \".\")));\n\n\t\t\ttry {\n\t\t\t\ttotalAvisoMedioAnoAnterior = Double.parseDouble((bigVlrAnoAnterior.divide(\n\t\t\t\t\t\tnew BigDecimal(listaTratada.get(qtdAnoAnterior).getMeses()[j].replace(\".\", \"\")), 2,\n\t\t\t\t\t\tRoundingMode.HALF_DOWN)).toString());\n\t\t\t} catch (Exception e) {\n\t\t\t\ttotalAvisoMedioAnoAnterior = 0D;\n\t\t\t}\n\t\t\tmesesAvisoMedioAnoAnteriorTratado[j] = uteis\n\t\t\t\t\t.insereSeparadoresMoeda(roundForm.format(totalAvisoMedioAnoAnterior));\n\n\t\t}\n\t\tvariacaoAvisoMedioAnoAnteriorVO.setAno(anoAnterior);\n\t\tvariacaoAvisoMedioAnoAnteriorVO.setProduto(\"Aviso Médio\");\n\t\tvariacaoAvisoMedioAnoAnteriorVO.setMeses(mesesAvisoMedioAnoAnteriorTratado);\n\t\tlistaTratada.add(variacaoAvisoMedioAnoAnteriorVO);\n\n\t\t// *******************************************\n\t\t// *******************************************\n\t\t// Variacao Media\n\t\tshort avisoMedioAnoParam = 6;\n\t\tshort avisoMedioAnoAnterior = 7;\n\n\t\tString[] meses_AM_Tratado = new String[13];// AM -aviso medio\n\t\tdouble total_AM = 0.0D;\n\t\tFaturamentoVO variacao_AM_VO = new FaturamentoVO();\n\n\t\tfor (int j = 0; j <= 12; j++) {\n\n\t\t\tBigDecimal big_AM_AnoParam = new BigDecimal(Double.parseDouble(\n\t\t\t\t\tlistaTratada.get(avisoMedioAnoParam).getMeses()[j].replace(\".\", \"\").replace(\",\", \".\")));\n\n\t\t\ttry {\n\t\t\t\ttotal_AM = Double\n\t\t\t\t\t\t.parseDouble((big_AM_AnoParam\n\t\t\t\t\t\t\t\t.divide(new BigDecimal(listaTratada.get(avisoMedioAnoAnterior).getMeses()[j]\n\t\t\t\t\t\t\t\t\t\t.replace(\".\", \"\").replace(\",\", \".\")), 4, RoundingMode.HALF_DOWN)).toString())\n\t\t\t\t\t\t- 1;\n\t\t\t} catch (Exception e) {\n\t\t\t\ttotal_AM = 0D;\n\t\t\t}\n\n\t\t\tmeses_AM_Tratado[j] = percentForm.format(total_AM);\n\n\t\t}\n\t\tvariacao_AM_VO.setProduto(\"Variação Média\");\n\t\tvariacao_AM_VO.setMeses(meses_AM_Tratado);\n\t\tlistaTratada.add(variacao_AM_VO);\n\n\t\treturn listaTratada;\n\t}",
"public void registaJogadaComPontuacao(List<Par<Integer,Integer>> afetados, int pontos) {\n\t\tthis.ambiente.registaAfetados(afetados);\n\t\tthis.pontuacao += pontos;\n\t}",
"@Override\n public Combinacion comprobarColores(Combinacion filaIntroducida) {\n Combinacion respuesta;\n\n\n ArrayList<Ficha> combinacionRespuesta = new ArrayList<>();\n ArrayList<Integer> fichasNegrasUtilizadas = new ArrayList<>();\n ArrayList<Integer> fichasTotalesUtilizadas = new ArrayList<>();\n boolean comprobado = false;\n Colores color = Colores.SC;\n\n // COMPROBAMOS LAS NEGRAS\n for (int i = 0; i < filaIntroducida.getCodigo().length; i++) {\n if (filaIntroducida.getCodigo()[i].equals(tablero.getCombinacionOculta().getCodigo()[i])) {\n combinacionRespuesta.add(new Ficha(Colores.NEGRO));\n fichasNegrasUtilizadas.add(i);\n }\n }\n\n fichasTotalesUtilizadas.addAll(fichasNegrasUtilizadas);\n // SEPARAMOS NEGRAS DE BLANCAS\n\n for (int i = 0; i < filaIntroducida.getCodigo().length; i++) {\n if (!fichasNegrasUtilizadas.contains(i)) {\n for (int j = 0; j < filaIntroducida.getCodigo().length && !comprobado; j++) {\n if (!fichasTotalesUtilizadas.contains(j)) {\n if (filaIntroducida.getCodigo()[i].equals(tablero.getCombinacionOculta().getCodigo()[j])) {\n color = Colores.BLANCO;\n fichasTotalesUtilizadas.add(j);\n comprobado = true;\n } else {\n color = Colores.SC;\n }\n }\n }\n combinacionRespuesta.add(new Ficha(color));\n comprobado = false;\n }\n }\n\n combinacionRespuesta.sort(new Comparator<Ficha>() {\n @Override\n public int compare(Ficha o1, Ficha o2) {\n return o1.getColor().compareTo(o2.getColor());\n }\n });\n\n respuesta = new Combinacion(combinacionRespuesta.toArray(new Ficha[combinacionRespuesta.size()]));\n\n // MODO MEDIO Y FACIL\n\n return respuesta;\n }",
"public void reporteHabitacionMasPopular(TablaModelo modelo){\n ArrayList<ControlVeces> control = new ArrayList<>();\n ControlVeces controlador;\n try {// pago de alojamiento en rango fchas\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT ALOJAMIENTO.Id,ALOJAMIENTO.Id_Reservacion,RESERVACION.Fecha_Entrada, RESERVACION.Fecha_Salida,RESERVACION.Precio, RESERVACION.Id_Habitacion FROM RESERVACION JOIN ALOJAMIENTO WHERE RESERVACION.Id=ALOJAMIENTO.Id_Reservacion AND RESERVACION.Check_In=1;\");\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {// pago de alojamiento en rango fchas\n String nombre = Integer.toString(resultado.getInt(6));\n int casilla = numeroObjeto(control,nombre);\n if(casilla>=0){// maneja el resultado// pago de alojamiento en rango fchas\n control.get(casilla).setVeces(control.get(casilla).getVeces()+1);\n }else{// maneja el resultado\n controlador = new ControlVeces(nombre);// pago de alojamiento en rango fchas\n control.add(controlador);\n }\n } // maneja el resultado \n ordenamiento(control);\n int numero = control.size()-1;// el de hasta arriba es el que mas elementos tiene \n String idHabitacionMasPopular = control.get(numero).getNombre();\n this.habitacionPopular= idHabitacionMasPopular;\n introducirDatosHabitacionMasPopular(modelo, idHabitacionMasPopular);\n } catch (SQLException ex) {\n ex.printStackTrace();\n } catch(Exception e){\n \n }\n }",
"public void prepararDados(int tab) {\n\n if (modHT.getRowCount() == 0 || modMF.getRowCount() == 0) {\n JOptionPane.showMessageDialog(null, \"Não há nada para calcular!\", \"INFORMAÇÃO\", 1);\n modAt.setRowCount(0);\n modEx.setRowCount(0);\n } else {\n if (tab == 0) {\n aTra = new Atrasos(Atraso);\n aTra.tamTabelas(modHT, modMF);\n } else {\n hEx = new HorasExtras(HoraExtra);\n hEx.tamTabelas(modHT, modMF);\n }\n }\n }",
"public void CadastrarPassageiro(Connection con, List<Bilhetes> temporaria) {\n\t\t\n\t\ttry {\n\t\t\n\t\t\tstmt = con.prepareStatement(\"Select cpf from passageiro where cpf = ?\");\n\t\t\t\n\t\t\tstmt.setString(1, temporaria.get(0).getBilhete().get(0).getCpf() );\n\t\t\tstmt.execute();\n\t\t\t\n\t\t\trs=stmt.getResultSet();\n\t\t\t\n\t\t\tif(rs.next())\n\t\t\t{\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(null, \"ERRO: CPF JA CADASTRADO\", \"Erro CADASTRO\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tstmt = con.prepareStatement(\n\t\t\t\t\t\" insert into BILHETES (Destino,Origem,Hpartida, Hembarque,Poltrona) values(?,?,?,?,NULL)\");\n\n\t\t\tstmt.setString(1, temporaria.get(0).getDestino());\n\t\t\tstmt.setString(2, temporaria.get(0).getOrigem());\n\t\t\tstmt.setString(3, temporaria.get(0).getHora_partida());\n\t\t\tstmt.setString(4, temporaria.get(0).getHora_embarque());\n\n\t\t\tstmt.execute();\n\n\t\t\tstmt = con.prepareStatement(\"select IDBILHETE FROM BILHETES WHERE poltrona is null \");\n\n\t\t\tstmt.execute();\n\n\t\t\trs = stmt.getResultSet();\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tint idbilhete = rs.getInt(1);\n\t\t\t\ttemporaria.get(0).setIdbilhete(idbilhete);\n\t\t\t}\n\n\t\t\tstmt = con.prepareStatement(\"insert into Passageiro(nome,cpf,ID_BILHETE) values(?,?,?)\");\n\n\t\t\tstmt.setString(1, temporaria.get(0).getBilhete().get(0).getNome());\n\t\t\tstmt.setString(2, temporaria.get(0).getBilhete().get(0).getCpf());\n\t\t\tstmt.setInt(3, temporaria.get(0).getIdbilhete());\n\n\t\t\tstmt.execute();\n\n\t\t\t// VOLTANDO A CADEIRA PARA 0, PARA EVITAR ERRO NOS PROXIMOS USUARIOS CADASTRADOS\n\t\t\tstmt = con.prepareStatement(\"UPDATE BILHETES SET POLTRONA = 0 WHERE POLTRONA IS NULL\");\n\n\t\t\tstmt.execute();\n\n\t\t\t// Teste\n\n\t\t\tString nome = temporaria.get(0).getBilhete().get(0).getNome();\n\t\t\tString cpf = temporaria.get(0).getBilhete().get(0).getCpf();\n\n\t\t\tString destino = temporaria.get(0).getDestino();\n\t\t\tString Origem = temporaria.get(0).getOrigem();\n\n\t\t\tString hora_EMBARQUE = temporaria.get(0).getHora_embarque();\n\n\t\t\tString horasaida = temporaria.get(0).getHora_partida();\n\n\t\t\t// Instanciando valores\n\t\t\tBilhetes passagem = new Bilhetes(temporaria.get(0).getIdbilhete(), Origem, destino, hora_EMBARQUE,\n\t\t\t\t\thorasaida, null, 0);\n\n\t\t\tpassagem.adicionar(new Passageiro(nome, cpf));\n\n\t\t\tpassageiro.add(passagem);\n\n\t\t\t// Fim do teste antes do filme\n\n\t\t\tJOptionPane.showMessageDialog(null, \"Passageiro Cadastrado Com sucesso\");\n\n\t\t\tJOptionPane.showMessageDialog(null,\"CODIGO LOCALIZADOR DO BILHETE: \" + temporaria.get(0).getIdbilhete(),\" NÃO PERCA\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\n\t\n\t\t\t\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tJOptionPane.showMessageDialog(null, \"ERRO: CPF JA CADASTRADO\", \"Erro CADASTRO\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\n\n\t\t}\n\n\t}",
"public Collection cargarMasivo(int codigoCiclo, String proceso, String subproceso, int periodo) {\n/* 287 */ Collection resultados = new ArrayList();\n/* */ try {\n/* 289 */ String s = \"select m.Codigo_Ciclo, m.Codigo_Plan, m.Codigo_Meta, m.Codigo_Objetivo, u.Descripcion Nombre_Area, Um.Descripcion as Nombre_Unidad_Medida, to_char(m.Codigo_Objetivo,'9999999999') ||' - ' || o.Descripcion Nombre_Objetivo, to_char(m.Codigo_Meta,'9999999999') ||' - ' || m.Descripcion Nombre_Meta, m.Unidad_Medida, m.Valor_Minimo, m.Valor_Maximo, l.Valor_Logro, case when l.Valor_Logro is not null then 'A' else 'N' end Existe from Cal_Planes p, Cal_Plan_Objetivos o, Cal_Plan_Metas m left join Cal_Logros l on( m.Codigo_Ciclo = l.Codigo_Ciclo and m.Codigo_Plan = l.Codigo_Plan and m.Codigo_Meta = l.Codigo_Meta and m.Codigo_Objetivo = l.Codigo_Objetivo and \" + periodo + \" = l.Periodo),\" + \" Unidades_Dependencia u,\" + \" Sis_Multivalores Um\" + \" where p.Ciclo = o.Codigo_Ciclo\" + \" and p.Codigo_Plan = o.Codigo_Plan\" + \" and o.Codigo_Ciclo = m.Codigo_Ciclo\" + \" and o.Codigo_Plan = m.Codigo_Plan\" + \" and o.Codigo_Objetivo = m.Codigo_Objetivo\" + \" and p.Codigo_Area = u.Codigo\" + \" and m.Unidad_Medida = Um.Valor\" + \" and Um.Tabla = 'CAL_UNIDAD_MEDIDA_META'\" + \" and o.Proceso = '\" + proceso + \"'\" + \" and o.Subproceso = '\" + subproceso + \"'\" + \" and p.Ciclo = \" + codigoCiclo + \" and m.Estado = 'A'\" + \" and o.Estado = 'A'\" + \" and o.Tipo_Objetivo in ('G', 'M')\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 333 */ if (periodo == 1) {\n/* 334 */ s = s + \" and m.mes01='S'\";\n/* */ }\n/* 336 */ else if (periodo == 2) {\n/* 337 */ s = s + \" and m.mes02='S'\";\n/* */ }\n/* 339 */ else if (periodo == 3) {\n/* 340 */ s = s + \" and m.mes03='S'\";\n/* */ }\n/* 342 */ else if (periodo == 4) {\n/* 343 */ s = s + \" and m.mes04='S'\";\n/* */ }\n/* 345 */ else if (periodo == 5) {\n/* 346 */ s = s + \" and m.mes05='S'\";\n/* */ }\n/* 348 */ else if (periodo == 6) {\n/* 349 */ s = s + \" and m.mes06='S'\";\n/* */ }\n/* 351 */ else if (periodo == 7) {\n/* 352 */ s = s + \" and m.mes07='S'\";\n/* */ }\n/* 354 */ else if (periodo == 8) {\n/* 355 */ s = s + \" and m.mes08='S'\";\n/* */ }\n/* 357 */ else if (periodo == 9) {\n/* 358 */ s = s + \" and m.mes09='S'\";\n/* */ }\n/* 360 */ else if (periodo == 10) {\n/* 361 */ s = s + \" and m.mes10='S'\";\n/* */ }\n/* 363 */ else if (periodo == 11) {\n/* 364 */ s = s + \" and m.mes11='S'\";\n/* */ }\n/* 366 */ else if (periodo == 12) {\n/* 367 */ s = s + \" and m.mes12='S'\";\n/* */ } \n/* */ \n/* 370 */ s = s + \" order by m.Codigo_Ciclo, m.Codigo_Objetivo, m.Codigo_Meta, u.Descripcion\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 377 */ boolean rtaDB = this.dat.parseSql(s);\n/* 378 */ if (!rtaDB) {\n/* 379 */ return resultados;\n/* */ }\n/* */ \n/* 382 */ this.rs = this.dat.getResultSet();\n/* 383 */ while (this.rs.next()) {\n/* 384 */ CalMetasDTO reg = new CalMetasDTO();\n/* 385 */ reg.setCodigoCiclo(codigoCiclo);\n/* 386 */ reg.setCodigoPlan(this.rs.getInt(\"codigo_plan\"));\n/* 387 */ reg.setCodigoMeta(this.rs.getInt(\"codigo_meta\"));\n/* 388 */ reg.setCodigoObjetivo(this.rs.getInt(\"codigo_objetivo\"));\n/* 389 */ reg.setNombreArea(this.rs.getString(\"Nombre_Area\"));\n/* 390 */ reg.setNombreMeta(this.rs.getString(\"Nombre_meta\"));\n/* 391 */ reg.setNombreObjetivo(this.rs.getString(\"Nombre_Objetivo\"));\n/* 392 */ reg.setUnidadMedida(this.rs.getString(\"unidad_medida\"));\n/* 393 */ reg.setValorMinimo(this.rs.getDouble(\"valor_minimo\"));\n/* 394 */ reg.setValorMaximo(this.rs.getDouble(\"valor_maximo\"));\n/* 395 */ reg.setValorLogro(this.rs.getDouble(\"Valor_Logro\"));\n/* 396 */ reg.setNombreUnidadMedida(this.rs.getString(\"nombre_unidad_medida\"));\n/* 397 */ reg.setEstado(this.rs.getString(\"existe\"));\n/* 398 */ resultados.add(reg);\n/* */ }\n/* */ \n/* 401 */ } catch (Exception e) {\n/* 402 */ e.printStackTrace();\n/* 403 */ Utilidades.writeError(\"CalPlanMetasFactory:cargarTodos \", e);\n/* */ } \n/* 405 */ return resultados;\n/* */ }",
"@Override\r\n\tprotected void agregarObjeto() {\r\n\t\t// opcion 1 es agregar nuevo justificativo\r\n\t\tthis.setTitle(\"PROCESOS - PERMISOS INDIVIDUALES (AGREGANDO)\");\r\n\t\tthis.opcion = 1;\r\n\t\tactivarFormulario();\r\n\t\tlimpiarTabla();\r\n\t\tthis.panelBotones.habilitar();\r\n\t}",
"public void buscarDatos()throws Exception{\n\t\ttry {\n\t\t\tString parameter = lbxParameter.getSelectedItem().getValue().toString();\n\t\t\tString value = tbxValue.getValue().toUpperCase().trim();\n\n\t\t\tMap<String, Object> parameters = new HashMap<String, Object>();\n\t\t\tparameters.put(\"parameter\", parameter);\n\t\t\tparameters.put(\"value\", \"%\" + value + \"%\");\n\n\t\t\tif (admision != null) {\n\t\t\t\tparameters.put(\"identificacion\",\n\t\t\t\t\t\tadmision.getNro_identificacion());\n\t\t\t}\n\t\t\t\n\t\t\tgetServiceLocator().getFicha_epidemiologia_nnService().setLimit(\"limit 25 offset 0\");\n\t\t\t\n\t\t\tList<Ficha_epidemiologia_n13> lista_datos = getServiceLocator()\n\t\t\t\t\t.getFicha_epidemiologia_nnService().listar(\n\t\t\t\t\t\t\tFicha_epidemiologia_n13.class, parameters);\n\t\t\trowsResultado.getChildren().clear();\n\t\t\t\n\t\t\tfor (Ficha_epidemiologia_n13 ficha_epidemiologia_n13 : lista_datos) {\n\t\t\t\trowsResultado.appendChild(crearFilas(ficha_epidemiologia_n13, this));\n\t\t\t}\n\t\t\t\n\t\t\tgridResultado.setVisible(true);\n\t\t\tgridResultado.setMold(\"paging\");\n\t\t\tgridResultado.setPageSize(20);\n\t\t\t\n\t\t\tgridResultado.applyProperties();\n\t\t\tgridResultado.invalidate();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tMensajesUtil.mensajeError(e, \"\", this);\n\t\t}\n\t}"
] | [
"0.63582027",
"0.6328201",
"0.63161796",
"0.6295477",
"0.6267819",
"0.6163552",
"0.61470926",
"0.6135746",
"0.61253476",
"0.61041653",
"0.6102196",
"0.60752314",
"0.6067052",
"0.6065789",
"0.6035308",
"0.6034232",
"0.60283756",
"0.60072285",
"0.6000747",
"0.59868366",
"0.59866554",
"0.5981116",
"0.5966366",
"0.5963074",
"0.5952728",
"0.59422934",
"0.5935309",
"0.59195364",
"0.5919285",
"0.58972555",
"0.58578163",
"0.58377635",
"0.58340967",
"0.5831825",
"0.5829739",
"0.58267635",
"0.5822589",
"0.58222556",
"0.58220875",
"0.5819188",
"0.58185023",
"0.5814761",
"0.5808525",
"0.58043504",
"0.5788",
"0.57836694",
"0.5779287",
"0.5772767",
"0.5770803",
"0.5766942",
"0.5766064",
"0.57631195",
"0.5762172",
"0.57531035",
"0.57527906",
"0.57526404",
"0.57519466",
"0.57480705",
"0.57372904",
"0.57260776",
"0.5723497",
"0.57224345",
"0.5722115",
"0.57129216",
"0.570946",
"0.57081735",
"0.57025087",
"0.5698491",
"0.5696937",
"0.56960744",
"0.5695873",
"0.56919396",
"0.5691278",
"0.56896394",
"0.5688087",
"0.56869256",
"0.568612",
"0.5680634",
"0.5670884",
"0.5670054",
"0.5663274",
"0.5662544",
"0.5661692",
"0.56610996",
"0.56550854",
"0.5653419",
"0.56529576",
"0.56500465",
"0.5648159",
"0.564683",
"0.56464124",
"0.56460416",
"0.5643635",
"0.5642772",
"0.5642028",
"0.5640428",
"0.56367946",
"0.5636146",
"0.5635598",
"0.5635565",
"0.5635386"
] | 0.0 | -1 |
Verifica se ha novos lancamentos (DIRF) apartir da data | Boolean novosLancamentosDIRF(Integer numCoop, Date data) throws BancoobException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void noDirigido(TraductorGrafo grafo){\r\n\r\n\t\t// Inicializa variable booleana que almacena si el grafo es no dirigido\r\n\t\tboolean esNoDirigido = true;\r\n\r\n\t\t// Itera sobre la matriz de adyacencias del grafo verificando que paratodo i,j se cumple que\r\n\t\t// grafo[i][j] == grafo[j][i]\r\n\t\tfor(int i=0;i<grafo.grafo.length;i++){\r\n\t\t\tfor(int j=0;j<grafo.grafo.length;j++){\r\n\t\t\t\tif(grafo.grafo[i][j] != grafo.grafo[j][i]){\r\n\t\t\t\t\t// En caso de encontrar un caso para el cual no se cumple, se asigna a la variable booleana false\r\n\t\t\t\t\tesNoDirigido = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Verifica el estado de la variable booleana, y dependiendo de este imprime el mensaje correspondiente\r\n\t\tif(esNoDirigido){\r\n\t\t\tSystem.out.println(\"El grafo es no dirigido\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"El grafo es dirigido\");\r\n\t\t}\r\n\r\n\t}",
"protected boolean colaLlena() {\r\n return fin == datos.length - 1;\r\n }",
"public boolean Llena(){\n return VectorPila.length-1==cima;\n }",
"boolean hasDistance();",
"boolean hasAuvLoc();",
"private boolean checkListino() {\n /* variabili e costanti locali di lavoro */\n boolean ok = false;\n Date dataInizio;\n Date dataFine;\n AddebitoFissoPannello panServizi;\n\n try { // prova ad eseguire il codice\n dataInizio = this.getDataInizio();\n dataFine = this.getDataFine();\n panServizi = this.getPanServizi();\n ok = panServizi.checkListino(dataInizio, dataFine);\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n\n /* valore di ritorno */\n return ok;\n }",
"protected final boolean checkLRPCoverage(final LocRefData locRefData) {\n\t\tList<LocRefPoint> locRefPoints = locRefData.getLocRefPoints();\n\t\tList<Line> locRoute = ExpansionHelper.getExpandedLocation(locRefData);\n\t\tint lrpLength = 0;\n\t\tList<Line> lrpRoute = new ArrayList<Line>();\n\t\tfor (LocRefPoint lrd : locRefPoints) {\n\t\t\tif (lrd.getRoute() != null) {\n\t\t\t\tif (!lrd.isLRPOnLine()) {\n\t\t\t\t\t// Added by DLR e.V. (RE)\n\t\t\t\t\tif (locRefData.getLocationType() == LocationType.CLOSED_LINE\n\t\t\t\t\t\t\t&& lrd == locRefPoints.get(locRefPoints.size() - 1)) {\n\t\t\t\t\t\tList<Line> route = lrd.getRoute();\n\t\t\t\t\t\troute.add(locRefPoints.get(0).getRoute().get(0));\n\t\t\t\t\t\tlrpRoute.addAll(route);\n\t\t\t\t\t\troute.remove(route.size() - 1);\n\t\t\t\t\t} else { // original code\n\t\t\t\t\t\tlrpRoute.addAll(lrd.getRoute());\n\t\t\t\t\t}\n\t\t\t\t\t//\n\t\t\t\t}\n\t\t\t\t// Added by DLR e.V. (RE)\n\t\t\t\tif (locRefData.getLocationType() == LocationType.CLOSED_LINE\n\t\t\t\t\t\t&& lrd == locRefPoints.get(locRefPoints.size() - 1)) {\n\t\t\t\t\tList<Line> route = lrd.getRoute();\n\t\t\t\t\troute.add(locRefPoints.get(0).getRoute().get(0));\n\t\t\t\t\tlrpLength += PathUtils.getLength(route);\n\t\t\t\t\troute.remove(route.size() - 1);\n\t\t\t\t} else { // original code\n\t\t\t\t\tlrpLength += lrd.getDistanceToNext();\n\t\t\t\t}\n\t\t\t\t//\n\t\t\t}\n\t\t}\n\t\t// check for the same amount of lines\n\t\tif (locRoute.size() != lrpRoute.size()) {\n\t\t\tLOG.error(\"number of lines are different\");\n\t\t\tLOG.error(\"location: \" + locRoute.size() + \" - locRef: \"\n\t\t\t\t\t+ lrpRoute.size());\n\t\t\treturn false;\n\t\t}\n\t\tint locationLength = 0;\n\t\tint count = locRoute.size();\n\t\t// check if the lines are equal and in the same order\n\t\tfor (int i = 0; i < count; ++i) {\n\t\t\tLine next = locRoute.get(i);\n\t\t\tif (next.getID() != lrpRoute.get(i).getID()) {\n\t\t\t\t// if a line is missing or in an incorrect order, then fail\n\t\t\t\tLOG.error(\"paths are different\");\n\t\t\t\tLOG.error(\"location line: \" + next.getID() + \" - locRef line: \"\n\t\t\t\t\t\t+ lrpRoute.get(i).getID());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tlocationLength += next.getLineLength();\n\t\t}\n\t\t// check that the location length and location reference path length are\n\t\t// equal\n\t\tif (locationLength != lrpLength) {\n\t\t\tLOG.error(\"lengths are different\");\n\t\t\tLOG.error(\"location: \" + locationLength + \" - locRef: \" + lrpLength);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"private boolean allGPSDataExists() {\n for(int i = 0; i < 6; i++) {\n if(databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LATITUDE).equals(\"-1\"))\n return false;\n }\n return true;\n }",
"private boolean isContieneLotesDetallePedidos(){\n String pResultado = \"N\";\n try {\n log.info(\"VariablesDelivery.vNumeroPedido_bk:\"+VariablesDelivery.vNumeroPedido_bk);\n log.info(\"VariablesDelivery.vCodLocal_bk:\"+VariablesDelivery.vCodLocal_bk);\n pResultado = DBDelivery.isContienLotesProductos(VariablesDelivery.vCodLocal_bk,\n VariablesDelivery.vNumeroPedido_bk);\n \n log.info(\"isContieneLotesDetallePedidos():\"+pResultado);\n } catch (Exception e) {\n pResultado = \"N\"; \n log.info(\"Error al obtener ind Productos x Lote del Pedido:\"+e.getMessage());\n }\n \n if(pResultado.trim().equalsIgnoreCase(\"N\")){\n return false;\n }\n else{\n FarmaUtility.showMessage(this,\"El pedido ya tiene los Lotes Ingresados\\n\" +\n \"Se procederá a generar el pedido.\\n\" +\n \"Gracias.\" ,tblListaDetallePedido);\n \n return true;\n }\n }",
"private int checkFila(int r, Gene[] gene) {\n // System.out.print(row + \":\");\n list.clear();\n \n// boolean[] l=new boolean[nn];\n int m = r * nn;\n int v;\n// for (int k = m; k < m + nn; k++) {\n// v = ((Integer) gene[k].getAllele()).intValue();\n// list.set(v - 1);//tengo v en la fila\n// }\n for (int j = 0; j < nn; j++) {\n v = (Integer) gene[c.campo(r, j)].getAllele();\n list.set(v - 1);//tengo v en la fila\n// l[v-1]=true;\n }\n int zeros = 0;//a quien no tengo\n for (int k = 0; k < nn; k++) {\n if (!list.get(k)) {\n zeros++;\n }\n }\n return zeros;\n }",
"boolean hasDirection();",
"public boolean allDepartureFlightsNonstop() {\n\t\tMap<String,Flight> allflights = getAllDepartureFlights();\n\t\tfor (String flightNumber:allflights.keySet() ) {\n\t\t\tFlight flight = allflights.get(flightNumber);\n\t\t\tif (!flight.getStop().equalsIgnoreCase(\"nonstop\"))\n\t\t\t\treturn false;\t\t\t\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"boolean isAllInDownloadedArea();",
"boolean checkDir(Directions dir);",
"boolean isAllOnDestination(){\n\n if(player.getCurrentX()-player.getDestinationX()!=0 || player.getCurrentY()-player.getDestinationY()!=0)\n return false;\n\n for(int i = 0; i < boxes.size(); i++){\n Box item = boxes.get(i);\n if(item.getCurrentX()-item.getDestinationX()!=0 || item.getCurrentY()-item.getDestinationY()!=0)\n return false;\n }\n return true;\n }",
"List<Direction> getValidDirectionsForMovement();",
"protected final boolean checkMaxDistances(\n\t\t\tfinal OpenLREncoderProperties properties,\n\t\t\tfinal LocRefData locRefData) throws OpenLRProcessingException {\n\t\t/*\n\t\t * check for the maximum distance between two successive LRP \n\t\t */\n\t\tif (LOG.isDebugEnabled()) {\n\t\t\tLOG.debug(\"check location reference (maximum distance check)\");\n\t\t}\n\t\tfinal List<LocRefPoint> locRefPoints = locRefData.getLocRefPoints();\n\t\tint maxDistance = properties.getMaximumDistanceLRP();\n\t\t\n\t\tboolean dnpsAreVAlid = true;\n\t\tfor (LocRefPoint lrPoint : locRefPoints) {\n\t\t\t// check the distance limit\n\t\t\tif (!lrPoint.isLastLRP()\n\t\t\t\t\t&& lrPoint.getDistanceToNext() > maxDistance) {\n\t\t\t\t// limit is exceeded\n LOG.error(String\n .format(\"maximum distance between two LRP is exceeded (LRP #: %s, distance: %s)\",\n lrPoint.getSequenceNumber(),\n lrPoint.getDistanceToNext()));\n\t\t\t\tdnpsAreVAlid = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn dnpsAreVAlid;\n\t}",
"private boolean hayRayaHorizontal() {\n for (Casilla[] casilla : casillas) {\n if (linea(casilla))\n return true;\n }\n\n return false;\n }",
"public void testDecisionEnPasillosDoblar(){\r\n\t\tdireccionActual = Direccion.ARRIBA;\r\n\t\tDireccion futura = cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, cinco, direccionActual);\r\n\t\tassertEquals(Direccion.DERECHA,futura);\r\n\r\n\t\tdireccionActual = Direccion.IZQUIERDA;\r\n\t\tfutura=cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, cinco, direccionActual);\r\n\t\tassertEquals(Direccion.ABAJO,futura);\r\n\t\t\r\n\t\tdireccionActual = Direccion.IZQUIERDA;\r\n\t\tfutura = cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, tres, direccionActual);\r\n\t\tassertEquals(Direccion.ARRIBA, futura);\r\n\t\t\r\n\t\tdireccionActual = Direccion.DERECHA;\r\n\t\tfutura = cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, seis, direccionActual);\r\n\t\tassertEquals(Direccion.ARRIBA, futura);\r\n\t}",
"public boolean checkData()\n {\n boolean ok = true;\n int l = -1;\n for(Enumeration<Vector<Double>> iter = data.elements(); iter.hasMoreElements() && ok ;)\n {\n Vector<Double> v = iter.nextElement();\n if(l == -1)\n l = v.size();\n else\n ok = (l == v.size()); \n }\n return ok; \n }",
"private boolean iguales(Pares f){\n\t\t\tboolean devolucion = false;\n\t\t\t\n\t\t\tif(f!=null){\n\t\t\t\tif(primero.iguales(f.getSegundo())){\n\t\t\t\t\tif(segundo.iguales(f.getPrimero())){\n\t\t\t\t\t\tif(distancia==f.getDistancia()){\n\t\t\t\t\t\t\tdevolucion=true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\treturn devolucion;\n\t\t}",
"public boolean estaLlena() {\n return (capacidad == top+1); // regresa verdadero si la capacidad es igual al tope (la cima +1)\r\n }",
"boolean hasSegments();",
"int sizeOfLanesArray();",
"public void checkNLFOJoin() {\n\n String extractedVar = \"\";\n String currQuery = \"\";\n List<Integer> sourceQueries = null;\n List<String> tmpTP = null;\n List<String> extractedVals = null;\n\n for (List<String> key : mapCTPtoQuerySrc.keySet()) {\n\n sourceQueries = mapCTPtoQuerySrc.get(key);\n\n for (int i = 0; i < sourceQueries.size(); i++) {\n\n currQuery = queries.get(sourceQueries.get(i));\n\n //Buuuuuuuuuuuuuug\n if (currQuery.contains(\"mass\")) {\n continue;\n }\n\n if (currQuery.contains(\"filter\") || currQuery.contains(\"FILTER\")) {\n\n extractedVals = myBasUtils.getFILTERvals(currQuery);\n extractedVar = myBasUtils.getFILTERvar(currQuery);\n\n if (extractedVals.size() >= 1) {\n\n if (key.get(0).equalsIgnoreCase(extractedVar) || key.get(2).equalsIgnoreCase(extractedVar)) {\n\n tmpTP = myDedUtils.getCleanTP(key);\n tmpTP.add(extractedVar);\n myBasUtils.insertToMap4(mapDTPtoAnsInverseMap, tmpTP, extractedVals);\n }\n }\n\n }\n\n }\n }\n\n }",
"boolean hasLte();",
"public void leerPlanesDietas();",
"public boolean hasLanded ();",
"boolean land();",
"public void checkLines() {\n int cont2 = 0;\n int cont3, cont4;\n int casillasVacias;\n int vInicial, vFinal;\n\n for(cont3=20; cont3>0; cont3--) {\n vInicial = cont3*12 + 1;\n vFinal = vInicial + 10;\n casillasVacias = 10;\n\n //Bucle para todas las casillas de una fila\n for(cont4=vInicial; cont4<vFinal; cont4++) {\n if(colMatrix[cont4]) casillasVacias--;\n }\n\n if(casillasVacias == 0) {\n completeLines[cont2] = cont3;\n cont2++;\n }\n }\n removeLines();\n }",
"public boolean percolates(){\n return uf.connected(ufSize - 2, ufSize - 1);\n }",
"private boolean diaHabilLunesPlacaA(int diaActual){\n\t\treturn diaActual == LUNES;\t\t\n\t}",
"private boolean isContoDiLivelloDiLegge() {\n\t\treturn conto.getLivello().equals(livelloDiLegge); \n\t\t\n\t}",
"protected boolean drillAllLabels() {\n return label == null;\n }",
"boolean vecinoDisponible2 (int x, int y, int dir){\n\t //Cuidamos los límites.\n\t switch (dir){\n\t case 0: if (y-1 < 0) return false;\n\t\treturn !mundo[x][y-1].visitoAgente;\n\t case 1: if (y+1 >= alto) return false;\n\t\treturn !mundo[x][y+1].visitoAgente;\n\t case 2: if (x-1 < 0) return false;\n\t\treturn !mundo[x-1][y].visitoAgente;\n\t case 3: if (x+1 >= ancho) return false;\n\t\treturn !mundo[x+1][y].visitoAgente;\n\t }\n\n\t return false;\n }",
"public void checkCameraLimits()\n {\n //Daca camera ar vrea sa mearga prea in stanga sau prea in dreapta (Analog si pe verticala) ea e oprita (practic cand se intampla acest lucru Itemul asupra caruia se incearca centrarea nu mai e in centrul camerei )\n\n if(xOffset < 0 )\n xOffset = 0;\n else if( xOffset > refLinks.GetMap().getWidth()* Tile.TILE_WIDTH - refLinks.GetWidth())\n xOffset =refLinks.GetMap().getWidth()* Tile.TILE_WIDTH - refLinks.GetWidth();\n if(yOffset<0)\n yOffset = 0;\n if(yOffset > refLinks.GetMap().getHeight()*Tile.TILE_HEIGHT - refLinks.GetHeight())\n {\n yOffset = refLinks.GetMap().getHeight()*Tile.TILE_HEIGHT - refLinks.GetHeight();\n }\n }",
"public boolean esDeterministico(){\n NodoA x, y;\n x = primerElemento();\n y = x.getLigaDer();\n boolean bandera = true;\n while(x != cabeza){\n while(y != cabeza){\n if(y.getSimbolo().equals( x.getSimbolo())){\n \n if(!listaND.contains(x)){\n listaND.add(x);\n }\n \n bandera= false;\n }\n y = y.getLigaDer();\n }\n \n x = x.getLigaDer();\n y = x.getLigaDer();\n \n \n }\n \n return bandera;\n \n }",
"public boolean isLeaf() { return (data.length == 0); }",
"public static boolean isOpuestoLado(int lado1, int lado2){\r\n\t\tint distancia = distanciaLado(lado1, lado2);\r\n\t\tif (distancia == 4)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}",
"public boolean leer(ArrayList<Correo> cor){\r\n for(Correo corre:cor){\r\n if(corre.getLeido()==false){\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"public boolean verificarCamposVaciosIPNode(TextField campoIPNode1, TextField campoIPNode2, TextField campoIPNode3, TextField campoIPNode4, TextField campoPuertoNode) {\n boolean camposLlenos = true;\n if (campoIPNode1.getText().isEmpty() || campoIPNode2.getText().isEmpty() || campoIPNode3.getText().isEmpty() || campoIPNode4.getText().isEmpty() || campoPuertoNode.getText().isEmpty()) {\n camposLlenos = false;\n }\n return camposLlenos;\n }",
"public void testDecisionEnPasillosSeguirDerecho(){\r\n\t\tdireccionActual = Direccion.ABAJO;\r\n\t\tDireccion futura = cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, uno, direccionActual);\r\n\t\tassertEquals(futura,Direccion.ABAJO);\r\n\r\n\t\tdireccionActual = Direccion.ARRIBA;\r\n\t\tfutura = cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, cuatro, direccionActual);\r\n\t\tassertEquals(futura,Direccion.ARRIBA);\r\n\r\n\t\tdireccionActual = Direccion.IZQUIERDA;\r\n\t\tfutura = cazar.haciaDondeIrDesdeUnaPosicionHastaOtraConDireccionActual(destino, nueve, direccionActual);\r\n\t\tassertEquals(Direccion.IZQUIERDA,futura);\t\t\r\n\t}",
"public boolean perdeu() {\n\t\tif(tabuleiro.getAtiradores().length==0)\n\t\t{\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public void reinitiallizeDistanceFunctionInside() {\n\t\tint i, j;\r\n\t\tfor (i = 0; i < _levelSet.length; i++) {\r\n\t\t\tfor (j = 0; j < _levelSet[i].length; j++) {\r\n\t\t\t\tint iPlus = imposeBorder(i + 1, _iSize);\r\n\t\t\t\tint iMinus = imposeBorder(i - 1, _iSize);\r\n\t\t\t\tint jPlus = imposeBorder(j + 1, _iSize);\r\n\t\t\t\tint jMinus = imposeBorder(j - 1, _iSize);\r\n\t\t\t\tif (_levelSet[i][j] <= 0) // // the check for points in region\r\n\t\t\t\t\t// // the check for points in border\r\n\t\t\t\t\tif (MatrixMath.anyNeighborIsOutside(_levelSet, i, j, iPlus,\r\n\t\t\t\t\t\t\tiMinus, jPlus, jMinus)) {\r\n\t\t\t\t\t\t// points in border are placed in narrowband\r\n\t\t\t\t\t\t// _narrowBandInside.add(new Location(i, j));\r\n\t\t\t\t\t\t_narrowBandInside.add(new Location(i, j));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// and location in distance matrix is set to infinite\r\n\t\t\t\t\t\t_levelSet[i][j] = Double.NEGATIVE_INFINITY;\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// iterate until narrow band is empty\r\n\t\t// OrderByLevelSetValue comparator = new OrderByLevelSetValue();\r\n\t\t// while (_narrowBandInside.size() > 0) {\r\n\t\twhile (_narrowBandInside.size() > 0) {\r\n\t\t\t// get the maximum value\r\n\t\t\t// Location maxVal = _narrowBandInside.last();\r\n\t\t\tLocation maxVal = _narrowBandInside.last();\r\n\t\t\t// System.out.println(\"maxVal \" + maxVal);\r\n\t\t\t// System.out.println(\"_narrowBandInside.contains(maxVal) \"\r\n\t\t\t// + _narrowBandInside.contains(maxVal));\r\n\t\t\t// System.out.println(\"maxVal.compareTo(maxVal) \"\r\n\t\t\t// + maxVal.compareTo(maxVal));\r\n\r\n\t\t\t// get the neighbors that are still in _faraway\r\n\t\t\tint iPlus = imposeBorder(maxVal.i + 1, _iSize);\r\n\t\t\tint iMinus = imposeBorder(maxVal.i - 1, _iSize);\r\n\t\t\tint jPlus = imposeBorder(maxVal.j + 1, _iSize);\r\n\t\t\tint jMinus = imposeBorder(maxVal.j - 1, _iSize);\r\n\t\t\ttransferNeighborInside(iPlus, maxVal.j);\r\n\t\t\ttransferNeighborInside(iMinus, maxVal.j);\r\n\t\t\ttransferNeighborInside(maxVal.i, jPlus);\r\n\t\t\ttransferNeighborInside(maxVal.i, jMinus);\r\n\t\t\t// remove the value from the narrowband\r\n\t\t\t// _narrowBandInside.remove(maxVal);\r\n\t\t\t_narrowBandInside.remove(maxVal);\r\n\t\t}\r\n\t\t// done\r\n\t}",
"private static boolean isDistanceOK(double[] diff) {\n\t\tfor (double d : diff) {\n\t\t\tif (Math.abs(d) > MAX_PIXEL_DISTANCE) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public void testtraduciraOSM()\n\t\t{\n\t\t\tTipoNodoLeisure tipo1 = new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.6\")); //$NON-NLS-1$\n\t\t\tTipoNodoLeisure tipo2= new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.7\")); //$NON-NLS-1$\n\t\t\tTipoNodoLeisure tipo3= new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.8\")); //$NON-NLS-1$\n\t\t\tif (tipo1.traduciraOSM(tipo1.getValorTipo())!=tipo1.traduciraOSM(tipo1.getValorTipo()))\n\t\t\t\tfail(Messages.getString(\"TipoNodoLeisureTest.9\")); //$NON-NLS-1$\n\t\t\tif (tipo1.traduciraOSM(tipo1.getValorTipo())!=tipo2.traduciraOSM(tipo2.getValorTipo()))\n\t\t\t\tfail(Messages.getString(\"TipoNodoLeisureTest.10\")); //$NON-NLS-1$\n\t\t\tif (tipo1.traduciraOSM(tipo1.getValorTipo())==tipo3.traduciraOSM(tipo3.getValorTipo()))\n\t\t\t\tfail(Messages.getString(\"TipoNodoLeisureTest.11\")); //$NON-NLS-1$\n\t\t}",
"protected boolean laufEinfach(){ \r\n\r\n\t\tint groessteId=spieler.getFigur(0).getPosition().getId();\r\n\t\tint figurId=0; // Figur mit der gr��ten ID\r\n\t\t\r\n\t\t\r\n\t\tfor(int i=1; i<4; i++)\r\n\t\t{ \r\n\t\t\tint neueId;\r\n\t\t\tneueId = spieler.getFigur(i).getPosition().getId() + spiel.getBewegungsWert();\r\n\t\t\tif(spieler.getFigur(i).getPosition().getTyp() != FeldTyp.Startfeld && groessteId<spieler.getFigur(i).getPosition().getId()){\r\n\t\t\t\tgroessteId=spieler.getFigur(i).getPosition().getId();\r\n\t\t\t\tfigurId=i;\r\n\t\t\t}\r\n\t\t\tneueId = spiel.ueberlauf(neueId, i);\r\n\t\t\tif (spieler.getFigur(i).getPosition().getTyp() == FeldTyp.Endfeld) {\r\n\t\t\t\tif (!spiel.zugGueltigAufEndfeld(neueId, i)) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tneueId = spieler.getFigur(i).getPosition().getId() + spiel.getBewegungsWert();\r\n\t\t\t\tif(spieler.getFigur(i).getPosition().getId() == spieler.getFigur(i).getFreiPosition()){\r\n\t\t\t\t\tif(!spiel.userIstDumm(neueId, i)){\r\n\t\t\t\t\t\tfigurId = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tfor(int j = 0; j < 4; j++){\r\n\t\t\t\t\t\t\tif(spieler.getFigur(j).getPosition().getId() == neueId){\r\n\t\t\t\t\t\t\t\tif(!spiel.userIstDumm(neueId+spiel.getBewegungsWert(), j)){\r\n\t\t\t\t\t\t\t\t\tfigurId = j;\r\n\t\t\t\t\t\t\t\t\tbreak;\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}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tspiel.bewege(figurId);\r\n\t\treturn true;\r\n\t}",
"public boolean isPerdu() {\n\t\tassert(f.getLevel() != null);\n\t\t\n\t\tLevel l = f.getLevel();\n\t\t\n\t\tif(l.getBall() == null) {//pour le menu principal -> pas de balle\n\t\t\treturn false;\n\t\t}\n\t\tif(l.getType() == Type.INVERSE) {\n\t\t\treturn l.getBall().getPosY()<50;//en haut de l'ecran\n\t\t}else {\n\t\t\treturn l.getBall().getPosY()>f.getHauteurFenetre()-50;//en bas de l'ecran\n\t\t}\n\t}",
"protected boolean matchData() {\n for (int i = 0; i < itsNumPoints; i++) {\n if (itsValues[i] == null || itsValues[i].getData() == null) {\n return false;\n }\n }\n return true;\n }",
"private void checkTargetsReachable(){\n\t\tPathfinder pathfinder = new Pathfinder(collisionMatrix);\n\t\tLinkedList<Node> removeList = new LinkedList<Node>();\n\t\tboolean pathWasFound = false;\n\t\tLinkedList<Node> currentPath;\n\t\tLinkedList<Node> reversePath;\n\t\t\n\t\t//Go through all starting positions\n\t\tfor(LinkedList<Node> startList : targets){\n\t\t\tprogress += 8;\n\t\t\tsetProgress(progress);\n\t\t\tfor(Node startNode : startList){\n\t\t\t\t\n\t\t\t\tboolean outsideMap = (startNode.getCollisionXPos(scaleCollision) < 0 || startNode.getCollisionXPos(scaleCollision) >= (collisionMatrix.length-1) || startNode.getCollisionYPos(scaleCollision) < 0 || startNode.getCollisionYPos(scaleCollision) >= (collisionMatrix.length-1));\n\t\t\t\t\n\t\t\t\tpathWasFound = false;\n\t\t\t\t//Make sure that target is inside of map\n\t\t\t\tif(!outsideMap){\n\t\t\t\t\t//Check against all target positions\n\t\t\t\t\tfor(LinkedList<Node> targetList : targets){\n\t\t\t\t\t\tfor(Node targetNode : targetList){\n\t\t\t\t\t\t\t//Only check against targets that have not already been marked as unreachable\n\t\t\t\t\t\t\tboolean selfCheck = (targetNode.getXPos() != startNode.getXPos() || targetNode.getYPos() != startNode.getYPos());\n\t\t\t\t\t\t\tif(!removeList.contains(targetNode) && selfCheck){\n\t\t\t\t\t\t\t\t//Check if this path has already been checked\n\t\t\t\t\t\t\t\tif(!preCalculatedPaths.containsKey(startNode.toStringCollision(scaleCollision) + \"-\" + targetNode.toStringCollision(scaleCollision))){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tcurrentPath = new LinkedList<Node>();\n\t\t\t\t\t\t\t\t\t//Check if a path can be found for this start and target node\n\t\t\t\t\t\t\t\t\tif(pathfinder.findPath(startNode.getCollisionXPos(scaleCollision), startNode.getCollisionYPos(scaleCollision), targetNode.getCollisionXPos(scaleCollision), targetNode.getCollisionYPos(scaleCollision), currentPath)){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif(Frame.USE_PRECALCULATED_PATHS)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tpreCalculatedPaths.put(startNode.toStringCollision(scaleCollision) + \"-\" + targetNode.toStringCollision(scaleCollision), currentPath);\n\t\t\t\t\t\t\t\t\t\t\treversePath = new LinkedList<Node>();\n\t\t\t\t\t\t\t\t\t\t\treversePath.addAll(currentPath);\n\t\t\t\t\t\t\t\t\t\t\tCollections.reverse(reversePath);\n\t\t\t\t\t\t\t\t\t\t\treversePath.removeFirst();\n\t\t\t\t\t\t\t\t\t\t\treversePath.add(startNode);\n\t\t\t\t\t\t\t\t\t\t\tpreCalculatedPaths.put(targetNode.toStringCollision(scaleCollision) + \"-\" + startNode.toStringCollision(scaleCollision) ,reversePath);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tpathWasFound = true;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\tpathWasFound = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//Remove nodes which we cannot find a path from\n\t\t\t\tif(!pathWasFound){\n\t\t\t\t\tremoveList.add(startNode);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Go through the remove list and remove unreachable nodes\n\t\tfor(Node node : removeList){\n\t\t\tfor(LinkedList<Node> startList : targets){\n\t\t\t\tstartList.remove(node);\n\t\t\t}\n\t\t}\n\t}",
"private static boolean esDirectorio(String ruta) {\n\t\tboolean b = false;\n\t\tFile f = new File(ruta);\n\t\tif (f.isDirectory()) {\n\t\t\tb = true;\n\t\t}\n\t\treturn b;\n\t}",
"private boolean checkLegbarkeit(Stein pStein){\n\n if (spielfeld.isEmpty()) //erster Stein, alles ist moeglich\n return true;\n\n //liegt schon ein Stein im Feld?\n spielfeld.toFirst();\n while(spielfeld.hasAccess()){\n Stein stein = spielfeld.getContent();\n if (pStein.gibZeile()==stein.gibZeile() && pStein.gibSpalte()==stein.gibSpalte())\n return false;\n spielfeld.next();\n }\n\n //bestimme alle Nachbarsteine\n java.util.List<Stein> oben = new ArrayList<>();\n java.util.List<Stein> rechts = new ArrayList<>();\n java.util.List<Stein> links = new ArrayList<>();\n java.util.List<Stein> unten = new ArrayList<>();\n\n findeNachbarSteine(pStein,oben, Richtung.oben);\n findeNachbarSteine(pStein,rechts, Richtung.rechts);\n findeNachbarSteine(pStein,unten, Richtung.unten);\n findeNachbarSteine(pStein,links, Richtung.links);\n\n if (oben.size()==0 && rechts.size()==0 && links.size()==0 && unten.size()==0) //keine Nachbar, Stein ins Nirvana gelegt\n return false;\n\n if(pruefeAufKonflikt(pStein,oben)) return false;\n if(pruefeAufKonflikt(pStein,rechts)) return false;\n if(pruefeAufKonflikt(pStein,unten)) return false;\n if(pruefeAufKonflikt(pStein,links)) return false;\n\n return true;\n }",
"private void verificaData() {\n\t\t\n\t}",
"boolean hasGeoTargets();",
"public boolean completed(){\n int count = 0;\n for(int Y=0; Y<size; Y++){\n for(int X=0; X<size; X++){\n if(tiles[X][Y] instanceof EindVeld){\n EindVeld tmp = (EindVeld)tiles[X][Y];\n if(tmp.hasDoos())\n count++;\n }\n }\n }\n \n if(eindVelden == count){\n System.out.println(\"DOOLHOF COMPLEET !!!\");\n return true;\n }else{\n return false;\n }\n }",
"private boolean multipleRoutes(StaticPacketTrace trace) {\n boolean multipleRoutes = false;\n IPCriterion ipCriterion = ((IPCriterion) trace.getInitialPacket().getCriterion(Criterion.Type.IPV4_DST));\n IpAddress ip = null;\n if (ipCriterion != null) {\n ip = ipCriterion.ip().address();\n } else if (trace.getInitialPacket().getCriterion(Criterion.Type.IPV6_DST) != null) {\n ip = ((IPCriterion) trace.getInitialPacket().getCriterion(Criterion.Type.IPV6_DST)).ip().address();\n }\n if (ip != null) {\n Optional<ResolvedRoute> optionalRoute = routeNib.longestPrefixLookup(ip);\n if (optionalRoute.isPresent()) {\n ResolvedRoute route = optionalRoute.get();\n multipleRoutes = routeNib.getAllResolvedRoutes(route.prefix()).size() > 1;\n }\n }\n return multipleRoutes;\n }",
"public boolean isLunas() {\n return isLunas;\n }",
"private void init() {\n visitado = new boolean[N+2][N+2];\n for (int x = 0; x < N+2; x++) visitado[x][0] = visitado[x][N+1] = true;\n for (int y = 0; y < N+2; y++) visitado[0][y] = visitado[N+1][y] = true;\n\n\n // todas las paredes levantadas\n norte = new boolean[N+2][N+2];\n este = new boolean[N+2][N+2];\n sur = new boolean[N+2][N+2];\n oeste = new boolean[N+2][N+2];\n for (int x = 0; x < N+2; x++)\n for (int y = 0; y < N+2; y++)\n norte[x][y] = este[x][y] = sur[x][y] = oeste[x][y] = true;\n }",
"boolean hasDestination();",
"boolean hasDestination();",
"boolean hasOriginFlightLeg();",
"public boolean verificaGeracaoDadosLeituraRota(FaturamentoGrupo faturamentoGrupo, Rota rota)\r\n\t\t\tthrows ControladorException {\r\n\r\n\t\tboolean retorno = false;\r\n\t\ttry {\r\n\r\n\t\t\tretorno = repositorioImovel.verificaGeracaoDadosLeituraRota(faturamentoGrupo, rota);\r\n\r\n\t\t} catch (ErroRepositorioException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t\tthrow new ControladorException(\"erro.sistema\", ex);\r\n\t\t}\r\n\r\n\t\treturn retorno;\r\n\t}",
"public boolean NoEnPantalla() {\n\t\treturn x + xmapa + anchura < 0 ||\n\t\t\t\tx + xmapa - anchura > PanelJuego.ANCHURA ||\n\t\t\t\ty + ymapa + altura < 0 ||\n\t\t\t\ty + ymapa - altura > PanelJuego.ALTURA;\n\t}",
"private boolean checkM(){\n if(currentLocation.x == previousLocation.x && currentLocation.y == previousLocation.y) {\n return false;\n }\n // Is outside the border\n if(currentLocation.x < size || currentLocation.y < size || currentLocation.x > map.numRows - size || currentLocation.y > map.numCols - size) {\n return false;\n }\n // Is on the land\n double angle2 = 0;\n while (angle2 < 6.3) {\n if (map.getTerrainGrid()[currentLocation.x + (int) (size/2 * cos(angle2))][currentLocation.y + (int) (size/2 * sin(angle2))] == Colors.OCEAN) {\n return false;\n }\n angle2 += 0.3;\n }\n return true;\n }",
"public boolean getLocationsFrom(double curLat, double curLon, Double num) {\r\n boolean locationsFromDB = true;\r\n String previousCurLat, previousCurLon;\r\n Log.d(\"Detailed analysis\",\"getting data from db, calling getdata function\");\r\n Cursor rs1 = myDB.getData(curLat, curLon, num);\r\n //In this condition if data not found locationsFromDB is set to false and then returned\r\n if (rs1.getCount() <= 0){\r\n System.out.println(rs1.getCount());\r\n locationsFromDB = false;\r\n Log.d(\"Detailed analysis\",\"Data not found\");\r\n }\r\n //In this condition if data is found need to do the further action of finding the user has moved or not and calculating the direction and distance if user has moved\r\n else {\r\n Log.d(\"Detailed analysis\", \"data found\");\r\n Double[] latArray = new Double[rs1.getCount()];\r\n Double[] lonArray = new Double[rs1.getCount()];\r\n int z = 0;\r\n double distanceBtwLocations = 0;\r\n double finalLat = 0.0;\r\n double finalLon = 0.0;\r\n while (rs1.moveToNext()) {\r\n latArray[z] = Double.parseDouble(rs1.getString(rs1.getColumnIndex(DBHelper.Locations_COLUMN_lat)));\r\n lonArray[z] = Double.parseDouble(rs1.getString(rs1.getColumnIndex(DBHelper.Locations_COLUMN_lon)));\r\n Log.d(\"Detailed Analysis\", latArray[z] +\", \" + lonArray[z] );\r\n double tempDistance = findDistanceBetweenPoints(latArray[z], lonArray[z], Math.round(curLat * 10000.0) / 10000.0, Math.round(curLon * 10000.0) / 10000.0);\r\n System.out.println(tempDistance + \" : tempDistance\");\r\n if (distanceBtwLocations < tempDistance) {\r\n finalLat = latArray[z];\r\n finalLon = lonArray[z];\r\n distanceBtwLocations = tempDistance;\r\n System.out.println(distanceBtwLocations + \" : distanceBtwLocations\");\r\n }\r\n z++;\r\n }\r\n if (distanceBtwLocations < 100 * 1606.34) {\r\n Log.d(\"Detailed Analysis\", \"Distance is not greater than 100 miles\");\r\n previousCurLat = String.valueOf(finalLat);//rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_lat));\r\n previousCurLon = String.valueOf(finalLon);//rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_lon));\r\n Cursor rs = myDB.getData(finalLat, finalLon, num);\r\n rs.moveToFirst();\r\n// condChoice = Integer.parseInt(rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_condChoice)));\r\n number = Double.parseDouble(rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_num)));\r\n Log.d(\"Detailed Analysis\", \"number while data found: \" + number);\r\n Log.d(\"Detailed Analysis\", \"Recent number value from getLocationsFrom: \" + number);\r\n Log.d(\"Detailed analysis\", \"Lattittude and Longitude points\" + \" \" + Double.parseDouble(previousCurLat) + \",\" + Double.parseDouble(previousCurLon) + \":\" + Math.round(curLat * 10000.0) / 10000.0 + \",\" + Math.round(curLon * 10000.0) / 10000.0);\r\n //if user has not moved then locationsFromDB is set to true and then returned\r\n if (Double.parseDouble(previousCurLat) == Math.round(curLat * 10000.0) / 10000.0 && Double.parseDouble(previousCurLon) == Math.round(curLon * 10000.0) / 10000.0) {\r\n Log.d(\"Detailed analysis\", \"lattitudes and longitudes are same\");\r\n rs.moveToFirst();\r\n locationValues = rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_results));\r\n locationsFromDB = true;\r\n } else {\r\n Log.d(\"Detailed analysis\", \"lattitudes and longitudes are not same\");\r\n float distance = 0;\r\n LatLng movedPoints;\r\n Log.d(\"Detailed analysis\", \"finding distance between lattitudes and longitudes\");\r\n distance = findDistanceBetweenPoints(Double.parseDouble(previousCurLat), Double.parseDouble(previousCurLon), curLat, curLon);\r\n Log.d(\"Detailed Analysis\", \"distance in meters\" + \" \" + distance);\r\n direction = SphericalUtil.computeHeading(new LatLng(Double.parseDouble(previousCurLat), Double.parseDouble(previousCurLon)), new LatLng(curLat, curLon));\r\n Log.d(\"Detailed Analysis\", \"direction in degrees\" + \" \" + direction);\r\n String values = rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_results));\r\n String valuesArray[] = values.split(\":\");\r\n Log.d(\"Detailed analysis\", \"finding random locations after moving a bit\");\r\n for (int i = 0; i < valuesArray.length; i++) {\r\n String pointsArray[] = valuesArray[i].split(\",\");\r\n Log.d(\"Detailed analysis\", \"lattitudes and longitudes points\" + pointsArray[0] + \" \" + pointsArray[1]);\r\n movedPoints = findMovedPoints(Double.parseDouble(pointsArray[0]), Double.parseDouble(pointsArray[1]), distance, direction);\r\n Log.d(\"Detailed Analysis\", \"latitude and longitude points after moving\" + \" \" + movedPoints);\r\n locationValues = findRandomLocations(movedPoints.latitude, movedPoints.longitude, 1, distance + 1);\r\n }\r\n }\r\n }\r\n else{\r\n locationValues = findRandomLocations(curLat, curLon, num, 30);\r\n }\r\n locationsFromDB = true;\r\n }\r\n return locationsFromDB;\r\n }",
"private static void checkPortDirections(Netlist netlist) throws UnsupportedGrammerException {\n\n\t\tfor (Map.Entry<String, Port> entry : netlist.ports.entrySet()) {\n\n\t\t\tif (entry.getValue().direction == PinDirection.UNKONWN) {\n\n\t\t\t\tString msg = String.format(ERR_MSG_3, entry.getValue().id);\n\n\t\t\t\tfail(msg);\n\n\t\t\t}\n\n\t\t}\n\t}",
"private boolean checkNearbyVillagers() {\n\t\tIterator<Integer> it = sprites.keySet().iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tSprite as = sprites.get(it.next());\n\t\t\tif (as instanceof Villager) {\n\t\t\t\tVillager v = (Villager) as;\n\t\t\t\tif (v.checkTalkable(player.pos, player.direction)) {\n\t\t\t\t\treturn executeTalkableVillager(v);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"private boolean hayRayaVertical() {\n for (int j = 0; j < casillas[0].length; j++) {\n Casilla[] columna = new Casilla[casillas.length];\n for (int i = 0; i < casillas.length; i++) {\n columna[i] = casillas[i][j];\n }\n if (linea(columna))\n return true;\n }\n\n return false;\n }",
"private ArrayList<Location> canMoveInit() {\n if (last == null) {\n ArrayList<Location> firstList = new ArrayList<>();\n firstList.add(getLocation());\n firstList.add(null);\n crossLocation.push(firstList);\n }\n if (crossLocation.empty() || isEnd) {\n return null;\n }\n Grid gr = getGrid();\n if (gr == null) {\n return null;\n }\n last = getLocation();\n return getValid(getLocation());\n }",
"private List<Node> findBranchsMesh()\r\n\t{\t\r\n\t\t// Nos que fecham o laco\r\n\t\tList<Node> nodes = new ArrayList<>();\r\n\t\t\r\n\t\tfor (Entry<String, Integer> value : cacheDestinationNodes.entrySet())\r\n\t\t{\r\n\t\t\t// No possui mais de um arco chegando (ANEL!)\r\n\t\t\tif (value.getValue() > 1)\r\n\t\t\t{\r\n\t\t\t\tString label = value.getKey();\r\n\t\t\t\tNode node = cacheNodes.get(label);\r\n\t\t\t\tnodes.add(node);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// nodes > 1 indica que esta rede possui anel\r\n\t\treturn nodes; \r\n\t}",
"private boolean atLeastOneNonWallLocation() {\n\t\tfor (int x = 0; x < this.map.getMapWidth(); x++) {\n\t\t\tfor (int y = 0; y < this.map.getMapHeight(); y++) {\n\n\t\t\t\tif (this.map.getMapCell(new Location(x, y)).isWalkable()) {\n\t\t\t\t\t// If it's not a wall then we can put them there\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"private static Boolean deplacementL(int initialLigne, int initialColonne, int destinationLigne, int destinationColonne) {\n return ((Math.abs(initialLigne - destinationLigne) == 2 && Math.abs(initialColonne - destinationColonne) == 1) || (Math.abs(initialLigne - destinationLigne) == 1 && Math.abs(initialColonne - destinationColonne) == 2));\n }",
"public boolean completa(){\n for(int i = 0; i < 9; i++){\n for (int j = 0; j < 9; j++){\n if(!verificaLinhaEColuna(i,j) || !verificaQuadrante(i,j) || matriz[i][j] == 0){\n return false;\n }\n\n }\n }\n\n return true;\n }",
"public void testFilaInferiorLlena( )\n {\n setupEscenario1( );\n triqui.limpiarTablero( );\n triqui.marcarCasilla( 7, marcaJugador1 );\n triqui.marcarCasilla( 8, marcaJugador1 );\n triqui.marcarCasilla( 9, marcaJugador1 );\n assertTrue( triqui.filaInferiorLlena( marcaJugador1 ) );\n assertTrue( triqui.ganoJuego( marcaJugador1 ) );\n }",
"public boolean verificarLongitudCamposIPNode(TextField campoIPNode1, TextField campoIPNode2, TextField campoIPNode3, TextField campoIPNode4) {\n boolean camposCorrectos = true;\n if (campoIPNode1.getText().length() > 3 || campoIPNode2.getText().length() > 3 || campoIPNode3.getText().length() > 3 || campoIPNode4.getText().length() > 3) {\n camposCorrectos = false;\n }\n return camposCorrectos;\n }",
"private boolean revisar(GrafoAristaPonderada G) {\n\n // check peso\n double pesoTotal = 0.0;\n for (Arista a : aristas()) {\n pesoTotal += a.peso();\n }\n if (Math.abs(pesoTotal - peso()) > EPSILON_PUNTO_FLOTANTE) {\n System.err.printf(\n \"Peso de la aristas no es igual a peso(): %f vs. %f\\n\",\n pesoTotal, peso());\n return false;\n }\n\n // check that it is acyclic\n UF uf = new UF(G.V());\n for (Arista e : aristas()) {\n int v = e.unVertice(), w = e.otroVertice(v);\n if (uf.estanConectados(v, w)) {\n System.err.println(\"No es un bosque\");\n return false;\n }\n uf.union(v, w);\n }\n\n // check that it is a spanning forest\n for (Arista a : G.aristas()) {\n int v = a.unVertice(), w = a.otroVertice(v);\n if (!uf.estanConectados(v, w)) {\n System.err.println(\"No es un bosque de expansion\");\n return false;\n }\n }\n\n // check that it is a minimal spanning forest (cut optimality conditions)\n for (Arista a : aristas()) {\n\n // all aristas in MST except a\n uf = new UF(G.V());\n for (Arista o : aristas()) {\n int x = o.unVertice(), y = o.otroVertice(x);\n if (o != a) uf.union(x, y);\n }\n\n // check that e is min peso edge in crossing cut\n for (Arista o : G.aristas()) {\n int x = o.unVertice(), y = o.otroVertice(x);\n if (!uf.estanConectados(x, y)) {\n if (o.peso() < a.peso()) {\n System.err.println(\"Arista \" + o + \n \" viola las condiciones de optimalidad\"\n + \"del corte\");\n return false;\n }\n }\n }\n\n }\n\n return true;\n }",
"private static boolean nivelPasado() {\r\n\t\tint[] contPelotas = new int[ COLORES_POSIBLES.length ]; // Contadores por color\r\n\t\tfor (int i=0; i<tablero.size(); i++) {\r\n\t\t\tPelota pelota = tablero.getPelota(i);\r\n\t\t\tint contColor = Arrays.asList(COLORES_POSIBLES).indexOf( pelota.getColor() ); // Posición del color de la pelota en el array de contadores\r\n\t\t\tcontPelotas[contColor]++;\r\n\t\t}\r\n\t\tfor (int contador : contPelotas) if (contador>=tamanyoTablero-2) return false;\r\n\t\treturn true;\r\n\t}",
"public boolean hasLandList() {\r\n return hasLandList;\r\n }",
"public void findValidMoveDirections(){\n\t\t\n\t\tif(currentTile == 2 && (tileRotation == 0 || tileRotation == 180)){ // in vertical I configuration\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = false; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S: T E,W: F\");\n\t\t}\n\t\telse if(currentTile == 2 && (tileRotation == 90 || tileRotation == 270)){ // in horizontal I configuration\n\t\t\tcanMoveNorth = false; canMoveSouth = false;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S: F E,W: T\");\n\t\t}\n\t\t\n\t\t\n\t\telse if(currentTile == 3 && tileRotation == 0){ // L rotated 0 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = false;\n\t\t\tcanMoveEast = true; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,E: T S,W: F\");\n\t\t}\n\t\telse if(currentTile == 3 && tileRotation == 90){ // L rotated 90 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = false;\n\t\t\tcanMoveEast = false; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,W: T S,E: F\");\n\t\t}\n\t\telse if(currentTile == 3 && tileRotation == 180){ // L rotated 180 degrees\n\t\t\tcanMoveNorth = false; canMoveSouth = true;\n\t\t\tcanMoveEast = false; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" S,W: T N,E: F\");\n\t\t}\n\t\telse if(currentTile == 3 && tileRotation == 270){ // L rotated 270 degrees\n\t\t\tcanMoveNorth = false; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" S,E: T N,W: F\");\n\t\t}\n\t\t\n\t\t\n\t\telse if(currentTile == 4 && tileRotation == 0){ // T rotated 0 degrees\n\t\t\tcanMoveNorth = false; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" S,W,E: T N: F\");\n\t\t}\n\t\telse if(currentTile == 4 && tileRotation == 90){ // T rotated 90 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S,E: T W: F\");\n\t\t}\n\t\telse if(currentTile == 4 && tileRotation == 180){ // T rotated 180 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = false;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,W,E: T S: F\");\n\t\t}\n\t\telse if(currentTile == 4 && tileRotation == 270){ // T rotated 270 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = false; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S,W: T E: F\");\n\t\t}\n\t\telse if(currentTile == 5){ //in plus tile\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S,W,E: T\");\n\t\t}\n\t\t\n\t}",
"@Override\n public boolean isFinished() {\n double[] positions = drivetrain.getPositions();\n\n return Math.abs(positions[0] - targetDistance) <= allowedError && Math.abs(positions[1] - targetDistance) <= allowedError;\n }",
"private boolean revisar(DigrafoAristaPonderada G) {\n\n // edge-weighted digraph is cyclic\n if (tieneCiclo()) {\n // verify ciclo\n AristaDirigida primero = null, ultimo = null;\n for (AristaDirigida a : ciclo()) {\n if (primero == null) primero = a;\n if (ultimo != null) {\n if (ultimo.hacia() != a.desde()) {\n System.err.printf(\n \"aristas de ciclo %s and %s no incidentes\\n\",\n ultimo, a);\n return false;\n }\n }\n ultimo = a;\n }\n\n if (ultimo.hacia() != primero.desde()) {\n System.err.printf(\n \"aristas de ciclo %s and %s no incidentes\\n\", \n ultimo, primero);\n return false;\n }\n }\n\n\n return true;\n }",
"public boolean checkRapelState () { return noOfRapels > 0; }",
"public boolean existsCollisionHorizontal(Ficha ficha, Vector2D direction){\n\t\t//System.out.println(\"existsCollisionHorizontal\");\n\t\tboolean result = false;\n\t\t\n\t\t\n\t\tVector2D positionFicha = ficha.position;\n\t\tint medidaLado = GenericGame.getMedidaLado();\n\t\t\n\t\tint [][] matriz = ficha.getFicha();\n\t\n\t\n\n\t\tif(direction.getX() > 0){\n\t\t\t//al mover a la derecha \n\t\t\t\n\t\t\tint minimum = (matrizTablero[0].length - matriz[0].length);\n\t\t\t\n\t\t\tint im = (int) (positionFicha.getX() / medidaLado);\n\t\t\tint jm = (int) (positionFicha.getY() / medidaLado);\n\t\t\t\n\t\t\tif(im+1 <= minimum){\n\t\t\t\tim += 1;\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t \n\t\t\t/*\n\t\t\tfor(int i = jm ; i<jm+matriz.length && !result;i++ ){\n\t\t\t\tSystem.out.println(\"i \"+ i + \" im \"+im + \" posicion X \" + positionFicha.getX() + \" posicion Y \" + positionFicha.getY());\n\t\t\t\t\n\t\t\t\tresult = \tmatrizTablero[i][im] !=0;\n\t\t\t}*/\n\t\t\tfor(int i=0; i< matriz.length&&!result;i++)\n\t\t\t{\n\t\t\t\tfor(int j=0; j< matriz[0].length && !result;j++)\n\t\t\t\t{\n\t\t\t\t\ttry{\n\t\t\t\t\t\t//System.out.print(\"i\"+i+\",j\"+j);\n\t\t\t\t\t\n\t\t\t\t\t\tif(matriz[i][j]!= 0 )\n\t\t\t\t\t\tresult =\tmatrizTablero[jm+i][im+j] != 0;\n\t\t\t\t\t\t\n\t\t\t\t\t}catch (Exception e) {\n\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t\tSystem.out.println(\"ERROR \"+(jm+i)+\" \"+(im+j));\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t//\tSystem.out.println();\n\t\t\t}\n\t\t\t\n\t\t}else if(direction.getX() < 0){\n\t\t\t// al mover a la izquerda \n\t\t\tint im = (int) (positionFicha.getX() / medidaLado)-1;\n\t\t\tint jm = (int) (positionFicha.getY() / medidaLado);\n\t\t\t\n\t\t\t//System.out.println(\"im \"+ im + \" jm \"+jm + \" posicion X \" + positionFicha.getX() + \" posicion Y \" + positionFicha.getY());\n\t\t\t\n\t\t\n\t\t\tfor(int i=0; i< matriz.length&&!result;i++)\n\t\t\t{\n\t\t\t\tfor(int j=0; j< matriz[0].length && !result;j++)\n\t\t\t\t{\n\t\t\t\t\ttry{\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(matriz[i][j]!= 0 )\n\t\t\t\t\tresult =\tmatrizTablero[jm+i][im+j] != 0;\n\t\t\t\t\t}catch (Exception e) {\n\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t\tSystem.out.println((jm+i)+\" \"+(im+j));\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\tfor(int i = jm ; i<jm+matriz.length&& !result;i++ ){\n\t\t\t\tSystem.out.println(\"i \"+ i + \" im \"+im + \" posicion X \" + positionFicha.getX() + \" posicion Y \" + positionFicha.getY());\n\t\t\t\t\n\t\t\t\tresult = \tmatrizTablero[i][im] !=0;\n\t\t\t}*/\n\t\t}\n\t\t\n\t\t\n\t\treturn result;\n\t\n\t}",
"private boolean hayTorretas(int x1,int x2){\r\n\t\tboolean ret = false;\r\n\t\tint i = 0;\r\n\t\twhile(!ret && i < torretas.size()){\r\n\t\t\tTorreta aux = (Torreta) torretas.get(i);\r\n\t\t\tret = aux.getX() > x1 && aux.getX() < x2;\r\n\t\t\ti++;\r\n\t\t}\r\n\t\treturn ret;\r\n\t}",
"public ArrayList<Location> getValid(Location loc) {\r\n Grid<Actor> gr = getGrid();\r\n if (gr == null) {\r\n return null;\r\n }\r\n ArrayList<Location> valid = new ArrayList<Location>();\r\n // 向上右下左四个方向找\r\n int dirs[] = {\r\n Location.AHEAD, Location.RIGHT, Location.HALF_CIRCLE,\r\n Location.LEFT };\r\n for (int i = 0; i < dirs.length; i++) {\r\n Location tarLoc = loc.getAdjacentLocation(dirs[i]);\r\n if (gr.isValid(tarLoc)) {\r\n if (gr.get(tarLoc) == null) {\r\n valid.add(tarLoc);\r\n }\r\n }\r\n }\r\n return valid;\r\n }",
"public boolean allReturnFlightsNonstop() {\n\t\tMap<String,Flight> allflights = getAllReturnFlights();\n\t\tfor (String flightNumber:allflights.keySet() ) {\n\t\t\tFlight flight = allflights.get(flightNumber);\n\t\t\tif (!flight.getStop().equalsIgnoreCase(\"nonstop\"))\n\t\t\t\treturn false;\t\t\t\n\t\t}\n\t\t\t\n\t\t\treturn true;\n\t}",
"private boolean distanciaPuntos(int x, int y, int di){\r\n\t\tdouble distancia = Math.sqrt((x-this.x)*(x-this.x) + (y-this.y)*(y-this.y));\r\n\t\treturn distancia <= (di+this.diameter);\r\n\t}",
"private boolean sortieNonAtteint(){\n\t\t\t//return this.terrainDeLaPartie.getTerrain()[this.terrainDeLaPartie.getAbSortie()][this.terrainDeLaPartie.getOrdSortie()]!='R' ;\t\t\t\n\t\t\tif(this.terrainDeLaPartie.getTerrain()[terrainDeLaPartie.getAbSortie()][terrainDeLaPartie.getOrdSortie()]=='R'){\n\t\t\t\tSystem.out.println(\"###################################### SORTIE #################################\");\n\t\t\t}\n\t\t\treturn this.terrainDeLaPartie.getTerrain()[terrainDeLaPartie.getAbSortie()][terrainDeLaPartie.getOrdSortie()]!='R';\n\t\t}",
"public boolean isMostrarBasesDetalle()\r\n/* 592: */ {\r\n/* 593:638 */ return this.mostrarBasesDetalle;\r\n/* 594: */ }",
"void updateDistMatrix(long timeStamp) {\n\n\t\t\t// for each alive landmark, when its ping results are received by\n\t\t\t// the source node,\n\t\t\t// we start the clustering computation process\n\t\t\t// TODO: remove landmarks that return a subset of results 10-12\n\t\t\tLong timer = Long.valueOf(timeStamp);\n\n\t\t\tif (!pendingHSHLandmarks.containsKey(timer)\n\t\t\t\t\t|| pendingHSHLandmarks.get(timer).IndexOfLandmarks == null) {\n\t\t\t\tSystem.err.println(\"$: Null elements!\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tHSHRecord CurList = pendingHSHLandmarks.get(timer);\n\t\t\tint NoOfLandmarks = CurList.IndexOfLandmarks.size();\n\t\t\tif(NoOfLandmarks<=0){\n\t\t\t\tSystem.err.println(\"$: Empty elements!\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tHashMap<AddressIF, ArrayList<RemoteState<AddressIF>>> LatRecords = CurList.pendingLandmarkLatency;\n\t\t\tif (LatRecords == null) {\n\t\t\t\tSystem.err\n\t\t\t\t\t\t.println(\"$: Null HashMap<AddressIF, ArrayList<RemoteState<AddressIF>>> LatRecords!\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tint receivedLandmarks = LatRecords.keySet().size();\n\t\t\t// empty or incomplete records\n\t\t\tif (LatRecords.isEmpty() || receivedLandmarks < 0.8 * NoOfLandmarks) {\n\t\t\t\tSystem.err.println(\"$: Null LatRecords!\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"$: HSH: total landmarks: \" + NoOfLandmarks\n\t\t\t\t\t+ \", received from \" + receivedLandmarks);\n\t\t\t// use the IndexOfLandmarks as the index of nodes\n\n\t\t\tif (CurList.DistanceMatrix == null\n\t\t\t\t\t|| CurList.DistanceMatrix.length != NoOfLandmarks) {\n\t\t\t\tCurList.DistanceMatrix = null;\n\t\t\t\tCurList.DistanceMatrix = new double[NoOfLandmarks][NoOfLandmarks];\n\t\t\t\tfor (int i = 0; i < NoOfLandmarks; i++) {\n\t\t\t\t\tfor (int j = 0; j < NoOfLandmarks; j++) {\n\t\t\t\t\t\tCurList.DistanceMatrix[i][j] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// fill elements\n\t\t\tIterator<Entry<AddressIF, ArrayList<RemoteState<AddressIF>>>> entrySet = LatRecords\n\t\t\t\t\t.entrySet().iterator();\n\n\t\t\twhile (entrySet.hasNext()) {\n\t\t\t\tEntry<AddressIF, ArrayList<RemoteState<AddressIF>>> tmp = entrySet\n\t\t\t\t\t\t.next();\n\t\t\t\t// empty lists\n\t\t\t\tif (tmp.getValue() == null || tmp.getValue().size() == 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// ===============================================================\n\t\t\t\tAddressIF srcNode = tmp.getKey();\n\t\t\t\t// find the index of landmarks\n\t\t\t\tint from = CurList.IndexOfLandmarks.indexOf(srcNode);\n\t\t\t\tIterator<RemoteState<AddressIF>> ier = tmp.getValue()\n\t\t\t\t\t\t.iterator();\n\t\t\t\tif (from < 0) {\n\t\t\t\t\t// already removed landmarks!\n\t\t\t\t\tSystem.out.println(\"already removed landmarks!\");\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\twhile (ier.hasNext()) {\n\t\t\t\t\tRemoteState<AddressIF> NP = ier.next();\n\n\t\t\t\t\tif (!CurList.IndexOfLandmarks.contains(NP.getAddress())) {\n\t\t\t\t\t\t// not landmarks\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tint to = CurList.IndexOfLandmarks.indexOf(NP.getAddress());\n\n\t\t\t\t\tdouble rtt = NP.getSample();\n\t\t\t\t\tif (to < 0 || rtt < 0) {\n\t\t\t\t\t\tSystem.err.println(\"$: failed to find the landmarks!\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// System.out.print(\" <\"+to+\", \"+from+\", \"+rtt+\"> \");\n\t\t\t\t\t\t// Note: symmetric RTT\n\t\t\t\t\t\tif (CurList.DistanceMatrix[to][from] > 0) {\n\t\t\t\t\t\t\tdouble avgRTT;\n\t\t\t\t\t\t\tif (rtt > 0) {\n\t\t\t\t\t\t\t\tavgRTT = (rtt + CurList.DistanceMatrix[to][from]) / 2;\n\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tavgRTT = CurList.DistanceMatrix[to][from];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tCurList.DistanceMatrix[from][to] = avgRTT;\n\t\t\t\t\t\t\tCurList.DistanceMatrix[to][from] = avgRTT;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// TODO: missing elements\n\t\t\t\t\t\t\tCurList.DistanceMatrix[from][to] = rtt;\n\t\t\t\t\t\t\tCurList.DistanceMatrix[to][from] = rtt;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// ======================================================\n\n\t\t\tboolean markZero = false;\n\t\t\tfor (int i = 0; i < NoOfLandmarks; i++) {\n\t\t\t\tint sum = 0;\n\t\t\t\tfor (int column = 0; column < NoOfLandmarks; column++) {\n\t\t\t\t\tif (i == column) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (CurList.DistanceMatrix[i][column] > 0) {\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (sum < 0.7 * NoOfLandmarks) {\n\t\t\t\t\tmarkZero = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (markZero) {\n\t\t\t\t// CurList.DistanceMatrix=null;\n\t\t\t\tSystem.err.println(\"$: incomplete CurList.DistanceMatrix!\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"\\n\\n$: HSH: Start HSH clustering computation process!\");\n\n\t\t\t// TODO: find accurate clustering number\n\t\t\tint cluNum = MatrixOps.findClusteringNum(CurList.DistanceMatrix);\n\n\t\t\tif(cluNum<=0){\n\t\t\t\tSystem.err.println(\"the clustering number is <=0\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t// version control for dimensions\n\t\t\tif (CurList.S != null && CurList.S.length == cluNum) {\n\n\t\t\t} else {\n\t\t\t\tCurList.version = System.currentTimeMillis();\n\t\t\t}\n\n\t\t\t// initialize the matrixes for computation\n\t\t\tCurList.H = new double[NoOfLandmarks][cluNum];\n\t\t\tCurList.S = new double[cluNum][cluNum];\n\t\t\t// CurList.Coord = new double[cluNum];\n\t\t\tfor (int i = 0; i < NoOfLandmarks; i++) {\n\t\t\t\tfor (int j = 0; j < cluNum; j++) {\n\t\t\t\t\tCurList.H[i][j] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (int i = 0; i < cluNum; i++) {\n\t\t\t\tfor (int j = 0; j < cluNum; j++) {\n\t\t\t\t\tCurList.S[i][j] = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// update coordinate vectors\n\t\t\tMatrixOps.symmetric_NMF(NoOfLandmarks, cluNum,\n\t\t\t\t\tCurList.DistanceMatrix, CurList.H, CurList.S);\n\t\t\tCurList.alreadyComputedClustering = true;\n\n\t\t\t// TODO: H,S is Null\n\t\t\tif (CurList.H == null || CurList.S == null) {\n\t\t\t\tSystem.err.println(\"$: after HSH computation, NULL results!\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// after centralized computation, the core node should send its H &\n\t\t\t// S to all the landmark nodes\n\t\t\tissueCoords(timeStamp, CurList.IndexOfLandmarks, new CB1<String>() {\n\t\t\t\tprotected void cb(CBResult ncResult, String errorString) {\n\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t.println(\"Core node has issued its H & S to all landmarks.\");\n\t\t\t\t}\n\t\t\t});\n\t\t}",
"public boolean souvislost(){\n\t\t\n\t\tif(pole.size() != pocetVrcholu){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t\t\n\t}",
"public ArrayList<Location> getValid(Location loc) {\n\n\tGrid<Actor> grid = getGrid();\n\tif (grid == null)\n\t return null;\n\n\tArrayList<Location> valid = new ArrayList<Location>();\n\tArrayList<Location> lastNode = crossLocation.peek();\n\tint[] dirs =\n { Location.SOUTH, Location.NORTH, Location.EAST, Location.WEST };\n\n\t// get the empty and valid location in the desire directions\n for (int d : dirs) {\n\n\t Location neighborLoc = loc.getAdjacentLocation(getDirection() + d);\n\t\t if (!lastNode.contains(neighborLoc) && grid.isValid(neighborLoc)) {\n\t\t\t\n\t\t\tActor actor = (Actor) grid.get(neighborLoc);\n\t\t\tif (grid.get(neighborLoc) == null || actor instanceof Flower) {\n\t\t\t \n\t\t\t valid.add(neighborLoc);\n\t\t\t} \n\t\t\n\t\t\tif (actor instanceof Rock && actor.getColor() == Color.RED) {\n\t\t\t\n\t\t\t isEnd = true;\n\t\t\t}\n\t\t }\n\t }\n\t \n\t\treturn valid;\n }",
"private boolean hayRayaDiagonal() {\n // Diagonal principal (i==j)\n Casilla[] diagonalPri = new Casilla[casillas.length];\n for (int i = 0; i < casillas.length; i++) {\n diagonalPri[i] = casillas[i][i];\n }\n if (linea(diagonalPri))\n return true;\n\n // Diagonal secundaria (i==(j=i-1))\n Casilla[] diagonalSec = new Casilla[casillas.length];\n for (int i = 0; i < casillas.length; i++) {\n diagonalSec[i] = casillas[i][casillas.length-1-i];\n }\n\n return linea(diagonalSec);\n }",
"boolean isDirected();",
"public boolean lt()\n {\n //definir dados\n int i, j;\n int lin, col; \n boolean answer = true;\n \n //obter dimensoes\n lin = lines();\n col = columns();\n \n //verificar se tabela e' valida\n if(table == null || lin <= 0 || col <= 0)\n {\n System.out.println(\"ERRO: Matriz e/ou linhas ou colunas invalidas. \");\n } //end\n else\n {\n //verificar se ha' matriz e' quadrada\n if(lin == col)\n {\n for(i = 0; i < lin; i++)\n {\n for(j = 0; j < col; j++)\n {\n if(i < j)\n {\n answer = (IO.getString(table[i][j]).equals((\"0\"))) && answer;\n } //end\n } //end repetir\n } //end repetir\n } //end\n } //end se\n //retornar resposta\n return( answer );\n }",
"boolean hasRouteDest();",
"public void verEstadoAmarres() {\n System.out.println(\"****************************************************\");\n for(int posicion = 0; posicion<NUMERO_AMARRES; posicion++) {\n int i = 0;\n boolean posicionEncontrada = false;\n while(!posicionEncontrada && i<alquileres.size()) {\n if(alquileres.get(i)!=null) {\n if(alquileres.get(i).getPosicion()==posicion) {\n System.out.println(\"Amarre [\"+posicion+\"] está ocupado\");\n System.out.println(\"Precio: \" + alquileres.get(i).getCosteAlquiler());\n posicionEncontrada = true;\n }\n }\n i++;\n }\n if(!posicionEncontrada) {\n System.out.println(\"Amarre [\"+posicion+\"] No está ocupado\");\n }\n }\n System.out.println(\"****************************************************\");\n }",
"public boolean hasEqualMapping(DetArqueoRunt valueObject) {\r\n\r\n if (valueObject.getIDDETARQUEO() != this.IDDETARQUEO) {\r\n return(false);\r\n }\r\n if (this.FAC_VLT == null) {\r\n if (valueObject.getFAC_VLT() != null)\r\n return(false);\r\n } else if (!this.FAC_VLT.equals(valueObject.getFAC_VLT())) {\r\n return(false);\r\n }\r\n if (valueObject.getIDPAGORUNT() != this.IDPAGORUNT) {\r\n return(false);\r\n }\r\n if (this.FAC_NRO == null) {\r\n if (valueObject.getFAC_NRO() != null)\r\n return(false);\r\n } else if (!this.FAC_NRO.equals(valueObject.getFAC_NRO())) {\r\n return(false);\r\n }\r\n if (this.FECHAPAGOFACTURA == null) {\r\n if (valueObject.getFECHAPAGOFACTURA() != null)\r\n return(false);\r\n } else if (!this.FECHAPAGOFACTURA.equals(valueObject.getFECHAPAGOFACTURA())) {\r\n return(false);\r\n }\r\n if (this.VALORPAGOMT == null) {\r\n if (valueObject.getVALORPAGOMT() != null)\r\n return(false);\r\n } else if (!this.VALORPAGOMT.equals(valueObject.getVALORPAGOMT())) {\r\n return(false);\r\n }\r\n if (this.VALORPAGORUNT == null) {\r\n if (valueObject.getVALORPAGORUNT() != null)\r\n return(false);\r\n } else if (!this.VALORPAGORUNT.equals(valueObject.getVALORPAGORUNT())) {\r\n return(false);\r\n }\r\n if (this.COD_CAJERO == null) {\r\n if (valueObject.getCOD_CAJERO() != null)\r\n return(false);\r\n } else if (!this.COD_CAJERO.equals(valueObject.getCOD_CAJERO())) {\r\n return(false);\r\n }\r\n if (this.NOM_CAJERO == null) {\r\n if (valueObject.getNOM_CAJERO() != null)\r\n return(false);\r\n } else if (!this.NOM_CAJERO.equals(valueObject.getNOM_CAJERO())) {\r\n return(false);\r\n }\r\n if (valueObject.getID_ARQUEO() != this.ID_ARQUEO) {\r\n return(false);\r\n }\r\n if (this.VLR_BASE == null) {\r\n if (valueObject.getVLR_BASE() != null)\r\n return(false);\r\n } else if (!this.VLR_BASE.equals(valueObject.getVLR_BASE())) {\r\n return(false);\r\n }\r\n if (this.IDUSRPAGA == null) {\r\n if (valueObject.getIDUSRPAGA() != null)\r\n return(false);\r\n } else if (!this.IDUSRPAGA.equals(valueObject.getIDUSRPAGA())) {\r\n return(false);\r\n }\r\n if (this.APELLIDOCAJERO == null) {\r\n if (valueObject.getAPELLIDOCAJERO() != null)\r\n return(false);\r\n } else if (!this.APELLIDOCAJERO.equals(valueObject.getAPELLIDOCAJERO())) {\r\n return(false);\r\n }\r\n if (this.ESTADOFACTURA == null) {\r\n if (valueObject.getESTADOFACTURA() != null)\r\n return(false);\r\n } else if (!this.ESTADOFACTURA.equals(valueObject.getESTADOFACTURA())) {\r\n return(false);\r\n }\r\n\r\n return true;\r\n }",
"public boolean isConfermabile() {\n boolean confermabile = false;\n Date d1, d2;\n\n try { // prova ad eseguire il codice\n confermabile = super.isConfermabile();\n\n /* controllo che le date siano in sequenza */\n if (confermabile) {\n d1 = this.getDataInizio();\n d2 = this.getDataFine();\n confermabile = Lib.Data.isSequenza(d1, d2);\n }// fine del blocco if\n\n /* controllo che almeno una riga sia selezionata */\n if (confermabile) {\n confermabile = getPanServizi().getRigheSelezionate().size() > 0;\n }// fine del blocco if\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n /* valore di ritorno */\n return confermabile;\n\n }",
"private boolean compareLumaPanes()\n {\n int d;\n int e;\n int f = 0;\n\n for (int j = 0; j < NB_DECODED; j++)\n {\n for (int i = 0; i < size; i += 10)\n {\n d = (initialImage[i] & 0xFF) - (decodedVideo[j][i] & 0xFF);\n e = (initialImage[i + 1] & 0xFF) - (decodedVideo[j][i + 1] & 0xFF);\n d = d < 0 ? -d : d;\n e = e < 0 ? -e : e;\n if (d > 50 && e > 50)\n {\n decodedVideo[j] = null;\n f++;\n break;\n }\n }\n }\n\n return f <= NB_DECODED / 2;\n }"
] | [
"0.59633833",
"0.5699378",
"0.568699",
"0.5638946",
"0.56203467",
"0.5590002",
"0.5534078",
"0.5533771",
"0.549383",
"0.54829186",
"0.5459171",
"0.54402214",
"0.54286873",
"0.5408239",
"0.5398326",
"0.5396327",
"0.53944325",
"0.53711945",
"0.5340336",
"0.53173906",
"0.531189",
"0.52877825",
"0.52805215",
"0.5279293",
"0.52753204",
"0.526792",
"0.52445054",
"0.5236423",
"0.5235122",
"0.5223168",
"0.52189845",
"0.5214934",
"0.5208746",
"0.5207026",
"0.5189445",
"0.5173886",
"0.51737005",
"0.5172806",
"0.51722753",
"0.51665485",
"0.51656085",
"0.5163066",
"0.5152075",
"0.51434237",
"0.51420385",
"0.51400506",
"0.5126725",
"0.5115112",
"0.510286",
"0.5102751",
"0.5102136",
"0.5102132",
"0.5087538",
"0.5081772",
"0.5080579",
"0.5078837",
"0.50676405",
"0.50487125",
"0.5048121",
"0.5048121",
"0.504746",
"0.5037057",
"0.5033999",
"0.5031565",
"0.50295836",
"0.50257",
"0.5024275",
"0.5022061",
"0.50184727",
"0.50140977",
"0.50101346",
"0.50090444",
"0.50073564",
"0.49967915",
"0.4995536",
"0.49931827",
"0.49930486",
"0.49906284",
"0.4990322",
"0.4988602",
"0.49872258",
"0.49805477",
"0.49797016",
"0.49796164",
"0.49787346",
"0.49782547",
"0.49764872",
"0.49733564",
"0.49707204",
"0.49657768",
"0.49537262",
"0.49524075",
"0.4949622",
"0.49493548",
"0.49451786",
"0.49420193",
"0.494118",
"0.494048",
"0.49329948",
"0.49295762"
] | 0.6199852 | 0 |
Will cancel the listening socket, and cause the thread to finish | public void cancel() {
try {
mmServerSocket.close();
} catch (IOException e) { }
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void cancel() {\r\n mStopped = true;\r\n try {\r\n mSocket.close();\r\n } catch (IOException ioe) {\r\n Log.e(Common.TAG, \"Error closing the socket: \" + ioe.getMessage());\r\n }\r\n }",
"public void cancel(){\r\n\t\t\r\n\t\ttry{\t\t\t\r\n\t\t\t// Stop the runnable job\r\n\t\t\trunning = false;\r\n\t\t\tjoin(1000);\r\n\t\t\t\r\n\t\t\t// Close socket\r\n\t\t\toSocket.close();\r\n\t\t\t\r\n\t\t}catch(InterruptedException e1){\r\n\t\t\tLog.e(TAG, \"terminating tread failed\", e1);\r\n\t\t}catch (IOException e2) {\r\n\t\t\tLog.e(TAG, \"cancel(), closing socket failed\", e2);\r\n\t\t}\t\r\n\t}",
"public void cancel() {\n stopThread = true;\n\t\ttry {\n\t\t\tmmSocket.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void cancel() {\n try {\n\n mServerSocket.close();\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void cancel() {\r\n\t\t\ttry {\r\n\t\t\t\tsocket.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t//pass\r\n\t\t\t}\r\n\t\t}",
"public void cancel() {\r\n\t\t\ttry {\r\n\t\t\t\tsocket.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}",
"public void cancel() {\n try {\n mSocket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void cancel() {\n try {\n mmServerSocket.close();\n } catch (IOException e) {\n Log.e(\"TEST\", \"Could not close the connect socket\", e);\n }\n\n }",
"public void cancel() {\n try {\n mmServerSocket.close();\n } catch (IOException e) {\n Log.e(TAG, \"Could not close the connect socket\", e);\n }\n }",
"public void cancel() {\r\n\t\t\ttry {\r\n\t\t\t\tmmServerSocket.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}",
"public void cancel() {\n try {\n mmServerSocket.close();\n } catch (IOException ignored) { }\n }",
"public void cancel() {\n try {\n mmServerSocket.close();\n } catch (IOException e) { }\n }",
"public void cancel() {\n try {\n mmServerSocket.close();\n } catch (IOException e) { }\n }",
"public void cancel() {\n try {\n mSocket.close();\n } catch (IOException e) {\n Log.e(TAG, \" failed to close socket\" + e.getMessage());\n }\n }",
"public void stopListening() {\n new Thread(new Runnable() {\n @Override\n public void run() {\n synchronized (ConnectionServer.this) {\n if (mAcceptThread != null) {\n mAcceptThread.cancel();\n mAcceptThread = null;\n }\n }\n }\n }).start();\n }",
"public void cancel() {\n try {\n mmServerSocket.close();\n mmServerSocket=null;\n } catch (IOException e) { }\n }",
"public void cancel() {\n\t\t\ttry {\n\t\t\t\tmmSocket.close();\n\t\t\t} catch (IOException e) { }\n\t\t}",
"public void cancel() {\n\t\t\ttry {\n\t\t\t\tmmSocket.close();\n\t\t\t} catch (IOException e) { }\n\t\t}",
"public void cancel() {\n try {\n mmServerSocket.close();\n } catch (IOException e) {\n showToast(\"Could not close the server socket.\");\n }\n }",
"public void cancel() {\r\n try {\r\n blueSocket.close();\r\n } catch (IOException e) { }\r\n }",
"public void cancel() {\n try {\n mmSocket.close();\n } catch (IOException e) { }\n }",
"public void cancel() {\n try {\n mmSocket.close();\n } catch (IOException e) { }\n }",
"public void cancel() {\n try {\n mmSocket.close();\n } catch (IOException e) { }\n }",
"public void cancel() {\n try {\n mmSocket.close();\n } catch (IOException e) {\n\n }\n }",
"@SuppressWarnings(\"unused\")\n\t\t\tpublic void cancel() {\n\t try {\n\t mmSocket.close();\n\t } catch (IOException e) { }\n\t }",
"public void cancel() {\n try {\n mmSocket.close();\n } catch (IOException e) {\n Log.e(TAG, \"Could not close the connect socket\", e);\n }\n }",
"public void cancel() {\n try {\n bluetoothServerSocket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void cancel() {\n try {\n btSocket.close();\n } catch (IOException e) {\n Log.e(TAG, \"Could not close the client socket\", e);\n }\n }",
"public void stopServer() {\n\t\tthis.running=false;\t\t\t\t\t\t\t//the loop of the thread fails\n\t\ttry {\n\t\t\tthis.socket.close();\t\t\t\t\t//closes the socket\n\t\t}catch (Exception e) {\n\t\t\tSystem.out.println(\"TCPServer : Socket non fermé\");\n\t\t}\n\t}",
"public void cancel() {\n try {\n mConnectedSocket.close();\n } catch (IOException e) {\n showToast(\"Could not close the connected socket.\");\n }\n }",
"@Override\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\tlong startingtime = System.currentTimeMillis();\n\t\t\t\t\t\t\t\t\t\t\tlong endingtime = startingtime + 3*1000; // 60 seconds * 1000 ms/sec\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\twhile(true)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(cancelsent==1 || System.currentTimeMillis() > endingtime)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(cancelsent!=1){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcancellingThread.interrupt();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trecSocket.close();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLog.e(\"closing\", \"socket closed\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}",
"public void cancel() throws IOException {\n if (v) Log.d(TAG, \"cancel() thread server\");\n\n // Use iterator to\n Iterator iterator = arrayThreadClients.iterator();\n while (iterator.hasNext()) {\n ThreadClient threadClient = (ThreadClient) iterator.next();\n // Stop all threads client\n if (v) Log.d(TAG, \"STOP thread \" + threadClient.getNameThread());\n threadClient.interrupt();\n }\n\n // Clear the array of threads\n arrayThreadClients.clear();\n\n // Close the server socket to throw an exception and thus stop the server thread\n serverSocket.close();\n }",
"public void cancel() {\n try {\n mmOutStream.close();\n mmInStream.close();\n mmSocket.close();\n } catch (IOException e) {\n Log.e(TAG, \"Could not close the connect socket\", e);\n }\n }",
"public void cancel() {\n try {\n mmSocket.close();\n } catch (IOException e) {\n showToast(\"Could not close the client socket.\");\n }\n }",
"public void stopListening() {\n try {\n mListenerSocket.close();\n } catch (IOException e) {\n // just log\n Log.e(\"LanConnection\",\"Error closing listener socket at \" + LOCAL_PORT, e);\n }\n }",
"public void stop() {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tif (socket != null) {\n\t\t\t\tsocket.close();\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"Socket closed.\");\n\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\n\t\t}\n\t}",
"public void stopListening() throws IOException {\n\n if (threadListen != null) {\n if (v) Log.d(TAG, \"Stop listening\");\n threadListen.cancel();\n threadListen = null;\n setState(STATE_NONE);\n }\n }",
"@Override\n protected void startListener(){\n Socket socket = null;\n while (isRunning()){\n socket = acceptSocket();\n if (socket == null) {\n continue;\n }\n \n try {\n handleConnection(socket);\n } catch (Throwable ex) {\n getLogger().log(Level.FINE, \n \"selectorThread.handleConnectionException\",\n ex);\n try {\n socket.close(); \n } catch (IOException ioe){\n // Do nothing\n }\n continue;\n }\n } \n }",
"public void cancel() {\n try {mmInStream.close();\n mmOutStream.close();\n mmSocket.close();\n } catch (IOException e) { }\n }",
"protected void stop() {\n keepGoing = false;\n // connect to myself as Client to exit\n try {\n new Socket(\"localhost\", port);\n } catch(Exception e) {\n // exception handling\n }\n }",
"@Override\n public void stop() {\n try {\n socket.close();\n } catch (IOException e) {\n getExceptionHandler().receivedException(e);\n }\n\n // Now close the executor service.\n\n }",
"@CallByThread(\"Netty EventLoop\")\n void runCancel() {\n if (referenced > 0) { // is blocking\n incomingPublishService.drain();\n }\n }",
"public void cancel() {\r\n try {\r\n btSocket.close();\r\n isConnected = false;\r\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);\r\n SharedPreferences.Editor edit = preferences.edit();\r\n edit.putBoolean(\"Connection\", isConnected);\r\n edit.apply();\r\n } catch (IOException e) {\r\n Log.d(\"TAG\", \"Could not close the client socket\");\r\n }\r\n }",
"private void resumeListening() {\n Thread listener = new Thread() {\n @Override\n public void run() {\n try {\n mListenerSocket = new ServerSocket();\n mListenerSocket.setReuseAddress(true);\n mListenerSocket.bind(new InetSocketAddress(LOCAL_PORT));\n while (true) {\n Socket connSocket = mListenerSocket.accept();\n Scanner sc = new Scanner(connSocket.getInputStream());\n String encMsg = sc.nextLine();\n connSocket.close();\n sc.close();\n Message msg = mHandler.obtainMessage();\n msg.obj = encMsg;\n mHandler.sendMessage(msg);\n }\n } catch (IOException e) {\n Log.d(\"LANConnection\", \"Stopping listener thread due to error\", e);\n }\n }\n };\n listener.start();\n }",
"@Override\n public void stopEndpoint() {\n if (!isRunning()) {\n return;\n }\n\n setRunning(false);\n\n try {\n try{\n if ( getServerSocket() != null ) {\n getServerSocket().close();\n }\n } catch (Throwable t){\n getLogger().log(Level.SEVERE,\n \"selectorThread.closeSocketException\", t);\n }\n\n unregisterComponents();\n\n clearTasks();\n } catch (Throwable t) {\n getLogger().log(Level.SEVERE,\"selectorThread.stopException\", t);\n }\n }",
"protected void stop() {\n keepGoing = false;\n try {\n new Socket(\"localhost\", port);\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n }",
"public void stopClient() {\r\n\r\n // send message that we are closing the connection\r\n mRun = false;\r\n\r\n if (mBufferOut != null) {\r\n mBufferOut.flush();\r\n mBufferOut.close();\r\n }\r\n\r\n try {\r\n if (mBufferIn != null) {\r\n mBufferIn.close();\r\n }\r\n }\r\n catch (IOException e) {\r\n Log.d(TAG, \"error closing input buffer: \" + e.getMessage());\r\n }\r\n\r\n try {\r\n if (socket != null) {\r\n socket.close();\r\n Log.i(TAG, \"Socket closed in stopClient\");\r\n }\r\n }\r\n catch (IOException e) {\r\n Log.e(TAG, \"error closing socket: \" + e.getMessage());\r\n }\r\n\r\n mMessageListener = null;\r\n mBufferIn = null;\r\n mBufferOut = null;\r\n mServerMessage = null;\r\n }",
"private void listen() {\n System.out.println(\"launch listen task\");\n listenTask = new AsyncTask<Void, String, IOException>() {\n @Override\n protected IOException doInBackground(Void... params) {\n try (BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()))) {\n String line;\n while ((line = in.readLine()) != null) {\n System.out.println(\"receive \" + line);\n publishProgress(line);\n }\n } catch (SocketException e) {\n if (e.toString().equals(\"java.net.SocketException: Socket closed\")) {\n //that's what will happen when task.cancel() is called.\n System.out.println(\"listening is stopped as socket is closed\");\n return null;\n } else {\n e.printStackTrace();\n return e;\n }\n } catch (IOException e) {\n e.printStackTrace();\n return e;\n }\n return null;\n }\n\n @Override\n protected void onProgressUpdate(String... values) {\n handler.accept(new Message(MsgType.SERVER, values[0]));\n }\n\n @Override\n protected void onPostExecute(IOException e) {\n if (e == null) {\n handler.accept(new Message(MsgType.INFO, \"listening finished\"));\n } else {\n handler.accept(new Message(MsgType.ERROR,\n \"exception while listening\" + \"\\n\" + e.toString()));\n }\n }\n\n @Override\n protected void onCancelled() {\n super.onCancelled();\n }\n };\n //the listen task will last for a quite long time (blocking) and thus should run in a parallel pool.\n listenTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n }",
"protected void stopThread() {\n\t\t_running = false;\n\t\t\n\t\tfor (ClientHandler client : _connectedClients) {\n\t\t\tif (client != null && client.isAlive()) {\n\t\t\t\tclient.stopThread();\n\t\t\t\ttry {\n\t\t\t\t\tclient.join();\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\tSystem.out.println(\"Client listener: Error while stopping client.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void stopListeningFoConnection() {\n /* If it's running stop synchronization. */\n stopAllWorkerThreads();\n\n }",
"public void stopListening();",
"private TimerTask socketListener()\r\n\t{\r\n\t\tString theMessage;\r\n\t\tif (theSocket != null)\r\n\t\t{\r\n\t\t\tif (theSocket.isReady())\r\n\t\t\t{\r\n\t\t\t\t// blocks execution\r\n\t\t\t\t// get theMessage\r\n\t\t\t\ttheMessage = theSocket.getMessage();\r\n\t\t\t\tif (theMessage == null)\r\n\t\t\t\t{\r\n\t\t\t\t\twriteLine(\"Our connection has ended!\", 0);\r\n\t\t\t\t\trunning = false;\r\n\t\t\t\t\t// if the message = null\r\n\t\t\t\t\t// the we need to check the socket again\r\n\t\t\t\t\t// just in case\r\n\t\t\t\t\t// close it nicely if we can\r\n\t\t\t\t\tif (theSocket != null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttheSocket.close();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// otherwise just set it to null\r\n\t\t\t\t\t// set it to null regardless\r\n\t\t\t\t\ttheSocket = null;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// if the socket is OK\r\n\t\t\t\t\t// and the socket isReady\r\n\t\t\t\t\t// then display the input\r\n\t\t\t\t\twriteLine(theMessage, 2);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} // end if theSocket !=null\r\n\t\treturn null;\r\n\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tsocket.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}",
"public void cancel() {\n if (call != null) {\n call.cancel();\n }\n\n // TODO: We need a LOCK here because we can try\n // to cancel at the same time the request is getting\n // answered on the OkHTTP thread. We could get rid of\n // this LOCK by using Runnable when we move Android\n // implementation of mbgl::RunLoop to Looper.\n LOCK.lock();\n nativePtr = 0;\n LOCK.unlock();\n }",
"@Override\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\tcancelsent=0;\n\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\tLog.e(\"About to get out\",\"before sending kickmeout\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(dos!=null)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(ispeak==1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ispeak=0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdos.writeUTF(\"kick_me_out_speaking\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLog.e(\"Kick me\",\"KICKED SPEAKING\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tdos.writeUTF(\"kick_me_out_waiting\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tdos.writeUTF(TestConnection.macid);\n\t\t\t\t\t\t\t\t\t\t\t\t\tLog.e(\"Kick me\",\"KICKED WAITING\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tcancelsent=1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\trecSocket.close();\n\t\t\t\t\t\t\t\t\t\t\t\t\tLog.e(\"closing\", \"socket closed\");\n\t\t\t\t\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}",
"public void stop() {\n\t\tgetLogger().debug(\"Waiting 5 seconds for EVCC to process response and close TCP/TLS connection ...\");\n\t\ttry {\n Thread.sleep(5000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\t\t\n\t\tif (!isStopAlreadyInitiated()) {\n\t\t\tgetLogger().debug(\"Closing connection to client ...\");\n\t\t\tsetStopAlreadyInitiated(true);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tgetInStream().close();\n\t\t\t\tgetOutStream().close();\n\t\t\t\t\n\t\t\t\tif (getTcpClientSocket() != null) {\n\t\t\t\t\tgetTcpClientSocket().close();\n\t\t\t\t} else if (getTlsClientSocket() != null) {\n\t\t\t\t\tgetTlsClientSocket().close();\n\t\t\t\t} else {\n\t\t\t\t\tgetLogger().error(\"Neither TCP nor TLS client socket could be closed\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tThread.currentThread().interrupt();\n\t\t\t\tgetLogger().debug(\"Connection to client closed\");\n\t\t\t} catch (IOException e) {\n\t\t\t\tgetLogger().error(\"Error occurred while trying to close socket to client\", e);\n\t\t\t} \n\t\t}\n\t}",
"public void stop() {\n\t\ttry {\n\t\t\tif (serverSocket != null)\n\t\t\t\tserverSocket.close();\n\t\t} catch (IOException ioe) {\n\t\t\t// shouldn't happen\n\t\t}\n\t}",
"@Override\n public void stop() {\n try {\n serverSocket.close();\n }\n catch (IOException e) {\n getExceptionHandler().receivedException(e);\n }\n\n // Close all open connections.\n synchronized (listConnections) {\n for (TcpConnectionHandler tch : listConnections)\n tch.kill();\n listConnections.clear();\n }\n\n // Now close the executor service.\n executorService.shutdown();\n try {\n executorService.awaitTermination(3, TimeUnit.SECONDS);\n }\n catch (InterruptedException e) {\n getExceptionHandler().receivedException(e);\n }\n }",
"public void stop() throws IOException {\n kv_out.println_debug(\"Try to stop the handler\");\n isRunning = false;\n serverSocket.close();\n }",
"public void close() throws IOException {\n if (!serverSocket.isClosed()) {\n log.info(\"Closing listener on {}\", serverSocket.getLocalSocketAddress());\n runningThread.interrupt();\n serverSocket.close();\n }\n }",
"@Override\n public void run() {\n if (isV6())\n while (!interrupted()) {\n try {\n handleMessage(serverSocket.accept());\n } catch (SocketTimeoutException ignore) {\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n try {\n serverSocket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@Override\n protected void handleConnection(final Socket sock) throws IOException {\n sock.setSoTimeout(1);\n sock.getInputStream().read();\n\n stopAcceptingConnections();\n }",
"public synchronized void stop() {\n if (mConnectThread != null) {\n mConnectThread.cancel();\n mConnectThread = null;\n }\n if (mConnectedThread != null) {\n mConnectedThread.cancel();\n mConnectedThread = null;\n }\n isConnected = false;\n }",
"private void stopClient() {\n\n run = false;\n\n if (bufferOut != null) {\n bufferOut.flush();\n bufferOut.close();\n }\n\n messageListener = null;\n bufferIn = null;\n bufferOut = null;\n serverMessage = null;\n }",
"public void run(){\n\t\t\t\tsynchronized (socket) {\n\t\t\t\t\tsocket.close();\n\t\t\t\t}\n\t\t\t}",
"private void cancel() {\n mFuture.cancel(mMayInterruptIfRunning);\n }",
"private void closeCtrlSocket() {\n ctrlThreadTask = ThreadTasks.CLOSE;\n }",
"@Override\n\tpublic void listenerInterrupted(ConnectionListenerEvent evt) {\n\t\t\n\t}",
"private void disconnect()\r\n\t{\r\n\t\tif (theSocket != null)\r\n\t\t{\r\n\t\t\ttheSocket.transmit(\"Disconnecting\");\r\n\t\t\twriteLine(\"Disconnecting...\", 0);\r\n\t\t\twriteLine(\"Closing socket\", 0);\r\n\t\t\ttheSocket.close();\r\n\t\t\ttheSocket = null;\r\n\t\t}\r\n\t\tif (theSocket == null)\r\n\t\t{\r\n\t\t\twriteLine(\"The Socket is null\", 0);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\twriteLine(\"We have now disconnected\", 0);\r\n\t\t}\r\n\t\trunning = false;\r\n\t}",
"public synchronized void stop() {\r\n\t\t//TODO read why stop is deprecated http://docs.oracle.com/javase/1.5.0/docs/guide/misc/threadPrimitiveDeprecation.html\r\n\t\tif (udplistener != null) {\r\n\t\t\tudplistener.datagramSocket.close();\r\n\t\t\tudpthread.stop();\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tif (tcplistener != null) {\r\n\t\t\t\ttcplistener.serverSocket.close();\r\n\t\t\t\ttcpthread.stop();\r\n\t\t\t}\r\n\t\t} catch (IOException e) {e.printStackTrace();}\t\t\r\n\t}",
"public void stopListening() {\r\n\t\tlisten.stopListening();\r\n\t}",
"public void stop() {\n \n // first interrupt the server engine thread\n if (m_runner != null) {\n m_runner.interrupt();\n }\n\n // close server socket\n if (m_serverSocket != null) {\n try {\n m_serverSocket.close();\n }\n catch(IOException ex){\n }\n m_serverSocket = null;\n } \n \n // release server resources\n if (m_ftpConfig != null) {\n m_ftpConfig.dispose();\n m_ftpConfig = null;\n }\n\n // wait for the runner thread to terminate\n if( (m_runner != null) && m_runner.isAlive() ) {\n try {\n m_runner.join();\n }\n catch(InterruptedException ex) {\n }\n m_runner = null;\n }\n }",
"void stopAndJoinReplyThread();",
"protected final void disconnect() {\n\t\trunning = false;\n\t\ttry {\n\t\t\tif (out != null)\n\t\t\t\tout.close();\n\t\t\tif (in != null)\n\t\t\t\tin.close();\n\t\t\tsocket.close();\n\t\t} catch (IOException e) {e.printStackTrace();}\n\t}",
"public void stopInbound();",
"@Override\r\n public synchronized void close()\r\n {\r\n if (!isRunning)\r\n {\r\n throw new IllegalStateException(\"already stopped!\");\r\n }\r\n threadPool.shutdownNow();\r\n socket.close();\r\n isRunning = false;\r\n }",
"public void close(){\n\t\tlog.debug(\"[SC] Close called\", 5);\n\t\tif(socket!=null){\n\t\t\tlog.debug(\"[SC] Closing socket\", 4);\n\t\t\ttry {\n\t\t\t\tThread.sleep(10);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t//Silly impatient thread\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tout.close();\n\t\t\t\tin.close();\n\t\t\t\tsocket.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t//we're going to close it anyway\n\t\t\t}\n\t\t\tsocket = null;\n\t\t\trun = false;\n\t\t}\n\t}",
"Socket call() throws InterruptedException;",
"public void close()\n {\n try\n {\n System.out.println(\"CLIENT chiude connessione\");\n receiverThread.interrupt();\n socket.close();\n System.exit(0);\n }\n catch (IOException e)\n {\n System.out.println(e.getMessage());\n System.exit(1);\n }\n }",
"public void stopListening() \n {\n keepListening = false;\n }",
"public void Stop(){\r\n\t\trunning = false;\r\n\t\thelp.print(\"Closing server, waiting for workers to complete\");\r\n\t}",
"public void stopDiscoverability() {\r\n this.findableServerThread.interrupt();\r\n }",
"public synchronized void disconnect()\r\n\t\t{\r\n\t\tif (state == RUNNING)\r\n\t\t stop();\r\n\t\tif (state == CLOSING_DOWN)\r\n\t\t {\r\n // Close the server socket\t\t \r\n try {\r\n \t\tserverSocket.close();\r\n \t}\r\n catch (IOException e)\r\n {\r\n }\r\n \r\n \t\t// flag the server as stopped\r\n \t\tstate = STOPPED;\r\n\t\t }\r\n\t\t}",
"@Override\n public void run() {\n mBluetoothAdapter.cancelDiscovery();\n try {\n // Connect to the remote device through the socket. This call blocks\n // until it succeeds or throws an exception.\n mmSocket.connect();\n } catch (IOException connectException) {\n cancel();\n return;\n }\n\n onSocketObtained(mmSocket);\n }",
"private void shutdown() {\n\t\ttry {\n\t\t\tsock.close();\n\t\t\tgame.handleExit(this);\n\t\t\tstopped = true;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t}",
"public void stopListening() {\n\t\tkeepListening = false;\n\t}",
"@Override\n public void run() {\n if (_running) {\n return;\n }\n _running = true;\n\n byte[] buf = new byte[8192];\n DatagramPacket dp = new DatagramPacket(buf, buf.length);\n\n //to enable stopping of receive\n try {\n _listenSocket.setSoTimeout(1000);\n } catch (SocketException ex) {\n ex.printStackTrace();\n// Logger.getLogger(NetworkNode.class.getName()).log(Level.SEVERE, \"Error in starting network node\", ex);\n }\n\n while (_running) {\n try {\n //System.out.println(_listenSocket.getLocalSocketAddress() + \"->\" + _listenSocket.getRemoteSocketAddress());\n _listenSocket.receive(dp);\n handlePacket(dp);\n } catch (SocketTimeoutException e) {\n // listen timeout. do nothing.\n } catch (Exception ex) {\n ex.printStackTrace();\n// Logger.getLogger(NetworkNode.class.getName()).log(Level.SEVERE, \"Error in receiving packet in network node\", ex);\n }\n }\n System.out.println(\"Listen thread finished!\");\n _runningThread = null;\n }",
"public void serverStop() {\n\t\tJOptionPane.showMessageDialog(dlg, \"与服务器失去连接\");\n\t\tserver = null;\n\t\tconnectAction.setEnabled(false);\n\t\t\n\t}",
"@Override\n public void run() {\n myHandler.cancel(true);\n }",
"public void terminate() {\n\t\tif (socket == null)\n\t\t\tthrow new IllegalStateException();\n\t\ttry {\n\t\t\tsocket.close();\n\t\t} catch (IOException e) {}\n\t}",
"synchronized void cancel()\n {\n state = DNSState.CANCELED;\n notifyAll();\n }",
"public void listen() {\n\t\tthread(\"NetworkClientInput\", () -> {\n\t\t\twhile (true) {\n\t\t\t\ttry {\n\t\t\t\t\tString str = in.readLine();\n\t\t\t\t\t\n\t\t\t\t\tif (str == null)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"[CLIENT] Received: \" + str);\n\t\t\t\t\ttry {\n\t\t\t\t\t\thandle(str);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tSystem.err.println(\"[Client] Error handling input\");\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.out.println(\"[Client] Disconnected.\");\n\t\t\t\t\tconnected = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tconnected = false;\n\t\t\texecutor.shutdown();\n\t\t\tsocket.close();\n\t\t});\n\t}",
"public void stopClient() {\n if (sendToSocket != null) {\n try {\n sendToSocket.flush();\n sendToSocket.close();\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n readFromSocket = null;\n sendToSocket = null;\n }",
"public void stopServer() throws IOException {\r\n b = false;\r\n serverSocket.close();\r\n }",
"@Override\n\tpublic void StopListening()\n\t{\n\t\t\n\t}",
"public void closeSocket () \n {\n try {\n // close the open server socket\n server.close();\n // send it a message to make it stop waiting immediately\n // (not really necessary)\n /*Socket s = new Socket(\"localhost\", thisPort);\n OutputStream os = s.getOutputStream();\n os.write((byte)0);\n os.close();\n s.close();*/\n } catch(Exception ex) { \n LOG.warn(\"Exception while shutting down \"+ this.getClass(), ex);\n }\n \n server = null;\n }",
"@Override\n\tpublic void run() {\n\t\tLog.i(\"here\",\"listener\");\n\t\twhile(true){\n\t\t\t\n\t\t\ttry {\n\t\t\t\tif((cs=s.accept())!=null)new Thread(new Worker(context,cs)).start();\n\t\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n }",
"public void stop() {\n tcpServer.stopServer();\n ThreadExecutor.shutdownClient(this.getClass().getName());\n }",
"public synchronized void shutdown() {\n // mark this as no longer running\n active = false;\n\n // close the socket\n try {\n if (socketNode != null) {\n socketNode.close();\n socketNode = null;\n }\n } catch (Exception e) {\n getLogger().info(\"Excpetion closing socket\", e);\n // ignore for now\n }\n\n // stop the connector\n if (connector != null) {\n connector.interrupted = true;\n connector = null; // allow gc\n }\n if (advertiseViaMulticastDNS) {\n zeroConf.unadvertise();\n }\n }",
"protected void handleKillThread() {\n \t\ttry {\n \t\t\tif (server != null)\tserver.close();\n \t\t\tif (client != null) client.close();\n \t\t} catch (IOException e) {\n \t\t\thandleError(e.getMessage());\n \t\t}\n \t}"
] | [
"0.78673476",
"0.7846516",
"0.7634614",
"0.75915134",
"0.75179744",
"0.74749464",
"0.74514496",
"0.7409911",
"0.7396875",
"0.7386712",
"0.7341659",
"0.73370403",
"0.73370403",
"0.7323323",
"0.7286058",
"0.7159255",
"0.71431565",
"0.71431565",
"0.7119602",
"0.7093361",
"0.70285517",
"0.70285517",
"0.70285517",
"0.7019779",
"0.70094943",
"0.6946205",
"0.69144976",
"0.6910299",
"0.6902132",
"0.6890738",
"0.68632656",
"0.672044",
"0.66686594",
"0.66657555",
"0.64900774",
"0.64804",
"0.6458524",
"0.6440664",
"0.64153075",
"0.641214",
"0.640945",
"0.6379619",
"0.6372617",
"0.6359212",
"0.63577366",
"0.63455355",
"0.634133",
"0.6320598",
"0.6309557",
"0.626285",
"0.6232474",
"0.62172854",
"0.6202263",
"0.61834073",
"0.6168073",
"0.6161465",
"0.6151914",
"0.61317617",
"0.6110397",
"0.60921425",
"0.6080607",
"0.6078446",
"0.60626066",
"0.6048793",
"0.604022",
"0.6036488",
"0.60055697",
"0.5985561",
"0.5975558",
"0.59748954",
"0.596759",
"0.59636563",
"0.5963266",
"0.59536654",
"0.59466565",
"0.5940406",
"0.593276",
"0.59246624",
"0.5910493",
"0.5896749",
"0.5888024",
"0.58851105",
"0.58767927",
"0.5870346",
"0.58656466",
"0.5860055",
"0.5858578",
"0.58583385",
"0.58528125",
"0.58478713",
"0.5828033",
"0.5823399",
"0.5816696",
"0.58166033",
"0.5814026",
"0.58127487",
"0.5809893",
"0.5797804",
"0.5791842",
"0.5786526"
] | 0.72846115 | 15 |
Cancel discovery because it will slow down the connection | public void run() {
mBluetooth.cancelDiscovery();
try {
// Connect the device through the socket. This will block
// until it succeeds or throws an exception
mmSocket.connect();
} catch (IOException connectException) {
// Unable to connect; close the socket and get out
try {
mmSocket.close();
} catch (IOException closeException) { }
return;
}
// Do work to manage the connection (in a separate thread)
connectedSocket(mmSocket);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void stopDiscovery() {\n if (mDisposable != null) {\n mDisposable.dispose();\n }\n }",
"public void stopDiscoverability() {\r\n this.findableServerThread.interrupt();\r\n }",
"public void stopDiscovery() {\n if (mApiClient != null) {\n Weave.DEVICE_API.stopLoading(mApiClient, mDiscoveryListener);\n }\n }",
"public void cancel() {\n request.disconnect();\n }",
"synchronized void cancel()\n {\n state = DNSState.CANCELED;\n notifyAll();\n }",
"public void cancel() {\n try {\n mmServerSocket.close();\n } catch (IOException e) {\n Log.e(TAG, \"Could not close the connect socket\", e);\n }\n }",
"public void cancel() {\n try {\n mmServerSocket.close();\n } catch (IOException e) {\n Log.e(\"TEST\", \"Could not close the connect socket\", e);\n }\n\n }",
"public void cancel() {\n try {\n mmSocket.close();\n } catch (IOException e) {\n Log.e(TAG, \"Could not close the connect socket\", e);\n }\n }",
"public void cancel() {\n try {\n bluetoothServerSocket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void cancel() {\r\n\t\t\ttry {\r\n\t\t\t\tsocket.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}",
"public void cancel() {\n try {\n mConnectedSocket.close();\n } catch (IOException e) {\n showToast(\"Could not close the connected socket.\");\n }\n }",
"private void disconnect() {\n activityRunning = false;\n MRTClient.getInstance().doHangup();\n MRTClient.getInstance().removeClientListener(this);\n\n finish();\n }",
"public void cancelDisconnect() {\n if (manager != null) {\n if (device == null\n || device.status == WifiP2pDevice.CONNECTED) {\n disconnect();\n } else if (device.status == WifiP2pDevice.AVAILABLE\n || device.status == WifiP2pDevice.INVITED) {\n manager.cancelConnect(channel, new WifiP2pManager.ActionListener() {\n\n @Override\n public void onSuccess() {\n }\n\n @Override\n public void onFailure(int reasonCode) {\n }\n });\n }\n }\n }",
"public void cancel() {\n try {\n mSocket.close();\n } catch (IOException e) {\n Log.e(TAG, \" failed to close socket\" + e.getMessage());\n }\n }",
"public void cancel() {\r\n\t\t\ttry {\r\n\t\t\t\tsocket.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t//pass\r\n\t\t\t}\r\n\t\t}",
"public void stopListening();",
"public void cancel() {\r\n try {\r\n btSocket.close();\r\n isConnected = false;\r\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);\r\n SharedPreferences.Editor edit = preferences.edit();\r\n edit.putBoolean(\"Connection\", isConnected);\r\n edit.apply();\r\n } catch (IOException e) {\r\n Log.d(\"TAG\", \"Could not close the client socket\");\r\n }\r\n }",
"public void cancel() {\n try {\n mSocket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void cancel() {\r\n try {\r\n blueSocket.close();\r\n } catch (IOException e) { }\r\n }",
"public void cancel() {\r\n mStopped = true;\r\n try {\r\n mSocket.close();\r\n } catch (IOException ioe) {\r\n Log.e(Common.TAG, \"Error closing the socket: \" + ioe.getMessage());\r\n }\r\n }",
"public void stopListening() \n {\n keepListening = false;\n }",
"public void disconnect() {\n \ttry {\n \t\tctx.unbindService(apiConnection);\n } catch(IllegalArgumentException e) {\n \t// Nothing to do\n }\n }",
"private synchronized void stop()\n\t{\n\t\ttry\n\t\t{\n\t\t\tunregisterReceiver( mConnectivityReceiver );\n\t\t}\n\t\tcatch ( IllegalArgumentException e )\n\t\t{\n\t\t\te.printStackTrace();\n\n\t\t} // try/catch\n\n\t}",
"private void gestioneDisconnessione(Exception e) {\n\t\tLOG.info(\"Client disconnesso\");\n\t\tthis.completeWithError(e);\n\t\tthis.running=false;\n\t}",
"@Override\n public void run() {\n Log.d(\"Final\", devices.toString());\n client.stopDiscovery();\n }",
"public void cancel() {\n try {\n mmOutStream.close();\n mmInStream.close();\n mmSocket.close();\n } catch (IOException e) {\n Log.e(TAG, \"Could not close the connect socket\", e);\n }\n }",
"public void cancel() {\n if (call != null) {\n call.cancel();\n }\n\n // TODO: We need a LOCK here because we can try\n // to cancel at the same time the request is getting\n // answered on the OkHTTP thread. We could get rid of\n // this LOCK by using Runnable when we move Android\n // implementation of mbgl::RunLoop to Looper.\n LOCK.lock();\n nativePtr = 0;\n LOCK.unlock();\n }",
"public void cancel() {\n try {\n\n mServerSocket.close();\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void cancel() {\n try {\n btSocket.close();\n } catch (IOException e) {\n Log.e(TAG, \"Could not close the client socket\", e);\n }\n }",
"private void startDiscovery() {\n\t\tbtAdapter.cancelDiscovery();\n\t\tbtAdapter.startDiscovery();\n\t}",
"private void stopPulling() {\n\n // un register this task\n eventDispatcher.unRegister(this);\n\n // tell the container to send response\n asyncContext.complete();\n\n // cancel data changed listening\n if (pullingTimeoutFuture != null){\n pullingTimeoutFuture.cancel(false);\n }\n }",
"public synchronized void stopListening() {\n if (mCallback == null) {\n return;\n }\n\n mCallback = null;\n mContext.getSystemService(ConnectivityManager.class)\n .unregisterNetworkCallback(mConnectivityCallback);\n }",
"public void cancel() {\n stopThread = true;\n\t\ttry {\n\t\t\tmmSocket.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void disconnect() {\r\n\t\trunning = false;\r\n\t}",
"public void cancel() {\n try {\n mmSocket.close();\n } catch (IOException e) {\n showToast(\"Could not close the client socket.\");\n }\n }",
"public void stopAutomaticRefresh() {\n try {\n dnsService.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void cancel() {\n try {\n mmSocket.close();\n } catch (IOException e) {\n\n }\n }",
"void canceledPendingNodeStop();",
"public void disconnect() {\n if (this.mIsConnected) {\n disconnectCallAppAbility();\n this.mRemote = null;\n this.mIsConnected = false;\n return;\n }\n HiLog.error(LOG_LABEL, \"Already disconnected, ignoring request.\", new Object[0]);\n }",
"@Override\n public void onFailure(int i) {\n discoverPeersTillSuccess();\n }",
"public void cancelGetResponse() {\n impl.cancelGetResponse();\n }",
"public void stopListening() {\n\t\tkeepListening = false;\n\t}",
"public void cancel() {\r\n\t\t\ttry {\r\n\t\t\t\tmmServerSocket.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}",
"private void cancelDisconnectOperationsWithCompletionBlock(JSONArray data) {\n String strURL = String.format(\"https://%s.firebaseio.com\", appName);\n if ( data.length() >= 1 )\n {\n \ttry {\n \t\tstrURL = data.getString(0);\n\t\t\t} catch (JSONException e) {\n\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n }\n else{\n \tPluginResult pluginResult = new PluginResult(Status.ERROR, \"onDisconnect().cancel(): Parameter Error\");\n \tmCallbackContext.sendPluginResult(pluginResult);\n \treturn;\n }\n Firebase urlRef = new Firebase(strURL);\n\n urlRef.onDisconnect().cancel(new Firebase.CompletionListener() {\n\t\t\t@Override\n\t\t\tpublic void onComplete(FirebaseError arg0, Firebase arg1) {\n\t\t\t\tif(arg0 == null){\n\t\t\t\t\tPluginResult pluginResult = new PluginResult(Status.OK);\n\t\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t}else{\n\t\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, arg0.getMessage());\n\t\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n }",
"private void cancel() {\n mFuture.cancel(mMayInterruptIfRunning);\n }",
"@Override\n public void onFailure(int code) {\n Log.e(TAG, \"discoverServices Failure \" + code);\n\n if (code == WifiP2pManager.BUSY && mDeviceRegistering != null) {\n discoverServices();\n } else {\n mService.stopSelf();\n }\n }",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\t\t\t\tif (ba.isDiscovering()) {\n\t\t\t\t\tba.cancelDiscovery();\n\t\t\t\t}\n\n\t\t\t}",
"public void cancel() {\n try {\n mmSocket.close();\n } catch (IOException e) { }\n }",
"public void cancel() {\n try {\n mmSocket.close();\n } catch (IOException e) { }\n }",
"public void cancel() {\n try {\n mmSocket.close();\n } catch (IOException e) { }\n }",
"public void onStop() {\n connectivityMonitor.unregister();\n requestTracker.pauseRequests();\n }",
"public void stopListeningFoConnection() {\n /* If it's running stop synchronization. */\n stopAllWorkerThreads();\n\n }",
"private void cancelDisconnectOperations(JSONArray data) {\n String strURL = String.format(\"https://%s.firebaseio.com\", appName);\n if ( data.length() >= 1 )\n {\n \ttry {\n \t\tstrURL = data.getString(0);\n\t\t\t} catch (JSONException e) {\n\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n }\n else{\n \tPluginResult pluginResult = new PluginResult(Status.ERROR, \"onDisconnect().cancel() : Parameter Error\");\n \tmCallbackContext.sendPluginResult(pluginResult);\n \treturn;\n }\n Firebase urlRef = new Firebase(strURL);\n\n urlRef.onDisconnect().cancel();\n PluginResult pluginResult = new PluginResult(Status.OK);\n mCallbackContext.sendPluginResult(pluginResult);\n }",
"public void cancel() {\n try {\n mmServerSocket.close();\n } catch (IOException e) {\n showToast(\"Could not close the server socket.\");\n }\n }",
"public synchronized void cancel() {\n }",
"public void cancel() {\n\t\t\ttry {\n\t\t\t\tmmSocket.close();\n\t\t\t} catch (IOException e) { }\n\t\t}",
"public void cancel() {\n\t\t\ttry {\n\t\t\t\tmmSocket.close();\n\t\t\t} catch (IOException e) { }\n\t\t}",
"@Override\n public void cancel() {\n }",
"public void disconnectConvo() {\n convo = null;\n setConnStatus(false);\n }",
"@Override\n public void onFailure(@NonNull Exception e) {\n Discoverer.this.eventListener.trigger(\n EVENT_LOG, \"Fail to run discovery: \" + e.getMessage()\n );\n }",
"void connectionHandlerRequestStopScanning();",
"@Override\n public void cancel() {\n }",
"protected void handleDisconnect()\n {\n RemotingRMIClientSocketFactory.removeLocalConfiguration(locator);\n }",
"private void cancelFetch() {\n cancelOperation(QUERY_NEW_CALLS_TOKEN);\n cancelOperation(QUERY_OLD_CALLS_TOKEN);\n }",
"public void stopListening() {\n new Thread(new Runnable() {\n @Override\n public void run() {\n synchronized (ConnectionServer.this) {\n if (mAcceptThread != null) {\n mAcceptThread.cancel();\n mAcceptThread = null;\n }\n }\n }\n }).start();\n }",
"public void stopListening() {\r\n\t\tlisten.stopListening();\r\n\t}",
"public void cancel() {\n try {\n mmServerSocket.close();\n } catch (IOException e) { }\n }",
"public void cancel() {\n try {\n mmServerSocket.close();\n } catch (IOException e) { }\n }",
"public void cancel() {\n try {\n mmServerSocket.close();\n } catch (IOException e) { }\n }",
"public void cancel() {\n try {\n mmServerSocket.close();\n } catch (IOException ignored) { }\n }",
"public void stopListening() {\n try {\n mListenerSocket.close();\n } catch (IOException e) {\n // just log\n Log.e(\"LanConnection\",\"Error closing listener socket at \" + LOCAL_PORT, e);\n }\n }",
"public void cancelAllClients(){\n clientsPool.shutdownNow();\n }",
"@Override\n public void cancel() {\n\n }",
"private void doDiscovery() {\n Log.d(TAG, \"doDiscovery()\");\n\n // If we're already discovering, stop it\n if (mBtAdapter.isDiscovering()) {\n mBtAdapter.cancelDiscovery();\n }\n\n // Request discover from BluetoothAdapter\n mBtAdapter.startDiscovery();\n }",
"public synchronized void stop() {\n if (mConnectThread != null) {\n mConnectThread.cancel();\n mConnectThread = null;\n }\n if (mConnectedThread != null) {\n mConnectedThread.cancel();\n mConnectedThread = null;\n }\n isConnected = false;\n }",
"public void shutdown() {\n Log.info(Log.FAC_NETMANAGER, formatMessage(\"Shutdown requested\"));\n _run = false;\n if (_periodicTimer != null) _periodicTimer.cancel();\n if (_thread != null) _thread.interrupt();\n if (null != _channel) {\n try {\n setTap(null);\n } catch (IOException io) {\n }\n try {\n _channel.close();\n } catch (IOException io) {\n }\n }\n }",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void cancel() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}",
"public void cancel() {\n\t\tinterrupt();\n\t}",
"@Override\n public void cancel() {\n\n }",
"@Override\n public void cancel() {\n\n }",
"@Override\n public void cancel() {\n\n }",
"private void disConnect() {\n Auth.GoogleSignInApi.revokeAccess(mGoogleApiClient).setResultCallback(\n new ResultCallback<Status>() {\n @Override\n public void onResult(Status status) {\n m_tvStatus.setText(R.string.status_notconnected);\n m_tvEmail.setText(\"\");\n m_tvDispName.setText(\"\");\n }\n });\n }",
"private void stop() {\n if (client != null) {\n this.client.close();\n }\n }",
"private AsyncFuture<Void> stop() {\n return curator.stop();\n }",
"@SuppressWarnings(\"unused\")\n\t\t\tpublic void cancel() {\n\t try {\n\t mmSocket.close();\n\t } catch (IOException e) { }\n\t }",
"java.util.concurrent.Future<CancelSolNetworkOperationResult> cancelSolNetworkOperationAsync(\n CancelSolNetworkOperationRequest cancelSolNetworkOperationRequest);",
"@Override\r\n\tpublic void cancel() {\n\t\t\r\n\t}",
"@Override\n public void cancel() {\n\n }",
"public void cancel(){\r\n\t\t\r\n\t\ttry{\t\t\t\r\n\t\t\t// Stop the runnable job\r\n\t\t\trunning = false;\r\n\t\t\tjoin(1000);\r\n\t\t\t\r\n\t\t\t// Close socket\r\n\t\t\toSocket.close();\r\n\t\t\t\r\n\t\t}catch(InterruptedException e1){\r\n\t\t\tLog.e(TAG, \"terminating tread failed\", e1);\r\n\t\t}catch (IOException e2) {\r\n\t\t\tLog.e(TAG, \"cancel(), closing socket failed\", e2);\r\n\t\t}\t\r\n\t}",
"@Override\n\tpublic void StopListening()\n\t{\n\t\t\n\t}",
"abstract protected void onDisconnection();",
"public void onUaCallCancelled(UserAgent ua)\n { readyToReceive();\n }",
"void disconnect(String reason);",
"@Override\n public void stop() {\n detector.disable();\n }",
"@Override\n protected void onStop() {\n super.onStop();\n if (googleApiClient != null) {\n Log.i(TAG, \"In onStop() - disConnecting...\");\n googleApiClient.disconnect();\n }\n }",
"public void cancelAllRequests(boolean mayInterruptIfRunning, RequestHandle cnt) {\n // client.get\n\n }",
"public void cancel( String reason );",
"public Reply\tdisconnect() throws ThingsException, InterruptedException ;",
"@Override\n public void onConnectionSuspended(int i) {\n Log.e(TAG, \"onDisconnected\");\n\n stopLocationUpdates();\n stopSelf();\n }",
"@Override\n\t\t\t\t\t\tpublic void cancel() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}",
"@Override\n protected void onStop() {\n cancellationTokenSource.cancel();\n\n super.onStop();\n }"
] | [
"0.74874884",
"0.7284498",
"0.6979483",
"0.6349688",
"0.6230988",
"0.61304533",
"0.6127898",
"0.6122331",
"0.6043501",
"0.602902",
"0.5999324",
"0.59864235",
"0.5978969",
"0.5977171",
"0.59696305",
"0.5962076",
"0.5957441",
"0.59410655",
"0.5915114",
"0.5876782",
"0.5869328",
"0.5855961",
"0.5853836",
"0.5844608",
"0.58392334",
"0.5811175",
"0.5804433",
"0.5774695",
"0.5757593",
"0.5741722",
"0.57332516",
"0.57276285",
"0.57230353",
"0.57031125",
"0.5702668",
"0.56915265",
"0.5685569",
"0.56809026",
"0.5670292",
"0.5664951",
"0.5662151",
"0.5658083",
"0.5654583",
"0.5638349",
"0.56344116",
"0.56324315",
"0.56294626",
"0.56088555",
"0.56088555",
"0.56088555",
"0.5607094",
"0.5601975",
"0.5594429",
"0.55829036",
"0.5578786",
"0.5564259",
"0.5564259",
"0.5556224",
"0.55513036",
"0.5550802",
"0.55474514",
"0.55430937",
"0.554241",
"0.5539402",
"0.553152",
"0.5531013",
"0.55159044",
"0.55142856",
"0.55142856",
"0.5511928",
"0.5496674",
"0.5492906",
"0.5492376",
"0.5490557",
"0.54812074",
"0.5478281",
"0.54757726",
"0.5468796",
"0.5467686",
"0.5467686",
"0.5467686",
"0.54575586",
"0.54508495",
"0.54396236",
"0.5435217",
"0.54303277",
"0.5429671",
"0.54220396",
"0.5420383",
"0.54167366",
"0.54149526",
"0.53993654",
"0.53921276",
"0.5391687",
"0.53902906",
"0.5379662",
"0.53787744",
"0.5377891",
"0.5376434",
"0.5373962",
"0.5373434"
] | 0.0 | -1 |
Will cancel an inprogress connection, and close the socket | public void cancel() {
try {
mmSocket.close();
} catch (IOException e) { }
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void cancel() {\r\n\t\t\ttry {\r\n\t\t\t\tsocket.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t//pass\r\n\t\t\t}\r\n\t\t}",
"public void cancel() {\r\n\t\t\ttry {\r\n\t\t\t\tsocket.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}",
"public void cancel() {\n try {\n mSocket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void cancel() {\r\n try {\r\n blueSocket.close();\r\n } catch (IOException e) { }\r\n }",
"public void cancel() {\r\n mStopped = true;\r\n try {\r\n mSocket.close();\r\n } catch (IOException ioe) {\r\n Log.e(Common.TAG, \"Error closing the socket: \" + ioe.getMessage());\r\n }\r\n }",
"public void cancel() {\n try {\n mSocket.close();\n } catch (IOException e) {\n Log.e(TAG, \" failed to close socket\" + e.getMessage());\n }\n }",
"public void cancel() {\n try {\n mmServerSocket.close();\n } catch (IOException e) {\n Log.e(TAG, \"Could not close the connect socket\", e);\n }\n }",
"public void cancel() {\n try {\n mmServerSocket.close();\n } catch (IOException e) {\n Log.e(\"TEST\", \"Could not close the connect socket\", e);\n }\n\n }",
"public void cancel() {\n try {\n mmSocket.close();\n } catch (IOException e) {\n\n }\n }",
"public void cancel() {\n try {\n btSocket.close();\n } catch (IOException e) {\n Log.e(TAG, \"Could not close the client socket\", e);\n }\n }",
"public void cancel() {\n try {\n mmSocket.close();\n } catch (IOException e) {\n Log.e(TAG, \"Could not close the connect socket\", e);\n }\n }",
"public void cancel() {\n\t\t\ttry {\n\t\t\t\tmmSocket.close();\n\t\t\t} catch (IOException e) { }\n\t\t}",
"public void cancel() {\n\t\t\ttry {\n\t\t\t\tmmSocket.close();\n\t\t\t} catch (IOException e) { }\n\t\t}",
"@SuppressWarnings(\"unused\")\n\t\t\tpublic void cancel() {\n\t try {\n\t mmSocket.close();\n\t } catch (IOException e) { }\n\t }",
"public void cancel() {\n try {\n mmOutStream.close();\n mmInStream.close();\n mmSocket.close();\n } catch (IOException e) {\n Log.e(TAG, \"Could not close the connect socket\", e);\n }\n }",
"public void cancel() {\n try {\n mConnectedSocket.close();\n } catch (IOException e) {\n showToast(\"Could not close the connected socket.\");\n }\n }",
"public void cancel() {\n try {\n\n mServerSocket.close();\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void cancel() {\r\n try {\r\n btSocket.close();\r\n isConnected = false;\r\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);\r\n SharedPreferences.Editor edit = preferences.edit();\r\n edit.putBoolean(\"Connection\", isConnected);\r\n edit.apply();\r\n } catch (IOException e) {\r\n Log.d(\"TAG\", \"Could not close the client socket\");\r\n }\r\n }",
"public void cancel() {\r\n\t\t\ttry {\r\n\t\t\t\tmmServerSocket.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}",
"public void cancel() {\n try {\n mmServerSocket.close();\n } catch (IOException ignored) { }\n }",
"public void cancel() {\n try {\n mmServerSocket.close();\n } catch (IOException e) { }\n }",
"public void cancel() {\n try {\n mmServerSocket.close();\n } catch (IOException e) { }\n }",
"public void cancel() {\n stopThread = true;\n\t\ttry {\n\t\t\tmmSocket.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void cancel(){\r\n\t\t\r\n\t\ttry{\t\t\t\r\n\t\t\t// Stop the runnable job\r\n\t\t\trunning = false;\r\n\t\t\tjoin(1000);\r\n\t\t\t\r\n\t\t\t// Close socket\r\n\t\t\toSocket.close();\r\n\t\t\t\r\n\t\t}catch(InterruptedException e1){\r\n\t\t\tLog.e(TAG, \"terminating tread failed\", e1);\r\n\t\t}catch (IOException e2) {\r\n\t\t\tLog.e(TAG, \"cancel(), closing socket failed\", e2);\r\n\t\t}\t\r\n\t}",
"public void cancel() {\n try {\n mmServerSocket.close();\n } catch (IOException e) { }\n }",
"public void cancel() {\n try {\n mmSocket.close();\n } catch (IOException e) {\n showToast(\"Could not close the client socket.\");\n }\n }",
"public void cancel() {\n try {mmInStream.close();\n mmOutStream.close();\n mmSocket.close();\n } catch (IOException e) { }\n }",
"public void cancel() {\n try {\n bluetoothServerSocket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void cancel() {\n try {\n mmServerSocket.close();\n } catch (IOException e) {\n showToast(\"Could not close the server socket.\");\n }\n }",
"public void cancel() {\n try {\n mmServerSocket.close();\n mmServerSocket=null;\n } catch (IOException e) { }\n }",
"public void cancel() {\n request.disconnect();\n }",
"public void close(){\n\t\tlog.debug(\"[SC] Close called\", 5);\n\t\tif(socket!=null){\n\t\t\tlog.debug(\"[SC] Closing socket\", 4);\n\t\t\ttry {\n\t\t\t\tThread.sleep(10);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t//Silly impatient thread\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tout.close();\n\t\t\t\tin.close();\n\t\t\t\tsocket.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t//we're going to close it anyway\n\t\t\t}\n\t\t\tsocket = null;\n\t\t\trun = false;\n\t\t}\n\t}",
"public void stopConnection() throws IOException {\n in.close();\n out.close();\n clientSocket.close();\n }",
"private void closeCtrlSocket() {\n ctrlThreadTask = ThreadTasks.CLOSE;\n }",
"public void cancel() throws IOException {\n if (v) Log.d(TAG, \"cancel() thread server\");\n\n // Use iterator to\n Iterator iterator = arrayThreadClients.iterator();\n while (iterator.hasNext()) {\n ThreadClient threadClient = (ThreadClient) iterator.next();\n // Stop all threads client\n if (v) Log.d(TAG, \"STOP thread \" + threadClient.getNameThread());\n threadClient.interrupt();\n }\n\n // Clear the array of threads\n arrayThreadClients.clear();\n\n // Close the server socket to throw an exception and thus stop the server thread\n serverSocket.close();\n }",
"private void closeConnection() {\r\n try {\r\n socket.close();\r\n } catch (IOException ex) {\r\n // Ex on close\r\n }\r\n }",
"protected final void disconnect() {\n\t\trunning = false;\n\t\ttry {\n\t\t\tif (out != null)\n\t\t\t\tout.close();\n\t\t\tif (in != null)\n\t\t\t\tin.close();\n\t\t\tsocket.close();\n\t\t} catch (IOException e) {e.printStackTrace();}\n\t}",
"public void stop() {\n\t\tgetLogger().debug(\"Waiting 5 seconds for EVCC to process response and close TCP/TLS connection ...\");\n\t\ttry {\n Thread.sleep(5000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\t\t\n\t\tif (!isStopAlreadyInitiated()) {\n\t\t\tgetLogger().debug(\"Closing connection to client ...\");\n\t\t\tsetStopAlreadyInitiated(true);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tgetInStream().close();\n\t\t\t\tgetOutStream().close();\n\t\t\t\t\n\t\t\t\tif (getTcpClientSocket() != null) {\n\t\t\t\t\tgetTcpClientSocket().close();\n\t\t\t\t} else if (getTlsClientSocket() != null) {\n\t\t\t\t\tgetTlsClientSocket().close();\n\t\t\t\t} else {\n\t\t\t\t\tgetLogger().error(\"Neither TCP nor TLS client socket could be closed\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tThread.currentThread().interrupt();\n\t\t\t\tgetLogger().debug(\"Connection to client closed\");\n\t\t\t} catch (IOException e) {\n\t\t\t\tgetLogger().error(\"Error occurred while trying to close socket to client\", e);\n\t\t\t} \n\t\t}\n\t}",
"private void closeConnection(){\n report(\"Close connection\");\n try{\n if(socket != null && !socket.isClosed()) {\n report(\"Client: Close socket\");\n socket.close();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n report(\"End\");\n }",
"public int closeSocket() \n\t{\n\t\t\n\t}",
"final public void closeConnection() throws IOException {\n\n readyToStop = true;\n closeAll();\n }",
"public synchronized void abort() throws IOException {\n ensureOpen();\n // need check again .\n //\tif(isDone) {\n //\t throw new IOException(\"Operation has already ended\");\n //\t}\n\n //no compatible with sun-ri\n if ((isDone) && (replyHeaders.responseCode != OBEXConstants.OBEX_HTTP_CONTINUE)) {\n throw new IOException(\"Operation has already ended\");\n }\n\n exceptionMessage = \"Operation aborted\";\n if ((!isDone) && (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE)) {\n isDone = true;\n /*\n * Since we are not sending any headers or returning any headers then\n * we just need to write and read the same bytes\n */\n parent.sendRequest(0xFF, null, replyHeaders, null);\n\n if (replyHeaders.responseCode != ResponseCodes.OBEX_HTTP_OK) {\n throw new IOException(\"Invalid response code from server\");\n }\n\n exceptionMessage = null;\n }\n\n close();\n }",
"public void close() throws IOException {\n /*\n * Set m_iport to 0, in order to quit out of the while loop\n * in the receiver thread.\n */\n\tint save_iport = m_iport;\n\n\tm_iport = 0;\n\n synchronized (closeLock) {\n if (open) {\n /*\n * Reset open flag early to prevent receive0 executed by\n * concurrent thread to operate on partially closed\n * connection\n */\n open = false;\n\n close0(save_iport, connHandle, 1);\n\n setMessageListener(null);\n\n /*\n * Reset handle and other params to default\n * values. Multiple calls to close() are allowed\n * by the spec and the resetting would prevent any\n * strange behaviour.\n */\n connHandle = 0;\n host = null;\n m_mode = 0;\n\n /*\n * Remove this connection from the list of open\n * connections.\n */\n int len = openconnections.size();\n for (int i = 0; i < len; i++) {\n if (openconnections.elementAt(i) == this) {\n openconnections.removeElementAt(i);\n break;\n }\n }\n\n open_count--;\n }\n }\n }",
"public void closeSocket() { //gracefully close the socket connection\r\n try {\r\n this.os.close();\r\n this.is.close();\r\n this.clientSocket.close();\r\n } \r\n catch (Exception e) {\r\n System.out.println(\"XX. \" + e.getStackTrace());\r\n }\r\n }",
"@Override\n public void closeConnection() {\n\n System.out.println(\"[CLIENT] Closing socket connection...\");\n try {\n socket.close();\n in.close();\n out.close();\n System.out.println(\"[CLIENT] Closed socket connection.\");\n } catch (IOException e) {\n System.out.println(\"[CLIENT] Error occurred when closing socket\");\n }\n System.exit(0);\n\n }",
"private void closeConnection() throws IOException {\n\t\tclientSocket.close();\n\t}",
"public void close()\n {\n try\n {\n System.out.println(\"CLIENT chiude connessione\");\n receiverThread.interrupt();\n socket.close();\n System.exit(0);\n }\n catch (IOException e)\n {\n System.out.println(e.getMessage());\n System.exit(1);\n }\n }",
"public void disconnect() {\n\t\tif (sock != null) {\n\t\t\ttry {\n\t\t\t\tsock.close();\n\t\t\t} catch (IOException ioe) {\n\t\t\t} finally {\n\t\t\t\tsock = null;\n\t\t\t}\n\t\t}\n\t\toutStream.reset();\n\t\tdisconnected();\n\t}",
"protected abstract void sendCancel(Status reason);",
"public void stopClient() {\r\n\r\n // send message that we are closing the connection\r\n mRun = false;\r\n\r\n if (mBufferOut != null) {\r\n mBufferOut.flush();\r\n mBufferOut.close();\r\n }\r\n\r\n try {\r\n if (mBufferIn != null) {\r\n mBufferIn.close();\r\n }\r\n }\r\n catch (IOException e) {\r\n Log.d(TAG, \"error closing input buffer: \" + e.getMessage());\r\n }\r\n\r\n try {\r\n if (socket != null) {\r\n socket.close();\r\n Log.i(TAG, \"Socket closed in stopClient\");\r\n }\r\n }\r\n catch (IOException e) {\r\n Log.e(TAG, \"error closing socket: \" + e.getMessage());\r\n }\r\n\r\n mMessageListener = null;\r\n mBufferIn = null;\r\n mBufferOut = null;\r\n mServerMessage = null;\r\n }",
"@Override\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\tlong startingtime = System.currentTimeMillis();\n\t\t\t\t\t\t\t\t\t\t\tlong endingtime = startingtime + 3*1000; // 60 seconds * 1000 ms/sec\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\twhile(true)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(cancelsent==1 || System.currentTimeMillis() > endingtime)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(cancelsent!=1){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcancellingThread.interrupt();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trecSocket.close();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLog.e(\"closing\", \"socket closed\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}",
"private void shutdown() {\n clientTUI.showMessage(\"Closing the connection...\");\n try {\n in.close();\n out.close();\n serverSock.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@Override\r\n\tpublic void close() {\r\n\t\tthis.socket.close();\r\n\t}",
"@Override\n public void stop() {\n try {\n socket.close();\n } catch (IOException e) {\n getExceptionHandler().receivedException(e);\n }\n\n // Now close the executor service.\n\n }",
"public void dispose() {\n\t\tsocket.close();\n\t}",
"public void closeConnection() {\n try {\n stdIn.close();\n socketIn.close();\n socketOut.close();\n }\n catch(IOException e) {\n e.printStackTrace();\n }\n }",
"public void closeSocket() { //gracefully close the socket connection\n\t\ttry {\n\t\t\tthis.os.close();\n\t\t\tthis.is.close();\n\t\t\tthis.clientSocket.close();\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"XX. \" + e.getStackTrace());\n\t\t}\n\t}",
"public void close() {\n connection.close();\n running = false;\n }",
"public void stop() {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tif (socket != null) {\n\t\t\t\tsocket.close();\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"Socket closed.\");\n\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\n\t\t}\n\t}",
"private void close() {\n\t\ttry {\n\t\t\tsendCommand(\"end\\n\");\n\t\t\tout.close();\n\t\t\tin.close();\n\t\t\tsocket.close();\n\t\t} catch (MossException e) {\n\t\t} catch (IOException e2) {\n\t\t} finally {\n\t\t\tcurrentStage = Stage.DISCONNECTED;\n\t\t}\n\n\t}",
"@Override\n protected void handleConnection(final Socket sock) throws IOException {\n sock.setSoTimeout(1);\n sock.getInputStream().read();\n\n stopAcceptingConnections();\n }",
"@Override\r\n public synchronized void close()\r\n {\r\n if (!isRunning)\r\n {\r\n throw new IllegalStateException(\"already stopped!\");\r\n }\r\n threadPool.shutdownNow();\r\n socket.close();\r\n isRunning = false;\r\n }",
"public void cancel() {\n if (call != null) {\n call.cancel();\n }\n\n // TODO: We need a LOCK here because we can try\n // to cancel at the same time the request is getting\n // answered on the OkHTTP thread. We could get rid of\n // this LOCK by using Runnable when we move Android\n // implementation of mbgl::RunLoop to Looper.\n LOCK.lock();\n nativePtr = 0;\n LOCK.unlock();\n }",
"protected void stop() {\n keepGoing = false;\n // connect to myself as Client to exit\n try {\n new Socket(\"localhost\", port);\n } catch(Exception e) {\n // exception handling\n }\n }",
"public void close() {\n try {\n closeConnection(socket);\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }",
"private void disconnect()\r\n\t{\r\n\t\tif (theSocket != null)\r\n\t\t{\r\n\t\t\ttheSocket.transmit(\"Disconnecting\");\r\n\t\t\twriteLine(\"Disconnecting...\", 0);\r\n\t\t\twriteLine(\"Closing socket\", 0);\r\n\t\t\ttheSocket.close();\r\n\t\t\ttheSocket = null;\r\n\t\t}\r\n\t\tif (theSocket == null)\r\n\t\t{\r\n\t\t\twriteLine(\"The Socket is null\", 0);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\twriteLine(\"We have now disconnected\", 0);\r\n\t\t}\r\n\t\trunning = false;\r\n\t}",
"private void disconnect() {\n\n if (inStream != null) {\n try {inStream.close();} catch (Exception e) { e.printStackTrace(); }\n }\n\n if (outStream != null) {\n try {outStream.close();} catch (Exception e) { e.printStackTrace(); }\n }\n\n if (socket != null) {\n try {socket.close();} catch (Exception e) { e.printStackTrace(); }\n }\n }",
"@Override\n public void stop() {\n try {\n serverSocket.close();\n }\n catch (IOException e) {\n getExceptionHandler().receivedException(e);\n }\n\n // Close all open connections.\n synchronized (listConnections) {\n for (TcpConnectionHandler tch : listConnections)\n tch.kill();\n listConnections.clear();\n }\n\n // Now close the executor service.\n executorService.shutdown();\n try {\n executorService.awaitTermination(3, TimeUnit.SECONDS);\n }\n catch (InterruptedException e) {\n getExceptionHandler().receivedException(e);\n }\n }",
"public synchronized void disconnect()\r\n\t\t{\r\n\t\tif (state == RUNNING)\r\n\t\t stop();\r\n\t\tif (state == CLOSING_DOWN)\r\n\t\t {\r\n // Close the server socket\t\t \r\n try {\r\n \t\tserverSocket.close();\r\n \t}\r\n catch (IOException e)\r\n {\r\n }\r\n \r\n \t\t// flag the server as stopped\r\n \t\tstate = STOPPED;\r\n\t\t }\r\n\t\t}",
"@Override\n\tpublic void listenerInterrupted(ConnectionListenerEvent evt) {\n\t\t\n\t}",
"@Override\n\tpublic void interrupt() {\n\t\tshutdown_normally = true;\n\t\ttry {\n\t\t\tfor (ServerFwding f : peer_threads){\n\t\t\t\tif (f.isAlive())\n\t\t\t\t\tf.interrupt();\n\t\t\t}\n\t\t\t\n\t\t\tif (clients.contains(client)){\n\t\t\t\tSocket clientConnection = client.getListenerSocket();\n\t\t\t\tOutputStream out_c = new BufferedOutputStream(clientConnection.getOutputStream());\n\t\t\t\tbuf = Utility.addHeader(Constants.CLOSE_CONNECTION, 0, client.getId());\n\t\t\t\tout_c.write(buf.array());\n\t\t\t\tout_c.flush();\n\t\t\t\tout_c.close();\n\t\t\t\tclientConnection.close();\n\t\t\t\tclients.remove(client);\n\t\t\t}\n\t\t\tclientSocket.close();\n\t\t\tserverTcpSocket.close();\n\t\t} catch (IOException e) {\n\t\t\t// Error in communication\n\t\t\tSystem.err.println(client.getAddress() + \": Experienced trouble closing. (Warning)\");\n\t\t}\n\t}",
"public void stopInbound();",
"public static void disconnect() {\n \t\tconnPool.stop();\n \t}",
"public void cancel() {\n\t\tinterrupt();\n\t}",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"@Override\n public synchronized void cancel() throws SQLException {\n if (conn.conn_ref != null) {\n DuckDBNative.duckdb_jdbc_interrupt(conn.conn_ref);\n }\n }",
"public synchronized void closeConnection() {\n try {\n connected = false;\n socket.close();\n System.out.println(\"[SERVER] Connection closed with client\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void disconnect()\r\n\t{\r\n\t\ttry {\r\n\t\t\tconnection_.close();\r\n\t\t} catch (IOException e) {} // How can closing a connection fail?\r\n\t\t\r\n\t}",
"public void interrupt() {\n close();\n }",
"public synchronized void cancel() {\n }",
"private void closeConnection() {\n\t\t\tSystem.out.println(\"\\nTerminating connection \" + myConID + \"\\n\");\n\t\t\ttry {\n\t\t\t\toutput.close(); // close output stream\n\t\t\t\tinput.close(); // close input stream\n\t\t\t\tconnection.close(); // close socket\n\t\t\t} catch (IOException ioException) {\n\t\t\t\tSystem.out.println(\"Exception occured in closing connection\"\n\t\t\t\t\t\t+ ioException);\n\t\t\t}\n\t\t}",
"public void stopClient() {\n if (sendToSocket != null) {\n try {\n sendToSocket.flush();\n sendToSocket.close();\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n readFromSocket = null;\n sendToSocket = null;\n }",
"@Override\n\tprotected void cancelCallback() {\n\t\twasCancelled = true;\n\t\tclose();\n\t}",
"public void closeConnection() {\n\t\ttry {\n\t\t\tsocket.close();\n\t\t} catch (IOException e) {\n\t\t\tlogger.warning(\"problem closing socket connection with JSON-RPC server at \" + serverIP + \":\" + serverPort);\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public synchronized void stop() {\n if (mConnectThread != null) {\n mConnectThread.cancel();\n mConnectThread = null;\n }\n if (mConnectedThread != null) {\n mConnectedThread.cancel();\n mConnectedThread = null;\n }\n isConnected = false;\n }",
"@Override\r\n public void close() {\r\n sock.close();\r\n }",
"public void closeSocket () \n {\n try {\n // close the open server socket\n server.close();\n // send it a message to make it stop waiting immediately\n // (not really necessary)\n /*Socket s = new Socket(\"localhost\", thisPort);\n OutputStream os = s.getOutputStream();\n os.write((byte)0);\n os.close();\n s.close();*/\n } catch(Exception ex) { \n LOG.warn(\"Exception while shutting down \"+ this.getClass(), ex);\n }\n \n server = null;\n }",
"public void cancel();",
"void cancel();",
"void cancel();",
"void cancel();",
"void cancel();",
"void cancel();"
] | [
"0.8316673",
"0.82833505",
"0.8117103",
"0.7945492",
"0.7884965",
"0.7882617",
"0.7742026",
"0.77406067",
"0.7723242",
"0.7722198",
"0.7715249",
"0.7710952",
"0.7710952",
"0.7691734",
"0.76666975",
"0.76518023",
"0.7638199",
"0.76315945",
"0.7464666",
"0.7441542",
"0.74375093",
"0.74375093",
"0.7431566",
"0.7361222",
"0.73611087",
"0.7357676",
"0.7354725",
"0.72821903",
"0.72367066",
"0.7212685",
"0.6691755",
"0.6681016",
"0.6656089",
"0.65615094",
"0.6505926",
"0.6498447",
"0.64790225",
"0.64538157",
"0.6450698",
"0.6440469",
"0.6366408",
"0.62991285",
"0.62892926",
"0.6248427",
"0.6241779",
"0.62392724",
"0.6228813",
"0.6218436",
"0.6210085",
"0.6209127",
"0.6195499",
"0.6195252",
"0.6195117",
"0.61913836",
"0.6147063",
"0.61440235",
"0.6143754",
"0.6135273",
"0.61346716",
"0.61311215",
"0.61300296",
"0.612555",
"0.6120229",
"0.6113747",
"0.61135113",
"0.6112978",
"0.6104471",
"0.609834",
"0.60980487",
"0.609415",
"0.6078149",
"0.6075606",
"0.6073715",
"0.606952",
"0.60668033",
"0.60668033",
"0.60668033",
"0.60668033",
"0.60668033",
"0.60668033",
"0.60653806",
"0.60651076",
"0.6057122",
"0.6052774",
"0.6040872",
"0.603946",
"0.60027003",
"0.6001076",
"0.59983635",
"0.59922796",
"0.59832186",
"0.59822696",
"0.5980464",
"0.59703565",
"0.59703565",
"0.59703565",
"0.59703565",
"0.59703565"
] | 0.76928294 | 15 |
/ Call this from the main activity to send data to the remote device | public void write(byte[] bytes) {
try {
mmOutStream.write(bytes);
} catch (IOException e) { }
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onClickSend(View view) {\n //String string = editText.getText().toString();\n //serialPort.write(string.getBytes());\n //tvAppend(txtResponse, \"\\nData Sent : \" + string + \"\\n\");\n }",
"void sendData(String msg) throws IOException\n {\n if ( msg.length() == 0 ) return;\n//\n msg += \"\\n\";\n// Log.d(msg, msg);\n if (outputStream != null)\n outputStream.write(msg.getBytes());\n// myLabel.setText(\"Data Sent\");\n// myTextbox.setText(\" \");\n }",
"public void onClickSend(View view) {\n String string = editText.getText().toString();\n serialPort.write(string.getBytes());\n tvAppend(textView, \"\\nData Sent : \" + string + \"\\n\");\n\n }",
"@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tmConnectedThread.write(\"send\");\n\t\t\t\t\tmConnectedThread.writeFile();\n\t\t\t\t}",
"private void send(final String data) {\n\t\tif (null != PinPadController) {\n\t\t\tnew Thread() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tPinPadController.PINPad_sendToPinPad(data);\n\t\t\t\t};\n\t\t\t}.start();\n\t\t\tToast.makeText(this, \"send\", Toast.LENGTH_SHORT).show();\n\t\t}\n\t}",
"void sendData(String request) throws IOException {\n if (mmDevice == null) {\n Log.d(TAG, \"No device set\");\n }\n\n Log.d(TAG, \"Request is \" + request);\n if (mmOutputStream != null){\n mmOutputStream.write(request.getBytes(Charset.forName(\"UTF-8\")));\n }\n\n if (false && request.contains(\"travel\")) {\n closeBT();\n openBT();\n }\n }",
"public void sendDataToESP(String data){\n\n\n URL remoteurl = null;\n String baseurl = \"http://\"+IpAddress+\"/\";\n String urlString = baseurl + data;\n System.out.println(urlString);\n try {\n remoteurl = new URL(urlString);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n new AutoActivity.pingit().execute(remoteurl);\n }",
"@Override\n public void run() {\n try {\n int PORT = 10002; //서버에서 설정한 PORT 번호\n String ip=\"192.168.0.45\"; //서버 단말기의 IP주소..\n //본 예제는 Genymotion 에뮬레이터 2대로 테스한 예제입니다.\n //Genymotion을 실행하면 각 에뮬레이터의 IP를 확인할 수 있습니다.\n\n Socket socket; //클라이언트의 소켓\n DataInputStream is;\n DataOutputStream os;\n\n //서버와 연결하는 소켓 생성..\n socket = new Socket(InetAddress.getByName(ip), PORT);\n\n //여기까지 왔다는 것을 예외가 발생하지 않았다는 것이므로 소켓 연결 성공..\n //서버와 메세지를 주고받을 통로 구축\n is = new DataInputStream(socket.getInputStream());\n os = new DataOutputStream(socket.getOutputStream());\n\n Gson gson = new Gson();\n ArrayList<SendCommunication> communications = new ArrayList<SendCommunication>();\n communications.add(new SendCommunication(insertOrderMenu, insertOrderGoods));\n\n String json = gson.toJson(communications);\n\n os.writeUTF(json); //서버로 메세지 보내기.UTF 방식으로(한글 전송가능...)\n os.flush(); //다음 메세지 전송을 위해 연결통로의 버퍼를 지워주는 메소드..\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }",
"@Override\n public void run() {\n try {\n int PORT = 10002; //서버에서 설정한 PORT 번호\n String ip=\"192.168.0.46\"; //서버 단말기의 IP주소..\n //본 예제는 Genymotion 에뮬레이터 2대로 테스한 예제입니다.\n //Genymotion을 실행하면 각 에뮬레이터의 IP를 확인할 수 있습니다.\n\n Socket socket; //클라이언트의 소켓\n DataInputStream is;\n DataOutputStream os;\n\n //서버와 연결하는 소켓 생성..\n socket = new Socket(InetAddress.getByName(ip), PORT);\n\n //여기까지 왔다는 것을 예외가 발생하지 않았다는 것이므로 소켓 연결 성공..\n //서버와 메세지를 주고받을 통로 구축\n is = new DataInputStream(socket.getInputStream());\n os = new DataOutputStream(socket.getOutputStream());\n\n Gson gson = new Gson();\n ArrayList<SendCommunication> communications = new ArrayList<SendCommunication>();\n communications.add(new SendCommunication(insertOrderMenu, insertOrderGoods));\n\n String json = gson.toJson(communications);\n\n os.writeUTF(json); //서버로 메세지 보내기.UTF 방식으로(한글 전송가능...)\n os.flush(); //다음 메세지 전송을 위해 연결통로의 버퍼를 지워주는 메소드..\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }",
"public void onSend(View v){\n Socket msocket;\n try {\n msocket = IO.socket(\"http://10.0.2.2:9080/\");\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n //msocket=cApp.getSocket();\n msocket.connect();\n msocket.emit(\"sendTest\",\"fkg\");\n msocket.on(\"sendTest\",onSendTest);\n }",
"public void transmit()\n { \n try\n {\n JSch jsch=new JSch(); //object that allows for making ssh connections\n //Log into the pi\n Session session=jsch.getSession(USERNAME, HOSTNAME, 22); //pi defaults to using port 22 \n session.setPassword(PASSWORD);\n session.setConfig(\"StrictHostKeyChecking\", \"no\"); //necessary to access the command line easily\n \n session.connect(1000);//connect to the pi\n \n Channel channel = session.openChannel(\"exec\");//set session to be a command line \n ((ChannelExec)channel).setCommand(this.command); //send command to the pi\n \n channel.setInputStream(System.in); \n channel.setOutputStream(System.out);\n //connect to the pi so the command can go through\n channel.connect(1000);\n }\n catch(Exception e)\n {\n JOptionPane.showMessageDialog(frame, \"Error connecting to infrared light\", \"Error Message\", JOptionPane.ERROR_MESSAGE);\n }\n }",
"private void sendData() {\n final ByteBuf data = Unpooled.buffer();\n data.writeShort(input);\n data.writeShort(output);\n getCasing().sendData(getFace(), data, DATA_TYPE_UPDATE);\n }",
"@Override\n public void run() {\n if (socket != null) {\n byte b0 = get_sendbyte0();\n byte b1 = get_sendbyte1();\n Log.e(\"handler\", String.valueOf(b0) + String.valueOf(b1));\n if (outputStream == null) {\n try {\n outputStream = socket.getOutputStream();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n try {\n outputStream.write(new byte[]{(byte) 1, b0, b1, (byte) 1}); /*1, b0, b1, 1*/\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n\n }",
"@Override\n\t\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\ttextsent=0;\n\t\t\t\t\t\t\t\t\tesocket = new Socket(TestConnection.ip, TestConnection.port);\n\n\t\t\t\t\t\t\t\t// Log.e(\"ClientActivity\", \"C: Sending command.\");\n\t\t\t\t\t\t\t\t\tedos=new DataOutputStream(esocket.getOutputStream());\n\t\t\t\t\t\t\t\t\tedis=new DataInputStream(esocket.getInputStream());\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\tedos.writeUTF(\"DOUBT\");\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t// \tif(TestConnection.username!=null)\n\t\t\t\t\t\t\t\t\tedos.writeUTF(TestConnection.username);\n\t\t\t\t\t\t\t\t\tedos.writeUTF(TestConnection.roll);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tedos.writeUTF(TestConnection.macid);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tedos.writeUTF(etopic.getText().toString()); // SEND\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// SUBJECT\n\t\t\t\t\t\t\t\t\tedos.writeUTF(etext.getText().toString()); // SEND\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// MESSAGE\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// Sending imageflag\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//Image sending\n\t\t\t\t\t\t\t\t\tif(AudioMainActivity.imageflag!=1)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tedos.writeUTF(\"send_image\");\n\t\t\t\t\t\t\t\t\t\tLog.e(\"Image flag sent\",\"send_image\");\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tAudioMainActivity.imageflag=1;\n\t\t\t\t\t\t\t\t\tFile filedp = new File(mypath+\"/dp_th.jpg\");\n\t\t\t\t\t\t\t\t\tsendFile(filedp);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{edos.writeUTF(\"not_send_image\");\n\t\t\t\t\t\t\t\t\tLog.e(\"Image flag sent\",\"not_send_image\");\n\t\t\t\t\t\t\t\t\tString ifdone =edis.readUTF();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(ifdone.equals(\"not_done\"))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tFile filedp = new File(mypath+\"/dp_th.jpg\");\n\t\t\t\t\t\t\t\t\t\tsendFile(filedp);\n\t\t\t\t\t\t\t\t\t\tLog.e(\"ZABARDASTI\",\"Image Sent\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tfinal String msgServer = edis.readUTF(); // RECEIVE\n\t\t\t\t\t\t\t\t\tLog.e(\"Confirmation\", \"msgServer=\"+msgServer);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// CONFIRMATION\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// IF MESSAGE\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// RECEIVED BY\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// SERVER\n\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\t\t\tif (msgServer.contains(\"received\")) {\n\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(AudioDoubt.this, \"Doubt Sent\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t\t\temerdialog.dismiss();\n\t\t\t\t\t\t\t\t\t\t\t\ttextsent=1;\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tAudioMainActivity.doubt.add(etopic.getText().toString());\n\t\t\t\t\t\t\t\t\t\t\t\tAudioMainActivity.textMessage.add(etext.getText().toString());\n\t\t\t\t\t\t\t\t\t\t\t\tAudioMainActivity.count=5-AudioMainActivity.doubt.size();\n\t\t\t\t\t\t\t\t\t\t\t\t//counter.setText(\"Doubts Remaining : \"+count);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\tToast.makeText(AudioDoubt.this,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Server Error! Doubt not sent!\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t//doubtSubject.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t//doubtText.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\tetopic.setEnabled(true);\n\t\t\t\t\t\t\t\t\t\t\tetext.setEnabled(true);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcatch (Exception e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfinally {\n\t\t\t\t\t\t\t\tif (esocket != null) {\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t// close socket connection after using it\n\t\t\t\t\t\t\t\t\t\tesocket.close();\n\t\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\te.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}\n\n\t\t\t\t\t\t}",
"@Override\r\n public void onClick(View v) {\n String msg = ed_msg.getText().toString();\r\n try {\r\n\t\t\t\t\tsend(HOST, PORT, msg.getBytes());\r\n\t\t\t\t\t\r\n\t \tmHandler.sendMessage(mHandler.obtainMessage()); \r\n\t \tcontent =HOST +\":\"+ msg +\"\\n\";\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n }",
"@Override\r\n public void onCreate() {\n intent = new Intent(BROADCAST_ACTION);\r\n startBTService();\r\n// try{\r\n// mConnectedThread.write(\"2\".getBytes());\r\n// }catch(Exception e){\r\n//\r\n// }\r\n }",
"private void sendData(String data) {\n\n if (!socket.isConnected() || socket.isClosed()) {\n Toast.makeText(getApplicationContext(), \"Joystick is disconnected...\",\n Toast.LENGTH_LONG).show();\n return;\n }\n\n\t\ttry {\n\t\t\tOutputStream outputStream = socket.getOutputStream();\n\n byte [] arr = data.getBytes();\n byte [] cpy = ByteBuffer.allocate(arr.length+1).array();\n\n for (int i = 0; i < arr.length; i++) {\n cpy[i] = arr[i];\n }\n\n //Terminating the string with null character\n cpy[arr.length] = 0;\n\n outputStream.write(cpy);\n\t\t\toutputStream.flush();\n\n Log.d(TAG, \"Sending data \" + data);\n\t\t} catch (IOException e) {\n Log.e(TAG, \"IOException while sending data \"\n + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} catch (NullPointerException e) {\n Log.e(TAG, \"NullPointerException while sending data \"\n + e.getMessage());\n\t\t}\n\t}",
"public void sendClick(View view) {\n String message = input.getText().toString();\n uart.send(message);\n }",
"@Override\r\n\tpublic void onClick(View v) {\n\t\tswitch (v.getId()) {\r\n case R.id.sendd:\r\n buffer = new byte[]{'d'};\r\n if (sendMessage(buffer) == -1) {\r\n Toast.makeText(getActivity(), \"失败,请检查连接!\", Toast.LENGTH_SHORT).show();\r\n } else {\r\n Toast.makeText(getActivity(), \"正在关闭,请稍后...\", Toast.LENGTH_SHORT).show();\r\n }\r\n break;\r\n case R.id.sendz:\r\n buffer = new byte[]{'z'};\r\n if (sendMessage(buffer) == -1) {\r\n Toast.makeText(getActivity(), \"失败,请检查连接!\", Toast.LENGTH_SHORT).show();\r\n } else {\r\n Toast.makeText(getActivity(), \"正在关闭,请稍后...\", Toast.LENGTH_SHORT).show();\r\n }\r\n break;\r\n case R.id.sendrclear:\r\n byte[] a = new byte[]{60,0,0};\r\n sendR(a);\r\n break;\r\n case R.id.sendrcloud:\r\n byte[] b = new byte[]{0,2,0};\r\n sendR(b);\r\n break;\r\n\r\n case R.id.sendrcloud2:\r\n byte[] c = new byte[]{127,2,0};\r\n sendR(c);\r\n break;\r\n\r\n case R.id.sendrrain:\r\n byte[] d = new byte[]{60,1,1};\r\n sendR(d);\r\n break;\r\n\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t}",
"private void sendData() {\n\n Thread update = new Thread() {\n public void run() {\n while (opModeIsActive() && (tfod != null)) {\n path.updateTFODData(recognize());\n path.updateHeading();\n try {\n Thread.sleep(500);\n } catch (Exception e) {\n }\n if (isStopRequested() && tfod != null)\n tfod.shutdown();\n }\n }\n };\n update.start();\n }",
"public void onClick(View v) {\n mConnectedThread.write(\"1\"); // Send \"1\" via Bluetooth\n Toast.makeText(getBaseContext(), \"Turn on LED\", Toast.LENGTH_SHORT).show();\n }",
"public void run(){\n\t\t\t\tDatagramPacket packet = new DatagramPacket(data,data.length, ip, port);\n\t\t\t\ttry {\n\t\t\t\t\tsocket.send(packet);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}",
"public void run() {\n\t\t\t\tDatagramPacket packet = new DatagramPacket(data,data.length,ip,port);\n\t\t\t\ttry {\n\t\t\t\t\tsocket.send(packet);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}",
"@Override\n public void onClick(View view) {\n\n runOnUiThread(\n new Runnable() {\n @Override\n public void run() {\n MainActivity\n .this\n .connectionManager.getTo().println(\n MainActivity\n .this\n .send_text.getText().toString()\n );\n }\n }\n );\n\n }",
"public void sendMsgToClient() {\n\n try {\n\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())), true);\n\n Log.d(TAG, \"The transmitted data:\" + msg);\n\n writer.println(msg);\n\n } catch (Exception e) {\n\n e.printStackTrace();\n\n }\n\n }",
"private void bluetoothSendMsg(String s) {\n byte [] msgOnBuf;\n msgOnBuf = s.getBytes();\n try {\n outStream.write(msgOnBuf);\n } catch (IOException e) {\n Log.d(TAG,\"send message fail!\");\n }\n }",
"public void onClick(View v) {\n setBottonSingleTest();\n viewPager.setCurrentItem(0);\n\n\n try{\n DatagramSocket socket = new DatagramSocket();\n byte[] buf = \"hello world\".getBytes();\n\n DatagramPacket packet = new DatagramPacket(buf,\n buf.length,\n InetAddress.getByName(\"255.255.255.255\"),\n 666);\n //给服务端发送数据\n socket.send(packet);\n socket.close();\n }catch (IOException e){\n System.out.println(e);\n }\n }",
"private void sendTextRequest() {\n\t\t\t\t\tfinal Thread textingThread = new Thread (new Runnable() {\n\t\t\t\t\t\t\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\ttextsent=0;\n\t\t\t\t\t\t\t\t\tesocket = new Socket(TestConnection.ip, TestConnection.port);\n\n\t\t\t\t\t\t\t\t// Log.e(\"ClientActivity\", \"C: Sending command.\");\n\t\t\t\t\t\t\t\t\tedos=new DataOutputStream(esocket.getOutputStream());\n\t\t\t\t\t\t\t\t\tedis=new DataInputStream(esocket.getInputStream());\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\tedos.writeUTF(\"DOUBT\");\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t// \tif(TestConnection.username!=null)\n\t\t\t\t\t\t\t\t\tedos.writeUTF(TestConnection.username);\n\t\t\t\t\t\t\t\t\tedos.writeUTF(TestConnection.roll);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tedos.writeUTF(TestConnection.macid);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tedos.writeUTF(etopic.getText().toString()); // SEND\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// SUBJECT\n\t\t\t\t\t\t\t\t\tedos.writeUTF(etext.getText().toString()); // SEND\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// MESSAGE\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// Sending imageflag\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//Image sending\n\t\t\t\t\t\t\t\t\tif(AudioMainActivity.imageflag!=1)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tedos.writeUTF(\"send_image\");\n\t\t\t\t\t\t\t\t\t\tLog.e(\"Image flag sent\",\"send_image\");\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tAudioMainActivity.imageflag=1;\n\t\t\t\t\t\t\t\t\tFile filedp = new File(mypath+\"/dp_th.jpg\");\n\t\t\t\t\t\t\t\t\tsendFile(filedp);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{edos.writeUTF(\"not_send_image\");\n\t\t\t\t\t\t\t\t\tLog.e(\"Image flag sent\",\"not_send_image\");\n\t\t\t\t\t\t\t\t\tString ifdone =edis.readUTF();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(ifdone.equals(\"not_done\"))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tFile filedp = new File(mypath+\"/dp_th.jpg\");\n\t\t\t\t\t\t\t\t\t\tsendFile(filedp);\n\t\t\t\t\t\t\t\t\t\tLog.e(\"ZABARDASTI\",\"Image Sent\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tfinal String msgServer = edis.readUTF(); // RECEIVE\n\t\t\t\t\t\t\t\t\tLog.e(\"Confirmation\", \"msgServer=\"+msgServer);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// CONFIRMATION\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// IF MESSAGE\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// RECEIVED BY\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// SERVER\n\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\t\t\tif (msgServer.contains(\"received\")) {\n\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(AudioDoubt.this, \"Doubt Sent\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t\t\temerdialog.dismiss();\n\t\t\t\t\t\t\t\t\t\t\t\ttextsent=1;\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tAudioMainActivity.doubt.add(etopic.getText().toString());\n\t\t\t\t\t\t\t\t\t\t\t\tAudioMainActivity.textMessage.add(etext.getText().toString());\n\t\t\t\t\t\t\t\t\t\t\t\tAudioMainActivity.count=5-AudioMainActivity.doubt.size();\n\t\t\t\t\t\t\t\t\t\t\t\t//counter.setText(\"Doubts Remaining : \"+count);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\tToast.makeText(AudioDoubt.this,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Server Error! Doubt not sent!\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t//doubtSubject.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t//doubtText.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\tetopic.setEnabled(true);\n\t\t\t\t\t\t\t\t\t\t\tetext.setEnabled(true);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcatch (Exception e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfinally {\n\t\t\t\t\t\t\t\tif (esocket != null) {\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t// close socket connection after using it\n\t\t\t\t\t\t\t\t\t\tesocket.close();\n\t\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\te.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}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpublic void sendFile(File file) throws IOException {\n\t\t\t\t\t FileInputStream fileIn = new FileInputStream(file);\n\t\t\t\t\t byte[] buf = new byte[Short.MAX_VALUE];\n\t\t\t\t\t int bytesRead; \n\t\t\t\t\t while( (bytesRead = fileIn.read(buf)) != -1 ) {\n\t\t\t\t\t dos.writeShort(bytesRead);\n\t\t\t\t\t dos.write(buf,0,bytesRead);\n\t\t\t\t\t }\n\t\t\t\t\t dos.writeShort(-1);\n\t\t\t\t\t fileIn.close();\n\t\t\t\t\t }\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\ttextingThread.start();\n\t\t\t\t\t\n\t\t\t\t\tThread textTimer=new Thread (new Runnable() {\n\t\t\t\t\t\t\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tlong startingtime = System.currentTimeMillis();\n\t\t\t\t\t\t\tlong endingtime = startingtime + 5*1000; // 60 seconds * 1000 ms/sec\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\twhile (true)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(textsent==1||System.currentTimeMillis() > endingtime)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(textsent!=1)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttextingThread.interrupt();\n\t\t\t\t\t\t\t\t\t\tLog.e(\"Texting thread\",\"Thread Interrupted\");\n\t\t\t\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tebar.setVisibility(View.GONE);\n\t\t\t\t\t\t\t\t\t\t\t\tesend.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"Connection Error... Could not Send Doubt..\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t\t\tetopic.setEnabled(true);\n\t\t\t\t\t\t\t\t\t\t\t\tetext.setEnabled(true);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\ttextTimer.start();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}",
"public void sendData(String data) {// send data\n\t\tthis.data = data;\n\t\tthis.start();// spin up a new thread to send data\n\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\tDatagramSocket s=new DatagramSocket();\n\t\t\t\t\tInetAddress ipAd=InetAddress.getByName(ip);\n\t\t\t\t\tDatagramPacket dp=new DatagramPacket(pass2.getBytes(), pass2.getBytes().length\t, ipAd, 21111);\n\t\t\t\t\ts.send(dp);\n\t\t\t\t\tToast.makeText(getApplicationContext(), pass2.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t\t\ts.close();\n\t\t\t\t\t\n\t\t\t\t} catch (SocketException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (UnknownHostException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}",
"void beginSendData(){\n stopSendThread = false;\n final Thread thread = new Thread(new Runnable() {\n\n public void run() {\n while(!Thread.currentThread().isInterrupted() && !stopSendThread){\n try{\n try {\n Thread.currentThread().sleep(100);\n\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n String string = \":1\" + (char)speedLeft + (char)speedRight + \"@\";\n try {\n os.write(string.getBytes());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n } catch (Exception e){\n e.printStackTrace();\n stopSendThread = true;\n }\n\n\n }\n\n }\n });\n thread.start();\n System.out.println(\"koniec funkcji startsend\");\n }",
"private void sendMessage() {\n Log.d(\"sender\", \"Broadcasting message\");\n Intent intent = new Intent(\"custom-event-name\");\n // You can also include some extra data.\n double[] destinationArray = {getDestination().latitude,getDestination().longitude};\n intent.putExtra(\"destination\", destinationArray);\n LocalBroadcastManager.getInstance(this).sendBroadcast(intent);\n }",
"public void postData()\n\t{\n\t\tnew NetworkingTask().execute(message);\n\t}",
"static public void startSending(String add,int port,byte[] data,int mode){\n }",
"private void publish(String deviceAddress)\n {\n if(mMqttServiceBound)\n {\n try\n {\n TexTronicsDevice device = mTexTronicsList.get(deviceAddress);\n if(device != null)\n {\n // Get the byte array from the CSV file stored in the device\n byte[] buffer = IOUtil.readFile(device.getCsvFile());\n // Create a new string using device info and new byte array\n String json = MqttConnectionService.generateJson(device.getDate(),\n device.getDeviceAddress(),\n Choice.toString(device.getChoice()),\n device.getExerciseID(),\n device.getRoutineID(),\n new String(buffer));\n Log.d(\"SmartGlove\", \"JSON: \" + json);\n // Call the service to publish this string, now in JSON format\n mMqttService.publishMessage(json);\n String exe_nm = MainActivity.exercise_name;\n\n List<Integer> ids = new ArrayList<>();\n try{\n ids = UserRepository.getInstance(getApplicationContext()).getAllIdentities();\n }\n catch (Exception e){\n Log.e(TAG, \"onCreate: \", e);\n }\n\n int current = ids.size();\n\n Log.d(TAG, \"UpdateData: logging the data\");\n\n if (exe_nm.equals(\"Finger_Tap\") && deviceAddress.equals(\"LEFT_GLOVE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_finTap_left(json,current);\n }\n else if (exe_nm.equals(\"Closed_Grip\") && deviceAddress.equals(\"LEFT_GLOVE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_opCl_left(json,current);\n }\n else if (exe_nm.equals(\"Hand_Flip\") && deviceAddress.equals(\"LEFT_GLOVE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_h_flip_left(json,current);\n }\n else if (exe_nm.equals(\"Finger_to_Nose\") && deviceAddress.equals(\"LEFT_GLOVE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_finNose_left(json,current);\n }\n else if (exe_nm.equals(\"Hold_Hands_Out\") && deviceAddress.equals(\"LEFT_GLOVE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_handout_left(json,current);\n }\n else if (exe_nm.equals(\"Resting_Hands_on_Thighs\") && deviceAddress.equals(\"LEFT_GLOVE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_handrest_left(json,current);\n }\n else if (exe_nm.equals(\"Finger_Tap\") && deviceAddress.equals(\"RIGHT_GLOVE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_finTap_right(json,current);\n }\n else if (exe_nm.equals(\"Closed_Grip\") && deviceAddress.equals(\"RIGHT_GLOVE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_opCl_right(json,current);\n }\n else if (exe_nm.equals(\"Hand_Flip\") && deviceAddress.equals(\"RIGHT_GLOVE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_h_flip_right(json,current);\n }\n else if (exe_nm.equals(\"Finger_to_Nose\") && deviceAddress.equals(\"RIGHT_GLOVE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_finNose_right(json,current);\n }\n else if (exe_nm.equals(\"Hold_Hands_Out\") && deviceAddress.equals(\"RIGHT_GLOVE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_handout_right(json,current);\n }\n else if (exe_nm.equals(\"Resting_Hands_on_Thighs\") && deviceAddress.equals(\"RIGHT_GLOVE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_handrest_right(json,current);\n }\n else if (exe_nm.equals(\"Heel_Stomp\") && deviceAddress.equals(\"RIGHT_SHOE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_heelStmp_right(json,current);\n }\n else if (exe_nm.equals(\"Toe_Tap\") && deviceAddress.equals(\"RIGHT_SHOE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_toeTap_right(json,current);\n }\n else if (exe_nm.equals(\"Walk_Steps\") && deviceAddress.equals(\"RIGHT_SHOE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_gait_right(json,current);\n }\n else if (exe_nm.equals(\"Heel_Stomp\") && deviceAddress.equals(\"LEFT_SHOE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_heelStmp_left(json,current);\n }\n else if (exe_nm.equals(\"Toe_Tap\") && deviceAddress.equals(\"LEFT_SHOE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_toeTap_left(json,current);\n }\n else if (exe_nm.equals(\"Walk_Steps\") && deviceAddress.equals(\"LEFT_SHOE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_gait_left(json,current);\n }\n }\n else {\n Log.d(TAG, \"publish: Publish failed. Device is null\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }",
"@Override\r\n public void onSendTcp(Object obj) {\n mNetworkManager.sendTCPData(obj);\r\n }",
"@Override\n public void onClick(View v) {\n byte[] bytes = command.getBytes();\n\n if (sPort != null) {\n\n try {\n sPort.write(bytes, 100000);\n Log.e(LOG_TAG, \"inside write\");\n// mExecutor.submit(mSerialIoManager);\n } catch (IOException e) {\n e.printStackTrace();\n Log.e(LOG_TAG, \"Exception \" + e);\n }\n } else {\n Log.e(LOG_TAG, \"UsbSerialPort is null\");\n }\n }",
"@Override\n\t\tpublic void onClick(View v) {\n\t\t\tmsgText.setText(null);\n\t\t\tsendEdit.setText(null);\n\t\t\tif(sppConnected || devAddr == null)\n\t\t\t\treturn;\n\t\t\ttry{\n\t\t\t btSocket = btAdapt.getRemoteDevice(devAddr).createRfcommSocketToServiceRecord(uuid);\n\t\t\t btSocket.connect();\n\t\t\t Log.d(tag,\"BT_Socket connect\");\n\t\t\t synchronized (MainActivity.this) {\n\t\t\t\tif(sppConnected)\n\t\t\t\t\treturn;\n\t\t\t\tbtServerSocket.close();\n\t\t\t\tbtIn = btSocket.getInputStream();\n\t\t\t\tbtOut = btSocket.getOutputStream();\n\t\t\t\tconected();\n\t\t\t}\n\t\t\t Toast.makeText(MainActivity.this,\"藍牙裝置已開啟:\" + devAddr, Toast.LENGTH_LONG).show();\n\t\t\t}catch(IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t\tsppConnected =false;\n\t\t\t\ttry{\n\t\t\t\t\tbtSocket.close();\n\t\t\t\t}catch(IOException e1){\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tbtSocket = null;\n\t\t\t\tToast.makeText(MainActivity.this, \"連接異常\", Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t}",
"public void send_data(int curr_portNo, String data_send) {\n\t\ttry {\n\t\t\tSocket baseSocket = new Socket(Content_Provider.ipAdd, curr_portNo);\n\t\t\tPrintWriter toPeer = new PrintWriter(new BufferedWriter(\n\t\t\t\t\tnew OutputStreamWriter(baseSocket.getOutputStream())), true);\n\t\t\ttoPeer.println(data_send);\n\t\t\tbaseSocket.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void sendData(byte[] data) {\r\n\t\t//send packet\r\n\t\ttry {\r\n\t\t\tout.write(data);\r\n\t\t} catch(IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void send( String data ) {\n SendRunnable sendRunnable = new SendRunnable( data );\n Thread sendThread = new Thread( sendRunnable );\n sendThread.start();\n }",
"void bytetest() {\n byte[] myByteArray = new byte[256];\n for (int i = 0; i < 256; ++i) {\n myByteArray[i] = (byte)i;\n }\n\n Intent writeIntent = new Intent(BGXpressService.ACTION_WRITE_SERIAL_BIN_DATA);\n writeIntent.putExtra(\"value\", myByteArray);\n writeIntent.setClass(mContext, BGXpressService.class);\n writeIntent.putExtra(\"DeviceAddress\", mDeviceAddress);\n startService(writeIntent);\n }",
"public void sendToWard(){\r\n\t\t//here is some code that we do not have access to\r\n\t}",
"public void sendBtMsg(final String msg2send) {\n UUID uuid = UUID.fromString(\"94f39d29-7d6d-437d-973b-fba39e49d4ee\"); //Standard SerialPortService ID\n try {\n\n if (mmDevice != null) {\n mmSocket = mmDevice.createRfcommSocketToServiceRecord(uuid);\n if (!mmSocket.isConnected()) {\n try {\n mmSocket.connect();\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n @Override\n public void run() {\n\n toastMsg(\"Connection Established\");\n\n String msg = msg2send;\n //msg += \"\\n\";\n OutputStream mmOutputStream = null;\n try {\n mmOutputStream = mmSocket.getOutputStream();\n mmOutputStream.write(msg.getBytes());\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n });\n\n } catch (IOException e) {\n Log.e(\"\", e.getMessage());\n mmSocket.close();\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n @Override\n public void run() {\n toastMsg(\"Connection not Established\");\n\n\n }\n });\n\n /*try {\n Log.e(\"\", \"trying fallback\");\n mmSocket =(BluetoothSocket) mmDevice.getClass().getMethod(\"createRfcommSocket\", new Class[] {int.class}).invoke(mmDevice,1);\n mmSocket.connect();\n Log.e(\"\", \"Connected\");\n }\n catch (Exception e2){\n Log.e(\"\", \"Couldn't establish Bluetooth connection!\");\n toastMsg(\"Couldn't establish Bluetooth connection!\");\n }*/\n }\n }\n\n\n/*\n if (mmOutputStream == null)\n try {\n mmOutputStream = mmSocket.getOutputStream();\n } catch (IOException e) {\n errorExit(\"Fatal Error\", \"In onResume(), input and output stream creation failed:\" + e.getMessage() + \".\");\n }*/\n\n } else {\n if (mBluetoothAdapter != null) {\n\n\n Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices();\n if (pairedDevices.size() > 0) {\n for (BluetoothDevice device : pairedDevices) {\n if (device.getName().matches(\".*\")) //Note, you will need to change this to match the name of your device\n {\n Log.e(\"Aquarium\", device.getName());\n mmDevice = device;\n sendBtMsg(msg2send);\n break;\n }\n }\n }\n }\n }\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n }",
"@Override\r\n public void onResult(byte[] data)\r\n {\n StringBuffer sb = new StringBuffer();\r\n sb.append(getString(R.string.external_device_recv_data)).append(\"\\n\");\r\n sb.append(new String(data)).append(\"\\n\");\r\n \r\n McRecvOnBoard = sb.toString();\r\n \r\n MainControllerDemoActivity.this.runOnUiThread(new Runnable(){\r\n\r\n @Override\r\n public void run() \r\n { \r\n mRecvTextView.setText(McRecvOnBoard);\r\n }\r\n });\r\n }",
"public void send(byte[] data) throws IOException {\n dataOutput.write(data);\n dataOutput.flush();\n }",
"void send();",
"protected void sendDataToRobot(byte[] data) {\n\t\thandler.sendData(data);\n\t}",
"@Override\n\t\tpublic void run() {\n\t\t\ttry {\n\t\t\t\tLog.v(TAG,\"connect to server...\");\n\t\t\t\tsocket=new Socket(\"140.116.246.200\",4000+id);\n\t\t\t\tout=socket.getOutputStream();\n\t\t\t\tin=socket.getInputStream();\n\t\t\t\tLog.v(TAG,\"connect!!\");\n\t\t\t\n\t\t\t\tsendData(\"ask#\");\n\t\t\t\tUIHr.post(refreshUI); \t\n\t\t\t\tresult=new Integer(readData());\n\t\t\t\tUIHr.post(refreshUI); \t\t\n\t\t\t\tsendData(\"over#\");\n\t\t\t\tsocket.close();\n\t\t\t} catch (UnknownHostException e) {e.printStackTrace();} \n\t\t\tcatch (IOException e) {e.printStackTrace();}\n\t\t}",
"void sendDataForSubscriber(int subId, String callingPkg, String destAddr,\n String scAddr, int destPort, byte[] data, PendingIntent sentIntent,\n PendingIntent deliveryIntent);",
"public void communicate() {\n\t\tconnect();\n\t\ttry {\n\t\t\tin = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n\t\t\tout = new PrintWriter((socket.getOutputStream()), true);\n\t\t\tobjOut = new ObjectOutputStream(socket.getOutputStream());\n\t\t\tobjIn = new ObjectInputStream(socket.getInputStream());\n\t\t\twhile (!socket.isClosed()) {}\t// Doesn't need to do anything besides stay awake, GUI handles all in/outputs\n\t\t\tin.close();\n\t\t\tout.close();\n\t\t\tobjIn.close();\n\t\t\tobjOut.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Sending error: \" + e.getMessage());\n\t\t}\t\t\n\t}",
"public void sendMessage(View v) {\n // retrieve the text typed in by the user in the EditText\n String message = ((EditText)(findViewById(R.id.editText_message))).getText().toString();\n // create an implicit intent to any app with SENDTO capability\n // set the destination (5556 is the phone number of the second emulator instance)\n Uri destination = Uri.parse(\"smsto:5556\");\n Intent smsIntent = new Intent(Intent.ACTION_SENDTO, destination);\n // pass the composed message to the messaging activity\n smsIntent.putExtra(\"sms_body\", message);\n // launch the intent\n startActivity(smsIntent);\n }",
"@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tSendToServer(ph);\n\t\t\t\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"public void run()\r\n\t\t{\n\t\t\ttheVMKClient.sendMessageToServer(m);\r\n\t\t}",
"void sendDataForSubscriberWithSelfPermissions(int subId, String callingPkg, String destAddr,\n String scAddr, int destPort, byte[] data, PendingIntent sentIntent,\n PendingIntent deliveryIntent);",
"public void send(byte[] bytes)\r\n\t{\r\n\t\t// TODO: So, we should put those bytes in a queue for a worker thread to send, because\r\n\t\t// everything downstream blocks on send.\r\n\t\t// So, the worker thread does the touchy business of sending and receiving and updating\r\n\t\t// the screen buffer. The UI thread redraws the screen when the buffer is dirty.\r\n\t\ttry {\r\n\t\t\tremoteOut_.write(bytes);\r\n\t\t} catch (IOException e)\r\n\t\t{\r\n\t\t\tlistener_.onSessionEvent(StatusListener.COULD_NOT_SEND,\r\n\t\t\t\t\t\"There was an error sending data.\", null, 0);\r\n\t\t}\r\n\t\t\r\n\t}",
"public void send() {\n try {\n String message = _gson.toJson(this);\n byte[] bytes = message.getBytes(\"UTF-8\");\n int length = bytes.length;\n\n _out.writeInt(length);\n _out.write(bytes);\n \n } catch (IOException ex) {\n Logger.getLogger(ResponseMessage.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Override\n public void run() {\n if (this.clientInterfaceTCP.getConnected())\n this.clientInterfaceTCP.sendString(this.messageToSend);\n }",
"private void send() {\n Toast.makeText(this, getString(R.string.message_sent, mBody, Contact.byId(mContactId).getName()),\n Toast.LENGTH_LONG).show();\n finish(); // back to DirectShareActivity\n }",
"public void send() {\n\t}",
"public void goToSendCommand(View view){\n Log.i(tag, \"About to launch SendCommand\");\n Intent i = new Intent(this, SendCommand.class);\n startActivity(i);\n }",
"private void ipcSend(JSONObject data) {\n JSONObject json = data;\n try {\n json.put(IPC_MESSAGE_APPID, mAppId);\n\n if (mIpcChannel != null) {\n log.e(\"ipcSend:[\" + json.toString() + \"]\");\n\n mIpcChannel.send(json.toString());\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void startData()\n\t\t\t{\n\t\t\t\tsend(\"<data>\", false);\n\t\t\t}",
"public synchronized void send() {\n if (AudioUtil.getIs()) {\n LogUtil.d(Tag, \"VR stop\");\n this.mPCMPackageHead.m4053c(CommonParams.bB);\n this.mPCMPackageHead.m4047a(0);\n writeVR(this.mPCMPackageHead.m4048a(), this.mPCMPackageHead.m4049b());\n }\n }",
"@Override\n\t\tpublic void run() {\n\t\t\ttry {\n\n\t\t\t\tURL url = new URL(\"http://ecshopxax.sinaapp.com/js/index.js\");\n\t\t\t\tURLConnection connection = url.openConnection();\n\t\t\t\tInputStream is = connection.getInputStream();\n\t\t\t\tbyte[] bs = new byte[1024];\n\t\t\t\tint len = 0;\n\t\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\t\twhile ((len = is.read(bs)) != -1) {\n\t\t\t\t\tString str = new String(bs, 0, len);\n\t\t\t\t\tsb.append(str);\n\t\t\t\t}\n\n\t\t\t\tMessage msg = new Message();\n\t\t\t\tmsg.what = 0x15;\n\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tbundle.clear();\n\n\t\t\t\t// bundle.putString(\"recv_server\", new String(buffer));\n\t\t\t\tbundle.putString(\"text1\", sb.toString());\n\n\t\t\t\tmsg.setData(bundle);\n\n\t\t\t\tmyHandler.sendMessage(msg);\n\n\t\t\t\n\t\t\t} catch (Exception e) {\n\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}",
"@Override\n public void send() {\n System.out.println(\"send message by SMS\");\n }",
"private void writeData(String data) {\n try {\n outStream = btSocket.getOutputStream();\n } catch (IOException e) {\n }\n\n String message = data;\n byte[] msgBuffer = message.getBytes();\n\n try {\n outStream.write(msgBuffer);\n } catch (IOException e) {\n }\n }",
"private void sendAnswer(SensorData sensorData, String newValueOfProduct) throws IOException{\n\n /** The IP address and port from client . */\n InetAddress address = sensorData.getAddress();\n int port = sensorData.getPortNummber();\n //increment for check\n String message = newValueOfProduct;\n data = message.getBytes();\n DatagramPacket sendPacket = new DatagramPacket(data, data.length, address, port);\n udpSocket.send(sendPacket);\n }",
"public void sendBluetooth()\n {\n Intent startBluetooth = new Intent(this, Main2Activity.class);\n startActivity(startBluetooth);\n }",
"@Override\r\n public void onCreate(Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState);\r\n setContentView(R.layout.activity_main);\r\n\r\n \r\n\t\tStrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()\r\n\t\t.detectDiskReads()\r\n\t\t.detectDiskWrites()\r\n\t\t.detectNetwork() //or .detectAll() for all detectable problems\r\n\t\t.penaltyLog()\r\n\t\t.build());\r\n\t\tStrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()\r\n\t\t.detectLeakedSqlLiteObjects()\r\n\t\t.detectLeakedClosableObjects()\r\n\t\t.penaltyLog()\r\n\t\t.penaltyDeath()\r\n\t\t.build());\r\n \r\n tv_msg = (TextView) findViewById(R.id.TextView);\r\n ed_msg = (EditText) findViewById(R.id.EditText01);\r\n btn_send = (Button) findViewById(R.id.Button02);\r\n \r\n \r\n try {\r\n\t\t\tDatagramSocket =new DatagramSocket();\r\n\t\t} catch (SocketException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n \r\n btn_send.setOnClickListener(new Button.OnClickListener() {\r\n\r\n @Override\r\n public void onClick(View v) {\r\n // TODO Auto-generated method stub\r\n String msg = ed_msg.getText().toString();\r\n try {\r\n\t\t\t\t\tsend(HOST, PORT, msg.getBytes());\r\n\t\t\t\t\t\r\n\t \tmHandler.sendMessage(mHandler.obtainMessage()); \r\n\t \tcontent =HOST +\":\"+ msg +\"\\n\";\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n }\r\n });\r\n }",
"private void sendMessage() {\n if (mRecipientAddress == null) {\n if (mDevices.getSelectedItem() == null) {\n mStatusText.append(\"Please select a device to message.\\n\");\n return;\n }\n if (mMessage.getText() == null || mMessage.getText().toString().equals(\"\")) {\n mStatusText.append(\"Please enter a message to send.\\n\");\n return;\n }\n }\n WifiDirectClientAsyncTask t = new WifiDirectClientAsyncTask(this, mMessage.getText().toString());\n if (Build.VERSION.SDK_INT>=Build.VERSION_CODES.HONEYCOMB)\n t.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n else\n t.execute();\n }",
"@Override\n\tpublic void sendData(int type, byte[] data) {\n\t\t\n\t}",
"public void sendMessageToMobile(final String str) {\r\n\r\n\t\tnew Thread(new Runnable() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tPrintWriter out = new PrintWriter(new OutputStreamWriter(s.getOutputStream(), \"utf-8\"), true);\r\n\r\n\t\t\t\t\tif (!str.isEmpty()){\r\n\t\t\t\t\t\tout.println(str);\r\n\t\t\t\t\t\tout.flush();\r\n\t\t\t\t\t\tSystem.out.println(\"sent to mobile: \"+ str);\r\n\t\t\t\t\t} \r\n\t\t\t\t}\r\n\t\t\t\tcatch (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}).start();\r\n\t}",
"public void sendData() {\r\n\t\t// HoverBot specific implementation of sendData method\r\n\t\tSystem.out.println(\"Sending location information...\");\r\n\t}",
"public abstract void send(String data, String toAddress);",
"public void communicate() {\r\n System.out.println(\"This iPhone is making a phone call.\");\r\n }",
"public void send(DataPacket packet){\n if(deviceDestination != null){\n deviceDestination.receive(packet, portDestination);\n }\n }",
"@Override\r\n public void onClick(View v)\r\n {\n if (\"\" != mSendOnBoardEdit.getText().toString()){\r\n DJIDrone.getDjiMainController().sendDataToExternalDevice(mSendOnBoardEdit.getText().toString().getBytes(),new DJIExecuteResultCallback(){\r\n\r\n @Override\r\n public void onResult(DJIError result)\r\n {\r\n // TODO Auto-generated method stub\r\n \r\n }\r\n \r\n });\r\n }\r\n }",
"public void sendOtp(String medium) {\n\r\n }",
"@JavascriptInterface\n public void sendCommand(String array) {\n Log.d(TAG, \"sendCommand: \" + array);\n if (!connected) {\n Log.e(TAG, \"Attempting to send M2 a command while its not connected: \" + array);\n return;\n }\n try {\n JSONArray json = new JSONArray(array);\n byte[] data = new byte[json.length()];\n for (int i = 0; i < data.length; i++) {\n data[i] = (byte) json.getInt(i);\n }\n EventBus.getDefault().post(new M2Command(data));\n }\n catch (JSONException e) {\n Log.e(TAG, \"Invalid command: \" + array);\n }\n }",
"private void sendReceiveRes(){\n\t}",
"@Override\n\tpublic void sendData(CharSequence data) {\n\t\t\n\t}",
"public void saveWalk() {\n try {\n long id = this.currentRoute.getId();\n DatabaseHandler db = new DatabaseHandler(this.getApplicationContext());\n currentRoute.setWaypoints(db.getAllWaypoints(id));\n\n HTTPPostSender postSender = new HTTPPostSender();\n postSender.buildString(currentRoute, this.getContentResolver());\n postSender.cm = (ConnectivityManager) getSystemService(this.getApplicationContext().CONNECTIVITY_SERVICE);\n\n\n\n\n if(isOnline()) {\n postSender.execute(this.currentRoute);\n Toast.makeText(this.getApplicationContext(),\"Walk successfully sent to server\",Toast.LENGTH_LONG).show();\n\n } else {\n //oh god why..\n Toast.makeText(this.getApplicationContext(),\"Something bad happened\",Toast.LENGTH_LONG).show();\n }\n } catch(Exception e) {\n Toast.makeText(this.getApplicationContext(),e.getMessage(),Toast.LENGTH_LONG).show();\n }\n }",
"private void SendCommandOrKeys(int viewID, String data)\n\t{\n\t\tif (mCommandManager == null)\n\t\t{\n\t\t\treturn ;\n\t\t}\n\t\t\n\t\tif (viewID == VIEW_ID_COMMAND)\n\t\t{\n // In put case, select file\n if (data.contains(\"!put\"))\n {\n Intent intent = new Intent(Intent.ACTION_GET_CONTENT);\n intent.setType(\"*/*\");\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n mPutCommand = data;\n\n try\n {\n startActivityForResult(Intent.createChooser(intent, \n\t\t\t\t\t\t\"Select a File\"), CHOOSE_FILE_TO_UPLOAD);\n } catch (android.content.ActivityNotFoundException ex)\n {\n ex.printStackTrace();\n }\n\n return ;\n }\n\n\t\t\tmCommandManager.SendCommand(data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tAddMsgToKeyView(viewID, \"remote> \" + data + \"\\n\");\n\n if (data.equals(\"!autotest\"))\n {\n // Run android autotest\n AddMsgToKeyView(viewID, \"remote> wait until the test ends\\n\");\n RunAutoTest();\n }\n else if (data.equals(\"!pintest\"))\n {\n // Run android autotest\n AddMsgToKeyView(viewID, \"remote> wait until the test ends\\n\");\n RunPinTest();\n }\n else if (data.equals(\"!stoptest\"))\n {\n mStopTest = true;\n }\n else\n {\n mCommandManager.SendKey(data);\n }\n\t\t}\t\t\n\t}",
"private void runTcpClient() {\n\t\t\n\t\tint TCP_SERVER_PORT=5050;\n\n\t try {\n\n\t Socket s = new Socket(\"192.168.0.255\", TCP_SERVER_PORT);\n\n\t BufferedReader in = new BufferedReader(new InputStreamReader(s.getInputStream()));\n\n\t BufferedWriter out = new BufferedWriter(new OutputStreamWriter(s.getOutputStream()));\n\n\t //send output msg\n\n\t String outMsg = \"TCP connecting to \" + TCP_SERVER_PORT + System.getProperty(\"line.separator\"); \n\n\t out.write(outMsg);\n\n\t out.flush();\n\n\t Log.i(\"TcpClient\", \"sent: \" + outMsg);\n\n\t //accept server response\n\n\t String inMsg = in.readLine() + System.getProperty(\"line.separator\");\n\t \n\t textView.append(inMsg);\n\n\t Log.i(\"TcpClient\", \"received: \" + inMsg);\n\n\t //close connection\n\n\t s.close();\n\n\t } catch (UnknownHostException e) {\n\n\t e.printStackTrace();\n\n\t } catch (IOException e) {\n\n\t e.printStackTrace();\n\n\t } \n\n\t}",
"public void write(byte[] bytes) {\n try {\n mmOutStream.write(bytes);\n\n // Share the sent message with the UI activity.\n /*Message writtenMsg = handler.obtainMessage(\n MessageConstants.MESSAGE_WRITE, -1, -1, mmBuffer);\n writtenMsg.sendToTarget();*/\n } catch (IOException e) {\n Log.e(TAG, \"Error occurred when sending data\", e);\n\n // Send a failure message back to the activity.\n /*Message writeErrorMsg =\n handler.obtainMessage(MessageConstants.MESSAGE_TOAST);\n Bundle bundle = new Bundle();\n bundle.putString(\"toast\",\n \"Couldn't send data to the other device\");\n writeErrorMsg.setData(bundle);\n handler.sendMessage(writeErrorMsg);*/\n }\n }",
"private void sendData(String data) {\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"Sending data: '\" + data + \"'\");\n\n\t\t\t\t// open the streams and send the \"y\" character\n\t\t\t\toutput = serialPort.getOutputStream();\n\t\t\t\toutput.write(data.getBytes());\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.err.println(e.toString());\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\n\t\t}",
"public void send(){ \n\t\tserverAddress=tfTxtIpServer.getText();\n\t\tserverPort=\"3232\";\n\t\ttext=tfTxtMsg.getText();\n try{\n\t\t\t// get the \"registry\"\n registry=LocateRegistry.getRegistry(\n serverAddress,\n (new Integer(serverPort)).intValue()\n );\n\t\t // look up the remote object\n rmiServer=(ReceiveMessageInterface)(registry.lookup(\"rmiServer\"));\n\t\t\t// call the remote method\n rmiServer.receiveMessage(text);\n }\n catch(RemoteException e){\n e.printStackTrace();\n }\n catch(NotBoundException e){\n e.printStackTrace();\n } \n }",
"void sendData() throws IOException\n\t{\n\t}",
"private void sendFitDataSync(final Context context){\n final Date date = new Date();\n HandlerThread ht = new HandlerThread(\"HeartThread\", android.os.Process.THREAD_PRIORITY_BACKGROUND);\n ht.start();\n Handler h = new Handler(ht.getLooper());\n h.post(new Runnable() {\n @Override\n public void run() {\n GoogleApiClient mGoogleAPIClient = new GoogleApiClient.Builder(context)\n .addConnectionCallbacks(new GoogleApiClient.ConnectionCallbacks() {\n @Override\n public void onConnected(Bundle bundle) {\n Log.d(\"Heart\", \"Connected\");\n }\n\n @Override\n public void onConnectionSuspended(int i) {\n\n }\n })\n .addApi(Wearable.API).build();\n mGoogleAPIClient.blockingConnect(10, TimeUnit.SECONDS);\n /* Sync msg & time to handheld */\n WearableSendSync.sendSyncToDevice(mGoogleAPIClient, WearableSendSync.START_ACTV_SYNC, date);\n WearableSendSync.sendSyncToDevice(mGoogleAPIClient, WearableSendSync.START_HIST_SYNC, date);\n WearableSendSync.sendDailyNotifFileWrapper(mGoogleAPIClient);\n\n }\n });\n }",
"public void sendData(String data, int numCapteur);",
"private void sendData(SensorData sensorData) {\n EventMessage message = new EventMessage(EventMessage.EventType.RECEIVED_RAW_DATA);\n message.setSensorData(sensorData);\n EventBus.getDefault().post(message);\n }",
"public void sendData(String mssg, int destinationPort){\r\n\r\n\t\t\t //Creates a new socket. This will be used for sending and receiving packets\r\n\t\t\t//\t\t\tsocket.setSoTimeout(5000); //Sets the timeout value to 5 seconds. If 5 seconds elapses and no packet arrives on receive, an exception will be thrown\t\r\n\t\tInetAddress local = null;\r\n\t\t\ttry {\r\n\t\t\t\tlocal = InetAddress.getLocalHost();\r\n\t\t\t} catch (UnknownHostException e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t} //Gets the local address of the computer \r\n\t\t\t\r\n\t\t\t\tbyte[] dataArray = mssg.getBytes();\r\n\r\n\t\t\t\tDatagramPacket packetToSend = new DatagramPacket(dataArray, dataArray.length, local, destinationPort); //Creates a packet from the dataArray, to be sent to the intermediate host\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsndSocket.send(packetToSend);\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t} \r\n\t}",
"private void sendData() {\n String Own_Easting = OEast.getText().toString();\n String Own_Northing = ONorth.getText().toString();\n String En_Easting = EEast.getText().toString();\n String En_nothing = ENorth.getText().toString();\n String OTbg = OTBG.getText().toString();\n String rt=Rt.getText().toString();\n String add=Add.getText().toString();\n\n DB bg = new DB(this);\n bg.execute(Own_Easting,Own_Northing,En_Easting,En_nothing\n ,OTbg,rt,add);\n\n }",
"private void sendDataToServer() {\n\t\tcommentView = (EditText) findViewById(R.id.editComment);\n\t\tString commentToBePosted = commentView.getText().toString();\n\n\t\tboolean valid;\n\t\tvalid = checkValidityOfComment(commentToBePosted);\n\n\t\tif (valid) {\n\t\t\t// Intent intent = getIntent();\n\t\t\tPostCommentTask postComment = new PostCommentTask();\n\t\t\tpostComment.execute(commentToBePosted);\n\t\t}\n\t}",
"@Override\n\t\tpublic void run() {\n\t\t\tLooper.prepare();\n\n\t\t\tMap<String, String> param = new HashMap<String, String>();// 组装请求参数\n\t\t\tparam.put(\"idCardName\", \"卢波\");\n\t\t\tparam.put(\"IDNumber\", \"37142519930502763X\");\n\t\t\tparam.put(\"bankNumber\", \"6227002271530099694\");\n\t\t\tparam.put(\"companyName\", \"山东题开店收银台\");\n\t\t\tparam.put(\"mobilePhone\", \"18315913992\");\n\t\t\tparam.put(\"accounttype\", \"1\");\n\t\t\tparam.put(\"bankcardtype\", \"1\");\n\t\t\tparam.put(\"storeAddress\", \"山东省济南市天桥区时代总部基地4期H3楼201\");\n\t\t\tparam.put(\"uid\", \"3617\");\n\n\t\t\tHttp_PushTask HP = new Http_PushTask();\n\t\t\ttry {\n\t\t\t\tString result = HP.execute(CryptTool.transMapToString(param),\n\t\t\t\t\t\t\"http://cnyssj.com/dfweb_test/rbkjsame.do\").get();\n\t\t\t\tif (!TextUtils.isEmpty(result)) {\n\t\t\t\t\tJSONObject js = new JSONObject(result);\n\t\t\t\t\tif (js.getBoolean(\"result\")) {\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tString message = js.getString(\"message\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (ExecutionException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}",
"private void processDeviceStream(SelectionKey key, byte[] data) throws IOException{\n\t\tSocketChannel channel = (SocketChannel)key.channel();\n\t\tString sDeviceID = \"\";\n\t\t// Initial call where the device sends it's IMEI# - Sarat\n\t\tif ((data.length >= 10) && (data.length <= 17)) {\n\t\t\tint ii = 0;\n\t\t\tfor (byte b : data)\n\t\t\t{\n\t\t\t\tif (ii > 1) { // skipping first 2 bytes that defines the IMEI length. - Sarat\n\t\t\t\t\tchar c = (char)b;\n\t\t\t\t\tsDeviceID = sDeviceID + c;\n\t\t\t\t}\n\t\t\t\tii++;\n\t\t\t}\n\t\t\t// printing the IMEI #. - Sarat\n\t\t\tSystem.out.println(\"IMEI#: \"+sDeviceID);\n\n\t\t\tLinkedList<String> lstDevice = new LinkedList<String>();\n\t\t\tlstDevice.add(sDeviceID);\n\t\t\tdataTracking.put(channel, lstDevice);\n\n\t\t\t// send message to module that handshake is successful - Sarat\n\t\t\ttry {\n\t\t\t\tsendDeviceHandshake(key, true);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t// second call post handshake where the device sends the actual data. - Sarat\n\t\t}else if(data.length > 17){\n\t\t\tmClientStatus.put(channel, System.currentTimeMillis());\n\t\t\tList<?> lst = (List<?>)dataTracking.get(channel);\n\t\t\tif (lst.size() > 0)\n\t\t\t{\n\t\t\t\t//Saving data to database\n\t\t\t\tsDeviceID = lst.get(0).toString();\n\t\t\t\tDeviceState.put(channel, sDeviceID);\n\n\t\t\t\t//String sData = org.bson.internal.Base64.encode(data);\n\n\t\t\t\t// printing the data after it has been received - Sarat\n\t\t\t\tStringBuilder deviceData = byteToStringBuilder(data);\n\t\t\t\tSystem.out.println(\" Data received from device : \"+deviceData);\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\t//publish device IMEI and packet data to Nats Server\n\t\t\t\t\tnatsPublisher.publishMessage(sDeviceID, deviceData);\n\t\t\t\t} catch(Exception nexp) {\n\t\t\t\t\tnexp.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\t//sending response to device after processing the AVL data. - Sarat\n\t\t\t\ttry {\n\t\t\t\t\tsendDataReceptionCompleteMessage(key, data);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t//storing late timestamp of device\n\t\t\t\tDeviceLastTimeStamp.put(sDeviceID, System.currentTimeMillis());\n\n\t\t\t}else{\n\t\t\t\t// data not good.\n\t\t\t\ttry {\n\t\t\t\t\tsendDeviceHandshake(key, false);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new IOException(\"Bad data received\");\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\t// data not good.\n\t\t\ttry {\n\t\t\t\tsendDeviceHandshake(key, false);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new IOException(\"Bad data received\");\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void onClick(View v) {\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n clientThread.sendMessage(\"Que\");\n }\n });\n\n\n// new Thread(new ClientSend()).start();\n\n }",
"public void sendData(String s1){\n mTapTextView = findViewById(R.id.tap_text);\n mTapTextView.setText(s1);\n }",
"void initCommand() {\n try {\n stream = adbTerminalConnection.open(\"shell:\");\n } catch (IOException | InterruptedException e) {\n e.printStackTrace();\n return;\n }\n runOnUiThread(() -> {\n channel.invokeMethod(\"output\", \"OTG已连接\\r\\n\");\n });\n // Start the receiving thread\n new Thread(() -> {\n while (!stream.isClosed()) {\n // Print each thing we read from the shell stream\n String data = null;\n try {\n data = new String(stream.read());\n } catch (InterruptedException | IOException e) {\n e.printStackTrace();\n }\n Log.d(\"Nightmare\", \"data -> \" + data);\n if (data == null) {\n runOnUiThread(() -> {\n channel.invokeMethod(\"output\", \"OTG断开\\r\\n\");\n });\n continue;\n }\n String finalData = data;\n runOnUiThread(() -> {\n channel.invokeMethod(\"output\", finalData);\n });\n }\n }).start();\n }",
"public void onlinerequest() {\r\n int size = Server.getUsers().size();\r\n \r\n try {\r\n this.output.flush();\r\n this.output.writeUTF(\"ONLINE\");\r\n this.output.flush();\r\n this.output.writeUTF(Integer.toString(size));\r\n this.output.flush();\r\n// Log.print(\"Sending the data\");\r\n for(int x = 0; x < Server.getUsers().size(); x++){\r\n if(Server.getUsers().get(x).getName().equals(this.name)){\r\n this.output.writeUTF(Server.getUsers().get(x).getName() + \" (You)\");\r\n }\r\n else{\r\n this.output.writeUTF(Server.getUsers().get(x).getName());\r\n this.output.flush();\r\n }\r\n \r\n \r\n }\r\n// Log.print(\"Successfully sent\");\r\n } catch (IOException ex) {\r\n Log.error(ex.getMessage());\r\n }\r\n }"
] | [
"0.7220107",
"0.69929326",
"0.69556475",
"0.68971527",
"0.6834165",
"0.682294",
"0.6811406",
"0.6774727",
"0.6757828",
"0.671438",
"0.671371",
"0.6683387",
"0.66093045",
"0.66024715",
"0.6560913",
"0.65319306",
"0.649817",
"0.64862204",
"0.64802265",
"0.6465589",
"0.6435869",
"0.64354604",
"0.63948244",
"0.63706577",
"0.6365591",
"0.63473564",
"0.631427",
"0.6304042",
"0.6299891",
"0.62819725",
"0.62701595",
"0.62643886",
"0.62496054",
"0.6236911",
"0.6230865",
"0.6222541",
"0.62189436",
"0.6215473",
"0.62025857",
"0.6177164",
"0.61540014",
"0.6152563",
"0.6150124",
"0.6149803",
"0.61433154",
"0.6143023",
"0.6140822",
"0.6135795",
"0.6131529",
"0.6126888",
"0.6125306",
"0.61251366",
"0.61247385",
"0.6114904",
"0.61146504",
"0.6102162",
"0.6101531",
"0.6083603",
"0.6076565",
"0.6074407",
"0.60737497",
"0.606929",
"0.60690063",
"0.6051416",
"0.60499775",
"0.60482407",
"0.60457337",
"0.6044807",
"0.6043075",
"0.6042663",
"0.6037713",
"0.6033305",
"0.602955",
"0.60260963",
"0.60254955",
"0.6013325",
"0.60096043",
"0.60000825",
"0.5980331",
"0.59788704",
"0.59774184",
"0.5974344",
"0.59743",
"0.59686846",
"0.5967902",
"0.5967673",
"0.5964644",
"0.59638095",
"0.59585977",
"0.595842",
"0.5953174",
"0.59422904",
"0.5941081",
"0.59356016",
"0.59288645",
"0.59139276",
"0.59126115",
"0.5911013",
"0.5910957",
"0.5906258",
"0.5900064"
] | 0.0 | -1 |
/ Call this from the main activity to shutdown the connection | public void cancel() {
try {
mmSocket.close();
} catch (IOException e) { }
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void shutdown() {\n clientTUI.showMessage(\"Closing the connection...\");\n try {\n in.close();\n out.close();\n serverSock.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void shutdown() {\n mGameHandler.shutdown();\n mTerminalNetwork.terminate();\n }",
"public synchronized void shutdown() {\n // mark this as no longer running\n active = false;\n\n // close the socket\n try {\n if (socketNode != null) {\n socketNode.close();\n socketNode = null;\n }\n } catch (Exception e) {\n getLogger().info(\"Excpetion closing socket\", e);\n // ignore for now\n }\n\n // stop the connector\n if (connector != null) {\n connector.interrupted = true;\n connector = null; // allow gc\n }\n if (advertiseViaMulticastDNS) {\n zeroConf.unadvertise();\n }\n }",
"private void shutdown() {\n\t\ttry {\n\t\t\tsock.close();\n\t\t\tgame.handleExit(this);\n\t\t\tstopped = true;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t}",
"public void shutdown() {\n shutdown(false);\n }",
"public void closeConnection(){\r\n\t\t_instance.getServerConnection().logout();\r\n\t}",
"public void shutdown() {\n Log.info(Log.FAC_NETMANAGER, formatMessage(\"Shutdown requested\"));\n _run = false;\n if (_periodicTimer != null) _periodicTimer.cancel();\n if (_thread != null) _thread.interrupt();\n if (null != _channel) {\n try {\n setTap(null);\n } catch (IOException io) {\n }\n try {\n _channel.close();\n } catch (IOException io) {\n }\n }\n }",
"public void shutdown()\n {\n // todo\n }",
"public void shutdown();",
"public void shutdown();",
"public void shutdown();",
"public void shutdown();",
"public void shutdown() {\n try {\n \t\n \tserverSocket.close();\n \t\n } catch (Exception e) {\n System.err.println(e.getMessage());\n e.printStackTrace();\n }\n }",
"private void closeConnection() {\n\t\t\tSystem.out.println(\"\\nTerminating connection \" + myConID + \"\\n\");\n\t\t\ttry {\n\t\t\t\toutput.close(); // close output stream\n\t\t\t\tinput.close(); // close input stream\n\t\t\t\tconnection.close(); // close socket\n\t\t\t} catch (IOException ioException) {\n\t\t\t\tSystem.out.println(\"Exception occured in closing connection\"\n\t\t\t\t\t\t+ ioException);\n\t\t\t}\n\t\t}",
"public static void disconnect() {\n \t\tconnPool.stop();\n \t}",
"public void shutdownNetwork() {\r\n networkPlayer.stop();\r\n }",
"public void shutdown() {\n\t\t\n\t}",
"public void terminate() {\n config.closeConnection();\n }",
"@Override\n public void onDestroy() {\n Log.d(TAG, \"Shutting Server\");\n busHandler.sendMessage(busHandler.obtainMessage(BusHandler.DISCONNECT));\n }",
"private void shutdown()\n\t\t{\n\t\tif (myChannelGroup != null)\n\t\t\t{\n\t\t\tmyChannelGroup.close();\n\t\t\t}\n\t\tif (myHttpServer != null)\n\t\t\t{\n\t\t\ttry { myHttpServer.close(); } catch (IOException exc) {}\n\t\t\t}\n\t\tmyLog.log (\"Stopped\");\n\t\t}",
"public void shutdown() {\n for (Connection connection : connections) { //Try closing all connections\n closeConnection(connection);\n }\n }",
"private void closeConnection () {\n setConnection (null);\n }",
"public static void disconnect() {\n if (AppSettings.bluetoothConnection != null) \n \tAppSettings.bluetoothConnection.stop();\n\t}",
"public void shutdown() {\n }",
"public void ShutDown()\n {\n bRunning = false;\n \n LaunchLog.Log(COMMS, LOG_NAME, \"Shut down instruction received...\");\n\n for(LaunchServerSession session : Sessions.values())\n {\n LaunchLog.Log(COMMS, LOG_NAME, \"Closing session...\");\n session.Close();\n }\n \n LaunchLog.Log(COMMS, LOG_NAME, \"...All sessions are closed.\");\n }",
"public void shutdown() {\n this.isShutdown = true;\n }",
"private void closeConnection() {\n\t\t_client.getConnectionManager().shutdown();\n\t}",
"public static void shutdown() {\n\t}",
"public void shutdown() {\n try {\n circuit.shutdown();\n } catch (Exception e) {\n circuit.error(\"Error while calling shutdown(): \" + e.getMessage());\n e.printStackTrace();\n }\n RedstoneChips.inst().channelManager().removeCircuitWireless(circuit);\n notifyShutdown();\n }",
"public void shutdown() {\r\n System.exit(0);\r\n }",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"public void shutDown()\n {\n stunStack.removeSocket(serverAddress);\n messageSequence.removeAllElements();\n localSocket.close();\n }",
"private void disconnect() {\n activityRunning = false;\n MRTClient.getInstance().doHangup();\n MRTClient.getInstance().removeClientListener(this);\n\n finish();\n }",
"private void quit() {\n\t\tmSipSdk = myApplication.getPortSIPSDK();\n\n\t\tif (myApplication.isOnline()) {\n\t\t\tLine[] mLines = myApplication.getLines();\n\t\t\tfor (int i = Line.LINE_BASE; i < Line.MAX_LINES; ++i) {\n\t\t\t\tif (mLines[i].getRecvCallState()) {\n\t\t\t\t\tmSipSdk.rejectCall(mLines[i].getSessionId(), 486);\n\t\t\t\t} else if (mLines[i].getSessionState()) {\n\t\t\t\t\tmSipSdk.hangUp(mLines[i].getSessionId());\n\t\t\t\t}\n\t\t\t\tmLines[i].reset();\n\t\t\t}\n\t\t\tmyApplication.setOnlineState(false);\n\t\t\tmSipSdk.unRegisterServer();\n\t\t\tmSipSdk.DeleteCallManager();\n\t\t}\n\t}",
"public void disconnect(){\n\n\t\tserverConnection.disconnect();\n\t}",
"public void disconnect() {\n SocketWrapper.getInstance(mContext).disConnect();\n }",
"public void shutDown() {\n if(client != null) {\n client.shutdownClient();\n }\n }",
"public void shutdown() {\n // Shutting down a 'null' transport is invalid. Also, shutting down a server for multiple times is invalid.\n ensureServerState(true);\n try {\n transport.close();\n } catch (final Exception e) {\n throw new RuntimeException(e);\n } finally {\n isShutdown = true;\n }\n }",
"public void shutdown() {\n // For now, do nothing\n }",
"public void disconnect()\n {\n isConnected = false;\n }",
"private void disconnect() {\n\n if (inStream != null) {\n try {inStream.close();} catch (Exception e) { e.printStackTrace(); }\n }\n\n if (outStream != null) {\n try {outStream.close();} catch (Exception e) { e.printStackTrace(); }\n }\n\n if (socket != null) {\n try {socket.close();} catch (Exception e) { e.printStackTrace(); }\n }\n }",
"public void shutdown() {\n try {\n infoServer.stop();\n } catch (Exception e) {\n }\n this.shouldRun = false;\n ((DataXceiveServer) this.dataXceiveServer.getRunnable()).kill();\n try {\n this.storage.closeAll();\n } catch (IOException ie) {\n }\n }",
"protected final void disconnect() {\n\t\trunning = false;\n\t\ttry {\n\t\t\tif (out != null)\n\t\t\t\tout.close();\n\t\t\tif (in != null)\n\t\t\t\tin.close();\n\t\t\tsocket.close();\n\t\t} catch (IOException e) {e.printStackTrace();}\n\t}",
"public void shutdown() {\n // no-op\n }",
"protected abstract void shutdown();",
"public void shutdown(){\n \tSystem.out.println(\"SHUTTING DOWN..\");\n \tSystem.exit(0);\n }",
"void disconnect() {\n connector.disconnect();\n // Unregister from activity lifecycle tracking\n application.unregisterActivityLifecycleCallbacks(activityLifecycleTracker);\n getEcologyLooper().quit();\n }",
"public void disconnect() {\n \ttry {\n \t\tctx.unbindService(apiConnection);\n } catch(IllegalArgumentException e) {\n \t// Nothing to do\n }\n }",
"public void disconnect() {}",
"public void Stop_Connection(){\n keepWalking = false; //gia na stamatisei to chat alliws to thread dn ginete interrupt gt dn stamataei i liturgeia tou.\n Chat_Thread.interrupt();\n try {\n if(oos != null) oos.close();\n if(ois != null) ois.close();\n } catch (IOException ex) {\n Logger.getLogger(ChatWithCC.class.getName()).log(Level.SEVERE, null, ex);\n }\n try {\n if(socket !=null) socket.close();\n } catch (IOException ex) {\n Logger.getLogger(ChatWithCC.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public static void disconnect() {\r\n if (isConnected()) {\r\n listener.interrupt();\r\n timerThread.interrupt();\r\n keepAliveThread.interrupt();\r\n db.writeDatabase();\r\n ObjectIO.writeObjectToFile(cmdPath, cmd);\r\n tc.stopCommands();\r\n ObjectIO.writeObjectToFile(tcPath, tc);\r\n try {\r\n irc.close();\r\n }\r\n catch (IOException e) { /* Shouldn't happen */ }\r\n }\r\n irc = null;\r\n }",
"@Override\n\tpublic void finish() {\n\t\ttry {\n\t\t\tif(muc!=null){\n\t\t\t\t\n\t\t\t\tmuc.leave();\n\t\t\t}\n\t\t\tif(connection!=null){\n\t\t\t\t\n\t\t\t\tconnection.disconnect();\n\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\n\t\tsuper.finish();\n\t}",
"public void shutdown()\n {\n // nothing to do here\n }",
"public abstract void shutdown();",
"public abstract void shutdown();",
"public abstract void shutdown();",
"public abstract void shutdown();",
"public void shutdown() {\n\t\t//We call peers.values() and put into Array to create an unchanging copy, one that\n\t\t//does not shrink even as the sockets remove themselves from the peers list\n\t\t//this prevents a ConcurrentModificationException\n\t\tonline = false;\n\t\tArrayList<DecentSocket> connections = new ArrayList<DecentSocket>(peers.values());\n\t\tfor(DecentSocket socket: connections) {\n\t\t\tsocket.stop();\n\t\t}\n\t\tlistener.stop();\n\t\tchecker.stop();\n\t}",
"public void shutdown()\n\t{\n\t\ttry\n\t\t{\n\t\t\tsave();\n\t\t\tgetPreparedStatement(\"SHUTDOWN\").executeUpdate();\n\t\t\tgetConnection().close();\n\t\t} \n\t\tcatch (SQLException e)\n\t\t{\n\t\t\tm_logger.error(\"Couldn't cleanly shutdown.\", e);\n\t\t}\n\t}",
"public void shutDown ()\n {\n org.omg.CORBA.portable.InputStream $in = null;\n try {\n org.omg.CORBA.portable.OutputStream $out = _request (\"shutDown\", true);\n $in = _invoke ($out);\n return;\n } catch (org.omg.CORBA.portable.ApplicationException $ex) {\n $in = $ex.getInputStream ();\n String _id = $ex.getId ();\n throw new org.omg.CORBA.MARSHAL (_id);\n } catch (org.omg.CORBA.portable.RemarshalException $rm) {\n shutDown ( );\n } finally {\n _releaseReply ($in);\n }\n }",
"public void stop() {\n\t\tgetLogger().debug(\"Waiting 5 seconds for EVCC to process response and close TCP/TLS connection ...\");\n\t\ttry {\n Thread.sleep(5000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\t\t\n\t\tif (!isStopAlreadyInitiated()) {\n\t\t\tgetLogger().debug(\"Closing connection to client ...\");\n\t\t\tsetStopAlreadyInitiated(true);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tgetInStream().close();\n\t\t\t\tgetOutStream().close();\n\t\t\t\t\n\t\t\t\tif (getTcpClientSocket() != null) {\n\t\t\t\t\tgetTcpClientSocket().close();\n\t\t\t\t} else if (getTlsClientSocket() != null) {\n\t\t\t\t\tgetTlsClientSocket().close();\n\t\t\t\t} else {\n\t\t\t\t\tgetLogger().error(\"Neither TCP nor TLS client socket could be closed\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tThread.currentThread().interrupt();\n\t\t\t\tgetLogger().debug(\"Connection to client closed\");\n\t\t\t} catch (IOException e) {\n\t\t\t\tgetLogger().error(\"Error occurred while trying to close socket to client\", e);\n\t\t\t} \n\t\t}\n\t}",
"public synchronized void close() {\n\t\t/**\n\t\t * DISCONNECT FROM SERVER\n\t\t */\n\t\tsrvDisconnect();\n\t}",
"public void disconnect() {\n\n try {\n if (inputStream != null) {\n inputStream.close();\n }\n\n if (outputStream != null) {\n outputStream.close();\n }\n\n if (socket != null ) {\n socket.close();\n connected = socket.isClosed();\n }\n } catch (IOException e) {\n logger.error(\"S7Client error [disconnect]: \" + e);\n }\n }",
"public synchronized void shutdown() {\n try {\n stop();\n } catch (Exception ex) {\n }\n \n try {\n cleanup();\n } catch (Exception ex) {\n }\n }",
"@Override\n public void closeConnection() {\n\n System.out.println(\"[CLIENT] Closing socket connection...\");\n try {\n socket.close();\n in.close();\n out.close();\n System.out.println(\"[CLIENT] Closed socket connection.\");\n } catch (IOException e) {\n System.out.println(\"[CLIENT] Error occurred when closing socket\");\n }\n System.exit(0);\n\n }",
"@Override\n public void shutdown() {\n _ahc.close();\n }",
"public void shutDown() {\n StunStack.shutDown();\n stunStack = null;\n stunProvider = null;\n requestSender = null;\n\n this.started = false;\n\n }",
"private void closeConnection() {\r\n try {\r\n socket.close();\r\n } catch (IOException ex) {\r\n // Ex on close\r\n }\r\n }",
"public synchronized void shutDown() {\n\t state.shutDown();\n\t}",
"@Override\n\t\tprotected void shutdown() {\n\n\t\t}",
"public void shutDown();",
"public void shutdown() {\n _udpServer.stop();\n _registrationTimer.cancel();\n _registrationTimer.purge();\n }",
"public void close()\n {\n getConnectionManager().shutdown();\n }",
"public void disconnect() {\n\t\tdisconnect(true);\n\t}",
"public void shutdown() {\n\t\tserver.stop(0);\n\t}",
"public void shutdown()\n {\n shutdown = true;\n cil.shutdown();\n }",
"private void exit()\n {\n try\n {\n connect.close();\n }\n catch (javax.jms.JMSException jmse)\n {\n jmse.printStackTrace();\n }\n\n System.exit(0);\n }",
"public synchronized void shutdown() {\n server.stop();\n }",
"void shutdown() throws Exception;",
"public void disconnect()\n {\n this.uri = null;\n this.userAddress = null;\n this.password = null;\n connected = false;\n }",
"public void disconnect() {\n\t\tif (con.isConnected()) {\n\t\t\tcon.disconnect();\n\t\t}\n\t}",
"protected void disconnect() {\n try {\n if (connection != null) {\n connection.close();\n }\n connection = null;\n queryRunner = null;\n thread = null;\n queries = null;\n } catch (SQLException ex) {\n Logger.getGlobal().log(Level.WARNING, ex.getMessage(), ex);\n }\n }",
"public int disconnect() {\n Log.d(TAG, \"kill start\");\n \n // TODO: check if conditionals fixes bug\n // disconnecting when bluetooth not enabeled\n for( BluetoothConnectionThread bct: bluetoothConnectionThreads ){\n if (bct != null) {\n bct.kill();\n bct = null;\n }\n }\n \n if (this.router != null) {\n this.router.stop();\n this.router = null;\n }\n \n Log.d(TAG, \"kill success\");\n return Constants.SUCCESS;\n }",
"private void Disconnect() {\n //If the btSocket is busy\n if (btSocket!=null) {\n try {\n btSocket.close(); //close connection\n }\n catch (IOException e) {\n msg(\"Error\");\n }\n }\n finish(); //return to the first layout\n\n }",
"protected void kill() {\n disconnect = true;\n }"
] | [
"0.8088713",
"0.7528002",
"0.7391469",
"0.730617",
"0.72964746",
"0.7260692",
"0.7232609",
"0.719543",
"0.71392703",
"0.71392703",
"0.71392703",
"0.71392703",
"0.7133095",
"0.71298265",
"0.70955336",
"0.7090879",
"0.7084074",
"0.70752573",
"0.7062675",
"0.70610094",
"0.7059852",
"0.7058221",
"0.70519525",
"0.7028798",
"0.70279664",
"0.70238155",
"0.69969815",
"0.69967574",
"0.698838",
"0.6977236",
"0.6974312",
"0.6974312",
"0.6974312",
"0.6974312",
"0.6974312",
"0.6974312",
"0.6974312",
"0.6974312",
"0.6974312",
"0.6974312",
"0.6974312",
"0.6974312",
"0.6974312",
"0.6974312",
"0.6974312",
"0.6974312",
"0.6974312",
"0.69733065",
"0.6963923",
"0.694949",
"0.6948165",
"0.69244367",
"0.6924347",
"0.6922046",
"0.69111264",
"0.69059294",
"0.6890138",
"0.68807447",
"0.6872004",
"0.68614507",
"0.6854599",
"0.68459404",
"0.68445086",
"0.6842056",
"0.68374896",
"0.6837362",
"0.682439",
"0.6824022",
"0.68197095",
"0.68157244",
"0.68157244",
"0.68157244",
"0.68157244",
"0.6813355",
"0.6811393",
"0.6811319",
"0.68103373",
"0.6808962",
"0.68045676",
"0.67963433",
"0.6788692",
"0.67760396",
"0.6774745",
"0.67732483",
"0.6768589",
"0.6767682",
"0.6756935",
"0.67561376",
"0.67498255",
"0.6743749",
"0.6742384",
"0.67303944",
"0.67281747",
"0.67270726",
"0.67177314",
"0.6715234",
"0.6713727",
"0.67051584",
"0.6700667",
"0.6692954",
"0.6690954"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public Set<Person> getfindByName(String name) {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public Set<Person> getfindByNameContaining(String name) {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public Set<Person> getfindByNameContainingIgnoreCase(String name) {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public Set<Person> getfindByBirthdateYear(int year) {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\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\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public List<Person> getAllPersons() {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
Created by zun.wei on 2016/11/3. To change this template use File|Default Setting |Editor|File and Code Templates|Includes|File Header | public interface ISalaryDao {
public Map<String, Object> querySingleMapByOraginalSql(String sql, Object... realValue);
public void updateRowByOraginalSql(Object... realValue);
public void resetInitPwd(String A0100);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DetailsFileHeaderTemplate() {\n\t\tsuper(ID_HEADER_LABEL, DESCRIPTION_HEADER_LABEL, OCCURRENCES_HEADER_LABEL);\n\t}",
"@Override\n public FileCollection getCompileIncludePath() {\n return super.getCompileIncludePath().plus(getProjectLayout().files(new Callable<FileCollection>() {\n @Override\n public FileCollection call() {\n CppComponent tested = testedComponent.getOrNull();\n if (tested == null) {\n return getProjectLayout().files();\n }\n return ((DefaultCppComponent) tested).getAllHeaderDirs();\n }\n }));\n }",
"Rule Header() {\n // Push 1 HeaderNode onto the value stack\n return Sequence(\n FirstOf(\n Include(),\n CppInclude(),\n Namespace()),\n actions.pushHeaderNode());\n }",
"private String generateMacro(){\r\n\t\tString code=\"\";\r\n\t\tcode += \"#include <assert.h>\\n\";\r\n\t\tcode += \"#include \\\"osek.h\\\"\\n\";\r\n\t\tcode += \"#include \\\"oil.h\\\"\\n\";\r\n\t\tcode += \"#include \\\"readyQ.h\\\"\\n\";\r\n\t\tcode += \"#include \\\"kernel.h\\\"\\n\";\r\n\t\treturn code;\r\n\t}",
"public Header() {\n\t\tsuper(tag(Header.class)); \n\t}",
"abstract public void header();",
"private static String header() {\r\n String output = \"\";\r\n output += \"\\\\documentclass[a4paper,10pt]{article}\\n\";\r\n output += \"\\\\title{Wilcoxon Signed Ranks test.}\\n\";\r\n output += \"\\\\date{\\\\today}\\n\\\\author{KEEL non-parametric statistical module}\\n\\\\begin{document}\\n\\n\\\\pagestyle{empty}\\n\\\\maketitle\\n\\\\thispagestyle{empty}\\n\\n\";\r\n\r\n return output;\r\n\r\n }",
"@Override\r\n\tpublic void loadHeader() {\n\r\n\t}",
"public abstract String header();",
"Rule CppInclude() {\n // Push 1 CppIncludeNode onto the value stack\n return Sequence(\n \"cpp_include\",\n WhiteSpace(),\n Literal(),\n actions.pushCppIncludeNode(),\n WhiteSpace());\n }",
"public String getHeadIncludes() {\n return (String) get(\"head_includes\");\n }",
"private XIncluder() {}",
"public static void inventoryMenuHeader() {\n System.out.print(\"Welcome to Inventory Menu!\\nType \\\"help\\\" for Inventory menu commands\\n\");\n }",
"@Override\n\tprotected void createCompHeader() {\n\t\tString headerTxt = \"Add a New Pharmacy\";\n\t\tiDartImage icoImage = iDartImage.PHARMACYUSER;\n\t\tbuildCompHeader(headerTxt, icoImage);\n\t}",
"public interface CommandCustomHeader {\n\n}",
"public static void provideHeaderComment(final FileWriterWrapper writer)\n throws IOException {\n writer.write(\"/*\\n\");\n writer.write(\" * This file was generated with the PerGen tool.\\n\");\n writer.write(\" * This code is free to use and distribute.\\n\");\n writer.write(\" */\\n\\n\");\n }",
"@Source(\"template/DecalsGuestHeader.html\")\n\tpublic TextResource getGuestHeader();",
"private HorizontalLayout getHeader() {\n HorizontalLayout header = new HorizontalLayout();\n header.setWidth(\"100%\");\n header.setHeight(\"100px\");\n // TODO move this into a separate HeaderView class\n header.addComponent(new Label(\"Patient Management System Team Green\"));\n return header;\n }",
"private static String headerSummary() {\r\n\r\n String output = \"\";\r\n output += \"\\\\documentclass[a4paper,10pt]{article}\\n\";\r\n output += \"\\\\title{Wilcoxon Signed Ranks test.}\\n\";\r\n output += \"\\\\usepackage{rotating}\\n\";\r\n output += \"\\\\usepackage{textcomp}\\n\";\r\n output += \"\\\\date{\\\\today}\\n\\\\author{KEEL non-parametric statistical module}\\n\\\\begin{document}\\n\\n\\\\pagestyle{empty}\\n\\\\maketitle\\n\\\\thispagestyle{empty}\\n\\n\";\r\n\r\n return output;\r\n\r\n }",
"@Override\n\tpublic String getCustomHtmlHeaders()\n\t{\n\t\treturn null;\n\t}",
"protected void writeHeading ()\n {\n Util.writePackage (stream, entry, Util.HolderFile);\n Util.writeProlog (stream, stream.name ());\n if (entry.comment () != null)\n entry.comment ().generate (\"\", stream);\n stream.println (\"public final class \" + holderClass + \" implements org.omg.CORBA.portable.Streamable\");\n stream.println ('{');\n }",
"public IAstPreprocessorIncludeDirective findInclude(ISourceFile file);",
"private HeaderUtil() {}",
"public void buildClassHeader() {\n\t\tString key;\n\t\tif (isInterface) {\n\t\t\tkey = \"doclet.Interface\";\n\t\t} else if (isEnum) {\n\t\t\tkey = \"doclet.Enum\";\n\t\t} else {\n\t\t\tkey = \"doclet.Class\";\n\t\t}\n\n\t\twriter.writeHeader(configuration.getText(key) + \" \" + classDoc.name());\n\t}",
"@Override\n\tprotected String getHeaderTitle() {\n\t\treturn \"\";\n\t}",
"@Override\r\n\tprotected String getHelpInfor() {\n\t\treturn \"\";\r\n\t}",
"StaticIncludeType createStaticIncludeType();",
"@Override\n public void addHeader(Div headerDiv)\n {\n getHeaders().add(headerDiv);\n headerDiv.addClass(JQLayoutCSSThemeBlockNames.UI_Layout_Header.toString());\n //getChildren().add(headers.size() - 1, headerDiv);\n }",
"@Incremental\n @InputFiles\n @PathSensitive(PathSensitivity.NAME_ONLY)\n protected FileCollection getHeaderDependencies() {\n return incrementalCompiler.getHeaderFiles();\n }",
"public final void mINCLUDE() throws RecognitionException {\r\n try {\r\n int _type = INCLUDE;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:265:9: ( '#include' )\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:265:11: '#include'\r\n {\r\n match(\"#include\"); \r\n\r\n\r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n }",
"private void handleInclude() {\n definedGrammar.include(getGrammar(getAbsPath()));\n }",
"protected JTableHeader createDefaultTableHeader() {\r\n \treturn new JTableHeader(columnModel) {\r\n \t\t\r\n \t\tprivate static final long serialVersionUID = 1L;\r\n \t\t\r\n \t\tpublic String getToolTipText(MouseEvent e) {\r\n \t\t\tjava.awt.Point p = e.getPoint();\r\n \t\t\tint index = columnModel.getColumnIndexAtX(p.x);\r\n \t\t\tint realColumnIndex = convertColumnIndexToModel(index);\r\n \t\t\tif ((realColumnIndex >= 0) && (realColumnIndex < getModel().getColumnCount()))\r\n \t\t\t\treturn \"The column \" + getModel().getColumnName(realColumnIndex);\r\n \t\t\telse\r\n \t\t\t\treturn \"\";\r\n \t\t}\r\n \t};\r\n }",
"public void addCSHeader(File outfile) {\n\n\ttry {\n\t PrintWriter writer = new PrintWriter(new FileOutputStream(outfile, true)); // declares writer as a new PrintWriter, allows us to write into new file\n\n /*\n Adds C++ headers\n */\n\t writer.println(\"#include <iostream>\");\n\t writer.println(\"#include <string>\");\n\t writer.println(\"using namespace std;\");\n\t writer.println(\"int main() {\");\n\n\t writer.close();\n\t} catch (Exception IOException) {\n\t System.out.println(\"Some sort of IO error here\");\n\t}\n\n }",
"public interface SourceConstants {\n\t\n\tfinal String BEAN_SUFFIX = \"Bean\";\n\tfinal String ACTION_SUFFIX = \"Action\";\n\tfinal String AMPERCEND = \"&\";\n\n\t\n\t\n\tfinal String HTML_BEGIN = \"<html xmlns=\\\"http://www.w3c.org/1999/xhtml\\\" xmlns:f=\\\"http://java.sun.com/jsf/core\\\" xmlns:h=\\\"http://java.sun.com/jsf/html\\\" xmlns:p=\\\"http://primefaces.org/ui\\\">\";\n\tfinal String HTML_CLOSE = \"</html>\"; \n\t\n\tfinal String HEAD_BEGIN = \"<h:head>\";\n\tfinal String HEAD_CLOSE = \"</h:head>\";\n\n\tfinal String BODY_BEGIN = \"<h:body>\";\n\tfinal String BODY_CLOSE = \"</h:body>\";\n\n\tfinal String FORM_BEGIN = \"<h:form>\";\n\tfinal String FORM_CLOSE = \"</h:form>\";\n\t\n\tfinal String CENTER = \"<center>\";\n\n\n}",
"@Override\n public ElementHeader getElementHeader()\n {\n return elementHeader;\n }",
"IncludeType createIncludeType();",
"protected Convention.Key getUseKey()\n {\n return ConventionKeys.HEADER;\n }",
"private static UINode _createGlobalHeaders()\n {\n MarlinBean globalHeaders = new MarlinBean(FLOW_LAYOUT_NAME);\n\n //\n // add the client header\n //\n globalHeaders.addIndexedChild(\n ContextPoppingUINode.getUINode(NAVIGATION2_CHILD));\n\n //\n // create and add the default header\n //\n MarlinBean defaultHeader = new MarlinBean(GLOBAL_HEADER_NAME);\n\n defaultHeader.setAttributeValue(\n RENDERED_ATTR,\n new NotBoundValue(\n PdaHtmlLafUtils.createIsRenderedBoundValue(NAVIGATION2_CHILD)));\n\n globalHeaders.addIndexedChild(defaultHeader);\n\n return globalHeaders;\n }",
"private void loadNavHeader() {\n\t\t// name, Email\n\t\ttxtName.setText(\"Tester\");\n\t\ttxtEmail.setText(\"[email protected]\");\n\t}",
"public IncludeDirective getIncludeDirective() {\n return includeDirective;\n }",
"public IndexImportSection(MultiPageEditor editor, Composite parent) {\n super(editor, parent, \"Index Imports\",\n \"The following index definitions are included as part of this one.\"); // or !\n // DESCRIPTION\n }",
"private ConfigurationHTMLPrinter doHeaderRow() {\n println(\"<tr>\").incrementIndent();\n doHeaderCell(\"Name\");\n doHeaderCell(\"Default value\");\n doHeaderCell(\"Aliases\");\n doHeaderCell(\"Value type\");\n doHeaderCell(\"Description\");\n return decrementIndent().println(\"</tr>\");\n }",
"public TemplateHelper() {\r\t\tsuper();\r\t}",
"private void createTableHeaderFile(final Class Class_, final String simpleName) throws IOException{\n final SessionFactory SessionFactory = HibernateUtil.getSingleton().getSessionFactoryLocal();\n final ClassMetadata classMetadata = SessionFactory.getClassMetadata(Class_);\n final String[] propertyNames = classMetadata.getPropertyNames();\n \n //Get the content file\n final String contentFileTableHeader = this.getContentTableHeader(simpleName,propertyNames); \n \n //Create the path\n final String className = simpleName + \"sTableHeader\"; \n final String tableHeaderPath = \"../era_views/src/main/java/com/era/views/tables/headers\";\n final String finalClassPath = tableHeaderPath + \"/\" + className + \".java\";\n \n //If the file exists delete it\n final File File = new File(finalClassPath); \n if(File.exists()){\n File.delete();\n }\n \n //Create the file\n File.createNewFile();\n \n //Write to the file\n try ( //Write the class\n FileWriter writer = new FileWriter(File)) { \n writer.write(contentFileTableHeader);\n }\n }",
"public HeadersSwitch() {\r\n\t\tif (modelPackage == null) {\r\n\t\t\tmodelPackage = HeadersPackage.eINSTANCE;\r\n\t\t}\r\n\t}",
"public IAstPreprocessorIncludeDirective[] getIncludeFiles();",
"public void setIncludes(String includes)\n {\n this.includes = includes;\n }",
"public Header( String headerCode) {\n\t\tsuper(tag(Header.class), headerCode); \n\t}",
"@Override\n protected JTableHeader createDefaultTableHeader()\n {\n return new JTableHeader(columnModel)\n {\n /**\n * Serial version UID variable for the inner class.\n */\n public static final long serialVersionUID = 111222333444555601L;\n\n @Override\n public String getToolTipText(MouseEvent e)\n {\n int index = columnModel.getColumnIndexAtX( e.getPoint().x );\n int realIndex = columnModel.getColumn(index).getModelIndex();\n return columnNames[realIndex];\n }\n };\n }",
"public include(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}",
"public IAstSourceFile findIncludeFile(String string);",
"private void generateHead(Class<?> token, BufferedWriter writer) throws IOException {\n String packageName = token.getPackageName();\n if (packageName != null) {\n writer.write(toUnicode(\"package\" + SPACE + packageName + EOL ));\n }\n\n String declaration = \"public class\" + SPACE + token.getSimpleName() + IMPL_SUFFIX + SPACE\n + (token.isInterface() ? \"implements\" : \"extends\") + SPACE + token.getSimpleName() + SPACE + BEGIN;\n\n writer.write(toUnicode(declaration));\n }",
"@Nonnull\r\n public List<String> getSystemIncludePath() {\r\n return sysincludepath;\r\n }",
"private static void includeExtract(IASTPreprocessorIncludeStatement include) {\n\t\tvxlFragment.append(VxlManager.includeDirective(StringProcessor.processString(include.getName().toString())));\n\t}",
"Rule Include() {\n // Push 1 IncludeNode onto the value stack\n return Sequence(\n \"include\",\n WhiteSpace(),\n Literal(),\n actions.pushIncludeNode(),\n WhiteSpace());\n }",
"@Override\n public void addJavaFileComment(CompilationUnit compilationUnit) {\n\n }",
"private void manageHeaderView() {\n PickupBoyDashboard.getInstance().manageHeaderVisibitlity(false);\n HeaderViewManager.getInstance().InitializeHeaderView(null, view, manageHeaderClick());\n HeaderViewManager.getInstance().setHeading(true, mActivity.getResources().getString(R.string.bokings));\n HeaderViewManager.getInstance().setLeftSideHeaderView(true, R.drawable.left_arrow);\n HeaderViewManager.getInstance().setRightSideHeaderView(false, R.drawable.left_arrow);\n HeaderViewManager.getInstance().setLogoView(false);\n HeaderViewManager.getInstance().setProgressLoader(false, false);\n\n }",
"public HeaderSettingsPage()\n {\n initialize();\n }",
"private org.gwtbootstrap3.client.ui.PanelHeader get_f_PanelHeader29() {\n return build_f_PanelHeader29();\n }",
"HttpRequest(){\n HttpHeader.getInstance().loadHeaderList(\"src/main/resources/headerList.txt\");\n }",
"void enableAutomaticHeaderImage();",
"private void setupUIElements() {\n setBadgeDrawable(ContextCompat.getDrawable(getActivity(), R.drawable.company_logo));\n //setTitle(getString(R.string.browse_title));\n\n setHeadersState(HEADERS_ENABLED);\n setHeadersTransitionOnBackEnabled(true);\n\n // Set headers and rows background color\n setBrandColor(ContextCompat.getColor(getActivity(), R.color.browse_headers_bar));\n mBackgroundManager.setColor(ContextCompat.getColor(getActivity(),\n R.color.browse_background_color));\n\n // Disables the scaling of rows when Headers bar is in open state.\n enableRowScaling(false);\n\n // Here is where a header presenter can be set to customize the look\n // of the headers list.\n setHeaderPresenterSelector(new PresenterSelector() {\n @Override\n public Presenter getPresenter(Object o) {\n\n return new RowHeaderPresenter();\n }\n });\n }",
"public List<IncludeClasses> getIncludes()\n {\n return includes;\n }",
"public Header(DOMelement element){\n\t\tsuper(tag(Header.class),element);\n\t}",
"protected boolean include(@Nonnull VirtualFile file)\r\n throws IOException,\r\n LexerException {\r\n // System.out.println(\"Try to include \" + ((File)file).getAbsolutePath());\r\n if (!file.isFile())\r\n return false;\r\n if (getFeature(Feature.DEBUG))\r\n LOG.debug(\"pp: including \" + file);\r\n includes.add(file);\r\n push_source(file.getSource(), true);\r\n return true;\r\n }",
"public void printHeaderInfo(String className) {\n outFile.println(\"// Declarations for \" + className);\n outFile.println(\n \"// Declarations written by Chicory \" + LocalDateTime.now(ZoneId.systemDefault()));\n outFile.println();\n\n // Determine comparability string\n String comparability = \"none\";\n if (Runtime.comp_info != null) {\n comparability = \"implicit\";\n }\n outFile.printf(\"decl-version 2.0%n\");\n outFile.printf(\"var-comparability %s%n%n\", comparability);\n }",
"public void preDefine()\n\t{\n\t\tASPManager mgr = getASPManager();\n\n\t\theadblk = mgr.newASPBlock(\"HEAD\");\n\n\t\theadblk.disableDocMan();\n\n\t\theadblk.addField(\"OBJID\").\n setHidden();\n\n headblk.addField(\"OBJVERSION\").\n setHidden();\n \n headblk.addField(\"OBJSTATE\").\n setHidden();\n \n headblk.addField(\"OBJEVENTS\").\n setHidden();\n\n\t\theadblk.addField(\"LU_NAME\").\n\t\tsetMandatory().\n\t\tsetMaxLength(8).\n\t\tsetReadOnly().\n\t\tsetHidden();\n\n\t\theadblk.addField(\"KEY_REF\").\n\t\tsetMandatory().\n\t\tsetMaxLength(600).\n\t\tsetReadOnly().\n\t\tsetHidden();\n\n\t\theadblk.addField(\"VIEW_NAME\").\n\t\tsetHidden().\n\t\tsetFunction(\"''\");\n\n\t\theadblk.addField(\"DOC_COUNT\").\n\t\tsetHidden();\n\n\t\theadblk.addField(\"SLUDESC\").\n\t\tsetSize(20).\n\t\tsetMaxLength(2000).\n\t\tsetReadOnly().\n\t\tsetFunction(\"OBJECT_CONNECTION_SYS.GET_LOGICAL_UNIT_DESCRIPTION(:LU_NAME)\").\n\t\tsetLabel(\"DOCMAWDOCREFERENCESLUDESCRIPTION: Object\");\n\n\t\theadblk.addField(\"SINSTANCEDESC\").\n\t\tsetSize(20).\n\t\tsetMaxLength(2000).\n\t\tsetReadOnly().\n\t\tsetFunction(\"OBJECT_CONNECTION_SYS.GET_INSTANCE_DESCRIPTION(:LU_NAME,'',:KEY_REF)\").\n\t\tsetLabel(\"DOCMAWDOCREFERENCESINSTANCEDESC: Object Key\");\n\n\t\theadblk.addField(\"DOC_OBJECT_DESC\").\n\t\tsetReadOnly().\n\t\tsetMaxLength(200).\n\t\tsetLabel(\"DOCMAWDOCREFERENCEDOCOBJECTDESC: Object Desc\");\n\n\t\theadblk.addField(\"STATE\").\n setReadOnly().\n setSize(10).\n setLabel(\"DOCMAWDOCREFERENCESTATE: State\");\n\t\t\n\t\theadblk.addField(\"INFO\").\n\t\tsetHidden().\n\t\tsetFunction(\"''\");\n\n\t\theadblk.addField(\"ATTRHEAD\").\n\t\tsetHidden().\n\t\tsetFunction(\"''\");\n\n\t\theadblk.addField(\"ACTION\").\n\t\tsetHidden().\n\t\tsetFunction(\"''\");\n\n\t\theadblk.setView(\"DOC_REFERENCE\");\n\t\theadblk.defineCommand(\"DOC_REFERENCE_API\",\"New__,Modify__,Remove__,Set_Lock__,Set_Unlock__\");\n\n\t\theadset = headblk.getASPRowSet();\n\n\t\theadbar = mgr.newASPCommandBar(headblk);\n\t\theadbar.disableCommand(headbar.FIND);\n\t\theadbar.disableCommand(headbar.DUPLICATEROW);\n\t\theadbar.disableCommand(headbar.NEWROW);\n\t\theadbar.disableCommand(headbar.EDITROW);\n\t\theadbar.disableCommand(headbar.DELETE);\n\t\theadbar.disableCommand(headbar.BACK);\n\n headbar.addSecureCustomCommand(\"SetLock\", \"DOCMAWDOCREFERENCESETLOCK: Lock\", \"DOC_REFERENCE_API.Set_Lock__\");\n headbar.addSecureCustomCommand(\"SetUnlock\", \"DOCMAWDOCREFERENCESETUNLOCK: Unlock\", \"DOC_REFERENCE_API.Set_Unlock__\");\n\n headbar.addCommandValidConditions(\"SetLock\", \"OBJSTATE\", \"Enable\", \"Unlocked\");\n headbar.addCommandValidConditions(\"SetUnlock\", \"OBJSTATE\", \"Enable\", \"Locked\");\n \n\t\theadtbl = mgr.newASPTable(headblk);\n\t\theadtbl.setTitle(mgr.translate(\"DOCMAWDOCREFERENCECONDOCU: Connected Documents\"));\n\n\n\t\theadlay = headblk.getASPBlockLayout();\n\t\theadlay.setDialogColumns(2);\n\t\theadlay.setDefaultLayoutMode(headlay.SINGLE_LAYOUT);\n\n\n\t\t//\n\t\t// Connected documents\n\t\t//\n\n\t\titemblk = mgr.newASPBlock(\"ITEM\");\n\n\t\titemblk.disableDocMan();\n\n\t\titemblk.addField(\"ITEM_OBJID\").\n\t\tsetHidden().\n\t\tsetDbName(\"OBJID\");\n\n\t\titemblk.addField(\"ITEM_OBJVERSION\").\n\t\tsetHidden().\n\t\tsetDbName(\"OBJVERSION\");\n\n\t\titemblk.addField(\"ITEM_LU_NAME\").\n\t\tsetMandatory().\n\t\tsetHidden().\n\t\tsetDbName(\"LU_NAME\");\n\n\t\titemblk.addField(\"ITEM_KEY_REF\").\n\t\tsetMandatory().\n\t\tsetHidden().\n\t\tsetDbName(\"KEY_REF\");\n\t\t\n\t\titemblk.addField(\"VIEW_FILE\").\n setFunction(\"''\").\n setReadOnly().\n unsetQueryable().\n setLabel(\"DOCMAWDOCREFERENCEVIEWFILE: View File\").\n setHyperlink(\"../docmaw/EdmMacro.page?PROCESS_DB=VIEW&DOC_TYPE=ORIGINAL\", \"DOC_CLASS,DOC_NO,DOC_SHEET,DOC_REV\", \"NEWWIN\").\n setAsImageField();\n\t\t\n\t\titemblk.addField(\"CHECK_IN_FILE\").\n setFunction(\"''\").\n setReadOnly().\n unsetQueryable().\n setLabel(\"DOCMAWDOCREFERENCECHECKINFILE: Check In File\").\n setHyperlink(\"../docmaw/EdmMacro.page?PROCESS_DB=CHECKIN&DOC_TYPE=ORIGINAL\", \"DOC_CLASS,DOC_NO,DOC_SHEET,DOC_REV\", \"NEWWIN\").\n setAsImageField();\n\n\t\titemblk.addField(\"DOC_CLASS\").\n\t\tsetSize(10).\n\t\tsetMaxLength(12).\n\t\tsetMandatory().\n\t\tsetUpperCase().\n\t\tsetReadOnly().\n\t\tsetDynamicLOV(\"DOC_CLASS\").\n\t\tsetLOVProperty(\"TITLE\",mgr.translate(\"DOCMAWDOCREFERENCEDOCCLASS1: List of Document Class\")).\n\t\tsetCustomValidation(\"DOC_CLASS\",\"SDOCCLASSNAME,KEEP_LAST_DOC_REV,KEEP_LAST_DOC_REV_DB\").//Bug Id 85361\n\t\tsetLabel(\"DOCMAWDOCREFERENCEDOCCLASS: Doc Class\");\n\n\t\titemblk.addField(\"SDOCCLASSNAME\").\n\t\tsetDbName(\"DOC_NAME\").\n\t\tsetSize(10).\n\t\tsetReadOnly().\n\t\tsetLabel(\"DOCMAWDOCREFERENCESDOCCLASSNAME: Doc Class Desc\");\n\t\t\n\t\titemblk.addField(\"SUB_CLASS\").\n setSize(10).\n setReadOnly().\n setHidden().\n setDynamicLOV(\"DOC_SUB_CLASS\",\"DOC_CLASS\").\n setLabel(\"DOCMAWDOCREFERENCESSUBCLASS: Sub Class\");\n\t\t\n\t\titemblk.addField(\"SUB_CLASS_NAME\").\n setSize(10).\n setReadOnly().\n setLabel(\"DOCMAWDOCREFERENCESSUBCLASSNAME: Sub Class Name\");\n\n\t\titemblk.addField(\"DOC_CODE\").\n setSize(20).\n setReadOnly().\n setLabel(\"DOCMAWDOCREFERENCESDOCCODE: Doc Code\");\n\t\t\n\t\titemblk.addField(\"INNER_DOC_CODE\").\n setSize(20).\n setReadOnly().\n setLabel(\"DOCMAWDOCREFERENCESINNERDOCCODE: Inner Doc Code\");\n\t\t\n\t\titemblk.addField(\"SDOCTITLE\").\n\t\tsetDbName(\"DOC_TITLE\").\n\t\tsetSize(40).\n\t\tsetReadOnly().\n\t\tsetFieldHyperlink(\"DocIssue.page\", \"PAGE_URL\", \"DOC_CLASS,DOC_NO,DOC_SHEET,DOC_REV\").\n\t\tsetLabel(\"DOCMAWDOCREFERENCESDOCTITLE: Title\");\n\n\t\titemblk.addField(\"DOC_REV\").\n\t\tsetSize(20).\n\t\tsetMandatory().\n\t\tsetUpperCase().\n\t\tsetReadOnly().\n\t\tsetDynamicLOV(\"DOC_ISSUE\",\"DOC_CLASS,DOC_NO,DOC_SHEET\").\n\t\tsetLOVProperty(\"TITLE\",mgr.translate(\"DOCMAWDOCREFERENCEDOCREV1: List of Document Revision\")).\n\t\tsetLabel(\"DOCMAWDOCREFERENCEDOCREV: Doc Rev\");\n\t\t\n\t\titemblk.addField(\"DOC_STATE\").\n setSize(10).\n setReadOnly().\n setLabel(\"DOCMAWDOCREFERENCESDOCSTATE: Doc State\");\n\t\t\n\t\titemblk.addField(\"CONNECTED_PERSON\").\n setSize(10).\n setReadOnly().\n setDynamicLOV(\"PERSON_INFO_LOV\").\n setLabel(\"DOCMAWDOCREFERENCECONNECTEDPERSON: Connected Person\");\n\t\t\n\t\titemblk.addField(\"CONNECTED_PERSON_NAME\").\n setSize(10).\n setReadOnly().\n setFunction(\"Person_Info_API.Get_Name(:CONNECTED_PERSON)\").\n setLabel(\"DOCMAWDOCREFERENCECONNECTEDPERSONNAME: Connected Person Name\");\n\t\tmgr.getASPField(\"CONNECTED_PERSON\").setValidation(\"CONNECTED_PERSON_NAME\");\n\t\t\n\t\titemblk.addField(\"CONNECTED_DATE\", \"Date\").\n setSize(10).\n setReadOnly().\n setLabel(\"DOCMAWDOCREFERENCECONNECTEDDATE: Connected Date\");\n\t\t\n\t\titemblk.addField(\"SEND_UNIT_NAME\").\n setSize(20).\n setReadOnly().\n setLabel(\"DOCMAWDOCREFERENCESSENDUNITNAME: Send Unit Name\");\n\t\t\n\t\titemblk.addField(\"SIGN_PERSON\").\n setSize(10).\n setReadOnly().\n setLabel(\"DOCMAWDOCREFERENCESSIGNPERSON: Sign Person\");\n\t\t\n\t\titemblk.addField(\"COMPLETE_DATE\", \"Date\").\n setSize(10).\n setReadOnly().\n setLabel(\"DOCMAWDOCREFERENCESCOMPLETEDATE: Complete Date\");\n\n\t\titemblk.addField(\"DOCTSATUS\").\n\t\tsetSize(20).\n\t\tsetReadOnly().\n\t\tsetFunction(\"substr(DOC_ISSUE_API.Get_State(DOC_CLASS,DOC_NO,DOC_SHEET,DOC_REV),1,200)\").\n\t\tsetLabel(\"DOCMAWDOCREFERENCEDOCTSATUS: Status\");\n\n\t\t//\n\t\t// Hidden Fields\n\t\t//\n\t\t\n\t\titemblk.addField(\"DOC_NO\").\n setSize(20).\n setMaxLength(120).\n setMandatory().\n setUpperCase().\n setHidden().\n setLOV(\"DocNumLov.page\",\"DOC_CLASS\").\n setCustomValidation(\"DOC_CLASS,DOC_NO,DOC_SHEET,DOC_REV\",\"SDOCTITLE,DOC_CLASS,DOC_NO,DOC_SHEET,DOC_REV,SDOCCLASSNAME,KEEP_LAST_DOC_REV,KEEP_LAST_DOC_REV_DB\").//Bug Id 85361\n setLOVProperty(\"TITLE\",mgr.translate(\"DOCMAWDOCREFERENCEDOCNO1: List of Document No\")).\n setLabel(\"DOCMAWDOCREFERENCEDOCNO: Doc No\");\n\t\t\n\t\titemblk.addField(\"DOC_SHEET\").\n setSize(20).\n //Bug 61028, Start\n setMaxLength(10).\n //Bug 61028, End\n setMandatory().\n setUpperCase().\n setHidden().\n setDynamicLOV(\"DOC_ISSUE_LOV1\",\"DOC_CLASS,DOC_NO,DOC_REV\").\n setLOVProperty(\"TITLE\", mgr.translate(\"DOCMAWDOCREFERENCEDOCSHEET1: List of Doc Sheets\")).\n setLabel(\"DOCMAWDOCREFERENCEDOCSHEET: Doc Sheet\");\n\t\t\n\t\titemblk.addField(\"CATEGORY\").\n setSize(20).\n setMaxLength(5).\n setUpperCase().\n setHidden().\n setDynamicLOV(\"DOC_REFERENCE_CATEGORY\").\n setLOVProperty(\"TITLE\",mgr.translate(\"DOCMAWDOCREFERENCEDOCAT: List of Document Category\")).\n setLabel(\"DOCMAWDOCREFERENCECATEGORY: Association Category\");\n\n itemblk.addField(\"COPY_FLAG\").\n setSize(20).\n setMandatory().\n setSelectBox().\n setHidden().\n enumerateValues(\"Doc_Reference_Copy_Status_API\").\n setLabel(\"DOCMAWDOCREFERENCECOPYFLAG: Copy Status\");\n\n itemblk.addField(\"KEEP_LAST_DOC_REV\").\n setSize(20).\n setMaxLength(100).\n setMandatory().\n setSelectBox().\n setHidden().\n unsetSearchOnDbColumn().\n enumerateValues(\"Always_Last_Doc_Rev_API\").\n setCustomValidation(\"KEEP_LAST_DOC_REV,DOC_CLASS,DOC_NO,DOC_SHEET,DOC_REV\",\"DOC_REV,KEEP_LAST_DOC_REV_DB\").//Bug Id 85361\n setLabel(\"DOCMAWDOCREFERENCEKEEPLASTDOCREV: Update Revision\");\n\n //Bug Id 85361. Start\n itemblk.addField(\"KEEP_LAST_DOC_REV_DB\").\n setHidden().\n unsetSearchOnDbColumn().\n setFunction(\"Always_Last_Doc_Rev_API.Encode(:KEEP_LAST_DOC_REV)\");\n //Bug Id 85361. End\n\n itemblk.addField(\"SURVEY_LOCKED_FLAG\").\n setSize(20).\n setMandatory().\n setSelectBox().\n setHidden().\n enumerateValues(\"LOCK_DOCUMENT_SURVEY_API\").\n unsetSearchOnDbColumn().\n //Bug 57719, Start\n setCustomValidation(\"SURVEY_LOCKED_FLAG\",\"SURVEY_LOCKED_FLAG_DB\").\n //Bug 57719, End\n setLabel(\"DOCMAWDOCREFERENCESURVEYLOCKEDFLAG: Doc Connection Status\");\n\t\t\n\t\titemblk.addField(\"SURVEY_LOCKED_FLAG_DB\").\n setHidden().\n unsetSearchOnDbColumn().\n setFunction(\"Lock_Document_Survey_Api.Encode(:SURVEY_LOCKED_FLAG)\");\n\t\t\n\t\titemblk.addField(\"FILE_TYPE\").\n\t\tsetHidden().\n\t\tsetFunction(\"EDM_FILE_API.GET_FILE_TYPE(DOC_CLASS,DOC_NO,DOC_SHEET,DOC_REV,'ORIGINAL')\");\n\n\t\t//Bug Id 67336, start\n\t\titemblk.addField(\"STRUCTURE\").\n\t\tsetHidden().\n\t\tsetFunction(\"DOC_TITLE_API.Get_Structure_(DOC_CLASS,DOC_NO)\");\n\t\t//Bug Id 67336, end\n\n\t\t// Bug Id 89939, start\n\t\titemblk.addField(\"CAN_ADD_TO_BC\").\n\t\tsetHidden().\n\t\tsetFunction(\"DOC_ISSUE_API.can_add_to_bc(DOC_CLASS, DOC_NO, DOC_SHEET, DOC_REV)\");\n\t\t\n\t\titemblk.addField(\"BRIEFCASE_NO\"). \n\t\tsetHidden().\n\t\tsetDynamicLOV(\"DOC_BC_LOV1\").\n\t\tsetFunction(\"DOC_BRIEFCASE_ISSUE_API.GET_BRIEFCASE_NO(DOC_CLASS,DOC_NO,DOC_SHEET,DOC_REV)\");\n\t\t\n\t\titemblk.addField(\"EDMSTATUS\").\n\t\tsetHidden().\n\t\tsetFunction(\"EDM_FILE_API.GET_DOC_STATE_NO_USER(DOC_CLASS, DOC_NO, DOC_SHEET, DOC_REV, 'ORIGINAL')\");\n\t\t\n\t\titemblk.addField(\"IS_ELE_DOC\").\n setCheckBox(\"FALSE,TRUE\").\n setFunction(\"EDM_FILE_API.Have_Edm_File(:DOC_CLASS,:DOC_NO,:DOC_SHEET,:DOC_REV)\").\n setReadOnly().\n setHidden().\n setLabel(\"DOCMAWDOCREFERENCEISELEDOC: Is Ele Doc\").\n setSize(5);\n\t\t\n\t\titemblk.addField(\"PAGE_URL\").\n setFunction(\"Doc_Issue_API.Get_Page_Url(:DOC_CLASS,:DOC_NO,:DOC_SHEET,:DOC_REV)\").\n setReadOnly().\n setHidden();\n\t\t\n\t\titemblk.addField(\"TEMP_EDIT_ACCESS\").\n\t\tsetFunction(\"NVL(Doc_Class_API.Get_Temp_Doc(:DOC_CLASS), 'FALSE') || NVL(Doc_Issue_API.Get_Edit_Access_For_Rep_(:DOC_CLASS,:DOC_NO,:DOC_SHEET,:DOC_REV), 'FALSE')\").\n\t\tsetHidden();\n\t\t\n\t\titemblk.addField(\"COMP_DOC\").\n setFunction(\"NVL(Doc_Class_API.Get_Comp_Doc(:DOC_CLASS), 'FALSE')\").\n setHidden();\n\t\t\n\t\titemblk.addField(\"TEMP_DOC\").\n setFunction(\"NVL(Doc_Class_API.Get_Temp_Doc(:DOC_CLASS), 'FALSE')\").\n setHidden();\n\t\t\n\t\titemblk.addField(\"DOC_OBJSTATE\").\n setFunction(\"DOC_ISSUE_API.Get_Objstate__(:DOC_CLASS,:DOC_NO,:DOC_SHEET,:DOC_REV)\").\n setHidden().\n setLabel(\"DOCMAWDOCISSUESTATE: Doc Status\");\n\t\t\n\t\titemblk.addField(\"CHECK_CONNECTED_PERSON\").\n\t\tsetFunction(\"DECODE(connected_person, Person_Info_API.Get_Id_For_User(Fnd_Session_API.Get_Fnd_User), 'TRUE', 'FALSE')\").\n\t\tsetReadOnly().\n\t\tsetLabel(\"DOCMAWDOCREFERENCECHECKCONNECTEDPERSON: Check Connected Person\").\n setHidden();\n\t\t\n\t\titemblk.addField(\"TRANSFERED\").\n\t\tsetCheckBox(\"FALSE,TRUE\").\n\t\tsetReadOnly().\n setHidden();\n\t\t// Bug Id 89939, end\n\n\t\titemblk.setView(\"DOC_REFERENCE_OBJECT\");\n\t\titemblk.defineCommand(\"DOC_REFERENCE_OBJECT_API\",\"New__,Modify__,Remove__\");\n\t\titemblk.setMasterBlock(headblk);\n\t\titemset = itemblk.getASPRowSet();\n\t\titembar = mgr.newASPCommandBar(itemblk);\n\t\titembar.enableCommand(itembar.FIND);\n\t\titembar.disableCommand(itembar.NEWROW);\n\t\titembar.disableCommand(itembar.DUPLICATEROW);\n\t\titembar.disableCommand(itembar.OVERVIEWEDIT);\n\t\titembar.disableCommand(itembar.DELETE);\n\t\titembar.disableCommand(itembar.EDITROW);\n\t\t\n\t\t//Bug 57719, Start, Added check on function checkLocked()\n\t\titembar.defineCommand(itembar.SAVERETURN,\"saveReturnITEM\",\"checkLocked()\");\n\t\t//Bug 57719, End\n\t\titembar.defineCommand(itembar.OKFIND, \"okFindITEMWithErrorMsg\");\n\t\titembar.defineCommand(itembar.COUNTFIND,\"countFindITEM\");\n\t\titembar.defineCommand(itembar.NEWROW, \"newRowITEM\");\n\t\titembar.defineCommand(itembar.SAVENEW, \"saveNewITEM\");\n\t\titembar.defineCommand(itembar.DELETE, \"deleteITEM\");\n\t\t\n\t\t//Bug Id 85487, Start\n\t\titembar.addCustomCommand(\"createNewDoc\", mgr.translate(\"DOCMAWDOCREFERENCECREATEDOC: Create New Document\"));\n\t\titembar.addSecureCustomCommand(\"createConnectDefDoc\", mgr.translate(\"DOCMAWDOCREFERENCECREATECONNDEFDOC: Create And Connect Document...\"), \"DOC_REFERENCE_OBJECT_API.New__\", \"../common/images/toolbar/\" + mgr.getLanguageCode() + \"/createConnectDefDoc.gif\", true);\n\t\t// itembar.setCmdConfirmMsg(\"createConnectDefDoc\", \"DOCMAWDOCREFERENCECREATECONNDEFDOCMSG: Confirm create and connect document?\");\n\t\titembar.addSecureCustomCommand(\"insertExistingDoc\",mgr.translate(\"DOCMAWDOCREFERENCEINEXISTDOC: Insert Existing Document...\"), \"DOC_REFERENCE_OBJECT_API.New__\", \"../common/images/toolbar/\" + mgr.getLanguageCode() + \"/addDocument.gif\", true);\n\t\titembar.addCustomCommandSeparator();\n\t\titembar.forceEnableMultiActionCommand(\"createNewDoc\");\n\t\titembar.forceEnableMultiActionCommand(\"createConnectDefDoc\");\n\t\titembar.forceEnableMultiActionCommand(\"insertExistingDoc\");\n\t\titembar.removeFromRowActions(\"insertExistingDoc\");\n\t\titembar.removeFromRowActions(\"createNewDoc\");\n\t\titembar.removeFromRowActions(\"createConnectDefDoc\");\n\t\t//Bug Id 85487, End\n\n\t\t//Bug Id 89939, start\n\t\t// itembar.addSecureCustomCommand(\"startAddingToBriefcase\",\"DOCMAWDOCREFERENCEADDTOBC: Add to Briefcase...\",\"DOC_BRIEFCASE_ISSUE_API.Add_To_Briefcase\"); \n\t\t// itembar.addCustomCommand(\"goToBriefcase\",\"DOCMAWDOCREFERENCEGOTOBC: Go to Briefcase\"); \n\t\t// itembar.addCommandValidConditions(\"goToBriefcase\",\"BRIEFCASE_NO\",\"Disable\",null);\n\t\t//Bug Id 89939, end\n\n\t\t// File Operations\n\t\t// itembar.addSecureCustomCommand(\"editDocument\",mgr.translate(\"DOCMAWDOCREFERENCEEDITDOC: Edit Document\"),\"DOCUMENT_ISSUE_ACCESS_API.Get_Document_Access\"); //Bug Id 70286\n\t\titembar.addSecureCustomCommand(\"deleteDoc\",mgr.translate(\"DOCMAWDOCREFERENCEDELETEDOC: Delete\"),\"DOC_REFERENCE_OBJECT_API.Remove__\"); //Bug Id 70286\n\t\titembar.setCmdConfirmMsg(\"deleteDoc\", \"DOCMAWDOCREFERENCEDELETEDOCCONFIRM: Confirm delete document(s)?\");\n\t\titembar.addCustomCommandSeparator();\n\t\titembar.addSecureCustomCommand(\"viewOriginal\",mgr.translate(\"DOCMAWDOCREFERENCEVIEVOR: View Document\"),\"DOCUMENT_ISSUE_ACCESS_API.Get_Document_Access\"); //Bug Id 70286\n\t\titembar.addSecureCustomCommand(\"checkInDocument\",mgr.translate(\"DOCMAWDOCREFERENCECHECKINDOC: Check In Document\"),\"DOCUMENT_ISSUE_ACCESS_API.Get_Document_Access\"); //Bug Id 70286\n\t\t// itembar.addSecureCustomCommand(\"undoCheckOut\",mgr.translate(\"DOCMAWDOCREFERENCEUNDOCHECKOUT: Undo Check Out Document\"),\"DOCUMENT_ISSUE_ACCESS_API.Get_Document_Access\"); //Bug Id 70286\n\t\t// itembar.addSecureCustomCommand(\"viewOriginalWithExternalViewer\",mgr.translate(\"DOCMAWDOCREFERENCEVIEWOREXTVIEWER: View Document with Ext. App\"),\"DOCUMENT_ISSUE_ACCESS_API.Get_Document_Access\"); //Bug Id 70286\n\t\t// itembar.addSecureCustomCommand(\"viewCopy\",mgr.translate(\"DOCMAWDOCREFERENCEVIEWCO: View Copy\"),\"DOCUMENT_ISSUE_ACCESS_API.Get_Document_Access\"); //Bug Id 70286\n\t\t// itembar.addSecureCustomCommand(\"printDocument\",mgr.translate(\"DOCMAWDOCREFERENCEPRINTDOC: Print Document\"),\"DOCUMENT_ISSUE_ACCESS_API.Get_Document_Access\"); //Bug Id 70286\n\t\t// itembar.addSecureCustomCommand(\"copyFileTo\",mgr.translate(\"DOCMAWDOCISSUECOPYFILETO: Copy File To...\"),\"DOCUMENT_ISSUE_ACCESS_API.Get_Document_Access\"); //Bug Id 70286\n\t\t// itembar.addSecureCustomCommand(\"sendToMailRecipient\",mgr.translate(\"DOCMAWDOCREFERENCEWSENDMAIL: Send by E-mail...\"),\"DOCUMENT_ISSUE_ACCESS_API.Get_Document_Access\"); //Bug Id 70286\n\t\titembar.addCustomCommand(\"documentInfo\",mgr.translate(\"DOCMAWDOCREFERENCEDOCINFO: Document Info...\"));\n\n\t\titembar.addCommandValidConditions(\"checkInDocument\", \"TEMP_EDIT_ACCESS\", \"Enable\", \"TRUETRUE\");\n\t\titembar.addCommandValidConditions(\"checkInDocument\", \"CHECK_CONNECTED_PERSON\", \"Disable\", \"FALSE\");\n\t\titembar.addCommandValidConditions(\"checkInDocument\", \"TRANSFERED\", \"Disable\", \"TRUE\");\n\t\titembar.addCommandValidConditions(\"checkInDocument\", \"SURVEY_LOCKED_FLAG_DB\", \"Disable\", \"1\");\n\t\t\n\t\titembar.addCommandValidConditions(\"deleteDoc\", \"TEMP_EDIT_ACCESS\", \"Disable\", \"TRUEFALSE\");\n\t\titembar.addCommandValidConditions(\"deleteDoc\", \"CHECK_CONNECTED_PERSON\", \"Disable\", \"FALSE\");\n\t\titembar.addCommandValidConditions(\"deleteDoc\", \"TRANSFERED\", \"Disable\", \"TRUE\");\n\t\titembar.addCommandValidConditions(\"deleteDoc\", \"SURVEY_LOCKED_FLAG_DB\", \"Disable\", \"1\");\n\t\t\n\t\t// Add operations to comand groups\n\t\t// itembar.addCustomCommandGroup(\"FILE\", mgr.translate(\"DOCMAWDOCREFERENCEFILECMDGROUP: File Operations\"));\n\t\t// itembar.setCustomCommandGroup(\"editDocument\", \"FILE\");\n\t\t// itembar.setCustomCommandGroup(\"checkInDocument\", \"FILE\");\n\t\t// itembar.setCustomCommandGroup(\"undoCheckOut\", \"FILE\");\n\t\t// itembar.setCustomCommandGroup(\"viewOriginal\", \"FILE\");\n\t\t// itembar.setCustomCommandGroup(\"viewOriginalWithExternalViewer\", \"FILE\");\n\t\t// itembar.setCustomCommandGroup(\"viewCopy\", \"FILE\");\n\t\t// itembar.setCustomCommandGroup(\"printDocument\", \"FILE\");\n\t\t// itembar.setCustomCommandGroup(\"copyFileTo\", \"FILE\");\n\n\n\t\titembar.enableMultirowAction();\n\t\t// itembar.removeFromMultirowAction(\"viewOriginalWithExternalViewer\");\n\t\t// itembar.removeFromMultirowAction(\"undoCheckOut\");\n\n\n\t\titemtbl = mgr.newASPTable(itemblk);\n\t\titemtbl.setTitle(mgr.translate(\"DOCMAWDOCREFERENCEDOCUCC: Documents\"));\n\t\titemtbl.enableRowSelect();\n\n\t\titemlay = itemblk.getASPBlockLayout();\n\t\titemlay.setDialogColumns(2);\n\t\titemlay.setDefaultLayoutMode(itemlay.MULTIROW_LAYOUT);\n\n\t\titemlay.setSimple(\"CONNECTED_PERSON_NAME\");\n\t\t\n\t\t//\n\t\t// Create and connect documents\n\t\t//\n\n\t\tdlgblk = mgr.newASPBlock(\"DLG\");\n\n\t\tdlgblk.addField(\"DLG_DOC_CLASS\").\n\t\tsetSize(20).\n\t\tsetDynamicLOV(\"DOC_CLASS\").\n\t\tsetMandatory().\n\t\tsetUpperCase().\n\t\tsetCustomValidation(\"DLG_DOC_CLASS\",\"DLG_DOC_REV,FIRST_SHEET_NO,NUMBER_GENERATOR,NUM_GEN_TRANSLATED,ID1,ID2\").\n\t\tsetLabel(\"DOCMAWDOCREFERENCEDLGDOCCLASS: Doc Class\");\n\n\t\tdlgblk.addField(\"DLG_DOC_NO\").\n\t\tsetSize(20).\n\t\tsetMandatory().\n\t\tsetUpperCase().\n\t\tsetLabel(\"DOCMAWDOCREFERENCEDLGDOCNO: No\");\n\n\t\tdlgblk.addField(\"FIRST_SHEET_NO\").\n\t\tsetSize(20).\n\t\tsetMandatory().\n\t\tsetUpperCase().\n\t\tsetLabel(\"DOCMAWDOCREFERENCEFIRSTSHEETNO: First Sheet No\");\n\n\t\tdlgblk.addField(\"DLG_DOC_REV\").\n\t\tsetSize(20).\n\t\tsetMandatory().\n\t\tsetUpperCase().\n\t\tsetLabel(\"DOCMAWDOCREFERENCEDLGDOCTITLE: Revision\");\n\n\t\tdlgblk.addField(\"DLG_DOC_TITLE\").\n\t\tsetSize(20).\n\t\tsetMandatory().\n\t\tsetLabel(\"DOCMAWDOCREFERENCEDLGDOCREV: Title\");\n\n\t\t// Configurable doc no\n\n\t\tdlgblk.addField(\"NUMBER_GENERATOR\").\n\t\tsetHidden().\n\t\tsetFunction(\"''\");\n\n\t\tdlgblk.addField(\"NUM_GEN_TRANSLATED\").\n\t\tsetReadOnly().\n\t\tsetUpperCase().\n\t\tsetFunction(\"''\").\n\t\tsetLabel(\"DOCREFERENCENUMBERGENERATOR: Number Generator\");\n\n\n\t\tdlgblk.addField(\"ID1\").\n\t\tsetReadOnly().\n\t\tsetFunction(\"''\").\n\t\tsetUpperCase().\n\t\tsetLOV(\"Id1Lov.page\").\n\t\tsetLabel(\"DOCREFERENCENUMBERCOUNTERID1: Number Counter ID1\");\n\n\t\tdlgblk.addField(\"ID2\").\n\t\tsetSize(20).\n\t\tsetUpperCase().\n\t\tsetMaxLength(30).\n\t\tsetFunction(\"''\").\n\t\tsetLOV(\"Id2Lov.page\",\"ID1\").\n\t\tsetLabel(\"DOCREFERENCENUMBERCOUNTERID2: Number Counter ID2\");\n\n\t\tdlgblk.addField(\"BOOKING_LIST\").\n\t\tsetSize(20).\n\t\tsetMaxLength(30).\n\t\tsetUpperCase().\n\t\tsetFunction(\"''\").\n\t\tsetLOV(\"BookListLov.page\", \"ID1,ID2\").//Bug Id 73606\n\t\tsetLabel(\"DOCREFERENCEBOOKINGLIST: Booking List\");\n\n\t\tdlgblk.setTitle(mgr.translate(\"DOCMAWDOCREFERENCECREANDCONNDOC: Create and Connect New Document\"));\n\n\t\tdlgset = dlgblk.getASPRowSet();\n\t\tdlgbar = mgr.newASPCommandBar(dlgblk);\n\t\tdlgbar.enableCommand(dlgbar.OKFIND);\n\t\tdlgbar.defineCommand(dlgbar.OKFIND,\"dlgOk\");\n\t\tdlgbar.enableCommand(dlgbar.CANCELFIND);\n\t\tdlgbar.defineCommand(dlgbar.CANCELFIND,\"dlgCancel\");\n\n\t\tdlglay = dlgblk.getASPBlockLayout();\n\t\tdlglay.setDialogColumns(2);\n\t\tdlglay.setDefaultLayoutMode(dlglay.CUSTOM_LAYOUT);\n\t\tdlglay.setEditable();\n\n\n\t\t//\n\t\t// dummy block\n\t\t//\n\n\t\tdummyblk = mgr.newASPBlock(\"DUMMY\");\n\n\t\tdummyblk.addField(\"DOC_TYPE\");\n\t\tdummyblk.addField(\"RETURN\");\n\t\tdummyblk.addField(\"ATTR\");\n\t\tdummyblk.addField(\"TEMP1\");\n\t\tdummyblk.addField(\"TEMP2\");\n\t\tdummyblk.addField(\"TEMP3\");\n\t\tdummyblk.addField(\"DUMMY\");\n\t\tdummyblk.addField(\"DUMMY_TYPE\");\n\t\tdummyblk.addField(\"DUMMY1\");\n\t\tdummyblk.addField(\"DUMMY2\");\n\t\tdummyblk.addField(\"DUMMY3\");\n\t\tdummyblk.addField(\"DUMMY4\");\n\t\tdummyblk.addField(\"DUMMY5\");\n\t\tdummyblk.addField(\"DUMMY6\");\n\t\tdummyblk.addField(\"LOGUSER\");\n\t\tdummyblk.addField(\"OUT_1\");\n\t}",
"private org.gwtbootstrap3.client.ui.PanelHeader get_f_PanelHeader39() {\n return build_f_PanelHeader39();\n }",
"private static void printHeading(){\n\t\tSystem.out.println(\"Your Name\");\n\t\tSystem.out.println(\"Course name and semester\");\n\t\tSystem.out.println(\"Programming Project 1\");\n\t\tSystem.out.println(\"Your Name in Code\");\n\t\tSystem.out.println();\n\n\t}",
"public IAstSourceFile findIncludeFile(ISourceFile file);",
"private static void outputHeaderMainPage(SimpleWriter out) {\n out.print(\"<html>\\n\" + \"<head>\\n\" + \"\\t<title>\" + \"Index\" + \"</title>\\n\"\n + \"<font size = '10' >\" + \"Glossary Homepage\" + \"</font>\"\n + \"</head>\\n\" + \"<body>\\n\" + \"<head>\\n\" + \"\\t<h1>\\n\"\n + \"<font size = '6' >\" + \"Index\" + \"</font>\" + \"\\t</h1>\\n\"\n + \"</head>\\n\" + \"</body>\\n\" + \"</html>\");\n }",
"protected void updateHeader() {\n\t}",
"public void setSystemIncludePath(@Nonnull List<String> path) {\r\n this.sysincludepath = path;\r\n }",
"public String printHeader() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"\\n***********************************\\n\");\n sb.append(\"\\tAbacus\\n\");\n try {\n sb.append(\"\\tVersion: \");\n //sb.append(abacus.class.getPackage().getImplementationVersion());\n sb.append(\"2.6\");\n } catch (Exception e) {\n // Don't print anything\n }\n sb.append(\"\\n***********************************\\n\")\n .append(\"Developed and written by: Damian Fermin and Alexey Nesvizhskii\\n\")\n .append(\"Modifications by Dmitry Avtonomov\\n\")\n .append(\"Copyright 2010 Damian Fermin\\n\\n\")\n .append(\"Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\")\n .append(\"you may not use this file except in compliance with the License.\\n\")\n .append(\"You may obtain a copy of the License at \\n\\n\")\n .append(\"http://www.apache.org/licenses/LICENSE-2.0\\n\\n\")\n .append(\"Unless required by applicable law or agreed to in writing, software\\n\")\n .append(\"distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\")\n .append(\"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\")\n .append(\"See the License for the specific language governing permissions and\\n\")\n .append(\"limitations under the License.\\n\\n\");\n return sb.toString();\n }",
"Header createHeader();",
"public static void printHeader(){\n System.out.println(\"\" +\n \"AuthorCode Number: 879P \\n\" +\n \"Class: CS 342, Fall 2016 \\n\" +\n \"Program: #3, 8 Tiles. \\n\" +\n \"\\n\" +\n \"\\n\" +\n \"Welcome to the 8-tiles puzzle. \\n\" +\n \"Place the tiles in ascending numerical order. For each \\n\" +\n \"move enter the piece to be moved into the blank square, \\n\" +\n \"or 0 to exit the program.\\n\");\n }",
"private void printHeading()\n {\n System.out.println(\"==============================================\");\n System.out.println(\" Stock Management Application \");\n System.out.println(\" App05: by Haroon Sadiq \");\n System.out.println(\"==============================================\");\n }",
"private void setupHeader(final String filePath) throws IOException{\n\t\tFile headerFile = new File(filePath);\n\t\tString dataString = new String();\n\t\tBufferedReader reader = new BufferedReader(new FileReader(headerFile));\n\t\twhile((dataString = reader.readLine()) != null){\n\t\t\theaderText.append(dataString);\n\t\t\theaderText.append(System.lineSeparator());\n\t\t}\n\t\treader.close();\n\t}",
"private void loadNavHeader() {\n // name, website\n txtName.setText(\"Ashish Jain\");\n txtWebsite.setText(\"[email protected]\");\n\n navigationView.getMenu().getItem(3).setActionView(R.layout.menu_dot);\n }",
"public Class<?> header() {\n return header;\n }",
"default boolean hasHeader() {\n return true;\n }",
"private org.gwtbootstrap3.client.ui.PanelHeader get_f_PanelHeader17() {\n return build_f_PanelHeader17();\n }",
"protected JTableHeader createDefaultTableHeader() {\n return new JTableHeader(columnModel) {\n public String getToolTipText(MouseEvent e) {\n java.awt.Point p = e.getPoint();\n int index = columnModel.getColumnIndexAtX(p.x);\n int realIndex = columnModel.getColumn(index).getModelIndex();\n return columnToolTips[realIndex];\n }\n };\n }",
"@Test\n\t\tpublic void testAddHeader() throws Exception{\n\t\t\temail.addHeader(this.goodHeaderName, this.goodHeaderValue);\n\t\t}",
"private org.gwtbootstrap3.client.ui.PanelHeader get_f_PanelHeader49() {\n return build_f_PanelHeader49();\n }",
"public void setHeader() {\n tvHeader.setText(getResources().getString(R.string.text_skill));\n tvDots.setVisibility(View.INVISIBLE);\n }",
"private org.gwtbootstrap3.client.ui.PageHeader get_f_PageHeader3() {\n return build_f_PageHeader3();\n }",
"protected void addDynamicHeaders() {\n }",
"protected void addXmlHeader()\n {\n addString(XmlUtil.formattedPaginatedResultSetXmlDtd());\n }",
"public final void header() throws RecognitionException {\n\t\tToken ACTION3=null;\n\n\t\ttry {\n\t\t\t// org/antlr/gunit/gUnit.g:83:8: ( '@header' ACTION )\n\t\t\t// org/antlr/gunit/gUnit.g:83:10: '@header' ACTION\n\t\t\t{\n\t\t\tmatch(input,30,FOLLOW_30_in_header157); \n\t\t\tACTION3=(Token)match(input,ACTION,FOLLOW_ACTION_in_header159); \n\n\t\t\t\t\tint pos1, pos2;\n\t\t\t\t\tif ( (pos1=(ACTION3!=null?ACTION3.getText():null).indexOf(\"package\"))!=-1 && (pos2=(ACTION3!=null?ACTION3.getText():null).indexOf(';'))!=-1 ) {\n\t\t\t\t\t\tgrammarInfo.setGrammarPackage((ACTION3!=null?ACTION3.getText():null).substring(pos1+8, pos2).trim());\t// substring the package path\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.err.println(\"error(line \"+ACTION3.getLine()+\"): invalid header\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}",
"public final smaliTreeWalker.header_return header() throws RecognitionException {\n smaliTreeWalker.header_return retval = new smaliTreeWalker.header_return();\n retval.start = input.LT(1);\n\n TreeRuleReturnScope class_spec5 = null;\n String super_spec6 = null;\n List<String> implements_list7 = null;\n String source_spec8 = null;\n\n try {\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:174:3: ( class_spec ( super_spec )? implements_list source_spec )\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:174:3: class_spec ( super_spec )? implements_list source_spec\n {\n pushFollow(FOLLOW_class_spec_in_header85);\n class_spec5 = class_spec();\n state._fsp--;\n\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:174:14: ( super_spec )?\n int alt1 = 2;\n int LA1_0 = input.LA(1);\n if ((LA1_0 == I_SUPER)) {\n alt1 = 1;\n }\n switch (alt1) {\n case 1:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:174:14: super_spec\n {\n pushFollow(FOLLOW_super_spec_in_header87);\n super_spec6 = super_spec();\n state._fsp--;\n\n }\n break;\n\n }\n\n pushFollow(FOLLOW_implements_list_in_header90);\n implements_list7 = implements_list();\n state._fsp--;\n\n pushFollow(FOLLOW_source_spec_in_header92);\n source_spec8 = source_spec();\n state._fsp--;\n\n\n classType = (class_spec5 != null ? ((smaliTreeWalker.class_spec_return) class_spec5).type : null);\n retval.classType = classType;\n retval.accessFlags = (class_spec5 != null ? ((smaliTreeWalker.class_spec_return) class_spec5).accessFlags : 0);\n retval.superType = super_spec6;\n retval.implementsList = implements_list7;\n retval.sourceSpec = source_spec8;\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 retval;\n }",
"private void include(\r\n @CheckForNull String parent, int line,\r\n @Nonnull String name, boolean quoted, boolean next)\r\n throws IOException,\r\n LexerException {\r\n if (name.startsWith(\"/\")) {\r\n VirtualFile file = filesystem.getFile(name);\r\n if (include(file))\r\n return;\r\n StringBuilder buf = new StringBuilder();\r\n buf.append(\"File not found: \").append(name);\r\n error(line, 0, buf.toString());\r\n return;\r\n }\r\n\r\n VirtualFile pdir = null;\r\n if (quoted) {\r\n if (parent != null) {\r\n VirtualFile pfile = filesystem.getFile(parent);\r\n pdir = pfile.getParentFile();\r\n }\r\n if (pdir != null) {\r\n VirtualFile ifile = pdir.getChildFile(name);\r\n if (include(ifile))\r\n return;\r\n }\r\n if (include(quoteincludepath, name))\r\n return;\r\n } else {\r\n int idx = name.indexOf('/');\r\n if (idx != -1) {\r\n String frameworkName = name.substring(0, idx);\r\n String headerName = name.substring(idx + 1);\r\n String headerPath = frameworkName + \".framework/Headers/\" + headerName;\r\n if (include(frameworkspath, headerPath))\r\n return;\r\n }\r\n }\r\n\r\n if (include(sysincludepath, name))\r\n return;\r\n\r\n StringBuilder buf = new StringBuilder();\r\n buf.append(\"File not found: \").append(name);\r\n buf.append(\" in\");\r\n if (quoted) {\r\n buf.append(\" .\").append('(').append(pdir).append(')');\r\n for (String dir : quoteincludepath)\r\n buf.append(\" \").append(dir);\r\n }\r\n for (String dir : sysincludepath)\r\n buf.append(\" \").append(dir);\r\n error(line, 0, buf.toString());\r\n }",
"public interface BentoConstants extends com.google.gwt.i18n.client.Constants {\n \n /**\n * Translated \"BentoConstants\".\n * \n * @return translated \"BentoConstants\"\n * @gwt.key ClassName\n */\n String ClassName();\n}",
"public ServiceUserExitRsHeader()\n\t{\n\t\tsuper();\n\t}",
"public IAstPreprocessorIncludeDirective findInclude(String string);",
"private void writeHEADER() throws IOException {\n\t\tmeta.compute_checksum();\n\t\tmeta.write();\n\t\t\n\t\t// We could also generate a non-aldus metafile :\n\t\t// writeClipboardHeader(meta);\n\t\t\n\t\t// Generate the standard header common to all metafiles.\n\t\thead.write();\n\t}",
"protected void addPreamble()\n {\n openStartTag(xmlType());\n addSpace();\n addKeyValuePair(VERSION, \"1.0\");\n addSpace();\n addKeyValuePair(PRS_ID, \"PRS\" + System.currentTimeMillis());\n addSpace();\n addKeyValuePair(LOCALE, getLocale());\n closeTag();\n }",
"public interface XModule extends ru.awk.spb.xonec.XOneC.XModule\r\n{\r\n}",
"@Override\r\n\tprotected String getProjectHelpId() {\n\t\treturn null;\r\n\t}",
"void Header() {\n\t\tJPanel panel = new JPanel(new GridLayout(2,1));\r\n\t\t\r\n\t\tJPanel panel2 = new JPanel(new GridLayout(1,2));\r\n\t\tpanel2.add(lblNoTelepon);\r\n\t\tpanel2.add(txtNoTelepon);\r\n\t\tpanel.add(panel2);\r\n\t\t\r\n\t\tpanel2 = new JPanel(new GridLayout(1,2));\r\n\t\tpanel2.add(lblPassword);\r\n\t\tpanel2.add(pfPassword);\r\n\t\tpanel.add(panel2);\r\n\t\t\r\n\t\tadd(panel, BorderLayout.CENTER);\r\n\t\t\r\n\r\n\t}",
"public String getHeader() {\n\t\tString item_text = getQuantityString(getCount());\n\t\tString header = getActivity().getString(R.string.browse_items_text, item_text, getCount());\n\t\treturn header;\n\t}"
] | [
"0.60303724",
"0.5982008",
"0.57789195",
"0.567249",
"0.56659645",
"0.5652372",
"0.5637187",
"0.54296285",
"0.54290366",
"0.5395655",
"0.539035",
"0.53641915",
"0.5286975",
"0.5255592",
"0.5240406",
"0.52170515",
"0.5214344",
"0.5195066",
"0.51924497",
"0.51871866",
"0.5134965",
"0.51247257",
"0.5124722",
"0.51201576",
"0.5118207",
"0.5117118",
"0.51161146",
"0.5106393",
"0.5099521",
"0.5094061",
"0.5086744",
"0.5080314",
"0.50775015",
"0.50680536",
"0.50504696",
"0.5049703",
"0.50225097",
"0.50106066",
"0.5008893",
"0.49597597",
"0.49441072",
"0.493498",
"0.4930921",
"0.4927972",
"0.49108976",
"0.4903201",
"0.49016455",
"0.48911533",
"0.48879543",
"0.487826",
"0.48782173",
"0.48731875",
"0.48609033",
"0.4851795",
"0.48491284",
"0.4841098",
"0.48385558",
"0.48318422",
"0.4830714",
"0.48240724",
"0.48223376",
"0.48222765",
"0.48194835",
"0.48111564",
"0.4807426",
"0.48056433",
"0.48042816",
"0.48039562",
"0.4803808",
"0.48037606",
"0.48015422",
"0.4793",
"0.47913197",
"0.47911477",
"0.47846863",
"0.4778315",
"0.476419",
"0.47587186",
"0.4758417",
"0.47551677",
"0.47537163",
"0.47517866",
"0.47481126",
"0.47469047",
"0.47459897",
"0.47427264",
"0.4742115",
"0.4740517",
"0.4735334",
"0.47349706",
"0.47329918",
"0.47266826",
"0.47242835",
"0.47241727",
"0.47215366",
"0.4721162",
"0.4719712",
"0.47189477",
"0.47093302",
"0.47012296",
"0.46971738"
] | 0.0 | -1 |
Scale down by stepDown number of times, selecting the most recently created launchers to be killed. | public void scaleDown() {
log.info("Scaling down by [Step Down] " + stepDown + " instances...");
// Scale down by (1 x stepDown) at a time
for (int i = 0; i < stepDown; i++) {
// Get free launchers
List<String> urlsToScaleDown = getFreeLaunchers();
log.info("URLs to scale down: " + urlsToScaleDown.toString());
// Sort by launcher url. This will sort the oldest first, making it possible to take the youngest out of the
// tail
urlsToScaleDown.sort((o1, o2) -> {
int mySuffix = Integer.parseInt(o1.split("\\.")[0].substring(
(Constants.LAUNCHER_URL_PREFIX + "-").length()));
int theirSuffix = Integer.parseInt(o2.split("\\.")[0].substring(
(Constants.LAUNCHER_URL_PREFIX + "-").length()));
return Integer.compare(mySuffix, theirSuffix);
});
// Get the youngest free launcher URL
String launcherUrlToDelete = urlsToScaleDown.get(urlsToScaleDown.size() - 1);
log.info("Cutting down [Launcher URL] " + launcherUrlToDelete + "...");
// Get object name from launcher URL
String deploymentName = getObjectNameFromLauncherUrl(launcherUrlToDelete);
// Delete deployment and service
if (!deleteLauncher(deploymentName)) {
log.error("Launcher deletion failed [Object Name] " + deploymentName);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void scaleUp(String reason) {\n log.info(\"Scaling up by [Step Up] \" + stepUp + \" instances...\");\n\n // Where to start naming things\n int newNameSuffix = getLatestDeploymentNameSuffix() + 1;\n\n // scale up by (1 x stepUp) at a time\n for (int i = 0; i < stepUp; i++) {\n int deploymentNameSuffix = newNameSuffix + i;\n String deploymentName = Constants.BPG_APP_TYPE_LAUNCHER + \"-\" + deploymentNameSuffix;\n if (createLauncher(deploymentNameSuffix, reason)) {\n // Register the newly spawned launcher as a free one\n addFreeLauncher(deploymentName);\n } else {\n log.error(\"Launcher creation failed for [Object Name] \" + deploymentName);\n }\n\n }\n }",
"@Override\r\n\tpublic void shutDown(double max) {\n\t\t\r\n\t}",
"public void honourMaxCount() {\n // Get free and total counts\n int freeCount = getFreeLaunchers().size();\n int totalCount = getTotalLaunchers().size();\n\n // Scale down if max is exceeded, irrespective of free buffer count\n if (totalCount > maxCount) {\n log.info(\"Scaling down until [freeBufferCount] \" + freeBufferCount + \" is met since [Max Count] \"\n + maxCount + \" has been exceeded.\");\n\n while (freeCount <= freeBufferCount){\n log.info(\"Scaling DOWN: REASON -> [Total Count] \" + totalCount + \" > [Max Count] \" + maxCount);\n scaleDown();\n freeCount = getFreeLaunchers().size();\n }\n\n totalCount = getTotalLaunchers().size();\n freeCount = getFreeLaunchers().size();\n\n log.info(\"Stats after scale down operation: [Total Count] \" + totalCount + \", [Free Count] \" + freeCount);\n\n return;\n }\n\n // Don't scale down if there are not enough free launchers\n if (freeCount <= freeBufferCount) {\n log.info(\"Not scaling down since [Free Count] \" + freeCount + \" <= [Free Buffer Size] \" +\n freeBufferCount + \"...\");\n return;\n }\n\n // Don't scale down if the desired count is not exceeded\n if (totalCount <= desiredCount) {\n log.info(\"Not scaling down since [Total Count] \" + totalCount + \" <= [Desired Count] \" +\n desiredCount + \"...\");\n return;\n }\n\n // Scale down if desired count is exceeded, but with more free launchers than buffer count by stepDown count\n // TODO: to test scale down\n if ((freeCount - stepDown) >= freeBufferCount) {\n log.info(\"Scaling DOWN: REASON -> [Total Count] \" + totalCount + \" > [Desired Count] \" + desiredCount +\n \" AND [Free Count] - [Step Down] \" + freeCount + \" - \" + stepDown +\n \" >= [Free Buffer Count] \" + freeBufferCount);\n\n scaleDown();\n return;\n }\n\n // If after scaling down there wouldn't be enough free launchers, don't scale down\n log.info(\"Not scaling down since [Free Count] + [Step Down] \" + freeCount + \" + \" + stepDown +\n \" < [Free Buffer Count] \" + freeBufferCount);\n }",
"public void setKillCount(){\n killCount = killCount + 1;\n System.out.println(\"Kill count: \"+ killCount);\n }",
"public void killAndHunt() {\n\t\tRandom random = new Random();\n\t\tint currentIndex = random.nextInt(N);\t\n\t\tkill(currentIndex);\n\t}",
"boolean decrementPlannedInstances();",
"public void resetStepCount() {\r\n\t\tstepCount = 500;\r\n\t}",
"protected void kill() {\n\t\tsynchronized (this) // Don't allow shutdown during startup.\n\t\t{\n\t\t\t// Only execute for the first caller.\n\t\t\tif (shutdownMutex.acquire()) {\n\t\t\t\t// Shutdown payer thread.\n\t\t\t\tpayerThread.interrupt();\n\n\t\t\t\tfor (int i = 0; i < sets.length; i++) {\n\t\t\t\t\tsets[i].kill();\n\t\t\t\t}\n\n\t\t\t\t// Shutdown the thread pools.\n\t\t\t\tproducerThreadPool.kill();\n\n\t\t\t\t// Let the GC figure the rest out.\n\t\t\t}\n\t\t}\n\t}",
"int getMaxInstances();",
"private void decWaiters()\r\n/* 451: */ {\r\n/* 452:537 */ this.waiters = ((short)(this.waiters - 1));\r\n/* 453: */ }",
"private void scaleDown(final InstanceInfo instances, final int amount)\n throws ScalerException\n {\n int downTarget = Math.max(0, Math.min(instances.getTotalInstances() - minInstances, Math.max(0, amount)));\n if (downTarget > 0) {\n LOG.debug(\"Triggering scale down of service {} by amount {}\", serviceRef, downTarget);\n scaler.scaleDown(serviceRef, downTarget);\n backoff = true;\n }\n }",
"protected void kill() {\n\t\tsetDeathTime(0.6);\n\t}",
"public void createDeckWorker() {\n\t\tboolean stop = false;\n\t\twhile (this.deckWorker.size() < 5 && stop == false) {\n\t\t\tCard cardWorker = pickOnThePioche(this.worker);\n\t\t\tif (cardWorker.getName().equals(\"Stop\")) {\n\t\t\t\tthis.deckWorker.add(cardWorker);\n\t\t\t\tstop = true;\n\t\t\t} else {\n\t\t\t\tthis.deckWorker.add(cardWorker);\n\t\t\t\tthis.worker.remove(cardWorker);\n\t\t\t}\n\t\t}\n\t}",
"public static void killAllEvaluations() {\n \tif (currentJobGroup+1 == Integer.MAX_VALUE)\n \t\tcurrentJobGroup = 0;\n \telse\n \t\tcurrentJobGroup++;\n\t\t\n \tSparkFactory.stop();\t\t\n }",
"protected void takeDown(){\n\n\t}",
"protected void takeDown(){\n\n\t}",
"void spawnZombies() throws InterruptedException {\r\n\t\tint current = zombies.size();\r\n\t\tint level = killed / 5 + 1;\r\n\t\tif (level-current > 0) planted = 0;\r\n\t\tfor (int i = 0; i < level - current; i++) {\r\n\t\t\tZombie nieuwe = new Zombie(level*3);\r\n\t\t\tnieuwe.start();\r\n\t\t\tzombies.add(nieuwe);\r\n\t\t}\r\n\t}",
"private void killOverdueProcesses() {\r\n \t\tlong testTime = System.currentTimeMillis();\r\n \r\n \t\t// Kill off old ones\r\n\t\tMaximaProcess mp = pool.poll();\r\n \t\twhile (mp != null && mp.isOverdue(testTime)) {\r\n \t\t\tmp.kill();\r\n\t\t\tmp = pool.poll();\r\n \t\t}\r\n \t\tif (mp != null) {\r\n \t\t\tpool.addFirst(mp);\r\n \t\t}\r\n \r\n\t\twhile (!usedPool.isEmpty() && usedPool.get(0).isOverdue(testTime)) {\r\n \t\t\tusedPool.remove(0).close();\r\n \t\t}\r\n \t}",
"public static void zoomOut(){\n for(int i=0; i<6; i++){\n driver.findElement(By.tagName(\"html\")).sendKeys(Keys.chord(Keys.CONTROL, Keys.SUBTRACT));\n }\n }",
"public void crunch(){\n cpuBurstTime--;\n rem--;\n }",
"public void pruneEnvironments(final int numToPrune) {\n final SQLiteDatabase db = this.helper.getWritableDatabase();\n db.beginTransaction();\n try {\n db.delete(\"environments\",\n \"id in (SELECT env \" +\n \" FROM events \" +\n \" GROUP BY env \" +\n \" ORDER BY MAX(date), env \" +\n \" LIMIT \" + numToPrune + \")\",\n null);\n db.setTransactionSuccessful();\n } finally {\n db.endTransaction();\n }\n }",
"public void timeToRunDec()\n\t{\n\t\tthis.time_to_run -- ;\n\t}",
"public void InitializeMaxNumInstances(int num) {\n }",
"private void emergencyScaleDown(final int instances) throws ScalerException\n {\n LOG.info(\"Triggering emergency scale down of service {} to 0 due to low system resources.\", serviceRef);\n scaler.scaleDown(serviceRef, instances);\n backoff = true;\n }",
"void instanceKilled(String pid, IKilledResult result);",
"public void kill()\n\t{\n\t\tisKilled = true;\n\t}",
"public void resetRunCount() {\n\n }",
"public void killAndFinish()\n\t{\n\t\tif (isKilled()) return;\n\t\tupdate(Float.MAX_VALUE);\n\t}",
"int getMinInstances();",
"public int getKillCount(){\n return killCount;\n }",
"protected void takeDown() {\n // Deregister from the yellow pages\n try {\n DFService.deregister(this);\n } catch (FIPAException fe) {\n fe.printStackTrace();\n }\n\n // Printout a dismissal message\n System.out.println(\"Dataset-agent \" + getAID().getName() + \" terminating.\");\n }",
"public void doTimeStep() {\r\n\t\twalk(getRandomInt(8));\r\n\t\tif (getEnergy() < 6 * Params.min_reproduce_energy && getEnergy() > Params.min_reproduce_energy) {\r\n\t\t\tCritter1 child = new Critter1();\r\n\t\t\treproduce(child, getRandomInt(8));\r\n\t\t\tnumberSpawned += 1;\r\n\t\t}else if(getEnergy() < Params.min_reproduce_energy) {\r\n\t\t\treturn;\r\n\t\t}else {\r\n\t\t\tCritter1 child1 = new Critter1();\r\n\t\t\treproduce(child1, getRandomInt(8));\r\n\t\t\tCritter1 child2 = new Critter1();\r\n\t\t\treproduce(child2, getRandomInt(8));\r\n\t\t\tnumberSpawned += 2;\r\n\t\t}\t\r\n\t}",
"int stepsToGo();",
"@Override\n\t\t\t\tpublic void run()\n\t\t\t\t{\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tThread.sleep(30000);\n\t\t\t\t\t\tif (buildProcess.isAlive())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tbuildProcess.destroy();\n\t\t\t\t\t\t\tal.add(1);\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t\tcatch (InterruptedException e) \n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}",
"public abstract int getMinInstances();",
"private void setDayCountDown() {\n dayCountDown = getMaxHunger();\n }",
"public void kill();",
"public void kill();",
"@Override\n public void step(double delta) {\n ArrayList<Actor> actorsToReap = new ArrayList<>();\n for (Actor actor : actors) {\n actor.step(delta);\n if (actor.canReap()) {\n actorsToReap.add(actor);\n actor.reapImpl();\n }\n }\n actors.removeAll(actorsToReap);\n }",
"private ScalingAction handleFirstRun(final InstanceInfo instances) throws ScalerException\n {\n final ScalingAction action;\n if (instances.getTotalInstances() < minInstances) {\n action = new ScalingAction(ScalingOperation.SCALE_UP, minInstances - instances.getTotalInstances());\n } else if (instances.getTotalInstances() > maxInstances) {\n action = new ScalingAction(ScalingOperation.SCALE_DOWN, instances.getTotalInstances() - maxInstances);\n } else {\n action = ScalingAction.NO_ACTION;\n }\n return action;\n }",
"@Override\n protected float getDownScaleFactor() {\n return (float) 5.0;\n }",
"public void kill(){\n agent.kill();\n killed=true;\n LinkedList<Object> list = new LinkedList<>();\n queue.add(list);\n }",
"public void setGreatMurderSequence() {\n\t\tfor (int i = 0; i < killers.size(); i++) {\n\t\t\tint sequence = getMurderSequence(killers.get(i).getName());\n\t\t\tkillers.get(i).setMurderSequence(sequence);\n\t\t}\n\t}",
"public static void eggDrop() {\n\t\tint trials = eggDrop(2, 100);\n\t\tSystem.out.println(\"trials for \"+trials);\n\t}",
"public void setKills(int kills) {\n this.kills = kills;\n }",
"public void honourDesiredCount() {\n int totalDeploymentCount = getDeployments().size();\n// log.info(\"[Total count] \" + totalDeploymentCount + \" [Desired Count] \" + desiredCount);\n\n while (totalDeploymentCount < desiredCount) {\n log.info(\"Scaling UP: REASON -> [Total Count] \" + totalDeploymentCount + \" < [Desired Count] \" +\n desiredCount);\n\n scaleUp(\"honourDesiredCount\");\n totalDeploymentCount = getDeployments().size();\n }\n }",
"public void shutDown();",
"@Override\n public void onKill() {\n }",
"public final void shrink( final int decrease )\n {\n final Poolable[] poolables = new Poolable[ m_pool.length - decrease ];\n System.arraycopy( m_pool, 0, poolables, 0, poolables.length );\n m_pool = poolables;\n }",
"static public void terminateCurrentLaunch()\n\t{\n\t\tif (g_currentLaunch != null)\n\t\t{\n\t\t\tILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();\n\t\t\tmanager.removeLaunch(g_currentLaunch);\n\t\t}\n\t}",
"public void addKill() {\n nDeaths++;\n }",
"void removePerformer(int i);",
"public void step()\n\t{\n\t\t// Reservoir sampling by generating ordered list of numbers\n\t\t// randomly pick a number within length and use that as index\n\t\tRandom rand = new Random();\n\t\tArrayList<Integer> numbers = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < listOfCells.size(); i++) { numbers.add(i); }\n\t\t\n\t\t// Randomly sample from reservoir until empty\n\t\twhile(numbers.size() > 0)\n\t\t{\n\t\t\tint picked_index = rand.nextInt(numbers.size());\n\t\t\tint picked_val = numbers.get(picked_index);\n\t\t\t\n\t\t\t//TODO: Maybe call a function on cell of random action that might occur\n\t\t\t//\tConsider only returning object when necessary, (how it is now)\n\t\t\tPlantCell newObject = listOfCells.get(picked_val).doAction();\n\t\t\tif(newObject != null)\n\t\t\t{\n//\t\t\t\tSystem.out.println(\"New cell generated!\");\n\t\t\t\tlistOfCells.add(newObject);\n\t\t\t}\n\t\t\t\n\t\t\t//Kill spawning cell if its health drops <= 0\n\t\t\t//should die right away to make room for other cell\n\t\t\tif(listOfCells.get(picked_val).getHealth() <= 0)\n\t\t\t{\n\t\t\t\tenvironmentPointer.map[listOfCells.get(picked_val).getX()][listOfCells.get(picked_val).getY()] = null;\n\t\t\t\tlistOfCells.set(picked_val, null); //Set to null as to preserve list integrity for reservoir sampling, will be removed later\n\t\t\t}\n\t\t\t\n\t\t\tnumbers.remove(picked_index);\n\t\t}\n\t\t\n\t\t// All recently dead cells are now null in our cell list, so we are removing them from the list now\n\t\tfor(int i = 0; i < listOfCells.size(); i++)\n\t\t{\n\t\t\tif(listOfCells.get(i) == null)\n\t\t\t{\n\t\t\t\tlistOfCells.remove(i);\n\t\t\t\ti--; //Adjust for changing size\n\t\t\t}\n\t\t}\n\t}",
"private ScaleEntityDownAction(){\r\n\t\tscaleFactor = 0.1f;\r\n\t}",
"@Override\n\tpublic void kill() {\n\n\t}",
"private void stopAllMunitions() {\n\t\tfor (EnemyLauncher el : enemyLauncherArr) {\n\t\t\ttry {\n\t\t\t\tif (el.getCurrentMissile() != null) {\n\t\t\t\t\tel.getCurrentMissile().join();\n\t\t\t\t}\n\n\t\t\t\tel.stopRunning();\n\t\t\t\tel.interrupt();\n\t\t\t\tel.join();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\tfor (LauncherDestructor ld : launcherDestractorArr) {\n\t\t\ttry {\n\t\t\t\tif (ld.getCurrentMissile() != null) {\n\t\t\t\t\tld.getCurrentMissile().join();\n\t\t\t\t}\n\n\t\t\t\tld.stopRunning();\n\t\t\t\tld.interrupt();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\tfor (IronDome ironDome : ironDomeArr) {\n\t\t\ttry {\n\t\t\t\tif (ironDome.getCurrentMissile() != null) {\n\t\t\t\t\tironDome.getCurrentMissile().join();\n\t\t\t\t}\n\n\t\t\t\tironDome.stopRunning();\n\t\t\t\tironDome.interrupt();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}",
"void destroy() {\n \t\ttry {\r\n \t\t\tupKeep.stopRunning();\r\n \t\t} catch (InterruptedException e) {\r\n \t\t}\r\n \r\n \t\t// Kill all running processes.\r\n \t\tfor (MaximaProcess mp : pool) {\r\n \t\t\tmp.kill();\r\n \t\t}\r\n \t\tpool.clear();\r\n \r\n \t\t// Kill all used processes.\r\n \t\tfor (MaximaProcess mp : usedPool) {\r\n \t\t\tmp.kill();\r\n \t\t}\r\n \t\tusedPool.clear();\r\n \t}",
"private void knockDown( int count ) {\n for (int i=0; i<count; ++i) {\n int x = 1+r.nextInt(rows);\n int y = 1+r.nextInt(cols);\n if (!downWall( x, y, r.nextInt(4))) --i;\n }\n }",
"void killAllApps();",
"public void removeMissiles(){\n nunMissiles--;\n }",
"public int addKill() {\n\t\treturn ++this.numKills;\n\t}",
"void unsetNumberOfInstallments();",
"@Override\r\n public void execute(VirtualMachine vm) {\n for(int i=0;i<n; i++){\r\n vm.popRunStack();\r\n }\r\n }",
"private void reapDeadRabbits() {\n\t\tfor (int i = (rabbitList.size() - 1); i >= 0; i--) {\n\t\t\tRabbitsGrassSimulationAgent rabbit = rabbitList.get(i);\n\t\t\tif (rabbit.getEnergy() < 1) {\n\t\t\t\trabbitSpace.removeRabbitAt(rabbit.getX(), rabbit.getY());\n\t\t\t\trabbitList.remove(i);\n\t\t\t}\n\t\t}\n\t}",
"public void kill() {\r\n\t\t\tfor(Guerre war : aggresiveWar) {\r\n\t\t\t\twar.finalize();\r\n\t\t\t}\r\n\t\t\tfor(Guerre war : defensiveWar) {\r\n\t\t\t\twar.finalize();\r\n\t\t\t}\r\n\t\t\tfor(Case c : caseOwned) {\r\n\t\t\t\tc.liberate();\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(nom + \" n'a pas su s'adapter aux nombreux dangers environnants, l'Histoire oublie les faibles.\");\r\n\t\t\t\r\n\t\t\tfor(String str : saveStats()) System.out.println(str);\r\n\t\t\t//finalisation de la mort\r\n\t\t\tthis.die();\r\n\t\t\tSystem.out.println(\"Une civilisation c'est éteinte...\");\r\n\t\t\t//finalize(); //bloque la sauvegarde et case les relations avec les autres (du à la recherche de la civ par id dans l'arraylist\r\n\t\t}",
"public void killAll() {\n distributors.forEach(Person::kill);\n distributors = new ArrayList<>();\n }",
"@Override\n public void kill()\n {\n }",
"@Override\n protected void afterKill() {\n if (timeAfterDeath > 0) {\n --timeAfterDeath;\n } else {\n if (finalAnimation > 0) {\n --finalAnimation;\n } else {\n remove();\n }\n }\n }",
"private final void kill() {\n\t\tgrown=false;\t\t\n\t}",
"protected void takeDown() {\n\t\t// Deregister from the yellow pages\n\t\ttry {\n\t\t\tDFService.deregister(this);\n\t\t}\n\t\tcatch (FIPAException fe) {\n\t\t\tfe.printStackTrace();\n\t\t}\n\t\t// Close the GUI\n\t\tmyGui.dispose();\n\t\t// Printout a dismissal message\n\t\tSystem.out.println(\"agent \"+getAID().getName()+\" terminating.\");\n\t}",
"public void decreaseTimescale() {\n\t\ttimeScaler = timeScaler<=1 ? 1 : timeScaler - TIMESCLALER_FACTOR;\n\t}",
"public void kill() {\n // leben abziehen und geister sowie pacman respawnen\n lives--;\n pacman.respawn(level.getRandomPacmanSpawn());\n for (GameEntity entity : entities)\n if (entity instanceof Ghost)\n ((Ghost) entity).respawn(level.getNextGhostSpawn());\n }",
"public int getKillPoints() {\n\n return m_killPoints;\n }",
"private void unscheduleSlice() {\n nextSliceRunTime = Double.MAX_VALUE;\n timer.cancel();\n }",
"@Override\n void planted() {\n super.planted();\n TimerTask Task = new TimerTask() {\n @Override\n public void run() {\n\n for (Drawable drawables : gameState.getDrawables()) {\n if (drawables instanceof Zombie) {\n int distance = (int) Math.sqrt(Math.pow((drawables.x - x), 2) + Math.pow((drawables.y - y), 2));\n if (distance <= explosionradious) {\n ((Zombie) drawables).hurt(Integer.MAX_VALUE);\n }\n }\n }\n\n life = 0;\n }\n\n };\n\n Timer timer = new Timer();\n timer.schedule(Task, 2000);\n }",
"private void decrementGazingCount() {\n // TODO - You fill in here.\n mGazingThreads.decrementAndGet();\n }",
"public void reducePlayerLive() {\n if (live > 1) {\n // make live bottle fall\n StillAtlasActor liveBottleActor = new StillAtlasActor(0, 0, BSGame.atlas1.findRegion(\"live\"));\n liveBottleActor.setPosition(BSGame.gw - liveBottleActor.getWidth() - BSGame.as.pt(10.0f), BSGame.gh - liveBottleActor.getHeight());\n uiStage.addActor(liveBottleActor);\n liveBottleActor.addAction(Actions.sequence(Actions.moveTo(liveBottleActor.getX(), -liveBottleActor.getHeight(), 2.0f), Actions.run(() -> {\n liveBottleActor.remove();\n })));\n BSGame.bottleBreakSound.play(1.0f);\n }\n liveActor.decreaseLive(--live);\n }",
"public void setStepCount(long stepCount){\n steps = stepCount;\n }",
"public void decreaseRemainingPausesCount() {\r\n remainingPausesCount--;\r\n }",
"public void stepPopulation(int day){\r\n\t\tthis.resetComps();\r\n\t\tthis.resetPool();\r\n\t\tfor(int i = 0; i < this.getnVillages(); i++){\r\n\t\t\tVillage curr = this.vVillages[i];\r\n\t\t\tcurr.stepVillage(day);\r\n\t\t\tthis.incrementComps(curr.getComps());\r\n\t\t\tthis.updatePool(curr.getMarketPool());\r\n\t\t}\t\t\r\n\t}",
"public void setMaxNumOfStages(int s) {\n maxNumOfStages = s;\n }",
"void shutDown();",
"@Override\r\n\tpublic void decreaseBPM() {\n\t\tthis.controller.decreaseBPM();\r\n\t}",
"protected void releaseOldPlayers() {\n\t\tfor (HashMap.Entry<String, DroneSamplerLoop> entry : droneLoops.entrySet()) {\n\t\t\tDroneSamplerLoop droneLoop = entry.getValue();\n\t\t\tif(droneLoop.active() && P.p.millis() - droneLoop.startTime() > loopInterval/2) {\n\t\t\t\tdroneLoop.release();\n\t\t\t}\n\t\t}\n\t}",
"private void reapDeadRabbits() {\n for (int i = (rabbitList.size() - 1); i >= 0; i--) {\n RabbitsGrassSimulationAgent rabbit = rabbitList.get(i);\n if (rabbit.getEnergy() <= 0) {\n space.removeRabbitAt(rabbit.getX(), rabbit.getY());\n rabbitList.remove(i);\n }\n }\n }",
"public void shutDown() {\n System.out.println(\"Shutting down the zoo for the day...\\n\");\n for (int i = 0; i < zoo.length; i++){\n zoo[i].sleep();\n }\n System.out.println();\n System.out.println(\"That's all, thanks for coming!\");\n }",
"public void step() {\r\n\t\tif (location == Location.SAFARI) {\r\n\t\t\tstepCount--;\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void terminateInstances(ITerminateInstancesRequest req) {\n\t\t\n\t}",
"public void freeForks() {\r\n\t\t\t// send message to free forks\r\n\t\t\tString msg = \"right-fork\";\r\n\t\t\tif (forks[0] && forks[1]) {\r\n\t\t\t\tmsg = \"both-forks\";\r\n\t\t\t\tforks[0] = false;\r\n\t\t\t\tforks[1] = false;\r\n\t\t\t}\r\n\t\t\telse if (forks[0]) {\r\n\t\t\t\tmsg = \"left-fork\";\r\n\t\t\t\tforks[0] = false;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tmsg = \"right-fork\";\r\n\t\t\t\tforks[1] = false;\r\n\t\t\t}\r\n\t\t\tACLMessage request = new ACLMessage(ACLMessage.CANCEL);\r\n\t\t\trequest.addReceiver(waiter);\r\n\t\t\trequest.setContent(msg);\r\n\t\t\trequest.setConversationId(\"philosopher-waiter-fork\");\r\n\t\t\trequest.setReplyWith(\"cancel\"+System.currentTimeMillis());\r\n\t\t\tmyAgent.send(request);\r\n\t\t}",
"public abstract int getPreviousTerminationCount(SniperCrawler.InstanceGroup group, Date after);",
"@Override\n\tpublic void destroy()\n\t{\n\t\tprojectileCount--;\n\t\trbCount--;\n\t}",
"public void killedByPlayer() {\r\n\t\tscreen.enemiesKilled++;\r\n\t\tMazeCrawler mc = screen.mazeHandler.mazeCrawler;\r\n\t\tint n = 2; //if enemy is large do movement n+1 times\r\n\t\tswitch (enemyType) {\r\n\t\tcase DOWN:\r\n\t\t\tmc.moveDown();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveDown();}\r\n\t\t\tbreak;\r\n\t\tcase LEFT:\r\n\t\t\tmc.moveLeft();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveLeft();}\r\n\t\t\tbreak;\r\n\t\tcase RIGHT:\r\n\t\t\tmc.moveRight();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveRight();}\r\n\t\t\tbreak;\r\n\t\tcase UP:\r\n\t\t\tmc.moveUp();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveUp();}\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tscreen.enemyDeath.play(.5f);\r\n\t\tdestroy();\r\n\t}",
"public synchronized void Kill() {\n\t dieDieDie = true;\n\t}",
"public synchronized void Kill() {\n\t dieDieDie = true;\n\t}",
"public void Kill();",
"public void decreaseLife() {\n this.terminate();\n }",
"public void kill()\r\n {\n if(isTouching(TopDownPlayer.class))\r\n {\r\n health(1);\r\n\r\n getWorld().removeObject(player);\r\n //getWorld().addObject (new Test(), 20, 20);\r\n\r\n }\r\n // if(healthCount >= 1)\r\n // {\r\n // World world;\r\n // world = getWorld();\r\n // getWorld().removeObject(player);\r\n // \r\n // getWorld().addObject (new Test(), 20, 20);\r\n // }\r\n }",
"public void abortOptimizedBurstShot() {\n this.mCameraDevice.abortBurstShot();\n if (1 != this.mAppController.getSupportedHardwarelevel(this.mCameraId)) {\n lightlyRestartPreview();\n }\n }",
"public final void kill() {\n doKill();\n }",
"public void removeCount() {\n \t\tdupCount--;\n \t}"
] | [
"0.6035748",
"0.54296553",
"0.537616",
"0.5186831",
"0.5170897",
"0.51260656",
"0.5115956",
"0.50722486",
"0.5063906",
"0.48963088",
"0.48605686",
"0.48556328",
"0.4855353",
"0.484379",
"0.484236",
"0.484236",
"0.47895733",
"0.47707608",
"0.4759112",
"0.47463006",
"0.47293428",
"0.4717678",
"0.47068322",
"0.4700928",
"0.46627086",
"0.4659381",
"0.46483478",
"0.46410668",
"0.4622263",
"0.46112916",
"0.45714483",
"0.4568051",
"0.45660257",
"0.45604992",
"0.45462066",
"0.45382008",
"0.45240995",
"0.45240995",
"0.45186788",
"0.4514977",
"0.45116085",
"0.45113987",
"0.45100853",
"0.45083204",
"0.44976792",
"0.44948888",
"0.44932485",
"0.44859055",
"0.44843408",
"0.44836062",
"0.44834375",
"0.448195",
"0.44788525",
"0.44757205",
"0.44754714",
"0.44725144",
"0.4467532",
"0.4464587",
"0.44622248",
"0.44485593",
"0.44425443",
"0.4441877",
"0.44406494",
"0.44398975",
"0.44335708",
"0.44263384",
"0.44256514",
"0.44253802",
"0.4419693",
"0.44047686",
"0.4402684",
"0.44006622",
"0.43982923",
"0.43962902",
"0.4390089",
"0.4388195",
"0.43820873",
"0.43791777",
"0.43752337",
"0.4373111",
"0.43701148",
"0.43608728",
"0.43576658",
"0.43567035",
"0.4355755",
"0.4353907",
"0.43442935",
"0.43420944",
"0.43379644",
"0.4332105",
"0.43302962",
"0.43172517",
"0.43172264",
"0.43172264",
"0.43168584",
"0.43138754",
"0.4311455",
"0.43094933",
"0.43087715",
"0.4301141"
] | 0.7655813 | 0 |
Scale up by stepUp number of launchers | public void scaleUp(String reason) {
log.info("Scaling up by [Step Up] " + stepUp + " instances...");
// Where to start naming things
int newNameSuffix = getLatestDeploymentNameSuffix() + 1;
// scale up by (1 x stepUp) at a time
for (int i = 0; i < stepUp; i++) {
int deploymentNameSuffix = newNameSuffix + i;
String deploymentName = Constants.BPG_APP_TYPE_LAUNCHER + "-" + deploymentNameSuffix;
if (createLauncher(deploymentNameSuffix, reason)) {
// Register the newly spawned launcher as a free one
addFreeLauncher(deploymentName);
} else {
log.error("Launcher creation failed for [Object Name] " + deploymentName);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void scaleDown() {\n log.info(\"Scaling down by [Step Down] \" + stepDown + \" instances...\");\n\n // Scale down by (1 x stepDown) at a time\n for (int i = 0; i < stepDown; i++) {\n // Get free launchers\n List<String> urlsToScaleDown = getFreeLaunchers();\n\n log.info(\"URLs to scale down: \" + urlsToScaleDown.toString());\n\n // Sort by launcher url. This will sort the oldest first, making it possible to take the youngest out of the\n // tail\n urlsToScaleDown.sort((o1, o2) -> {\n int mySuffix = Integer.parseInt(o1.split(\"\\\\.\")[0].substring(\n (Constants.LAUNCHER_URL_PREFIX + \"-\").length()));\n\n int theirSuffix = Integer.parseInt(o2.split(\"\\\\.\")[0].substring(\n (Constants.LAUNCHER_URL_PREFIX + \"-\").length()));\n\n return Integer.compare(mySuffix, theirSuffix);\n });\n\n // Get the youngest free launcher URL\n String launcherUrlToDelete = urlsToScaleDown.get(urlsToScaleDown.size() - 1);\n\n log.info(\"Cutting down [Launcher URL] \" + launcherUrlToDelete + \"...\");\n\n // Get object name from launcher URL\n String deploymentName = getObjectNameFromLauncherUrl(launcherUrlToDelete);\n\n // Delete deployment and service\n if (!deleteLauncher(deploymentName)) {\n log.error(\"Launcher deletion failed [Object Name] \" + deploymentName);\n }\n }\n }",
"private void scaleUp(final InstanceInfo instances, final int amount)\n throws ScalerException\n {\n int upTarget = Math.min(maxInstances - instances.getTotalInstances(), Math.max(0, amount));\n if (instances.getInstancesStaging() == 0 && upTarget > 0) {\n LOG.debug(\"Triggering scale up of service {} by amount {}\", serviceRef, amount);\n scaler.scaleUp(serviceRef, upTarget);\n backoff = true;\n }\n }",
"public void increaseTimescale() {\n\t\ttimeScaler = timeScaler>=5 ? 5 : timeScaler + TIMESCLALER_FACTOR;\n\t}",
"public void honourDesiredCount() {\n int totalDeploymentCount = getDeployments().size();\n// log.info(\"[Total count] \" + totalDeploymentCount + \" [Desired Count] \" + desiredCount);\n\n while (totalDeploymentCount < desiredCount) {\n log.info(\"Scaling UP: REASON -> [Total Count] \" + totalDeploymentCount + \" < [Desired Count] \" +\n desiredCount);\n\n scaleUp(\"honourDesiredCount\");\n totalDeploymentCount = getDeployments().size();\n }\n }",
"public void honourMaxCount() {\n // Get free and total counts\n int freeCount = getFreeLaunchers().size();\n int totalCount = getTotalLaunchers().size();\n\n // Scale down if max is exceeded, irrespective of free buffer count\n if (totalCount > maxCount) {\n log.info(\"Scaling down until [freeBufferCount] \" + freeBufferCount + \" is met since [Max Count] \"\n + maxCount + \" has been exceeded.\");\n\n while (freeCount <= freeBufferCount){\n log.info(\"Scaling DOWN: REASON -> [Total Count] \" + totalCount + \" > [Max Count] \" + maxCount);\n scaleDown();\n freeCount = getFreeLaunchers().size();\n }\n\n totalCount = getTotalLaunchers().size();\n freeCount = getFreeLaunchers().size();\n\n log.info(\"Stats after scale down operation: [Total Count] \" + totalCount + \", [Free Count] \" + freeCount);\n\n return;\n }\n\n // Don't scale down if there are not enough free launchers\n if (freeCount <= freeBufferCount) {\n log.info(\"Not scaling down since [Free Count] \" + freeCount + \" <= [Free Buffer Size] \" +\n freeBufferCount + \"...\");\n return;\n }\n\n // Don't scale down if the desired count is not exceeded\n if (totalCount <= desiredCount) {\n log.info(\"Not scaling down since [Total Count] \" + totalCount + \" <= [Desired Count] \" +\n desiredCount + \"...\");\n return;\n }\n\n // Scale down if desired count is exceeded, but with more free launchers than buffer count by stepDown count\n // TODO: to test scale down\n if ((freeCount - stepDown) >= freeBufferCount) {\n log.info(\"Scaling DOWN: REASON -> [Total Count] \" + totalCount + \" > [Desired Count] \" + desiredCount +\n \" AND [Free Count] - [Step Down] \" + freeCount + \" - \" + stepDown +\n \" >= [Free Buffer Count] \" + freeBufferCount);\n\n scaleDown();\n return;\n }\n\n // If after scaling down there wouldn't be enough free launchers, don't scale down\n log.info(\"Not scaling down since [Free Count] + [Step Down] \" + freeCount + \" + \" + stepDown +\n \" < [Free Buffer Count] \" + freeBufferCount);\n }",
"@Test\n public void testScaleUpEphemeral() throws Exception {\n Atomix atomix1 = startAtomix(1, Arrays.asList(2), Profile.dataGrid()).get(30, TimeUnit.SECONDS);\n Atomix atomix2 = startAtomix(2, Arrays.asList(1), Profile.dataGrid()).get(30, TimeUnit.SECONDS);\n Atomix atomix3 = startAtomix(3, Arrays.asList(1), Profile.dataGrid()).get(30, TimeUnit.SECONDS);\n }",
"private ScalingAction handleFirstRun(final InstanceInfo instances) throws ScalerException\n {\n final ScalingAction action;\n if (instances.getTotalInstances() < minInstances) {\n action = new ScalingAction(ScalingOperation.SCALE_UP, minInstances - instances.getTotalInstances());\n } else if (instances.getTotalInstances() > maxInstances) {\n action = new ScalingAction(ScalingOperation.SCALE_DOWN, instances.getTotalInstances() - maxInstances);\n } else {\n action = ScalingAction.NO_ACTION;\n }\n return action;\n }",
"public void setStepCount(long stepCount){\n steps = stepCount;\n }",
"public void resetStepCount() {\r\n\t\tstepCount = 500;\r\n\t}",
"double getStepSize();",
"public void InitializeMaxNumInstances(int num) {\n }",
"@Override\n protected float getDownScaleFactor() {\n return (float) 5.0;\n }",
"public void setStepCount(long stepCount){\r\n\t\tsteps = stepCount;\r\n\t}",
"public void setRuns(int runs);",
"public void rescale()\r\n\t{\n\t}",
"protected abstract void stepImpl( long stepMicros );",
"private static void incrementLaunchOrder()\r\n\t{\r\n\t\tlaunchOrder++;\r\n\t}",
"public static void main(String[]args){\n int machineSize = Integer.parseInt(args[0]);\n int pageSize = Integer.parseInt(args[1]);\n int processSize = Integer.parseInt(args[2]);\n int jobType = Integer.parseInt(args[3]);\n int numReferencesPerProcess = Integer.parseInt(args[4]);\n String replacementType = args[5];\n\n int totalNumPages = (int) Math.ceil((double)machineSize/pageSize);\n\n demandPaging demandPagingTest = new demandPaging(machineSize, pageSize, processSize, numReferencesPerProcess, jobType, totalNumPages, replacementType);\n demandPagingTest.doSimulation();\n\n\n\n }",
"int stepsToGo();",
"public void incrNormalRunners() {\n this.runnerStats.incrNormalRunners();\n }",
"public int stepSix(int step)\n\t{\n\t\tint minval = 10000;\n\t minval=findMin(minval);\n\t for (int r = 0; r < n; r++)\n\t {\n\t for (int c = 0; c < n; c++)\n\t {\n\t if (rowLabelMultiple[r] == 1)\n\t cost[r][ c] += minval;\n\t if (columnLabelMultiple[c] == 0)\n\t cost[r][ c] -= minval;\n\t }\n\t }\n\t step=4;\n\t \n\t return step;\n\t}",
"public void crunch(){\n cpuBurstTime--;\n rem--;\n }",
"public void rescale() throws Exception {\n subtaskHarness.initializeState(stateForSubtask);\n }",
"private void startStageFive() {\n\t\tCollections.addAll(this.starterDigits, 31, 34, 23, 18, 25, 16, 1, 40,\n\t\t\t\t64, 41, 62, 43, 60, 49, 54, 51);\n\t\tCollections.addAll(this.starterButtons, button03, button04, button12,\n\t\t\t\tbutton15, button21, button26, button30, button37, button40,\n\t\t\t\tbutton47, button51, button56, button62, button65, button73,\n\t\t\t\tbutton74);\n\t\tthis.initializeStarterButtons();\n\t}",
"void setSpikesPerChunk(VariableAmount count);",
"void setMaxScale(int value);",
"@Override\n public AutoScalingData provision()\n {\n final String project = envConfig.getProjectId();\n final String zone = envConfig.getZoneName();\n final int numInstances = envConfig.getNumInstances();\n final String managedInstanceGroupName = envConfig.getManagedInstanceGroupName();\n\n try {\n List<String> before = getRunningInstances();\n log.debug(\"Existing instances [%s]\", String.join(\",\", before));\n\n int toSize = Math.min(before.size() + numInstances, getMaxNumWorkers());\n if (before.size() >= toSize) {\n // nothing to scale\n return new AutoScalingData(new ArrayList<>());\n }\n log.info(\"Asked to provision instances, will resize to %d\", toSize);\n\n Compute computeService = createComputeService();\n Compute.InstanceGroupManagers.Resize request =\n computeService.instanceGroupManagers().resize(project, zone,\n managedInstanceGroupName, toSize);\n\n Operation response = request.execute();\n Operation.Error err = waitForOperationEnd(computeService, response);\n if (err == null || err.isEmpty()) {\n List<String> after = null;\n // as the waitForOperationEnd only waits for the operation to be scheduled\n // this loop waits until the requested machines actually go up (or up to a\n // certain amount of retries in checking)\n for (int i = 0; i < RUNNING_INSTANCES_MAX_RETRIES; i++) {\n after = getRunningInstances();\n if (after.size() == toSize) {\n break;\n }\n log.info(\"Machines not up yet, waiting\");\n Thread.sleep(POLL_INTERVAL_MS);\n }\n after.removeAll(before); // these should be the new ones\n log.info(\"Added instances [%s]\", String.join(\",\", after));\n return new AutoScalingData(after);\n } else {\n log.error(\"Unable to provision instances: %s\", err.toPrettyString());\n }\n }\n catch (Exception e) {\n log.error(e, \"Unable to provision any gce instances.\");\n }\n\n return new AutoScalingData(new ArrayList<>());\n }",
"public void increaseSize(int delta){\n\t\tif(scale < scaleMax)\n\t\t\tscale += enlarge * delta;\n\t}",
"@Test\n\tpublic void testStep() {\n\t\tsimulator.step();\n\t\tassertEquals(0, (int)simulator.averageWaitTime());\n\t\tassertEquals(0, (int)simulator.averageProcessTime());\n\t\tassertEquals(false, simulator.packageLeftSimulation());\n\t\tassertEquals(0, simulator.getCurrentIndex());\n\t\tassertEquals(true, simulator.moreSteps());\n\n\t\tfor (int i = 0; i < 28; i++) {\n\t\t\tsimulator.step();\n\t\t}\n\t\tassertEquals(287, (int)(simulator.averageWaitTime() * 100));\n\t\tassertEquals(1525, (int)(100 * simulator.averageProcessTime()));\n\t\tassertEquals(false, simulator.packageLeftSimulation());\n\t\tassertEquals(0, simulator.getCurrentIndex());\n\t\tassertEquals(true, simulator.moreSteps());\n\t\t\n\t\tfor (int i = 0; i < 15; i++) {\n\t\t\tsimulator.step();\n\t\t}\n\t\tassertEquals(614, (int)(simulator.averageWaitTime() * 100));\n\t\tassertEquals(1457, (int)(100 * simulator.averageProcessTime()));\n\t\tassertEquals(true, simulator.packageLeftSimulation());\n\t\tassertEquals(0, simulator.getCurrentIndex());\n\t\tassertEquals(true, simulator.moreSteps());\n\t\tfor (int i = 0; i < 16; i++) {\n\t\t\tsimulator.step();\n\t\t}\n\t\tassertEquals(false, simulator.moreSteps());\t\n\t}",
"@Override\n public void step(double delta) {\n ArrayList<Actor> actorsToReap = new ArrayList<>();\n for (Actor actor : actors) {\n actor.step(delta);\n if (actor.canReap()) {\n actorsToReap.add(actor);\n actor.reapImpl();\n }\n }\n actors.removeAll(actorsToReap);\n }",
"public void decreaseTimescale() {\n\t\ttimeScaler = timeScaler<=1 ? 1 : timeScaler - TIMESCLALER_FACTOR;\n\t}",
"boolean setMultiRun(int runs);",
"private void incWaiters()\r\n/* 443: */ {\r\n/* 444:530 */ if (this.waiters == 32767) {\r\n/* 445:531 */ throw new IllegalStateException(\"too many waiters: \" + this);\r\n/* 446: */ }\r\n/* 447:533 */ this.waiters = ((short)(this.waiters + 1));\r\n/* 448: */ }",
"public double getStepSizeForSlider() {\n\t\treturn 1;\r\n\t}",
"StepTracker(int minimum) {\n STEPS = minimum;\n day=0;\n activeDay=0;\n totalSteps=0;\n }",
"public static void main(String args[]) {\n double zoomLevel = 3;\n int iternumber = 100;\n for (int i = 0; i < 10; i++) {\n String fileName = \"Test\"+i+\".ppm\";\n Fractal.makeImage(-1.45,0,1000,zoomLevel,fileName,iternumber);\n zoomLevel = zoomLevel/10;\n iternumber += 100;\n }\n }",
"@Test\n\tpublic void stepSizeWorks() {\n\t\tfinal FloatTimeSeries t0 = new FloatTreeTimeSeries();\n\t\tt0.addValues(TimeSeriesUtils.createStepFunction(10, 0, 10, 0, 10)); // linear function y = t\n\t\tt0.setInterpolationMode(InterpolationMode.LINEAR);\n\t\tfinal FloatTimeSeries t1 = new FloatTreeTimeSeries();\n\t\tt1.addValues(TimeSeriesUtils.createStepFunction(10, 0, 10, 5, 20)); // linear function y = 2 * t + 5\n\t\tt1.setInterpolationMode(InterpolationMode.LINEAR);\n\t\tfinal MultiTimeSeriesIterator multiIt = MultiTimeSeriesIteratorBuilder.newBuilder(Arrays.asList(t0.iterator(),t1.iterator()))\n\t\t\t\t.setStepSize(-5, 10)\n\t\t\t\t.setGlobalInterpolationMode(InterpolationMode.LINEAR)\n\t\t\t\t.build();\n\t\tAssert.assertTrue(\"Multi iterator not correctly initialized\", multiIt.hasNext());\n\t\tfor (int i=0;i<t0.size()-1;i++) {\n\t\t\tAssert.assertTrue(\"Iterator lacks points\", multiIt.hasNext());\n\t\t\tSampledValueDataPoint point = multiIt.next();\n\t\t\tfinal long t = point.getTimestamp();\n\t\t\tSampledValue first = point.getElement(0, InterpolationMode.LINEAR);\n\t\t\tSampledValue second = point.getElement(1, InterpolationMode.LINEAR);\n\t\t\tAssert.assertEquals(\"Unexpected time stamp in step size iterator\", 5+10*i, t);\n\t\t\tAssert.assertEquals(\"Step size iterator: unexpected value\",5 + 10*i, first.getValue().getFloatValue(), 0.01F);\n\t\t\tAssert.assertEquals(\"Step size iterator: unexpected value\",15 + 20*i, second.getValue().getFloatValue(), 0.01F);\n\t\t\tif (i > 0) {\n\t\t\t\tfirst = point.previous(0);\n\t\t\t\tsecond = point.previous(1);\n\t\t\t\tAssert.assertEquals(\"Iterator's previous failed: unexpected time stamp\", 10*i, first.getTimestamp());\n\t\t\t\tAssert.assertEquals(\"Step size iterator: unexpected previous value\", 10*i, first.getValue().getFloatValue(), 0.01F);\n\t\t\t\tAssert.assertEquals(\"Step size iterator: unexpected previous value\", 5 + 20*i, second.getValue().getFloatValue(), 0.01F);\n\t\t\t}\n\t\t\tif (i < t0.size()-2) {\n\t\t\t\tfirst = point.next(0);\n\t\t\t\tsecond = point.next(1);\n\t\t\t\tAssert.assertEquals(\"Iterator's next failed: unexpected time stamp\", 10*(i+1), first.getTimestamp());\n\t\t\t\tAssert.assertEquals(\"Step size iterator: unexpected previous value\", 10*(i+1), first.getValue().getFloatValue(), 0.01F);\n\t\t\t\tAssert.assertEquals(\"Step size iterator: unexpected previous value\", 25 + 20*i, second.getValue().getFloatValue(), 0.01F);\n\t\t\t}\n\t\t}\n\t}",
"public void warmup() {\n long millis;\n TestCaseImpl tc = _testCase;\n \n // Get number of threads to adjust iterations\n int nOfThreads = tc.getIntParam(Constants.NUMBER_OF_THREADS);\n \n int warmupIterations = 0;\n String warmupTime = tc.getParam(Constants.WARMUP_TIME);\n if (warmupTime != null) {\n // Calculate end time\n long startTime = millis = Util.currentTimeMillis();\n long endTime = startTime + Util.parseDuration(warmupTime);\n \n while (endTime > millis) {\n warmup(tc); // Call warmup\n warmupIterations++;\n millis = Util.currentTimeMillis();\n } \n }\n else {\n // Adjust warmup iterations based on number of threads\n warmupIterations = tc.getIntParam(Constants.WARMUP_ITERATIONS) / nOfThreads;\n \n for (int i = 0; i < warmupIterations; i++) {\n warmup(tc); // Call warmup\n }\n }\n \n // Accumulate actual number of iterations\n synchronized (tc) {\n int actualWarmupIterations = \n tc.hasParam(Constants.ACTUAL_WARMUP_ITERATIONS) ? \n tc.getIntParam(Constants.ACTUAL_WARMUP_ITERATIONS) : 0;\n tc.setIntParam(Constants.ACTUAL_WARMUP_ITERATIONS, \n actualWarmupIterations + warmupIterations);\n }\n }",
"void setStepCounterTileXY();",
"public final void setStepSize( long micros )\n {\n if ( ( micros < 1L ) && ( micros != -1L ) )\n throw new IllegalArgumentException( \"micros must be -1 or greater then 0\" );\n \n this.stepMicros = micros;\n }",
"public void makeSimulationStep() {\n for (ElevatorController controller : elevatorControllers.values()) {\n controller.makeOneStep();\n }\n }",
"public static void main(String[] args){\n\t\tint increment=1;\n\t\tfor(int m=0;m<=5000;m+=increment){\n\t\t\tif(m==10)\n\t\t\t\tincrement=5;\n\t\t\tif(m==100)\n\t\t\t\tincrement=100;\n\t\t\tif(m==500)\n\t\t\t\tincrement=500;\n\n\t\t\tfor(int l=0;l<30;++l){\n\t\t\t\tdouble[][][] AFFINITY3=new double[Task.TYPES_OF_TASK_NUMBER][Task.TYPES_OF_TASK_NUMBER][Task.TYPES_OF_TASK_NUMBER];\n\t\t\t\tRandom r=new Random(l);\n\t\t\t\tdouble affinity;\n\t\t\t\tfor(int i=0;i<Task.TYPES_OF_TASK_NUMBER;++i){\n\t\t\t\t\tfor(int j=0;j<Task.TYPES_OF_TASK_NUMBER;++j){\n\t\t\t\t\t\tfor(int k=0;k<Task.TYPES_OF_TASK_NUMBER;++k){\n\t\t\t\t\t\t\tdo{\n\t\t\t\t\t\t\t\taffinity=r.nextDouble();\n\t\t\t\t\t\t\t}while(affinity==0);\n\t\t\t\t\t\t\tAFFINITY3[i][j][k]=AFFINITY3[i][k][j]=AFFINITY3[k][i][j]=AFFINITY3[j][i][k]=AFFINITY3[k][j][i]=AFFINITY3[j][k][i]=affinity;\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tList<Node> infrastructure=new ArrayList<>();\n\t\t\t\tfor(int i=0; i<TEST_NUMBER_OF_NODES;++i)\n\t\t\t\t\tinfrastructure.add(new Node(TEST_NUMBER_OF_CORES, TEST_RAM_SIZE));\n\t\t\t\tList<Task> tasks=new ArrayList<>();\n\t\t\t\tTaskType[] types=TaskType.values();\n\t\t\t\tfor(int i=0;i<TEST_NUMBER_OF_PROCESS;++i){\n\t\t\t\t\tTaskType type=types[r.nextInt(Task.TYPES_OF_TASK_NUMBER)];\n\t\t\t\t\tint instanceNumber=r.nextInt(101)+10;//from 10 to 100 instances\n\t\t\t\t\tint coresPerInstance=r.nextInt(12)+1;//from 1 to 12\n\t\t\t\t\tint ramPerinstance=r.nextInt(12*1024+101)+100;//from 100MB to 12GB\n\t\t\t\t\tdouble baseTime=r.nextInt(10001)+1000;//from 100 cycles to 1000\n\t\t\t\t\ttasks.add(new Task(type,instanceNumber,coresPerInstance,ramPerinstance,baseTime));\n\t\t\t\t}\n\t\t\t\tList<Integer> arrivalOrder=new ArrayList<>();\n\t\t\t\tint tasksSoFar=0;\n\t\t\t\tdo{\n\t\t\t\t\ttasksSoFar+=r.nextInt(11);\n\t\t\t\t\tarrivalOrder.add((tasksSoFar<tasks.size())?tasksSoFar:tasks.size());\n\t\t\t\t}while(tasksSoFar<tasks.size());\n\t\t\t\tfinal Scheduler scheduler=new AffinityAwareFifoScheduler(tasks, arrivalOrder, infrastructure,AFFINITY3,AffinityType.NORMAL,m);\n\t\t\t\tThread t=new Thread(new Runnable() {\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tscheduler.runScheduler();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tt.start();\n\t\t\t\ttry {\n\t\t\t\t\tt.join();\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Finished running.\");\n\t\t\t}\n\t\t}\n\t}",
"private void startStageSix() {\n\t\tCollections.addAll(this.starterDigits, 23, 20, 7, 6, 22, 1, 43, 64, 42,\n\t\t\t\t41, 54, 55);\n\t\tCollections.addAll(this.starterButtons, button11, button12, button15,\n\t\t\t\tbutton16, button21, button26, button51, button56, button61,\n\t\t\t\tbutton62, button65, button66);\n\t\tthis.initializeStarterButtons();\n\t}",
"public abstract int getMinInstances();",
"private ScaleEntityDownAction(){\r\n\t\tscaleFactor = 0.1f;\r\n\t}",
"public void warmup(TestCase testCase) { \n run(testCase);\n }",
"void initScale(){\n samplingScale = getScaleAdaptive(x);\n }",
"public AAAStepUp()\n {\n display = Display.getDisplay(this);\n stepReciver=new StepReciver(this);\n deamonClient= new DeamonClient(this);\n watch=new Watcher(this);\n watch.notifyWatchertoStart();\n watch.notifyWatchertoStepupDeamon();\n \n\n\n startlist=new List(\"StepUp:\", List.IMPLICIT);\n startlist.append(\"Start\", null);\n startlist.append(\"Progress\", null);\n //$$ startlist.append(\"History\", null);\n \n\n\n\n stepview= new StepsView(this);\n proglistview= new ProgressListView(this);\n historyview=new HistoryView(this);\n profileview=new ProfileView(this);\n newgroupview= new newGroupView(this);\n dailyprogress= new DailyProgress (this);\n weeklyprogress= new WeekProgress(this);\n teamprogress= new TeamProgress(this);\n\n\n\n formRunning = new Form(\"Connecting to StepUp Database\");\n formRunning.append(new Gauge(\"Connecting\",false,Gauge.INDEFINITE,Gauge.CONTINUOUS_RUNNING));\n\ncreateCommands();\naddCommands();\n \n }",
"public void run() {\n\t\t\t\tfor(int i = 0;i<=50;i++){\n\t\t\t\tbussiness.sub(i);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}",
"void setTubeUpDimension(double width, double height);",
"@Override\n public void init(int maxSteps) {\n }",
"private static void speedup(String [] args){\n\t\t\n\t\tint warningCnt = 0;\n\t\t\n\t\tString applicationPath = convertApplication(args[2], null);\n\t\tConfMan baseConfigManager;\n\t\t\n\n\n\n\n\t\tbaseConfigManager = new ConfMan(args[1], applicationPath, false);\n\t\tConfMan[] cms;\n\t\t\n\t\tSweepConfig sweepConfig = new SweepConfig(baseConfigManager, \"config/sweep/cacheSpeedupSweep.json\",true);\n//\t\tSweepConfig sweepConfig = new SweepConfig(baseConfigManager, \"config/sweep/speedupSweep.json\",true);\n\n\t\tcms = sweepConfig.getConfManager();\n\t\tString[] configNames = sweepConfig.getSweepConfigurations();\n//\t\tString[] speedupIdentifier = sweepConfig.getSpeedupIdentifier();\n//\t\tboolean[] isShortTest = sweepConfig.getIsShortTest();\n\n\t\tTrace speedupTrace = new Trace(System.out, System.in, \"\", \"\");\n\t\tspeedupTrace.setPrefix(\"basic config\");\n\t\tbaseConfigManager.printConfig(speedupTrace);\n\n\t\tspeedupTrace.setPrefix(\"speedup\");\n\t\t\n//\t\tLinkedHashMap<String, SpeedupMeasurementResult> speedupResults = new LinkedHashMap<>();\n\t\tMeasurementResult[] measurementResults = new MeasurementResult[cms.length];\n\t\tLinkedHashMap<String, BaseLineStorage> baseLineStorage = new LinkedHashMap<String, BaseLineStorage>();\n\t\t\n//\t\tAmidarSimulationResult[] results = parallelRemoteSimulation(sweepConfig, \"trav\", 1099, 8, speedupTrace);\n\t\t\n\t\tdouble overhead = 0;\n\t\tint transmission = 0;\n\t\tint run = 0;\n\t\tdouble overheadCnt = 0;\n\t\t\n\n\t\t////////////////////////// SIMULATE //////////////////////////////////////////////\n\t\tfor(int i = 0; i<cms.length; i++){\n\t\t\t\n\t\t\t/////// FIRST SHORT /////////////////////////////\n\t\t\tConfMan conf = cms[i];\n\t\t\t\n\t\t\tboolean isShort = true;\n\t\t\tString appBaseName = conf.getApplicationPath();\n\t\t\tString [] appBasePath = appBaseName.split(\"/\");\n\t\t\t\n\t\t\t\n\t\t\tconf.setApplication(\"../axt/\" + appBaseName+ \"_short/\" + appBasePath[appBasePath.length-1] + \"_short.axt\");\n\n\t\t\tMeasurementResult speedupRes = measurementResults[i];\n\t\t\tif(speedupRes == null){\n\t\t\t\tspeedupRes = new MeasurementResult();\n\t\t\t\tmeasurementResults[i] = speedupRes;\n\t\t\t}\n\t\t\t\n\t\t\tString app = conf.getApplicationPath();\n\t\t\tint benchmarkScale = conf.getBenchmarkScale();\n\t\t\tapp = app+\"-benchMarkScale-\"+benchmarkScale;\n\t\t\t\n\t\t\tspeedupTrace.printTableHeader(\"Running: \" + configNames[i] + \" SHORT\");\n\t\t\tif(!baseLineStorage.containsKey(app)){\n\t\t\t\tbaseLineStorage.put(app, new BaseLineStorage());\n\t\t\t}\n\t\t\t\n\t\t\tBaseLineStorage baseLine = baseLineStorage.get(app);\n \t\t\t\n\t\t\tif(!baseLine.isBaselineAvailable(isShort)){\n\t\t\t\tspeedupTrace.println(\"Running without synthesis...\");\n\t\t\t\tAmidarSimulationResult currentRes = run(conf, null, false);\n\t\t\t\tspeedupRes.addBaseline(currentRes, isShort);\n\t\t\t\tbaseLine.addBaseLine(isShort, currentRes);\n\t\t\t} else {\n\t\t\t\tspeedupRes.addBaseline(baseLine.getBaseLine(isShort), isShort);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tAmidarSimulationResult currentResult = null;\n\t\t\tconf.setSynthesis(true);\n\t\t\tspeedupTrace.println(\"Running with synthesis...\");\n\t\t\ttry{\n\t\t\t\tcurrentResult = run(conf, null, false);\n\t\t\t} catch(AmidarSimulatorException e ){\n\t\t\t\tspeedupTrace.println(\"WARNING: Aliasing speculation failed. Switching of speculation and repeat...\");\n\t\t\t\twarningCnt++;\n\t\t\t\tconf.getSynthesisConfig().put(\"ALIASING_SPECULATION\", AliasingSpeculation.OFF);\n\t\t\t\tcurrentResult = run(conf, null, false);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n//\t\t\tif(isShort){\n//\t\t\t\tHashMap<String, Integer> stateCNT = currentResult.getCgraStateCount();\n//\t\t\t\tdouble transmissionCnt = stateCNT.get(\"SEND\") + stateCNT.get(\"REC\") +stateCNT.get(\"WAIT\");\n//\t\t\t\tdouble runCnt = stateCNT.get(\"RUN\");\n//\t\t\t\t\n//\t\t\t\tdouble overheadCurrent = transmissionCnt/(transmissionCnt + runCnt);\n//\t\t\t\t\n//\t\t\t\toverhead += overheadCurrent;\n//\t\t\t\ttransmission +=transmissionCnt;\n//\t\t\t\trun += runCnt;\n//\t\t\t\toverheadCnt++;\n//\t\t\t}\n\t\t\t\n\t\t\tspeedupRes.addResults(currentResult, isShort);\n\t\t\t\n\t\t\t/////// THEN LONG /////////////////////////////\n\t\t\t\n\t\t\tisShort = false;\n\t\t\tconf.setApplication(\"../axt/\" + appBaseName+ \"_long/\" + appBasePath[appBasePath.length-1] + \"_long.axt\");\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tspeedupTrace.printTableHeader(\"Running: \" + configNames[i] + \" LONG\");\n\t\t\tif(!baseLine.isBaselineAvailable(isShort)){\n\t\t\t\tconf.setSynthesis(false);\n\t\t\t\tspeedupTrace.println(\"Running without synthesis...\");\n\t\t\t\tAmidarSimulationResult currentRes = run(conf, null, false);\n\t\t\t\tspeedupRes.addBaseline(currentRes, isShort);\n\t\t\t\tbaseLine.addBaseLine(isShort, currentRes);\n\t\t\t} else {\n\t\t\t\tspeedupRes.addBaseline(baseLine.getBaseLine(isShort), isShort);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tconf.setSynthesis(true);\n\t\t\tspeedupTrace.println(\"Running with synthesis...\");\n\t\t\ttry{\n\t\t\t\tcurrentResult = run(conf, null, false);\n\t\t\t} catch(AmidarSimulatorException e ){\n\t\t\t\tspeedupTrace.println(\"WARNING: Aliasing speculation failed. Switching of speculation and repeat...\");\n\t\t\t\twarningCnt++;\n\t\t\t\tconf.getSynthesisConfig().put(\"ALIASING_SPECULATION\", AliasingSpeculation.OFF);\n\t\t\t\tcurrentResult = run(conf, null, false);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n//\t\t\tif(isShort){\n//\t\t\t\tHashMap<String, Integer> stateCNT = currentResult.getCgraStateCount();\n//\t\t\t\tdouble transmissionCnt = stateCNT.get(\"SEND\") + stateCNT.get(\"REC\") +stateCNT.get(\"WAIT\");\n//\t\t\t\tdouble runCnt = stateCNT.get(\"RUN\");\n//\t\t\t\t\n//\t\t\t\tdouble overheadCurrent = transmissionCnt/(transmissionCnt + runCnt);\n//\t\t\t\t\n//\t\t\t\toverhead += overheadCurrent;\n//\t\t\t\ttransmission +=transmissionCnt;\n//\t\t\t\trun += runCnt;\n//\t\t\t\toverheadCnt++;\n//\t\t\t}\n\t\t\t\n\t\t\tspeedupRes.addResults(currentResult, isShort);\n\t\t}\n\t\t////////////////////////SIMULATE END//////////////////////////////////////////////\n\n\t\tspeedupTrace.printTableHeader(\"Speedup\");\n\t\t\n\t\tDecimalFormatSymbols symbols = new DecimalFormatSymbols();\n\t\tsymbols.setGroupingSeparator(',');\n\t\tsymbols.setDecimalSeparator('.');\n\t\tDecimalFormat formater = new DecimalFormat(\"#0.000\", symbols);\n\t\t\n\t\t\n\t\t/// GATHER INFORMATION //////////////////////////////////////////\n\t\t\n\t\tdouble[] speedupList = new double[cms.length];\n\t\tdouble[] communicationOverhead = new double[cms.length];\n\t\tdouble[] dmaOverhead = new double[cms.length];\n\t\tdouble[] l1usage = new double[cms.length];\n\t\tdouble[] l2usage = new double[cms.length];\n\t\tdouble[] averageMemTime = new double[cms.length];\n\t\t\n\t\tdouble[][] blockTimesPrefetch = new double[TaskType.values().length][cms.length];\n\t\tdouble[][] blockTimesRegular = new double[TaskType.values().length][cms.length];\n\t\t\n\t\tint[] nrOfContexts = new int[cms.length];\n\t\tint[] nrOfL1Prefetches = new int[cms.length];\n\t\tint[] nrOfL2Prefetches = new int[cms.length];\n\t\tint[] nrOfUsedL1Prefetches = new int[cms.length];\n\t\tint[] nrOfUsedL2Prefetches = new int[cms.length];\n\t\t\n\t\tint[] nrOfHandledPrefetchRequests = new int[cms.length];\n\t\tint[] nrOfHandledPrefetchRequestsAlreadyAvailable = new int[cms.length];\n\t\t\n\t\tint[] cachelineFills = new int[cms.length];\n\t\tlong[] synthTime = new long[cms.length];\n\t\t\n\t\tfor(int i = 0; i < measurementResults.length; i++){\n\t\t\tString res = \"Speedup of \" + configNames[i] + \"\\t\";\n\t\t\tdouble speedup = measurementResults[i].getSpeedup();\n\t\t\tspeedupList[i] = speedup;\n\t\t\tres = res + \": \" + formater.format(speedup);\n\t\t\tspeedupTrace.println(res);\n\t\t\t\n\t\t\tcommunicationOverhead[i] = measurementResults[i].getCommunicationOverhead();\n\t\t\tdmaOverhead[i] = measurementResults[i].getDMAOverhead();\n\t\t\tl1usage[i]= measurementResults[i].getL1Usage();\n\t\t\tl2usage[i]= measurementResults[i].getL2Usage();\n\t\t\taverageMemTime[i] = measurementResults[i].getAverageMemoryAccessTime();\n\t\t\tfor(TaskType tt: TaskType.values()){\n\t\t\t\tblockTimesPrefetch[tt.ordinal()][i] = measurementResults[i].getBlockTimesInPercent(RequestType.Prefetch, tt);\n//\t\t\t\tSystem.out.println(\"\\tBlocktime Pref\" +tt + \":\\t\" +blockTimesPrefetch[tt.ordinal()][i]);\n\t\t\t\tblockTimesRegular[tt.ordinal()][i] = measurementResults[i].getBlockTimesInPercent(RequestType.Regular, tt);\n//\t\t\t\tSystem.out.println(\"\\tBlocktime Regu\" +tt + \":\\t\" +blockTimesRegular[tt.ordinal()][i]);\n \t\t\t}\n\t\t\tnrOfContexts[i] = measurementResults[i].getNrOfContexts();\n\t\t\tnrOfL1Prefetches[i] = measurementResults[i].getNrOfL1Prefetches();\n\t\t\tnrOfUsedL1Prefetches[i] = measurementResults[i].getNrOfUsedL1Prefetches();\n\t\t\tnrOfHandledPrefetchRequests[i] = measurementResults[i].getNrOfHandledPrefetchRequests();\n\t\t\tnrOfHandledPrefetchRequestsAlreadyAvailable[i] = measurementResults[i].getNrOfHandledPrefetchRequestsAlreadyAvailable();\n\t\t\tcachelineFills[i] = measurementResults[i].getCachelineFills();\n\t\t\tsynthTime[i] = measurementResults[i].getSynthTime();\n\t\t}\n\t\t///// PLOT INFORMATION //////////////////////////////////////////////\n\t\tSweepResultPlotter plotter = new SweepResultPlotter();\n//\t\tplotter.configurePlotter( \"UNROLL\", \"\", true);\n\t\tLinkedHashMap<String, LinkedHashSet<String>> sweepInfo = sweepConfig.getSweepInfo();\n\t\t\n\t\tString path = \"log/sweep\"+new Date().toString();\n\t\tplotter.setPath(path);\n\t\tplotter.saveSweepInfo(sweepInfo);\n\t\t\n\t\tplotter.saveResults(speedupList,\"speedup\");\n\t\tplotter.saveResults(communicationOverhead, \"communicationOverhead\");\n\t\tplotter.saveResults(dmaOverhead, \"dmaOverhead\");\n\t\tplotter.saveResults(l1usage,\"l1usage\");\n\t\tplotter.saveResults(l2usage, \"l2usage\");\n\t\tplotter.saveResults(averageMemTime, \"memTime\");\n\t\tplotter.saveResults(nrOfContexts, \"contexts\");\n\t\tplotter.saveResults(nrOfL1Prefetches, \"l1prefetches\");\n\t\tplotter.saveResults(nrOfUsedL1Prefetches, \"usedL1prefetches\");\n\t\tplotter.saveResults(nrOfHandledPrefetchRequests, \"handledPrefetchRequests\");\n\t\tplotter.saveResults(nrOfHandledPrefetchRequestsAlreadyAvailable, \"handledPrefetchRequestsAvail\");\n\t\tplotter.saveResults(cachelineFills, \"cachelineFills\");\n\t\tplotter.saveResults(synthTime, \"Synthtime\");\n\t\t\n\t\t\n//\t\tfor(TaskType tt: TaskType.values()){\n//\t\t\t\n//\t\t}\n\t\t\n\t\t///// PRINT ON CONSOLE ///////////////////////////////\n\t\tspeedupTrace.printTableHeader(\"Average Speedup\");\n\t\tplotter.plot(sweepInfo, speedupList, speedupTrace,\"log/\", \"\");\n\t\t\n\t\tif(warningCnt > 1){\n\t\t\tspeedupTrace.println(warningCnt + \" Warnings\");\n\t\t} else if(warningCnt == 1){\n\t\t\tspeedupTrace.println(\"1 Warning\");\n\t\t}\n\t\t\n//\t\tspeedupTrace.println(\"CGRA transmission overhead in Percent: \" + formater.format(overhead*100/overheadCnt) + \" Ticks Running: \" + (int)(run/overheadCnt+0.5) + \" Ticks Transmitting: \" + (int)(transmission/overheadCnt+0.5));\n\t\t\n\t\t\n//\t\tspeedupTrace.println(ObjectHistory.indep*100/(ObjectHistory.indep+ObjectHistory.dep)+\"% of all memory accesses are independant\");\n//\n//\t\t\n\t\tspeedupTrace.printTableHeader(\"Average Communication Overhead\");\n\t\tplotter.plot(sweepConfig.getSweepInfo(), communicationOverhead, speedupTrace, null, \"\");\n\t\tspeedupTrace.printTableHeader(\"Average DMA Overhead\");\n\t\tplotter.plot(sweepConfig.getSweepInfo(), dmaOverhead, speedupTrace, null, \"\");\n\t\tspeedupTrace.printTableHeader(\"Memtime\");\n\t\tplotter.plot(sweepConfig.getSweepInfo(), averageMemTime, speedupTrace, null, \"\");\n\t\t\n\t\tdouble[] cffd = new double[cachelineFills.length];\n\t\tfor(int i = 0; i < cffd.length; i++){\n\t\t\tcffd[i] = cachelineFills[i];\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tspeedupTrace.printTableHeader(\"Cacheline fills\");\n\t\tplotter.plot(sweepConfig.getSweepInfo(), cffd, speedupTrace, null, \"\");\n\t\t\n\t\tdouble[] stdd = new double[synthTime.length];\n\t\tfor(int i = 0; i < stdd.length; i++){\n\t\t\tstdd[i] = synthTime[i];\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tspeedupTrace.printTableHeader(\"Synth time\");\n\t\tplotter.plot(sweepConfig.getSweepInfo(), stdd, speedupTrace, null, \"\");\n\t\t\n//\t\t\n//\t\tplotter.plot(sweepConfig.getSweepInfo(), l1usage, speedupTrace, null, \"\");\n//\t\tplotter.plot(sweepConfig.getSweepInfo(), l2usage, speedupTrace, null, \"\");\n//\t\tplotter.plot(sweepConfig.getSweepInfo(), averageMemTime, speedupTrace, null, \"\");\n\t\t\n//\t\tspeedupTrace.printTableHeader(\"CGRA blocked by Prefetch\");\n//\t\tfor(TaskType tt: TaskType.values()){\n//\t\t\tplotter.plot(sweepConfig.getSweepInfo(), blockTimesPrefetch[tt.ordinal()], speedupTrace,null, tt.toString());\n//\t\t}\n//\t\tspeedupTrace.printTableHeader(\"CGRA blocked by Regular Access\");\n//\t\tfor(TaskType tt: TaskType.values()){\n//\t\t\tplotter.plot(sweepConfig.getSweepInfo(), blockTimesRegular[tt.ordinal()], speedupTrace,null, tt.toString());\n//\t\t}\n\t\n\t}",
"public void step() {\n\t\tcellSizes.clear();\n\t\tupsetNeighbors = new ArrayList<Neighbor>();\n\t\tavailableSpaces = new ArrayList<Cell>();\n\t\tfor (int r = 0; r < grid.getRows(); r++) {\n\t\t\tfor (int c = 0; c < grid.getColumns(); c++) {\n\t\t\t\tupdateStatus(r, c);\n\t\t\t}\n\t\t}\n\t\tupdateGrid();\n\t}",
"public void setStep(int step) {\n this.step = step;\n }",
"@Test\n public void testScaleUpPersistent() throws Exception {\n Atomix atomix1 = startAtomix(1, Arrays.asList(1), ConsensusProfile.builder().withMembers(\"1\").withDataPath(new File(AbstractAtomixTest.DATA_DIR, \"scale-up\")).build()).get(30, TimeUnit.SECONDS);\n Atomix atomix2 = startAtomix(2, Arrays.asList(1, 2), Profile.client()).get(30, TimeUnit.SECONDS);\n Atomix atomix3 = startAtomix(3, Arrays.asList(1, 2, 3), Profile.client()).get(30, TimeUnit.SECONDS);\n }",
"public void step() {\r\n\t\tif (location == Location.SAFARI) {\r\n\t\t\tstepCount--;\r\n\t\t}\r\n\t}",
"protected void newSize() {\r\n adjustSize();\r\n halt();\r\n newGame();\r\n }",
"@Override\r\n\tpublic void increaseBPM() {\n\t\tthis.controller.increaseBPM();\r\n\t}",
"private void scaleDown(final InstanceInfo instances, final int amount)\n throws ScalerException\n {\n int downTarget = Math.max(0, Math.min(instances.getTotalInstances() - minInstances, Math.max(0, amount)));\n if (downTarget > 0) {\n LOG.debug(\"Triggering scale down of service {} by amount {}\", serviceRef, downTarget);\n scaler.scaleDown(serviceRef, downTarget);\n backoff = true;\n }\n }",
"public void grow(int cap) {}",
"public void setMaxNumOfStages(int s) {\n maxNumOfStages = s;\n }",
"public int stepFive(int step)\n\t{\n\t\tboolean over;\n\t\tint rows1=-1;\n\t\tint cols1=-1;\n\t\t\n\t\tpathCount=1;\n\t\tpath[pathCount-1][0]=path_row_0;\n\t\tpath[pathCount-1][1]=path_col_0;\n\t\tover=false;\n\t\t\n\t\twhile(!over)\n\t\t{\n\t\t\trows1=getStarInCol(path[pathCount-1][1],rows1);\n\t\t\tif(rows1>-1)\n\t\t\t{\n\t\t\t\tpathCount++;\n\t\t\t\tpath[pathCount-1][0]=rows1;\n\t\t\t\tpath[pathCount-1][1]=path[pathCount-2][1];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tover=true;\n\t\t\t}\n\t\t\tif(!over)\n\t\t\t{\n\t\t\t\tcols1=getPrimeInRow(path[pathCount-1][0],cols1);\n\t\t\t\tpathCount++;\n\t\t\t\tpath[pathCount-1][0]=path[pathCount-2][0];\n\t\t\t\tpath[pathCount-1][1]=cols1;\n\t\t\t}\n\t\t}\n\t\t\n\t\taugmentPath();\n\t\tclearLabels();\n\t\tremovePrimes();\n\t\tstep=3;\n\t\t\n\t\treturn step;\n\t}",
"public static void main(String[] args)\n {\n VoxelLandscapeTestChunkMgmt app = new VoxelLandscapeTestChunkMgmt();\n GraphicsDevice device = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();\n DisplayMode[] modes = device.getDisplayModes();\n\n int i=0; // note: there are usually several, let's pick the first\n AppSettings settings = new AppSettings(true);\n boolean FULL_SCREEN = false;\n float scale_screen = FULL_SCREEN ? 1f : .6f;\n screenDims = new Coord2((int)(modes[i].getWidth() * scale_screen ),(int)(modes[i].getHeight() * scale_screen ));\n settings.setResolution(screenDims.x, screenDims.y);\n\n settings.setFrequency(modes[i].getRefreshRate());\n settings.setBitsPerPixel(modes[i].getBitDepth());\n if (FULL_SCREEN) settings.setFullscreen(device.isFullScreenSupported());\n app.setSettings(settings);\n app.setShowSettings(false);\n\n app.start(); // start the game\n\n }",
"public void resetRunCount() {\n\n }",
"int getMaxInstances();",
"int getMinInstances();",
"RampUpUsers getRampUpUsers();",
"@Test\n\tpublic void stepSizeWorksWithHistory() {\n\t\tfinal FloatTimeSeries t0 = new FloatTreeTimeSeries();\n\t\tt0.addValues(TimeSeriesUtils.createStepFunction(10, 0, 10, 0, 10)); // linear function y = t\n\t\tt0.setInterpolationMode(InterpolationMode.LINEAR);\n\t\tfinal FloatTimeSeries t1 = new FloatTreeTimeSeries();\n\t\tt1.addValues(TimeSeriesUtils.createStepFunction(10, 0, 10, 5, 20)); // linear function y = 2 * t + 5\n\t\tt1.setInterpolationMode(InterpolationMode.LINEAR);\n\t\tfinal MultiTimeSeriesIterator multiIt = MultiTimeSeriesIteratorBuilder.newBuilder(Arrays.asList(t0.iterator(),t1.iterator()))\n\t\t\t\t.setStepSize(-5, 10)\n\t\t\t\t.setGlobalInterpolationMode(InterpolationMode.LINEAR)\n\t\t\t\t.setMaxNrHistoricalValues(1)\n\t\t\t\t.build();\n\t\tAssert.assertTrue(\"Multi iterator not correctly initialized\", multiIt.hasNext());\n\t\tfor (int i=0;i<t0.size()-1;i++) {\n\t\t\tAssert.assertTrue(\"Iterator lacks points\", multiIt.hasNext());\n\t\t\tSampledValueDataPoint point = multiIt.next();\n\t\t\tif (i > 0) {\n\t\t\t\tSampledValueDataPoint previous = point.getPrevious(1);\n\t\t\t\tAssert.assertEquals(\"Iterator's getPrevious failed: unexpected time stamp\", 5+10*(i-1), previous.getTimestamp());\n\t\t\t\tAssert.assertEquals(\"Iterator's getPreviousTimestamp failed: unexpected time stamp\", 5+10*(i-1), point.getPreviousTimestamp());\n\t\t\t\tSampledValue first = previous.getElement(0, InterpolationMode.LINEAR);\n\t\t\t\tSampledValue second = previous.getElement(1, InterpolationMode.LINEAR);\n\t\t\t\tAssert.assertEquals(\"Step size iterator: unexpected previous value\",5 + 10*(i-1), first.getValue().getFloatValue(), 0.01F);\n\t\t\t\tAssert.assertEquals(\"Step size iterator: unexpected previous value\",15 + 20*(i-1), second.getValue().getFloatValue(), 0.01F);\n\t\t\t}\n\t\t}\n\t}",
"@Test\n public void heavierTest() throws InterruptedException, ExecutionException {\n Stage stage1 = createStage();\n Stage stage2 = createStage();\n StatelessThing actor1 = Actor.getReference(StatelessThing.class, \"1000\");\n StatelessThing actor2 = Actor.getReference(StatelessThing.class, \"1000\");\n final Set<UUID> set = new HashSet<>();\n set.clear();\n List<Future<UUID>> futures = new ArrayList<>();\n for (int i = 0; i < 50; i++) {\n // this will force the creation of concurrent activations in each node\n stage1.bind();\n futures.add(actor1.getUniqueActivationId());\n stage2.bind();\n futures.add(actor2.getUniqueActivationId());\n }\n futures.forEach(( f) -> {\n try {\n set.add(f.get(10, TimeUnit.SECONDS));\n } catch (Exception e) {\n throw new UncheckedException(e);\n }\n });\n // it is very likely that there will be more than one activation per stage host.\n Assert.assertTrue(((set.size()) > 1));\n // only 25*5 calls => there should not be more than 125 activations\n Assert.assertTrue(((set.size()) <= 100));\n }",
"public void train() {\n\t\tfor (Instance ins : arrTrainInstances) {\n\t\t\tif (ins.scorePmi_E1E2 > largestPMI)\n\t\t\t\tlargestPMI = ins.scorePmi_E1E2;\n\t\t}\n\t\tSystem.out.println(\"Largest PMI: \" + largestPMI);\n\n\t\tfor (Instance ins : arrTrainInstances) {\n\t\t\tins.scorePmi_E1E2 = ins.scorePmi_E1E2 / largestPMI;\n\t\t}\n\n\t\tfor (Instance ins : arrTestInstances) {\n\t\t\tins.scorePmi_E1E2 = ins.scorePmi_E1E2 / largestPMI;\n\t\t}\n\n\t\tint sizeD0 = arrD0.size();\n\t\tint sizeD1 = arrD1.size();\n\t\tint sizeD2 = arrD2.size();\n\t\tint sizeD3 = arrD3.size();\n\n\t\tint sizeMin = Math.min(sizeD0, Math.min(sizeD1, Math\n\t\t\t\t.min(sizeD2, sizeD3)));\n\t\tSystem.out.println(\"sizeMin=\" + sizeMin);\n\n\t\tint n = instanceNums.length;\n\n\t\tboolean flag = false;\n\n\t\tint count = 0;\n\n\t\tfor (int i = 0; i < n; i++) {\n\n\t\t\tint k = instanceNums[i];\n\n\t\t\tif (k > sizeMin) {\n\t\t\t\tk = sizeMin;\n\t\t\t\tinstanceNums[i] = k;\n\t\t\t\tflag = true;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"\\nk=\" + k);\n\n\t\t\tArrayList<Instance> arrSub0 = getInstances(arrD0, k);\n\t\t\tArrayList<Instance> arrSub1 = getInstances(arrD1, k);\n\t\t\tArrayList<Instance> arrSub2 = getInstances(arrD2, k);\n\t\t\tArrayList<Instance> arrSub3 = getInstances(arrD3, k);\n\n\t\t\tArrayList<Instance> arrTrains = new ArrayList<Instance>();\n\t\t\tarrTrains.addAll(arrSub0);\n\t\t\tarrTrains.addAll(arrSub1);\n\t\t\tarrTrains.addAll(arrSub2);\n\t\t\tarrTrains.addAll(arrSub3);\n\t\t\tCollections.shuffle(arrTrains);\n\n\t\t\tSystem.out.println(\"Training size: \" + arrTrains.size());\n\n\t\t\ttrain(arrTrains);\n\n\t\t\tdouble acc = test();\n\t\t\tacc = test();\n\n\t\t\taccuracies[i] = acc;\n\n\t\t\tcount++;\n\n\t\t\tif (flag == true)\n\t\t\t\tbreak;\n\n\t\t}\n\n\t\tfor (int i = 0; i < count; i++) {\n\t\t\tSystem.out.print(\" | \" + \"K=\" + instanceNums[i]);\n\t\t}\n\t\tSystem.out.println();\n\n\t\tfor (int i = 0; i < count; i++) {\n\n\t\t\tDecimalFormat df = new DecimalFormat(\"#.####\");\n\t\t\tString res = df.format(accuracies[i]);\n\t\t\tSystem.out.print(\" | \" + res);\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public void warmUp();",
"public void setStep(Integer step) {\n this.step = step;\n }",
"@Override\n public void stepCount(long step, int timestamp) {\n }",
"private void percentageScaling() {\n switch (slot) {\n case Torso -> updateBonusStats(1);\n case Head -> updateBonusStats(0.8);\n case Legs -> updateBonusStats(0.6);\n }\n }",
"public void runSJF() {\n\n //init\n ArrayList<Processus> localProcess = new ArrayList<>(); //Creation of a local list of process\n for (Processus cpy : listOfProcess) { //Copy the list of process in the local list\n localProcess.add(cpy);\n }\n int size = listOfProcess.size(); //variable used to save the initial size of the list of process\n\n Processus executedProc = null; //ExecutedProc is the current process that is being execute\n Processus tmpProc = localProcess.get(0); //The tmpProc is the previous process executed\n\n //Variable we need to calcul\n double occupancyRate = 0;\n double averageWaitingTime = 0;\n double averageReturnTime = 0;\n int currentTime = 0;\n int occupancyTime = 0;\n\n //beginning of the algo\n while (!localProcess.isEmpty()) { //As long as there are processes that are not done yet we keep going on\n\n //Determines the next process that will be executed\n for (Processus proc : localProcess) { //flow all remaining processes\n if (proc.getTime() <= currentTime) { //check if the currentTime of the process is below the currentTime\n if (localProcess.size() == 1) { //if there is only one process left\n executedProc = proc;\n } else if ((proc.getRessource(proc.getCurrentStep()) <= tmpProc.getRessource(tmpProc.getCurrentStep())) || (proc.getTime() < tmpProc.getTime())) {//shortest process selected\n executedProc = proc;\n tmpProc = proc;\n }\n }\n }\n\n //Check if the current process is assigned\n if (executedProc != null) {\n\n //execute the current ressource\n int tmpTime = 0;\n while (executedProc.getRessource(executedProc.getCurrentStep()) > tmpTime) { //As long as there is a resource\n for (Processus proc : localProcess) {\n if (proc.getTime() <= currentTime && !proc.equals(executedProc)) { //checking if there is another process waiting\n proc.setWaitingTime(1);\n }\n }\n currentTime++; //currentTime is updating at each loop\n occupancyTime++; //occupancyTime is updating at each loop\n tmpTime++;\n }\n\n executedProc.setCurrentStep(executedProc.getCurrentStep() + 1); //Update the currentStep to the next one (index of the lists of UC and inOut)\n\n if (executedProc.getCurrentStep() >= executedProc.getlistOfResource().size()) {//if it is the end of the process\n averageReturnTime += executedProc.getExecutedTime(); //update the average return time by adding the time that the process took\n localProcess.remove(executedProc); //remove the process from the list of process that needs to run\n }\n\n if (executedProc.getCurrentStep() <= executedProc.getListOfInOut().size()) { //If there is another inOut, it set the new time\n executedProc.setTime(executedProc.getInOut(executedProc.getCurrentStep() - 1) + currentTime);\n }\n\n executedProc = null;\n } else {\n currentTime++;\n }\n }\n //end of the algo\n\n //Calculation of the variables\n occupancyRate = ((double) occupancyTime / (double) currentTime) * 100;\n for (Processus proc : listOfProcess) {\n averageWaitingTime += proc.getWaitingTime();\n }\n averageWaitingTime = averageWaitingTime / size;\n averageReturnTime = averageReturnTime / size;\n\n //Updating the global variables\n currentAverageReturnTime = averageReturnTime;\n logger.trace(\"Current average return time : \" + currentAverageReturnTime);\n currentAverageWaitingTime = averageWaitingTime;\n logger.trace(\"Current average waiting time : \" + currentAverageWaitingTime);\n currentOccupancyRate = occupancyRate;\n logger.trace(\"Current occupancy rate : \" + currentOccupancyRate);\n currentOccupancyTime = occupancyTime;\n logger.trace(\"Current occupancy time : \" + currentOccupancyTime);\n\n restList(); //reset the list to the origin values so the user can test another algo\n }",
"public void scaleAnimetion(SpriteBatch batch){\n }",
"@Override\n public void settings(){\n size(500, 500);\n }",
"public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n drunkardTest(TEST_STEP_TIMES_1, TEST_STEP_SIZE_1);\n drunkardTest(TEST_STEP_TIMES_2, TEST_STEP_SIZE_2);\n\t}",
"@Override\n public void run() {\n ElapsedTime time = new ElapsedTime();\n time.reset();\n while (!sh.liftReady && time.milliseconds() < 1500) {\n }\n //\n sh.pivotPID(650, true, .07/650, .01, .01/650, 2);\n sh.pivotPID(640, false, .07/640, .01, .01/640, 2);\n\n\n\n }",
"public void setStep(double step) {\n\t\tthis.step = step;\n\t}",
"public void step() {\n\t\tfor (SimObject o : simObjects) {\n\t\t\to.step(timeScale);\n\t\t}\n\n\t\t// increment time elasped\n\t\tdaysElapsed += ((double) (timeScale)) / 86400.0;\n\n\t\t// if more than 30.42 days have elapsed, increment months\n\t\tif (daysElapsed >= 30.42) {\n\t\t\tmonthsElapsed++;\n\t\t\tdaysElapsed -= 30.42;\n\t\t}\n\n\t\t// if more than 12 months have elapsed, increment years\n\t\tif (monthsElapsed >= 12) {\n\t\t\tyearsElapsed++;\n\t\t\tmonthsElapsed -= 12;\n\t\t}\n\t}",
"public void autoscale()\n\t\t{\n\t\tdouble maxFC=1;\n\t\tdouble minP=-1;\n\t\t\n\t\tfor(int i=0;i<de.getNumGenes();i++)\n\t\t\t{\n\t\t\tdouble f=Math.abs(de.fc[i]);\n\t\t\tdouble p=de.logP[i];\n\t\t\tif(f>maxFC)\n\t\t\t\tmaxFC=f;\n\t\t\tif(p<minP)\n\t\t\t\tminP=p;\n\t\t\t}\n\t\tmaxFC*=1.2;\n\t\tminP*=1.2;\n\t\tscaleFC=1/maxFC;\n\t\tscaleP=-1/minP;\n\t\t}",
"public void newStep(Simulation simu) {\n\t\tfor (IInductionListener l: listeners) {\n\t\t\tl.newStep(simu);\n\t\t}\n\t}",
"default void setSpikesPerChunk(int count) {\n setSpikesPerChunk(VariableAmount.fixed(count));\n }",
"public void setNumberOfActiveRunners(Integer numberOfActiveRunners){\n this.numberOfActiveRunners = numberOfActiveRunners;\n }",
"public static void zoomIn(){\n for(int i=0; i<6; i++){\n driver.findElement(By.tagName(\"html\")).sendKeys(Keys.chord(Keys.CONTROL, Keys.ADD));\n }\n }",
"public native void setIterations(int iterations) throws MagickException;",
"@Test\n @MediumTest\n public void multiFrameScaleSmokeTest() throws Exception {\n scaleSmokeTest(true);\n }",
"@Override\r\n\tpublic void stepUp(Matrix3x3f viewport)\r\n\t{\n\t\ttransform(new Vector2f(2.0f, 0.0f), 0.0f, viewport, 2.0f, 2.0f);\r\n\t}",
"@Override\n protected void afterAttach(){\n\n float scaleE = (float) Math.pow(toValue, 1.0 / totalIterations);\n scaleTransform.updateValues(scaleE, scaleE, scaleE);\n }",
"void scale(double factor);",
"public void markRunStart(){\r\n runStart = stepCount;\r\n }",
"public void scale(double factor) {\r\n for (int i = 0; i < components.length; i++) {\r\n components[i] *= factor;\r\n }\r\n }",
"synchronized protected void enlargeArrays() {\n \t\tenlargeArrays(5);\n \t}",
"public void updateModuleOneIteration (final double timestep);",
"private void emergencyScaleDown(final int instances) throws ScalerException\n {\n LOG.info(\"Triggering emergency scale down of service {} to 0 due to low system resources.\", serviceRef);\n scaler.scaleDown(serviceRef, instances);\n backoff = true;\n }",
"public void setup(int size){\n runValues = new double[size];\n hardwareValues = new double[size][];\n }",
"public void realocareThreadsDistribution(){\n for(int i=1;i<=nrThreads;i++){\n if(listofIntervalsForEachThread[i] == null)\n listofIntervalsForEachThread[i] = new IntervalClass();\n this.listofIntervalsForEachThread[i].setStart(0);\n this.listofIntervalsForEachThread[i].setEnd(0);\n }\n if(this.nrThreads>=this.borderArray.size())\n for(int i=0;i<this.borderArray.size();i++){\n this.listofIntervalsForEachThread[i+1].setStart(i);\n this.listofIntervalsForEachThread[i+1].setEnd(i);\n }\n else{\n int nrForEachThread = this.borderArray.size()/nrThreads;\n int difSurplus = this.borderArray.size()%nrThreads;\n int difRate;\n int lastAdded = 0;\n for(int i=1;i<=this.nrThreads;i++){\n if(difSurplus > 0){\n difRate = 1;\n difSurplus--;\n }\n else difRate = 0;\n \n this.listofIntervalsForEachThread[i].setStart(lastAdded);\n lastAdded = lastAdded + difRate + nrForEachThread - 1;\n this.listofIntervalsForEachThread[i].setEnd(lastAdded);\n lastAdded++;\n }\n }\n }",
"private static void automate() {\n \tLOG.info(\"Begin automation task.\");\n \t\n \tcurrentOpticsXi = clArgs.clusteringOpticsXi;\n \tdouble opticsXiMax = (clArgs.clusteringOpticsXiMaxValue > ELKIClusterer.MAX_OPTICS_XI ? ELKIClusterer.MAX_OPTICS_XI : clArgs.clusteringOpticsXiMaxValue);\n \tcurrentOpticsMinPoints = clArgs.clusteringOpticsMinPts;\n \tint opticsMinPointsMax = clArgs.clusteringOpticsMinPtsMaxValue;\n \t\n \tLOG.info(\"optics-xi-start: {}, optics-xi-min-points-start: {}, optics-xi-step-size: {}, optics-min-points-step-size: {}\",\n \t\t\tnew Object[] { \n \t\t\t\tdf.format(currentOpticsXi), df.format(currentOpticsMinPoints), \n \t\t\t\tdf.format(clArgs.clusteringOpticsXiStepSize), df.format(clArgs.clusteringOpticsMinPtsStepSize)\n \t\t\t});\n \t\n \twhile (currentOpticsXi <= opticsXiMax) {\n \t\twhile (currentOpticsMinPoints <= opticsMinPointsMax) {\n \t\t\t// Run automation for each combination of opticsXi and opticsMinPoints\n \t\t\tLOG.info(\"Run automation with optics-xi: {}, optics-xi-min-points: {}\", \n \t\t\t\t\tdf.format(currentOpticsXi), df.format(currentOpticsMinPoints));\n \t\t\t\n \t\t\ttry {\n\t \t\t\t// Step 1: Clustering\n\t \t\t\tclustering(clArgs.clusteringInFile, clArgs.clusteringOutDir, currentOpticsXi, currentOpticsMinPoints);\n\t \t\t\t\n\t \t\t\t// Step 2: Build shared framework\n\t \t\t\tbuildFramework();\n\t \t\t\t\n\t \t\t\t// Step 3: Build user hierarchical graphs\n\t \t\t\tbuildHierarchicalGraphs();\n\t \t\t\t\n\t \t\t\t// Step 4: Calculate similarity between all users and create evaluation results afterwards\n\t \t\t\tcalculateSimilarity();\n \t\t\t} catch (Exception e) {\n\t\t\t\t\tLOG.error(\"An error occurred during the automation task. Jumping to the next pass.\", e);\n\t\t\t\t} finally {\n\t \t\t\t// Step 5: Clean up for the next run\n\t \t\t\tcleanAutomationResults();\n\t \t\t\t\n\t \t\t\t// Increase the currentOpticsMinPoints for the next run if desired\n\t \t\t\tif (clArgs.clusteringOpticsMinPtsStepSize > 0)\n\t \t\t\t\tcurrentOpticsMinPoints += clArgs.clusteringOpticsMinPtsStepSize;\n\t \t\t\telse\n\t \t\t\t\tbreak;\n\t\t\t\t}\n \t\t}\n \t\t// Reset current values\n \t\tcurrentOpticsMinPoints = clArgs.clusteringOpticsMinPts;\n \t\t\n \t\t// Increase currentOpticsXi for the next run if desired\n \t\tif (clArgs.clusteringOpticsXiStepSize > 0)\n\t\t\t\tcurrentOpticsXi += clArgs.clusteringOpticsXiStepSize;\n\t\t\telse\n\t\t\t\tbreak;\n \t}\n \t\n \tLOG.info(\"End automation task.\");\n }",
"private void decWaiters()\r\n/* 451: */ {\r\n/* 452:537 */ this.waiters = ((short)(this.waiters - 1));\r\n/* 453: */ }"
] | [
"0.72621065",
"0.5944824",
"0.5881762",
"0.56555486",
"0.56196225",
"0.5563572",
"0.5514629",
"0.5507408",
"0.54911625",
"0.5374067",
"0.53470194",
"0.5346825",
"0.5229424",
"0.52164054",
"0.52092594",
"0.5189809",
"0.51728916",
"0.51650083",
"0.5164741",
"0.5157764",
"0.5106635",
"0.505938",
"0.50320846",
"0.5023569",
"0.501012",
"0.5004455",
"0.4974016",
"0.49647033",
"0.49546662",
"0.49154177",
"0.4906987",
"0.4906635",
"0.4902198",
"0.4895734",
"0.48865598",
"0.48680615",
"0.4841431",
"0.48396173",
"0.48395678",
"0.48303625",
"0.48293656",
"0.482883",
"0.48116004",
"0.48038906",
"0.48036918",
"0.47973254",
"0.4797139",
"0.4789814",
"0.47854382",
"0.47810125",
"0.47792658",
"0.47790894",
"0.47775263",
"0.47678345",
"0.4761543",
"0.47558624",
"0.4754976",
"0.47549164",
"0.4739061",
"0.47333154",
"0.47310948",
"0.47304642",
"0.47259817",
"0.47194925",
"0.47156015",
"0.47121063",
"0.4707852",
"0.47074288",
"0.47066906",
"0.47061184",
"0.47047344",
"0.47027934",
"0.4702137",
"0.46945268",
"0.46914765",
"0.46910563",
"0.4690495",
"0.4682059",
"0.46815377",
"0.46791506",
"0.4672914",
"0.46560428",
"0.4652314",
"0.46465465",
"0.46409404",
"0.46338567",
"0.4630474",
"0.46278393",
"0.46270752",
"0.4624858",
"0.4621035",
"0.46198434",
"0.46183828",
"0.4617018",
"0.4615381",
"0.46151716",
"0.46081653",
"0.46029857",
"0.46025857",
"0.46025112"
] | 0.7373499 | 0 |
Check max count, free buffer count, and scale down prioritizing free buffer count over max count. | public void honourMaxCount() {
// Get free and total counts
int freeCount = getFreeLaunchers().size();
int totalCount = getTotalLaunchers().size();
// Scale down if max is exceeded, irrespective of free buffer count
if (totalCount > maxCount) {
log.info("Scaling down until [freeBufferCount] " + freeBufferCount + " is met since [Max Count] "
+ maxCount + " has been exceeded.");
while (freeCount <= freeBufferCount){
log.info("Scaling DOWN: REASON -> [Total Count] " + totalCount + " > [Max Count] " + maxCount);
scaleDown();
freeCount = getFreeLaunchers().size();
}
totalCount = getTotalLaunchers().size();
freeCount = getFreeLaunchers().size();
log.info("Stats after scale down operation: [Total Count] " + totalCount + ", [Free Count] " + freeCount);
return;
}
// Don't scale down if there are not enough free launchers
if (freeCount <= freeBufferCount) {
log.info("Not scaling down since [Free Count] " + freeCount + " <= [Free Buffer Size] " +
freeBufferCount + "...");
return;
}
// Don't scale down if the desired count is not exceeded
if (totalCount <= desiredCount) {
log.info("Not scaling down since [Total Count] " + totalCount + " <= [Desired Count] " +
desiredCount + "...");
return;
}
// Scale down if desired count is exceeded, but with more free launchers than buffer count by stepDown count
// TODO: to test scale down
if ((freeCount - stepDown) >= freeBufferCount) {
log.info("Scaling DOWN: REASON -> [Total Count] " + totalCount + " > [Desired Count] " + desiredCount +
" AND [Free Count] - [Step Down] " + freeCount + " - " + stepDown +
" >= [Free Buffer Count] " + freeBufferCount);
scaleDown();
return;
}
// If after scaling down there wouldn't be enough free launchers, don't scale down
log.info("Not scaling down since [Free Count] + [Step Down] " + freeCount + " + " + stepDown +
" < [Free Buffer Count] " + freeBufferCount);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void honourFreeBufferCount() {\n // Check if there are enough free launchers\n int freeCount = getFreeLaunchers().size();\n\n while (freeCount < freeBufferCount) {\n if (getTotalLaunchers().size() > maxCount) {\n log.warn(\"Specified Maximum Concurrency has been exceeded, but scaling up will be permitted. If this \" +\n \"message appears often increase maximum concurrency.\");\n }\n\n log.info(\"Scaling UP: REASON -> [Free Count] \" + freeCount + \" < [Free Gap] \" + freeBufferCount);\n scaleUp(\"honourFreeBufferCount\");\n freeCount = getFreeLaunchers().size();\n }\n }",
"private void tryToEnsureAvailableCapacity(final int requestedMaxWorkToRetrieve) {\n // todo this counts all partitions as a whole - this may cause some partitions to starve. need to round robin it?\n int available = sm.getWorkQueuedInShardsCount();\n int extraNeededFromInboxToSatisfy = requestedMaxWorkToRetrieve - available;\n log.debug(\"Requested: {}, available in shards: {}, will try to process from mailbox the delta of: {}\",\n requestedMaxWorkToRetrieve, available, extraNeededFromInboxToSatisfy);\n\n ingestPolledRecordsIntoQueues(extraNeededFromInboxToSatisfy);\n }",
"private int determineCalculatedBufferSize() {\n\n float percentOfASecond = (float) BUFFER_SIZE_IN_MS / 1000.0f;\n int numSamplesRequired = (int) ((float) RATE * percentOfASecond);\n int minBufferSize = determineMinimumBufferSize();\n\n int bufferSize;\n // each sample takes two bytes, need a bigger buffer\n if (ENCODING == AudioFormat.ENCODING_PCM_16BIT) {\n bufferSize = numSamplesRequired * 2;\n } else {\n bufferSize = numSamplesRequired;\n }\n\n if (bufferSize < minBufferSize) {\n Log.w(LOG_TAG, \"Increasing buffer to hold enough samples \"\n + minBufferSize + \" was: \" + bufferSize);\n bufferSize = minBufferSize;\n }\n\n return bufferSize;\n }",
"private int calcMaxSize(int capacity) {\n // Clip the upper bound so that there will always be at least one available slot.\n int upperBound = capacity - 1;\n return Math.min(upperBound, (int) (capacity * loadFactor));\n }",
"public void setMaxCapacity(int max) {\n\t\tbuffer = new Object[max];\n\t\tbufferSize = 0;\n\t}",
"private void optimizeLimitCount() {\n TreeNode currentTreeNode = treeLeaf;\n while (!(currentTreeNode instanceof SourceTreeNode)) {\n if (currentTreeNode instanceof CountGlobalTreeNode) {\n CountGlobalTreeNode countGlobalTreeNode = CountGlobalTreeNode.class.cast(currentTreeNode);\n if (countGlobalTreeNode.getAfterRequirementList().isEmpty() &&\n countGlobalTreeNode.getBeforeRequirementList().isEmpty() &&\n countGlobalTreeNode.getInputNode() instanceof RangeGlobalTreeNode) {\n RangeGlobalTreeNode rangeGlobalTreeNode = RangeGlobalTreeNode.class.cast(countGlobalTreeNode.getInputNode());\n if (rangeGlobalTreeNode.getAfterRequirementList().isEmpty() &&\n rangeGlobalTreeNode.getBeforeRequirementList().isEmpty() &&\n rangeGlobalTreeNode.getLow() == 0 &&\n rangeGlobalTreeNode.getHigh() > 0) {\n countGlobalTreeNode.setLimitCount(rangeGlobalTreeNode.getHigh());\n countGlobalTreeNode.setInputNode(rangeGlobalTreeNode.getInputNode());\n if (countGlobalTreeNode.getInputNode() instanceof EdgeTreeNode) {\n ((EdgeTreeNode) countGlobalTreeNode.getInputNode()).setFetchPropFlag(true);\n }\n }\n }\n }\n currentTreeNode = UnaryTreeNode.class.cast(currentTreeNode).getInputNode();\n }\n }",
"protected void checkSize()\n {\n // check if pruning is required\n if (m_cCurUnits > m_cMaxUnits)\n {\n synchronized (this)\n {\n // recheck so that only one thread prunes\n if (m_cCurUnits > m_cMaxUnits)\n {\n prune();\n }\n }\n }\n }",
"default int getMaximumCount(int slot) {\n\t\treturn 64;\n\t}",
"private static void fillMaxArray() {\n int maxIndex = 0;\n int maxCount = 0;\n for (int n = 0; n < LIMIT; n++) {\n if (COUNT[n] > maxCount) {\n maxIndex = n;\n maxCount = COUNT[n];\n }\n COUNT[n] = maxIndex;\n }\n //System.err.println(Arrays.toString(COUNT));\n }",
"int getMaxCount();",
"int getMaxCount();",
"private static void assertEnsureBufferSizeExpandsToMaxBufferSize(final boolean exceedMaxBufferSize) {\n final int length = 0;\n\n final long presumableFreeMemory = getPresumableFreeMemory();\n // 2GiB + 32 KiB + length\n // 2GiB: Buffer to allocate\n // 32KiB: Some headroom\n // length: Existing buffer\n final long estimatedMemory = (1L << 31) + 32 * 1024 + length;\n assumeTrue(presumableFreeMemory > estimatedMemory, \"Not enough free memory for the test\");\n\n final int max = Integer.MAX_VALUE - 8;\n\n // Check the conservative maximum buffer size can actually be exceeded by the VM\n // otherwise the test is not valid.\n if (exceedMaxBufferSize) {\n assumeCanAllocateBufferSize(max + 1);\n // Free-memory.\n // This may not be necessary as the byte[] is now out of scope\n System.gc();\n }\n\n final BaseNCodec ncodec = new NoOpBaseNCodec();\n final Context context = new Context();\n\n // Allocate the initial buffer\n context.buffer = new byte[length];\n context.pos = length;\n // Compute the extra to reach or exceed the max buffer size\n int extra = max - length;\n if (exceedMaxBufferSize) {\n extra++;\n }\n ncodec.ensureBufferSize(extra, context);\n assertTrue(context.buffer.length >= length + extra);\n }",
"@Test\n public void testEnsureBufferSizeExpandsToBeyondMaxBufferSize() {\n assertEnsureBufferSizeExpandsToMaxBufferSize(true);\n }",
"private void adjustMaxBytesPerGatheringWrite(long attempted, long written, long oldMaxBytesPerGatheringWrite) {\n/* 286 */ if (attempted == written) {\n/* 287 */ if (attempted << 1L > oldMaxBytesPerGatheringWrite) {\n/* 288 */ config().setMaxBytesPerGatheringWrite(attempted << 1L);\n/* */ }\n/* 290 */ } else if (attempted > 4096L && written < attempted >>> 1L) {\n/* 291 */ config().setMaxBytesPerGatheringWrite(attempted >>> 1L);\n/* */ } \n/* */ }",
"Integer backlogCapacity();",
"protected abstract int getMaxDesiredSize();",
"boolean hasMaxCount();",
"pb4server.MaxPrisonBuffAskReq getMaxPrisonBuffAskReq();",
"public final void ensureMax() {\n\t\tfinal int temp = findMax(lookupPrefix) + 1;\n\t\tif (temp > currentSequenceNumber) {\n\t\t\tcurrentSequenceNumber = temp;\n\t\t}\n\t}",
"private static int countRequiredMergeBufferNumWithoutSubtotal(Query query, int foundNum)\n {\n\n final DataSource dataSource = query.getDataSource();\n if (foundNum == MAX_MERGE_BUFFER_NUM_WITHOUT_SUBTOTAL + 1 || !(dataSource instanceof QueryDataSource)) {\n return foundNum - 1;\n } else {\n return countRequiredMergeBufferNumWithoutSubtotal(((QueryDataSource) dataSource).getQuery(), foundNum + 1);\n }\n }",
"private void ensureCapacity() {\n if(size() >= (0.75 * data.length)) // size() == curSize\n resize(2 * size());\n }",
"@Override\n public int getMaxCapacity() {\n return 156250000;\n }",
"@Test\n public void testMaxQueue() throws Throwable {\n internalMaxQueue(\"core\");\n internalMaxQueue(\"openwire\");\n internalMaxQueue(\"amqp\");\n }",
"private void updateMax(int next) {\n while (val < next) {\n val = next;\n }\n }",
"public int getMaxCount() {\n return maxCount_;\n }",
"protected abstract long getCurrentBufferCapacity(long paramLong);",
"public void honourDesiredCount() {\n int totalDeploymentCount = getDeployments().size();\n// log.info(\"[Total count] \" + totalDeploymentCount + \" [Desired Count] \" + desiredCount);\n\n while (totalDeploymentCount < desiredCount) {\n log.info(\"Scaling UP: REASON -> [Total Count] \" + totalDeploymentCount + \" < [Desired Count] \" +\n desiredCount);\n\n scaleUp(\"honourDesiredCount\");\n totalDeploymentCount = getDeployments().size();\n }\n }",
"@Test\n public void testEnsureBufferSizeExpandsToMaxBufferSize() {\n assertEnsureBufferSizeExpandsToMaxBufferSize(false);\n }",
"private void raiseLimitException() {\n\t\t\tthrow new DataBufferLimitException(\"Exceeded limit on max bytes to buffer : \" + getMaxInMemorySize());\n\t\t}",
"private void updateQueueSize() {\n\t\tsims.minQS = state.queueSize < sims.minQS ? state.queueSize : sims.minQS;\n\t\tsims.maxQS = state.queueSize > sims.maxQS ? state.queueSize : sims.maxQS;\n\t}",
"public void update() {\n\t\tif (max == null || max.length < info.size())\r\n\t\t\tmax = info.stream().mapToInt(i -> Math.max(1, i[1])).toArray();\r\n\r\n\t\tfull = improve(max);\r\n\t}",
"private void checkCapacity() {\n\t\tif (size.get() >= region.getCapacity()) {\n\t\t\tsynchronized (cleanUpThread) {\n\t\t\t\tcleanUpThread.notify();\n\t\t\t}\n\t\t}\n\t}",
"static int capacity(final long count) {\n\n double capacity = count;\n\n while (capacity > PlainArray.MAX_SIZE) {\n capacity = PrimitiveMath.SQRT.invoke(capacity);\n }\n\n capacity = PrimitiveMath.SQRT.invoke(capacity);\n return 2 * (int) capacity;\n }",
"private int getMaxReconsumeTimes() {\n if (this.defaultMQPushConsumer.getMaxReconsumeTimes() == -1) {\n return Integer.MAX_VALUE;\n } else {\n return this.defaultMQPushConsumer.getMaxReconsumeTimes();\n }\n }",
"int getMaxSetSize(Object modelID) throws Exception;",
"protected void checkMinMax(StreamParams streamParam, StreamParams streamFromList, int counter) {\n\t\tcounter++;\n\t\tlong temp = streamParam.getRxRate();\n\t\t// summs all streams for printing\n\t\tstreamParam.setRxRate((temp + streamFromList.getRxRate()));\n\t\t// Min&Max\n\t\tif (streamParam.getRxMinRate() > streamFromList.getRxRate()) {\n\t\t\tstreamParam.setRxMinRate(streamFromList.getRxRate());\n\t\t}\n\t\tif (streamParam.getRxMaxRate() < streamFromList.getRxRate()) {\n\t\t\tstreamParam.setRxMaxRate(streamFromList.getRxRate());\n\t\t}\n\t}",
"public void setMaxBufferSpace(long maxBufferSpace) {\n this.maxBufferSpace = maxBufferSpace;\n }",
"abstract int getMaxMemoryUsage();",
"@Override public void postGlobal() {\n for(int i=1;i<_chkMaxs.length;++i)\n _chkMaxs[i] = _chkMaxs[i-1] > _chkMaxs[i] ? _chkMaxs[i-1] : _chkMaxs[i];\n }",
"private int calculateResizeThreshold() {\n\t\treturn (buffer.length >> 2) * 3;\n\t}",
"public abstract int getMaxIntermediateSize();",
"private void setMaxThreshold() {\n maxThreshold = value - value * postBoundChange / 100;\n }",
"public static native void setMaxCache(int max);",
"void setPruneMaximum(int max) {\n\t\tif(max >= maximumBound) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint newLargestWidth = getWidth(max - 1);\n\t\tint oldLargestWidth = getWidth(maximumBound - 1);\n\t\tmaximumBound = max;\n\t\t\n\t\tif(newLargestWidth < widthAfterQueue - 1) {\n\t\t\t//Don't prune the widths in the queue.\n\t\t\tnewLargestWidth = widthAfterQueue - 1;\n\t\t}\n\t\t\n\t\t//Prune useless widths\n\t\tfor(int i = newLargestWidth + 1; i < widths.size() && i <= oldLargestWidth; i++) {\n\t\t\tfor(ScheduleBlock block : widths.get(i)) {\n\t\t\t\tblock.remove();\n\t\t\t\twidthSize[i] -= block.size;\n\t\t\t}\n\t\t\t\n\t\t\twidths.get(i).clear();\n\t\t}\n\t}",
"abstract int calculateMaximumSize(int axis);",
"public int getMaxCount() {\n return maxCount_;\n }",
"public void setMaxBitDepth(int maxValue) {\n/* 460 */ this.maxSample = maxValue;\n/* */ \n/* 462 */ this.maxSampleSize = 0;\n/* 463 */ while (maxValue > 0) {\n/* 464 */ maxValue >>>= 1;\n/* 465 */ this.maxSampleSize++;\n/* */ } \n/* */ }",
"private void updateMax(int val) {\n overallMax.updateMax(val);\n for (HistoryItem item : watchers.values()) {\n item.max.updateMax(val);\n }\n }",
"private void recalculateMaxCounts() {\n for (int i = 0; i < datasets.size(); ++i) {\n XYDatasetWithGroups dataset = datasets.get(i);\n maxCounts.set(i, calculateMaxCount(dataset));\n }\n }",
"private static int multiplyingNumberOfStudentsFromMaxGroup(int numberOfTimes, List<Group> maxGroup) {\n\n return maxGroup.size() * maxGroup.get(0).getListOfStudents().size() * numberOfTimes;\n }",
"final int getMaximumSize(int axis) {\n if (max == UNSET) {\n max = constrain(calculateMaximumSize(axis));\n }\n return max;\n }",
"protected Recycler(int maxCapacityPerThread, int maxSharedCapacityFactor, int ratio, int maxDelayedQueuesPerThread)\r\n/* 103: */ {\r\n/* 104:133 */ this.ratioMask = (MathUtil.safeFindNextPositivePowerOfTwo(ratio) - 1);\r\n/* 105:134 */ if (maxCapacityPerThread <= 0)\r\n/* 106: */ {\r\n/* 107:135 */ this.maxCapacityPerThread = 0;\r\n/* 108:136 */ this.maxSharedCapacityFactor = 1;\r\n/* 109:137 */ this.maxDelayedQueuesPerThread = 0;\r\n/* 110: */ }\r\n/* 111: */ else\r\n/* 112: */ {\r\n/* 113:139 */ this.maxCapacityPerThread = maxCapacityPerThread;\r\n/* 114:140 */ this.maxSharedCapacityFactor = Math.max(1, maxSharedCapacityFactor);\r\n/* 115:141 */ this.maxDelayedQueuesPerThread = Math.max(0, maxDelayedQueuesPerThread);\r\n/* 116: */ }\r\n/* 117: */ }",
"private void ensureCapacity() {\r\n\t\t\tdouble loadFactor = getLoadFactor();\r\n\r\n\t\t\tif (loadFactor >= CAPACITY_THRESHOLD)\r\n\t\t\t\trehash();\r\n\t\t}",
"public abstract long getMaxSize();",
"public boolean limitHit() {\r\n return (count >= maxCount);\r\n }",
"@Test\n\tpublic void testMaxSizeAllocation() {\n\n\t\tint dataTypeSize = 8;\n\t\tint maxAllocationPossible = BigIntVector.MAX_ALLOCATION_SIZE / dataTypeSize;\n\n\t\ttry (BufferAllocator allocator = new RootAllocator(BigIntVector.MAX_ALLOCATION_SIZE);\n\t\t\t\tBigIntVector vector = new BigIntVector(\"TestMaxAlloc\", allocator)) {\n\t\t\tvector.reset();\n\t\t\tvector.allocateNew(maxAllocationPossible);\n\t\t\tint len = vector.getValueCapacity();\n\t\t\tassertTrue(\"Allocated size \" + len + \" is not equal to requested size\" + maxAllocationPossible,\n\t\t\t\t\tlen == maxAllocationPossible);\n\t\t}\n\t}",
"private void ensureCapacity(int count) {\n\t\tint capacity = getCapacity();\n\t\t\n\t\tint newLength = length + count;\n\t\tif (capacity >= newLength)\n\t\t\treturn;\n\n\t\t// Double capacity\n\t\tcapacity <<= 1;\n\t\t\n\t\tif (newLength > capacity)\n\t\t\tcapacity = newLength;\n\n\t\tchar[] newBuffer = new char[capacity];\n\t\tSystem.arraycopy(buffer, 0, newBuffer, 0, length);\n\t\tbuffer = newBuffer;\n\t}",
"public static native int getMaxCacheMem();",
"public void testMaximumMessages() throws Exception {\n for (int i = 0; i < 1024 + 1; i++) {\n sendMessage(i);\n waitForMs(50);\n }\n\n sendMessage(0);\n waitForMs(40);\n // Check if the oldest one has been already evicted.\n CellBroadcastMessage cbmTest =\n (CellBroadcastMessage) mServiceIntentToVerify.getExtras().get(\"message\");\n CellBroadcastMessage cbm = new CellBroadcastMessage(createMessage(0));\n\n compareCellBroadCastMessage(cbm, cbmTest);\n mActivityIntentToVerify = null;\n }",
"pb4server.MaxPrisonBuffAskReqOrBuilder getMaxPrisonBuffAskReqOrBuilder();",
"public int getMaxCalls();",
"private int zzMaxBufferLen() {\n return Integer.MAX_VALUE;\n }",
"private int zzMaxBufferLen() {\n return Integer.MAX_VALUE;\n }",
"double getMaxTfCapacity();",
"private boolean requestLimitReached() {\n\t\treturn (requestCount >= maximumRequests);\n\t}",
"public Builder setMaximumCapacity(int value) {\n \n maximumCapacity_ = value;\n onChanged();\n return this;\n }",
"static int estimateBatchSizeUpperBound(ByteBuffer key, ByteBuffer value, Header[] headers) {\n return RECORD_BATCH_OVERHEAD + DefaultRecord.recordSizeUpperBound(key, value, headers);\n }",
"private void setConfigNumMaxTotalJobs(int value) {\n this.bitField0_ |= 1;\n this.configNumMaxTotalJobs_ = value;\n }",
"long getMemLimit();",
"public int getMaxAttempts(AsyncOperation op);",
"public boolean ensureCapacity(int maxBusNdx, int branchCount)\n\t{\n\t\tboolean rv = false;\n\t\tif (++maxBusNdx > _maxBusNdx)\n\t\t{\n\t\t\t_maxBusNdx = maxBusNdx;\n\t\t\tif (maxBusNdx >= _list.length)\n\t\t\t{\n\t\t\t\tint l = _list.length;\n\t\t\t\t_list = Arrays.copyOf(_list, maxBusNdx*2);\n\t\t\t\tArrays.fill(_list, l, _list.length, NoNode);\n\t\t\t\t_cnt = Arrays.copyOf(_cnt, _list.length);\n\t\t\t\t_ecnt = Arrays.copyOf(_ecnt, _list.length);\n\t\t\t\trv = true;\n\t\t\t}\n\t\t}\n\t\tint br2 = branchCount * 2;\n\t\tif (br2 >= _next.length)\n\t\t{\n\t\t\tint l = _next.length;\n\t\t\t_next = Arrays.copyOf(_next, br2);\n\t\t\tArrays.fill(_next, l, _next.length, Empty);\n\t\t\t_far = Arrays.copyOf(_far, _next.length);\n\t\t\tArrays.fill(_far, l, _far.length, Empty);\n\t\t\trv = true;\n\t\t}\n\t\treturn rv;\n\t}",
"@Override\n protected int update(byte[] array, int off, int count) throws IOException {\n int mark = (int)limit;\n \n if(count >= limit) {\n append(array, off, mark);\n finished = true;\n limit = 0;\n return count - mark;\n } \n if(count > 0) {\n append(array, off, count);\n limit -= count; \n }\n return 0;\n }",
"protected void ensureBufferSpace(int expectedAdditions) {\n final int bufferLen = (buffer == null ? 0 : buffer.length);\n if (elementsCount + expectedAdditions > bufferLen) {\n final int newSize = resizer.grow(bufferLen, elementsCount, expectedAdditions);\n assert newSize >= elementsCount + expectedAdditions : \"Resizer failed to\" + \" return sensible new size: \"\n + newSize + \" <= \" + (elementsCount + expectedAdditions);\n\n this.buffer = Arrays.copyOf(buffer, newSize);\n }\n }",
"int getNumBufferedBytes() {\n ChannelBuffer buf;\n int IOQueued;\n for (IOQueued = 0, buf = inQueueHead;\n buf != null; buf = buf.next) {\n IOQueued += buf.nextAdded - buf.nextRemoved;\n }\n return IOQueued;\n }",
"@java.lang.Override\n public int getMaximumCapacity() {\n return maximumCapacity_;\n }",
"public int getAvailableCount();",
"public void setMaxCalls(int max);",
"public void check() {\n\t\t\ttry {\n\t\t\t\twhile (num < MAX) {\n\t\t\t\t\tMessage msg = Message.obtain();\n\t\t\t\t\tlong workingNum = num;\n\t\t\t\t\tif (isPrime(workingNum)) {\n\t\t\t\t\t\tif (workingNum == 1)\n\t\t\t\t\t\t\tworkingNum = 2;\n\t\t\t\t\t\tmsg.obj = workingNum;\n\t\t\t\t\t\thandler.sendMessage(msg);\n\n\t\t\t\t\t\tThread.sleep(500);\n\t\t\t\t\t}\n\n\t\t\t\t\tnum += 2;\n\n\t\t\t\t}\n\n\t\t\t\tMessage msg = Message.obtain();\n\t\t\t\tLog.d(TAG, \"Counter has reached Max\");\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tbundle.putString(\"max\", \"Counter has reached Max\");\n\t\t\t\tmsg.setData(bundle);\n\t\t\t\thandler.sendMessage(msg);\n\n\t\t\t\t// If the Thread is interrupted.\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tLog.d(TAG, \"Thread interrupted\");\n\t\t\t}\n\n\t\t}",
"public void testPercentSwapFreeBelowThreshold() {\n String jvmOptions = null;\n GcManager gcManager = new GcManager();\n Jvm jvm = new Jvm(jvmOptions, null);\n JvmRun jvmRun = gcManager.getJvmRun(jvm, Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n jvmRun.getJvm().setSwap(1000);\n jvmRun.getJvm().setSwapFree(945);\n jvmRun.doAnalysis();\n Assert.assertEquals(\"Percent swap free not correct.\", 94, jvmRun.getJvm().getPercentSwapFree());\n Assert.assertTrue(Analysis.INFO_SWAPPING + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.INFO_SWAPPING));\n }",
"public boolean checkCapacity(Item item) {\n\t\treturn this.currentCapacity() + item.getCapacity() <= this.maxCapacity;\n\t}",
"public boolean hasMaxCount() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"protected abstract boolean reachedContractLimit(int size);",
"public synchronized int getUpperSizeLimit() {\n \t\treturn upper;\n \t}",
"public boolean hasMaxCount() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public void setMaxBps(int maxBps) {\n\t\tlock.lock();\n\t\ttry {\n\t\t\tthis.maxBps = maxBps;\n\t\t\tbytesCredit = (int) (maxBps * (float) (MAX_CREDIT_TIME / 1000));\n\t\t\tlastCreditTime = currentTimeMillis();\n\t\t} finally {\n\t\t\tlock.unlock();\n\t\t}\n\t}",
"int getMaxConcurrent();",
"public static boolean exceedsMaxCount() {\n final long maxTestCount = HostConfig.getMaxTestCount();\n return (maxTestCount > 0) && (mTestCount >= maxTestCount);\n }",
"private static final boolean mpeg2_scale_bitcount(final Jlame_internal_flags gfc, final Jgr_info cod_info) {\n\t\tfinal int max_sfac[] = new int[4];\n\t\tint[] partition_table;\n\t\tfinal int[] scalefac = cod_info.scalefac;\n\n\t\t/*\n\t\t Set partition table. Note that should try to use table one,\n\t\t but do not yet...\n\t\t */\n\t\tfinal int table_number = cod_info.preflag ? 2 : 0;\n\n\t\tfor( int i = 0; i < 4; i++ ) {\n\t\t\tmax_sfac[i] = 0;\n\t\t}\n\n\t\tint row_in_table;\n\t\tif( cod_info.block_type == Jencoder.SHORT_TYPE ) {\n\t\t\trow_in_table = 1;\n\t\t\tpartition_table = Jquantize_pvt.nr_of_sfb_block[table_number][row_in_table];//[0];\n\t\t\tfor( int sfb = 0, partition = 0; partition < 4; partition++ ) {\n\t\t\t\tfinal int nr_sfb = partition_table[partition];\n\t\t\t\tfor( final int end = sfb + nr_sfb; sfb < end; ) {\n\t\t\t\t\tif( scalefac[sfb] > max_sfac[partition]) {\n\t\t\t\t\t\tmax_sfac[partition] = scalefac[sfb];\n\t\t\t\t\t}\n\t\t\t\t\tsfb++;\n\t\t\t\t\tif( scalefac[sfb] > max_sfac[partition]) {\n\t\t\t\t\t\tmax_sfac[partition] = scalefac[sfb];\n\t\t\t\t\t}\n\t\t\t\t\tsfb++;\n\t\t\t\t\tif( scalefac[sfb] > max_sfac[partition]) {\n\t\t\t\t\t\tmax_sfac[partition] = scalefac[sfb];\n\t\t\t\t\t}\n\t\t\t\t\tsfb++;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\trow_in_table = 0;\n\t\t\tpartition_table = Jquantize_pvt.nr_of_sfb_block[table_number][row_in_table];//[0];\n\t\t\tfor( int sfb = 0, partition = 0; partition < 4; partition++ ) {\n\t\t\t\tfinal int nr_sfb = partition_table[partition];\n\t\t\t\tfor( int i = 0; i < nr_sfb; i++, sfb++ ) {\n\t\t\t\t\tif( scalefac[sfb] > max_sfac[partition] ) {\n\t\t\t\t\t\tmax_sfac[partition] = scalefac[sfb];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tint over = 0;\n\t\tfor( int partition = 0; partition < 4; partition++ ) {\n\t\t\tif( max_sfac[partition] > max_range_sfac_tab[table_number][partition] ) {\n\t\t\t\tover++;\n\t\t\t}\n\t\t}\n\t\tif( 0 == over ) {\n\t\t\tfinal int[] slen = cod_info.slen;// java\n\t\t\t/*\n\t\t\t Since no bands have been over-amplified, we can set scalefac_compress\n\t\t\t and slen[] for the formatter\n\t\t\t */\n\t\t\t// static final int log2tab[] = { 0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4 };\n\n\t\t\tcod_info.sfb_partition_table = Jquantize_pvt.nr_of_sfb_block[table_number][row_in_table];\n\n\t\t\t/* set scalefac_compress */\n\t\t\tfinal int slen1 = log2tab[ max_sfac[0] ];\n\t\t\tfinal int slen2 = log2tab[ max_sfac[1] ];\n\t\t\tfinal int slen3 = log2tab[ max_sfac[2] ];\n\t\t\tfinal int slen4 = log2tab[ max_sfac[3] ];\n\n\t\t\tslen[0] = slen1;\n\t\t\tslen[1] = slen2;\n\t\t\tslen[2] = slen3;\n\t\t\tslen[3] = slen4;\n\n\t\t\tswitch( table_number ) {\n\t\t\tcase 0:\n\t\t\t\tcod_info.scalefac_compress = (((slen1 * 5) + slen2) << 4) + (slen3 << 2) + slen4;\n\t\t\t\tbreak;\n\n\t\t\tcase 1:\n\t\t\t\tcod_info.scalefac_compress = 400 + (((slen1 * 5) + slen2) << 2) + slen3;\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\tcod_info.scalefac_compress = 500 + (slen1 * 3) + slen2;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tJutil.lame_errorf( gfc, \"intensity stereo not implemented yet\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t//}\n\t\t//if( 0 == over ) {\n\t\t\tcod_info.part2_length = slen1 * cod_info.sfb_partition_table[0];\n\t\t\tcod_info.part2_length += slen2 * cod_info.sfb_partition_table[1];\n\t\t\tcod_info.part2_length += slen3 * cod_info.sfb_partition_table[2];\n\t\t\tcod_info.part2_length += slen4 * cod_info.sfb_partition_table[3];\n\t\t}\n\t\treturn over != 0;\n\t}",
"int getMaxPoolSize();",
"public void testPercentSwapFreeAtThreshold() {\n String jvmOptions = null;\n GcManager gcManager = new GcManager();\n Jvm jvm = new Jvm(jvmOptions, null);\n JvmRun jvmRun = gcManager.getJvmRun(jvm, Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n jvmRun.getJvm().setSwap(1000);\n jvmRun.getJvm().setSwapFree(946);\n jvmRun.doAnalysis();\n Assert.assertEquals(\"Percent swap free not correct.\", 95, jvmRun.getJvm().getPercentSwapFree());\n Assert.assertFalse(Analysis.INFO_SWAPPING + \" analysis incorrectly identified.\",\n jvmRun.getAnalysis().contains(Analysis.INFO_SWAPPING));\n }",
"public Builder setMaxCount(int value) {\n bitField0_ |= 0x00000002;\n maxCount_ = value;\n onChanged();\n return this;\n }",
"@java.lang.Override\n public int getMaximumCapacity() {\n return maximumCapacity_;\n }",
"int tryScale(){\n int numAccepted = 0;\n \n for(int c=0; c<numCandScaleTuning; c++){\n DoubleMatrix1D y = nextCandidate();\n if(checkCandidate(y))//accept\n numAccepted++;\n }\n \n return numAccepted;\n }",
"public int drainTo(Collection<? super E> collection, int maxElements)\n {\n int drainCount = mQueue.drainTo(collection, maxElements);\n\n int size = mCounter.addAndGet(-drainCount);\n\n if(mOverflow.get() && size <= mResetThreshold)\n {\n setOverflow(false);\n }\n\n return drainCount;\n }",
"private void compactIfNeeded() {\n\n // if the scan point is more than 25% into the buffer, compact...\n if( buffer.position() >= (buffer.capacity() >> 2 ) ) {\n int newLimit = buffer.limit() - buffer.position();\n buffer.compact();\n buffer.position( 0 );\n buffer.limit( newLimit );\n }\n }",
"private int getBufferSize() {\n int maxBandOff = bandOffsets[0];\n for (int i = 1; i < bandOffsets.length; i++) {\n maxBandOff = Math.max(maxBandOff, bandOffsets[i]);\n }\n\n if (maxBandOff < 0 || maxBandOff > (Integer.MAX_VALUE - 1)) {\n throw new IllegalArgumentException(\"Invalid band offset\");\n }\n\n if (pixelStride < 0 || pixelStride > (Integer.MAX_VALUE / width)) {\n throw new IllegalArgumentException(\"Invalid pixel stride\");\n }\n\n if (scanlineStride < 0 || scanlineStride > (Integer.MAX_VALUE / height)) {\n throw new IllegalArgumentException(\"Invalid scanline stride\");\n }\n\n int size = maxBandOff + 1;\n\n int val = pixelStride * (width - 1);\n\n if (val > (Integer.MAX_VALUE - size)) {\n throw new IllegalArgumentException(\"Invalid pixel stride\");\n }\n\n size += val;\n\n val = scanlineStride * (height - 1);\n\n if (val > (Integer.MAX_VALUE - size)) {\n throw new IllegalArgumentException(\"Invalid scan stride\");\n }\n\n size += val;\n\n return size;\n }",
"public final int getMaxLinkCount() {\n\t\tint r = 0;\n\t\tlockMe(this);\n\t\tr = maxLinkCount;\n\t\tunlockMe(this);\n\t\treturn r;\n\t}",
"private void handleIdleIncrease() {\n int i;\n int i2;\n if (curState == 0 && (i = targetBuffer) < (i2 = raiseBufferMax)) {\n targetBuffer = i + raiseBufferStep;\n targetBuffer = Math.min(targetBuffer, i2);\n Trace.traceBegin(8, \"increaseBuffer:\" + targetBuffer);\n int i3 = targetBuffer;\n setBuffer(i3, i3 - lowBufferStep, highBufferStep + i3, swapReserve);\n Trace.traceEnd(8);\n }\n Message msg = handler.obtainMessage();\n msg.what = 11;\n handler.sendMessageDelayed(msg, (long) (raiseBufferTimeWidth * 1000));\n }",
"private void handleZswapdFail() {\n if (curState == 2) {\n handler.removeMessages(7);\n curState = 0;\n }\n if (curState == 0) {\n curReclaimFailCount++;\n Slog.i(TAG, \"zswapd fail, now Fail count:\" + curReclaimFailCount);\n long curTime = SystemClock.uptimeMillis();\n if (lastReclaimFailTime == -1) {\n lastReclaimFailTime = curTime;\n } else if (reclaimFailCount <= curReclaimFailCount) {\n int curBuffer = getCurBufferSize();\n if (minTargetBuffer == targetBuffer) {\n Message msg = handler.obtainMessage();\n Slog.i(TAG, \"zswapd keep fail, targetBuffer is min, call kill, curBuf: \" + curBuffer);\n msg.what = 1;\n handler.sendMessage(msg);\n }\n targetBuffer = curBuffer;\n targetBuffer = Math.min(maxTargetBuffer, targetBuffer);\n targetBuffer = Math.max(targetBuffer, minTargetBuffer);\n Trace.traceBegin(8, \"zswapd fail:\" + targetBuffer);\n int i = targetBuffer;\n setBuffer(i, i - lowBufferStep, highBufferStep + i, swapReserve);\n Trace.traceEnd(8);\n Slog.i(TAG, \"handle zswapd fail a lot, current buffer: \" + curBuffer + \", targetBuffer: \" + targetBuffer);\n lastReclaimFailTime = curTime;\n curReclaimFailCount = 0;\n }\n }\n }",
"private int getMaxSize() {\r\n return PropUtils.getValue(sizeLimitProp, DEFAULT_MAX_SIZE);\r\n }"
] | [
"0.7608005",
"0.6248479",
"0.60644674",
"0.5972976",
"0.5949788",
"0.593502",
"0.58972406",
"0.5889357",
"0.58523095",
"0.5829725",
"0.5829725",
"0.5819864",
"0.581044",
"0.5799249",
"0.57895714",
"0.57171094",
"0.57094944",
"0.5671289",
"0.5664103",
"0.565896",
"0.5570351",
"0.55631673",
"0.5556127",
"0.55532146",
"0.554637",
"0.5543219",
"0.55307126",
"0.552242",
"0.5505269",
"0.550038",
"0.549208",
"0.54835284",
"0.5483034",
"0.54805094",
"0.5476858",
"0.5459263",
"0.5454977",
"0.54547465",
"0.5454187",
"0.5448472",
"0.5432013",
"0.5430348",
"0.54300433",
"0.54262066",
"0.5425074",
"0.5417416",
"0.5411427",
"0.540836",
"0.54045504",
"0.5399918",
"0.5395194",
"0.5387989",
"0.5383433",
"0.5361506",
"0.5360813",
"0.53595614",
"0.53388125",
"0.5333645",
"0.5332761",
"0.53101754",
"0.53070915",
"0.53025323",
"0.53025323",
"0.53023446",
"0.52823913",
"0.52815783",
"0.5274998",
"0.52585804",
"0.52529263",
"0.52521247",
"0.5247004",
"0.5246553",
"0.5243111",
"0.524106",
"0.5238423",
"0.5223853",
"0.5208063",
"0.5205178",
"0.5203222",
"0.5200848",
"0.51966405",
"0.5192562",
"0.5177147",
"0.51722383",
"0.5169057",
"0.51664513",
"0.5166143",
"0.5165995",
"0.516513",
"0.5164418",
"0.5164076",
"0.51631457",
"0.5163028",
"0.5159297",
"0.5157875",
"0.5155456",
"0.5144499",
"0.514227",
"0.51409334",
"0.51379305"
] | 0.8077412 | 0 |
Check if desired count is honoured, scale up if not. | public void honourDesiredCount() {
int totalDeploymentCount = getDeployments().size();
// log.info("[Total count] " + totalDeploymentCount + " [Desired Count] " + desiredCount);
while (totalDeploymentCount < desiredCount) {
log.info("Scaling UP: REASON -> [Total Count] " + totalDeploymentCount + " < [Desired Count] " +
desiredCount);
scaleUp("honourDesiredCount");
totalDeploymentCount = getDeployments().size();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void honourMaxCount() {\n // Get free and total counts\n int freeCount = getFreeLaunchers().size();\n int totalCount = getTotalLaunchers().size();\n\n // Scale down if max is exceeded, irrespective of free buffer count\n if (totalCount > maxCount) {\n log.info(\"Scaling down until [freeBufferCount] \" + freeBufferCount + \" is met since [Max Count] \"\n + maxCount + \" has been exceeded.\");\n\n while (freeCount <= freeBufferCount){\n log.info(\"Scaling DOWN: REASON -> [Total Count] \" + totalCount + \" > [Max Count] \" + maxCount);\n scaleDown();\n freeCount = getFreeLaunchers().size();\n }\n\n totalCount = getTotalLaunchers().size();\n freeCount = getFreeLaunchers().size();\n\n log.info(\"Stats after scale down operation: [Total Count] \" + totalCount + \", [Free Count] \" + freeCount);\n\n return;\n }\n\n // Don't scale down if there are not enough free launchers\n if (freeCount <= freeBufferCount) {\n log.info(\"Not scaling down since [Free Count] \" + freeCount + \" <= [Free Buffer Size] \" +\n freeBufferCount + \"...\");\n return;\n }\n\n // Don't scale down if the desired count is not exceeded\n if (totalCount <= desiredCount) {\n log.info(\"Not scaling down since [Total Count] \" + totalCount + \" <= [Desired Count] \" +\n desiredCount + \"...\");\n return;\n }\n\n // Scale down if desired count is exceeded, but with more free launchers than buffer count by stepDown count\n // TODO: to test scale down\n if ((freeCount - stepDown) >= freeBufferCount) {\n log.info(\"Scaling DOWN: REASON -> [Total Count] \" + totalCount + \" > [Desired Count] \" + desiredCount +\n \" AND [Free Count] - [Step Down] \" + freeCount + \" - \" + stepDown +\n \" >= [Free Buffer Count] \" + freeBufferCount);\n\n scaleDown();\n return;\n }\n\n // If after scaling down there wouldn't be enough free launchers, don't scale down\n log.info(\"Not scaling down since [Free Count] + [Step Down] \" + freeCount + \" + \" + stepDown +\n \" < [Free Buffer Count] \" + freeBufferCount);\n }",
"int tryScale(){\n int numAccepted = 0;\n \n for(int c=0; c<numCandScaleTuning; c++){\n DoubleMatrix1D y = nextCandidate();\n if(checkCandidate(y))//accept\n numAccepted++;\n }\n \n return numAccepted;\n }",
"boolean hasMaxCount();",
"private boolean hasNumberThreshold() {\r\n return entity.getActualNumber() < entity.getTheoreticalNumber();\r\n }",
"int getScaleCount();",
"public int adjustForCrowding() {\n int deadGuppyCount = 0;\n\n Collections.sort(this.guppiesInPool, new Comparator<Guppy>() {\n @Override\n public int compare(Guppy g1, Guppy g2) {\n return Double.compare(g1.getHealthCoefficient(), g2.getHealthCoefficient());\n }\n });\n\n Guppy weakestGuppy;\n Iterator<Guppy> it = guppiesInPool.iterator();\n double volumeNeeded = this.getGuppyVolumeRequirementInLitres();\n\n while (it.hasNext() && volumeNeeded > this.getVolumeLitres()) {\n weakestGuppy = it.next();\n volumeNeeded -= (weakestGuppy.getVolumeNeeded() / ML_TO_L_CONVERSION);\n\n weakestGuppy.setIsAlive(false);\n\n\n deadGuppyCount++;\n\n }\n return deadGuppyCount;\n }",
"public void honourFreeBufferCount() {\n // Check if there are enough free launchers\n int freeCount = getFreeLaunchers().size();\n\n while (freeCount < freeBufferCount) {\n if (getTotalLaunchers().size() > maxCount) {\n log.warn(\"Specified Maximum Concurrency has been exceeded, but scaling up will be permitted. If this \" +\n \"message appears often increase maximum concurrency.\");\n }\n\n log.info(\"Scaling UP: REASON -> [Free Count] \" + freeCount + \" < [Free Gap] \" + freeBufferCount);\n scaleUp(\"honourFreeBufferCount\");\n freeCount = getFreeLaunchers().size();\n }\n }",
"@Test\n void testScaleUp() throws OperationFailedException {\n\n ScaledObjectAreaChecker checker = new ScaledObjectAreaChecker(SCALE_FACTOR);\n\n // Create an object that is a small circle\n ObjectMask unscaled = CircleObjectFixture.circleAt(new Point2d(8, 8), 7);\n checker.assertConnected(\"unscaled\", unscaled);\n\n ObjectMask scaled = unscaled.scale(checker.factor());\n\n checker.assertConnected(\"scaled\", scaled);\n checker.assertExpectedArea(unscaled, scaled);\n }",
"private void optimizeLimitCount() {\n TreeNode currentTreeNode = treeLeaf;\n while (!(currentTreeNode instanceof SourceTreeNode)) {\n if (currentTreeNode instanceof CountGlobalTreeNode) {\n CountGlobalTreeNode countGlobalTreeNode = CountGlobalTreeNode.class.cast(currentTreeNode);\n if (countGlobalTreeNode.getAfterRequirementList().isEmpty() &&\n countGlobalTreeNode.getBeforeRequirementList().isEmpty() &&\n countGlobalTreeNode.getInputNode() instanceof RangeGlobalTreeNode) {\n RangeGlobalTreeNode rangeGlobalTreeNode = RangeGlobalTreeNode.class.cast(countGlobalTreeNode.getInputNode());\n if (rangeGlobalTreeNode.getAfterRequirementList().isEmpty() &&\n rangeGlobalTreeNode.getBeforeRequirementList().isEmpty() &&\n rangeGlobalTreeNode.getLow() == 0 &&\n rangeGlobalTreeNode.getHigh() > 0) {\n countGlobalTreeNode.setLimitCount(rangeGlobalTreeNode.getHigh());\n countGlobalTreeNode.setInputNode(rangeGlobalTreeNode.getInputNode());\n if (countGlobalTreeNode.getInputNode() instanceof EdgeTreeNode) {\n ((EdgeTreeNode) countGlobalTreeNode.getInputNode()).setFetchPropFlag(true);\n }\n }\n }\n }\n currentTreeNode = UnaryTreeNode.class.cast(currentTreeNode).getInputNode();\n }\n }",
"boolean hasScaler();",
"private static boolean hasCapacityForMultiEvaluation() {\n // return true;\n int threshold = 3;\n int available = Runtime.getRuntime().availableProcessors() * ServerRunner.getProcessorMultiplier();\n return available >= threshold;\n }",
"public boolean limitHit() {\r\n return (count >= maxCount);\r\n }",
"private int computeCount() {\n \n int count;\n try{\n count = this.clippingFeatures.size() * this.featuresToClip.size();\n }catch(ArithmeticException e ){\n \n count = Integer.MAX_VALUE;\n }\n return count;\n }",
"public void setDesiredCount(Integer desiredCount) {\n this.desiredCount = desiredCount;\n }",
"private boolean canReduceBins() {\n\t\tint oldBinCount = binCount;\n\t\tboolean canReduce = false;\n\t\tbinCount = binCount / 2;\n\t\tint[] chromosome = eliteChromosome.clone();\n\n\t\tif (getFitness(chromosome) <= binCount)\n\t\t\tcanReduce = true;\n\t\telse\n\t\t\tcanReduce = false;\n\t\tbinCount = oldBinCount; //no side effects\n\t\treturn canReduce;\n\t}",
"@Override\r\n\tint check_sweetness() {\n\t\treturn 30;\r\n\t}",
"private void percentageScaling() {\n switch (slot) {\n case Torso -> updateBonusStats(1);\n case Head -> updateBonusStats(0.8);\n case Legs -> updateBonusStats(0.6);\n }\n }",
"private boolean isWithInScale(Rule r) {\n return ((r.getMinScaleDenominator() - TOLERANCE) <= scaleDenominator)\n && ((r.getMaxScaleDenominator() + TOLERANCE) > scaleDenominator);\n }",
"public static boolean exceedsMaxCount() {\n final long maxTestCount = HostConfig.getMaxTestCount();\n return (maxTestCount > 0) && (mTestCount >= maxTestCount);\n }",
"public boolean hasScale() { return hasScale; }",
"public Boolean IsNormally() {\n Random r = new Random();\n int k = r.nextInt(100);\n //5%\n if (k <= 5) {\n normally++;\n return true;\n }\n return false;\n }",
"protected boolean checkLoad() {\n\t\treturn size <= maxThreshold;\n\t\t//return (size >= minThreshold || size <= minCapacity) && size <= maxThreshold;\n\t}",
"private void setSampleCount(ObjectName sentinel, long sampleCount) throws AttributeNotFoundException, InstanceNotFoundException, MBeanException, ReflectionException {\n when(mbeanServer.getAttribute(sentinel, \"Count\")).thenReturn(sampleCount);\n }",
"private boolean tryCounterExample(BDD reachableStates){\n\t\tBDD counterExample = reachableStates.andWith(buildEndGame());\n\t\t\n\t\treturn counterExample.satCount(this.dimension * this.dimension - 1) == 0 ? true : false;\n\t}",
"private static final boolean mpeg1_scale_bitcount(final Jlame_internal_flags gfc, final Jgr_info cod_info) {\n\t\tint max_slen1 = 0, max_slen2 = 0;\n\n\t\t/* maximum values */\n\t\tint[] tab;\n\t\tfinal int[] scalefac = cod_info.scalefac;\n\n\t\t// assert(all_scalefactors_not_negative(scalefac, cod_info.sfbmax));\n\n\t\tint sfb;\n\t\tif( cod_info.block_type == Jencoder.SHORT_TYPE ) {\n\t\t\ttab = scale_short;\n\t\t\tif( cod_info.mixed_block_flag ) {\n\t\t\t\ttab = scale_mixed;\n\t\t\t}\n\t\t} else { /* block_type == 1,2,or 3 */\n\t\t\ttab = scale_long;\n\t\t\tif( ! cod_info.preflag ) {\n\t\t\t\tfor( sfb = 11; sfb < Jencoder.SBPSY_l; sfb++ ) {\n\t\t\t\t\tif( scalefac[sfb] < Jquantize_pvt.pretab[sfb] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif( sfb == Jencoder.SBPSY_l ) {\n\t\t\t\t\tcod_info.preflag = true;\n\t\t\t\t\tfor( sfb = 11; sfb < Jencoder.SBPSY_l; sfb++ ) {\n\t\t\t\t\t\tscalefac[sfb] -= Jquantize_pvt.pretab[sfb];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor( sfb = 0; sfb < cod_info.sfbdivide; sfb++ ) {\n\t\t\tif( max_slen1 < scalefac[sfb]) {\n\t\t\t\tmax_slen1 = scalefac[sfb];\n\t\t\t}\n\t\t}\n\n\t\tfor( ; sfb < cod_info.sfbmax; sfb++) {\n\t\t\tif( max_slen2 < scalefac[sfb]) {\n\t\t\t\tmax_slen2 = scalefac[sfb];\n\t\t\t}\n\t\t}\n\n\t\t/* from Takehiro TOMINAGA <[email protected]> 10/99\n\t\t * loop over *all* posible values of scalefac_compress to find the\n\t\t * one which uses the smallest number of bits. ISO would stop\n\t\t * at first valid index */\n\t\tcod_info.part2_length = LARGE_BITS;\n\t\tfor( int k = 0; k < 16; k++ ) {\n\t\t\tif( max_slen1 < slen1_n[k] && max_slen2 < slen2_n[k]\n\t\t\t\t\t&& cod_info.part2_length > tab[k] ) {\n\t\t\t\tcod_info.part2_length = tab[k];\n\t\t\t\tcod_info.scalefac_compress = k;\n\t\t\t}\n\t\t}\n\t\treturn cod_info.part2_length == LARGE_BITS;\n\t}",
"protected synchronized boolean isIngestLimitEnabled() {\n return ingestLimit >= 0;\n }",
"public boolean isOverThreshold(){return isOverThreshold;}",
"private boolean shouldApply() {\n return nextRandomInt() >= unappliedJobCutoff;\n }",
"protected void checkThreshold(int count) throws IOException\n {\n if (!thresholdExceeded && (written + count > threshold))\n {\n thresholdReached();\n thresholdExceeded = true;\n }\n }",
"protected void checkSize()\n {\n // check if pruning is required\n if (m_cCurUnits > m_cMaxUnits)\n {\n synchronized (this)\n {\n // recheck so that only one thread prunes\n if (m_cCurUnits > m_cMaxUnits)\n {\n prune();\n }\n }\n }\n }",
"double getMissChance();",
"@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkImageScale() {\n\t\tboolean flag = oTest.checkImageScale();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}",
"public void reduceAnimalHappiness() {\n\t\thappiness -= 10;\n\t}",
"@Test\n void maxQuality() {\n Item[] items = new Item[]{\n new Item(\"Aged Brie\", 10, 50),\n new Item(\"Backstage passes to a TAFKAL80ETC concert\", 5, 49),\n new Item(\"Aged Brie\", 10, 40)\n };\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n for (Item item : app.items) {\n assertTrue(50 >= item.quality, \"Quality shouldn't overtake its max capacity\");\n }\n }",
"private boolean incrementGazingCountAndCheck(int beingId,\n Palantir palantir) {\n // TODO - You fill in here.\n // @@ Something(s) important are missing here! Read the spec above..\n // @@ Fixed by adding the shutdown call in else statement\n if(mGazingThreads.incrementAndGet() <= mBeingCount.get()){\n return true;\n }\n else{\n //Shutdown if there has been an error and there are more\n //gazers than Palantiri\n mPresenter.shutdown();\n return false;\n }\n }",
"@Test(timeout = 4000)\n public void test31() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setIgnoreClass(true);\n discretize0.m_NumBins = (-3104);\n discretize0.m_MakeBinary = true;\n try { \n discretize0.setInputFormat((Instances) null);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // Can't ignore class when changing the number of attributes!\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }",
"public static void handleEffectChances() {\n for (int i=0 ; i<5 ; i++) {\n effectChances.set(i, effectChances.get(i)+((int) Math.ceil(((double)stageCount)/5))*2);\n }\n }",
"public boolean checkResponse(int scaleResponse) {\r\n return scaleResponse>=minScale && scaleResponse<=maxScale;\r\n }",
"boolean hasQualityMax();",
"public double trueCount() {\n\t\t\t\n\t\t\treturn (double)total_count/((double)size/52);\n\t\t}",
"public boolean checkIfPlayerHoldsExplosive () { return noOfExplosives > 0; }",
"@Override\r\n\tint check_sweetness() {\n\t\treturn 10;\r\n\t}",
"@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }",
"protected boolean IsHighExplosive()\r\n {\r\n \t// Wrapper function to make code a little cleaner.\r\n // isInvulnerable() is wrongly named and instead represents the specific\r\n // skull type the wither has launched\r\n \t\r\n \treturn isInvulnerable();\r\n }",
"public boolean use(int value){durability -= value; if(durability == 0) return true; return false;}",
"@Override\n\tpublic boolean canfitSmall() {\n\t\treturn true;\n\t}",
"private boolean ifTooEmpty() {\n if (items.length <= 8) {\n return false;\n }\n float efficiency = (float) size / (float) items.length;\n return efficiency < 0.25;\n }",
"private void checkIfHungry(){\r\n\t\tif (myRC.getEnergonLevel() * 2.5 < myRC.getMaxEnergonLevel()) {\r\n\t\t\tmission = Mission.HUNGRY;\r\n\t\t}\r\n\t}",
"@Test\n\tpublic void activeHires()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfActiveHires() == 1);\n\t}",
"@Override\n public boolean check(RealPlayer realPlayer) {\n for (Map.Entry<Resource, Integer> entry : productionPowerInput.entrySet()) {\n if (entry.getValue() > realPlayer.getPersonalBoard().getSpecificResourceCount(entry.getKey().getResourceType()))\n return false;\n }\n return true;\n }",
"int getWrongScale();",
"private boolean hasCapacity() {\n int used = 0 + evaluations.size() * 2;\n int available = Runtime.getRuntime().availableProcessors() * ServerRunner.getProcessorMultiplier();\n return used < available;\n }",
"boolean hasCount();",
"boolean isCounting();",
"private boolean decideIfEventShouldBeReportedAsAFailure() {\n \tint value = new Random().nextInt(100);\n \tif (value < TARGET_SUCCESS_RATE) {\n \t\treturn false;\n \t} else {\n \treturn true;\n \t}\n }",
"@Override\n\tpublic long procount() {\n\t\treturn 0;\n\t}",
"private static boolean canPack(int bigCount, int smallCount, int goal) {\n\n//Check if all parameters are in valid range\n if (bigCount < 0 || smallCount < 0 || goal < 0)\n return false;\n\n int pack = 0;\n\n //While we haven't created a pack\n while (pack < goal) {\n //see if a big flour bag can fit in the package\n if (bigCount > 0 && (pack + 5) <= goal) {\n bigCount--;\n pack += 5;\n\n }\n //see there is a small flour bag left, to add to the package\n else if (smallCount > 0) {\n smallCount--;\n pack += 1;\n }\n //if a big bag won't fit (or doesnt exist) and we dont have enough small bags\n else\n return false;\n }\n return (pack == goal);\n }",
"@Nullable Uint64 getScaleOutThreshold();",
"private void scaleToPositive() {\r\n // Obtain min value\r\n double minScalarization = Double.MAX_VALUE;\r\n for (S solution : solutions()) {\r\n if (scalarization.getAttribute(solution) < minScalarization) {\r\n minScalarization = scalarization.getAttribute(solution);\r\n }\r\n }\r\n if (minScalarization < 0) {\r\n // Avoid scalarization values of 0\r\n double eps = 10e-6;\r\n for (S solution : solutions()) {\r\n scalarization.setAttribute(solution, eps + scalarization.getAttribute(solution) + minScalarization);\r\n }\r\n }\r\n }",
"private void setMaxThreshold() {\n maxThreshold = value - value * postBoundChange / 100;\n }",
"public static void performanceCountDisable() { }",
"@Override\n public int status() {\n if (currentLoad <= maxLoad && currentLoad >= 0.6 * maxLoad) return GOOD;\n if (currentLoad < 0.6 * maxLoad && currentLoad >= 0.1 * maxLoad) return CHECK;\n else return BAD;\n }",
"private boolean checkGreedyDefense() {\r\n return enTotal.get(2)+1 < myTotal.get(2) && enTotal.get(0)+1 < myTotal.get(0);\r\n }",
"void setMaxScale(int value);",
"private void checkForCPUChance()\n\t\t\t{\n\t\t\t\tf12 = false;\n\t\t\t\tfor (m = 0; m < 8; ++m)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (lose[m] == 2 && win[m] == 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tf12 = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\tif (f12 == false)\n\t\t\t\t\tm = 10;\n\n\t\t\t}",
"public void setSuspectedCount(String suspectedCount) {\n this.suspectedCount = suspectedCount;\n }",
"@Override\n protected void setup(){\n /* if(\"red\".equals(contrast) && \"round\".equals(ShapeAgent.shape)){\n System.out.println(\"Detected \"+count +\" Microneurysms in input image\");\n \n\n }\n else if((\"light yellow\".equals(contrast) && \"round\".equals(ShapeAgent.shape)) || (\"yellow\".equals(contrast) && \"round\".equals(ShapeAgent.shape))){\n System.out.println(\"Detected \"+count +\" exudates in input image\");\n\n }\n else if((\"dark yellow\".equals(contrast) && \"round\".equals(ShapeAgent.shape)) || (\"yellow\".equals(contrast) && \"round\".equals(ShapeAgent.shape))){\n System.out.println(\"Detected \"+count +\" exudates in input image\");\n\n }\n else{\n System.out.println(\"Complecated situation appeared with count agent\");\n\n }*/\n \n if(((1.12<BrightnessAgent.contrast) && (3.12>BrightnessAgent.contrast)) && ShapeAgent.shape >=0.8){\n System.out.println(\"Detected \"+count +\" Microneurysms in input image\"); \n }\n else if(((3.12<BrightnessAgent.contrast) && (4.12>BrightnessAgent.contrast)) && ShapeAgent.shape < 0.8){\n System.out.println(\"Detected \"+count +\" exudates in input image\"); \n }\n else if(((3.12<BrightnessAgent.contrast) && (4.12>BrightnessAgent.contrast)) && ShapeAgent.shape >= 0.8){\n System.out.println(\"Detected \"+count +\" exudates in input image\"); \n }\n else{\n System.out.println(\"Complecated situation occured in shape identification\");\n }\n doDelete();\n}",
"public Boolean IsAbnormally() {\n Random r = new Random();\n int k = r.nextInt(100);\n //1%\n if (k <= 1) {\n abnormally++;\n return true;\n }\n return false;\n }",
"void initScale(){\n samplingScale = getScaleAdaptive(x);\n }",
"@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }",
"@Test\n\tpublic void testQualityUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Conjured Mana Cake\", 1, -1));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Quality with quality under 0 Conjured Mana Cake\", -1, quality);\n\t}",
"private int isPrivacyModelFulfilled(Transformation<?> transformation, HashGroupifyEntry entry) {\n \n // Check minimal group size\n if (minimalClassSize != Integer.MAX_VALUE && entry.count < minimalClassSize) {\n return 0;\n }\n \n // Check other criteria\n // Note: The d-presence criterion must be checked first to ensure correct handling of d-presence with tuple suppression.\n // This is currently ensured by convention. See ARXConfiguration.getCriteriaAsArray();\n for (int i = 0; i < classBasedCriteria.length; i++) {\n if (!classBasedCriteria[i].isAnonymous(transformation, entry)) {\n return i + 1;\n }\n }\n return -1;\n }",
"private void handleShrinking( GameState state )\r\n\t{\n\t\t\r\n\t\tint shrinkLength = (int)(shrinkPercent * entities.length);\r\n\t\t\r\n\t\tif ( size < shrinkLength )\r\n\t\t{\r\n\t\t\tshrinkTime += state.seconds;\r\n\t\t\t\r\n\t\t\tif ( shrinkTime >= shrinkReadyTime )\r\n\t\t\t{\r\n\t\t\t\tentities = Arrays.copyOf( entities, shrinkLength );\r\n\t\t\t\tshrinkTime = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tshrinkTime = 0;\r\n\t\t}\r\n\t}",
"private static final boolean mpeg2_scale_bitcount(final Jlame_internal_flags gfc, final Jgr_info cod_info) {\n\t\tfinal int max_sfac[] = new int[4];\n\t\tint[] partition_table;\n\t\tfinal int[] scalefac = cod_info.scalefac;\n\n\t\t/*\n\t\t Set partition table. Note that should try to use table one,\n\t\t but do not yet...\n\t\t */\n\t\tfinal int table_number = cod_info.preflag ? 2 : 0;\n\n\t\tfor( int i = 0; i < 4; i++ ) {\n\t\t\tmax_sfac[i] = 0;\n\t\t}\n\n\t\tint row_in_table;\n\t\tif( cod_info.block_type == Jencoder.SHORT_TYPE ) {\n\t\t\trow_in_table = 1;\n\t\t\tpartition_table = Jquantize_pvt.nr_of_sfb_block[table_number][row_in_table];//[0];\n\t\t\tfor( int sfb = 0, partition = 0; partition < 4; partition++ ) {\n\t\t\t\tfinal int nr_sfb = partition_table[partition];\n\t\t\t\tfor( final int end = sfb + nr_sfb; sfb < end; ) {\n\t\t\t\t\tif( scalefac[sfb] > max_sfac[partition]) {\n\t\t\t\t\t\tmax_sfac[partition] = scalefac[sfb];\n\t\t\t\t\t}\n\t\t\t\t\tsfb++;\n\t\t\t\t\tif( scalefac[sfb] > max_sfac[partition]) {\n\t\t\t\t\t\tmax_sfac[partition] = scalefac[sfb];\n\t\t\t\t\t}\n\t\t\t\t\tsfb++;\n\t\t\t\t\tif( scalefac[sfb] > max_sfac[partition]) {\n\t\t\t\t\t\tmax_sfac[partition] = scalefac[sfb];\n\t\t\t\t\t}\n\t\t\t\t\tsfb++;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\trow_in_table = 0;\n\t\t\tpartition_table = Jquantize_pvt.nr_of_sfb_block[table_number][row_in_table];//[0];\n\t\t\tfor( int sfb = 0, partition = 0; partition < 4; partition++ ) {\n\t\t\t\tfinal int nr_sfb = partition_table[partition];\n\t\t\t\tfor( int i = 0; i < nr_sfb; i++, sfb++ ) {\n\t\t\t\t\tif( scalefac[sfb] > max_sfac[partition] ) {\n\t\t\t\t\t\tmax_sfac[partition] = scalefac[sfb];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tint over = 0;\n\t\tfor( int partition = 0; partition < 4; partition++ ) {\n\t\t\tif( max_sfac[partition] > max_range_sfac_tab[table_number][partition] ) {\n\t\t\t\tover++;\n\t\t\t}\n\t\t}\n\t\tif( 0 == over ) {\n\t\t\tfinal int[] slen = cod_info.slen;// java\n\t\t\t/*\n\t\t\t Since no bands have been over-amplified, we can set scalefac_compress\n\t\t\t and slen[] for the formatter\n\t\t\t */\n\t\t\t// static final int log2tab[] = { 0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4 };\n\n\t\t\tcod_info.sfb_partition_table = Jquantize_pvt.nr_of_sfb_block[table_number][row_in_table];\n\n\t\t\t/* set scalefac_compress */\n\t\t\tfinal int slen1 = log2tab[ max_sfac[0] ];\n\t\t\tfinal int slen2 = log2tab[ max_sfac[1] ];\n\t\t\tfinal int slen3 = log2tab[ max_sfac[2] ];\n\t\t\tfinal int slen4 = log2tab[ max_sfac[3] ];\n\n\t\t\tslen[0] = slen1;\n\t\t\tslen[1] = slen2;\n\t\t\tslen[2] = slen3;\n\t\t\tslen[3] = slen4;\n\n\t\t\tswitch( table_number ) {\n\t\t\tcase 0:\n\t\t\t\tcod_info.scalefac_compress = (((slen1 * 5) + slen2) << 4) + (slen3 << 2) + slen4;\n\t\t\t\tbreak;\n\n\t\t\tcase 1:\n\t\t\t\tcod_info.scalefac_compress = 400 + (((slen1 * 5) + slen2) << 2) + slen3;\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\tcod_info.scalefac_compress = 500 + (slen1 * 3) + slen2;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tJutil.lame_errorf( gfc, \"intensity stereo not implemented yet\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t//}\n\t\t//if( 0 == over ) {\n\t\t\tcod_info.part2_length = slen1 * cod_info.sfb_partition_table[0];\n\t\t\tcod_info.part2_length += slen2 * cod_info.sfb_partition_table[1];\n\t\t\tcod_info.part2_length += slen3 * cod_info.sfb_partition_table[2];\n\t\t\tcod_info.part2_length += slen4 * cod_info.sfb_partition_table[3];\n\t\t}\n\t\treturn over != 0;\n\t}",
"public boolean supportsEfficientCount()\n {\n // MySQL/InnoDB does not provide efficient record counting\n return !this.isMySQLInnoDB();\n }",
"@Override\n public int viability() {\n int[] newStats = getNewStats();\n return newStats[0] * newStats[1];\n }",
"public void setLikelinessToGetKilled(int likelinessToGetKilled) {\n this.likelinessToGetKilled = likelinessToGetKilled;\n }",
"protected static void adaptivaeThresholdCalc() {\n\t\tif (triggerCount > 3) {\n\t\t\tthreshold /= 0.9;\n\t\t\t// Log.d(\"visualizer\", \"threshold up to \" + threshold);\n\t\t}\n\t\tif (triggerCount < 2) {\n\t\t\tthreshold *= 0.9;\n\t\t\t// Log.d(\"visualizer\", \"threshold down to \" + threshold);\n\t\t}\n\n\t\tif (threshold < 1.5f)\n\t\t\tthreshold = 1.5f;\n\t}",
"@Override\r\n\tpublic boolean wasIncident() {\r\n\t\tdouble random = Math.random()*100;\r\n\t\tif(random<=25) return true;\r\n\t\treturn false;\r\n\t}",
"private void tickIsInProduction() {\n if (this.timeInState == this.unitInfo.getProductionTime() - 1) {\n this.player.setSuppliesMax(this.player.getSuppliesMax() + this.unitInfo.getSuppliesGain());\n changeState(this.unitInfo.getUnitStateAfterProduction());\n \n if (this.producer != null)\n this.producer.changeState(UnitState.HOLD);\n }\n \n }",
"@Override\n public int maxHealth() {\n return 25;\n }",
"@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }",
"public abstract boolean isRateLimit();",
"@Override\n protected void onAfterSplitBrainHealed(HazelcastInstance[] instances) {\n mergeLifecycleListener.await();\n\n assertContainsCounterStatsEventually(true, instances[0], instances[1]);\n assertContainsCounterStatsEventually(false, instances[2]);\n }",
"boolean shouldReportMetrics();",
"void compute() {\n\n if (random.nextBoolean()) {\n value = value + random.nextInt(variation);\n ask = value + random.nextInt(variation / 2);\n bid = value + random.nextInt(variation / 2);\n } else {\n value = value - random.nextInt(variation);\n ask = value - random.nextInt(variation / 2);\n bid = value - random.nextInt(variation / 2);\n }\n\n if (value <= 0) {\n value = 1.0;\n }\n if (ask <= 0) {\n ask = 1.0;\n }\n if (bid <= 0) {\n bid = 1.0;\n }\n\n if (random.nextBoolean()) {\n // Adjust share\n int shareVariation = random.nextInt(100);\n if (shareVariation > 0 && share + shareVariation < stocks) {\n share += shareVariation;\n } else if (shareVariation < 0 && share + shareVariation > 0) {\n share += shareVariation;\n }\n }\n }",
"@Override\n\tpublic boolean isCovered() {\n\t\treturn (falseCount > 0) && (trueCount > 0);\n\t}",
"public boolean nearMaxRescue() {\n double water = this.waterLevel;\n double no = (this.configuration.getMaximalLimitLevel()\n - this.configuration.getMaximalNormalLevel()) / 2;\n if (water > this.configuration.getMaximalLimitLevel()\n || water > this.configuration.getMaximalLimitLevel() - no) {\n return true;\n } else if (water < this.configuration.getMinimalLimitLevel()\n || water < this.configuration.getMinimalLimitLevel() + no) {\n\n return true;\n }\n return false;\n }",
"private void analyzeWithEarlyAbort(Transformation<?> transformation) {\n \n // We have only checked k-anonymity so far\n minimalClassSizeFulfilled = (currentNumOutliers <= suppressionLimit);\n \n // Abort early, if only k-anonymity was specified\n if (classBasedCriteria.length == 0 && sampleBasedCriteria.length == 0) {\n privacyModelFulfilled = minimalClassSizeFulfilled;\n return;\n }\n \n // Abort early, if k-anonymity sub-criterion is not fulfilled\n // CAUTION: This leaves GroupifyEntry.isNotOutlier and currentOutliers in an inconsistent state\n // for non-anonymous transformations\n if (minimalClassSize != Integer.MAX_VALUE && !minimalClassSizeFulfilled) {\n privacyModelFulfilled = false;\n return;\n }\n \n // Iterate over all classes\n currentNumOutliers = 0;\n HashGroupifyEntry entry = hashTableFirstEntry;\n while (entry != null) {\n \n // Check for anonymity\n int anonymous = isPrivacyModelFulfilled(transformation, entry);\n \n // Determine outliers\n if (anonymous != -1) {\n \n // Note: If d-presence exists, it is stored at criteria[0] by convention.\n // If it fails, isAnonymous(entry) thus returns 1.\n // Tuples from the public table that have no matching candidates in the private table\n // and that do not fulfill d-presence cannot be suppressed. In this case, the whole\n // transformation must be considered to not fulfill the privacy criteria.\n // CAUTION: This leaves GroupifyEntry.isNotOutlier and currentOutliers in an inconsistent state\n // for non-anonymous transformations\n if (privacyModelContainsDPresence && entry.count == 0 && anonymous == 1) {\n this.privacyModelFulfilled = false;\n return;\n }\n currentNumOutliers += entry.count;\n \n // Break as soon as too many classes are not anonymous\n // CAUTION: This leaves GroupifyEntry.isNotOutlier and currentOutliers in an inconsistent state\n // for non-anonymous transformations\n if (currentNumOutliers > suppressionLimit) {\n this.privacyModelFulfilled = false;\n return;\n }\n }\n \n // We only suppress classes that are contained in the research subset\n entry.isNotOutlier = entry.count != 0 ? (anonymous == -1) : true;\n \n // Next class\n entry = entry.nextOrdered;\n }\n \n this.analyzeSampleBasedCriteria(transformation, true);\n this.privacyModelFulfilled = (currentNumOutliers <= suppressionLimit);\n }",
"private void checkForNewAppliancesAndUpdateConstants()\n\t{\n\t\t// This could be more sophisticated, but for now all this needs to do is\n\t\t// make sure that\n\t\t// the wattbox assigns load only according to the rated heat pump and\n\t\t// immersion capacity\n\t\t// of its owner\n\t\tthis.maxHeatPumpElecDemandPerTick = (this.owner.ratedPowerHeatPump * 24 / this.ticksPerDay);\n\t\tthis.maxImmersionHeatPerTick = Consts.MAX_DOMESTIC_IMMERSION_POWER * 24 / this.ticksPerDay;\n\t}",
"private static void loopWithCheck(int upperLimit, QuitObject q) {\r\n\t\t\tint i;\r\n\t\t\tdouble temp;\r\n\t\t\t\r\n\t\t\tfor (i=0; i<upperLimit; i++) {\r\n\t\t\t\tif(q.getGreaterThan()==q.getLessThan()){\r\n\t\t\t\t\tq.setFinalCount(i+10000);\r\n\t\t\t\t\tq.setStatus(1);\r\n\t\t\t\t\tquitProgram(q);\r\n\t\t\t\t}\r\n\t\t\t\ttemp = Math.random();\r\n\t\t\t\tif (temp > 0.5) {\r\n\t\t\t\t\tq.addOneGreaterThan();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tq.addOneLessThan();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tq.setFinalCount(i+10000);\r\n\t\t\tq.setStatus(2);\r\n\t\t\tquitProgram(q);\r\n\t\t\t\r\n\t\t}",
"bool setFrequency(double newFrequency)\n {\n if (newFrequency > 534 && newFrequency < 1606)\n {\n frequency = newFrequency\n return true;\n }\n return false;\n }",
"protected void setSampleCountImpl(int newSampleCount) {\n\t\tif (sampleCount != newSampleCount) {\n\t\t\tsampleCount = newSampleCount;\n\t\t}\n\t}",
"@Test(timeout = 4000)\n public void test14() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getBinRangesString(2607);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }",
"public void setGrilledVegetables(double countNo) {\n grilledVegetables = countNo;\r\n }",
"void normalizeSafe()\r\n {\r\n float fLengthSquared = lengthSquared();\r\n if ( 0.0f == fLengthSquared )\r\n {\r\n set(ZERO);\r\n }\r\n else\r\n {\r\n scale(1.0f/(float)Math.sqrt(fLengthSquared));\r\n }\r\n }",
"public boolean haveCount () ;",
"@java.lang.Override\n public boolean hasScaler() {\n return ((bitField0_ & 0x00000001) != 0);\n }",
"@java.lang.Override\n public boolean hasScaler() {\n return ((bitField0_ & 0x00000001) != 0);\n }",
"private void setPositiveCount(int value) {\n m_PositiveCount = value;\n }"
] | [
"0.68046534",
"0.5934144",
"0.5749186",
"0.5625793",
"0.55970913",
"0.5552801",
"0.5513459",
"0.5510423",
"0.5466752",
"0.5451437",
"0.5409753",
"0.5393839",
"0.53265274",
"0.5311296",
"0.53080404",
"0.5301007",
"0.5298619",
"0.523202",
"0.5217201",
"0.5214217",
"0.5200636",
"0.51860905",
"0.5185079",
"0.5179355",
"0.5166261",
"0.51403034",
"0.5140149",
"0.51382476",
"0.5132378",
"0.512306",
"0.5099057",
"0.5095257",
"0.5082176",
"0.5064608",
"0.5063116",
"0.50457066",
"0.50313085",
"0.50307465",
"0.50273937",
"0.50227064",
"0.5022457",
"0.5016746",
"0.5015971",
"0.501389",
"0.5012115",
"0.49945614",
"0.4975253",
"0.49656507",
"0.49611172",
"0.49475977",
"0.4940939",
"0.49378183",
"0.49357653",
"0.49345297",
"0.49244294",
"0.49151608",
"0.49126038",
"0.49109444",
"0.49078324",
"0.49064085",
"0.48998487",
"0.48962578",
"0.4893561",
"0.48922068",
"0.48921826",
"0.48855436",
"0.48782444",
"0.4877529",
"0.4873773",
"0.4871684",
"0.48660427",
"0.48656714",
"0.48646462",
"0.4861071",
"0.4859032",
"0.485159",
"0.4851465",
"0.48478556",
"0.4840804",
"0.48231956",
"0.4819749",
"0.481835",
"0.48177123",
"0.48174518",
"0.48150575",
"0.48121047",
"0.48085114",
"0.48070046",
"0.4797854",
"0.479522",
"0.47905633",
"0.47904515",
"0.47878593",
"0.47859007",
"0.4782077",
"0.47811836",
"0.47804603",
"0.47792366",
"0.47785285",
"0.4776986"
] | 0.6980696 | 0 |
Check if free buffer count is available. | public void honourFreeBufferCount() {
// Check if there are enough free launchers
int freeCount = getFreeLaunchers().size();
while (freeCount < freeBufferCount) {
if (getTotalLaunchers().size() > maxCount) {
log.warn("Specified Maximum Concurrency has been exceeded, but scaling up will be permitted. If this " +
"message appears often increase maximum concurrency.");
}
log.info("Scaling UP: REASON -> [Free Count] " + freeCount + " < [Free Gap] " + freeBufferCount);
scaleUp("honourFreeBufferCount");
freeCount = getFreeLaunchers().size();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isEmptyBufferAvailable()\n {\n return circularBuffer.canWrite();\n }",
"int getBytesInBufferAvailable() {\n if (this.count == this.pos) return 0;\n else return this.buf.length - this.pos;\n }",
"public boolean isAvailable(){\r\n return blockingQueue.size() < maxWorkQueueSize;\r\n }",
"private final boolean hasBufferedOutputSpace() {\n return !reading && buffer.hasRemaining();\n }",
"public final int Available() {\n\t\treturn m_rxlen;\n\t}",
"public boolean isFull(){\n \treturn count==capacity;\n }",
"boolean hasCapacity();",
"public boolean isFull() {\n return (this.count == this.capacity);\n }",
"private boolean hasCapacity() {\n int used = 0 + evaluations.size() * 2;\n int available = Runtime.getRuntime().availableProcessors() * ServerRunner.getProcessorMultiplier();\n return used < available;\n }",
"boolean isInBuffer()\n {\n return m_bufferOffset_ > 0;\n }",
"public boolean isFull() {\n return count == capacity;\n }",
"public boolean isFull()\r\n\t{\r\n\t\treturn (count == capacity);\r\n\t}",
"public boolean available() throws SerialPortException {\n\t\treturn port.getInputBufferBytesCount()>0;\n\t}",
"public final boolean isDataAvailable() {\n\t\tif ( hasStatus() >= FileSegmentInfo.Available &&\n\t\t\t\t hasStatus() < FileSegmentInfo.Error)\n\t\t\treturn true;\n\t\treturn false;\n\t}",
"boolean hasPakringFree();",
"boolean hasPakringFree();",
"public boolean hasCapacity() {\n return ((bitField0_ & 0x00000040) == 0x00000040);\n }",
"public boolean checkAvailability(int num_used) {\n return num_used != this.num_uses;\n }",
"public boolean isSetBuffer() {\n return this.buffer != null;\n }",
"public boolean isSetBuffer() {\n return this.buffer != null;\n }",
"public boolean hasCapacity() {\n return ((bitField0_ & 0x00000040) == 0x00000040);\n }",
"boolean isFree(Position position);",
"public boolean hasPakringFree() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"private final boolean hasBufferedInputBytes() {\n return reading && (buffer.hasRemaining() || ungotc != -1);\n }",
"public boolean isDataAvailable()\r\n {\r\n return true;\r\n }",
"public boolean hasPakringFree() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"boolean isBeingUsed() {\n return usageCount > 0;\n }",
"protected long getBytesFree()\r\n {\r\n return this.bytesFree.get();\r\n }",
"public int available() {\n return numAvailable;\n }",
"public boolean hasPakringFree() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"private boolean updateBufferList() {\n while(!data.isEmpty() && availableFirst() == 0) {\n popBuffer();\n }\n return !data.isEmpty();\n }",
"public boolean hasPakringFree() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public boolean hasRemaining() {\r\n\t\treturn cursor < limit - 1;\r\n\t}",
"@Override\n\tpublic int available() throws IOException {\n\t\treturn buf.readableBytes();\n\t}",
"static boolean checkAvailableSpace(File path, int requiredMb){\n long spaceInMb = path.getUsableSpace() / (1024 * 1024);\n return spaceInMb >= requiredMb;\n }",
"private boolean isMemorySpaceAvailable() {\n File storagePath;\n if (getStorageDirectories(currentActivity).length > 0) {\n try {\n storagePath = new File(getStorageDirectories(currentActivity)[0]);\n } catch (Exception e) {\n //Log.e(TAG, \"Failed to set appropriate storage path: \" +\n// e.getMessage());\n setUserDownloadLocationPref(false);\n storagePath = Environment.getExternalStorageDirectory();\n }\n } else {\n setUserDownloadLocationPref(false);\n storagePath = Environment.getExternalStorageDirectory();\n }\n return getMegabytesAvailable(storagePath) > getRemainingDownloadSize();\n }",
"public boolean dataIsReady()\n {\n boolean[] status = m_receiver.getBufferStatus();\n if (status.length == 0)\n {\n return false;\n }\n for (boolean b : status)\n {\n if (!b)\n return false;\n }\n return true;\n }",
"public boolean isAvailable() {\n lock.readLock().lock();\n try {\n return available;\n } finally {\n lock.readLock().unlock();\n }\n }",
"public int available() throws IOException;",
"public int getAvailableCount();",
"@Override\r\n\tpublic boolean isFull() {\r\n\r\n\t\treturn data.size() >= maxQueue;\r\n\t}",
"public boolean verifyBuffer(Buffer buffer) {\n if (buffer.isDiscard()) {\n return true;\n }\n Object data = buffer.getData();\n if (buffer.getLength() < 0) {\n System.err.println(\"warning: data length shouldn't be negative: \" + buffer.getLength());\n }\n if (data == null) {\n System.err.println(\"warning: data buffer is null\");\n if (buffer.getLength() != 0) {\n System.err.println(\"buffer advertized length = \" + buffer.getLength() + \" but data buffer is null!\");\n return false;\n }\n } else if (data instanceof byte[]) {\n if (buffer.getLength() > ((byte[]) data).length) {\n System.err.println(\"buffer advertized length = \" + buffer.getLength() + \" but actual length = \" + ((byte[]) data).length);\n return false;\n }\n } else if ((data instanceof int[]) && buffer.getLength() > ((int[]) data).length) {\n System.err.println(\"buffer advertized length = \" + buffer.getLength() + \" but actual length = \" + ((int[]) data).length);\n return false;\n }\n return true;\n }",
"public Boolean isFree()\n\t{\n\t\treturn free;\n\t}",
"int available() {\n return numAvailable;\n }",
"private void checkCapacity() {\n\t\tif (size.get() >= region.getCapacity()) {\n\t\t\tsynchronized (cleanUpThread) {\n\t\t\t\tcleanUpThread.notify();\n\t\t\t}\n\t\t}\n\t}",
"public boolean hasBytesToSend() {\n\t\treturn !byteBufferQueue.isEmpty();\n\t}",
"boolean available()\n {\n synchronized (m_lock)\n {\n return (null == m_runnable) && (!m_released);\n }\n }",
"public boolean isFull()\r\n\t{\r\n\t\treturn numItems > MAXSIZE;\r\n\t}",
"public final long getAvailable()\n\t{\n\t\treturn entrySize - entryOffset;\n\t}",
"public int available() throws IOException {\n int ret = 0;\n for(IoBuffer buf : data) {\n ret += buf.remaining();\n }\n return ret;\n }",
"private boolean getFree() {\n \t\treturn this\n \t\t\t\t.sendData(closeBuffer(openBuffer(\"GET_SMS_CREDITS\", \"1.00\")));\n \t}",
"public boolean hasUsage() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public int getCountOfFreeDevices() {\n int count = 0;\n for (TestDevice td : mDevices) {\n if (td.getStatus() == TestDevice.STATUS_IDLE) {\n count++;\n }\n }\n return count;\n }",
"public boolean isReady() {\n return mPoints != null && mPoints.size() >= MINIMUM_SIZE;\n }",
"public void checkPktAvail()\n\t{\n\t\t// schedule the next time to poll for a packet\n\t\tinterrupt.schedule(NetworkReadPoll, (int)this, NetworkTime, NetworkRecvInt);\n\n\t\tif (inHdr.mLength != 0) \t// do nothing if packet is already buffered\n\t\t{\n\t\t\treturn;\t\t\n\t\t}\n\t\tif (!PollSocket(mSock)) \t// do nothing if no packet to be read\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// otherwise, read packet in\n\t\tchar[] buffer = new char[MaxWireSize];\n\t\treadFromSocket(mSock, buffer, MaxWireSize);\n\n\t\t// divide packet into header and data\n\t\tinHdr = new PacketHeader(buffer);\n\t\tassert((inHdr.to == mNetworkAddress) && (inHdr.mLength <= MaxPacketSize));\n//\t\tbcopy(buffer + sizeof(PacketHeader), inbox, inHdr.length);\n\n\n\t\tDebug.print('n', \"Network received packet from \"+ inHdr.from+ \", length \"+ inHdr.mLength+ \"...\\n\");\n\t\tStatistics.numPacketsRecvd++;\n\n\t\t// tell post office that the packet has arrived\n\t\tmReadHandler.call(mHandlerArg);\t\n\t}",
"public boolean hasUsage() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public final boolean hasAllocationSize() {\n return m_allocSize > 0 ? true : false;\n }",
"@Override\n public boolean isFull(){\n return (count == size);\n \n }",
"public boolean isAvailable() {\r\n\treturn available;\r\n }",
"@Override\n public boolean hasRemaining() throws IOException\n {\n return randomAccessRead.available() > 0;\n }",
"@DISPID(1) //= 0x1. The runtime will prefer the VTID if present\r\n @VTID(7)\r\n int freeBufferSpace();",
"private boolean isFull() {\n\t\treturn (size == bq.length);\n\t}",
"public boolean isAvailable() {\r\n\t\treturn available;\r\n\t}",
"public boolean isAvailable() {\n return LocalTime.now().isAfter(busyEndTime);\n }",
"public boolean isFull() {\n\t\treturn(this.size == this.capacity);\n\t}",
"public boolean isAvailable()\n {\n return available;\n }",
"public boolean isAvailable() {\n return available;\n }",
"private boolean requestLimitReached() {\n\t\treturn (requestCount >= maximumRequests);\n\t}",
"public boolean freeSpace(int neededSpace) {\n \t\treturn true;\n \t}",
"public boolean isAvailable() {\n return available;\n }",
"public boolean isAvailable() {\n return available;\n }",
"private boolean isFull() {\n\t\treturn nbmsg==getSize();\n\t}",
"public boolean isAvailable() {\n return available;\n }",
"public final boolean tryFree() {\n return free(this);\n }",
"public boolean isAbleToBeAllocated( )\r\n {\r\n // Do not allow allocation if it's too slow!\r\n if (lastTransferRateBPS < ServiceManager.sCfg.minimumAllowedTransferRate\r\n && lastTransferRateBPS > 0)\r\n {\r\n addToCandidateLog( \"Refusing candidate allocation as last transfer rate was only \" \r\n + lastTransferRateBPS + \" bps\");\r\n NLogger.debug( NLoggerNames.Download_Candidate_Allocate,\r\n \"Refusing candidate allocation as last transfer rate was only \" \r\n + lastTransferRateBPS + \" bps\");\r\n return false;\r\n }\r\n long currentTime = System.currentTimeMillis();\r\n return statusTimeout <= currentTime;\r\n }",
"private boolean needToGrow() {\n if(QUEUE[WRITE_PTR] != null) {\n return true;\n }\n else {\n return false;\n }\n }",
"public int available()\n {\n return ( _end - _pos );\n }",
"@Override\r\n\tpublic boolean isfull() {\n\t\t\r\n\t\treturn count == size ;\r\n\t}",
"public boolean isDataAvailable(){return true;}",
"public boolean getIsFree(int num)\n\t{\n\t\treturn isFree[num];\n\t}",
"public int availableBytes()\n throws IOException {\n\n // Do not know the available byte count\n return -1;\n }",
"@Override\n public boolean hasMessageAvailable() {\n return !priorityQueue.isEmpty() && priorityQueue.peekN1() <= clock.millis();\n }",
"public boolean isFull(){\n return size == arrayQueue.length;\n }",
"boolean isAvailable();",
"boolean isAvailable();",
"boolean isAvailable();",
"boolean isAvailable();",
"public boolean isFull() {\n return (e+1)%buf.length == b;\n }",
"private static void checkFreeSpace()\n {\n boolean isSpaceAvailable = false;\n int numOfFreeSpaces = 0;\n for(int index=1;index<board.length;index++)\n {\n if((board[index] == ' '))\n {\n isSpaceAvailable = true;\n numOfFreeSpaces++;\n }\n }\n if(isSpaceAvailable == false)\n {\n System.err.println(\"Board is full! You can't make another move\");\n System.exit(0);\n }\n else\n {\n System.out.println(\"Free space is available! you have \"+numOfFreeSpaces+ \" moves left\");\n }\n }",
"private boolean isEmpty() {\n int ro = reserveOffset;\n if (ro >= reserve) {\n if (queue[reserve].isCommitted()) {\n ro = reserve + 1;\n } else {\n ro = reserve;\n }\n }\n\n LOG.debug(\"Effective flush/reserve offset {}/{}\", flushOffset, ro);\n return ro <= flushOffset;\n }",
"boolean tryLoadFreeIdsIntoCache()\n {\n if ( scanner == null && !atLeastOneIdOnFreelist.get() )\n {\n // If no scan is in progress (SeekCursor now sitting and waiting at some leaf in the free-list)\n // and if we have no reason to expect finding any free id from a scan then don't do it.\n return false;\n }\n\n if ( lock.tryLock() )\n {\n try\n {\n // A new scan is commencing, clear the queue to put ids in\n pendingItemsToCacheCursor = 0;\n // Get a snapshot of the size before we start. At the end of the scan the actual space available to fill with IDs\n // may be even bigger, but not smaller. This is important because we discover IDs, mark them as non-reusable\n // and then place them in the cache so IDs that wouldn't fit in the cache would need to be marked as reusable again,\n // which would be somewhat annoying.\n int maxItemsToCache = cache.capacity() - cache.size();\n\n // Find items to cache\n if ( maxItemsToCache > 0 && findSomeIdsToCache( maxItemsToCache ) )\n {\n // Get a writer and mark the found ids as reserved\n markIdsAsReserved();\n\n // Place them in the cache so that allocation requests can see them\n placeIdsInCache();\n return true;\n }\n }\n catch ( IOException e )\n {\n throw new UncheckedIOException( e );\n }\n finally\n {\n lock.unlock();\n }\n }\n return false;\n }",
"boolean isFull() {return pointer==size;}",
"default boolean hasEnoughMemory(long memory){\n return getUnusedMemory() >= memory;\n }",
"public boolean isAvailable(){\n\t\ttry{\n\t\t\tgetPrimingsInternal(\"Test\", \"ATGATGATGATGATGATGATG\");\n\t\t}\n\t\tcatch(IOException e){\n\t\t\treturn false;\n\t\t}\n\t\tcatch(InterruptedException e){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"boolean isAvailable( long millis );",
"public boolean isFull()\r\n\t\t{\r\n\t\t\tint count = 0;\r\n\t\t\tData currentData = head;\r\n\t\t\twhile (currentData != null)\r\n\t\t\t{\r\n\t\t\t\tcount++;\r\n\t\t\t\tcurrentData = currentData.nextData();\r\n\t\t\t}\r\n\t\t\treturn (count > 2); //if the count is > 2 then it is full\r\n\t\t}",
"public boolean busyReveiced () {\n\t\t\treturn resultDetected[RESULT_INDEX_BUSY];\n\t\t}",
"boolean isAvailable() {\r\n\t\treturn available;\r\n\t}",
"public boolean isFull() {\n return size == cnt;\n }",
"private boolean ifFull() {\n return items.length == size;\n }"
] | [
"0.68514323",
"0.68264073",
"0.6670613",
"0.6561706",
"0.65221715",
"0.6516872",
"0.65122783",
"0.6455219",
"0.6400928",
"0.6379738",
"0.6356598",
"0.63444054",
"0.63192314",
"0.6310445",
"0.6261704",
"0.6261704",
"0.62572837",
"0.62518334",
"0.62510765",
"0.62510765",
"0.6233704",
"0.6225099",
"0.6190621",
"0.61872387",
"0.6180882",
"0.61796045",
"0.6172249",
"0.6160308",
"0.6160044",
"0.6156329",
"0.6155909",
"0.6149135",
"0.609241",
"0.6088869",
"0.6075714",
"0.6071255",
"0.60647285",
"0.6062685",
"0.6043279",
"0.603181",
"0.6022294",
"0.6016038",
"0.5997682",
"0.5971764",
"0.5969829",
"0.5964674",
"0.5959589",
"0.5955429",
"0.5948085",
"0.59232193",
"0.5922003",
"0.59045863",
"0.5897732",
"0.58941126",
"0.58864695",
"0.58789474",
"0.58767545",
"0.58574295",
"0.58516943",
"0.5850189",
"0.5844372",
"0.58382255",
"0.58363336",
"0.58357805",
"0.5834001",
"0.58313423",
"0.5822435",
"0.5811846",
"0.5806614",
"0.57998276",
"0.57998276",
"0.5786972",
"0.57836586",
"0.5782854",
"0.577275",
"0.57693857",
"0.57634705",
"0.5761218",
"0.57544804",
"0.57518893",
"0.5740036",
"0.57357514",
"0.5716273",
"0.5703576",
"0.5703576",
"0.5703576",
"0.5703576",
"0.5695338",
"0.56925243",
"0.5660379",
"0.56479806",
"0.56332886",
"0.5630911",
"0.56294566",
"0.5621446",
"0.5621139",
"0.56123847",
"0.56122774",
"0.5608484",
"0.5602521"
] | 0.65598315 | 4 |
Check if there are Services without corresponding Deployments, and clean them up from the launcher list. | public void cleanOrphanServices() {
log.info("Cleaning orphan Services...");
List<String> serviceNames = getServices();
for (String serviceName : serviceNames) {
if (serviceName.startsWith(Constants.BPG_APP_TYPE_LAUNCHER + "-") && !deploymentExists(serviceName)) {
log.info("Cleaning orphan Service [Name] " + serviceName + "...");
unregisterLauncherIfExistsByObjectName(serviceName);
if (!runtimeClient.deleteService(serviceName)) {
log.error("Service deletion failed [Service Name] " + serviceName);
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void addAllDeploymentsAsFreeLaunchers() {\n List<String> deployments = getDeployments();\n log.info(\"Found \" + deployments.size() + \" deployments to be added\");\n for (String deployment : deployments) {\n if (runtimeClient.serviceExists(deployment)) {\n addFreeLauncher(deployment);\n } else {\n log.info(\"Deployment \" + deployment + \" doesn't have a Service that exposes it. Not adding as a launcher...\");\n }\n }\n }",
"public void cleanOrphanDeployments() {\n log.info(\"Cleaning orphan Deployments...\");\n List<String> deploymentNames = getDeployments();\n for (String deploymentName : deploymentNames) {\n if (deploymentName.startsWith(Constants.BPG_APP_TYPE_LAUNCHER + \"-\") && !serviceExists(deploymentName)) {\n log.info(\"Cleaning orphan Deployment [Name] \" + deploymentName + \"...\");\n\n unregisterLauncherIfExistsByObjectName(deploymentName);\n\n if (!runtimeClient.deleteDeployment(deploymentName)) {\n log.error(\"Deployment deletion failed [Deployment Name] \" + deploymentName);\n }\n }\n }\n }",
"public void validateLauncherUrls() {\n log.info(\"Validating the existing launcher URL list for missing deployments...\");\n\n for (String launcherUrl : getTotalLaunchers()) {\n log.info(\"Validating [Launcher URL] \" + launcherUrl + \"...\");\n String objectName = getObjectNameFromLauncherUrl(launcherUrl);\n if (!runtimeClient.deploymentExists(objectName) || !runtimeClient.serviceExists(objectName)) {\n log.info(\"Found an invalid launcher [URL] \" + launcherUrl);\n // Just remove the reference to launcher now\n // cleanOrphan* jobs will clean any orphan deployments\n // desired count check will scale up if free count is reduced\n unregisterLauncherIfExists(launcherUrl);\n }\n }\n }",
"public void watchAndClean() {\n runtimeClient.watchWithWatcher(new Watcher<Event>() {\n\n @Override\n public void eventReceived(Action action, Event resource) {\n if ((resource.getInvolvedObject().getKind().equals(\"Deployment\") ||\n resource.getInvolvedObject().getKind().equals(\"Service\"))\n && resource.getInvolvedObject().getName().startsWith(Constants.BPG_APP_TYPE_LAUNCHER)\n && (action == Action.DELETED || action == Action.MODIFIED)) {\n\n log.info(\"Received \"\n + action.toString() + \" event for \"\n + resource.getInvolvedObject().getKind() + \" \"\n + resource.getInvolvedObject().getName());\n\n cleanOrphanDeployments();\n cleanOrphanServices();\n } else {\n log.debug(\"Received action \" + action.toString() + \" for resource \"\n + resource.getInvolvedObject().getKind() + \":\"\n + resource.getInvolvedObject().getName());\n }\n }\n\n @Override\n public void onClose(KubernetesClientException cause) {\n log.info(\"Shutting down Event Watcher...\");\n }\n });\n }",
"private void cleanUpRunningProcessInstances() {\n List<ProcessInstance> runningInstances = processEngine.getRuntimeService().createProcessInstanceQuery().processDefinitionKey(PROCESS_DEFINITION_KEY).list();\n runningInstances.addAll(processEngine.getRuntimeService().createProcessInstanceQuery().processDefinitionKey(INCIDENT_PROCESS_DEFINITION).list());\n for (ProcessInstance processInstance : runningInstances) {\n processEngine.getRuntimeService().deleteProcessInstance(processInstance.getId(), \"deleted to have a clean environment for Arquillian\");\n }\n }",
"public void DFRemoveAllMyServices() {\n try {\n DFService.deregister(this);\n } catch (FIPAException ex) {\n\n }\n }",
"@Override\r\n public void stopAll() {\r\n Log.d(TAG, \"Number of services: \"+ taskRequesterMap.size());\r\n Iterator<Map.Entry<String, TaskRequester>> iterator = taskRequesterMap.entrySet().iterator();\r\n while (iterator.hasNext()) {\r\n Map.Entry<String, TaskRequester> item = iterator.next();\r\n\r\n String name = item.getValue().getName();\r\n String className = item.getValue().getServiceClass().getName();\r\n\r\n// remove(className);\r\n item.getValue().unBind();\r\n Log.d(TAG, \"- \"+name+\" \"+className);\r\n// taskRequesterMap.remove(className);\r\n iterator.remove();\r\n serviceClasses.remove(new TaskModel(name, className, 1));\r\n// taskRequesterMap.remove(new TaskModel(name, className, 1));\r\n }\r\n }",
"public static int startAllServices() throws Throwable {\n\t\tint numServicesStarted = 0;\n\t\t\n\t\tlog.info(\"!!! Attempting to start API Service !!!\");\n\t\t//System.out.println(\"!!! Attempting to start API Service !!!\"); \n\t\tif (startApiService()) {\n\t\t\tnumServicesStarted++;\n\t\t}\n\t\tlog.info(\"!!! Attempting to start Inventory Service !!!\");\n\t\t//System.out.println(\"!!! Attempting to start Inventory Service !!!\");\n\t\tif (startInventoryService()) {\n\t\t\tnumServicesStarted++;\n\t\t}\n\t\tlog.info(\"!!! Attempting to start Insurance Service !!!\");\n\t\t//System.out.println(\"!!! Attempting to start Insurance Service !!!\");\n\t\tif (startInsuranceService()) {\n\t\t\tnumServicesStarted++;\n\t\t}\n\t\tlog.info(\"!!! Attempting to start Enquiry Service !!!\");\n\t\t//System.out.println(\"!!! Attempting to start Enquiry Service !!!\");\n\t\tif (startEnquiryService()) {\n\t\t\tnumServicesStarted++;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t Runtime.getRuntime().addShutdownHook(new Thread() \n\t\t\t { \n\t\t\t public void run() \n\t\t\t { \n\t\t\t \ttry {\n\t\t\t \t\tlog.info(\"!!! Services Shutdown Hook is running !!!\");\n\t\t\t \t\t//System.out.println(\"!!! Services Shutdown Hook is running !!!\"); \n\t\t\t\t int servicesStopped = ServiceFactory.stopAllServices();\n\t\t\t\t log.info(\"!!! A total of \" + servicesStopped + \" services were shutdown !!!\");\n\t\t\t\t //System.out.println(\"!!! A total of \" + servicesStopped + \" services were shutdown !!!\"); \n\t\t\t \t} catch (Throwable ex) {\n\t\t\t \t\tex.printStackTrace();\n\t\t\t \t}\n\t\t\t } \n\t\t\t }); \n\t\t\t \n\t\t} catch (Throwable ex) {\n\t\t\tlog.error(\"!!! Error on Services Shutdown !!! : \" + ex.getMessage(), ex);\n\t\t\t//System.out.println(\"!!! Error on Services Shutdown !!! : \" + ex.getMessage());\n\t\t\t//ex.printStackTrace();\n\t\t}\n\n\t\treturn numServicesStarted;\n\t}",
"private boolean deleteLauncher(String deploymentName) {\n unregisterLauncherIfExistsByObjectName(deploymentName);\n\n boolean svcDeleted = runtimeClient.deleteService(deploymentName);\n boolean depDeleted = runtimeClient.deleteDeployment(deploymentName);\n\n return svcDeleted && depDeleted;\n }",
"private boolean CheckEmptyServices(List<Services> services){\n for(Services service : services){\n if(service.getServiceQuantity() > 0){\n return false;\n }\n }\n return true;\n }",
"private void checkTimeTableOfServices () {\n\n\t\tif (jaiBusServiceList != null && jaiBusServiceList.size () > 0 && veeruBusServiceList != null\n\t\t\t\t&& veeruBusServiceList.size () > 0) {\n\n\t\t\tObject jaiBusService[] = jaiBusServiceList.toArray ();\n\n\t\t\tObject veeruBusService[] = veeruBusServiceList.toArray ();\n\n\t\t\tBusService jaiService;\n\n\t\t\tBusService veeruService;\n\n\t\t\tint result;\n\n\t\t\tfor (int i = 0; i < jaiBusService.length; i++) {\n\n\t\t\t\tjaiService = (BusService) jaiBusService[i];\n\n\t\t\t\tif (jaiService == null)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tfor (int j = 0; j < veeruBusService.length; j++) {\n\n\t\t\t\t\tveeruService = (BusService) veeruBusService[j];\n\n\t\t\t\t\tif (veeruService == null)\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\tresult = compareAndRemoveInefficentService (jaiService, veeruService);\n\n\t\t\t\t\tif (result == REMOVE_JAI_BUS_SERVICE) {\n\t\t\t\t\t\tjaiBusService[i] = null;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (result == REMOVE_VEERU_BUS_SERVICE) {\n\t\t\t\t\t\tveeruBusService[j] = null;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void removeProjectEntries(String serviceName);",
"@After\n\tpublic void setupClean() {\n\n\t\tString server = serverRequirement.getConfig().getName();\n\t\tif (FuseServerManipulator.isServerStarted(server)) {\n\t\t\tFuseServerManipulator.stopServer(server);\n\t\t}\n\t\tnew ProjectExplorer().deleteAllProjects();\n\t}",
"@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (ScienceAppExecute scienceAppExecute : findAll()) {\n\t\t\tremove(scienceAppExecute);\n\t\t}\n\t}",
"public Builder clearServices() {\n if (servicesBuilder_ == null) {\n services_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n } else {\n servicesBuilder_.clear();\n }\n return this;\n }",
"public Builder clearServices() {\n if (servicesBuilder_ == null) {\n services_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n } else {\n servicesBuilder_.clear();\n }\n return this;\n }",
"public static void removeCurrentTargetServiceForAll() {\n DCASelectedService targetService = targetServiceMap.get(DCAUserPreference.getLoggedInUser().getUsername());\n\n if (targetService == null) {\n return;\n }\n\n if (logger.isDebugEnabled()) {\n logger.debug(String.format(\"Invalidating Cached service with UUID = %s for all the Users\",\n targetService.getUuid()));\n }\n\n List<String> usersToRemove = new ArrayList<>();\n for (Map.Entry<String, DCASelectedService> entry : targetServiceMap.entrySet()) {\n DCASelectedService selectedService = entry.getValue();\n if (selectedService.getUuid().equals(targetService.getUuid())) {\n usersToRemove.add(entry.getKey());\n }\n }\n\n for (String userName : usersToRemove) {\n targetServiceMap.remove(userName);\n }\n }",
"void removeServices() throws IOException, SoapException;",
"private void checkIfForceKill() {\n SharedPreferences settings = PreferenceManager\n .getDefaultSharedPreferences(this);\n boolean forceKill = settings.getBoolean(\n FORCE_EXIT_APPLICATION, false);\n\n if (forceKill) {\n //CLEAR THE FORCE_EXIT SETTINGS\n SharedPreferences.Editor editor = settings.edit();\n editor.putBoolean(FORCE_EXIT_APPLICATION, false);\n // Commit the edits!\n editor.apply();\n //HERE STOP ALL YOUR SERVICES\n finish();\n }\n }",
"private void stopServices(){\n if(_handlers!=null){\n for(PlugMotionHandler handler : _handlers) {\n if (handler != null)\n handler.stopSimulation();\n //Log.i(TAG, \"stoping simulation\");\n }\n }\n }",
"protected void resetContainer() throws PlatformException {\r\n\t\tfor (Iterator<ServiceKey> it = serviceCompartments.keySet().iterator(); it.hasNext();) { \r\n\t\t\tServiceKey key = (ServiceKey) it.next(); \r\n\t\t\tServiceCompartment<T,S> serviceCompartment = (ServiceCompartment<T,S>) serviceCompartments.get(key); \r\n\t\t\tserviceCompartment.destroy();\r\n\t\t}\r\n\t\tserviceInfos.clear();\r\n\t\tserviceCompartments.clear();\r\n\t\tserviceInfos=null;\r\n\t\tserviceCompartments=null;\r\n\t\t// do not change the below order of closing app contexts. Always close children first before the parent context\r\n\t\tthis.servicesContext.close();\r\n\t\tthis.servicesContext = null;\t\t\t\t\r\n\t\tthis.commonServiceBeansContext.close();\r\n\t\tthis.commonServiceBeansContext = null;\r\n\t}",
"public static void clearAppList() {\n }",
"public synchronized void releaseServices()\n\t{\n\t\tsvcDelegate.releaseServices();\n\t}",
"void unsetListOfServiceElements();",
"public boolean isDeployed(){\n return !places.isEmpty();\n }",
"@Test\n public void testDeployedStateNotDeployedService() {\n cleanUp();\n\n State state = makeState(1L, \"State 1\");\n deployedServiceDataService.create(new DeployedService(state, Service.MOBILE_ACADEMY));\n\n assertFalse(propertyService.isServiceDeployedInState(Service.KILKARI, state));\n }",
"protected void tryDeploy() {\n ComponentManager mgr = harness.getContext().getRuntime().getComponentManager();\n // the stash may already contains contribs (from @Setup methods)\n if (mgr.hasChanged()) { // first reset the registry if it was changed by the last test\n mgr.reset();\n // the registry is now stopped\n }\n // deploy current test contributions if any\n deploy(runner, harness);\n mgr.refresh(true);\n // now the stash is empty\n mgr.start(); // ensure components are started\n }",
"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}",
"public void cleanup() {\r\n\t\tsuper.cleanup();\r\n\t\tfor (int i = 0; i < _composites.size(); i++) {\r\n\t\t\t_composites.get(i).cleanup();\t\r\n\t\t}\r\n\t}",
"void clearService();",
"public void cleanAppForHiddenSpace() {\n this.mService.mHwAMSEx.cleanAppForHiddenSpace();\n }",
"void killAllApps();",
"public void _getAvailableServiceNames() {\n services = oObj.getAvailableServiceNames();\n\n for (int i = 0; i < services.length; i++) {\n log.println(\"Service\" + i + \": \" + services[i]);\n }\n\n tRes.tested(\"getAvailableServiceNames()\", services != null);\n }",
"private void warnNotAllSquadronsDeployed() {\n warnDialogProvider.get().show(\"Not all squadrons have been deployed. Squadrons not deployed are lost.\");\n }",
"public void forceActualServiceDeployment(String serviceName) {\n AxisService service = axisConfig.getServiceForActivation(serviceName);\n if (service == null) {\n // try to find it from the transit ghost map\n try {\n service = GhostDeployerUtils\n .getTransitGhostServicesMap(axisConfig).get(serviceName);\n } catch (AxisFault axisFault) {\n log.error(\"Error while reading Transit Ghosts map\", axisFault);\n }\n }\n if (service != null && GhostDeployerUtils.isGhostService(service)) {\n // if the service is a ghost service, load the actual service\n try {\n GhostDeployerUtils.deployActualService(axisConfig, service);\n } catch (AxisFault axisFault) {\n log.error(\"Error while loading actual service from Ghost\", axisFault);\n }\n }\n }",
"public void removeAllPackages() {\r\n myPackages.clear();\r\n }",
"private void validateSites() {\n \t\tSiteEntry[] list = (SiteEntry[]) sites.values().toArray(new SiteEntry[0]);\n \t\tfor (int i = 0; i < list.length; i++) {\n \t\t\tURL siteURL = list[i].getResolvedURL();\n \t\t\tif (!supportsDetection(siteURL))\n \t\t\t\tcontinue;\n \n \t\t\tFile siteRoot = new File(siteURL.getFile().replace('/', File.separatorChar));\n \t\t\tif (!siteRoot.exists()) {\n \t\t\t\tunconfigureSite(list[i]);\n \t\t\t\tif (DEBUG)\n \t\t\t\t\tdebug(\"Site \" + siteURL + \" does not exist ... removing from configuration\"); //$NON-NLS-1$ //$NON-NLS-2$\n \t\t\t}\n \t\t}\n \t}",
"public void dontWantToInstall() {\n\t\tpackageList.removeAll(packageList);\n\t}",
"static void destroyAll()\n {\n synchronized(allSchedulers)\n {\n // destroy all registered schedulers\n Iterator iter = allSchedulers.iterator();\n while (iter.hasNext())\n {\n Scheduler scheduler = (Scheduler) iter.next();\n \n // do not call cancel() since this method modifies allSchedulers\n scheduler.destroy();\n }\n \n if (logger.isInfoEnabled())\n {\n logger.info(allSchedulers.size() + \" scheduler instances destroyed\");\n }\n \n // be sure and clear set\n allSchedulers.clear();\n \n // and set flag that scheduler service ist stopped\n schedulerServiceRunning = false;\n }\n }",
"@Override\n\tpublic Collection<Class<? extends IFloodlightService>> getModuleServices() {\n return null;\n\t}",
"public FinishDeploy() {\n addSequential(new AbortAll());\n addSequential(new HatchEject());\n }",
"@Override\n\tpublic Collection<Class<? extends IFloodlightService>> getModuleServices() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Collection<Class<? extends IFloodlightService>> getModuleServices() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Collection<Class<? extends IFloodlightService>> getModuleServices() {\n\t\treturn null;\n\t}",
"void unsetServiceConfigurationList();",
"@Override\n public Collection<Class<? extends IFloodlightService>> getModuleServices() {\n return null;\n }",
"@Test\n public void testNotDeployedStateDeployedService() {\n cleanUp();\n\n State deployed = makeState(1L, \"State 1\");\n deployedServiceDataService.create(new DeployedService(deployed, Service.MOBILE_ACADEMY));\n\n State notDeployed = makeState(2L, \"State 2\");\n\n assertFalse(propertyService.isServiceDeployedInState(Service.MOBILE_ACADEMY, notDeployed));\n }",
"public void startWithoutChecks() {\n service.enableMonitoring();\n for (ServiceNotifier serviceNotifier : serviceNotifiers) {\n serviceNotifier.onStart();\n }\n }",
"@Override\n\tpublic Collection<Class<? extends IFloodlightService>> getModuleServices() \n\t{\n\t\treturn null;\n\t}",
"public String getAllRunningServices() {\n return \"\";\n }",
"public boolean checkBuildings(){\n\t\tfor(Structure building : this.buildings){\n\t\t\tif(!building.isDestroyed()){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public void cleanUpDuplicatedStructures() throws Exception {\n\t\tif (currentDeployedStructs == null)\n\t\t\treturn;\n\t\t\n\t\tSet<DeployedPhysicalStructure> duplicatedStructsToBeRemoved = findDuplicatedStructures(currentDeployedStructs);\n\t\t\n\t\t// now let us remove the duplicated ones! they exist in the DB because currentDeployedStructs is guaranteed to always reflect what's deployed in the DB\n\t\tfor (DeployedPhysicalStructure p : duplicatedStructsToBeRemoved) {\n\t\t\tlog.status(LogLevel.WARNING, \"found a repeated deployed structure, going to remove it: \" + p.getSchema() +\".\"+ p.getBasename());\n\t\t\tdropPhysicalStructure(dbConnection, p.getSchema(), p.getBasename());\n\t\t}\t\t\n\t}",
"@Test\n\tpublic void removeServiceByQuery() throws JSONException, ConfigurationException, InvalidServiceDescriptionException, ExistingResourceException, ParseException{\n\t\tint size = 10;\n\t\tJSONArray ja = TestValueConstants.getDummyJSONArrayWithMandatoryAttributes(size);\n\t\tfor (int i = 0; i < ja.length(); i++) {\n\t\t\tadminMgr.addService(ja.getJSONObject(i));\n\t\t}\n\t\tassertEquals(10, adminMgr.findAll().size());\n\t\t//this should remove everything\n\t\tadminMgr.removeServices(new JSONObject());\n\t\tassertEquals(0, adminMgr.findAll().size());\n\t}",
"public static int stopAllServices() throws Throwable {\n\t\tint numServicesStopped = 0;\n\n\t\tstopApiService();\n\t\tnumServicesStopped++;\n\t\tstopInventoryService();\n\t\tnumServicesStopped++;\n\t\tstopInsuranceService();\n\t\tnumServicesStopped++;\n\t\tstopEnquiryService();\n\t\tnumServicesStopped++;\n\t\t\n\t\treturn numServicesStopped;\n\t}",
"@Override\n\t\tpublic Collection<Class<? extends IFloodlightService>> getModuleServices() {\n\t\t\treturn null;\n\t\t}",
"public void killRecentPackage() {\n IActivityManager activityManager = ActivityManager.getService();\n int userIdProcess = Process.myUserHandle().hashCode();\n List<ActivityManager.RecentTaskInfo> recentlist = new ArrayList<>();\n try {\n recentlist = activityManager.getRecentTasks(100, 1, userIdProcess).getList();\n } catch (Exception e) {\n loge(\"killRecentPackage\", e);\n }\n for (int i = 0; i < recentlist.size(); i++) {\n ActivityManager.RecentTaskInfo info = recentlist.get(i);\n String pakg = info.baseIntent.getComponent().getPackageName();\n int userId = info.userId;\n if (!mAppWhiteList.contains(pakg) && !inputMethodList.contains(pakg) && !pakg.contains(\"com.oppo.autotest\") && !pakg.contains(\"com.oppo.qe\")) {\n logd(\" killRecentPackage_forceStopPackage = \" + pakg + \" , userId = \" + userId);\n try {\n activityManager.forceStopPackage(pakg, userId);\n } catch (Exception e2) {\n loge(\"Failed killRecentPackage_forceStopPackage = \" + pakg + \" , userId = \" + userId, e2);\n }\n }\n }\n }",
"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 cleanAll() {\n\t\tfor (VirtualPet p : shelterPets.values()) {\n\t\t\tp.cleanPet();\n\t\t}\n\t}",
"@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (AssetManageReqHandle assetManageReqHandle : findAll()) {\n\t\t\tremove(assetManageReqHandle);\n\t\t}\n\t}",
"public Set getAssignableServices() throws SMSException {\n // Get all service names, and remove the assigned services\n // Set containing service names that has organization schema\n Set orgSchemaServiceNames = new HashSet();\n try {\n for (Iterator names = getServiceNames(token).iterator(); names\n .hasNext();) {\n String serviceName = (String) names.next();\n ServiceSchemaManagerImpl ssmi = ServiceSchemaManagerImpl\n .getInstance(token, serviceName, \n ServiceManager.getVersion(serviceName));\n if (ssmi.getSchema(SchemaType.ORGANIZATION) != null) {\n // Need to check if the user has permission\n // to add/assign the service\n StringBuffer d = new StringBuffer(100);\n // Need to construct\n // \"ou=default,ou=organizationconfig,ou=1.0,ou=\"\n d.append(SMSEntry.PLACEHOLDER_RDN).append(SMSEntry.EQUALS)\n .append(SMSUtils.DEFAULT).append(SMSEntry.COMMA)\n .append(CreateServiceConfig.ORG_CONFIG_NODE)\n .append(SMSEntry.PLACEHOLDER_RDN).append(\n SMSEntry.EQUALS).append(\"1.0\").append(\n SMSEntry.COMMA).append(\n SMSEntry.PLACEHOLDER_RDN).append(\n SMSEntry.EQUALS);\n // Append service name, and org name\n d.append(serviceName);\n if (!orgDN.equalsIgnoreCase(DNMapper.serviceDN)) {\n d.append(SMSEntry.COMMA).append(SMSEntry.SERVICES_NODE);\n }\n d.append(SMSEntry.COMMA).append(orgDN);\n try {\n // The function will throw exception if\n // user does not have permissions\n SMSEntry.getDelegationPermission(token, d.toString(),\n SMSEntry.modifyActionSet);\n orgSchemaServiceNames.add(serviceName);\n } catch (SMSException smse) {\n if (smse.getExceptionCode() != \n SMSException.STATUS_NO_PERMISSION) \n {\n throw (smse);\n }\n }\n }\n }\n // Need to remove mandatory services\n // %%% TODO. Need to have SMS Service with this information\n // orgSchemaServiceNames.removeAll(getMandatoryServices());\n } catch (SSOException ssoe) {\n SMSEntry.debug.error(\"OrganizationConfigManager.\"\n + \"getAssignableServices(): SSOException\", ssoe);\n throw (new SMSException(SMSEntry.bundle\n .getString(\"sms-INVALID_SSO_TOKEN\"),\n \"sms-INVALID_SSO_TOKEN\"));\n }\n // Remove assigned services\n HashSet answer = new HashSet(orgSchemaServiceNames);\n answer.removeAll(getAssignedServices());\n return (answer);\n }",
"@Override\n public void onDisable() {\n try {\n System.out.println(\"Cleaning Dynamic Server System Processes.\");\n for (MinigameServer minigameServer : dynamicServerSystemManager.getServers())\n minigameServer.deleteServer();\n\n // Clean the output directory.\n FileUtils.deleteDirectory(new File(\"../minigameservers\"));\n new File(\"../minigameservers\").mkdirs();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n plugin = null;\n }",
"public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"private void removeStoppedRecords(String pkgName) {\n if (pkgName != null) {\n boolean isPkgHasRecord = false;\n synchronized (this.mUtil.getmLock()) {\n Iterator<Map.Entry<String, ArrayList<LocationManagerService.UpdateRecord>>> it = this.mUtil.getRecordsByProvider().entrySet().iterator();\n while (true) {\n if (!it.hasNext()) {\n break;\n }\n ArrayList<LocationManagerService.UpdateRecord> records = it.next().getValue();\n if (records != null) {\n Iterator<LocationManagerService.UpdateRecord> it2 = ((ArrayList) records.clone()).iterator();\n while (true) {\n if (!it2.hasNext()) {\n break;\n } else if (pkgName.equals(it2.next().mReceiver.mCallerIdentity.mPackageName)) {\n LBSLog.i(TAG, \"package stopped,remove updateRecords and receivers:\" + pkgName);\n isPkgHasRecord = true;\n break;\n }\n }\n if (isPkgHasRecord) {\n break;\n }\n }\n }\n }\n if (isPkgHasRecord) {\n removeNotRunAndNotExistRecords();\n }\n }\n }",
"@Before\r\n\tpublic void cleanStart(){\n\t\tStartupFunctions.clearTabs();\r\n\t}",
"@Before\r\n\tpublic void cleanStart(){\n\t\tStartupFunctions.clearTabs();\r\n\t}",
"@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (StepDefsCompositeStepDefDBE stepDefsCompositeStepDefDBE : findAll()) {\n\t\t\tremove(stepDefsCompositeStepDefDBE);\n\t\t}\n\t}",
"public void verifyService() throws Throwable{\r\n\t\twdlib.waitForElement(getServiceText());\r\n\t\t\r\n\t\tif(!getServiceText().getText().equals(\"None Included\"))\r\n\t\t{\r\n\t\t\tReporter.log(getServiceText().getText()+\" is deleted\",true);\r\n\t\t\tdeleteService();\r\n\t\t}\r\n\t}",
"@Programmatic\n public List<Class<?>> allServiceClasses() {\n List<Class<?>> serviceClasses = Lists\n .transform(this.servicesInjector.getRegisteredServices(), new Function<Object, Class<?>>(){\n public Class<?> apply(Object o) {\n return o.getClass();\n }\n });\n // take a copy, to allow eg I18nFacetFactory to add in default implementations of missing services.\n return Collections.unmodifiableList(Lists.newArrayList(serviceClasses));\n }",
"@Override\n protected void onDestroy() {\n stopService(collectDataService);\n super.onDestroy();\n }",
"synchronized void cullDeadProcesses() {\n\t\t// Removes processes that have completed and haven't been checked on\n\t\t// for maxLiveTime milliseconds.\n\t\t//long cullBefore = System.currentTimeMillis() - maxLiveTime;\n\t\t//int before = processes.size();\n\t\tIterator<Map.Entry<Long, ProcessEntry>> iter = processes.entrySet().iterator();\n\t\tint runningCount = 0;\n\t\twhile (iter.hasNext()) {\n\t\t\tMap.Entry<Long, ProcessEntry> entry = iter.next();\n\t\t\tProcessEntry pe = entry.getValue();\n\t\t\tAbstractProcess.Status status = pe.process.getStatus();\n\t\t\t// For now, we never remove \"dead\" processes to ensure the status\n\t\t\t// is maintained. So instead all this does is check to make sure\n\t\t\t// that the run count doesn't get messed up.\n\t\t\t/*if (pe.lastAccess < cullBefore && status.isDead()) {\n\t\t\t\tif (logger.isDebugEnabled()) {\n\t\t\t\t\tlogger.debug(\"Process {} last accessed {}, before cutoff of {}.\",\n\t\t\t\t\t\t\tnew Object[] { uidToString(entry.getKey()),\n\t\t\t\t\t\t\tdateFormat.format(new Date(entry.getValue().lastAccess)),\n\t\t\t\t\t\t\tdateFormat.format(new Date(cullBefore)) });\n\t\t\t\t}\n\t\t\t\tpe.process.destroy();\n\t\t\t\titer.remove();\n\t\t\t} else */\n\t\t\tif (status == AbstractProcess.Status.RUNNING) {\n\t\t\t\trunningCount++;\n\t\t\t}\n\t\t}\n\t\t//logger.info(\"Removed {} processes.\", before - processes.size());\n\t\tif (this.runningCount != runningCount) {\n\t\t\tlogger.error(\"Actual running count {} does not match stored running count of {}! This is a bug!\", runningCount, this.runningCount);\n\t\t\t// Fix this\n\t\t\tthis.runningCount = runningCount;\n\t\t\tcheckRunningProcesses();\n\t\t}\n\t}",
"public void removeAll() throws SystemException {\n\t\tfor (VCal vCal : findAll()) {\n\t\t\tremove(vCal);\n\t\t}\n\t}",
"public boolean cleanDoneTasks(){\n\t\tboolean removedAny = false; \n\t\tCollection<Task> tmp = new ArrayList<Task>();\n\t\t\n\t\tfor( Task task: m_Tasks ){\n\t\t\tif(task.done) {\n\t\t\t\ttmp.add(task);\n\t\t\t\tremovedAny = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(Task task : tmp){\n\t\t\tremoveTask(task);\n\t\t}\n\t\treturn removedAny;\n\t}",
"public void removeAll()\n throws com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n throws com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n throws com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n throws com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n throws com.liferay.portal.kernel.exception.SystemException;",
"public void restProcessList() {\n listOfProcess.clear();\n }",
"private void deployConsumers() throws AbortCPMException {\n\n if (consumerDeployList == null || consumerDeployList.size() == 0) {\n return;\n }\n CasProcessorDeployer deployer = null;\n // Deploy each CASProcessor in a seperate container\n for (int i = consumerDeployList.size(); i > 0; i--) {\n try {\n // Deployer deploys as many instances of CASProcessors as there are threads\n List cpList = (ArrayList) consumerDeployList.get((i - 1)); // list is zero-based\n String name = ((CasProcessor) cpList.get(0)).getProcessingResourceMetaData().getName();\n if (cpList.size() > 0) {\n //\n // Get a deployer for this type of CasProcessor. The type of deployer is determined from\n // the\n // CPE Configuration. Specifically from the deployment model for this CasProcessor.\n //\n CpeCasProcessor casProcessorType = (CpeCasProcessor) cpeFactory.casProcessorConfigMap\n .get(name);\n deployer = DeployFactory.getDeployer(cpeFactory, casProcessorType, pca);\n // Deploy CasConsumer.\n ProcessingContainer container = deployer.deployCasProcessor(cpList, false);\n consumerList.add(container);\n }\n } catch (Exception e) {\n e.printStackTrace();\n throw new AbortCPMException(e.getMessage());\n }\n }\n }",
"public void updateListOfIncludedServices(String serviceID){\n \n for(Iterator it = listOfIncludedServices.iterator();it.hasNext();){\n ServiceInfo si = (ServiceInfo) it.next();\n if(si.getID().equals(serviceID)){\n \n //Remove directory associated do service and all files on it\n this.removeServiceDirectory(serviceID);\n \n listOfExcludedServices.add(si);\n \n it.remove();\n }\n }\n }",
"protected void uninstallComponents() {\n }",
"protected void uninstallComponents() {\n\t}",
"private void stopProcesses()\n {\n List<String> list = new ArrayList<String>(serverProcessesShutdownStack.keySet());\n ListIterator<String> iter = list.listIterator(list.size());\n while(iter.hasPrevious())\n {\n String processName = iter.previous();\n log.info(String.format(\"Stopping process: %s\", processName));\n serverProcessesShutdownStack.get(processName).stop(this);\n }\n }",
"@Override\n protected void onDestroy() {\n mManager.clearLocalServices(mChannel, null);\n super.onDestroy();\n }",
"protected void cleanup() {\n // if the java runtime is holding onto any files in the build dir, we\n // won't be able to delete them, so we need to force a gc here\n System.gc();\n\n if (deleteFilesOnNextBuild) {\n // delete the entire directory and all contents\n // when we know something changed and all objects\n // need to be recompiled, or if the board does not\n // use setting build.dependency\n //Base.removeDir(tempBuildFolder);\n \n // note that we can't remove the builddir itself, otherwise\n // the next time we start up, internal runs using Runner won't\n // work because the build dir won't exist at startup, so the classloader\n // will ignore the fact that that dir is in the CLASSPATH in run.sh\n Base.removeDescendants(tempBuildFolder);\n \n deleteFilesOnNextBuild = false;\n } else {\n // delete only stale source files, from the previously\n // compiled sketch. This allows multiple windows to be\n // used. Keep everything else, which might be reusable\n if (tempBuildFolder.exists()) {\n String files[] = tempBuildFolder.list();\n for (String file : files) {\n if (file.endsWith(\".c\") || file.endsWith(\".cpp\") || file.endsWith(\".s\")) {\n File deleteMe = new File(tempBuildFolder, file);\n if (!deleteMe.delete()) {\n System.err.println(\"Could not delete \" + deleteMe);\n }\n }\n }\n }\n }\n \n // Create a fresh applet folder (needed before preproc is run below)\n //tempBuildFolder.mkdirs();\n }",
"public void removeServiceClient(final String serviceName) {\n boolean needToSave = ProjectManager.mutex().writeAccess(new Action<Boolean>() {\n public Boolean run() {\n boolean needsSave = false;\n boolean needsSave1 = false;\n\n /** Remove properties from project.properties\n */\n String featureProperty = \"wscompile.client.\" + serviceName + \".features\"; // NOI18N\n String packageProperty = \"wscompile.client.\" + serviceName + \".package\"; // NOI18N\n String proxyProperty = \"wscompile.client.\" + serviceName + \".proxy\"; //NOI18N\n\n EditableProperties ep = helper.getProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH);\n EditableProperties ep1 = helper.getProperties(AntProjectHelper.PRIVATE_PROPERTIES_PATH);\n\n if(ep.getProperty(featureProperty) != null) {\n ep.remove(featureProperty);\n needsSave = true;\n }\n\n if(ep.getProperty(packageProperty) != null) {\n ep.remove(packageProperty);\n needsSave = true;\n }\n\n if(ep1.getProperty(proxyProperty) != null) {\n ep1.remove(proxyProperty);\n needsSave1 = true;\n }\n\n if(needsSave) {\n helper.putProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH, ep);\n }\n\n if(needsSave1) {\n helper.putProperties(AntProjectHelper.PRIVATE_PROPERTIES_PATH, ep1);\n }\n\n /** Locate root of web service client node structure in project,xml\n */\n Element data = helper.getPrimaryConfigurationData(true);\n NodeList nodes = data.getElementsByTagName(WEB_SERVICE_CLIENTS);\n Element clientElements = null;\n\n /* If there is a root, get all the names of the child services and search\n * for the one we want to remove.\n */\n if(nodes.getLength() >= 1) {\n clientElements = (Element) nodes.item(0);\n NodeList clientNameList = clientElements.getElementsByTagNameNS(AppClientProjectType.PROJECT_CONFIGURATION_NAMESPACE, WEB_SERVICE_CLIENT_NAME);\n for(int i = 0; i < clientNameList.getLength(); i++ ) {\n Element clientNameElement = (Element) clientNameList.item(i);\n NodeList nl = clientNameElement.getChildNodes();\n if(nl.getLength() == 1) {\n Node n = nl.item(0);\n if(n.getNodeType() == Node.TEXT_NODE) {\n if(serviceName.equalsIgnoreCase(n.getNodeValue())) {\n // Found it! Now remove it.\n Node serviceNode = clientNameElement.getParentNode();\n clientElements.removeChild(serviceNode);\n helper.putPrimaryConfigurationData(data, true);\n needsSave = true;\n }\n }\n }\n }\n }\n return needsSave || needsSave1;\n }\n });\n \n // !PW Lastly, save the project if we actually made any changes to any\n // properties or the build script.\n if(needToSave) {\n try {\n ProjectManager.getDefault().saveProject(project);\n } catch(IOException ex) {\n NotifyDescriptor desc = new NotifyDescriptor.Message(\n NbBundle.getMessage(AppClientProjectWebServicesClientSupport.class,\"MSG_ErrorSavingOnWSClientRemove\", serviceName, ex.getMessage()), // NOI18N\n NotifyDescriptor.ERROR_MESSAGE);\n DialogDisplayer.getDefault().notify(desc);\n }\n }\n removeServiceRef(serviceName);\n }"
] | [
"0.70936054",
"0.70368624",
"0.6111372",
"0.5974715",
"0.5963567",
"0.57504916",
"0.573777",
"0.5615287",
"0.558768",
"0.5565802",
"0.55033195",
"0.5469403",
"0.5447524",
"0.53958476",
"0.5378253",
"0.5378253",
"0.5374555",
"0.53670096",
"0.53578216",
"0.5344129",
"0.5322588",
"0.5318748",
"0.5315535",
"0.52936655",
"0.52921504",
"0.52501506",
"0.5247321",
"0.52410454",
"0.52251667",
"0.5218132",
"0.5201639",
"0.5190125",
"0.51873094",
"0.5171607",
"0.515189",
"0.5117683",
"0.511269",
"0.5111521",
"0.50879896",
"0.5087662",
"0.50846183",
"0.5083198",
"0.5083198",
"0.5083198",
"0.50831515",
"0.5080194",
"0.5076116",
"0.5075353",
"0.5056351",
"0.5041253",
"0.5025137",
"0.50088936",
"0.4988933",
"0.49883828",
"0.49806663",
"0.49787343",
"0.4978177",
"0.49742737",
"0.49696353",
"0.49658853",
"0.49638686",
"0.495591",
"0.495591",
"0.495591",
"0.495591",
"0.495591",
"0.495591",
"0.495591",
"0.495591",
"0.495591",
"0.495591",
"0.495591",
"0.495591",
"0.495591",
"0.495591",
"0.495591",
"0.4952623",
"0.495014",
"0.495014",
"0.49315518",
"0.4929888",
"0.49104205",
"0.49090734",
"0.4908193",
"0.49023566",
"0.48966172",
"0.48959568",
"0.48959568",
"0.48959568",
"0.48959568",
"0.48959568",
"0.48820737",
"0.48803115",
"0.48775828",
"0.48764208",
"0.48734087",
"0.48655754",
"0.4863746",
"0.485441",
"0.4847418"
] | 0.7846448 | 0 |
Check if there are Deployments without corresponding Services, and clean them up from the launcher list. | public void cleanOrphanDeployments() {
log.info("Cleaning orphan Deployments...");
List<String> deploymentNames = getDeployments();
for (String deploymentName : deploymentNames) {
if (deploymentName.startsWith(Constants.BPG_APP_TYPE_LAUNCHER + "-") && !serviceExists(deploymentName)) {
log.info("Cleaning orphan Deployment [Name] " + deploymentName + "...");
unregisterLauncherIfExistsByObjectName(deploymentName);
if (!runtimeClient.deleteDeployment(deploymentName)) {
log.error("Deployment deletion failed [Deployment Name] " + deploymentName);
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void addAllDeploymentsAsFreeLaunchers() {\n List<String> deployments = getDeployments();\n log.info(\"Found \" + deployments.size() + \" deployments to be added\");\n for (String deployment : deployments) {\n if (runtimeClient.serviceExists(deployment)) {\n addFreeLauncher(deployment);\n } else {\n log.info(\"Deployment \" + deployment + \" doesn't have a Service that exposes it. Not adding as a launcher...\");\n }\n }\n }",
"public void cleanOrphanServices() {\n log.info(\"Cleaning orphan Services...\");\n List<String> serviceNames = getServices();\n for (String serviceName : serviceNames) {\n if (serviceName.startsWith(Constants.BPG_APP_TYPE_LAUNCHER + \"-\") && !deploymentExists(serviceName)) {\n log.info(\"Cleaning orphan Service [Name] \" + serviceName + \"...\");\n\n unregisterLauncherIfExistsByObjectName(serviceName);\n\n if (!runtimeClient.deleteService(serviceName)) {\n log.error(\"Service deletion failed [Service Name] \" + serviceName);\n }\n }\n }\n }",
"public void validateLauncherUrls() {\n log.info(\"Validating the existing launcher URL list for missing deployments...\");\n\n for (String launcherUrl : getTotalLaunchers()) {\n log.info(\"Validating [Launcher URL] \" + launcherUrl + \"...\");\n String objectName = getObjectNameFromLauncherUrl(launcherUrl);\n if (!runtimeClient.deploymentExists(objectName) || !runtimeClient.serviceExists(objectName)) {\n log.info(\"Found an invalid launcher [URL] \" + launcherUrl);\n // Just remove the reference to launcher now\n // cleanOrphan* jobs will clean any orphan deployments\n // desired count check will scale up if free count is reduced\n unregisterLauncherIfExists(launcherUrl);\n }\n }\n }",
"public void watchAndClean() {\n runtimeClient.watchWithWatcher(new Watcher<Event>() {\n\n @Override\n public void eventReceived(Action action, Event resource) {\n if ((resource.getInvolvedObject().getKind().equals(\"Deployment\") ||\n resource.getInvolvedObject().getKind().equals(\"Service\"))\n && resource.getInvolvedObject().getName().startsWith(Constants.BPG_APP_TYPE_LAUNCHER)\n && (action == Action.DELETED || action == Action.MODIFIED)) {\n\n log.info(\"Received \"\n + action.toString() + \" event for \"\n + resource.getInvolvedObject().getKind() + \" \"\n + resource.getInvolvedObject().getName());\n\n cleanOrphanDeployments();\n cleanOrphanServices();\n } else {\n log.debug(\"Received action \" + action.toString() + \" for resource \"\n + resource.getInvolvedObject().getKind() + \":\"\n + resource.getInvolvedObject().getName());\n }\n }\n\n @Override\n public void onClose(KubernetesClientException cause) {\n log.info(\"Shutting down Event Watcher...\");\n }\n });\n }",
"private void cleanUpRunningProcessInstances() {\n List<ProcessInstance> runningInstances = processEngine.getRuntimeService().createProcessInstanceQuery().processDefinitionKey(PROCESS_DEFINITION_KEY).list();\n runningInstances.addAll(processEngine.getRuntimeService().createProcessInstanceQuery().processDefinitionKey(INCIDENT_PROCESS_DEFINITION).list());\n for (ProcessInstance processInstance : runningInstances) {\n processEngine.getRuntimeService().deleteProcessInstance(processInstance.getId(), \"deleted to have a clean environment for Arquillian\");\n }\n }",
"private boolean deleteLauncher(String deploymentName) {\n unregisterLauncherIfExistsByObjectName(deploymentName);\n\n boolean svcDeleted = runtimeClient.deleteService(deploymentName);\n boolean depDeleted = runtimeClient.deleteDeployment(deploymentName);\n\n return svcDeleted && depDeleted;\n }",
"public FinishDeploy() {\n addSequential(new AbortAll());\n addSequential(new HatchEject());\n }",
"protected void tryDeploy() {\n ComponentManager mgr = harness.getContext().getRuntime().getComponentManager();\n // the stash may already contains contribs (from @Setup methods)\n if (mgr.hasChanged()) { // first reset the registry if it was changed by the last test\n mgr.reset();\n // the registry is now stopped\n }\n // deploy current test contributions if any\n deploy(runner, harness);\n mgr.refresh(true);\n // now the stash is empty\n mgr.start(); // ensure components are started\n }",
"@After\n\tpublic void setupClean() {\n\n\t\tString server = serverRequirement.getConfig().getName();\n\t\tif (FuseServerManipulator.isServerStarted(server)) {\n\t\t\tFuseServerManipulator.stopServer(server);\n\t\t}\n\t\tnew ProjectExplorer().deleteAllProjects();\n\t}",
"public void cleanup() {\r\n\t\tsuper.cleanup();\r\n\t\tfor (int i = 0; i < _composites.size(); i++) {\r\n\t\t\t_composites.get(i).cleanup();\t\r\n\t\t}\r\n\t}",
"public boolean isDeployed(){\n return !places.isEmpty();\n }",
"public static void clearAppList() {\n }",
"@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (ScienceAppExecute scienceAppExecute : findAll()) {\n\t\t\tremove(scienceAppExecute);\n\t\t}\n\t}",
"public void dontWantToInstall() {\n\t\tpackageList.removeAll(packageList);\n\t}",
"private void warnNotAllSquadronsDeployed() {\n warnDialogProvider.get().show(\"Not all squadrons have been deployed. Squadrons not deployed are lost.\");\n }",
"public void cleanAppForHiddenSpace() {\n this.mService.mHwAMSEx.cleanAppForHiddenSpace();\n }",
"void killAllApps();",
"public void removeProjectEntries(String serviceName);",
"private void checkIfForceKill() {\n SharedPreferences settings = PreferenceManager\n .getDefaultSharedPreferences(this);\n boolean forceKill = settings.getBoolean(\n FORCE_EXIT_APPLICATION, false);\n\n if (forceKill) {\n //CLEAR THE FORCE_EXIT SETTINGS\n SharedPreferences.Editor editor = settings.edit();\n editor.putBoolean(FORCE_EXIT_APPLICATION, false);\n // Commit the edits!\n editor.apply();\n //HERE STOP ALL YOUR SERVICES\n finish();\n }\n }",
"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}",
"@Override\r\n public void stopAll() {\r\n Log.d(TAG, \"Number of services: \"+ taskRequesterMap.size());\r\n Iterator<Map.Entry<String, TaskRequester>> iterator = taskRequesterMap.entrySet().iterator();\r\n while (iterator.hasNext()) {\r\n Map.Entry<String, TaskRequester> item = iterator.next();\r\n\r\n String name = item.getValue().getName();\r\n String className = item.getValue().getServiceClass().getName();\r\n\r\n// remove(className);\r\n item.getValue().unBind();\r\n Log.d(TAG, \"- \"+name+\" \"+className);\r\n// taskRequesterMap.remove(className);\r\n iterator.remove();\r\n serviceClasses.remove(new TaskModel(name, className, 1));\r\n// taskRequesterMap.remove(new TaskModel(name, className, 1));\r\n }\r\n }",
"public void cleanUpDuplicatedStructures() throws Exception {\n\t\tif (currentDeployedStructs == null)\n\t\t\treturn;\n\t\t\n\t\tSet<DeployedPhysicalStructure> duplicatedStructsToBeRemoved = findDuplicatedStructures(currentDeployedStructs);\n\t\t\n\t\t// now let us remove the duplicated ones! they exist in the DB because currentDeployedStructs is guaranteed to always reflect what's deployed in the DB\n\t\tfor (DeployedPhysicalStructure p : duplicatedStructsToBeRemoved) {\n\t\t\tlog.status(LogLevel.WARNING, \"found a repeated deployed structure, going to remove it: \" + p.getSchema() +\".\"+ p.getBasename());\n\t\t\tdropPhysicalStructure(dbConnection, p.getSchema(), p.getBasename());\n\t\t}\t\t\n\t}",
"public List<String> getDeployments() {\n return runtimeClient.getDeployments();\n }",
"public void DFRemoveAllMyServices() {\n try {\n DFService.deregister(this);\n } catch (FIPAException ex) {\n\n }\n }",
"@Test\n public void testDeployedStateNotDeployedService() {\n cleanUp();\n\n State state = makeState(1L, \"State 1\");\n deployedServiceDataService.create(new DeployedService(state, Service.MOBILE_ACADEMY));\n\n assertFalse(propertyService.isServiceDeployedInState(Service.KILKARI, state));\n }",
"public void removeAllPackages() {\r\n myPackages.clear();\r\n }",
"private void deployConsumers() throws AbortCPMException {\n\n if (consumerDeployList == null || consumerDeployList.size() == 0) {\n return;\n }\n CasProcessorDeployer deployer = null;\n // Deploy each CASProcessor in a seperate container\n for (int i = consumerDeployList.size(); i > 0; i--) {\n try {\n // Deployer deploys as many instances of CASProcessors as there are threads\n List cpList = (ArrayList) consumerDeployList.get((i - 1)); // list is zero-based\n String name = ((CasProcessor) cpList.get(0)).getProcessingResourceMetaData().getName();\n if (cpList.size() > 0) {\n //\n // Get a deployer for this type of CasProcessor. The type of deployer is determined from\n // the\n // CPE Configuration. Specifically from the deployment model for this CasProcessor.\n //\n CpeCasProcessor casProcessorType = (CpeCasProcessor) cpeFactory.casProcessorConfigMap\n .get(name);\n deployer = DeployFactory.getDeployer(cpeFactory, casProcessorType, pca);\n // Deploy CasConsumer.\n ProcessingContainer container = deployer.deployCasProcessor(cpList, false);\n consumerList.add(container);\n }\n } catch (Exception e) {\n e.printStackTrace();\n throw new AbortCPMException(e.getMessage());\n }\n }\n }",
"public boolean checkBuildings(){\n\t\tfor(Structure building : this.buildings){\n\t\t\tif(!building.isDestroyed()){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public void killRecentPackage() {\n IActivityManager activityManager = ActivityManager.getService();\n int userIdProcess = Process.myUserHandle().hashCode();\n List<ActivityManager.RecentTaskInfo> recentlist = new ArrayList<>();\n try {\n recentlist = activityManager.getRecentTasks(100, 1, userIdProcess).getList();\n } catch (Exception e) {\n loge(\"killRecentPackage\", e);\n }\n for (int i = 0; i < recentlist.size(); i++) {\n ActivityManager.RecentTaskInfo info = recentlist.get(i);\n String pakg = info.baseIntent.getComponent().getPackageName();\n int userId = info.userId;\n if (!mAppWhiteList.contains(pakg) && !inputMethodList.contains(pakg) && !pakg.contains(\"com.oppo.autotest\") && !pakg.contains(\"com.oppo.qe\")) {\n logd(\" killRecentPackage_forceStopPackage = \" + pakg + \" , userId = \" + userId);\n try {\n activityManager.forceStopPackage(pakg, userId);\n } catch (Exception e2) {\n loge(\"Failed killRecentPackage_forceStopPackage = \" + pakg + \" , userId = \" + userId, e2);\n }\n }\n }\n }",
"public boolean isToDeploy() {\r\n\t\treturn attachUpdates>0 || catUpdates>0 || catTransUpdates>0 || prodUpdates>0 || prodTransUpdates>0 || menuUpdates>0;\r\n\t}",
"@XmlTransient\n public List<ProfileDeploymentMetaData> getDeployments()\n {\n return Collections.emptyList();\n }",
"private void initialDeploy() {\n }",
"protected void resetContainer() throws PlatformException {\r\n\t\tfor (Iterator<ServiceKey> it = serviceCompartments.keySet().iterator(); it.hasNext();) { \r\n\t\t\tServiceKey key = (ServiceKey) it.next(); \r\n\t\t\tServiceCompartment<T,S> serviceCompartment = (ServiceCompartment<T,S>) serviceCompartments.get(key); \r\n\t\t\tserviceCompartment.destroy();\r\n\t\t}\r\n\t\tserviceInfos.clear();\r\n\t\tserviceCompartments.clear();\r\n\t\tserviceInfos=null;\r\n\t\tserviceCompartments=null;\r\n\t\t// do not change the below order of closing app contexts. Always close children first before the parent context\r\n\t\tthis.servicesContext.close();\r\n\t\tthis.servicesContext = null;\t\t\t\t\r\n\t\tthis.commonServiceBeansContext.close();\r\n\t\tthis.commonServiceBeansContext = null;\r\n\t}",
"public boolean runAllPendingScripts() {\n if (LOG.isInfoEnabled()) {\n LOG.info(\"Running all pending update deployment scripts.\");\n }\n return this.runAllPendingScriptsInAllExtensions(false);\n }",
"public void removeExistingAppTokensIfPossible() {\n for (int i = this.mChildren.size() - 1; i >= 0; i--) {\n AppTokenList appTokens = ((TaskStack) this.mChildren.get(i)).mExitingAppTokens;\n for (int j = appTokens.size() - 1; j >= 0; j--) {\n AppWindowToken token = (AppWindowToken) appTokens.get(j);\n if (!token.hasVisible && !DisplayContent.this.mClosingApps.contains(token) && (!token.mIsExiting || token.isEmpty())) {\n cancelAnimation();\n Slog.v(DisplayContent.TAG, \"performLayout: App token exiting now removed\" + token);\n token.removeIfPossible();\n }\n }\n }\n }",
"@Override\n\tpublic List<NetBarDeployEntity> getUnDeployInfos() {\n\t\tList<NetBarDeployEntity> data = new ArrayList<NetBarDeployEntity>();\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\n\t\tStringBuffer sql = new StringBuffer();\n\t\tsql.append(\"select \"+getQueryColumns())\n\t\t.append(\" FROM \"+TableConstants.NETBAR_DEPLOY_TABLE+\" d WHERE d.is_deploy= :isDeploy \");\n\t\tparameters.put(\"isDeploy\", \"1\");\n\t\t\n\t\tList<Object> list = findNativeQuery(sql.toString(), parameters);\n\t\tfor (Object object : list) {\n\t\t\tif(object instanceof Object[]){\n\t\t\t\tObject[] obj = (Object[]) object;\n\t\t\t\tNetBarDeployEntity entity=this.obj2Entity(obj);\n\t\t\t\tdata.add(entity);\n\t\t\t}\n\t\t}\n\t\tif(data == null || data.size() <= 0){\n\t\t\treturn null;\n\t\t}\n\t\treturn data;\n\t}",
"public void destroyApp(boolean unconditional) {\n }",
"public void destroyApp(boolean unconditional) {\n }",
"public void destroyApp(boolean unconditional) {\n }",
"private void validateSites() {\n \t\tSiteEntry[] list = (SiteEntry[]) sites.values().toArray(new SiteEntry[0]);\n \t\tfor (int i = 0; i < list.length; i++) {\n \t\t\tURL siteURL = list[i].getResolvedURL();\n \t\t\tif (!supportsDetection(siteURL))\n \t\t\t\tcontinue;\n \n \t\t\tFile siteRoot = new File(siteURL.getFile().replace('/', File.separatorChar));\n \t\t\tif (!siteRoot.exists()) {\n \t\t\t\tunconfigureSite(list[i]);\n \t\t\t\tif (DEBUG)\n \t\t\t\t\tdebug(\"Site \" + siteURL + \" does not exist ... removing from configuration\"); //$NON-NLS-1$ //$NON-NLS-2$\n \t\t\t}\n \t\t}\n \t}",
"@Test\n public void testAccessControlIsOnlyCheckedWhenNoProdDeploymentExists() {\n List<Host> hosts = createHosts(18, \"6.0.0\");\n\n List<ModelFactory> modelFactories = List.of(createHostedModelFactory(Version.fromString(\"6.0.0\")),\n createHostedModelFactory(Version.fromString(\"6.1.0\")),\n createHostedModelFactory(Version.fromString(\"6.2.0\")));\n\n DeployTester tester = createTester(hosts, modelFactories, prodZone, Clock.systemUTC());\n ApplicationId applicationId = tester.applicationId();\n // Deploy with oldest version\n tester.deployApp(\"src/test/apps/hosted/\", \"6.0.0\");\n assertEquals(9, tester.getAllocatedHostsOf(applicationId).getHosts().size());\n\n // Deploy with version that does not exist on hosts and with app package that has no write access control,\n // validation of access control should not be done, since the app is already deployed in prod\n tester.deployApp(\"src/test/apps/hosted-no-write-access-control\", \"6.1.0\");\n assertEquals(9, tester.getAllocatedHostsOf(applicationId).getHosts().size());\n }",
"private void keepActiveManifests(List<ManifestFile> currentManifests) {\n keptManifests.clear();\n currentManifests.stream()\n .filter(\n manifest ->\n !rewrittenManifests.contains(manifest) && !deletedManifests.contains(manifest))\n .forEach(keptManifests::add);\n }",
"@Override\n public void undeploy(DeploymentUnit context) {\n \n }",
"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}",
"@Test\n public void testNotDeployedStateDeployedService() {\n cleanUp();\n\n State deployed = makeState(1L, \"State 1\");\n deployedServiceDataService.create(new DeployedService(deployed, Service.MOBILE_ACADEMY));\n\n State notDeployed = makeState(2L, \"State 2\");\n\n assertFalse(propertyService.isServiceDeployedInState(Service.MOBILE_ACADEMY, notDeployed));\n }",
"void unsetNumberOfInstallments();",
"protected void cleanup() {\n // if the java runtime is holding onto any files in the build dir, we\n // won't be able to delete them, so we need to force a gc here\n System.gc();\n\n if (deleteFilesOnNextBuild) {\n // delete the entire directory and all contents\n // when we know something changed and all objects\n // need to be recompiled, or if the board does not\n // use setting build.dependency\n //Base.removeDir(tempBuildFolder);\n \n // note that we can't remove the builddir itself, otherwise\n // the next time we start up, internal runs using Runner won't\n // work because the build dir won't exist at startup, so the classloader\n // will ignore the fact that that dir is in the CLASSPATH in run.sh\n Base.removeDescendants(tempBuildFolder);\n \n deleteFilesOnNextBuild = false;\n } else {\n // delete only stale source files, from the previously\n // compiled sketch. This allows multiple windows to be\n // used. Keep everything else, which might be reusable\n if (tempBuildFolder.exists()) {\n String files[] = tempBuildFolder.list();\n for (String file : files) {\n if (file.endsWith(\".c\") || file.endsWith(\".cpp\") || file.endsWith(\".s\")) {\n File deleteMe = new File(tempBuildFolder, file);\n if (!deleteMe.delete()) {\n System.err.println(\"Could not delete \" + deleteMe);\n }\n }\n }\n }\n }\n \n // Create a fresh applet folder (needed before preproc is run below)\n //tempBuildFolder.mkdirs();\n }",
"public void cleanAll() {\n\t\tfor (VirtualPet p : shelterPets.values()) {\n\t\t\tp.cleanPet();\n\t\t}\n\t}",
"public void forceActualServiceDeployment(String serviceName) {\n AxisService service = axisConfig.getServiceForActivation(serviceName);\n if (service == null) {\n // try to find it from the transit ghost map\n try {\n service = GhostDeployerUtils\n .getTransitGhostServicesMap(axisConfig).get(serviceName);\n } catch (AxisFault axisFault) {\n log.error(\"Error while reading Transit Ghosts map\", axisFault);\n }\n }\n if (service != null && GhostDeployerUtils.isGhostService(service)) {\n // if the service is a ghost service, load the actual service\n try {\n GhostDeployerUtils.deployActualService(axisConfig, service);\n } catch (AxisFault axisFault) {\n log.error(\"Error while loading actual service from Ghost\", axisFault);\n }\n }\n }",
"private void deployAnalysisEngines() throws AbortCPMException {\n // When restoring the CPM from a checkpoint, its processing pipeline must be restored\n // to a previous state. So all CasProcessors that were disabled during the previous run\n // will remain disabled. All stats will be recovered as well.\n // if (restoredProcTr != null)\n if (checkpointData != null) {\n // Restore CPM related stats from the checkppoint\n restoreFromCheckpoint(\"CPM\", \"CPM PROCESSING TIME\");\n }\n\n CasProcessorDeployer deployer = null;\n // Deploy each CASProcessor in a seperate container\n for (int i = 0; i < annotatorDeployList.size(); i++) {\n try {\n // Deployer deploys as many instances of CASProcessors as there are threads\n List cpList = (ArrayList) annotatorDeployList.get(i);\n String name = ((CasProcessor) cpList.get(0)).getProcessingResourceMetaData().getName();\n if (UIMAFramework.getLogger().isLoggable(Level.CONFIG)) {\n UIMAFramework.getLogger(this.getClass()).logrb(Level.CONFIG, this.getClass().getName(),\n \"initialize\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE,\n \"UIMA_CPM_deploying_new_cp__CONFIG\",\n new Object[] { Thread.currentThread().getName(), name });\n }\n if (cpList.size() > 0) {\n\n //\n // Get a deployer for this type of CasProcessor. The type of deployer is determined from\n // the\n // CPE Configuration. Specifically from the deployment model for this CasProcessor. The\n // first\n //\n if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {\n UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),\n \"initialize\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_lookup_cp__FINEST\",\n new Object[] { Thread.currentThread().getName(), name });\n }\n if (!cpeFactory.casProcessorConfigMap.containsKey(name)) {\n if (UIMAFramework.getLogger().isLoggable(Level.SEVERE)) {\n UIMAFramework.getLogger(this.getClass()).logrb(Level.SEVERE,\n this.getClass().getName(), \"initialize\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE,\n \"UIMA_CPM_invalid_processor_configuration__SEVERE\",\n new Object[] { Thread.currentThread().getName(), name });\n }\n throw new Exception(CpmLocalizedMessage.getLocalizedMessage(\n CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_EXP_missing_cp__WARNING\",\n new Object[] { Thread.currentThread().getName(), name }));\n }\n CpeCasProcessor casProcessorCPEConfig = (CpeCasProcessor) cpeFactory.casProcessorConfigMap\n .get(name);\n if (casProcessorCPEConfig == null) {\n if (UIMAFramework.getLogger().isLoggable(Level.SEVERE)) {\n\n UIMAFramework.getLogger(this.getClass()).logrb(Level.SEVERE,\n this.getClass().getName(), \"initialize\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE,\n \"UIMA_CPM_cp_configuration_not_defined__SEVERE\",\n new Object[] { Thread.currentThread().getName(), name });\n }\n throw new Exception(CpmLocalizedMessage.getLocalizedMessage(\n CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_EXP_missing_cp__WARNING\",\n new Object[] { Thread.currentThread().getName(), name }));\n } else if (casProcessorCPEConfig.getDeployment() == null\n || casProcessorCPEConfig.getDeployment().trim().length() == 0) {\n if (UIMAFramework.getLogger().isLoggable(Level.SEVERE)) {\n UIMAFramework.getLogger(this.getClass()).logrb(Level.SEVERE,\n this.getClass().getName(), \"initialize\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE,\n \"UIMA_CPM_cp_deployment_mode_not_defined__SEVERE\",\n new Object[] { Thread.currentThread().getName(), name });\n }\n throw new Exception(\n CpmLocalizedMessage.getLocalizedMessage(CPMUtils.CPM_LOG_RESOURCE_BUNDLE,\n \"UIMA_CPM_Exception_invalid_deployment__WARNING\",\n new Object[] { Thread.currentThread().getName(), name,\n casProcessorCPEConfig.getDeployment() }));\n }\n\n deployer = DeployFactory.getDeployer(cpeFactory, casProcessorCPEConfig, pca);\n // Deploy CasConsumer.\n ProcessingContainer container = deployer.deployCasProcessor(cpList, false);\n annotatorList.add(container);\n }\n } catch (Exception e) {\n UIMAFramework.getLogger(this.getClass()).logrb(Level.SEVERE, this.getClass().getName(),\n \"initialize\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE,\n \"UIMA_CPM_cp_failed_to_start__SEVERE\",\n new Object[] { Thread.currentThread().getName(), e.getMessage() });\n\n throw new AbortCPMException(e.getMessage());\n }\n }\n\n }",
"@AfterEach\n public void after() {\n launcher.dispose();\n }",
"private boolean CheckEmptyServices(List<Services> services){\n for(Services service : services){\n if(service.getServiceQuantity() > 0){\n return false;\n }\n }\n return true;\n }",
"public boolean cleanDoneTasks(){\n\t\tboolean removedAny = false; \n\t\tCollection<Task> tmp = new ArrayList<Task>();\n\t\t\n\t\tfor( Task task: m_Tasks ){\n\t\t\tif(task.done) {\n\t\t\t\ttmp.add(task);\n\t\t\t\tremovedAny = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(Task task : tmp){\n\t\t\tremoveTask(task);\n\t\t}\n\t\treturn removedAny;\n\t}",
"protected void uninstallComponents() {\n }",
"public void pruneEnvironments(final int numToPrune) {\n final SQLiteDatabase db = this.helper.getWritableDatabase();\n db.beginTransaction();\n try {\n db.delete(\"environments\",\n \"id in (SELECT env \" +\n \" FROM events \" +\n \" GROUP BY env \" +\n \" ORDER BY MAX(date), env \" +\n \" LIMIT \" + numToPrune + \")\",\n null);\n db.setTransactionSuccessful();\n } finally {\n db.endTransaction();\n }\n }",
"private void checkTimeTableOfServices () {\n\n\t\tif (jaiBusServiceList != null && jaiBusServiceList.size () > 0 && veeruBusServiceList != null\n\t\t\t\t&& veeruBusServiceList.size () > 0) {\n\n\t\t\tObject jaiBusService[] = jaiBusServiceList.toArray ();\n\n\t\t\tObject veeruBusService[] = veeruBusServiceList.toArray ();\n\n\t\t\tBusService jaiService;\n\n\t\t\tBusService veeruService;\n\n\t\t\tint result;\n\n\t\t\tfor (int i = 0; i < jaiBusService.length; i++) {\n\n\t\t\t\tjaiService = (BusService) jaiBusService[i];\n\n\t\t\t\tif (jaiService == null)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tfor (int j = 0; j < veeruBusService.length; j++) {\n\n\t\t\t\t\tveeruService = (BusService) veeruBusService[j];\n\n\t\t\t\t\tif (veeruService == null)\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\tresult = compareAndRemoveInefficentService (jaiService, veeruService);\n\n\t\t\t\t\tif (result == REMOVE_JAI_BUS_SERVICE) {\n\t\t\t\t\t\tjaiBusService[i] = null;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (result == REMOVE_VEERU_BUS_SERVICE) {\n\t\t\t\t\t\tveeruBusService[j] = null;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"protected void uninstallComponents() {\n\t}",
"public static int startAllServices() throws Throwable {\n\t\tint numServicesStarted = 0;\n\t\t\n\t\tlog.info(\"!!! Attempting to start API Service !!!\");\n\t\t//System.out.println(\"!!! Attempting to start API Service !!!\"); \n\t\tif (startApiService()) {\n\t\t\tnumServicesStarted++;\n\t\t}\n\t\tlog.info(\"!!! Attempting to start Inventory Service !!!\");\n\t\t//System.out.println(\"!!! Attempting to start Inventory Service !!!\");\n\t\tif (startInventoryService()) {\n\t\t\tnumServicesStarted++;\n\t\t}\n\t\tlog.info(\"!!! Attempting to start Insurance Service !!!\");\n\t\t//System.out.println(\"!!! Attempting to start Insurance Service !!!\");\n\t\tif (startInsuranceService()) {\n\t\t\tnumServicesStarted++;\n\t\t}\n\t\tlog.info(\"!!! Attempting to start Enquiry Service !!!\");\n\t\t//System.out.println(\"!!! Attempting to start Enquiry Service !!!\");\n\t\tif (startEnquiryService()) {\n\t\t\tnumServicesStarted++;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t Runtime.getRuntime().addShutdownHook(new Thread() \n\t\t\t { \n\t\t\t public void run() \n\t\t\t { \n\t\t\t \ttry {\n\t\t\t \t\tlog.info(\"!!! Services Shutdown Hook is running !!!\");\n\t\t\t \t\t//System.out.println(\"!!! Services Shutdown Hook is running !!!\"); \n\t\t\t\t int servicesStopped = ServiceFactory.stopAllServices();\n\t\t\t\t log.info(\"!!! A total of \" + servicesStopped + \" services were shutdown !!!\");\n\t\t\t\t //System.out.println(\"!!! A total of \" + servicesStopped + \" services were shutdown !!!\"); \n\t\t\t \t} catch (Throwable ex) {\n\t\t\t \t\tex.printStackTrace();\n\t\t\t \t}\n\t\t\t } \n\t\t\t }); \n\t\t\t \n\t\t} catch (Throwable ex) {\n\t\t\tlog.error(\"!!! Error on Services Shutdown !!! : \" + ex.getMessage(), ex);\n\t\t\t//System.out.println(\"!!! Error on Services Shutdown !!! : \" + ex.getMessage());\n\t\t\t//ex.printStackTrace();\n\t\t}\n\n\t\treturn numServicesStarted;\n\t}",
"public void cleanUp(){\n for(ShaderProgram sp : shaderlist){\n sp.cleanup();\n }\n }",
"void unsetListOfServiceElements();",
"public void teardown() {\n for (App app : applications) {\n app.icon.setCallback(null);\n }\n\t}",
"private void removeStoppedRecords(String pkgName) {\n if (pkgName != null) {\n boolean isPkgHasRecord = false;\n synchronized (this.mUtil.getmLock()) {\n Iterator<Map.Entry<String, ArrayList<LocationManagerService.UpdateRecord>>> it = this.mUtil.getRecordsByProvider().entrySet().iterator();\n while (true) {\n if (!it.hasNext()) {\n break;\n }\n ArrayList<LocationManagerService.UpdateRecord> records = it.next().getValue();\n if (records != null) {\n Iterator<LocationManagerService.UpdateRecord> it2 = ((ArrayList) records.clone()).iterator();\n while (true) {\n if (!it2.hasNext()) {\n break;\n } else if (pkgName.equals(it2.next().mReceiver.mCallerIdentity.mPackageName)) {\n LBSLog.i(TAG, \"package stopped,remove updateRecords and receivers:\" + pkgName);\n isPkgHasRecord = true;\n break;\n }\n }\n if (isPkgHasRecord) {\n break;\n }\n }\n }\n }\n if (isPkgHasRecord) {\n removeNotRunAndNotExistRecords();\n }\n }\n }",
"synchronized void cullDeadProcesses() {\n\t\t// Removes processes that have completed and haven't been checked on\n\t\t// for maxLiveTime milliseconds.\n\t\t//long cullBefore = System.currentTimeMillis() - maxLiveTime;\n\t\t//int before = processes.size();\n\t\tIterator<Map.Entry<Long, ProcessEntry>> iter = processes.entrySet().iterator();\n\t\tint runningCount = 0;\n\t\twhile (iter.hasNext()) {\n\t\t\tMap.Entry<Long, ProcessEntry> entry = iter.next();\n\t\t\tProcessEntry pe = entry.getValue();\n\t\t\tAbstractProcess.Status status = pe.process.getStatus();\n\t\t\t// For now, we never remove \"dead\" processes to ensure the status\n\t\t\t// is maintained. So instead all this does is check to make sure\n\t\t\t// that the run count doesn't get messed up.\n\t\t\t/*if (pe.lastAccess < cullBefore && status.isDead()) {\n\t\t\t\tif (logger.isDebugEnabled()) {\n\t\t\t\t\tlogger.debug(\"Process {} last accessed {}, before cutoff of {}.\",\n\t\t\t\t\t\t\tnew Object[] { uidToString(entry.getKey()),\n\t\t\t\t\t\t\tdateFormat.format(new Date(entry.getValue().lastAccess)),\n\t\t\t\t\t\t\tdateFormat.format(new Date(cullBefore)) });\n\t\t\t\t}\n\t\t\t\tpe.process.destroy();\n\t\t\t\titer.remove();\n\t\t\t} else */\n\t\t\tif (status == AbstractProcess.Status.RUNNING) {\n\t\t\t\trunningCount++;\n\t\t\t}\n\t\t}\n\t\t//logger.info(\"Removed {} processes.\", before - processes.size());\n\t\tif (this.runningCount != runningCount) {\n\t\t\tlogger.error(\"Actual running count {} does not match stored running count of {}! This is a bug!\", runningCount, this.runningCount);\n\t\t\t// Fix this\n\t\t\tthis.runningCount = runningCount;\n\t\t\tcheckRunningProcesses();\n\t\t}\n\t}",
"public void cleanUp() {\n if (penv != null) {\n penv.cleanup();\n }\n List<ONDEXGraph> indexed = new LinkedList<ONDEXGraph>();\n Set<String> graphFolders = new HashSet<String>();\n for (Entry<ONDEXGraph, String> ent : indexedGraphs.entrySet()) {\n if (!indeciesToRetain.contains(ent.getValue())) graphFolders.add(new File(ent.getValue()).getParent());\n indexed.add(ent.getKey());\n }\n for (ONDEXGraph graph : indexed) removeIndex(graph, null);\n for (String graphDir : graphFolders) {\n try {\n DirUtils.deleteTree(graphDir);\n } catch (IOException e) {\n }\n }\n }",
"public void clearThawed() {\n\t\t// Avoid concurrent modification exceptions.\n\t\tfinal ArrayList<ConfigurationButton> list = new ArrayList<>();\n\t\tlist.addAll(configurationToButtonMap.values());\n\t\tfinal Iterator<ConfigurationButton> it = list.iterator();\n\n\t\twhile (it.hasNext()) {\n\t\t\tfinal ConfigurationButton button = it.next();\n\t\t\tif (button.state != ConfigurationButton.FREEZE) {\n\t\t\t\tremove(button.getConfiguration());\n\t\t\t}\n\t\t}\n\t}",
"void purge(String[] targetInstanceNames) throws DigitalAssetStoreException;",
"@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (AssetManageReqHandle assetManageReqHandle : findAll()) {\n\t\t\tremove(assetManageReqHandle);\n\t\t}\n\t}",
"@After\n public void cleanUp() {\n mApConfigFile.delete();\n }",
"public static void removeCurrentTargetServiceForAll() {\n DCASelectedService targetService = targetServiceMap.get(DCAUserPreference.getLoggedInUser().getUsername());\n\n if (targetService == null) {\n return;\n }\n\n if (logger.isDebugEnabled()) {\n logger.debug(String.format(\"Invalidating Cached service with UUID = %s for all the Users\",\n targetService.getUuid()));\n }\n\n List<String> usersToRemove = new ArrayList<>();\n for (Map.Entry<String, DCASelectedService> entry : targetServiceMap.entrySet()) {\n DCASelectedService selectedService = entry.getValue();\n if (selectedService.getUuid().equals(targetService.getUuid())) {\n usersToRemove.add(entry.getKey());\n }\n }\n\n for (String userName : usersToRemove) {\n targetServiceMap.remove(userName);\n }\n }",
"public void destroyApp(boolean unconditional) {\n theIsRunning = false;\n }",
"static void destroyAll()\n {\n synchronized(allSchedulers)\n {\n // destroy all registered schedulers\n Iterator iter = allSchedulers.iterator();\n while (iter.hasNext())\n {\n Scheduler scheduler = (Scheduler) iter.next();\n \n // do not call cancel() since this method modifies allSchedulers\n scheduler.destroy();\n }\n \n if (logger.isInfoEnabled())\n {\n logger.info(allSchedulers.size() + \" scheduler instances destroyed\");\n }\n \n // be sure and clear set\n allSchedulers.clear();\n \n // and set flag that scheduler service ist stopped\n schedulerServiceRunning = false;\n }\n }",
"@Override\n public void onDisable() {\n try {\n System.out.println(\"Cleaning Dynamic Server System Processes.\");\n for (MinigameServer minigameServer : dynamicServerSystemManager.getServers())\n minigameServer.deleteServer();\n\n // Clean the output directory.\n FileUtils.deleteDirectory(new File(\"../minigameservers\"));\n new File(\"../minigameservers\").mkdirs();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n plugin = null;\n }",
"public boolean getDeleteRemovedProgramsAutomatically() {\n return true;\n }",
"@AfterClass (alwaysRun = true)\r\n\tpublic void cleanApp() throws Exception{\r\n\r\n\t\ttry {\r\n\t\t\tUtility.destroyTestVault();\r\n\t\t\tUtility.destroyTestVault(\"My Vault\");\r\n\t\t\tUtility.destroyUsers(xlTestDataWorkBook, \"DestroyUsers\");\r\n\r\n\t\t}//End try\r\n\r\n\t\tcatch(Exception e){\r\n\t\t\tthrow e;\r\n\t\t}//End Catch\r\n\t}",
"void unsetServiceConfigurationList();",
"@Before\r\n\tpublic void cleanStart(){\n\t\tStartupFunctions.clearTabs();\r\n\t}",
"@Before\r\n\tpublic void cleanStart(){\n\t\tStartupFunctions.clearTabs();\r\n\t}",
"void destroy() {\n \t\ttry {\r\n \t\t\tupKeep.stopRunning();\r\n \t\t} catch (InterruptedException e) {\r\n \t\t}\r\n \r\n \t\t// Kill all running processes.\r\n \t\tfor (MaximaProcess mp : pool) {\r\n \t\t\tmp.kill();\r\n \t\t}\r\n \t\tpool.clear();\r\n \r\n \t\t// Kill all used processes.\r\n \t\tfor (MaximaProcess mp : usedPool) {\r\n \t\t\tmp.kill();\r\n \t\t}\r\n \t\tusedPool.clear();\r\n \t}",
"@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (StepDefsCompositeStepDefDBE stepDefsCompositeStepDefDBE : findAll()) {\n\t\t\tremove(stepDefsCompositeStepDefDBE);\n\t\t}\n\t}",
"@Override\n\tpublic void removeAll() {\n\t\tfor (VcmsPortion vcmsPortion : findAll()) {\n\t\t\tremove(vcmsPortion);\n\t\t}\n\t}",
"private void cleanup() {\n File tmpdir = new File(System.getProperty(\"java.io.tmpdir\"));\n File[] backupDirs = tmpdir.listFiles(file -> file.getName().contains(BACKUP_TEMP_DIR_PREFIX));\n if (backupDirs != null) {\n for (File file : backupDirs) {\n try {\n FileUtils.deleteDirectory(file);\n log.info(\"removed temporary backup directory {}\", file.getAbsolutePath());\n } catch (IOException e) {\n log.error(\"failed to delete the temporary backup directory {}\", file.getAbsolutePath());\n }\n }\n }\n }",
"private synchronized void performHouseKeeping() {\r\n\t\tSet<Map.Entry<Integer,QueueManager>> eS = queueManagers.entrySet();\r\n\t\tfor( Iterator<Map.Entry<Integer,QueueManager>> i = eS.iterator(); i.hasNext(); ) {\r\n\t\t\tMap.Entry<Integer,QueueManager> qMME = i.next();\r\n\t\t\tQueueManager qM = qMME.getValue();\r\n\t\t\tif( qM.houseKeepingAndTestForDelete() ) {\r\n\t\t\t\ti.remove();\r\n\t\t\t\tLOGGER.debug(\"Removed QueueManager with magic number \"+qM.getMagicNumber()+\" due to inactivity\");\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\t MainService.allActivity.remove(this);\n\t}",
"public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"@Override\n public String deploy(String applicationName, Environment environment, Component component) {\n return null;\n }",
"@Test\n public void testRemoveHostAppPackage() throws Exception {\n final OPFPushHelper helper = OPFPushHelper.newInstance(Robolectric.application);\n assertFalse(helper.isInitDone());\n\n final PushProvider[] providers = {\n new MockPushProvider(\"provider1\", \"org.openpf.store1\"),\n new MockPushProvider(\"provider2\", \"org.openpf.store2\")\n };\n final Configuration.Builder builder = new Configuration.Builder()\n .addProviders(providers)\n .setEventListener(new TestEventListener());\n helper.init(builder.build());\n\n for (PushProvider provider : providers) {\n Robolectric.packageManager.addPackage(provider.getHostAppPackage());\n assertFalse(provider.isRegistered());\n }\n\n helper.register();\n\n PushProvider currentProvider = helper.getCurrentProvider();\n assertNotNull(currentProvider);\n\n checkProviderRegistrationState(helper, currentProvider);\n\n Robolectric.packageManager.removePackage(currentProvider.getHostAppPackage());\n helper.onProviderUnavailable(currentProvider);\n\n final PushProvider oldCurrentProvider = currentProvider;\n currentProvider = helper.getCurrentProvider();\n\n assertNotNull(currentProvider);\n assertNotSame(oldCurrentProvider, currentProvider);\n\n checkProviderRegistrationState(helper, currentProvider);\n\n for (PushProvider provider : providers) {\n Robolectric.packageManager.removePackage(provider.getHostAppPackage());\n }\n }"
] | [
"0.74137455",
"0.7409154",
"0.62486774",
"0.6113659",
"0.6100012",
"0.5774695",
"0.5714509",
"0.5586773",
"0.55055416",
"0.5485973",
"0.54367566",
"0.5344528",
"0.53359807",
"0.5322906",
"0.5310646",
"0.5245085",
"0.52346736",
"0.52290845",
"0.5216833",
"0.52139115",
"0.51936525",
"0.51860553",
"0.51769274",
"0.51644295",
"0.5147176",
"0.5145317",
"0.5133949",
"0.5100366",
"0.5082828",
"0.5078469",
"0.5076245",
"0.50574255",
"0.5046403",
"0.50405043",
"0.5029023",
"0.5021913",
"0.50203687",
"0.50203687",
"0.50203687",
"0.501983",
"0.49977866",
"0.49964544",
"0.49764445",
"0.49662256",
"0.49624476",
"0.49608696",
"0.49588892",
"0.4932744",
"0.492145",
"0.49184465",
"0.49090925",
"0.48909637",
"0.48904663",
"0.4888286",
"0.48862803",
"0.48780125",
"0.48706645",
"0.48669505",
"0.48631206",
"0.4860177",
"0.48401546",
"0.48294476",
"0.48185182",
"0.48116773",
"0.4807241",
"0.48026544",
"0.4795007",
"0.47900394",
"0.4786723",
"0.47833073",
"0.47824842",
"0.4780847",
"0.47773796",
"0.4766112",
"0.47638392",
"0.47636357",
"0.47636357",
"0.47591156",
"0.47588834",
"0.47561586",
"0.47538987",
"0.47460908",
"0.47434214",
"0.47385964",
"0.47385964",
"0.47385964",
"0.47385964",
"0.47385964",
"0.47385964",
"0.47385964",
"0.47385964",
"0.47385964",
"0.47385964",
"0.47385964",
"0.47385964",
"0.47385964",
"0.47385964",
"0.47385964",
"0.47382015",
"0.47370732"
] | 0.7673348 | 0 |
Check if there are valid Services and Deployments for each launcher available on the launcher list. | public void validateLauncherUrls() {
log.info("Validating the existing launcher URL list for missing deployments...");
for (String launcherUrl : getTotalLaunchers()) {
log.info("Validating [Launcher URL] " + launcherUrl + "...");
String objectName = getObjectNameFromLauncherUrl(launcherUrl);
if (!runtimeClient.deploymentExists(objectName) || !runtimeClient.serviceExists(objectName)) {
log.info("Found an invalid launcher [URL] " + launcherUrl);
// Just remove the reference to launcher now
// cleanOrphan* jobs will clean any orphan deployments
// desired count check will scale up if free count is reduced
unregisterLauncherIfExists(launcherUrl);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void addAllDeploymentsAsFreeLaunchers() {\n List<String> deployments = getDeployments();\n log.info(\"Found \" + deployments.size() + \" deployments to be added\");\n for (String deployment : deployments) {\n if (runtimeClient.serviceExists(deployment)) {\n addFreeLauncher(deployment);\n } else {\n log.info(\"Deployment \" + deployment + \" doesn't have a Service that exposes it. Not adding as a launcher...\");\n }\n }\n }",
"public void checkIfProgramsAccesible(List<String> programList);",
"private void checkRecipes() {\n\n for (Recipe recipe : this.recipeItems.values()) {\n List<String> requiredItems = new ArrayList<>(recipe.getRequiredItems());\n\n for (Item item : this.commonItems.values()) {\n requiredItems.remove(item.getName());\n }\n if (requiredItems.isEmpty()) {\n this.combineRecipe(recipe);\n break;\n }\n }\n }",
"public boolean checkBuildings(){\n\t\tfor(Structure building : this.buildings){\n\t\t\tif(!building.isDestroyed()){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"static boolean areAllStepsValid(WizardDescriptor descriptor) {\n // first step does not need to be checked, just the 2nd and more\n Boolean isValid = (Boolean) descriptor.getProperty(RunConfigurationPanel.VALID);\n if (isValid != null && !isValid) {\n return false;\n }\n isValid = (Boolean) descriptor.getProperty(PhpFrameworksPanel.VALID);\n if (isValid != null && !isValid) {\n return false;\n }\n @SuppressWarnings(\"unchecked\")\n Map<org.netbeans.modules.php.spi.phpmodule.PhpModuleExtender, Boolean> validity = (Map<org.netbeans.modules.php.spi.phpmodule.PhpModuleExtender, Boolean>) descriptor.getProperty(PhpExtenderPanel.VALID);\n if (validity != null) {\n for (Boolean extenderValid : validity.values()) {\n if (!extenderValid) {\n return false;\n }\n }\n }\n return true;\n }",
"private boolean isValid(){\n\n Set<ResourceSingle> checkSet = new HashSet<>();\n return shelves.stream()\n .map(Shelf::getCurrentType)\n .filter(Objects::nonNull)\n .allMatch(checkSet::add);\n }",
"private void validateSites() {\n \t\tSiteEntry[] list = (SiteEntry[]) sites.values().toArray(new SiteEntry[0]);\n \t\tfor (int i = 0; i < list.length; i++) {\n \t\t\tURL siteURL = list[i].getResolvedURL();\n \t\t\tif (!supportsDetection(siteURL))\n \t\t\t\tcontinue;\n \n \t\t\tFile siteRoot = new File(siteURL.getFile().replace('/', File.separatorChar));\n \t\t\tif (!siteRoot.exists()) {\n \t\t\t\tunconfigureSite(list[i]);\n \t\t\t\tif (DEBUG)\n \t\t\t\t\tdebug(\"Site \" + siteURL + \" does not exist ... removing from configuration\"); //$NON-NLS-1$ //$NON-NLS-2$\n \t\t\t}\n \t\t}\n \t}",
"public void checkRequirements() throws TNotFoundEx{\n\t\t\n\t\tArrayList<SimpleEntry> toolsCheck = new ArrayList<>();\n\t\t\n\t\t//adb\n\t\ttoolsCheck.add(new SimpleEntry<String, String>(\"adb\", \"adb devices\"));\n\t\t//sqlite3\n\t\ttoolsCheck.add(new SimpleEntry<String, String>(\"sqlite3\", \"sqlite3 -version\"));\n\t\t//strings\n\t\ttoolsCheck.add(new SimpleEntry<String, String>(\"strings\", \"strings -v\"));\n\t\t\n\t\tboolean pass = this.checkToolOnHost(toolsCheck);\n\t\t\n\t\tif (!pass)\n\t\t\tthrow new TNotFoundEx(\"Missing tools on host: Please install the missing tools and rerun the command\");\n\t}",
"public boolean hasEntries(){\n\t\treturn ! errorList.isEmpty();\n\t}",
"private boolean CheckEmptyServices(List<Services> services){\n for(Services service : services){\n if(service.getServiceQuantity() > 0){\n return false;\n }\n }\n return true;\n }",
"private boolean checkToolOnHost(ArrayList<SimpleEntry> toolCheck) throws TNotFoundEx{\n\t\tint result=13;\n\t\tString cmd=\"\";\n\t\tboolean pass=true;\n\t\tfor(SimpleEntry s: toolCheck){\n\t\t\tcmd = s.getValue().toString();\n\t\t\tresult = this.commando.executeProcessListPrintOP(cmd, false);\n\n\t\t\t\tif (result != 0){\n\t\t\t\t\tOutBut.printError(\"Tool \"+s.getKey().toString()+\" does not exist on the host, please install it first\");\n\t\t\t\t\tpass=false;\n\t\t\t\t}\n\t\t\t}\n\t\treturn pass;\n\t}",
"private void checkUpdateAvailability() {\n\t\t\n\t\t// Grab the data from the device and manifest\n\t\tString currentVersion = Utils.getProp(\"ro.ota.version\");\n\t\tcurrentVersion = currentVersion.replaceAll(\"[^0-9]\", \"\"); // Strip anyhting not a number\n\t\tString manifestVer = results.getVersion();\n\t\tmanifestVer = manifestVer.replaceAll(\"[^0-9]\", \"\");\n\n\t\t// Parse ints\n\t\tint manifestNumber = Integer.parseInt(manifestVer);\n\t\tint currentNumber = Integer.parseInt(currentVersion);\n\t\t\n\t\t// Pad out to be at least 5 digits long\n\t\t// That way, 1.2 shows bigger than 1.1.1\n\t\t// Because 12000 > 11100\n\t\t// Without this it would show 12 > 111\n\t\tif(manifestVer.length() <= 2){\n\t\t\tmanifestNumber *= 1000;\n\t\t} else if(manifestVer.length() <= 3) {\n\t\t\tmanifestNumber *= 100;\n\t\t} else if(manifestVer.length() <= 4) {\n\t\t\tmanifestNumber *= 10;\n\t\t}\n\t\t\n\t\t// Same again\n\t\tif(currentVersion.length() <= 2){\n\t\t\tcurrentNumber *= 1000;\n\t\t} else if(currentVersion.length() <= 3) {\n\t\t\tcurrentNumber *= 100;\n\t\t} else if(currentVersion.length() <= 4) {\n\t\t\tcurrentNumber *= 10;\n\t\t}\n\t\t\n\t\t// Set pref\n\t\tPreferences.setUpdateAvailable(mContext, manifestNumber > currentNumber);\n\t}",
"void checkForApps();",
"private boolean hasFailures(ArrayList items){\n Iterator<Map> iterator = items.iterator();\n while(iterator.hasNext()){\n if(hasFailures(iterator.next()))\n return true;\n }\n return false;\n }",
"private static boolean appCheck(JsonObject object, JsonChecker jsonChecker){\n\t\tint size = object.entrySet().size();\n\n\t\t// Client\n\t\tif(size == 2 || size == 4){\n\t\t\tJsonObject[] templates = jsonChecker.getClientAppJson();\n\t\t\tfor(JsonObject obj : templates) if (haveSameSkeleton(object, obj.get(\"generator-jhipster\").getAsJsonObject())) return true;\n\t\t\treturn false;\n\t\t}\n\t\t// Server\n\t\telse if (size==15 || size==17 || size==19) {\n\t\t\tJsonObject[] templates = jsonChecker.getServerAppJson();\n\t\t\tfor (JsonObject obj : templates) if (haveSameSkeleton(object, obj.get(\"generator-jhipster\").getAsJsonObject())) return true;\n\t\t\treturn false;\n\t\t}\n\t\t// Error\n\t\telse return false;\n\t}",
"private boolean CheckCallDefinitions()\n {\n if(apiCallDefinitions==null || apiCallDefinitions.size()==0)\n return false;\n\n if(defaultAPIVersionPath==null)\n return false;\n\n return true;\n }",
"public void checkAvaliableElevators()\r\n\t{\r\n\t\tSystem.out.println(\"--------- Checking Elevators Current Status ------\");\t\r\n\t\t\r\n\t\tif(availableElevadors.isEmpty())\r\n\t\t{\r\n\t\t\tfor(int i=0; i <numberOfElevators-3; i++) {\r\n\t\t\t\tavailableElevadors.add(occupiedElevadors.remove(i));\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"--------- Elevators are available again ------\");\r\n\t\t\r\n\t\t}else {\r\n\t\t\tfor(int i=0;i<availableElevadors.size();i++) {\r\n\t\t\t\tSystem.out.println(\" Elevator no \" + availableElevadors.get(i).getElevatorNumber() +\" ready for Requests\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tfor(int i=0;i<occupiedElevadors.size();i++) {\r\n\t\t\t\tSystem.out.println(\" Elevator no \" + occupiedElevadors.get(i).getElevatorNumber() +\" is Occupied\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t}\r\n\r\n\t}",
"private boolean isPackValid() {\n\t\treturn (logData != null\n\t\t\t\t&& logData.entries != null\n\t\t\t\t&& logData.entries.size() > 1);\n\t}",
"private void warnNotAllSquadronsDeployed() {\n warnDialogProvider.get().show(\"Not all squadrons have been deployed. Squadrons not deployed are lost.\");\n }",
"private Boolean checkForEmptyList() {\n Boolean emptyListAvailable = tin_perLitrePrice.getText().toString().trim().isEmpty() ||\n tin_fuelQuantityLitres.getText().toString().trim().isEmpty() ||\n tin_totalFuelPrice.getText().toString().trim().isEmpty() ||\n tin_currentKm.getText().toString().trim().isEmpty() ||\n tin_startingKm.getText().toString().trim().isEmpty() ||\n tin_distanceCovered.getText().toString().trim().isEmpty() ||\n tv_calculatedAverage_addEdit.getText().toString().trim().isEmpty() ||\n tv_coverableDistance_addEdit.getText().toString().trim().isEmpty() ||\n tv_nextFuelFill_addEdit.getText().toString().trim().isEmpty();\n\n if (emptyListAvailable) {\n validationList(); // set error messages\n }\n Log.d(TAG, \"checkForEmptyList: emptyListAvailable = \" + emptyListAvailable);\n\n\n return emptyListAvailable; //\n }",
"public boolean isDeployed(){\n return !places.isEmpty();\n }",
"private synchronized void checkRunningProcesses() {\n\t\t// If maxProcesses is 0 or lower, we treat it as \"infinite\"\n\t\tif (maxProcesses <= 0 || runningCount < maxProcesses) {\n\t\t\tif (!waitingQueue.isEmpty()) {\n\t\t\t\t// Remove the first entry from the queue\n\t\t\t\tProcessEntry entry = waitingQueue.removeFirst();\n\t\t\t\t// And start it\n\t\t\t\tentry.process.start();\n\t\t\t\trunningCount++;\n\t\t\t\tlogger.debug(\"Starting process {}, have {} running processes, wait queue contains {} entries.\", new Object[] { entry.process, runningCount, waitingQueue.size() });\n\t\t\t}\n\t\t}\n\t}",
"public void cleanOrphanDeployments() {\n log.info(\"Cleaning orphan Deployments...\");\n List<String> deploymentNames = getDeployments();\n for (String deploymentName : deploymentNames) {\n if (deploymentName.startsWith(Constants.BPG_APP_TYPE_LAUNCHER + \"-\") && !serviceExists(deploymentName)) {\n log.info(\"Cleaning orphan Deployment [Name] \" + deploymentName + \"...\");\n\n unregisterLauncherIfExistsByObjectName(deploymentName);\n\n if (!runtimeClient.deleteDeployment(deploymentName)) {\n log.error(\"Deployment deletion failed [Deployment Name] \" + deploymentName);\n }\n }\n }\n }",
"private void checkUpdateCheckFailed(PackageVersions packageVersions) {\n mFakeIntentHelper.assertReliabilityTriggerScheduled();\n\n // Assert the storage was updated.\n checkPackageStorageStatus(PackageStatus.CHECK_COMPLETED_FAILURE, packageVersions);\n }",
"private boolean isAllTestsRun() {\n Collection<TestPackage> pkgs = getTestPackages();\n for (TestPackage pkg : pkgs) {\n if (!pkg.isAllTestsRun()) {\n return false;\n }\n }\n return true;\n }",
"private void checkStructure() {\n for (DatabaseUpdateType updateType : DatabaseUpdateType.values()) {\n checkDatabaseStructure(updateType);\n }\n }",
"private IInstallableUnit[] validateInput(IInstallableUnit[] ius) {\n \t\tMap versions = new HashMap();\n \t\tList toRemove = new ArrayList();\n \t\tArrayList applicable = new ArrayList(ius.length);\n \t\tfor (int i = 0; i < ius.length; i++) {\n \t\t\tIInstallableUnit iu = ius[i];\n \t\t\tif (isApplicable(iu.getFilter())) {\n \t\t\t\tapplicable.add(iu);\n \t\t\t\t// if we have a singleton bundle, only try to install the highest version\n \t\t\t\tif (iu.isSingleton()) {\n \t\t\t\t\tString id = iu.getId();\n \t\t\t\t\tIInstallableUnit oldIU = (IInstallableUnit) versions.get(id);\n \t\t\t\t\tif (oldIU == null) {\n \t\t\t\t\t\tversions.put(id, iu);\n \t\t\t\t\t} else {\n \t\t\t\t\t\tIInstallableUnit removed = iu;\n \t\t\t\t\t\tif (iu.getVersion().compareTo(oldIU.getVersion()) > 0) {\n \t\t\t\t\t\t\tversions.put(id, iu);\n \t\t\t\t\t\t\tremoved = oldIU;\n \t\t\t\t\t\t}\n \t\t\t\t\t\ttoRemove.add(removed);\n \t\t\t\t\t\tString msg = NLS.bind(\"{0} version {1} cannot be installed because it is marked as a singleton and a higher version has been found.\", id, removed.getVersion()); //$NON-NLS-1$\n \t\t\t\t\t\tresult.add(new Status(IStatus.WARNING, DirectorActivator.PI_DIRECTOR, msg, null));\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\tString msg = NLS.bind(\"{0} cannot be installed because its filter is not satisfied in this environment.\", ius[i].getId()); //$NON-NLS-1$\n \t\t\t\tresult.add(new Status(IStatus.WARNING, DirectorActivator.PI_DIRECTOR, msg, null));\n \t\t\t}\n \t\t}\n \t\tapplicable.removeAll(toRemove);\n \t\treturn (IInstallableUnit[]) applicable.toArray(new IInstallableUnit[applicable.size()]);\n \t}",
"private boolean checkingAllArguments() {\n\t\t\n\t\t// test if the four player types have been selected\n\t\tfor(int i=0;i<allButtons.size();i++) {\n\t\t\tif(allButtons.get(i)==null) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// test if the seed is in the correct format\n\t\tif(!(seed.textProperty().get().isEmpty())){\n\t\t\ttry {\n\t\t\t\tgameSeed = Long.parseLong(seed.getText());\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\tmenuMessage.setText(\"Given seed is not a valid number\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t}\n\t\t\n\t\t// test if for each of the players the given arguments are correct\n\t\tfor(int i = 0; i < allButtons.size(); ++i) {\n\t\t\tchar playerType = allButtons.get(i).getText().charAt(0);\n\t\t\tString argument = texts.get(2 * i + 1).getText();\n\t\t\t\n\t\t\tif(!argument.isEmpty()) {\n\t\t\t\tswitch(playerType) {\n\t\t\t\t\n\t\t\t\tcase 'S' : \n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tlong l = Long.parseLong(texts.get(2 * i + 1).getText());\n\t\t\t\t\t\tif(l < 9) {\n\t\t\t\t\t\t\tmenuMessage.setText(\"The iteration value must be at least 9\");\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\tmenuMessage.setText(\"One of the iteration number is not a valid number\");\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 'R' :\n\t\t\t\t\t\n\t\t\t\t\tString[] parts = StringSerializer.split(\"\\\\.\", argument); \n\t\t\t\t\t\n\t\t\t\t\tif (parts.length != 4) { \n\t\t\t\t\t\tmenuMessage.setText(\"One of the IP Address is not a valid address\");\n\t\t\t\t\t\treturn false; \n\t\t\t\t\t} \n\t\t\t\t\t\n\t\t\t\t\tfor (String str : parts) { \n\t\t\t\t\t\tint j = Integer.parseInt(str); \n\t\t\t\t\t\tif ((j < 0) || (j > 255)) { \n\t\t\t\t\t\t\tmenuMessage.setText(\"One of the IP Address is not a valid address\");\n\t\t\t\t\t\t\treturn false; \n\t\t\t\t\t\t} \n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\treturn true;\n\t}",
"public void cleanOrphanServices() {\n log.info(\"Cleaning orphan Services...\");\n List<String> serviceNames = getServices();\n for (String serviceName : serviceNames) {\n if (serviceName.startsWith(Constants.BPG_APP_TYPE_LAUNCHER + \"-\") && !deploymentExists(serviceName)) {\n log.info(\"Cleaning orphan Service [Name] \" + serviceName + \"...\");\n\n unregisterLauncherIfExistsByObjectName(serviceName);\n\n if (!runtimeClient.deleteService(serviceName)) {\n log.error(\"Service deletion failed [Service Name] \" + serviceName);\n }\n }\n }\n }",
"private boolean checkMultiplePlaneEdit(){\r\n\t\tboolean flag=false;\r\n\t\tfor(UiAirplaneModel model:uiAirplaneModel.getAirplaneList()){\r\n\t\t\tif(model.isInputDisplayItem()){\r\n\t\t\t\tflag=true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn flag;\r\n\t}",
"public boolean isToDeploy() {\r\n\t\treturn attachUpdates>0 || catUpdates>0 || catTransUpdates>0 || prodUpdates>0 || prodTransUpdates>0 || menuUpdates>0;\r\n\t}",
"boolean isExecutableValidationEnabled();",
"public boolean checkIsEmpty() {\n return isEmpty(minimumInstances) && isEmpty(maximumInstances) && isEmpty(dependentProfiles);\n }",
"void check()\n {\n final ScopeSymbolValidator validator = new ScopeSymbolValidator();\n for (ServiceMethod method : methods)\n validator.validate(method.getName(), method);\n }",
"private void validateDeletedManifests(Set<ManifestFile> currentManifests) {\n deletedManifests.stream()\n .filter(manifest -> !currentManifests.contains(manifest))\n .findAny()\n .ifPresent(\n manifest -> {\n throw new ValidationException(\"Manifest is missing: %s\", manifest.path());\n });\n }",
"private boolean checkExecution() {\n if (!checkPhoneStatusOK()) {\n return false;\n }\n if (!checkBatteryLevelOK()) {\n return false;\n }\n return true;\n }",
"private void checkUpdateCheckTriggered(PackageVersions packageVersions) {\n // Assert the PackageTracker attempted to trigger an update.\n mFakeIntentHelper.assertUpdateTriggered();\n\n // If an update check was triggered reliability triggering should always be enabled to\n // ensure that it can be completed if it fails.\n mFakeIntentHelper.assertReliabilityTriggerScheduled();\n\n // Check the expected storage state.\n checkPackageStorageStatus(PackageStatus.CHECK_STARTED, packageVersions);\n }",
"@PostConstruct\n protected void checkInitialization() {\n ValidationUtility.checkNotNullNorEmpty(profileTaskCheckers, \"profileTaskCheckers\",\n ProfileActionConfigurationException.class);\n ValidationUtility.checkNotNullElements(profileTaskCheckers, \"profileTaskCheckers\",\n ProfileActionConfigurationException.class);\n }",
"private boolean hasRequirements() {\n \t\tif (checkHasRequirements) {\n \t\t\thasRequirements = pullRequired(requiredInput, false);\n \t\t\tcheckHasRequirements = false;\n \t\t}\n \t\treturn hasRequirements;\n \t}",
"public boolean hasAppsAccessingStorage() {\n try {\n String extStoragePath = Environment.getExternalStorageDirectory().toString();\n IMountService mountService = getMountService();\n int stUsers[] = mountService.getStorageUsers(extStoragePath);\n if (stUsers != null && stUsers.length > 0) {\n return true;\n }\n List<ApplicationInfo> list = mActivityManager.getRunningExternalApplications();\n if (list != null && list.size() > 0) {\n return true;\n }\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n return false;\n }",
"boolean isAppInstalled(String bundleId);",
"private void performSanityCheck()\n\t{\n\t\tif (variableNames != null && domainSizes != null\n\t\t\t\t&& propositionNames != null)\n\t\t{\n\t\t\tcheckStateSizes();\n\t\t\tcheckDomainSizes();\n\t\t}\n\t}",
"@Override\r\n public boolean isSatisfied(Configuration cfg) {\r\n Set<Node> firstNodes = new HashSet<Node>();\r\n Set<Node> secondNodes = new HashSet<Node>();\r\n if (getFirstSet().size() == 0 || getSecondSet().size() == 0) {\r\n //FIXME debug log VJob.logger.error(this.toString() + \": Some sets of virtual machines are empty\");\r\n return false;\r\n }\r\n\r\n for (VirtualMachine vm : getFirstSet()) {\r\n if (cfg.isRunning(vm)) {\r\n firstNodes.add(cfg.getLocation(vm));\r\n }\r\n }\r\n for (VirtualMachine vm : getSecondSet()) {\r\n if (cfg.isRunning(vm)) {\r\n secondNodes.add(cfg.getLocation(vm));\r\n }\r\n }\r\n\r\n for (Node n : firstNodes) {\r\n if (secondNodes.contains(n)) {\r\n \tManagedElementList<Node> ns = new SimpleManagedElementList<Node>();\r\n ns.addAll(firstNodes);\r\n ns.retainAll(secondNodes);\r\n //FIXME debug log VJob.logger.error(this.toString() + \": Nodes host VMs of the two groups: \" + ns);\r\n return false;\r\n }\r\n }\r\n for (Node n : secondNodes) {\r\n if (firstNodes.contains(n)) {\r\n \tManagedElementList<Node> ns = new SimpleManagedElementList<Node>();\r\n ns.addAll(secondNodes);\r\n ns.retainAll(firstNodes);\r\n //FIXME debug log VJob.logger.error(this.toString() + \": Nodes host VMs of the two groups: \" + ns);\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"boolean hasServiceList();",
"private void checkRunningEvaluations() {\n List<EvaluatorHandle> finishedHandles = new LinkedList<EvaluatorHandle>();\n for (EvaluatorHandle handle : evaluations) {\n switch (handle.getStatus()) {\n case NEW:\n break;\n case CREATED:\n break;\n case RUNNING:\n break;\n case NOT_RESPONDING:\n break;\n case FAILED:\n case DESTROYED:\n case COMPLETED:\n File task = handle.getTask();\n log.log(Level.INFO, \"Tasks completed. Status: {0}\", handle.getStatus());\n tasks.remove(task);\n finishedHandles.add(handle);\n break;\n default:\n throw new AssertionError(handle.getStatus().name());\n }\n }\n for (EvaluatorHandle handle : finishedHandles) {\n evaluations.remove(handle);\n }\n }",
"@Override\n public void onClick(View view) {\n List<AndroidAppProcess> runningAppProcessInfo = AndroidProcesses.getRunningAppProcesses();\n\n for (int i = 0; i < runningAppProcessInfo.size(); i++) {\n Log.i(\"MainActivity\", runningAppProcessInfo.get(i).getPackageName());\n // Check for AnkuLua\n if(runningAppProcessInfo.get(i).getPackageName().equals(\"com.appautomatic.ankulua.pro2\") ||\n runningAppProcessInfo.get(i).getPackageName().equals(\"com.appautomatic.ankulua.pro\") ||\n runningAppProcessInfo.get(i).getPackageName().equals(\"com.appautomatic.ankulua.trial\")){\n\n // AnkuLua package process has been detected! Perma ban account for abusing Terms & Conditions\n alert();\n return;\n }\n }\n Toast.makeText(MainActivity.this,\"Not Found\",Toast.LENGTH_SHORT).show();\n }",
"private void checkProducts() {\n for (JButton prodButton : productButtons) {\n if (inventoryManager.checkProductAvailability(prodButton.getText())) {\n prodButton.setEnabled(true);\n } else {\n prodButton.setEnabled(false);\n }\n }\n }",
"private void startAdditionalApps(String appList) throws FileSystemException {\n //Split on comma\n String[] additionalApps = appList.split(Strings.COMMA);\n for (String app : additionalApps) {\n log.log(Level.INFO, MessageNames.STARTING_WITH_SERVICE, app);\n FileObject serviceArchive = findServiceArchiveForName(app);\n if (serviceArchive==null) {\n System.err.println(MessageFormat.format(messages.getString(MessageNames.NO_SUCH_CLIENT_APP), clientAppName));\n System.exit(1);\n }\n deployServiceArchive(serviceArchive, new String[0]);\n }\n }",
"public void verifyIfElevenStepsArePresent(){\r\n WebDriverWait wait = new WebDriverWait(driver,60);\r\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(firstStepNameXpathLocator)));\r\n List<WebElement> stepsList = driver.findElements(By.xpath(allStepsXpathLocator));\r\n Assert.assertTrue(stepsList.size()==11,\"All 11 Steps are present on the page.\");\r\n }",
"public static boolean runAllTests() {\r\n\r\n return testLinkedCart() && testAlphabetListConstructorIsEmpty()\r\n && testAlphabetListConstructorBadInput() && testAlphabetListAddBadInput1()&&\r\n testAlphabetListAddBadInput2()&&testAlphabetListAddBadInput2()&&\r\n testAlphabetListAdd() && testAlphabetListRemove();\r\n }",
"private Boolean checkRuntimePermission() {\n List<String> permissionsNeeded = new ArrayList<String>();\n\n final List<String> permissionsList = new ArrayList<String>();\n if (!addPermission(permissionsList, Manifest.permission.READ_EXTERNAL_STORAGE))\n permissionsNeeded.add(\"Storage\");\n if (!addPermission(permissionsList, Manifest.permission.CAMERA))\n permissionsNeeded.add(\"Camera\");\n /* if (!addPermission(permissionsList, Manifest.permission.WRITE_CONTACTS))\n permissionsNeeded.add(\"Write Contacts\");*/\n\n if (permissionsList.size() > 0) {\n if (permissionsNeeded.size() > 0) {\n // Need Rationale\n String message = \"You need to grant access to \" + permissionsNeeded.get(0);\n for (int i = 1; i < permissionsNeeded.size(); i++)\n message = message + \", \" + permissionsNeeded.get(i);\n showMessageOKCancel(message,\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(permissionsList.toArray(new String[permissionsList.size()]),\n REQUEST_CODE_ASK_MULTIPLE_PERMISSIONS);\n }\n }\n });\n return false;\n }\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(permissionsList.toArray(new String[permissionsList.size()]),\n REQUEST_CODE_ASK_MULTIPLE_PERMISSIONS);\n }\n return false;\n }\n return true;\n }",
"public boolean isMixPackagesPresent()\n\t{\n\t\ttry\n\t\t{\n\t\t\tArrayList<Integer> versions = new ArrayList<Integer>();\n\t\t\t\n\t\t\tif(PackageInformation.getInstance().collectPkgInfoFromUPM())\n\t\t\t{\n\t\t\t\tVector<ApplicationVersion> firmwareInfo = PackageInformation.getInstance().getAppVersionsFromSpot();\n\t\t\t\tif(firmwareInfo != null && !firmwareInfo.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tversions.clear();\n\t\t\t\t\tint buildVersion = getBuildVersion(firmwareInfo);\n\t\t\t\t\t\n\t\t\t\t\tif(buildVersion != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(buildVersion == Version.DELTA_F.getVersion())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tversions.add(Version.DELTA_C.getVersion());\n\t\t\t\t\t\t\treturn isOtherPackages(versions, firmwareInfo);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(buildVersion == Version.DELTA_E.getVersion())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tversions.add(Version.DELTA_C.getVersion());\n\t\t\t\t\t\t\treturn isOtherPackages(versions, firmwareInfo);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(buildVersion == Version.DELTA_C.getVersion())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tversions.add(Version.DELTA_F.getVersion());\n\t\t\t\t\t\t\tversions.add(Version.DELTA_E.getVersion());\n\t\t\t\t\t\t\treturn isOtherPackages(versions, firmwareInfo);\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\telse\n\t\t\t{\n\t\t\t\tlogger.error(\"Failed to collect package information\");\n\t\t\t}\n\t\t}\n\t\tcatch(InterruptedException e)\n\t\t{\n\t\t\tlogger.error(e.getMessage());\n\t\t}\n\t\treturn false;\n\t}",
"public static boolean hasUpdateCenter(File asInstallRoot) {\n return getUpdateCenterLauncher(asInstallRoot) != null;\n }",
"protected boolean isInMultiWinWhiteList(String packageName) {\n if (packageName == null || sMultiWinWhiteListPkgNames.size() == 0 || !sMultiWinWhiteListPkgNames.contains(packageName.toLowerCase())) {\n return false;\n }\n return true;\n }",
"public static boolean checkResources(){\n for(Instruction i : waitingList){\n if(resourceArr[i.resourceType - 1] >= i.resourceAmount){\n return true;\n }\n }\n for(int i = 0 ; i < taskPointers.length; i ++){\n int pointerIndex = taskPointers[i];\n Task currTask = taskList.get(i);\n if(currTask.terminateTime == - 1 && (currTask.isAborted == false) && Collections.disjoint(waitingList, currTask.instructionList)){\n Instruction currInstruction = currTask.instructionList.get(pointerIndex);\n Type instructionType = currInstruction.instructionType;\n int resourceType = currInstruction.resourceType;\n if(instructionType != Type.request){\n return true;\n }else{\n if(resourceArr[currInstruction.resourceType - 1] >= currInstruction.resourceAmount){\n return true;\n }\n }\n }\n\n }\n return false;\n }",
"private void CheckIfServiceIsRunning() {\n\t\tLog.i(\"Convert\", \"At isRunning?.\");\n\t\tif (eidService.isRunning()) {\n//\t\t\tLog.i(\"Convert\", \"is.\");\n\t\t\tdoBindService();\n\t\t} else {\n\t\t\tLog.i(\"Convert\", \"is not, start it\");\n\t\t\tstartService(new Intent(IDManagement.this, eidService.class));\n\t\t\tdoBindService();\n\t\t}\n\t\tLog.i(\"Convert\", \"Done isRunning.\");\n\t}",
"public boolean validatePageElements() {\n boolean nameCheck = name.isDisplayed() && name.isEnabled();\n boolean emailCheck = email.isDisplayed() && email.isEnabled();\n boolean passwordCheck = password.isDisplayed() && password.isEnabled();\n boolean signupGoogleCheck = signupGoogle.isDisplayed() && signupGoogle.isEnabled();\n boolean signupSlackCheck = signupSlack.isDisplayed() && signupSlack.isEnabled();\n boolean signupOutlookCheck = signupOutlook.isDisplayed() && signupOutlook.isEnabled();\n boolean signupAppleCheck = signupApple.isDisplayed() && signupApple.isEnabled();\n boolean signupFacebookCheck = signupFacebook.isDisplayed() && signupFacebook.isEnabled();\n boolean logoCheck = miroLogo.isDisplayed();\n\n return nameCheck && emailCheck && passwordCheck && signupGoogleCheck && signupSlackCheck && signupOutlookCheck && signupAppleCheck && signupFacebookCheck && logoCheck;\n\n }",
"public List<String> getFreeLaunchers() {\n return persistence.getFreeLauncherUrls();\n }",
"public boolean isServiceTypeInstalled(String fullTypeName) {\r\n ServiceData sd = ServiceData.getLocalInstance();\r\n\r\n if (!sd.containsServiceType(fullTypeName)) {\r\n log.error(\"unknown service {}\", fullTypeName);\r\n return false;\r\n }\r\n\r\n Set<Library> libraries = getUnfulfilledDependencies(fullTypeName);\r\n if (libraries.size() > 0) {\r\n // log.info(\"{} is NOT installed\", fullTypeName);\r\n return false;\r\n }\r\n\r\n // log.info(\"{} is installed\", fullTypeName);\r\n return true;\r\n }",
"boolean check() {\n return check(Env.empty);\n }",
"private void checkForMissingEpisodes(){\n\t\tcheckForMissingEpisodes(null, null);\n\t}",
"public boolean getExists() {\n try {\n return getExecutable(new Launcher.LocalLauncher(new StreamTaskListener(new NullStream()))) != null;\n } catch(IOException ex) {\n return false;\n } catch(InterruptedException e) {\n return false;\n }\n }",
"private void CheckStructureIntegrity() {\n int size = 0;\n for (Module mod : modules) {\n size += mod.getAddresses().size();\n logger.info(\"BBS : {} Module {}\", mod.getAddresses().size(), mod.getName());\n }\n logger.info(\"Total BBS : {}\", size);\n }",
"private boolean isBuilt() {\n\t\t\tif (name == null) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tfor (WeaponFlavor flavor: WeaponFlavor.values()) {\n\t\t\t\tif (flavors.get(flavor) == null) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}",
"protected boolean allBoatsArePlaced() {\n for(BoatDrawing boat : boatMap.values()) {\n if (!boat.isPlaced()) {\n return false;\n }\n }\n logMsg(\"click now on 'valider' button to begin game\");\n return true;\n }",
"public void verifyAppPermissions() {\n boolean hasAll = true;\n mHasBluetoothPermissions = ActivityCompat.checkSelfPermission(this, Manifest.permission.BLUETOOTH) == PackageManager.PERMISSION_GRANTED;\n mHasBluetoothAdminPermissions = ActivityCompat.checkSelfPermission(this, Manifest.permission.BLUETOOTH_ADMIN) == PackageManager.PERMISSION_GRANTED;\n hasAll &= ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED;\n hasAll &= ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED;\n\n if (!hasAll) {\n // We don't have permission so prompt the user\n ActivityCompat.requestPermissions(\n this,\n APP_PERMISSIONS,\n REQUEST_PERMISSIONS\n );\n }\n }",
"private boolean validateArguments() {\n return !isEmpty(getWsConfig()) && !isEmpty(getVirtualServer()) && !isEmpty(getVirtualServer()) && !isEmpty(getAppContext()) && !isEmpty(getWarFile()) && !isEmpty(getUser()) && !isEmpty(getPwdLocation());\n }",
"private void checkTimeTableOfServices () {\n\n\t\tif (jaiBusServiceList != null && jaiBusServiceList.size () > 0 && veeruBusServiceList != null\n\t\t\t\t&& veeruBusServiceList.size () > 0) {\n\n\t\t\tObject jaiBusService[] = jaiBusServiceList.toArray ();\n\n\t\t\tObject veeruBusService[] = veeruBusServiceList.toArray ();\n\n\t\t\tBusService jaiService;\n\n\t\t\tBusService veeruService;\n\n\t\t\tint result;\n\n\t\t\tfor (int i = 0; i < jaiBusService.length; i++) {\n\n\t\t\t\tjaiService = (BusService) jaiBusService[i];\n\n\t\t\t\tif (jaiService == null)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tfor (int j = 0; j < veeruBusService.length; j++) {\n\n\t\t\t\t\tveeruService = (BusService) veeruBusService[j];\n\n\t\t\t\t\tif (veeruService == null)\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\tresult = compareAndRemoveInefficentService (jaiService, veeruService);\n\n\t\t\t\t\tif (result == REMOVE_JAI_BUS_SERVICE) {\n\t\t\t\t\t\tjaiBusService[i] = null;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (result == REMOVE_VEERU_BUS_SERVICE) {\n\t\t\t\t\t\tveeruBusService[j] = null;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"boolean isSetListOfServiceElements();",
"private void checkFirstRun() {\r\n\r\n\t final String PREFS_NAME = \"MyPrefsFile\";\r\n\t final String PREF_VERSION_CODE_KEY = \"version_code\";\r\n\t final int DOESNT_EXIST = -1;\r\n\r\n\r\n\t // Get current version code\r\n\t int currentVersionCode = 0;\r\n\t try {\r\n\t currentVersionCode = getPackageManager().getPackageInfo(getPackageName(), 0).versionCode;\r\n\t } catch (android.content.pm.PackageManager.NameNotFoundException e) {\r\n\t // handle exception\r\n\t Log.e(\"PackageMissing\", \"Package Not Found\");\r\n\t return;\r\n\t }\r\n\r\n\t // Get saved version code\r\n\t SharedPreferences prefs = getSharedPreferences(PREFS_NAME, MODE_PRIVATE);\r\n\t int savedVersionCode = prefs.getInt(PREF_VERSION_CODE_KEY, DOESNT_EXIST);\r\n\r\n\t // Check for first run or upgrade\r\n\t if (currentVersionCode == savedVersionCode) {\r\n\t \t// This is just a normal run\r\n\t return;\r\n\t } else {\r\n\t \tstartActivity(new Intent(DisplayBin.this, DisplayBinHelp.class));\r\n\t }\r\n\t // Update the shared preferences with the current version code\r\n\t prefs.edit().putInt(PREF_VERSION_CODE_KEY, currentVersionCode).commit();\r\n\t}",
"void check(List<Engine.ISubscriptionEventNotifier> notifiers, Engine.Settings settings) {\n for ( var mem : members_.entrySet() ) {\n mem.getValue().check(notifiers, settings);\n }\n }",
"private void checkUpdateCheckSuccessful(PackageVersions packageVersions) {\n mFakeIntentHelper.assertReliabilityTriggerNotScheduled();\n\n // Assert the storage was updated.\n checkPackageStorageStatus(PackageStatus.CHECK_COMPLETED_SUCCESS, packageVersions);\n\n // Peek inside the package tracker to make sure it is tracking failure counts properly.\n assertEquals(0, mPackageTracker.getCheckFailureCountForTests());\n }",
"public boolean validateMenuItems(CwSession cwSession){\n idAnyNonExistingCpMenuItem(cwSession)\n .ifPresent(id -> {throw new RecordNotFoundException(String.format(MENU_ITEM_NOT_FOUND_WITH_ID,id));});\n return true;\n }",
"synchronized public static boolean isInstalled() {\n return installed > 0;\n }",
"private void checkItemsAvailability() {\n if (noItemsText != null && itemList != null && itemRecyclerView != null) {\n if (itemList.size() < 1) {\n itemRecyclerView.setVisibility(View.GONE);\n noItemsText.setVisibility(View.VISIBLE);\n } else {\n noItemsText.setVisibility(View.GONE);\n itemRecyclerView.setVisibility(View.VISIBLE);\n }\n }\n }",
"public void validate() {\n transportStats.validate(this);\n\n for (String unitName : produces) {\n Args.validate(!UnitFactory.hasUnitForName(unitName), \"Illegal unit name \" + unitName + \" in build unit stats\");\n }\n\n for (Map.Entry<String, String> entry : buildCities.entrySet()) {\n String terrainName = entry.getKey();\n String cityName = entry.getValue();\n Args.validate(!TerrainFactory.hasTerrainForName(terrainName), \"Illegal terrain \" + terrainName + \" in build cities stats\");\n Args.validate(!CityFactory.hasCityForName(cityName), \"Illegal city \" + cityName + \" in build cities stats\");\n }\n\n for (String unitName : supplyUnits) {\n Args.validate(!UnitFactory.hasUnitForName(unitName), \"Illegal unit \" + unitName + \" in supply units stats\");\n }\n\n for (String unitName : supplyUnitsInTransport) {\n Args.validate(!UnitFactory.hasUnitForName(unitName), \"Illegal unit \" + unitName + \" in supply units in transport stats\");\n }\n\n Args.validate(StringUtil.hasContent(primaryWeaponName) && !WeaponFactory.hasWeapon(primaryWeaponName),\n \"Illegal primary weapon \" + primaryWeaponName + \" for unit \" + name);\n Args.validate(StringUtil.hasContent(secondaryWeaponName) && !WeaponFactory.hasWeapon(secondaryWeaponName),\n \"Illegal secondary weapon \" + secondaryWeaponName + \" for unit \" + name);\n }",
"public final boolean simulationHasProblems() {\n\t\tboolean result = false;\n\t\tfor (String mdl : executors.keySet()) {\n\t\t\tSubstructureExecutorI exe = executors.get(mdl);\n\t\t\tif (exe.iveGotProblems()) {\n\t\t\t\tlog.error(mdl + \" is no longer running\");\n\t\t\t\tresult = true;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"private void checkMandatoryArguments() throws ArgBoxException {\n\t\tfinal List<String> errors = registeredArguments.stream()\n\t\t\t\t.filter(arg -> arg.isMandatory())\n\t\t\t\t.filter(arg -> !parsedArguments.containsKey(arg))\n\t\t\t\t.map(arg -> String.format(\"The argument %1s is required !\", arg.getLongCall()))\n\t\t\t\t.collect(Collectors.toList());\n\t\tthrowException(() -> !errors.isEmpty(), getArgBoxExceptionSupplier(\"Some arguments are missing !\", errors));\n\t}",
"public void VerifyMainMenuItems() {\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Dashboard);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Initiatives);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_LiveMediaPlans);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_MediaPlans);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Audiences);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Offers);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_CreativeAssets);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Reports);\n\t}",
"boolean isSetNumberOfInstallments();",
"@Test\n public void testAccessControlIsOnlyCheckedWhenNoProdDeploymentExists() {\n List<Host> hosts = createHosts(18, \"6.0.0\");\n\n List<ModelFactory> modelFactories = List.of(createHostedModelFactory(Version.fromString(\"6.0.0\")),\n createHostedModelFactory(Version.fromString(\"6.1.0\")),\n createHostedModelFactory(Version.fromString(\"6.2.0\")));\n\n DeployTester tester = createTester(hosts, modelFactories, prodZone, Clock.systemUTC());\n ApplicationId applicationId = tester.applicationId();\n // Deploy with oldest version\n tester.deployApp(\"src/test/apps/hosted/\", \"6.0.0\");\n assertEquals(9, tester.getAllocatedHostsOf(applicationId).getHosts().size());\n\n // Deploy with version that does not exist on hosts and with app package that has no write access control,\n // validation of access control should not be done, since the app is already deployed in prod\n tester.deployApp(\"src/test/apps/hosted-no-write-access-control\", \"6.1.0\");\n assertEquals(9, tester.getAllocatedHostsOf(applicationId).getHosts().size());\n }",
"public static boolean isInstalled()\n\t{\n\t\treturn PackageUtils.exists(General.PKG_MESSENGERAPI);\n\t}",
"public boolean hasInput() {\n return basePackage != DEFAULT_BASE_PACKAGE\n || !basePackages.isEmpty()\n || bannedImport != null\n || !bannedImports.isEmpty()\n || allowedImport != null\n || !allowedImports.isEmpty()\n || exclusion != null\n || !exclusions.isEmpty();\n }",
"private void validateRights() {\n\n aRightsMapperUpdated = new ArrayList<>();\n aRightsMapperUpdated.clear();\n if (processName != null && processName.equalsIgnoreCase(getResources().getString(R.string.tor_creation))) {\n for (int i = 0; i < aRightsMapper.size(); i++) {\n if (aRightsMapper.get(i).getSectionName().contains(GenericConstant.PNC)) {\n\n aRightsMapperUpdated.add(aRightsMapper.get(i));\n\n } else if (aRightsMapper.get(i).getSectionName().contains(GenericConstant.POLE)) {\n\n aRightsMapperUpdated.add(aRightsMapper.get(i));\n }\n }\n } else if ((processName != null && processName.equalsIgnoreCase(getResources().getString(R.string.stop_process)))\n || (processName != null && processName.equalsIgnoreCase(getResources().getString(R.string.crime)))) {\n for (int i = 0; i < aRightsMapper.size(); i++) {\n if (aRightsMapper.get(i).getSectionName().contains(GenericConstant.POLE)) {\n\n aRightsMapperUpdated.add(aRightsMapper.get(i));\n }\n }\n } else {\n for (int i = 0; i < aRightsMapper.size(); i++) {\n if (aRightsMapper.get(i).getSectionName().contains(GenericConstant.PNC)) {\n aRightsMapperUpdated.add(aRightsMapper.get(i));\n } else if (aRightsMapper.get(i).getSectionName().contains(GenericConstant.ATHENA)) {\n aRightsMapperUpdated.add(aRightsMapper.get(i));\n } else if (aRightsMapper.get(i).getSectionName().contains(GenericConstant.STOPS)) {\n aRightsMapperUpdated.add(aRightsMapper.get(i));\n } else if (aRightsMapper.get(i).getSectionName().contains(GenericConstant.POLE)) {\n aRightsMapperUpdated.add(aRightsMapper.get(i));\n }\n }\n }\n }",
"public boolean checkEntryInputs() {\n\t\tboolean isValid = true;\n\t\tif(sampleNumberTF.getText().equals(\"\")) {\n\t\t\tisValid = false;\n\t\t}\n\t\t\n\t\tif(materialDescriptionTF.getText().equals(\"\")) {\n\t\t\tisValid = false;\n\t\t}\n\t\t\n\t\tif(Double.valueOf(bacteroidesConcentrationTF.getText())==null) {\n\t\t\tisValid = false;\n\t\t}\n\t\treturn isValid;\n\t}",
"private boolean isHorseBetsValidForTable(Game game) throws ServiceException {\r\n\r\n Map<Horse, List<BetType>> horsesBets = game.getHorseBetTypes();\r\n for (Map.Entry<Horse, List<BetType>> horseBets : horsesBets.entrySet()){\r\n\r\n if (horseBets.getValue() == null || horseBets.getValue().isEmpty()){\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"static public boolean isLaunched()\n\t{\n\t\tif (g_currentLaunch == null)\n\t\t return false;\n\t\telse\n\t\t return true;\n\t}",
"private boolean isAllInputValid() {\n for (Map.Entry<EditText, Validator> e : mValidators.entrySet()) {\n if (e.getKey().isEnabled()) {\n if (!e.getValue().test(e.getKey().getText().toString()))\n return false;\n }\n }\n return true;\n }",
"private boolean deleteLauncher(String deploymentName) {\n unregisterLauncherIfExistsByObjectName(deploymentName);\n\n boolean svcDeleted = runtimeClient.deleteService(deploymentName);\n boolean depDeleted = runtimeClient.deleteDeployment(deploymentName);\n\n return svcDeleted && depDeleted;\n }",
"public boolean checkIfElementsArePresentAndDisplayed(By locator) {\n boolean isDisplayed = true;\n List<WebElement> listOfElements = findListOfElements(locator);\n if (listOfElements != null && !listOfElements.isEmpty()) {\n for (WebElement element : listOfElements) {\n if (element.getSize() == null && !element.isDisplayed()) {\n isDisplayed = false;\n }\n }\n }\n return isDisplayed;\n }",
"public Boolean isValid() {\n if (modApptTitle.getText().isEmpty() || modApptTitle.getText() == null) {\n return false;\n } else if (modApptDescript.getText().isEmpty() || modApptDescript.getText() == null) {\n return false;\n } else if (modApptLocale.getText().isEmpty() || modApptLocale.getText() == null) {\n return false;\n }\n return true;\n }",
"public boolean validateImages()\n {\n initializeImageCheckList();\n checkImagesForDuplicates();\n if (extractionResult.getInvalidFiles().size() > 0)\n {\n throw UserFailureException.fromTemplate(\"Following invalid files %s have been found.\",\n CollectionUtils.abbreviate(extractionResult.getInvalidFiles(), 10));\n }\n if (extractionResult.getImages().size() == 0)\n {\n throw UserFailureException.fromTemplate(\n \"No extractable files were found inside a dataset '%s'.\"\n + \" Have you changed your naming convention?\",\n incomingDataSetDirectory.getAbsolutePath());\n }\n return checkCompleteness();\n }",
"private boolean checkBrokers ()\n {\n if (game.getAgentMap().size() < 1) {\n log.info(String.format(\"Game: %s (round %s) reports no brokers \"\n + \"registered\",\n game.getGameId(), game.getRound().getRoundId()));\n return false;\n }\n\n for (Agent agent: game.getAgentMap().values()) {\n Broker broker = agent.getBroker();\n // Check if any broker is disabled in the interface\n if (!MemStore.getBrokerState(broker.getBrokerId())) {\n log.info(String.format(\"Not starting game %s : broker %s is disabled\",\n game.getGameId(), broker.getBrokerId()));\n return false;\n }\n\n // Check if any broker is already running the maxAgent nof agents\n if (!broker.hasAgentsAvailable(game.getRound())) {\n log.info(String.format(\"Not starting game %s : broker %s doesn't have \"\n + \"enough available agents\",\n game.getGameId(), broker.getBrokerId()));\n return false;\n }\n\n brokers += broker.getBrokerName() + \"/\" + agent.getBrokerQueue() + \",\";\n }\n brokers = brokers.substring(0, brokers.length() - 1);\n return true;\n }",
"public void checkCompatibility() {\n Utils.LOGGER.info(\"Checking compatibility...\");\n\n checkServerVersion();\n checkServerSoftware();\n\n if (incompatibilities.size() == 0) {\n Utils.LOGGER.info(\"Compatibility checks completed, no possible incompatibilities found.\");\n } else {\n Utils.LOGGER.warning(\"Compatibility checks completed, &b\" + incompatibilities.size() + \"&7 possible incompatibilities were found:\");\n incompatibilities.forEach(incompatibility -> Utils.LOGGER.warning(\"&8 - &b\" + incompatibility.getType().toString() + \"&7 check flagged: \" + incompatibility.getReason()));\n }\n }",
"private void checkAvailability() {\n if (productList != null) {\n if (productList.size() == 0) {\n noProductText.setVisibility(View.VISIBLE);\n } else {\n noProductText.setVisibility(View.GONE);\n }\n }\n }",
"public boolean checkSetup(){\n return checkSetup(folderName);\n }",
"protected void checkComponents() throws Exception {\r\n if (InitialData == null) {\r\n throw new Exception(\"Initial data not set.\");\r\n }\r\n if (Oracle == null) {\r\n throw new Exception(\"Oracle not set.\");\r\n }\r\n if (SearchSpace == null) {\r\n throw new Exception(\"Search space not set.\");\r\n }\r\n if (ObjectiveFunction == null) {\r\n throw new Exception(\"Ranker not set.\");\r\n }\r\n }",
"private boolean hasWaiters()\r\n/* 438: */ {\r\n/* 439:526 */ return this.waiters > 0;\r\n/* 440: */ }",
"protected void validateMcaDeployedToWorkingDir() {\n\t\tassertTrue(unitTestDir.exists());\n\t\tassertTrue(new File(unitTestDir, \"composition.groovy\").exists());\n\t\tassertTrue(new File(unitTestDir, \"MCA-INF/components/components.jar\").exists());\n\t\tassertTrue(new File(unitTestDir, \"MCA-INF/promoted/promoted.jar\").exists());\n\t\tassertTrue(new File(unitTestDir, \"MCA-INF/hidden/hidden.jar\").exists());\n\t}",
"public boolean needsRepairing() {\n boolean returner = false;\n for (Pouch pouch : pouchesUsed) {\n returner = returner || pouch.needsRepair();\n }\n return returner;\n }"
] | [
"0.67941254",
"0.5862826",
"0.5831899",
"0.5740772",
"0.55521065",
"0.548605",
"0.53746414",
"0.5370675",
"0.532084",
"0.52666074",
"0.5241263",
"0.5232683",
"0.5228507",
"0.52228653",
"0.51917464",
"0.5176422",
"0.516702",
"0.51075166",
"0.509582",
"0.5094253",
"0.5072353",
"0.5071013",
"0.5064651",
"0.5049627",
"0.5041971",
"0.503794",
"0.501967",
"0.5018394",
"0.50183356",
"0.50001025",
"0.4978464",
"0.49777856",
"0.4971458",
"0.49648646",
"0.49601802",
"0.49546617",
"0.4949157",
"0.49392378",
"0.492471",
"0.49107093",
"0.49045005",
"0.49003065",
"0.48963273",
"0.48961407",
"0.48925903",
"0.48913288",
"0.48898137",
"0.4869514",
"0.48491272",
"0.48423713",
"0.48356062",
"0.48353988",
"0.48216775",
"0.48165864",
"0.48157132",
"0.48078096",
"0.48048323",
"0.48020664",
"0.47967258",
"0.47956395",
"0.47908926",
"0.47907344",
"0.47888806",
"0.47857773",
"0.4774099",
"0.47694844",
"0.47651348",
"0.47618806",
"0.4747882",
"0.4746488",
"0.47419068",
"0.47417927",
"0.47372591",
"0.47365308",
"0.47363424",
"0.47353798",
"0.4733432",
"0.4729628",
"0.472084",
"0.47197127",
"0.47134206",
"0.470593",
"0.47052023",
"0.47041893",
"0.47036108",
"0.46975932",
"0.46879363",
"0.4687767",
"0.4687156",
"0.46858102",
"0.4684436",
"0.46836573",
"0.4679047",
"0.4675556",
"0.46713987",
"0.46707192",
"0.46688148",
"0.4667093",
"0.46665362",
"0.4660336"
] | 0.77410054 | 0 |
Get the list of Services on the K8S Cluster. | public List<String> getServices() {
return runtimeClient.getServices();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.util.List<go.micro.runtime.RuntimeOuterClass.Service> getServicesList() {\n return services_;\n }",
"public java.util.List<go.micro.runtime.RuntimeOuterClass.Service> getServicesList() {\n return services_;\n }",
"public List<String> getAllServices() {\n List<String> allServices = new ArrayList<>();\n for (ServiceDescription service : serviceList.values()) {\n allServices.add(service.getServiceName());\n }\n return allServices;\n }",
"java.util.List<go.micro.runtime.RuntimeOuterClass.Service> \n getServicesList();",
"java.util.List<go.micro.runtime.RuntimeOuterClass.Service> \n getServicesList();",
"public List<String> getServices() throws IOException;",
"public java.util.List<go.micro.runtime.RuntimeOuterClass.Service> getServicesList() {\n if (servicesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(services_);\n } else {\n return servicesBuilder_.getMessageList();\n }\n }",
"public java.util.List<go.micro.runtime.RuntimeOuterClass.Service> getServicesList() {\n if (servicesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(services_);\n } else {\n return servicesBuilder_.getMessageList();\n }\n }",
"go.micro.runtime.RuntimeOuterClass.Service getServices(int index);",
"go.micro.runtime.RuntimeOuterClass.Service getServices(int index);",
"List<Service> services();",
"public List<ServiceProvider> services() throws ConsulException {\n try {\n final Self self = self();\n final List<ServiceProvider> providers = new ArrayList<>();\n final HttpResp resp = Http.get(consul().getUrl() + EndpointCategory.Agent.getUri() + \"services\");\n final JsonNode obj = checkResponse(resp);\n for (final Iterator<String> itr = obj.fieldNames(); itr.hasNext(); ) {\n final JsonNode service = obj.get(itr.next());\n final ServiceProvider provider = new ServiceProvider();\n provider.setId(service.get(\"ID\").asText());\n provider.setName(service.get(\"Service\").asText());\n provider.setPort(service.get(\"Port\").asInt());\n // Map tags\n String[] tags = null;\n if (service.has(\"Tags\") && service.get(\"Tags\").isArray()) {\n final ArrayNode arr = (ArrayNode)service.get(\"Tags\");\n tags = new String[arr.size()];\n for (int i = 0; i < arr.size(); i++) {\n tags[i] = arr.get(i).asText();\n }\n }\n provider.setTags(tags);\n provider.setAddress(self.getAddress());\n provider.setNode(self.getNode());\n providers.add(provider);\n }\n return providers;\n } catch (IOException e) {\n throw new ConsulException(e);\n }\n }",
"public List<ServerServices> listServerServices();",
"public Map listServices() throws IOException\n\t{\n\t\treturn request(GET, address(null, null));\n\t}",
"public Map<String, ServiceNode> getServices() {\n\t\treturn serviceMap;\n\t}",
"public go.micro.runtime.RuntimeOuterClass.Service getServices(int index) {\n return services_.get(index);\n }",
"public go.micro.runtime.RuntimeOuterClass.Service getServices(int index) {\n return services_.get(index);\n }",
"public List<Service> getService() {\n\t\treturn ServiceInfo.listService;\n\t}",
"io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceList getServiceList();",
"public Map<String, List<String>> getServices();",
"public List<ServiceInstance> getAllInstances();",
"public List<ServiceInstance> getAllInstances(String serviceName);",
"public List<Service> list(){\r\n \tCriteria criteria = session.createCriteria(Service.class);\r\n \treturn criteria.list();\r\n }",
"@Nullable\n public List<BluetoothGattService> getServices() {\n BleMultiConnector bleMultiConnector = this.bleMultiConnector;\n if (bleMultiConnector == null) {\n return null;\n }\n if (address == null) {\n return null;\n }\n return bleMultiConnector.getServices(address);\n }",
"public Iterator getServices() {\r\n\t\treturn services == null ? EmptyStructures.EMPTY_ITERATOR : new ReadOnlyIterator(services.values());\r\n\t}",
"public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.servicedirectory.v1beta1.ListServicesResponse>\n listServices(com.google.cloud.servicedirectory.v1beta1.ListServicesRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getListServicesMethod(), getCallOptions()), request);\n }",
"public List<CatalogService> getService(String service);",
"ImmutableList<T> getServices();",
"public List/*WsCompileEditorSupport.ServiceSettings*/ getServices();",
"public Map<String,Cab2bService> getServices() throws Exception {\n \t\n Map<String,Cab2bService> services = new HashMap<String,Cab2bService>();\n \tDefaultHttpClient httpclient = new DefaultHttpClient();\n \n try {\n String queryURL = GSSProperties.getCab2b2QueryURL()+\"/services\";\n HttpGet httpget = new HttpGet(queryURL);\n ResponseHandler<String> responseHandler = new BasicResponseHandler();\n String result = httpclient.execute(httpget, responseHandler);\n JSONObject json = new JSONObject(result);\n \n \tfor(Iterator i = json.keys(); i.hasNext(); ) {\n \t\tString modelGroupName = (String)i.next();\n \t\tJSONArray urls = json.getJSONArray(modelGroupName);\n \t\tfor(int k=0; k<urls.length(); k++) {\n \t\t JSONObject jsonService = urls.getJSONObject(k);\n \t\t \n \t\t String serviceURL = jsonService.getString(\"url\");\n \t\t \n \t\t boolean searchDefault = false;\n \t\t if (jsonService.has(\"searchDefault\")) {\n \t\t searchDefault = \"true\".equals(jsonService.getString(\"searchDefault\"));\n \t\t }\n \t\t \n \t\t Cab2bService service = new Cab2bService(\n \t\t serviceURL, modelGroupName, searchDefault);\n \t\t \n \t\t services.put(serviceURL, service);\n \t\t}\n \t}\n }\n finally {\n \thttpclient.getConnectionManager().shutdown();\n }\n \n\t\tlog.info(\"Retrieved \" + services.size() + \" services from caB2B\");\n return services;\n }",
"public go.micro.runtime.RuntimeOuterClass.Service getServices(int index) {\n if (servicesBuilder_ == null) {\n return services_.get(index);\n } else {\n return servicesBuilder_.getMessage(index);\n }\n }",
"public go.micro.runtime.RuntimeOuterClass.Service getServices(int index) {\n if (servicesBuilder_ == null) {\n return services_.get(index);\n } else {\n return servicesBuilder_.getMessage(index);\n }\n }",
"public List<ServiceInstance> lookupInstances(String serviceName);",
"public ServiceType[] getAllServices() throws LoadSupportedServicesException{\r\n\t\tthis.loadServices();\r\n\t\treturn this.services;\r\n\t}",
"@Override\r\n\tpublic List<sn.ucad.master.assurance.bo.Service> findAllService() {\n\t\treturn serviceRepository.findAll();\r\n\t}",
"public java.util.List<? extends go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder> \n getServicesOrBuilderList() {\n return services_;\n }",
"public java.util.List<? extends go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder> \n getServicesOrBuilderList() {\n return services_;\n }",
"public List<ServiceNode> getRelevantServices() {\n\t\treturn relevantServices;\n\t}",
"String getKubernetesServiceType();",
"public List<Class<?>> getAllModelServices() {\n\t\treturn ModelClasses.findModelClassesWithInterface(IServiceType.class);\n\t}",
"public com.google.cloud.servicedirectory.v1beta1.ListServicesResponse listServices(\n com.google.cloud.servicedirectory.v1beta1.ListServicesRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getListServicesMethod(), getCallOptions(), request);\n }",
"go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder getServicesOrBuilder(\n int index);",
"go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder getServicesOrBuilder(\n int index);",
"AGServiceDescription[] getServices()\n throws IOException, SoapException;",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<ServiceCat> listServiceCat() {\r\n\t\tList<ServiceCat> courses = null;\r\n\t\ttry {\r\n\t\t\tcourses = session.createQuery(\"from ServiceCat\").list();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn courses;\r\n\t}",
"net.zyuiop.ovhapi.api.objects.services.Service getServiceNameServiceInfos(java.lang.String serviceName) throws java.io.IOException;",
"public Object _getLSservices(CommandInterpreter ci) {\n\t\tSet<Registration> regs = identityManager.getLocalServices();\n\t\tci.print(\"Local Services:\\n------------------\\n\");\n\t\tfor (Registration r : regs) {\n\t\t\tci.print(\"> Service with VA \" + r.getVirtualAddress().toString() + \" \\n\");\n\t\t\tfor (Part p : r.getAttributes()) {\n\t\t\t\tci.println(\"\\t\" + p.getKey() + \": \" + p.getValue());\n\t\t\t}\n\t\t}\n\n\t\tregs = identityManager.getRemoteServices();\n\t\tci.print(\"Remote Services:\\n------------------\\n\");\n\t\tfor (Registration r : regs) {\n\t\t\tci.print(\"> Service with VA \" + r.getVirtualAddress().toString() + \" \\n\");\n\t\t\tfor (Part p : r.getAttributes()) {\n\t\t\t\tci.println(\"\\t\" + p.getKey() + \": \" + p.getValue());\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public java.util.List<de.i3mainz.flexgeo.portal.liferay.services.model.OGCServiceLayer> findAll()\n throws com.liferay.portal.kernel.exception.SystemException;",
"public SME_Cluster[] getClusters();",
"protected ServiceBundler getServices() {\n return services;\n }",
"@java.lang.Override\n public io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceList getServiceList() {\n if (endpointConfigCase_ == 3) {\n return (io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceList) endpointConfig_;\n }\n return io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceList.getDefaultInstance();\n }",
"@GetMapping(\"/costo-servicios\")\n @Timed\n public List<CostoServicioDTO> getAllCostoServicios() {\n log.debug(\"REST request to get all CostoServicios\");\n return costoServicioService.findAll();\n }",
"public List<Service> getServicesByCategory(Category cat) {\n ServiceRecords sr = company.getServiceRecords();\n List<Service> serviceList = sr.getServiceByCat(cat);\n return serviceList;\n }",
"@Override\n public List<ProducerMember> listCentralServices() {\n return this.soapClient.listCentralServices(this.getTargetUrl());\n }",
"public java.util.List<? extends go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder> \n getServicesOrBuilderList() {\n if (servicesBuilder_ != null) {\n return servicesBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(services_);\n }\n }",
"public java.util.List<? extends go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder> \n getServicesOrBuilderList() {\n if (servicesBuilder_ != null) {\n return servicesBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(services_);\n }\n }",
"public go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder getServicesOrBuilder(\n int index) {\n return services_.get(index);\n }",
"public go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder getServicesOrBuilder(\n int index) {\n return services_.get(index);\n }",
"java.util.List<? extends go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder> \n getServicesOrBuilderList();",
"java.util.List<? extends go.micro.runtime.RuntimeOuterClass.ServiceOrBuilder> \n getServicesOrBuilderList();",
"public String getAllRunningServices() {\n return \"\";\n }",
"java.util.List<com.google.cloud.compute.v1.ServiceAccount> getServiceAccountsList();",
"@Override\n public List<ServiceEndpoint> listServiceEndpoints() {\n return new ArrayList<>(serviceEndpoints.values());\n }",
"public static List<String> getServiceNames(Definition definition) {\n Map map = definition.getAllServices();\n List<QName> serviceQnames = new ArrayList<QName>(map.keySet());\n List<String> serviceNames = new ArrayList<String>();\n for (QName qName : serviceQnames) {\n serviceNames.add(qName.getLocalPart());\n }\n return serviceNames;\n }",
"public List<ServiceHealth> getServiceInstances(String service);",
"@Programmatic\n public List<Class<?>> allServiceClasses() {\n List<Class<?>> serviceClasses = Lists\n .transform(this.servicesInjector.getRegisteredServices(), new Function<Object, Class<?>>(){\n public Class<?> apply(Object o) {\n return o.getClass();\n }\n });\n // take a copy, to allow eg I18nFacetFactory to add in default implementations of missing services.\n return Collections.unmodifiableList(Lists.newArrayList(serviceClasses));\n }",
"public ServiceCombo getServices()\n {\n return services;\n }",
"public List<ServiceInstance<InstanceDetails>> listInstances() throws Exception {\n\t\tCollection<String> serviceNames = serviceDiscovery.queryForNames();\n\t\tSystem.out.println(serviceNames.size() + \" type(s)\");\n\t\tList<ServiceInstance<InstanceDetails>> list = new ArrayList<>();\n\t\tfor (String serviceName : serviceNames) {\n\t\t\tCollection<ServiceInstance<InstanceDetails>> instances = serviceDiscovery.queryForInstances(serviceName);\n\t\t\tSystem.out.println(serviceName);\n\t\t\tfor (ServiceInstance<InstanceDetails> instance : instances) {\n\t\t\t\toutputInstance(instance);\n\t\t\t\tlist.add(instance);\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}",
"public List<ServicioEntity> getServicios() {\r\n return servicios;\r\n }",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<ServiceBean> getService_Requests() \r\n {\r\n \tlogger.info(\"========================== Getting ALL service requests for the admin home page... =================================\");\r\n\t\t\r\n \tList<ServiceBean> beanList = null;\r\n \t\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = null;\r\n\t\tList<String> scalarPropsList = null;\r\n\t\t\r\n\t\tscalarPropsList = SQLUtil.parseSQLScalarProperties(GET_ALL_SERVICE_REQUESTS_ADMIN_SQL_SCALAR);\r\n\t\t\t\r\n\t\t\tif (scalarPropsList != null)\r\n\t\t\t{\r\n\t\t\t\tquery = SQLUtil.buildSQLQuery(session, scalarPropsList, GET_ALL_SERVICE_REQUESTS_ADMIN_SQL);\r\n\t\t\t\tquery.setResultTransformer(Transformers.aliasToBean(ServiceBean.class));\r\n\t\t\t\t\r\n\t\t\t\tbeanList = (List<ServiceBean>) query.list();\r\n\t\t\t}\r\n\t\t\t\r\n\t\treturn beanList;\r\n }",
"public com.google.common.util.concurrent.ListenableFuture<yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.ListClustersResponse> list(\n yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.ListClustersRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getListMethod(), getCallOptions()), request);\n }",
"public List<InfoServicio> getInfoServicios(){\n\t\treturn infoServicios;\n\t}",
"private Iterable<Service> loadServiceData() {\n return services;\n }",
"public Services() {\n this.indexes = new ArrayList<Integer>();\n// this.indexes.add(ServiceTypes.NOSERVICES.getValue());\n this.services = new ArrayList<String>();\n// this.services.add(ServiceTypes.NOSERVICES.getKey());\n }",
"public void listServices(\n com.google.cloud.servicedirectory.v1beta1.ListServicesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.ListServicesResponse>\n responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getListServicesMethod(), getCallOptions()),\n request,\n responseObserver);\n }",
"public Collection<Service> createServices();",
"public List<NetServices> listServices(int zid) {\n List<NetServices> listLCServices = new ArrayList<>();\n\n String sql = \"SELECT a.* FROM net_services a\";\n sql += \" WHERE a.centerid<=0 and a.catid=\" + CatID;\n if (zid > 0) {\n sql += \" AND a.zoneid=\" + zid;\n }\n\n Query query = em.createNativeQuery(sql, NetServices.class);\n try {\n listLCServices = query.getResultList();\n if (listLCServices != null && !listLCServices.isEmpty()) {\n for (NetServices netServices : listLCServices) {\n //TODO do some checks... verify SEHRAuthKey, GUID of service etc...\n if (StringUtils.isBlank(netServices.getSehrauthkey())) {\n Log.warning(netServices.getTitle() + \": Invalid SEHRAuthKey!\");\n }\n }\n }\n } catch (PersistenceException pe) {\n Log.warning(LifeCARDAdmin.class.getName() + \":listServices():\" + pe.getMessage());\n }\n return listLCServices;\n }",
"public Set<String> getServiceNames() {\n return this.serviceNameSet;\n }",
"public Set<ServiceName> getSet() {\n return new HashSet<ServiceName>(set);\n }",
"public com.google.common.util.concurrent.ListenableFuture<yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.ListClusterOperationsResponse> listOperations(\n yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.ListClusterOperationsRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getListOperationsMethod(), getCallOptions()), request);\n }",
"Collection<Service> getAllSubscribeService();",
"public List<Servicio> findAll();",
"@java.lang.Override\n public io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceList getServiceList() {\n if (serviceListBuilder_ == null) {\n if (endpointConfigCase_ == 3) {\n return (io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceList) endpointConfig_;\n }\n return io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceList.getDefaultInstance();\n } else {\n if (endpointConfigCase_ == 3) {\n return serviceListBuilder_.getMessage();\n }\n return io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceList.getDefaultInstance();\n }\n }",
"io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsServiceListOrBuilder getServiceListOrBuilder();",
"public List<ServiceInstance> getAllInstances(String serviceName, ServiceInstanceQuery query);",
"public int getServicesCount() {\n return services_.size();\n }",
"public int getServicesCount() {\n return services_.size();\n }",
"@ApiModelProperty(value = \"The services to which the deployment version has been activated. Any of \\\"interview\\\", \\\"webservice\\\", \\\"javaScriptSessions\\\", and \\\"mobile\\\".\")\n public List<String> getServices() {\n return services;\n }",
"public String[] getSupportedServiceNames()\n {\n return getServiceNames();\n }",
"@ManagedAttribute(description = \"Retrieves the list of Registered Services in a slightly friendlier output.\")\n public final List<String> getRegisteredServicesAsStrings() {\n final List<String> services = new ArrayList<>();\n\n for (final RegisteredService r : this.servicesManager.getAllServices()) {\n services.add(new StringBuilder().append(\"id: \").append(r.getId())\n .append(\" name: \").append(r.getName())\n .append(\" serviceId: \").append(r.getServiceId())\n .toString());\n }\n\n return services;\n }",
"public com.hps.july.persistence.Service getServices() throws Exception {\n\tServiceAccessBean bean = constructServices();\n\tif (bean != null)\n\t return (Service)bean.getEJBRef();\n\telse\n\t return null;\n\n}",
"public List<ServiceData> getServiceData(ServiceRequest sreq) throws ServiceException {\n return namingService.getServiceData(sreq);\n }",
"public yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.ListClusterOperationsResponse listOperations(yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.ListClusterOperationsRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getListOperationsMethod(), getCallOptions(), request);\n }",
"public List<ServerServices> searchExternalService(int servId, String dataPort, String servicePort);",
"public ArrayList<String> DFGetServiceList() {\n return DFGetAllServicesProvidedBy(\"\");\n }",
"public List<Service> findAll();",
"org.apache.geronimo.corba.xbeans.csiv2.tss.TSSSasMechType.ServiceConfigurationList getServiceConfigurationList();",
"@Override\n public List<ConsumerMember> listClients() {\n return this.soapClient.listClients(this.getTargetUrl());\n }",
"public static String[] getServiceNames()\n {\n String[] sSupportedServiceNames = { __serviceName };\n return sSupportedServiceNames;\n }",
"public java.util.List<ServiceRegistry> getServiceRegistries() {\n if (serviceRegistries == null) {\n serviceRegistries = new com.amazonaws.internal.SdkInternalList<ServiceRegistry>();\n }\n return serviceRegistries;\n }"
] | [
"0.7022183",
"0.7022183",
"0.6986541",
"0.69198626",
"0.69198626",
"0.6890106",
"0.68251",
"0.68251",
"0.67757267",
"0.67757267",
"0.6773767",
"0.67287886",
"0.66906524",
"0.6658522",
"0.6630368",
"0.662623",
"0.662623",
"0.65809566",
"0.6543174",
"0.6432612",
"0.6428288",
"0.6414293",
"0.6357936",
"0.62309784",
"0.6217059",
"0.61929",
"0.6178946",
"0.6160331",
"0.6152821",
"0.6140121",
"0.6125202",
"0.6125202",
"0.6114521",
"0.60679257",
"0.60606843",
"0.6060594",
"0.6060594",
"0.6050136",
"0.6049157",
"0.60095125",
"0.5996762",
"0.59765434",
"0.59765434",
"0.59575737",
"0.5954066",
"0.5943314",
"0.5924302",
"0.59046733",
"0.5876344",
"0.58750397",
"0.5874777",
"0.5851368",
"0.5849159",
"0.5841587",
"0.5837363",
"0.5837363",
"0.57999516",
"0.57999516",
"0.5797996",
"0.5797996",
"0.57967335",
"0.5784965",
"0.5776978",
"0.57697845",
"0.5767902",
"0.57251",
"0.57162184",
"0.5686395",
"0.5686062",
"0.56701326",
"0.5668421",
"0.5662013",
"0.56538707",
"0.56406987",
"0.5620645",
"0.558076",
"0.5572469",
"0.55576086",
"0.55344903",
"0.553357",
"0.5528665",
"0.5522915",
"0.5522402",
"0.5508258",
"0.55077493",
"0.55052483",
"0.55052483",
"0.5498492",
"0.5496232",
"0.54951334",
"0.54812396",
"0.54710454",
"0.5458945",
"0.54477566",
"0.5434251",
"0.5425448",
"0.5423748",
"0.540238",
"0.53926516",
"0.53925794"
] | 0.74691963 | 0 |
Get the list of Deployments on the K8S Cluster. | public List<String> getDeployments() {
return runtimeClient.getDeployments();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@XmlTransient\n public List<ProfileDeploymentMetaData> getDeployments()\n {\n return Collections.emptyList();\n }",
"@GetMapping(\"deployList\")\n\tpublic JsonResult<List<org.flowable.engine.repository.Model>> deploy(){\n\t\tList<org.flowable.engine.repository.Model> models = repositoryService.createModelQuery().listPage(1, 10);\n\t\treturn new JsonResult<>(models);\n\t}",
"@RequestMapping(method = RequestMethod.GET)\n @ResponseBody\n @Deprecated\n public Deployments listDeployments() throws Exception {\n \tlog.warn(\"Deprecated method called: listDeployments\");\n Deployments deployments = new Deployments();\n deployments.getDeployments().addAll(processService.findAllDeployments());\n return deployments;\n }",
"public abstract List<AbstractDeploymentArtifact> getDeploymentArtifacts();",
"public List<ClusterVersionDetails> availableClusterVersions() {\n return this.availableClusterVersions;\n }",
"public List<HostingEnvironmentDeploymentInfo> hostingEnvironmentDeploymentInfos() {\n return this.hostingEnvironmentDeploymentInfos;\n }",
"@RequestMapping(value = \"/deploy/bladelogic/collect\", method = GET, produces = APPLICATION_JSON_VALUE)\n\tpublic List<Deployment> BladeLogicData() {\n\t\tList<Deployment> deploys = null;\n\t\tObjectMapper objectMapper = null;\n\t\tobjectMapper = new ObjectMapper();\n\t\tobjectMapper.configure(Feature.AUTO_CLOSE_SOURCE, true);\n\t\ttry {\n\t\t\tURL url = new URL(\"http://localhost:8083/collect\");\n\t\t\tDeployment[] temp = objectMapper.readValue(url, Deployment[].class);\n\t\t\tdeploys = Arrays.asList(temp);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getClass().getSimpleName());\n\t\t}\n\t\treturn deploys;\n\t}",
"@Override\n\tpublic List<NetBarDeployEntity> getUnDeployInfos() {\n\t\tList<NetBarDeployEntity> data = new ArrayList<NetBarDeployEntity>();\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\n\t\tStringBuffer sql = new StringBuffer();\n\t\tsql.append(\"select \"+getQueryColumns())\n\t\t.append(\" FROM \"+TableConstants.NETBAR_DEPLOY_TABLE+\" d WHERE d.is_deploy= :isDeploy \");\n\t\tparameters.put(\"isDeploy\", \"1\");\n\t\t\n\t\tList<Object> list = findNativeQuery(sql.toString(), parameters);\n\t\tfor (Object object : list) {\n\t\t\tif(object instanceof Object[]){\n\t\t\t\tObject[] obj = (Object[]) object;\n\t\t\t\tNetBarDeployEntity entity=this.obj2Entity(obj);\n\t\t\t\tdata.add(entity);\n\t\t\t}\n\t\t}\n\t\tif(data == null || data.size() <= 0){\n\t\t\treturn null;\n\t\t}\n\t\treturn data;\n\t}",
"@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/clusterversions\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ClusterVersionList, ClusterVersion> listClusterVersion();",
"public List<Resource> deployResources() throws Exception {\n List<Resource> developmentResources = findResources(m_developmentRepo, \"*\", \"*\");\n List<Resource> deployedResources = new ArrayList<>();\n for (Resource developmentResource : developmentResources) {\n deployedResources.add(deployResource(developmentResource));\n }\n return deployedResources;\n }",
"@Override\n\tpublic List<NetBarDeployEntity> getDeploysByBarId(String barId,String isDeploy) {\n\t\tList<NetBarDeployEntity> data = new ArrayList<NetBarDeployEntity>();\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\n\t\tStringBuffer sql = new StringBuffer();\n\t\tsql.append(\"select \"+getQueryColumns())\n\t\t.append(\" FROM \"+TableConstants.NETBAR_DEPLOY_TABLE+\" d WHERE d.netbarCode= :netbarCode \");\n\t\tparameters.put(\"netbarCode\", barId);\n\t\tif(CommonUtil.isNotEmpty(isDeploy)){\n\t\t\tsql.append(\" and d.is_deploy= :isDeploy\");\n\t\t\tparameters.put(\"isDeploy\", isDeploy);\n\t\t}\n\t\tList<Object> list = findNativeQuery(sql.toString(), parameters);\n\t\tfor (Object object : list) {\n\t\t\tif(object instanceof Object[]){\n\t\t\t\tObject[] obj = (Object[]) object;\n\t\t\t\tNetBarDeployEntity entity=this.obj2Entity(obj);\n\t\t\t\tdata.add(entity);\n\t\t\t}\n\t\t}\n\t\tif(data == null || data.size() <= 0){\n\t\t\treturn null;\n\t\t}\n\t\treturn data;\n\t}",
"java.util.List<com.clarifai.grpc.api.InstalledModuleVersion> \n getInstalledModuleVersionsList();",
"com.google.cloud.gkehub.configmanagement.v1alpha.DeploymentState getDeploymentState();",
"public DeploymentStatus getDeploymentStatus();",
"@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/clusteroperators\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ClusterOperatorList, ClusterOperator> listClusterOperator();",
"java.util.List<com.google.cloud.compute.v1.ServiceAccount> getServiceAccountsList();",
"public List<ServiceInstance> getAllInstances();",
"public CompletableFuture<List<String>> versions() {\n return factory().get(VersionApi.class, \"versions\", defaults(), VersionsResponse.class).thenApply(VersionsResponse::getVersions);\n }",
"@GET\n @Path(\"/deployments\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response getDeployments(@Context HttpServletRequest request, @HeaderParam(\"authorization\") String authString,\n @HeaderParam(\"userid\") String userid) {\n\n String url = \"\";\n if (request.getQueryString() == null) {\n logger.info(\"Received request for all deployments\");\n url = \"/deployments\";\n } else {\n logger.info(\"Received request for deployment with query = \" + request.getQueryString());\n url = \"/deployments?\" + request.getQueryString();\n }\n\n if (!APIHConfig.getInstance().validateUser(authString, userid, \"GET\")) {\n return Response.status(401).entity(UNAUTHORIZED).build();\n }\n\n JSONObject result = CloudifyClient.getInstance().doGET(url);\n logger.info(\"Handled get deployment API Request\");\n return handleResponse(result);\n }",
"List<String> apiVersions();",
"@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/clusterversions\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ClusterVersionList, ClusterVersion> listClusterVersion(\n @QueryMap ListClusterVersion queryParameters);",
"public List<AppServiceEnvironmentInner> hostingEnvironments() {\n return this.hostingEnvironments;\n }",
"java.util.List<com.google.cloud.functions.v2.SecretVolume.SecretVersion> getVersionsList();",
"public List<Park> getAllAvailableParks();",
"Collection<String> getVersions();",
"@Override\n public GetDeploymentResponse executeRequest() throws MorpheusApiRequestException {\n return (GetDeploymentResponse) RequestHelper.executeRequest(GetDeploymentResponse.class, this, \"/api/deployments/\" + deploymentId, HttpPut.METHOD_NAME);\n }",
"@Nullable\n public static Collection<EnvoyContainer> getAllEnvoys(){\n return envoys.values();\n }",
"List<String> getHosts();",
"@JsonProperty(\"clusters\")\n@ApiModelProperty(example = \"\\\"[{ ... }]\\\"\", value = \"List of clusters associated with this org.\")\n public List<Cluster> getClusters() {\n return clusters;\n }",
"java.util.List<com.google.container.v1beta1.OperationProgress> getStagesList();",
"public Collection<String> list() {\n return jobs.keySet();\n }",
"java.util.List<com.google.cloud.talent.v4.Job> \n getJobsList();",
"@Override\n @GET\n @Path(\"/vms\")\n @Produces(\"application/json\")\n public Response getVMs() throws Exception {\n log.trace(\"getVMs() started.\");\n JSONArray json = new JSONArray();\n for (Vm vm : cluster.getVmList()) {\n JSONObject o = new JSONObject();\n String uri = String.format(\"%s/vms/%d\", rootUri, vm.getVmId());\n String vmUri = String.format(\"/providers/%d/vms/%d\", provider.getProviderId(), vm.getVmId());\n o.put(\"uri\", uri);\n o.put(\"baseUri\", vmUri);\n json.put(o);\n }\n\n log.trace(\"getVMs() finished successfully.\");\n return Response.ok(json.toString()).build();\n }",
"@Override\n\tpublic List<MavenDeployableDescriptor> getDeployableDescriptors() {\n\t\treturn descriptors;\n\t}",
"String getKubernetesServiceType();",
"public List<JSONObject> getVendors() {\n String result = null;\n try {\n OpenstackConnection con = ConnectionMgr.getConnectionMgr()\n .getConnection(connect);\n\n result = new HttpRequests.Builder(connect.getAuthenticateMode())\n .addHeader(Constant.HEADER_AUTH_TOKEN,\n con.getDomainTokens())\n .setUrl(String.format(UrlConstant.GET_VENDOR,\n con.getServiceUrl(Constant.ServiceName.KEYSTONE)))\n .get().request();\n\n LOG.warn(\"function = getVendors result: \" + result);\n JSONObject vendorObj = JSONObject.fromObject(result);\n\n if (vendorObj.containsKey(Constant.WRAP_TENANTS)) {\n return getVendorsMap(vendorObj);\n }\n } catch (LoginException e) {\n LOG.error(\"function=getVendors, msg=get from fs OpenStackLoginException,info:\"\n + e);\n }\n return null;\n }",
"private List<String> getRunningInstances()\n {\n final long maxResults = 500L; // 500 is sadly the max, see below\n\n ArrayList<String> ids = new ArrayList<>();\n try {\n final String project = envConfig.getProjectId();\n final String zone = envConfig.getZoneName();\n final String managedInstanceGroupName = envConfig.getManagedInstanceGroupName();\n\n Compute computeService = createComputeService();\n Compute.InstanceGroupManagers.ListManagedInstances request =\n computeService\n .instanceGroupManagers()\n .listManagedInstances(project, zone, managedInstanceGroupName);\n // Notice that while the doc says otherwise, there is not nextPageToken to page\n // through results and so everything needs to be in the same page\n request.setMaxResults(maxResults);\n InstanceGroupManagersListManagedInstancesResponse response = request.execute();\n for (ManagedInstance mi : response.getManagedInstances()) {\n ids.add(GceUtils.extractNameFromInstance(mi.getInstance()));\n }\n log.debug(\"Found running instances [%s]\", String.join(\",\", ids));\n }\n catch (Exception e) {\n log.error(e, \"Unable to get instances.\");\n }\n return ids;\n }",
"public List<String> getAvailabilityZones() {\n final DescribeAvailabilityZonesResult result = ec2Client.describeAvailabilityZones();\n\n return result.getAvailabilityZones()\n .stream()\n .filter(az -> AvailabilityZoneState.Available == AvailabilityZoneState.fromValue(az.getState()))\n .map(AvailabilityZone::getZoneName).collect(Collectors.toList());\n }",
"public List<String> listBuckets() {\n\t\tList<String> list = new ArrayList<String>();\n\t\tfor (Bucket bucket : s3client.listBuckets()) {\n\t\t\tlist.add(bucket.getName());\n\t\t\t// System.out.println(\" - \" + bucket.getName());\n\t\t}\n\n\t\treturn list;\n\t}",
"public int getDeployOrder();",
"@javax.annotation.Nullable\n @ApiModelProperty(value = \"Represents the latest available observations of a deployment's current state.\")\n\n public List<V1DeploymentCondition> getConditions() {\n return conditions;\n }",
"private void addAllDeploymentsAsFreeLaunchers() {\n List<String> deployments = getDeployments();\n log.info(\"Found \" + deployments.size() + \" deployments to be added\");\n for (String deployment : deployments) {\n if (runtimeClient.serviceExists(deployment)) {\n addFreeLauncher(deployment);\n } else {\n log.info(\"Deployment \" + deployment + \" doesn't have a Service that exposes it. Not adding as a launcher...\");\n }\n }\n }",
"public java.util.List<String> getVersions() {\n if (versions == null) {\n versions = new java.util.ArrayList<String>();\n }\n return versions;\n }",
"public List<Node> nodesIn(CloudName cloud) {\n return versions.entrySet().stream()\n .filter(entry -> entry.getKey().cloud().equals(cloud))\n .flatMap(entry -> entry.getValue().stream())\n .collect(Collectors.toUnmodifiableList());\n }",
"java.util.List<String>\n getClusteringKeyList();",
"public com.google.common.util.concurrent.ListenableFuture<yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.ListClusterBackupsResponse> listBackups(\n yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.ListClusterBackupsRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getListBackupsMethod(), getCallOptions()), request);\n }",
"@GetMapping(value = \"/projects\", produces = \"application/json\")\n public ResponseEntity<?> listAllProjects()\n {\n List<Project> projectList = projectService.findAllProjects();\n\n return new ResponseEntity<>(projectList, HttpStatus.OK);\n }",
"@Override\n public MarathonDeployedAppList get(String componentName) {\n return null;\n }",
"public List<VirtualHost> getHosts() {\r\n return this.hosts;\r\n }",
"public java.util.List<ApplicationVersionDescription> getApplicationVersions() {\n if (applicationVersions == null) {\n applicationVersions = new com.amazonaws.internal.ListWithAutoConstructFlag<ApplicationVersionDescription>();\n applicationVersions.setAutoConstruct(true);\n }\n return applicationVersions;\n }",
"java.util.List<java.lang.String>\n getEnvList();",
"@Override\n public List<EnvironmentVariable> findAll() throws Exception {\n return null;\n }",
"@RequestMapping(path = \"/v1/get-current-kernel-versions\", method = RequestMethod.GET)\n public ResponseEntity<Object> getCurrentKernelVersions() {\n return ResponseUtils.buildSucessResponse(complianceService.getCurrentKernelVersions());\n }",
"public List<String> getKinitCommandAsList() {\n List<String> kinitCommandAsList = new ArrayList<>();\n kinitCommandAsList.add(kerberosKinitLocation);\n kinitCommandAsList.add(kerberosPrincipal);\n kinitCommandAsList.add(\"-kt\");\n kinitCommandAsList.add(kerberosKeytab);\n return kinitCommandAsList;\n }",
"@Override\n\tpublic JsonArray getMojoDeployedUsecases() throws InsightsCustomException {\n JsonArray responseArray = new JsonArray();\n try {\n \tList<AutoMLConfig> results = autoMLConfigDAL.getActiveUsecaseList();\n if (!results.isEmpty()) {\n \tfor(AutoMLConfig eachMLConfig: results){\n \t\tJsonObject eachObject = new JsonObject();\n \t\teachObject.addProperty(USECASE_NAME,eachMLConfig.getUseCaseName());\n \t\teachObject.addProperty(\"predictionColumn\", eachMLConfig.getPredictionColumn());\n \t\tresponseArray.add(eachObject);\n \t}\n } else {\n \tthrow new InsightsCustomException(\"No Mojo_deployed Usecase found.\");\n }\n return responseArray;\n } catch (Exception e) {\n throw new InsightsCustomException(e.getMessage());\n }\n\t}",
"com.google.cloud.aiplatform.v1.DeployedModel getDeployedModel();",
"public Installments getInstallments() {\n return installments;\n }",
"public List<JFrogPlatformInstance> getJfrogInstances() {\n return RepositoriesUtils.getJFrogPlatformInstances();\n }",
"@Override\n public java.util.concurrent.Future<ListTagsForResourceResult> listTagsForResourceAsync() {\n\n return listTagsForResourceAsync(new ListTagsForResourceRequest());\n }",
"public ResponseEntity<?> getElasticsearchClustersHealth() {\n try {\n ClusterHealthResponse response = client.cluster().health(new ClusterHealthRequest(), RequestOptions.DEFAULT);\n return new ResponseEntity<>(response, HttpStatus.OK);\n } catch (Exception e) {\n log.error(\"Error encountered getElasticsearchDetails\", e);\n return new ResponseEntity<>(e, HttpStatus.INTERNAL_SERVER_ERROR);\n }\n }",
"public java.util.List<ReservedInstancesConfiguration> getTargetConfigurations() {\n if (targetConfigurations == null) {\n targetConfigurations = new com.amazonaws.internal.ListWithAutoConstructFlag<ReservedInstancesConfiguration>();\n targetConfigurations.setAutoConstruct(true);\n }\n return targetConfigurations;\n }",
"public List<Installment> getReturnInstallments() {\n return returnInstallments;\n }",
"public DeploymentController getDeploymentController() {\n return this.deploymentController;\n }",
"protected SiteWhereScriptVersionList getVersionsForScript(SiteWhereScript script) {\n\tString tenantId = script.getMetadata().getLabels().get(ResourceLabels.LABEL_SITEWHERE_TENANT);\n\tString functionalArea = script.getMetadata().getLabels().get(ResourceLabels.LABEL_SITEWHERE_FUNCTIONAL_AREA);\n\tString scriptId = script.getSpec().getScriptId();\n\tString namespace = getMicroservice().getInstanceSettings().getKubernetesNamespace();\n\tMap<String, String> labels = new HashMap<>();\n\tlabels.put(ResourceLabels.LABEL_SCRIPTING_SCRIPT_ID, scriptId);\n\tlabels.put(ResourceLabels.LABEL_SITEWHERE_FUNCTIONAL_AREA, functionalArea);\n\tlabels.put(ResourceLabels.LABEL_SITEWHERE_TENANT, tenantId);\n\treturn getMicroservice().getSiteWhereKubernetesClient().getScriptsVersions().inNamespace(namespace)\n\t\t.withLabels(labels).list();\n }",
"public DeploymentConfiguration getDeploymentConfiguration() {\n return this.deploymentConfiguration;\n }",
"@Override\n public MarathonDeployedAppList get(Application application, Component component, Environment environment) {\n return null;\n }",
"public List<String> getHosts() {\n\t\treturn hosts;\n\t}",
"@Override\n\tpublic List<TaskKeeper> getList() {\n\t\treturn (List<TaskKeeper>) taskKeeperRepositories.findAll();\n\t}",
"public SME_Cluster[] getClusters();",
"public List getAvailableProjects (){\n\t\tList retValue = new ArrayList ();\n\t\tthis.setProcessing (true);\n\t\ttry {\n\t\t\tfor (Iterator it = getPersistenceManager().getExtent(Project.class, true).iterator();it.hasNext ();){\n\t\t\t\tretValue.add (it.next());\n\t\t\t}\n\t\t} finally {\n\t\t\tthis.setProcessing (false);\n\t\t}\n\t\treturn retValue;\n\t}",
"@GetMapping(\"/getAll\")\r\n\tpublic List<Project> getAllProjects() {\r\n\t\treturn persistenceService.getAllProjects();\r\n\t}",
"Map<ServerName, List<String>> getDeployedHRIs(final HBaseAdmin admin) throws IOException {\n ClusterStatus status = admin.getClusterStatus();\n Collection<ServerName> regionServers = status.getServers();\n Map<ServerName, List<String>> mm =\n new HashMap<ServerName, List<String>>();\n for (ServerName hsi : regionServers) {\n AdminProtos.AdminService.BlockingInterface server = ((HConnection) connection).getAdmin(hsi);\n\n // list all online regions from this region server\n List<HRegionInfo> regions = ProtobufUtil.getOnlineRegions(server);\n List<String> regionNames = new ArrayList<String>();\n for (HRegionInfo hri : regions) {\n regionNames.add(hri.getRegionNameAsString());\n }\n mm.put(hsi, regionNames);\n }\n return mm;\n }",
"public List<ApplicationArtifact> artifacts() {\n return this.artifacts;\n }",
"org.jacorb.imr.HostInfo[] list_hosts();",
"@RequestMapping(value = \"/discovery-client/instances\", method = RequestMethod.GET)\n public Map<String, Integer> getAllInstances() {\n final Map<String, Integer> response = new HashMap<>();\n\n final Applications applications = discoveryClient.getApplications();\n final List<Application> applicationList = applications.getRegisteredApplications();\n\n //TODO Java 8 Stream\n // Get instances from eureka\n for (final Application app : applicationList) {\n response.put(app.getName(), app.getInstances().size());\n }\n\n return response;\n }",
"public List<Park> getParkRegistry() {\n return this.pf.getParkList();\n }",
"public List<String> getHosts() {\n return getProperty(HOSTS);\n }",
"public java.util.List<org.mrk.grpc.catalog.Bundle> getBundlesList() {\n return bundles_;\n }",
"com.clarifai.grpc.api.InstalledModuleVersion getInstalledModuleVersions(int index);",
"public void listBackups(yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.ListClusterBackupsRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.ListClusterBackupsResponse> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListBackupsMethod(), responseObserver);\n }",
"@Path(\"/api/node/jobs/{nodeName}/{clusterName}\")\n\t@GET\n\t@ApiOperation(value = \"Get the list of cluster jobs by Customer\", notes = \"User can get list of jobs by cluster and node under his organization.User with role Customer Admin or Customer User is allowed.\", response = ResponseDTO.class, responseContainer = \"Job List\")\n\t@ApiResponses({\n\t\t\t@ApiResponse(code = 200, message = \"Job details for the given Customer and cluster have been fetched\"), })\n\t@RequestMapping(value = \"/api/node/jobs/{nodeName}/{clusterName}\", method = RequestMethod.GET)\n\t@Transactional(rollbackFor = { NotAuthorizeException.class, CustomerNotFoundException.class,\n\t\t\tUserExistsException.class, ClusterNotFoundException.class, NodeNotFoundException.class,\n\t\t\tBaseException.class })\n\t@PreAuthorize(\"hasAnyAuthority('Customer User','Customer Admin')\")\n\tpublic ResponseDTO nodeJobsList(@PathVariable(\"nodeName\") String nodeName,\n\t\t\t@PathVariable(\"clusterName\") String clusterName, HttpServletRequest request) throws Exception {\n\t\tlogger.debug(\"Started JobsController.nodeJobsList() \");\n\t\tResponseDTO response = new ResponseDTO();\n\n\t\tif (StringUtils.isEmpty(nodeName) || StringUtils.isEmpty(clusterName)) {\n\t\t\tthrow new ValidationException(\"Naode name or ClusterName should not be null \");\n\t\t}\n\t\tString loggedInEmail = getLoggedInUserEmail(SecurityContextHolder.getContext().getAuthentication());\n\t\tString cutomerID = getLoggedInUserCustomerID(SecurityContextHolder.getContext().getAuthentication());\n\n\t\tif (!isAcceesbleForClusterAndNode(cutomerID, clusterName, nodeName)) {\n\t\t\tthrow new NotAuthorizeException(\"User not authorized to access given cluster or node \");\n\t\t}\n\n\t\tUser loggedInUser = userService.findUserByEmail(loggedInEmail);\n\t\tCustomer customer = new Customer();\n\t\tcustomer.setId(loggedInUser.getCustomer().getId());\n\n\t\tJob job = new Job();\n\t\tjob.setIsDeleted(NO.toString());\n\n\t\tList<JobTaskDTO> jobTaskDataList = null;\n\t\tif (nodeName != null && !nodeName.isEmpty() || clusterName != null && !clusterName.isEmpty()) {\n\n\t\t\tNode node = nodeService.findNodeByNameAndCluster(nodeName, clusterName, customer.getId());\n\t\t\tjob.setNode(node);\n\t\t\tList<Job> jobList = jobService.findAllJobsByNode(job);\n\t\t\tjobTaskDataList = new LinkedList<JobTaskDTO>();\n\t\t\tif (jobList != null && !jobList.isEmpty()) {\n\t\t\t\ttry {\n\t\t\t\t\tfor (Job jobObj : jobList) {\n\t\t\t\t\t\tif (jobObj != null) {\n\t\t\t\t\t\t\tjobTaskDataList.add(createJobToJobTaskDTO(jobObj));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlogger.error(e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tlogger.error(\"Jobs list failed with message {} \" + environment.getProperty(\"nodename.clusterName.notnull\"));\n\t\t\tthrow new ValidationException(environment.getProperty(\"nodename.clusterName.notnull\"));\n\t\t}\n\t\tresponse.setData(jobTaskDataList);\n\t\tresponse.setMessage(\"Retrieved\");\n\t\tresponse.setStatusCode(200);\n\t\tlogger.debug(\"Ended JobsController.nodeJobsList() \");\n\t\treturn response;\n\t}",
"public java.util.List<EinsteinClusterTracker.Cluster> getClusters() {\n return this.clusters;\n }",
"@RequestMapping(value = \"/getCustomerAppliedJobsList\", method = RequestMethod.GET, produces = \"application/json\")\n\t@ResponseBody\n\tpublic List<GetCustomerAppliedJobs> getCustomerAppliedJobsList() {\n \tList<GetCustomerAppliedJobs> getCustomerAppliedJobsList = null;\n\t\ttry {\n\t\t\t\n\t\t\tgetCustomerAppliedJobsList = this.econnectService.getCustomerAppliedJobsList();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn getCustomerAppliedJobsList;\n\t}",
"public List<Version> getVersions() {\n\t\treturn versions;\n\t}",
"public java.util.List<AvailabilityZone> getAvailabilityZones() {\n return availabilityZones;\n }",
"@Override\n\tpublic List<Parking> VIPparkings() {\n\t\treturn parkingRepository.VIPparkings();\n\t}",
"public Iterable<SearchableContainer> getAllSearchableContainers() {\n return workspace.getAllSearchableContainers();\n }",
"DescribeEngineVersionsResult describeEngineVersions(DescribeEngineVersionsRequest describeEngineVersionsRequest);",
"Collection<ComponentState> getVersions();",
"@Override\n\tpublic List<Parking> availableParking() {\n\t\treturn parkingRepository.availableParking();\n\t}",
"public static List<EnvironmentVO> getAllEnvironments() throws SQLException {\n\t\tArrayList<EnvironmentVO> environmentVOs = new ArrayList<EnvironmentVO>();\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria envCriteria = session.createCriteria(EnvironmentEntity.class);\n\t\tenvCriteria.add(Restrictions.eq(\"envLock\", 0));\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<EnvironmentEntity> environmentEntities = envCriteria.list();\n\t\tfor(EnvironmentEntity entity : environmentEntities) {\n\t\t\tEnvironmentVO enVo = new EnvironmentVO();\n\t\t\tenVo.setEnvironmentId(entity.getEnvironmentId());\n\t\t\tenVo.setEnvironmentName(entity.getEnvironmentName());\n\t\t\tenVo.setMarathonUrl(entity.getMarathonURL());\n\t\t\tenVo.setMarathonCred(entity.getMarathonCred());\n\t\t\tif(entity.getMarathonJson()!=null){\n\t\t\t\tbyte[] data = entity.getMarathonJson().getBytes(1, (int) entity.getMarathonJson().length());\n\t\t\t\tenVo.setMarathonJson(new String(data));\n\t\t\t}\n\t\t\tenVo.setEastMarathonUrl(entity.getEastMarathonURL());\n\t\t\tif(entity.getEastMarathonJson()!=null){\n\t\t\t\tbyte[] data = entity.getEastMarathonJson().getBytes(1, (int) entity.getEastMarathonJson().length());\n\t\t\t\tenVo.setEastMarathonJson(new String(data));\n\t\t\t}\n\t\t\tenVo.setK8sUrl(entity.getK8sUrl());\n\t\t\tenVo.setK8sCred(entity.getK8sCred());\n\t\t\tenVo.setK8sTpsQuery(entity.getK8sTpsQuery());\n\t\t\tenVo.setK8sLatencyQuery(entity.getK8sLatencyQuery());\n\t\t\tenVo.setMesosTpsQuery(entity.getMesosTpsQuery());\n\t\t\tenVo.setMesosLatencyQuery(entity.getMesosLatencyQuery());\n\t\t\tenvironmentVOs.add(enVo);\n\t\t}\n\t\ttxn.commit();\n\t\treturn environmentVOs;\n\t}",
"default Promise<List<String>> findHealthyNodes() {\n final Promise<List<String>> promise = Promises.promise();\n promise.resolve(Collections.emptyList());\n return promise;\n }",
"com.google.cloud.aiplatform.v1.DeployedModelOrBuilder getDeployedModelOrBuilder();",
"public com.google.common.util.concurrent.ListenableFuture<yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.ListClusterShardsResponse> listShards(\n yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.ListClusterShardsRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getListShardsMethod(), getCallOptions()), request);\n }",
"public void listBackups(yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.ListClusterBackupsRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.ListClusterBackupsResponse> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getListBackupsMethod(), getCallOptions()), request, responseObserver);\n }",
"public List<String> getServices() {\n return runtimeClient.getServices();\n }",
"public static List<String> getSupportedVersions () {\n if (instBySupportedVersion == null) {\n init();\n }\n return new ArrayList(instBySupportedVersion.keySet());\n }",
"public java.util.List<Configuration> getConfigurations() {\n if (configurations == null) {\n configurations = new com.amazonaws.internal.ListWithAutoConstructFlag<Configuration>();\n configurations.setAutoConstruct(true);\n }\n return configurations;\n }",
"public List<ProgressConfigurationType> getAllConfigurations();",
"@Path(\"/api/cluster/jobs/{clusterId}\")\n\t@GET\n\t@ApiOperation(value = \"Get the list of cluster jobs by Customer\", notes = \"Logged in user can list jobs by clusterId.User with role Customer Admin or Customer User is allowed.\", response = ResponseDTO.class, responseContainer = \"Job List\")\n\t@ApiResponses({\n\t\t\t@ApiResponse(code = 200, message = \"Job details for the given Customer and cluster have been fetched\"), })\n\t@RequestMapping(value = \"/api/cluster/jobs/{clusterId}\", method = RequestMethod.GET)\n\t@Transactional(rollbackFor = { NotAuthorizeException.class, ValidationException.class,\n\t\t\tCustomerNotFoundException.class, UserExistsException.class, ClusterNotFoundException.class,\n\t\t\tNodeNotFoundException.class, BaseException.class })\n\t@PreAuthorize(\"hasAnyAuthority('Customer User','Customer Admin')\")\n\tpublic ResponseDTO clusterJobsList(@PathVariable(\"clusterId\") String clusterId, HttpServletRequest request)\n\t\t\tthrows ClusterNotFoundException, ValidationException, Exception {\n\t\tlogger.debug(\"Started JobsController.clusterJobsList() \");\n\n\t\tif (clusterId != null && !StringUtils.isNumeric(clusterId)) {\n\t\t\tnew ValidationException(\"ClusterID should be numeric and should not be null\");\n\t\t}\n\n\t\tString loggedInCustomerID = getLoggedInUserCustomerID(SecurityContextHolder.getContext().getAuthentication());\n\t\tif (!isClusterAccessable(clusterId, loggedInCustomerID)) {\n\t\t\tthrow new NotAuthorizeException(\"User not authorized to access given cluster \");\n\t\t}\n\t\tResponseDTO response = new ResponseDTO();\n\t\tString loggedInEmail = getLoggedInUserEmail(SecurityContextHolder.getContext().getAuthentication());\n\t\tUser loggedInUser = userService.findUserByEmail(loggedInEmail);\n\t\tCustomer customer = new Customer();\n\t\tcustomer.setId(loggedInUser.getCustomer().getId());\n\t\tJob job = new Job();\n\t\tjob.setIsDeleted(NO.toString());\n\t\tCluster cluster = new Cluster();\n\t\tcluster.setId(Integer.parseInt(clusterId));\n\t\tcluster.setCustomer(customer);\n\n\t\tList<Job> jobList = jobService.findAllJobsByCluster(job, cluster);\n\t\tList<JobTaskDTO> jobTaskDataList = new LinkedList<JobTaskDTO>();\n\t\tif (jobList != null && !jobList.isEmpty()) {\n\t\t\ttry {\n\t\t\t\tfor (Job jobObj : jobList) {\n\t\t\t\t\tif (jobObj != null) {\n\t\t\t\t\t\tjobTaskDataList.add(createJobToJobTaskDTO(jobObj));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.error(e.getMessage());\n\t\t\t}\n\t\t}\n\t\tresponse.setData(jobTaskDataList);\n\t\tresponse.setMessage(\"Retrieved\");\n\t\tresponse.setStatusCode(200);\n\t\tlogger.debug(\"Ended JobsController.clusterJobsList() \");\n\t\treturn response;\n\t}"
] | [
"0.61192423",
"0.5916623",
"0.58324426",
"0.5614431",
"0.5360705",
"0.53236276",
"0.5271111",
"0.52535176",
"0.5133596",
"0.50503165",
"0.49689057",
"0.49246007",
"0.49051127",
"0.48806646",
"0.48550233",
"0.48379618",
"0.4794158",
"0.47707444",
"0.47555363",
"0.47440478",
"0.473262",
"0.47300422",
"0.47271812",
"0.4707729",
"0.46996373",
"0.46948212",
"0.469287",
"0.46738943",
"0.46447825",
"0.46416304",
"0.46167368",
"0.45687172",
"0.45626658",
"0.45568308",
"0.45540154",
"0.45517308",
"0.45480725",
"0.4545918",
"0.4545403",
"0.45392248",
"0.45110366",
"0.45092595",
"0.45030394",
"0.45019037",
"0.44993728",
"0.44967654",
"0.4494565",
"0.4476877",
"0.44711924",
"0.44622964",
"0.4453844",
"0.44525498",
"0.44507518",
"0.4444397",
"0.44427234",
"0.44273522",
"0.44230774",
"0.4421055",
"0.4413337",
"0.44030088",
"0.4400471",
"0.4398028",
"0.43937433",
"0.4391437",
"0.43863225",
"0.43802884",
"0.43750137",
"0.43718445",
"0.43684042",
"0.4365455",
"0.43651187",
"0.4360804",
"0.43584475",
"0.43576697",
"0.43453518",
"0.43427655",
"0.43388858",
"0.43201163",
"0.4318711",
"0.43163157",
"0.43135738",
"0.43135446",
"0.43116874",
"0.43094075",
"0.43063927",
"0.4306306",
"0.43005562",
"0.42976284",
"0.42961895",
"0.42932048",
"0.428579",
"0.42811713",
"0.42809144",
"0.4280278",
"0.42782927",
"0.4276946",
"0.42734987",
"0.42677614",
"0.42621487",
"0.42620665"
] | 0.76388407 | 0 |
Check if a Deploymen exists by the given name. | public boolean deploymentExists(String deploymentName) {
return runtimeClient.deploymentExists(deploymentName);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean existsByName(String name);",
"@Override\n\tpublic boolean isExist(String name) {\n\t\treturn false;\n\t}",
"public boolean exists(String name) throws IOException;",
"public Boolean Exist(String name)\n\t{\n\t\tBoolean res = false;\n\n\t\tint f = this.FindByName(name);\n\n\t\tif (f == -1)\n\t\t{\n\t\t\tres = false;\n\t\t} else\n\t\t{\n\t\t\tres = true;\n\t\t}\n\n\t\treturn res;\n\t}",
"public boolean exists(String name) {\n \n for (String keyName : options.keySet()) {\n if (keyName.equals(name)) {\n return true;\n }\n }\n return false;\n }",
"public boolean existsInstance(String name)\r\n\t{\r\n\t\treturn obtainOntResource(name) != null;\r\n\t}",
"@Override\n public boolean packageExists(String name) {\n return head.packageExists(name) || tail.packageExists(name);\n }",
"boolean isResolvable(String name);",
"boolean existsByNameAndId(String name, int id);",
"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();",
"boolean nameExists(Key name);",
"public boolean has(String itemName);",
"private int isDesigNameExist(String desigName) {\n\t\treturn adminServiceRef.isDesigNameExist(desigName);\r\n\t}",
"public static boolean hasAddon(String name) {\n\t\tif (!init) {\n\t\t\tinit();\n\t\t}\n\n\t\tfor (int i = 0; i < installedAddons.size(); i++) {\n\t\t\tProtocolDescriptor descriptor = installedAddons.get(i);\n\n\t\t\tif (((Standardprotocol)descriptor.getProtocol())\n\t\t\t\t\t.getName().equalsIgnoreCase(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"public boolean exsitName(String name) {\n\t\tKynamic kynamic = this.kynamicDao.getKynamicByName(name);\r\n\t\treturn kynamic!=null?true:false;\r\n\t}",
"public boolean existsClass(String name)\r\n\t{\r\n\t\treturn obtainOntClass(name) != null;\r\n\t}",
"public boolean hasRelation(String name) {\n \treturn relations.containsKey(name);\n }",
"boolean exists();",
"boolean exists();",
"public boolean hasElement(String name) {\n return elements.has(name);\n }",
"public boolean exists() {\n return exists(Datastore.fetchDefaultService());\n }",
"public boolean contains(String name) {\n return generators.containsKey(name);\n }",
"public boolean existsProperty(String name)\r\n\t{\r\n\t\treturn obtainOntProperty(name) != null;\r\n\t}",
"public abstract boolean doesExist();",
"public boolean containsConstraint(final String name) {\n boolean found = false;\n \n for (PgConstraint constraint : constraints) {\n if (constraint.getName().equals(name)) {\n found = true;\n \n break;\n }\n }\n \n return found;\n }",
"public void verifyContractNotExistByName(int chainId, int groupId, String name, String path) {\n TbContract contract = tbContractMapper.getContract(chainId, groupId, name, path);\n if (Objects.nonNull(contract)) {\n log.warn(\"contract is exist. groupId:{} name:{} path:{}\", groupId, name, path);\n throw new BaseException(ConstantCode.CONTRACT_EXISTS);\n }\n }",
"public boolean deckExists(String name)\n {\n return deckStore.exists(name);\n }",
"public boolean exists(String name) {\n\t\tif (root == null) {\t\t// If root is null, DLB is empty\n\t\t\treturn false;\n\t\t}\n\t\tStringCharacterIterator i = new StringCharacterIterator(name);\t// New iterator for make and model string\n\t\tNode cur = root;\t// Set a new cur as root\n\t\twhile (i.getIndex() < i.getEndIndex()) { \t// Iterate through the make and model string\n\t\t\tif (cur == null) { \t\t// If null, make and model is not in the DLB\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\twhile (i.current() != cur.getVal()) { // Go through the siblings to see if there's a match\n\t\t\t\tif (cur.getSibling() == null) {\n\t\t\t\t\treturn false; \t\t\t// There is no sibling so make and model is not in the DLB\n\t\t\t\t}\n\t\t\t\tcur = cur.getSibling();\t\t// Otherwise get the sibling, if there is a match\n\t\t\t}\n\t\t\tcur = cur.getChild();\t// Get next child\n\t\t\ti.next();\n\t\t}\n\t\tif (cur == null) { // If null, we did not find the make and model\n\t\t\treturn false;\n\t\t} \n\t\telse if (cur.getVal() == '^') {\t// If terminal node, we found the make and model\n\t\t\treturn true;\n\t\t}\n\t\twhile(cur.getSibling() != null) { // Go through all the siblings to see if there is a terminal node\n\t\t\tif (cur.getVal() == '^') {\t // If we found the terminal node, we're done\n\t\t\t\treturn true;\n\t\t\t} \n\t\t\tcur = cur.getSibling();\t// Otherwise get sibling\n\t\t}\n\t\treturn false;\n\t}",
"public boolean exists(String namespace, String id);",
"public boolean exists(String namespace, String id, long version);",
"public abstract boolean exists();",
"public boolean exists()\n\t{\n\n\t\treturn true;\n\t}",
"public static boolean hasItem(String name)\n {\n boolean found = false;\n for (Item inventory1 : inventory)\n {\n if(inventory1.getName().equals(name)) found = true;\n }\n \n return found;\n }",
"public boolean hasItem(final String name) {\n for (final Item item : this.getInventory()) {\n if (item.name().equals(name)) {\n return true;\n }\n }\n return false;\n }",
"public static boolean exists(String kingdomName) {\n try {\n java.sql.PreparedStatement s = QuartzKingdoms.DBKing.prepareStatement(\"SELECT * FROM Kingdoms WHERE KingdomName=?;\");\n s.setString(1, kingdomName);\n ResultSet res2 = s.executeQuery();\n if (res2.next()) {\n return true;\n } else {\n return false;\n }\n } catch (SQLException e) {\n e.printStackTrace();\n return false;\n }\n }",
"boolean exists(Curso curso) throws BusinessException;",
"public boolean hasConfiguration(String name) {\n\t\treturn getArtefact(name) != null;\n\t}",
"boolean hasPackageName();",
"private boolean existCountryOrPlace(String country, String name){\n \tboolean exist = false;\n \tfor(Place p : places){\n \t\tif(p.getName().equals(name)&&p.getCountry().equals(country)){\n \t\t\texist = true;\n \t\t}\n \t}\n \treturn exist;\n }",
"public boolean checkName(String name)\n\t{\n\t\treturn (robotHM.containsKey(name));\n\t}",
"boolean hasExists();",
"@Override\n\tpublic boolean exists(String arg0) {\n\t\treturn false;\n\t}",
"public boolean exists(String id);",
"private boolean exist(List<PlayerTeam> l, String name) {\n boolean ex = false;\n PlayerTeam curr = l.first();\n while (curr != null) {\n if (curr.getName().equals(name))\n return true;\n curr = l.next();\n }\n return ex;\n }",
"public static boolean exists(String path, String name) {\n return new File(path + name).exists();\n }",
"public boolean hasChild(String name) {\n return peekObject().getFieldNames().contains(name);\n }",
"public boolean hasParam(String name)\r\n {\r\n try {\r\n return lookup.get(name) != null;\r\n } catch(Exception e) {}\r\n \r\n return false;\r\n }",
"public boolean IsExistById(Department d) {\n\t\treturn false;\n\t}",
"public static boolean doesClassExist(String nameWithPackage, Object instanceToGetClassloaderFrom) {\n boolean exists = false;\n\n try {\n Class.forName(nameWithPackage, false, instanceToGetClassloaderFrom.getClass().getClassLoader());\n exists = true;\n } catch (ClassNotFoundException e) {\n exists = false;\n }\n\n return exists;\n }",
"public boolean isExists(String orderId);",
"private NFAState checkIfExists(String name) {\r\n\t\tNFAState ret = null;\r\n\t\tfor (NFAState s : states) {\r\n\t\t\tif (s.getName().equals(name)) {\r\n\t\t\t\tret = s;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ret;\r\n\t}",
"private NFAState checkIfExists(String name) {\n\t\tNFAState ret = null;\n\t\tfor(NFAState s : states){\n\t\t\tif(s.getName().equals(name)){\n\t\t\t\tret = s;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}",
"private boolean exists(String pathName)\n {\n if(new File(pathName).exists())\n {\n return true;\n }\n else\n {\n return false;\n }\n }",
"private boolean isExist(String name, Date date) {\n\t\t\n\t\tString sql = \"SELECT * from `expenses` WHERE Name='\"+name+\"' AND Date='\"+date+\"';\";\n\t\tResultSet rs = this.queryHandler.executeQuery(sql);\n\t\ttry {\n\t\t\tboolean exist = false;\n\t\t\twhile(rs.next()) {\n\t\t\t\texist = true;\n\t\t\t}\n\t\t\treturn exist;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tthis.queryHandler.close();\n\t\treturn false;\n\t}",
"public boolean existsHost(String name)\n {\n try\n {\n return (lookup(name)!=null); \n }\n catch (UnknownHostException e)\n {\n return false; \n }\n }",
"private boolean hasVariable(String name, TOSCAPlan buildPlan) {\n\t\treturn Utils.hasChildElementWithAttribute(buildPlan.getBpelProcessVariablesElement(), \"name\", name);\n\t}",
"default boolean isPresent(String name) {\n return getOptionStrings(name) != null;\n }",
"public boolean findUserIsExist(String name) {\n\t\treturn false;\r\n\t}",
"boolean isResolvable(String name, Class<?> type);",
"public boolean exist() {\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic boolean exists() {\n\t\treturn false;\r\n\t}",
"public static boolean tableIsExist(String name) throws Exception {\n init();\n TableName tableName = TableName.valueOf(name);\n boolean flag = admin.tableExists(tableName);\n close();\n return flag;\n }",
"public boolean existAlbum(String name){\n if(albumList.isEmpty())\n return false;\n else {\n for (Album a : albumList) {\n if (a.albumName.equals(name)) {\n return true;\n }\n }\n return false;\n }\n }",
"public boolean hasDependencies(int pk) {\n return (employeeDao.select(pk).getSubordinate() != null);\n }",
"private static boolean checkCwpNameExists(String name, Object value) {\r\n\t\tList<?> boIds = QueryUtil.executeQuery(\r\n\t\t\t\t\"select bo.id from \" + Cwp.class.getSimpleName() + \" bo\", null, new FilterParams(\r\n\t\t\t\t\t\tname, value), AhRestoreNewMapTools.getonlyDomain().getId());\r\n\t\treturn !boIds.isEmpty();\r\n\t}",
"@Override\n\tpublic boolean exists() {\n\t\treturn false;\n\t}",
"public boolean check_ab_exist(String ab_name){\n if(ab_store.get(ab_name) != null)\n return true;\n else\n return false;\n }",
"boolean contains(String name);",
"public boolean hasPredFor(String name) {\n boolean re = false;\n if (name != null && getPredictions() != null) {\n Prediction tmp = null;\n for (int i=0; i<getPredictions().size(); i++) {\n tmp = getPredictions().get(i);\n if (tmp.stop.equals(name)) {\n re = true;\n break;\n }\n }\n }\n return re;\n }",
"boolean exists(String userName);",
"public boolean hasProperty(String name) {\n for(Pp property : properties){\n if(property.getId().equals(name))\n return true;\n }\n return false;\n }",
"@Override\r\n\tpublic boolean isExist() {\n\t\treturn false;\r\n\t}",
"private boolean findRelCfgName(String name,\n Collection<PSRelationshipConfigName> names)\n {\n for (PSRelationshipConfigName cfgname : names)\n {\n if (cfgname.getName().equals(name))\n return true;\n }\n\n return false;\n }",
"public boolean isNamed(String n) {\n return name.equals(n);\n }",
"boolean hasDataName();",
"public boolean contains(@NonNull String name) {\n SharedPreferences prefs = context.getSharedPreferences(filename, Context.MODE_PRIVATE);\n return prefs != null && prefs.contains(name);\n }",
"public boolean checkName(String name)\n {\n return true;\n }",
"private boolean hasPartnerLink(String name, TOSCAPlan buildPlan) {\n\t\treturn Utils.hasChildElementWithAttribute(buildPlan.getBpelPartnerLinksElement(), \"name\", name);\n\t}",
"public boolean hasAttribute(String name) {\n // if attribute() returns a value, then this jode has that attribute\n return attribute(name, true) != null;\n }"
] | [
"0.72009194",
"0.67776823",
"0.66146255",
"0.6577165",
"0.6480484",
"0.6377809",
"0.63723177",
"0.63179755",
"0.62908065",
"0.6264325",
"0.6264325",
"0.6264325",
"0.6264325",
"0.6264325",
"0.6264325",
"0.6264325",
"0.6264325",
"0.6264325",
"0.6264325",
"0.6264325",
"0.6264325",
"0.6264325",
"0.6264325",
"0.6264325",
"0.6264325",
"0.6264325",
"0.6264325",
"0.6264325",
"0.6264325",
"0.6264325",
"0.6264325",
"0.6264325",
"0.62265396",
"0.6219318",
"0.6208133",
"0.6116365",
"0.60951674",
"0.6089094",
"0.60665554",
"0.6065525",
"0.6065525",
"0.6047247",
"0.59896505",
"0.5929972",
"0.59160936",
"0.5914144",
"0.59130293",
"0.5901584",
"0.58911425",
"0.58558637",
"0.58175224",
"0.5817388",
"0.5806852",
"0.57976013",
"0.57932794",
"0.5778782",
"0.5770249",
"0.5769762",
"0.57609236",
"0.57346195",
"0.57126623",
"0.5690661",
"0.5689711",
"0.5677578",
"0.5676352",
"0.5668972",
"0.5656917",
"0.5650535",
"0.56456596",
"0.5632254",
"0.56289256",
"0.5614686",
"0.56121653",
"0.5604258",
"0.56032914",
"0.56024057",
"0.55984855",
"0.5594896",
"0.5590433",
"0.5580773",
"0.55784035",
"0.5571774",
"0.5567256",
"0.5560096",
"0.555601",
"0.5553667",
"0.55317193",
"0.5530316",
"0.5511056",
"0.5510173",
"0.55026656",
"0.5495043",
"0.5491322",
"0.54701996",
"0.5449212",
"0.5444885",
"0.54433477",
"0.54428256",
"0.54399884",
"0.54396397",
"0.54372454"
] | 0.0 | -1 |
Check if a Service exists by the given name. | public boolean serviceExists(String serviceName) {
return runtimeClient.serviceExists(serviceName);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasServiceName();",
"boolean hasServiceName();",
"boolean existsByName(String name);",
"boolean hasService();",
"boolean hasService();",
"boolean hasService();",
"boolean hasService();",
"boolean hasService();",
"Object getService(String serviceName, boolean checkExistence);",
"public boolean existsInstance(String name)\r\n\t{\r\n\t\treturn obtainOntResource(name) != null;\r\n\t}",
"public boolean supportsService( String sServiceName )\n {\n return sServiceName.equals( __serviceName );\n }",
"public boolean exists() {\n return exists(Datastore.fetchDefaultService());\n }",
"public boolean exists(String name) throws IOException;",
"public Boolean Exist(String name)\n\t{\n\t\tBoolean res = false;\n\n\t\tint f = this.FindByName(name);\n\n\t\tif (f == -1)\n\t\t{\n\t\t\tres = false;\n\t\t} else\n\t\t{\n\t\t\tres = true;\n\t\t}\n\n\t\treturn res;\n\t}",
"public static boolean isServiceRunning(String serviceName, Context context) {\n ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);\n for (ActivityManager.RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {\n if (serviceName.equals(service.service.getClassName())) {\n return true;\n }\n }\n return false;\n }",
"@Override\n\tpublic boolean isExist(String name) {\n\t\treturn false;\n\t}",
"public boolean hasService() {\n return service_ != null;\n }",
"public boolean hasService() {\n return service_ != null;\n }",
"public boolean hasService() {\n return service_ != null;\n }",
"public static boolean isServiceRunning(Context context, String serviceName) {\n ActivityManager activityManager = (ActivityManager) context\n .getSystemService(Context.ACTIVITY_SERVICE);\n List<ActivityManager.RunningServiceInfo> services = activityManager\n .getRunningServices(Integer.MAX_VALUE);\n\n if (services != null) {\n for (ActivityManager.RunningServiceInfo info : services) {\n if (info.service != null) {\n if (info.service.getClassName() != null && info.service.getClassName()\n .equalsIgnoreCase(serviceName)) {\n return true;\n }\n }\n }\n }\n\n return false;\n }",
"public boolean DFHasService(String agentName, String service) {\n return DFGetAllProvidersOf(service).contains(agentName);\n }",
"public boolean existsHost(String name)\n {\n try\n {\n return (lookup(name)!=null); \n }\n catch (UnknownHostException e)\n {\n return false; \n }\n }",
"@Override\n public boolean isServiceSupported(String serviceName) {\n return serviceEndpoints.containsKey(serviceName);\n }",
"boolean existsByNameAndId(String name, int id);",
"private boolean isMyServiceRunning() {\n\t ActivityManager manager = (ActivityManager) getSystemService(ACTIVITY_SERVICE);\n\t for (RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {\n\t if (\"com.example.MyService\".equals(service.service.getClassName())) {\n\t return true;\n\t }\n\t }\n\t return false;\n\t}",
"private void CheckIfServiceIsRunning() {\n\t\tLog.i(\"Convert\", \"At isRunning?.\");\n\t\tif (eidService.isRunning()) {\n//\t\t\tLog.i(\"Convert\", \"is.\");\n\t\t\tdoBindService();\n\t\t} else {\n\t\t\tLog.i(\"Convert\", \"is not, start it\");\n\t\t\tstartService(new Intent(IDManagement.this, eidService.class));\n\t\t\tdoBindService();\n\t\t}\n\t\tLog.i(\"Convert\", \"Done isRunning.\");\n\t}",
"boolean exists(String userName);",
"public boolean isFromWSDL(String serviceName);",
"public boolean containServiceRequestResource(String name) {\r\n\t\treturn this.serviceRequestResources.containsValue(name);\r\n\t}",
"boolean hasServiceCmd();",
"public static boolean isServiceRunning(Class <? extends Service> service, Context context) {\n ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);\n for ( ActivityManager.RunningServiceInfo runningServiceInfo : manager.getRunningServices(Integer.MAX_VALUE) ) {\n if ( service.getName().equals(runningServiceInfo.service.getClassName()) ) { return true; }\n }\n return false;\n }",
"public boolean hasServiceName() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasServiceName() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasServiceName() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasServiceName() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public static Service getServiseByName(ArrayList<Service> services ,String name){\r\n for(Service service:services){\r\n if(service.getName().equalsIgnoreCase(name)){\r\n return service;\r\n }\r\n }\r\n return null;\r\n }",
"public boolean hasService() {\n return serviceBuilder_ != null || service_ != null;\n }",
"public boolean hasService() {\n return serviceBuilder_ != null || service_ != null;\n }",
"public boolean hasService() {\n return serviceBuilder_ != null || service_ != null;\n }",
"private boolean isServiceRunning(String strClassName) {\n boolean bRunning = false;\n\n try{\n ActivityManager am = (ActivityManager)mContext.getSystemService(Context.ACTIVITY_SERVICE);\n List<ActivityManager.RunningServiceInfo> servicesList = am.getRunningServices(Integer.MAX_VALUE);\n Iterator<ActivityManager.RunningServiceInfo> serviceList = servicesList.iterator();\n\n while(serviceList.hasNext()) {\n ActivityManager.RunningServiceInfo si = (ActivityManager.RunningServiceInfo)serviceList.next();\n if(strClassName.equals(si.service.getClassName()) == true) {\n bRunning = true;\n break;\n }\n }\n\n }catch (Exception e)\n {\n e.printStackTrace();\n }\n\n return bRunning;\n }",
"public void testGetServiceByName() {\n System.out.println(\"getServiceByName\");\n EntityManager em = emf.createEntityManager();\n ServiceDaoImpl sdao = new ServiceDaoImpl(em);\n Service s = getService(\"low-cost-one\", new Long(99),\n // 1 day\n new Duration(24 * 60 * 60 * 1000));\n\n em.getTransaction().begin();\n em.persist(s);\n em.getTransaction().commit();\n\n assertNotNull(sdao.getServiceByName(\"low-cost-one\").get(0));\n assertEquals(s, sdao.getServiceByName(\"low-cost-one\").get(0));\n }",
"public boolean exists(String name) {\n \n for (String keyName : options.keySet()) {\n if (keyName.equals(name)) {\n return true;\n }\n }\n return false;\n }",
"public final Service getService(final String name) {\r\n Service x, y;\r\n\r\n for (x = this.m_services[name.hashCode()\r\n & (this.m_services.length - 1)]; x != null; x = x.m_next) {\r\n for (y = x; y != null; y = y.m_equal) {\r\n if (name.equals(y.m_name))\r\n return y;\r\n }\r\n }\r\n\r\n return null;\r\n }",
"public boolean existsClass(String name)\r\n\t{\r\n\t\treturn obtainOntClass(name) != null;\r\n\t}",
"public ServiceInstance lookupInstance(String serviceName);",
"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();",
"private boolean isMyServiceRunning(Class<?> serviceClass) {\n ActivityManager manager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);\n\n for (ActivityManager.RunningServiceInfo serviceInfo : manager.getRunningServices(Integer.MAX_VALUE)) {\n if (serviceClass.getName().equals(serviceInfo.service.getClassName())) {\n return true;\n }\n }\n return false;\n }",
"boolean nameExists(Key name);",
"public boolean isServiceRunning();",
"private boolean checkServiceIsRunning(){\r\n if (CurrentLocationUtil.isRunning()){\r\n doBindService();\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }",
"public boolean isServiceTypeInstalled(String fullTypeName) {\r\n ServiceData sd = ServiceData.getLocalInstance();\r\n\r\n if (!sd.containsServiceType(fullTypeName)) {\r\n log.error(\"unknown service {}\", fullTypeName);\r\n return false;\r\n }\r\n\r\n Set<Library> libraries = getUnfulfilledDependencies(fullTypeName);\r\n if (libraries.size() > 0) {\r\n // log.info(\"{} is NOT installed\", fullTypeName);\r\n return false;\r\n }\r\n\r\n // log.info(\"{} is installed\", fullTypeName);\r\n return true;\r\n }",
"boolean contains(String name);",
"private boolean searchSystem(String name) {\n for (ExternalSystem system : connectedExternalSystems) {\n if (system.getSystemName().equals(name)){\n return true;\n }\n }\n\n return false;\n }",
"public static boolean exists(String path, String name) {\n return new File(path + name).exists();\n }",
"public boolean exists(String namespace, String id);",
"@Override\n\tpublic boolean exists(String arg0) {\n\t\treturn false;\n\t}",
"public boolean findUserIsExist(String name) {\n\t\treturn false;\r\n\t}",
"protected boolean isServiceRunning(final String serviceClassName) {\n\t\tif (StringUtils.isNullorEmpty(serviceClassName))\n\t\t\treturn false;\n\t\tActivityManager manager = (ActivityManager) getSystemService(ACTIVITY_SERVICE);\n\t\tfor (RunningServiceInfo service : manager\n\t\t\t\t.getRunningServices(Integer.MAX_VALUE)) {\n\t\t\tif (serviceClassName.equalsIgnoreCase(service.service\n\t\t\t\t\t.getClassName())) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public Service consultName(String name){\r\n \tCriteria criteria = session.createCriteria(Service.class);\r\n \tcriteria.add(Restrictions.like(\"name\",name));\r\n \treturn (Service)criteria.list().get(0);\r\n }",
"<T> T getService(Class<T> type, boolean checkExistence);",
"public abstract ServiceLocator find(String name);",
"<V> V getService(String serviceName, Class<V> targetType, boolean checkExistence);",
"@GetMapping(\"/name/{name}\")\n public ResponseEntity<ServiceResult> findByName(@PathVariable String name) {\n return new ResponseEntity<ServiceResult>(adCampaignService.findByName(name), HttpStatus.OK);\n }",
"public boolean registersService() {\n return this.sr.registersService(this.m_oService);\n }",
"public Service getServiceForName(String name) throws SessionQueryException\n {\n Service returnedService = null;\n\n try\n {\n ComponentStruct component = getSessionManagementAdminService().getComponent(name);\n returnedService = new Service(name, component.isRunning, component.isMaster);\n }\n catch(Exception e)\n {\n throw new SessionQueryException(String.format(\"Could not receive service for %s.\", name), e);\n }\n\n return returnedService;\n }",
"public boolean findAgentExistForServicePoint(long servicePointId);",
"public boolean exists(String id);",
"public boolean existsInstance(String instanceName, String className)\r\n\t{\r\n\t\tif(!existsInstance(instanceName))\r\n\t\t\treturn false;\r\n\t\treturn isInstanceOf(instanceName, className);\r\n\t\t\r\n\t}",
"public boolean exists(String arg0) {\n\t\treturn false;\n\t}",
"public boolean exists(String arg0) {\n\t\treturn false;\n\t}",
"public boolean exists(String arg0) {\n\t\treturn false;\n\t}",
"boolean hasServiceList();",
"private boolean exists(String pathName)\n {\n if(new File(pathName).exists())\n {\n return true;\n }\n else\n {\n return false;\n }\n }",
"boolean exists(String username);",
"public boolean exists(String namespace, String id, long version);",
"public boolean hasService() {\n return fieldSetFlags()[1];\n }",
"public static boolean isServiceRunning(Context context, Class<?> serviceClass) {\n ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);\n for (ActivityManager.RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {\n if (serviceClass.getName().equals(service.service.getClassName())) {\n return true;\n }\n }\n return false;\n }",
"public static boolean isServiceRunning(Context ctx, Class<?> serviceClass) {\n ActivityManager manager = (ActivityManager) ctx.getSystemService(Context.ACTIVITY_SERVICE);\n for (ActivityManager.RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {\n if (serviceClass.getName().equals(service.service.getClassName())) {\n return true;\n }\n }\n return false;\n }"
] | [
"0.7665775",
"0.7665775",
"0.7204018",
"0.7180632",
"0.7180632",
"0.7180632",
"0.7180632",
"0.7180632",
"0.7094114",
"0.66145045",
"0.650817",
"0.6492005",
"0.6470068",
"0.64100367",
"0.6400458",
"0.6397163",
"0.6391837",
"0.6391837",
"0.6391837",
"0.63501215",
"0.6338822",
"0.6233066",
"0.62056845",
"0.6173078",
"0.61547405",
"0.6147233",
"0.6140909",
"0.6134385",
"0.6120324",
"0.6090445",
"0.60886025",
"0.60803413",
"0.60803413",
"0.6068416",
"0.6068416",
"0.60393846",
"0.5998516",
"0.5998516",
"0.5998516",
"0.5988595",
"0.5982847",
"0.5981505",
"0.59737015",
"0.5969034",
"0.5944428",
"0.594052",
"0.594052",
"0.594052",
"0.594052",
"0.594052",
"0.594052",
"0.594052",
"0.594052",
"0.594052",
"0.594052",
"0.594052",
"0.594052",
"0.594052",
"0.594052",
"0.594052",
"0.594052",
"0.594052",
"0.594052",
"0.594052",
"0.594052",
"0.594052",
"0.594052",
"0.594052",
"0.5929454",
"0.592445",
"0.58908606",
"0.586746",
"0.5867069",
"0.5851547",
"0.58189726",
"0.5806628",
"0.58035207",
"0.57999575",
"0.57963634",
"0.57908285",
"0.5779255",
"0.57612574",
"0.5741522",
"0.57256955",
"0.5714946",
"0.5713855",
"0.571353",
"0.57054144",
"0.56856114",
"0.56685",
"0.5654469",
"0.5654469",
"0.5654469",
"0.565215",
"0.56214035",
"0.55677754",
"0.5557268",
"0.5537558",
"0.5536836",
"0.55351025"
] | 0.77705157 | 0 |
Iterate through the Deployments list and add any valid Deployment+Service as a free Launcher. | private void addAllDeploymentsAsFreeLaunchers() {
List<String> deployments = getDeployments();
log.info("Found " + deployments.size() + " deployments to be added");
for (String deployment : deployments) {
if (runtimeClient.serviceExists(deployment)) {
addFreeLauncher(deployment);
} else {
log.info("Deployment " + deployment + " doesn't have a Service that exposes it. Not adding as a launcher...");
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void addFreeLauncher(String deploymentName) {\n persistence.addFreeLauncher(getLauncherUrlFromObjectName(deploymentName));\n }",
"public void validateLauncherUrls() {\n log.info(\"Validating the existing launcher URL list for missing deployments...\");\n\n for (String launcherUrl : getTotalLaunchers()) {\n log.info(\"Validating [Launcher URL] \" + launcherUrl + \"...\");\n String objectName = getObjectNameFromLauncherUrl(launcherUrl);\n if (!runtimeClient.deploymentExists(objectName) || !runtimeClient.serviceExists(objectName)) {\n log.info(\"Found an invalid launcher [URL] \" + launcherUrl);\n // Just remove the reference to launcher now\n // cleanOrphan* jobs will clean any orphan deployments\n // desired count check will scale up if free count is reduced\n unregisterLauncherIfExists(launcherUrl);\n }\n }\n }",
"public void cleanOrphanDeployments() {\n log.info(\"Cleaning orphan Deployments...\");\n List<String> deploymentNames = getDeployments();\n for (String deploymentName : deploymentNames) {\n if (deploymentName.startsWith(Constants.BPG_APP_TYPE_LAUNCHER + \"-\") && !serviceExists(deploymentName)) {\n log.info(\"Cleaning orphan Deployment [Name] \" + deploymentName + \"...\");\n\n unregisterLauncherIfExistsByObjectName(deploymentName);\n\n if (!runtimeClient.deleteDeployment(deploymentName)) {\n log.error(\"Deployment deletion failed [Deployment Name] \" + deploymentName);\n }\n }\n }\n }",
"private void startAdditionalApps(String appList) throws FileSystemException {\n //Split on comma\n String[] additionalApps = appList.split(Strings.COMMA);\n for (String app : additionalApps) {\n log.log(Level.INFO, MessageNames.STARTING_WITH_SERVICE, app);\n FileObject serviceArchive = findServiceArchiveForName(app);\n if (serviceArchive==null) {\n System.err.println(MessageFormat.format(messages.getString(MessageNames.NO_SUCH_CLIENT_APP), clientAppName));\n System.exit(1);\n }\n deployServiceArchive(serviceArchive, new String[0]);\n }\n }",
"private void initialDeploy() {\n }",
"public void addWarDeployer(String deployerFactory, String throttles) {\n super.addWarDeployer(deployerFactory, throttles);\n }",
"private void deployConsumers() throws AbortCPMException {\n\n if (consumerDeployList == null || consumerDeployList.size() == 0) {\n return;\n }\n CasProcessorDeployer deployer = null;\n // Deploy each CASProcessor in a seperate container\n for (int i = consumerDeployList.size(); i > 0; i--) {\n try {\n // Deployer deploys as many instances of CASProcessors as there are threads\n List cpList = (ArrayList) consumerDeployList.get((i - 1)); // list is zero-based\n String name = ((CasProcessor) cpList.get(0)).getProcessingResourceMetaData().getName();\n if (cpList.size() > 0) {\n //\n // Get a deployer for this type of CasProcessor. The type of deployer is determined from\n // the\n // CPE Configuration. Specifically from the deployment model for this CasProcessor.\n //\n CpeCasProcessor casProcessorType = (CpeCasProcessor) cpeFactory.casProcessorConfigMap\n .get(name);\n deployer = DeployFactory.getDeployer(cpeFactory, casProcessorType, pca);\n // Deploy CasConsumer.\n ProcessingContainer container = deployer.deployCasProcessor(cpList, false);\n consumerList.add(container);\n }\n } catch (Exception e) {\n e.printStackTrace();\n throw new AbortCPMException(e.getMessage());\n }\n }\n }",
"Collection</* IInstallableUnit */?> publishProduct( File productDefinition, File launcherBinaries, String flavor )\n throws FacadeException, IllegalStateException;",
"public void sfDeploy() throws SmartFrogException, RemoteException {\n super.sfDeploy();\n sfLog().info(\"DEPLOYED \"+sfCompleteNameSafe().toString());\n }",
"protected void tryDeploy() {\n ComponentManager mgr = harness.getContext().getRuntime().getComponentManager();\n // the stash may already contains contribs (from @Setup methods)\n if (mgr.hasChanged()) { // first reset the registry if it was changed by the last test\n mgr.reset();\n // the registry is now stopped\n }\n // deploy current test contributions if any\n deploy(runner, harness);\n mgr.refresh(true);\n // now the stash is empty\n mgr.start(); // ensure components are started\n }",
"public void cleanOrphanServices() {\n log.info(\"Cleaning orphan Services...\");\n List<String> serviceNames = getServices();\n for (String serviceName : serviceNames) {\n if (serviceName.startsWith(Constants.BPG_APP_TYPE_LAUNCHER + \"-\") && !deploymentExists(serviceName)) {\n log.info(\"Cleaning orphan Service [Name] \" + serviceName + \"...\");\n\n unregisterLauncherIfExistsByObjectName(serviceName);\n\n if (!runtimeClient.deleteService(serviceName)) {\n log.error(\"Service deletion failed [Service Name] \" + serviceName);\n }\n }\n }\n }",
"public org.biocatalogue.x2009.xml.rest.ServiceDeployment addNewServiceDeployment()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.biocatalogue.x2009.xml.rest.ServiceDeployment target = null;\r\n target = (org.biocatalogue.x2009.xml.rest.ServiceDeployment)get_store().add_element_user(SERVICEDEPLOYMENT$0);\r\n return target;\r\n }\r\n }",
"@Override\n public void addDeployedAPIRevision(String apiId, String apiRevisionUUID,\n List<DeployedAPIRevision> deployedAPIRevisionList)\n throws APIManagementException {\n\n List<DeployedAPIRevision> currentDeployedApiRevisionList =\n apiMgtDAO.getDeployedAPIRevisionByApiUUID(apiId);\n Set<DeployedAPIRevision> environmentsToRemove = new HashSet<>();\n\n // Deployments to add\n List<DeployedAPIRevision> environmentsToAdd = new ArrayList<>();\n\n List<String> envNames = new ArrayList<>();\n\n for (DeployedAPIRevision deployedAPIRevision : deployedAPIRevisionList) {\n // Remove duplicate entries for same revision uuid and env from incoming list\n if (!envNames.contains(deployedAPIRevision.getDeployment())) {\n envNames.add(deployedAPIRevision.getDeployment());\n environmentsToAdd.add(deployedAPIRevision);\n // Remove old deployed-revision entries of same env and apiid from existing db records\n for (DeployedAPIRevision currentapiRevisionDeployment : currentDeployedApiRevisionList) {\n if (StringUtils.equalsIgnoreCase(currentapiRevisionDeployment.getDeployment(),\n deployedAPIRevision.getDeployment())) {\n environmentsToRemove.add(currentapiRevisionDeployment);\n }\n }\n }\n }\n // Discard old deployment info\n if (environmentsToRemove.size() > 0) {\n apiMgtDAO.removeDeployedAPIRevision(apiId, environmentsToRemove);\n }\n // Add new deployed revision update to db\n if (deployedAPIRevisionList.size() > 0) {\n apiMgtDAO.addDeployedAPIRevision(apiRevisionUUID, environmentsToAdd);\n }\n }",
"private void deployAnalysisEngines() throws AbortCPMException {\n // When restoring the CPM from a checkpoint, its processing pipeline must be restored\n // to a previous state. So all CasProcessors that were disabled during the previous run\n // will remain disabled. All stats will be recovered as well.\n // if (restoredProcTr != null)\n if (checkpointData != null) {\n // Restore CPM related stats from the checkppoint\n restoreFromCheckpoint(\"CPM\", \"CPM PROCESSING TIME\");\n }\n\n CasProcessorDeployer deployer = null;\n // Deploy each CASProcessor in a seperate container\n for (int i = 0; i < annotatorDeployList.size(); i++) {\n try {\n // Deployer deploys as many instances of CASProcessors as there are threads\n List cpList = (ArrayList) annotatorDeployList.get(i);\n String name = ((CasProcessor) cpList.get(0)).getProcessingResourceMetaData().getName();\n if (UIMAFramework.getLogger().isLoggable(Level.CONFIG)) {\n UIMAFramework.getLogger(this.getClass()).logrb(Level.CONFIG, this.getClass().getName(),\n \"initialize\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE,\n \"UIMA_CPM_deploying_new_cp__CONFIG\",\n new Object[] { Thread.currentThread().getName(), name });\n }\n if (cpList.size() > 0) {\n\n //\n // Get a deployer for this type of CasProcessor. The type of deployer is determined from\n // the\n // CPE Configuration. Specifically from the deployment model for this CasProcessor. The\n // first\n //\n if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {\n UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),\n \"initialize\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_lookup_cp__FINEST\",\n new Object[] { Thread.currentThread().getName(), name });\n }\n if (!cpeFactory.casProcessorConfigMap.containsKey(name)) {\n if (UIMAFramework.getLogger().isLoggable(Level.SEVERE)) {\n UIMAFramework.getLogger(this.getClass()).logrb(Level.SEVERE,\n this.getClass().getName(), \"initialize\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE,\n \"UIMA_CPM_invalid_processor_configuration__SEVERE\",\n new Object[] { Thread.currentThread().getName(), name });\n }\n throw new Exception(CpmLocalizedMessage.getLocalizedMessage(\n CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_EXP_missing_cp__WARNING\",\n new Object[] { Thread.currentThread().getName(), name }));\n }\n CpeCasProcessor casProcessorCPEConfig = (CpeCasProcessor) cpeFactory.casProcessorConfigMap\n .get(name);\n if (casProcessorCPEConfig == null) {\n if (UIMAFramework.getLogger().isLoggable(Level.SEVERE)) {\n\n UIMAFramework.getLogger(this.getClass()).logrb(Level.SEVERE,\n this.getClass().getName(), \"initialize\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE,\n \"UIMA_CPM_cp_configuration_not_defined__SEVERE\",\n new Object[] { Thread.currentThread().getName(), name });\n }\n throw new Exception(CpmLocalizedMessage.getLocalizedMessage(\n CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_EXP_missing_cp__WARNING\",\n new Object[] { Thread.currentThread().getName(), name }));\n } else if (casProcessorCPEConfig.getDeployment() == null\n || casProcessorCPEConfig.getDeployment().trim().length() == 0) {\n if (UIMAFramework.getLogger().isLoggable(Level.SEVERE)) {\n UIMAFramework.getLogger(this.getClass()).logrb(Level.SEVERE,\n this.getClass().getName(), \"initialize\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE,\n \"UIMA_CPM_cp_deployment_mode_not_defined__SEVERE\",\n new Object[] { Thread.currentThread().getName(), name });\n }\n throw new Exception(\n CpmLocalizedMessage.getLocalizedMessage(CPMUtils.CPM_LOG_RESOURCE_BUNDLE,\n \"UIMA_CPM_Exception_invalid_deployment__WARNING\",\n new Object[] { Thread.currentThread().getName(), name,\n casProcessorCPEConfig.getDeployment() }));\n }\n\n deployer = DeployFactory.getDeployer(cpeFactory, casProcessorCPEConfig, pca);\n // Deploy CasConsumer.\n ProcessingContainer container = deployer.deployCasProcessor(cpList, false);\n annotatorList.add(container);\n }\n } catch (Exception e) {\n UIMAFramework.getLogger(this.getClass()).logrb(Level.SEVERE, this.getClass().getName(),\n \"initialize\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE,\n \"UIMA_CPM_cp_failed_to_start__SEVERE\",\n new Object[] { Thread.currentThread().getName(), e.getMessage() });\n\n throw new AbortCPMException(e.getMessage());\n }\n }\n\n }",
"@Override\n\tpublic void addNewInstallApps(List<ApplicationInfo> apps, String packageName) {\n ALog.d(\"Enter\");\n\n\n\t\tfor(ApplicationInfo info : apps){\n\t\t\tint[] pageInfo = LauncherProviderHelper.findVacantCell4AppAdd(getBaseContext());\n\t\t\tif (pageInfo == null) {\n\t\t\t\tALog.d(\"can't find cell for new app\");\n\t\t\t\tcontinue;\n\t\t\t} \n\t\t\tint page = pageInfo[0];\n\t\t\tint cellX = pageInfo[1];\n\t\t\tint cellY = pageInfo[2];\n\t\t\tinfo.screen = page;\n\t\t\tinfo.cellX = cellX;\n\t\t\tinfo.cellY = cellY;\n\t\t\tinfo.spanX = 1;\n\t\t\tinfo.spanY = 1;\n\t\t\tBaseLauncherModel.addOrMoveItemInDatabase(getBaseContext(), info, LauncherSettings.Favorites.CONTAINER_DESKTOP);\n\t\t\t\n\t\t\tView view = mWorkspace.createViewByItemInfo(info);\n\t\t\tif (view == null)\n\t\t\t\treturn;\n\t\t\t((Workspace)mWorkspace).addInScreen(view, page, cellX, cellY, 1, 1);\n\t\t\t\n\t\t\t//FIXME 在编辑模式下可能会有刷新的问题\n\t\t}\n ALog.d(\"Exit\");\n\t}",
"public void forceActualServiceDeployment(String serviceName) {\n AxisService service = axisConfig.getServiceForActivation(serviceName);\n if (service == null) {\n // try to find it from the transit ghost map\n try {\n service = GhostDeployerUtils\n .getTransitGhostServicesMap(axisConfig).get(serviceName);\n } catch (AxisFault axisFault) {\n log.error(\"Error while reading Transit Ghosts map\", axisFault);\n }\n }\n if (service != null && GhostDeployerUtils.isGhostService(service)) {\n // if the service is a ghost service, load the actual service\n try {\n GhostDeployerUtils.deployActualService(axisConfig, service);\n } catch (AxisFault axisFault) {\n log.error(\"Error while loading actual service from Ghost\", axisFault);\n }\n }\n }",
"@RequestMapping(method = RequestMethod.GET)\n @ResponseBody\n @Deprecated\n public Deployments listDeployments() throws Exception {\n \tlog.warn(\"Deprecated method called: listDeployments\");\n Deployments deployments = new Deployments();\n deployments.getDeployments().addAll(processService.findAllDeployments());\n return deployments;\n }",
"private void tryInitialize() throws IOException, ParseException, org.apache.commons.cli.ParseException {\n log.log(Level.FINE, MessageNames.STARTER_SERVICE_DEPLOYER_STARTING, myName);\n\n /*\n Establish the deployment directory.\n */\n deploymentDirectoryFile = fileUtility.getProfileDirectory().resolveFile(deployDirectory);\n if (deploymentDirectoryFile == null\n || deploymentDirectoryFile.getType() != FileType.FOLDER) {\n log.log(Level.WARNING, MessageNames.NO_DEPLOYMENT_DIRECTORY,\n new Object[]{deployDirectory, fileUtility.getProfileDirectory()});\n }\n /*\n * Find the name of the client we need to deploy. \n */\n /* First argument was the profile name. Second argument is the name of \n * the client app to run. All the rest are parameters to the client\n * app.\n */\n if (clientAppName == null && commandLineArguments.length < 2) {\n System.out.println(messages.getString(MessageNames.CLIENT_APP_USAGE));\n System.exit(1);\n }\n String[] clientAppArgs = new String[0];\n String additionalApps = Strings.EMPTY;\n if (clientAppName == null) {\n String[] argsWithoutProfile = new String[commandLineArguments.length - 1];\n System.arraycopy(commandLineArguments, 1, argsWithoutProfile, 0,\n argsWithoutProfile.length);\n CommandLine cl = CommandLineParsers.parseCommandLineAppRunnerLine(argsWithoutProfile);\n // At this point, any remaining args after -with are in getArgs()\n // The first of those is the app name.\n clientAppName = cl.getArgs()[0];\n clientAppArgs = new String[cl.getArgs().length - 1];\n System.arraycopy(cl.getArgs(), 1, clientAppArgs, 0, clientAppArgs.length);\n if (cl.hasOption(CommandLineParsers.WITH)) {\n additionalApps = cl.getOptionValue(CommandLineParsers.WITH);\n }\n } else {\n clientAppArgs = new String[commandLineArguments.length - 1];\n System.arraycopy(commandLineArguments, 1, clientAppArgs, 0,\n clientAppArgs.length);\n }\n if (!Strings.EMPTY.equals(additionalApps)) {\n startAdditionalApps(additionalApps);\n }\n\n /*\n See if the clientAppName happens to be a 'jar' name and refers to a \n jar file. If so, that's the service archive.\n */\n FileObject serviceArchive = null;\n if (isAppArchive(clientAppName)) {\n serviceArchive = fileUtility.resolveFile(clientAppName);\n } else {\n serviceArchive = findServiceArchiveForName(clientAppName);\n }\n\n if (serviceArchive == null) {\n System.err.println(MessageFormat.format(messages.getString(MessageNames.NO_SUCH_CLIENT_APP), clientAppName));\n System.exit(1);\n }\n // Deploy the service\n deployServiceArchive(serviceArchive, clientAppArgs);\n // Run the main method with the remaining command line parameters.\n }",
"public void scaleUp(String reason) {\n log.info(\"Scaling up by [Step Up] \" + stepUp + \" instances...\");\n\n // Where to start naming things\n int newNameSuffix = getLatestDeploymentNameSuffix() + 1;\n\n // scale up by (1 x stepUp) at a time\n for (int i = 0; i < stepUp; i++) {\n int deploymentNameSuffix = newNameSuffix + i;\n String deploymentName = Constants.BPG_APP_TYPE_LAUNCHER + \"-\" + deploymentNameSuffix;\n if (createLauncher(deploymentNameSuffix, reason)) {\n // Register the newly spawned launcher as a free one\n addFreeLauncher(deploymentName);\n } else {\n log.error(\"Launcher creation failed for [Object Name] \" + deploymentName);\n }\n\n }\n }",
"private boolean createLauncher(int deploymentNameSuffix, String reason) {\n boolean depCreated = runtimeClient.createDeployment(deploymentNameSuffix, rootDomainName, reason);\n boolean svcCreated = runtimeClient.createService(deploymentNameSuffix, rootDomainName, reason);\n\n return depCreated && svcCreated;\n }",
"public FinishDeploy() {\n addSequential(new AbortAll());\n addSequential(new HatchEject());\n }",
"@Override\n\tpublic void\t\t\tdeploy() throws Exception\n\t{\n\t\tassert\t!this.deploymentDone() ;\n\n\t\t// --------------------------------------------------------------------\n\t\t// Configuration phase\n\t\t// --------------------------------------------------------------------\n\n\t\t// debugging mode configuration; comment and uncomment the line to see\n\t\t// the difference\n//\t\tAbstractCVM.DEBUG_MODE.add(CVMDebugModes.PUBLIHSING) ;\n//\t\tAbstractCVM.DEBUG_MODE.add(CVMDebugModes.CONNECTING) ;\n//\t\tAbstractCVM.DEBUG_MODE.add(CVMDebugModes.COMPONENT_DEPLOYMENT) ;\n\n\t\t// --------------------------------------------------------------------\n\t\t// Creation phase\n\t\t// --------------------------------------------------------------------\n\n\t\t// create the component\n\t\tthis.controllerURI =\n\t\t\tAbstractComponent.createComponent(\n\t\t\t\t\tController.class.getCanonicalName(),\n\t\t\t\t\tnew Object[]{CONTROLLER_URI,\n\t\t\t\t\t\t\tCONTROLLER_OBP_URI, \n\t\t\t\t\t\t\tCONTROLLER_OBP2_URI, \n\t\t\t\t\t\t\tCONTROLLER_OBP3_URI,\n\t\t\t\t\t\t\tCONTROLLER_OBP4_URI,\n\t\t\t\t\t\t\tCONTROLLER_OBP5_URI,\n\t\t\t\t\t\t\tCONTROLLER_OBP6_URI,\n\t\t\t\t\t\t\tCONTROLLER_LAUNCH_URI}) ;\n\t\tassert\tthis.isDeployedComponent(this.controllerURI) ;\n\t\t// make it trace its operations\n\t\tthis.toggleTracing(this.controllerURI) ;\n\t\tthis.toggleLogging(this.controllerURI) ;\n\n\t\tthis.fridgeURI =\n\t\t\tAbstractComponent.createComponent(\n\t\t\t\t\tFridge.class.getCanonicalName(),\n\t\t\t\t\tnew Object[]{FRIDGE_URI,\n\t\t\t\t\t\t\tFRIDGE_IBP_URI,\n\t\t\t\t\t\t\tFRIDGE_EP_URI,\n\t\t\t\t\t\t\tFRIDGE_LAUNCH_URI}) ;\n\t\tassert\tthis.isDeployedComponent(this.fridgeURI) ;\n\t\t// make it trace its operations\n\t\tthis.toggleTracing(this.fridgeURI) ;\n\t\tthis.toggleLogging(this.fridgeURI) ;\n\t\t\n\t\t\n\t\tthis.ovenURI =\n\t\t\t\tAbstractComponent.createComponent(\n\t\t\t\t\t\tOven.class.getCanonicalName(),\n\t\t\t\t\t\tnew Object[]{OVEN_URI,\n\t\t\t\t\t\t\t\tOVEN_IBP_URI,\n\t\t\t\t\t\t\t\tOVEN_EP_URI,\n\t\t\t\t\t\t\t\tOVEN_LAUNCH_URI}) ;\n\t\tassert\tthis.isDeployedComponent(this.ovenURI) ;\n\t\t// make it trace its operations\n\t\tthis.toggleTracing(this.ovenURI) ;\n\t\tthis.toggleLogging(this.ovenURI) ;\n\t\t\n\t\tthis.heaterURI =\n\t\t\t\tAbstractComponent.createComponent(\n\t\t\t\t\t\tHeater.class.getCanonicalName(),\n\t\t\t\t\t\tnew Object[]{HEATER_URI,\n\t\t\t\t\t\t\t\tHEATER_IBP_URI,\n\t\t\t\t\t\t\t\tHEATER_EP_URI,\n\t\t\t\t\t\t\t\tHEATER_LAUNCH_URI}) ;\n\t\t\tassert\tthis.isDeployedComponent(this.heaterURI) ;\n\t\t\t// make it trace its operations\n\t\t\tthis.toggleTracing(this.heaterURI) ;\n\t\t\tthis.toggleLogging(this.heaterURI) ;\n\t\t\n\t\tthis.spURI =\n\t\t\tAbstractComponent.createComponent(\n\t\t\t\t\tSolarPanel.class.getCanonicalName(),\n\t\t\t\t\tnew Object[]{SP_URI,\n\t\t\t\t\t\t\tSP_OBP_URI,\n\t\t\t\t\t\t\tSP_LAUNCH_URI}) ;\n\t\tassert\tthis.isDeployedComponent(this.spURI) ;\n\t\t// make it trace its operations\n\t\tthis.toggleTracing(this.spURI) ;\n\t\tthis.toggleLogging(this.spURI) ;\n\t\t\n\t\tthis.ondulatorURI =\n\t\t\tAbstractComponent.createComponent(\n\t\t\t\t\tOndulator.class.getCanonicalName(),\n\t\t\t\t\tnew Object[]{ONDULATOR_URI,\n\t\t\t\t\t\t\tONDULATOR_OBP_URI,\n\t\t\t\t\t\t\tONDULATOR_IBP_URI,\n\t\t\t\t\t\t\tONDULATOR_LAUNCH_URI}) ;\n\t\tassert\tthis.isDeployedComponent(this.ondulatorURI) ;\n\t\t// make it trace its operations\n\t\tthis.toggleTracing(this.ondulatorURI) ;\n\t\tthis.toggleLogging(this.ondulatorURI) ;\n\t\t\n\t\tthis.batteryURI =\n\t\t\tAbstractComponent.createComponent(\n\t\t\t\t\tBattery.class.getCanonicalName(),\n\t\t\t\t\tnew Object[]{BATTERY_URI,\n\t\t\t\t\t\t\tBATTERY_IBP_URI,\n\t\t\t\t\t\t\tBATTERY_LAUNCH_URI}) ;\n\t\tassert\tthis.isDeployedComponent(this.batteryURI) ;\n\t\t// make it trace its operations\n\t\tthis.toggleTracing(this.batteryURI) ;\n\t\tthis.toggleLogging(this.batteryURI) ;\n\t\t\n\t\tthis.epURI =\n\t\t\t\tAbstractComponent.createComponent(\n\t\t\t\t\t\tElecPanel.class.getCanonicalName(),\n\t\t\t\t\t\tnew Object[]{EP_URI,\n\t\t\t\t\t\t\t\tEP_IBP_URI,\n\t\t\t\t\t\t\t\tEP_LAUNCH_URI}) ;\n\t\t\tassert\tthis.isDeployedComponent(this.epURI) ;\n\t\t\t// make it trace its operations\n\t\t\tthis.toggleTracing(this.epURI) ;\n\t\t\tthis.toggleLogging(this.epURI) ;\n\t\t\t\t\n\t\t// --------------------------------------------------------------------\n\t\t// Connection phase\n\t\t// --------------------------------------------------------------------\n\n\t\t// do the connection\n\t\tthis.doPortConnection(\n\t\t\t\tthis.controllerURI,\n\t\t\t\tCONTROLLER_OBP_URI,\n\t\t\t\tFRIDGE_IBP_URI,\n\t\t\t\tControllerFridgeConnector.class.getCanonicalName()) ;\n\t\t\n\t\tthis.doPortConnection(\n\t\t\t\tthis.controllerURI,\n\t\t\t\tCONTROLLER_OBP6_URI,\n\t\t\t\tOVEN_IBP_URI,\n\t\t\t\tControllerOvenConnector.class.getCanonicalName()) ;\n\t\t\n\t\tthis.doPortConnection(\n\t\t\t\tthis.controllerURI,\n\t\t\t\tCONTROLLER_OBP4_URI,\n\t\t\t\tHEATER_IBP_URI,\n\t\t\t\tControllerHeaterConnector.class.getCanonicalName()) ;\n\t\t\n\t\tthis.doPortConnection(\n\t\t\t\tthis.controllerURI,\n\t\t\t\tCONTROLLER_OBP5_URI,\n\t\t\t\tEP_IBP_URI,\n\t\t\t\tControllerEPConnector.class.getCanonicalName()) ;\n\t\t\n\t\tthis.doPortConnection(\n\t\t\t\tthis.spURI,\n\t\t\t\tSP_OBP_URI,\n\t\t\t\tONDULATOR_IBP_URI,\n\t\t\t\tSPOndulatorConnector.class.getCanonicalName()) ;\n\t\t\n\t\tthis.doPortConnection(\n\t\t\t\tthis.ondulatorURI,\n\t\t\t\tONDULATOR_OBP_URI,\n\t\t\t\tBATTERY_IBP_URI,\n\t\t\t\tOndulatorBatteryConnector.class.getCanonicalName()) ;\n\t\t\n\t\tthis.doPortConnection(\n\t\t\t\tthis.controllerURI,\n\t\t\t\tCONTROLLER_OBP2_URI,\n\t\t\t\tBATTERY_IBP_URI,\n\t\t\t\tControllerBatteryConnector.class.getCanonicalName()) ;\n\t\t\n\t\tthis.doPortConnection(\n\t\t\t\tthis.controllerURI,\n\t\t\t\tCONTROLLER_OBP3_URI,\n\t\t\t\tONDULATOR_IBP_URI,\n\t\t\t\tControllerOndulatorConnector.class.getCanonicalName()) ;\n\t\t\n\t\tthis.doPortConnection(\n\t\t\t\tthis.heaterURI,\n\t\t\t\tHEATER_EP_URI,\n\t\t\t\tEP_IBP_URI,\n\t\t\t\tComponentEPConnector.class.getCanonicalName()) ;\n\t\t\n\t\tthis.doPortConnection(\n\t\t\t\tthis.fridgeURI,\n\t\t\t\tFRIDGE_EP_URI,\n\t\t\t\tEP_IBP_URI,\n\t\t\t\tComponentEPConnector.class.getCanonicalName()) ;\n\t\t\n\t\tthis.doPortConnection(\n\t\t\t\tthis.ovenURI,\n\t\t\t\tOVEN_EP_URI,\n\t\t\t\tEP_IBP_URI,\n\t\t\t\tComponentEPConnector.class.getCanonicalName()) ;\n\t\n\t\t// --------------------------------------------------------------------\n\t\t// Deployment done\n\t\t// --------------------------------------------------------------------\n\n\t\tsuper.deploy();\n\t\tassert\tthis.deploymentDone() ;\n\t}",
"String handleAdditionalDeployments( File dockerFileLocation ) throws IOException, URISyntaxException {\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\t// Run through the list...\n\t\tfor( final String deployUrl : this.deployList ) {\n\n\t\t\t// Local, Maven or remote URL?\n\t\t\t// \"ADD\" supports remotes URLs. So, we must copy other kinds.\n\t\t\tFile fileToCopy = null;\n\t\t\tif( deployUrl.toLowerCase().startsWith( \"file:/\" )) {\n\t\t\t\tfileToCopy = new File( UriUtils.urlToUri( deployUrl ));\n\n\t\t\t} else if( deployUrl.toLowerCase().startsWith( \"mvn:\" )) {\n\t\t\t\tthis.logger.fine( \"Resolving a Maven URL: \" + deployUrl );\n\t\t\t\tfileToCopy = this.mavenResolver.resolve( deployUrl );\n\t\t\t}\n\n\t\t\t// Where to place the file in the image?\n\t\t\t// JAR file? We will generate a feature.xml file, so put it in \"backup\".\n\t\t\t// Otherwise, directly put it in Karaf's deploy directory\n\t\t\tboolean isJar = fileToCopy != null && fileToCopy.getName().toLowerCase().endsWith( \".jar\" );\n\t\t\tisJar |= deployUrl.toLowerCase().endsWith( \".jar\" );\n\n\t\t\tString dir = RBCF_DIR + (isJar ? BACKUP : DEPLOY);\n\n\t\t\t// Add whatever is necessary in the dockerfile\n\t\t\tString name;\n\t\t\tif( fileToCopy != null ) {\n\t\t\t\tthis.logger.fine( \"Copying \" + deployUrl + \"...\" );\n\t\t\t\tUtils.copyStream( fileToCopy, new File( dockerFileLocation, fileToCopy.getName()));\n\t\t\t\tsb.append( \"ADD \" + fileToCopy.getName() + \" \" + dir );\n\t\t\t\tname = fileToCopy.getName();\n\n\t\t\t} else {\n\t\t\t\tsb.append( \"ADD \" + deployUrl + \" \" + dir );\n\t\t\t\tname = getFileNameFromFileUrl( deployUrl );\n\t\t\t}\n\n\t\t\t// What should be added to the generated feature?\n\t\t\t// Well, we keep the JAR files.\n\t\t\tif( isJar ) {\n\t\t\t\tif( fileToCopy != null )\n\t\t\t\t\tthis.bundleUrls.add( \"file://\" + dir + name );\n\t\t\t\telse\n\t\t\t\t\tthis.bundleUrls.add( deployUrl );\n\t\t\t}\n\t\t}\n\n\t\treturn sb.toString();\n\t}",
"@Override\n public void deployAPIRevision(String apiId, String apiRevisionId,\n List<APIRevisionDeployment> apiRevisionDeployments, String organization)\n throws APIManagementException {\n APIIdentifier apiIdentifier = APIUtil.getAPIIdentifierFromUUID(apiId);\n if (organization == null) {\n String tenantDomain = getTenantDomain(apiIdentifier);\n if (tenantDomain != null) {\n organization = tenantDomain;\n }\n }\n if (apiIdentifier == null) {\n throw new APIMgtResourceNotFoundException(\"Couldn't retrieve existing API with API UUID: \"\n + apiId, ExceptionCodes.from(ExceptionCodes.API_NOT_FOUND, apiId));\n }\n APIRevision apiRevision = apiMgtDAO.getRevisionByRevisionUUID(apiRevisionId);\n if (apiRevision == null) {\n throw new APIMgtResourceNotFoundException(\"Couldn't retrieve existing API Revision with Revision UUID: \"\n + apiRevisionId, ExceptionCodes.from(ExceptionCodes.API_REVISION_NOT_FOUND, apiRevisionId));\n }\n List<APIRevisionDeployment> currentApiRevisionDeploymentList =\n apiMgtDAO.getAPIRevisionDeploymentsByApiUUID(apiId);\n APIGatewayManager gatewayManager = APIGatewayManager.getInstance();\n API api = getLightweightAPIByUUID(apiId, organization);\n api.setRevisionedApiId(apiRevision.getRevisionUUID());\n api.setRevisionId(apiRevision.getId());\n api.setUuid(apiId);\n api.getId().setUuid(apiId);\n api.setOrganization(organization);\n Set<String> environmentsToAdd = new HashSet<>();\n Map<String, String> gatewayVhosts = new HashMap<>();\n Set<APIRevisionDeployment> environmentsToRemove = new HashSet<>();\n for (APIRevisionDeployment apiRevisionDeployment : apiRevisionDeployments) {\n for (APIRevisionDeployment currentapiRevisionDeployment : currentApiRevisionDeploymentList) {\n if (StringUtils.equalsIgnoreCase(currentapiRevisionDeployment.getDeployment(),\n apiRevisionDeployment.getDeployment())) {\n environmentsToRemove.add(currentapiRevisionDeployment);\n }\n }\n environmentsToAdd.add(apiRevisionDeployment.getDeployment());\n gatewayVhosts.put(apiRevisionDeployment.getDeployment(), apiRevisionDeployment.getVhost());\n }\n if (environmentsToRemove.size() > 0) {\n apiMgtDAO.removeAPIRevisionDeployment(apiId, environmentsToRemove);\n removeFromGateway(api, environmentsToRemove, environmentsToAdd);\n }\n GatewayArtifactsMgtDAO.getInstance()\n .addAndRemovePublishedGatewayLabels(apiId, apiRevisionId, environmentsToAdd, gatewayVhosts,\n environmentsToRemove);\n apiMgtDAO.addAPIRevisionDeployment(apiRevisionId, apiRevisionDeployments);\n if (environmentsToAdd.size() > 0) {\n // TODO remove this to organization once the microgateway can build gateway based on organization.\n gatewayManager.deployToGateway(api, organization, environmentsToAdd);\n }\n String publishedDefaultVersion = getPublishedDefaultVersion(apiIdentifier);\n String defaultVersion = getDefaultVersion(apiIdentifier);\n apiMgtDAO.updateDefaultAPIPublishedVersion(apiIdentifier);\n if (publishedDefaultVersion != null) {\n if (apiIdentifier.getVersion().equals(defaultVersion)) {\n api.setAsPublishedDefaultVersion(true);\n }\n if (api.isPublishedDefaultVersion() && !apiIdentifier.getVersion().equals(publishedDefaultVersion)) {\n APIIdentifier previousDefaultVersionIdentifier = new APIIdentifier(api.getId().getProviderName(),\n api.getId().getApiName(), publishedDefaultVersion);\n sendUpdateEventToPreviousDefaultVersion(previousDefaultVersionIdentifier, organization);\n }\n }\n }",
"@Override\n\tprotected void addAction(HashSet<String> addSet){\n\t\t((AdaptDependencyManager)MiddleWareConfig.getInstance().getDepManager()).addNewDeploymentNodeBySet(addSet);\n\t}",
"public JSR88Deployer(String uri, String user, String password) {\n this.user = user;\n this.password = password;\n this.uri = uri;\n loadDeploymentFactory();\n loadSystemApps(); //system apps to be filtered\n\n log(\"Connecting using uri = \" + uri + \"; user = \" + user + \"; password = \" + password);\n try {\n dm = DeploymentFactoryManager.getInstance().getDeploymentManager(uri, user, password);\n } catch (Exception ex) {\n ex.printStackTrace();\n System.exit(-1); \n }\n\n Target[] allTargets = dm.getTargets();\n if (allTargets.length == 0) {\n log(\"Can't find deployment targets...\");\n System.exit(-1); \n }\n \n // If test being run on EE, exclude the DAS server instance from the deploy targets\n String targetPlatform = System.getProperty(\"deploymentTarget\");\n List filteredTargets = new ArrayList();\n if( (\"SERVER\".equals(targetPlatform)) || (\"CLUSTER\".equals(targetPlatform)) ) {\n for(int i=0; i<allTargets.length; i++) {\n if(allTargets[i].getName().equals(\"server\")) {\n continue;\n }\n filteredTargets.add(allTargets[i]);\n }\n targets = (Target[])(filteredTargets.toArray(new Target[filteredTargets.size()]));\n } else {\n targets = allTargets;\n }\n\n for(int i=0; i<targets.length; i++) {\n log(\"DBG : Target \" + i + \" -> \" + targets[i].getName());\n }\n }",
"private void addAllDepartments() {\n\t\tfinal BillingPeriod bp = (BillingPeriod) this.getBean().getContainer()\n\t\t\t\t.findBean(\"org.rapidbeans.clubadmin.domain.BillingPeriod\", this.getBillingPeriod().getIdString());\n\t\tfor (RapidBean bean : this.getBean().getContainer()\n\t\t\t\t.findBeansByType(\"org.rapidbeans.clubadmin.domain.Department\")) {\n\t\t\tfinal Department dep = (Department) bean;\n\t\t\tif (bp.getDepartments() == null || !bp.getDepartments().contains(dep)) {\n\t\t\t\tbp.addDepartment(dep);\n\t\t\t}\n\t\t}\n\t}",
"public void addServiceEntriesToDD(String serviceName, String serviceEndpointInterface, String serviceEndpoint);",
"void init(Deployment deployment);",
"void installMarathonApps();",
"public List<Resource> deployResources() throws Exception {\n List<Resource> developmentResources = findResources(m_developmentRepo, \"*\", \"*\");\n List<Resource> deployedResources = new ArrayList<>();\n for (Resource developmentResource : developmentResources) {\n deployedResources.add(deployResource(developmentResource));\n }\n return deployedResources;\n }",
"@SuppressWarnings(\"unused\")\n @Provides\n @Singleton\n private DeploymentType provideDeploymentsType() {\n return deploymentType;\n }",
"@Override\n public String deploy(String applicationName, Environment environment, Component component) {\n return null;\n }",
"public void checkAndInstallPC(){\n psconfig.setAndSaveProperty(LiferayConstants.SETUP_DONE,\"true\");\n \n \n \n // logger.info(\"Trying to install PC............\");\n /* ProgressHandle handle = ProgressHandleFactory.createHandle(org.openide.util.NbBundle.getMessage(SunASStartStopListener.class, \"INSTALLING_PORTLET_CONTAINER\"));\n handle.start();\n try{\n \n \n String pcHome = psconfig.getPSHome();\n String serverHome = psconfig.getServerHome();\n \n // String pcBase = getPCBaseDir(psconfig);\n pcHome = changeToOSSpecificPath(pcHome);\n serverHome = changeToOSSpecificPath(serverHome);\n // pcBase = changeToOSSpecificPath(pcBase);\n String domainDir = psconfig.getDomainDir();\n domainDir = changeToOSSpecificPath(domainDir);\n \n \n \n \n Properties props = new Properties();\n props.setProperty(\"portlet_container_home\",pcHome);\n // props.setProperty(\"portlet_container_base\",pcBase);\n props.setProperty(\"GLASSFISH_HOME\",serverHome);\n props.setProperty(\"DOMAIN\",psconfig.getDefaultDomain());\n props.setProperty(\"AS_ADMIN_USER\",psconfig.getProperty(SunAppServerConstants.SERVER_USER));\n props.setProperty(\"AS_ADMIN_PASSWORD\",psconfig.getProperty(SunAppServerConstants.SERVER_PASSWORD));\n \n //find setup.xml\n \n File file = new File(pcHome + File.separator + \"setup.xml\");\n if(!file.exists()) {\n logger.log(Level.SEVERE,org.openide.util.NbBundle.getMessage(SunASStartStopListener.class, \"SETUP_XML_NOT_FOUND\"));\n return;\n }\n \n FileObject setUpXmlObj = FileUtil.toFileObject(file);\n \n ExecutorTask executorTask = ActionUtils.runTarget(setUpXmlObj,new String[]{\"deploy_on_glassfish\"},props);\n psconfig.setAndSaveProperty(LifeRayConstants.SETUP_DONE,\"true\");\n executorTask.waitFinished();\n \n try{\n handle.finish();\n handle = ProgressHandleFactory.createHandle(org.openide.util.NbBundle.getMessage(SunASStartStopListener.class, \"STARTING_APPSERVER\"));\n handle.start();\n }catch(Exception e){\n \n }*/\n \n //logger.info(\"Starting Glassfish Server.....\");\n /// dm.getStartServerHandler().startServer();\n \n /* }catch(Exception e){\n logger.log(Level.SEVERE,org.openide.util.NbBundle.getMessage(SunASStartStopListener.class, \"ERROR_INSTALLING_PC\"),e);\n }finally{\n handle.finish();\n }*/\n \n }",
"public void activate() {\n\n serviceTracker = new ServiceTracker<>(bundleContext, BlueprintContainer.class,\n new CustomBlueprintContainerServiceTrackerCustomizer());\n serviceTracker.open();\n\n CustomBlueprintListener blueprintListener = new CustomBlueprintListener();\n listenerSR = bundleContext.registerService(BlueprintListener.class, blueprintListener,\n new Hashtable<String, Object>());\n }",
"public Deployer register(Handler[] handlers) {\n\t\treturn null;\n\t}",
"public void activate(String deploymentId) {\n\t\t\n\t}",
"public static void main(String[] argv) throws Exception\n {\n // Create a temporary bundle cache directory and\n // make sure to clean it up on exit.\n final File cachedir = File.createTempFile(\"felix.example.servicebased\", null);\n cachedir.delete();\n Runtime.getRuntime().addShutdownHook(new Thread() {\n public void run()\n {\n deleteFileOrDir(cachedir);\n }\n });\n \n Map configMap = new StringMap(false);\n configMap.put(Constants.FRAMEWORK_SYSTEMPACKAGES,\n \"org.osgi.framework; version=1.3.0,\" +\n \"org.osgi.service.packageadmin; version=1.2.0,\" +\n \"org.osgi.service.startlevel; version=1.0.0,\" +\n \"org.osgi.service.url; version=1.0.0,\" +\n \"org.osgi.util.tracker; version=1.3.2,\" +\n \"org.apache.felix.example.servicebased.host.service; version=1.0.0,\" +\n \"javax.swing\");\n configMap.put(FelixConstants.AUTO_START_PROP + \".1\",\n \"file:../servicebased.circle/target/servicebased.circle-1.0.0.jar \" +\n \"file:../servicebased.square/target/servicebased.square-1.0.0.jar \" +\n \"file:../servicebased.triangle/target/servicebased.triangle-1.0.0.jar\");\n configMap.put(FelixConstants.LOG_LEVEL_PROP, \"1\");\n configMap.put(BundleCache.CACHE_PROFILE_DIR_PROP, cachedir.getAbsolutePath());\n \n List list = new ArrayList();\n list.add(new Activator());\n \n try\n {\n // Now create an instance of the framework.\n Felix felix = new Felix(configMap, list);\n felix.start();\n }\n catch (Exception ex)\n {\n System.err.println(\"Could not create framework: \" + ex);\n ex.printStackTrace();\n System.exit(-1);\n }\n }",
"void deployApp(String marathonJson);",
"public void addServiceManager(BamServiceManager serviceManager)\n {\n BamServiceManager []serviceManagerList\n = new BamServiceManager[_serviceManagerList.length + 1];\n \n System.arraycopy(_serviceManagerList, 0, serviceManagerList, 0,\n \t\t _serviceManagerList.length);\n serviceManagerList[serviceManagerList.length - 1] = serviceManager;\n _serviceManagerList = serviceManagerList;\n }",
"public void initProviders(@Observes AfterDeploymentValidation afterValid, final BeanManager manager,\n final CronQueueInstaller cronQueueInstaller, final CronSchedulingInstaller cronSchedInstaller) {\n log.debug(\"Initializing service providers\");\n // process queue observers if queue provider exists\n final CronQueueProvider queueProvider = CdiUtils.getInstanceByType(manager, CronQueueProvider.class);\n if (queueProvider != null) {\n this.queueProvider = queueProvider;\n handleLifecycleInit(queueProvider);\n cronQueueInstaller.initProviderQueue(manager, queueProvider, allObservers);\n }\n // process scheduling observers if scheduling provider exists\n final CronSchedulingProvider schedProvider = CdiUtils.getInstanceByType(manager, CronSchedulingProvider.class);\n if (schedProvider != null) {\n this.schedulingProvider = schedProvider;\n handleLifecycleInit(schedProvider);\n cronSchedInstaller.initProviderScheduling(manager, schedProvider, allObservers);\n }\n // process aynchronous observers if aynchronous provider exists\n final CronAsynchronousProvider asyncProvider = CdiUtils.getInstanceByType(manager, CronAsynchronousProvider.class);\n if (asyncProvider != null) {\n this.asynchronousProvider = asyncProvider;\n handleLifecycleInit(asyncProvider);\n }\n\n// TODO: (PR): If there's an asynch provider present, check if the interceptor is enabled. See https://jira.jboss.org/jira/browse/WELDX-91\n// final CronAsynchronousProvider asyncProvider = CdiUtils.getInstanceByType(manager, CronAsynchronousProvider.class);\n// if (asyncProvider != null) {\n// assert interceptors.isInterceptorEnabled(AsynchronousInterceptor.class);\n// } \n\n }",
"public List<String> getFreeLaunchers() {\n return persistence.getFreeLauncherUrls();\n }",
"public List<String> getDeployments() {\n return runtimeClient.getDeployments();\n }",
"public static void addNewServices() {\n displayAddNewServicesMenu();\n processAddnewServicesMenu();\n }",
"public void fill(ArrayList<Package> warehousePackages) {\n\n int range = 0;\n int counter = 0;\n boolean isTrue = true;\n int size = warehousePackages.size();\n int[] change = new int[size];\n for (int i = 0; i < size; i++) {\n change[i] = Math.abs(warehousePackages.get(i).getDestination().getZipCode() - getZipDest());\n }\n Arrays.sort(change);\n while (isTrue) {\n for (int i = 0; i < warehousePackages.size(); i++) {\n if (range > 99999){\n isTrue = false;\n break;\n } else if (isFull() || size == counter) {\n isTrue = false;\n break;\n } else {\n int difference = Math.abs(warehousePackages.get(i).getDestination().getZipCode() - getZipDest());\n if (Math.abs(difference) <= range) {\n if (!getPackages().contains(warehousePackages.get(i))) {\n counter++;\n if (addPackage(warehousePackages.get(i))) {\n System.out.println(warehousePackages.get(i).getID() + \" has been added.\");\n maxRange = difference;\n } else {\n isTrue = false;\n break;\n }\n }\n }\n }\n\n }\n range += 10;\n\n }\n for (Package p : getPackages()) {\n Warehouse.pkgs.remove(p);\n }\n }",
"public void setRegisterBlueprints(Collection blueprints) throws RegisterBlueprintException {\n for (Object blueprint : blueprints) {\n if (blueprint instanceof Class) {\n registerBlueprint((Class) blueprint);\n } else if (blueprint instanceof String) {\n registerBlueprint((String) blueprint);\n } else if (blueprint instanceof String) {\n registerBlueprint(blueprint);\n } else {\n throw new RegisterBlueprintException(\"Only supports List comprised of Class<Blueprint>, Blueprint, or String className\");\n }\n }\n }",
"@Test\n public void testAccessControlIsOnlyCheckedWhenNoProdDeploymentExists() {\n List<Host> hosts = createHosts(18, \"6.0.0\");\n\n List<ModelFactory> modelFactories = List.of(createHostedModelFactory(Version.fromString(\"6.0.0\")),\n createHostedModelFactory(Version.fromString(\"6.1.0\")),\n createHostedModelFactory(Version.fromString(\"6.2.0\")));\n\n DeployTester tester = createTester(hosts, modelFactories, prodZone, Clock.systemUTC());\n ApplicationId applicationId = tester.applicationId();\n // Deploy with oldest version\n tester.deployApp(\"src/test/apps/hosted/\", \"6.0.0\");\n assertEquals(9, tester.getAllocatedHostsOf(applicationId).getHosts().size());\n\n // Deploy with version that does not exist on hosts and with app package that has no write access control,\n // validation of access control should not be done, since the app is already deployed in prod\n tester.deployApp(\"src/test/apps/hosted-no-write-access-control\", \"6.1.0\");\n assertEquals(9, tester.getAllocatedHostsOf(applicationId).getHosts().size());\n }",
"public void registerSalvageables(List<Salvageable> salvageables);",
"@Override\n\tpublic void applyObject(AppDeploymentRequest request, String appId) {\n\t\tif (client.builds().withLabels(labels).list().getItems().stream()\n\t\t\t\t.noneMatch(build -> {\n\t\t\t\t\tString phase = build.getStatus().getPhase();\n\t\t\t\t\treturn phase.equals(\"New\") || phase.equals(\"Pending\")\n\t\t\t\t\t\t\t|| phase.equals(\"Running\") || phase.equals(\"Failed\");\n\t\t\t\t})) {\n\t\t\t//@formatter:off\n client.deploymentConfigs()\n .withName(appId)\n .edit()\n .editMetadata()\n .addToAnnotations(SPRING_DEPLOYMENT_TIMESTAMP,\n\t\t\t\t\t\t\t\tString.valueOf(System.currentTimeMillis()))\n .endMetadata()\n .done();\n //@formatter:on\n\t\t}\n\t}",
"@Override\r\n\tpublic Collection<WorkerSlot> allSlotsAvailableForScheduling(\r\n\t\t\tCollection<SupervisorDetails> existingSupervisors,\r\n\t\t\tTopologies topologies, Set<String> topologiesMissingAssignments) {\n\t\tCollection<WorkerSlot> result = new HashSet<WorkerSlot>();\r\n\t\tfor (SupervisorDetails detail : existingSupervisors) {\r\n\t\t\tfor (Integer port : detail.getAllPorts())\r\n\t\t\t\tresult.add(new WorkerSlot(detail.getId(), port));\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"@XmlTransient\n public List<ProfileDeploymentMetaData> getDeployments()\n {\n return Collections.emptyList();\n }",
"@Deployment\n public static WebArchive createDeployment() {\n File[] libs = Maven.resolver()\n .offline(false)\n .loadPomFromFile(\"pom.xml\")\n .importRuntimeAndTestDependencies().resolve().withTransitivity().asFile();\n\n return ShrinkWrap\n .create(WebArchive.class, \"fulltext-tasklist.war\")\n // add needed dependencies\n .addAsLibraries(libs)\n // prepare as process application archive for camunda BPM Platform\n .addAsResource(\"META-INF/processes.xml\", \"META-INF/processes.xml\")\n // enable CDI\n .addAsWebInfResource(EmptyAsset.INSTANCE, \"beans.xml\")\n // boot JPA persistence unit\n .addAsResource(\"META-INF/persistence.xml\", \"META-INF/persistence.xml\")\n // add your own classes (could be done one by one as well)\n .addPackages(false, \"com.camunda.consulting.tasklist.fulltext\") // not recursive to skip package 'nonarquillian'\n .addPackages(false, \"com.camunda.consulting.tasklist.fulltext.entity\")\n .addPackages(false, \"com.camunda.consulting.tasklist.fulltext.resource\")\n // add process definition\n .addAsResource(\"process.bpmn\")\n .addAsResource(\"incidentProcess.bpmn\")\n // add process image for visualizations\n .addAsResource(\"process.png\")\n .addAsResource(\"incidentProcess.png\")\n // now you can add additional stuff required for your test case\n ;\n }",
"@Test\n public void testCreateNeededModelVersionsForManuallyDeployedApps() {\n List<Host> hosts = createHosts(7, \"7.0.0\");\n\n CountingModelFactory factory700 = createHostedModelFactory(Version.fromString(\"7.0.0\"), devZone);\n CountingModelFactory factory710 = createHostedModelFactory(Version.fromString(\"7.1.0\"), devZone);\n CountingModelFactory factory720 = createHostedModelFactory(Version.fromString(\"7.2.0\"), devZone);\n List<ModelFactory> modelFactories = List.of(factory700, factory710, factory720);\n\n DeployTester tester = createTester(hosts, modelFactories, devZone);\n // Deploy with version that does not exist on hosts, the model for this version should also be created\n tester.deployApp(\"src/test/apps/hosted/\", \"7.2.0\");\n assertEquals(7, tester.getAllocatedHostsOf(tester.applicationId()).getHosts().size());\n\n // Check >0 not ==0 as the session watcher thread is running and will redeploy models in the background\n // Nodes are on 7.0.0 (should be created), no nodes on 7.1.0 (should not be created), 7.2.0 should always be created\n assertTrue(factory700.creationCount() > 0);\n assertFalse(factory710.creationCount() > 0);\n assertTrue(\"Newest model for latest major version is always included\", factory720.creationCount() > 0);\n }",
"public void addBuildables(){\n this.allBuildables.add(new Nexus());\n this.allBuildables.add(new Pylon());\n this.allBuildables.add(new Assimilator());\n this.allBuildables.add(new Gateway());\n this.allBuildables.add(new CyberneticsCore());\n this.allBuildables.add(new RoboticsFacility());\n this.allBuildables.add(new Stargate());\n this.allBuildables.add(new TwilightCouncil());\n this.allBuildables.add(new TemplarArchives());\n this.allBuildables.add(new DarkShrine());\n this.allBuildables.add(new RoboticsBay());\n this.allBuildables.add(new FleetBeacon());\n this.allBuildables.add(new Probe());\n this.allBuildables.add(new Zealot());\n this.allBuildables.add(new Stalker());\n this.allBuildables.add(new Sentry());\n this.allBuildables.add(new Observer());\n this.allBuildables.add(new Immortal());\n this.allBuildables.add(new Phoenix());\n this.allBuildables.add(new VoidRay());\n this.allBuildables.add(new Colossus());\n this.allBuildables.add(new HighTemplar());\n this.allBuildables.add(new DarkTemplar());\n this.allBuildables.add(new Carrier());\n }",
"public void deploy(DeploymentFileData deploymentFileData) throws DeploymentException {\n\n String path = deploymentFileData.getAbsolutePath();\n\n if (!deployedTransportAdaptorFilePaths.contains(path)) {\n try {\n processDeploy(deploymentFileData, path);\n } catch (InputTransportAdaptorManagerConfigurationException e) {\n throw new DeploymentException(\"Input Transport Adaptor not deployed and in inactive state : \" + new File(path).getName(), e);\n }\n } else {\n deployedTransportAdaptorFilePaths.remove(path);\n }\n }",
"private DeploymentFactoryInstaller() {\n }",
"public void updateServiceNameList(){\n for(String key: serviceList.keySet()){\n serviceNameList.put(key, serviceList.get(key).getServiceName());\n }\n }",
"CdapDeployAppStep createCdapDeployAppStep();",
"public void startPlugin() {\n classesDisponibles = new HashMap[types.length];\n try { // enregistrer le service d'acces aux depot de jars\n ServicesRegisterManager.registerService(Parameters.JAR_REPOSITORY_MANAGER, this);\n rescanRepository(); // creer les listes de classes disponibles a partir du depot\n }\n catch (ServiceInUseException mbiue) {\n System.err.println(\"Jar Repository Manager service created twice\");\n }\n }",
"@Override\n\tpublic Service upstreamReserveDeliverServiceInit(List<String> configList) {\n\t\treturn null;\n\t}",
"public static void addToDeployment(WebArchive deployment) {\n\t\tdeployment.addPackages(true, \"edu.hm.cs.fwp.jeedemo.jpa.common.persistence\") //\n\t\t\t\t.addClass(GenericRepository.class) //\n\t\t\t\t.addClass(ComponentTestAuthenticationFilter.class) //\n\t\t\t\t.addAsResource(\"arquillian-persistence.xml\", \"META-INF/persistence.xml\") //\n\t\t\t\t.addAsWebInfResource(\"arquillian-web.xml\", \"web.xml\") //\n\t\t\t\t.addAsWebInfResource(\"arquillian-beans.xml\", \"beans.xml\");\n\t}",
"public interface InstanceDeployCenter {\r\n\r\n /**\r\n * 启动已经存在的实例\r\n * @param appId\r\n * @param instanceId\r\n * @return\r\n */\r\n boolean startExistInstance(long appId, int instanceId);\r\n\r\n /**\r\n * 启动已存在的实例,无需进行redis资源包校验\r\n * @param appId\r\n * @param instanceId\r\n * @return\r\n */\r\n boolean startExistInstanceWithoutResourceCheck(long appId, int instanceId);\r\n\r\n /**\r\n * 下线已经存在的实例\r\n * @param appId\r\n * @param instanceId\r\n * @return\r\n */\r\n boolean shutdownExistInstance(long appId, int instanceId);\r\n\r\n /**\r\n * cluster forget\r\n * @param appId\r\n * @param instanceId\r\n * @return\r\n */\r\n boolean forgetInstance(long appId, int instanceId);\r\n\r\n /**\r\n * 清理(cluster forget)集群内所有fail节点\r\n * @param appId\r\n * @param instanceId\r\n * @return\r\n */\r\n boolean clearFailInstances(long appId);\r\n \r\n /**\r\n * 展示实例最近的日志\r\n * @param instanceId\r\n * @param maxLineNum\r\n * @return\r\n */\r\n String showInstanceRecentLog(int instanceId, int maxLineNum);\r\n\r\n /**\r\n * 修改实例配置\r\n * @param appId\r\n * @param appAuditId\r\n * @param host\r\n * @param port\r\n * @param instanceConfigKey\r\n * @param instanceConfigValue\r\n * @return\r\n */\r\n boolean modifyInstanceConfig(long appId, Long appAuditId, String host, int port, String instanceConfigKey,\r\n String instanceConfigValue);\r\n\r\n /**\r\n * 检测pod是否有被调度其他宿主机\r\n * @param ip\r\n */\r\n MachineSyncEnum podChangeStatus(String ip);\r\n\r\n /**\r\n * 检测pod是否有心跳停止实例&启动\r\n * @return\r\n */\r\n List<InstanceAlertValueResult> checkAndStartExceptionInstance(String ip, Boolean isAlert);\r\n\r\n\r\n}",
"public interface Deployer extends UpdatableDomainObject<Long> {\r\n\r\n /**\r\n * Retrieves the name of the deployer.\r\n * \r\n * @return Returns the name of the deployer.\r\n */\r\n String getName();\r\n\r\n /**\r\n * Retrieves the parameters that are part of this deployer.\r\n * \r\n * @return Returns a {@link List} of parameters or an empty one if no\r\n * parameters are needed.\r\n */\r\n List<DeployerParameterTemplate> getParameters();\r\n\r\n /**\r\n * Sets the parameters for this deployer.\r\n * \r\n * @param parameters\r\n * The parameters that should be set.\r\n */\r\n void setParameters(List<DeployerParameterTemplate> parameters);\r\n\r\n}",
"public interface HotReplacementSetup {\n\n void setupHotDeployment(HotReplacementContext context);\n\n}",
"private DeployApplicationOnSiteCommandArgs buildDeployAppOnSiteArgs(\n ApplicationTemplate appTemplate,\n DeployAppCommandArgs.AppTemplateDeploymentPlanDTO deploymentPlan,\n RestoreAppInfo restoreAppInfo,\n String appInstanceName,\n Site targetSite,\n String route, Collection<AppPolicy> applyPolicies,\n UUID appInstanceId) {\n final Map<String, DeployApplicationOnSiteCommandArgs\n .DeployAppServiceOnSiteManifestDTO\n .DeployDataServiceRestoreInfoDTO> restoreDataInfoByDSName =\n getTargetCopyRestoreInfo(deploymentPlan, restoreAppInfo, targetSite);\n\n // Building app service deployment plan according to app template, filtering app services that are not enabled\n Map<String, DeployApplicationOnSiteCommandArgs.DeployAppServiceOnSiteManifestDTO> appServiceTemplates =\n new HashMap<>();\n\n Map<String, Map<String, String>> templateEnforcedDsbSettings = new HashMap<>();\n\n for (ApplicationServiceTemplate currAST : appTemplate.getAppServiceTemplates()) {\n final DeployAppCommandArgs.AppServiceDeploymentPlanDTO appServiceDeploymentPlan =\n deploymentPlan.getAppServices().get(currAST.getAppServiceName());\n\n // Validating that each application service in the template have a corresponding application service plan\n if (appServiceDeploymentPlan == null) {\n throw new IllegalStateException(\"no deployment plan found for app service \"\n + currAST.getAppServiceName() + \" as part of application template deployment \"\n + appTemplate.getName());\n }\n\n // Including only services which were chosen to be enabled in this deployment\n if (appServiceDeploymentPlan.isEnabled()) {\n appServiceTemplates.put(\n currAST.getAppServiceName(),\n new DeployApplicationOnSiteCommandArgs.DeployAppServiceOnSiteManifestDTO(\n currAST.getAppServiceName(),\n currAST.getPsbType(),\n appServiceDeploymentPlan.getSpace(),\n appServiceDeploymentPlan.getArtifactRegistryName(),\n currAST.getImageName(),\n currAST.getImageType(),\n appServiceDeploymentPlan.getImageVersion(),\n currAST.getPsbSettings(),\n currAST.getEnvironmentVariables(),\n route,\n new HashSet<>(currAST.getExposedPorts()),\n currAST.getHttpPort(),\n currAST.getDependencies()\n .stream()\n .map(AppServiceExternalDependency::getName)\n .collect(Collectors.toSet())));\n }\n\n // Validating app dependencies\n for (AppServiceExternalDependency currDep : currAST.getDependencies()) {\n\n final DeployAppCommandArgs.DataServiceDeploymentPlanDTO dataServicePlan =\n deploymentPlan.getDataServices().get(currDep.getName());\n\n // Validating that each dependency has a deployment plan for its data service\n if (dataServicePlan == null) {\n throw new IllegalStateException(\n \"deployment plan didn't include data service plan for dependency \" + currDep.getName() +\n \" of service \" + currAST.getAppServiceName() + \" in template \" +\n appTemplate.getName() + \" when trying to deploy app \" + appInstanceName);\n }\n\n // Validating that there is a match between the supported dependency protocol and the dsb plan\n // provisioned\n final AppServiceExternalDependencyProtocol appServiceExternalDependencyProtocol = currDep.getProtocols()\n .stream()\n .filter(protocol -> protocol.getProtocol().equals(dataServicePlan.getProtocol()))\n .findFirst()\n .orElseThrow(() -> new IllegalStateException(\n \"deployment for dependency \" + currDep.getName() + \" of service \" +\n currAST.getAppServiceName() + \" in template \" + appTemplate.getName() +\n \" has been configured with protocol \" + dataServicePlan.getProtocol() +\n \" although not supported by the dependency definition - when trying to \" +\n \"deploy app \" + appInstanceName)\n );\n\n // If all is validating, checking whether there are dependency level settings needs to be set for the\n // dsb defined by the app template\n if (appServiceExternalDependencyProtocol.getSettings() != null &&\n !appServiceExternalDependencyProtocol.getSettings().isEmpty()) {\n templateEnforcedDsbSettings.computeIfAbsent(currDep.getName(), s -> new HashMap<>())\n .putAll(appServiceExternalDependencyProtocol.getSettings());\n }\n }\n }\n\n // Converting app policies\n List<DeployApplicationOnSiteCommandArgs.DeployAppPolicyInfoDTO> appPolicies = applyPolicies\n .stream()\n .map(appPolicy ->\n new DeployApplicationOnSiteCommandArgs.DeployAppPolicyInfoDTO(\n appPolicy.getPolicyType(),\n appPolicy.getPolicyName(),\n appPolicy.getPolicySettings()))\n .collect(Collectors.toList());\n\n // Building data services deployment plan\n final Map<String, DeployApplicationOnSiteCommandArgs.DeployDataServiceOnSiteManifestDTO> dataServices =\n deploymentPlan.getDataServices()\n .entrySet()\n .stream()\n\n // Deploying only data services that were selected to be enabled\n .filter(e -> e.getValue().isEnabled())\n\n .collect(Collectors.toMap(\n Map.Entry::getKey,\n o -> AppInstanceManagerService.generateDataServiceDeploymentDTO(\n restoreAppInfo,\n o.getKey(),\n o.getValue(),\n restoreAppInfo == null ?\n null :\n restoreDataInfoByDSName.get(o.getKey()),\n templateEnforcedDsbSettings.get(o.getKey()))\n ));\n\n return new DeployApplicationOnSiteCommandArgs(\n appInstanceId,\n appInstanceName,\n appTemplate.getName(),\n appTemplate.getVersion(),\n appTemplate.getEntryPointServiceName(),\n appServiceTemplates,\n dataServices,\n appPolicies);\n }",
"public JBDeployer(String serverUri, JBDeploymentManager dm) {\n uri = serverUri;\n this.dm = dm;\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 }",
"public void addDefaultWorkouts() {\n DatabaseHelper databaseHelper = new DatabaseHelper(context);\n for (int i = 0; i < builtIns.length; i++) {\n if (builtIns[i].getDurations().length == builtIns[i].getDurations().length) {\n if (databaseHelper.insertWorkout(builtIns[i].getName())) {\n databaseHelper.fillWorkout(builtIns[i].getName(),\n builtIns[i].getActivities(),\n builtIns[i].getDurations());\n }\n }\n }\n }",
"void setParameters(List<DeployerParameterTemplate> parameters);",
"private boolean deleteLauncher(String deploymentName) {\n unregisterLauncherIfExistsByObjectName(deploymentName);\n\n boolean svcDeleted = runtimeClient.deleteService(deploymentName);\n boolean depDeleted = runtimeClient.deleteDeployment(deploymentName);\n\n return svcDeleted && depDeleted;\n }",
"private DeploymentFactory initFactory() {\n return new SunDeploymentFactory();\n }",
"public boolean isDeployed(String deploymentUnitId) {\n\t\treturn false;\n\t}",
"private void readEntityDeploymentInitial() {\n for (Class<?> entityClass : bootupClasses.getEntities()) {\n DeployBeanInfo<?> info = createDeployBeanInfo(entityClass);\n deployInfoMap.put(entityClass, info);\n Class<?> embeddedIdType = info.getEmbeddedIdType();\n if (embeddedIdType != null) {\n embeddedIdTypes.add(embeddedIdType);\n }\n }\n for (Class<?> entityClass : bootupClasses.getEmbeddables()) {\n DeployBeanInfo<?> info = createDeployBeanInfo(entityClass);\n deployInfoMap.put(entityClass, info);\n if (embeddedIdTypes.contains(entityClass)) {\n // register embeddedId types early - scalar properties only\n // and needed for creating BeanTables (id properties)\n registerEmbeddedBean(info);\n } else {\n // delay register of other embedded beans until after\n // the BeanTables have been created to support ManyToOne\n embeddedBeans.add(info);\n }\n }\n }",
"void deploy(Map<?, ?> properties, Set<File> modules) throws EJBException {\n File app = null;\n try {\n app = getOrCreateApplication(modules);\n \n if (_logger.isLoggable(Level.FINE)) {\n _logger.fine(\"[EJBContainerImpl] Deploying app: \" + app);\n }\n DeployCommandParameters dp = new DeployCommandParameters();\n dp.path = app;\n\n if (properties != null) {\n dp.name = (String)properties.get(EJBContainer.APP_NAME);\n }\n\n deployedAppName = deployer.deploy(app, dp);\n cleanup = new Cleanup(this);\n } catch (IOException e) {\n throw new EJBException(\"Failed to deploy EJB modules\", e);\n }\n\n if (deployedAppName == null) {\n throw new EJBException(\"Failed to deploy EJB modules - see log for details\");\n }\n }",
"private void fillPluginList() {\n\t\tlesSitesPlugin = new ArrayList<HashMap<String, String>>();\n\t\tcategories = new ArrayList<String>();\n\t\tPackageManager packageManager = getPackageManager();\n\t\tIntent baseIntent = new Intent(ACTION_PICK_PLUGIN);\n\t\tbaseIntent.setFlags(Intent.FLAG_DEBUG_LOG_RESOLUTION);\n\t\tList<ResolveInfo> list = packageManager.queryIntentServices(baseIntent, PackageManager.GET_RESOLVED_FILTER);\n\t\tfor (int i = 0; i < list.size(); ++i) {\n\t\t\tResolveInfo info = list.get(i);\n\t\t\tServiceInfo sinfo = info.serviceInfo;\n\t\t\t IntentFilter filter = info.filter;\n\t\t\tNotification.log(tag, \"taille de la liste de Plugin: \" + i + 1 + \"; sinfo: \" + sinfo);\n\t\t\tif (sinfo != null) {\n\t\t\t\t HashMap<String, String> item = new HashMap<String, String>();\n\t\t\t\t item.put(KEY_PKG, sinfo.packageName); // nom du package\n//\t\t\t\t item.put(KEY_SERVICENAME, StringLt.lastSegment(sinfo.name, '.')); // nom du plugin\n\t\t\t\t item.put(KEY_SERVICENAME, sinfo.name);\n\t\t\t\t String firstCategory = null;\n\t\t\t\t if (filter != null) {\n\t\t\t\t StringBuilder actions = new StringBuilder();\n\t\t\t\t for (Iterator<String> actionIterator = filter.actionsIterator(); actionIterator.hasNext();) {\n\t\t\t\t String action = actionIterator.next();\n\t\t\t\t if (actions.length() > 0)\n\t\t\t\t actions.append(\",\");\n\t\t\t\t actions.append(action);\n\t\t\t\t }\n\t\t\t\t StringBuilder categories = new StringBuilder();\n\t\t\t\t for (Iterator<String> categoryIterator = filter.categoriesIterator(); categoryIterator.hasNext();) {\n\t\t\t\t String category = categoryIterator.next();\n\t\t\t\t if (firstCategory == null)\n\t\t\t\t firstCategory = category;\n\t\t\t\t if (categories.length() > 0)\n\t\t\t\t categories.append(\",\");\n\t\t\t\t categories.append(category);\n\t\t\t\t }\n\t\t\t\t// item.put(KEY_ACTIONS, new\n\t\t\t\t// String(StringLt.lastSegment(actions.toString(), '.')));\n\t\t\t\t// item.put(KEY_CATEGORIES, new\n\t\t\t\t// String(StringLt.lastSegment(categories.toString(),\n\t\t\t\t// '.')));\n\t\t\t\t item.put(KEY_ACTIONS, new String(actions));\n\t\t\t\t item.put(KEY_CATEGORIES, new String(categories));\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t item.put(KEY_ACTIONS, \"<null>\");\n\t\t\t\t item.put(KEY_CATEGORIES, \"<null>\");\n\t\t\t\t }\n\t\t\t\t if (firstCategory == null)\n\t\t\t\t firstCategory = \"\";\n\t\t\t\t categories.add(firstCategory);\n\t\t\t\t lesSitesPlugin.add(item);\n\t\t\t\t// lesSitesPlugin.add(StringLt.lastSegment(sinfo.name, '.'));\n\t\t\t\tlesSites.add(StringLt.lastSegment(sinfo.name, '.'));\n\t\t\t}\n\t\t}\n\t}",
"public void installAllAddons(String installDir, String instanceRoot){\n \n String addonJar = \"\";\n //Properties registry = new Properties();\n Registry registry = null;\n FileInputStream in = null;\n FileOutputStream out = null;\n try {\n String addonDir = installDir + File.separator + AddonConstants.LIB + File.separator + AddonConstants.ADDONS;\n String domainConfigRoot = instanceRoot + File.separator + AddonConstants.CONFIG;\n //Logger.getAnonymousLogger().log(Level.FINE, \"domainConfigRoot===\"+domainConfigRoot);\n String domainRegistry = domainConfigRoot + File.separator + AddonConstants.DOMAIN_REGISTRY;\n File registryFile = new File(domainRegistry);\n registry = new Registry();\n registry.load(registryFile);\n File libAddonDirectory = new File(addonDir);\n File[] fileArray = libAddonDirectory.listFiles();\n \n for(int i = 0;i<fileArray.length;i++) {\n addonJar = fileArray[i].getName();\n String jarExtension = \"\";\n int dotLastIndex = addonJar.lastIndexOf(\".\");\n String jarNameWithoutExtension = addonJar;\n if(dotLastIndex != -1) {\n jarExtension = addonJar.substring(dotLastIndex + 1);\n jarNameWithoutExtension = addonJar.substring(0, dotLastIndex);\n }\n if(jarExtension.equalsIgnoreCase(\"jar\")) {\n //Logger.getAnonymousLogger().log(Level.INFO, \"fileArray[i].getName()=\"+fileArray[i].getName());\n //String key = domainName + \".\" + fileArray[i].getName() + \".\" + \"installed\";\n String key = jarNameWithoutExtension + \".\" + \"enabled\";\n String installed = registry.getProperty(key);\n if(installed != null && installed.equals(\"true\")) {\n Logger.getAnonymousLogger().log(Level.FINE, \"Addon \"+addonJar+\" is already installed\");\n continue;\n }\n Addon addon = new Addon(fileArray[i]);\n boolean install = addon.install(installDir,instanceRoot);\n if(install)\n registry.setProperty(key, \"true\");\n \n }\n }\n registry.store();\n \n }catch(Exception ex) {\n Logger.getAnonymousLogger().log(Level.WARNING, \"Error while installing the addon \"+addonJar, ex);\n }finally {\n try {\n if(registry != null)\n registry.close();\n }catch(Exception e) {\n \n }\n }\n \n }",
"public Collection<Service> createServices();",
"public void testTargetAwareDeployment() {\n final java.io.File appArchive = \n new java.io.File(APPLICATION);\n printAllDeployedComponents();\n //deployApplication(appArchive,getTargets());\n printAllDeployedComponents();\n //checkDeploymentPassed(\"stateless-simple\", getTargets());\n //undeployApplication(appArchive, getTargets());\n }",
"@Override\n\tprotected void updateAction(HashSet<String> updateSet){\t\n\t\tif (MiddleWareConfig.getInstance().getCurClassLoaderWay() == MiddleWareConfig.ADAPT_DEP_CLASSLOADER){\n\t\t\t// *** important to reconstruct ****\n\t\t\t((AdaptDependencyManager)MiddleWareConfig.getInstance().getDepManager()).updateDeploymentNodeBySet(updateSet);\n\t\t}\n\t\telse{ // *** important for AdaptExtDepClassloader\n\t\t\t((AdaptDependencyManager)MiddleWareConfig.getInstance().getDepManager()).validDeploymentNodeBySet(updateSet);\n\t\t}\t\t\n\t}",
"protected void deploySuite(String suitePath, String mainClassName) {\n \n }",
"public void setServiceDeployment(org.biocatalogue.x2009.xml.rest.ServiceDeployment serviceDeployment)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.biocatalogue.x2009.xml.rest.ServiceDeployment target = null;\r\n target = (org.biocatalogue.x2009.xml.rest.ServiceDeployment)get_store().find_element_user(SERVICEDEPLOYMENT$0, 0);\r\n if (target == null)\r\n {\r\n target = (org.biocatalogue.x2009.xml.rest.ServiceDeployment)get_store().add_element_user(SERVICEDEPLOYMENT$0);\r\n }\r\n target.set(serviceDeployment);\r\n }\r\n }",
"public void startWithoutChecks() {\n service.enableMonitoring();\n for (ServiceNotifier serviceNotifier : serviceNotifiers) {\n serviceNotifier.onStart();\n }\n }",
"private void startServices() throws Exception {\n /** Setting up subscriptions Manager **/\n /**************************************/\n ChannelListManager.getSubscriptionListManager(context);\n\n /*******************************************/\n /** Starting various services for the app **/\n /*******************************************/\n //Application-level Dissemination Channel Service\n ADCThread = new ApplevDisseminationChannelService();\n ADCThread.start();\n Intent intent;\n //BroadcastReceiveService\n intent = new Intent(context, BroadcastReceiveService.class);\n context.startService(intent);\n if (!isServiceRunning(BroadcastReceiveService.class)) {\n throw new Exception(\"BroadcastReceiveServiceNotRunning\");\n }\n //BroadcastSendService\n intent = new Intent(context, BroadcastSendService.class);\n context.startService(intent);\n if (!isServiceRunning(BroadcastSendService.class)) {\n throw new Exception(\"BroadcastSendServiceNotRunning\");\n }\n //HelloMessageService\n intent = new Intent(context, HelloMessageService.class);\n context.startService(intent);\n if (!isServiceRunning(HelloMessageService.class)) {\n throw new Exception(\"HelloMessageServiceNotRunning\");\n }\n }",
"public void lambda$connect$0$Installer() {\n IBinder binder = ServiceManager.getService(\"installd\");\n if (binder != null) {\n try {\n binder.linkToDeath(new IBinder.DeathRecipient() {\n /* class com.android.server.pm.Installer.AnonymousClass1 */\n\n @Override // android.os.IBinder.DeathRecipient\n public void binderDied() {\n Slog.w(Installer.TAG, \"installd died; reconnecting\");\n Installer.this.lambda$connect$0$Installer();\n }\n }, 0);\n } catch (RemoteException e) {\n binder = null;\n }\n }\n if (binder != null) {\n this.mInstalld = IInstalld.Stub.asInterface(binder);\n try {\n invalidateMounts();\n } catch (InstallerException e2) {\n }\n } else {\n Slog.w(TAG, \"installd not found; trying again\");\n BackgroundThread.getHandler().postDelayed(new Runnable() {\n /* class com.android.server.pm.$$Lambda$Installer$SebeftIfAJ7KsTmM0tju6PfW4Pc */\n\n @Override // java.lang.Runnable\n public final void run() {\n Installer.this.lambda$connect$0$Installer();\n }\n }, 1000);\n }\n }",
"@Test\n public void testCreateOnlyNeededModelVersionsWhenNoHostsAllocated() {\n CountingModelFactory factory700 = createHostedModelFactory(Version.fromString(\"7.0.0\"));\n CountingModelFactory factory720 = createHostedModelFactory(Version.fromString(\"7.2.0\"));\n List<ModelFactory> modelFactories = List.of(factory700, factory720);\n\n DeployTester tester = createTester(createHosts(1, (String) null), modelFactories, prodZone);\n tester.deployApp(\"src/test/apps/hosted-routing-app/\", \"7.2.0\");\n assertFalse(factory700.creationCount() > 0);\n assertTrue(\"Newest is always included\", factory720.creationCount() > 0);\n }",
"private static void initForProd() {\r\n try {\r\n appTokenManager = new AppTokenManager();\r\n app = new CerberusApp(301L, \"3dd25f8ef8429ffe\",\r\n \"526fbde088cc285a957f8c2b26f4ca404a93a3fb29e0dc9f6189de8f87e63151\");\r\n appTokenManager.addApp(app);\r\n appTokenManager.start();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }",
"public void scaleDown() {\n log.info(\"Scaling down by [Step Down] \" + stepDown + \" instances...\");\n\n // Scale down by (1 x stepDown) at a time\n for (int i = 0; i < stepDown; i++) {\n // Get free launchers\n List<String> urlsToScaleDown = getFreeLaunchers();\n\n log.info(\"URLs to scale down: \" + urlsToScaleDown.toString());\n\n // Sort by launcher url. This will sort the oldest first, making it possible to take the youngest out of the\n // tail\n urlsToScaleDown.sort((o1, o2) -> {\n int mySuffix = Integer.parseInt(o1.split(\"\\\\.\")[0].substring(\n (Constants.LAUNCHER_URL_PREFIX + \"-\").length()));\n\n int theirSuffix = Integer.parseInt(o2.split(\"\\\\.\")[0].substring(\n (Constants.LAUNCHER_URL_PREFIX + \"-\").length()));\n\n return Integer.compare(mySuffix, theirSuffix);\n });\n\n // Get the youngest free launcher URL\n String launcherUrlToDelete = urlsToScaleDown.get(urlsToScaleDown.size() - 1);\n\n log.info(\"Cutting down [Launcher URL] \" + launcherUrlToDelete + \"...\");\n\n // Get object name from launcher URL\n String deploymentName = getObjectNameFromLauncherUrl(launcherUrlToDelete);\n\n // Delete deployment and service\n if (!deleteLauncher(deploymentName)) {\n log.error(\"Launcher deletion failed [Object Name] \" + deploymentName);\n }\n }\n }",
"void onDefaultInstallmentSet();",
"public IncompleteDeploymentException(IncompleteDeployments incompleteDeployments)\n {\n if (incompleteDeployments == null)\n throw new IllegalArgumentException(\"Null incompleteDeployments\");\n this.incompleteDeployments = incompleteDeployments;\n }",
"private void startServices(){\n\t\t\n\t\tIntent intent = new Intent(mContext, BatterySaverService.class);\n\t\tmContext.startService(intent);\n\t}",
"private List resolvePackages(Iterator pkgs) {\n ArrayList res = new ArrayList();\n\n while (pkgs.hasNext()) {\n ExportPkg provider = null;\n ImportPkg ip = (ImportPkg)pkgs.next();\n if (ip.provider != null) {\n framework.listeners.frameworkError(ip.bpkgs.bundle,\n new Exception(\"resolvePackages: InternalError1!\"));\n }\n if (Debug.packages) {\n Debug.println(\"resolvePackages: check - \" + ip.pkgString());\n }\n provider = (ExportPkg)tempProvider.get(ip.name);\n if (provider != null) {\n if (Debug.packages) {\n Debug.println(\"resolvePackages: \" + ip.name + \" - has temporary provider - \"\n + provider);\n }\n if (provider.zombie && provider.bpkgs.bundle.state == Bundle.UNINSTALLED) {\n if (Debug.packages) {\n Debug.println(\"resolvePackages: \" + ip.name +\n \" - provider not used since it is an uninstalled zombie - \"\n + provider);\n }\n provider = null;\n } else if (!ip.okPackageVersion(provider.version)) {\n if (Debug.packages) {\n Debug.println(\"resolvePackages: \" + ip.name +\n \" - provider has wrong version - \" + provider +\n \", need \" + ip.packageRange + \", has \" + provider.version);\n }\n provider = null;\n }\n } else {\n for (Iterator i = ip.pkg.providers.iterator(); i.hasNext(); ) {\n ExportPkg ep = (ExportPkg)i.next();\n tempBlackListChecks++;\n if (tempBlackList.contains(ep)) {\n tempBlackListHits++;\n continue;\n }\n\t if (ep.zombie) {\n // TBD! Should we refrain from using a zombie package and try a new provider instead?\n continue;\n }\n if (ip.okPackageVersion(ep.version)) {\n if (Debug.packages) {\n Debug.println(\"resolvePackages: \" + ip.name + \" - has provider - \" + ep);\n }\n HashMap oldTempProvider = (HashMap)tempProvider.clone();\n if (!checkUses(ep)) {\n tempProvider = oldTempProvider;\n tempBlackList.add(ep);\n continue;\n }\n provider = ep;\n break;\n }\n }\n if (provider == null) {\n provider = pickProvider(ip);\n }\n if (provider != null) {\n tempProvider.put(ip.pkg.pkg, provider);\n }\n }\n if (provider == null) {\n if (ip.resolution == Constants.RESOLUTION_MANDATORY) {\n res.add(ip);\n } else {\n if (Debug.packages) {\n Debug.println(\"resolvePackages: Ok, no provider for optional \" + ip.name);\n }\n }\n }\n }\n return res;\n }",
"private void startBootstrapServices() {\n traceBeginAndSlog(\"StartWatchdog\");\n Watchdog watchdog = Watchdog.getInstance();\n watchdog.start();\n traceEnd();\n if (MAPLE_ENABLE) {\n this.mPrimaryZygotePreload = SystemServerInitThreadPool.get().submit($$Lambda$SystemServer$UyrPns7R814gZEylCbDKhe8It4.INSTANCE, \"PrimaryZygotePreload\");\n }\n Slog.i(TAG, \"Reading configuration...\");\n traceBeginAndSlog(\"ReadingSystemConfig\");\n SystemServerInitThreadPool.get().submit($$Lambda$YWiwiKm_Qgqb55C6tTuq_n2JzdY.INSTANCE, \"ReadingSystemConfig\");\n traceEnd();\n traceBeginAndSlog(\"StartInstaller\");\n this.installer = (Installer) this.mSystemServiceManager.startService(Installer.class);\n traceEnd();\n traceBeginAndSlog(\"DeviceIdentifiersPolicyService\");\n this.mSystemServiceManager.startService(DeviceIdentifiersPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"UriGrantsManagerService\");\n this.mSystemServiceManager.startService(UriGrantsManagerService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"StartActivityManager\");\n ActivityTaskManagerService atm = this.mSystemServiceManager.startService(ActivityTaskManagerService.Lifecycle.class).getService();\n this.mActivityManagerService = ActivityManagerService.Lifecycle.startService(this.mSystemServiceManager, atm);\n this.mActivityManagerService.setSystemServiceManager(this.mSystemServiceManager);\n this.mActivityManagerService.setInstaller(this.installer);\n this.mWindowManagerGlobalLock = atm.getGlobalLock();\n traceEnd();\n traceBeginAndSlog(\"StartPowerManager\");\n try {\n this.mPowerManagerService = (PowerManagerService) this.mSystemServiceManager.startService(\"com.android.server.power.HwPowerManagerService\");\n } catch (RuntimeException e) {\n Slog.w(TAG, \"create HwPowerManagerService failed\");\n this.mPowerManagerService = (PowerManagerService) this.mSystemServiceManager.startService(PowerManagerService.class);\n }\n traceEnd();\n traceBeginAndSlog(\"StartThermalManager\");\n this.mSystemServiceManager.startService(ThermalManagerService.class);\n traceEnd();\n try {\n Slog.i(TAG, \"PG Manager service\");\n this.mPGManagerService = PGManagerService.getInstance(this.mSystemContext);\n } catch (Throwable e2) {\n reportWtf(\"PG Manager service\", e2);\n }\n traceBeginAndSlog(\"InitPowerManagement\");\n this.mActivityManagerService.initPowerManagement();\n traceEnd();\n traceBeginAndSlog(\"StartRecoverySystemService\");\n this.mSystemServiceManager.startService(RecoverySystemService.class);\n traceEnd();\n RescueParty.noteBoot(this.mSystemContext);\n traceBeginAndSlog(\"StartLightsService\");\n try {\n this.mSystemServiceManager.startService(\"com.android.server.lights.LightsServiceBridge\");\n } catch (RuntimeException e3) {\n Slog.w(TAG, \"create LightsServiceBridge failed\");\n this.mSystemServiceManager.startService(LightsService.class);\n }\n traceEnd();\n traceBeginAndSlog(\"StartSidekickService\");\n if (SystemProperties.getBoolean(\"config.enable_sidekick_graphics\", false)) {\n this.mSystemServiceManager.startService(WEAR_SIDEKICK_SERVICE_CLASS);\n }\n traceEnd();\n traceBeginAndSlog(\"StartDisplayManager\");\n this.mDisplayManagerService = (DisplayManagerService) this.mSystemServiceManager.startService(DisplayManagerService.class);\n traceEnd();\n try {\n this.mSystemServiceManager.startService(\"com.android.server.security.HwSecurityService\");\n Slog.i(TAG, \"HwSecurityService start success\");\n } catch (Exception e4) {\n Slog.e(TAG, \"can't start HwSecurityService service\");\n }\n traceBeginAndSlog(\"WaitForDisplay\");\n this.mSystemServiceManager.startBootPhase(100);\n traceEnd();\n String cryptState = (String) VoldProperties.decrypt().orElse(\"\");\n if (ENCRYPTING_STATE.equals(cryptState)) {\n Slog.w(TAG, \"Detected encryption in progress - only parsing core apps\");\n this.mOnlyCore = true;\n } else if (ENCRYPTED_STATE.equals(cryptState)) {\n Slog.w(TAG, \"Device encrypted - only parsing core apps\");\n this.mOnlyCore = true;\n }\n HwBootCheck.bootSceneEnd(100);\n HwBootFail.setBootTimer(false);\n HwBootCheck.bootSceneStart(105, 900000);\n if (!this.mRuntimeRestart) {\n MetricsLogger.histogram((Context) null, \"boot_package_manager_init_start\", (int) SystemClock.elapsedRealtime());\n }\n traceBeginAndSlog(\"StartPackageManagerService\");\n try {\n Watchdog.getInstance().pauseWatchingCurrentThread(\"packagemanagermain\");\n this.mPackageManagerService = PackageManagerService.main(this.mSystemContext, this.installer, this.mFactoryTestMode != 0, this.mOnlyCore);\n Watchdog.getInstance().resumeWatchingCurrentThread(\"packagemanagermain\");\n this.mFirstBoot = this.mPackageManagerService.isFirstBoot();\n this.mPackageManager = this.mSystemContext.getPackageManager();\n Slog.i(TAG, \"Finish_StartPackageManagerService\");\n traceEnd();\n if (!this.mRuntimeRestart && !isFirstBootOrUpgrade()) {\n MetricsLogger.histogram((Context) null, \"boot_package_manager_init_ready\", (int) SystemClock.elapsedRealtime());\n HwBootCheck.addBootInfo(\"[bootinfo]\\nisFirstBoot: \" + this.mFirstBoot + \"\\nisUpgrade: \" + this.mPackageManagerService.isUpgrade());\n HwBootCheck.bootSceneStart(101, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n }\n HwBootCheck.bootSceneEnd(105);\n if (!this.mOnlyCore && !SystemProperties.getBoolean(\"config.disable_otadexopt\", false)) {\n traceBeginAndSlog(\"StartOtaDexOptService\");\n try {\n Watchdog.getInstance().pauseWatchingCurrentThread(\"moveab\");\n OtaDexoptService.main(this.mSystemContext, this.mPackageManagerService);\n } catch (Throwable th) {\n Watchdog.getInstance().resumeWatchingCurrentThread(\"moveab\");\n traceEnd();\n throw th;\n }\n Watchdog.getInstance().resumeWatchingCurrentThread(\"moveab\");\n traceEnd();\n }\n traceBeginAndSlog(\"StartUserManagerService\");\n this.mSystemServiceManager.startService(UserManagerService.LifeCycle.class);\n traceEnd();\n traceBeginAndSlog(\"InitAttributerCache\");\n AttributeCache.init(this.mSystemContext);\n traceEnd();\n traceBeginAndSlog(\"SetSystemProcess\");\n this.mActivityManagerService.setSystemProcess();\n traceEnd();\n traceBeginAndSlog(\"InitWatchdog\");\n watchdog.init(this.mSystemContext, this.mActivityManagerService);\n traceEnd();\n this.mDisplayManagerService.setupSchedulerPolicies();\n traceBeginAndSlog(\"StartOverlayManagerService\");\n this.mSystemServiceManager.startService(new OverlayManagerService(this.mSystemContext, this.installer));\n traceEnd();\n traceBeginAndSlog(\"StartSensorPrivacyService\");\n this.mSystemServiceManager.startService(new SensorPrivacyService(this.mSystemContext));\n traceEnd();\n if (SystemProperties.getInt(\"persist.sys.displayinset.top\", 0) > 0) {\n this.mActivityManagerService.updateSystemUiContext();\n ((DisplayManagerInternal) LocalServices.getService(DisplayManagerInternal.class)).onOverlayChanged();\n }\n this.mSensorServiceStart = SystemServerInitThreadPool.get().submit($$Lambda$SystemServer$oG4I04QJrkzCGs6IcMTKU2211A.INSTANCE, START_SENSOR_SERVICE);\n } catch (Throwable th2) {\n Watchdog.getInstance().resumeWatchingCurrentThread(\"packagemanagermain\");\n throw th2;\n }\n }",
"public void loadApplications() {\n PackageManager manager = context.getPackageManager();\n\n Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);\n mainIntent.addCategory(Intent.CATEGORY_LAUNCHER);\n\n final List<ResolveInfo> apps = manager.queryIntentActivities(mainIntent, 0);\n Collections.sort(apps, new ResolveInfo.DisplayNameComparator(manager));\n\n if (apps != null) {\n applications.clear();\n\n for (ResolveInfo app : apps) {\n App application = new App();\n\n application.name = app.loadLabel(manager).toString();\n application.setActivity(new ComponentName(\n app.activityInfo.applicationInfo.packageName,\n app.activityInfo.name),\n Intent.FLAG_ACTIVITY_NEW_TASK\n | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);\n application.icon = app.activityInfo.loadIcon(manager);\n\n applications.add(application);\n }\n }\n }",
"public static void main(String[] args) {\n\t\tint id =4 ;\n\t\tCMDBService cmdbService = CMDBService.getCMDBService();\n\t\tSystem.out.println(\"All deployment details:- \\n\" + cmdbService.getAllDeploymentDetails());\n\t\t\n\t\tSystem.out.println(\"Get deployment details for id=\"+ id +\" :- \\n\" + cmdbService.getDeploymentDetails(id));\n\t\t\n\t\tSystem.out.println(\"Deleting deployment data for id=\" + id + \":- \\n\" + cmdbService.deleteDeploymentDetails(id));\n\t\t\n\t\tSystem.out.println(\"After deletion deployment details:- \\n\" + cmdbService.getAllDeploymentDetails());\n\t\t//Add new data to CMDB list\n\t\tCMDB cmdb = new CMDB();\n\t\tcmdb.setArtifactName(\"jboss\");\n\t\tcmdb.setArtifactVersion(\"7.8\");\n\t\tcmdb.setDeployedBy(\"KB\");\n\t\tcmdb.setDeploymentDate(\"01_03_2018\");\n\t\tcmdb.setDeploymentStatus(\"Failure\");\n\t\tcmdb.setId(6);\n\t\tSystem.out.println(\"Adding deployment data:- \\n\" + cmdbService.insertDeploymentDetails(cmdb));\n\t\tSystem.out.println(\"After addition deployment details:- \\n\" + cmdbService.getAllDeploymentDetails());\n\t}",
"public void reloadDeployment(Deployment deployment) throws Exception {\n File file = new File(root, \"nxserver/dev.bundles\");\n String content = deployment.getContentAsString();\n IOUtils.writeFile(file, content);\n }",
"public MainDeployer getMainDeployer()\n {\n return mainDeployer;\n }",
"public void run(String zoneOrEnvName, boolean isEnv) throws Exception {\n\t\ttry {\n\t\t\t\n\t\t\tdeploymentRecord = new DeploymentRecord();\n\t\t\tdeploymentRecord.setStartTime(new Date());\n\t\t\tdeploymentRecord.setStatus(\"Initialising.\");\n\t\t\t\n\t\t\tdeploymentRecord.log(\"Starting deployment \" + getId());\n\t\t\n\t\t\t\n\t\t\t//Check that we have everything we need\n\t\t\tif (applicationVersion == null) {\n\t\t\t\tthrow new IllegalArgumentException(\"No ApplicationVersion specified, cannot continue if there is nothing to deploy.\");\n\t\t\t}\n\t\t\t\n\t\t\tif (zoneOrEnvName == null || zoneOrEnvName.isEmpty()) {\n\t\t\t\tthrow new IllegalArgumentException(\"No zoneOrEnvName specified, cannot continue if there is nowhere to deploy to.\");\n\t\t\t}\n\t\t\t\n\t\t\tif (deploymentEngine == null) {\n\t\t\t\tthrow new IllegalArgumentException(\"No deploymentEngine specified, cannot continue if there is nothing to execute the deployment.\");\n\t\t\t}\n\t\t\t\n\t\t\t// check organisation is there\n\t\t\tOrganisation org = getOrganisation();\n\t\t\t\n\t\t\t//Load the deployment descriptor\n\t\t\tDDConfigurationLoader loader = new DDConfigurationLoader();\n\t\t\tdeploymentDescriptor = loader.loadDD(getDeploymentDescriptorFile(applicationShortName), applicationShortName);\n\t\t\t\n\t\t\t// Derive env or zone from UI input\n\t\t\tderiveEnvironmentOrDefaultZone(zoneOrEnvName, isEnv);\n\t\t\t\n\t\t\t//Load the Hieradata\n\t\t\tHashMap<String, Collection<ResolvedHost>> scope = new HashMap<String, Collection<ResolvedHost>>();\n\t\t\tscope.put(deploymentDescriptor.getApplicationShortName(), schemeScope);\n\t\t\t\n\t\t\t//Load the Primary Environment State\n\t\t\tenvironmentStateManager = EnvironmentStateManagerFactory.getInstanceOfType(Configuration.getPrimaryEnvironmentStateClass(), this, org, zonesInScope, scope);\n\t\t\t\n\t\t\tif (Configuration.getEnableAlternativeEnvironmentState()) {\n\t\t\t\t//Load the MCO State\n\t\t\t\talternateEnvironmentStateManager = EnvironmentStateManagerFactory.getInstanceOfType(Configuration.getAlternativeEnvironmentStateClass(), this, org, zonesInScope, scope);\n\t\t\t}\n\t\t\t\n\t\t\t/* Discover if there are any RPM fail files in the zone */\n\t\t\tif (Configuration.getRPMFailFileReportEnabled(getOrganisation())) {\n\t\t\t\tMap<String, String> failFilesByFQDN = new RPMFailFileManager().reportFailFiles(getOrganisation(), zonesInScope);\n\t\t\t\tsetFailFilesByFQDN(failFilesByFQDN);\n\t\t\t} else {\n\t\t\t\tlog.info(String.format(\"RPM fail file report disabled for %s\", getOrganisation()));\n\t\t\t}\n\t\t\t\n\t\t\tdeploymentRecord.setStatus(\"Preparing.\");\t\n\n\t\t\tboolean continueDeployment = deploymentEngine.prepare();\n\t\t\tif (continueDeployment && !Configuration.isPrepareOnly()) {\n\t\t\t\tdeploymentRecord.setStatus(\"Finished preparing.\");\n\t\t\t\tdeploymentRecord.setStatus(\"Validating.\");\t\n\t\t\t\tdeploymentEngine.validate();\n\t\t\t\tdeploymentRecord.setStatus(\"Finished validating.\");\n\t\t\t\tdeploymentRecord.setStatus(\"Executing.\");\t\n\t\t\t\tdeploymentEngine.execute();\n\t\t\t\tdeploymentRecord.setStatus(\"Finished executing.\");\n\t\t\t}\n\t\t\telse if (!continueDeployment) {\n\t\t\t\tthrow new Exception(\"No changes can be made, deployment halted!\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tdeploymentRecord.setStatus(\"Exiting abnormally.\");\n\t\t\tdeploymentRecord.log(e, \"Exception occured\");\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t\tthrow e;\n\t\t} finally {\n\t\t\tif (null != deploymentEngine) {\n\t\t\t\tdeploymentEngine.cleanup();\n\t\t\t}\n\t\t}\n\t}",
"private void warnNotAllSquadronsDeployed() {\n warnDialogProvider.get().show(\"Not all squadrons have been deployed. Squadrons not deployed are lost.\");\n }",
"@Test\n\t@Deployment(resources = \"process.bpmn\")\n\tpublic void testParsingAndDeployment() {\n\t\t// nothing is done here, as we just want to check for exceptions during\n\t\t// deployment\n\t}",
"public void addPortlet(org.light.portal.portlet.config.Portlet vPortlet)\r\n throws java.lang.IndexOutOfBoundsException\r\n {\r\n _portletList.addElement(vPortlet);\r\n }"
] | [
"0.63434935",
"0.5697891",
"0.5659901",
"0.5578303",
"0.52517486",
"0.5163203",
"0.515479",
"0.5110495",
"0.5107249",
"0.50410867",
"0.5037768",
"0.49914926",
"0.4965398",
"0.4913825",
"0.48909447",
"0.4889196",
"0.48879468",
"0.48712507",
"0.48421538",
"0.48345205",
"0.48132873",
"0.48115575",
"0.4798959",
"0.47609252",
"0.47545746",
"0.47217447",
"0.47130075",
"0.4711222",
"0.46995318",
"0.46976402",
"0.46500227",
"0.46373844",
"0.46244088",
"0.4618129",
"0.46137863",
"0.46056765",
"0.4601562",
"0.45961183",
"0.45787567",
"0.45697948",
"0.45671186",
"0.45624757",
"0.45623767",
"0.45245984",
"0.45222098",
"0.45208606",
"0.4518888",
"0.45113555",
"0.44939858",
"0.44830576",
"0.44806463",
"0.4462991",
"0.44613612",
"0.44550157",
"0.44344908",
"0.4431107",
"0.4427862",
"0.44217992",
"0.44215047",
"0.44191974",
"0.44150007",
"0.4414713",
"0.43932146",
"0.43924302",
"0.43909615",
"0.43877923",
"0.4385969",
"0.4384584",
"0.43823743",
"0.4374289",
"0.4361038",
"0.4357633",
"0.43565536",
"0.43422866",
"0.43386975",
"0.43278068",
"0.43257767",
"0.42857528",
"0.4282262",
"0.42765015",
"0.42747116",
"0.42686933",
"0.42679492",
"0.42660686",
"0.42595533",
"0.42570007",
"0.42536741",
"0.42464885",
"0.42428786",
"0.42421082",
"0.42353228",
"0.42346758",
"0.42330396",
"0.42272627",
"0.42202818",
"0.42201763",
"0.42196223",
"0.4217667",
"0.42169917",
"0.42169303"
] | 0.87598103 | 0 |
Get the list of free launchers from the persistence. | public List<String> getFreeLaunchers() {
return persistence.getFreeLauncherUrls();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<String> getTotalLaunchers() {\n return persistence.getTotalLauncherUrls();\n }",
"public int getFreezers ()\n {\n return (freezers);\n }",
"public Vector<String> getAllLaunchersIds() {\n\t\tVector<String> visibleIds = new Vector<>();\n\n\t\tfor (EnemyLauncher el : enemyLauncherArr) {\n\t\t\tif (el.isAlive()) {\n\t\t\t\tvisibleIds.add(el.getLauncherId());\n\t\t\t}\n\t\t}\n\n\t\tif (visibleIds.size() == 0)\n\t\t\treturn null;\n\n\t\treturn visibleIds;\n\t}",
"public Expirator getAvailableExpirator() {\n \t\tExpirator available = null;\n \t\tfor(Expirator e : expirators) {\n \t\t\tif(!e.isBusy()) {\n \t\t\t\tavailable = e;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t\treturn available;\n \t}",
"private void addAllDeploymentsAsFreeLaunchers() {\n List<String> deployments = getDeployments();\n log.info(\"Found \" + deployments.size() + \" deployments to be added\");\n for (String deployment : deployments) {\n if (runtimeClient.serviceExists(deployment)) {\n addFreeLauncher(deployment);\n } else {\n log.info(\"Deployment \" + deployment + \" doesn't have a Service that exposes it. Not adding as a launcher...\");\n }\n }\n }",
"List<Uuid> getTaskManagers(int numRequested) throws RemoteException;",
"public Vector<String> getAllVisibleLaunchersIds() {\n\t\tVector<String> visibleIds = new Vector<>();\n\n\t\tfor (EnemyLauncher el : enemyLauncherArr) {\n\n\t\t\tif (el.isAlive() && !el.getIsHidden()) {\n\t\t\t\tvisibleIds.add(el.getLauncherId());\n\t\t\t}\n\t\t}\n\n\t\tif (visibleIds.size() == 0)\n\t\t\treturn null;\n\n\t\treturn visibleIds;\n\t}",
"private Collection<MarketDataProvider> getActiveMarketDataProviders()\n {\n populateProviderList();\n return providersByPriority;\n }",
"public List<String> getmanagers();",
"public List<PlatformInstall> getInstallers () {\n return filter(getAllInstallers(),PlatformInstall.class);\n }",
"@Override\n\tpublic List<Parking> availableParking() {\n\t\treturn parkingRepository.availableParking();\n\t}",
"public List<Type> getDownloadableType() {\n\t\tList<Type> types = typeManager.getAllAvailable();\n\t\tList<Type> result = new ArrayList<Type>();\n\t\tfor(Type type : types){\n\t\t\tif(type.getBasePackages() != null && type.getBasePackages().size() != 0){\n\t\t\t\tresult.add(type);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"@Query(\"select u from User u where u.managedProject is null and u.role = 'PM'\")\n List<User> getFreeManagers();",
"public List<Expirator> getBusyExpirators()\n \t{\n \t\tList<Expirator> busy=new LinkedList<Expirator>();\n \t\tfor (Expirator current : this.expirators)\n \t\t{\n \t\t\tif (current.isBusy())\n \t\t\t{\n \t\t\t\tbusy.add(current);\n \t\t\t}\n \t\t}\n \t\treturn busy;\n \t}",
"public List<JFrogPlatformInstance> getJfrogInstances() {\n return RepositoriesUtils.getJFrogPlatformInstances();\n }",
"public static ArrayList<String> getAvailableParts() {\n ArrayList<String> allParts = new ArrayList<String>();\n String pattern = \"_db.dat\";\n File dir = new File(getRapidSmithPath() + File.separator + \"devices\");\n if (!dir.exists()) {\n MessageGenerator.briefErrorAndExit(\"ERROR: No part files exist. Please run \" +\n Installer.class.getCanonicalName() + \" to create part files.\");\n }\n for (String partFamily : dir.list()) {\n File partDir = new File(dir.getAbsolutePath() + File.separator + partFamily);\n for (String part : partDir.list()) {\n if (part.endsWith(pattern)) {\n allParts.add(part.replace(pattern, \"\"));\n }\n }\n }\n return allParts;\n }",
"Collection<GameEnvironment> getPendingGames();",
"java.util.List<WorldUps.UDeliveryLocation> \n getPackagesList();",
"public Collection<Long> getAvailableItems();",
"public List<Engineer> getListFromDB(){\n\t\treturn engineerList;\n\t}",
"public List<Application> getVisibleApplications() {\n return null;\r\n }",
"public List < Entity > getPassengers ( ) {\n\t\treturn extract ( handle -> handle.getPassengers ( ) );\n\t}",
"public List findAll() {\n\t\ttry {\n\t\t\tString queryString = \"from Procurator\";\n\t\t\tQuery queryObject = getSession().createQuery(queryString);\n\t\t\treturn queryObject.list();\n\t\t} catch (RuntimeException re) {\n\t\t\tthrow re;\n\t\t}\n\t}",
"public List<UserdemandsBean> getNewUnsolveDemands() {\n\t\treturn dao.getNewUnsolveDemands();\n\t}",
"public List getAvailableProjects (){\n\t\tList retValue = new ArrayList ();\n\t\tthis.setProcessing (true);\n\t\ttry {\n\t\t\tfor (Iterator it = getPersistenceManager().getExtent(Project.class, true).iterator();it.hasNext ();){\n\t\t\t\tretValue.add (it.next());\n\t\t\t}\n\t\t} finally {\n\t\t\tthis.setProcessing (false);\n\t\t}\n\t\treturn retValue;\n\t}",
"private ArrayList<PInfo> getPackages() {\n\t\tArrayList<PInfo> apps = getInstalledApps(false); /* false = no system packages */\n\t\tfinal int max = apps.size();\n\t\tfor (int i=0; i<max; i++) {\n\t\t\tapps.get(i).getIcon();\n\t\t}\n\t\treturn apps;\n\t}",
"public List<WorkspaceUser> getSavers() {\n\t\treturn savers;\n\t}",
"public List<String> mo29954a() {\n return Collections.singletonList(\"com.oppo.launcher\");\n }",
"public List<Resource> getAvailableResources();",
"public List updaters() {\n return updaters; }",
"public java.util.List<WorldUps.UGoDeliver> getDeliveriesList() {\n return deliveries_;\n }",
"public List<Map.Entry<String, L>> entries() {\n rwLock.readLock().lock();\n try {\n return new ArrayList<Map.Entry<String, L>>(serversToLoad.entrySet());\n } finally {\n rwLock.readLock().unlock();\n }\n }",
"public SortedSet<String> getAvailableDataProviders() {\n if (allAvailableProviders == null) {\n populateAvailableProviders();\n }\n\n SortedSet<String> providers = new TreeSet<String>();\n for (Provider p : allAvailableProviders) {\n providers.add(p.getName());\n }\n\n return providers;\n }",
"public List<UserdemandsBean> getNewGraduateUnsolveDemands() {\n\t\treturn dao.getNewGraduateUnsolveDemands();\n\t}",
"public GridletList getGridletList() {\n return receiveJobs;\n }",
"@Override\n\tpublic List<Parking> employeeavailableParking() {\n\t\treturn parkingRepository.employeeavailableParking();\n\t}",
"public List<Installment> getFactoringInstallments() {\n return factoringInstallments;\n }",
"java.util.List<WorldUps.UGoDeliver> \n getDeliveriesList();",
"public List<WorkspaceUser> getSavers() {\n\t\t\treturn savers;\n\t\t}",
"Collection<MatchmakingManager> getManagers();",
"public List<Hotel> getAvailableHotels(){\n return databaseManager.findAvailableHotels();\n }",
"public java.util.List<WorldUps.UGoDeliver> getDeliveriesList() {\n if (deliveriesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(deliveries_);\n } else {\n return deliveriesBuilder_.getMessageList();\n }\n }",
"public java.util.List<WorldUps.UDeliveryLocation> getPackagesList() {\n return packages_;\n }",
"public List<JFrogPlatformInstance> getJfrogInstances() {\n List<JFrogPlatformInstance> jfrogInstances = new ArrayList<>(RepositoriesUtils.getJFrogPlatformInstances());\n ArtifactoryServer propertyServer = getArtifactoryServerFromPipeline();\n if (propertyServer != null) {\n jfrogInstances.add(new JFrogPlatformInstance(propertyServer));\n }\n return jfrogInstances;\n }",
"public String[] getAvailableGovernors() {\n\t\t\tif (mAvailableGovernors == null) {\n\t\t\t\tList<String> list = ShellHelper.cat(\n\t\t\t\t\tmRoot.getAbsolutePath() + AVAILABLE_GOVERNERS);\n\t\t\t\tif (list == null || list.isEmpty()) return null;\n\t\t\t\tmAvailableGovernors = list.get(0).split(\"\\\\s+\");\n\t\t\t}\n\t\t\treturn mAvailableGovernors;\n\t\t}",
"@Override\n\tpublic List<AvailableSlot> getAvailableSlots() {\n\t\tList<AvailableSlot> slots = (List<AvailableSlot>) availableSlotRepository.findAll();\n\t\treturn slots;\n\t}",
"public List<Installment> getReturnInstallments() {\n return returnInstallments;\n }",
"public static List<SkungeeServer> getServers() {\n\t\treturn ServerManager.getServers();\n\t}",
"public java.util.List<com.lvl6.proto.QuestProto.FullQuestProto> getNewlyAvailableQuestsList() {\n return newlyAvailableQuests_;\n }",
"@NoProxy\n public List<BwFreeBusyComponent> getFreeBusyPeriods() {\n return freeBusyPeriods;\n }",
"public List<Player> getPassengers() {\n\t\tList<Player> ret = new ArrayList<Player>();\n\t\t\n\t\tfor (Player p : Bukkit.getOnlinePlayers()) {\n\t\t\tif (isPassenger(p))\n\t\t\t\tret.add(p);\n\t\t}\n\t\treturn ret;\n\t}",
"public List<Publisher> getPublishers() {\n return publishers;\n }",
"public static List<PowerupFeature> getPowerups() {\r\n\t\treturn Collections.unmodifiableList(POWERUPS);\r\n\t}",
"public List<Party> getCurrentlyProcessingParties() {\n return currentlyProcessingParties;\n }",
"java.util.List<com.google.cloud.channel.v1.PurchasableOffer> \n getPurchasableOffersList();",
"java.util.List<com.lvl6.proto.QuestProto.FullQuestProto> \n getNewlyAvailableQuestsList();",
"public List<Park> getParkRegistry() {\n return this.pf.getParkList();\n }",
"public int getAdministeringProviderReps() {\r\n \treturn this.getReps(10);\r\n }",
"public String[] getAvailableSpelunkerDat()\n {\n return super.getAvailableDatList();\n }",
"public LauncherDestructor findFreeDestructor() {\n\t\tfor (LauncherDestructor ld : launcherDestractorArr) {\n\t\t\tif (!ld.getIsBusy()) {\n\t\t\t\treturn ld;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}",
"public List<Freelancer> getFreelancers() {\n \t// return JsonObject\n Response response = freelancerBaseService.request(MediaType.APPLICATION_JSON).get();\n if (response.getStatus() == 200) {\n \treturn response.readEntity(new GenericType<List<Freelancer>>() {});\n } else if (response.getStatus() == 404) {\n return null;\n } else {\n throw new ServiceUnavailableException();\n }\n }",
"public List<Room> getFreeOn(LocalDate of) {\r\n\t\tList<Room> l= this.getAllRooms();\r\n\t\tl.removeAll(this.getReservedOn(of));\r\n\t\treturn l;\r\n\t}",
"public java.util.List<com.lvl6.proto.QuestProto.FullQuestProto> getNewlyAvailableQuestsList() {\n if (newlyAvailableQuestsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(newlyAvailableQuests_);\n } else {\n return newlyAvailableQuestsBuilder_.getMessageList();\n }\n }",
"public List<Item> getAllItemsAvailable();",
"public static List<String> getSupportedVersions () {\n if (instBySupportedVersion == null) {\n init();\n }\n return new ArrayList(instBySupportedVersion.keySet());\n }",
"public List<ReservaEntity> getReservas() {\n LOGGER.log(Level.INFO, \"Inicia proceso de consultar todas las reservas\");\n // Note que, por medio de la inyección de dependencias se llama al método \"findAll()\" que se encuentra en la persistencia.\n List<ReservaEntity> reservas = persistence.findAllReservas();\n LOGGER.log(Level.INFO, \"Termina proceso de consultar todas las reservas\");\n return reservas;\n }",
"public ArrayList<FFMPRunXML> getFFMPRunners() {\n if (!this.isPopulated) {\n return null;\n }\n\n return configXml.getFFMPRun();\n }",
"public Lab[] getAvailableLabs()\n {\n List<Lab> labsList = new ArrayList<Lab> ();\n File [] files = directory.listFiles();\n for (File file : files)\n {\n Lab lab = Lab.getInstance(file);\n if (lab != null)\n labsList.add(lab);\n }\n return labsList.toArray(new Lab [0]);\n }",
"public List<ServerWorker> getWorkerList()\n {\n return workerList;\n }",
"public List<Installment> getLoanInstallments() {\n return loanInstallments;\n }",
"public List reserveAll() {\n \n final List result;\n final List reserveList;\n \n synchronized (m_reservableListMutex) {\n purgeZombieResources();\n \n result = new ArrayList(m_reservables.size());\n reserveList = new ArrayList(m_reservables);\n }\n \n while (reserveList.size() > 0) {\n // Iterate backwards so remove is cheap.\n final ListIterator iterator =\n reserveList.listIterator(reserveList.size());\n \n while (iterator.hasPrevious()) {\n final Reservable reservable = (Reservable)iterator.previous();\n \n if (reservable.isSentinel()) {\n iterator.remove();\n }\n else if (reservable.reserve()) {\n result.add(reservable);\n iterator.remove();\n }\n else if (reservable.isClosed()) {\n iterator.remove();\n }\n }\n \n if (reserveList.size() > 0) {\n // Block until more resources are freed.\n synchronized (m_reservableMutex) {\n try {\n // Don't block for ever because the outstanding\n // resources might have already been freed.\n m_reservableMutex.wait(1000);\n }\n catch (InterruptedException e) {\n throw new UncheckedInterruptedException(e);\n }\n }\n }\n }\n \n return result;\n }",
"public Collection getRegisteredObjects() {\n return usedByObjects;\n }",
"java.util.List<WorldUps.UDeliveryMade> \n getDeliveredList();",
"public java.util.List<WorldUps.UGoDeliver.Builder> \n getDeliveriesBuilderList() {\n return getDeliveriesFieldBuilder().getBuilderList();\n }",
"public java.util.List<com.lvl6.proto.QuestProto.UserQuestJobProto> getUserQuestJobsList() {\n return userQuestJobs_;\n }",
"public List<Supplier> getSuppliers(){ \n\t List<Supplier> list=new ArrayList<Supplier>(); \n\t list=template.loadAll(Supplier.class); \n\t return list; \n\t}",
"public Queue<SongEntry> getLoungePL() {\r\n return loungePL;\r\n }",
"private List<VM> getFreeVmsWS(DAG dag) {\r\n\t\tSet<VM> vms = getWorkflowEngine().getFreeVMs();\r\n\t\tList<VM> freeVms = new ArrayList<VM>();\r\n\t\tfor (VM vm : vms) {\r\n\t\t\t// make sure the VM is really free...sometimes the vm list in the\r\n\t\t\t// engine is not updated on time\r\n\t\t\tif (vm.getRunningJobs().isEmpty() && vm.getWaitingInputJobs().isEmpty()) {\r\n\t\t\t\tif (wfVms.containsKey(vm)) {\r\n\t\t\t\t\tif (wfVms.get(vm).equals(dag.getName().substring(0,2))) {\r\n\t\t\t\t\t\tfreeVms.add(vm);\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 freeVms;\r\n\t}",
"public lanyotech.cn.park.protoc.CommonProtoc.PARKINGFREE getPakringFree() {\n return pakringFree_;\n }",
"public lanyotech.cn.park.protoc.CommonProtoc.PARKINGFREE getPakringFree() {\n return pakringFree_;\n }",
"public java.util.List<com.expedia.www.packagefinder.database.exppackage.ExpPackageProtos.Package> getFHPackagesList() {\n return fHPackages_;\n }",
"private List<SparkCollectorProvider> getCollectorsToRun() {\n if (externalCollectors == null) {\n if (userCollectors.size() == 0) { // run them all\n return Arrays.asList(SparkCollectors.values());\n }\n else { // run the user specified collectors\n List<SparkCollectorProvider> collectorsToRun = new ArrayList<>();\n collectorsToRun.addAll(userCollectors);\n return collectorsToRun;\n }\n }\n else { // run the external collectors\n return externalCollectors;\n }\n }",
"@Override\n\tpublic List<TaskKeeper> getList() {\n\t\treturn (List<TaskKeeper>) taskKeeperRepositories.findAll();\n\t}",
"public List<Module> availableModules() {\n \t\treturn _availableModules;\n \t}",
"public Launcher getLauncher(){\n \treturn mLauncher;\n }",
"@Override\r\n\tpublic List<Supplies> findall() {\n\t\treturn suppliesDao.findall();\r\n\t}",
"List<Moderator> getAvailableModerators(int digestNum);",
"public lanyotech.cn.park.protoc.CommonProtoc.PARKINGFREE getPakringFree() {\n return pakringFree_;\n }",
"public lanyotech.cn.park.protoc.CommonProtoc.PARKINGFREE getPakringFree() {\n return pakringFree_;\n }",
"public java.util.List<com.lvl6.proto.QuestProto.FullQuestProto.Builder> \n getNewlyAvailableQuestsBuilderList() {\n return getNewlyAvailableQuestsFieldBuilder().getBuilderList();\n }",
"public List<Provider> getProName() {\n\t\treturn userDao.getProName();\r\n\t}",
"public Set<String> getAvailableProducts() {\n\t\treturn availableProducts.keySet();\n\t}",
"java.util.List<com.lvl6.proto.QuestProto.UserQuestJobProto> \n getUserQuestJobsList();",
"public List<DataChecker> getDataCheckers() {\n\t\treturn dataCheckers;\n\t}",
"public List<Integer> getPurchasedWeapons() {\r\n\t\treturn collectionManager.getPurchasedWeapons();\r\n\t}",
"public DownloadRuntime[] getDownloadableRuntimes(IProgressMonitor monitor);",
"public abstract List getProviders();",
"public List getEpSupplier() {\n\t\treturn getHibernateTemplate().find(\" from JSupplierNh \");\n\t}",
"public List<FreeColGameObject> disposeList() {\n List<FreeColGameObject> objects = new ArrayList<FreeColGameObject>();\n if (owner != null\n && getTile() != null\n && getTile().getSettlement() != null) {\n // Defensive tests to handle transition from calling dispose()\n // on both sides to when it is only called on server-side.\n \n // Get off the map\n Tile settlementTile = getTile();\n List<Tile> lostTiles = getOwnedTiles();\n for (Tile tile : lostTiles) {\n tile.changeOwnership(null, null);\n }\n settlementTile.setSettlement(null);\n \n // The owner forgets about the settlement.\n Player oldOwner = owner;\n oldOwner.removeSettlement(this);\n oldOwner.invalidateCanSeeTiles();\n // It is not safe to setOwner(null). When a settlement is\n // destroyed there is a race between this code and some\n // display routines that still need to know who owned the\n // dead settlement.\n }\n \n objects.addAll(super.disposeList());\n return objects;\n }",
"public Collection<String> list() {\n return jobs.keySet();\n }"
] | [
"0.6480937",
"0.5737458",
"0.54782444",
"0.5435439",
"0.5405924",
"0.53363556",
"0.5314265",
"0.53028053",
"0.52699465",
"0.52648413",
"0.5242611",
"0.5237652",
"0.5226091",
"0.52113414",
"0.51871336",
"0.515159",
"0.508155",
"0.5066465",
"0.50655967",
"0.50605094",
"0.5057375",
"0.503471",
"0.50262856",
"0.49916574",
"0.49722487",
"0.49653533",
"0.49611852",
"0.4955873",
"0.49532232",
"0.49498054",
"0.4946545",
"0.49430296",
"0.49344355",
"0.49342698",
"0.4932872",
"0.49300638",
"0.49281546",
"0.49187076",
"0.4907219",
"0.48960227",
"0.48958397",
"0.48907948",
"0.48886594",
"0.48875648",
"0.48845822",
"0.48737237",
"0.48694354",
"0.48600167",
"0.48556373",
"0.4853073",
"0.48505732",
"0.48403302",
"0.48266038",
"0.48246276",
"0.48074237",
"0.4807053",
"0.47884685",
"0.4774555",
"0.47700483",
"0.4762003",
"0.47618926",
"0.47524443",
"0.47466585",
"0.47442484",
"0.47432244",
"0.4727547",
"0.47264883",
"0.47231373",
"0.47229198",
"0.47214362",
"0.47209278",
"0.47143352",
"0.47051072",
"0.47018996",
"0.46906307",
"0.46825424",
"0.46821886",
"0.46745393",
"0.46737748",
"0.46737748",
"0.4672773",
"0.4667876",
"0.4667213",
"0.4665737",
"0.4663077",
"0.4658933",
"0.464977",
"0.464875",
"0.464875",
"0.4648115",
"0.46445712",
"0.46392316",
"0.46392208",
"0.4634939",
"0.46331978",
"0.46299443",
"0.46283856",
"0.46262482",
"0.4625687",
"0.46254694"
] | 0.8154454 | 0 |
Get the full list of launchers from the persistence. | public List<String> getTotalLaunchers() {
return persistence.getTotalLauncherUrls();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<String> getFreeLaunchers() {\n return persistence.getFreeLauncherUrls();\n }",
"public Vector<String> getAllLaunchersIds() {\n\t\tVector<String> visibleIds = new Vector<>();\n\n\t\tfor (EnemyLauncher el : enemyLauncherArr) {\n\t\t\tif (el.isAlive()) {\n\t\t\t\tvisibleIds.add(el.getLauncherId());\n\t\t\t}\n\t\t}\n\n\t\tif (visibleIds.size() == 0)\n\t\t\treturn null;\n\n\t\treturn visibleIds;\n\t}",
"public Vector<String> getAllVisibleLaunchersIds() {\n\t\tVector<String> visibleIds = new Vector<>();\n\n\t\tfor (EnemyLauncher el : enemyLauncherArr) {\n\n\t\t\tif (el.isAlive() && !el.getIsHidden()) {\n\t\t\t\tvisibleIds.add(el.getLauncherId());\n\t\t\t}\n\t\t}\n\n\t\tif (visibleIds.size() == 0)\n\t\t\treturn null;\n\n\t\treturn visibleIds;\n\t}",
"public List<WorkspaceUser> getSavers() {\n\t\treturn savers;\n\t}",
"public List<Map.Entry<String, L>> entries() {\n rwLock.readLock().lock();\n try {\n return new ArrayList<Map.Entry<String, L>>(serversToLoad.entrySet());\n } finally {\n rwLock.readLock().unlock();\n }\n }",
"public List<WorkspaceUser> getSavers() {\n\t\t\treturn savers;\n\t\t}",
"public List<PlatformInstall> getInstallers () {\n return filter(getAllInstallers(),PlatformInstall.class);\n }",
"public List<JFrogPlatformInstance> getJfrogInstances() {\n return RepositoriesUtils.getJFrogPlatformInstances();\n }",
"public List<String> mo29954a() {\n return Collections.singletonList(\"com.oppo.launcher\");\n }",
"public ArrayList<FFMPRunXML> getFFMPRunners() {\n if (!this.isPopulated) {\n return null;\n }\n\n return configXml.getFFMPRun();\n }",
"public List<JFrogPlatformInstance> getJfrogInstances() {\n List<JFrogPlatformInstance> jfrogInstances = new ArrayList<>(RepositoriesUtils.getJFrogPlatformInstances());\n ArtifactoryServer propertyServer = getArtifactoryServerFromPipeline();\n if (propertyServer != null) {\n jfrogInstances.add(new JFrogPlatformInstance(propertyServer));\n }\n return jfrogInstances;\n }",
"public List findAll() {\n\t\ttry {\n\t\t\tString queryString = \"from Procurator\";\n\t\t\tQuery queryObject = getSession().createQuery(queryString);\n\t\t\treturn queryObject.list();\n\t\t} catch (RuntimeException re) {\n\t\t\tthrow re;\n\t\t}\n\t}",
"public List<Application> getVisibleApplications() {\n return null;\r\n }",
"public static List<SkungeeServer> getServers() {\n\t\treturn ServerManager.getServers();\n\t}",
"protected abstract Loadable[] getEntityPersisters();",
"public List<Publisher> getPublishers() {\n return publishers;\n }",
"public List<TrainersPokemons> findAll() {\n\t\treturn this.trainersPokemonsRepository.findAll();\n\t}",
"public List updaters() {\n return updaters; }",
"public List<Engineer> getListFromDB(){\n\t\treturn engineerList;\n\t}",
"protected CollectionPersister[] getCollectionPersisters() {\n \t\treturn collectionPersisters;\n \t}",
"public List<String> getmanagers();",
"public Launcher getLauncher(){\n \treturn mLauncher;\n }",
"public Collection<String> list() {\n return jobs.keySet();\n }",
"@Override\n protected Loadable[] getEntityPersisters() {\n \t\treturn persisters;\n \t}",
"@Override\n\tpublic List<TaskKeeper> getList() {\n\t\treturn (List<TaskKeeper>) taskKeeperRepositories.findAll();\n\t}",
"public static List<Job> findAll() {\n\t\treturn getPersistence().findAll();\n\t}",
"public String getLauncher() {\n return launcher;\n }",
"public List<IHopPerspective> getPerspectives() {\n return new ArrayList<>( perspectivesMap.values() );\n }",
"protected CollectionPersister[] getCollectionPersisters() {\n \t\treturn null;\n \t}",
"public String getPublishers() {\n return publishers;\n }",
"public List<Park> getParkRegistry() {\n return this.pf.getParkList();\n }",
"public List<ArchiveEntry> getMainEntries ()\n\t{\n\t\treturn mainEntries;\n\t}",
"private Collection<MarketDataProvider> getActiveMarketDataProviders()\n {\n populateProviderList();\n return providersByPriority;\n }",
"Collection<Instance> getInstances();",
"private String[] loadSites() {\n RealmConfiguration realmConfig = new RealmConfiguration.Builder(getApplicationContext()).build();\n Realm.setDefaultConfiguration(realmConfig);\n Realm realm = Realm.getDefaultInstance();\n RealmQuery<Sites> query = realm.where(Sites.class);\n RealmResults<Sites> sites = query.findAll();\n int sitesCount = sites.size();\n String[] sitesArray = new String[sitesCount];\n for (int i = 0; i < sitesCount; i++) {\n String siteName = sites.get(i).getName();\n sitesArray[i] = siteName;\n }\n realm.close();\n return sitesArray;\n }",
"ListLaunchPathsResult listLaunchPaths(ListLaunchPathsRequest listLaunchPathsRequest);",
"java.util.List<java.lang.String>\n getBootclasspathList();",
"public List<Publisher> findAllPublishers() {\n\t\tList<Publisher> result = new ArrayList<Publisher>();\n\t\t// --- 2. Controlli preliminari sui dati in ingresso ---\n\t\t// n.d.\n\t\t// --- 3. Apertura della connessione ---\n\t\tConnection conn = getCurrentJDBCFactory().getConnection();\n\t\t// --- 4. Tentativo di accesso al db e impostazione del risultato ---\n\t\ttry {\n\t\t\t// --- a. Crea (se senza parametri) o prepara (se con parametri) lo statement\n\t\t\tPreparedStatement prep_stmt = conn.prepareStatement(find_all_publishers);\n\t\t\t// --- b. Pulisci e imposta i parametri (se ve ne sono)\n\t\t\tprep_stmt.clearParameters();\n\t\t\t// --- c. Esegui l'azione sul database ed estrai il risultato (se atteso)\n\t\t\tResultSet rs = prep_stmt.executeQuery();\n\t\t\t// --- d. Cicla sul risultato (se presente) pe accedere ai valori di ogni sua tupla\n\t\t\twhile ( rs.next() ) {\n\t\t\t\tPublisher publisher = new Publisher();\n\t\t\t\tpublisher.setId(rs.getInt(publisher_id));\n\t\t\t\tpublisher.setName(rs.getString(publisher_name));\n\t\t\t\t// books.. lazy fetch\n\t\t\t\tresult.add(publisher);\n\t\t\t}\n\t\t\t// --- e. Rilascia la struttura dati del risultato\n\t\t\trs.close();\n\t\t\t// --- f. Rilascia la struttura dati dello statement\n\t\t\tprep_stmt.close();\n\t\t}\n\t\t// --- 5. Gestione di eventuali eccezioni ---\n\t\tcatch (Exception e) {\n\t\t\tgetCurrentJDBCFactory().getLogger().error(\"failed to retrieve publishers\",e);\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// --- 6. Rilascio, SEMPRE E COMUNQUE, la connessione prima di restituire il controllo al chiamante\n\t\tfinally {\n\t\t\tgetCurrentJDBCFactory().releaseConnection(conn);\n\t\t}\n\t\t// --- 7. Restituzione del risultato (eventualmente di fallimento)\n\t\treturn result;\n\t}",
"java.util.List<UserOuterClass.ExperimentInfo> \n getExperimentsList();",
"public List < Entity > getPassengers ( ) {\n\t\treturn extract ( handle -> handle.getPassengers ( ) );\n\t}",
"@RequestMapping(value = \"/getlockers\", produces = {MediaType.APPLICATION_JSON_VALUE}, method = RequestMethod.GET)\n public ResponseEntity<Iterable<LockerEntity>> getLockers() {\n Iterable<LockerEntity> lockers = lockerService.findAllSorted();\n return new ResponseEntity<Iterable<LockerEntity>>(lockers, HttpStatus.OK);\n }",
"java.util.List<java.lang.String>\n getBootclasspathList();",
"@RequestMapping(method = RequestMethod.GET)\n public final Iterable<Entry> list() {\n Iterable<Entry> result = SecurityUtils.actualUser().getEntries();\n if (result == null) {\n result = Collections.emptyList();\n }\n return result;\n }",
"public List<? extends JobEntry> getScheduledJobs()\n {\n return schedulerService.listJobs();\n }",
"public List<DetailerCall> getDetailers() {\n if (detailers == null) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n DetailerCallDao targetDao = daoSession.getDetailerCallDao();\n List<DetailerCall> detailersNew = targetDao._queryTask_Detailers(uuid);\n synchronized (this) {\n if(detailers == null) {\n detailers = detailersNew;\n }\n }\n }\n return detailers;\n }",
"@Override\n public List<Workload> getAll() throws InstanceNotFoundException {\n List<Workload> list = new ArrayList<>();\n workloadRepository.findAll().forEach(list::add);\n if (list.isEmpty()) {\n throw new InstanceNotFoundException(\"Here is no Workloads\");\n }\n return list;\n }",
"public List<ServerWorker> getWorkerList()\n {\n return workerList;\n }",
"public List<Laptop> findAll() {\n\t\treturn laptopDao.findAll();\r\n\t}",
"@java.lang.Override\n public java.util.List<UserOuterClass.ExperimentInfo> getExperimentsList() {\n return experiments_;\n }",
"public Collection<String> getLoadableWorlds();",
"public List<Person> getListSynchronsprecher() {\n\t\treturn this.listSynchronsprecher;\n\t}",
"public List<ServiceRegistry> getServiceRegistrys() {\n\t\treturn (new ServiceRegistryDAO()).getCloneList();\r\n\t}",
"@Override\r\n\tpublic List<Job> ShowAllJobs() {\n\t\treturn null;\r\n\t}",
"public LiveData<Resource<List<PublisherDetails>>> getPublshers() {\n return new NetworkBoundResource<List<PublisherDetails>, Publisher>(appExecutors) {\n @RequiresApi(api = Build.VERSION_CODES.N)\n @Override\n protected void saveCallResult(@NonNull Publisher publisher) {\n Timber.d(\"call to delete users in db\");\n mPublisherDao.deletePublishers();\n Timber.d(\"call to insert results to db\");\n mDbHelper.savePublisher(publisher);\n }\n\n @RequiresApi(api = Build.VERSION_CODES.N)\n @Override\n protected boolean shouldFetch(@Nullable List<PublisherDetails> data) {\n return true;\n }\n\n @NonNull\n @Override\n protected LiveData<List<PublisherDetails>> loadFromDb() {\n Timber.d(\" call to load from db\");\n return mPublisherDao.loadPublishers();\n }\n\n @NonNull\n @Override\n protected LiveData<ApiResponse<Publisher>> createCall() {\n Timber.d(\"creating a call to network\");\n return mPublisherService.getPublishers();\n }\n\n @Override\n protected Publisher processResponse(ApiResponse<Publisher> response) {\n return super.processResponse(response);\n }\n }.asLiveData();\n }",
"public List<Application> getApplications()\n {\n return _apps;\n }",
"public List<ReservaEntity> getReservas() {\n LOGGER.log(Level.INFO, \"Inicia proceso de consultar todas las reservas\");\n // Note que, por medio de la inyección de dependencias se llama al método \"findAll()\" que se encuentra en la persistencia.\n List<ReservaEntity> reservas = persistence.findAllReservas();\n LOGGER.log(Level.INFO, \"Termina proceso de consultar todas las reservas\");\n return reservas;\n }",
"public DataSourcesImpl dataSources() {\n return this.dataSources;\n }",
"private List<SparkCollectorProvider> getCollectorsToRun() {\n if (externalCollectors == null) {\n if (userCollectors.size() == 0) { // run them all\n return Arrays.asList(SparkCollectors.values());\n }\n else { // run the user specified collectors\n List<SparkCollectorProvider> collectorsToRun = new ArrayList<>();\n collectorsToRun.addAll(userCollectors);\n return collectorsToRun;\n }\n }\n else { // run the external collectors\n return externalCollectors;\n }\n }",
"@Override\n public List<DiscoveredPrinter> getSavedPrinters() {\n return Collections.unmodifiableList(mSavedPrinters);\n }",
"List<Long> getServers();",
"public List<String> getLogins() {\n List<String> logins = new ArrayList<>();\n for (Commissioner commissioner: Database.getCommissionerSet()) {\n logins.add(commissioner.getLogin());\n }\n return logins;\n }",
"List<Server> servers() {\n return servers;\n }",
"Collection<MatchmakingManager> getManagers();",
"Set<Application> resolve();",
"@Override\n\tpublic List<Resident> getAll() {\n\t\tList<Resident> list = null;\n\t\ttry {\n\t\t\tlist = repository.findAll();\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn list;\n\t}",
"@JsonIgnore\n @Override\n public List<Experiment> getExperiments()\n {\n if (getFetchOptions() != null && getFetchOptions().hasExperiments())\n {\n return experiments;\n }\n else\n {\n throw new NotFetchedException(\"Experiments have not been fetched.\");\n }\n }",
"public List<SingleLinkConfiguration> getLinkers() {\n return linkers;\n }",
"public List<Entry> getUserEntries(String username) {\n\t\treturn enteries.get(username);\n\t}",
"@Named(\"publisher:list\")\n @GET\n @Path(\"/publishers\")\n @Fallback(EmptyListOnNotFoundOr404.class)\n List<Publisher> listPublishers();",
"private ArrayList<App> getApps() {\n PackageManager manager = getPackageManager();\n Intent i = new Intent(Intent.ACTION_MAIN, null);\n i.addCategory(Intent.CATEGORY_LAUNCHER);\n\n List<ResolveInfo> availableActivities = manager.queryIntentActivities(\n i, 0);\n ArrayList<App> temp = new ArrayList<App>();\n for (ResolveInfo ri : availableActivities) {\n App app = new App();\n app.packname = ri.activityInfo.packageName;\n app.appName = app.packname\n .substring(app.packname.lastIndexOf(\".\") + 1);\n app.icon = ri.activityInfo.loadIcon(manager);\n temp.add(app);\n }\n return temp;\n }",
"@Override\n public synchronized List<MemberRegistration> retrieveRemoteRegistrations()\n {\n /*\n * Ensure the current properties are retrieved from the registry.\n */\n CohortMembership registryStoreProperties = this.retrieveRegistryStoreProperties();\n Map<String, MemberRegistration> remoteMemberMap = this.getRemoteMemberMap(registryStoreProperties.getRemoteRegistrations());\n\n if (remoteMemberMap.isEmpty())\n {\n return null;\n }\n else\n {\n return new ArrayList<>(remoteMemberMap.values());\n }\n }",
"public ArrayList<ThreadRunner> getRunnersInformation()\n {\n if (runners != null)\n return runners; \n\n runners = new ArrayList<>(); \n \n if (Files.exists(runnersPath)) // prevent the FileNotFoundException\n {\n try (BufferedReader in = \n new BufferedReader(\n new FileReader(runnersFile)))\n {\n // read all runners info stored in the file\n // into the array list\n String line = in.readLine();\n while(line != null)\n {\n String[] columns = line.split(FIELD_SEP);\n String name \t= columns[0];\n int speed \t\t= Integer.parseInt(columns[1]);\n int percent \t= Integer.parseInt(columns[2]);\n\n ThreadRunner tr = new ThreadRunner(name, percent, speed);\n runners.add(tr);\n line = in.readLine(); \n }\n }\n catch(IOException e)\n {\n System.out.println(e);\n return null;\n }\n }\n return runners; \n }",
"public List<UsrMain> getListUsers() {\n return mobileCtrl.getListUsers();\n }",
"public GridletList getGridletList() {\n return receiveJobs;\n }",
"public List<Installment> getReturnInstallments() {\n return returnInstallments;\n }",
"public List<Script> getWatchedScripts() {\n try {\n return new ArrayList<Script>(watchedScripts);\n } finally {\n }\n }",
"public Iterable<Elevator> getElevators() {\n return mElevators;\n }",
"public java.util.List<DataLakeSource> getDataLakeSources() {\n return dataLakeSources;\n }",
"Collection<GameEnvironment> getPendingGames();",
"public List<ServerHardware> getServers();",
"public LauncherPanel getLauncherPanel(){\n return this.launcherPanel;\n }",
"public java.util.List<java.lang.String> getDebugRunningsList() {\n return java.util.Collections.unmodifiableList(result.debugRunnings_);\n }",
"public Set<ProcessReader> getProcesses();",
"public java.util.List<UserOuterClass.ExperimentInfo> getExperimentsList() {\n if (experimentsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(experiments_);\n } else {\n return experimentsBuilder_.getMessageList();\n }\n }",
"public static ArrayList<String> getAvailableParts() {\n ArrayList<String> allParts = new ArrayList<String>();\n String pattern = \"_db.dat\";\n File dir = new File(getRapidSmithPath() + File.separator + \"devices\");\n if (!dir.exists()) {\n MessageGenerator.briefErrorAndExit(\"ERROR: No part files exist. Please run \" +\n Installer.class.getCanonicalName() + \" to create part files.\");\n }\n for (String partFamily : dir.list()) {\n File partDir = new File(dir.getAbsolutePath() + File.separator + partFamily);\n for (String part : partDir.list()) {\n if (part.endsWith(pattern)) {\n allParts.add(part.replace(pattern, \"\"));\n }\n }\n }\n return allParts;\n }",
"public List getRequestedDataSources() {\r\n\t\treturn requestedDataSources;\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n public <O> List<O> activeVersions() {\n return (List<O>) journal.journal\n .retrieve(BarbelQueries.allActive(journal.id), BarbelQueryOptions.sortAscendingByEffectiveFrom())\n .stream().map(d -> journal.processingState.expose(journal.context, (Bitemporal) d))\n .collect(Collectors.toList());\n }",
"public List<OpenPlayer> getOpenPlayers() {\r\n if(actuelAktionators.isEmpty()){\r\n throw new IllegalStateException(\"In der Liste der Spieler muss mindestens ein Spieler sein (der Hoechtbietende)\");\r\n }\r\n return actuelAktionators;\r\n }",
"@Override\n\tpublic List<RestaurantDTO> getStoreList() {\n\t\treturn adminDao.getStoreList();\n\t}",
"public RunConfiguration[] getRunConfigurations()\n\t{\n\t\treturn runConfigurations;\n\t}",
"public List<Object> getCrawlersLocalData()\n\t{\n\t\treturn crawlersLocalData;\n\t}",
"Collection<String> getSavedEntries() {\n return Collections.unmodifiableCollection(savedEntries);\n }",
"public List<ProvisioningEntity> retrieveGrouperProvisioningEntities() {\n List<ProvisioningEntity> grouperProvisioningEntities = new ArrayList<ProvisioningEntity>();\n for (ProvisioningEntityWrapper provisioningEntityWrapper : this.provisioningEntityWrappers) {\n ProvisioningEntity grouperProvisioningEntity = provisioningEntityWrapper.getGrouperProvisioningEntity();\n if (grouperProvisioningEntity != null) {\n grouperProvisioningEntities.add(grouperProvisioningEntity);\n }\n }\n return grouperProvisioningEntities;\n }",
"private void getPlayerList(){\r\n\r\n PlayerDAO playerDAO = new PlayerDAO(Statistics.this);\r\n players = playerDAO.readListofPlayerNameswDefaultFirst();\r\n\r\n }",
"@Override\n\tpublic ArrayList<PowerUp> getRunningModePowerUps(String username) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic List<Store> findAll() {\n\t\treturn storeRepository.findAll();\n\t}",
"private List<ExtensionClassLoader> getClassLoaders() {\n final List<ExtensionClassLoader> classLoaders = new ArrayList<>();\n\n // start with the class loader that loaded ExtensionManager, should be WebAppClassLoader for API WAR\n final ExtensionClassLoader frameworkClassLoader = new ExtensionClassLoader(\"web-api\", new URL[0], this.getClass().getClassLoader());\n classLoaders.add(frameworkClassLoader);\n\n // we want to use the system class loader as the parent of the extension class loaders\n ClassLoader systemClassLoader = FlowPersistenceProvider.class.getClassLoader();\n\n // add a class loader for each extension dir\n final Set<String> extensionDirs = properties.getExtensionsDirs();\n for (final String dir : extensionDirs) {\n if (!StringUtils.isBlank(dir)) {\n final ExtensionClassLoader classLoader = createClassLoader(dir, systemClassLoader);\n if (classLoader != null) {\n classLoaders.add(classLoader);\n }\n }\n }\n\n return classLoaders;\n }",
"public List<String> getWindowsList() {\r\n\t\treturn new ArrayList<String>();\r\n\t}",
"public List<RunningQuery> getRunningQueries() {\n return jdbi.withHandle(handle -> {\n handle.registerRowMapper(ConstructorMapper.factory(RunningQuery.class));\n return handle.createQuery(RunningQuery.extractQuery)\n .mapTo(RunningQuery.class)\n .list();\n });\n }",
"@Override\n\tpublic List<Resume> all() {\n\t\treturn resumeMapper.all();\n\t}"
] | [
"0.7623172",
"0.6191944",
"0.5892019",
"0.5775486",
"0.5727795",
"0.5727382",
"0.56900877",
"0.5689316",
"0.55893034",
"0.55248237",
"0.5456933",
"0.54519546",
"0.5400729",
"0.5399305",
"0.53888696",
"0.53835106",
"0.53627264",
"0.53152066",
"0.531029",
"0.5300954",
"0.52992904",
"0.5274522",
"0.5202731",
"0.5196436",
"0.51928824",
"0.5168202",
"0.51655763",
"0.5164555",
"0.5148342",
"0.51388323",
"0.5138428",
"0.51382",
"0.5135297",
"0.5130821",
"0.51234275",
"0.51201725",
"0.51176053",
"0.5111002",
"0.51013976",
"0.507473",
"0.50698924",
"0.506387",
"0.50629115",
"0.50443864",
"0.50349677",
"0.503458",
"0.5032162",
"0.5031387",
"0.5031023",
"0.50234276",
"0.5020395",
"0.50178206",
"0.49927962",
"0.49867308",
"0.4986521",
"0.49795952",
"0.49794897",
"0.497766",
"0.4974585",
"0.49718034",
"0.4959397",
"0.49562868",
"0.49521255",
"0.49470165",
"0.49417198",
"0.49345636",
"0.4933763",
"0.49157935",
"0.49146205",
"0.49129033",
"0.49100143",
"0.49086428",
"0.49021387",
"0.4895766",
"0.48951825",
"0.48876998",
"0.488524",
"0.48830137",
"0.4874714",
"0.4871342",
"0.48713052",
"0.48701003",
"0.486972",
"0.48625314",
"0.48601928",
"0.48589033",
"0.48588473",
"0.48563308",
"0.4853817",
"0.4853607",
"0.4853299",
"0.48516378",
"0.48443377",
"0.48422498",
"0.48416257",
"0.48354015",
"0.48336893",
"0.4827854",
"0.48261657",
"0.48199105"
] | 0.6809147 | 1 |
Mark a launcher by the given subdomain as busy. | public boolean markLauncherAsBusyBySubDomain(String launcherSubDomain) {
return markLauncherAsBusy(launcherSubDomain + "." + rootDomainName);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean markLauncherAsFreeBySubDomain(String launcherSubDomain) {\n return markLauncherAsFree(launcherSubDomain + \".\" + rootDomainName);\n }",
"public boolean markLauncherAsBusy(String launcherUrl) {\n if (persistence.launcherExists(launcherUrl)) {\n return persistence.markLauncherAsBusy(launcherUrl);\n }\n\n return false;\n }",
"private void setBusy(final boolean busy) {\n\t\tthis.busy = busy;\n\t}",
"public abstract void setBusy (String description);",
"public void setBusy(boolean busy) {\n\t\tthis.busy = busy;\n\t}",
"public void setBusy(boolean flag) {\n isBusy = flag;\n }",
"public synchronized void makeBusy(){\n isBusy = true;\n }",
"public static synchronized void bookTheDevice(Device device) {\n deviceStatusMap.put(device, \"busy\");\n logUtility.logDebug(\"Marked \" + device.getDeviceName() + \" as busy.\");\n }",
"public boolean setBusy (int reg, int rob_id) {\n\t\tif (!isBusy(reg)) {\n\t\t\ttemporary[reg].setBusy(rob_id);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"@NoProxy\n @IcalProperty(pindex = PropertyInfoIndex.BUSYTYPE,\n vavailabilityProperty = true)\n public void setBusyType(final int val) {\n busyType = val;\n }",
"public synchronized void makeAvailable(){\n isBusy = false;\n }",
"public void setBusyInternal(boolean z) {\n setBusy(1, z);\n }",
"public void setBusy() {\n\t\tlabelReady.setEnabled(false);\n\t\tlabelBusy.setEnabled(true);\n\t\tsetStatusBar(WAIT_MOVE_MSG);\n\t}",
"public boolean markLauncherAsFree(String launcherUrl) {\n if (persistence.launcherExists(launcherUrl)) {\n return persistence.markLauncherAsFree(launcherUrl);\n }\n\n return false;\n }",
"@NoProxy\n public void addFreeBusyPeriod(final BwFreeBusyComponent val) {\n List<BwFreeBusyComponent> fbps = getFreeBusyPeriods();\n\n if (fbps == null) {\n fbps = new ArrayList<>();\n setFreeBusyPeriods(fbps);\n }\n\n fbps.add(val);\n }",
"void indicateRunning()\n {\n try {\n runningLock = lockChannel.lock(STARTING, RUNNING - STARTING, false);\n notYetRunningLock.release();\n }\n catch (IOException e) {\n throw new RuntimeException(\"Cannot lock pid file: \" + e);\n }\n\n notYetRunningLock = null;\n }",
"public void setBusyIconCls(String busyIconCls) {\n\t\tthis.busyIconCls = busyIconCls;\n\t\thandleConfig(\"busyIconCls\", busyIconCls);\n\t}",
"public void pauseApp() {\n theIsRunning = false;\n }",
"public void makegoaway(){\n if (!started_app){ // added to prevent running two copies when user clicks to skip\n // and when time runs out for splash\n Intent mainIntent = new Intent(SplashActivity.this,MainActivity.class);\n SplashActivity.this.startActivity(mainIntent);\n SplashActivity.this.finish();\n started_app=true;\n }\n }",
"public void setBakery (boolean b)\n {\n bakery = b;\n }",
"void markInactive();",
"public synchronized void setReady(String ip, boolean rdy){\n\t\tready.put(ip, rdy);\n\t\tsetChanged();\n\t\tnotifyAll();\n\t}",
"void doCheckHealthy();",
"@Override\n public int appEarlyNotResponding(String processName, int pid, String annotation) throws RemoteException {\n Log.i(TAG, String.format(\"Early warning about application %s (pid %d) not responding: %s\", processName, pid, annotation));\n return 0;\n }",
"private void startAppLockWorker() {\n\n OneTimeWorkRequest oneTimeWorkRequest = new OneTimeWorkRequest.Builder(AppLockWorker.class).build();\n WorkManager.getInstance(getApplicationContext()).enqueueUniqueWork(Constants.APPLOCKWORK, ExistingWorkPolicy.REPLACE,oneTimeWorkRequest);\n }",
"public void signalFree() {\n lock.lock();\n try {\n Log.d(TAG, \"Signaling NsdManager Resolver as free\");\n busy = false;\n condition.signal();\n } finally {\n lock.unlock();\n }\n }",
"@ZAttr(id=607)\n public void setFreebusyExchangeURL(String zimbraFreebusyExchangeURL) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraFreebusyExchangeURL, zimbraFreebusyExchangeURL);\n getProvisioning().modifyAttrs(this, attrs);\n }",
"private void updateBusyIcon() {\n this.jLabelIcon.setIcon( getSelectedBusyICon() );\n }",
"private void handleNewPackageInstalled(String packageName, int userHandle) {\n if (!getUserData(userHandle).mAppsSuspended) {\n return;\n }\n final String[] packagesToSuspend = { packageName };\n // Check if package is considered not suspendable?\n if (mInjector.getPackageManager(userHandle)\n .getUnsuspendablePackages(packagesToSuspend).length != 0) {\n Slogf.i(LOG_TAG, \"Newly installed package is unsuspendable: \" + packageName);\n return;\n }\n try {\n mIPackageManager.setPackagesSuspendedAsUser(packagesToSuspend, true /*suspend*/,\n null, null, null, PLATFORM_PACKAGE_NAME, userHandle);\n } catch (RemoteException ignored) {\n // shouldn't happen.\n }\n }",
"public void setBusyText(String busyText) {\n\t\tthis.busyText = busyText;\n\t\thandleConfig(\"busyText\", busyText);\n\t}",
"@Override\n public void run() {\n // This method will be executed once the timer is over\n // Start your app main activity\n if (serverUrl != null)\n emerTokenApiCall();\n else {\n Bundle bndlanimation = ActivityOptions.makeCustomAnimation(SplashScreenActivity.this, R.anim.anim_out, R.anim.anim_in).toBundle();\n Intent i = new Intent(SplashScreenActivity.this, CompanyDomainActivity.class);\n startActivity(i, bndlanimation);\n SplashScreenActivity.this.finish();\n }\n\n }",
"public void setLaunched();",
"public boolean isBusy();",
"public ProgressMonitor createSubTaskMonitor(String allTicks, boolean b) {\n\t\treturn null;\n\t}",
"public void onForceAllAppsStandbyChanged(AppStateTracker sender) {\n updateAllJobs();\n if (!sender.isForceAllAppsStandbyEnabled()) {\n unblockAllUnrestrictedAlarms();\n }\n }",
"@GuardedBy(\"mLock\")\n public boolean updateForcedAppStandbyUidPackageLocked(int uid, String packageName, boolean restricted) {\n int index = findForcedAppStandbyUidPackageIndexLocked(uid, packageName);\n if ((index >= 0) == restricted) {\n return false;\n }\n if (restricted) {\n this.mRunAnyRestrictedPackages.add(Pair.create(Integer.valueOf(uid), packageName));\n } else {\n this.mRunAnyRestrictedPackages.removeAt(index);\n }\n return true;\n }",
"public abstract boolean killNotDrawnAppsWhenFrozen();",
"private static void setFailed() {\n HealthCheck.failed = true;\n }",
"@Override\n public boolean isBusy() {\n return false;\n }",
"public void onExemptChanged(AppStateTracker sender) {\n updateAllJobs();\n unblockAllUnrestrictedAlarms();\n }",
"@Override\n public void walletBusyChange(boolean newWalletIsBusy) {\n if (super.bitcoinController.getModel().getActivePerWalletModelData().isBusy()) {\n // Wallet is busy with another operation that may change the private keys - Action is disabled.\n putValue(SHORT_DESCRIPTION, this.bitcoinController.getLocaliser().getString(\"multiBitSubmitAction.walletIsBusy\", \n new Object[]{controller.getLocaliser().getString(this.bitcoinController.getModel().getActivePerWalletModelData().getBusyTaskKey())}));\n setEnabled(false); \n } else {\n // Enable unless wallet has been modified by another process.\n if (!super.bitcoinController.getModel().getActivePerWalletModelData().isFilesHaveBeenChangedByAnotherProcess()) {\n putValue(SHORT_DESCRIPTION, this.bitcoinController.getLocaliser().getString(\"createNewReceivingAddressSubmitAction.tooltip\"));\n setEnabled(true);\n }\n \n // Make sure the cancel button is enabled.\n createNewReceivingAddressPanel.getCancelButton().setEnabled(true);\n }\n }",
"private void markNeedRestartADBServer() {\n Log.d(\"mark mNeedRestartAdbServer to true\");\n mNeedRestartAdbServer = true;\n mStatus = STATUS.FINISHED;\n notifyResultObserver();\n return;\n }",
"public boolean isBusy (int reg) {\n\t\treturn finalized[reg].isBusy();\n\t}",
"@Override\n\tpublic boolean isBusy() {\n\t\treturn false;\n\t}",
"public void setRunning(boolean b) {\n mRun = b;\n }",
"public synchronized void notifyForegroundApp(String packageName) {\n if (packageName != null) {\n if (!packageName.equals(this.mLatestPgName)) {\n NeuronAppRecord app = (NeuronAppRecord) this.mAppUsageMap.get(packageName);\n if (app == null) {\n app = new NeuronAppRecord(packageName);\n app.dataList.pushToHead(new AppDataNode());\n this.mAppUsageMap.put(packageName, app);\n }\n long currentTime = System.currentTimeMillis();\n app.lastestResumeTime.pushToHead(Long.valueOf(currentTime));\n AppDataNode latestAppData = (AppDataNode) app.dataList.getLatest();\n Long latestPause = (Long) app.latestPauseTime.getLatest();\n if (!(latestAppData == null || latestPause == null || latestPause.longValue() <= 0)) {\n long bgTime = currentTime - latestPause.longValue();\n if (bgTime < latestAppData.minBgTime) {\n latestAppData.minBgTime = bgTime;\n }\n if (bgTime > latestAppData.maxBgTime) {\n latestAppData.maxBgTime = bgTime;\n }\n latestAppData.totalBgTime += bgTime;\n }\n NeuronAppRecord removedApp = (NeuronAppRecord) this.mAppUsageList.pushToHead(app);\n if (removedApp != null) {\n this.mAppUsageMap.remove(removedApp.packageName);\n }\n pauseLatestApp(currentTime);\n this.mLatestAppUsage = app;\n this.mLatestPgName = packageName;\n }\n }\n }",
"private void initiateBreak(){\n\tDo(\"Starting to go on break\");\n\thost.msgChangeWorkStatus(this, false);\n\tworking = false;\n\tstateChanged();\n }",
"@NoProxy\n @IcalProperty(pindex = PropertyInfoIndex.FREEBUSY,\n freeBusyProperty = true)\n public void setFreeBusyPeriods(final List<BwFreeBusyComponent> val) {\n freeBusyPeriods = val;\n }",
"private void wake_up() {\n switch(state) {\n case ROAMING:\n case WAKING:\n case AWAKE:\n return;\n }\n\n state = State.WAKING;\n\n // Lock wifi so we don't lose contact with the server -- we can only talk to it via our\n // wifi network, the fallback to cell service is not ok.\n if(wifi_lock == null) {\n WifiManager wifiManager = (WifiManager) getSystemService(WIFI_SERVICE);\n wifi_lock = wifiManager.createWifiLock(\"ServerLock\");\n wifi_lock.setReferenceCounted(false);\n }\n wifi_lock.acquire();\n\n // Create an 'ongoing' intent so we're considered a 'foreground' service and not killed.\n // Plus, it's kind of nice to have the notification anyway.\n Intent app_intent = new Intent(this, MainActivity.class);\n app_intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);\n PendingIntent app_pi = PendingIntent.getActivity(this, 0, app_intent, 0);\n\n Intent sleep_intent = new Intent(this, ServerWakeService.class);\n sleep_intent.setAction(Constants.SLEEP_INTENT);\n PendingIntent sleep_pi = PendingIntent.getService(this, 0, sleep_intent, 0);\n\n Notification note = new Notification.Builder(this)\n .setSmallIcon(R.drawable.sleep_icon)\n .setContentTitle(\"ServerLock\")\n .setTicker(\"ServerLock\")\n .setContentText(\"Keeping the server awake...\")\n .setContentIntent(app_pi)\n .setOngoing(true)\n .addAction(android.R.drawable.ic_lock_power_off, \"Allow sleep\", sleep_pi)\n .build();\n\n startForeground(Constants.NOTIFICATION_ID.FOREGROUND_SERVICE, note);\n\n // Start a worker thread that will connect to the server and do the actual work.\n if(worker == null) {\n worker = new Thread(new Runnable() {\n @Override\n public void run() {\n keep_server_up();\n }\n });\n worker.start();\n }\n\n // Update the UI, if it's open.\n send_status_update();\n }",
"protected boolean setActive(String appName) {\n try {\n File active = appFile(appName, \"active\");\n createParentDirs(active);\n return active.createNewFile() && updateTime(appName);\n } catch (IOException e) {\n log.warn(\"Unable to mark app {} as active\", appName, e);\n throw new ApplicationException(\"Unable to mark app as active\", e);\n }\n }",
"public void setPending()\n\t{\n\t\tprogressBar.setString(XSTR.getString(\"progressBarWaiting\"));\n\t\tprogressBar.setIndeterminate(true);\n\t\tprogressBar.setValue(0);\n\t\t\n\t\tstoplightPanel.setPending();\n\t}",
"public void setRelaunched(boolean value) {\n this.relaunched = value;\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile(true)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tList<RunningTaskInfo> runningTasks = am.getRunningTasks(1);\n\t\t\t\t\tfor (RunningTaskInfo taskInfo : runningTasks) {\n\t\t\t\t\t\tString packageName = taskInfo.baseActivity.getPackageName();\n\t\t\t\t\t\tLog.i(\"message\", packageName);\n\t\t\t\t\t\tif(softItem.contains(packageName) && !lockSoftware.contains(packageName))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tIntent watchDogIntent = new Intent(WatchDogService.this,WatchDogActivity.class);\n\t\t\t\t\t\t\twatchDogIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\t\t\twatchDogIntent.putExtra(\"name\", packageName);\n\t\t\t\t\t\t\tstartActivity(watchDogIntent);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystemClock.sleep(4000);\n\t\t\t\t}\t\n\t\t\t}",
"public void setBreakStatus(boolean state){\n\tonBreak = state;\n\tstateChanged();\n }",
"@Test\n public void updateBusy() {\n ArrayList<Busy> b = new ArrayList<Busy>();\n b.add(new Busy(\"dummy\", 1, new Date(1970-05-07)));\n b.add(new Busy(\"dummy\", 1, new Date(1974-05-07)));\n\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n busyDAO.createBusy(new Busy(\"dummy\", 1, new Date(1970-05-07)));\n\n assertTrue(busyResource.updateBusy(b));\n\n //clean up\n busyDAO.removeBusy(new Date(1974-05-07), 1, \"dummy\");\n userDAO.removeUser(\"dummy\");\n }",
"public void onPowerSaveWhitelistedChanged(AppStateTracker sender) {\n updateAllJobs();\n }",
"private void startrun() {\n mHandler.postDelayed(mPollTask, POLL_INTERVAL);\n\t}",
"public void setReadyToRun(boolean ready);",
"public void setRunning(boolean isrunning) {\r\n running = isrunning;\r\n }",
"void statusUpdate(boolean invalid);",
"public void setSuspended() {\n \tfor (int i = 0; i < listAnimals.size(); i++) \n\t\t{\n\t\t\tlistAnimals.get(i).setSuspended();\n\t\t\trepaint();\n\t\t}\n }",
"@Override\n public void run() {\n try{\n for(int n = 0;n < 20; n++){\n //This simulates 1sec of busy activity\n Thread.sleep(1000);\n //now talk to the ain thread\n myHandler.post(foregroundTask);\n }\n }catch (InterruptedException e){\n e.printStackTrace();\n }\n }",
"private void notifyLoadMonitor(String instanceId, ExecutorStatus status)\n\t{\n\t\tif (m_loadMonitors.containsKey(instanceId))\n\t\t{\n\t\t\tm_loadMonitors.get(instanceId).setProcedureStatus(status);\n\t\t}\n\t}",
"void reschedule(Group groupInfo, boolean miss);",
"public void startupProcess() {\n Timer startupTimer = new Timer();\n TimerTask startupTask = new TimerTask() {\n @Override\n public void run() {\n finishStartup();\n }\n };\n if (this.offlineButton.isSelected() == true) {\n this.statusLed.setStatus(\"warning\");\n } else {\n this.statusLed.setStatus(\"ok\");\n }\n this.statusLed.setSlowBlink(true);\n this.offlineButton.setDisable(true);\n this.shutdownButton.setDisable(true);\n startupTimer.schedule(startupTask, 10000l);\n }",
"public void setAvailable(boolean x){\n availabile = x;\n }",
"@Override\n public void onRoboboManagerStarted(RoboboManager robobom) {\n robobo = robobom;\n\n //dismiss the wait dialog\n waitDialog.dismiss();\n\n //start the \"custom\" robobo application\n\n startRoboboApplication();\n\n }",
"void markAbandoned();",
"private void init() {\n healthCheckTimer.newTimeout(\n new TimerTask() {\n @Override\n public void run(Timeout timeout) throws Exception {\n if (!isStop) {\n List<BrpcChannel> newHealthyInstances = new ArrayList<BrpcChannel>();\n Iterator<BrpcChannel> iter = unhealthyInstances.iterator();\n while (iter.hasNext()) {\n BrpcChannel instance = iter.next();\n boolean isHealthy = isInstanceHealthy(instance.getIp(), instance.getPort());\n if (isHealthy) {\n newHealthyInstances.add(instance);\n }\n }\n\n List<BrpcChannel> newUnhealthyInstances = new ArrayList<BrpcChannel>();\n iter = healthyInstances.iterator();\n while (iter.hasNext()) {\n BrpcChannel instance = iter.next();\n boolean isHealthy = isInstanceHealthy(instance.getIp(), instance.getPort());\n if (!isHealthy) {\n newUnhealthyInstances.add(instance);\n }\n }\n\n healthyInstances.addAll(newHealthyInstances);\n unhealthyInstances.removeAll(newHealthyInstances);\n\n healthyInstances.removeAll(newUnhealthyInstances);\n unhealthyInstances.addAll(newUnhealthyInstances);\n notifyInvalidInstance(newUnhealthyInstances);\n\n healthCheckTimer.newTimeout(this,\n rpcClient.getRpcClientOptions().getHealthyCheckIntervalMillis(),\n TimeUnit.MILLISECONDS);\n }\n\n }\n },\n rpcClient.getRpcClientOptions().getHealthyCheckIntervalMillis(),\n TimeUnit.MILLISECONDS);\n }",
"public boolean busyReveiced () {\n\t\t\treturn resultDetected[RESULT_INDEX_BUSY];\n\t\t}",
"@Override\n\tpublic void setisINLINEBusy(Boolean s) {\n\t\t\n\t}",
"public void updateScanFlag() {\n Date when = new Date(System.currentTimeMillis());\n\n try {\n Intent someIntent = new Intent(this, UpdateFlags.class); // intent to be launched\n\n // note this could be getActivity if you want to launch an activity\n PendingIntent pendingIntent = PendingIntent.getBroadcast(\n context,\n 0, // id, optional\n someIntent, // intent to launch\n PendingIntent.FLAG_CANCEL_CURRENT); // PendintIntent flag\n\n AlarmManager alarms = (AlarmManager) context.getSystemService(\n Context.ALARM_SERVICE);\n\n alarms.setRepeating(AlarmManager.RTC_WAKEUP,\n when.getTime(),\n AlarmManager.INTERVAL_FIFTEEN_MINUTES,\n pendingIntent);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void onPowerSaveUnwhitelisted(AppStateTracker sender) {\n updateAllJobs();\n unblockAllUnrestrictedAlarms();\n }",
"public final void dispatcherBusy(MessageScheduler scheduler) {\n\t\t\tControlView.this.doShowWarningPaneIfNeeded(deviceUnderDisplay,\n\t\t\t\t\tscheduler, true);\n\t\t}",
"public void activate () {\n\t\tif (_timer!=null) {\n\t\t\treturn;\n\t\t}\n\t\t_timer = new Timer (\"tray-notifier\", true);\n\t\t\n\t\tfinal TimerTask task = \n\t\t\tnew TimerTask () {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tSwingUtilities.invokeLater (new Runnable () {\n\t\t\t\t\t\tpublic void run () {\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * @workaround invoca in modo asincrono la modifica tooltip\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tnotifyTray (_traySupport);\n\t\t\t\t\t\t}});\n\t\t\t\t}\n\t\t\t};\n\t\t\t\n\t\tif (_period<0) {\n\t\t\t_timer.schedule (task, _delay);\n\t\t} else {\n\t\t\t_timer.schedule (task, _delay, _period);\n\t\t}\n\t}",
"public void setPingOnIdle(boolean pingOnIdle)\n {\n _isPing = pingOnIdle;\n }",
"public boolean isBusy() {\n\t\treturn false;\n\t}",
"public void setRunning(boolean running) {\n isRunning = running;\n }",
"private void foundRunning() {\n\t\tif (state == BridgeState.RUNNING || state == BridgeState.CREATED) {\n\t\t\tstate = BridgeState.RUNNING;\n\t\t}\n\t}",
"void setSleeping(boolean sleeping);",
"public static void blockRequests() {\n\t\tsynchronized (isRunning) {\n\t\t\ttry {\n\t\t\t\tisRunning.set(false);\n\t\t\t\tisRunning.wait();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tisRunning.set(true);\n\t\t\t}\n\t\t}\n\t}",
"@Test\n public void removeBusyCatch() {\n Date date = new Date(2017-11-12);\n\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n busyDAO.createBusy(new Busy(\"dummy\", 1, date));\n\n assertFalse(busyResource.removeBusy(date, 1,\"notdummy\"));\n\n //clean up\n busyResource.removeBusy(date, 1, \"dummy\");\n userDAO.removeUser(\"dummy\");\n }",
"public void run(){\n\t\t\t\tif(!exit)\r\n\t\t\t\t{\r\n\t\t\t\tIntent mainIntent = new Intent(Splash.this,MainActivity.class);\r\n\t\t\t\tSplash.this.startActivity(mainIntent);\r\n\t\t\t\tSplash.this.finish();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// When the Splash is exiting the application\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t//android.os.Process.killProcess(android.os.Process.myPid());\r\n\t\t\t\tfinish();\r\n\t\t\t\t}\r\n\t\t\t}",
"private void registersHeartbeatJob() {\n TaskBase heartbeatJob = TaskUtils.createRepeatingTask(HeartbeatJob.class,\n TimeUnit.SECONDS.toMillis(ConstantValues.haHeartbeatIntervalSecs.getLong()),\n TimeUnit.SECONDS.toMillis(ConstantValues.haHeartbeatIntervalSecs.getLong()));\n taskService.startTask(heartbeatJob, false);\n }",
"@Override\n public int appNotResponding(String processName, int pid, String processStats) throws RemoteException {\n Log.i(TAG, String.format(\"Application %s (pid %s) is not responding: %s\", processName, pid, processStats));\n return 1;\n }",
"public void changeAvailability() {\n\t\tavailability = !availability;\n\t}",
"@Override\n public void setLoadingIndicator(boolean active) {\n\n if (active) {\n mBusyIndicator.setVisibility(View.VISIBLE);\n } else {\n mBusyIndicator.setVisibility(View.GONE);\n }\n }",
"private void setBlocked(boolean value) {\n\n blocked_ = value;\n }",
"public void signalFailureStatus() {\n \tthis.signalFailureActive = this.trainModelGUI.signalFailStatus();\n \tif(this.signalFailureActive) {\n \tthis.setGPSAntenna(true);\n \tthis.setMBOAntenna(true);\n \t} else {\n \t\tthis.setGPSAntenna(false);\n \tthis.setMBOAntenna(false);\n \t}\n\n \t\n }",
"public void setAlive(boolean x){\n \talive = x;\r\n }",
"void setRunning(boolean running) {\n this.running = running;\n }",
"void setRunning(boolean running) {\n this.running = running;\n }",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tif(flag == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tIntent mainIntent = null;\r\n\t\t\t\t\tmainIntent = new Intent(SplashActivity.this,\r\n\t\t\t\t\t\t\tMainActivity.class);\r\n\t\t\t\t\tSplashActivity.this.startActivity(mainIntent);\r\n\t\t\t\t\tSplashActivity.this.finish();\r\n\t\t\t\t}\r\n\t\t\t\telse if(flag ==1)\r\n\t\t\t\t{\r\n\t\t\t\t\tIntent mainIntent = null;\r\n\t\t\t\t\tmainIntent = new Intent(SplashActivity.this,\r\n\t\t\t\t\t\t\tRegisterActivity.class);\r\n\t\t\t\t\tSplashActivity.this.startActivity(mainIntent);\r\n\t\t\t\t\tSplashActivity.this.finish();\r\n\t\t\t\t}\r\n\t\t\t}",
"public void startBPUpdateAlarmThread() {\n\t\tbpUpdateAlarmThread=new Thread() {\n\t\t\tAlert oneMinuteAlert=new Alert(AlertType.WARNING,\"Data was not received from the BP monitor for at least one minute\",ButtonType.OK);\n\t\t\tboolean showing;\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\twhile(true) {\n\t\t\t\t\t\tDate lastUpdate=sampleFromSelectedMonitor[0].getPresentation_time();\n\t\t\t\t\t\tDate now=new Date();\n\t\t\t\t\t\tlong delta=now.getTime()-lastUpdate.getTime();\n\t\t\t\t\t\tSystem.err.println(\"BP update delta is \"+delta);\n\t\t\t\t\t\tif( delta > fiveMinutes) {\n\t\t\t\t\t\t\tstopEverything();\t//Calling stop everything will interrupt this thread.\n\t\t\t\t\t\t\treturn;\t//But return anyway.\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( delta > oneMinute && ! showing) {\n\t\t\t\t\t\t\tSystem.err.println(\"More than one minute since last update - showing oneMinuteAlert\");\n\t\t\t\t\t\t\tjavafx.application.Platform.runLater(()-> {\n\t\t\t\t\t\t\t\toneMinuteAlert.show();\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tshowing=true;\n\t\t\t\t\t\t\toneMinuteAlert.resultProperty().addListener(new ChangeListener<ButtonType>() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void changed(ObservableValue<? extends ButtonType> observable, ButtonType oldValue,\n\t\t\t\t\t\t\t\t\t\tButtonType newValue) {\n\t\t\t\t\t\t\t\t\tif(newValue.equals(ButtonType.OK)) {\n\t\t\t\t\t\t\t\t\t\tshowing=false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsleep(5000);\n\t\t\t\t\t}\n\t\t\t\t} catch (InterruptedException ie) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tbpUpdateAlarmThread.start();\n\t}",
"public void isRunning(boolean isRunning)\r\n {\r\n _isRunning = isRunning;\r\n\r\n }",
"synchronized void setOneshot( boolean value )\n {\n _cyclicTimer = ! value;\n }",
"public void setRunning(boolean running) \n\t {\n\t\t \n\t\t _running = running;\n\t\t \n\t }",
"public void setDead(boolean value);",
"private void unregisterLauncherIfExists(String launcherUrl) {\n log.info(\"Unregistering launcher [URL] \" + launcherUrl);\n if (persistence.launcherExists(launcherUrl)) {\n persistence.unregisterLauncher(launcherUrl);\n } else {\n log.debug(\"Launcher URL not found: \" + launcherUrl);\n }\n }",
"public void setRunning(boolean running)\n\t{\n\t\tthis.running = running;\n\t}"
] | [
"0.63634485",
"0.5992416",
"0.56236637",
"0.5496863",
"0.54651505",
"0.5454036",
"0.53765106",
"0.53210294",
"0.52380013",
"0.50518626",
"0.49777427",
"0.4892478",
"0.48398376",
"0.47534",
"0.47482517",
"0.47358984",
"0.47358546",
"0.4713657",
"0.4709944",
"0.47098687",
"0.46738136",
"0.46620286",
"0.4652601",
"0.46236163",
"0.45916408",
"0.45795393",
"0.45692208",
"0.4548616",
"0.4543832",
"0.44982305",
"0.44696203",
"0.44641113",
"0.4448577",
"0.44359526",
"0.44331414",
"0.4430599",
"0.44279233",
"0.442553",
"0.44216114",
"0.4420241",
"0.44169348",
"0.44150814",
"0.441198",
"0.44112885",
"0.4405116",
"0.4388799",
"0.43822315",
"0.43734643",
"0.43672147",
"0.43665874",
"0.43665788",
"0.43578857",
"0.4347351",
"0.4346191",
"0.43369728",
"0.43322754",
"0.43273026",
"0.43247452",
"0.43130454",
"0.43065247",
"0.43002504",
"0.429628",
"0.4273876",
"0.42676488",
"0.4267422",
"0.42626715",
"0.42561096",
"0.42522758",
"0.4247565",
"0.42442355",
"0.42381638",
"0.42335248",
"0.423013",
"0.4228862",
"0.42222628",
"0.4212041",
"0.42114878",
"0.42104504",
"0.4208117",
"0.41979027",
"0.41961598",
"0.41906768",
"0.41897964",
"0.41844177",
"0.41788357",
"0.4178054",
"0.41748005",
"0.4173967",
"0.4171629",
"0.41620445",
"0.41512161",
"0.41512161",
"0.41500026",
"0.41486728",
"0.41461676",
"0.41458076",
"0.4143767",
"0.41428313",
"0.41420162",
"0.4137693"
] | 0.7893404 | 0 |
Mark the given launcher URL as busy. | public boolean markLauncherAsBusy(String launcherUrl) {
if (persistence.launcherExists(launcherUrl)) {
return persistence.markLauncherAsBusy(launcherUrl);
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean markLauncherAsBusyBySubDomain(String launcherSubDomain) {\n return markLauncherAsBusy(launcherSubDomain + \".\" + rootDomainName);\n }",
"public boolean markLauncherAsFree(String launcherUrl) {\n if (persistence.launcherExists(launcherUrl)) {\n return persistence.markLauncherAsFree(launcherUrl);\n }\n\n return false;\n }",
"public synchronized void makeBusy(){\n isBusy = true;\n }",
"public void setBusy(boolean flag) {\n isBusy = flag;\n }",
"private void setBusy(final boolean busy) {\n\t\tthis.busy = busy;\n\t}",
"public abstract void setBusy (String description);",
"public void setBusy(boolean busy) {\n\t\tthis.busy = busy;\n\t}",
"public synchronized void makeAvailable(){\n isBusy = false;\n }",
"public void setBusy() {\n\t\tlabelReady.setEnabled(false);\n\t\tlabelBusy.setEnabled(true);\n\t\tsetStatusBar(WAIT_MOVE_MSG);\n\t}",
"public boolean isBusy();",
"public void setBusyInternal(boolean z) {\n setBusy(1, z);\n }",
"public boolean shouldScheduleURL(URLInfo url);",
"@ZAttr(id=607)\n public void setFreebusyExchangeURL(String zimbraFreebusyExchangeURL) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraFreebusyExchangeURL, zimbraFreebusyExchangeURL);\n getProvisioning().modifyAttrs(this, attrs);\n }",
"private boolean taskForUrlAlreadyRunning(String url) {\n return imageDownloadTaskMap.get(url) != null;\n }",
"private void unregisterLauncherIfExists(String launcherUrl) {\n log.info(\"Unregistering launcher [URL] \" + launcherUrl);\n if (persistence.launcherExists(launcherUrl)) {\n persistence.unregisterLauncher(launcherUrl);\n } else {\n log.debug(\"Launcher URL not found: \" + launcherUrl);\n }\n }",
"public void enqueue(String url) {\n while(is_locked){\n try {\n // timer_counter = timer_counter + 1;\n // if (timer_counter == 20) {\n // is_locked = false;\n // }\n Thread.sleep(100);\n } catch(InterruptedException ex) {\n Thread.currentThread().interrupt();\n }\n }\n\n is_locked = true;\n queue.add(url);\n is_locked = false;\n \n }",
"public void setBusyIconCls(String busyIconCls) {\n\t\tthis.busyIconCls = busyIconCls;\n\t\thandleConfig(\"busyIconCls\", busyIconCls);\n\t}",
"@Override\n public boolean isBusy() {\n return false;\n }",
"private void updateBusyIcon() {\n this.jLabelIcon.setIcon( getSelectedBusyICon() );\n }",
"@Override\n\tpublic boolean isBusy() {\n\t\treturn false;\n\t}",
"public void setURL(String url) {\n\t\tboolean changed = url==null ? this.url!=null : !url.equals(this.url);\n\t\tif (changed) {\n\t\t\tstop();\n\t\t\tthis.url = url;\n\t\t\tstart();\n\t\t}\n\t}",
"@NoProxy\n @IcalProperty(pindex = PropertyInfoIndex.BUSYTYPE,\n vavailabilityProperty = true)\n public void setBusyType(final int val) {\n busyType = val;\n }",
"public static synchronized void bookTheDevice(Device device) {\n deviceStatusMap.put(device, \"busy\");\n logUtility.logDebug(\"Marked \" + device.getDeviceName() + \" as busy.\");\n }",
"public boolean isBusy() {\n\t\treturn false;\n\t}",
"@Override\n public native void setAutoWaitForIdle(boolean isOn);",
"public void makegoaway(){\n if (!started_app){ // added to prevent running two copies when user clicks to skip\n // and when time runs out for splash\n Intent mainIntent = new Intent(SplashActivity.this,MainActivity.class);\n SplashActivity.this.startActivity(mainIntent);\n SplashActivity.this.finish();\n started_app=true;\n }\n }",
"public void turnOnRss(final String url) {\n ParseFeedTask task = tasks.get(url);\n if (task == null) {\n System.out.println(String.format(\"Rss with url %s is not found\", url));\n return;\n }\n RssConfiguration configuration = task.getConfiguration();\n if (configuration.getTurnOn()) {\n System.out.println(\"Rss is already running\");\n return;\n }\n configuration.setTurnOn(true);\n try {\n PropertiesHandler.writeProperties(configuration);\n ScheduledFuture future = scheduledExecutorService.scheduleWithFixedDelay(task, configuration.getPollPeriod(), configuration.getPollPeriod(), TimeUnit.SECONDS);\n futures.put(url, future);\n System.out.println(String.format(\"Rss %s is running\", url));\n } catch (IOException e) {\n System.out.println(String.format(\"An error occurred during the change poll period for feed %s\", url));\n }\n }",
"public void setIdleUri(java.lang.String param) {\n localIdleUriTracker = true;\n\n this.localIdleUri = param;\n }",
"public void setBusyText(String busyText) {\n\t\tthis.busyText = busyText;\n\t\thandleConfig(\"busyText\", busyText);\n\t}",
"public void setUrlFocusChangeInProgress(boolean inProgress) {\n mLocationBarMediator.setUrlFocusChangeInProgress(inProgress);\n }",
"@Override\n public void setLoadingIndicator(boolean active) {\n\n if (active) {\n mBusyIndicator.setVisibility(View.VISIBLE);\n } else {\n mBusyIndicator.setVisibility(View.GONE);\n }\n }",
"public void setPingOnIdle(boolean pingOnIdle)\n {\n _isPing = pingOnIdle;\n }",
"public static void blockRequests() {\n\t\tsynchronized (isRunning) {\n\t\t\ttry {\n\t\t\t\tisRunning.set(false);\n\t\t\t\tisRunning.wait();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tisRunning.set(true);\n\t\t\t}\n\t\t}\n\t}",
"protected void loadURL(String thisURL) {\n\t\tgetDriver().get(thisURL);\n\t\ttry {\n\t\t\tThread.sleep(2000);\n\t\t} catch (Exception e) {\n\t\t\t// nothing\n\t\t}\n\t}",
"@Override\n public void onPageStarted(WebView view, String url, Bitmap favicon) {\n super.onPageStarted(view, url, favicon);\n progressBusy.setVisibility(View.VISIBLE);\n }",
"public void setPending()\n\t{\n\t\tprogressBar.setString(XSTR.getString(\"progressBarWaiting\"));\n\t\tprogressBar.setIndeterminate(true);\n\t\tprogressBar.setValue(0);\n\t\t\n\t\tstoplightPanel.setPending();\n\t}",
"public boolean isBusyLoading() {\n\t\treturn false; // return (AppStatusLine.isBusyLoading());\n\t}",
"public void checkOffTask() {\n isDone = true;\n }",
"@WorkerThread @UiThread\n public void setBitmapsLowRes(String url, Bitmap bitmap) {\n synchronized (this) {\n this.bitmapsLowRes.put(url, bitmap);\n }\n\n // Tell all registered views that a bitmap changed\n notifyViews(Event.BITMAP_LOWRES_CHANGED);\n }",
"public synchronized boolean isBusy(){\n return isBusy;\n }",
"public synchronized static void invalidate(String url){\n\t\tLog.i(\"FILEBANK\", \"Invalidating \"+hashURL(url));\n\t\tnew File(context.getCacheDir(), hashURL(url)).delete();\n\t}",
"public boolean setBusy (int reg, int rob_id) {\n\t\tif (!isBusy(reg)) {\n\t\t\ttemporary[reg].setBusy(rob_id);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isBusy() {\n return isBusy;\n }",
"@Override\n public Bitmap getImage(String url) {\n try {\n if (!taskForUrlAlreadyRunning(url)) {\n imageDownloadTaskMap.put(url, startDownload(url));\n }\n } catch (MalformedURLException e) {\n Log.i(\"ImageDownloadManager\", \"Malformed url\" + url);\n }\n return null;\n }",
"private void createAndStartNetworkCheckThread(final Shell shell,\n final ToolItem widgetItem, final Image off, final Image on) {\n new Thread(new Runnable() {\n \t\t\tpublic void run() {\n \t\t\t\twhile (!stop) {\n \t\t\t\t\ttry {\n \t\t\t\t\t\tThread.sleep(5000);\n \t\t\t\t\t} catch (Exception e) {\n \t\t\t\t\t\tlog.error(e.getMessage());\n \t\t\t\t\t}\n \t\t\t\t\tif (!shell.isDisposed()) {\n \t\t\t\t\t\ttoolbar.getDisplay().asyncExec(new Runnable() {\n \t\t\t\t\t\t\tpublic void run() {\n \t\t\t\t\t\t\t\tif (isInternetReachable()) {\n \t\t\t\t\t\t\t\t\tlog.info(\"Connection - ON\");\n \t\t\t\t\t\t\t\t\twidgetItem.setImage(on);\n \t\t\t\t\t\t\t\t} else {\n \t\t\t\t\t\t\t\t\tlog.info(\"Connection - OFF\");\n \t\t\t\t\t\t\t\t\twidgetItem.setImage(off);\n \t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t});\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}).start();\n }",
"private void setOnline(String urlConfig) {\n switch (status) {\n case SERVER_DOWN:\n case URL_UNSET:\n logger.debug(\"Status changing from \" + status + \" to \"\n + Status.SERVER_UP);\n broadcastMessage(urlConfig);\n status = Status.SERVER_UP;\n break;\n default:\n logger.debug(\"SetOnline: Status not changed from \" + status);\n // no action\n }\n }",
"public boolean isBusy() {\n\t\treturn this.call != null;\n\t}",
"synchronized void setOneshot( boolean value )\n {\n _cyclicTimer = ! value;\n }",
"@Override\n public void run() {\n try{\n for(int n = 0;n < 20; n++){\n //This simulates 1sec of busy activity\n Thread.sleep(1000);\n //now talk to the ain thread\n myHandler.post(foregroundTask);\n }\n }catch (InterruptedException e){\n e.printStackTrace();\n }\n }",
"private void updateBusyIconModel() {\n this.modelIcon.setBusy( this.jCheckBoxBusy.isSelected() );\n this.modelIcon.setDeterminate( this.jCheckBoxDeterminate.isSelected() );\n this.modelIcon.setMinimum( this.jSlider.getMinimum() );\n this.modelIcon.setMaximum( this.jSlider.getMaximum() );\n this.modelIcon.setValue( this.jSlider.getValue() );\n }",
"public boolean isBusy() {\n\t\treturn isBusy;\n\t}",
"private void reportNewIdleState(boolean idle) {\n StatusDevice.IDLE_CONSTRAINT_SATISFIED.set(idle);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n if (HaloUtils.isServiceRunning(mContext, HaloSchedulerService.class)) {\n mContext.startService(HaloSchedulerService.deviceStatusChanged(mContext, Job.STATUS_IDLE_DEVICE_KEY, false));\n } else {\n mContext.startForegroundService(HaloSchedulerService.deviceStatusChanged(mContext, Job.STATUS_IDLE_DEVICE_KEY, true));\n }\n } else {\n mContext.startService(HaloSchedulerService.deviceStatusChanged(mContext, Job.STATUS_IDLE_DEVICE_KEY, false));\n }\n }",
"@Override\n protected Boolean doInBackground(URL... urls)\n {\n PackageManager pkgMgr = getApplicationContext().getPackageManager();\n List<PackageInfo> pkgInfoList = pkgMgr.getInstalledPackages(0);\n List<PackageInfo> installedApks = new ArrayList<>();\n\n for(int i=0;i< pkgInfoList.size();i++)\n {\n PackageInfo pkg = pkgInfoList.get(i);\n if((pkg.applicationInfo.flags & pkg.applicationInfo.FLAG_SYSTEM) <= 0)\n { //user installed apks\n installedApks.add(pkg);\n }\n }\n\n for(int j=0;j<installedApks.size();j++)\n {\n if(installedApks.get(j).packageName.equals(agGamePkgName))\n {\n break;\n }\n }\n\n if( j == installedApks.size())\n {\n //AG game apk is not installed, download from internet\n try{\n downloadMgr = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);\n DownloadManager.Request downloadReq = new DownloadManager.Request(Uri.parse(agGameSite));\n downloadReq.setDestinationInExternalPublicDir(\"AG Game\",\"AGGame.apk\");\n downloadReq.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);\n downloadID = downloadMgr.enqueue(downloadReq);\n }catch(IOException ex)\n {\n ex.printStackTrace();\n }\n }\n return true;\n }",
"public void validateLauncherUrls() {\n log.info(\"Validating the existing launcher URL list for missing deployments...\");\n\n for (String launcherUrl : getTotalLaunchers()) {\n log.info(\"Validating [Launcher URL] \" + launcherUrl + \"...\");\n String objectName = getObjectNameFromLauncherUrl(launcherUrl);\n if (!runtimeClient.deploymentExists(objectName) || !runtimeClient.serviceExists(objectName)) {\n log.info(\"Found an invalid launcher [URL] \" + launcherUrl);\n // Just remove the reference to launcher now\n // cleanOrphan* jobs will clean any orphan deployments\n // desired count check will scale up if free count is reduced\n unregisterLauncherIfExists(launcherUrl);\n }\n }\n }",
"public void notifyHTTPRequest(String url);",
"public void pauseApp() {\n theIsRunning = false;\n }",
"public void turnOffRss(final String url) {\n ParseFeedTask task = tasks.get(url);\n if (task == null) {\n System.out.println(String.format(\"Rss with url %s is not found\", url));\n return;\n }\n RssConfiguration configuration = task.getConfiguration();\n if (!configuration.getTurnOn()) {\n System.out.println(\"Rss is already stopped\");\n return;\n }\n configuration.setTurnOn(false);\n try {\n PropertiesHandler.writeProperties(configuration);\n ScheduledFuture future = futures.get(url);\n if (future == null) {\n return;\n }\n future.cancel(false);\n System.out.println(String.format(\"Rss %s is stopped\", url));\n } catch (IOException e) {\n System.out.println(String.format(\"An error occurred during the change poll period for feed %s\", url));\n }\n }",
"public static void waitForURL (String url, int timer)\n\t{\n\t\tWebDriver driver = getDriver ();\n\t\tWebDriverWait wait = new WebDriverWait (driver, timer);\n\t\twait.until (ExpectedConditions.refreshed (ExpectedConditions.urlContains (url)));\n\t}",
"private void wake_up() {\n switch(state) {\n case ROAMING:\n case WAKING:\n case AWAKE:\n return;\n }\n\n state = State.WAKING;\n\n // Lock wifi so we don't lose contact with the server -- we can only talk to it via our\n // wifi network, the fallback to cell service is not ok.\n if(wifi_lock == null) {\n WifiManager wifiManager = (WifiManager) getSystemService(WIFI_SERVICE);\n wifi_lock = wifiManager.createWifiLock(\"ServerLock\");\n wifi_lock.setReferenceCounted(false);\n }\n wifi_lock.acquire();\n\n // Create an 'ongoing' intent so we're considered a 'foreground' service and not killed.\n // Plus, it's kind of nice to have the notification anyway.\n Intent app_intent = new Intent(this, MainActivity.class);\n app_intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);\n PendingIntent app_pi = PendingIntent.getActivity(this, 0, app_intent, 0);\n\n Intent sleep_intent = new Intent(this, ServerWakeService.class);\n sleep_intent.setAction(Constants.SLEEP_INTENT);\n PendingIntent sleep_pi = PendingIntent.getService(this, 0, sleep_intent, 0);\n\n Notification note = new Notification.Builder(this)\n .setSmallIcon(R.drawable.sleep_icon)\n .setContentTitle(\"ServerLock\")\n .setTicker(\"ServerLock\")\n .setContentText(\"Keeping the server awake...\")\n .setContentIntent(app_pi)\n .setOngoing(true)\n .addAction(android.R.drawable.ic_lock_power_off, \"Allow sleep\", sleep_pi)\n .build();\n\n startForeground(Constants.NOTIFICATION_ID.FOREGROUND_SERVICE, note);\n\n // Start a worker thread that will connect to the server and do the actual work.\n if(worker == null) {\n worker = new Thread(new Runnable() {\n @Override\n public void run() {\n keep_server_up();\n }\n });\n worker.start();\n }\n\n // Update the UI, if it's open.\n send_status_update();\n }",
"@WorkerThread @UiThread\n public void setBitmap(String url, Bitmap bitmap) {\n synchronized (this) {\n this.bitmaps.put(url, bitmap);\n }\n\n // Tell all registered views that a bitmap changed\n notifyViews(Event.BITMAP_CHANGED);\n }",
"private void startDownloadActivity() {\n checking();\n numDownloading = 0;\n updateMax = 0;\n updateProgress = 0;\n readPref();\n writePref();\n update();\n }",
"public void busyClose() {\r\n handler.sendBusy( this );\r\n\t\tclose();\r\n\t}",
"void doCheckHealthy();",
"public void setPoolLocked(boolean lockingState){poolLocked=lockingState;}",
"@Override\r\n\t\t\t\t\t\tprotected Void doInBackground(Void... params) {\n\t\t\t\t\t\t\tLong currenttime = System.currentTimeMillis();\r\n\t\t\t\t\t\t\twhile (!bPullUpStatus) {\r\n\t\t\t\t\t\t\t\tif ((System.currentTimeMillis() - currenttime) > App.WAITFORHTTPTIME+5000) {\r\n\t\t\t\t\t\t\t\t\tbPullUpStatus = true;\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\tLoger.i(\"TEST\", \"pullUp置位成功!!\");\r\n\t\t\t\t\t\t\tbPullUpStatus = false;\r\n\t\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t\t}",
"private void startrun() {\n mHandler.postDelayed(mPollTask, POLL_INTERVAL);\n\t}",
"@ZAttr(id=607)\n public void unsetFreebusyExchangeURL() throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraFreebusyExchangeURL, \"\");\n getProvisioning().modifyAttrs(this, attrs);\n }",
"void statusUpdate(boolean invalid);",
"protected void updateLoading()\n {\n scheduled = false;\n\n if (!valid)\n return;\n\n while (loading.size() < numConnections) {\n updateActiveStats();\n\n final TileInfo tile;\n synchronized (toLoad) {\n if (toLoad.isEmpty())\n break;\n tile = toLoad.last();\n if (tile != null) {\n toLoad.remove(tile);\n }\n }\n if (tile == null) {\n break;\n }\n\n tile.state = TileInfoState.Loading;\n synchronized (loading) {\n if (!loading.add(tile)) {\n Log.w(\"RemoteTileFetcher\", \"Tile already loading: \" + tile.toString());\n }\n }\n\n if (debugMode)\n Log.d(\"RemoteTileFetcher\",\"Starting load of request: \" + tile.fetchInfo.urlReq);\n\n // Set up the fetching task\n tile.task = client.newCall(tile.fetchInfo.urlReq);\n\n if (tile.isLocal) {\n // Try reading the data in the background\n new CacheTask(this,tile).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR,(Void)null);\n } else {\n startFetch(tile);\n }\n }\n\n updateActiveStats();\n }",
"void indicateRunning()\n {\n try {\n runningLock = lockChannel.lock(STARTING, RUNNING - STARTING, false);\n notYetRunningLock.release();\n }\n catch (IOException e) {\n throw new RuntimeException(\"Cannot lock pid file: \" + e);\n }\n\n notYetRunningLock = null;\n }",
"void markAbandoned();",
"private static boolean cancelPotentialDownload(String url, ImageView imageView) {\n BitmapDownloaderTask bitmapDownloaderTask = getBitmapDownloaderTask(imageView);\n\n if (bitmapDownloaderTask != null) {\n String bitmapUrl = bitmapDownloaderTask.url;\n if ((bitmapUrl == null) || (!bitmapUrl.equals(url))) {\n bitmapDownloaderTask.cancel(true);\n } else {\n // The same URL is already being downloaded.\n return false;\n }\n }\n return true;\n }",
"private void setURL(String url) {\n try {\n URL setURL = new URL(url);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"public boolean markLauncherAsFreeBySubDomain(String launcherSubDomain) {\n return markLauncherAsFree(launcherSubDomain + \".\" + rootDomainName);\n }",
"public static void waitForIdle() {\n waitForIdle(null);\n }",
"public void takeAvailable() {\n\t\tavailable = false;\n\t}",
"public void LaunchUrl(String URL)\n\t{\n\t\tmyDriver.get(URL);\n\t\t\n\t}",
"private void setLoading(boolean isLoading) {\n if (isLoading) {\n getWindow().setFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE,\n WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);\n layoutLoading.setVisibility(View.VISIBLE);\n } else {\n getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);\n layoutLoading.setVisibility(View.INVISIBLE);\n }\n }",
"private static void setFailed() {\n HealthCheck.failed = true;\n }",
"public void open() {\n timer.schedule(new ChangeLibraryStateTask(requestManager, this), new Date(), MILLISECOND_DAY);\n }",
"public static void unblockRequests() {\n\t\tif (isRunning.compareAndSet(false, true)) {\n\t\t\tsynchronized (isRunning) {\n\t\t\t\tisRunning.notify();\n\t\t\t}\n\t\t}\n\t}",
"private void initBusyIconTab() {\n /** Set the current selected icon to the JLabelIcon\n */\n this.jLabelIcon.setIcon( getSelectedBusyICon() );\n }",
"public void setLaunched();",
"public boolean busyReveiced () {\n\t\t\treturn resultDetected[RESULT_INDEX_BUSY];\n\t\t}",
"public Activity poll();",
"public void changeAvailability() {\n\t\tavailability = !availability;\n\t}",
"@Override\n\tpublic void setisINLINEBusy(Boolean s) {\n\t\t\n\t}",
"private void setWaitState() {\r\n state = WAITFORBALL;\r\n game.waitingForBall.addFirst(this);\r\n }",
"@Override\n public void walletBusyChange(boolean newWalletIsBusy) {\n if (super.bitcoinController.getModel().getActivePerWalletModelData().isBusy()) {\n // Wallet is busy with another operation that may change the private keys - Action is disabled.\n putValue(SHORT_DESCRIPTION, this.bitcoinController.getLocaliser().getString(\"multiBitSubmitAction.walletIsBusy\", \n new Object[]{controller.getLocaliser().getString(this.bitcoinController.getModel().getActivePerWalletModelData().getBusyTaskKey())}));\n setEnabled(false); \n } else {\n // Enable unless wallet has been modified by another process.\n if (!super.bitcoinController.getModel().getActivePerWalletModelData().isFilesHaveBeenChangedByAnotherProcess()) {\n putValue(SHORT_DESCRIPTION, this.bitcoinController.getLocaliser().getString(\"createNewReceivingAddressSubmitAction.tooltip\"));\n setEnabled(true);\n }\n \n // Make sure the cancel button is enabled.\n createNewReceivingAddressPanel.getCancelButton().setEnabled(true);\n }\n }",
"@Override\n public void onPageFinished(WebView view, String url) {\n super.onPageFinished(view, url);\n progressBusy.setVisibility(View.GONE);\n }",
"public void lock() {\n islandLocked = true;\n }",
"private void startAppLockWorker() {\n\n OneTimeWorkRequest oneTimeWorkRequest = new OneTimeWorkRequest.Builder(AppLockWorker.class).build();\n WorkManager.getInstance(getApplicationContext()).enqueueUniqueWork(Constants.APPLOCKWORK, ExistingWorkPolicy.REPLACE,oneTimeWorkRequest);\n }",
"@Scheduled(fixedRate = checkRate)\n public void CheckValidated() {\n log.info(\"Checking if links still valid and alive\");\n try{\n for(ShortURL s : urlList) {\n UrlValidatorAndCheckerImpl urlValidatorAndChecker = new UrlValidatorAndCheckerImpl(s.getTarget());\n if(!urlValidatorAndChecker.execute()){\n log.info(\"URL {} dead or not valid anymore.\", s.getTarget());\n s.setMode(HttpStatus.GONE.value());\n } else{\n s.setMode(HttpStatus.TEMPORARY_REDIRECT.value());\n }\n }\n } catch( NullPointerException e) {\n //No se ha inicializado aun\n }\n }",
"void markInactive();",
"@NoProxy\n public void addFreeBusyPeriod(final BwFreeBusyComponent val) {\n List<BwFreeBusyComponent> fbps = getFreeBusyPeriods();\n\n if (fbps == null) {\n fbps = new ArrayList<>();\n setFreeBusyPeriods(fbps);\n }\n\n fbps.add(val);\n }",
"public void markAvailable() {\n CompletableFuture<?> toNotify = null;\n synchronized (this) {\n if (!availableFuture.isDone()) {\n toNotify = availableFuture;\n }\n }\n if (toNotify != null) {\n toNotify.complete(null);\n }\n }",
"public void doIdleTasks();",
"public void updateScanFlag() {\n Date when = new Date(System.currentTimeMillis());\n\n try {\n Intent someIntent = new Intent(this, UpdateFlags.class); // intent to be launched\n\n // note this could be getActivity if you want to launch an activity\n PendingIntent pendingIntent = PendingIntent.getBroadcast(\n context,\n 0, // id, optional\n someIntent, // intent to launch\n PendingIntent.FLAG_CANCEL_CURRENT); // PendintIntent flag\n\n AlarmManager alarms = (AlarmManager) context.getSystemService(\n Context.ALARM_SERVICE);\n\n alarms.setRepeating(AlarmManager.RTC_WAKEUP,\n when.getTime(),\n AlarmManager.INTERVAL_FIFTEEN_MINUTES,\n pendingIntent);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void setIdleImage(java.lang.String param) {\n localIdleImageTracker = true;\n\n this.localIdleImage = param;\n }",
"public abstract void setBlinking(boolean status);"
] | [
"0.61737496",
"0.60319644",
"0.5997368",
"0.5958028",
"0.573361",
"0.57291275",
"0.5595785",
"0.55915546",
"0.5324263",
"0.52581024",
"0.5209593",
"0.51716065",
"0.51680547",
"0.5141848",
"0.513717",
"0.51001203",
"0.50771433",
"0.5050188",
"0.5038551",
"0.5015939",
"0.49895707",
"0.49845642",
"0.4976213",
"0.49041662",
"0.48872566",
"0.4885639",
"0.4836345",
"0.48149148",
"0.47985747",
"0.47920677",
"0.4778128",
"0.4775666",
"0.47734985",
"0.4766813",
"0.47164923",
"0.47127885",
"0.46904883",
"0.46650395",
"0.46629402",
"0.46606547",
"0.46534494",
"0.46525833",
"0.46399468",
"0.46198627",
"0.46103773",
"0.46004385",
"0.45942175",
"0.45899305",
"0.4581645",
"0.4580397",
"0.4578689",
"0.4546808",
"0.4514084",
"0.4510302",
"0.4508732",
"0.45042783",
"0.45036256",
"0.44941342",
"0.44876134",
"0.44868106",
"0.4481719",
"0.44792217",
"0.44775152",
"0.4473242",
"0.4470161",
"0.44654354",
"0.44646043",
"0.4461214",
"0.44588763",
"0.44560415",
"0.4455711",
"0.44393173",
"0.44307217",
"0.4430492",
"0.4426881",
"0.44181323",
"0.44154444",
"0.4415279",
"0.4408374",
"0.44010404",
"0.43859646",
"0.43827087",
"0.4380857",
"0.4373281",
"0.43667686",
"0.43625194",
"0.4357473",
"0.43533236",
"0.43486616",
"0.43451652",
"0.4337577",
"0.43373695",
"0.43304178",
"0.43298423",
"0.43293008",
"0.43261215",
"0.43225116",
"0.431223",
"0.43092775",
"0.43082705"
] | 0.7567572 | 0 |
Mark a launcher by the given subdomain as free. | public boolean markLauncherAsFreeBySubDomain(String launcherSubDomain) {
return markLauncherAsFree(launcherSubDomain + "." + rootDomainName);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean markLauncherAsBusyBySubDomain(String launcherSubDomain) {\n return markLauncherAsBusy(launcherSubDomain + \".\" + rootDomainName);\n }",
"public boolean markLauncherAsFree(String launcherUrl) {\n if (persistence.launcherExists(launcherUrl)) {\n return persistence.markLauncherAsFree(launcherUrl);\n }\n\n return false;\n }",
"private void setFree(final boolean free) {\n\t\tthis.free = free;\n\t}",
"private void addFreeLauncher(String deploymentName) {\n persistence.addFreeLauncher(getLauncherUrlFromObjectName(deploymentName));\n }",
"public void setFree(Boolean free)\n\t{\n\t\tthis.free = free;\n\t}",
"public void signalFree() {\n lock.lock();\n try {\n Log.d(TAG, \"Signaling NsdManager Resolver as free\");\n busy = false;\n condition.signal();\n } finally {\n lock.unlock();\n }\n }",
"public void setFree (int reg) {\n\t\ttemporary[reg].clear();\n\t}",
"public void free(int reservation) {\n this.freeSet.set(reservation - this.loRange);\n }",
"public boolean markLauncherAsBusy(String launcherUrl) {\n if (persistence.launcherExists(launcherUrl)) {\n return persistence.markLauncherAsBusy(launcherUrl);\n }\n\n return false;\n }",
"protected synchronized void freeBus(int busNum) {\n\t\t_busList.remove(new Integer(busNum));\n\t}",
"public Builder setPakringFree(lanyotech.cn.park.protoc.CommonProtoc.PARKINGFREE value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000008;\n pakringFree_ = value;\n onChanged();\n return this;\n }",
"public Builder setPakringFree(lanyotech.cn.park.protoc.CommonProtoc.PARKINGFREE value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n pakringFree_ = value;\n onChanged();\n return this;\n }",
"@Override\r\n\tpublic void makeDeliveryFree() {\n\t\t\r\n\t}",
"protected void freeNode(int nodeNum) {\n\t\tsendMessage(\"/n_free\", new Object[] { nodeNum });\n\t}",
"public void setDistributable(boolean distributable);",
"private void unregisterLauncherIfExists(String launcherUrl) {\n log.info(\"Unregistering launcher [URL] \" + launcherUrl);\n if (persistence.launcherExists(launcherUrl)) {\n persistence.unregisterLauncher(launcherUrl);\n } else {\n log.debug(\"Launcher URL not found: \" + launcherUrl);\n }\n }",
"private void addAllDeploymentsAsFreeLaunchers() {\n List<String> deployments = getDeployments();\n log.info(\"Found \" + deployments.size() + \" deployments to be added\");\n for (String deployment : deployments) {\n if (runtimeClient.serviceExists(deployment)) {\n addFreeLauncher(deployment);\n } else {\n log.info(\"Deployment \" + deployment + \" doesn't have a Service that exposes it. Not adding as a launcher...\");\n }\n }\n }",
"public abstract boolean freeSlot(LocationDto location ,SlotDto slot);",
"public void setFreehostsharekey(String freehostsharekey) {\r\n this.freehostsharekey = freehostsharekey == null ? null : freehostsharekey.trim();\r\n }",
"public void setIsFreeShipping(Boolean isFreeShipping) {\n this.isFreeShipping = isFreeShipping;\n }",
"boolean free(String variable);",
"private void freeAgent() {\n }",
"boolean hasPakringFree();",
"boolean hasPakringFree();",
"public synchronized void notifyForegroundApp(String packageName) {\n if (packageName != null) {\n if (!packageName.equals(this.mLatestPgName)) {\n NeuronAppRecord app = (NeuronAppRecord) this.mAppUsageMap.get(packageName);\n if (app == null) {\n app = new NeuronAppRecord(packageName);\n app.dataList.pushToHead(new AppDataNode());\n this.mAppUsageMap.put(packageName, app);\n }\n long currentTime = System.currentTimeMillis();\n app.lastestResumeTime.pushToHead(Long.valueOf(currentTime));\n AppDataNode latestAppData = (AppDataNode) app.dataList.getLatest();\n Long latestPause = (Long) app.latestPauseTime.getLatest();\n if (!(latestAppData == null || latestPause == null || latestPause.longValue() <= 0)) {\n long bgTime = currentTime - latestPause.longValue();\n if (bgTime < latestAppData.minBgTime) {\n latestAppData.minBgTime = bgTime;\n }\n if (bgTime > latestAppData.maxBgTime) {\n latestAppData.maxBgTime = bgTime;\n }\n latestAppData.totalBgTime += bgTime;\n }\n NeuronAppRecord removedApp = (NeuronAppRecord) this.mAppUsageList.pushToHead(app);\n if (removedApp != null) {\n this.mAppUsageMap.remove(removedApp.packageName);\n }\n pauseLatestApp(currentTime);\n this.mLatestAppUsage = app;\n this.mLatestPgName = packageName;\n }\n }\n }",
"public void usePubServe(boolean b) {\n setSelected(shellBot.checkBox(\"Use pub serve to serve the application\"), b);\n }",
"public void setHosted() {\r\n\t\tthis.isHosted = true;\r\n\t}",
"public Boolean isFree()\n\t{\n\t\treturn free;\n\t}",
"@NoProxy\n public void addFreeBusyPeriod(final BwFreeBusyComponent val) {\n List<BwFreeBusyComponent> fbps = getFreeBusyPeriods();\n\n if (fbps == null) {\n fbps = new ArrayList<>();\n setFreeBusyPeriods(fbps);\n }\n\n fbps.add(val);\n }",
"public void setFreeTimes(Integer freeTimes) {\r\n this.freeTimes = freeTimes;\r\n }",
"public void freeInstance()\n {\n }",
"public void freeInstance()\n {\n }",
"public void setAvailable(boolean x){\n availabile = x;\n }",
"@ZAttr(id=607)\n public void setFreebusyExchangeURL(String zimbraFreebusyExchangeURL) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraFreebusyExchangeURL, zimbraFreebusyExchangeURL);\n getProvisioning().modifyAttrs(this, attrs);\n }",
"private final void maintain(){\n\t\tif(host.getStrength()>MAINTENANCE_COST){\n\t\t\thost.expend(MAINTENANCE_COST);\n\t\t}\n\t\telse{\n\t\t\tkill();\n\t\t}\n\t}",
"public void free() {\r\n\r\n\t}",
"public void msgNeedBinPurged(Feeder feeder)\n\t{\n\t\tMyFeeder new_feeder = new MyFeeder();\n\t\tnew_feeder.feeder = feeder;\n\t\tnew_feeder.state = FeederState.NeedPurge;\n\t\tfeeder_list.add(new_feeder);\n\t//\tlog.add(new LoggedEvent(\"msgNeedBinPurged sent from Feeder \" + feeder.getNumber()));\n\t\tstateChanged();\n\t}",
"public void free();",
"public void setFreeuse1(String freeuse1) {\n\t\tthis.freeuse1 = freeuse1 == null ? null : freeuse1.trim();\n\t}",
"public void setFreeMoney(BigDecimal freeMoney) {\r\n this.freeMoney = freeMoney;\r\n }",
"public abstract void free();",
"private static void freeEntry(long a, long b) {\n Assert.UNREACHABLE();\n }",
"private void handleNewPackageInstalled(String packageName, int userHandle) {\n if (!getUserData(userHandle).mAppsSuspended) {\n return;\n }\n final String[] packagesToSuspend = { packageName };\n // Check if package is considered not suspendable?\n if (mInjector.getPackageManager(userHandle)\n .getUnsuspendablePackages(packagesToSuspend).length != 0) {\n Slogf.i(LOG_TAG, \"Newly installed package is unsuspendable: \" + packageName);\n return;\n }\n try {\n mIPackageManager.setPackagesSuspendedAsUser(packagesToSuspend, true /*suspend*/,\n null, null, null, PLATFORM_PACKAGE_NAME, userHandle);\n } catch (RemoteException ignored) {\n // shouldn't happen.\n }\n }",
"public void setFreeuse1(String freeuse1) {\n this.freeuse1 = freeuse1 == null ? null : freeuse1.trim();\n }",
"public void makeAvailable() {\n\t\tavailable = true;\n\t}",
"public void setLauncher(String launcher) {\n this.launcher = launcher;\n }",
"void setInstallGlobalService(boolean flag);",
"public void releaseInstance() {\n\t\tif (isFree() || isBusy()) {\n\t\t\tthrow new IllegalStateException(\n\t\t\t\t\t\"instance is already free or is busy\");\n\t\t}\n\n\t\tsetFree(true);\n\t\tsetBusy(false);\n\t}",
"void setPremiumSmsPermissionForSubscriber(int subId, String packageName, int permission);",
"public void setDomainEntryPoint(DomainEntryPoint domainEntryPoint) {\n this.domainEntryPoint = domainEntryPoint;\n }",
"public void setFreeuse2(String freeuse2) {\n\t\tthis.freeuse2 = freeuse2 == null ? null : freeuse2.trim();\n\t}",
"private native static void free(long instance);",
"void free() {\n\t\t}",
"public void freeSpace(long space)\n {\n _spaceMonitor.freeSpace(space);\n }",
"public void changeDomain(String newDomain);",
"public void setRelaunched(boolean value) {\n this.relaunched = value;\n }",
"@GuardedBy(\"mLock\")\n public boolean updateForcedAppStandbyUidPackageLocked(int uid, String packageName, boolean restricted) {\n int index = findForcedAppStandbyUidPackageIndexLocked(uid, packageName);\n if ((index >= 0) == restricted) {\n return false;\n }\n if (restricted) {\n this.mRunAnyRestrictedPackages.add(Pair.create(Integer.valueOf(uid), packageName));\n } else {\n this.mRunAnyRestrictedPackages.removeAt(index);\n }\n return true;\n }",
"public void setFreeTixianTimes(Integer freeTixianTimes) {\r\n this.freeTixianTimes = freeTixianTimes;\r\n }",
"private synchronized void freeProcess(long uid) {\n\t\trunningCount--;\n\t\tlogger.debug(\"End process {}, have {} processes still running.\", uid, runningCount);\n\t\tcheckRunningProcesses();\n\t}",
"private void getFreeSpawn(Player player, String string) {\n \t\tif (arena.playerCount < 1) {\r\n \t\t\t// arena empty, randomly put player\r\n \t\t\tarena.tpPlayerToCoordName(player, string);\r\n \t\t\treturn;\r\n \t\t}\r\n \r\n \t\tHashSet<Location> spawns = Spawns.getSpawns(arena, \"free\");\r\n \t\tif (arena.playerCount >= spawns.size()) {\r\n \t\t\t// full anyways, randomly put player\r\n \r\n \t\t\tarena.tpPlayerToCoordName(player, string);\r\n \t\t\treturn;\r\n \t\t}\r\n \r\n \t\t// calculate \"most free\"\r\n \t\tint i = 0;\r\n \t\tfor (Location loc : spawns) {\r\n \t\t\ti++;\r\n \t\t\tif (i % spawns.size() != arena.playerCount % spawns.size()) {\r\n \t\t\t\tcontinue;\r\n \t\t\t}\r\n \t\t\tArenaPlayer ap = ArenaPlayer.parsePlayer(player);\r\n \t\t\t\r\n \t\t\tap.setTelePass(true);\r\n \t\t\tplayer.teleport(loc);\r\n \t\t\tap.setTelePass(false);\r\n \t\t\t\r\n \t\t\treturn;\r\n \t\t}\r\n \t}",
"public static void free(final long address) {\n\t\tUnsafe.get().freeMemory(address);\n\t}",
"private void unregister() {\n Intent regIntent = new Intent(REQUEST_UNREGISTRATION_INTENT);\n regIntent.setPackage(GSF_PACKAGE);\n regIntent.putExtra(\n EXTRA_APPLICATION_PENDING_INTENT, PendingIntent.getBroadcast(context, 0, new Intent(), 0));\n setUnregisteringInProcess(true);\n context.startService(regIntent);\n }",
"public void setFreeuse2(String freeuse2) {\n this.freeuse2 = freeuse2 == null ? null : freeuse2.trim();\n }",
"@ZAttr(id=610)\n public void setFreebusyExchangeUserOrg(String zimbraFreebusyExchangeUserOrg) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraFreebusyExchangeUserOrg, zimbraFreebusyExchangeUserOrg);\n getProvisioning().modifyAttrs(this, attrs);\n }",
"public synchronized void pisteLiberee() {\n\t\tSystem.out.println(\"[PisteDeDanse][Une piste est libérée]\");\n\t\tthis.pisteLibre = true;\n\t\tnotify();\n\t}",
"public Boolean getFree() {\n return free;\n }",
"public long free(long size);",
"public void validateLauncherUrls() {\n log.info(\"Validating the existing launcher URL list for missing deployments...\");\n\n for (String launcherUrl : getTotalLaunchers()) {\n log.info(\"Validating [Launcher URL] \" + launcherUrl + \"...\");\n String objectName = getObjectNameFromLauncherUrl(launcherUrl);\n if (!runtimeClient.deploymentExists(objectName) || !runtimeClient.serviceExists(objectName)) {\n log.info(\"Found an invalid launcher [URL] \" + launcherUrl);\n // Just remove the reference to launcher now\n // cleanOrphan* jobs will clean any orphan deployments\n // desired count check will scale up if free count is reduced\n unregisterLauncherIfExists(launcherUrl);\n }\n }\n }",
"public void freeThread() {\n\t\tif (this.serverConnectorUsed > 0) {\n\t\t\tthis.serverConnectorUsed--;\n\t\t\tLOG.info(\"Freeing thread in pool. Now pool is \"+Integer.toString(MAX_THREADS-this.serverConnectorUsed)+\" / \"+Integer.toString(MAX_THREADS));\n\t\t}\n\t}",
"boolean canPlaceSettlement(VertexLocation vertLoc, boolean free);",
"public void permitirRobotsSuperpuestos(boolean superpuestos);",
"public synchronized boolean fFree( FileTableEntry entry )\n {\n Inode inode = new Inode(entry.iNumber);\n if (table.remove(entry))\n {\n if (inode.usedFlag == 2)\n {\n if (inode.count == 1)\n {\n notify();\n inode.usedFlag = 1;\n }\n }\n else if (inode.usedFlag == 3)\n {\n inode.usedFlag = 1;\n notifyAll();\n }\n inode.count--;\n inode.toDisk(entry.iNumber);\n return true;\n }\n return false;\n }",
"void onDemandAsked(Vehicule newDemand);",
"private boolean isTenantFree(String s) {\n\n for (String t : unassignedTenants) {\n if (t.matches(s.trim())) {\n return true;\n }\n }\n\n// for (int i = 0; i < unassignedTenants.size(); i++) {\n// if (unassignedTenants.get(i).matches(s.trim())) {\n// return true;\n// }\n// }\n return false;\n }",
"@Override\n\tpublic void freeMe() {\n\n\t}",
"public void setFirstLaunchCalled(boolean z) {\n this.f51 = z;\n }",
"private void signalFree() {\n block.release();\n }",
"public void updateFreeSlots(Hexagon hexagon){\n\t for (Hexagon neighbour : getOneHexagon(hexagon).getNeighbours()){\n\t if( !getFreeSlots().contains(neighbour) &&\n !plateau.containsKey(makeKey(neighbour)) &&\n neighbour.getExistingNeighbours().size() > 1)\n\t getFreeSlots().add(neighbour);\n }\n /*we remove current hexagon from the list of free slots*/\n\t this.getFreeSlots().remove(hexagon);\n }",
"void addIsNodeOf(Subdomain newIsNodeOf);",
"public void setDomain(String value) {\n\t\tapp.setSetting(\"domain\", value);\n\t}",
"public boolean freeSpace(int neededSpace) {\n \t\treturn true;\n \t}",
"@Step\n public WrikeResendPage startFreeForTodayWithEmail(WrikeMainPage mainPage, String email) {\n mainPage.click(WrikeMainPage.getStartedForFreeBtn);\n // Fill email form\n mainPage.writeText(WrikeMainPage.newEmailModalText, email);\n // Click submit\n mainPage.click(WrikeMainPage.newEmailSubmitModalBtn);\n // Wait for resend page to load\n return new WrikeResendPage(webDriver);\n\n }",
"public void free(ItemReference ref);",
"public void setFreePermits(Integer value) {\n setAttributeInternal(FREEPERMITS, value);\n }",
"public void setBakery (boolean b)\n {\n bakery = b;\n }",
"@Override\n public void freeId( long id )\n {\n }",
"public void honourFreeBufferCount() {\n // Check if there are enough free launchers\n int freeCount = getFreeLaunchers().size();\n\n while (freeCount < freeBufferCount) {\n if (getTotalLaunchers().size() > maxCount) {\n log.warn(\"Specified Maximum Concurrency has been exceeded, but scaling up will be permitted. If this \" +\n \"message appears often increase maximum concurrency.\");\n }\n\n log.info(\"Scaling UP: REASON -> [Free Count] \" + freeCount + \" < [Free Gap] \" + freeBufferCount);\n scaleUp(\"honourFreeBufferCount\");\n freeCount = getFreeLaunchers().size();\n }\n }",
"abstract void free();",
"public Builder clearPakringFree() {\n bitField0_ = (bitField0_ & ~0x00000004);\n pakringFree_ = lanyotech.cn.park.protoc.CommonProtoc.PARKINGFREE.ALL;\n onChanged();\n return this;\n }",
"void addPotentialDeliveryMan(final Parcel parcel, final String email);",
"public Builder clearPakringFree() {\n bitField0_ = (bitField0_ & ~0x00000008);\n pakringFree_ = lanyotech.cn.park.protoc.CommonProtoc.PARKINGFREE.ALL;\n onChanged();\n return this;\n }",
"public synchronized boolean ffree(FileTableEntry entry) {\n\t\tInode inode = new Inode(entry.iNumber);//set the reference from file table\n\t\t\n\t\t if (table.remove(entry))\n\t {\n\t\t\t //check the table for read data\n\t if (inode.flag == READ)\n\t {\n\t if (inode.count == 1)\n\t {\n\t // remove the data\n\t notify();\n\t inode.flag = USED;\n\t }\n\t }\n\t //check the table for write data\n\t else if (inode.flag == WRITE)\n\t {\n\t inode.flag = USED;\n\t notifyAll();\n\t }\n\t //decreasement for count users number\n\t inode.count--;\n\t inode.toDisk(entry.iNumber);\n\t return true;\n\t }\n\t return false;\n\t }",
"public boolean releaseAnchor (){\n boolean Launched = false;\n\n if (this.readyToLaunch) {\n Launched = true;\n isAnchored = false;\n moveOtherObjects = false;\n }\n\n return Launched;\n }",
"public static void configureChildProcessLauncher(String packageName,\n boolean isExternalService) {\n ChildProcessCreationParams.set(\n new ChildProcessCreationParams(packageName, isExternalService,\n LibraryProcessType.PROCESS_WEBVIEW_CHILD));\n }",
"public boolean reserve(int reservation) {\n int index = reservation - this.loRange;\n if (this.freeSet.get(index)) { // FREE\n this.freeSet.clear(index);\n return true;\n } else {\n return false;\n }\n }",
"public void setFreeuse3(String freeuse3) {\n\t\tthis.freeuse3 = freeuse3 == null ? null : freeuse3.trim();\n\t}",
"public void assignAddingCalSuite(final boolean val) {\n addingCalSuite = val;\n }",
"public void release_pid(int pid)\n {\n pid_map[pid-MIN_PID] = false;\n }",
"private void deactivateRunningServiceInstances(String userId,\n String serverName,\n String methodName,\n UIOperationalServicesInstance instance,\n boolean permanentDeactivation) throws InvalidParameterException,\n PropertyServerException\n {\n\n //TODO terminal user store and views?\n instanceHandler.removeServerServiceInstance(serverName);\n\n platformInstanceMap.shutdownServerInstance(userId, serverName, methodName);\n }",
"public void mo23016b(boolean z) {\n this.f26122b.edit().putBoolean(\"waring.apk.install\", z).apply();\n }"
] | [
"0.66220504",
"0.6270158",
"0.57486284",
"0.5718797",
"0.5621299",
"0.5392943",
"0.51957804",
"0.5063605",
"0.49488798",
"0.48807684",
"0.48213932",
"0.48194093",
"0.47592995",
"0.47578213",
"0.4738265",
"0.47295177",
"0.46986285",
"0.46931034",
"0.46861973",
"0.46087754",
"0.4601242",
"0.46012095",
"0.45992556",
"0.45992556",
"0.45672536",
"0.45642072",
"0.45592868",
"0.450885",
"0.450311",
"0.45005876",
"0.4492272",
"0.4492272",
"0.44897276",
"0.4482499",
"0.44470593",
"0.4430539",
"0.44292358",
"0.44210267",
"0.4398999",
"0.43814707",
"0.4372549",
"0.43530586",
"0.43430245",
"0.43422067",
"0.43405905",
"0.4336999",
"0.43322924",
"0.43038005",
"0.42963338",
"0.42930767",
"0.4276454",
"0.42447856",
"0.4239993",
"0.4221582",
"0.4219691",
"0.42181695",
"0.42116153",
"0.4204474",
"0.42021546",
"0.4201179",
"0.4187378",
"0.4185097",
"0.4176265",
"0.41707078",
"0.41648418",
"0.41584367",
"0.41529423",
"0.41529217",
"0.41464296",
"0.41409025",
"0.41362578",
"0.4127936",
"0.41236857",
"0.41122994",
"0.41110608",
"0.40937564",
"0.40919757",
"0.4088951",
"0.4087514",
"0.40867808",
"0.40853605",
"0.4081537",
"0.40768197",
"0.4076303",
"0.40554497",
"0.40541878",
"0.40532774",
"0.4048303",
"0.40479097",
"0.40463156",
"0.40415263",
"0.40352756",
"0.40334472",
"0.4032081",
"0.4022375",
"0.4018415",
"0.40097168",
"0.40053597",
"0.40041322",
"0.39978418"
] | 0.7937914 | 0 |
Makr the given launcher URL as free. | public boolean markLauncherAsFree(String launcherUrl) {
if (persistence.launcherExists(launcherUrl)) {
return persistence.markLauncherAsFree(launcherUrl);
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void unregisterLauncherIfExists(String launcherUrl) {\n log.info(\"Unregistering launcher [URL] \" + launcherUrl);\n if (persistence.launcherExists(launcherUrl)) {\n persistence.unregisterLauncher(launcherUrl);\n } else {\n log.debug(\"Launcher URL not found: \" + launcherUrl);\n }\n }",
"public boolean markLauncherAsBusy(String launcherUrl) {\n if (persistence.launcherExists(launcherUrl)) {\n return persistence.markLauncherAsBusy(launcherUrl);\n }\n\n return false;\n }",
"private void addFreeLauncher(String deploymentName) {\n persistence.addFreeLauncher(getLauncherUrlFromObjectName(deploymentName));\n }",
"private void execURL(String link) {\n Uri webLink = Uri.parse(link);\n Intent openLink = new Intent(Intent.ACTION_VIEW, webLink);\n PackageManager pm = getPackageManager();\n List<ResolveInfo> handlers = pm.queryIntentActivities(openLink, 0);\n if (handlers.size() > 0)\n startActivity(openLink);\n }",
"public void setLauncher(String launcher) {\n this.launcher = launcher;\n }",
"public List<String> getFreeLaunchers() {\n return persistence.getFreeLauncherUrls();\n }",
"public void openMuseumWebsite(String url){\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(url));\n startActivity(intent);\n }",
"java.lang.String getManifestUrl();",
"@Override\n public void onClick(View v) {\n try {\n launchActivity(MGERRIT, MGERRIT_MAIN_ENTRY);\n } catch (ActivityNotFoundException failToMarket) {\n launchUrl(MGERRIT_PLAYSTORE);\n }\n\n }",
"private URL getManifestUrl() {\n\n\t\treturn new URL(VERSION_MANIFEST_URL.replace(\"%s\", \"1.7.2\"));\n\t}",
"public boolean markLauncherAsFreeBySubDomain(String launcherSubDomain) {\n return markLauncherAsFree(launcherSubDomain + \".\" + rootDomainName);\n }",
"public void LaunchUrl(String URL)\n\t{\n\t\tmyDriver.get(URL);\n\t\t\n\t}",
"static final /* synthetic */ void m50994c(ane ane, Map map) {\n String str = (String) map.get(\"urls\");\n if (TextUtils.isEmpty(str)) {\n acd.m45783e(\"URLs missing in canOpenURLs GMSG.\");\n return;\n }\n String[] split = str.split(\",\");\n HashMap hashMap = new HashMap();\n PackageManager packageManager = ane.getContext().getPackageManager();\n for (String str2 : split) {\n String[] split2 = str2.split(\";\", 2);\n boolean z = true;\n if (packageManager.resolveActivity(new Intent(split2.length > 1 ? split2[1].trim() : \"android.intent.action.VIEW\", Uri.parse(split2[0].trim())), 65536) == null) {\n z = false;\n }\n hashMap.put(str2, Boolean.valueOf(z));\n }\n ((C15836lc) ane).mo39809a(\"openableURLs\", (Map<String, ?>) hashMap);\n }",
"private void redirectStore(String updateUrl) {\n final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(updateUrl));\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }",
"public void validateLauncherUrls() {\n log.info(\"Validating the existing launcher URL list for missing deployments...\");\n\n for (String launcherUrl : getTotalLaunchers()) {\n log.info(\"Validating [Launcher URL] \" + launcherUrl + \"...\");\n String objectName = getObjectNameFromLauncherUrl(launcherUrl);\n if (!runtimeClient.deploymentExists(objectName) || !runtimeClient.serviceExists(objectName)) {\n log.info(\"Found an invalid launcher [URL] \" + launcherUrl);\n // Just remove the reference to launcher now\n // cleanOrphan* jobs will clean any orphan deployments\n // desired count check will scale up if free count is reduced\n unregisterLauncherIfExists(launcherUrl);\n }\n }\n }",
"public synchronized static void invalidate(String url){\n\t\tLog.i(\"FILEBANK\", \"Invalidating \"+hashURL(url));\n\t\tnew File(context.getCacheDir(), hashURL(url)).delete();\n\t}",
"private static Intent newFacebookIntent(PackageManager pm, String url) {\n Uri uri = Uri.parse(url);\n try {\n ApplicationInfo applicationInfo = pm.getApplicationInfo(\"com.facebook.katana\", 0);\n if (applicationInfo.enabled) {\n uri = Uri.parse(\"fb://facewebmodal/f?href=\" + url);\n }\n } catch (PackageManager.NameNotFoundException ignored) {\n }\n return new Intent(Intent.ACTION_VIEW, uri);\n }",
"private void openUpdate() {\n\t\tString url = MySoup.getUpdateLink(SITE);\n\t\tIntent i = new Intent(Intent.ACTION_VIEW);\n\t\ti.setData(Uri.parse(url));\n\t\tstartActivity(i);\n\t\tfinish();\n\t}",
"public static void openPlayStoreEntry()\n\t{\n\t\tApp.getInstance().startActivity(new Intent(Intent.ACTION_VIEW)\n\t\t\t\t.setData(Uri.parse(\"market://details?id=\" + General.PKG_MESSENGERAPI+\"&referrer=utm_source%3D\"+App.getInstance().getPackageName()+\"%26utm_medium%3DAPIMethod%26utm_campaign%3DAPICampaign\"))\n\t\t\t\t.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));\n\t}",
"private void toUrl(String url){\n Uri uriUrl = Uri.parse(url);\n Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);\n startActivity(launchBrowser);\n }",
"private String getObjectNameFromLauncherUrl(String launchUrl) {\n if (launchUrl != null) {\n String[] domainParts = launchUrl.split(\"\\\\.\");\n return domainParts[0].replace(Constants.LAUNCHER_URL_PREFIX, Constants.BPG_APP_TYPE_LAUNCHER);\n }\n\n throw new IllegalArgumentException(\"Null launcher URL cannot be processed.\");\n }",
"private void startDownload() {\n Uri uri = Uri.parse( data.getStringExtra(PARAM_URL) );\n dm = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);\n DownloadManager.Request request = new DownloadManager.Request( uri );\n request.setAllowedNetworkTypes( DownloadManager.Request.NETWORK_MOBILE | DownloadManager.Request.NETWORK_WIFI)\n //移动网络情况下是否允许漫游。\n .setAllowedOverRoaming(false)\n .setTitle(\"更新\") // 用于信息查看\n .setDescription(\"下载apk\"); // 用于信息查看\n //利用此属性下载后使用响应程序打开下载文件\n //request.setMimeType(\"application/vnd.android.package-archive\");\n request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, new Date().getTime()+\".apatch\");\n enqueue = dm.enqueue(request);\n }",
"private void createFakeAssetURLMapEntry(MarinerRequestContext context,\n String url) {\n // copied from ObjectElement implementation \n ApplicationContext ac = ContextInternals.getApplicationContext(context);\n PackageResources pr = ac.getPackageResources();\n if (pr != null) {\n PackagedURLEncoder packagedURLEncoder = ac.getPackagedURLEncoder();\n if (packagedURLEncoder != null) {\n String encoded = packagedURLEncoder.getEncodedURI(url);\n PackageResources.Asset prAsset = new PackageResources.Asset(\n url, false);\n pr.addAssetURLMapping(encoded, prAsset);\n }\n }\n }",
"private String getLauncherUrlFromObjectName(String objectName) {\n if (objectName != null) {\n return objectName.replace(Constants.BPG_APP_TYPE_LAUNCHER, Constants.LAUNCHER_URL_PREFIX) +\n \".\" +\n rootDomainName;\n }\n\n throw new IllegalArgumentException(\"Null Object name cannot be processed.\");\n }",
"@Override\n public void onBtnClick() {\n if(!TextUtils.isEmpty(versionMole.getUrl())){\n Intent intent = new Intent();\n intent.setAction(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(versionMole.getUrl()));\n mContext.startActivity(intent);\n }\n\n// handler.sendEmptyMessageDelayed(111, 8000);\n testDialog.dismiss();\n }",
"@Override\n protected Boolean doInBackground(URL... urls)\n {\n PackageManager pkgMgr = getApplicationContext().getPackageManager();\n List<PackageInfo> pkgInfoList = pkgMgr.getInstalledPackages(0);\n List<PackageInfo> installedApks = new ArrayList<>();\n\n for(int i=0;i< pkgInfoList.size();i++)\n {\n PackageInfo pkg = pkgInfoList.get(i);\n if((pkg.applicationInfo.flags & pkg.applicationInfo.FLAG_SYSTEM) <= 0)\n { //user installed apks\n installedApks.add(pkg);\n }\n }\n\n for(int j=0;j<installedApks.size();j++)\n {\n if(installedApks.get(j).packageName.equals(agGamePkgName))\n {\n break;\n }\n }\n\n if( j == installedApks.size())\n {\n //AG game apk is not installed, download from internet\n try{\n downloadMgr = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);\n DownloadManager.Request downloadReq = new DownloadManager.Request(Uri.parse(agGameSite));\n downloadReq.setDestinationInExternalPublicDir(\"AG Game\",\"AGGame.apk\");\n downloadReq.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);\n downloadID = downloadMgr.enqueue(downloadReq);\n }catch(IOException ex)\n {\n ex.printStackTrace();\n }\n }\n return true;\n }",
"public void launchAUT(String url) {\n\t\tSystem.out.println(\"Launching application under test.\");\n\t\tdriver.get(url);\n\t\tSystem.out.println(\"Launched application under test.\");\n\t}",
"public String getLauncher() {\n return launcher;\n }",
"public void openmrsdemo() {\n\t\tutil.geturl(prop.getValue(\"locators.url\"));\n\t\tlogreport.info(\"Url loaded\");\n\t\tutil.maximize();\n\t}",
"void enterSipAppHa(boolean startCacheActivity);",
"public void rateApp() {\n try {\n Intent rateIntent = rateIntentForUrl(\"market://details\");\n startActivity(rateIntent);\n }\n catch (ActivityNotFoundException e) {\n Intent rateIntent = rateIntentForUrl(\"https://play.google.com/store/apps/details\");\n startActivity(rateIntent);\n }\n }",
"public Launcher getLauncher(){\n \treturn mLauncher;\n }",
"public void requestItemPower(MainActivity activity, TextView pane) {\n DestinyAsyncTasks.DestinyTaskGetItemInstance instanceTask = new DestinyAsyncTasks.DestinyTaskGetItemInstance(activity, pane, this);\n String url = \"https://www.bungie.net/Platform/Destiny2/\" + activity.getMembershipType() + \"/Profile/\" + activity.getMembershipID() + \"/Item/\" + instanceID + \"/?components=300\";\n instanceTask.execute(url, activity.getToken());\n }",
"public native final void setUrl(String url)/*-{\n this.url = url;\n }-*/;",
"private void setURL(String url) {\n try {\n URL setURL = new URL(url);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"@Override\n public void grindClicked() {\n Uri webpage = Uri.parse(\"http://www.grind-design.com\");\n Intent webIntent = new Intent(Intent.ACTION_VIEW, webpage);\n startActivity(webIntent);\n }",
"public void showLink(String url)\n {\n try\n {\n jalview.util.BrowserLauncher.openURL(url);\n } catch (Exception ex)\n {\n JOptionPane\n .showInternalMessageDialog(\n Desktop.desktop,\n \"Unixers: Couldn't find default web browser.\"\n + \"\\nAdd the full path to your browser in Preferences.\",\n \"Web browser not found\", JOptionPane.WARNING_MESSAGE);\n\n ex.printStackTrace();\n }\n }",
"private void link(MainActivity pActivity) {\n\n\t\t}",
"@Test\r\n\t\tpublic static void LaunchUrl()\r\n\t\t{\r\n\t\t\tdriver.manage().deleteAllCookies();\r\n\t\t\tdriver.get(prop.getProperty(\"url\"));\r\n\t\t\tdriver.manage().window().maximize();\t\r\n\t\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\t\r\n\t\t\r\n\t\t}",
"private String generateDllinkWebsiteFreeMode(final Account account, final DownloadLink link) throws IOException, PluginException, InterruptedException {\r\n prepBrWebsite(br);\r\n /* 2019-08-24: Not required */\r\n // this.loginAPI(account);\r\n /* Try to re-use previously generated URLs so we're not wasting traffic! */\r\n String internal_url = link.getStringProperty(this.getHost() + \"selfhosted_free_download_url\", null);\r\n final boolean generate_new_internal_url;\r\n if (internal_url != null) {\r\n br.getPage(internal_url);\r\n generate_new_internal_url = this.isOffline(this.br);\r\n } else {\r\n generate_new_internal_url = true;\r\n }\r\n if (generate_new_internal_url) {\r\n logger.info(\"Generating new directurl\");\r\n br.getPage(\"https://\" + this.getHost() + \"/process?link=\" + Encoding.urlEncode(link.getDefaultPlugin().buildExternalDownloadURL(link, this)));\r\n handleErrorsWebsite(br, account, link);\r\n internal_url = br.getRegex(\"(https?://[^/]+/dl/[A-Z0-9]+)\").getMatch(0);\r\n if (StringUtils.isEmpty(internal_url)) {\r\n logger.warning(\"Failed to find generated 'internal_url'\");\r\n if (br.toString().length() <= 100) {\r\n /* Assume that http answer == errormessage */\r\n throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE, \"Error: \" + br.toString(), 5 * 60 * 1000l);\r\n } else {\r\n throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE, \"Failed to find generated 'internal_url' or unknown error occured\", 5 * 60 * 1000l);\r\n }\r\n } else if (isOffline(this.br)) {\r\n throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);\r\n }\r\n link.setProperty(this.getHost() + \"selfhosted_free_download_url\", internal_url);\r\n this.br.getPage(internal_url);\r\n } else {\r\n logger.info(\"Re-using previously generated- and saved directurl\");\r\n }\r\n return getDllinkWebsiteCaptcha(account, link);\r\n }",
"public void hyperlinkUpdate(HyperlinkEvent e)\n {\n if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED)\n {\n ServiceReference<BrowserLauncherService> serviceReference =\n BrandingActivator.getBundleContext().getServiceReference(\n BrowserLauncherService.class);\n\n if (serviceReference != null)\n {\n BrowserLauncherService browserLauncherService\n = BrandingActivator\n .getBundleContext().getService(serviceReference);\n\n browserLauncherService.openURL(e.getDescription());\n }\n }\n }",
"private void goToUrl (String url) {\n Intent launchWebview = new Intent(this, ManualWebviewActivity.class);\n launchWebview.putExtra(\"url\", url);\n startActivity(launchWebview);\n }",
"public void removeEntry(final String url){\n if(url==null){\n return;\n }\n\n synchronized (mBitmapCache) {\n mBitmapCache.remove(url);\n }\n }",
"public void searchProduct(String url){\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(url));\n\n if(intent.resolveActivity(getContext().getPackageManager()) != null) {\n getContext().startActivity(intent);\n }\n }",
"LauncherModel setLauncher(Launcher launcher) {\n \tmLauncher = launcher;\n \t//added by amt_wangpeipei 2012/07/11 for switchui-2121 end\n if (mModel != null)\n mModel.initialize(launcher);\n return mModel;\n }",
"@Override\n\tpublic void generateMigsPunchUrl() {\n\n\t}",
"void openLinkInSystemBrowser(String url, int errorMsg);",
"void launchApp();",
"private void openApp(String packageName) {\n final String launcherPackage = packageName;\n assertThat(launcherPackage, notNullValue());\n mDevice.wait(Until.hasObject(By.pkg(launcherPackage).depth(0)), LAUNCH_TIMEOUT);\n\n // Launcher app\n Context context = InstrumentationRegistry.getContext();\n final Intent intent = context.getPackageManager()\n .getLaunchIntentForPackage(packageName);\n\n // Clear out any previous instances\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n context.startActivity(intent);\n\n // Wait for the app to appear\n mDevice.wait(Until.hasObject(By.pkg(packageName).depth(0)), LAUNCH_TIMEOUT);\n }",
"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 }",
"private void downloadApk(String url) {\n if (UpdateHelper.CheckForSDCard.isSDCardPresent()) {\n\n //check if app has permission to write to the external storage.\n if (EasyPermissions.hasPermissions(MainActivity.this, Manifest.permission.WRITE_EXTERNAL_STORAGE)) {\n new DownloadFileHelper(MainActivity.this).execute(url);\n\n } else {\n //If permission is not present request for it.\n EasyPermissions.requestPermissions(MainActivity.this, getString(R.string.write_file), WRITE_REQUEST_CODE, Manifest.permission.READ_EXTERNAL_STORAGE);\n }\n\n }\n }",
"public void launchWithCustomReferrer(View view) {\n // The ergonomics will be improved here, since we're basically replicating the work of\n // TwaLauncher, see https://github.com/GoogleChrome/android-browser-helper/issues/13.\n\n TwaProviderPicker.Action action = TwaProviderPicker.pickProvider(getPackageManager());\n if (!serviceBound) {\n CustomTabsClient\n .bindCustomTabsService(this, action.provider, customTabsServiceConnection);\n serviceBound = true;\n }\n }",
"public void setURL(String url) {\n \t\tblueURL = url;\n\t}",
"private static void addSeedURL()\r\n\t{\r\n\t\tSystem.out.println(\"Enter a website to search for keywords.\");\r\n\t\tString userInput = input.nextLine();\r\n\t\t\r\n\t\tif(userInput.length() >= 7 && !(userInput.substring(0, 6).equals(\"https://\")))\r\n\t\t{\r\n\t\t\tuserInput = \"http://\" + userInput;\r\n\t\t\t\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tSharedLink.addLink(userInput);\r\n\t\t\t} \r\n\t\t\tcatch (InterruptedException e) \r\n\t\t\t{\r\n\t\t\t\t//do nothing\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public <T extends Application<?, ?>> T launch(Class<T> appClass, String desiredUrl) {\r\n\t\tT result = super.launch(WindowManager.class, appClass, objectWhichChecksWebDriver);\r\n\t\tBrowserWindow window = (BrowserWindow) result.getHandle();\t\t\r\n\t\twindow.to(desiredUrl);\t\t\r\n\t\treturn result;\r\n\t}",
"@Override\n public void onOpenWebsite(@Nullable String url) {\n if (url == null) return;\n Log.d(TAG, \"onOpenWebsite: Url:\" + url);\n\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivity(intent);\n }\n }",
"boolean shouldIgnoreExternalIntentHandlers(String url);",
"public static void startLauncherActivity(Context context) {\n PackageManager packageManager = context.getPackageManager();\n Intent intent = packageManager.getLaunchIntentForPackage(context\n .getPackageName());\n ComponentName componentName = intent.getComponent();\n Intent mainIntent = Intent.makeRestartActivityTask(componentName);\n mainIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n mainIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n mainIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n mainIntent.putExtra(\"isSessionExpired\", true);\n context.startActivity(mainIntent);\n }",
"public static void openURL(final String url) {\n Intent intent = new Intent(Intent.ACTION_VIEW).setData(Uri.parse(url));\n _instance.startActivity(Intent.createChooser(intent, \"\"));\n }",
"public URL setURL(URL url) {\r\n if (url == null)\r\n throw new IllegalArgumentException(\r\n \"A null url is not an acceptable value for a PackageSite\");\r\n URL oldURL = url;\r\n myURL = url;\r\n return oldURL;\r\n }",
"private void uninstallBrowser(String packageName) {\n Intent intent = null;\n try {\n intent = Intent.parseUri(\"http://\", Intent.URI_INTENT_SCHEME);\n } catch (Exception e) {\n Assert.fail();\n return;\n }\n mPackageManager.removeResolveInfosForIntent(intent, packageName);\n mPackageManager.removePackage(packageName);\n }",
"public void launchEmail(){\n\t\tIntent sendIntent = new Intent(Intent.ACTION_MAIN); \n \tsendIntent.addCategory(Intent.CATEGORY_APP_EMAIL);\n\n if (sendIntent.resolveActivity(pacman) != null) {\n \tstartActivity(sendIntent);\n \treturn;\n } else {\n \tToast.makeText(context, \"No Email App Availible\", Toast.LENGTH_SHORT).show();\n \treturn;\n }\n\t}",
"public MountPoint resolveMountPoint(String url);",
"private void launchActivity(String title, String url){\n // package intent\n // start activity\n\n NotificationCompat.Builder builder = new NotificationCompat.Builder(mContext, \"default\");\n\n String content = \"The instruction for \" + title + \" can be found here!\";\n\n //set icons\n builder.setSmallIcon(android.R.drawable.btn_star);\n builder.setStyle(new NotificationCompat.BigTextStyle(builder).bigText(content));\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));\n\n // create a pending intent for the notification with the intent I created\n PendingIntent pendingIntent = PendingIntent.getActivity(mContext,0, intent, 0);\n builder.setContentIntent(pendingIntent);\n\n //set the title and content of the notification\n builder.setContentTitle(\"Cooking Instruction\");\n builder.setContentText(content);\n\n // get the system service to display this notification\n NotificationManager notificationManager = (NotificationManager) mContext.getSystemService(NOTIFICATION_SERVICE);\n\n //notify\n notificationManager.notify(1, builder.build());\n\n\n }",
"public void m7914f(String url) {\n this.f6694g = url;\n }",
"public void setServer(URL url) {\n\n\t}",
"public void setPackageUrl(String packageUrl);",
"public void launch(View view) {\n TwaLauncher launcher = new TwaLauncher(this);\n launcher.launch(LAUNCH_URI);\n launchers.add(launcher);\n }",
"protected void openExternal( String url , String type ) {\n if( type == null ) {\n openExternal( url );\n }\n else {\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setDataAndTypeAndNormalize(Uri.parse(url), type);\n if( getPackageManager().resolveActivity(intent,0) != null ) {\n intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n try {\n startActivity(intent);\n } catch (Exception e) {\n Log.d(\"openExternal\", e.getMessage());\n }\n }\n }\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=213\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=201\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=207\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}",
"public void setURL(String url);",
"public void wapTinyurl() {\n String url = \"http://m.nuomi.com/mianyang/deal/l5kkhcqr\";\r\n Pattern p = Pattern.compile(\"^http://\\\\w+\\\\.nuomi\\\\.com/\\\\w+/deal/(\\\\w+$)\");\r\n Matcher m = p.matcher(url);\r\n if (m.find()) {\r\n p(m.group(1));\r\n }\r\n }",
"private String makeServerUrl(){\n\t\tURL url = null;\n\t\t\n\t\t//Make sure we have a valid url\n\t\tString complete = this.preferences.getString(\"server\", \"\");\n\t\ttry {\n\t\t\turl = new URL( complete );\n\t\t} catch( Exception e ) {\n\t\t\tonCreateDialog(DIALOG_INVALID_URL).show();\n\t\t\treturn null;\n\t\t}\n\t\treturn url.toExternalForm();\n\t}",
"private static void openWebpage(String url) {\n try {\n new ProcessBuilder(\"x-www-browser\", url).start();\n } catch (IOException e) {\n log.error(e.getMessage(), e);\n }\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=217\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=209\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}",
"public void openApp(String Url) {\n\t\tfd = new FirefoxDriver();\r\n\t\tfd.get(Url);\r\n\t\tfd.manage().window().maximize();\r\n\t}",
"private String extractRealUrl(String url) {\n return acceptsURL(url) ? url.replace(\"p6spy:\", \"\") : url;\n }",
"public MarinerURL mapToExternalURL (MarinerRequestContext requestContext,\n MarinerURL url) {\n return url;\n }",
"public void launcherWithMultipleOrigins(View view) {\n List<String> origins = Arrays.asList(\n \"https://www.wikipedia.org/\",\n \"https://www.example.com/\"\n );\n\n TrustedWebActivityIntentBuilder builder = new TrustedWebActivityIntentBuilder(LAUNCH_URI)\n .setAdditionalTrustedOrigins(origins);\n\n\n TwaLauncher launcher = new TwaLauncher(this);\n launcher.launch(builder, mCustomTabsCallback, null , null);\n launchers.add(launcher);\n }",
"private void launchHomeScreen(){\n\n prefManager.setFirstTimeLaunch(false);\n Intent i = new Intent(SplashActivity.this, MainActivity.class);\n startActivity(i);\n }",
"@Override\n\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\tIntent i = new Intent(Intent.ACTION_VIEW, Uri\n\t\t\t\t\t\t\t\t\t\t.parse(fullsitelink));\n\t\t\t\t\t\t\t\tstartActivity(i);\n\n\t\t\t\t\t\t\t}",
"@Override\n public Bitmap getImage(String url) {\n try {\n if (!taskForUrlAlreadyRunning(url)) {\n imageDownloadTaskMap.put(url, startDownload(url));\n }\n } catch (MalformedURLException e) {\n Log.i(\"ImageDownloadManager\", \"Malformed url\" + url);\n }\n return null;\n }",
"private Bitmap getCechaFromUrl(String url) {\n\t\treturn mLruCache.get(url);\r\n\t}",
"private void setFree(final boolean free) {\n\t\tthis.free = free;\n\t}",
"private static void loadSavedUrl(final EditText etUrl) {\r\n\t\tetUrl.setText(AppPreferences.getUrlProxy());\r\n\t}",
"CartogramWizardShowURL (String url)\n\t{\n\t\tmUrl = url;\n\t\n\t}",
"public RemoteWebDriver startApp(String url) {\n\t\treturn startApp(\"chrome\", url);\r\n\t}",
"ListenableFuture<CacheResult> fetchManifest(RuleKey manifestKey, LazyPath downloadedManifest);",
"public void launchPhone(){\n\t\tIntent sendIntent = new Intent(Intent.ACTION_DIAL);\n \tsendIntent.setData(Uri.parse(\"tel:\"));\n \t\n \tfinal ResolveInfo mInfo = pacman.resolveActivity(sendIntent, 0);\n \tString s = pacman.getApplicationLabel(mInfo.activityInfo.applicationInfo).toString();\n \t\n \tif (s != null && s.length() > 2) {\n startActivity(sendIntent);\n return;\n } else {\n \tToast.makeText(context, \"No Phone Call App Availible\", Toast.LENGTH_SHORT).show();\n \treturn;\n }\n\t}",
"public void callWorkManager(String tartgetUrl) {\n Data.Builder builder = new Data.Builder();\n if (tartgetUrl != null) {\n builder.putString(\"targetUrl\", tartgetUrl);\n }\n Data data = builder.build();\n OneTimeWorkRequest adRequest =\n new OneTimeWorkRequest.Builder(AdWorker.class)\n .setInputData(data)\n .build();\n mWorkManager.enqueue(adRequest);\n }",
"public boolean processUrl(String url, Context ctx) {\n List<ResolveInfo> resolveInfos = getAvailablePackagesForUrl(url, ctx);\n // filter the webbrowser > because the webview will replace it, using\n // google as simple url\n List<ResolveInfo> webBrowsers = getAvailablePackagesForUrl(\n \"http://www.google.com\", ctx);\n for (ResolveInfo resolveInfo : resolveInfos) {\n\n boolean found = false;\n for (ResolveInfo webBrowser : webBrowsers) {\n if (resolveInfo.activityInfo.packageName\n .equals(webBrowser.activityInfo.packageName)) {\n found = true;\n break;\n }\n }\n if (!found) {\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(url));\n intent.setClassName(resolveInfo.activityInfo.packageName,\n resolveInfo.activityInfo.name);\n ctx.startActivity(intent);\n return true;\n }\n }\n return false;\n }",
"public static void openURL(String url) {\n try { //attempt to use Desktop library from JDK 1.6+\n Class<?> d = Class.forName(\"java.awt.Desktop\");\n d.getDeclaredMethod(\"browse\", new Class[] {java.net.URI.class}).invoke(\n d.getDeclaredMethod(\"getDesktop\").invoke(null),\n new Object[] {java.net.URI.create(url)});\n //above code mimicks: java.awt.Desktop.getDesktop().browse()\n }\n catch (Exception ignore) { //library not available or failed\n String osName = System.getProperty(\"os.name\");\n try {\n if (osName.startsWith(\"Mac OS\")) {\n Class.forName(\"com.apple.eio.FileManager\").getDeclaredMethod(\n \"openURL\", new Class[] {String.class}).invoke(null,\n new Object[] {url});\n }\n else if (osName.startsWith(\"Windows\"))\n Runtime.getRuntime().exec(\n \"rundll32 url.dll,FileProtocolHandler \" + url);\n else { //assume Unix or Linux\n String browser = null;\n for (String b : browsers)\n if (browser == null && Runtime.getRuntime().exec(new String[]\n {\"which\", b}).getInputStream().read() != -1)\n Runtime.getRuntime().exec(new String[] {browser = b, url});\n if (browser == null)\n throw new Exception(Arrays.toString(browsers));\n }\n }\n catch (Exception e) {\n JOptionPane.showMessageDialog(null, errMsg + \"\\n\" + e.toString());\n }\n }\n }",
"public void sharePage(){\n Intent shareIntent = new Intent(Intent.ACTION_VIEW);\n shareIntent.setData(Uri.parse(\"http://192.168.43.105:5000\"));//edit url\n startActivity(shareIntent);\n }",
"private void unregisterLauncherIfExistsByObjectName(String objectName) {\n // Unregister from launcher list\n String launcherUrl = getLauncherUrlFromObjectName(objectName);\n unregisterLauncherIfExists(launcherUrl);\n }",
"public void DownloadUpdate(String version)\n {\n String destination = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + \"/\";\n String fileName = \"textbomb.apk\";\n destination += fileName;\n final Uri uri = Uri.parse(\"file://\" + destination);\n Log.d(\"textbomb.apk\", \"Dest: \" + uri);\n\n //Delete update file if exists\n File file = new File(destination);\n if (file.exists())\n //file.delete() - test this, I think sometimes it doesnt work\n file.delete();\n\n //get url of app on server\n String url = \"https://github.com/wethegreenpeople/TextBomb/releases/download/\" + version + \"/textbomb.apk\";\n\n //set downloadmanager\n DownloadManager.Request request = new DownloadManager.Request(Uri.parse(url));\n request.setDescription(\"Textbomb\");\n request.setTitle(\"Textbomb\");\n\n //set destination\n request.setDestinationUri(uri);\n\n // get download service and enqueue file\n final DownloadManager manager = (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE);\n final long downloadId = manager.enqueue(request);\n\n //set BroadcastReceiver to install app when .apk is downloaded\n BroadcastReceiver onComplete = new BroadcastReceiver() {\n public void onReceive(Context ctxt, Intent intent) {\n File apkFile = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + \"/textbomb.apk\");\n intent = new Intent(Intent.ACTION_VIEW);\n Uri fileUri = android.support.v4.content.FileProvider.getUriForFile(context, context.getPackageName() + \".provider\", apkFile);\n intent.setDataAndType(fileUri, \"application/vnd.android.package-archive\");\n intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n ctxt.startActivity(intent);\n }\n };\n //register receiver for when .apk download is compete\n context.registerReceiver(onComplete, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));\n }",
"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}",
"public void scaleDown() {\n log.info(\"Scaling down by [Step Down] \" + stepDown + \" instances...\");\n\n // Scale down by (1 x stepDown) at a time\n for (int i = 0; i < stepDown; i++) {\n // Get free launchers\n List<String> urlsToScaleDown = getFreeLaunchers();\n\n log.info(\"URLs to scale down: \" + urlsToScaleDown.toString());\n\n // Sort by launcher url. This will sort the oldest first, making it possible to take the youngest out of the\n // tail\n urlsToScaleDown.sort((o1, o2) -> {\n int mySuffix = Integer.parseInt(o1.split(\"\\\\.\")[0].substring(\n (Constants.LAUNCHER_URL_PREFIX + \"-\").length()));\n\n int theirSuffix = Integer.parseInt(o2.split(\"\\\\.\")[0].substring(\n (Constants.LAUNCHER_URL_PREFIX + \"-\").length()));\n\n return Integer.compare(mySuffix, theirSuffix);\n });\n\n // Get the youngest free launcher URL\n String launcherUrlToDelete = urlsToScaleDown.get(urlsToScaleDown.size() - 1);\n\n log.info(\"Cutting down [Launcher URL] \" + launcherUrlToDelete + \"...\");\n\n // Get object name from launcher URL\n String deploymentName = getObjectNameFromLauncherUrl(launcherUrlToDelete);\n\n // Delete deployment and service\n if (!deleteLauncher(deploymentName)) {\n log.error(\"Launcher deletion failed [Object Name] \" + deploymentName);\n }\n }\n }"
] | [
"0.6006832",
"0.5708806",
"0.5693836",
"0.55742776",
"0.5352581",
"0.5253149",
"0.5206511",
"0.51910985",
"0.5186907",
"0.5157777",
"0.5139209",
"0.50626284",
"0.49964136",
"0.49911684",
"0.49789843",
"0.4961325",
"0.4892544",
"0.48749298",
"0.48720595",
"0.4858332",
"0.48197007",
"0.4759775",
"0.47323653",
"0.47313148",
"0.47050017",
"0.46990007",
"0.46933892",
"0.467938",
"0.4678466",
"0.4617358",
"0.4616059",
"0.4611002",
"0.4607704",
"0.46059933",
"0.46039936",
"0.45963508",
"0.45921946",
"0.45917812",
"0.4585798",
"0.45841333",
"0.45786518",
"0.4570112",
"0.45569682",
"0.45542052",
"0.45411208",
"0.45407814",
"0.45407063",
"0.45404872",
"0.4532391",
"0.4513431",
"0.45083722",
"0.4502129",
"0.44955847",
"0.44864595",
"0.4485112",
"0.44823936",
"0.4477681",
"0.4475305",
"0.44726342",
"0.44641554",
"0.44624603",
"0.44603315",
"0.4448029",
"0.44469804",
"0.4445076",
"0.4428289",
"0.44234318",
"0.44228116",
"0.44201705",
"0.44173715",
"0.4416582",
"0.44126505",
"0.4397521",
"0.43945023",
"0.43944165",
"0.4393041",
"0.43914926",
"0.4391463",
"0.4390408",
"0.43885472",
"0.43737522",
"0.43638688",
"0.43590426",
"0.4352861",
"0.43459392",
"0.43359077",
"0.43358308",
"0.43354142",
"0.43353727",
"0.43341497",
"0.43273643",
"0.43214568",
"0.4321389",
"0.43115184",
"0.43080994",
"0.4307905",
"0.43072513",
"0.4306743",
"0.4305553",
"0.4304611"
] | 0.6851818 | 0 |
Delete launcher URL derived from the object name, from the list of launchers, if it exists, and delete from the K8S cluster. | private boolean deleteLauncher(String deploymentName) {
unregisterLauncherIfExistsByObjectName(deploymentName);
boolean svcDeleted = runtimeClient.deleteService(deploymentName);
boolean depDeleted = runtimeClient.deleteDeployment(deploymentName);
return svcDeleted && depDeleted;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void unregisterLauncherIfExistsByObjectName(String objectName) {\n // Unregister from launcher list\n String launcherUrl = getLauncherUrlFromObjectName(objectName);\n unregisterLauncherIfExists(launcherUrl);\n }",
"private void unregisterLauncherIfExists(String launcherUrl) {\n log.info(\"Unregistering launcher [URL] \" + launcherUrl);\n if (persistence.launcherExists(launcherUrl)) {\n persistence.unregisterLauncher(launcherUrl);\n } else {\n log.debug(\"Launcher URL not found: \" + launcherUrl);\n }\n }",
"@Override\n public void delete(String instance) {\n InstanceManifest im = readInstance(instance);\n List<InstanceVersionDto> versions = listVersions(instance);\n RemoteService master = mp.getControllingMaster(hive, im.getManifest());\n try (Activity deploy = reporter.start(\"Deleting \" + im.getConfiguration().name);\n NoThrowAutoCloseable proxy = reporter.proxyActivities(master)) {\n MasterRootResource root = ResourceProvider.getVersionedResource(master, MasterRootResource.class, context);\n InstanceStatusDto status = root.getNamedMaster(group).getStatus(instance);\n for (String app : status.getAppStatus().keySet()) {\n if (status.isAppRunningOrScheduled(app)) {\n throw new WebApplicationException(\"Application still running, cannot delete: \" + app,\n Status.EXPECTATION_FAILED);\n }\n }\n\n // cleanup is done periodically in background, still uninstall installed\n // versions to prevent re-start of processes later\n for (InstanceVersionDto dto : versions) {\n root.getNamedMaster(group).uninstall(dto.key);\n }\n\n root.getNamedMaster(group).delete(instance);\n }\n\n syncInstance(minion, rc, group, instance);\n\n versions.forEach(v -> changes.remove(ObjectChangeType.INSTANCE, v.key));\n }",
"private static void deleteInstance(String[] args,String command,List<ExampleServer> servers) {\n \n if (args.length != 1) {\n System.err.println(\"syntax error (expected delete <name>): \" + command);\n return;\n }\n \n final String serviceName = args[0];\n ExampleServer server = Iterables.find(servers,server1 -> server1.getThisInstance().getName()\n .endsWith(serviceName),null);\n if (server == null) {\n System.err.println(\"No servers found named: \" + serviceName);\n return;\n }\n \n servers.remove(server);\n CloseableUtils.closeQuietly(server);\n System.out.println(\"Removed a random instance of: \" + serviceName);\n }",
"public void scaleDown() {\n log.info(\"Scaling down by [Step Down] \" + stepDown + \" instances...\");\n\n // Scale down by (1 x stepDown) at a time\n for (int i = 0; i < stepDown; i++) {\n // Get free launchers\n List<String> urlsToScaleDown = getFreeLaunchers();\n\n log.info(\"URLs to scale down: \" + urlsToScaleDown.toString());\n\n // Sort by launcher url. This will sort the oldest first, making it possible to take the youngest out of the\n // tail\n urlsToScaleDown.sort((o1, o2) -> {\n int mySuffix = Integer.parseInt(o1.split(\"\\\\.\")[0].substring(\n (Constants.LAUNCHER_URL_PREFIX + \"-\").length()));\n\n int theirSuffix = Integer.parseInt(o2.split(\"\\\\.\")[0].substring(\n (Constants.LAUNCHER_URL_PREFIX + \"-\").length()));\n\n return Integer.compare(mySuffix, theirSuffix);\n });\n\n // Get the youngest free launcher URL\n String launcherUrlToDelete = urlsToScaleDown.get(urlsToScaleDown.size() - 1);\n\n log.info(\"Cutting down [Launcher URL] \" + launcherUrlToDelete + \"...\");\n\n // Get object name from launcher URL\n String deploymentName = getObjectNameFromLauncherUrl(launcherUrlToDelete);\n\n // Delete deployment and service\n if (!deleteLauncher(deploymentName)) {\n log.error(\"Launcher deletion failed [Object Name] \" + deploymentName);\n }\n }\n }",
"public void validateLauncherUrls() {\n log.info(\"Validating the existing launcher URL list for missing deployments...\");\n\n for (String launcherUrl : getTotalLaunchers()) {\n log.info(\"Validating [Launcher URL] \" + launcherUrl + \"...\");\n String objectName = getObjectNameFromLauncherUrl(launcherUrl);\n if (!runtimeClient.deploymentExists(objectName) || !runtimeClient.serviceExists(objectName)) {\n log.info(\"Found an invalid launcher [URL] \" + launcherUrl);\n // Just remove the reference to launcher now\n // cleanOrphan* jobs will clean any orphan deployments\n // desired count check will scale up if free count is reduced\n unregisterLauncherIfExists(launcherUrl);\n }\n }\n }",
"public void removeServiceEntry(String linkName);",
"public void destroy() {\n if (yarnTwillRunnerService != null) {\n yarnTwillRunnerService.stop();\n }\n if (zkServer != null) {\n zkServer.stopAndWait();\n }\n if (locationFactory != null) {\n Location location = locationFactory.create(\"/\");\n try {\n location.delete(true);\n } catch (IOException e) {\n LOG.warn(\"Failed to delete location {}\", location, e);\n }\n }\n }",
"public NodeSet deleteLbInstances() throws JNCException {\n this.lbInstances = null;\n String path = \"lb-instances\";\n return delete(path);\n }",
"void delete(String resourceGroupName, String referer, String virtualMachineName);",
"@Override\n public Event delete(Ec2LaunchConfiguration oldResource) {\n return null;\n }",
"void delete(List<MountPoint> mountPoints);",
"public void cleanOrphanDeployments() {\n log.info(\"Cleaning orphan Deployments...\");\n List<String> deploymentNames = getDeployments();\n for (String deploymentName : deploymentNames) {\n if (deploymentName.startsWith(Constants.BPG_APP_TYPE_LAUNCHER + \"-\") && !serviceExists(deploymentName)) {\n log.info(\"Cleaning orphan Deployment [Name] \" + deploymentName + \"...\");\n\n unregisterLauncherIfExistsByObjectName(deploymentName);\n\n if (!runtimeClient.deleteDeployment(deploymentName)) {\n log.error(\"Deployment deletion failed [Deployment Name] \" + deploymentName);\n }\n }\n }\n }",
"private String getLauncherUrlFromObjectName(String objectName) {\n if (objectName != null) {\n return objectName.replace(Constants.BPG_APP_TYPE_LAUNCHER, Constants.LAUNCHER_URL_PREFIX) +\n \".\" +\n rootDomainName;\n }\n\n throw new IllegalArgumentException(\"Null Object name cannot be processed.\");\n }",
"void delete(MountPoint mountPoint);",
"void purge(String[] targetInstanceNames) throws DigitalAssetStoreException;",
"@AfterEach\n public void after() {\n launcher.dispose();\n }",
"public static void deleteInstance()\r\n\t{\r\n\t\tlightManager = null;\r\n\t}",
"private String getObjectNameFromLauncherUrl(String launchUrl) {\n if (launchUrl != null) {\n String[] domainParts = launchUrl.split(\"\\\\.\");\n return domainParts[0].replace(Constants.LAUNCHER_URL_PREFIX, Constants.BPG_APP_TYPE_LAUNCHER);\n }\n\n throw new IllegalArgumentException(\"Null launcher URL cannot be processed.\");\n }",
"public static void kill() {\n Iterator<Recipe> recipes = tj.getServer().recipeIterator();\r\n Recipe recipe;\r\n\r\n while (recipes.hasNext()) {\r\n recipe = recipes.next();\r\n\r\n if (recipe != null && customItems.containsValue(recipe.getResult()))\r\n recipes.remove();\r\n }\r\n\r\n tj = null;\r\n messages = null;\r\n playerDataFolder = null;\r\n players = null;\r\n customItems = null;\r\n }",
"@Override\r\n\tpublic Jumper delete(Jumper jumper) {\n\t\treturn null;\r\n\t}",
"public void delete(UUID id) throws InstanceNotFoundException {\n if (!workloadRepository.existsById(id)) {\n throw new InstanceNotFoundException(id);\n }\n workloadRepository.deleteById(id);\n }",
"public void delete(String entity_name, String key) {\r\n \r\n Entity entity = getEntity(entity_name);\r\n int RF = entity.RF;\r\n\r\n //For each node\r\n for ( int i_node =0 ; i_node < numar_noduri && RF > 0; i_node++) {\r\n\r\n int i_instance = 0;\r\n while (i_instance < noduri.get(i_node).dimensiune && RF > 0) {\r\n\r\n Instance instance = noduri.get(i_node).instances.get(i_instance);\r\n \r\n if (instance.entity_name.equals(entity_name)\r\n && String.valueOf(instance.values.get(0)).equals(key)) {\r\n\r\n noduri.get(i_node).instances.remove(i_instance);\r\n noduri.get(i_node).dimensiune--;\r\n RF--;\r\n i_instance--;\r\n }\r\n i_instance++;\r\n }\r\n }\r\n if (RF > 0) {\r\n System.out.println(\"NO INSTANCE TO DELETE\");\r\n }\r\n }",
"public void deleteClicker(View view) {\n\t\tint num = objectArray.length - 1;\n\t\tSystem.out.println(\"delete\");\n\n\t\t// create copy of object array and skip entry to which we want to remove\n\t\tClickerCounterModel[] tempObjectArray = new ClickerCounterModel[num];\n\t\tfor (int i = 0; i < num; i++) {\n\t\t\tif (!objectArray[i].getClickerName().equals(\n\t\t\t\t\tclickerCountObject.getClickerName())) {\n\t\t\t\ttempObjectArray[i] = new ClickerCounterModel(\n\t\t\t\t\t\tobjectArray[i].getClickerName());\n\t\t\t\ttempObjectArray[i].setClickerCount(objectArray[i]\n\t\t\t\t\t\t.getClickerCount());\n\t\t\t\ttempObjectArray[i].setClickerTimestamps(objectArray[i]\n\t\t\t\t\t\t.getClickerTimestamps());\n\t\t\t}\n\t\t}\n\t\t// reassign object to new array\n\t\twriteObjectToFile(tempObjectArray);\n\n\t\t// restart the application\n\t\tIntent i = getBaseContext().getPackageManager()\n\t\t\t\t.getLaunchIntentForPackage(getBaseContext().getPackageName());\n\t\ti.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\tstartActivity(i);\n\t}",
"public void run() {\n Launcher.destroyAll();\n }",
"public void removeApplicationEnvLink(String appId, String appVersionId, String appVersionInstanceId);",
"public void delete() {\r\n\t\tfor (int i = 0; i <= DatabaseUniverse.getDatabaseNumber(); i++) {\r\n\t\t\tif (this.equals(DatabaseUniverse.getDatabases(i))) {\r\n\t\t\t\tDatabaseUniverse.getAllDatabases().set(i, null);\r\n\t\t\t\tDatabaseUniverse.getAllDatabases().remove(i);\r\n\t\t\t\tDatabaseUniverse.setDatabaseNumber(-1);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void launchRemoved(ILaunch launch)\n\t{\n\t\t// Verify that the launch is of the correct configuration type.\n\t\ttry\n\t\t{\n\t\t\tILaunchConfiguration config = launch.getLaunchConfiguration();\n\t\t\tif (! (config.getType().getIdentifier().equals(IRuntimePlayerLaunchConfigurationConstants.ID_RUNTIMEPLAYER_CONFIGURATION)))\n\t\t\t\treturn;\n\t\t} catch (CoreException ex)\n\t\t{\n\t\t\tBRenderLog.logError(ex,\"Unable to query launch configuration.\");\n\t\t}\n\t\t\n\t\t// Close views only if the launch is the current one.\n\t\tif (launch == g_currentLaunch)\n\t\t{\n\t\t g_currentLaunch = null;\n\t\t\n\t\t // Reset the Runtime Player components in order to begin another launch\n\t\t // run/debug session.\n\t\t Activator.getDefault().closePlayer();\n\t\t}\n\t}",
"public static void destroy(String name) {\n synchronized (CacheStorageManager.class) {\n CacheStorage cache = map.remove(name);\n if (cache != null) {\n cache.destroy(App_.getInstance());\n }\n }\n }",
"void deleteVHost(String vHostName);",
"@RequestMapping(path = \"/connectors/kernels\", method = RequestMethod.DELETE)\n public @ResponseBody\n ResponseEntity<?> killNotebookKernels() {\n Page<NotebookConnector> connectors = notebookConnectorRepository.findByType(\"jupyter\", new PageRequest(0, Integer.MAX_VALUE));\n for(NotebookConnector connector : connectors) {\n connector.setHttpRepository(httpRepository);\n connector.killAllKernels();\n }\n LOGGER.info(\"Completed kill every alive notebook [jupyter] kernels.\");\n return ResponseEntity.noContent().build();\n }",
"@HTTP(\n method = \"DELETE\",\n path = \"/apis/config.openshift.io/v1/clusterversions\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Status> deleteCollectionClusterVersion();",
"public void deleteInst() {\n\t\tlogger.debug(\"DeviceNameTableTester has been stopped\");\n\t}",
"private boolean DelWarp(IPlayer owner, String name)\r\n\t{\r\n\t\tif (!doesWarpExist(owner, name))\r\n\t\t\treturn false;\r\n\t\tboolean success;\r\n\t\tif (owner == null)\r\n\t\t\tsuccess = database.execute(\"DELETE FROM warpdrive_locations WHERE name=? AND public=1\", name);\r\n\t\telse\r\n\t\t\tsuccess = database.execute(\"DELETE FROM warpdrive_locations WHERE name=? AND public=0 AND creator=?\", name, owner);\r\n\t\tcache.Invalidate(cacheKey(owner, name));\r\n\t\treturn success;\r\n\t}",
"public void deleteBackends(Map<String, Backend> zonesToBackend) throws IOException {\n for (Map.Entry<String, Backend> zoneToBackend : zonesToBackend.entrySet()) {\n String zone = zoneToBackend.getKey();\n Backend backend = zoneToBackend.getValue();\n String instanceGroupUrl = backend.getGroup();\n String instanceGroupName = CloudAPI.getResourceNameFromResourceUrl(instanceGroupUrl);\n log.warn(\"Deleting instance group: \" + instanceGroupName);\n Operation response =\n compute.instanceGroups().delete(project, zone, instanceGroupName).execute();\n operationPoller.waitForOperationCompletion(response);\n log.info(\"Sucessfully deleted instance group: \" + instanceGroupName);\n }\n }",
"void delete(String resourceGroupName, String resourceName, String replicaName);",
"void delete(String resourceGroupName, String hubName, String predictionName);",
"public NodeSet deleteDataInstances() throws JNCException {\n this.dataInstances = null;\n String path = \"data-instances\";\n return delete(path);\n }",
"public static void deleteObject(String path, String name) throws Exception {\n if (!exists(path, name))\n throw new Exception (\"File does not exist!\");\n new File(kNetworkPath + name).delete();\n }",
"@Override\n\tpublic void deleteInvoker(Invoker<?> invoker) {\n\t\t\n\t}",
"public void deleteEntry(Entry e) {\n entries.remove(e.getName());\n }",
"void delete(String resourceGroupName, String referer, String virtualMachineName, Context context);",
"static public void terminateCurrentLaunch()\n\t{\n\t\tif (g_currentLaunch != null)\n\t\t{\n\t\t\tILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();\n\t\t\tmanager.removeLaunch(g_currentLaunch);\n\t\t}\n\t}",
"public void deleteWerker(Worker w)\n {\n if(aantalWerkers > 0)\n {\n for(int i=0; i<5;i++)\n {\n if(workers[i] == w)\n {\n workers[i] = null;\n }\n }\n w.setInStructure(false);\n aantalWerkers--;\n }\n }",
"public void cleanOrphanServices() {\n log.info(\"Cleaning orphan Services...\");\n List<String> serviceNames = getServices();\n for (String serviceName : serviceNames) {\n if (serviceName.startsWith(Constants.BPG_APP_TYPE_LAUNCHER + \"-\") && !deploymentExists(serviceName)) {\n log.info(\"Cleaning orphan Service [Name] \" + serviceName + \"...\");\n\n unregisterLauncherIfExistsByObjectName(serviceName);\n\n if (!runtimeClient.deleteService(serviceName)) {\n log.error(\"Service deletion failed [Service Name] \" + serviceName);\n }\n }\n }\n }",
"@Override\n public void close(JarFile object) {\n JarFileFactory jarFileFactory = instance;\n synchronized (jarFileFactory) {\n object = urlCache.remove(object);\n if (object != null) {\n fileCache.remove(URLUtil.urlNoFragString((URL)object));\n }\n return;\n }\n }",
"protected void kill() {\n\t\tsynchronized (this) // Don't allow shutdown during startup.\n\t\t{\n\t\t\t// Only execute for the first caller.\n\t\t\tif (shutdownMutex.acquire()) {\n\t\t\t\t// Shutdown payer thread.\n\t\t\t\tpayerThread.interrupt();\n\n\t\t\t\tfor (int i = 0; i < sets.length; i++) {\n\t\t\t\t\tsets[i].kill();\n\t\t\t\t}\n\n\t\t\t\t// Shutdown the thread pools.\n\t\t\t\tproducerThreadPool.kill();\n\n\t\t\t\t// Let the GC figure the rest out.\n\t\t\t}\n\t\t}\n\t}",
"@HTTP(\n method = \"DELETE\",\n path = \"/apis/config.openshift.io/v1/apiservers\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Status> deleteCollectionAPIServer();",
"void delete(String resourceGroupName, String searchServiceName, String sharedPrivateLinkResourceName);",
"public void Kill(){\n this.dead.getAndSet(true);\n if(this.registry != null){\n try {\n UnicastRemoteObject.unexportObject(this.registry, true);\n } catch(Exception e){\n System.out.println(\"None reference\");\n }\n }\n }",
"public void deleteMap(String s){\n GridMap target=null;\n for(GridMap gm:mapsList){\n if(gm.getMapName().equals(s))\n target=gm;\n }\n removeMaps(target);\n }",
"@AfterClass(alwaysRun = true)\n public void webAppDelete() throws Exception {\n\n webAppAdminClient.deleteWebAppFile(\"HelloWorldWebapp.war\", hostName);\n assertTrue(WebAppDeploymentUtil.isWebApplicationUnDeployed(\n backendURL, sessionCookie,\n \"HelloWorldWebapp.war\"), \"HelloWorldWebapp unDeployment failed\");\n }",
"void delete(String resourceGroupName, String virtualMachineTemplateName);",
"public void deleteInstance(){\n //cancels the runnable\n shouldCancelRunnable = true;\n //remove the chest from the map to avoid confusion\n this.location.getBlock().setType(Material.AIR);\n //unregister from all events, we're done!\n HandlerList.unregisterAll(this);\n }",
"public com.google.protobuf.Empty deleteApplication(org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request);",
"public void watchAndClean() {\n runtimeClient.watchWithWatcher(new Watcher<Event>() {\n\n @Override\n public void eventReceived(Action action, Event resource) {\n if ((resource.getInvolvedObject().getKind().equals(\"Deployment\") ||\n resource.getInvolvedObject().getKind().equals(\"Service\"))\n && resource.getInvolvedObject().getName().startsWith(Constants.BPG_APP_TYPE_LAUNCHER)\n && (action == Action.DELETED || action == Action.MODIFIED)) {\n\n log.info(\"Received \"\n + action.toString() + \" event for \"\n + resource.getInvolvedObject().getKind() + \" \"\n + resource.getInvolvedObject().getName());\n\n cleanOrphanDeployments();\n cleanOrphanServices();\n } else {\n log.debug(\"Received action \" + action.toString() + \" for resource \"\n + resource.getInvolvedObject().getKind() + \":\"\n + resource.getInvolvedObject().getName());\n }\n }\n\n @Override\n public void onClose(KubernetesClientException cause) {\n log.info(\"Shutting down Event Watcher...\");\n }\n });\n }",
"LinkedService delete(String resourceGroupName, String workspaceName, String linkedServiceName);",
"@Override\n\tpublic void terminateDatacenters() {\n\t}",
"@Override\n public Void run() throws KeeperException, InterruptedException {\n if (zkClient.exists(path, true) == null) {\n LOG.error(\"Trying to delete a path (\" + path\n + \") that doesn't exist.\");\n }\n zkClient.delete(path, version);\n return null;\n }",
"private void LoescheKontakt(Kontakt k) throws Exception {\n\t\tKontaktService service = (KontaktService) Naming.lookup (\"rmi://localhost:1099/KontaktService\");\r\n\t\t\r\n\t\tk = service.deleteKontakt(k);\r\n\t\t\r\n\t\tSystem.out.println(\"Kontakt gelöscht\");\r\n\t\t\r\n\t}",
"public void doDelete ( RunData data)\n\t{\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ());\n\n\t\t// cancel copy if there is one in progress\n\t\tif(! Boolean.FALSE.toString().equals(state.getAttribute (STATE_COPY_FLAG)))\n\t\t{\n\t\t\tinitCopyContext(state);\n\t\t}\n\n\t\t// cancel move if there is one in progress\n\t\tif(! Boolean.FALSE.toString().equals(state.getAttribute (STATE_MOVE_FLAG)))\n\t\t{\n\t\t\tinitMoveContext(state);\n\t\t}\n\n\t\tParameterParser params = data.getParameters ();\n\n\t\tList Items = (List) state.getAttribute(STATE_DELETE_ITEMS);\n\n\t\t// Vector deleteIds = (Vector) state.getAttribute (STATE_DELETE_IDS);\n\n\t\t// delete the lowest item in the hireachy first\n\t\tHashtable deleteItems = new Hashtable();\n\t\t// String collectionId = (String) state.getAttribute (STATE_COLLECTION_ID);\n\t\tint maxDepth = 0;\n\t\tint depth = 0;\n\n\t\tIterator it = Items.iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tBrowseItem item = (BrowseItem) it.next();\n\t\t\tdepth = ContentHostingService.getDepth(item.getId(), item.getRoot());\n\t\t\tif (depth > maxDepth)\n\t\t\t{\n\t\t\t\tmaxDepth = depth;\n\t\t\t}\n\t\t\tList v = (List) deleteItems.get(new Integer(depth));\n\t\t\tif(v == null)\n\t\t\t{\n\t\t\t\tv = new Vector();\n\t\t\t}\n\t\t\tv.add(item);\n\t\t\tdeleteItems.put(new Integer(depth), v);\n\t\t}\n\n\t\tboolean isCollection = false;\n\t\tfor (int j=maxDepth; j>0; j--)\n\t\t{\n\t\t\tList v = (List) deleteItems.get(new Integer(j));\n\t\t\tif (v==null)\n\t\t\t{\n\t\t\t\tv = new Vector();\n\t\t\t}\n\t\t\tIterator itemIt = v.iterator();\n\t\t\twhile(itemIt.hasNext())\n\t\t\t{\n\t\t\t\tBrowseItem item = (BrowseItem) itemIt.next();\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tif (item.isFolder())\n\t\t\t\t\t{\n\t\t\t\t\t\tContentHostingService.removeCollection(item.getId());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tContentHostingService.removeResource(item.getId());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (PermissionException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state, rb.getString(\"notpermis6\") + \" \" + item.getName() + \". \");\n\t\t\t\t}\n\t\t\t\tcatch (IdUnusedException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state,RESOURCE_NOT_EXIST_STRING);\n\t\t\t\t}\n\t\t\t\tcatch (TypeException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state, rb.getString(\"deleteres\") + \" \" + item.getName() + \" \" + rb.getString(\"wrongtype\"));\n\t\t\t\t}\n\t\t\t\tcatch (ServerOverloadException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state, rb.getString(\"failed\"));\n\t\t\t\t}\n\t\t\t\tcatch (InUseException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state, rb.getString(\"deleteres\") + \" \" + item.getName() + \" \" + rb.getString(\"locked\"));\n\t\t\t\t}// try - catch\n\t\t\t\tcatch(RuntimeException e)\n\t\t\t\t{\n\t\t\t\t\tlogger.debug(\"ResourcesAction.doDelete ***** Unknown Exception ***** \" + e.getMessage());\n\t\t\t\t\taddAlert(state, rb.getString(\"failed\"));\n\t\t\t\t}\n\t\t\t}\t// for\n\n\t\t}\t// for\n\n\t\tif (state.getAttribute(STATE_MESSAGE) == null)\n\t\t{\n\t\t\t// delete sucessful\n\t\t\tstate.setAttribute (STATE_MODE, MODE_LIST);\n\n\t\t\tif (((String) state.getAttribute (STATE_SELECT_ALL_FLAG)).equals (Boolean.TRUE.toString()))\n\t\t\t{\n\t\t\t\tstate.setAttribute (STATE_SELECT_ALL_FLAG, Boolean.FALSE.toString());\n\t\t\t}\n\n\t\t}\t// if-else\n\n\t}",
"public static void delInstance() {\n \tINSTANCE = null;\n \tcloseConnection();\n }",
"void delete(String resourceGroupName, String virtualMachineTemplateName, Boolean force);",
"Result deleteApp(String app);",
"public abstract LocalAbstractObject deleteObject(UniqueID objectID) throws NoSuchElementException, BucketStorageException;",
"public final void delete( ) throws Exception\n\t{\n\t\tDatastore.getInstance( ).deleteOnServer( this );\n\t}",
"public yandex.cloud.api.operation.OperationOuterClass.Operation deleteHosts(yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.DeleteClusterHostsRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getDeleteHostsMethod(), getCallOptions(), request);\n }",
"public String deleteLaunchConfiguration(String lcName) {\n\t\tDeleteLaunchConfigurationRequest request = new DeleteLaunchConfigurationRequest()\n\t\t\t\t.withLaunchConfigurationName(lcName);\n\t\tDeleteLaunchConfigurationResult response = asClient\n\t\t\t\t.deleteLaunchConfiguration(request);\n\t\tString res = \"DeleteLaunchConfiguration: \" + lcName + \" \" + response;\n\t\tlog.info(res);\n\n\t\treturn res;\n\t}",
"@Override\n\tpublic String clusterRemoveHost(String hostName) {\n\t\tif (!cluster.containsKey(hostName)) {\n\t\t\treturn \"No machine with the given hostname exists\";\n\t\t}\n\t\tMachine machineInstance = cluster.get(hostName);\n\t\tMap<String, Service> hostedServices = machineInstance.getHostedServices();\n\t\tfor (Map.Entry<String, Service> entry : hostedServices.entrySet()) {\n\t\t\tthis.removeInstance(entry.getKey(), hostName);\n\t\t}\n\t\t// remove machine from cluster\n\t\tcluster.remove(hostName);\n\t\treturn \"Cluster Scaled Down - \" + hostName;\n\t}",
"void delete(String resourceGroupName, String rackName, Context context);",
"public void removeDeviceServiceLink();",
"public void del(String name) {\n\t\tfor (AddrBean ad : addrlist) {\n\t\t\tif (name.equals(ad.getUsername())) {\n\t\t\t\taddrlist.remove(ad);\n\t\t\t}\n\t\t}\n\t}",
"@HTTP(\n method = \"DELETE\",\n path = \"/apis/config.openshift.io/v1/proxies\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Status> deleteCollectionProxy();",
"public void markIpAddress1Delete() throws JNCException {\n markLeafDelete(\"ipAddress1\");\n }",
"@HTTP(\n method = \"DELETE\",\n path = \"/apis/config.openshift.io/v1/networks\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Status> deleteCollectionNetwork();",
"void remove(String installedAppId);",
"public static AppRunningEntity removeApp(String paramString) {\n }",
"@DELETE\n @Path(\"/{version:[vV][1]}/deAllocate\")\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(MediaType.APPLICATION_JSON)\n @Operation(description = \"Terminate/Deallocate a 3GPP Service Instance on a version provided\",\n responses = @ApiResponse(\n content = @Content(array = @ArraySchema(schema = @Schema(implementation = Response.class)))))\n public Response deleteServiceInstance(DeAllocate3gppService request, @PathParam(\"version\") String version,\n @Context ContainerRequestContext requestContext) throws ApiException {\n String requestId = requestHandlerUtils.getRequestId(requestContext);\n HashMap<String, String> instanceIdMap = new HashMap<>();\n instanceIdMap.put(\"serviceInstanceId\", request.getServiceInstanceID());\n return deleteServiceInstances(request, Action.deleteInstance, version, requestId, instanceIdMap,\n requestHandlerUtils.getRequestUri(requestContext, URI_PREFIX));\n }",
"private final void deleteRecipe() {\n \tnew DeleteRecipeTask().execute();\n }",
"public void removeMarkers() throws CoreException {\r\n if (resource == null) {\r\n return;\r\n }\r\n IMarker[] tMarkers = null;\r\n int depth = 2;\r\n tMarkers = resource.findMarkers(LPEXTask.ID, true, depth);\r\n for (int i = tMarkers.length - 1; i >= 0; i--) {\r\n tMarkers[i].delete();\r\n }\r\n }",
"public boolean deleteOnExit();",
"@HTTP(\n method = \"DELETE\",\n path = \"/apis/config.openshift.io/v1/clusteroperators\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Status> deleteCollectionClusterOperator();",
"public void markNextHopIpv6GwAddr1Delete() throws JNCException {\n markLeafDelete(\"nextHopIpv6GwAddr1\");\n }",
"public abstract void deleteSAMEnvironment(String envName);",
"public void delete(Object object)\n{\n\t// remove the object\n\tobjects.remove(object);\n}",
"public boolean markLauncherAsFree(String launcherUrl) {\n if (persistence.launcherExists(launcherUrl)) {\n return persistence.markLauncherAsFree(launcherUrl);\n }\n\n return false;\n }",
"public void deleteApplication(org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request,\n io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver);",
"void deleteRecipe(RecipeObject recipe);",
"void removeApp(String bundleId);",
"public void invalidateManifestManager()\n {\n manifestManager = null;\n }",
"void deleteByResourceGroup(String resourceGroupName, String rackName);",
"private NameValue<String, String> removeURL(Map<String, List<ReplicaCatalogEntry>> m) {\n if (m == null || m.keySet().isEmpty()) {\n return null;\n }\n\n // Return the first url from the EntrySet\n Iterator it = m.entrySet().iterator();\n Map.Entry<String, List<ReplicaCatalogEntry>> entry = (Map.Entry) it.next();\n // remove this entry\n it.remove();\n // returning the first element. No need for a check as\n // population of the list is controlled\n return new NameValue(entry.getKey(), entry.getValue().get(0).getPFN());\n }",
"public void removeBootStrapNode() throws RemoteException{\n\t\tnodeIp=null;\n\t\thasNeighbours = false;\n\t\n\t}",
"@Override\n\tpublic void deleteByname(String adminname) {\n\t\tSettingMapper.deleteByname(adminname);\n\t}",
"LinkedService deleteById(String id);",
"public void delete(App obj) {\n getClient().delete(\n String.format(Routes.APP_DELETE, obj.getId())\n );\n obj.setId(null);\n }",
"@Override\n\tpublic void deleteLinkmanById(long id) {\n\t\tmapper.deleteByPrimaryKey(id);\n\t}",
"@Override\n public void deleteVersion(String instanceId, String tag) {\n InstanceManifest im = readInstance(instanceId);\n Manifest.Key key = new Manifest.Key(InstanceManifest.getRootName(instanceId), tag);\n RemoteService master = mp.getControllingMaster(hive, im.getManifest());\n try (Activity deploy = reporter.start(\"Deleting Ver. \" + tag + \" of \" + im.getConfiguration().name);\n NoThrowAutoCloseable proxy = reporter.proxyActivities(master)) {\n MasterRootResource root = ResourceProvider.getVersionedResource(master, MasterRootResource.class, context);\n if (getDeploymentStates(instanceId).installedTags.contains(tag)) {\n throw new WebApplicationException(\"Version \" + tag + \" is still installed, cannot delete\",\n Status.EXPECTATION_FAILED);\n }\n\n root.getNamedMaster(group).deleteVersion(instanceId, tag);\n\n // now delete also on the central...\n if (minion.getMode() == MinionMode.CENTRAL) {\n InstanceManifest.delete(hive, key);\n }\n }\n\n syncInstance(minion, rc, group, instanceId);\n if (minion.getMode() != MinionMode.CENTRAL) {\n changes.remove(ObjectChangeType.INSTANCE, key);\n }\n }",
"public void deleteLocal() {\n if (isLocal()) {\n deleteFileOrFolder(new File(getLocalOsPath()));\n }\n }",
"public void deleteHosts(yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.DeleteClusterHostsRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.operation.OperationOuterClass.Operation> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getDeleteHostsMethod(), getCallOptions()), request, responseObserver);\n }"
] | [
"0.6038219",
"0.5716322",
"0.53382033",
"0.52037823",
"0.51421905",
"0.50992936",
"0.49826252",
"0.4937572",
"0.48291618",
"0.48251885",
"0.48188642",
"0.474718",
"0.47422203",
"0.4723599",
"0.46898562",
"0.46833405",
"0.46720335",
"0.46637946",
"0.4643038",
"0.46371832",
"0.4629715",
"0.46267205",
"0.46222162",
"0.46128047",
"0.45969805",
"0.45883313",
"0.45804217",
"0.4547442",
"0.45440793",
"0.45353186",
"0.4527695",
"0.4516974",
"0.4502115",
"0.45012462",
"0.44974667",
"0.44849628",
"0.44756916",
"0.44714746",
"0.4469998",
"0.4466726",
"0.4460611",
"0.44601655",
"0.44560793",
"0.4438142",
"0.44379544",
"0.44205633",
"0.44159737",
"0.44000039",
"0.43976533",
"0.43957928",
"0.43795767",
"0.43630385",
"0.43629283",
"0.43554413",
"0.43506372",
"0.43438742",
"0.43414664",
"0.43395278",
"0.43332806",
"0.43318644",
"0.4325581",
"0.432269",
"0.4316278",
"0.43125784",
"0.43119374",
"0.43110567",
"0.43107986",
"0.43093202",
"0.43004724",
"0.42997268",
"0.4298293",
"0.42980826",
"0.42960355",
"0.42937085",
"0.42901576",
"0.428471",
"0.4283733",
"0.42799312",
"0.42775565",
"0.4276334",
"0.427019",
"0.42689073",
"0.42611015",
"0.42518014",
"0.4248428",
"0.4247258",
"0.42462498",
"0.42424244",
"0.4235926",
"0.4235831",
"0.42354187",
"0.4229482",
"0.42236957",
"0.4222443",
"0.42131153",
"0.42094752",
"0.42080733",
"0.4202732",
"0.4196342",
"0.41924673"
] | 0.5378288 | 2 |
Delete launcher URL, derived from the object name, from the list of launchers, if it exists. | private void unregisterLauncherIfExistsByObjectName(String objectName) {
// Unregister from launcher list
String launcherUrl = getLauncherUrlFromObjectName(objectName);
unregisterLauncherIfExists(launcherUrl);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void unregisterLauncherIfExists(String launcherUrl) {\n log.info(\"Unregistering launcher [URL] \" + launcherUrl);\n if (persistence.launcherExists(launcherUrl)) {\n persistence.unregisterLauncher(launcherUrl);\n } else {\n log.debug(\"Launcher URL not found: \" + launcherUrl);\n }\n }",
"public void validateLauncherUrls() {\n log.info(\"Validating the existing launcher URL list for missing deployments...\");\n\n for (String launcherUrl : getTotalLaunchers()) {\n log.info(\"Validating [Launcher URL] \" + launcherUrl + \"...\");\n String objectName = getObjectNameFromLauncherUrl(launcherUrl);\n if (!runtimeClient.deploymentExists(objectName) || !runtimeClient.serviceExists(objectName)) {\n log.info(\"Found an invalid launcher [URL] \" + launcherUrl);\n // Just remove the reference to launcher now\n // cleanOrphan* jobs will clean any orphan deployments\n // desired count check will scale up if free count is reduced\n unregisterLauncherIfExists(launcherUrl);\n }\n }\n }",
"private String getObjectNameFromLauncherUrl(String launchUrl) {\n if (launchUrl != null) {\n String[] domainParts = launchUrl.split(\"\\\\.\");\n return domainParts[0].replace(Constants.LAUNCHER_URL_PREFIX, Constants.BPG_APP_TYPE_LAUNCHER);\n }\n\n throw new IllegalArgumentException(\"Null launcher URL cannot be processed.\");\n }",
"private boolean deleteLauncher(String deploymentName) {\n unregisterLauncherIfExistsByObjectName(deploymentName);\n\n boolean svcDeleted = runtimeClient.deleteService(deploymentName);\n boolean depDeleted = runtimeClient.deleteDeployment(deploymentName);\n\n return svcDeleted && depDeleted;\n }",
"private String getLauncherUrlFromObjectName(String objectName) {\n if (objectName != null) {\n return objectName.replace(Constants.BPG_APP_TYPE_LAUNCHER, Constants.LAUNCHER_URL_PREFIX) +\n \".\" +\n rootDomainName;\n }\n\n throw new IllegalArgumentException(\"Null Object name cannot be processed.\");\n }",
"public boolean markLauncherAsFree(String launcherUrl) {\n if (persistence.launcherExists(launcherUrl)) {\n return persistence.markLauncherAsFree(launcherUrl);\n }\n\n return false;\n }",
"public void launchRemoved(ILaunch launch)\n\t{\n\t\t// Verify that the launch is of the correct configuration type.\n\t\ttry\n\t\t{\n\t\t\tILaunchConfiguration config = launch.getLaunchConfiguration();\n\t\t\tif (! (config.getType().getIdentifier().equals(IRuntimePlayerLaunchConfigurationConstants.ID_RUNTIMEPLAYER_CONFIGURATION)))\n\t\t\t\treturn;\n\t\t} catch (CoreException ex)\n\t\t{\n\t\t\tBRenderLog.logError(ex,\"Unable to query launch configuration.\");\n\t\t}\n\t\t\n\t\t// Close views only if the launch is the current one.\n\t\tif (launch == g_currentLaunch)\n\t\t{\n\t\t g_currentLaunch = null;\n\t\t\n\t\t // Reset the Runtime Player components in order to begin another launch\n\t\t // run/debug session.\n\t\t Activator.getDefault().closePlayer();\n\t\t}\n\t}",
"public List<String> getFreeLaunchers() {\n return persistence.getFreeLauncherUrls();\n }",
"public void setLauncher(String launcher) {\n this.launcher = launcher;\n }",
"public void removeServiceEntry(String linkName);",
"@AfterEach\n public void after() {\n launcher.dispose();\n }",
"static public void terminateCurrentLaunch()\n\t{\n\t\tif (g_currentLaunch != null)\n\t\t{\n\t\t\tILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();\n\t\t\tmanager.removeLaunch(g_currentLaunch);\n\t\t}\n\t}",
"public void deleteClicker(View view) {\n\t\tint num = objectArray.length - 1;\n\t\tSystem.out.println(\"delete\");\n\n\t\t// create copy of object array and skip entry to which we want to remove\n\t\tClickerCounterModel[] tempObjectArray = new ClickerCounterModel[num];\n\t\tfor (int i = 0; i < num; i++) {\n\t\t\tif (!objectArray[i].getClickerName().equals(\n\t\t\t\t\tclickerCountObject.getClickerName())) {\n\t\t\t\ttempObjectArray[i] = new ClickerCounterModel(\n\t\t\t\t\t\tobjectArray[i].getClickerName());\n\t\t\t\ttempObjectArray[i].setClickerCount(objectArray[i]\n\t\t\t\t\t\t.getClickerCount());\n\t\t\t\ttempObjectArray[i].setClickerTimestamps(objectArray[i]\n\t\t\t\t\t\t.getClickerTimestamps());\n\t\t\t}\n\t\t}\n\t\t// reassign object to new array\n\t\twriteObjectToFile(tempObjectArray);\n\n\t\t// restart the application\n\t\tIntent i = getBaseContext().getPackageManager()\n\t\t\t\t.getLaunchIntentForPackage(getBaseContext().getPackageName());\n\t\ti.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\tstartActivity(i);\n\t}",
"public void scaleDown() {\n log.info(\"Scaling down by [Step Down] \" + stepDown + \" instances...\");\n\n // Scale down by (1 x stepDown) at a time\n for (int i = 0; i < stepDown; i++) {\n // Get free launchers\n List<String> urlsToScaleDown = getFreeLaunchers();\n\n log.info(\"URLs to scale down: \" + urlsToScaleDown.toString());\n\n // Sort by launcher url. This will sort the oldest first, making it possible to take the youngest out of the\n // tail\n urlsToScaleDown.sort((o1, o2) -> {\n int mySuffix = Integer.parseInt(o1.split(\"\\\\.\")[0].substring(\n (Constants.LAUNCHER_URL_PREFIX + \"-\").length()));\n\n int theirSuffix = Integer.parseInt(o2.split(\"\\\\.\")[0].substring(\n (Constants.LAUNCHER_URL_PREFIX + \"-\").length()));\n\n return Integer.compare(mySuffix, theirSuffix);\n });\n\n // Get the youngest free launcher URL\n String launcherUrlToDelete = urlsToScaleDown.get(urlsToScaleDown.size() - 1);\n\n log.info(\"Cutting down [Launcher URL] \" + launcherUrlToDelete + \"...\");\n\n // Get object name from launcher URL\n String deploymentName = getObjectNameFromLauncherUrl(launcherUrlToDelete);\n\n // Delete deployment and service\n if (!deleteLauncher(deploymentName)) {\n log.error(\"Launcher deletion failed [Object Name] \" + deploymentName);\n }\n }\n }",
"void removeApp(String bundleId);",
"@Override\n public int deleteByPrimaryKey(Integer id) {\n return jurUrlMapper.deleteByPrimaryKey(id);\n }",
"void remove(String installedAppId);",
"public void unsetUrlName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(URLNAME$12, 0);\r\n }\r\n }",
"private void addFreeLauncher(String deploymentName) {\n persistence.addFreeLauncher(getLauncherUrlFromObjectName(deploymentName));\n }",
"private boolean DelWarp(IPlayer owner, String name)\r\n\t{\r\n\t\tif (!doesWarpExist(owner, name))\r\n\t\t\treturn false;\r\n\t\tboolean success;\r\n\t\tif (owner == null)\r\n\t\t\tsuccess = database.execute(\"DELETE FROM warpdrive_locations WHERE name=? AND public=1\", name);\r\n\t\telse\r\n\t\t\tsuccess = database.execute(\"DELETE FROM warpdrive_locations WHERE name=? AND public=0 AND creator=?\", name, owner);\r\n\t\tcache.Invalidate(cacheKey(owner, name));\r\n\t\treturn success;\r\n\t}",
"@Override\n public void close(JarFile object) {\n JarFileFactory jarFileFactory = instance;\n synchronized (jarFileFactory) {\n object = urlCache.remove(object);\n if (object != null) {\n fileCache.remove(URLUtil.urlNoFragString((URL)object));\n }\n return;\n }\n }",
"private void uninstallBrowser(String packageName) {\n Intent intent = null;\n try {\n intent = Intent.parseUri(\"http://\", Intent.URI_INTENT_SCHEME);\n } catch (Exception e) {\n Assert.fail();\n return;\n }\n mPackageManager.removeResolveInfosForIntent(intent, packageName);\n mPackageManager.removePackage(packageName);\n }",
"public static void deleteInstance()\r\n\t{\r\n\t\tlightManager = null;\r\n\t}",
"private static void deleteInstance(String[] args,String command,List<ExampleServer> servers) {\n \n if (args.length != 1) {\n System.err.println(\"syntax error (expected delete <name>): \" + command);\n return;\n }\n \n final String serviceName = args[0];\n ExampleServer server = Iterables.find(servers,server1 -> server1.getThisInstance().getName()\n .endsWith(serviceName),null);\n if (server == null) {\n System.err.println(\"No servers found named: \" + serviceName);\n return;\n }\n \n servers.remove(server);\n CloseableUtils.closeQuietly(server);\n System.out.println(\"Removed a random instance of: \" + serviceName);\n }",
"void removeHadithUrl(Object oldHadithUrl);",
"public String getLauncher() {\n return launcher;\n }",
"public void del(String name) {\n\t\tfor (AddrBean ad : addrlist) {\n\t\t\tif (name.equals(ad.getUsername())) {\n\t\t\t\taddrlist.remove(ad);\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void delete(String instance) {\n InstanceManifest im = readInstance(instance);\n List<InstanceVersionDto> versions = listVersions(instance);\n RemoteService master = mp.getControllingMaster(hive, im.getManifest());\n try (Activity deploy = reporter.start(\"Deleting \" + im.getConfiguration().name);\n NoThrowAutoCloseable proxy = reporter.proxyActivities(master)) {\n MasterRootResource root = ResourceProvider.getVersionedResource(master, MasterRootResource.class, context);\n InstanceStatusDto status = root.getNamedMaster(group).getStatus(instance);\n for (String app : status.getAppStatus().keySet()) {\n if (status.isAppRunningOrScheduled(app)) {\n throw new WebApplicationException(\"Application still running, cannot delete: \" + app,\n Status.EXPECTATION_FAILED);\n }\n }\n\n // cleanup is done periodically in background, still uninstall installed\n // versions to prevent re-start of processes later\n for (InstanceVersionDto dto : versions) {\n root.getNamedMaster(group).uninstall(dto.key);\n }\n\n root.getNamedMaster(group).delete(instance);\n }\n\n syncInstance(minion, rc, group, instance);\n\n versions.forEach(v -> changes.remove(ObjectChangeType.INSTANCE, v.key));\n }",
"public static void kill() {\n Iterator<Recipe> recipes = tj.getServer().recipeIterator();\r\n Recipe recipe;\r\n\r\n while (recipes.hasNext()) {\r\n recipe = recipes.next();\r\n\r\n if (recipe != null && customItems.containsValue(recipe.getResult()))\r\n recipes.remove();\r\n }\r\n\r\n tj = null;\r\n messages = null;\r\n playerDataFolder = null;\r\n players = null;\r\n customItems = null;\r\n }",
"public void cleanOrphanDeployments() {\n log.info(\"Cleaning orphan Deployments...\");\n List<String> deploymentNames = getDeployments();\n for (String deploymentName : deploymentNames) {\n if (deploymentName.startsWith(Constants.BPG_APP_TYPE_LAUNCHER + \"-\") && !serviceExists(deploymentName)) {\n log.info(\"Cleaning orphan Deployment [Name] \" + deploymentName + \"...\");\n\n unregisterLauncherIfExistsByObjectName(deploymentName);\n\n if (!runtimeClient.deleteDeployment(deploymentName)) {\n log.error(\"Deployment deletion failed [Deployment Name] \" + deploymentName);\n }\n }\n }\n }",
"public static void removeFirstLaunch(Context context) {\n\n context.getSharedPreferences(FILE_NAME, 0)\n .edit()\n .remove(FIRST_LAUNCH_KEY)\n .apply();\n }",
"public void removeApplicationEnvLink(String appId, String appVersionId, String appVersionInstanceId);",
"void removeHadithBookUrl(Object oldHadithBookUrl);",
"public void delete() {\r\n\t\tfor (int i = 0; i <= DatabaseUniverse.getDatabaseNumber(); i++) {\r\n\t\t\tif (this.equals(DatabaseUniverse.getDatabases(i))) {\r\n\t\t\t\tDatabaseUniverse.getAllDatabases().set(i, null);\r\n\t\t\t\tDatabaseUniverse.getAllDatabases().remove(i);\r\n\t\t\t\tDatabaseUniverse.setDatabaseNumber(-1);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"Result deleteApp(String app);",
"public Todo removeByURLTitle(String urlTitle) throws NoSuchTodoException;",
"private void promptRemoveSeed()\n {\n if(spider.numSeeds() == 0)\n JOptionPane.showMessageDialog(null, \"No URL's to remove\");\n else\n {\n String url;\n if(urlList.getSelectedValue() == null)\n url = JOptionPane.showInputDialog(null, \"Enter the URL to remove\", \"Remove URL\", JOptionPane.INFORMATION_MESSAGE);\n else\n url = urlList.getSelectedValue().toString();\n \n if(url != null && !spider.removeSeedUrl(url))\n JOptionPane.showMessageDialog(null, \"Failed to remove URL\");\n else\n urlModel.removeElement(url);\n }\n }",
"public void deleteEntry(Entry e) {\n entries.remove(e.getName());\n }",
"void deleteRepository(URL repositoryUrl);",
"public void removeEntry(final String url){\n if(url==null){\n return;\n }\n\n synchronized (mBitmapCache) {\n mBitmapCache.remove(url);\n }\n }",
"@Override\r\n\tpublic Jumper delete(Jumper jumper) {\n\t\treturn null;\r\n\t}",
"public void invalidateManifestManager()\n {\n manifestManager = null;\n }",
"private void deleteProfileIfExists() throws Exception {\n String[] args = new String[] { \"-validateAndUpdateRegistry\" };\n executeCommand(serverInstallDir, \"manageprofiles\", args, serverInstallDir, \"\");\n args = new String[] { \"-listProfiles\" };\n String output = executeCommand(serverInstallDir, \"manageprofiles\", args, serverInstallDir, \"\");\n if (output.indexOf(instanceName) >= 0) {\n args = new String[] { \"-delete\", \"-profileName\", instanceName };\n executeCommand(serverInstallDir, \"manageprofiles\", args, serverInstallDir, \"Trying to clean up existing profile\");\n }\n }",
"public void run() {\n Launcher.destroyAll();\n }",
"public void doDelete ( RunData data)\n\t{\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ());\n\n\t\t// cancel copy if there is one in progress\n\t\tif(! Boolean.FALSE.toString().equals(state.getAttribute (STATE_COPY_FLAG)))\n\t\t{\n\t\t\tinitCopyContext(state);\n\t\t}\n\n\t\t// cancel move if there is one in progress\n\t\tif(! Boolean.FALSE.toString().equals(state.getAttribute (STATE_MOVE_FLAG)))\n\t\t{\n\t\t\tinitMoveContext(state);\n\t\t}\n\n\t\tParameterParser params = data.getParameters ();\n\n\t\tList Items = (List) state.getAttribute(STATE_DELETE_ITEMS);\n\n\t\t// Vector deleteIds = (Vector) state.getAttribute (STATE_DELETE_IDS);\n\n\t\t// delete the lowest item in the hireachy first\n\t\tHashtable deleteItems = new Hashtable();\n\t\t// String collectionId = (String) state.getAttribute (STATE_COLLECTION_ID);\n\t\tint maxDepth = 0;\n\t\tint depth = 0;\n\n\t\tIterator it = Items.iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tBrowseItem item = (BrowseItem) it.next();\n\t\t\tdepth = ContentHostingService.getDepth(item.getId(), item.getRoot());\n\t\t\tif (depth > maxDepth)\n\t\t\t{\n\t\t\t\tmaxDepth = depth;\n\t\t\t}\n\t\t\tList v = (List) deleteItems.get(new Integer(depth));\n\t\t\tif(v == null)\n\t\t\t{\n\t\t\t\tv = new Vector();\n\t\t\t}\n\t\t\tv.add(item);\n\t\t\tdeleteItems.put(new Integer(depth), v);\n\t\t}\n\n\t\tboolean isCollection = false;\n\t\tfor (int j=maxDepth; j>0; j--)\n\t\t{\n\t\t\tList v = (List) deleteItems.get(new Integer(j));\n\t\t\tif (v==null)\n\t\t\t{\n\t\t\t\tv = new Vector();\n\t\t\t}\n\t\t\tIterator itemIt = v.iterator();\n\t\t\twhile(itemIt.hasNext())\n\t\t\t{\n\t\t\t\tBrowseItem item = (BrowseItem) itemIt.next();\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tif (item.isFolder())\n\t\t\t\t\t{\n\t\t\t\t\t\tContentHostingService.removeCollection(item.getId());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tContentHostingService.removeResource(item.getId());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (PermissionException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state, rb.getString(\"notpermis6\") + \" \" + item.getName() + \". \");\n\t\t\t\t}\n\t\t\t\tcatch (IdUnusedException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state,RESOURCE_NOT_EXIST_STRING);\n\t\t\t\t}\n\t\t\t\tcatch (TypeException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state, rb.getString(\"deleteres\") + \" \" + item.getName() + \" \" + rb.getString(\"wrongtype\"));\n\t\t\t\t}\n\t\t\t\tcatch (ServerOverloadException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state, rb.getString(\"failed\"));\n\t\t\t\t}\n\t\t\t\tcatch (InUseException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state, rb.getString(\"deleteres\") + \" \" + item.getName() + \" \" + rb.getString(\"locked\"));\n\t\t\t\t}// try - catch\n\t\t\t\tcatch(RuntimeException e)\n\t\t\t\t{\n\t\t\t\t\tlogger.debug(\"ResourcesAction.doDelete ***** Unknown Exception ***** \" + e.getMessage());\n\t\t\t\t\taddAlert(state, rb.getString(\"failed\"));\n\t\t\t\t}\n\t\t\t}\t// for\n\n\t\t}\t// for\n\n\t\tif (state.getAttribute(STATE_MESSAGE) == null)\n\t\t{\n\t\t\t// delete sucessful\n\t\t\tstate.setAttribute (STATE_MODE, MODE_LIST);\n\n\t\t\tif (((String) state.getAttribute (STATE_SELECT_ALL_FLAG)).equals (Boolean.TRUE.toString()))\n\t\t\t{\n\t\t\t\tstate.setAttribute (STATE_SELECT_ALL_FLAG, Boolean.FALSE.toString());\n\t\t\t}\n\n\t\t}\t// if-else\n\n\t}",
"String getLauncherClassName();",
"public SlingHttpResponse deleteLaunch(String path, int... expectedStatus) throws ClientException {\n\n FormEntityBuilder feb = FormEntityBuilder.create();\n\n // the command\n feb.addParameter(\"cmd\", CMD_DELETE_LAUNCH);\n\n // title of new launch section\n feb.addParameter(\"path\", path);\n\n return executeWCMCommand(CMD_CREATE_LAUNCH, feb, expectedStatus);\n }",
"public boolean deleteOnExit();",
"public void killRecentPackage() {\n IActivityManager activityManager = ActivityManager.getService();\n int userIdProcess = Process.myUserHandle().hashCode();\n List<ActivityManager.RecentTaskInfo> recentlist = new ArrayList<>();\n try {\n recentlist = activityManager.getRecentTasks(100, 1, userIdProcess).getList();\n } catch (Exception e) {\n loge(\"killRecentPackage\", e);\n }\n for (int i = 0; i < recentlist.size(); i++) {\n ActivityManager.RecentTaskInfo info = recentlist.get(i);\n String pakg = info.baseIntent.getComponent().getPackageName();\n int userId = info.userId;\n if (!mAppWhiteList.contains(pakg) && !inputMethodList.contains(pakg) && !pakg.contains(\"com.oppo.autotest\") && !pakg.contains(\"com.oppo.qe\")) {\n logd(\" killRecentPackage_forceStopPackage = \" + pakg + \" , userId = \" + userId);\n try {\n activityManager.forceStopPackage(pakg, userId);\n } catch (Exception e2) {\n loge(\"Failed killRecentPackage_forceStopPackage = \" + pakg + \" , userId = \" + userId, e2);\n }\n }\n }\n }",
"public void delete(String id) throws Exception {\n try {\n this.openConnection();\n PreparedStatement st = this.getConnection().prepareStatement(\"DELETE FROM VideogameEntries WHERE entry_id=?\");\n st.setString(1, id);\n st.executeUpdate();\n } catch (Exception e) {\n throw new Exception(\"Method Delete list \" + e.getMessage());\n } finally {\n try {\n this.closeConnection();\n } catch (Exception e) {\n throw new Exception(\"Metodo Delete VideogameListEntry \" + e.getMessage());\n }\n }\n }",
"public void deletePerformer(Performer performer){\n\t\tperformers.remove(performer);\n\t}",
"private NameValue<String, String> removeURL(Map<String, List<ReplicaCatalogEntry>> m) {\n if (m == null || m.keySet().isEmpty()) {\n return null;\n }\n\n // Return the first url from the EntrySet\n Iterator it = m.entrySet().iterator();\n Map.Entry<String, List<ReplicaCatalogEntry>> entry = (Map.Entry) it.next();\n // remove this entry\n it.remove();\n // returning the first element. No need for a check as\n // population of the list is controlled\n return new NameValue(entry.getKey(), entry.getValue().get(0).getPFN());\n }",
"public static void destroy(String name) {\n synchronized (CacheStorageManager.class) {\n CacheStorage cache = map.remove(name);\n if (cache != null) {\n cache.destroy(App_.getInstance());\n }\n }\n }",
"private void removeInstance(OpenHABInstance instance) {\n\t\tif (instance.getId() == prefs.getDefaultOpenHABInstanceId()) {\n\t\t\tprefs.setDefaultOpenHABInstanceId(-1);\n\t\t}\n\t\tprefs.removeOpenHABInstance(instance);\n\t\tlistAdapter.remove(instance);\n\t}",
"public com.google.protobuf.Empty deleteApplication(org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request);",
"@Override\n\tpublic void deleteLinkmanById(long id) {\n\t\tmapper.deleteByPrimaryKey(id);\n\t}",
"void purge(String[] targetInstanceNames) throws DigitalAssetStoreException;",
"public void remove(AddressEntry entry) {\n addressEntryList.remove(entry);\n }",
"public synchronized final void deleteWidgetWatchers() {\n _watchers.removeAllElements();\n }",
"public void destroy() {\n if (yarnTwillRunnerService != null) {\n yarnTwillRunnerService.stop();\n }\n if (zkServer != null) {\n zkServer.stopAndWait();\n }\n if (locationFactory != null) {\n Location location = locationFactory.create(\"/\");\n try {\n location.delete(true);\n } catch (IOException e) {\n LOG.warn(\"Failed to delete location {}\", location, e);\n }\n }\n }",
"@Override\n\tpublic void deleteInvoker(Invoker<?> invoker) {\n\t\t\n\t}",
"public String deleteLaunchConfiguration(String lcName) {\n\t\tDeleteLaunchConfigurationRequest request = new DeleteLaunchConfigurationRequest()\n\t\t\t\t.withLaunchConfigurationName(lcName);\n\t\tDeleteLaunchConfigurationResult response = asClient\n\t\t\t\t.deleteLaunchConfiguration(request);\n\t\tString res = \"DeleteLaunchConfiguration: \" + lcName + \" \" + response;\n\t\tlog.info(res);\n\n\t\treturn res;\n\t}",
"@AfterClass(alwaysRun = true)\n public void webAppDelete() throws Exception {\n\n webAppAdminClient.deleteWebAppFile(\"HelloWorldWebapp.war\", hostName);\n assertTrue(WebAppDeploymentUtil.isWebApplicationUnDeployed(\n backendURL, sessionCookie,\n \"HelloWorldWebapp.war\"), \"HelloWorldWebapp unDeployment failed\");\n }",
"public void removeDeviceServiceLink();",
"public void deleteApp(String packageName) throws SQLException {\n\t\tString dburl = prop.getProperty(\"dburl\");\n\t\tString dbuser = prop.getProperty(\"dbuser\");\n\t\tString dbpw = prop.getProperty(\"dbpw\");\n\t\tmethods_snw.deleteAppFromServer(dburl, dbuser, dbpw, packageName);\n\t}",
"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 cleanOrphanServices() {\n log.info(\"Cleaning orphan Services...\");\n List<String> serviceNames = getServices();\n for (String serviceName : serviceNames) {\n if (serviceName.startsWith(Constants.BPG_APP_TYPE_LAUNCHER + \"-\") && !deploymentExists(serviceName)) {\n log.info(\"Cleaning orphan Service [Name] \" + serviceName + \"...\");\n\n unregisterLauncherIfExistsByObjectName(serviceName);\n\n if (!runtimeClient.deleteService(serviceName)) {\n log.error(\"Service deletion failed [Service Name] \" + serviceName);\n }\n }\n }\n }",
"@Override\n\tpublic int deleteByPrimaryKey(String id) {\n\t\treturn siteReservoirInfoMapper.deleteByPrimaryKey(id);\n\t}",
"public boolean getDeleteRemovedProgramsAutomatically() {\n return true;\n }",
"public static synchronized void sendUrlQueueRemove(String url)\n {\n if(urlModel != null)\n {\n SwingUtilities.invokeLater(() -> \n {\n urlModel.removeElement(url);\n });\n }\n }",
"@ApiMethod(name=\"beers.delete\")\n public Beer removeBeer(@Named(\"id\") Long id) {\n PersistenceManager mgr = getPersistenceManager();\n Beer beer = null;\n try {\n beer = mgr.getObjectById(Beer.class, id);\n mgr.deletePersistent(beer);\n } finally {\n mgr.close();\n }\n return beer;\n }",
"public void removeArtworkUrl(MediaFileType type) {\n artworkUrlMap.remove(type);\n }",
"public Boolean delete(SessionFactory factory, EihApps input) {\n\t\treturn null;\n\t}",
"void unsetSites();",
"@Override\n public boolean deleteInstallation() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"public void deleteApplication(org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request,\n io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver);",
"public boolean remove(URL url) {\n return super.remove(normalize(url));\n }",
"static void removeRenderer(Renderer renderer) { renderers.remove(renderer); }",
"public void removeExternalLink(ExternalLinkItem item) {\n getExternalLinks().remove(item);\n item.setProject(null);\n }",
"public long removeEmployerFromDb(String employer){\n \tString selection = Employers.COLUMN_NAME_TITLE + \" LIKE ?\";\n \t\n \t// Specify arguments in placeholder order.\n \tString[] selectionArgs = { employer };\n \t\n \t// Issue SQL statement.\n \treturn db.delete(Employers.TABLE_NAME, selection, selectionArgs);\n\t}",
"void removeSWFURL(String toRemove);",
"void delete(List<MountPoint> mountPoints);",
"public void deleteWerker(Worker w)\n {\n if(aantalWerkers > 0)\n {\n for(int i=0; i<5;i++)\n {\n if(workers[i] == w)\n {\n workers[i] = null;\n }\n }\n w.setInStructure(false);\n aantalWerkers--;\n }\n }",
"public boolean removeProgram(String programId);",
"private static void deleteResource(ProjectElement element) {\r\n \t\tResource resource = element.eResource();\r\n \t\tif (resource != null) {\r\n resource.getContents().remove(element);\r\n resource.unload();\r\n } \r\n \t}",
"public void deleteLaser(AsteroidsLaser laser) {\n\t\tlaserShots.remove(laser);\n\t\tlaser.destroy();\n\t}",
"void removeAllDesktops();",
"public Launcher getLauncher(){\n \treturn mLauncher;\n }",
"public void _unlinkSupplier(ModelElement supplier1);",
"protected synchronized void clearURLLoader() {\r\n currentLoader = null;\r\n }",
"public static int deleteOBREntry(ConnectionFactory connectionFactory, OBREntry entry, URL obrBaseUrl) throws IOException {\n HttpURLConnection connection = null;\n\n try {\n URL endpointUrl = new URL(obrBaseUrl, entry.getUri());\n connection = (HttpURLConnection) connectionFactory.createConnection(endpointUrl);\n connection.setDoInput(true);\n connection.setDoOutput(false);\n connection.setInstanceFollowRedirects(false);\n connection.setRequestMethod(\"DELETE\");\n connection.connect();\n return connection.getResponseCode();\n }\n finally {\n if (connection != null) {\n connection.disconnect();\n }\n }\n }",
"public NameValue<String, String> removeDestURL() {\n return removeURL(mDestMap);\n }",
"public final void destroy(){\n\t\tListHandler.get().remove(this);\n\t\tactivated = false;\n\t\tonDestroy();\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 removeFromImages(final GPImageLinkComponent value)\n\t{\n\t\tremoveFromImages( getSession().getSessionContext(), value );\n\t}",
"public void deleteFile(String url)\n\t{\n\t\t\n\t\tIterator<UserInfo> itr= iterator();\n\t\tUserInfo info=null;\n\t\twhile(itr.hasNext()) {\n\t\t\t\n\t\t\tinfo= itr.next();\n\t\t\tif( info.getUrl().equalsIgnoreCase(url)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( info!=null)\n\t\t{\n\t\t\tSystem.out.println(\"file has been deleted!\");\n\t\t\tuserinfos.remove(info);\n\t\t}\n\t\t\n\t}",
"public synchronized void interceptGivenLauncher(String launcherId) {\n\t\tLauncherDestructor ld = findFreeDestructor();\n\n\t\tif (ld == null) {\n\t\t\tswitch (launcherId.charAt(0)) {\n\t\t\tcase 'P':\n\t\t\t\tfireNoSuchObject(\"plane\");\n\t\t\t\tbreak;\n\n\t\t\tcase 'S':\n\t\t\t\tfireNoSuchObject(\"ship\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} else {\n\t\t\tinterceptGivenLauncher(launcherId, ld);\n\t\t}\n\t}",
"void removePreviewGenerator(PreviewGenerator generator) {\n synchronized (previewGenerators) {\n previewGenerators.remove(generator);\n }\n }",
"public void delete(App obj) {\n getClient().delete(\n String.format(Routes.APP_DELETE, obj.getId())\n );\n obj.setId(null);\n }",
"public void deleteLink(IHyperLink link)\n throws OculusException;"
] | [
"0.6777881",
"0.5850546",
"0.56654143",
"0.55500686",
"0.54972374",
"0.5288",
"0.51948583",
"0.50654495",
"0.5024532",
"0.5022085",
"0.49433967",
"0.4939287",
"0.48779765",
"0.48574084",
"0.4833685",
"0.48122692",
"0.47895393",
"0.47761953",
"0.47154796",
"0.47020894",
"0.47016212",
"0.46874744",
"0.4682189",
"0.4674502",
"0.46673945",
"0.46357328",
"0.46142864",
"0.46115464",
"0.45985782",
"0.45717353",
"0.45530337",
"0.45462647",
"0.4535378",
"0.45065534",
"0.45036063",
"0.45011824",
"0.4495515",
"0.44955137",
"0.44866425",
"0.44864264",
"0.44553992",
"0.44544393",
"0.44438404",
"0.4443119",
"0.4442532",
"0.44287977",
"0.4418073",
"0.44081622",
"0.439388",
"0.43895084",
"0.43863833",
"0.438027",
"0.437616",
"0.43698734",
"0.43608966",
"0.4343999",
"0.43431905",
"0.43269134",
"0.43199587",
"0.4314077",
"0.42971087",
"0.42970783",
"0.4294911",
"0.42899075",
"0.42892334",
"0.42773432",
"0.4266569",
"0.42421174",
"0.424195",
"0.42315373",
"0.4229919",
"0.42251658",
"0.4222805",
"0.4219381",
"0.4218739",
"0.42162526",
"0.4215694",
"0.4215657",
"0.42134538",
"0.42085153",
"0.42040375",
"0.420313",
"0.41972885",
"0.4196545",
"0.41928104",
"0.41849884",
"0.4180906",
"0.41804945",
"0.41799545",
"0.4175668",
"0.41685843",
"0.41662222",
"0.41655797",
"0.41629806",
"0.41596127",
"0.4159595",
"0.41586858",
"0.41573736",
"0.41548404",
"0.41481382"
] | 0.66179717 | 1 |
Delete launcher URL from the list of launchers, if it exists. | private void unregisterLauncherIfExists(String launcherUrl) {
log.info("Unregistering launcher [URL] " + launcherUrl);
if (persistence.launcherExists(launcherUrl)) {
persistence.unregisterLauncher(launcherUrl);
} else {
log.debug("Launcher URL not found: " + launcherUrl);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void validateLauncherUrls() {\n log.info(\"Validating the existing launcher URL list for missing deployments...\");\n\n for (String launcherUrl : getTotalLaunchers()) {\n log.info(\"Validating [Launcher URL] \" + launcherUrl + \"...\");\n String objectName = getObjectNameFromLauncherUrl(launcherUrl);\n if (!runtimeClient.deploymentExists(objectName) || !runtimeClient.serviceExists(objectName)) {\n log.info(\"Found an invalid launcher [URL] \" + launcherUrl);\n // Just remove the reference to launcher now\n // cleanOrphan* jobs will clean any orphan deployments\n // desired count check will scale up if free count is reduced\n unregisterLauncherIfExists(launcherUrl);\n }\n }\n }",
"public boolean markLauncherAsFree(String launcherUrl) {\n if (persistence.launcherExists(launcherUrl)) {\n return persistence.markLauncherAsFree(launcherUrl);\n }\n\n return false;\n }",
"private void unregisterLauncherIfExistsByObjectName(String objectName) {\n // Unregister from launcher list\n String launcherUrl = getLauncherUrlFromObjectName(objectName);\n unregisterLauncherIfExists(launcherUrl);\n }",
"private boolean deleteLauncher(String deploymentName) {\n unregisterLauncherIfExistsByObjectName(deploymentName);\n\n boolean svcDeleted = runtimeClient.deleteService(deploymentName);\n boolean depDeleted = runtimeClient.deleteDeployment(deploymentName);\n\n return svcDeleted && depDeleted;\n }",
"public List<String> getFreeLaunchers() {\n return persistence.getFreeLauncherUrls();\n }",
"public void setLauncher(String launcher) {\n this.launcher = launcher;\n }",
"@AfterEach\n public void after() {\n launcher.dispose();\n }",
"public void launchRemoved(ILaunch launch)\n\t{\n\t\t// Verify that the launch is of the correct configuration type.\n\t\ttry\n\t\t{\n\t\t\tILaunchConfiguration config = launch.getLaunchConfiguration();\n\t\t\tif (! (config.getType().getIdentifier().equals(IRuntimePlayerLaunchConfigurationConstants.ID_RUNTIMEPLAYER_CONFIGURATION)))\n\t\t\t\treturn;\n\t\t} catch (CoreException ex)\n\t\t{\n\t\t\tBRenderLog.logError(ex,\"Unable to query launch configuration.\");\n\t\t}\n\t\t\n\t\t// Close views only if the launch is the current one.\n\t\tif (launch == g_currentLaunch)\n\t\t{\n\t\t g_currentLaunch = null;\n\t\t\n\t\t // Reset the Runtime Player components in order to begin another launch\n\t\t // run/debug session.\n\t\t Activator.getDefault().closePlayer();\n\t\t}\n\t}",
"static public void terminateCurrentLaunch()\n\t{\n\t\tif (g_currentLaunch != null)\n\t\t{\n\t\t\tILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();\n\t\t\tmanager.removeLaunch(g_currentLaunch);\n\t\t}\n\t}",
"public boolean markLauncherAsBusy(String launcherUrl) {\n if (persistence.launcherExists(launcherUrl)) {\n return persistence.markLauncherAsBusy(launcherUrl);\n }\n\n return false;\n }",
"public static void removeFirstLaunch(Context context) {\n\n context.getSharedPreferences(FILE_NAME, 0)\n .edit()\n .remove(FIRST_LAUNCH_KEY)\n .apply();\n }",
"void remove(String installedAppId);",
"void removeApp(String bundleId);",
"private void uninstallBrowser(String packageName) {\n Intent intent = null;\n try {\n intent = Intent.parseUri(\"http://\", Intent.URI_INTENT_SCHEME);\n } catch (Exception e) {\n Assert.fail();\n return;\n }\n mPackageManager.removeResolveInfosForIntent(intent, packageName);\n mPackageManager.removePackage(packageName);\n }",
"public boolean removeRemoteSite (String url) {\r\n\t\ttry {\r\n\t\t\tif (!isInDatabase(url)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tpstmt = conn.prepareStatement(\"DELETE FROM RemoteSite WHERE url = ?\");\r\n\t\t\tpstmt.setString(1, url);\r\n\t\t\tint numRows = pstmt.executeUpdate();\r\n\t\t\treturn (numRows == 1);\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t} finally {\r\n\t\t\tDatabaseConnection.closeStmt(pstmt, rset);\r\n\t\t}\r\n\t}",
"public String getLauncher() {\n return launcher;\n }",
"public List<String> getTotalLaunchers() {\n return persistence.getTotalLauncherUrls();\n }",
"public void removeServiceEntry(String linkName);",
"public boolean remove(URL url) {\n return super.remove(normalize(url));\n }",
"public static void clearAppList() {\n }",
"private String getObjectNameFromLauncherUrl(String launchUrl) {\n if (launchUrl != null) {\n String[] domainParts = launchUrl.split(\"\\\\.\");\n return domainParts[0].replace(Constants.LAUNCHER_URL_PREFIX, Constants.BPG_APP_TYPE_LAUNCHER);\n }\n\n throw new IllegalArgumentException(\"Null launcher URL cannot be processed.\");\n }",
"private void promptRemoveSeed()\n {\n if(spider.numSeeds() == 0)\n JOptionPane.showMessageDialog(null, \"No URL's to remove\");\n else\n {\n String url;\n if(urlList.getSelectedValue() == null)\n url = JOptionPane.showInputDialog(null, \"Enter the URL to remove\", \"Remove URL\", JOptionPane.INFORMATION_MESSAGE);\n else\n url = urlList.getSelectedValue().toString();\n \n if(url != null && !spider.removeSeedUrl(url))\n JOptionPane.showMessageDialog(null, \"Failed to remove URL\");\n else\n urlModel.removeElement(url);\n }\n }",
"public void scaleDown() {\n log.info(\"Scaling down by [Step Down] \" + stepDown + \" instances...\");\n\n // Scale down by (1 x stepDown) at a time\n for (int i = 0; i < stepDown; i++) {\n // Get free launchers\n List<String> urlsToScaleDown = getFreeLaunchers();\n\n log.info(\"URLs to scale down: \" + urlsToScaleDown.toString());\n\n // Sort by launcher url. This will sort the oldest first, making it possible to take the youngest out of the\n // tail\n urlsToScaleDown.sort((o1, o2) -> {\n int mySuffix = Integer.parseInt(o1.split(\"\\\\.\")[0].substring(\n (Constants.LAUNCHER_URL_PREFIX + \"-\").length()));\n\n int theirSuffix = Integer.parseInt(o2.split(\"\\\\.\")[0].substring(\n (Constants.LAUNCHER_URL_PREFIX + \"-\").length()));\n\n return Integer.compare(mySuffix, theirSuffix);\n });\n\n // Get the youngest free launcher URL\n String launcherUrlToDelete = urlsToScaleDown.get(urlsToScaleDown.size() - 1);\n\n log.info(\"Cutting down [Launcher URL] \" + launcherUrlToDelete + \"...\");\n\n // Get object name from launcher URL\n String deploymentName = getObjectNameFromLauncherUrl(launcherUrlToDelete);\n\n // Delete deployment and service\n if (!deleteLauncher(deploymentName)) {\n log.error(\"Launcher deletion failed [Object Name] \" + deploymentName);\n }\n }\n }",
"public boolean getDeleteRemovedProgramsAutomatically() {\n return true;\n }",
"public void removeApplicationEnvLink(String appId, String appVersionId, String appVersionInstanceId);",
"public void removeEntry(final String url){\n if(url==null){\n return;\n }\n\n synchronized (mBitmapCache) {\n mBitmapCache.remove(url);\n }\n }",
"public synchronized final void deleteWidgetWatchers() {\n _watchers.removeAllElements();\n }",
"@Override\n public boolean deleteInstallation() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"public void invalidateManifestManager()\n {\n manifestManager = null;\n }",
"@Override\n public int deleteByPrimaryKey(Integer id) {\n return jurUrlMapper.deleteByPrimaryKey(id);\n }",
"void removeAllDesktops();",
"public void killRecentPackage() {\n IActivityManager activityManager = ActivityManager.getService();\n int userIdProcess = Process.myUserHandle().hashCode();\n List<ActivityManager.RecentTaskInfo> recentlist = new ArrayList<>();\n try {\n recentlist = activityManager.getRecentTasks(100, 1, userIdProcess).getList();\n } catch (Exception e) {\n loge(\"killRecentPackage\", e);\n }\n for (int i = 0; i < recentlist.size(); i++) {\n ActivityManager.RecentTaskInfo info = recentlist.get(i);\n String pakg = info.baseIntent.getComponent().getPackageName();\n int userId = info.userId;\n if (!mAppWhiteList.contains(pakg) && !inputMethodList.contains(pakg) && !pakg.contains(\"com.oppo.autotest\") && !pakg.contains(\"com.oppo.qe\")) {\n logd(\" killRecentPackage_forceStopPackage = \" + pakg + \" , userId = \" + userId);\n try {\n activityManager.forceStopPackage(pakg, userId);\n } catch (Exception e2) {\n loge(\"Failed killRecentPackage_forceStopPackage = \" + pakg + \" , userId = \" + userId, e2);\n }\n }\n }\n }",
"public boolean deleteOnExit();",
"public void deleteFile(String url)\n\t{\n\t\t\n\t\tIterator<UserInfo> itr= iterator();\n\t\tUserInfo info=null;\n\t\twhile(itr.hasNext()) {\n\t\t\t\n\t\t\tinfo= itr.next();\n\t\t\tif( info.getUrl().equalsIgnoreCase(url)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( info!=null)\n\t\t{\n\t\t\tSystem.out.println(\"file has been deleted!\");\n\t\t\tuserinfos.remove(info);\n\t\t}\n\t\t\n\t}",
"public void remove(AddressEntry entry) {\n addressEntryList.remove(entry);\n }",
"public void cleanOrphanDeployments() {\n log.info(\"Cleaning orphan Deployments...\");\n List<String> deploymentNames = getDeployments();\n for (String deploymentName : deploymentNames) {\n if (deploymentName.startsWith(Constants.BPG_APP_TYPE_LAUNCHER + \"-\") && !serviceExists(deploymentName)) {\n log.info(\"Cleaning orphan Deployment [Name] \" + deploymentName + \"...\");\n\n unregisterLauncherIfExistsByObjectName(deploymentName);\n\n if (!runtimeClient.deleteDeployment(deploymentName)) {\n log.error(\"Deployment deletion failed [Deployment Name] \" + deploymentName);\n }\n }\n }\n }",
"public void teardown() {\n for (App app : applications) {\n app.icon.setCallback(null);\n }\n\t}",
"public void deletePerformer(Performer performer){\n\t\tperformers.remove(performer);\n\t}",
"@Override\n public void delete(String instance) {\n InstanceManifest im = readInstance(instance);\n List<InstanceVersionDto> versions = listVersions(instance);\n RemoteService master = mp.getControllingMaster(hive, im.getManifest());\n try (Activity deploy = reporter.start(\"Deleting \" + im.getConfiguration().name);\n NoThrowAutoCloseable proxy = reporter.proxyActivities(master)) {\n MasterRootResource root = ResourceProvider.getVersionedResource(master, MasterRootResource.class, context);\n InstanceStatusDto status = root.getNamedMaster(group).getStatus(instance);\n for (String app : status.getAppStatus().keySet()) {\n if (status.isAppRunningOrScheduled(app)) {\n throw new WebApplicationException(\"Application still running, cannot delete: \" + app,\n Status.EXPECTATION_FAILED);\n }\n }\n\n // cleanup is done periodically in background, still uninstall installed\n // versions to prevent re-start of processes later\n for (InstanceVersionDto dto : versions) {\n root.getNamedMaster(group).uninstall(dto.key);\n }\n\n root.getNamedMaster(group).delete(instance);\n }\n\n syncInstance(minion, rc, group, instance);\n\n versions.forEach(v -> changes.remove(ObjectChangeType.INSTANCE, v.key));\n }",
"private void addFreeLauncher(String deploymentName) {\n persistence.addFreeLauncher(getLauncherUrlFromObjectName(deploymentName));\n }",
"public void run() {\n Launcher.destroyAll();\n }",
"void deleteRepository(URL repositoryUrl);",
"public void removeDriver(WebDriver driver) {\r\n\t\tdriver.quit();\r\n\t}",
"@AfterClass(alwaysRun = true)\n public void webAppDelete() throws Exception {\n\n webAppAdminClient.deleteWebAppFile(\"HelloWorldWebapp.war\", hostName);\n assertTrue(WebAppDeploymentUtil.isWebApplicationUnDeployed(\n backendURL, sessionCookie,\n \"HelloWorldWebapp.war\"), \"HelloWorldWebapp unDeployment failed\");\n }",
"private void deleteProfileIfExists() throws Exception {\n String[] args = new String[] { \"-validateAndUpdateRegistry\" };\n executeCommand(serverInstallDir, \"manageprofiles\", args, serverInstallDir, \"\");\n args = new String[] { \"-listProfiles\" };\n String output = executeCommand(serverInstallDir, \"manageprofiles\", args, serverInstallDir, \"\");\n if (output.indexOf(instanceName) >= 0) {\n args = new String[] { \"-delete\", \"-profileName\", instanceName };\n executeCommand(serverInstallDir, \"manageprofiles\", args, serverInstallDir, \"Trying to clean up existing profile\");\n }\n }",
"void unsetSites();",
"private void addAllDeploymentsAsFreeLaunchers() {\n List<String> deployments = getDeployments();\n log.info(\"Found \" + deployments.size() + \" deployments to be added\");\n for (String deployment : deployments) {\n if (runtimeClient.serviceExists(deployment)) {\n addFreeLauncher(deployment);\n } else {\n log.info(\"Deployment \" + deployment + \" doesn't have a Service that exposes it. Not adding as a launcher...\");\n }\n }\n }",
"public static void deleteInstance()\r\n\t{\r\n\t\tlightManager = null;\r\n\t}",
"public SlingHttpResponse deleteLaunch(String path, int... expectedStatus) throws ClientException {\n\n FormEntityBuilder feb = FormEntityBuilder.create();\n\n // the command\n feb.addParameter(\"cmd\", CMD_DELETE_LAUNCH);\n\n // title of new launch section\n feb.addParameter(\"path\", path);\n\n return executeWCMCommand(CMD_CREATE_LAUNCH, feb, expectedStatus);\n }",
"public void delete() {\r\n\t\tfor (int i = 0; i <= DatabaseUniverse.getDatabaseNumber(); i++) {\r\n\t\t\tif (this.equals(DatabaseUniverse.getDatabases(i))) {\r\n\t\t\t\tDatabaseUniverse.getAllDatabases().set(i, null);\r\n\t\t\t\tDatabaseUniverse.getAllDatabases().remove(i);\r\n\t\t\t\tDatabaseUniverse.setDatabaseNumber(-1);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n public boolean onMenuItemClick(MenuItem item) {\n mPresenter.DelDownloadingApp(mAdapter.getItem(position).getUrl(),true)\n .compose(RxSchedulers.io_main()).subscribe();\n mAdapter.removeAt(position);\n return true;\n }",
"Result deleteApp(String app);",
"void removePreviewGenerator(PreviewGenerator generator) {\n synchronized (previewGenerators) {\n previewGenerators.remove(generator);\n }\n }",
"public void deleteClicker(View view) {\n\t\tint num = objectArray.length - 1;\n\t\tSystem.out.println(\"delete\");\n\n\t\t// create copy of object array and skip entry to which we want to remove\n\t\tClickerCounterModel[] tempObjectArray = new ClickerCounterModel[num];\n\t\tfor (int i = 0; i < num; i++) {\n\t\t\tif (!objectArray[i].getClickerName().equals(\n\t\t\t\t\tclickerCountObject.getClickerName())) {\n\t\t\t\ttempObjectArray[i] = new ClickerCounterModel(\n\t\t\t\t\t\tobjectArray[i].getClickerName());\n\t\t\t\ttempObjectArray[i].setClickerCount(objectArray[i]\n\t\t\t\t\t\t.getClickerCount());\n\t\t\t\ttempObjectArray[i].setClickerTimestamps(objectArray[i]\n\t\t\t\t\t\t.getClickerTimestamps());\n\t\t\t}\n\t\t}\n\t\t// reassign object to new array\n\t\twriteObjectToFile(tempObjectArray);\n\n\t\t// restart the application\n\t\tIntent i = getBaseContext().getPackageManager()\n\t\t\t\t.getLaunchIntentForPackage(getBaseContext().getPackageName());\n\t\ti.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\tstartActivity(i);\n\t}",
"@Override\n public boolean disableAutomaticStartup() {\n File destinationLink = getStartupFolderLinkFile();\n\n if (destinationLink == null)\n return false;\n\n if (!destinationLink.isFile()) {\n return true;\n }\n\n // Delete the file\n return destinationLink.delete();\n }",
"public boolean removeProgram(String programId);",
"static void removeRenderer(Renderer renderer) { renderers.remove(renderer); }",
"public static synchronized void sendUrlQueueRemove(String url)\n {\n if(urlModel != null)\n {\n SwingUtilities.invokeLater(() -> \n {\n urlModel.removeElement(url);\n });\n }\n }",
"private static void deleteInstance(String[] args,String command,List<ExampleServer> servers) {\n \n if (args.length != 1) {\n System.err.println(\"syntax error (expected delete <name>): \" + command);\n return;\n }\n \n final String serviceName = args[0];\n ExampleServer server = Iterables.find(servers,server1 -> server1.getThisInstance().getName()\n .endsWith(serviceName),null);\n if (server == null) {\n System.err.println(\"No servers found named: \" + serviceName);\n return;\n }\n \n servers.remove(server);\n CloseableUtils.closeQuietly(server);\n System.out.println(\"Removed a random instance of: \" + serviceName);\n }",
"public static void kill() {\n Iterator<Recipe> recipes = tj.getServer().recipeIterator();\r\n Recipe recipe;\r\n\r\n while (recipes.hasNext()) {\r\n recipe = recipes.next();\r\n\r\n if (recipe != null && customItems.containsValue(recipe.getResult()))\r\n recipes.remove();\r\n }\r\n\r\n tj = null;\r\n messages = null;\r\n playerDataFolder = null;\r\n players = null;\r\n customItems = null;\r\n }",
"public Todo removeByURLTitle(String urlTitle) throws NoSuchTodoException;",
"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 destroy(App p){\n if(!p.getToRemove().contains(this)){\n p.addObjectToRemove(this);\n }\n }",
"public void cleanOrphanServices() {\n log.info(\"Cleaning orphan Services...\");\n List<String> serviceNames = getServices();\n for (String serviceName : serviceNames) {\n if (serviceName.startsWith(Constants.BPG_APP_TYPE_LAUNCHER + \"-\") && !deploymentExists(serviceName)) {\n log.info(\"Cleaning orphan Service [Name] \" + serviceName + \"...\");\n\n unregisterLauncherIfExistsByObjectName(serviceName);\n\n if (!runtimeClient.deleteService(serviceName)) {\n log.error(\"Service deletion failed [Service Name] \" + serviceName);\n }\n }\n }\n }",
"public void removeSkyModelUpdateListener(SkyModelUpdateListener l) throws RemoteException {\n\t\tif (!listeners.contains(l))\n\t\t\treturn;\n\n\t\t// add to kill list\n\t\tslogger.create().info().level(2).msg(\"Received request to remove listener: \" + l).send();\n\t\tdeleteListeners.add(l);\n\t}",
"private void removeInstance(OpenHABInstance instance) {\n\t\tif (instance.getId() == prefs.getDefaultOpenHABInstanceId()) {\n\t\t\tprefs.setDefaultOpenHABInstanceId(-1);\n\t\t}\n\t\tprefs.removeOpenHABInstance(instance);\n\t\tlistAdapter.remove(instance);\n\t}",
"protected synchronized void clearURLLoader() {\r\n currentLoader = null;\r\n }",
"public void removeSaved(String urlToRemove) {\n\t\tFile file = new File(\"saved.txt\");\n\t\tFile temp = null;\n\t\ttry {\n\t\t\ttemp = File.createTempFile(\"file\", \".txt\", file.getParentFile());\n\t\t} catch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tString charset = \"UTF-8\";\n\t\tBufferedReader reader = null;\n\t\tPrintWriter writer = null;\n\t\ttry {\n\t\t\treader = new BufferedReader(new InputStreamReader(new FileInputStream(file), charset));\n\t\t\twriter = new PrintWriter(new OutputStreamWriter(new FileOutputStream(temp), charset));\n\n\t\t\tfor (String line; (line = reader.readLine()) != null;) {\n\t\t\t\tline = line.replace(urlToRemove, \"\");\n\t\t\t\t// String adjusted = line.replaceAll(\"(?m)^[ \\t]*\\r?\\n\", \"\");\n\t\t\t\t// writer.println(line);\n\t\t\t\tif (!line.isEmpty()) {\n\t\t\t\t\twriter.println(line);\n\t\t\t\t\t// writer.write(\"\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (UnsupportedEncodingException | FileNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\treader.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\twriter.close();\n\t\t\tsavedListModel.removeElement(urlToRemove);\n\t\t}\n\n\t\tfile.delete();\n\t\ttemp.renameTo(file);\n\t}",
"public Launcher getLauncher(){\n \treturn mLauncher;\n }",
"public boolean markLauncherAsFreeBySubDomain(String launcherSubDomain) {\n return markLauncherAsFree(launcherSubDomain + \".\" + rootDomainName);\n }",
"String getLauncherClassName();",
"public void deleteApp(Appointment app, Date dat)\n {\n List z = cal.get(dat);\n boolean flag = true;\n int i = 0;\n while(flag){\n if(z.get(i)==app){\n z.remove(app);\n flag = false;\n }\n i++;\n }\n \n }",
"public void deleteAllRepeaters() {\n new DeleteAllRepeatersAsyncTask(repeaterDao).execute();\n }",
"public void deleteApp(String packageName) throws SQLException {\n\t\tString dburl = prop.getProperty(\"dburl\");\n\t\tString dbuser = prop.getProperty(\"dbuser\");\n\t\tString dbpw = prop.getProperty(\"dbpw\");\n\t\tmethods_snw.deleteAppFromServer(dburl, dbuser, dbpw, packageName);\n\t}",
"public void destroyApp(boolean unconditional) {\n }",
"public void destroyApp(boolean unconditional) {\n }",
"public void destroyApp(boolean unconditional) {\n }",
"public void unsetUrlName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(URLNAME$12, 0);\r\n }\r\n }",
"public void removeLookupLocators( LookupLocator[] locs ) throws RemoteException {\n\t\tlog.config(\"remove lookup locators\");\n\t\ttry {\n\t\t\tPersistentData data = io.readState();\n\t\t\tdisco.removeLocators( locs );\n\t\t\tdata.locators = locs;\n\t\t\tio.writeState( data );\n\t\t} catch( ClassNotFoundException ex ) {\n\t\t\tlog.throwing( getClass().getName(), \"removeLookupLocators\", ex);\n\t\t\tthrow new RemoteException(ex.toString());\n\t\t} catch( IOException ex ) {\n\t\t\tlog.throwing( getClass().getName(), \"removeLookupLocators\", ex);\n\t\t\tthrow new RemoteException(ex.toString());\n\t\t}\n\t}",
"public void destroy() {\n if (yarnTwillRunnerService != null) {\n yarnTwillRunnerService.stop();\n }\n if (zkServer != null) {\n zkServer.stopAndWait();\n }\n if (locationFactory != null) {\n Location location = locationFactory.create(\"/\");\n try {\n location.delete(true);\n } catch (IOException e) {\n LOG.warn(\"Failed to delete location {}\", location, e);\n }\n }\n }",
"public void removeArtworkUrl(MediaFileType type) {\n artworkUrlMap.remove(type);\n }",
"@Override\n protected void onDestroy() {\n\n activitiesLaunched.getAndDecrement();\n\n super.onDestroy();\n\n }",
"void killAllApps();",
"private void removeFromFavorites() {\n int rowsDeleted;\n\n if (mCurrentMovieUri != null) {\n rowsDeleted = getContentResolver().delete(\n mCurrentMovieUri,\n null,\n null);\n }\n }",
"public void removePublishersWebpage(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.remove(this.model, this.getResource(), PUBLISHERSWEBPAGE, value);\r\n\t}",
"public void removeDeviceServiceLink();",
"public final void destroy(){\n\t\tListHandler.get().remove(this);\n\t\tactivated = false;\n\t\tonDestroy();\n\t}",
"public void quitDriver(){\n instanceOfDriverFactory=null;\n appiumDriver.quit();\n }",
"private String getLauncherPackageName() {\n // Create launcher Intent\n final Intent intent = new Intent(Intent.ACTION_MAIN);\n intent.addCategory(Intent.CATEGORY_HOME);\n\n // Use PackageManager to get the launcher package name\n PackageManager pm = InstrumentationRegistry.getContext().getPackageManager();\n ResolveInfo resolveInfo = pm.resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY);\n return resolveInfo.activityInfo.packageName;\n }",
"public void del(String name) {\n\t\tfor (AddrBean ad : addrlist) {\n\t\t\tif (name.equals(ad.getUsername())) {\n\t\t\t\taddrlist.remove(ad);\n\t\t\t}\n\t\t}\n\t}",
"void deleteTrackerListVersion(final Integer id);",
"boolean removeLink(Link link);",
"public String deleteLaunchConfiguration(String lcName) {\n\t\tDeleteLaunchConfigurationRequest request = new DeleteLaunchConfigurationRequest()\n\t\t\t\t.withLaunchConfigurationName(lcName);\n\t\tDeleteLaunchConfigurationResult response = asClient\n\t\t\t\t.deleteLaunchConfiguration(request);\n\t\tString res = \"DeleteLaunchConfiguration: \" + lcName + \" \" + response;\n\t\tlog.info(res);\n\n\t\treturn res;\n\t}",
"public void removeExternalLink(ExternalLinkItem item) {\n getExternalLinks().remove(item);\n item.setProject(null);\n }",
"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 cleanDatabase() {\n\t\tContentResolver cr = mContext.getContentResolver();\n\n\t\tCursor c = cr.query(\n\t\t\t\tConstantPasser.Favorites.CONTENT_URI_NO_NOTIFICATION,\n\t\t\t\tnew String[] { ConstantPasser.Favorites.APPWIDGET_ID }, null,\n\t\t\t\tnull, null);\n\t\ttry {\n\t\t\tAppWidgetHost widgetHost = ((XLauncher) mContext).getAppWidgetHost();\n\t\t\tint index = c.getColumnIndex(ConstantPasser.Favorites.APPWIDGET_ID);\n\t\t\twhile (c.moveToNext()) {\n\t\t\t\tint widgetId = c.getInt(index);\n\t\t\t\tif (Debug.MAIN_DEBUG_SWITCH){\n\t\t\t\t\tR2.echo(\"Invalid widget id : \" + widgetId);\n\t\t\t\t}\n\t\t\t\twidgetHost.deleteAppWidgetId(widgetId);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t} finally {\n\t\t\tif (c != null){\n\t\t\t\tc.close();\n\t\t\t}\n\t\t}\n\n\t\t// clean and do not notify\n\n\t\tif (enableState.enableFolder || enableState.enableQuickEntries\n\t\t\t\t|| enableState.enableWidgets){\n\t\t\tcr.delete(ConstantPasser.Favorites.CONTENT_URI_NO_NOTIFICATION,\n\t\t\t\t\tnull, null);\n\t\t}\n\n\t\tif (enableState.enablePriorities){\n\t\t\tcr.delete(ConstantPasser.Applications.CONTENT_URI, null, null);\n\t\t}\n\n\t\t/* RK_ID: RK_THEME .AUT: zhanggx1 . DATE: 2012-03-31 . S */\n\t\tSettings.System.putString(cr, SettingsValue.KEY_SET_THEME, null);\n\t\t/* RK_ID: RK_THEME .AUT: zhanggx1 . DATE: 2012-03-31 . E */\n\t}",
"public void removeDisallowUninstallApps(java.util.List<java.lang.String> r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: cm.android.mdm.manager.PackageManager2.removeDisallowUninstallApps(java.util.List):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: cm.android.mdm.manager.PackageManager2.removeDisallowUninstallApps(java.util.List):void\");\n }",
"public void removeAllPublishersWebpage() {\r\n\t\tBase.removeAll(this.model, this.getResource(), PUBLISHERSWEBPAGE);\r\n\t}",
"ListLaunchPathsResult listLaunchPaths(ListLaunchPathsRequest listLaunchPathsRequest);",
"public void removeApplication (MauiApplication aApplication)\n\t{\n\t\tif (aApplication == null)\n\t\t{\n\t\t\tMauiApplication [] theApplications = getCachedMauiApplications ();\n\t\t\tfor (int i = 0; i < theApplications.length; i++)\n\t\t\t{\n\t\t\t\tremoveApplication (theApplications [i]);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tProcessManager thePM = ProcessManager.getInstance ();\n\t\t\tApplicationManager theAM = ApplicationManager.getInstance ();\n\t\t\tString theApplicationAddress = aApplication.getApplicationAddress ();\n\t\t\tif (applications.containsKey (theApplicationAddress))\n\t\t\t{\n\t\t\t\tapplications.remove (theApplicationAddress);\n\t\t\t\tnotifySessionListeners (this, aApplication, false);\n\t\t\t\taApplication.finish ();\n\t\t\t\taApplication.exiting ();\n\t\t\t\tif (applications.isEmpty ())\n\t\t\t\t{\n\t\t\t\t\tremoveSession (this);\n\t\t\t\t\texit = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}"
] | [
"0.6556899",
"0.61297655",
"0.57717884",
"0.5677161",
"0.55175096",
"0.5365072",
"0.52708817",
"0.5229477",
"0.5092214",
"0.4983349",
"0.49273816",
"0.48792115",
"0.48678088",
"0.4863656",
"0.48206943",
"0.47984105",
"0.47903764",
"0.4739422",
"0.4737948",
"0.47081634",
"0.47077775",
"0.4697936",
"0.4680203",
"0.46749282",
"0.46684933",
"0.4659825",
"0.46458817",
"0.46173197",
"0.45794404",
"0.45581657",
"0.4553755",
"0.4540759",
"0.45257387",
"0.45189005",
"0.45180583",
"0.4510578",
"0.45070243",
"0.44955716",
"0.44951934",
"0.44922775",
"0.4490511",
"0.4487356",
"0.44688955",
"0.4467665",
"0.4467073",
"0.44640008",
"0.44449908",
"0.4443575",
"0.44275978",
"0.4421226",
"0.4419763",
"0.44178432",
"0.44175795",
"0.44145948",
"0.4410423",
"0.44048262",
"0.4395635",
"0.43752578",
"0.4358368",
"0.43459287",
"0.43289512",
"0.4319068",
"0.43182826",
"0.4313089",
"0.4312419",
"0.4306897",
"0.4296195",
"0.42900038",
"0.42822126",
"0.42733714",
"0.42659828",
"0.42558485",
"0.42550796",
"0.4254224",
"0.4251282",
"0.4251282",
"0.4251282",
"0.42490306",
"0.4246533",
"0.42383826",
"0.42266464",
"0.42261648",
"0.42241037",
"0.42205817",
"0.42179525",
"0.42088217",
"0.4197063",
"0.4194533",
"0.41910797",
"0.41888544",
"0.41879022",
"0.41857812",
"0.41772747",
"0.41664794",
"0.41616368",
"0.41506794",
"0.41504872",
"0.41460842",
"0.41427344",
"0.41417366"
] | 0.74858296 | 0 |
Add a new launcher URL by creating a K8S Deployment+Service pair and adding the entry to persistence. | private boolean createLauncher(int deploymentNameSuffix, String reason) {
boolean depCreated = runtimeClient.createDeployment(deploymentNameSuffix, rootDomainName, reason);
boolean svcCreated = runtimeClient.createService(deploymentNameSuffix, rootDomainName, reason);
return depCreated && svcCreated;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void addFreeLauncher(String deploymentName) {\n persistence.addFreeLauncher(getLauncherUrlFromObjectName(deploymentName));\n }",
"public void addUrlArg(String key, String value);",
"public void addDAppURL(String url)\n {\n\n String checkVal = url.replaceFirst(\"^(http[s]?://www\\\\.|http[s]?://|www\\\\.)\",\"\");\n for (String item : history)\n {\n if (item.contains(checkVal))\n {\n //replace with this new one\n history.remove(item);\n if (!history.contains(item))\n {\n history.add(0, url);\n }\n storeHistory();\n return;\n }\n }\n\n history.add(0, url);\n storeHistory();\n }",
"private void createWindowsInstaller(InstanceManifest im, ApplicationConfiguration appConfig,\n ClickAndStartDescriptor clickAndStart, Path installerPath, ScopedManifestKey launcherKey, URI launcherLocation,\n URI iconLocation, URI splashLocation) {\n BHive rootHive = reg.get(JerseyRemoteBHive.DEFAULT_NAME);\n Manifest mf = rootHive.execute(new ManifestLoadOperation().setManifest(launcherKey.getKey()));\n TreeEntryLoadOperation findInstallerOp = new TreeEntryLoadOperation().setRootTree(mf.getRoot())\n .setRelativePath(SoftwareUpdateResource.INSTALLER_EXE);\n try (InputStream in = rootHive.execute(findInstallerOp); OutputStream os = Files.newOutputStream(installerPath)) {\n in.transferTo(os);\n } catch (IOException ioe) {\n throw new WebApplicationException(\"Cannot create windows installer.\", ioe);\n }\n\n // Load product of instance to set the vendor\n ProductManifest pm = ProductManifest.of(hive, im.getConfiguration().product);\n\n // Embed the configuration into the executable\n try {\n WindowsInstallerConfig config = new WindowsInstallerConfig();\n config.remoteService = clickAndStart.host;\n config.launcherUrl = launcherLocation.toString();\n config.iconUrl = iconLocation.toString();\n config.splashUrl = splashLocation.toString();\n config.instanceGroupName = group;\n config.instanceName = im.getConfiguration().name;\n config.applicationUid = appConfig.id;\n config.applicationName = appConfig.name;\n config.applicationJson = new String(StorageHelper.toRawBytes(clickAndStart), StandardCharsets.UTF_8);\n config.productVendor = pm.getProductDescriptor().vendor;\n WindowsInstaller.embedConfig(installerPath, config);\n } catch (Exception ioe) {\n throw new WebApplicationException(\"Cannot embed configuration into windows installer.\", ioe);\n }\n }",
"boolean addServiceInstance(Service service, InstancePublishInfo instancePublishInfo);",
"public void addServiceImplLinkEntry(ServiceImplBean serviceImplBean, String wsName);",
"Builder addUrl(String value);",
"Builder addUrl(URL value);",
"public org.biocatalogue.x2009.xml.rest.ServiceDeployment addNewServiceDeployment()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.biocatalogue.x2009.xml.rest.ServiceDeployment target = null;\r\n target = (org.biocatalogue.x2009.xml.rest.ServiceDeployment)get_store().add_element_user(SERVICEDEPLOYMENT$0);\r\n return target;\r\n }\r\n }",
"void deployApp(String marathonJson);",
"public static void addURL(URL u) throws IOException {\n ClassLoader classLoader = MVdWUpdater.class.getClassLoader();\n\n if (classLoader instanceof URLClassLoader) {\n try {\n ADD_URL_METHOD.invoke(classLoader, u);\n } catch (IllegalAccessException | InvocationTargetException e) {\n throw new RuntimeException(\"Unable to invoke URLClassLoader#addURL\", e);\n }\n } else {\n throw new RuntimeException(\"Unknown classloader: \" + classLoader.getClass());\n }\n\n }",
"private void redirectStore(String updateUrl) {\n final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(updateUrl));\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }",
"public void addApplicationEnvLink(String appId, String appVersionId, String appVersionInstanceId,\r\n String envId);",
"void addHost(Service newHost);",
"public void addSeed(String url) {\n\t\tseedList.add(url);\n\t}",
"public void addDestination(String site, String url) {\n this.addDestination(new ReplicaCatalogEntry(url, site));\n }",
"private void addAllDeploymentsAsFreeLaunchers() {\n List<String> deployments = getDeployments();\n log.info(\"Found \" + deployments.size() + \" deployments to be added\");\n for (String deployment : deployments) {\n if (runtimeClient.serviceExists(deployment)) {\n addFreeLauncher(deployment);\n } else {\n log.info(\"Deployment \" + deployment + \" doesn't have a Service that exposes it. Not adding as a launcher...\");\n }\n }\n }",
"public void addUrlDevice(UrlDevice urlDevice) {\n mDeviceIdToUrlDeviceMap.put(urlDevice.getId(), urlDevice);\n }",
"void addService(ServiceInfo serviceInfo);",
"private Result<Job,JsonObject> addConsoleURLs(final Result<Job,JsonObject> result) throws IOException {\n \n final JsonObject json = result.getRawResult();\n \n final String appUrl = getInstance().getApplicationConsoleURL();\n json.addProperty(CONSOLE_APPLICATION_URL, appUrl);\n \n String jobUrl = appUrl + \"&job=\" +\n URLEncoder.encode(json.getAsJsonPrimitive(\"name\").getAsString(), \"UTF-8\");\n json.addProperty(CONSOLE_APPLICATION_JOB_URL, jobUrl);\n \n return result;\n }",
"@SneakyThrows\n public void addURL(Path path) {\n if (ADD_URL == null || this.classLoader == null) {\n return;\n }\n try {\n ADD_URL.invoke(this.classLoader, path.toUri().toURL());\n } catch (IllegalAccessException | InvocationTargetException | MalformedURLException e) {\n e.printStackTrace();\n }\n }",
"public void setLauncher(String launcher) {\n this.launcher = launcher;\n }",
"public ArchiveEntry addEntry (File toInsert, String targetName, URI format,\n\t\tboolean mainEntry) throws IOException\n\t{\n\t\ttargetName = prepareLocation (targetName);\n\t\t\n\t\tif (targetName.equals (MANIFEST_LOCATION))\n\t\t\tthrow new IllegalArgumentException (\n\t\t\t\t\"it's not allowed to name a file \" + MANIFEST_LOCATION);\n\t\t\n\t\tif (targetName.equals (METADATA_LOCATION))\n\t\t\tthrow new IllegalArgumentException (\n\t\t\t\t\"it's not allowed to name a file \" + METADATA_LOCATION);\n\t\t\n\t\t// we also do not allow files with names like metadata-[0-9]*.rdf\n\t\tif (targetName.matches (\"^/metadata-[0-9]*\\\\.rdf$\"))\n\t\t\tthrow new IllegalArgumentException (\n\t\t\t\t\"it's not allowed to name a file like metadata-[0-9]*.rdf\");\n\t\t\n\t\t// insert to zip\n\t\tPath insertPath = zipfs.getPath (targetName).normalize ();\n\t\tFiles.createDirectories (insertPath.getParent ());\n\t\tFiles.copy (toInsert.toPath (), insertPath, Utils.COPY_OPTION);\n\t\t\n\t\tArchiveEntry entry = new ArchiveEntry (this, insertPath, format);\n\t\tentries.put (entry.getFilePath (), entry);\n\t\t\n\t\tif (mainEntry)\n\t\t{\n\t\t\tLOGGER.debug (\"setting main entry:\");\n\t\t\taddMainEntry (entry);\n\t\t}\n\t\t\n\t\treturn entry;\n\t}",
"public void addNewSession() {\n //Create an explicit intent for RecordingIntentService\n Intent saveSessionIntent = new Intent(this, RecordingIntentService.class);\n //Set the action of the intent to ACTION_SAVE_SESSION\n saveSessionIntent.setAction(RecordLapTasks.ACTION_SAVE_SESSION);\n\n //add the current session object info to the intent so it can be retrieved\n saveSessionIntent.putExtra(\"session_driver\", mySession.getDriver());\n saveSessionIntent.putExtra(\"session_track\", mySession.getTrackName());\n saveSessionIntent.putExtra(\"session_bestLap\", mySession.getBestLapString());\n saveSessionIntent.putExtra(\"session_laptimes\", mySession.getLaptimesAsString());\n saveSessionIntent.putExtra(\"session_numLaps\", mySession.getNumberOfLaps());\n\n //Call startService and pass the explicit intent\n startService(saveSessionIntent);\n }",
"@Override\n\tpublic String addInstance(String serviceName, String hostName) {\n\t\tServiceManager serviceManager = loadBalance.search(serviceName);\n\t\tif (serviceManager == null) {\n\t\t\treturn \"Service not added previouly using ADD_SERVICE\";\n\t\t}\n\t\tArrayList<String> hostNames = serviceManager.getHostnames();\n\t\tif (cluster.containsKey(hostName)) {\n\t\t\tif (hostNames.contains(hostName)) {\n\t\t\t\treturn \"Service already exist\";\n\t\t\t} else {\n\t\t\t\thostNames.add(hostName);\n\t\t\t\tserviceManager.setHostnames(hostNames);\n\t\t\t\treturn \"Instance Added\";\n\t\t\t}\n\t\t} else {\n\t\t\treturn \"Invalid Machine\";\n\t\t}\n\t}",
"private void createFakeAssetURLMapEntry(MarinerRequestContext context,\n String url) {\n // copied from ObjectElement implementation \n ApplicationContext ac = ContextInternals.getApplicationContext(context);\n PackageResources pr = ac.getPackageResources();\n if (pr != null) {\n PackagedURLEncoder packagedURLEncoder = ac.getPackagedURLEncoder();\n if (packagedURLEncoder != null) {\n String encoded = packagedURLEncoder.getEncodedURI(url);\n PackageResources.Asset prAsset = new PackageResources.Asset(\n url, false);\n pr.addAssetURLMapping(encoded, prAsset);\n }\n }\n }",
"private void addApp(RifidiApp app) {\n\t\tsynchronized (apps) {\n\t\t\tif (apps.containsValue(app))\n\t\t\t\treturn;\n\t\t\tint appID = serviceCounter++;\n\t\t\tapps.put(appID, app);\n\t\t\tstartApp(appID, true);\n\t\t}\n\t}",
"public OfficeProcessManagerPoolEntry(final OfficeUrl officeUrl) {\n this(officeUrl, new OfficeProcessManagerPoolEntryConfig());\n }",
"@POST\n\t@Path( \"/add\" + OPTIONAL_INSTANCE_PATH )\n\t@Produces( MediaType.APPLICATION_JSON )\n\tResponse addInstance( @PathParam(\"name\") String applicationName, @PathParam(\"instancePath\") String parentInstancePath, Instance instance );",
"public JBDeployer(String serverUri, JBDeploymentManager dm) {\n uri = serverUri;\n this.dm = dm;\n }",
"@Override\n\tpublic com.idetronic.eis.model.KpiEntry createKpiEntry(long kpiEntryId) {\n\t\treturn _kpiEntryLocalService.createKpiEntry(kpiEntryId);\n\t}",
"void addEntry(String key, Object value) {\n this.storageInputMap.put(key, value);\n }",
"public void addServiceEntriesToDD(String serviceName, String serviceEndpointInterface, String serviceEndpoint);",
"java.lang.String getManifestUrl();",
"public void addURL(URL url) {\n logger.debug(this + \" adding URL \" + url);\n super.addURL(url);\n }",
"@ZAttr(id=589)\n public void addGalSyncLdapURL(String zimbraGalSyncLdapURL) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n StringUtil.addToMultiMap(attrs, \"+\" + Provisioning.A_zimbraGalSyncLdapURL, zimbraGalSyncLdapURL);\n getProvisioning().modifyAttrs(this, attrs);\n }",
"public void saveURL(URLValue url)\n\t{\n\t\tthis.accessor.getPrimaryIndex().put(new URLEntity(url.getKey(), url.getURL(), url.getUpdatingPeriod()));\n\t}",
"@ZAttr(id=47)\n public void addGalLdapURL(String zimbraGalLdapURL) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n StringUtil.addToMultiMap(attrs, \"+\" + Provisioning.A_zimbraGalLdapURL, zimbraGalLdapURL);\n getProvisioning().modifyAttrs(this, attrs);\n }",
"public void addServer(String nameServer) { \n Server server = new Server(nameServer);\n serversList.add(server);\n }",
"@Override\n public Event add(Ec2LaunchConfiguration newResource) {\n return null;\n }",
"public Jar addJar(Jnlp jnlp, String href, String part, Main main, Download download)\n {\n \tif (main == null)\n \t\tmain = Main.FALSE;\n \tif (download == null)\n \t\tdownload = Download.LAZY;\n \t\tChoice choice = getResource(jnlp, false);\n \t\tJar jar = new Jar();\n \t\tchoice.setJar(jar);\n \t\tjar.setHref(href);\n \t\tjar.setPart(part);\n \t\tjar.setDownload(download);\n \t\tjar.setMain(main);\n \t\treturn jar;\n }",
"private URL getManifestUrl() {\n\n\t\treturn new URL(VERSION_MANIFEST_URL.replace(\"%s\", \"1.7.2\"));\n\t}",
"public DataEntry createEntry(String tableName, DataEntry entry) {\n\t\tDataEntry oldEntry = null;\n\t\tif (tables.containsKey(tableName)) {\n\t\t\tTable table = tables.get(tableName);\n\t\t\toldEntry = table.create(entry.getProductId(), entry);\n\t\t\tdataToHistory(oldEntry);\n\t\t}\n\t\treturn oldEntry;\n\t}",
"public void addEnvEntry (String name, String value)\n {\n _plusWebAppContext.addEnvEntry(name, value);\n }",
"public void addAnalysisLauncher(AbstractAnalysisLauncher launcher) {\n analysisLaunchers.add(launcher);\n }",
"public void addMapping(String packageName, String categoryName, String descrip) {\n\t\tContentValues values = new ContentValues();\n\t\tvalues.put(FIELD_APP_PACKAGE, packageName);\n\t\tvalues.put(FIELD_APP_CATEGORY, categoryName);\n\t\tvalues.put(FIELD_APP_DESCRIP, descrip);\n\t\t\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\t\tdb.insert(TABLE_APP, null, values);\n\t\t\n\t\tsynchronized(mappingLock) {\n\t\t\tinvalidateCache();\n\t\t}\n\t\t\n\t}",
"public static void addURL(URL u) throws IOException {\n if (!(ClassLoader.getSystemClassLoader() instanceof URLClassLoader)) {\n return;\n }\n\n URLClassLoader sysLoader = (URLClassLoader) ClassLoader.getSystemClassLoader();\n URL[] urls = sysLoader.getURLs();\n for (int i = 0; i < urls.length; i++) {\n if (StringUtils.equalsIgnoreCase(urls[i].toString(), u.toString())) {\n log.debug(\"URL {} is already in the CLASSPATH\", u);\n return;\n }\n }\n Class<URLClassLoader> sysclass = URLClassLoader.class;\n try {\n Method method = sysclass.getDeclaredMethod(\"addURL\", parameters);\n method.setAccessible(true);\n method.invoke(sysLoader, new Object[] {u});\n } catch (Throwable t) {\n t.printStackTrace();\n throw new IOException(\"Error, could not add URL to system classloader\");\n }\n }",
"void addHadithUrl(Object newHadithUrl);",
"private static void addSeedURL()\r\n\t{\r\n\t\tSystem.out.println(\"Enter a website to search for keywords.\");\r\n\t\tString userInput = input.nextLine();\r\n\t\t\r\n\t\tif(userInput.length() >= 7 && !(userInput.substring(0, 6).equals(\"https://\")))\r\n\t\t{\r\n\t\t\tuserInput = \"http://\" + userInput;\r\n\t\t\t\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tSharedLink.addLink(userInput);\r\n\t\t\t} \r\n\t\t\tcatch (InterruptedException e) \r\n\t\t\t{\r\n\t\t\t\t//do nothing\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public Builder addHotelImageURLs(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureHotelImageURLsIsMutable();\n hotelImageURLs_.add(value);\n onChanged();\n return this;\n }",
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\t System.out.println(\"URL APP----------:\" + getIntent().getExtras().getString(\"urlApp\"));\r\n\t\tinstallApp(getIntent().getExtras().getString(\"urlApp\"));\r\n\t}",
"protected Bundle installBlueprintAsBundle(String name, URL url, boolean start, Consumer<Object> consumer) throws BundleException {\n TinyBundle bundle = TinyBundles.bundle();\n bundle.add(\"OSGI-INF/blueprint/blueprint-\" + name.toLowerCase(Locale.ENGLISH) + \".xml\", url);\n bundle.set(\"Manifest-Version\", \"2\")\n .set(\"Bundle-ManifestVersion\", \"2\")\n .set(\"Bundle-SymbolicName\", name)\n .set(\"Bundle-Version\", \"1.0.0\")\n .set(Constants.DYNAMICIMPORT_PACKAGE, \"*\");\n consumer.accept(bundle);\n Bundle answer = bundleContext.installBundle(name, bundle.build());\n\n if (start) {\n answer.start();\n }\n return answer;\n }",
"public void installApk(String filename) {\n // systemLib.Installapk(filename);\n // if (isregister == false) {\n // isregister = true;\n // IntentFilter intentFilter = new IntentFilter(MyIntent.ACTION_INSTALL_BEGIN);\n // intentFilter.addAction(MyIntent.ACTION_INSTALL_END);\n // mContext.registerReceiver(mReceiver, intentFilter);\n // }\n // //start the service\n // Intent startservice = new Intent();\n // startservice.setAction(MyIntent.ACTION_PROXY);\n // startservice.putExtra(MyIntent.EXTRA_OPERATION, MyIntent.EXTRA_INSTALL);\n // startservice.putExtra(MyIntent.EXTRA_ARG1, filename);\n // Log.print(\"startservice intent is \" + startservice);\n // mContext.startService(startservice);\n }",
"void addHadithBookUrl(Object newHadithBookUrl);",
"public void addEntry(NameSurferEntry entry) {\r\n\t\tentryGraph.add(entry);\r\n\t}",
"void addWebHook(URL repositoryUrl, String notificationUrl, String webHookName);",
"public void registerConfigurationEntry(String key, Object entry);",
"public void addEntry(Entry e) {\n entries.put(e.getName(), e);\n }",
"public long addEntry(long terbseId, Entry p_entry,\n SessionInfo p_session) throws TermbaseException\n {\n IEntryCreation ic = new EntryCreation(WebAppConstants.TERMBASE_XML);\n return ic.addEntry(terbseId, p_entry, p_session);\n }",
"public void addDestination(ReplicaCatalogEntry rce) {\n List<ReplicaCatalogEntry> l = null;\n if (mDestMap.containsKey(rce.getResourceHandle())) {\n // add the url to the existing list\n l = (List) mDestMap.get(rce.getResourceHandle());\n // add the entry to the list\n l.add(rce);\n } else {\n // add a new list\n l = new ArrayList(3);\n l.add(rce);\n mDestMap.put(rce.getResourceHandle(), l);\n }\n }",
"public void add_server(String host) throws LookupException, \n NameServerContactException{\n \n String ip = lookup_ip(host);\n int port = lookup_port(host);\n System.out.println(\"Lookup of host \" + host + \": Success\");\n \n Server server = new Server(host, ip, port);\n \n servers.put(host, server);\n }",
"@Override\n\tpublic com.idetronic.eis.model.KpiEntry addKpiEntry(\n\t\tcom.idetronic.eis.model.KpiEntry kpiEntry)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn _kpiEntryLocalService.addKpiEntry(kpiEntry);\n\t}",
"EntryPoint createEntryPoint();",
"public void addshortcut() {\n Intent addshort = new Intent(getApplicationContext(), ShortMaster.class);\n addshort.setAction(Intent.ACTION_MAIN);\n Intent addIntent = new Intent();\n addIntent.putExtra(Intent.EXTRA_SHORTCUT_NAME, R.string.app_name);\n addIntent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, addshort);\n addIntent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, Intent.ShortcutIconResource.fromContext(getApplicationContext(), R.mipmap.ic_launcher));\n getApplicationContext().sendBroadcast(addIntent);\n }",
"public void addEntry(String key, ChoiceEntry entry){\n _entries.put(key, entry);\n }",
"CdapDeployAppStep createCdapDeployAppStep();",
"public void add(FileSystemEntry entry);",
"public void createLauncherShortcut(Context context){\n \n Log.d(\"ManagerPreferences\", \"Creating Icon \" + Constants.APTOIDE_CLASS_NAME);\n \n Intent shortcutIntent = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName());\n //\t\tshortcutIntent.putExtra(context.getPackageName(), context.getString(R.string.description));\n \n final Intent intent = new Intent();\n intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);\n \n intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, ApplicationAptoide.MARKETNAME);\n \n Parcelable iconResource;\n try{\n \ticonResource = Intent.ShortcutIconResource.fromContext(context, context.getResources().getIdentifier(\"icon_\" + ApplicationAptoide.BRAND,\"drawable\",context.getPackageName()));\n }catch(Exception e){\n \te.printStackTrace();\n \ticonResource = Intent.ShortcutIconResource.fromContext(context, context.getResources().getIdentifier(\"icon_brand_aptoide\",\"drawable\",context.getPackageName()));\n }\n intent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, iconResource);\n intent.putExtra(\"duplicate\", false);\n intent.setAction(\"com.android.launcher.action.INSTALL_SHORTCUT\");\n context.sendBroadcast(intent);\n }",
"protected static void addEntryInList(String key, String entry) {\n if (hasEntryInList(key, entry))\n return ;\n\n String entries = getSPreference(key);\n if (TextUtils.isEmpty(entries))\n entries = entry;\n else\n entries = entries + \":\" + entry;\n\n setPreference(key, entries);\n }",
"void addPermanent(Permanent permanent, int createOrder);",
"public static PredictionServiceConnector createForLocalService() {\n return new PredictionServiceConnector(Environment.getPredictionURL(), Environment.getPredictionPort());\n }",
"private static void addInstance(String[] args,CuratorFramework client,String command,\n List<ExampleServer> servers) throws Exception {\n \n if (args.length < 2) {\n System.err.println(\"syntax error (expected add <name> <description>): \" + command);\n return;\n }\n \n StringBuilder description = new StringBuilder();\n for (int i = 1; i < args.length; ++i) {\n if (i > 1) {\n description.append(' ');\n }\n description.append(args[i]);\n }\n \n String serviceName = args[0];\n ExampleServer server = new ExampleServer(client,PATH,serviceName,description.toString());\n servers.add(server);\n server.start();\n \n System.out.println(serviceName + \" added\");\n }",
"public void createDirectoryEntry(\n TableServiceClient tableServiceClient,\n UUID collectionId,\n String tableName,\n FireStoreDirectoryEntry createEntry) {\n\n tableServiceClient.createTableIfNotExists(tableName);\n TableClient tableClient = tableServiceClient.getTableClient(tableName);\n\n // Walk up the lookup directory path, finding missing directories we get to an\n // existing one\n // We will create the ROOT_DIR_NAME directory here if it does not exist.\n String lookupDirPath = FileMetadataUtils.makeLookupPath(createEntry.getPath());\n for (String testPath = lookupDirPath;\n !testPath.isEmpty();\n testPath = FileMetadataUtils.getDirectoryPath(testPath)) {\n\n // !!! In this case we are using a lookup path\n if (lookupByFilePath(tableServiceClient, collectionId, tableName, testPath) != null) {\n break;\n }\n\n FireStoreDirectoryEntry dirToCreate = FileMetadataUtils.makeDirectoryEntry(testPath);\n String partitionKey = getCollectionPartitionKey(collectionId, testPath);\n String rowKey = encodePathAsAzureRowKey(testPath);\n TableEntity entity = FireStoreDirectoryEntry.toTableEntity(partitionKey, rowKey, dirToCreate);\n logger.info(\"Upserting directory entry for {} in table {}\", testPath, tableName);\n // For file ingest worker flights,\n // It's possible that another thread is trying to write the same directory entity at the same\n // time upsert rather than create so that it does not fail if it already exists\n tableClient.upsertEntity(entity);\n }\n createEntityForPath(tableClient, collectionId, tableName, createEntry);\n }",
"public void hyperlinkUpdate(HyperlinkEvent e)\n {\n if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED)\n {\n ServiceReference<BrowserLauncherService> serviceReference =\n BrandingActivator.getBundleContext().getServiceReference(\n BrowserLauncherService.class);\n\n if (serviceReference != null)\n {\n BrowserLauncherService browserLauncherService\n = BrandingActivator\n .getBundleContext().getService(serviceReference);\n\n browserLauncherService.openURL(e.getDescription());\n }\n }\n }",
"void addNewEntry(BlogEntry entry) throws DAOException;",
"public Endpoint addNewEndpoint(String entity)\n\t\t{\n\t\t\tElement endpointElement = document.createElement(ENDPOINT_ELEMENT_NAME);\n\t\t\tEndpoint endpoint = new Endpoint(endpointElement);\n\t\t\tendpoint.setEntity(entity);\n\n\t\t\tuserElement.appendChild(endpointElement);\n\t\t\tendpointsList.add(endpoint);\n\n\t\t\treturn endpoint;\n\t\t}",
"public void addURL(String url) {\n pageURLs.add(url);\n }",
"void installApp(String appPath);",
"void setStartUpExe(String s);",
"@PostMapping(\"/add\")\n public Result addUrl(@RequestBody CreateLinkRequest request){\n return this.urlMapService.addUrlIntoUser(request.getUserId(), request.getToLink());\n }",
"public void addDeploymentFactory(File newDM) throws IOException {\n \n int number=1;\n // copy to the right location...\n File repository = new File(System.getProperty(J2EE_HOME)+File.separator+\n J2EE_DEPLOYMENT_MANAGER_REPOSITORY);\n File to = new File(repository, newDM.getName());\n while (to.exists()) {\n to = new File(repository, newDM.getName()+number);\n number++;\n }\n ArchivistUtils.copy(\n new BufferedInputStream(new FileInputStream(newDM)),\n new BufferedOutputStream(new FileOutputStream(to)));\n \n installDeploymentFactory(to);\n \n }",
"Observable<Session> addEntry(Session session, RelyingParty relyingParty, Set<String> scopes, String redirectUrl);",
"void addEntry(K key, V value);",
"void addTransientEntry(K key, V value);",
"public void addEntry(NameSurferEntry entry) {\r\n\t\tentries.add(entry);\r\n\t}",
"protected void NewApp(String name, String code, String file, String web,\n String dir) {\n String webRoot = UIHelper.getStoragePath(AppManagerActivity.this);\n webRoot = webRoot + constants.SD_CARD_TBSSOFT_PATH3 + \"/\";\n File newfile = new File(webRoot + dir + \"/\" + file);\n/*\t\tFile newfile2 = new File(webRoot + dir + \"/\"\n + constants.WEB_CONFIG_FILE_NAME);*/\n try {\n newfile.createNewFile();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n\n this.IniFile.writeIniString(webRoot + dir + \"/\" + file, \"TBSAPP\",\n \"defaultUrl\", web);\n this.IniFile.writeIniString(webRoot + dir + \"/\" + file, \"TBSAPP\", \"AppCode\",\n code);\n this.IniFile.writeIniString(webRoot + dir + \"/\" + file, \"TBSAPP\", \"AppName\",\n name);\n this.IniFile.writeIniString(webRoot + dir + \"/\" + file, \"TBSAPP\", \"AppVersion\",\n \"1.0\");\n AppManagerActivity.myThread handThread = new AppManagerActivity.myThread(dir, file);\n handThread.run();\n }",
"protected UUID add(E entry, boolean persist) {\n\t\tlist.add(entry);\n\t\tUUID guid = UUID.randomUUID();\n\t\tdict.put(guid, entry);\n\t\tif (entry.isEnable()) {\n\t\t\tnames.put(entry.getName(), guid);\n\t\t}\n\t\tif (persist) {\n\t\t\tConfig.serialize();\n\t\t}\n\t\treturn guid;\n\t}",
"public void addEntry(NameSurferEntry entry) {\n\t\tentries.add(entry);\n\t}",
"Builder addPublishingPrinciples(URL value);",
"public static void addPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.add(model, instanceResource, PAYMENTURL, value);\r\n\t}",
"public void agregarNuevaUrl(ListaConArreglo url,String ip,ListaEnlazada servicios) {\n\t\tmodAdmin.agregarMaquina( url, ip, servicios);\n\t}",
"public static void configureChildProcessLauncher(String packageName,\n boolean isExternalService) {\n ChildProcessCreationParams.set(\n new ChildProcessCreationParams(packageName, isExternalService,\n LibraryProcessType.PROCESS_WEBVIEW_CHILD));\n }",
"public void addEnvEntry (String name, Object value)\n {\n if (_envMap == null)\n _envMap = new HashMap();\n\n if (name == null)\n log.warn (\"Name for java:comp/env is null. Ignoring.\");\n if (value == null)\n log.warn (\"Value for java:comp/env is null. Ignoring.\");\n\n _envMap.put (name, value);\n }",
"@Override\n\tprotected void addAction(HashSet<String> addSet){\n\t\t((AdaptDependencyManager)MiddleWareConfig.getInstance().getDepManager()).addNewDeploymentNodeBySet(addSet);\n\t}",
"@Override\n protected URL getInstallURL() {\n return Activator.getDefault().getBundle().getEntry(\"/\");\n }",
"EnvEntry createEnvEntry();",
"@Override\n\tpublic void addNewInstallApps(List<ApplicationInfo> apps, String packageName) {\n ALog.d(\"Enter\");\n\n\n\t\tfor(ApplicationInfo info : apps){\n\t\t\tint[] pageInfo = LauncherProviderHelper.findVacantCell4AppAdd(getBaseContext());\n\t\t\tif (pageInfo == null) {\n\t\t\t\tALog.d(\"can't find cell for new app\");\n\t\t\t\tcontinue;\n\t\t\t} \n\t\t\tint page = pageInfo[0];\n\t\t\tint cellX = pageInfo[1];\n\t\t\tint cellY = pageInfo[2];\n\t\t\tinfo.screen = page;\n\t\t\tinfo.cellX = cellX;\n\t\t\tinfo.cellY = cellY;\n\t\t\tinfo.spanX = 1;\n\t\t\tinfo.spanY = 1;\n\t\t\tBaseLauncherModel.addOrMoveItemInDatabase(getBaseContext(), info, LauncherSettings.Favorites.CONTAINER_DESKTOP);\n\t\t\t\n\t\t\tView view = mWorkspace.createViewByItemInfo(info);\n\t\t\tif (view == null)\n\t\t\t\treturn;\n\t\t\t((Workspace)mWorkspace).addInScreen(view, page, cellX, cellY, 1, 1);\n\t\t\t\n\t\t\t//FIXME 在编辑模式下可能会有刷新的问题\n\t\t}\n ALog.d(\"Exit\");\n\t}",
"public abstract T addService(ServerServiceDefinition service);",
"@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n Bundle bundle = intent.getExtras();\n String url = bundle.getString(\"downloadUrl\");\n PreferenceUtils.setString(UpdateVersionService.this, \"apkDownloadurl\", url);\n nm.notify(titleId, notification);\n downLoadFile(url);\n return Service.START_STICKY;\n }",
"public void setServerUrl(String newUrl) {\n if(newUrl == null){\n return;\n }\n props.setProperty(\"url\", newUrl);\n saveProps();\n }"
] | [
"0.5818914",
"0.5008831",
"0.5008389",
"0.49136958",
"0.47959825",
"0.47271168",
"0.4696447",
"0.4695377",
"0.46558058",
"0.46260783",
"0.46143022",
"0.45970905",
"0.45895147",
"0.45648333",
"0.4559998",
"0.45164335",
"0.45144436",
"0.44585145",
"0.4452404",
"0.44395053",
"0.43945226",
"0.43858156",
"0.43817753",
"0.43733162",
"0.43723562",
"0.43618643",
"0.43602344",
"0.43303",
"0.43272305",
"0.43180966",
"0.43154666",
"0.43013838",
"0.42858586",
"0.42807445",
"0.42745602",
"0.42739785",
"0.42679486",
"0.42649806",
"0.42601103",
"0.42589286",
"0.4255917",
"0.42534468",
"0.42387012",
"0.4226884",
"0.4222272",
"0.4216114",
"0.42158136",
"0.42114413",
"0.42077982",
"0.4204395",
"0.41980645",
"0.41941744",
"0.4190978",
"0.41846234",
"0.41716406",
"0.41618684",
"0.41613087",
"0.4148477",
"0.41407531",
"0.4138402",
"0.41263264",
"0.4121501",
"0.41115528",
"0.41100553",
"0.41062573",
"0.410396",
"0.40965056",
"0.4093919",
"0.40896654",
"0.4082924",
"0.40793887",
"0.40784505",
"0.40732267",
"0.4072242",
"0.40712497",
"0.40699324",
"0.4069248",
"0.40685353",
"0.40678477",
"0.40667796",
"0.4063194",
"0.40582284",
"0.4056273",
"0.4053917",
"0.40395248",
"0.40326488",
"0.4029911",
"0.40293282",
"0.40285265",
"0.4024617",
"0.40234548",
"0.40211985",
"0.40207437",
"0.40181124",
"0.40135452",
"0.40126258",
"0.40121776",
"0.40050888",
"0.4003464",
"0.40030462"
] | 0.48863992 | 4 |
Add a launcher URL by the given object name to the persistence. | private void addFreeLauncher(String deploymentName) {
persistence.addFreeLauncher(getLauncherUrlFromObjectName(deploymentName));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String getLauncherUrlFromObjectName(String objectName) {\n if (objectName != null) {\n return objectName.replace(Constants.BPG_APP_TYPE_LAUNCHER, Constants.LAUNCHER_URL_PREFIX) +\n \".\" +\n rootDomainName;\n }\n\n throw new IllegalArgumentException(\"Null Object name cannot be processed.\");\n }",
"void addHadithUrl(Object newHadithUrl);",
"void addHadithBookUrl(Object newHadithBookUrl);",
"private String getObjectNameFromLauncherUrl(String launchUrl) {\n if (launchUrl != null) {\n String[] domainParts = launchUrl.split(\"\\\\.\");\n return domainParts[0].replace(Constants.LAUNCHER_URL_PREFIX, Constants.BPG_APP_TYPE_LAUNCHER);\n }\n\n throw new IllegalArgumentException(\"Null launcher URL cannot be processed.\");\n }",
"public void addFeedIntoFolder(String feedURL, String name);",
"public static void addURL(URL u) throws IOException {\n ClassLoader classLoader = MVdWUpdater.class.getClassLoader();\n\n if (classLoader instanceof URLClassLoader) {\n try {\n ADD_URL_METHOD.invoke(classLoader, u);\n } catch (IllegalAccessException | InvocationTargetException e) {\n throw new RuntimeException(\"Unable to invoke URLClassLoader#addURL\", e);\n }\n } else {\n throw new RuntimeException(\"Unknown classloader: \" + classLoader.getClass());\n }\n\n }",
"public void addUrlArg(String key, String value);",
"protected void addUrlPropertyDescriptor(Object object) {\n itemPropertyDescriptors.add\n (createItemPropertyDescriptor\n (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n getResourceLocator(),\n getString(\"_UI_ProceedingsType_url_feature\"),\n getString(\"_UI_PropertyDescriptor_description\", \"_UI_ProceedingsType_url_feature\", \"_UI_ProceedingsType_type\"),\n BibtexmlPackage.Literals.PROCEEDINGS_TYPE__URL,\n true,\n false,\n false,\n ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\n null,\n null));\n }",
"public void saveURL(URLValue url)\n\t{\n\t\tthis.accessor.getPrimaryIndex().put(new URLEntity(url.getKey(), url.getURL(), url.getUpdatingPeriod()));\n\t}",
"public String save(UrlObject urlObject);",
"@Override\n public URL getEntry(final String name) {\n return getClass().getResource(name);\n }",
"Builder addUrl(String value);",
"Builder addUrl(URL value);",
"public void bind(String name, Object obj) {\n\t\tif (log.isInfoEnabled()) {\n\t\t\tlog.info(\"Static JNDI binding: [\" + name + \"] = [\" + obj + \"]\");\n\t\t}\n\t\tthis.boundObjects.put(name, obj);\n\t}",
"public void bind(String name, Object obj)\r\n {\r\n if (logger.isInfoEnabled()) {\r\n logger.info(\"Static JNDI binding: [\" + name + \"] = [\" + jndiObjectToString(obj) + \"]\");\r\n }\r\n this.boundObjects.put(name, obj);\r\n }",
"private void storeObject(String name, Object obj)\r\n {\r\n objectNames.put(obj, name);\r\n\r\n if (!nameObjects.containsKey(name))\r\n nameObjects.put(name, new WeakReference(obj));\r\n }",
"public void addDAppURL(String url)\n {\n\n String checkVal = url.replaceFirst(\"^(http[s]?://www\\\\.|http[s]?://|www\\\\.)\",\"\");\n for (String item : history)\n {\n if (item.contains(checkVal))\n {\n //replace with this new one\n history.remove(item);\n if (!history.contains(item))\n {\n history.add(0, url);\n }\n storeHistory();\n return;\n }\n }\n\n history.add(0, url);\n storeHistory();\n }",
"public void setLauncher(String launcher) {\n this.launcher = launcher;\n }",
"public void xsetUrlName(org.apache.xmlbeans.XmlString urlName)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlString target = null;\r\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(URLNAME$12, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(URLNAME$12);\r\n }\r\n target.set(urlName);\r\n }\r\n }",
"@SneakyThrows\n public void addURL(Path path) {\n if (ADD_URL == null || this.classLoader == null) {\n return;\n }\n try {\n ADD_URL.invoke(this.classLoader, path.toUri().toURL());\n } catch (IllegalAccessException | InvocationTargetException | MalformedURLException e) {\n e.printStackTrace();\n }\n }",
"public void setURLObject(URL url) {\n\t\tthis.url = url;\n\t}",
"public void addURL(URL url) {\n logger.debug(this + \" adding URL \" + url);\n super.addURL(url);\n }",
"protected URL findResource(String name)\n\t{\n\t\tObject entryImg = m_entries.get(name);\n\t\t\n\t\t/* Return null when not found */\n\t\tif (entryImg == null)\n\t\t\treturn null;\n\n\t\ttry \n\t\t{\n\t\t\tURL url = new URL(\"jar\",\n\t\t\t\t\t\t\t m_url.getHost(),\n\t\t\t\t\t\t\t \"file:\" + m_url.getPath() + \"!/\" + name);\n\t\t\treturn url;\n\t\t}\n\t\tcatch (MalformedURLException e)\n\t\t{\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}",
"Builder addSameAs(URL value);",
"public void addEntry(String name, Meem meem) {\n\t\tsend(\"addEntry\", new Serializable[] { name, meem.getMeemPath().toString() });\n\t}",
"public void setUrlName(java.lang.String urlName)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(URLNAME$12, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(URLNAME$12);\r\n }\r\n target.setStringValue(urlName);\r\n }\r\n }",
"public void LaunchUrl(String URL)\n\t{\n\t\tmyDriver.get(URL);\n\t\t\n\t}",
"@Override\n public RedirectUrl registryUrl(RedirectUrl redirectUrlObj, String accountId) {\n String generatedUrl = RandomStringUtils.randomAlphanumeric(6);\n redirectUrlObj.setShortURL(generatedUrl);\n Account account = accountRepository.findByAccountId(accountId);\n if (account == null) {\n throw new IllegalStateException(\"There is no account with such id.\");\n }\n redirectUrlObj.setAccount(account);\n return redirectUrlRepository.save(redirectUrlObj);\n }",
"public static void add(String name, Object value) {\r\n\t\tgetInstance().addResource(name, value);\r\n\t}",
"void setRemoteUrl(String name, String url, String GIT_DIR) throws GitException, InterruptedException;",
"private void redirectStore(String updateUrl) {\n final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(updateUrl));\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }",
"public static void addURL(URL u) throws IOException {\n if (!(ClassLoader.getSystemClassLoader() instanceof URLClassLoader)) {\n return;\n }\n\n URLClassLoader sysLoader = (URLClassLoader) ClassLoader.getSystemClassLoader();\n URL[] urls = sysLoader.getURLs();\n for (int i = 0; i < urls.length; i++) {\n if (StringUtils.equalsIgnoreCase(urls[i].toString(), u.toString())) {\n log.debug(\"URL {} is already in the CLASSPATH\", u);\n return;\n }\n }\n Class<URLClassLoader> sysclass = URLClassLoader.class;\n try {\n Method method = sysclass.getDeclaredMethod(\"addURL\", parameters);\n method.setAccessible(true);\n method.invoke(sysLoader, new Object[] {u});\n } catch (Throwable t) {\n t.printStackTrace();\n throw new IOException(\"Error, could not add URL to system classloader\");\n }\n }",
"Builder addMainEntityOfPage(URL value);",
"private static JdbcUrl add(String name, String driverClassName, String urlTemplate, boolean parseUrl) {\n return add(name, null, driverClassName, urlTemplate, parseUrl);\n }",
"public void setUrlName(String urlName) {\n this.urlName = urlName;\n }",
"public FactHandle insert(Object object, String entryPoint) {\n WorkingMemoryEntryPoint ep = mKsession\n .getWorkingMemoryEntryPoint(entryPoint);\n return ep.insert(object);\n }",
"void setPersistenceManager(javax.management.ObjectName objectName);",
"public String createHrefForUser(final String name) {\n\t\treturn this.userUrlPrefix + name;\n\t}",
"private void launchLocal(String name) {\n Intent loc = new Intent(homeActivity.this, cardsMenu.class);\n Bundle b = new Bundle();\n b.putString(\"key\",\"local\"); //pass along that this will be a single player multigame\n b.putString(\"name\",name); //pass the player's name\n // b.putString(\"State\", State); //pass along the game type\n loc.putExtras(b);\n startActivity(loc);\n\n }",
"private void createFakeAssetURLMapEntry(MarinerRequestContext context,\n String url) {\n // copied from ObjectElement implementation \n ApplicationContext ac = ContextInternals.getApplicationContext(context);\n PackageResources pr = ac.getPackageResources();\n if (pr != null) {\n PackagedURLEncoder packagedURLEncoder = ac.getPackagedURLEncoder();\n if (packagedURLEncoder != null) {\n String encoded = packagedURLEncoder.getEncodedURI(url);\n PackageResources.Asset prAsset = new PackageResources.Asset(\n url, false);\n pr.addAssetURLMapping(encoded, prAsset);\n }\n }\n }",
"public void setURL(String url);",
"public void hyperlinkUpdate(HyperlinkEvent e)\n {\n if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED)\n {\n ServiceReference<BrowserLauncherService> serviceReference =\n BrandingActivator.getBundleContext().getServiceReference(\n BrowserLauncherService.class);\n\n if (serviceReference != null)\n {\n BrowserLauncherService browserLauncherService\n = BrandingActivator\n .getBundleContext().getService(serviceReference);\n\n browserLauncherService.openURL(e.getDescription());\n }\n }\n }",
"public void launchImageActivity(String name){\n Intent intent = new Intent(this, ImageActivity.class);\n intent.putExtra(\"name\",name);\n startActivity(intent);\n finish();\n }",
"public void saveLocation(String name) {\n // Storing name in pref\n editor.putString(POSITION, name);\n\n // commit changes\n editor.commit();\n }",
"void setSubmoduleUrl(String name, String url) throws GitException, InterruptedException;",
"public static void addNameBinding (String name, Object javaObject)\n\t{\n\t\tm_interpreter.set (name, javaObject);\n\t}",
"public void insert(String name, String fileName) {\n connect(fileName);\n String sql = \"INSERT INTO urls(url) VALUES(?)\";\n\n try (PreparedStatement pstmt = conn.prepareStatement(sql)) {\n pstmt.setString(1, name);\n pstmt.executeUpdate();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }",
"public void addSeed(String url) {\n\t\tseedList.add(url);\n\t}",
"private void createDesktopIcon(String linkName) {\n File icoFile = new File(pladipusFolder, \"pladipus.ico\");\r\n try (OutputStream out = new FileOutputStream(icoFile); InputStream in = getClass().getClassLoader().getResourceAsStream(\"images/pladipus.ico\")) {\r\n if (in != null) {\r\n IOUtils.copy(in, out);\r\n //set this icon as the ico\r\n String iconFileLocation = icoFile.getAbsolutePath();\r\n JShellLink link = new JShellLink();\r\n link.setFolder(JShellLink.getDirectory(\"desktop\"));\r\n link.setName(linkName);\r\n link.setIconLocation(iconFileLocation);\r\n link.setPath(jarFilePath);\r\n link.save();\r\n }\r\n } catch (IOException e) {\r\n\r\n LOGGER.error(e);\r\n System.out.println(\"An error occurred when trying to create a desktop shortcut...\");\r\n }\r\n }",
"Builder addGenre(URL value);",
"java.lang.String getManifestUrl();",
"@Override\n public void onClick(View v) {\n try {\n launchActivity(MGERRIT, MGERRIT_MAIN_ENTRY);\n } catch (ActivityNotFoundException failToMarket) {\n launchUrl(MGERRIT_PLAYSTORE);\n }\n\n }",
"public void addURL(String title,final URI URL)\n {\n this.setText(title);\n this.setHorizontalAlignment(SwingConstants.LEFT);\n this.setBorderPainted(false);\n this.setOpaque(false);\n this.setBackground(Color.lightGray);\n this.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n if (Desktop.isDesktopSupported()) {\n Desktop desktop = Desktop.getDesktop();\n try \n {\n desktop.browse(URL);\n } \n catch (Exception ex) \n {\n System.out.println(\"Browser could not be opened with given URL\");\n }\n } \n else {\n }\n }\n });\n }",
"public synchronized void registerObject(String name, Object object)\r\n throws IllegalArgumentException,\r\n NullPointerException\r\n {\r\n if (containsSubString(name, TIGHT_BINDING))\r\n {\r\n // user has used the wrong method to register this object.\r\n registerObject(object, name);\r\n }\r\n else\r\n {\r\n // check that name doesn't contain illegal characters\r\n if (!isValidName(name))\r\n {\r\n throw new IllegalArgumentException(\"ResourceManager.registerObject(): \"+\r\n \"name '\" +name+ \"' can not contain \"+\r\n \"the whitespace, or the characters \" +\r\n \" '\"+LOOSE_BINDING+\"', '\"+\r\n SINGLE_MATCH+ \"'\");\r\n }\r\n\r\n if (object == null)\r\n {\r\n throw new NullPointerException(\"ResourceManager.registerObject(): \"+\r\n \"object is null\");\r\n }\r\n\r\n // store this mapping\r\n storeObject(name, object);\r\n }\r\n }",
"public void launchAdded(ILaunch launch)\n\t{\n\t\t// Verify that the launch is of the correct configuration type.\n\t\ttry\n\t\t{\n\t\t\tILaunchConfiguration config = launch.getLaunchConfiguration();\n\t\t\tif (! (config.getType().getIdentifier().equals(IRuntimePlayerLaunchConfigurationConstants.ID_RUNTIMEPLAYER_CONFIGURATION)))\n\t\t\t\treturn;\n\t\t} catch (CoreException ex)\n\t\t{\n\t\t\tBRenderLog.logError(ex,\"Unable to query launch configuration.\");\n\t\t}\n\n\t\tif (g_currentLaunch == null)\n\t\t{\n\t\t\tg_currentLaunch = launch;\n\t\t} else\n\t\t{\n\t\t\tBRenderLog.logWarning(\"Runtime Player is currently launched with configuration \"\n\t\t\t + g_currentLaunch.getLaunchConfiguration().getName() + \".\");\n\t\t\t\n\t\t\t// Display a dialog \n\t\t\tDisplay.getDefault().syncExec(new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tGuiUtilities.popupMessage(\"Runtime Player is already launched with configuration \"\n\t\t\t\t\t + g_currentLaunch.getLaunchConfiguration().getName() + \".\",\n\t\t\t\t\t Display.getCurrent().getActiveShell());\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}",
"public int addHome(UUID uuid, String name, Location loc){\r\n\t\t//Load Map (Update)\r\n\t\tloadMap();\r\n\r\n\t\t//Combovar of Homename & UUID of Player\r\n\t\tString uniqhome = uuid.toString() + name;\r\n\r\n\t\t//Create new HomePoint and write it to Map\r\n\t\tif(!map.containsKey(uniqhome)){\r\n\t\t\tmap.put(uniqhome, loc.getWorld().getName() + \";\" + loc.getX() + \";\" + loc.getY() + \";\" + loc.getZ() + \";\" + loc.getYaw() + \";\" + loc.getPitch());\r\n\t\t} else {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\r\n\t\t//Save Map\r\n\t\ttry {\r\n\t\t\tObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(homeFileLocation));\r\n\t\t\toos.writeObject(map);\r\n\t\t\toos.flush();\r\n\t\t\toos.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn 2;\r\n\t\t}\r\n\r\n\t\treturn 0;\r\n\t}",
"public void addPage(String name, String park);",
"@Override\n\tpublic void generateMigsPunchUrl() {\n\n\t}",
"@Override\n public void addConnection(Link link)\n {\n connections.add(link);\n if (executableProcess != null)\n addConnectionToExec(link);\n }",
"Builder addAdditionalType(URL value);",
"public void setLinkName(String linkName);",
"public void addArtifact(String artName) {\r\n \t\tartifacts.add(artName);\r\n \t\tRationaleUpdateEvent l_updateEvent = m_eventGenerator.MakeUpdated();\r\n \t\tl_updateEvent.setTag(\"artifacts\");\r\n \t\tm_eventGenerator.Broadcast(l_updateEvent);\r\n \t}",
"public void add(String nome, Object obj);",
"public void setURL(java.lang.String URL) {\n this.URL = URL;\n }",
"static String getURLStringToPersist(JSLineBreakpoint lb) {\n return getURLStringImpl(lb, null, null, false);\n }",
"public void addRemoteItem(String name, String description, long category_id) {\n url = Constants.addItem;\n params = new HashMap<>();\n params.put(param_item_name, \"\" + name);\n params.put(param_item_description, \"\" + description);\n params.put(param_category_id, \"\" + category_id);\n\n if (ApiHelper.checkInternet(mContext)) {\n mApiHelper.addItem(name, description, category_id,\n mIRestApiCallBack, false, url, params);\n } else {\n mIRestApiCallBack.onNoInternet();\n }\n\n }",
"public static void openPlayStoreEntry()\n\t{\n\t\tApp.getInstance().startActivity(new Intent(Intent.ACTION_VIEW)\n\t\t\t\t.setData(Uri.parse(\"market://details?id=\" + General.PKG_MESSENGERAPI+\"&referrer=utm_source%3D\"+App.getInstance().getPackageName()+\"%26utm_medium%3DAPIMethod%26utm_campaign%3DAPICampaign\"))\n\t\t\t\t.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));\n\t}",
"public void addMavenRepository(String name, String url) {\n repositories.put(name, url);\n }",
"public void addDestination(String site, String url) {\n this.addDestination(new ReplicaCatalogEntry(url, site));\n }",
"@ZAttr(id=47)\n public void addGalLdapURL(String zimbraGalLdapURL) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n StringUtil.addToMultiMap(attrs, \"+\" + Provisioning.A_zimbraGalLdapURL, zimbraGalLdapURL);\n getProvisioning().modifyAttrs(this, attrs);\n }",
"public void addWebLink(String s) {\r\n\t\twebLinks.add(s);\r\n\t}",
"public URL getResourceLocation( String name );",
"public void setUrl(String url);",
"public void setUrl(String url);",
"public void setAmusementObjectWebsite(String website){\r\n amusementObjectWebsite = Uri.parse(website);\r\n }",
"public void addHotelName(String name) {\n\t\t\tName = name;\r\n\t\t}",
"public static void bind(String name, myRemoteInterface obj) throws AlreadyBoundException, RemoteException, IOException {\n\t\tString className = obj.getClass().getCanonicalName();\n\t\tString ip = null;\n\t\ttry {\n\t\t\tip = InetAddress.getLocalHost().getHostAddress();\n \n\t\t} catch (UnknownHostException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\tString nameWithSpace = Naming.parseHostPort(name);\n\t\tString args[] = nameWithSpace.split(\" \");\n\t\t\n\t\tRemoteObjectRef newRef = new RemoteObjectRef(ip, 9999,args[2] , className,\"bind\");\n\t\t\n\t\tObjectMap.insertIntoServerMap(args[2], obj);\n\t\t\n\t\tRegistryInterface stub = null;\n\t\t try{\n\t\t\t \n\t\t\t Class<?> stub_class = Class.forName(\"registry.Registry_stub\");\n\t\t\t stub = (RegistryInterface)Class.forName(\"registry.Registry_stub\").newInstance();\n\t\t\t if(stub_class != null){\n\t\t\t\t byte[] temp = downloadToServer(stub_class, newRef);\n\t\t\t }\n\t\t} catch (InstantiationException | IllegalAccessException\n\t\t\t\t| ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tstub.bind(name, newRef);\n\t\t\n\t}",
"public boolean saveLink(String gameTitle, String nameConfig, Link oldLink, Link newLink){ //Dovrai aggiungere le altre caratteristiche di un Link\n Log.d(TAG, \"saveLink\");\n\n boolean linkSaved = false;\n Configuration thisConfig = MainModel.getInstance().getConfiguration(gameTitle, nameConfig);\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 = (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 thisConfig.getLinks().remove(oldLink);\n thisConfig.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 thisConfig.addLink(newLink);\n MainModel.getInstance().writeConfigurationsJson();\n linkSaved = true;\n }\n\n return linkSaved;\n }",
"@Override\n public void setUrl(String url) {\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(\"Directory manager \" + directoryManager);\n }\n try {\n super.setUrl(directoryManager.replacePath(url));\n } catch (Exception e) {\n LOGGER.error(\"Exception thrown when setting URL \", e);\n throw new IllegalStateException(e);\n }\n }",
"public boolean markLauncherAsFree(String launcherUrl) {\n if (persistence.launcherExists(launcherUrl)) {\n return persistence.markLauncherAsFree(launcherUrl);\n }\n\n return false;\n }",
"private void setURL(String url) {\n try {\n URL setURL = new URL(url);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"public Object getObjectInstance(Object obj, Name name, Context ctx, Hashtable environment) throws Exception {\r\n//\t\tContext ctx = getInitialContext(environment);\r\n\t\tReference ref = (Reference)obj;\r\n\t\tString url_string = (String)ref.get(\"URL\").getContent();\r\n\t\tURL url = new URL(url_string);\r\n\t\treturn url.getContent();\r\n }",
"public void createURL(){\n urlDB = ( PREFACE + server + \"/\" + database + options);\n }",
"public void setEntryName(String ename);",
"@Override\n public void storeFeed(int feedId, String feedName) {\n synchronized (synchronizer) {\n ContentValues feedValues = new ContentValues(1);\n feedValues.put(FEEDS_NAME, feedName);\n this.writableDatabase.update(TABLE_FEEDS, feedValues, FEEDS_ID + \"=\" + feedId, null);\n }\n }",
"public URL setURL(URL url) {\r\n if (url == null)\r\n throw new IllegalArgumentException(\r\n \"A null url is not an acceptable value for a PackageSite\");\r\n URL oldURL = url;\r\n myURL = url;\r\n return oldURL;\r\n }",
"public Url saveOrUpdateUrl(Url url) {\n\n\t\tmapper.save(url);\n\t\t\n\t\treturn mapper.load(Url.class, url.getAlias());\n\t}",
"void addNewEntry(BlogEntry entry) throws DAOException;",
"public void setURL(String aURL)\n{\n if(RMUtils.equals(aURL, getURL())) return; // If value already set, just return\n Object oldValue = put(\"RMShapeURL\", RMStringUtils.min(aURL)); // Cache old value\n firePropertyChange(\"RMShapeURL\", oldValue, aURL, -1); // Set new value and fire PropertyChange\n}",
"void addWebHook(URL repositoryUrl, String notificationUrl, String webHookName);",
"public void setLaunchStrategy(LaunchStrategy strategy);",
"private void computeAttachmentURL(Attachment attachment, UriInfo uriInfo) {\n // LinkType != null -> asset is not stored in LARS\n // Therefore there should be an external URL in the attachment\n if (attachment.getLinkType() != null) {\n return;\n }\n\n // For assets stored in LARS, we need to compute the URL and store it in the attachment\n String encodedName;\n try {\n encodedName = URLEncoder.encode(attachment.getName(), \"UTF-8\");\n } catch (UnsupportedEncodingException e) {\n throw new AssertionError(\"This should never happen.\", e);\n }\n\n String url = configuration.getRestBaseUri(uriInfo) + \"assets/\" + attachment.getAssetId() + \"/attachments/\" + attachment.get_id() + \"/\" + encodedName;\n attachment.setUrl(url);\n }",
"public Url getUrlByName(String name) {\n\t\treturn getUrl(\"name\", name);\n\t}",
"public void addEntry(NameSurferEntry entry) {\r\n\t\tentryGraph.add(entry);\r\n\t}",
"Builder addThumbnailUrl(URL value);",
"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 }",
"@Override\n\tpublic void save(DataConfig storeConfig) throws RemoteException {\n\t\t\n\t\tsuper.save(storeConfig);\n\t\t\n\t\tUriAdapter adapter = new UriAdapter(storeConfig);\n\t\tsaveBnetMap(adapter, bnetMap, storeConfig.getStoreUri(), getName());\n\t\tadapter.close();\n\t}",
"public Object getObjectInstance(\n Object object, Name name, Context context, Hashtable environment) {\n if (object instanceof Reference) {\n Reference reference = (Reference) object;\n RefAddr url = reference.get(URL_PARAMETER);\n if (url != null && url.getContent() != null) {\n try {\n return getRepository(url.getContent().toString());\n } catch (Exception e) {\n return null;\n }\n }\n }\n return null;\n }",
"public void addServer(String nameServer) { \n Server server = new Server(nameServer);\n serversList.add(server);\n }",
"public String getUrlName() {\n\t\treturn \"neoload\";\n\t}"
] | [
"0.59125495",
"0.5317453",
"0.529935",
"0.49388105",
"0.49329138",
"0.48873842",
"0.48624438",
"0.48596364",
"0.4749314",
"0.4738745",
"0.47176442",
"0.47143254",
"0.46998754",
"0.46732903",
"0.46339792",
"0.4629085",
"0.46287182",
"0.46193364",
"0.46173012",
"0.46073928",
"0.4588705",
"0.45801115",
"0.4578286",
"0.45615157",
"0.45479292",
"0.45394954",
"0.45302674",
"0.44931486",
"0.4478544",
"0.44777417",
"0.44727862",
"0.44703183",
"0.44575107",
"0.44553316",
"0.44495144",
"0.44347963",
"0.44319978",
"0.4427821",
"0.441727",
"0.44075182",
"0.44069496",
"0.44011968",
"0.43936658",
"0.43806586",
"0.43578097",
"0.43575096",
"0.4350455",
"0.43383434",
"0.4330145",
"0.43217987",
"0.43146777",
"0.4314429",
"0.4309477",
"0.4307472",
"0.43001425",
"0.42893335",
"0.42844683",
"0.42730266",
"0.42718667",
"0.42674863",
"0.42633763",
"0.42569718",
"0.4255703",
"0.42554605",
"0.42536625",
"0.4252826",
"0.4248965",
"0.4242685",
"0.42421255",
"0.423928",
"0.42385516",
"0.4219408",
"0.42104322",
"0.42104322",
"0.41954547",
"0.41898128",
"0.41873515",
"0.41826764",
"0.41803595",
"0.4173046",
"0.41677585",
"0.41669527",
"0.41658586",
"0.41649455",
"0.41603363",
"0.41594893",
"0.4150142",
"0.41466242",
"0.41441056",
"0.41437894",
"0.41419125",
"0.41417947",
"0.41409177",
"0.4140411",
"0.4136285",
"0.4133698",
"0.41321748",
"0.41302565",
"0.41156647",
"0.4115631"
] | 0.61347073 | 0 |
Get the object name used in the K8S cluster, from the launcher URL. | private String getObjectNameFromLauncherUrl(String launchUrl) {
if (launchUrl != null) {
String[] domainParts = launchUrl.split("\\.");
return domainParts[0].replace(Constants.LAUNCHER_URL_PREFIX, Constants.BPG_APP_TYPE_LAUNCHER);
}
throw new IllegalArgumentException("Null launcher URL cannot be processed.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String getLauncherUrlFromObjectName(String objectName) {\n if (objectName != null) {\n return objectName.replace(Constants.BPG_APP_TYPE_LAUNCHER, Constants.LAUNCHER_URL_PREFIX) +\n \".\" +\n rootDomainName;\n }\n\n throw new IllegalArgumentException(\"Null Object name cannot be processed.\");\n }",
"protected String get_object_name() {\n\t\treturn this.hostname;\n\t}",
"java.lang.String getClusterName();",
"java.lang.String getInstanceName();",
"String getClusterName();",
"String getObjectName();",
"String getIntegApplicationName();",
"public static String getAppName(){\r\n return getProperty(\"name\", \"Jin\");\r\n }",
"String getLauncherClassName();",
"String getHostName(String clusterName, String componentName) throws SystemException;",
"public String getHostName() {\n\t\treturn \"RaspberryHostName\";\n\t}",
"public String getRuntimeName() {\r\n\t\tfinal StringBuffer runtimeName = new StringBuffer();\r\n\t\tfinal String name = this.getName();\r\n\t\tfinal Package packagee = this.getPackage();\r\n\t\tfinal String packageName = null == packagee ? null : packagee.getName();\r\n\t\tString nameLessPackageName = name;\r\n\r\n\t\tif (false == Tester.isNullOrEmpty(packageName)) {\r\n\t\t\truntimeName.append(packageName);\r\n\t\t\truntimeName.append('.');\r\n\r\n\t\t\tnameLessPackageName = name.substring(packageName.length() + 1);\r\n\t\t}\r\n\r\n\t\tnameLessPackageName = nameLessPackageName.replace('.', '$');\r\n\t\truntimeName.append(nameLessPackageName);\r\n\r\n\t\treturn runtimeName.toString();\r\n\t}",
"public static String classObjectName(Class<?> type) {\n return (type.getName() + \":::OBJECT\");\n }",
"public String getName() {\n return (NAME_PREFIX + _applicationId + DELIM + _endpointId);\n }",
"public String getObjectName() {\r\n\t\tif (objectName == null || objectName.length() == 0)\r\n\t\t\tsetObjectName(\"jk\" + jkNr);\r\n\t\treturn objectName;\r\n\t}",
"@Override\n\tpublic final String getName() {\n\t\treturn getClass().getSimpleName().replaceAll(\"Application$\", \"\").toLowerCase();\n\t}",
"String get_name() {\n File file = new File(url);\n return file.getName();\n }",
"@Override\n\tpublic java.lang.String getName() {\n\t\treturn _scienceApp.getName();\n\t}",
"public static String getLauncherClassName() {\n Context context = RuntimeEnvironment.application;\n Intent homeIntent = new Intent(Intent.ACTION_MAIN)\n .addCategory(Intent.CATEGORY_HOME)\n .setPackage(context.getPackageName())\n .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n List<ResolveInfo> launchers = context.getPackageManager()\n .queryIntentActivities(homeIntent, 0);\n if (launchers.size() != 1) {\n return null;\n }\n return launchers.get(0).activityInfo.name;\n }",
"String getSymbolicName();",
"public String getObjectName() {\r\n\t\treturn objectName;\r\n\t}",
"public java.lang.String getClusterName() {\n java.lang.Object ref = \"\";\n if (endpointConfigCase_ == 2) {\n ref = endpointConfig_;\n }\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 (endpointConfigCase_ == 2) {\n endpointConfig_ = s;\n }\n return s;\n }\n }",
"private String getEc2InstanceHostname() {\n String instanceId = debugInstanceId;\n // For some launches, we won't know the EC2 instance ID until this point.\n if ( instanceId == null || instanceId.length() == 0 ) {\n instanceId = environment.getEC2InstanceIds().iterator().next();\n }\n DescribeInstancesResult describeInstances = environment.getEc2Client().describeInstances(\n new DescribeInstancesRequest().withInstanceIds(instanceId));\n if ( describeInstances.getReservations().isEmpty()\n || describeInstances.getReservations().get(0).getInstances().isEmpty() ) {\n return null;\n }\n return describeInstances.getReservations().get(0).getInstances().get(0).getPublicDnsName();\n }",
"private static String getObjectName(Object o) {\n StringBuilder sb = new StringBuilder();\n String output;\n if (o instanceof AppWidgetProviderInfo) {\n sb.append(WIDGET_PREFIX);\n sb.append(((AppWidgetProviderInfo) o).provider.flattenToString());\n output = sb.toString();\n sb.setLength(0);\n } else if (o instanceof ResolveInfo){\n sb.append(SHORTCUT_PREFIX);\n\n ResolveInfo info = (ResolveInfo) o;\n sb.append(new ComponentName(info.activityInfo.packageName,\n info.activityInfo.name).flattenToString());\n output = sb.toString();\n sb.setLength(0);\n } else {\n sb.append(ICONPACK_PREFIX);\n String info = (String) o;\n sb.append(info);\n output = sb.toString();\n sb.setLength(0);\n }\n return output;\n }",
"private String getHostName() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(activity);\n\n return preferences.getString(activity.getString(R.string.pref_host_id), activity.getString(R.string.pref_default_host_name));\n }",
"public String getObjectName() {\r\n return objectName;\r\n }",
"String getHostName();",
"String getHostName();",
"@Override\n\tpublic String getObjectName() {\n\t\t// Follow priorities to obtain the object name\n\t\tif (!CompileUtil.isBlank(this.label)) {\n\t\t\treturn this.label;\n\t\t} else if (this.key != null) {\n\t\t\treturn this.key.toString();\n\t\t} else {\n\t\t\treturn String.valueOf(this.index);\n\t\t}\n\t}",
"String getObjectRefName();",
"public String getURL() {\n\t\treturn getName();\n\t}",
"public String getObject_name() {\n return object_name;\n }",
"public String getAppName(PackageInfo packageInfo) {\n return (String) packageInfo.applicationInfo.loadLabel(packageManager);\n }",
"public final String getAppName( )\n\t{\n\t\treturn this.data.getString( \"applicationName\" );\n\t}",
"private String retrieveAbsoluteName(Object obj)\r\n {\r\n return (String) objectNames.get(obj);\r\n }",
"public static String name() {\r\n String _computername=\"\";\r\n InetAddress _address=null;\r\n \r\n try {\r\n _address=InetAddress.getLocalHost();\r\n _computername=_address.getHostName();\r\n }\r\n catch (Exception ex) {\r\n throw new RuntimeException(ex.getMessage());\r\n }\r\n \r\n if (_address!=null) {\r\n _address=null; System.gc();\r\n }\r\n \r\n return _computername;\r\n }",
"private static String getName(PathOrUrl location) {\n\t\t\tthrow new UnsupportedOperationException(\"Not implemented yet.\");\r\n\t\t}",
"String getSingletonName();",
"public String getHostname() {\n return this.config.getHostname();\n }",
"String getHostname();",
"String getHostname();",
"public String getWorkerName(){\r\n\t\ttry {\r\n\t\t\treturn this.workerobj.getString(WorkerController.NAME);\r\n\t\t} catch (JSONException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"public String getName() {\n // defaults to class name\n String className = getClass().getName();\n return className.substring(className.lastIndexOf(\".\")+1);\n }",
"public String getName() {\n return Utility.getInstance().getPackageName();\n }",
"String getRemoteHostName();",
"protected String get_object_name() {\n\t\treturn this.name;\n\t}",
"protected String get_object_name() {\n\t\treturn this.name;\n\t}",
"public String getJarName() {\r\n\t\tURL clsUrl = getClass().getResource(getClass().getSimpleName() + \".class\");\r\n\t\tif (clsUrl != null) {\r\n\t\t\ttry {\r\n\t\t\t\tjava.net.URLConnection conn = clsUrl.openConnection();\r\n\t\t\t\tif (conn instanceof java.net.JarURLConnection) {\r\n\t\t\t\t\tjava.net.JarURLConnection connection = (java.net.JarURLConnection) conn;\r\n\t\t\t\t\tString path = connection.getJarFileURL().getPath();\r\n\t\t\t\t\t// System.out.println (\"Path = \"+path);\r\n\t\t\t\t\tint index = path.lastIndexOf('/');\r\n\t\t\t\t\tif (index >= 0)\r\n\t\t\t\t\t\tpath = path.substring(index + 1);\r\n\t\t\t\t\treturn path;\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic String getInstanceName() {\n\t\treturn instanceName;\n\t}",
"public String getAppPathname();",
"public String getObjectClassName()\n {\n if (_objectClass != null)\n return _objectClass.getName();\n else\n return getAPIClassName();\n }",
"@java.lang.Override\n public java.lang.String getClusterName() {\n java.lang.Object ref = \"\";\n if (endpointConfigCase_ == 2) {\n ref = endpointConfig_;\n }\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 (endpointConfigCase_ == 2) {\n endpointConfig_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getHostName() {\n return this.hostContext.getHostName();\n }",
"String getApiName();",
"public static String getAppName(String requestUrl)\n {\n String appName = StringUtils.substringAfter(\n requestUrl.replace('\\\\', '/'), CE_URL_PREFIX);\n appName = StringUtils.substringBefore(appName, \"/\");\n \n if (StringUtils.isBlank(appName))\n throw new IllegalArgumentException(\"invalid content editor url: \" + \n requestUrl);\n \n return appName;\n }",
"public String getHostName();",
"public String hostname() {\n return this.innerProperties() == null ? null : this.innerProperties().hostname();\n }",
"public static String getAppJarName() {\n try {\n String r = (String)Class.forName(\"hr.restart.util.IntParam\")\n .getMethod(\"getTag\", new Class[] {String.class})\n .invoke(null, new Object[] {\"appjarname\"});\n System.out.println(\"appjarname = \"+r);\n return r.equals(\"\")?\"ra-spa.jar\":r;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return \"ra-spa.jar\";\n }",
"public String getHostname();",
"private ObjectName getObjectNameFor(MarketDataProvider inProvider)\n throws MalformedObjectNameException\n {\n return new ObjectName(\"org.marketcetera.marketdata.provider:name=\" + inProvider.getProviderName());\n }",
"java.lang.String getAppName();",
"java.lang.String getAppName();",
"java.lang.String getAppName();",
"@Override\n\tpublic java.lang.String getCluster() {\n\t\treturn _scienceApp.getCluster();\n\t}",
"public static String getRunningJarName(\n\t\t\t@SuppressWarnings(\"rawtypes\") final Class clazz) {\n\t\tfinal String classURI = RuntimeLogbasenamePropertyDefiner\n\t\t\t\t.getClassURI(clazz);\n\n\t\tString jarName = null;\n\t\tif (RuntimeLogbasenamePropertyDefiner.isRunningAsJar(classURI)) {\n\t\t\tfinal String vals[] = classURI.split(\"/\");\n\t\t\tfor (final String val : vals) {\n\t\t\t\t// skip all path fragments until the one with the '!'\n\t\t\t\tif (val.contains(\"!\")) {\n\t\t\t\t\tjarName = val.substring(0, val.length() - 1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn jarName;\n\t}",
"public String getEntryName();",
"public String discoverClusterName() throws ClusterNameDiscoveryException {\n try {\n return AmazonECSAgentIntrospectionUtils.getMetadata().getCluster();\n } catch (Exception e) {\n throw new ClusterNameDiscoveryException(\"Cluster name discovery failed\", e);\n }\n }",
"public final String getName() {\n if (name == null) {\n name = this.getClass().getSimpleName().substring(3);\n }\n return name;\n }",
"@ApiModelProperty(value = \"String matching the name of the application\")\n public String getName() {\n return name;\n }",
"java.lang.String getPoolName();",
"protected String get_object_name() {\n\t\treturn this.servicegroupname;\n\t}",
"public String getName(){\n\t\tif(name==null) return webserviceUrl;\n\t\treturn name;\n\t}",
"com.google.protobuf.ByteString getInstanceNameBytes();",
"public String getHostName() {\n return FxSharedUtils.getHostName();\n }",
"public String getQualifiedName() {\n if(probe.getHost() != null) {\n return probe.getHost().getName() + \"/\" + getName();\n } else {\n return \"/\" + getName();\n }\n }",
"public String getVdcObjectName() {\n permissions perms = getParameters().getPermission();\n return getDbFacade().getEntityNameByIdAndType(perms.getObjectId(), perms.getObjectType());\n }",
"String getCollectorHostName(String clusterName, MetricsService service) throws SystemException;",
"String getTaskName();",
"String getTaskName();",
"public RemoteCall<String> name() {\n final Function function = new Function(FUNC_NAME,\n Arrays.<Type>asList(),\n Arrays.<TypeReference<?>>asList(new TypeReference<Utf8String>() {}));\n return executeRemoteCallSingleValueReturn(function, String.class);\n }",
"public String getClusterExecutableBasename() {\n return SeqExec.EXECUTABLE_BASENAME;\n }",
"@Override\n\tpublic String getName() {\n\t\treturn name + instanceName;\n\t}",
"default Optional<String> getExternalHostName(String clusterName, String componentName) {\n return Optional.empty();\n }",
"public String getUrlName() {\n\t\treturn \"neoload\";\n\t}",
"protected String getEntryName( HttpServletRequest request )\n {\n return (String) request.getParameter( ENTRY_NAME_HTTP_PARAM );\n }",
"static String getHostName() {\n try {\n return InetAddress.getLocalHost().getHostName();\n } catch (UnknownHostException e) {\n return \"unknown\";\n }\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString\n getClusterNameBytes() {\n java.lang.Object ref = \"\";\n if (endpointConfigCase_ == 2) {\n ref = endpointConfig_;\n }\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n if (endpointConfigCase_ == 2) {\n endpointConfig_ = b;\n }\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"abstract public String getApplicationName();",
"public void testRuntimeConfigurationClusterName()\n {\n RuntimeConfiguration runtimeConfiguration = new Jonas4xRuntimeConfiguration();\n runtimeConfiguration.setProperty(JonasPropertySet.JONAS_SERVER_NAME, \"foo\");\n runtimeConfiguration.setProperty(JonasPropertySet.JONAS_DOMAIN_NAME, \"bar\");\n runtimeConfiguration.setProperty(JonasPropertySet.JONAS_CLUSTER_NAME, \"jar\");\n\n AbstractRemoteContainer remoteContainer = new Jonas4xRemoteContainer(runtimeConfiguration);\n AbstractJonasRemoteDeployer remoteDeployer = new TestDeployer(remoteContainer);\n RemoteDeployerConfig deployerConfig = remoteDeployer.getConfig();\n\n assertEquals(\"foo\", deployerConfig.getServerName());\n assertEquals(\"bar\", deployerConfig.getDomainName());\n assertEquals(\"jar\", deployerConfig.getClusterName());\n }",
"String getBundleSymbolicName();",
"protected String get_object_name() {\n\t\treturn null;\n\t}",
"protected String get_object_name() {\n\t\treturn null;\n\t}",
"public java.lang.String getAppName() {\n java.lang.Object ref = appName_;\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 appName_ = s;\n return s;\n }\n }",
"public String referenceTomcatInstanceFolder() {\n if (tomcatArchive == null) {\n throw new IllegalStateException(\"No Tomcat Archive has been Selected!\");\n }\n return getInstanceName() + \"-\" + getEnvironmentName() + \"-\" +this.tomcatArchive.getName();\n }",
"public String getName() {\n return (String) getObject(\"username\");\n }",
"public String getName() {\n return cache.getName();\n }",
"public java.lang.String getAppName() {\n java.lang.Object ref = appName_;\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 appName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getAppName() {\n java.lang.Object ref = appName_;\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 appName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getShortAppName();",
"public String getQualifiedName() {\n if (probe.getHost() != null) {\n return probe.getHost().getName() + \"/\" + getName();\n } else {\n return \"/\" + getName();\n }\n }"
] | [
"0.64145476",
"0.633114",
"0.59514904",
"0.5849335",
"0.5847244",
"0.5811223",
"0.5719221",
"0.5681208",
"0.5519827",
"0.55085045",
"0.54463094",
"0.54277796",
"0.5408881",
"0.5407457",
"0.5399623",
"0.53907204",
"0.5359491",
"0.5335288",
"0.53188455",
"0.52984184",
"0.5290068",
"0.52851844",
"0.52798736",
"0.5274027",
"0.52641904",
"0.52636486",
"0.5243053",
"0.5243053",
"0.524248",
"0.5238937",
"0.523827",
"0.52378005",
"0.52363205",
"0.52308977",
"0.5220273",
"0.5211607",
"0.5200777",
"0.51978856",
"0.5193959",
"0.5189711",
"0.5189711",
"0.51444685",
"0.5137986",
"0.5137663",
"0.51340854",
"0.5128492",
"0.5128492",
"0.51171154",
"0.5109786",
"0.51063454",
"0.5096545",
"0.50935274",
"0.50917023",
"0.50916326",
"0.50879955",
"0.50825065",
"0.50758207",
"0.5074889",
"0.5058185",
"0.5054928",
"0.50485635",
"0.50485635",
"0.50485635",
"0.50451034",
"0.5038639",
"0.50365186",
"0.503006",
"0.50288725",
"0.50251913",
"0.5024035",
"0.50208545",
"0.5019386",
"0.5017984",
"0.50169086",
"0.5001768",
"0.50002563",
"0.49914986",
"0.498941",
"0.498941",
"0.49891955",
"0.4987563",
"0.4977514",
"0.49768743",
"0.49714604",
"0.4970345",
"0.4969279",
"0.49647826",
"0.49639618",
"0.49626377",
"0.4961277",
"0.4959947",
"0.4959947",
"0.49579403",
"0.49564525",
"0.49554798",
"0.4939942",
"0.49373186",
"0.49373186",
"0.4931706",
"0.49270326"
] | 0.6799054 | 0 |
Get the launcher URL used in the persistence by the given object name in the K8S cluster. | private String getLauncherUrlFromObjectName(String objectName) {
if (objectName != null) {
return objectName.replace(Constants.BPG_APP_TYPE_LAUNCHER, Constants.LAUNCHER_URL_PREFIX) +
"." +
rootDomainName;
}
throw new IllegalArgumentException("Null Object name cannot be processed.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String getObjectNameFromLauncherUrl(String launchUrl) {\n if (launchUrl != null) {\n String[] domainParts = launchUrl.split(\"\\\\.\");\n return domainParts[0].replace(Constants.LAUNCHER_URL_PREFIX, Constants.BPG_APP_TYPE_LAUNCHER);\n }\n\n throw new IllegalArgumentException(\"Null launcher URL cannot be processed.\");\n }",
"public String getURL(){\r\n\t\tString url = \"rmi://\";\r\n\t\turl += this.getAddress()+\":\"+this.getPort()+\"/\";\r\n\t\treturn url;\r\n\t}",
"java.lang.String getManifestUrl();",
"@Override\n public URL getEntry(final String name) {\n return getClass().getResource(name);\n }",
"public Object getObjectInstance(Object obj, Name name, Context ctx, Hashtable environment) throws Exception {\r\n//\t\tContext ctx = getInitialContext(environment);\r\n\t\tReference ref = (Reference)obj;\r\n\t\tString url_string = (String)ref.get(\"URL\").getContent();\r\n\t\tURL url = new URL(url_string);\r\n\t\treturn url.getContent();\r\n }",
"public String getJMXURL() {\n try {\n final JMXServiceURL url = \n JmxServiceUrlFactory.forRmiWithJndiInAppserver(getHost(), Integer.parseInt(getPort()));\n return ( url.toString() );\n }\n catch (final Exception e) {\n throw new RuntimeException (e);\n }\n }",
"protected URL findResource(String name)\n\t{\n\t\tObject entryImg = m_entries.get(name);\n\t\t\n\t\t/* Return null when not found */\n\t\tif (entryImg == null)\n\t\t\treturn null;\n\n\t\ttry \n\t\t{\n\t\t\tURL url = new URL(\"jar\",\n\t\t\t\t\t\t\t m_url.getHost(),\n\t\t\t\t\t\t\t \"file:\" + m_url.getPath() + \"!/\" + name);\n\t\t\treturn url;\n\t\t}\n\t\tcatch (MalformedURLException e)\n\t\t{\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}",
"protected String get_object_name() {\n\t\treturn this.hostname;\n\t}",
"public URL getResource(String name) {\n List<GraphClassLoader> loaders = this.classLoaders;\n for (int i = loaders.size()-1; i >=0; i--) {\n final GraphClassLoader classLoader = loaders.get(i);\n final URL localResource = classLoader.getLocalResource(name);\n if (localResource != null) return localResource;\n }\n return null;\n }",
"public String getApplicationURL()\n\t{\n\t\tString url=pro.getProperty(\"baseURL\");\n\t\treturn url;\n\t}",
"public String getHostURL() {\n return getHostURL(PAActiveObject.getActiveObjectNodeUrl(PAActiveObject.getStubOnThis()));\n }",
"public String getURL() {\n\t\treturn getName();\n\t}",
"public String getEasyCoopURI() {\r\n String uri = \"\";\r\n\r\n try {\r\n javax.naming.Context ctx = new javax.naming.InitialContext();\r\n uri = (String) ctx.lookup(\"java:comp/env/easycoopbaseurl\");\r\n //BASE_URI = uri; \r\n } catch (NamingException nx) {\r\n System.out.println(\"Error number exception\" + nx.getMessage().toString());\r\n }\r\n\r\n return uri;\r\n }",
"public String getUrlName() {\n\t\treturn \"neoload\";\n\t}",
"public String getThisApplicationUrl() {\n\t\tString tempFileDest = getProperties().getProperty(\"temp.file.dest\").trim();\n\t\tString thisApplicationUrl = null;\n\t\tif(tempFileDest != null && tempFileDest.contains(\"mysunflower\")){\n\t\t\tthisApplicationUrl = getPortalApplicationUrl();\n\t\t}else{\n\t\t\tthisApplicationUrl = getApplicationUrl();\n\t\t}\n\t\treturn thisApplicationUrl;\n\t}",
"public String getZookeeperUrl() {\n return zookeeper.getHost() + \":\" + zookeeper.getPort();\n }",
"public String getLauncher() {\n return launcher;\n }",
"private URL getManifestUrl() {\n\n\t\treturn new URL(VERSION_MANIFEST_URL.replace(\"%s\", \"1.7.2\"));\n\t}",
"public Object getObjectInstance(\n Object object, Name name, Context context, Hashtable environment) {\n if (object instanceof Reference) {\n Reference reference = (Reference) object;\n RefAddr url = reference.get(URL_PARAMETER);\n if (url != null && url.getContent() != null) {\n try {\n return getRepository(url.getContent().toString());\n } catch (Exception e) {\n return null;\n }\n }\n }\n return null;\n }",
"String getLauncherClassName();",
"java.lang.String getPackageImageURL();",
"String getVmUrl();",
"java.lang.String getArtifactUrl();",
"private String retrieveAbsoluteName(Object obj)\r\n {\r\n return (String) objectNames.get(obj);\r\n }",
"public String getIdGeneratorDatabaseConnectionUrl(){\n \t\treturn getProperty(\"org.sagebionetworks.id.generator.database.connection.url\");\n \t}",
"String getHome(ObjectStorage storage);",
"@DisplayName(\"The URL for the Marketcetera Exchange Server\")\n public String getURL();",
"public String getExecutable(final Launcher launcher) throws IOException, InterruptedException {\n return launcher.getChannel().call(new Callable<String, IOException>() {\n private static final long serialVersionUID = 2373163112639943768L;\n\n @Override\n public String call() throws IOException {\n String nsisHome = Util.replaceMacro(getHome(), EnvVars.masterEnvVars);\n File exe = new File(nsisHome, \"makensis.exe\");\n\n return exe.exists() ? exe.getPath() : null;\n }\n });\n }",
"@Override\r\n\tpublic String getUri() {\n\t\treturn \"kbox://global\";\r\n\t}",
"public final String getUrl() {\n return properties.get(URL_PROPERTY);\n }",
"private void addFreeLauncher(String deploymentName) {\n persistence.addFreeLauncher(getLauncherUrlFromObjectName(deploymentName));\n }",
"public String getURL() {\n\t\treturn prop.getProperty(\"URL\");\n\t}",
"java.lang.String getGameIconUrl();",
"public String getAppPathname();",
"public String referenceTomcatInstanceFolder() {\n if (tomcatArchive == null) {\n throw new IllegalStateException(\"No Tomcat Archive has been Selected!\");\n }\n return getInstanceName() + \"-\" + getEnvironmentName() + \"-\" +this.tomcatArchive.getName();\n }",
"public String getCurrentURL () {\n synchronized (currentLock) {\n if (currentURL != null) {\n return currentURL;\n }\n }\n DataObject[] nodes = (DataObject[])resDataObject.allInstances().toArray(new DataObject[0]);\n // Lookup, as a side-effect, can call lookup listeners and do whatever it wants. Do not call under a lock.\n synchronized (currentLock) {\n if (currentURL == null) {\n currentURL = \"\";\n if (nodes.length != 1)\n return currentURL;\n \n DataObject dO = nodes[0];\n if (dO instanceof DataShadow)\n dO = ((DataShadow) dO).getOriginal ();\n \n try {\n currentURL = dO.getPrimaryFile ().getURL ().toString ();\n } catch (FileStateInvalidException ex) {\n //noop\n }\n }\n \n return currentURL;\n }\n }",
"public String getServerUrl() {\n return props.getProperty(\"url\");\n }",
"public static String getLauncherClassName() {\n Context context = RuntimeEnvironment.application;\n Intent homeIntent = new Intent(Intent.ACTION_MAIN)\n .addCategory(Intent.CATEGORY_HOME)\n .setPackage(context.getPackageName())\n .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n List<ResolveInfo> launchers = context.getPackageManager()\n .queryIntentActivities(homeIntent, 0);\n if (launchers.size() != 1) {\n return null;\n }\n return launchers.get(0).activityInfo.name;\n }",
"public URL getResource(String name) {\n for (int i = 0; i < classLoaders.length; i++) {\n URL url = classLoaders[i].getResource(name);\n if (url != null) {\n return url;\n }\n }\n if (getParent() != null) {\n return super.getResource(name);\n } else {\n return null;\n }\n }",
"private String getHostName() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(activity);\n\n return preferences.getString(activity.getString(R.string.pref_host_id), activity.getString(R.string.pref_default_host_name));\n }",
"public static String getTestInstanceURL() {\n\n\t\treturn baseURL + login_required_string + \"/rest/domains/\" + domain + \"/projects/\" + project + \"/test-instances\";\n\t}",
"public String getLaunchPath() {\n return this.LaunchPath;\n }",
"@Override\n public String getProjectURL(ProjectPojo pojo) {\n String bomUrl = serverBean.getServerName()\n + \"/protex/ProtexIPIdentifyFolderBillOfMaterialsContainer?isAtTop=true&ProtexIPProjectId=\"\n + pojo.getProjectKey()\n + \"&ProtexIPIdentifyFileViewLevel=folder&ProtexIPIdentifyFileId=-1\";\n\n log.debug(\"Built URL for project: \" + bomUrl);\n\n return bomUrl;\n }",
"public List<String> getFreeLaunchers() {\n return persistence.getFreeLauncherUrls();\n }",
"public String getPackageDownloadUrl();",
"public String getJobURI() {\n\t\treturn jobURI;\n\t}",
"@Override\n\tpublic void generateMigsPunchUrl() {\n\n\t}",
"public String getURL(String key) {\n return propertiesConfiguration.getString(key);\n }",
"public static String getURL() {\n\t return getURL(BackOfficeGlobals.ENV.NIS_USE_HTTPS, BackOfficeGlobals.ENV.NIS_HOST, BackOfficeGlobals.ENV.NIS_PORT);\n\t}",
"String getIntegApplicationName();",
"String getIntegHost();",
"public URL getResourceLocation( String name );",
"public java.lang.CharSequence getTargetObjectUri() {\n return target_object_uri;\n }",
"public static String getServerUrl(Context context) {\n if (mServerUrl == null) {\n ApplicationInfo appInfo = null;\n try {\n appInfo = context.getPackageManager()\n .getApplicationInfo(context.getPackageName(),\n PackageManager.GET_META_DATA);\n mServerUrl = appInfo.metaData.getString(\"WHISPER_SERVER_ADDRESS\");\n } catch (PackageManager.NameNotFoundException e) {\n e.printStackTrace();\n }\n }\n return mServerUrl;\n }",
"public URL getResource(String name)\n {\n Object sm = System.getSecurityManager();\n\n if (sm != null)\n {\n try\n {\n ((SecurityManager) sm).checkPermission(\n new AdminPermission(this, AdminPermission.RESOURCE));\n }\n catch (Exception e)\n {\n return null; // No permission\n }\n }\n\n return getFramework().getBundleResource(this, name);\n }",
"public java.lang.String getPackageImageURL() {\n java.lang.Object ref = packageImageURL_;\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 packageImageURL_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getRepositoryDatabaseConnectionUrl(){\n \t\t// First try to load the system property\n \t\tString jdbcConnection = System.getProperty(\"JDBC_CONNECTION_STRING\");\n\t\tif(jdbcConnection != null && !\"\".equals(jdbcConnection)) return jdbcConnection;\n \t\t// Now try the environment variable\n \t\tjdbcConnection = System.getenv(\"JDBC_CONNECTION_STRING\");\n\t\tif(jdbcConnection != null && !\"\".equals(jdbcConnection)) return jdbcConnection;\n \t\t// Last try the stack configuration\n \t\treturn getProperty(\"org.sagebionetworks.repository.database.connection.url\");\n \t}",
"private static URL getKubernetesConfigurationUrl(Map<String, String> map) throws MalformedURLException {\n if (map.containsKey(ENVIRONMENT_CONFIG_URL)) {\n return new URL(map.get(ENVIRONMENT_CONFIG_URL));\n } else if (map.containsKey(ENVIRONMENT_CONFIG_RESOURCE_NAME)) {\n String resourceName = map.get(ENVIRONMENT_CONFIG_RESOURCE_NAME);\n return resourceName.startsWith(\"/\") ? Configuration.class.getResource(resourceName) : Configuration.class.getResource(\"/\" + resourceName);\n } else if (Strings.isNotBlank(Utils.getSystemPropertyOrEnvVar(ENVIRONMENT_CONFIG_URL, \"\"))) {\n return new URL(Utils.getSystemPropertyOrEnvVar(ENVIRONMENT_CONFIG_URL, \"\"));\n } else {\n String resourceName = Utils.getSystemPropertyOrEnvVar(ENVIRONMENT_CONFIG_RESOURCE_NAME, \"/\" + DEFAULT_CONFIG_FILE_NAME);\n return resourceName.startsWith(\"/\") ? Configuration.class.getResource(resourceName) : Configuration.class.getResource(\"/\" + resourceName);\n }\n }",
"@Override\r\n\tpublic String getObjectURL(String oid, String view) {\n\t\treturn URLUtil.getObjectURL(oid, view) + \"&useruid=\" + this.getCreatedBy().getUid();\r\n\t}",
"public java.lang.String getPackageImageURL() {\n java.lang.Object ref = packageImageURL_;\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 packageImageURL_ = s;\n return s;\n }\n }",
"public java.lang.CharSequence getTargetObjectUri() {\n return target_object_uri;\n }",
"public static String getAppURL(HttpServletRequest request) {\n\t\tStringBuffer url = new StringBuffer();\n\t\tint port = request.getServerPort();\n\t\tif (port < 0) {\n\t\t\tport = 80; // Work around java.net.URL bug\n\t\t}\n\t\tString scheme = request.getScheme();\n\t\turl.append(scheme);\n\t\turl.append(\"://\");\n\t\turl.append(request.getServerName());\n\t\tif ((scheme.equals(\"http\") && (port != 80))\n\t\t\t\t|| (scheme.equals(\"https\") && (port != 443))) {\n\t\t\turl.append(':');\n\t\t\turl.append(port);\n\t\t}\n\t\turl.append(request.getContextPath());\n\t\treturn url.toString();\n\t}",
"java.lang.String getInstanceName();",
"@Override\n public URI getUri() {\n return _specExecutorInstanceUri;\n }",
"public String getJMXConnectorURL(final JMXTransportProtocol protocol) throws JMException {\n return RMJMXHelper.getInstance().getAddress(protocol).toString();\n }",
"public String getURL(){\r\n\t\t \r\n\t\t\r\n\t\treturn rb.getProperty(\"url\");\r\n\t}",
"String getSpecUrl();",
"public static final String getDataServerUrl() {\n\t\treturn \"http://uifolder.coolauncher.com.cn/iloong/pui/ServicesEngineV1/DataService\";\n\t}",
"String getRemoteHostName();",
"String getHostName(String clusterName, String componentName) throws SystemException;",
"public java.lang.String getLink() {\n\t\treturn dataCacheEntry.getLink();\n\t}",
"public String getMeetingWorkspaceUrl() throws ServiceLocalException {\n\t\treturn (String) this.getPropertyBag().getObjectFromPropertyDefinition(\n\t\t\t\tAppointmentSchema.MeetingWorkspaceUrl);\n\t}",
"public java.lang.String getUrlName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(URLNAME$12, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }",
"LaunchingConnector findLaunchingConnector() {\n List<Connector> connectors = Bootstrap.virtualMachineManager().allConnectors();\n for (Connector connector : connectors) {\n if (connector.name().equals(\"com.sun.jdi.CommandLineLaunch\")) {\n return (LaunchingConnector) connector;\n }\n }\n throw new Error(\"No launching connector\");\n }",
"private static URL getDeployableXmlUrl(Class<?> clazz)\n {\n // Initialize\n StringBuffer urlString = new StringBuffer();\n\n // Assemble filename in form \"fullyQualifiedClassName\"\n urlString.append(clazz.getName());\n\n // Make a String\n String flatten = urlString.toString();\n\n // Adjust for filename structure instead of package structure\n flatten = flatten.replace('.', '/');\n\n // Append Suffix\n flatten = flatten + DEFAULT_SUFFIX_DEPLOYABLE_XML;\n\n // Get URL\n URL url = Thread.currentThread().getContextClassLoader().getResource(flatten);\n assert url != null : \"URL was not found for \" + flatten;\n \n // Return\n return url;\n }",
"String getMetaServerAddress(Env targetEnv);",
"private static URL classToUrl(Class c) {\n final String fullName = c.getName();\n final String pkg = c.getPackage().getName();\n final String className = fullName.substring(pkg.length() + 1, fullName.length()).replace('$', '.');\n return c.getResource(className + \".sql.stg\");\n }",
"public static String getAppName(){\r\n return getProperty(\"name\", \"Jin\");\r\n }",
"public JupiterConnector getConnector(@Nullable String name) {\n if (Strings.isEmpty(name) || DEFAULT_NAME.equals(name)) {\n return getDefault();\n }\n\n return new JupiterConnector(this,\n name,\n redis.getPool(name),\n fallbackPools.computeIfAbsent(name, this::fetchFallbackPool));\n }",
"public String getJarName() {\r\n\t\tURL clsUrl = getClass().getResource(getClass().getSimpleName() + \".class\");\r\n\t\tif (clsUrl != null) {\r\n\t\t\ttry {\r\n\t\t\t\tjava.net.URLConnection conn = clsUrl.openConnection();\r\n\t\t\t\tif (conn instanceof java.net.JarURLConnection) {\r\n\t\t\t\t\tjava.net.JarURLConnection connection = (java.net.JarURLConnection) conn;\r\n\t\t\t\t\tString path = connection.getJarFileURL().getPath();\r\n\t\t\t\t\t// System.out.println (\"Path = \"+path);\r\n\t\t\t\t\tint index = path.lastIndexOf('/');\r\n\t\t\t\t\tif (index >= 0)\r\n\t\t\t\t\t\tpath = path.substring(index + 1);\r\n\t\t\t\t\treturn path;\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public URL getURL()\n/* */ {\n/* 135 */ return ResourceUtils.getResourceAsURL(this, this);\n/* */ }",
"public String getBoshUrl() {\n return boshUrl;\n }",
"String getObjectName();",
"@Override\n\tpublic String getUrlName() {\n\t\treturn URL_NAME;\n\t}",
"String getObjectRefName();",
"public String getProviderUrl() {\n return \"jnp://\".concat(host).concat(\":\").concat(jndiPort.toString());\n }",
"public String getDeployment() {\n if (plan.startsWith(\"pooled-\") || plan.startsWith(\"standard-small\") || plan.startsWith(\"standard-medium\")) {\n return \"broker\";\n } else {\n return address;\n }\n }",
"private String getLauncherPackageName() {\n // Create launcher Intent\n final Intent intent = new Intent(Intent.ACTION_MAIN);\n intent.addCategory(Intent.CATEGORY_HOME);\n\n // Use PackageManager to get the launcher package name\n PackageManager pm = InstrumentationRegistry.getContext().getPackageManager();\n ResolveInfo resolveInfo = pm.resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY);\n return resolveInfo.activityInfo.packageName;\n }",
"public org.apache.xmlbeans.XmlString xgetUrlName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlString target = null;\r\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(URLNAME$12, 0);\r\n return target;\r\n }\r\n }",
"public static String getCloneURL(@NotNull JSONObject jsonObject) {\n return jsonObject.getJSONObject(\"repository\").get(\"clone_url\").toString();\n }",
"public String getZookeeperAdminUrl() {\n return \"http://\" + zookeeper.getHost() + \":\" + zookeeper.getAdminPort();\n }",
"@java.lang.Override\n public java.lang.String getUrl() {\n return instance.getUrl();\n }",
"@java.lang.Override\n public java.lang.String getUrl() {\n return instance.getUrl();\n }",
"public String getNetShowUrl() throws ServiceLocalException {\n\t\treturn (String) this.getPropertyBag().getObjectFromPropertyDefinition(\n\t\t\t\tAppointmentSchema.NetShowUrl);\n\t}",
"public String getClusterExecutableBasename() {\n return SeqExec.EXECUTABLE_BASENAME;\n }",
"private String getURL() {\n\t\t// TODO : Generate URL\n\t\treturn null;\n\t}",
"public String getServerURI() {\n return settings.getString(\"server_url\", DEFAULT_SERVER_URL);\n }",
"@Key(\"mapserver.url\")\n\tString mapServerUrl();",
"public String getUriString() {\n return \"mina:\" + getProtocol() + \":\" + getHost() + \":\" + getPort();\n }",
"String getExecutable();"
] | [
"0.58453256",
"0.54244256",
"0.5376862",
"0.53726363",
"0.5128362",
"0.5105464",
"0.5013119",
"0.49571848",
"0.49500266",
"0.49147844",
"0.49129748",
"0.49012876",
"0.48446444",
"0.48189956",
"0.47975627",
"0.47947925",
"0.4771881",
"0.47634742",
"0.47421294",
"0.46934927",
"0.4679309",
"0.4655065",
"0.46296927",
"0.4621115",
"0.46017623",
"0.45572463",
"0.45321655",
"0.45279634",
"0.45069185",
"0.4495697",
"0.44885734",
"0.4476411",
"0.44759744",
"0.44741964",
"0.4451197",
"0.44409236",
"0.44407803",
"0.44285598",
"0.44264203",
"0.44082883",
"0.44031072",
"0.4399003",
"0.4395867",
"0.4390925",
"0.43862343",
"0.43813077",
"0.43779993",
"0.43767774",
"0.43755075",
"0.43740237",
"0.4370976",
"0.4364737",
"0.43627015",
"0.43468377",
"0.4343471",
"0.43420354",
"0.43396062",
"0.4339131",
"0.4337614",
"0.4325376",
"0.43209597",
"0.43181103",
"0.43175814",
"0.43162674",
"0.43142077",
"0.4309496",
"0.4305746",
"0.43032706",
"0.42902318",
"0.42842996",
"0.4281329",
"0.42773244",
"0.42738172",
"0.42733032",
"0.4266098",
"0.426129",
"0.42540655",
"0.42533872",
"0.42432478",
"0.4222131",
"0.4220335",
"0.42182088",
"0.42052203",
"0.42039025",
"0.42016116",
"0.4193817",
"0.41927123",
"0.41924474",
"0.41924277",
"0.41922572",
"0.41792393",
"0.41768116",
"0.41768116",
"0.41743258",
"0.41705605",
"0.4167865",
"0.41676775",
"0.4163532",
"0.41596302",
"0.41596198"
] | 0.7160374 | 0 |
Get the last created increment number of the Deployment/Service in the K8S cluster. | private int getLatestDeploymentNameSuffix() {
List<String> deploymentList = getDeployments();
// log.info("Currently have " + deploymentList.size() + " deployments...");
if (deploymentList.size() > 0) {
deploymentList.sort((o1, o2) -> {
int mySuffix = Integer.parseInt(o1.substring((Constants.BPG_APP_TYPE_LAUNCHER + "-").length()));
int theirSuffix = Integer.parseInt(o2.substring((Constants.BPG_APP_TYPE_LAUNCHER + "-").length()));
return Integer.compare(mySuffix, theirSuffix);
});
// log.info("Sorted deployments: " + deploymentList.toString());
String lastElement = deploymentList.get(deploymentList.size() - 1);
// log.info("Last element: " + lastElement);
String lastLauncherSuffix = lastElement.substring((Constants.BPG_APP_TYPE_LAUNCHER + "-").length());
// log.info("Picking last deployment suffix: " + lastLauncherSuffix);
return Integer.parseInt(lastLauncherSuffix);
}
return 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public long generateContainerId() {\n return this.containerIdCounter.incrementAndGet();\n }",
"public int getCurrentOperationId(){\n int nmr = 1;\n operationLock.lock();\n try (\n Statement s = rawDataSource.getConnection().createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n ResultSet res = s.executeQuery(\n \"SELECT OP_ID FROM APP.OPERATIONS ORDER BY OP_ID ASC\")) {\n\n if (res.last()) {\n nmr = Integer.parseInt(res.getString(\"OP_ID\")) + 1;\n }\n } catch (SQLException ex) {\n return nmr;\n }\n\n operationLock.unlock();\n return nmr;\n }",
"public abstract int getPreviousTerminationCount(SniperCrawler.InstanceGroup group, Date after);",
"public int getIncrement() {\n \tcheckWidget();\n \treturn increment;\n }",
"public static long getNumberCreated() {\r\n\t\treturn numberCreated;\r\n\t}",
"public Integer getnCreated() {\r\n return nCreated;\r\n }",
"public int getNextCustomerId() {\n return database.getNextCustomerId();\n }",
"int getReplicaCount(ClusterSpec clusterSpec);",
"public int getnCreated() {\r\n return nCreated;\r\n }",
"public String getCounter() {\n counter = Integer.valueOf(counterInt++).toString();\n return counter;\n }",
"private long increment() {\n\t\tlong ts = latestTimestamp.incrementAndGet();\n\t\treturn ts;\n\t}",
"public static int GetIncrement(){\n\t\treturn m_Incrementer;\n\t}",
"public Integer getIncrement() {\n return increment;\n }",
"public int getIncrementedId(SystemValue systemValue) {\n\t\tint value=0;\r\n\t\t\r\n\t\ttry{\r\n\t\tList<SystemValue> list=sqlMapClient.queryForList(\"systemValue.getSystemValue\", systemValue);\r\n\t\t\tfor(SystemValue sysValue:list){\r\n\t\t\t\t\r\n\t\t\t\tvalue=Integer.parseInt(sysValue.getValue());\r\n//\t\t\t\tSystem.out.println(\"incremented\"+value);\r\n\r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n//\t\t\tSystem.out.println(\"Exception in getting system value:\"+e.getMessage());\r\n\t\t}\r\n\t\t\r\n\t\treturn value;\r\n\t}",
"public long getNextID() throws SQLException {\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\t\n\t\ttry {\n\t\t\tconn = getConnection();\n\t\t\tstmt = conn.prepareStatement(\"SELECT Auto_increment FROM information_schema.tables WHERE table_schema = DATABASE()\");\n\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\trs.next();\n\t\t\tlong id = rs.getLong(1);\n\t\t\treturn id;\n\t\t}catch (SQLException e) {\n\t\t\tSystem.out.println(e);\n\t\t\treturn 0;\n\t\t}finally {\n\t\t\tif(conn != null) {\n\t\t\t\tconn.close();\n\t\t\t}\n\t\t\tif(stmt != null) {\n\t\t\t\tstmt.close();\n\t\t\t}\n\t\t}\n\t}",
"long getCreatedConglomNumber()\n {\n if (SanityManager.DEBUG)\n {\n if (conglomId == -1L)\n {\n SanityManager.THROWASSERT(\n \"Called getCreatedConglomNumber() on a CreateIndex\" +\n \"ConstantAction before the action was executed.\");\n }\n }\n\n return conglomId;\n }",
"public int generateId(){\n return repository.getCount()+1;\n }",
"@javax.annotation.Nullable\n @ApiModelProperty(value = \"Total number of non-terminated pods targeted by this deployment that have the desired template spec.\")\n\n public Integer getUpdatedReplicas() {\n return updatedReplicas;\n }",
"long getLastPersistenceKeyCount();",
"public AtomicLong getCounter() {\n return counter;\n }",
"public int generateServiceTime()\n\t{\n\t\tmyRandom = new Random();\n\t\treturn myRandom.nextInt(this.getMyMaxTimeOfService()) + 1;\n\t}",
"public static int getLastCrashID() {\r\n\t\treturn getNumberOfCrashes() - 1;\r\n\t}",
"public IntegerDt getNumberOfInstances() { \n\t\tif (myNumberOfInstances == null) {\n\t\t\tmyNumberOfInstances = new IntegerDt();\n\t\t}\n\t\treturn myNumberOfInstances;\n\t}",
"public IntegerDt getNumberOfInstances() { \n\t\tif (myNumberOfInstances == null) {\n\t\t\tmyNumberOfInstances = new IntegerDt();\n\t\t}\n\t\treturn myNumberOfInstances;\n\t}",
"public long get_counter() {\n return (long)getUIntBEElement(offsetBits_counter(), 32);\n }",
"public String getLastProcessedDocId() {\n return producer.getLastDocId();\n }",
"public int getCurrentGenerationNumber()\n {\n return ssProxy.getCurrentGenerationNumber();\n }",
"public Integer getLastUpdate() {\n return lastUpdate;\n }",
"private synchronized int generateJobID() {\n\t\t/* generate JobID */\n\t\tint jobID = lastJobID;\n\t\tlastJobID += 1;\n\t\treturn jobID;\n\t}",
"public int getthelastupdate() {\n\t\treturn this.getthelastupdate();\n\t}",
"int getServiceNum();",
"public static int getNumeroId(){\r\n idConsecutivo++;\r\n return idConsecutivo;\r\n }",
"public int getPersistSvcPortNum() {\n return persistSvcPort;\n }",
"private static int getNextID() {\n return persons.get(persons.size() - 1).getId() + 1;\n }",
"public Integer getCounter() {\n return counter;\n }",
"int getMaxConcurrentStartup(ClusterSpec clusterSpec);",
"public int getcounter() {\n\t\treturn counter;\r\n\t}",
"public static int getServiceTagFromMetadata(Uint64 metadata) {\n return metadata.toJava().and(MetaDataUtil.METADATA_MASK_SERVICE_INDEX.toJava())\n .shiftRight(60).intValue();\n }",
"public static synchronized int getNewID() {\r\n\t\treturn Entity.IDCount++;\r\n\t}",
"public int getLast() {\n\t\treturn last;\n\t}",
"public int getNextBuildID(){\n return buildHistory.get(buildHistory.size()-1).getBuildID()+1;\n }",
"public int generateId() {\n if (allMessage.size() ==0) {\n return 1000;\n }\n return allMessage.get(allMessage.size() - 1).getId() + 1;\n }",
"public int nextSerialNumber(){\n serialNumber++;\n return serialNumber;\n }",
"private Integer getNewId(){\n List<Integer> allIds = new ArrayList<>();\n for (T entity : allEntities) {\n allIds.add(entity.getId());\n }\n return allIds.size() > 0 ? Collections.max(allIds) + 1 : 1;\n }",
"@Override\n public Long getLastInsertId() {\n Long lastId = 0L;\n Map<String, Object> paramMap = new HashMap<>();\n paramMap.put(\"lastID\", lastId);\n jdbc.query(SELECT_LAST_INSERT_ID, paramMap, rowMapper);\n return lastId;\n }",
"public int getNextClouds() {\n return nextClouds;\n }",
"int getReplicaCount(Type type);",
"String getLastInt();",
"@Override\r\n\tpublic int getLastId() {\n\t\treturn adminDAO.getLastId();\r\n\t}",
"public int getSequenceNumber() {\n return mSequenceGenerator.incrementAndGet();\n }",
"public synchronized long getNextTransactionID(){\n\t\treturn this.id++;\n\t}",
"protected short getCount() \r\n {\r\n // We could move this to the individual implementing classes\r\n // so they have their own count\r\n synchronized(AbstractUUIDGenerator.class) \r\n {\r\n if (counter < 0)\r\n {\r\n counter = 0;\r\n }\r\n return counter++;\r\n }\r\n }",
"public int getCurrentDayOfMonthAsNum() {\n\t\t\t\tint dayOfMonth = Calendar.getInstance().get(Calendar.DAY_OF_MONTH);\n\t\t\t\treturn dayOfMonth;\n\t\t\t}",
"@DISPID(5)\r\n\t// = 0x5. The runtime will prefer the VTID if present\r\n\t@VTID(11)\r\n\tint lastInstanceJobID();",
"public int getLastSavedId() {\n\t\tNativeQuery query = session.createNativeQuery(\"SELECT Id FROM terms ORDER BY Id DESC LIMIT 1\");\n\t\t// int lastUpdatedValue=(int)query;\n\t\tint lastUpdatedValue = ((Number) query.getSingleResult()).intValue();\n\t\tSystem.out.println(\"the result is\" + lastUpdatedValue);\n\t\treturn lastUpdatedValue;\n\t}",
"int getMaxReplicaCount(Type type);",
"public IntegerDt getNumberOfInstancesElement() { \n\t\tif (myNumberOfInstances == null) {\n\t\t\tmyNumberOfInstances = new IntegerDt();\n\t\t}\n\t\treturn myNumberOfInstances;\n\t}",
"public IntegerDt getNumberOfInstancesElement() { \n\t\tif (myNumberOfInstances == null) {\n\t\t\tmyNumberOfInstances = new IntegerDt();\n\t\t}\n\t\treturn myNumberOfInstances;\n\t}",
"io.dstore.values.IntegerValue getCounter();",
"private long generateID() {\n\t\treturn ++lastID;\n\t}",
"public int getCreated() {\n return created;\n }",
"public Integer getLastUpdatorId() {\n return lastUpdatorId;\n }",
"private int save_InsertGetInsertId() {\n\t\t\n\t\tfinal String INSERT_SQL = \"INSERT INTO project__insert_id_tbl ( ) VALUES ( )\";\n\t\t\n\t\t// Use Spring JdbcTemplate so Transactions work properly\n\t\t\n\t\t// How to get the auto-increment primary key for the inserted record\n\t\t\n\t\ttry {\n\t\t\tKeyHolder keyHolder = new GeneratedKeyHolder();\n\t\t\tint rowsUpdated = this.getJdbcTemplate().update(\n\t\t\t\t\tnew PreparedStatementCreator() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic PreparedStatement createPreparedStatement(Connection connection) throws SQLException {\n\n\t\t\t\t\t\t\tPreparedStatement pstmt =\n\t\t\t\t\t\t\t\t\tconnection.prepareStatement( INSERT_SQL, Statement.RETURN_GENERATED_KEYS );\n\n\t\t\t\t\t\t\treturn pstmt;\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tkeyHolder);\n\n\t\t\tNumber insertedKey = keyHolder.getKey();\n\t\t\t\n\t\t\tlong insertedKeyLong = insertedKey.longValue();\n\t\t\t\n\t\t\tif ( insertedKeyLong > Integer.MAX_VALUE ) {\n\t\t\t\tString msg = \"Inserted key is too large, is > Integer.MAX_VALUE. insertedKey: \" + insertedKey;\n\t\t\t\tlog.error( msg );\n\t\t\t\tthrow new LimelightInternalErrorException( msg );\n\t\t\t}\n\t\t\t\n\t\t\tint insertedKeyInt = (int) insertedKeyLong; // Inserted auto-increment primary key for the inserted record\n\t\t\t\n\t\t\treturn insertedKeyInt;\n\t\t\t\n\t\t} catch ( RuntimeException e ) {\n\t\t\tString msg = \"SQL: \" + INSERT_SQL;\n\t\t\tlog.error( msg, e );\n\t\t\tthrow e;\n\t\t}\n\t}",
"public static int getNumberCreated() {\n return numberOfPools;\n }",
"protected long getLastUID() throws Exception {\n\t\tif(psmt != null) {\n\t\t\tResultSet rs = psmt.getGeneratedKeys();\n\t\t\tif(rs.next())\n\t\t\t\treturn rs.getLong(1);\n\t\t}\n\t\treturn -1L;\n\t}",
"@javax.annotation.Nullable\n @ApiModelProperty(value = \"Total number of non-terminated pods targeted by this deployment (their labels match the selector).\")\n\n public Integer getReplicas() {\n return replicas;\n }",
"public int getCounter() {\n return counter;\n }",
"public double getLastCount()\n {\n\n return this.lastCount;\n }",
"public int counter (){\n return currentID;\n }",
"public int getLast() {\n\treturn _last;\n }",
"@javax.annotation.Nullable\n @ApiModelProperty(value = \"currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision.\")\n\n public Integer getCurrentReplicas() {\n return currentReplicas;\n }",
"public int getNext() {\n return value++;\n }",
"public static Integer getTransactionNumber() {\n\t\tRandom r = new Random(System.currentTimeMillis());\n\t\treturn r.nextInt(100000) * 00001;\n\n\t}",
"public int getLastDigitCounter(int lastDigit)\r\n\t{\r\n\t\treturn lastDigitCounters[lastDigit];\r\n\t}",
"public int getCounter() {\r\n return counter;\r\n }",
"@Required\n @Updatable\n public Integer getInstanceCount() {\n return instanceCount;\n }",
"public String getInstanceNumber()\n {\n return m_instanceNumber;\n }",
"@Transactional\n\tpublic String generateJobNumber(CorporateEntity corporateEntity){\n\t\tDocumentNumber docNo = null;\n\t\tString jobNumber = null;\n\n\t\tdocNo = documentNumberDAO.findById(new DocumentNumberPK(corporateEntity.getCorpId(), DocumentNumberDAO.DOMAIN_FLEET_MAINTENANCE)).orElse(null);\t\t\n\t\n\t\tjobNumber = docNo.getPreFix() + String.format(\"%08d\", docNo.getNextNo());\n\t\t\n\t\tdocNo.setNextNo(docNo.getNextNo() + 1);\n\t\tdocNo = documentNumberDAO.saveAndFlush(docNo);\t\n\t\t\n\t\treturn jobNumber;\n\t}",
"public int getGeneratedKey() {\n\n throw new RuntimeException(\"This method is only valid for insert commands\");\n }",
"public String generateReferenceId(){\n String lastSequenceNumber = databaseAccessResource.getLastRequestSequenceNumber();\n //ToDo : write the logic to generate the next sequence number.\n return null;\n }",
"public long lastUpdateSequence() {\n\t\treturn message.getLastUpdateSequence();\n\t}",
"@Override\r\n\tpublic Integer getCurrentInsertID() throws Exception {\n\t\treturn sqlSession.selectOne(namespaceOrder+\".getLastInsertID\");\r\n\t}",
"public double getIncrement() {\n return increment;\n }",
"private long getLastUpdateId() throws SQLException {\n\t\tlong result = 0;\n\t\tResultSet resultset = null;\n\t\tStatement statement = this.connection.createStatement();\n\t\tresultset = statement.executeQuery(\"SELECT LAST_INSERT_ID()\");\n\t\twhile (resultset.next()) {\n\t\t\tresult = resultset.getInt(1);\n\t\t}\n\t\tresultset.close();\n\t\tstatement.close();\n\t\treturn result;\n\t}",
"public int getCounter()\n {\n return counter;\n }",
"public static int getLatestTaskId() {\n\n int id = 0;\n try {\n List<Task> list = Task.listAll(Task.class);\n int size = list.size();\n Task task = list.get(size - 1);\n id = task.getTaskId();\n\n } catch (Exception e) {\n id=0;\n }\n return id;\n\n }",
"private int getNextResNum() {\r\n // Loop through every object in the \"stockList\" object array list.\r\n for (int i = 0; i < stockList.size(); i++) {\r\n // If the \"reservationNumber\" of the beanBag in the \"stockList\"\r\n // is greater than the \"nextReservationNum\" global integer.\r\n if (((BeanBag) stockList.get(i)).getReservationNumber() > nextReservationNum) {\r\n // Set the global integer \"nextReservationNum\" to the value of the current\r\n // Reservation number of the beanBag in the \"stockList\".\r\n nextReservationNum = ((BeanBag) stockList.get(i)).getReservationNumber();\r\n }\r\n }\r\n // Increment the \"nextReservationNum\" integer by 1.\r\n nextReservationNum = nextReservationNum + 1;\r\n // Return the value of the \"nextReservationNum\" integer variable.\r\n return nextReservationNum;\r\n }",
"public Long getCreated() {\n if (created == null) {\n return Long.valueOf(0);\n } else {\n return created;\n }\n }",
"public int getLastProgressivo() {\r\n\t\treturn messageNumber.get();\r\n\t}",
"public String getNumberOfInstances() {\n return numberOfInstances;\n }",
"@Override\n\tpublic String getLastPostingNumber() {\n\t\tString count = userInfoDAO.getLastPostingNumber();\n\t\treturn count;\n\t}",
"private Long createId() {\n return System.currentTimeMillis() % 1000;\n }",
"@DISPID(39)\r\n\t// = 0x27. The runtime will prefer the VTID if present\r\n\t@VTID(38)\r\n\tint lastInstanceJobID();",
"@Override\n\tpublic synchronized long assignNewId(RepositoryModel repository) {\n\t\tJedis jedis = pool.getResource();\n\t\ttry {\n\t\t\tString key = key(repository, KeyType.counter, null);\n\t\t\tString val = jedis.get(key);\n\t\t\tif (isNull(val)) {\n\t\t\t\tlong lastId = 0;\n\t\t\t\tSet<Long> ids = getIds(repository);\n\t\t\t\tfor (long id : ids) {\n\t\t\t\t\tif (id > lastId) {\n\t\t\t\t\t\tlastId = id;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tjedis.set(key, \"\" + lastId);\n\t\t\t}\n\t\t\tlong ticketNumber = jedis.incr(key);\n\t\t\treturn ticketNumber;\n\t\t} catch (JedisException e) {\n\t\t\tlog.error(\"failed to assign new ticket id in Redis @ \" + getUrl(), e);\n\t\t\tpool.returnBrokenResource(jedis);\n\t\t\tjedis = null;\n\t\t} finally {\n\t\t\tif (jedis != null) {\n\t\t\t\tpool.returnResource(jedis);\n\t\t\t}\n\t\t}\n\t\treturn 0L;\n\t}",
"public static long getDayNumber() {\n return getSecondsSinceEpoch() / SECS_TO_DAYS;\n }",
"int getInstanceCount();",
"public int getNewProjectUniqueId() {\r\n\t\treturn lastProjectUniqueID +1;\r\n\t}",
"public int getLatestCreationScriptVersion(String databaseName, String schemaName) {\n return getLatestCreationScript(databaseName, schemaName).getSecond();\n }",
"public int getLastPack() {\n return packs.last().getNumber();\n }",
"Integer getLastDigit() {\n return lastDigit;\n }"
] | [
"0.5566818",
"0.5507838",
"0.55022067",
"0.5375154",
"0.5339838",
"0.53013194",
"0.5291325",
"0.5263758",
"0.5249746",
"0.5237987",
"0.52136683",
"0.52092284",
"0.51994836",
"0.5167597",
"0.51377964",
"0.5122452",
"0.5112817",
"0.5086751",
"0.50810754",
"0.50373375",
"0.5031682",
"0.5000573",
"0.4997616",
"0.4997616",
"0.49742296",
"0.49666432",
"0.49561998",
"0.4945372",
"0.493648",
"0.4933735",
"0.49279103",
"0.4925037",
"0.4888507",
"0.487188",
"0.48641372",
"0.4864084",
"0.48616108",
"0.48609573",
"0.48603234",
"0.48570344",
"0.48514777",
"0.48496655",
"0.48476037",
"0.48413235",
"0.48327395",
"0.48311296",
"0.48103642",
"0.48076534",
"0.48002392",
"0.4796551",
"0.4795791",
"0.47941712",
"0.47934353",
"0.4785466",
"0.47791475",
"0.47783384",
"0.47765583",
"0.47765583",
"0.4776008",
"0.47735074",
"0.47723284",
"0.4765035",
"0.47625536",
"0.47616237",
"0.47541276",
"0.4750336",
"0.47500977",
"0.47467893",
"0.47453415",
"0.47451058",
"0.47407246",
"0.47395393",
"0.47388363",
"0.47374853",
"0.47334397",
"0.47320452",
"0.47317323",
"0.4730694",
"0.47284576",
"0.4723004",
"0.47160387",
"0.47102827",
"0.47082138",
"0.4703346",
"0.46978855",
"0.46972212",
"0.46970883",
"0.46952257",
"0.46910372",
"0.4690148",
"0.46886784",
"0.46881655",
"0.4687026",
"0.4684847",
"0.4683601",
"0.46771482",
"0.46770605",
"0.4675602",
"0.4671754",
"0.46680504"
] | 0.49925557 | 24 |
Start watching the K8S events to see if any related Deployments or Services are being deleted. If found, run a cleanup of the launcher URLs. Note: This is too slow. Events take about 2 minutes to be received. | public void watchAndClean() {
runtimeClient.watchWithWatcher(new Watcher<Event>() {
@Override
public void eventReceived(Action action, Event resource) {
if ((resource.getInvolvedObject().getKind().equals("Deployment") ||
resource.getInvolvedObject().getKind().equals("Service"))
&& resource.getInvolvedObject().getName().startsWith(Constants.BPG_APP_TYPE_LAUNCHER)
&& (action == Action.DELETED || action == Action.MODIFIED)) {
log.info("Received "
+ action.toString() + " event for "
+ resource.getInvolvedObject().getKind() + " "
+ resource.getInvolvedObject().getName());
cleanOrphanDeployments();
cleanOrphanServices();
} else {
log.debug("Received action " + action.toString() + " for resource "
+ resource.getInvolvedObject().getKind() + ":"
+ resource.getInvolvedObject().getName());
}
}
@Override
public void onClose(KubernetesClientException cause) {
log.info("Shutting down Event Watcher...");
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void cleanOrphanServices() {\n log.info(\"Cleaning orphan Services...\");\n List<String> serviceNames = getServices();\n for (String serviceName : serviceNames) {\n if (serviceName.startsWith(Constants.BPG_APP_TYPE_LAUNCHER + \"-\") && !deploymentExists(serviceName)) {\n log.info(\"Cleaning orphan Service [Name] \" + serviceName + \"...\");\n\n unregisterLauncherIfExistsByObjectName(serviceName);\n\n if (!runtimeClient.deleteService(serviceName)) {\n log.error(\"Service deletion failed [Service Name] \" + serviceName);\n }\n }\n }\n }",
"public void cleanOrphanDeployments() {\n log.info(\"Cleaning orphan Deployments...\");\n List<String> deploymentNames = getDeployments();\n for (String deploymentName : deploymentNames) {\n if (deploymentName.startsWith(Constants.BPG_APP_TYPE_LAUNCHER + \"-\") && !serviceExists(deploymentName)) {\n log.info(\"Cleaning orphan Deployment [Name] \" + deploymentName + \"...\");\n\n unregisterLauncherIfExistsByObjectName(deploymentName);\n\n if (!runtimeClient.deleteDeployment(deploymentName)) {\n log.error(\"Deployment deletion failed [Deployment Name] \" + deploymentName);\n }\n }\n }\n }",
"public void testWatchService2 () throws Throwable {\n final Path base = selected.resolve(getName());\n try {\n Files.createDirectory(base);\n try (final WatchService service = fs.newWatchService()) {\n base.register(service, AndroidWatchEventKinds.CREATE);\n base.register(service, AndroidWatchEventKinds.DELETE);\n final Path foo = base.resolve(\"foo\");\n Files.createFile(foo);\n Files.delete(foo);\n final Path bar = base.resolve(\"bar\");\n Files.createFile(bar);\n Files.delete(bar);\n\n final HashMap<WatchEvent.Kind<?>, Integer> expected = new HashMap<>();\n expected.put(AndroidWatchEventKinds.CREATE, 2);\n expected.put(AndroidWatchEventKinds.DELETE, 2);\n do {\n final WatchKey key = service.poll(2, TimeUnit.SECONDS);\n assertNotNull(\"timeout\", key);\n for (final WatchEvent<?> event : key.pollEvents()) {\n Log.i(getName(), event.toString());\n final Integer remaining = expected.get(event.kind());\n assertNotNull(remaining);\n if (remaining > event.count())\n expected.put(event.kind(), remaining - event.count());\n else\n expected.remove(event.kind());\n }\n key.reset();\n } while (!expected.isEmpty());\n }\n }\n finally {\n Files.walkFileTree(base, Utils.DELETE_FILE_VISITOR);\n }\n }",
"public void validateLauncherUrls() {\n log.info(\"Validating the existing launcher URL list for missing deployments...\");\n\n for (String launcherUrl : getTotalLaunchers()) {\n log.info(\"Validating [Launcher URL] \" + launcherUrl + \"...\");\n String objectName = getObjectNameFromLauncherUrl(launcherUrl);\n if (!runtimeClient.deploymentExists(objectName) || !runtimeClient.serviceExists(objectName)) {\n log.info(\"Found an invalid launcher [URL] \" + launcherUrl);\n // Just remove the reference to launcher now\n // cleanOrphan* jobs will clean any orphan deployments\n // desired count check will scale up if free count is reduced\n unregisterLauncherIfExists(launcherUrl);\n }\n }\n }",
"@Async\r\n void processEvents() {\r\n for (;;) {\r\n \r\n // wait for key to be signalled\r\n WatchKey key;\r\n try {\r\n key = watcher.take();\r\n } catch (InterruptedException x) {\r\n log.error(\"interrupted exception: \" + x);\r\n return;\r\n }\r\n\r\n FolderConfig config = keys.get(key);\r\n Path dir = Paths.get(config.getDirectory());\r\n \r\n if (dir == null) {\r\n \r\n continue;\r\n }\r\n\r\n for (WatchEvent<?> event : key.pollEvents()) {\r\n WatchEvent.Kind kind = event.kind();\r\n\r\n // TBD - provide example of how OVERFLOW event is handled\r\n if (kind == OVERFLOW) {\r\n continue;\r\n }\r\n if (kind == StandardWatchEventKinds.ENTRY_CREATE) {\r\n insertIntoSDE(config, event.context().toString());\r\n }\r\n\r\n }\r\n\r\n // reset key and remove from set if directory no longer accessible\r\n boolean valid = key.reset();\r\n if (!valid) {\r\n keys.remove(key);\r\n\r\n // all directories are inaccessible\r\n if (keys.isEmpty()) {\r\n break;\r\n }\r\n }\r\n }\r\n }",
"private static void startCleanUp() {\n\n if (!isEventTrackerRunning) {\n var ttrcker = new EventTrackInfoHandler();\n timer = new Timer(true);\n timer.scheduleAtFixedRate(ttrcker, timerDelayTime, checkInterval);\n debugLogger.info(\"EventTrackInfoHandler begins! : {}\", new Date());\n } else {\n debugLogger.info(\"Timer is still running : {}\", new Date());\n\n }\n }",
"public void testBackgroundCheckStopsService() throws Exception {\n final Parcel data = Parcel.obtain();\n ServiceConnectionHandler conn = new ServiceConnectionHandler(mContext, mServiceIntent,\n WAIT_TIME);\n ServiceConnectionHandler conn2 = new ServiceConnectionHandler(mContext, mService2Intent,\n WAIT_TIME);\n\n ActivityManager am = mContext.getSystemService(ActivityManager.class);\n\n InstrumentationRegistry.getInstrumentation().getUiAutomation().grantRuntimePermission(\n STUB_PACKAGE_NAME, android.Manifest.permission.PACKAGE_USAGE_STATS);\n /*\n Log.d(\"XXXX\", \"Invoke: \" + cmd);\n Log.d(\"XXXX\", \"Result: \" + result);\n Log.d(\"XXXX\", SystemUtil.runShellCommand(getInstrumentation(), \"dumpsys package \"\n + STUB_PACKAGE_NAME));\n */\n\n ApplicationInfo appInfo = mContext.getPackageManager().getApplicationInfo(\n SIMPLE_PACKAGE_NAME, 0);\n\n UidImportanceListener uidServiceListener = new UidImportanceListener(mContext,\n appInfo.uid, ActivityManager.RunningAppProcessInfo.IMPORTANCE_SERVICE, WAIT_TIME);\n uidServiceListener.register();\n UidImportanceListener uidGoneListener = new UidImportanceListener(mContext,\n appInfo.uid, ActivityManager.RunningAppProcessInfo.IMPORTANCE_CACHED, WAIT_TIME);\n uidGoneListener.register();\n\n WatchUidRunner uidWatcher = new WatchUidRunner(getInstrumentation(), appInfo.uid,\n WAIT_TIME);\n\n // First kill the process to start out in a stable state.\n mContext.stopService(mServiceIntent);\n mContext.stopService(mService2Intent);\n conn.bind();\n conn2.bind();\n IBinder service = conn.getServiceIBinder();\n IBinder service2 = conn2.getServiceIBinder();\n conn.unbind();\n conn2.unbind();\n try {\n service.transact(IBinder.FIRST_CALL_TRANSACTION, data, null, 0);\n } catch (RemoteException e) {\n }\n try {\n service2.transact(IBinder.FIRST_CALL_TRANSACTION, data, null, 0);\n } catch (RemoteException e) {\n }\n service = service2 = null;\n\n // Wait for uid's process to go away.\n uidGoneListener.waitForValue(ActivityManager.RunningAppProcessInfo.IMPORTANCE_GONE,\n ActivityManager.RunningAppProcessInfo.IMPORTANCE_GONE);\n assertEquals(ActivityManager.RunningAppProcessInfo.IMPORTANCE_GONE,\n am.getPackageImportance(SIMPLE_PACKAGE_NAME));\n\n // And wait for the uid report to be gone.\n uidWatcher.waitFor(WatchUidRunner.CMD_GONE, null, WAIT_TIME);\n\n String cmd = \"appops set \" + SIMPLE_PACKAGE_NAME + \" RUN_IN_BACKGROUND deny\";\n String result = SystemUtil.runShellCommand(getInstrumentation(), cmd);\n\n // This is a side-effect of the app op command.\n uidWatcher.expect(WatchUidRunner.CMD_IDLE, null);\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_NONEXISTENT);\n\n // We don't want to wait for the uid to actually go idle, we can force it now.\n cmd = \"am make-uid-idle \" + SIMPLE_PACKAGE_NAME;\n result = SystemUtil.runShellCommand(getInstrumentation(), cmd);\n\n // Make sure app is not yet on whitelist\n cmd = \"cmd deviceidle whitelist -\" + SIMPLE_PACKAGE_NAME;\n result = SystemUtil.runShellCommand(getInstrumentation(), cmd);\n\n // We will use this to monitor when the service is running.\n conn.startMonitoring();\n\n try {\n // Try starting the service. Should fail!\n boolean failed = false;\n try {\n mContext.startService(mServiceIntent);\n } catch (IllegalStateException e) {\n failed = true;\n }\n if (!failed) {\n fail(\"Service was allowed to start while in the background\");\n }\n\n // First poke the process into the foreground, so we can avoid background check.\n conn2.bind();\n conn2.waitForConnect();\n\n // Wait for process state to reflect running service.\n uidServiceListener.waitForValue(\n ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND_SERVICE,\n ActivityManager.RunningAppProcessInfo.IMPORTANCE_PERCEPTIBLE);\n assertEquals(ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND_SERVICE,\n am.getPackageImportance(SIMPLE_PACKAGE_NAME));\n\n // Also make sure the uid state reports are as expected.\n uidWatcher.waitFor(WatchUidRunner.CMD_ACTIVE, null);\n uidWatcher.waitFor(WatchUidRunner.CMD_UNCACHED, null);\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_FG_SERVICE);\n\n conn2.unbind();\n\n // Wait for process to recover back down to being cached.\n uidServiceListener.waitForValue(ActivityManager.RunningAppProcessInfo.IMPORTANCE_CACHED,\n ActivityManager.RunningAppProcessInfo.IMPORTANCE_GONE);\n assertEquals(ActivityManager.RunningAppProcessInfo.IMPORTANCE_CACHED,\n am.getPackageImportance(SIMPLE_PACKAGE_NAME));\n\n uidWatcher.waitFor(WatchUidRunner.CMD_CACHED, null);\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_CACHED_EMPTY);\n\n // Try starting the service now that the app is waiting to idle... should work!\n mContext.startService(mServiceIntent);\n conn.waitForConnect();\n\n uidWatcher.waitFor(WatchUidRunner.CMD_UNCACHED, null);\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_SERVICE);\n\n // And also start the second service.\n conn2.startMonitoring();\n mContext.startService(mService2Intent);\n conn2.waitForConnect();\n\n // Force app to go idle now\n cmd = \"am make-uid-idle \" + SIMPLE_PACKAGE_NAME;\n result = SystemUtil.runShellCommand(getInstrumentation(), cmd);\n\n // Wait for services to be stopped by system.\n uidServiceListener.waitForValue(ActivityManager.RunningAppProcessInfo.IMPORTANCE_CACHED,\n ActivityManager.RunningAppProcessInfo.IMPORTANCE_GONE);\n assertEquals(ActivityManager.RunningAppProcessInfo.IMPORTANCE_CACHED,\n am.getPackageImportance(SIMPLE_PACKAGE_NAME));\n\n // And service should be stopped by system, so just make sure it is disconnected.\n conn.waitForDisconnect();\n conn2.waitForDisconnect();\n\n uidWatcher.expect(WatchUidRunner.CMD_IDLE, null);\n // There may be a transient 'SVC' proc state here.\n uidWatcher.waitFor(WatchUidRunner.CMD_CACHED, null);\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_CACHED_EMPTY);\n\n } finally {\n mContext.stopService(mServiceIntent);\n mContext.stopService(mService2Intent);\n conn.cleanup();\n conn2.cleanup();\n\n uidWatcher.finish();\n\n cmd = \"appops set \" + SIMPLE_PACKAGE_NAME + \" RUN_IN_BACKGROUND allow\";\n result = SystemUtil.runShellCommand(getInstrumentation(), cmd);\n cmd = \"cmd deviceidle whitelist -\" + SIMPLE_PACKAGE_NAME;\n result = SystemUtil.runShellCommand(getInstrumentation(), cmd);\n\n uidGoneListener.unregister();\n uidServiceListener.unregister();\n\n data.recycle();\n }\n }",
"@Test\n @Timeout(value = 30)\n public void testRemoveNodeCreatedWatches() throws Exception {\n List<EventType> expectedEvents = new ArrayList<>();\n expectedEvents.add(EventType.DataWatchRemoved);\n MyWatcher myWatcher1 = new MyWatcher(\"/testnode1\", expectedEvents, 1);\n MyWatcher myWatcher2 = new MyWatcher(\"/testnode1/testnode2\", expectedEvents, 1);\n // Adding pre-created watcher\n LOG.info(\"Adding NodeCreated watcher\");\n zk.exists(\"/testnode1\", myWatcher1);\n zk.exists(\"/testnode1/testnode2\", myWatcher2);\n\n String cmdstring1 = \"removewatches /testnode1 -d\";\n LOG.info(\"Remove watchers using shell command : {}\", cmdstring1);\n zkMain.cl.parseCommand(cmdstring1);\n assertTrue(zkMain.processZKCmd(zkMain.cl), \"Removewatches cmd fails to remove pre-create watches\");\n myWatcher1.matches();\n assertEquals(1, zk.getExistWatches().size(), \"Failed to remove pre-create watches :\" + zk.getExistWatches());\n assertTrue(zk.getExistWatches().contains(\"/testnode1/testnode2\"), \"Failed to remove pre-create watches :\" + zk.getExistWatches());\n\n String cmdstring2 = \"removewatches /testnode1/testnode2 -d\";\n LOG.info(\"Remove watchers using shell command : {}\", cmdstring2);\n zkMain.cl.parseCommand(cmdstring2);\n assertTrue(zkMain.processZKCmd(zkMain.cl), \"Removewatches cmd fails to remove data watches\");\n\n myWatcher2.matches();\n assertEquals(0, zk.getExistWatches().size(), \"Failed to remove pre-create watches : \" + zk.getExistWatches());\n }",
"@Test\n @Timeout(value = 30)\n public void testRemoveNodeDeletedWatches() throws Exception {\n LOG.info(\"Adding NodeDeleted watcher\");\n List<EventType> expectedEvents = new ArrayList<>();\n expectedEvents.add(EventType.ChildWatchRemoved);\n expectedEvents.add(EventType.NodeDeleted);\n MyWatcher myWatcher = new MyWatcher(\"/testnode1\", expectedEvents, 1);\n\n zk.create(\"/testnode1\", \"data\".getBytes(), Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);\n zk.create(\"/testnode1/testnode2\", \"data\".getBytes(), Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);\n zk.getChildren(\"/testnode1/testnode2\", myWatcher);\n zk.getChildren(\"/testnode1\", myWatcher);\n\n String cmdstring = \"removewatches /testnode1 -c\";\n LOG.info(\"Remove watchers using shell command : {}\", cmdstring);\n zkMain.cl.parseCommand(cmdstring);\n assertTrue(zkMain.processZKCmd(zkMain.cl), \"Removewatches cmd fails to remove child watches\");\n LOG.info(\"Waiting for the ChildWatchRemoved event\");\n myWatcher.matches();\n assertEquals(1, zk.getChildWatches().size(), \"Failed to remove child watches : \" + zk.getChildWatches());\n\n assertTrue(zk.getChildWatches().contains(\"/testnode1/testnode2\"), \"Failed to remove child watches :\" + zk.getChildWatches());\n\n // verify node delete watcher\n zk.delete(\"/testnode1/testnode2\", -1);\n myWatcher.matches();\n }",
"protected void applyPendingDeletes ()\n {\n while (!m_aDeleteStack.isEmpty ())\n removeMonitoredFile (m_aDeleteStack.pop ());\n }",
"public static void onPauseCleanUp() {\n for(PrioritizedReactiveTask task: activeTasks) {\n task.stopTask();\n }\n }",
"public void stop() {\n executor.shutdownNow();\n\n Collection<NodeRegistrationContext> allRegistrations = nodeRegistrations.values();\n for (NodeRegistrationContext registration : allRegistrations) {\n sendUnregistrationEvent(registration.resolvedDeployment);\n }\n }",
"@After\n\tpublic void setupClean() {\n\n\t\tString server = serverRequirement.getConfig().getName();\n\t\tif (FuseServerManipulator.isServerStarted(server)) {\n\t\t\tFuseServerManipulator.stopServer(server);\n\t\t}\n\t\tnew ProjectExplorer().deleteAllProjects();\n\t}",
"public static void shutdown() {\n resetCache();\n listeningForChanges = false;\n }",
"public void processEvents() {\n while (watchEnabled) {\n\n // wait for key to be signaled\n\t\t\t WatchKey key;\n\t\t\t// just info\n\t\t\tstartWatching();\n try {\n\t\t\t\tkey = watcherService.take();\n\t\t\t//\tLOG.debug(\"Watcher start take() key and sleep 20s: \" + key);\n\t\t\t// delay action for 20 seconds to let more time to change \n\t\t\t\tTimeUnit.MILLISECONDS.sleep(20000);\n } catch (InterruptedException ex) {\n\t\t\t\tLOG.debug(\"ProcessEvents watchEnabled InterruptedException: {}\", ex);\n continue;\n } catch (ClosedWatchServiceException ex) {\n LOG.info(\"Watch service closed, terminating.\");\n LOG.trace(\"Watcher ProcessEvents Exception:\", ex);\n watchEnabled = false;\n break;\n }\n\n Path dir = keys.get(key);\n\t\t\tLOG.debug(\"Watcher : \" + dir);\n if (dir == null) {\n LOG.warn(\"WatchKey not recognized!!\");\n continue;\n }\n\t\t\t\n for (WatchEvent<?> event : key.pollEvents()) {\n @SuppressWarnings(\"rawtypes\")\n WatchEvent.Kind kind = event.kind();\n\n // TBD - provide example of how OVERFLOW event is handled\n if (kind == StandardWatchEventKind.OVERFLOW) {\n LOG.info(\"Too many watched events!\");\n continue;\n }\n\n // Context for directory entry event is the file name of entry\n WatchEvent<Path> ev = cast(event);\n Path name = ev.context();\n Path child = dir.resolve(name);\n\n // print out event\n LOG.info(\"{}: {} \", event.kind().name(), child); // runningCount.incrementAndGet());\n\t\t\t\t\n }\n\t\t\t\n // reset key and remove from set if directory no longer accessible\n\t\t\tboolean valid = key.reset();\n\t\t\tLOG.debug(\"Watcher reset key.\");\n if (!valid) {\n keys.remove(key);\n\n // all directories are inaccessible\n if (keys.isEmpty()) {\n\t\t\t\t\tLOG.debug(\"Watcher keys.isEmpty()\");\n break;\n }\n }\n\t\t\t// now stop watcher to exit loop and treat what is modified\n\t\t\t stopWatching();\n }\n }",
"private void listenForNotificationEvents() {\n\t\twhile (!shutdownRequested) {\n\t\t\ttry {\n\t\t\t\tNotificationJob job = notificationQueue.poll( 1000, TimeUnit.MILLISECONDS );\n\t\t\t\t\n\t\t\t\tif (job != null) {\n\t\t\t\t\tprocessNotificationJob( job );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// Ignore and continue looping until shutdown requested\n\t\t\t}\n\t\t}\n\t}",
"public void startWithoutChecks() {\n service.enableMonitoring();\n for (ServiceNotifier serviceNotifier : serviceNotifiers) {\n serviceNotifier.onStart();\n }\n }",
"private void processEvents() {\n\t\twhile (true) {\n\t\t\tWatchKey key;\n\t\t\ttry {\n\t\t\t\tkey = watcher.take(); // wait for key to be signaled\n\t\t\t} catch (InterruptedException x) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tPath dir = keys.get(key);\n\t\t\tif (dir == null)\n\t\t\t\tcontinue;\n\n\t\t\tfor (WatchEvent<?> event : key.pollEvents()) {\n\t\t\t\t@SuppressWarnings(\"rawtypes\") WatchEvent.Kind kind = event.kind();\n\t\t\t\tif (kind == OVERFLOW) // ? How should OVERFLOW event be handled\n\t\t\t\t\tcontinue;\n\t\t\t\t// Context for directory entry event is the file name of entry\n\t\t\t\tWatchEvent<Path> ev = cast(event);\n\t\t\t\tPath name = ev.context();\n\t\t\t\tPath child = dir.resolve(name);\n\n\t\t\t\tDirectoryWatchEventListener listener = null;\n\t\t\t\tPath root = null;\n\t\t\t\tfor (Entry<Path, DirectoryWatchEventListener> e : listeners.entrySet()) {\n\t\t\t\t\tPath p = e.getKey();\n\t\t\t\t\tif (child.startsWith(p) || (child.compareTo(p) == 0)) {\n\t\t\t\t\t\tlistener = e.getValue();\n\t\t\t\t\t\troot = p;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (listener != null) {\n\t\t\t\t\tif (kind == ENTRY_MODIFY) {\n\t\t\t\t\t\tif (child.getFileName().toString().equals(\".DS_Store\"))\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\tlistener.onWatchEvent(root, null, child, DirectoryWatchEventListener.FileChangeType.eModified);\n\t\t\t\t\t}\n\t\t\t\t\telse if (kind == ENTRY_CREATE) {\n\t\t\t\t\t\tlistener.onWatchEvent(root, null, child, DirectoryWatchEventListener.FileChangeType.eCreated);\n\t\t\t\t\t}\n\t\t\t\t\telse if (kind == ENTRY_DELETE) {\n\t\t\t\t\t\tlistener.onWatchEvent(root, null, child, DirectoryWatchEventListener.FileChangeType.eDeleted);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if directory is created, and watching recursively, then register it and its sub-directories\n\t\t\t\tif (kind == ENTRY_CREATE) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (Files.isDirectory(child, NOFOLLOW_LINKS))\n\t\t\t\t\t\t\tregisterAll(child);\n\t\t\t\t\t} catch (IOException x) {\n\t\t\t\t\t\t// ignore to keep sample readable\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// reset key and remove from set if directory no longer accessible\n\t\t\tboolean valid = key.reset();\n\t\t\tif (!valid) {\n\t\t\t\tPath p = keys.remove(key);\n\t\t\t\tlisteners.remove(p);\n\t\t\t\t// all directories are inaccessible\n\t\t\t\tif (keys.isEmpty())\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void onDestroy() {\n\t \tIntent service = new Intent(Intent.ACTION_RUN);\n\t \tservice.putExtra(\"flags\",PushService.FLAGS_START);\n\t \tservice.setClass(this, PushService.class); \n\t \tstartService(service);\n\t\tsuper.onDestroy();\n\t}",
"private void startBackgroundCleanup(Ignite grid, final Cache<CleanupNodeId, UUID> metaCache,\n final String dataCacheName, final Map<String, EntryProcessorResult<Long>> currentVersions) {\n if (cleanupFlags.containsKey(dataCacheName))\n return; // Current node already performs cleanup.\n\n if (!trySetGlobalCleanupFlag(grid, metaCache))\n return;\n\n cleanupFlags.put(dataCacheName, true);\n\n final ClusterGroup dataNodes = grid.cluster().forDataNodes(dataCacheName);\n\n IgniteInternalFuture<?> f = ((IgniteEx)grid).context().closure().runAsync(\n BROADCAST,\n new RemoveOldEntriesRunnable(dataCacheName, currentVersions),\n options(dataNodes.nodes())\n );\n\n f.listen(new CleanupCompletionListener(metaCache, dataCacheName));\n }",
"@Test\n @Timeout(value = 30)\n public void testRemoveWatchesWithNoPassedOptions() throws Exception {\n List<EventType> expectedEvents = new ArrayList<>();\n expectedEvents.add(EventType.ChildWatchRemoved);\n expectedEvents.add(EventType.DataWatchRemoved);\n MyWatcher myWatcher = new MyWatcher(\"/testnode1\", expectedEvents, 2);\n\n zk.create(\"/testnode1\", \"data\".getBytes(), Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);\n zk.create(\"/testnode2\", \"data\".getBytes(), Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);\n\n LOG.info(\"Adding childwatcher to /testnode1 and /testnode2\");\n zk.getChildren(\"/testnode1\", myWatcher);\n zk.getChildren(\"/testnode2\", myWatcher);\n\n LOG.info(\"Adding datawatcher to /testnode1 and /testnode2\");\n zk.getData(\"/testnode1\", myWatcher, null);\n zk.getData(\"/testnode2\", myWatcher, null);\n\n String cmdstring = \"removewatches /testnode1\";\n LOG.info(\"Remove watchers using shell command : {}\", cmdstring);\n zkMain.cl.parseCommand(cmdstring);\n assertTrue(zkMain.processZKCmd(zkMain.cl), \"Removewatches cmd fails to remove child watches\");\n LOG.info(\"Waiting for the DataWatchRemoved event\");\n myWatcher.matches();\n\n // verifying that other path child watches are not affected\n assertTrue(zk.getChildWatches().contains(\"/testnode2\"), \"Failed to find child watches for the path testnode2\");\n assertTrue(zk.getDataWatches().contains(\"/testnode2\"), \"Failed to find data watches for the path testnode2\");\n }",
"@Override\n public void run() {\n Log.d(\"Final\", devices.toString());\n client.stopDiscovery();\n }",
"private synchronized void performHouseKeeping() {\r\n\t\tSet<Map.Entry<Integer,QueueManager>> eS = queueManagers.entrySet();\r\n\t\tfor( Iterator<Map.Entry<Integer,QueueManager>> i = eS.iterator(); i.hasNext(); ) {\r\n\t\t\tMap.Entry<Integer,QueueManager> qMME = i.next();\r\n\t\t\tQueueManager qM = qMME.getValue();\r\n\t\t\tif( qM.houseKeepingAndTestForDelete() ) {\r\n\t\t\t\ti.remove();\r\n\t\t\t\tLOGGER.debug(\"Removed QueueManager with magic number \"+qM.getMagicNumber()+\" due to inactivity\");\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void pollAllWatchersOfThisTile() {\n/* 1287 */ for (VirtualZone vz : getWatchers()) {\n/* */ \n/* */ \n/* */ try {\n/* 1291 */ if (vz.getWatcher() instanceof Player)\n/* */ {\n/* 1293 */ if (!vz.getWatcher().hasLink())\n/* */ {\n/* */ \n/* */ \n/* 1297 */ removeWatcher(vz);\n/* */ }\n/* */ }\n/* */ }\n/* 1301 */ catch (Exception e) {\n/* */ \n/* 1303 */ logger.log(Level.WARNING, e.getMessage(), e);\n/* */ } \n/* */ } \n/* */ }",
"public void cleanupLogs() {\n logger.debug(\"Beginning log cleanup...\");\n int total = 0;\n long startMs = time.milliseconds();\n for (Log log : allLogs()) {\n if (log.config.dedupe)\n continue;\n\n logger.debug(\"Garbage collecting '{}'\", log.name());\n total += cleanupExpiredSegments(log) + cleanupSegmentsToMaintainSize(log);\n }\n logger.debug(\"Log cleanup completed. \" + total + \" files deleted in \" + (time.milliseconds() - startMs) / 1000 + \" seconds\");\n }",
"private void addAllDeploymentsAsFreeLaunchers() {\n List<String> deployments = getDeployments();\n log.info(\"Found \" + deployments.size() + \" deployments to be added\");\n for (String deployment : deployments) {\n if (runtimeClient.serviceExists(deployment)) {\n addFreeLauncher(deployment);\n } else {\n log.info(\"Deployment \" + deployment + \" doesn't have a Service that exposes it. Not adding as a launcher...\");\n }\n }\n }",
"public synchronized final void deleteWidgetWatchers() {\n _watchers.removeAllElements();\n }",
"public void test50StartAndStop() throws Exception {\n rm(installation.config(\"opensearch.keystore\"));\n\n try {\n startOpenSearch();\n } catch (Exception e) {\n if (Files.exists(installation.home.resolve(\"opensearch.pid\"))) {\n String pid = FileUtils.slurp(installation.home.resolve(\"opensearch.pid\")).trim();\n logger.info(\"Dumping jstack of opensearch processb ({}) that failed to start\", pid);\n sh.runIgnoreExitCode(\"jstack \" + pid);\n }\n throw e;\n }\n\n List<Path> gcLogs = FileUtils.lsGlob(installation.logs, \"gc.log*\");\n assertThat(gcLogs, is(not(empty())));\n ServerUtils.runOpenSearchTests();\n\n stopOpenSearch();\n }",
"@Test\n @Timeout(value = 30)\n public void testRemoveNodeDataChangedWatches() throws Exception {\n LOG.info(\"Adding data watcher using getData()\");\n List<EventType> expectedEvents = new ArrayList<>();\n expectedEvents.add(EventType.DataWatchRemoved);\n MyWatcher myWatcher = new MyWatcher(\"/testnode1\", expectedEvents, 1);\n\n zk.create(\"/testnode1\", \"data\".getBytes(), Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);\n zk.getData(\"/testnode1\", myWatcher, null);\n\n String cmdstring = \"removewatches /testnode1 -d\";\n LOG.info(\"Remove watchers using shell command : {}\", cmdstring);\n zkMain.cl.parseCommand(cmdstring);\n assertTrue(zkMain.processZKCmd(zkMain.cl), \"Removewatches cmd fails to remove data watches\");\n\n LOG.info(\"Waiting for the DataWatchRemoved event\");\n myWatcher.matches();\n\n // verifying that other path data watches are removed\n assertEquals(0, zk.getDataWatches().size(), \"Data watches are not removed : \" + zk.getDataWatches());\n }",
"private void doCleanup() {\n Log.INFO(\"Final cleanup\");\n try { // return to full-cluster-running state\n restartNode(); \n } catch (HoneycombTestException e) {\n Log.ERROR(\"Final cleanup failed: \" + e);\n }\n }",
"private void expungeAllWatchListsFiles()\r\n {\r\n debug(\"expungeAllWatchListsFiles() - Delete ALL WATCHLIST Files\");\r\n\r\n java.io.File fileList = new java.io.File(\"./\");\r\n String rootName = getString(\"WatchListTableModule.edit.watch_list_basic_name\");\r\n String[] list = fileList.list(new MyFilter(rootName));\r\n for (int i = 0; i < list.length; i++)\r\n {\r\n StockMarketUtils.expungeListsFile(list[i]);\r\n }\r\n\r\n debug(\"expungeAllWatchListsFiles() - Delete ALL WATCHLIST Files - Complete\");\r\n }",
"public void run() {\n Launcher.destroyAll();\n }",
"void shutdown() {\n if (metricRegistry != null) {\n for (String metricName : gaugeMetricNames) {\n try {\n metricRegistry.remove(metricName);\n } catch (RuntimeException e) {\n // ignore\n }\n }\n }\n }",
"public static int startAllServices() throws Throwable {\n\t\tint numServicesStarted = 0;\n\t\t\n\t\tlog.info(\"!!! Attempting to start API Service !!!\");\n\t\t//System.out.println(\"!!! Attempting to start API Service !!!\"); \n\t\tif (startApiService()) {\n\t\t\tnumServicesStarted++;\n\t\t}\n\t\tlog.info(\"!!! Attempting to start Inventory Service !!!\");\n\t\t//System.out.println(\"!!! Attempting to start Inventory Service !!!\");\n\t\tif (startInventoryService()) {\n\t\t\tnumServicesStarted++;\n\t\t}\n\t\tlog.info(\"!!! Attempting to start Insurance Service !!!\");\n\t\t//System.out.println(\"!!! Attempting to start Insurance Service !!!\");\n\t\tif (startInsuranceService()) {\n\t\t\tnumServicesStarted++;\n\t\t}\n\t\tlog.info(\"!!! Attempting to start Enquiry Service !!!\");\n\t\t//System.out.println(\"!!! Attempting to start Enquiry Service !!!\");\n\t\tif (startEnquiryService()) {\n\t\t\tnumServicesStarted++;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t Runtime.getRuntime().addShutdownHook(new Thread() \n\t\t\t { \n\t\t\t public void run() \n\t\t\t { \n\t\t\t \ttry {\n\t\t\t \t\tlog.info(\"!!! Services Shutdown Hook is running !!!\");\n\t\t\t \t\t//System.out.println(\"!!! Services Shutdown Hook is running !!!\"); \n\t\t\t\t int servicesStopped = ServiceFactory.stopAllServices();\n\t\t\t\t log.info(\"!!! A total of \" + servicesStopped + \" services were shutdown !!!\");\n\t\t\t\t //System.out.println(\"!!! A total of \" + servicesStopped + \" services were shutdown !!!\"); \n\t\t\t \t} catch (Throwable ex) {\n\t\t\t \t\tex.printStackTrace();\n\t\t\t \t}\n\t\t\t } \n\t\t\t }); \n\t\t\t \n\t\t} catch (Throwable ex) {\n\t\t\tlog.error(\"!!! Error on Services Shutdown !!! : \" + ex.getMessage(), ex);\n\t\t\t//System.out.println(\"!!! Error on Services Shutdown !!! : \" + ex.getMessage());\n\t\t\t//ex.printStackTrace();\n\t\t}\n\n\t\treturn numServicesStarted;\n\t}",
"private void cleanUpRunningProcessInstances() {\n List<ProcessInstance> runningInstances = processEngine.getRuntimeService().createProcessInstanceQuery().processDefinitionKey(PROCESS_DEFINITION_KEY).list();\n runningInstances.addAll(processEngine.getRuntimeService().createProcessInstanceQuery().processDefinitionKey(INCIDENT_PROCESS_DEFINITION).list());\n for (ProcessInstance processInstance : runningInstances) {\n processEngine.getRuntimeService().deleteProcessInstance(processInstance.getId(), \"deleted to have a clean environment for Arquillian\");\n }\n }",
"private void shutdownWatchListTimers()\r\n {\r\n debug(\"shutdownWatchListTimers() all timers\");\r\n // Null our our parser, It is not needed now.\r\n if (populateListVector == null)\r\n {\r\n return;\r\n }\r\n // Stop All of our timers.\r\n for (int i = 0; i < populateListVector.size(); i++)\r\n {\r\n PopulateWatchListTask task = (PopulateWatchListTask) populateListVector.elementAt(i);\r\n task.cancel();\r\n this.setStatusBar(\"WatchList [\" + tabPane.getTitleAt(i) + \"] - Stopped.\");\r\n debug(\"WatchList [\" + tabPane.getTitleAt(i) + \"] - Stopped.\");\r\n }\r\n // Clear all objects from the Timer List\r\n populateListVector.removeAllElements();\r\n populateListVector = null;\r\n // Signal the Garbage Collector to reclaim anything it may see neccessary\r\n System.gc();\r\n debug(\"shutdownWatchListTimers() all timers - complete\");\r\n }",
"@Test\n @Timeout(value = 30)\n public void testRemoveWatchesLocallyWhenNoServerConnection() throws Exception {\n verifyRemoveAnyWatches(true);\n }",
"@PreDestroy\n public void preDestroy() {\n scheduledFuture.cancel(true);\n execService.shutdown();\n }",
"public void cleanShutDown () {\n shutdown = true;\n }",
"public void processEvents() {\n\t\tfor (;;) {\n\n\t\t\t// wait for key to be signalled\n\t\t\tWatchKey key;\n\t\t\ttry {\n\t\t\t\tkey = watcher.take();\n\t\t\t} catch (InterruptedException x) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tPath dir = keys.get(key);\n\t\t\tif (dir == null) {\n\t\t\t\tSystem.err.println(\"WatchKey not recognized!!\");\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tfor (WatchEvent<?> event : key.pollEvents()) {\n\t\t\t\tKind<?> kind = event.kind();\n\n\t\t\t\t// TBD - provide example of how OVERFLOW event is handled\n\t\t\t\tif (kind == OVERFLOW) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Context for directory entry event is the file name of entry\n\t\t\t\tWatchEvent<Path> ev = cast(event);\n\t\t\t\tPath name = ev.context();\n\t\t\t\tPath child = dir.resolve(name);\n\n\t\t\t\t// print out event\n\t\t\t\tif (logger.isDebugEnabled()) {\n\t\t\t\t\t// logger.debug(String.format(\"%s: %s\\n\", event.kind().name(), child));\n\t\t\t\t}\n\t\t\t\tonFileChanged(ev, child);\n\n\t\t\t\t// if directory is created, and watching recursively, then\n\t\t\t\t// register it and its sub-directories\n\t\t\t\tif (recursive && (kind == ENTRY_CREATE)) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (Files.isDirectory(child, NOFOLLOW_LINKS)) {\n\t\t\t\t\t\t\tregisterAll(child);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (IOException x) {\n\t\t\t\t\t\t// ignore to keep sample readbale\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// reset key and remove from set if directory no longer accessible\n\t\t\tboolean valid = key.reset();\n\t\t\tif (!valid) {\n\t\t\t\tkeys.remove(key);\n\n\t\t\t\t// all directories are inaccessible\n\t\t\t\tif (keys.isEmpty()) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void cleanup() {\n endtracking();\n\n //sends data to UI\n MainActivity.trackingservicerunning = false;\n MainActivity.servicestopped();\n\n //stops\n stopSelf();\n }",
"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}",
"@AfterEach\n public void after() {\n launcher.dispose();\n }",
"@Override\n public void onApplicationEvent(final ApplicationReadyEvent event) {\n if (environment.equalsIgnoreCase(\"PROD\")) {\n logger.info(\"Application event start up\");\n\n List<UpdateFile> clientFileList = getClientFileList();\n ResponseEntity<UpdateFilesRQ> updateFileResponse = fileUpdaterRequestSender.getServerFileList();\n\n rSyncFileUpdaterProvider\n .setRemoteMainFolder(Objects.requireNonNull(updateFileResponse.getBody()).getMainFolder())\n .processComparing(updateFileResponse.getBody().getUpdateFile(), clientFileList);\n\n fileSystemWatcher.start();\n logger.info(\"Started fileSystemWatcher service\");\n\n filePoolerServerListener.initiateSynchronizeTime();\n filePoolerServerListener.triggerPoolerService();\n logger.info(\"Triggered filePoolerServerListener service\");\n }\n }",
"public void stop()\n throws Exception\n {\n for(int i = 0; i < this.monitoredObjectsCache.size(); i++) {\n \n ObjectName target = null;\n \n try {\n target = (ObjectName) this.monitoredObjectsCache.get(i);\n \n this.server.removeNotificationListener(target, listener);\n \n if (log.isDebugEnabled())\n log.debug(\"Unsubscribed from \\\"\" + target + \"\\\"\");\n }\n catch(Exception e) {\n log.error(\"Unsubscribing from \\\"\" + target + \"\\\"\", e);\n }\n }\n }",
"public void shutdown() {\n logger.debug(\"Shutting down.\");\n try {\n // stop the cleaner first\n if (cleaner != null)\n Utils.swallow(new Runnable() {\n @Override\n public void run() {\n cleaner.shutdown();\n }\n });\n // flush the logs to ensure latest possible recovery point\n Utils.foreach(allLogs(), new Callable1<Log>() {\n @Override\n public void apply(Log _) {\n _.flush();\n }\n });\n // close the logs\n Utils.foreach(allLogs(), new Callable1<Log>() {\n @Override\n public void apply(Log _) {\n _.close();\n }\n });\n // update the last flush point\n checkpointRecoveryPointOffsets();\n // mark that the shutdown was clean by creating the clean shutdown marker file\n Utils.foreach(logDirs, new Callable1<File>() {\n @Override\n public void apply(final File dir) {\n Utils.swallow(new Runnable() {\n @Override\n public void run() {\n try {\n new File(dir, Logs.CleanShutdownFile).createNewFile();\n } catch (IOException e) {\n throw new KafkaException(e);\n }\n }\n });\n }\n });\n } finally {\n // regardless of whether the close succeeded, we need to unlock the data directories\n Utils.foreach(dirLocks, new Callable1<FileLock>() {\n @Override\n public void apply(FileLock _) {\n _.destroy();\n }\n });\n }\n\n logger.debug(\"Shutdown complete.\");\n }",
"@Override\n public <L> void resourcesRemoved(InventoryEvent<L> event) {\n List<Resource<L>> removedResources = event.getPayload();\n for (Resource<L> removedResource : removedResources) {\n if (removedResource.getParent() == null) {\n try {\n log.debugf(\"Removing root resource: %s\", removedResource);\n\n MonitoredEndpoint<EndpointConfiguration> endpoint = event.getSamplingService()\n .getMonitoredEndpoint();\n String endpointTenantId = endpoint.getEndpointConfiguration().getTenantId();\n String tenantIdToUse = (endpointTenantId != null) ? endpointTenantId : config.getTenantId();\n\n // The final URL should be in the form: entity/<resource_canonical_path>\n // for example: entity/t;hawkular/f;myfeed/r;resource_id\n\n CanonicalPath resourceCanonicalPath = CanonicalPath.of()\n .tenant(tenantIdToUse)\n .feed(feedId)\n .resource(removedResource.getID().getIDString())\n .get();\n\n StringBuilder deleteUrl = Util.getContextUrlString(config.getUrl(), config.getInventoryContext());\n deleteUrl.append(\"entity\")\n .append(resourceCanonicalPath.toString());\n\n Request request = httpClientBuilder.buildJsonDeleteRequest(deleteUrl.toString(),\n getTenantHeader(tenantIdToUse));\n\n long start = System.currentTimeMillis(); // we don't store this time in our diagnostics\n Response response = httpClientBuilder.getHttpClient().newCall(request).execute();\n\n try {\n final long duration = System.currentTimeMillis() - start;\n\n if (response.code() != 204 && response.code() != 404) {\n // 204 means successfully deleted, 404 means it didn't exist in the first place.\n // In either case, the resource no longer exists which is what we want;\n // any other response code means it is an error and we didn't remove the resource.\n throw new Exception(\"status-code=[\" + response.code() + \"], reason=[\"\n + response.message() + \"], url=[\" + request.urlString() + \"]\");\n }\n\n log.debugf(\"Took [%d]ms to remove root resource [%s]\", duration, removedResource);\n } finally {\n response.body().close();\n }\n } catch (InterruptedException ie) {\n log.errorFailedToStoreInventoryData(ie);\n Thread.currentThread().interrupt(); // preserve interrupt\n } catch (Exception e) {\n log.errorFailedToStoreInventoryData(e);\n diagnostics.getStorageErrorRate().mark(1);\n }\n\n }\n }\n return;\n }",
"private boolean deleteLauncher(String deploymentName) {\n unregisterLauncherIfExistsByObjectName(deploymentName);\n\n boolean svcDeleted = runtimeClient.deleteService(deploymentName);\n boolean depDeleted = runtimeClient.deleteDeployment(deploymentName);\n\n return svcDeleted && depDeleted;\n }",
"protected boolean processSeeksCleared(){return false;}",
"void killAllApps();",
"@Test\n @Timeout(value = 30)\n public void testRemoveNodeChildrenChangedWatches() throws Exception {\n List<EventType> expectedEvents = new ArrayList<>();\n expectedEvents.add(EventType.ChildWatchRemoved);\n MyWatcher myWatcher = new MyWatcher(\"/testnode1\", expectedEvents, 1);\n\n zk.create(\"/testnode1\", \"data\".getBytes(), Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);\n LOG.info(\"Adding child changed watcher\");\n zk.getChildren(\"/testnode1\", myWatcher);\n\n String cmdstring = \"removewatches /testnode1 -c\";\n LOG.info(\"Remove watchers using shell command : {}\", cmdstring);\n zkMain.cl.parseCommand(cmdstring);\n assertTrue(zkMain.processZKCmd(zkMain.cl), \"Removewatches cmd fails to remove child watches\");\n myWatcher.matches();\n assertEquals(0, zk.getChildWatches().size(), \"Failed to remove child watches : \" + zk.getChildWatches());\n }",
"static void destroyAll()\n {\n synchronized(allSchedulers)\n {\n // destroy all registered schedulers\n Iterator iter = allSchedulers.iterator();\n while (iter.hasNext())\n {\n Scheduler scheduler = (Scheduler) iter.next();\n \n // do not call cancel() since this method modifies allSchedulers\n scheduler.destroy();\n }\n \n if (logger.isInfoEnabled())\n {\n logger.info(allSchedulers.size() + \" scheduler instances destroyed\");\n }\n \n // be sure and clear set\n allSchedulers.clear();\n \n // and set flag that scheduler service ist stopped\n schedulerServiceRunning = false;\n }\n }",
"public void closeWatchers() {\n //inform all the children windows (plots/lists) that the parent has died\n for (RtStatusListener i : watchers) {\n i.bailOut();\n }\n\n watchers.clear();\n }",
"private void registerShutdownHook() {\n Runtime.getRuntime().addShutdownHook(new Thread(\"Metastore Janitor Shutdown Hook\"){\n\n @Override\n public void run() {\n log.info(\"Shutting down all threads\");\n \n synchronized(tasks) {\n for(AbstractDynamoDBTask task : tasks) {\n task.running = false;\n }\n }\n \n synchronized(futures) {\n for(Future future: futures) {\n try {\n future.get();\n } catch (Exception ex) {\n log.error(\"\",ex);\n }\n }\n }\n \n executor.shutdown();\n }\n \n });\n }",
"public void shutdown() {\n\t\tfinal List<Runnable> tasks = updater.shutdownNow();\n\t\tif (null == tasks) return;\n\t\tfor (final Runnable t : tasks)\n\t\t\tt.run();\n\t}",
"@Scheduled(fixedRate = 30000)\n public void keepAlive() {\n if (needToRunStartupMethod) {\n runOnceOnlyOnStartup();\n needToRunStartupMethod = false;\n }\n }",
"private void checkForCrashes()\r\n {\r\n ReportManager.checkForCrashes(this);\r\n }",
"private void checkForReload(@NotNull List<? extends VFileEvent> events) {\n LOG.debug(\"Checking received events for a possible reloading\");\n boolean toReload = false;\n for (VFileEvent event : events) {\n final VirtualFile file = event.getFile();\n if (LOG.isTraceEnabled()) {\n LOG.trace(\"Checking the file \" + file);\n }\n if (file != null && file.getName().endsWith(KAMELETS_FILE_SUFFIX)) {\n String canonicalPath = file.getCanonicalPath();\n if (canonicalPath == null || canonicalPath.contains(\"/\" + KAMELETS_DIR + \"/\")) {\n LOG.debug(\"An event on a potential Kamelet has been detected\");\n toReload = true;\n }\n }\n }\n if (toReload) {\n LOG.debug(\"At least one event on a Kamelet has been detected, the Kamelets will be reloaded\");\n this.kamelets = null;\n }\n }",
"private void checkIfForceKill() {\n SharedPreferences settings = PreferenceManager\n .getDefaultSharedPreferences(this);\n boolean forceKill = settings.getBoolean(\n FORCE_EXIT_APPLICATION, false);\n\n if (forceKill) {\n //CLEAR THE FORCE_EXIT SETTINGS\n SharedPreferences.Editor editor = settings.edit();\n editor.putBoolean(FORCE_EXIT_APPLICATION, false);\n // Commit the edits!\n editor.apply();\n //HERE STOP ALL YOUR SERVICES\n finish();\n }\n }",
"private static void stopCleanUp() {\n\n if (isEventTrackerRunning && timer != null) {\n timer.cancel();\n timer.purge();\n debugLogger.info(\"Timer stopped: {}\", new Date());\n } else {\n debugLogger.info(\"Timer was already stopped : {}\", new Date());\n\n }\n isEventTrackerRunning = false;\n\n }",
"@PreDestroy\r\n\t@Override\r\n\tpublic void terminate()\r\n\t{\r\n\t\tthis.cleanUpDone = true;\r\n\t\tthis.isRunning = false;\r\n\t\tthis.priceMap.clear();\r\n\t\tthis.priceUpdateBlockingQueue.clear();\r\n\t\tthis.executorService.shutdownNow();\r\n\t\t\r\n\t\tif(logger.isInfoEnabled())\r\n\t\t\tlogger.info(\"Termination of price service has been completed successfully.\");\r\n\t}",
"@Override\n protected void closeWatchService() {\n }",
"private void stopDiscovery() {\n if (mDisposable != null) {\n mDisposable.dispose();\n }\n }",
"@Test\n void GIVEN_stale_artifact_exists_WHEN_cleanup_THEN_delete_component_invoked_correctly() throws Exception {\n Collection<GreengrassService> mockOrderedDeps =\n Collections.singletonList(getMockGreengrassService(MONITORING_SERVICE_PKG_NAME));\n when(kernel.orderedDependencies()).thenReturn(mockOrderedDeps);\n\n GreengrassService mockKernelService = mock(GreengrassService.class);\n Topics runtimeTopics = mock(Topics.class);\n Topic digestTopic = mock(Topic.class);\n when(kernel.getMain()).thenReturn(mockKernelService);\n when(mockKernelService.getRuntimeConfig()).thenReturn(runtimeTopics);\n ArgumentCaptor<String> identifierCaptor = ArgumentCaptor.forClass(String.class);\n when(runtimeTopics.find(any(), identifierCaptor.capture())).thenReturn(digestTopic);\n\n // mock local artifacts with version 1, 2, 3 and another component\n String anotherCompName = \"SimpleApp\";\n Map<String, Set<String>> mockArtifacts = new HashMap<>();\n mockArtifacts.put(MONITORING_SERVICE_PKG_NAME, Sets.newSet(\"1.0.0\", \"2.0.0\", \"3.0.0\"));\n mockArtifacts.put(anotherCompName, Sets.newSet(\"1.0.0\", \"2.0.0\"));\n when(componentStore.listAvailableComponentVersions()).thenReturn(mockArtifacts);\n\n // WHEN\n componentManager.cleanupStaleVersions();\n\n // THEN\n verify(componentStore, times(1))\n .deleteComponent(new ComponentIdentifier(MONITORING_SERVICE_PKG_NAME, new Semver(\"3.0.0\")));\n verify(componentStore, times(1)).deleteComponent(new ComponentIdentifier(anotherCompName, new Semver(\"1.0.0\")));\n verify(componentStore, times(1)).deleteComponent(new ComponentIdentifier(anotherCompName, new Semver(\"2.0.0\")));\n\n // verify digest was cleaned up\n verify(digestTopic, times(3)).remove();\n assertThat(identifierCaptor.getAllValues(),\n containsInAnyOrder(MONITORING_SERVICE_PKG_NAME + \"-v3.0.0\", anotherCompName + \"-v1.0.0\",\n anotherCompName + \"-v2.0.0\"));\n }",
"public void cleanup() {\n\n\t\tfinal long now = System.currentTimeMillis();\n\n\t\tsynchronized (this.recentlyRemovedChannels) {\n\n\t\t\tfinal Iterator<Map.Entry<ChannelID, Long>> it = this.recentlyRemovedChannels.entrySet().iterator();\n\t\t\twhile (it.hasNext()) {\n\n\t\t\t\tfinal Map.Entry<ChannelID, Long> entry = it.next();\n\t\t\t\tif ((entry.getValue().longValue() + CLEANUP_INTERVAL) < now) {\n\t\t\t\t\tit.remove();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void waitForWatcherToStart(FileModificationEventWatcher watcher) throws InterruptedException {\n for (int i = 0; i < 10; i++) {\n if (watcher.isWatchRegistered()) {\n break;\n } else {\n Thread.sleep(100);\n }\n }\n if (!watcher.isWatchRegistered()) {\n throw new RuntimeException(\"Failed to start the watcher\");\n }\n }",
"@Scheduled(\n fixedDelayString = \"${entities.cleanup.rate}\"\n )\n @Transactional\n public void cleanup() {\n log.info(\"cleanup execution\");\n appSessionRepository.deleteByCreatedAtBefore(LocalDateTime.now()\n .minus(Period.ofDays(applicationConfig.getEntities().getCleanup().getDays())));\n tanRepository.deleteByCreatedAtBefore(LocalDateTime.now()\n .minus(Period.ofDays(applicationConfig.getEntities().getCleanup().getDays())));\n }",
"@Override\n public final void preTearDown() throws Exception {\n Invoke.invokeInEveryVM(() -> ConcurrentIndexUpdateWithoutWLDUnitTest.destroyRegions());\n Invoke.invokeInEveryVM(CacheTestCase::closeCache);\n }",
"@After\n public void tearDown()\n throws Exception\n {\n cronTaskEventListenerRegistry.removeListener(this);\n }",
"public void syncLogsServers() {\n initExecService();\n try {\n log.info(\"Number of logs founded: \" + Files.list(Paths.get(saveLocation)).count());\n\n /**\n * Find the files in the directory. For each file found with the .log extension\n * start to read it and submit it to the thread pool of the executor\n */\n Files.list(Paths.get(saveLocation))\n .filter(Files::isRegularFile)\n .filter(file -> FilenameUtils.getExtension(file.getFileName().toString()).equals(LOG_EXTENSION))\n .forEach(file -> executorService.submit(()-> readFile(file, Charset.forName(\"UTF-8\"))));\n\n log.info(\"Proceed to terminate all thread\");\n\n shutdownAndAwaitTermination(executorService,\n 150,\n TimeUnit.MINUTES);\n\n executorService = null;\n } catch (Exception ex) {\n log.error(ex.getMessage(), ex);\n try {\n executorService.shutdownNow();\n shutdownAndAwaitTermination(executorService, 5, TimeUnit.MINUTES);\n executorService = null;\n } catch (Exception e2) {\n log.error(e2.getMessage(), e2);\n }\n }\n }",
"@Override\n protected void onDestroy() {\n stopService(collectDataService);\n super.onDestroy();\n }",
"public void watchDir(Path path) throws IOException, InterruptedException { \n try (WatchService watchService = FileSystems.getDefault().newWatchService()) {\n \n //2. Registering Objects with the Watch Service.\n path.register(watchService, StandardWatchEventKinds.ENTRY_CREATE,\n StandardWatchEventKinds.ENTRY_MODIFY, StandardWatchEventKinds.ENTRY_DELETE);\n /*\n * 3. Waiting for the Incoming Events.\n * start an infinite loop\n */\n while (true) {\n\n /*\n * 4.Getting a Watch Key.\n * retrieve and remove the next watch key\n */\n final WatchKey key = watchService.take();\n\n /*\n * 5. Retrieving Pending Events for a Key.\n * get list of pending events for the watch key * \n */\n for (WatchEvent<?> watchEvent : key.pollEvents()) {\n \n /*\n * 6. Retrieving the Event Type and Count.\n * get the kind of event (create, modify, delete) * \n */\n final Kind<?> kind = watchEvent.kind();\n\n //handle OVERFLOW event\n if (kind == StandardWatchEventKinds.OVERFLOW) {\n continue;\n }\n\n /*\n * 7. Retrieving the File Name Associated with an Event.\n * get the filename for the event * \n */\n final WatchEvent<Path> watchEventPath = (WatchEvent<Path>) watchEvent;\n final Path filename = watchEventPath.context();\n\n //print it out\n out.println(kind + \" -> \" + filename);\n }\n \n /*\n * 8. Putting the Key Back in Ready State.\n * reset the key\n */ \n boolean valid = key.reset();\n\n //exit loop if the key is not valid (if the directory was deleted, for example)\n if (!valid) {\n break;\n }\n }\n }\n }",
"private static void stopLifecycleSteps()\n {\n ListIterator<LifecycleStep> iterator = lifecycleStepList.listIterator(lifecycleStepList.size());\n while( iterator.hasPrevious() ) {\n LifecycleStep step = iterator.previous();\n try {\n if( log.isInfoEnabled() ) {\n log.info(\"Stopping Lifecycle Step '\"+step.getQName()+\"'.\");\n }\n step.stopLifecycle(context);\n if( log.isInfoEnabled() ) {\n log.info(\"Finished Lifecycle Step '\"+step.getQName()+\"'.\");\n }\n }\n catch( Throwable t ) {\n if( log.isWarnEnabled() ) {\n log.warn(\"An exception was thrown while stopping a lifecycle exception.\", t);\n }\n }\n }\n lifecycleStepList.clear();\n }",
"public void clearAllWatchers() {\n\t\tif (registeredWatchers.size() > 0) {\n\t\t\tboolean isRemoved = false;\n\t\t\tLOG.info(\"About to unregister all watchers.\");\n\t\t\tfor (WatchKey watchKey : registeredWatchers.keySet()) {\n\t\t\t\ttry {\n\t\t\t\t\tisRemoved = notifier.removeWatcher(watchKey);\n\t\t\t\t\tif (isRemoved) {\n\t\t\t\t\t\tregisteredWatchers.remove(watchKey);\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// Let other watchers be cleared off\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (registeredWatchers.size() > 0) {\n\t\t\t\tLOG.info(\"Failed to clear all the watchers. Some watchers couldn't be unregistered.\");\n\t\t\t}\n\t\t} else {\n\t\t\tLOG.warn(\"Failed to clear all the watchers as no watchers registered.\");\n\t\t}\n\t}",
"public void startDeleteWorkers(){\r\n\t\tArrayList<Thread> threads = new ArrayList<Thread>();\r\n\t\t\r\n\t\t//Create threads\r\n\t\tfor(int i = 0; i < dlts.length; i++){\r\n\t\t\tthreads.add(new Thread(dlts[i]));\r\n\t\t\tthreads.get(i).start();\r\n\t\t}\r\n\t\t\r\n\t\t//Wait for threads to finish\r\n\t\tfor(int i = 0; i < dlts.length; i++){\r\n\t\t\ttry {\r\n\t\t\t\tthreads.get(i).join();\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\tthrow new RuntimeException(e.getMessage());\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void abortAllSingleDownloadControllers() {\r\n\r\n while (true) {\r\n java.util.List<SingleDownloadController> list = new ArrayList<SingleDownloadController>();\r\n synchronized (downloadControllers) {\r\n list.addAll(downloadControllers);\r\n }\r\n for (SingleDownloadController con : list) {\r\n if (con.isAlive() && !con.isAborted()) {\r\n con.abortDownload();\r\n }\r\n }\r\n boolean alive = false;\r\n for (SingleDownloadController con : list) {\r\n if (con.isAlive()) {\r\n alive = true;\r\n break;\r\n }\r\n }\r\n if (alive == false) break;\r\n try {\r\n Thread.sleep(1000);\r\n } catch (InterruptedException e) {\r\n logger.log(e);\r\n return;\r\n }\r\n }\r\n }",
"@Override\r\n public void stopAll() {\r\n Log.d(TAG, \"Number of services: \"+ taskRequesterMap.size());\r\n Iterator<Map.Entry<String, TaskRequester>> iterator = taskRequesterMap.entrySet().iterator();\r\n while (iterator.hasNext()) {\r\n Map.Entry<String, TaskRequester> item = iterator.next();\r\n\r\n String name = item.getValue().getName();\r\n String className = item.getValue().getServiceClass().getName();\r\n\r\n// remove(className);\r\n item.getValue().unBind();\r\n Log.d(TAG, \"- \"+name+\" \"+className);\r\n// taskRequesterMap.remove(className);\r\n iterator.remove();\r\n serviceClasses.remove(new TaskModel(name, className, 1));\r\n// taskRequesterMap.remove(new TaskModel(name, className, 1));\r\n }\r\n }",
"public void deleteInst() {\n\t\tlogger.debug(\"DeviceNameTableTester has been stopped\");\n\t}",
"public void testBackgroundCheckService() throws Exception {\n final Parcel data = Parcel.obtain();\n Intent serviceIntent = new Intent();\n serviceIntent.setClassName(SIMPLE_PACKAGE_NAME,\n SIMPLE_PACKAGE_NAME + SIMPLE_SERVICE);\n ServiceConnectionHandler conn = new ServiceConnectionHandler(mContext, serviceIntent,\n WAIT_TIME);\n\n ActivityManager am = mContext.getSystemService(ActivityManager.class);\n\n InstrumentationRegistry.getInstrumentation().getUiAutomation().grantRuntimePermission(\n STUB_PACKAGE_NAME, android.Manifest.permission.PACKAGE_USAGE_STATS);\n /*\n Log.d(\"XXXX\", \"Invoke: \" + cmd);\n Log.d(\"XXXX\", \"Result: \" + result);\n Log.d(\"XXXX\", SystemUtil.runShellCommand(getInstrumentation(), \"dumpsys package \"\n + STUB_PACKAGE_NAME));\n */\n\n ApplicationInfo appInfo = mContext.getPackageManager().getApplicationInfo(\n SIMPLE_PACKAGE_NAME, 0);\n\n UidImportanceListener uidForegroundListener = new UidImportanceListener(mContext,\n appInfo.uid, ActivityManager.RunningAppProcessInfo.IMPORTANCE_SERVICE, WAIT_TIME);\n uidForegroundListener.register();\n UidImportanceListener uidGoneListener = new UidImportanceListener(mContext,\n appInfo.uid, ActivityManager.RunningAppProcessInfo.IMPORTANCE_EMPTY, WAIT_TIME);\n uidGoneListener.register();\n\n WatchUidRunner uidWatcher = new WatchUidRunner(getInstrumentation(), appInfo.uid,\n WAIT_TIME);\n\n // First kill the process to start out in a stable state.\n mContext.stopService(serviceIntent);\n conn.bind();\n IBinder service = conn.getServiceIBinder();\n conn.unbind();\n try {\n service.transact(IBinder.FIRST_CALL_TRANSACTION, data, null, 0);\n } catch (RemoteException e) {\n }\n service = null;\n\n // Wait for uid's process to go away.\n uidGoneListener.waitForValue(ActivityManager.RunningAppProcessInfo.IMPORTANCE_GONE,\n ActivityManager.RunningAppProcessInfo.IMPORTANCE_GONE);\n assertEquals(ActivityManager.RunningAppProcessInfo.IMPORTANCE_GONE,\n am.getPackageImportance(SIMPLE_PACKAGE_NAME));\n\n // And wait for the uid report to be gone.\n uidWatcher.waitFor(WatchUidRunner.CMD_GONE, null);\n\n String cmd = \"appops set \" + SIMPLE_PACKAGE_NAME + \" RUN_IN_BACKGROUND deny\";\n String result = SystemUtil.runShellCommand(getInstrumentation(), cmd);\n\n // This is a side-effect of the app op command.\n uidWatcher.expect(WatchUidRunner.CMD_IDLE, null);\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, \"NONE\");\n\n // We don't want to wait for the uid to actually go idle, we can force it now.\n cmd = \"am make-uid-idle \" + SIMPLE_PACKAGE_NAME;\n result = SystemUtil.runShellCommand(getInstrumentation(), cmd);\n\n // Make sure app is not yet on whitelist\n cmd = \"cmd deviceidle whitelist -\" + SIMPLE_PACKAGE_NAME;\n result = SystemUtil.runShellCommand(getInstrumentation(), cmd);\n\n // We will use this to monitor when the service is running.\n conn.startMonitoring();\n\n try {\n // Try starting the service. Should fail!\n boolean failed = false;\n try {\n mContext.startService(serviceIntent);\n } catch (IllegalStateException e) {\n failed = true;\n }\n if (!failed) {\n fail(\"Service was allowed to start while in the background\");\n }\n\n // Put app on temporary whitelist to see if this allows the service start.\n cmd = String.format(\"cmd deviceidle tempwhitelist -d %d %s\",\n TEMP_WHITELIST_DURATION_MS, SIMPLE_PACKAGE_NAME);\n result = SystemUtil.runShellCommand(getInstrumentation(), cmd);\n\n // Try starting the service now that the app is whitelisted... should work!\n mContext.startService(serviceIntent);\n conn.waitForConnect();\n\n // Also make sure the uid state reports are as expected.\n uidWatcher.waitFor(WatchUidRunner.CMD_ACTIVE, null);\n uidWatcher.waitFor(WatchUidRunner.CMD_UNCACHED, null);\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_SERVICE);\n\n // Good, now stop the service and give enough time to get off the temp whitelist.\n mContext.stopService(serviceIntent);\n conn.waitForDisconnect();\n\n uidWatcher.expect(WatchUidRunner.CMD_CACHED, null);\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_CACHED_EMPTY);\n\n executeShellCmd(\"cmd deviceidle tempwhitelist -r \" + SIMPLE_PACKAGE_NAME);\n\n // Going off the temp whitelist causes a spurious proc state report... that's\n // not ideal, but okay.\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_CACHED_EMPTY);\n\n // We don't want to wait for the uid to actually go idle, we can force it now.\n cmd = \"am make-uid-idle \" + SIMPLE_PACKAGE_NAME;\n result = SystemUtil.runShellCommand(getInstrumentation(), cmd);\n\n uidWatcher.expect(WatchUidRunner.CMD_IDLE, null);\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_CACHED_EMPTY);\n\n // Now that we should be off the temp whitelist, make sure we again can't start.\n failed = false;\n try {\n mContext.startService(serviceIntent);\n } catch (IllegalStateException e) {\n failed = true;\n }\n if (!failed) {\n fail(\"Service was allowed to start while in the background\");\n }\n\n // Now put app on whitelist, should allow service to run.\n cmd = \"cmd deviceidle whitelist +\" + SIMPLE_PACKAGE_NAME;\n result = SystemUtil.runShellCommand(getInstrumentation(), cmd);\n\n // Try starting the service now that the app is whitelisted... should work!\n mContext.startService(serviceIntent);\n conn.waitForConnect();\n\n uidWatcher.waitFor(WatchUidRunner.CMD_UNCACHED, null);\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_SERVICE);\n\n // Okay, bring down the service.\n mContext.stopService(serviceIntent);\n conn.waitForDisconnect();\n\n uidWatcher.expect(WatchUidRunner.CMD_CACHED, null);\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_CACHED_EMPTY);\n\n } finally {\n mContext.stopService(serviceIntent);\n conn.stopMonitoring();\n\n uidWatcher.finish();\n\n cmd = \"appops set \" + SIMPLE_PACKAGE_NAME + \" RUN_IN_BACKGROUND allow\";\n result = SystemUtil.runShellCommand(getInstrumentation(), cmd);\n cmd = \"cmd deviceidle whitelist -\" + SIMPLE_PACKAGE_NAME;\n result = SystemUtil.runShellCommand(getInstrumentation(), cmd);\n\n uidGoneListener.unregister();\n uidForegroundListener.unregister();\n\n data.recycle();\n }\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tFile dir = new File(\"src/reports\");\n\t\t\t\tfor (File file : dir.listFiles())\n\t\t\t\tif (!file.isDirectory())\n\t\t\t\tfile.delete();\n\t\t\t\t}",
"private void waitForRestart() {\n ExecutorService service = Executors.newSingleThreadExecutor();\n try {\n Runnable r = new Runnable() {\n @Override\n public void run() {\n try {\n LogEvent[] logEvents = logViewerClient.getAllRemoteSystemLogs();\n for (LogEvent event : logEvents) {\n log.info(event.getMessage() + \" @ \" + event.getLogTime());\n if (event.getMessage().contains(\"Mgt Console URL : \" )){\n log.info(\"Server restarted successfully\");\n Assert.assertTrue(true);\n }\n }\n } catch (RemoteException | LogViewerLogViewerException e) {\n log.error(\"Error reading logs. \\n\" + e.getMessage());\n Assert.assertTrue(false);\n }\n }\n };\n\n Future<?> f = service.submit(r);\n\n f.get(Constants.IOT_RESTART_THREAD_TIMEOUT, TimeUnit.MINUTES);\n } catch (final InterruptedException e) {\n log.error(\"Interrupted \"+e.getMessage());\n Assert.assertTrue(false);\n } catch (final TimeoutException e) {\n log.error(\"Timeout \" + e.getMessage());\n Assert.assertTrue(false);\n } catch (final ExecutionException e) {\n log.error(\"Execution failed \" + e.getMessage());\n Assert.assertTrue(false);\n } finally {\n service.shutdown();\n }\n }",
"public void shutdown(boolean cleanup) throws Exception {\n if (cluster.provisioningMethod.equalsIgnoreCase(\"local\")) {\n for (String coll : colls) {\n try (HttpSolrClient hsc = createClient()) {\n try {\n CollectionAdminRequest.deleteCollection(coll).process(hsc);\n } catch (Exception e) {\n //failed but continue\n }\n }\n }\n\n // Collect logs\n if (cluster.provisioningMethod.equalsIgnoreCase(\"local\")) {\n \t for (SolrNode node: nodes) {\n \t\t LocalSolrNode localNode = (LocalSolrNode) node;\n \t\t String tarfile = Util.RUN_DIR + \"logs-\"+localNode.port+\".tar\";\n \t\t if (new File(tarfile).exists()) new File(tarfile).delete();\n \t\t String tarCommand = \"tar -cf \" + tarfile + \" -C \" + localNode.binDirectory.substring(0, localNode.binDirectory.length()-4) + \"server/logs .\";\n \t\t log.info(\"Trying command: \" + tarCommand);\n \t\t Util.execute(tarCommand, Util.getWorkingDir());\n \t }\n }\n \n for (SolrNode node : nodes) {\n node.stop();\n if (cleanup) {\n node.cleanup();\n }\n }\n if (cleanup) {\n zookeeper.stop();\n zookeeper.cleanup();\n }\n }\n }",
"private void cleanSweep(){\n // Corrects the reminder dates for those reminders which will be repeating.\n refreshAllRepeatReminderDates();\n\n // Starts removing expired reminders.\n Calendar timeRightNow = Calendar.getInstance();\n boolean cleanList;\n for (int outerCounter=0; outerCounter<reminderItems.size();outerCounter++) {\n cleanList=true;\n for (int counter = 0; counter < reminderItems.size(); counter++) {\n int year = reminderItems.get(counter).getReminderYear();\n int month = reminderItems.get(counter).getReminderMonth();\n int day = reminderItems.get(counter).getReminderDay();\n int hour = reminderItems.get(counter).getReminderHour();\n int minute = reminderItems.get(counter).getReminderMinute();\n int second = 0;\n\n Calendar timeOfDeletion = Calendar.getInstance();\n timeOfDeletion.set(year, month, day, hour, minute, second);\n\n if (timeOfDeletion.before(timeRightNow)) {\n deleteReminderItem(counter);\n cleanList=false;\n break;\n }\n }\n if(cleanList){\n break;\n }\n }\n\n // Refreshes the reminder date descriptions (correcting \"Today\" and \"Tomorrow\" depending on the date).\n refreshAllDateDescriptions();\n }",
"private void postRun() {\n // remove all GPIO listeners\n GpioFactory.getInstance().removeAllListeners();\n this.isRunning = false;\n IoTLogger.getInstance().info(\"Post RUN\");\n }",
"void cleanUpEventsAndPlaces();",
"@Override\n public Event delete(Ec2LaunchConfiguration oldResource) {\n return null;\n }",
"@Override\n public void onTaskRemoved(Intent rootIntent) {\n stopTracking();\n\n // Kill the service when the user has killed the app by swiping it to the left\n stopSelf();\n }",
"@Override\n\tpublic void run() {\n\t\tNewDeliverTaskManager ndtm = NewDeliverTaskManager.getInstance();\n\t\tif(ndtm != null && ndtm.isNewDeliverTaskAct) {\n\t\t\tNewDeliverTaskManager.logger.error(\"[旧的任务库删除线程启动成功][\" + this.getName() + \"]\");\n\t\t\twhile(isStart) {\n\t\t\t\tint count1 = 0;\n\t\t\t\tint count2 = 0;\n\t\t\t\tif(needRemoveList != null && needRemoveList.size() > 0) {\n\t\t\t\t\tList<DeliverTask> rmovedList = new ArrayList<DeliverTask>();\n\t\t\t\t\tfor(DeliverTask dt : needRemoveList) {\n\t\t\t\t\t\tDeliverTaskManager.getInstance().notifyDeleteFromCache(dt);\n\t\t\t\t\t\trmovedList.add(dt);\n\t\t\t\t\t\tcount1++;\n\t\t\t\t\t\tif(count1 >= 300) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tsynchronized (this.needRemoveList) {\n\t\t\t\t\t\tfor(DeliverTask dt : rmovedList) {\n\t\t\t\t\t\t\tneedRemoveList.remove(dt);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(heartBeatTime);\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\tTransitRobberyManager.logger.error(\"删除旧的已完成列表线程出错1:\", e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(teRemoveList != null && teRemoveList.size() > 0) {\n\t\t\t\t\tList<TaskEntity> teRemovedList = new ArrayList<TaskEntity>();\n\t\t\t\t\tfor(TaskEntity te : teRemoveList) {\n\t\t\t\t\t\tTaskEntityManager.getInstance().notifyDeleteFromCache(te);\n\t\t\t\t\t\tteRemovedList.add(te);\n\t\t\t\t\t\tcount2++;\n\t\t\t\t\t\tif(count2 >= 100) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tsynchronized (this.teRemoveList) {\n\t\t\t\t\t\tfor(TaskEntity te : teRemovedList) {\n\t\t\t\t\t\t\tteRemoveList.remove(te);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else{\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(30000);\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\tTransitRobberyManager.logger.error(\"删除旧的已完成列表线程出错2:\", e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tTransitRobberyManager.logger.error(\"[旧的任务库删除线程关闭][\" + this.getName() + \"]\");\n\t}",
"private void unWatchDir(Path path) {\n watcher_service.deRegisterAll(path);\n }",
"@Scheduled(cron = \"0 0 18 * * SUN\")\n\tvoid refreshNotifications(){\n\t\tnotificationService.refreshAll();\n\t}",
"@Override\n public void onDestroy() {\n\n stopService(new Intent(this, LocationMonitoringService.class));\n mAlreadyStartedService = false;\n //Ends................................................\n\n\n super.onDestroy();\n }",
"void startShutdown() {\n closed.set(true);\n regionManager.stopScanners();\n synchronized(toDoQueue) {\n toDoQueue.clear(); // Empty the queue\n delayedToDoQueue.clear(); // Empty shut down queue\n toDoQueue.notifyAll(); // Wake main thread\n }\n serverManager.notifyServers();\n }",
"@EventListener(classes = ApplicationReadyEvent.class)\n\tpublic void startAllAddedJobs() {\n\n\t\tList<SchedulerJobEntity> allSchedulerJobs = schedulerRepository.findAll();\n\n\t\tallSchedulerJobs.forEach(sje -> {\n\t\t\ttry {\n\t\t\t\tthis.addJob(sje);\n\t\t\t} catch (Exception e) {\n\t\t\t\tlog.error(\"Could not restart already registered job: \" + sje.toString() + \" ERROR: \" + e);\n\t\t\t}\n\t\t});\n\t}",
"@PreDestroy\n public void destroy() {\n System.out.println(\"kafka-flink is closing...\");\n }",
"@PreDestroy\n\tpublic void doMyCleanupStfff() {\n\t\tSystem.out.println(\">> TennisCoach: inside of doMyCleanupStuff\");\n\t}",
"@Override\r\n\t\tpublic void onDeleted(Context context, int[] appWidgetIds) {\n\t\t\tsuper.onDeleted(context, appWidgetIds);\r\n\t\t\tAppWidgetManager manager=AppWidgetManager.getInstance(context);\r\n\t\t\tint[] appids=manager.getAppWidgetIds(new ComponentName(context, widgethaokang.class));\r\n\t\t\t//Log.v(\"yy\",\"\"+appids.length);\r\n\t\t\tif(appids.length<1){//�����治���У�ֹͣ����\r\n\t\t\t\tcontext.stopService(new Intent(context,TimeService.class));\r\n\t\t\t}\r\n\t\t}",
"public void scaleDown() {\n log.info(\"Scaling down by [Step Down] \" + stepDown + \" instances...\");\n\n // Scale down by (1 x stepDown) at a time\n for (int i = 0; i < stepDown; i++) {\n // Get free launchers\n List<String> urlsToScaleDown = getFreeLaunchers();\n\n log.info(\"URLs to scale down: \" + urlsToScaleDown.toString());\n\n // Sort by launcher url. This will sort the oldest first, making it possible to take the youngest out of the\n // tail\n urlsToScaleDown.sort((o1, o2) -> {\n int mySuffix = Integer.parseInt(o1.split(\"\\\\.\")[0].substring(\n (Constants.LAUNCHER_URL_PREFIX + \"-\").length()));\n\n int theirSuffix = Integer.parseInt(o2.split(\"\\\\.\")[0].substring(\n (Constants.LAUNCHER_URL_PREFIX + \"-\").length()));\n\n return Integer.compare(mySuffix, theirSuffix);\n });\n\n // Get the youngest free launcher URL\n String launcherUrlToDelete = urlsToScaleDown.get(urlsToScaleDown.size() - 1);\n\n log.info(\"Cutting down [Launcher URL] \" + launcherUrlToDelete + \"...\");\n\n // Get object name from launcher URL\n String deploymentName = getObjectNameFromLauncherUrl(launcherUrlToDelete);\n\n // Delete deployment and service\n if (!deleteLauncher(deploymentName)) {\n log.error(\"Launcher deletion failed [Object Name] \" + deploymentName);\n }\n }\n }",
"public void cleanUp() {\n if(ticker.skipCleanup()) {\n return;\n } \n \n // At this point cleanup is inevitable, so linked list traversal should\n // be performed. \n Entry<K, V> e = segment.head();\n Entry<K, V> end = segment.tail();\n \n int processed = 0;\n long createThreshold = ticker.nextTick() - createTTL;\n long accessThreshold = ticker.nextTick() - accessTTL;\n\n Object removeKey = null;\n while ((e = e.getNext()) != end && processed++ < REMOVE_DEPTH) {\n if (null != removeKey) {\n segment.remove(removeKey);\n removeKey = null;\n }\n\n // both, access and creation thresholds might trigger entry removal \n if (e.getCreationTime() <= createThreshold || e.getAccessTime() <= accessThreshold) {\n removeKey = e.getKey();\n }\n }\n\n if (null != removeKey) {\n segment.remove(removeKey);\n } \n ticker.markCleanup();\n }",
"public void stopAll() {\n List<String> startedEvents = new ArrayList<>(started.keySet());\n for (String event : startedEvents) {\n stop(event);\n }\n started.clear();\n }",
"public void stopDownloads() {\r\n IOEQ.add(new Runnable() {\r\n public void run() {\r\n if (DownloadWatchDog.this.stateMachine.isFinal() || DownloadWatchDog.this.stateMachine.isStartState()) {\r\n /* not downloading */\r\n return;\r\n }\r\n if (DownloadWatchDog.this.stateMachine.isState(STOPPING_STATE)) {\r\n /* download is already in stopping, stopped state */\r\n return;\r\n }\r\n /* we now want to stop all downloads */\r\n stateMachine.setStatus(STOPPING_STATE);\r\n }\r\n }, true);\r\n }"
] | [
"0.54038346",
"0.5285767",
"0.52636063",
"0.52182424",
"0.5148183",
"0.51221436",
"0.5054833",
"0.50259006",
"0.5013078",
"0.5007515",
"0.50067",
"0.49451372",
"0.49281663",
"0.49183923",
"0.4908451",
"0.48708925",
"0.48673764",
"0.481663",
"0.48137006",
"0.48085058",
"0.4802695",
"0.47846764",
"0.4783635",
"0.47723117",
"0.47713137",
"0.4749196",
"0.4748057",
"0.47426367",
"0.47393668",
"0.4721843",
"0.47183308",
"0.47173265",
"0.47160426",
"0.4708773",
"0.47042435",
"0.46981746",
"0.4694885",
"0.46861473",
"0.46807253",
"0.46735632",
"0.46721107",
"0.4665074",
"0.4656947",
"0.46534407",
"0.46473548",
"0.46456832",
"0.4644883",
"0.46337074",
"0.46310693",
"0.46163365",
"0.46138123",
"0.4606531",
"0.4605414",
"0.46027607",
"0.45938706",
"0.4591384",
"0.4590788",
"0.45891875",
"0.4581097",
"0.45807654",
"0.45775482",
"0.45702037",
"0.45695308",
"0.45501333",
"0.45330212",
"0.45315906",
"0.45217273",
"0.45118463",
"0.45087424",
"0.45053256",
"0.45033526",
"0.4489819",
"0.448289",
"0.44807315",
"0.44799864",
"0.4472658",
"0.44721875",
"0.4471849",
"0.44667122",
"0.44632858",
"0.44606793",
"0.44561455",
"0.44543695",
"0.4439254",
"0.44349948",
"0.4430126",
"0.44290227",
"0.44260523",
"0.4424478",
"0.44202554",
"0.44148263",
"0.44139627",
"0.4405798",
"0.44047162",
"0.440468",
"0.44029644",
"0.4401915",
"0.43994662",
"0.43978652",
"0.4396196"
] | 0.77006954 | 0 |
/Fragments List (xml+java) and Text 1 . Fragment class for above both 2. override oncreateview 3. create obj of xml and inflate it 4. Add fragment java/xml | @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n //This will handle how the fragment will display content\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle saveInstanceState) {\n View layout = inflater.inflate(R.layout.fragment_main, container, false);\n\n FeedListView mFeedListView = new FeedListView(getActivity());\n Log.d(TAG, \"MyFragment::onCreate\");\n mFeedListView.inflate(layout);\n\n //Getting a reference to the TextView (as defined in fragment_main) and set it to a value\n Bundle bundle = getArguments();\n\n switch (bundle.getInt(\"point\")){\n case 0:\n //TODO : add tag query\n break;\n case 1:\n //TODO : add tag query\n break;\n case 2:\n //TODO : add tag query\n break;\n case 3:\n //TODO : add tag query\n break;\n default:\n }\n\n return layout;\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tif (savedInstanceState != null) {\r\n\t\t\tlastTime = savedInstanceState.getInt(\"lastTime\");\r\n\t\t\tLog.d(\"\", \"lastTime\" + lastTime);\r\n\t\t}\r\n\r\n\t\tView view = inflater.inflate(R.layout.fragment_text, container, false);\r\n\t\t// ListView listView = (ListView) view.findViewById(R.id.textlsit_view);\r\n\t\t// 获取标题事件,增加电极,进行 心小心炫富显示的功能\r\n\t\tView titleView = view.findViewById(R.id.textlist_title);\r\n\t\ttitleView.setOnClickListener(this);\r\n\r\n\t\tPullToRefreshListView refreshListView = (PullToRefreshListView) view\r\n\t\t\t\t.findViewById(R.id.textlsit_view);\r\n\t\trefreshListView.setOnRefreshListener(this);\r\n\t\trefreshListView.setMode(Mode.BOTH);\r\n\r\n\t\tListView listView = refreshListView.getRefreshableView();\r\n\t\tlistView.setOnItemClickListener(this);\r\n\t\tList<String> strings = new LinkedList<String>();\r\n\t\tstrings.add(\"java\");\r\n\t\tstrings.add(\"java1\");\r\n\t\tstrings.add(\"java11\");\r\n\t\tstrings.add(\"java111\");\r\n\t\tstrings.add(\"java1111\");\r\n\t\tstrings.add(\"java11111\");\r\n\t\tstrings.add(\"java2\");\r\n\t\tstrings.add(\"java22\");\r\n\t\tstrings.add(\"java2223\");\r\n\t\tstrings.add(\"java3\");\r\n\t\tstrings.add(\"java34\");\r\n\t\tstrings.add(\"java324\");\r\n\t\tstrings.add(\"java23423\");\r\n\t\tstrings.add(\"java546\");\r\n\t\tstrings.add(\"java56\");\r\n\t\tstrings.add(\"java7\");\r\n\t\tstrings.add(\"java8\");\r\n\t\tstrings.add(\"java444\");\r\n\t\tstrings.add(\"java4653\");\r\n\t\t// 添加列表上的快速工具条(Header)\r\n\t\tView header = inflater.inflate(R.layout.textlist_header_tools,\r\n\t\t\t\tlistView, false);\r\n\t\tlistView.addHeaderView(header);\r\n\r\n\t\tView quickPublish = header.findViewById(R.id.quick_tools_piblish);\r\n\t\tquickPublish.setOnClickListener(this);\r\n\r\n\t\tView quickReview = header.findViewById(R.id.quick_tools_review);\r\n\t\tquickReview.setOnClickListener(this);\r\n\r\n\t\tList<TestEntity> entities = DataStore.getInatance().getTextEntities();\r\n\t\t// if (entities == null) {\r\n\t\t// entities = new LinkedList<TestEntity>();\r\n\t\t// }\r\n\r\n\t\t// ArrayAdapter<String> adapter = new\r\n\t\t// ArrayAdapter<String>(getActivity(),\r\n\t\t// android.R.layout.simple_list_item_1, strings);\r\n\t\t// entities = new LinkedList<TestEntity>();\r\n\r\n\t\tadapter = new EssayAdapter(getActivity(), entities);\r\n\t\tadapter.setListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tif (v instanceof TextView) {\r\n\t\t\t\t\tString string = (String)v.getTag();\r\n\t\t\t\t\tif (string!=null) {\r\n\t\t\t\t\t\tint position = Integer.parseInt(string);\r\n\t\t\t\t\t\tIntent intent = new Intent(getActivity(), EssayDetailActivity.class);\r\n\r\n\t\t\t\t\t\tintent.putExtra(\"currentEssayPosition\", position);\r\n\t\t\t\t\t\tintent.putExtra(\"category\", requestCategory);\r\n\t\t\t\t\t\tstartActivity(intent);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tlistView.setAdapter(adapter);\r\n\t\tlistView.setOnScrollListener(this);\r\n\t\t// TODO 获取ListView并且设置数据(以后需要有PullToRefresh进行完善)\r\n\t\t// 获取快速的工具条(发布和审核),用于列表的滚动显示和隐藏\r\n\t\tquickTols = view.findViewById(R.id.textlist_quick_tools);\r\n\r\n\t\tquickTols.setVisibility(View.INVISIBLE);\r\n\t\t// 设置悬浮的工具条,两个点击事件\r\n\t\tquickPublish = header.findViewById(R.id.quick_tools_piblish);\r\n\t\tquickPublish.setOnClickListener(this);\r\n\r\n\t\tquickReview = header.findViewById(R.id.quick_tools_review);\r\n\t\tquickReview.setOnClickListener(this);\r\n\r\n\t\t// 获取新条目通知控件,每次跟新数据要显示,过一段时间隐藏\r\n\t\ttextNotify = view.findViewById(R.id.textlist_new_notify);\r\n\t\ttextNotify.setVisibility(View.INVISIBLE);\r\n\t\treturn view;\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view =inflater.inflate(R.layout.fragment_home, container, false);\n name=view.findViewById(R.id.tv_name_home);\n list=view.findViewById(R.id.btnHomefragement);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_fun, container, false);\n bundle=new Bundle();\n TextView textView=new TextView(getContext());\n textView.setTypeface(Typeface.DEFAULT_BOLD);\n\n\n ListView listView=view.findViewById(R.id.listview);\n\n ListAdapter ListAdapter=new ListAdapter(getActivity(),fun_title,fun_description,imageid);\n listView.setAdapter(ListAdapter);\n\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n switch (position)\n {\n case 0:\n bundle.putString(\"text\",\"ShareChat on Apps\");\n bundle.putString(\"address\",\"https://sharechat.com/\");\n Navigation.findNavController(view).navigate(R.id.action_funFragment_to_webview2,bundle);\n break;\n case 1:\n bundle.putString(\"text\",\"Tik Tok on Apps\");\n bundle.putString(\"address\",\"https://www.tiktok.com/trending/?lang=en\");\n Navigation.findNavController(view).navigate(R.id.action_funFragment_to_webview2,bundle);\n break;\n case 2:\n bundle.putString(\"text\",\"Likee on Apps\");\n bundle.putString(\"address\",\"https://likee.com/trending\");\n Navigation.findNavController(view).navigate(R.id.action_funFragment_to_webview2,bundle);\n break;\n case 3:\n bundle.putString(\"text\",\"Helo on Apps\");\n bundle.putString(\"address\",\"https://www.helo-app.com/explore/\");\n Navigation.findNavController(view).navigate(R.id.action_funFragment_to_webview2,bundle);\n break;\n }\n }\n });\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_queenb_embassy, container, false);\n\n\n //initialization of the list view (list of buttons)\n listview = v.findViewById(R.id.listview);\n\n for (int i = 0; i < names.length ; i++){\n ItemsModel itemsModel = new ItemsModel(names[i], ages[i], locations[i], images[i],\n phone_numbers[i], instagram_links[i], loved_about_queenb[i], recommendQueenb[i]); //todo try1+2\n listItem.add(itemsModel);\n }\n //required for handling the listView\n customAdapter = new CustomAdapter(listItem, getActivity());\n listview.setAdapter(customAdapter);\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.exer_fragment_listview, container, false);\n listView = view.findViewById(R.id.listView);\n ArrayAdapter<String> adapter = new ArrayAdapter<>(view.getContext(), android.R.layout.simple_list_item_1,word);\n listView.setAdapter(adapter);\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Toast.makeText(view.getContext(),\"Indek \"+position+\" Ditekan\",Toast.LENGTH_SHORT).show();\n }\n });\n return view;\n\n }",
"private void initView() {\n frag4 = new Fragment4();\n //Fragment2 frag2 = new Fragment2();\n Fragment3 frag3 = new Fragment3();\n\n fragments = new Fragment[]{frag4, frag3}; // 要把Fragment*.java中import android.support.v4.app.Fragment;才行。否则不能添加进来。\n\n\n imageViews = new ImageView[2];\n imageViews[0] = (ImageView) findViewById(R.id.iv_zhuye);\n imageViews[1] = (ImageView) findViewById(R.id.iv_wode);\n imageViews[0].setSelected(true);\n\n textViews = new TextView[2];\n textViews[0] = (TextView) findViewById(R.id.tv_zhuye);\n textViews[1] = (TextView) findViewById(R.id.tv_wode);\n textViews[0].setTextColor(ContextCompat.getColor(getApplicationContext(),R.color.selected));\n\n getSupportFragmentManager().beginTransaction()\n .add(R.id.LL_content_main, frag4)\n .add(R.id.LL_content_main, frag3)\n .hide(frag3)\n .show(frag4)\n .commit();\n\n LinearLayout ll_zhuye = (LinearLayout) findViewById(R.id.LL_zhuye);\n LinearLayout ll_wode = (LinearLayout) findViewById(R.id.LL_wode);\n\n ll_zhuye.setOnClickListener(this);\n ll_wode.setOnClickListener(this);\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View rootView = inflater.inflate(R.layout.fragment_a, container, false);\n this.v = rootView;\n int temp_pos = getArguments().getInt(\"bpos\");\n position = fin_pos = temp_pos;\n\n // ArrayAdapter<String> adapter = new ArrayAdapter<String>(getActivity(),\n // android.R.layout.simple_list_item_1, values);\n\n\n //populateListView();\n\n //setListAdapter(adapter);\n\n\n return rootView;\n\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tapplication = (MyApplication) context.getApplicationContext();\r\n\t\tview = inflater.inflate(R.layout.myorder_fragment, null);\r\n\t\tlistView = (ListView) view.findViewById(R.id.lv_myOrder);\r\n\t\tmoreView = inflater.inflate(R.layout.my_order_listfootview, null);\r\n\t\tlistData = new ArrayList<String>();\r\n\t\tmoreView.setVisibility(View.GONE);\r\n\t\t\r\n\t\tprepareData(); // 准备数据\r\n\r\n\t\treturn view;\r\n\t}",
"@Override\n\tprotected void onCreate(Bundle arg0) {\n\t\t if (arg0 != null) {\n\t\t\t arg0.putParcelable(\"android:support:fragments\",null);\n\t }\n\t\t super.onCreate(arg0);\n\t\t requestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\t setLayout();\n\t\t // 注入控件\n\t ViewUtils.inject(this);\n\t\t init(arg0);\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_three, container, false);\n JudulMeme = new ArrayList<>();\n GambarMeme = new ArrayList<>();\n recyclerView = view.findViewById(R.id.recycler);\n DaftarItem();\n //Menggunakan Layout Manager, Dan Membuat List Secara Vertical\n layoutManager = new LinearLayoutManager(getContext());\n recyclerView.setLayoutManager(layoutManager);\n recyclerView.setHasFixedSize(true);\n recyclerView.setItemAnimator(new DefaultItemAnimator());\n adapter = new Adapte(JudulMeme, GambarMeme);\n //Memasang Adapter pada RecyclerView\n recyclerView.setAdapter(adapter);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n context = getActivity().getApplicationContext();\n\n View view = inflater.inflate(R.layout.fragment_custom, container, false);\n mImageLoader = ImageLoaderFactory.create(context);\n listView = (ListView)view.findViewById(R.id.customlist);\n mPtrFrame_Health = (PtrClassicFrameLayout) view.findViewById(R.id.customlist_frame);\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n }\n });\n listView.setDividerHeight(0);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_list, container, false);\n initiate(view);\n return view;\n }",
"@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t\tLayoutInflater inflater = getActivity().getLayoutInflater();\r\n\t\tmMainView = inflater.inflate(R.layout.tzfrag, (ViewGroup) getActivity()\r\n\t\t\t\t.findViewById(R.id.vp), false);\r\n\t\ttzlv = (AutoListView) mMainView.findViewById(R.id.tzlv);\r\n\t\tprocess=(ProgressBar) mMainView.findViewById(R.id.progressBar1);\r\n\t\ttips=(TextView) mMainView.findViewById(R.id.tips);\r\n\t\ttzlv.setOnRefreshListener(this);\r\n\t\ttzlv.setOnLoadListener(this);\r\n\t\ttzlv.setFocusableInTouchMode(true);\r\n\t\ttzlv.setOnItemClickListener(new OnItemClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\r\n\t\t\t\t\tint position, long id) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tIntent i = new Intent(getActivity(), TzIn.class);\r\n\t\t\t\tSystem.out.println(position);\r\n\t\t\t\tif (position != 0 && position != tz.size() + 1) {\r\n\t\t\t\t\ti.putExtra(\"tzid\", tz.get(position - 1).getId());\r\n\t\t\t\t\ti.putExtra(\"bkid\", tz.get(position - 1).getBkid());\r\n\t\t\t\t\tstartActivityForResult(i, 0);\r\n\t\t\t\t\tgetActivity().overridePendingTransition(R.anim.push_left_in,\r\n\t\t\t\t\t\t\tR.anim.push_left_out);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tinitView();\r\n\t\t\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_fragment4, container, false);\n\n frameLayout = view.findViewById(R.id.frame_fragment4);\n frameLayout.setBackgroundColor(MainActivity.FRAMELAYOUT_NUMBER);\n\n arrayList = new ArrayList<>();\n addMenu();\n\n typefaceUtil = new TypefaceUtil(getContext());\n fontNumber = MainActivity.FONT_NUMBER;\n tvTitle = view.findViewById(R.id.tv_fragment4_title);\n tvTitle.setTypeface(typefaceUtil.getTypeface(fontNumber));\n\n recyclerView = (RecyclerView) view.findViewById(R.id.rv_frg4);\n LinearLayoutManager mLinearManager = new LinearLayoutManager(getActivity());\n recyclerView.setLayoutManager(mLinearManager);\n mAdapter = new MyAdapter_Setting(getActivity(), arrayList);\n recyclerView.setAdapter(mAdapter);\n\n return view;\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.list_fragment, container, false);\r\n\t\tlist_view = (ListView) view.findViewById(R.id.list_view);\r\n\t\tadapter=new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1, Data.items);\r\n\t\tlist_view.setAdapter(adapter);\r\n\t\tlist_view.setOnItemClickListener(this);\r\n\t\treturn view;\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n {\n View v = inflater.inflate(R.layout.libraryfragment, container, false);\n tracks=new ArrayList<String>();\n new JSONParse().execute();\n\n list=(ListView) v.findViewById(R.id.list);\n\n list.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n\n @Override\n public void onItemClick(AdapterView<?> arg0, View arg1,\n int position, long arg3) {\n // TODO Auto-generate2d method stub\n\nSingletonTracks.getInstance().setTrack(position);\n PlayingFragment fragment = new PlayingFragment();\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\n transaction.replace(R.id.fragement_container, fragment);\n transaction.addToBackStack(null);\n transaction.commit();\n\n\n }\n });\n\n return v;\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_list_view_slide_item, container, false);\n\n listView = (RadListView)rootView.findViewById(R.id.listView);\n\n if(savedInstanceState != null) {\n destination = savedInstanceState.getParcelable(\"currentAttraction\");\n }\n\n if(destination == null) {\n return rootView;\n }\n\n ListViewAdapter adapter = new ListViewAdapter(destination.attractions);\n listView.setAdapter(adapter);\n\n View headerView = inflater.inflate(R.layout.listview_slideitem_header, listView, false);\n\n titleView = (TextView)headerView.findViewById(R.id.title);\n titleView.setText(destination.title);\n titleView.setTextColor(destination.color);\n\n contentView = (TextView)headerView.findViewById(R.id.content);\n contentView.setText(destination.info);\n\n TextView attractionsView = (TextView)headerView.findViewById(R.id.attractions);\n attractionsView.setTextColor(destination.color);\n\n listView.setHeaderView(headerView);\n\n FloatingActionButton fab = (FloatingActionButton)rootView.findViewById(R.id.fab);\n fab.getBackground().setColorFilter(destination.color, PorterDuff.Mode.SRC_IN);\n fab.setRippleColor(destination.color);\n\n View line = rootView.findViewById(R.id.line);\n line.setBackgroundColor(destination.color);\n\n fab.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Toast.makeText(getActivity(), \"Enquiry sent.\", Toast.LENGTH_SHORT).show();\n }\n });\n\n image = (ImageView)rootView.findViewById(R.id.image);\n image.setImageResource(destination.src);\n\n CollapsingToolbarLayout collapsingToolbar = (CollapsingToolbarLayout) rootView.findViewById(R.id.collapsing_toolbar_layout);\n collapsingToolbar.setContentScrimColor(destination.color);\n\n Toolbar toolbar = (Toolbar) rootView.findViewById(R.id.toolbar);\n toolbar.setNavigationIcon(R.drawable.icon_arrow);\n toolbar.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n getFragmentManager().popBackStack();\n }\n });\n\n return rootView;\n }",
"public TournListFragment (){\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_start, container, false);\n\n mLvAps = (ListView) view.findViewById(R.id.lvAps);\n mScanResults = new ArrayList<ScanResult>();\n mApAdapter = new ApAdapter(mActivity, mScanResults);\n mLvAps.setAdapter(mApAdapter);\n\n mBtnSend = (Button) view.findViewById(R.id.btnSend);\n mBtnSend.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n ((MyActivity) mActivity).getSupportFragmentManager().beginTransaction().replace(R\n .id.container, FileFragment.newInstance(\"arg\",\n \"arg\")).addToBackStack(\"FileFragment\").commit();\n }\n });\n mBtnReceive = (Button) view.findViewById(R.id.btnReceive);\n mBtnReceive.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n }\n });\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view =inflater.inflate(R.layout.fragment_inquilinos, container, false);\n ListView listView= view.findViewById(R.id.listView);\n\n inquilinos_list.add(new Inquilino_item(\"37505068\",\"Martin\",\"colombo\",\"san martin 827\",\"2657601495\"));\n inquilinos_list.add( new Inquilino_item(\"34505068\",\"Valeria\",\"Veneciano\",\"muelleady 163 depto 30\",\"2657601495\"));\n ArrayAdapter<Inquilino_item> adapter = new InquilinoAdapter(getContext(),R.layout.inquilino_item,inquilinos_list,getLayoutInflater());\n listView.setAdapter(adapter);\n ((Principal) getActivity()).getSupportActionBar().setTitle(\"Inquilinos\");\n return view ;\n }",
"@Override\n\tprotected Fragment createFragment() {\n\t\t// TODO Auto-generated method stub\n\t\t//Log.d(TAG, \"this is CrimeListActivity \", new Exception());\n\t\treturn new CrimeListFragment();\n\t\t\n\t}",
"@Nullable\n @Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View mview = inflater.inflate(R.layout.fragment_listofpeople,container,false);\n //init views\n\n\n initview(mview);\n //getting users list\n get_userslist();\n //initiliziting adapters\n loadadapterdatas();\n //set on click listeners\n onclickslisteners();\n return mview;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_detail_list, container, false);\n\n getViews(view);\n\n setInfo();\n\n setListeners();\n\n return view;\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tView view=inflater.inflate(R.layout.fragment03, container,false);\n\t\tlv = (ListView) view.findViewById(R.id.lv);\n\t\tSQLiteReadHelper03 helper=new SQLiteReadHelper03(getActivity(),\"picture\",R.raw.picture);\n\t\tpictureList=(ArrayList<Picture1>) helper.getDatabaseData();\n//\t\tLog.i(\"mytag\", pictureList.toString());\n\t\tlv.setAdapter(new MyAdapter(getActivity(), pictureList));\n\t\treturn view;\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_traditional, container, false);\n\n ArrayList<TraditionalfoodClass> trad_food = new ArrayList<TraditionalfoodClass>();\n trad_food.add(new TraditionalfoodClass(\"Karahi\", \"1250 Rs\", R.drawable.karahi,\"0\"));\n trad_food.add(new TraditionalfoodClass(\"Biryani\", \"150 Rs\", R.drawable.biryani,\"0\"));\n trad_food.add(new TraditionalfoodClass(\"Malai Boti\", \"450 Rs\", R.drawable.malaiboti,\"0\"));\n trad_food.add(new TraditionalfoodClass(\"Seekh Kabab\", \"400 Rs\", R.drawable.kabab,\"0\"));\n trad_food.add(new TraditionalfoodClass(\"Tikka\", \"250 Rs\", R.drawable.tikka,\"0\"));\n trad_food.add(new TraditionalfoodClass(\"Sajji\", \"1550 Rs\", R.drawable.sajjione,\"0\"));\n\n TraditionalFoodAdapter tradfoodadapter = new TraditionalFoodAdapter(getActivity(),trad_food);\n\n ListView listView = (ListView) view.findViewById(R.id.listview_traditional);\n listView.setAdapter(tradfoodadapter);\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.word_list, container, false);\n\n\n\n\n final ArrayList<PrayTimeData> prayds = new ArrayList<PrayTimeData>();\n prayds.add(new PrayTimeData(\"الفجر \" ));\n prayds.add(new PrayTimeData(\"ألظهر \"));\n prayds.add(new PrayTimeData(\"العصر \"));\n prayds.add(new PrayTimeData(\"المغرب \"));\n prayds.add(new PrayTimeData(\"العشاء \"));\n\n\n // Create link PrayerAdapter has data source is a list of\n // adapter create list items for each item in the list.\n PrayerAdapter adapter = new PrayerAdapter(getActivity(), prayds, R.color.category_colors);\n\n /* ListView with the view ID called list, which is declared in the\n list.xml layout file.*/\n ListView listView = (ListView) rootView.findViewById(R.id.List);\n\n\n // ListView use the link WordAdapter created above\n // so link ListView} will display list items for each link Word in the list.\n listView.setAdapter(adapter);\n\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_listas, container, false);\n unbinder = ButterKnife.bind(this, view);\n //ViewPager viewPager = (ViewPager) view.findViewById(R.id.viewpager);\n setupViewPager(viewPager);\n // Set Tabs inside Toolbar\n //TabLayout tabs = (TabLayout) view.findViewById(R.id.tabs);\n tabs.setupWithViewPager(viewPager);\n //setupViewPager2(viewpager);\n // tabs.setupWithViewPager(viewpager);\n return view;\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_home_tab, container, false);\n nw = (RecyclerView) view.findViewById(R.id.new_list);\n pw = (RecyclerView) view.findViewById(R.id.popular_list);\n ns = (RecyclerView) view.findViewById(R.id.new_writer_list);\n ps = (RecyclerView) view.findViewById(R.id.popular_writer_list);\n setHasOptionsMenu(true);\n getActivity().invalidateOptionsMenu();\n listSetup(nw);\n listSetup(pw);\n listSetup(ns);\n listSetup(ps);\n return view;\n }",
"@Override\n \tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n \t\t\tBundle savedInstanceState) {\n \t\treturn inflater.inflate(R.layout.list, container, false);\n \t}",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tView v = inflater.inflate(R.layout.layout_listview, null);\n\t\tlv = (ListView) v.findViewById(R.id.lv);\n\n\t\t// ColorDrawable color_divider = new ColorDrawable(R.color.transparent);\n\t\t// lv.setDivider(color_divider);\n\t\tlv.setDividerHeight(1);\n\n//\t\tArrayList<RowData_Program> datanya = new ArrayList<RowData_Program>();\n//\t\tdatanya.add(new RowData_Program(\"\", \"Beasiswa Fakultas Teknik\", \"Rp 17.000.000/~\", \"\", \"\",\n//\t\t\t\t\"Beasiswa untuk para mahasiswa berprestasi yang kurang mampu\",\n//\t\t\t\t\"http://128.199.176.5/UI/admin/files/original/55e6c977b6d8d.jpg\"));\n//\t\tdatanya.add(new RowData_Program(\"\", \"Perpustakaan Keliling\", \"Rp 3.000.000/Rp 800.000.000\", \"\", \"\",\n//\t\t\t\t\"Perpustakaan keliling untuk anak anak\",\n//\t\t\t\t\"http://128.199.176.5/UI/admin/files/original/55d5a3f122e4a.jpg\"));\n//\t\tdatanya.add(new RowData_Program(\"\", \"Pembangunan Bangunan Baru\", \"Rp 90.500.000/Rp 780.000.000\", \"\", \"\",\n//\t\t\t\t\"Bangunan baru untuk perkuliahan\", \"http://128.199.176.5/UI/admin/files/original/55d5a3e18ce07.png\"));\n//\n//\t\tadapter = new CustomAdapter_Program(getActivity(), 0, datanya);\n//\t\tlv.setAdapter(adapter);\n\n\n//\t\tnew AsyncTask_AllProgram().execute();\n\t\tnew AsyncTask_AllProgram().execute();\n\n\t\treturn v;\n\t}",
"@Override\n public View onCreateView (LayoutInflater inflater, ViewGroup container, Bundle saveInstanceState ){\n View rootView = inflater.inflate(R.layout.activity_fragment_1,container,false);\n ListView listView = (ListView) rootView.findViewById(R.id.ListView);\n\n listView.setAdapter(new PuntosAdapter(getActivity(),PuntoProvide.GetPlanetas(),PuntoProvide.Descripcion()));\n listView.setOnItemClickListener(this);\n\n return rootView;\n }",
"@Override\n public void onClick(View v) {\n\n final ListModel LM = new ListModel();\n LM.strMainAsset=\"images/custom/custom_main.png\";\n LM.strListName=((EditText)V.findViewById(R.id.edit_list_create_name)).getText().toString();\n LM.strRowThImage=\"images/custom/custom_th.png\";\n LM.strRowImage=null;\n \n// LM.strRowBGImage=\"images/custom/custom_content.png\";\n\n ListItemRowModel LIM=new ListItemRowModel(AppState.getInstance().CurrentProduct.strId);\n\n LM.items.add(LIM);\n\n //add it to my lists\n AppState.getInstance().myList.items.add(LM);\n\n //set the title\n ((TextView)V.findViewById(R.id.text_list_add_create)).setText(\"List Created!\");\n\n\n\n //show the created layout\n LinearLayout layoutCreated=(LinearLayout)V.findViewById(R.id.layout_add_list_created);\n layoutCreated.setVisibility(View.VISIBLE);\n layoutCreated.setAlpha(0f);\n layoutCreated.animate().alpha(1).setDuration(300);\n\n\n //hide the form\n V.findViewById(R.id.layout_create_form).setVisibility(View.GONE);\n\n //set the propper title\n ((TextView)V.findViewById(R.id.text_list_created)).setText(LM.strListName);\n\n //set public or not\n if(!((CheckBox)V.findViewById(R.id.checkbox_add_list_create)).isChecked())\n ((TextView) V.findViewById(R.id.text_list_created_public)).setText(\"This list is public\");\n else\n ((TextView) V.findViewById(R.id.text_list_created_public)).setText(\"This list is private\");\n\n\n V.findViewById(R.id.btn_view_created).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dismiss();\n\n AppState.getInstance().CurrentList=LM;\n ListViewFragment listViewFragment= new ListViewFragment();\n\n Bundle args = new Bundle();\n args.putInt(ListFragment.ARG_PARAM1, R.layout.layout_list);\n args.putString(ListFragment.ARG_PARAM2, \"list\");\n listViewFragment.setArguments(args);\n\n ((MainActivity)getActivity()).setFragment(listViewFragment, FragmentTransaction.TRANSIT_FRAGMENT_OPEN,false);\n }\n });\n\n\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tView mainView = inflater.inflate(R.layout.dayplanfragment_layout, container, false);\r\n\t\tlistView = (ListView)mainView.findViewById(android.R.id.list);\r\n\t\t\r\n\t\tmbtn_add = (Button)mainView.findViewById(R.id.btn_add_plan);\t\t\r\n\t\tmbtn_add.setOnClickListener(btn_add_l);\t\r\n\t\t\r\n\t\tdateTextView = (TextView)mainView.findViewById(R.id.date_textview);\r\n\t\tdateTextView.setOnClickListener(new OnClickListener() {\r\n\t\t\t//选择时间\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tnew CreateTimeDialog( getActivity() , PlanFragment.this ).getDate();\r\n\t\t\t}\r\n\t\t});\r\n\t\tdateTextView.setText(dateString);\r\n\t\tnoteGlobal.getPlan(dateTextView.getText().toString());\r\n\t\t\r\n\t\taddPlan_View(); //加载计划\r\n\t\t\r\n\t\t//设置日期(显示今天的日期)\r\n\t\t\r\n\t\t\r\n\t\t\r\n \treturn mainView;\r\n\t}",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tView layout = inflater.inflate(R.layout.fragment_assistant, container, false);\r\n\t\tlayout.findViewById(R.id.kaniu).setOnClickListener(this);\r\n\t\tlayout.findViewById(R.id.img_add).setOnClickListener(this);\r\n\t\tinitListView(layout);\r\n\t\treturn layout;\r\n\t}",
"@Nullable\n @Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.mainpage_farmland_fragment,container,false);\n// btmenu = view.findViewById(R.id.menu);\n// btmenu.setTypeface(MyApplication.iconTypeFace);\n btaddfarm = view.findViewById(R.id.addfarm);\n btaddfarm.setTypeface(MyApplication.iconTypeFace);\n springView= view.findViewById(R.id.springview);\n recyclerView= view.findViewById(R.id.recyclerView);\n staticInfo = view.findViewById(R.id.staticinfo);\n\n springView.setHeader(new DefaultHeader(this.getActivity()));\n springView.setFooter(new DefaultFooter(this.getActivity()));\n\n adapter = new RecyclerviewAdapter(this.getActivity(), listData);\n recyclerView.setLayoutManager(new LinearLayoutManager(this.getActivity()));\n recyclerView.setAdapter(adapter);\n\n\n springView.setListener(new SpringView.OnFreshListener() {\n @Override\n public void onRefresh() {\n pageidx = 1;\n listData.clear();\n requestFieldlist();\n }\n\n @Override\n public void onLoadmore() {\n requestFieldlist();\n\n }\n });\n\n\n initlistener();\n\n requestFieldlist();\n\n return view;\n }",
"public void createFragment() {\n\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tview=inflater.inflate(R.layout.activity_list_holiday, container, false);\r\n\t\tsetHasOptionsMenu(true);\r\n\t\tmListener.onFragmentAttached(false,\" Scheduler\");\r\n\t\tisAddingHoliday=false;\r\n\t\tholidayList=new SchedularHolidayList();\r\n\t\tserviceMethod=new ServiceMethod();\r\n\t\tshowMessage=new ShowMessages(getActivity());\r\n\t\tcheckNetwork=new CheckNetwork();\r\n\r\n\r\n\r\n\t\tlistView=(ListView) view.findViewById(R.id.holidayNmaeList);\r\n\r\n\r\n\r\n\r\n\t\taddHolidayImage= (ImageView) view.findViewById(R.id.addHolidayImage);\r\n\t\taddHoliday_text=(TextView) view.findViewById(R.id.addHoliday_text);\r\n\t\ttypeFace.setTypefaceLight(addHoliday_text);\r\n\r\n\t\taddHolidayImage.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t\tisAddingHoliday=true;\r\n\t\t\t\tholidayDesc=\"\";\r\n\t\t\t\tif(!StaticVariables.isFromSettingsScreen)\r\n\t\t\t\t{\r\n\t\t\t\t\tStaticVariables.fragmentIndexCurrentTabSchedular=81;\r\n\r\n\t\t\t\t\tswitchingFragments(new HolidayDetailsFragment());\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tStaticVariables.fragmentIndexCurrentTabSettings=202;\r\n\t\t\t\t\tswitchingFragmentsSettings(new HolidayDetailsFragment());\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\taddHoliday_text.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t\tholidayDesc=\"\";\r\n\t\t\t\tisAddingHoliday=true;\r\n\t\t\t\tif(!StaticVariables.isFromSettingsScreen)\r\n\t\t\t\t{\r\n\t\t\t\t\tStaticVariables.fragmentIndexCurrentTabSchedular=81;\r\n\r\n\t\t\t\t\tswitchingFragments(new HolidayDetailsFragment());\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tStaticVariables.fragmentIndexCurrentTabSettings=202;\r\n\t\t\t\t\tswitchingFragmentsSettings(new HolidayDetailsFragment());\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\r\n\t\tnew GetHolidayList().execute();\r\n\r\n\t\treturn view;\r\n\t}",
"private void initFragments() {\n\t\tZhiBoFragment zhiBoFragment = ZhiBoFragment.newInstance(null);\n\t\tzhiBoFragment.setSquareFragmentListener(this);\n\t\tLiaotianFragment liaotianFragment = LiaotianFragment.newInstance(null);\n\t\tliaotianFragment.setSquareFragmentListener(this);\n\t\tfragments.add(zhiBoFragment);\n\t\tfragments.add(liaotianFragment);\n\t\t\n\t\t\n\t}",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\t\n\t\tcontentView = inflater.inflate(R.layout.fragment_qiangcontent, null);\n\t\tmPullRefreshListView = (PullToRefreshListView)contentView\n\t\t\t\t.findViewById(R.id.pull_refresh_list);\n\t\t\n\t\tbt_fragment_arc_menu = (RayMenu) contentView.findViewById(R.id.bt_fragment_arc_menu);\n\t\t//初始化arc_menu并设置监听\n\t\t\t\t\t\tinitArcMenu(bt_fragment_arc_menu, ITEM_DRAWABLES);\n\t\t\t\t\n\t\tnetworkTips = (TextView)contentView.findViewById(R.id.networkTips);\n\t\tprogressbar = (ProgressBar)contentView.findViewById(R.id.progressBar);\n\t\tmPullRefreshListView.setMode(Mode.BOTH);\n\t\tmPullRefreshListView.setOnRefreshListener(new OnRefreshListener2<ListView>() {\n\n\t\t\t@Override\n\t\t\tpublic void onPullDownToRefresh(PullToRefreshBase<ListView> refreshView) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tString label = DateUtils.formatDateTime(getActivity(), System.currentTimeMillis(),\n\t\t\t\t\t\tDateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_ABBREV_ALL);\n\t\t\t\trefreshView.getLoadingLayoutProxy().setLastUpdatedLabel(label);\n\t\t\t\tmPullRefreshListView.setMode(Mode.BOTH);\n\t\t\t\tpullFromUser = true;\n\t\t\t\tmRefreshType = RefreshType.REFRESH;\n\t\t\t\tpageNum = 0;\n\t\t\t\tlastItemTime = getCurrentTime();\n\t\t\t\taddheaderview.Refresh();\n\t\t\t\tfetchData();\n\t\t\t\t\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onPullUpToRefresh(PullToRefreshBase<ListView> refreshView) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tmRefreshType = RefreshType.LOAD_MORE;\n\t\t\t\tfetchData();\n\t\t\t}\n\t\t});\n\t\tmPullRefreshListView.setOnLastItemVisibleListener(new OnLastItemVisibleListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onLastItemVisible() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tactualListView = mPullRefreshListView.getRefreshableView();\n\t\tmListItems = new ArrayList<QiangYu>();\n\t\tmAdapter = new AIContentAdapter(mContext, mListItems,downloadManager);\n\t\tactualListView.setAdapter(mAdapter);\n\t\t//添加顶部广告轮播\n\t\taddheaderview=new HeaderViewpager(mContext, actualListView);\n\t\taddheaderview.addHeadView();\n\t\taddheaderview.startchange();\n\t\tif(mListItems.size() == 0){\n\t\t\tfetchData();\n\t\t}\n\t\tmPullRefreshListView.setState(State.RELEASE_TO_REFRESH, true);\n\t\tactualListView.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\t// TODO Auto-generated method stub\n//\t\t\t\tMyApplication.getInstance().setCurrentQiangYu(mListItems.get(position-1));\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(getActivity(), CommentActivity.class);\n\t\t\t\tintent.putExtra(\"data\", mListItems.get(position-2));\n\t\t\t\tstartActivity(intent);\n\t\t\t\tgetActivity().overridePendingTransition (R.anim.open_next, R.anim.close_main);\n\n\t\t\t}\n\t\t});\n\t\treturn contentView;\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View view = inflater.inflate(R.layout.fragment_nhiemvu, container, false);\n // set Context\n context = view.getContext();\n // get connect database\n conectDatabase = new ConectDatabase(context);\n\n arrayList = conectDatabase.getAllMission();\n\n // find ID\n btAdd = (Button) view.findViewById(R.id.btAdd);\n listMission = (ListView) view.findViewById(R.id.listViewMission);\n finishList = (ListView) view.findViewById(R.id.finistList);\n linearLayout = view.findViewById(R.id.formIPMission);\n btAddFinish = view.findViewById(R.id.btAddMission);\n edtIpMission = view.findViewById(R.id.edtIPMission);\n btTime = view.findViewById(R.id.btTime);\n bottomsheet = view.findViewById(R.id.bottom_sheet);\n sheetBehavior = BottomSheetBehavior.from((bottomsheet));\n //set Layout\n setLayout();\n // set Action;\n setAction();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_detail, container, false);\n TextView textViewWord=(TextView)view.findViewById(R.id.word);\n TextView textViewMeaning=(TextView)view.findViewById(R.id.wordmeaning);\n TextView textViewSample=(TextView)view.findViewById(R.id.wordsample);\n switch (mParam1){\n case \"1\":\n textViewWord.setText(\"apple\");\n textViewMeaning.setText(\"苹果\");\n textViewSample.setText(\"Apple hit Newton on the head.\");\n break;\n case \"2\":\n textViewWord.setText(\"Banana\");\n textViewMeaning.setText(\"香蕉\");\n textViewSample.setText(\"This orange is very nice.\");\n break;\n case \"3\":\n textViewWord.setText(\"Cral\");\n textViewMeaning.setText(\"螃蟹\");\n textViewSample.setText(\"Thousands of herring and crab are washed up on the beaches during every storm.\");\n break;\n case \"4\":\n textViewWord.setText(\"infer\");\n textViewMeaning.setText(\"推断,猜测\");\n textViewSample.setText(\"be inferred from context\");\n }\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_during_pregnancy, container, false);\n String [] tips= getResources().getStringArray(R.array.care_during_pregnancy);\n adapter = new ArrayAdapter<String>(getActivity(),android.R.layout.simple_list_item_1,tips);\n\n lv_after_birth = view.findViewById(R.id.lvAfter);\n\n lv_after_birth.setAdapter(adapter);\n\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View vista =inflater.inflate(R.layout.fragment_lista, container, false);\n lista = (ListView) vista.findViewById(R.id.listview);\n AdministrarBaseDeDatos admindb = new AdministrarBaseDeDatos(getContext(), \"dbasignaturas\", null, 1);\n asignaturas= admindb.llenar_listView();\n adaptador = new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1,asignaturas);\n lista.setAdapter(adaptador);\n\n\n\n return vista;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n this.view = inflater.inflate(R.layout.list_fragment, container, false);\n this.userList = this.view.findViewById(R.id.list);\n TextView listHeader = this.view.findViewById(R.id.list_header);\n listHeader.setText(this.pageType);\n this.swipeContainer = this.view.findViewById(R.id.swipe_container);\n this.swipeContainer.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n loadList();\n }\n });\n loadList(); //load the list in the listview\n return this.view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.core_main_frag_list, container, false);\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View fragmentView = inflater.inflate(R.layout.fragment_editperfil_fragment_interest, container, false);\n\n\n ListView interestListView = (ListView) fragmentView.findViewById(R.id.fefi_lv_interestList);\n listAdapter = new FragmentEditPerfilInterestListAdapter(getContext());\n interestListView.setOnItemClickListener(this);\n interestListView.setAdapter(listAdapter);\n\n buildInterestList();\n\n return fragmentView;\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater,\n\t\t\t@Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n\t\tView view = inflater.inflate(R.layout.fragment_me, null);\n\t\t// 设置\n\t\tLinearLayout line_setting = (LinearLayout) view\n\t\t\t\t.findViewById(R.id.line_setting);\n\t\t// 头像\n\t\timg_circle = (CircleImageView) view.findViewById(R.id.img_circle);\n\t\t// vip标志\n\t\tiv_vip = (ImageView) view.findViewById(R.id.iv_vip);\n\t\t// 昵称\n\t\tline_nicheng = (LinearLayout) view.findViewById(R.id.line_nicheng);\n\t\ttv_nicheng = (TextView) view.findViewById(R.id.tv_nicheng);\n\t\t// VIP时间\n\t\trel_viptime = (RelativeLayout) view.findViewById(R.id.rel_viptime);\n\t\ttv_viptime = (TextView) view.findViewById(R.id.tv_viptime);\n\t\tline_viptime = (LinearLayout) view.findViewById(R.id.line_viptime);\n\t\t// 续费\n\t\ttv_xufei = (TextView) view.findViewById(R.id.tv_xufei);\n\t\t// 已关联手机\n\t\tline_bangdingphone = (LinearLayout) view\n\t\t\t\t.findViewById(R.id.line_bangdingphone);\n\t\ttv_bangdingphone = (TextView) view.findViewById(R.id.tv_bangdingphone);\n\t\t//升级成为vip\n\t\ttv_shengji = (TextView) view.findViewById(R.id.tv_shengji);\n\t\t// 默认收货地址\n\t\tline_morendizhi = (LinearLayout) view\n\t\t\t\t.findViewById(R.id.line_morendizhi);\n\t\ttv_morendizhi = (TextView) view.findViewById(R.id.tv_morendizhi);\n\t\t// 餐餐券\n\t\tLinearLayout line_ccq = (LinearLayout) view.findViewById(R.id.line_ccq);\n\t\ttv_ccj = (TextView) view.findViewById(R.id.tv_ccj);\n\t\t// 收藏店铺\n\t\tLinearLayout line_scstore = (LinearLayout) view.findViewById(R.id.line_scstore);\n\t\ttv_scdp = (TextView) view.findViewById(R.id.tv_scdp);\n\t\t// 余额\n\t\tLinearLayout line_yue = (LinearLayout) view.findViewById(R.id.line_yue);\n\t\ttv_yue = (TextView) view.findViewById(R.id.tv_yue);\n\t\t// 云币\n\t\tLinearLayout line_yunbi = (LinearLayout) view.findViewById(R.id.line_yunbi);\n\t\ttv_yunbi = (TextView) view.findViewById(R.id.tv_yunbi);\n\t\t// 个人资料\n\t\tLinearLayout line_grzl = (LinearLayout) view\n\t\t\t\t.findViewById(R.id.line_grzl);\n\t\t// 收货地址管理\n\t\tLinearLayout line_shdzgl = (LinearLayout) view\n\t\t\t\t.findViewById(R.id.line_shdzgl);\n\t\t// 我的订单\n\t\tLinearLayout line_wddd = (LinearLayout) view\n\t\t\t\t.findViewById(R.id.line_wddd);\n\t\t// 云币管理\n\t\tLinearLayout line_ybgl = (LinearLayout) view\n\t\t\t\t.findViewById(R.id.line_ybgl);\n\t\t// 资金管理\n\t\tLinearLayout line_zjgl = (LinearLayout) view\n\t\t\t\t.findViewById(R.id.line_zjgl);\n\t\t// 最新消息\n\t\tLinearLayout line_zxxx = (LinearLayout) view\n\t\t\t\t.findViewById(R.id.line_zxxx);\n\t\tiv_zxxx = (ImageView) view.findViewById(R.id.iv_zxxx);\n\t\t\n\t\t// 自己入驻\n\t\tLinearLayout line_zjrz = (LinearLayout) view\n\t\t\t\t.findViewById(R.id.line_zjrz);\n\t\t// 推荐朋友入驻\n\t\tLinearLayout line_tjpyrz = (LinearLayout) view\n\t\t\t\t.findViewById(R.id.line_tjpyrz);\n\t\t// 和小伙伴分享\n\t\tLinearLayout line_hxhbfx = (LinearLayout) view\n\t\t\t\t.findViewById(R.id.line_hxhbfx);\n\n\t\tmyDB = new DBHelper(getActivity());\n\t\tif (isLogin()) {\n\t\t\tshowLoading();\n\t\t\tmyInfoHttpPost(getActivity());\n\t\t} else {\n\t\t\ttv_nicheng.setText(\"未登录\");\n\t\t}\n\t\timg_circle.setOnClickListener(this);\n\t\tline_nicheng.setOnClickListener(this);\n\t\tline_bangdingphone.setOnClickListener(this);\n\t\tline_viptime.setOnClickListener(this);\n\t\tline_setting.setOnClickListener(this);\n\t\ttv_xufei.setOnClickListener(this);\n\t\ttv_shengji.setOnClickListener(this);\n\t\tline_morendizhi.setOnClickListener(this);\n\t\tline_grzl.setOnClickListener(this);\n\t\tline_shdzgl.setOnClickListener(this);\n\t\tline_wddd.setOnClickListener(this);\n\t\tline_ybgl.setOnClickListener(this);\n\t\tline_zjgl.setOnClickListener(this);\n\t\tline_zxxx.setOnClickListener(this);\n\t\tline_zjrz.setOnClickListener(this);\n\t\tline_tjpyrz.setOnClickListener(this);\n\t\tline_hxhbfx.setOnClickListener(this);\n\t\tline_ccq.setOnClickListener(this);\n\t\tline_scstore.setOnClickListener(this);\n\t\tline_yue.setOnClickListener(this);\n\t\tline_yunbi.setOnClickListener(this);\n\t\treturn view;\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_restraunts_list, container, false);\n //productList.setAdapter(new RestrauntAdapter());\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_want, container, false);\n recyclerView = (RecyclerView) view.findViewById(R.id.recyclerView);\n adapter = new ListAdapter();\n adapter.setData(datas);\n recyclerView.setAdapter(adapter);\n recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));\n\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n mView = inflater.inflate(R.layout.fragment_list_book, container, false);\n initViews();\n if(BuildConfig.enableDebugLogging) {\n Log.i(TAG, \"onCreateView\");\n }\n return mView;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View mView = View.inflate(getContext(), R.layout.newsfragment, null);\n mTab = (TabPageIndicator) mView.findViewById(R.id.news_indicator);//初始化标题栏\n mViewpager = (ViewPager) mView.findViewById(R.id.news_viewpager);//初始化Viewpager\n return mView;\n }",
"@Override public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_contentslist, container, false);\n //View tv = v.findViewById(R.id.text);\n //((TextView)tv).setText(mLabel != null ? mLabel : \"(no label)\");\n //tv.setBackgroundDrawable(getResources().getDrawable(android.R.drawable.gallery_thumb));\n webView = (WebView)v.findViewById(ddoba.android.lwsoft.ddoba.R.id.webView);\n\n customViewContainer = (FrameLayout) v.findViewById(ddoba.android.lwsoft.ddoba.R.id.customViewContainer);\n mWebViewClient = new myWebViewClient();\n webView.setWebViewClient(mWebViewClient);\n\n mWebChromeClient = new myWebChromeClient();\n webView.setWebChromeClient(mWebChromeClient);\n\n //MainActivity.setWebViewSettings(webView);\n setwebsetting(webView);\n\n\n webView.loadUrl(\"http://www.dasibogi.com/\");\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_che_yuan_list, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n initListener();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_shopping_list, container, false);\n recyclerView = view.findViewById(R.id.recyclerView);\n recyclerView.setHasFixedSize(true);\n recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));\n\n listitems = new ArrayList<>();\n for (int i = 0; i < 10; i++) {\n ListItem listItem = new ListItem(\n \"Item\" + i + 1,\n \"1000\"\n );\n listitems.add(listItem);\n }\n adapter = new MyAdapter(listitems, getContext());\n text = view.findViewById(R.id.textView2);\n\n recyclerView.setAdapter(adapter);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_space_members, container, false);\n\n\n AndroidSupportInjection.inject(this);\n mList = new ArrayList<>();\n\n\n initializeViews(view);\n\n\n\n\n subscribeForSpaceId();\n\n setUpRecyclerView(recyclerView, adapter);\n\n subscribeObserverForSpaceMembers();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n {\n View view = inflater.inflate(R.layout.fragment_1, container, false);\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(getActivity(),\n android.R.layout.simple_list_item_1,Options);\n setListAdapter(adapter);\n return view;\n\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final Mesas mesas = Mesas.getInstance();\n\n // Inflate the layout for this fragment\n View root = inflater.inflate(R.layout.fragment_mesas, container, false);\n\n //accedo a las mesas, ya tengo acceso al array\n ListView list = (ListView) root.findViewById(android.R.id.list);\n\n //creamos un adaptador para darselo a la lista y que sepa que datos mostrar\n\n ArrayAdapter<Mesa> adapter = new ArrayAdapter<Mesa>(getActivity(), android.R.layout.simple_list_item_1,mesas.getMesas());\n\n //le asignamos el adaptador a la vista;\n list.setAdapter(adapter);\n\n //para enterarnos de que pulsan sobre una celda, hay que ...\n list.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n //le digo a mi actividad que han pulsado una celda\n //compruebo que estoy enganchado a la actividad ( con el onAttach )\n if ( mMesasListListener != null ){\n //aviso al listener\n //obtengo la mesa pulsada\n Mesa mesaSelected = mesas.getMesa(position);\n mMesasListListener.onMesaSelected(mesaSelected,position);\n\n\n }\n }\n });\n\n\n return root;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_list, container, false);\n itemRecyclerView = view.findViewById(R.id.fl_items_rv);\n itemRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));\n\n Calligrapher calligrapher = new Calligrapher(getActivity());\n calligrapher.setFont(getActivity(), \"rus.ttf\", true);\n\n init();\n\n itemRecyclerView.setAdapter(new ItemAdapter(getContext(), items, (MainActivity) getActivity()));\n\n return view;\n\n }",
"@Override\r\n \tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n \t\t\tBundle savedInstanceState) {\n \t\tv = inflater.inflate(R.layout.fragment_oweboard, container, false);\r\n \t\temptyView = (TextView) v.findViewById(R.id.empty_friendlist);\r\n \t\trAct = (RootActivity) getActivity();\r\n \t\tdb = rAct.database;\r\n \t\tsetTotalFriendListView();\r\n \t\tif (!MainActivity.isSinglePane) {\r\n \t\t\t// Set selector if in tab\r\n \t\t\tlistViewOwelist.setSelector(R.color.blue_header);\r\n \t\t}\r\n \t\ttotalFriends = (TextView) v.findViewById(R.id.listFriends);\r\n \t\t\r\n \t\tsetHasOptionsMenu(true);\r\n \t\t((MainActivity)getActivity()).getSupportActionBar().setDisplayHomeAsUpEnabled(false);\r\n \t\t((MainActivity)getActivity()).getSupportActionBar().setTitle(R.string.oweboard_title);\r\n \t\t//Utils.showLog(getClass().getSimpleName(), \"onCreateView() ends\", Log.VERBOSE);\r\n \t\treturn v;\r\n \t}",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tView view =inflater.inflate(R.layout.fragment_center_things, null);\n\t\tlv_things = (PullToRefreshListView) view.findViewById(R.id.lv_mycenter_things);\n\t\tfor(int i=0;i<5;i++){\n\t\t\tHashMap<String,Object> map =new HashMap<String, Object>();\n\t\t\tmap.put(\"test\", \"test\"+i);\n\t\t\tdata.add(map);\n\t\t}\n\t\tString[] from={};\n\t\tint[] to={};\n\t\tSimpleAdapter adapter = new SimpleAdapter(getActivity(), data, R.layout.info_item, from, to);\n\t\tlv_things.setAdapter(adapter);\n\t\tlv_things.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tstartTalkActivity();\n\t\t\t}\n\t\t});\n\t\treturn view;\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View retView = inflater.inflate(R.layout.fragment_food_list, container, false);\n\n\n //FragmentManager fragmentManager = this.getFragmentManager();\n //FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n //FoodFragment foodFragment = (FoodFragment)fragmentManager.findFragmentById(R.id.foodFragment);\n // fragmentTransaction.hide(foodFragment);\n //fragmentTransaction.commit();\n\n ImageButton newFood = (ImageButton) retView.findViewById(R.id.fragmentFoodListAddFoodButton);\n newFood.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n addFood(view);\n }\n });\n\n buildList(retView);\n return retView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_event_list, container, false);\n try {\n if(getArguments()!= null){\n //try to get data from addEventFragment\n EventListFragmentArgs args = EventListFragmentArgs.fromBundle(getArguments());\n //add the event into the model\n ModelDemo.instance.addEvent(args.getEvent());\n //refresh the adapter\n adapter.notifyDataSetChanged();\n }\n }catch (Exception e){}\n\n rv = view.findViewById(R.id.eventListFrag);\n rv.hasFixedSize();\n\n LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());\n rv.setLayoutManager(layoutManager);\n\n List<Event> data = ModelDemo.instance.getAllEvents();\n\n adapter = new EventAdapter();\n adapter.data = data;\n rv.setAdapter(adapter);\n\n adapter.setOnClickListener(new EventAdapter.OnItemClickListener() {\n @Override\n public void onItemClick(int position) {\n callback.onItemClickEvent(data.get(position));\n }\n });\n\n FloatingActionButton Fab= view.findViewById(R.id.addEventBtn);\n Fab.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Navigation.findNavController(view).navigate(R.id.actionEventListFrag_To_addEventFrag);\n }\n });\n return view;\n }",
"@Override\n public View initView() {\n View view = View.inflate(mContext, R.layout.tab_detail_pager, null);\n listview = (RefreshListView ) view.findViewById(R.id.listview);\n View topnewsView = View.inflate(mContext, R.layout.topnews, null);\n// 使用ButterKnife绑定XML文件\n //ButterKnife.bind(this, view);\n ButterKnife.bind(this, topnewsView);\n// 监听ViewPage页面的变化动态改变红点和标题\n viewpage.addOnPageChangeListener(new MyOnPageChangeListener());\n// 把顶部新闻模块以头的方式加载到ListView中\n// listview.addHeaderView(topnewsView);\n// ListView自定义方法\n listview.addTopNews(topnewsView);\n// 监听控件刷新\n listview.setOnRefreshListener(new MysetOnRefreshListener());\n// 设置单击监听\n listview.setOnItemClickListener(new MyOnItemClickListener());\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_news_tab, container, false);\n\n arrayList2=new ArrayList<>();\n arrayList2.add(\"Rahul\");\n arrayList2.add(\"danussh\");\n arrayList2.add(\"ds\");\n arrayList2.add(\"manish\");\n arrayList2.add(\"sreekanth\");\n arrayList2.add(\"sagar\");\n arrayList2.add(\"gowtham\");\n arrayList2.add(\"sandeep\");\n\n RecyclerView recyclerView=view.findViewById(R.id.recyclerview);\n Recycleadapter recycleadapter=new Recycleadapter(getContext(),arrayList2);\n LinearLayoutManager linearLayoutManager=new LinearLayoutManager(getContext());\n recyclerView.setLayoutManager(linearLayoutManager);\n\n recyclerView.setAdapter(recycleadapter);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_tiffin, container, false);\n\n tiffinRecyclerView = view.findViewById(R.id.tiffin_recycler_view);\n seeLocation=view.findViewById(R.id.TextView_Location);\n tiffinNamesList = new ArrayList<>();\n tiffinImageUrlsList = new ArrayList<>();\n\n addTiffinToArrayListFunc();\n initializeTiffinRecyclerViewFunc();\n\n return view;\n }",
"@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tLayoutInflater inflater = getActivity().getLayoutInflater();\r\n\t\tmMainView = inflater.inflate(R.layout.three, (ViewGroup) getActivity()\r\n\t\t\t\t.findViewById(R.id.vp), false);\r\n\t\tlv1 = (ListView) mMainView.findViewById(R.id.lv1);\r\n\t\tinitview();\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.list_item, container, false);\n\n // Create a list of items\n final ArrayList<Item> items = new ArrayList<Item>();\n\n items.add(new Item(getResources().getString(R.string.about_1),getResources().getString(R.string.about_1_1),R.drawable.bydgoszcz_logo));\n items.add(new Item(getResources().getString(R.string.about_2),getResources().getString(R.string.about_2_1)));\n items.add(new Item(getResources().getString(R.string.about_3),getResources().getString(R.string.about_3_1)));\n items.add(new Item(getResources().getString(R.string.about_4),getResources().getString(R.string.about_4_1)));\n\n // Create an {@link ItemAdapter}, whose data source is a list of {@link Item}s.\n ItemAdapter adapter = new ItemAdapter(getActivity(), items, R.color.tan_background);\n\n // Find the {@link ListView} object in the view hierarchy of the {@link Activity}.\n ListView listView = (ListView) rootView.findViewById(R.id.list);\n\n listView.setAdapter(adapter);\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n mRootView = inflater.inflate(R.layout.fragment_list_edit, container, false);\n\n ListView itemList = (ListView) mRootView.findViewById(R.id.listItems);\n if (mSelectedList != null) {\n mListItems = DBHelper.getInstance(getActivity()).getItems(mSelectedList.getLocalDBKey());\n } else {\n mListItems = new ArrayList<ListItem>();\n }\n mAdapter = new ItemListEditAdapter(getActivity(), mListItems);\n itemList.setAdapter(mAdapter);\n registerForContextMenu(itemList);\n\n ImageButton btnAddList = (ImageButton) mRootView.findViewById(R.id.btnAddItem);\n btnAddList.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n onButtonAddItemClick();\n }\n });\n\n return mRootView;\n }",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_yester, container, false);\r\n final utility.util ut = new utility.util();\r\n ut.populatelistview(0,view);\r\n ListView lv= (ListView) view.findViewById(R.id.listView);\r\n lv.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {\r\n @Override\r\n public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {\r\n ut.OnclickforListviews(view,-1);\r\n return false;\r\n }\r\n });\r\n return view;\r\n\r\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_upload_new, container, false);\n findViewByIds(view);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_simplelistview_test, container, false);\n }",
"@Override\n public View onCreateView(final LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.list_pager_fragment,\n container, false);\n swipeContainer = (SwipeRefreshLayout) view.findViewById(R.id.container);\n position = getArguments().getInt(Constant.FRAGMENT_POS);\n\n LayoutInflater footerInflater = LayoutInflater.from(getActivity());\n listFooter = footerInflater.inflate(R.layout.list_footer, null, false);\n listFooter.setVisibility(View.GONE);\n listView = (ListView) view.findViewById(R.id.list);\n parentFragment = (InvoiceList) getParentFragment();\n listView.addFooterView(listFooter);\n db = new DatabaseHelper(context);\n\n adapter = new InvoiceListPagerFragmentListAdapter(context);\n listView.setAdapter(adapter);\n\n listFooter.setOnClickListener(null);\n\n swipeContainer.setOnRefreshListener(new OnRefreshListener() {\n @Override\n public void onRefresh() {\n\n try {\n\n if (parentFragment.isSearchEnable) {\n parentFragment.isSearchEnable = false;\n parentFragment.searchCancelImg.setVisibility(View.GONE);\n parentFragment.searchEt.setText(\"\");\n }\n if (parentFragment.isFilterEnable)\n parentFragment.isFilterEnable = false;\n\n getInvoiceList(1, SERVICE_TYPE.GET_UPPER_DATA, false,\n InvoiceList.content[position]);\n } catch (JSONException e) {\n\n e.printStackTrace();\n }\n }\n });\n\n swipeContainer.setColorSchemeResources(\n android.R.color.holo_orange_dark,\n android.R.color.holo_green_light,\n android.R.color.holo_blue_bright,\n android.R.color.holo_red_light);\n\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n\n if (position >= adapter.InvoicesList.size()) return;\n Bundle arguments = new Bundle();\n System.out.println(\"Id1:\" + adapter.InvoicesList.get(position).getInvoice_id());\n arguments.putString(Constant.KEY_INVOICE_ID, adapter.InvoicesList.get(position).getInvoice_id());\n arguments.putString(Constant.KEY_INVOICE_STATUS, content[parentFragment.selectedPagePosition]);\n arguments.putInt(Constant.KEY_POSITION, 1);\n\n if (global.isNetworkAvailable()) {\n fragmentChanger.onFragmentAddWithBackStack(new InvoicePreviewCreateFragment(), Constant.InvoicePreviewCreateFragmentTag, arguments);\n } else global.showAlert(Constant.NO_CONNECTION_MESSAGE, context);\n\n }\n });\n\n listView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {\n @Override\n public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {\n if (!global.isNetworkAvailable()) {\n global.showAlert(Constant.NO_CONNECTION_MESSAGE, context);\n return true;\n }\n\n /* if (isActionPopOpen)\n return true;*/\n\n\n isActionPopOpen = true;\n parentFragment.actionRelative.setVisibility(View.VISIBLE);\n parentFragment.invoiceId = adapter.InvoicesList.get(position).getInvoice_id();\n parentFragment.InvoiceNoTV.setText(\"Invoice no : \" + adapter.InvoicesList.get(position).getInvoice_no());\n parentFragment.position = position;\n\n if(adapter.InvoicesList.get(position).getInvoice_status().equalsIgnoreCase(\"Paid\"))\n parentFragment.offlinePaymentLiner.setVisibility(View.GONE);\n else\n parentFragment.offlinePaymentLiner.setVisibility(View.VISIBLE);\n\n if (adapter.InvoicesList.get(position).getStatus().equalsIgnoreCase(\"Cancel\") || adapter.InvoicesList.get(position).getStatus().equalsIgnoreCase(\"Deleted\")) {\n parentFragment.restoreLinear.setVisibility(View.VISIBLE);\n parentFragment.deleteLinear.setVisibility(View.GONE);\n parentFragment.archiveLinear.setVisibility(View.VISIBLE);\n\n\n } else if (adapter.InvoicesList.get(position).getStatus().equalsIgnoreCase(\"Archived\")) {\n\n\n parentFragment.restoreLinear.setVisibility(View.VISIBLE);\n parentFragment.deleteLinear.setVisibility(View.VISIBLE);\n parentFragment.archiveLinear.setVisibility(View.GONE);\n\n } else {\n parentFragment.restoreLinear.setVisibility(View.GONE);\n parentFragment.deleteLinear.setVisibility(View.VISIBLE);\n parentFragment.archiveLinear.setVisibility(View.VISIBLE);\n }\n\n animation(parentFragment.actionTable, R.anim.bottom_up, Constant.LIST_ACTION_ANIMATION_TYPE.OPEN);\n\n\n return true;\n\n\n }\n });\n\n parentFragment.closeActionPopUp.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n\n animation(parentFragment.actionTable, R.anim.bottom_down, Constant.LIST_ACTION_ANIMATION_TYPE.CLOSE);\n\n }\n });\n parentFragment.actionRelative.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n }\n });\n listView.setOnScrollListener(new OnScrollListener() {\n\n @Override\n public void onScrollStateChanged(AbsListView view, int scrollState) {\n\n currentScrollState = scrollState;\n\n\n }\n\n\n @Override\n public void onScroll(AbsListView view, int firstVisibleItem,\n int visibleItemCount, int totalItemCount) {\n\n\n if ((firstVisibleItem + visibleItemCount == totalItemCount)\n && !isLoading && (visibleItemCount != totalItemCount)) {\n\n\n try {\n\n if (parentFragment.isSearchEnable)\n return;\n if (parentFragment.isFilterEnable) {\n\n return;\n }\n\n if (!global.isNetworkAvailable()) {\n global.showAlert(Constant.NO_CONNECTION_MESSAGE, context);\n return;\n }\n if (isTotalRecordGet)\n return;\n\n if (pageNo + 1 > total_pagesInt) {\n global.showAlert(\"No more record\", context);\n return;\n }\n\n\n listFooter.setVisibility(View.VISIBLE);\n isLoading = true;\n\n try {\n\n\n getInvoiceList(++pageNo,\n SERVICE_TYPE.GET_BOTTOM_DATA,\n false,\n InvoiceList.content[position]);\n\n } catch (JSONException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n });\n\n\n if (position == 0)\n setList();\n\n\n return view;\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tBundle extras = getIntent().getExtras();\n\t\tint id = extras.getInt(Intent.EXTRA_TEXT);\n\n\t\tswitch (id) {\n\t\tcase 0:\n\t\t\tFragment frag = new Fragment_PV();\n\t\t\tFragmentTransaction ft = getSupportFragmentManager().beginTransaction();\n\t \t\tft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);\n\t \t\tft.replace(R.id.details1, frag);\n\t \t\tft.commit();\t\t\t\n\t \t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View ret = inflater.inflate(R.layout.fragment_mei_tu, container, false);\n initView(ret);\n\n loadData();\n\n initMeituRecyclerView();\n\n initBackTop(ret);\n\n meitu_tianjia.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Toast.makeText(getContext(), \"美图添加按钮\", Toast.LENGTH_SHORT).show();\n }\n });\n meitu_uploadhistory.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Toast.makeText(getContext(), \"美图上传历史按钮\", Toast.LENGTH_SHORT).show();\n }\n });\n //四个按钮的点击变化颜色监听\n meituRadioGroup.setOnCheckedChangeListener(this);\n //下拉更多,展示第二个视图(更多标签视图)\n xialaImage.setOnClickListener(this);\n\n //搜索框\n initSearchInput();\n\n return ret;\n }",
"private void add() {\n\t\tlist = new ArrayList<Fragment>();\n\t\tlist.add(new HomeFragment());\n\t\tlist.add(new MenuFragment());\n\t\tlist.add(new FriendsFragment());\n\t\tlist.add(new MineFragment());\n\t}",
"@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View root = inflater.inflate(R.layout.fragment_main_list, container, false);\n\n // Set two pane mode\n mTwoPaneMode = (root.findViewById(R.id.detail_container) != null);\n // Initialize empty view\n mEmptyView = root.findViewById(R.id.recyclerView_empty);\n\n // Initialize recycler view\n itemList = root.findViewById(R.id.content_list);\n\n FloatingActionButton fab = (FloatingActionButton) root.findViewById(R.id.fab);\n fab.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent addIntent = new Intent(getActivity(), AddItemActivity.class);\n startActivity(addIntent);\n }\n });\n\n // Load available data from ShopenatorProvider\n getLoaderManager().initLoader(mListLoader, null, this);\n\n\n\n return root;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n mFragView = inflater.inflate(R.layout.activity_spot_list, container, false);\n mRecyclerView = (RecyclerView) mFragView.findViewById(R.id.recyclerView_spot);\n mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext(),LinearLayoutManager.VERTICAL,false));\n\n initRecyclerView();\n return mFragView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_view_transactions_frag, container, false);\n\n tv0 = (TextView) view.findViewById(R.id.tv0);\n listView = (ListView) view.findViewById(R.id.listView);\n\n ArrayList<String> your_array_list = new ArrayList<String>();\n your_array_list.add(\"\\nPackage id : r3_345455 \\nBy Employee: Johanaa\\nInserted to Trolly 0076D5\\n @1237 hrs 13Feb 2018\\n78kg of total 20 units\\nTrans_id: 88274\\nManager Incharge: Ms. Yang\\n\");\n your_array_list.add(\"\\nPackage id : p2_255454 \\nBy Employee: Kim\\nInserted to Trolly 02446D5\\n @1426 hrs 13Feb 2018\\n72kg of total 2 units\\nTrans_id: 88278\\nManager Incharge: Mrs. Smith\\n\");\n your_array_list.add(\"\\nPackage id : j1_737278 \\nBy Employee: Amanda\\nInserted to Trolly 0076D5\\n @1237 hrs 13Feb 2018\\n78kg of total 20 units\\nTrans_id: 88274\\nManager Incharge: Ms. Yang\\n\");\n your_array_list.add(\"\\nPackage id : m4_917395 \\nBy Employee: Jack\\nInserted to Trolly 0076D5\\n @1237 hrs 13Feb 2018\\n78kg of total 20 units\\nTrans_id: 88274\\nManager Incharge: Ms. Yang\\n\");\n\n // This is the array adapter, it takes the context of the activity as a\n // first parameter, the type of list view as a second parameter and your\n // array as a third parameter.\n ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1, your_array_list );\n\n listView.setAdapter(arrayAdapter);\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.activity_list,container);\n Button button = (Button) rootView.findViewById(R.id.fragment_button);\n button.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n android.app.FragmentManager fragmentManager = getActivity().getFragmentManager();\n android.app.FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n Bundle bundle = new Bundle();\n bundle.putString(\"main\", null);\n fragmentTransaction.replace(R.id.fragment_container_framelayout, null);\n fragmentTransaction.addToBackStack(\"next\");\n fragmentTransaction.commit();\n }\n });\n return rootView;\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tView view=inflater.inflate(R.layout.tab1_share,container,false);\n\t\tlistView=(PullToRefreshListView)view.findViewById(R.id.tab1_share_listview);\n\t\tlistView.setOnRefreshListener(new OnRefreshListener<ListView>() {\n\t\t\t@Override\n\t\t\tpublic void onRefresh(PullToRefreshBase<ListView> refreshView) {\n\t\t\t\tString label = DateUtils.formatDateTime(getActivity().getApplicationContext(), System.currentTimeMillis(),\n\t\t\t\t\t\tDateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_ABBREV_ALL);\n\t\t\t\t// Update the LastUpdatedLabel\n\t\t\t\trefreshView.getLoadingLayoutProxy().setLastUpdatedLabel(label);\n\n\t\t\t\t// Do work to refresh the list here.\n\t\t\t\trefreshListView();\n\t\t\t\n\t\t\t}\n\n\t\t\t\n\t\t});\n\t\tlistView.setOnLastItemVisibleListener(new OnLastItemVisibleListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onLastItemVisible() {\n\t\t\t\n\t\t\t\t\tif (!isEnd) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tloadingNextPage();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\t});\n\n\t\tlistView.setMode(Mode.PULL_FROM_START);\n\t\tmAdaAdapter=new MylistAdapter();\n\t\tlistView.setAdapter(mAdaAdapter);\n//\t\tlistView.setOnItemClickListener(new OnItemClickListener() {\n//\n//\t\t\t@Override\n//\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n//\t\t\t\t\tint position, long id) {\n//\t\t\t\tIntent intent=new Intent(Tab1SocietyShareFragment.this.getActivity(),\n//\t\t\t\t\t\tTab1ShareDetailActivity.class);\n//\t\t\t\tBundle bundle = new Bundle(); //创建Bundle对象 \n//\t\t\t\ttry {\n//\t\t\t\t\tJSONObject jsonObject=jsonArray.getJSONObject(position-1);\n//\t\t\t\t\tbundle.putInt(\"postid\",jsonObject.getInt(\"postid\"));\n//\t\t\t\t\tbundle.putInt(\"userid\", jsonObject.getInt(\"userid\"));\n//\t\t\t\t\tbundle.putString(\"posttitle\", jsonObject.getString(\"posttitle\"));\n//\t\t\t\t\tbundle.putString(\"postpicurl\", jsonObject.getString(\"postpicurl\"));\n//\t\t\t\t\tbundle.putString(\"postcontent\",jsonObject.getString(\"postcontent\"));\n//\t\t\t\t} catch (JSONException e) {\n//\t\t\t\t\t// TODO Auto-generated catch block\n//\t\t\t\t\te.printStackTrace();\n//\t\t\t\t} //装入数据 \n//\t\t\t\tintent.putExtras(bundle); //把Bundle塞入Intent里面 \n//\t\t\t\tstartActivity(intent);\n//\t\t\t\t// TODO Auto-generated method stub\n//\t\n//\t\t\t\t// TODO Auto-generated method stub\n//\t\t\t\t\n//\t\t\t}\n//\t\t});\n\t\trefreshListView();\n\t\t return view;\n\t}",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater,\n\t\t\t@Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n\t\n\t\t View rootView = inflater.inflate(R.layout.activity_memdetail, container, false);\n\t\t name=(TextView)rootView.findViewById(R.id.member_name);\n\t\t mother=(TextView)rootView.findViewById(R.id.mother_name);\n\t\t father=(TextView)rootView.findViewById(R.id.father_name);\n\t\t uid=(TextView)rootView.findViewById(R.id.u_id);\n\t\t relation=(TextView)rootView.findViewById(R.id.relation);\n\t\t age=(TextView)rootView.findViewById(R.id.age);\n\t\t gender=(TextView)rootView.findViewById(R.id.gender);\n\t\t\n\t\turl= ((Member_Details)getActivity()).getUrl();\n\t\tSystem.out.println(url+\"\"+\"We are here\");\n\t\t\n\t\n\tSystem.out.println(pos+\"\"+\"We are pos\");\n\tmakeJsonRequest();\n\t\treturn rootView;\n\n\t}",
"@Override\r\n public View onCreateView(LayoutInflater inflater, final ViewGroup container,\r\n Bundle savedInstanceState) {\n final View rootView = inflater.inflate(R.layout.fragment_schedule, container, false);\r\n\r\n polyList = (ListView)rootView.findViewById(R.id.listView);\r\n\r\n polyArrayAdapter = new PolyAdapter(rootView.getContext(), R.layout.row, myPolyArray);\r\n\r\n if(polyList != null){\r\n polyList.setAdapter(polyArrayAdapter);\r\n }\r\n\r\n\r\n polyList.setOnItemClickListener(new AdapterView.OnItemClickListener() {\r\n @Override\r\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\r\n Bundle bundle = new Bundle();\r\n schedule_detailview f = new schedule_detailview();\r\n switch(i){\r\n case 0:\r\n bundle.putInt(\"WHICH\", 1);\r\n f.setArguments(bundle);\r\n break;\r\n\r\n case 1:\r\n bundle.putInt(\"WHICH\", 2);\r\n f.setArguments(bundle);\r\n break;\r\n case 2:\r\n bundle.putInt(\"WHICH\", 3);\r\n f.setArguments(bundle);\r\n break;\r\n case 3:\r\n bundle.putInt(\"WHICH\", 4);\r\n f.setArguments(bundle);\r\n break;\r\n case 4:\r\n bundle.putInt(\"WHICH\", 5);\r\n f.setArguments(bundle);\r\n break;\r\n case 5:\r\n bundle.putInt(\"WHICH\", 6);\r\n f.setArguments(bundle);\r\n break;\r\n case 6:\r\n bundle.putInt(\"WHICH\", 7);\r\n f.setArguments(bundle);\r\n break;\r\n case 7:\r\n bundle.putInt(\"WHICH\", 8);\r\n f.setArguments(bundle);\r\n break;\r\n case 8:\r\n bundle.putInt(\"WHICH\", 9);\r\n f.setArguments(bundle);\r\n break;\r\n default:\r\n bundle.putInt(\"WHICH\", 1);\r\n f.setArguments(bundle);\r\n break;\r\n }\r\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\r\n\r\n // Replace whatever is in the fragment_container view with this fragment,\r\n // and add the transaction to the back stack\r\n transaction.replace(R.id.frameLayout, f);\r\n\r\n transaction.addToBackStack(null);\r\n\r\n // Commit the transaction\r\n transaction.commit();\r\n\r\n }\r\n });\r\n\r\n return rootView;\r\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_fragment_one, container, false);\n\n final ArrayList<featuresItemList> fragmentOne = new ArrayList<featuresItemList>();\n\n\n fragmentOne.add(new featuresItemList(R.drawable.ic_mistake, \"Expressing mistakes\"));\n fragmentOne.add(new featuresItemList(R.drawable.ic_people2, \"Describing people\"));\n fragmentOne.add(new featuresItemList(R.drawable.ic_animal, \"Phrases involving animals \"));\n fragmentOne.add(new featuresItemList(R.drawable.ic_business, \"Business\"));\n fragmentOne.add(new featuresItemList(R.drawable.ic_exclamation, \"exclamation\"));\n fragmentOne.add(new featuresItemList(R.drawable.ic_abbreviation, \"Abbreviations\"));\n fragmentOne.add(new featuresItemList(R.drawable.ic_proverb, \"Proverbs\"));\n fragmentOne.add(new featuresItemList(R.drawable.ic_food, \"phrases about food\"));\n //fragmentOne.add(new featuresItemList(\"test category\"));\n\n\n myListAdapter myAdapter = new myListAdapter(getContext(), fragmentOne);\n\n ListView listView = (ListView) view.findViewById(R.id.fragmentOneCategoryList);\n listView.setAdapter(myAdapter);\n // setp 2\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n // Get the {@link Word} object at the given position the user clicked on\n featuresItemList list = fragmentOne.get(i);\n if (i == 0) {\n Intent color = new Intent(view.getContext(), MistakesActivity.class);\n startActivity(color);\n }\n if (i == 1) {\n Intent family = new Intent(view.getContext(), DescribingPeople.class);\n startActivity(family);\n }\n if (i == 2) {\n Intent animal = new Intent(view.getContext(), animalCategoryFragmentOne.class);\n startActivity(animal);\n }\n if (i == 3) {\n Intent school = new Intent(view.getContext(), Business.class);\n startActivity(school);\n }\n if (i == 4) {\n Intent exclamation = new Intent(view.getContext(), ExclamationCategoryFragmentOne.class);\n startActivity(exclamation);\n }\n if (i == 5) {\n Intent abbreviations = new Intent(view.getContext(), AbbreviationsCategoryFragmentOne.class);\n startActivity(abbreviations);\n }\n if (i == 6) {\n Intent house = new Intent(view.getContext(), proverbsActivity.class);\n startActivity(house);\n }\n if (i == 7) {\n Intent AboutFood = new Intent(view.getContext(), AboutFoodCategoryFragmentOne.class);\n startActivity(AboutFood);\n }\n\n\n }\n });\n\n\n // end of setp 2\n\n return view;\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_sesion3, container, false);\n\n\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\n\t\tmSearch = getArguments().getString(\"search\");\n\t\tisCall = getArguments().getBoolean(\"iscall\");\n\n\t\tmView = inflater.inflate(R.layout.list_fragment, null);\n\t\tmProgressBar = (ProgressBar)mView.findViewById(R.id.progressBar);\n\t\tmListView = (ListView)mView.findViewById(R.id.listView);\n\t\tmListView.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tLog.i(\"TEST\",\"onItemClick\");\n\t\t\t\tIntent NextIntent = new Intent(mContext, ViewActivity.class);\n\t\t\t\tNextIntent.putExtra(\"data\", mData.get(position));\n\t\t\t\tstartActivity(NextIntent);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\treturn mView;\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_information, container, false);\n\n /*infoNetwork = new InfoNetwork();\n //list = infoNetwork.getInfoMain();*/\n\n /*listView = (ListView)view.findViewById(R.id.listView);\n\n informationAdapter = new InformationAdapter(getContext());\n informationAdapter.setList(list);\n listView.setAdapter(informationAdapter);\n\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n getActivity()\n .getSupportFragmentManager()\n .beginTransaction()\n .replace(R.id.fragmentContainer, new InfoDetailFragment())\n .addToBackStack(null)\n .commit();\n }\n });*/\n\n return view;\n }",
"@Override\n\tprotected Fragment createFragment() {\n\t\treturn new CrimeListFragment();\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_favourite_fragment_view_pager, container, false);\n viewPager = (ViewPager)view.findViewById(R.id.viewpager1);\n setupViewPager(viewPager);\n tabLayout = (TabLayout) view.findViewById(R.id.tabs1);\n tabLayout.setupWithViewPager(viewPager);\n Typeface typeface=Typeface.createFromAsset(context.getAssets(), getString(R.string.custom_font));\n TextView tabOne=(TextView)LayoutInflater.from(context).inflate(R.layout.custom_tab,null);\n tabOne.setText(getString(R.string.stories));\n tabOne.setTypeface(typeface);\n TextView tabTwo=(TextView)LayoutInflater.from(context).inflate(R.layout.custom_tab,null);\n tabTwo.setText(getString(R.string.quotes));\n tabTwo.setTypeface(typeface);\n tabLayout.getTabAt(0).setCustomView(tabOne);\n tabLayout.getTabAt(1).setCustomView(tabTwo);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_liaotian, container, false);\n initView(view);\n initData();\n LiaoTianAdapter adapter = new LiaoTianAdapter(getActivity(),list);\n lv_liaotian.setAdapter(adapter);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n root = inflater.inflate(R.layout.fragment_attention, container, false);\n listView = root.findViewById(R.id.viewAttention);\n btnAdd = root.findViewById(R.id.btnAdd);\n btnAdd.setOnClickListener(this);\n\n attentionDao = new AttentionDao(getContext());\n\n\n items = new ArrayList<>();\n List<AttentionRecord> tmp = attentionDao.getAll();\n for(int i = 0; i < tmp.size(); i ++){\n AttentionRecord e = tmp.get(i);\n Map<String,Object> item = new HashMap<>();\n item.put(\"id\",e.id);\n item.put(\"addTime\",e.addTime);\n items.add(item);\n\n }\n\n MyAttentionApt simpleAdapter = new MyAttentionApt(getActivity(),items,R.layout.simple_item_attention,\n new String[]{\"id\",\"addTime\"},\n new int[]{R.id.itemId,R.id.itemAddTime});\n listView.setAdapter(simpleAdapter);\n\n listView.setOnItemLongClickListener(onItemLongClickListener);\n\n return root;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_trans, container, false);\n listView = view.findViewById(R.id.trans_list);\n view.findViewById(R.id.trans_insert).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n TransDialog transDialog = new TransDialog(getContext());\n transDialog.setFragment(TransFragment.this);\n transDialog.show();\n }\n });\n adapter = new TransAdapter(getContext());\n adapter.setTransFragment(this);\n listView.setAdapter(adapter);\n loadData();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view= inflater.inflate(R.layout.fragment_favorite, container, false);\n listView=(ListView) view.findViewById(R.id.listview_favorite);\n adapter=new NewsAdapter(getActivity(), listView);\n listView.setAdapter(adapter);//空指针异常\n listView.setOnItemClickListener(itemListener);\n loadLoveNews();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_list, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_list, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_price_detail, container, false);\n mListView = view.findViewById(R.id.list_product_tap);\n LinearLayout viewHeader = new LinearLayout(getCurrentContext());\n viewHeader.setOrientation(LinearLayout.HORIZONTAL);\n AbsListView.LayoutParams lp = new AbsListView.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT, 200);\n viewHeader.setLayoutParams(lp);\n //mListView.addFooterView(viewHeader, null, false);\n productTabAdapter = new ProductTabAdapter(mItemsBean.getItems(),getCurrentContext(),mPosition);\n mListView.setAdapter(productTabAdapter);\n productTabAdapter.notifyDataSetChanged();\n // Helper.getListViewSize_none(mListView,0);\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_shopping_list,container,false);\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_stock, container, false);\n font = Typeface.createFromAsset(getActivity().getAssets(), \"fonts/Nexa Light.otf\");\n fontbold = Typeface.createFromAsset(getActivity().getAssets(), \"fonts/Nexa Bold.otf\");\n\n session = new SessionManager(getActivity());\n TextView toolbar = (TextView) view.findViewById(R.id.complain);\n toolbar.setTypeface(fontbold);\n\n listmenu = (ListView) view.findViewById(R.id.list_stock);\n\n// Adapter_complain adapter = new Adapter_complain(getActivity(), listData);\n// listmenu.setAdapter(adapter);\n\n ImageView goto_menu = (ImageView) view.findViewById(R.id.img_complain);\n goto_menu.setOnClickListener(new View.OnClickListener() {\n\n public void onClick(View arg0) {\n Intent i = new Intent(getActivity(), HistorycomplainActivity.class);\n getActivity().startActivity(i);\n }\n });\n\n showList();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_lista_ejercicios, container, false);\n\n\n\n return view;\n }"
] | [
"0.71859866",
"0.7101077",
"0.70159644",
"0.6972713",
"0.69323283",
"0.69238394",
"0.69152445",
"0.68725675",
"0.6863918",
"0.68351823",
"0.6829196",
"0.6822116",
"0.68135244",
"0.6799551",
"0.6788722",
"0.6781281",
"0.6779301",
"0.6758367",
"0.6757575",
"0.67517394",
"0.67377543",
"0.6732555",
"0.6732178",
"0.6722683",
"0.6717816",
"0.66966045",
"0.6686022",
"0.66850644",
"0.6681747",
"0.66761017",
"0.6667729",
"0.66510123",
"0.662391",
"0.6621908",
"0.66198695",
"0.6613707",
"0.6613667",
"0.66052175",
"0.6604334",
"0.6600497",
"0.65823174",
"0.6571256",
"0.6570387",
"0.65690124",
"0.65687996",
"0.6562531",
"0.65544665",
"0.655175",
"0.6550198",
"0.6548618",
"0.654545",
"0.653811",
"0.65350777",
"0.65343153",
"0.65328765",
"0.652148",
"0.6519242",
"0.65189147",
"0.6518507",
"0.6517231",
"0.6514832",
"0.65141696",
"0.6513003",
"0.6512943",
"0.65079176",
"0.65078765",
"0.6507485",
"0.64991677",
"0.64984924",
"0.64963",
"0.64887756",
"0.648827",
"0.64842063",
"0.6481359",
"0.6479698",
"0.64793247",
"0.6479246",
"0.6477545",
"0.6477237",
"0.6474532",
"0.64729726",
"0.646798",
"0.6467777",
"0.64675534",
"0.6466711",
"0.64638186",
"0.64628386",
"0.64620566",
"0.64616054",
"0.6461304",
"0.6459371",
"0.6457936",
"0.6456975",
"0.6454468",
"0.6453148",
"0.6452194",
"0.6452194",
"0.6451941",
"0.6451887",
"0.6446307",
"0.64421046"
] | 0.0 | -1 |
Creates a new instance of ContactsService | public ContactsService() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private ContactManager() {\n }",
"public ContactManager() {\n\t\tthis.contacts = new HashMap<>();\n\n\t\tgenerateDirectories();\n\t\tloadContacts();\n\t}",
"public static Contacts createContacts(String name,String phoneNumber){\n //it calling the constuctor to create an new contact record\n return new Contacts(name,phoneNumber);\n\n }",
"public Contact(){}",
"public Contact() {\n }",
"public Contact() {\n }",
"public Contact() {\n }",
"@ApiMethod(name = \"createContact\", path = \"contact\", httpMethod = HttpMethod.POST)\n\tpublic Contact createContact(final ContactForm form) {\n\t\tfinal Key<Contact> key = Contact.allocateKey();\n\t\tContact contact = new Contact(key.getId(), form);\n\n\t\tofy().save().entity(contact).now();\n\n\t\treturn contact;\n\t}",
"public Contact() {\n\t}",
"public static ContactManager Instance() {\n if (instance == null) {\n instance = new ContactManager();\n }\n return instance;\n }",
"public static Service newInstance() {\n return newInstance(DEFAULT_PROVIDER_NAME);\n }",
"public Contacts build() {\n return new Contacts(this);\n }",
"public interface ContactService {\n\n /**\n * 保存联系人对象\n *\n * @param contact\n */\n public void saveContact(Contact contact);\n\n\n /**\n * 保存联系人组\n *\n * @param contactGroup\n */\n public void saveContactGroup(ContactGroup contactGroup);\n\n\n /**\n * 获取联系人组列表\n *\n * @return\n */\n public List<ContactGroup> getContactGroup();\n\n\n /**\n * 分页面读取联系人\n *\n * @param page\n * @param size\n * @return\n */\n public List<Contact> getContactByPage(int page, int size);\n\n /**\n * 获取所有联系人\n *\n * @return\n */\n public List<Contact> getAllContact();\n\n /**\n * 读取总页面\n *\n * @param size\n * @return\n */\n public int getContactPage(int size);\n\n /**\n * 删除联系人\n * @param id\n * @return\n */\n public boolean deleteContact(long id);\n\n /**\n * 删除联系人组\n * @param id\n * @return\n */\n public boolean deleteContactGroup(long id);\n}",
"public ContactInfo() {\n\n }",
"public EmailService() {\n }",
"Service newService();",
"CdapServiceInstance createCdapServiceInstance();",
"private Contact createBaseContact()\n {\n Contact contact = new Contact();\n contact.setName(new Name(new LastName(\"Doe\"), new FirstName(\"John\")));\n contact.setAddress(new Address(new StreetAddress(\"123 Main St\"),\n null,\n new GeneralProperty(\"Tucson\"),\n new State(\"AZ\"),\n new Zip(\"85750\")));\n contact.setPhone(new Phone(\"(520) 123-4567\"));\n contact.setEmail(new Email(\"[email protected]\"));\n\n return contact;\n }",
"public Contact() {\n super();\n }",
"CdapService createCdapService();",
"private ContactFactory() {\n throw new AssertionError();\n }",
"public static ContractService getContractDetailsServiceImpl() {\n\t\treturn new ContractorServiceImpl();\n\t}",
"public Contact(){\n\t\t\n\t}",
"public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.servicedirectory.v1beta1.Service>\n createService(com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getCreateServiceMethod(), getCallOptions()), request);\n }",
"public static <T> T createService(Class<T> service) {\n return getInstanceRc().create(service);\n }",
"public GetContactRequest()\r\n {\r\n }",
"public static <S> S createService(Context context, Class<S> serviceClass) {\n return ApiClient.getClient(RemoteConfiguration.BASE_URL).create(serviceClass);\n }",
"Fog_Services createFog_Services();",
"public CompanyFacade() {\n }",
"public SimpleContactDao() {\n\t\ttry {\n\t\t\tFile contactFile = new File(DB_FILE_NAME);\n\t\t\tif (!contactFile.exists()) {\n\t\t\t\tif (contactFile.createNewFile()) {\n\t\t\t\t\tFileWriter fwriter = new FileWriter(contactFile);\n\t\t\t\t\tfwriter.write(\"{}\");\n\t\t\t\t\tfwriter.close();\n\t\t\t\t\tcontactDtoMap = new HashMap<>();\n\t\t\t\t} else {\n\t\t\t\t\tlog.error(\"File could not created.\");\n\t\t\t\t}\n\n\t\t\t\tlog.info(\"created file : {}\", contactFile.getAbsolutePath());\n\t\t\t} else {\n\t\t\t\tlog.info(\"file exists : {}\", contactFile.getAbsolutePath());\n\t\t\t\tloadFile(contactFile);\n\t\t\t}\n\t\t} catch(Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t\tlog.error(\"something went wrong while initializong contact information.\");\n\t\t}\n\t}",
"private ServiceFactory() {}",
"public static Contact createContact (String name, String phoneNumber){\n\n return new Contact(name, phoneNumber);\n\n }",
"public static MovimentiCcService creaOggettoServiceImpl() {\n\t\tMovimentiCcServiceImpl serviceImpl = new MovimentiCcServiceImpl();\r\n\t\t// crea un oggetto FactoryImpl\r\n\t\tMovimentoCcFactoryImpl movimentoCcFactoryImpl = new MovimentoCcFactoryImpl();\r\n\t\t// risolve la dipendenza \r\n\t\tserviceImpl.setMovimentoCcFactory(movimentoCcFactoryImpl);\r\n\t\treturn serviceImpl;\r\n\t}",
"public static CustomerService getCustomerDetailsServiceImpl() {\n\t\treturn new CustomerServiceImpl();\n\t}",
"public interface ContactusService {\n\n Collection<Contactus> findall();\n\n Contactus findone();\n\n Contactus create(Contactus contactus);\n\n Contactus update(Contactus contactus);\n\n void delete(int id);\n}",
"public com.google.cloud.servicedirectory.v1beta1.Service createService(\n com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateServiceMethod(), getCallOptions(), request);\n }",
"public SearchAddressBookService(\r\n\t\t\tAccountManager<Account> accountManager,\r\n\t\t\tLdapMailDomainManager domainManager,\r\n\t\t\tLdapGlobalContactManager contactManager, \r\n\t\t\tLdapPersonalContactManager personalContactManager,\r\n\t\t\tILdapGroupManager groupManager,\r\n\t\t\tString category){\r\n\t\tsuper(accountManager) ;\r\n\t\t\r\n\t\tthis.domainManager = domainManager;\r\n\t\tthis.contactManager = contactManager;\r\n\t\tthis.personalContactManager = personalContactManager;\r\n\t\tthis.groupManager = groupManager;\r\n\t\tthis.category = category;\r\n\t}",
"private static Calendar getService() throws GeneralSecurityException, IOException {\n final NetHttpTransport HTTP_TRANSPORT = GoogleNetHttpTransport.newTrustedTransport();\n return new Calendar.Builder(HTTP_TRANSPORT, JSON_FACTORY, getCredentials(HTTP_TRANSPORT))\n .setApplicationName(APPLICATION_NAME).build();\n }",
"public Service(){\n\t\t\n\t}",
"public static WPVService createInstance() {\n if ( CONFIG != null )\n return new WPVService( CONFIG );\n return null;\n }",
"public FetchAddressIntentService() {\n super(\"FetchAddressIntentService\");\n }",
"private SiteEditService() {\r\n \r\n }",
"public void _createInstance() {\n requiredMethod(\"getAvailableServiceNames()\");\n\n if (services.length == 0) {\n services = (String[]) tEnv.getObjRelation(\"XMSF.serviceNames\");\n\n if (services == null) {\n log.println(\"No service to create.\");\n tRes.tested(\"createInstance()\", true);\n\n return;\n }\n }\n\n String needArgs = (String) tEnv.getObjRelation(\"needArgs\");\n\n if (needArgs != null) {\n log.println(\"The \" + needArgs + \n \" doesn't support createInstance without arguments\");\n tRes.tested(\"createInstance()\", true);\n\n return;\n }\n\n boolean res = true; \n\n for (int k = 0; k < services.length; k++) {\n try {\n log.println(\"Creating Instance: \" + services[k]);\n\n Object Inst = oObj.createInstance(services[k]);\n res = (Inst != null);\n } catch (com.sun.star.uno.Exception ex) {\n log.println(\"Exception occurred during createInstance()\");\n ex.printStackTrace(log);\n res = false;\n }\n }\n\n tRes.tested(\"createInstance()\", res);\n }",
"public TestService() {}",
"public AlarmService(String name) {\n super(name);\n }",
"public HLCContactDetails() {\n }",
"public AddressBook() {\r\n contacts = new ArrayList<AddressEntry>();\r\n }",
"public interface ContactService {\n\n /**\n * Get all contacts with pagination support\n * @param index the index of data\n * @param size the size of contacts you want to fetch\n * @return return a page of contacts you have requested\n */\n Page<Contact> getContacts(int index, int size);\n\n /**\n * fetch a requested contact\n * @param id identification of contact which is the id\n * @return return the requested contact\n */\n Optional<Contact> getContact(long id);\n\n /**\n * search all the contacts by matching the name requested\n * @param name the search query which is either a part or a whole of the name\n * @param index the index of data\n * @param size the size of contacts you want to fetch\n * @return return the searched result of contacts\n */\n Page<Contact> searchContactsByName(String name, int index, int size);\n}",
"private Service() {}",
"public static Service getInstance()\n\t{\n\t\tif (serviceInstance == null)\n\t\t{\n\t\t\tserviceInstance = new Service(LocalDao.getInstance());\n\t\t}\n\t\treturn serviceInstance;\n\t}",
"private ContactModel(Context context) {\n mContext = context.getApplicationContext();\n mDatabase = new ContactBaseHelper(mContext)\n .getWritableDatabase();\n }",
"public PresenceService createPresenceService(String id, PresenceBasicStatus basicStatus, String contact);",
"public HelloIntentService() {\n super(\"HelloIntentService\");\n }",
"private ServiceDomains() {\n }",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t/* BINDER LAB: Create a new instance of the Binder service */\n\t}",
"public Contacts(int contactID, String contactName, String email) {\r\n this.contactID = contactID;\r\n this.contactName = contactName;\r\n this.email = email;\r\n }",
"public RemoteFacadeServiceLocator() {\r\n }",
"public static synchronized ServiceDomain createDomain(final String name) {\n if (!isInitialized()) {\n init();\n }\n\n if (domains.containsKey(name)) {\n throw new RuntimeException(\"Domain already exists: \" + name);\n }\n\n ServiceDomain domain = new DomainImpl(\n name, registry, endpointProvider, transformers);\n domains.put(name, domain);\n return domain;\n }",
"public ContactsProvider() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: org.gsma.joyn.contacts.ContactsProvider.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.gsma.joyn.contacts.ContactsProvider.<init>():void\");\n }",
"public Collection<Service> createServices();",
"public CalendarService() throws IOException, GeneralSecurityException {\n InputStream in = CalendarService.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\n if (in == null) {\n throw new FileNotFoundException(\"Resource not found: \" + CREDENTIALS_FILE_PATH);\n }\n clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n \n NetHttpTransport HTTP_TRANSPORT = GoogleNetHttpTransport.newTrustedTransport();\n service = new Calendar.Builder(HTTP_TRANSPORT, JSON_FACTORY, getCredentials(HTTP_TRANSPORT))\n .setApplicationName(APPLICATION_NAME)\n .build();\n }",
"public ClientServiceImpl() {\r\n\t}",
"public RestService() {\r\n }",
"public CustomerService() {\n\n Customer c1 = new Customer(\"Brian May\", \"45 Dalcassian\", \"[email protected]\", 123);\n Customer c2 = new Customer(\"Roger Taylor\", \"40 Connaught Street\", \"[email protected]\", 123);\n Customer c3 = new Customer(\"John Deacon\", \"2 Santry Avenue\", \"[email protected]\", 123);\n Customer c4 = new Customer(\"Paul McCartney\", \"5 Melville Cove\", \"[email protected]\", 123);\n\n c1.setIdentifier(1);\n c2.setIdentifier(2);\n c3.setIdentifier(3);\n c4.setIdentifier(4);\n customers.add(c1);\n customers.add(c2);\n customers.add(c3);\n customers.add(c4);\n\n c1.addAccount(new Account(101));\n c2.addAccount(new Account(102));\n c2.addAccount(new Account(102));\n c3.addAccount(new Account(103));\n c3.addAccount(new Account(103));\n c3.addAccount(new Account(103));\n c4.addAccount(new Account(104));\n\n }",
"public static ContactModel get(Context context) {\n if (sContactModel == null) {\n sContactModel = new ContactModel(context);\n }\n return sContactModel;\n }",
"protected ContactsResource(XingApi api) {\n super(api);\n }",
"@Override\r\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\r\n\t\tbinder = new CaroBinder();\r\n\t\tbinder.service = this;\t\t\r\n\t}",
"@Override\n public Contact getContactDAO(String firstName, String lastName) {\n\n SQLiteDatabase database = contactDB.getReadableDatabase();\n Cursor cursor = null;\n // Cursor cursor = database.query(\"(Select \"+ContactContract.FIRST_NAME_COLUMN+\" ,\"+ContactContract.LAST_NAME_COLUMN+\" \"+\"from\"+\" \"+ContactContract.DATABASE_TABLE+\n // \"where \"+firstName+\"=\"+ContactContract.DATABASE_TABLE+\".\"+ContactContract.FIRST_NAME_COLUMN +\" )\",null,null );\n Contact contact = null;\n if (cursor != null) {\n contact = new Contact();\n contact.setFirstName(cursor.getString(1));\n contact.setLastName(cursor.getString(2));\n }\n return contact;\n }",
"public static AccountService getAccountService(){\n\t\treturn new AccountServiceProxy();\n\t}",
"public CalendarService(String userEmail) throws IOException, FileNotFoundException {\n String keyPath = CalendarService.class.getResource(SERVICE_ACCOUNT_FILE_PATH).toString().replace(\"file:\", \"\");\n \n FileInputStream credsFile = new FileInputStream(keyPath);\n GoogleCredential init = GoogleCredential.fromStream(credsFile);\n httpTransport = init.getTransport();\n jsonFactory = init.getJsonFactory();\n \n creds = new GoogleCredential.Builder()\n .setTransport(httpTransport)\n .setJsonFactory(jsonFactory)\n .setServiceAccountId(init.getServiceAccountId())\n .setServiceAccountPrivateKey(init.getServiceAccountPrivateKey())\n .setServiceAccountScopes(Collections.singletonList(CalendarScopes.CALENDAR))\n .setServiceAccountUser(userEmail)\n .build();\n \n service = new Calendar.Builder(httpTransport, jsonFactory, creds)\n .setApplicationName(APPLICATION_NAME)\n .build();\n }",
"private CompanyManager() {}",
"public ServiceClient() {\n\t\tsuper();\n\t}",
"public void testAddContact() throws NotExistsException {\n\t\tContact contact = new Contact();\n\t\tcontact.setName(\"Jack Sparrow\");\n\t\tcontact.setMobilePhone(\"0438200300\");\n\t\tcontact.setHomePhone(\"03 12345678\");\n\t\tcontact.setWorkPhone(\"03 98765432\");\n\n\t\t// create\n\t\tString newContactId = contactService.addContact(addrBook1, contact).getId();\n\n\t\t// read\n\t\tcontact = contactService.getContactById(newContactId);\n\n\t\t// assert\n\t\tassertEquals(1, contactService.getContacts(addrBook1).size());\n\t\tassertEquals(\"Jack Sparrow\", contact.getName());\n\t\tassertEquals(\"0438200300\", contact.getMobilePhone());\n\t\tassertEquals(\"03 12345678\", contact.getHomePhone());\n\t\tassertEquals(\"03 98765432\", contact.getWorkPhone());\n\t}",
"public Contact(String name)\n {\n if(name == null || name.equals(\"\")) {\n throw new IllegalArgumentException(\"Name cannot be null.\");\n }\n \n this.name = name;\n this.agenda = new ArrayList<Appointment>();\n }",
"private void initService() {\n \tlog_d( \"initService()\" );\n\t\t// no action if debug\n if ( BT_DEBUG_SERVICE ) return;\n // Initialize the BluetoothChatService to perform bluetooth connections\n if ( mBluetoothService == null ) {\n log_d( \"new BluetoothService\" );\n \t\tmBluetoothService = new BluetoothService( mContext );\n\t }\n\t\tif ( mBluetoothService != null ) {\n log_d( \"set Handler\" );\n \t\tmBluetoothService.setHandler( sendHandler );\n\t }\t\t\n }",
"public void addContact() {\n Contacts contacts = new Contacts();\n System.out.println(\"Enter first name\");\n contacts.setFirstName(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter last name\");\n contacts.setLastName(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter address\");\n contacts.setAddress(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter city\");\n contacts.setCity(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter state\");\n contacts.setState(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter email\");\n contacts.setEmail(scannerForAddressBook.scannerProvider().nextLine());\n System.out.println(\"Enter zip\");\n contacts.setZip(scannerForAddressBook.scannerProvider().nextInt());\n System.out.println(\"Enter phone number\");\n contacts.setPhoneNumber(scannerForAddressBook.scannerProvider().nextLine());\n contactList.add(contacts);\n }",
"public ServiceFactoryImpl() {\n\t\tsuper();\n\t}",
"public Contact() {\n\t\tsuper(org.jooq.examples.sqlserver.adventureworks.person.tables.Contact.Contact);\n\t}",
"public AuthService() {\n//\t\tthis.dao = new UsuarioDAO();\n//\t\tthis.repository = repository;\n\t}",
"public OneToOneChat getOneToOneChatExt(Set<ContactId> contacts) throws RcsServiceException {\n if (api != null) {\n try {\n return new OneToOneChat(api.getOneToOneChatExt(new ArrayList<ContactId>(contacts)));\n } catch (Exception e) {\n throw new RcsServiceException(e.getMessage());\n }\n } else {\n throw new RcsServiceNotAvailableException();\n }\n }",
"private void initService() {\n\t\tavCommentService = new AvCommentService(getApplicationContext());\n\t}",
"private LocationService() {\n }",
"public ServiceAccessBean constructServices() throws Exception {\n\n\tif (services == null) {\t\n\t\t// Construct services bean\n\t\tif (getServicecode() != null) {\n\t\t\tservices = new ServiceAccessBean();\n\t\t\tservices.setInitKey_division(getServicecode().intValue());\n\t\t\tservices.refreshCopyHelper();\n\t\t}\n\t}\n\treturn services;\n}",
"Service(){\r\n\t\tserviceName =\"x\";\r\n\t\tserviceID = 0;\r\n\t\tserviceFee = 0.0;\r\n\t\tserviceDescrp = \"zztop\";\r\n\t}",
"public static PacientContact createEntity(EntityManager em) {\n PacientContact pacientContact = new PacientContact()\n .name(DEFAULT_NAME)\n .lastname(DEFAULT_LASTNAME)\n .street(DEFAULT_STREET)\n .streetnumber(DEFAULT_STREETNUMBER)\n .suitnumber(DEFAULT_SUITNUMBER)\n .phonenumber1(DEFAULT_PHONENUMBER_1)\n .phonenumber2(DEFAULT_PHONENUMBER_2)\n .email1(DEFAULT_EMAIL_1)\n .email2(DEFAULT_EMAIL_2)\n .facebook(DEFAULT_FACEBOOK)\n .twitter(DEFAULT_TWITTER)\n .instagram(DEFAULT_INSTAGRAM)\n .snapchat(DEFAULT_SNAPCHAT)\n .linkedin(DEFAULT_LINKEDIN)\n .vine(DEFAULT_VINE);\n return pacientContact;\n }",
"public ServiceInfo() {\n }",
"public UserContactDao() {\n\t\tsuper(UserContact.USER_CONTACT, org.nazymko.road_to_b.dao.tables.pojos.UserContact.class);\n\t}",
"private TemplateService() {\n }",
"MailBuilder(MailCreationService<T> mailCreationService) {\n this.mailCreationService = mailCreationService;\n }",
"public static ServiceFactory getInstance(){\n\t\tif(instance == null)\n\t\t\tinstance = new ServiceFactory();\n\t\treturn instance;\n\t}",
"public Service(int id)\r\n {\r\n this.id = id;\r\n \r\n logger = new Logger(this);\r\n }",
"public BudgetAccountServiceImpl() {\r\n\t}",
"ContactsManager(){\n friendsCount = 0;\n myFriends = new Contact[500];\n }",
"@Test\r\n\tvoid testContactServiceAddUniqueContact() {\r\n\t\tassertTrue(contactService.getContactFirstName(id).equals(firstName));\r\n\t\tassertTrue(contactService.getContactLastName(id).equals(lastName));\r\n\t\tassertTrue(contactService.getContactPhone(id).equals(phone));\r\n\t\tassertTrue(contactService.getContactAddress(id).equals(address));\r\n\t}",
"public static void addContacts(ContactFormData formData) {\n long idValue = formData.id;\n if (formData.id == 0) {\n idValue = ++currentIdValue;\n }\n Contact contact = new Contact(idValue, formData.firstName, formData.lastName, formData.telephone);\n contacts.put(idValue, contact);\n }",
"public static LocationServices getInstance() {\n\t\tif (instance == null) {\t\n\t\t\tinstance = new LocationServices();\n\t\t}\n\t\treturn instance;\n\t}",
"@BeforeEach\r\n\tvoid setUp() {\r\n\t\t// Create a contact to add to the service\r\n\t\tcontact = new Contact(id, firstName, lastName, phone, address);\r\n\t\t// Start contact service\r\n\t\tcontactService = new ContactService();\r\n\t\t// Add contact to contact service\r\n\t\tcontactService.addContact(contact);\r\n\t}",
"public ContactsTableModel(Person person) throws ServiceFailureException {\n contactManager = appCtx.getBean(\"contactManager\", ContactManager.class);\n //personManager = appCtx.getBean(\"personManager\", PersonManager.class);\n\n if (person == null) {\n list = new ArrayList<>();\n Contact email = new Contact();\n email.setType(\"email\");\n list.add(email);\n\n Contact mobile = new Contact();\n mobile.setType(\"mobile\");\n list.add(mobile);\n\n Contact address = new Contact();\n address.setType(\"address\");\n list.add(address);\n\n Contact nick = new Contact();\n nick.setType(\"nick\");\n list.add(nick);\n\n } else {\n list = contactManager.findContactsByPerson(person);\n }\n }",
"public static CommunicationServiceStub newStub(io.grpc.Channel channel) {\n return new CommunicationServiceStub(channel);\n }",
"public static EmployeeServiceStub newStub(io.grpc.Channel channel) {\n return new EmployeeServiceStub(channel);\n }"
] | [
"0.64618176",
"0.61602175",
"0.5951783",
"0.59382445",
"0.5898435",
"0.5898435",
"0.5898435",
"0.58920234",
"0.58602357",
"0.5741993",
"0.5723536",
"0.57207584",
"0.571828",
"0.56209797",
"0.5620889",
"0.5601046",
"0.55833536",
"0.55752957",
"0.5570722",
"0.55378723",
"0.5524054",
"0.55218524",
"0.5486989",
"0.5474413",
"0.5466162",
"0.54184973",
"0.5418442",
"0.54102784",
"0.5392726",
"0.5387394",
"0.5358664",
"0.5339025",
"0.5336217",
"0.5334879",
"0.5321264",
"0.53125364",
"0.53004307",
"0.5299432",
"0.5297302",
"0.52789444",
"0.52739155",
"0.52551043",
"0.5238305",
"0.52373236",
"0.5230227",
"0.5227532",
"0.51916",
"0.51882845",
"0.51867145",
"0.5183656",
"0.5164259",
"0.5159404",
"0.51421183",
"0.51321393",
"0.51185286",
"0.51135534",
"0.5111688",
"0.5101354",
"0.50981665",
"0.50979656",
"0.509457",
"0.5090012",
"0.50828207",
"0.50738096",
"0.50647753",
"0.5055696",
"0.50513613",
"0.5047792",
"0.5042863",
"0.5042117",
"0.5041832",
"0.50280255",
"0.5018036",
"0.500814",
"0.50045717",
"0.50032914",
"0.49986994",
"0.49936086",
"0.49875852",
"0.4984156",
"0.4979161",
"0.49749944",
"0.49738905",
"0.4973128",
"0.49653578",
"0.4965324",
"0.4958664",
"0.4951258",
"0.49412993",
"0.4939022",
"0.49297875",
"0.49294797",
"0.4927149",
"0.49246898",
"0.49202585",
"0.49198902",
"0.49159262",
"0.4915485",
"0.49149773",
"0.49123"
] | 0.80063987 | 0 |
TODO Autogenerated method stub | @Override
public void onValueChange(NumberPicker picker, int oldVal, int newVal) {
} | {
"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 |
Insert the given player into the players collection All handlers should add this player to their collection | @Override
public void addPlayerHandler(Player player) {
// add new player to current TreeSet
playerByIdTreeSet.add(player);
if(successor!=null){
// there are more handlers - trigger them to add this player as well
successor.addPlayerHandler(player);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addPlayer(Player player) {\n //int id = Repository.getNextUniqueID();\n this.player = player;\n }",
"public void addPlayer(Player player){\n players.add(player);\n }",
"public void addPlayer(Player player) {\n playerList.add(player);\n }",
"public void insertPlayer(TennisPlayer p) throws TennisDatabaseException {\n\t\t\n\t\tthis.root = insertPlayerRec(this.root, p);\n\t\t\n\t\tplayerCount++;\n\t\t\n\t}",
"public void addPlayerToTable(Player player){\n\t\tgamePlayers.add(player);\n\t}",
"public void addPlayer(EntityPlayerMP player)\r\n {\r\n int var2 = (int)player.posX >> 4;\r\n int var3 = (int)player.posZ >> 4;\r\n player.managedPosX = player.posX;\r\n player.managedPosZ = player.posZ;\r\n\r\n for (int var4 = var2 - this.playerViewRadius; var4 <= var2 + this.playerViewRadius; ++var4)\r\n {\r\n for (int var5 = var3 - this.playerViewRadius; var5 <= var3 + this.playerViewRadius; ++var5)\r\n {\r\n this.getPlayerInstance(var4, var5, true).addPlayer(player);\r\n }\r\n }\r\n\r\n this.players.add(player);\r\n this.filterChunkLoadQueue(player);\r\n }",
"@Override\r\n\tpublic Player add(final Player player) {\r\n\t\tfinal String sql = \"insert into player (playerid, name, balance, updated, deleted) values (?,?,?,?,?)\";\r\n\r\n\t\ttry {\r\n\t\t\tKeyHolder keyHolder = new GeneratedKeyHolder();\r\n\t\t\tjdbcTemplate.update(\r\n\t\t\t\t\tnew PreparedStatementCreator() {\r\n\t\t\t\t\t\tpublic PreparedStatement createPreparedStatement(Connection connection) throws SQLException {\r\n\t\t\t\t\t\t\tPreparedStatement ps = connection.prepareStatement(sql, new String[] {\"id\"});\r\n\t\t\t\t\t\t\tps.setString(1, player.getPlayerId());\r\n\t\t\t\t\t\t\tps.setString(2, player.getName());\r\n\t\t\t\t\t\t\tps.setDouble(3, player.getBalance());\r\n\t\t\t\t\t\t\tps.setTimestamp(4, CommonUtils.getCurrentTimestamp());\r\n\t\t\t\t\t\t\tps.setBoolean(5, false);;\r\n\t\t\t\t\t\t\treturn ps;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tkeyHolder);\r\n\t\t\tplayer.setId(keyHolder.getKey().longValue());\r\n\t\t\treturn player;\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(e.getMessage(), e);\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public void addPlayer(Player player) {\n this.add(player);\n this.players.add(player);\n }",
"public void addEntity(Player player) {\n\t\tentities.add(player);\n\t}",
"public void registerPlayer(BlackjackPlayer player) {\r\n getPlayers().add(player);\r\n }",
"@Override\n public void addPlayer(Player player) {\n\n if(steadyPlayers.size()>0){\n PlayersMeetNotification.firePropertyChange(new PropertyChangeEvent(this, \"More than one Player in this Panel\",steadyPlayers,player));\n }\n steadyPlayers.add(player);\n\n }",
"void addPlayer(Player newPlayer);",
"public void insertPlayer(Player player, int idTeam) {\n\t\ttry {\n\t\t\tStatement statement = null;\n\t\t\tconnection = connector.getConnection();\n\t\t\tstatement = connection.createStatement();\n\t\t\tjava.sql.Date pDate = new java.sql.Date(player.getDateOfBirth().getTime());\n\t\t\tString insertPlayer_sql = \"INSERT INTO \" + player_table\n\t\t\t\t\t+ \" (id, idTeam, name, lastname, dateOfBirth, height)\" + \"VALUES (NULL, \" + idTeam + \", '\"\n\t\t\t\t\t+ player.getName() + \"' , '\" + player.getLastname() + \"' , '\" + pDate + \"' , '\" + player.getHeight()\n\t\t\t\t\t+ \"')\";\n\t\t\tstatement.executeUpdate(insertPlayer_sql);\n\t\t} catch (SQLException e) {\n\t\t\tif (e.getErrorCode() == MYSQL_DUPLICATE_PK) {\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Error\");\n\t\t\t\talert.setHeaderText(\"Duplicity Error\");\n\t\t\t\talert.setContentText(\"This player is already in our database\");\n\t\t\t\talert.showAndWait();\n\t\t\t} else {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t}\n\t}",
"public void addPlayer(Player player) {\n\t\tif(players.isEmpty()) {\n\t\t\tcurrent=player;\n\t\t\tplayers.add(current);\n\t\t}\n\t\telse {\n\t\t\tplayers.add(player);\n\t\t}\n\t}",
"public void addPlayer(final Player aPlayer)\r\n\t{\r\n\t\tmPlayer.setX(mStartX * Block.SIZE);\r\n\t\tmPlayer.setY(mStartY * Block.SIZE);\r\n\t\taddEntity(mPlayer);\r\n\t}",
"public final void addPlayer(Player player) {\n\n\t\tif (player instanceof CulturePlayer) {\t\t\t\t\t\t\t\t// not too pretty but simple\n\t\t\tif (((CulturePlayer)player).isDissect()) { // instead of the culture player\n\t\t\t\tplayers.addAll(((CulturePlayer)player).getCulture()); // add all masters of the culture\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tplayers.add(player);\n\t}",
"public void addPlayer(Player p){\r\n this.players[PlayerFactory.nb_instances-1]=p;\r\n this.tiles[p.getX()+(p.getY()*this.width)]=p;\r\n }",
"public synchronized void attachTo(Player player){\n player.getDashboard().attach(this);\n players.put(player.getName(), player); //save this player to the list of known players\n }",
"public synchronized void addPlayer(PlayerHandler player) {\n\n if (activePlayers < numMaxPlayers) {\n\n players[activePlayers] = player;\n System.out.println(player.getName() + \" added to game as player \" + (activePlayers + 1));\n activePlayers++;\n return;\n }\n\n System.out.println(\"This room (\" + this.toString() + \") is full\");\n }",
"void playerAdded();",
"public void addPlayer(Player inPlayer) {\n\t\tgetPlayersInRoom().add(inPlayer);\n\t}",
"void addPlayer(IPlayer player);",
"void addPerson(Player player);",
"public void addPlayer(Player player) {\r\n players.add(player);\r\n ((DefaultListModel<Player>) playerListGui.getModel()).addElement(player);\r\n }",
"public static void addPlayer(MovingUnit player) {\r\n\t\t_players.add(player);\r\n\t}",
"public void addPlayers(ArrayList<Player> players) {\r\n\t\tthis.players = players;\r\n\t}",
"public void addPlayer(FootballPlayer aPlayer) {\n\t\tplayers.add(aPlayer);\n\t}",
"public void addPlayer(String p) {\n this.playersNames.add(p);\n }",
"public void addPlayerToStats(Player player) {\n\t\tfindForPlayer(player);\n\t}",
"private Player addNewPlayer(String username) {\n if (!playerExists(username)) {\n Player p = new Player(username);\n System.out.println(\"Agregado jugador \" + username);\n players.add(p);\n return p;\n }\n return null;\n }",
"public void addPlayerToTheList(){\n \tif(!txtFieldPlayerName.getText().trim().isEmpty() && totPlayers <= maximumPlayersAllowed){\n\t\t\t\n \t\t//creates a new Player and adds the name that the user inputs from the textField\n\t\t\tplayer.add(new Player(txtFieldPlayerName.getText()));\n\t\t\n\t\t\tString playerName = \"\";\n\t\t\tint playerNr = 1;\n\t\t\t\n\t\t\tfor(Player p : player){\n\t\t\t\tplayerName += playerNr+\": \"+p.getName()+\"<br>\"; \n\t\t\t\tplayerNr++;\n\t\t\t}\n\t\t\t\n\t\t\ttotPlayers++;\n\t\t\tlblPlayerList.setText(\"<html><h2>PLAYER LIST</h2>\"+playerName+\"</html>\");\n\t\t\ttxtFieldPlayerName.setText(\"\");\n\t\t}\n\t\t\n\t\tif(totPlayers >= minimumPlayersAllowed){\n\t\t\tbtnPlay.setEnabled(true);\n\t\t}\n\t\t\n\t\tif(totPlayers >= maximumPlayersAllowed){\n\t\t\tbtnAddPlayer.setEnabled(false);\n\t\t\ttxtFieldPlayerName.setEnabled(false);\n\t\t}\n }",
"@Override\n public void writeNewPlayer(Player player){\n if (gameCodeRef == null){\n throw new IllegalStateException(\"GameRoom is not set\");\n }\n DatabaseReference currentRef = database.getReference(gameCodeRef);\n currentRef.child(\"Players\").child(player.getUsername()).setValue(player.getUsername());\n updateNrPlayerValues(\"NumberOfPlayers\");\n }",
"@Override\n \tpublic void createAndAddNewPlayer( int playerID )\n \t{\n \t\t//add player with default name\n \t\tPlayer newPlayer = new Player( playerID, \"Player_\"+playerID );\n \t\tgetPlayerMap().put( playerID, newPlayer );\n \t}",
"public void addPlayer(PacketBuilder packet, Player player, Player otherPlayer) {\n int xPos = otherPlayer.getLocation().getX()\n - player.getLocation().getX();\n int yPos = otherPlayer.getLocation().getY()\n - player.getLocation().getY();\n /*\n * Abstraction is used here for clientsided rearrangement\n * To keep errors from loading multiple revisions at one time.\n */\n addPlayer(otherPlayer, packet, xPos, yPos);\n }",
"public void addVps(Player player) {\n }",
"private void addPlayerToGroup(Scoreboard board, Player player) {\n String playername = player.getName();\n board.registerNewTeam(playername);\n board.getTeam(playername).addPlayer(player);\n }",
"public abstract BossBar addPlayer(UUID player);",
"public boolean addPlayer(Player player)\n\t{\n\t\treturn playerList.add(player);\n\t}",
"public boolean addPlayerItem(PlayerItem playerItem);",
"public void addNewPlayer(Player p) {\n\t\t// if the player don't exists in the highscore list the player is added\n\t\tif(p.getType() == PlayerType.Agent) {\n\t\t\tif(highscore.get(p.getName()) == null) {\n\t\t\t\thighscore.put(p.getName(), 0);\n\t\t\t}\n\t\t}\n\t\tthis.playerList.add(p); \n\t}",
"boolean addPlayer(String player);",
"public void addPlayer(Player p) {\n if (gameState != GameState.AWAITING_PLAYERS) {\n throw new GameStateInvalidException(\"Cannot add players once game is underway...\");\n }\n\n // ok, just add...\n if (!players.contains(p)) {\n players.add(p);\n }\n }",
"public void addPlayer(String name) {\n players.add(new Player(name));\n }",
"public void generatePlayer()\n {\n board.getTile(8,0).insertPlayer(this.player);\n }",
"public void addPlayerToRandomRoom(Player player) {\n\n randomRoomPlayers.add(player);\n synchronized (this) {\n notify();\n }\n }",
"@RequestMapping(method = RequestMethod.POST, value = \"/players/{playerName}\")\n public void addPlayer(@PathVariable String playerName) {\n playerService.addPlayer(playerName);\n }",
"public void addPlayer(Player player, UserGroup userGroup) {\n addPlayer(player, userGroup.getTeamName(), userGroup.getUserGroupPrefix(), null);\n }",
"public void addMember(Player player) {\n\t\tif (members.isEmpty()) {\n\t\t\tcacheParty(this); // Caches the party if it went from empty to not empty\n\t\t}\n\t\tmembers.add(player.getUniqueId());\n\t}",
"@Callable\n public static void register(Address player) {\n Blockchain.require(Blockchain.getCaller().equals(owner));\n Blockchain.require(!isPlayerRegistered(player));\n requireNoValue();\n\n playerScores.put(player, 0);\n\n BettingEvents.registered(player);\n }",
"public void registerPlayer(@NonNull final UUID playerID) {\n if(getDatabaseUtil().canSeeNews(playerID)) {\n getNewsRecipient().add(playerID);\n } else {\n getNewsRecipient().remove(playerID);\n }\n }",
"@Override\r\n public void giveCardToPlayer(Card card, int player, int plDeckPosition) {\r\n this.players.get(player).addCard(plDeckPosition, card);\r\n }",
"public void addPlayerToTheFirstEmptyPlace(Player p) {\r\n\t\tfor (int i = 0; i < NB_PLAYER_MAX; i++) {\r\n\t\t\tif (players.get(i) == null) {\r\n\t\t\t\tplayers.put(i, p);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void addPlayerDuringGame(String playerName) {\n System.out.println(\"I want to add player \" + playerName + \" to the game!\");\n addPlayer(playerName);\n Collections.shuffle(players);\n }",
"public void addPlayer(String name, double attackStat, double blockStat){\n players.add(new Player(name, attackStat, blockStat));\n }",
"public boolean registerPlayer(Player p);",
"void sendPacketToPlayer(Player player, Object packet);",
"public void addPlayer(String name) {\n if (nrOfPlayers() < 4) {\n players.add(new Player(name, nrOfPlayers() + 1));\n this.status = \"Initiated\";\n } else {\n throw new NoRoomForMorePlayersException();\n }\n }",
"public int addPlayer(PlayerListener player) {\n\t\tfinal int playerID = this.players.size();\n\n\t\tthis.players.add(new Player(\"Player \" + playerID,\n\t\t\t\tgenerateRandomStartLocation(), player));\n\n\t\tif (this.players.size() == 1) {\n\t\t\tstartNewGame();\n\t\t}\n\n\t\treturn playerID;\n\t}",
"public void addPlayers(List<Player> players) {\n\n\t\tthis.players.addAll(players);\n\t}",
"public void addPlayer(String playerID) {\r\n\t\tplayerCount++;\r\n\t\tString name = guild.getMemberById(playerID).getEffectiveName();\r\n\t\t// Set up each player uniquely\r\n\t\tif (p2 == null) {\r\n\t\t\tp2 = new Player(1,playerID,GlobalVars.pieces.get(\"blue\"));\r\n\t\t\tp2.getPiece().setX(GlobalVars.playerCoordsPerRoom[0][0]+GlobalVars.playersOffset[1][0]);\r\n\t\t\tp2.getPiece().setY(GlobalVars.playerCoordsPerRoom[0][1]+GlobalVars.playersOffset[1][1]);\r\n\t\t\tplayers.add(p2);\r\n\t\t\tp1.setNextPlayer(p2);\r\n\t\t\tp2.setNextPlayer(p1);\r\n\t\t\tgameChannel.sendMessage(\"**\"+name+\"** has reincarnated as the BLUE adventurer\").queue();\r\n\t\t} else if (p3 == null) {\r\n\t\t\tp3 = new Player(2,playerID,GlobalVars.pieces.get(\"yellow\"));\r\n\t\t\tp3.getPiece().setX(GlobalVars.playerCoordsPerRoom[0][0]+GlobalVars.playersOffset[2][0]);\r\n\t\t\tp3.getPiece().setY(GlobalVars.playerCoordsPerRoom[0][1]+GlobalVars.playersOffset[2][1]);\r\n\t\t\tplayers.add(p3);\r\n\t\t\tp2.setNextPlayer(p3);\r\n\t\t\tp3.setNextPlayer(p1);\r\n\t\t\tgameChannel.sendMessage(\"**\"+name+\"** has reincarnated as the YELLOW adventurer\").queue();\r\n\t\t} else if (p4 == null) {\r\n\t\t\tp4 = new Player(3,playerID,GlobalVars.pieces.get(\"green\"));\r\n\t\t\tp4.getPiece().setX(GlobalVars.playerCoordsPerRoom[0][0]+GlobalVars.playersOffset[3][0]);\r\n\t\t\tp4.getPiece().setY(GlobalVars.playerCoordsPerRoom[0][1]+GlobalVars.playersOffset[3][1]);\r\n\t\t\tplayers.add(p4);\r\n\t\t\tp3.setNextPlayer(p4);\r\n\t\t\tp4.setNextPlayer(p1);\r\n\t\t\tgameChannel.sendMessage(\"**\"+name+\"** has reincarnated as the GREEN adventurer\").queue();\r\n\t\t}\r\n\t}",
"public void addPlayer(int place, Player p) {\r\n\t\tif (!players.containsKey(place))\r\n\t\t\tplayers.put(place, p);\r\n\t}",
"public World addPlayer(Player p){\r\n players.add(p);\r\n return this;\r\n }",
"public void addMember(Player player) {\n this.members.add(player.getUniqueId().toString());\n }",
"public void setUpPlayers() {\n this.players.add(new Player(\"Diogo\"));\n this.players.add(new Player(\"Hayden\"));\n this.players.add(new Player(\"Gogo\"));\n }",
"public boolean addPlayer(Player p) {\n\t\tif(p != null && !squareOccuped()) {\n\t\t\tthis.player = p;\n\t\t\treturn true;\n\t\t} else return false;\n\t}",
"public void addPlayerShip()\n\t{\n\t\t//if a PlayerShip is already spawned, a new one will not be added\n\t\tif(shipSpawned)\n\t\t{\n\t\t\t\tSystem.out.println(\"A player ship is already spawned\");\n\t\t\t\treturn;\n\t\t}\n\t\tgameObj.add(new PlayerShip(getHeight(), getWidth()));\n\t\tSystem.out.println(\"Player ship added\");\n\t\tshipSpawned = true;\n\t\tnotifyObservers();\n\t}",
"@Override\r\n public void addPlayers(int numberOfPlayers) {\r\n for (int i = 0; i < numberOfPlayers; i++) {\r\n this.addPlayer();\r\n }\r\n }",
"void addEventPlayers(Player player, boolean team);",
"void onInsertHeldContainer(EntityPlayerMP player);",
"int insertSelective(GpPubgPlayer record);",
"public Player createPlayer(Player player) {\n // check whether unique player can be created or not\n if (playerRepository.existsByUsername(player.getUsername())) {\n return null;\n }\n if (playerRepository.existsByEmailAddress(player.getEmailAddress())) {\n return null;\n }\n player.setPassword(encryption.encoder().encode(player.getPassword()));\n return playerRepository.save(player);\n }",
"public void addPlayer(Player player, String teamName, String prefix, String suffix) {\n // Give the player the current scoreboard.\n player.setScoreboard(scoreboard);\n\n // Lets add the team to the scoreboard.\n addTeam(teamName, prefix, suffix);\n\n // Add the player to the team.\n getTeam(teamName).addEntry(player.getName());\n }",
"default boolean addPlayer(Player player) {\n return addPlayer(Objects.requireNonNull(player, \"player\").getName());\n }",
"public boolean addPlayer(final Player player)\n {\n if (player == null || !player.isOnline()) {\n return false;\n }\n\n String playerName = player.getName().toLowerCase();\n\n if (!listeners.containsKey(playerName)) {\n listeners.put(playerName, player);\n\n player.setScoreboard(board);\n\n return true;\n }\n\n return false;\n }",
"public void insertMatch(TennisMatch m) throws TennisDatabaseException { \n\t\t\n\t\t// Extract the ID's of player 1 and player 2 from TennisMatch class\n\t\t\n String idPlayer1 = m.getIdPlayer1();\n String idPlayer2 = m.getIdPlayer2();\n \n // Search the node associated with player 1 by ID \n \n TennisPlayerContainerNode nodeP1 = getPlayerNodeRec(this.root, idPlayer1);\n TennisPlayerContainerNode nodeP2 = getPlayerNodeRec(this.root, idPlayer2);\n\n if ((nodeP1 != null) && (nodeP2 != null)) {// if players' nodes are not empty, we insert both matches \n \t\n nodeP1.insertMatch(m);\n nodeP2.insertMatch(m);\n \n } else {\n \t\n throw new TennisDatabaseException(\"Player could not be found for insertion\");\n \n }\n\n\t}",
"public void cmdAddPlayer(User teller, String playerHandle) {\n Player player = tournamentService.findPlayer(playerHandle);\n try {\n player = tournamentService.createPlayer(playerHandle);\n } catch (InvalidPlayerException e) {\n replyError(teller, e);\n return;\n } catch (InvalidTeamException e) {\n replyError(teller, e);\n command.tell(teller, \"To create a new team, use the \\\"add-team\\\" command. Usage: add-team XXX\");\n return;\n }\n tournamentService.flush();\n command.tell(teller, \"Done. Player {0} has joined the \\\"{1}\\\".\", player, player.getTeam());\n command.tell(teller, \"To set the player''s real name, use: \\\"set-player {0} name 2200\\\"\", player);\n cmdShowPlayer(teller, player);\n }",
"public void addPlayer(String name) {\n\t\tcreateGameLobbyController.addPlayerToList(name);\n\t}",
"public void setPlayer(Player player) {\n this.player = player;\n }",
"public static void addingNewPlayer(){\r\n\t\t//hard code each score includng a total.\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\t\tSystem.out.println(\"Enter the name of the Player?\");\r\n\t\t\t\t\tString name = scan.next();\r\n\t\t\t\t\t\r\n\t\t\t//establishing the connection\r\n\t\t\tstatement = connection.createStatement();\r\n\t\t\t\r\n\t\t\t//inserting the quries assign to the String variables\r\n\t\t\tString query=\"insert into \" + tableName + \" values ('\" + name +\"', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\";\t\t\r\n\t\t\t\r\n\t\t\t//inserting the hard coded data into the table of the datbase\r\n\t\t\tstatement.execute(query);\r\n\t\t\t\r\n\t\t\t//closing the statement\r\n\t\t\tstatement.close();\r\n\t\t\t\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t System.out.println(\"SQL Exception occurs\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}",
"public boolean addPlayer(GamePlayer player) {\n\t\tif (players.size() >= info.getMaximumPlayers())\n\t\t\treturn false;\n\t\tplayer.setCurrentGame(this);\n\t\tplayer.setJoinLocation(player.getPlayer().get().getLocation());\n\t\tplayers.add(player);\n\t\treturn true;\n\t}",
"public void addPlayerShip()\n\t{\n\t\t//if a PlayerShip is already spawned, a new one will not be added\n\t\tif (gameObj[1].size() == 0)\n\t\t{\n\t\t\tgameObj[1].add(new PlayerShip());\n\t\t\tSystem.out.println(\"PlayerShip added\");\n\t\t}else{\n\t\t\tSystem.out.println(\"A player ship is already spawned\");\n\t\t}\n\t\t\n\t}",
"@Override\npublic void addPlayer(Player<T> x) {\n\tif (getNumPlayers() == 0) {\n\t\tcurrentPlayer = x;\n\t\tx.setNext(x);\n\t\tnumPlayer++;\n\t} else {\n\t\tPlayer<T> prevNode = this.currentPlayer;\n\t\tfor (int i = 0; i < getNumPlayers(); i++) {\n\t\t\tif (prevNode.getNext().equals(this.currentPlayer)) {\n\t\t\t\tx.setNext(currentPlayer);\n\t\t\t\tprevNode.setNext(x);\n\t\t\t}\n\t\tprevNode = prevNode.getNext(); \n\t\t}\n\tnumPlayer++;\n\t}\n}",
"public void setPlayer(Player player) {\n this.player = player;\n }",
"private TennisPlayerContainerNode insertPlayerRec(TennisPlayerContainerNode currRoot, TennisPlayer p) throws TennisDatabaseException {\n\t\t\n\t\tif (currRoot == null) {\n\t\t\t\n return new TennisPlayerContainerNode(p);\n \n } else { // 3-way comparison to understand how to proceed the search.\n \n \t// Get player from current root and compare them\n int comparisonResult = currRoot.getPlayer().compareTo(p); \n \n if (comparisonResult == 0) {// if they are the same\n \t\n throw new TennisDatabaseException(\"Player already exists within database. Please insert a new player\");\n \n } else if (comparisonResult < 0) {// if they are different\n \t\n currRoot.setRight(insertPlayerRec(currRoot.getRight(), p));\n \n return currRoot;\n \n } else {// else \n \t\n currRoot.setLeft(insertPlayerRec(currRoot.getLeft(), p));\n \n return currRoot;\n }\n }\n\t}",
"public static void worldLocsInsert(Player player) {\n\n\t\ttry {\n\n\t\t\tStatement st = conn.createStatement();\n\n\t\t\tLocation pLoc = player.getLocation();\n\t\t\tint x = pLoc.getBlockX();\n\t\t\tint y = pLoc.getBlockY();\n\t\t\tint z = pLoc.getBlockZ();\n\t\t\tUUID uuid = player.getUniqueId();\n\n\t\t\t/* This is easier... */\n\t\t\tst.executeUpdate(\"DELETE FROM worldlocs WHERE uuid='\" + uuid + \"';\");\n\t\t\tst.executeUpdate(\"INSERT INTO worldlocs(uuid, x, y, z) VALUES ('\" + uuid + \"', '\" + x + \"', '\" + y + \"', '\" + z + \"');\");\n\n\t\t\tst.close();\n\n\t\t} catch (Exception e) {\n\t\t\tPvPTeleport.instance.getLogger().info(e.getMessage());\n\t\t}\n\n\t}",
"public void setPlayer(Player player) {\r\n this.player = player;\r\n }",
"@Test\n public void testAddPlayer() {\n System.out.println(\"addPlayer\");\n Player player = new Player(\"New Player\");\n Team team = new Team();\n team.addPlayer(player);\n assertEquals(player, team.getPlayers().get(0));\n }",
"public PlayerHandler create(String type, PlayerInfo playerInfo, List<Integer> otherPlayerIds);",
"void newPlayer(String name, String institution){\n Player newPlayer = new Player(name, institution,0);\n boolean x = players.add(newPlayer);\n }",
"public synchronized void AddPlayerToGame(String playerName, String IPAddress, Integer portAddress) {\n inGamePlayers.add(playerName);\n inGamePlayersIP.add(IPAddress);\n inGamePlayersPort.add(portAddress);\n }",
"public void setPlayer(Player _player) { // beallit egy ezredest az adott mapElementre, ha az rajta van\n player = _player;\n }",
"public static void deathBanLocsInsert(Player player) {\n\n\t\ttry {\n\n\t\t\tStatement st = conn.createStatement();\n\n\t\t\tLocation pLoc = player.getLocation();\n\t\t\tint x = pLoc.getBlockX();\n\t\t\tint y = pLoc.getBlockY();\n\t\t\tint z = pLoc.getBlockZ();\n\t\t\tUUID uuid = player.getUniqueId();\n\n\t\t\t/* This is easier... */\n\t\t\tst.executeUpdate(\"DELETE FROM deathbanlocs WHERE uuid='\" + uuid + \"';\");\n\t\t\tst.executeUpdate(\"INSERT INTO deathbanlocs(uuid, x, y, z) VALUES ('\" + uuid + \"', '\" + x + \"', '\" + y + \"', '\" + z + \"');\");\n\n\t\t\tst.close();\n\n\t\t} catch (Exception e) {\n\t\t\tPvPTeleport.instance.getLogger().info(e.getMessage());\n\t\t}\n\n\t}",
"public void addEntity(Entity entity)\n\t{\n\t\t\n\t\tif (entity.getClass() == PlayerMP.class)\n\t\t{\n\t\t\t//System.out.println(\"ADDING PLAYER TO PLAYER LIST\");\n\t\t\tplayers.add((PlayerMP)entity);\n\t\t\t//System.out.println(\"World Player Count: \" + players.size());\n\t\t}\n\t\telse\n\t\t{\n\t\t\tentities.add(entity);\n\t\t}\n\t}",
"public void addPlayer(VirtualView client) throws GameEndedException {\n if (!running.get() || !setup.get()) throw new GameEndedException(\"game ended\");\n if (playerControllers.size() >= game.getPlayerNum()) {\n logError(\"too many players\");\n return;\n }\n Player player = new Player(client.getId(), colors.get(playerControllers.size()));\n PlayerController playerController = new PlayerController(player, client, this);\n game.addPlayer(player);\n playerControllers.add(playerController);\n client.setPlayerController(playerController);\n try {\n broadcastGameInfo(\"playerJoined\");\n broadcastMessage(client.getId() + \" joined! (\" + game.getPlayers().size() + \"/\" + game.getPlayerNum() + \") \");\n } catch (IOExceptionFromController e) {\n handleDisconnection(e.getController());\n }\n }",
"protected void syncNewContainer(EntityPlayerMP player) {\n\t}",
"public void addPlayer(int id, String name) {\n Color[] colors = new Color[]{Color.RED, Color.CYAN, Color.LIME, Color.YELLOW, Color.MAGENTA};\n Player player = new Player(id, colors[playerTracking.size()], name);\n playerTracking.add(player);\n\n onAddPlayer(player);\n }",
"public boolean addPlayer(long idGame, Player player) {\n Game game = this.getGameById(idGame);\n\n if(game == null) {\n return false;\n }\n\n game.getPlayers().add(player);\n this.save(game);\n\n return true;\n }",
"void createPlayer(Player player);",
"private void addPlayers(@NotNull MapHandler map, @NotNull NewGameDto newGameDto) {\n ComparableTuple<Integer, Stack<SpawnTile>> result = analyseMap(map);\n flagCount = result.key;\n Stack<SpawnTile> spawnTiles = result.value;\n if (!spawnTiles.isEmpty()) {\n for (PlayerDto player : newGameDto.players) {\n SpawnTile spawnTile = spawnTiles.pop();\n if (player.id == newGameDto.userId) {\n user = new Player(spawnTile.getX(), spawnTile.getY(), Direction.NORTH, map, new ComparableTuple<>(GameGraphics.mainPlayerName + \" (you)\", player.color), player.id);\n user.setDock(spawnTile.getSpawnNumber());\n players.add(user);\n } else {\n IPlayer onlinePlayer = new OnlinePlayer(spawnTile.getX(), spawnTile.getY(), Direction.NORTH, map, new ComparableTuple<>(player.name, player.color), player.id);\n onlinePlayer.setDock(spawnTile.getSpawnNumber());\n players.add(onlinePlayer);\n }\n }\n } else {\n for (int i = 0; i < playerCount; i++) {\n NonPlayer nonPlayer = new NonPlayer(i, 0, Direction.NORTH, map, new ComparableTuple<>(\"blue\", Color.BLUE));\n nonPlayer.setDock(i);\n players.add(nonPlayer);\n }\n }\n }",
"void sendPacket(Player player, Object packet);"
] | [
"0.75995857",
"0.74356073",
"0.71686244",
"0.70895636",
"0.70668954",
"0.69430256",
"0.69146925",
"0.6892507",
"0.68858516",
"0.6828955",
"0.67700434",
"0.67525667",
"0.67401445",
"0.6734643",
"0.66961074",
"0.667783",
"0.664371",
"0.6631118",
"0.66040075",
"0.6599596",
"0.6586809",
"0.65746796",
"0.65474284",
"0.65012056",
"0.64726526",
"0.6469178",
"0.6463938",
"0.64399993",
"0.6426295",
"0.6375811",
"0.63435626",
"0.63035476",
"0.6259192",
"0.62404954",
"0.6211105",
"0.62021625",
"0.6189839",
"0.61570185",
"0.6128472",
"0.612306",
"0.6115856",
"0.6101825",
"0.60953337",
"0.607896",
"0.60459816",
"0.602031",
"0.6009787",
"0.60037225",
"0.6000954",
"0.5996339",
"0.5976297",
"0.5973213",
"0.5958307",
"0.59575754",
"0.5953399",
"0.59416515",
"0.5928451",
"0.59253824",
"0.59155",
"0.5901877",
"0.5872789",
"0.58632946",
"0.5848187",
"0.58263636",
"0.57983184",
"0.5788948",
"0.57847154",
"0.5776094",
"0.5762875",
"0.5760562",
"0.57537663",
"0.57422507",
"0.57418674",
"0.5735041",
"0.5711659",
"0.57099885",
"0.57005286",
"0.57002974",
"0.56948245",
"0.56844693",
"0.56842726",
"0.5683973",
"0.5681678",
"0.56793153",
"0.56786585",
"0.5674141",
"0.56661165",
"0.56658334",
"0.56622785",
"0.56536025",
"0.56498855",
"0.56492496",
"0.564111",
"0.5640866",
"0.5640147",
"0.5618496",
"0.5616285",
"0.5607841",
"0.5607186",
"0.5601595"
] | 0.73606175 | 2 |
Get a collection of all the players sorted by the given sorting parameter. Only one handler should response to this request the one which contains a collection which is sorted by the given sortingParameter | @Override
public Collection<Player> getSortedPlayersHandler(String sortingParameter) {
if(sortingParameter.equals(ID_SORTING_PARAM_STRING)){
// the sorting param is by id - return current TreeSet
return playerByIdTreeSet;
}else if(successor!=null){
// sorting param not by id - pass the request to the next handler
return successor.getSortedPlayersHandler(sortingParameter);
}else{
// no more handlers - return current TreeSet
return playerByIdTreeSet;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@GET\n @Produces({ \"application/json\" })\n public abstract Response get(@QueryParam(\"sort\") String sort);",
"Sort asc(QueryParameter parameter);",
"private void getPlayerList(){\r\n\r\n PlayerDAO playerDAO = new PlayerDAO(Statistics.this);\r\n players = playerDAO.readListofPlayerNameswDefaultFirst();\r\n\r\n }",
"@Override\n\tList<Item> findAll(Sort sort);",
"@GetMapping(\"/sort-asc\")\n public List<TeacherDTO> getSortedTeachers() {\n return teacherService.getSortedTeachers().stream()\n .map(this::convertToDto)\n .collect(Collectors.toList());\n }",
"Sort desc(QueryParameter parameter);",
"List<E> findAll(Sort sort);",
"public List<Player> getAllOrdered() {\n PlayerDB pdb = new PlayerDB();\n return pdb.getAllOrdered();\n }",
"private void sortPlayers(List<Player> players, String sortField) {\n\t LOG.info(\"sortPlayers=(players=\" + players + \",sortField=\" + sortField);\n\t if (sortField != null && !sortField.equals(\"\")) {\n\t Comparator<Player> comp = new Comparator<Player>(){\n\t @Override\n\t public int compare(Player p1, Player p2) {\n\t // Descending if it begins with a -\n\t boolean desc = sortField.startsWith(\"-\");\n\t String fieldToUse = desc ? sortField.substring(1): sortField; \n\n\t try {\n\t String field1 = BeanUtils.getProperty(p1, fieldToUse);\n\t String field2 = BeanUtils.getProperty(p2, fieldToUse);\n\t return (desc) ? field2.compareTo(field1) : field1.compareTo(field2);\n\t } catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t// Again just for test purposes. Since we are in the service layer \n\t\t\t\t\t\t// and beyond the API. We will throw a Business Logic Exception.\n\t\t\t\t\t\tthrow new BusinessLogicException(e.getMessage(), \n\t\t\t\t\t\t\t\tBusinessErrorCodeEnum.INTERNAL_PROCESSING_ERROR);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t};\n\t\t\tCollections.sort(players, comp);\n\t\t}\n\t}",
"@Override\n\tpublic List<Listing> findAllSortedByTime() {\n\t\treturn theListingRepo.findAll(Sort.by(Direction.DESC, \"dateUploaded\"));\n\t}",
"Results sortResults(FilterSpecifier.ListBy listBy, SortSpecifier sortspec) throws SearchServiceException;",
"public List<T> findAll(DBObject orderBy) throws NoSQLException;",
"public Page<CampaignWithStat> getCampaingsWithStat(String sortField, Sort.Direction direction, int page, int size);",
"public void sort()\n {\n com.jayway.restassured.response.Response response= given().relaxedHTTPSValidation().when().get(\"http://18.222.188.206:3333/accounts?_sort=title&_order=asc\");\n response.then().assertThat().statusCode(200);\n System.out.println(\"The accounts that are sorted according to it's title is displayed below:\");\n response.prettyPrint();\n \n }",
"Collection<User> players();",
"ArrayList<Player> getAllPlayer();",
"private void sort() {\n\t\tCollections.sort(this.entities, comparator);\n\t}",
"@NotNull\n EntityIterable asSortResult();",
"void sort(OrderBy orderBy);",
"@Override\n\tpublic List<Listing> findAllSortedByPrice() {\n\t\treturn theListingRepo.findAll(Sort.by(Direction.DESC, \"price\"));\n\t}",
"@Override\n public List<Client> clientsSortedAlphabetically(){\n log.trace(\"clientsSortedAlphabetically -- method entered\");\n Iterable<Client> clients = clientRepository.findAll();\n List<Client> result = StreamSupport.stream(clients.spliterator(),false).sorted(Comparator.comparing(Client::getName)).collect(Collectors.toList());\n log.trace(\"clientsSortedAlphabetically: result={}\", result);\n return result;\n\n }",
"private void sortResults(){\r\n this.sortedPlayers = new ArrayList<>();\r\n int size = players.size();\r\n while (size > 0) {\r\n Player lowestPointsPlayer = this.players.get(0);\r\n for(int i = 0; i<this.players.size(); i++){\r\n if(lowestPointsPlayer.getPoints() <= this.players.get(i).getPoints()){\r\n lowestPointsPlayer = this.players.get(i);\r\n }\r\n }\r\n this.sortedPlayers.add(lowestPointsPlayer);\r\n this.players.remove(lowestPointsPlayer);\r\n size--;\r\n }\r\n\r\n\r\n }",
"List<Athlete> getAllOrderByScore(OrderBy orderBy);",
"private List<T> fetch(Filter filter, Pageable pageable, SortOrders sortOrders, FetchJoinInformation... joins) {\n\t\tTypedQuery<T> query = JpaQueryBuilder.createSelectQuery(filter, entityManager, getEntityClass(),\n\t\t\t\t(joins == null || joins.length == 0) ? getFetchJoins() : joins,\n\t\t\t\tsortOrders == null ? null : sortOrders.toArray());\n\n\t\tif (pageable != null) {\n\t\t\tquery.setFirstResult(pageable.getOffset());\n\t\t\tquery.setMaxResults(pageable.getPageSize());\n\t\t}\n\t\treturn query.getResultList();\n\t}",
"List<Player> getPlayers();",
"public List<PlayerItem> getAllPlayerItemById(Player player);",
"@RequestMapping(value = \"/associations/{associationId}/players\", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\n\t@Timed\n\tpublic ResponseEntity<List<Player>> getPlayers(@PathVariable Long associationId,Player player,Pageable pageable) throws URISyntaxException {\n\t\tlog.debug(\"REST request to get Association Players: {}\", associationId);\n\t\tPlayer example = new Player();\n\t\tAssociation exampleAssociation = new Association();\n\t\texampleAssociation.setId(associationId);\n\t\tTeam exampleTeam = new Team();\n\t\tClub exampleClub = new Club();\n\t\texampleClub.setAssociation(exampleAssociation);\n\t\texampleTeam.setClub(exampleClub);\n\t\texample.setTeam(exampleTeam);\n\t\texampleClub.setAssociation(exampleAssociation);\n example.setTeam(exampleTeam);\n Page<Player> page = playerRepository.findAll(Example.of(example),pageable);\n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/associations/\"+associationId+\"/players\");\n\t\treturn new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n\t}",
"List<Player> findAllPlayers();",
"@Override\r\n\tpublic List<CreditCard> sortedList(String sortBy) {\n\t\tswitch(sortBy)\r\n\t\t{\r\n\t\tcase \"cardHolderName\" :\r\n\t\tCollections.sort(this.cardList);\r\n\t\tbreak;\r\n\t\tcase \"cardNumber\" :\r\n\t\t\tCollections.sort(this.cardList,new CreditCardComparator());\r\n\t\t\tbreak;\r\n\t\tcase \"sortByLimit\" :\r\n\t\t\tCollections.sort(this.cardList,new CreditLimitComparator());\r\n\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn this.cardList;\r\n\t}",
"public List<PlayerItem> getAll();",
"@Override\n\tpublic List<Customer> getCustomers(String sort) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\tString QueryString = \"from Customer order by \" + sort;\n\t\t\n\t\t// create a query ... sort by last name\n\t\tQuery<Customer> theQuery = currentSession.createQuery(QueryString, Customer.class);;\t\n\t\t// execute query and get result list\n\t\tList<Customer> customers = theQuery.getResultList();\n\t\t\t\t\n\t\t// return the results\t\t\n\t\treturn customers;\n\t}",
"@Override\n public List<Client> clientsSortedByMoneySpent(){\n log.trace(\"clientsSortedByMoneySpent -- method entered\");\n Iterable<Client> clients = clientRepository.findAll();\n List<Client> result = StreamSupport.stream(clients.spliterator(),false).sorted(Comparator.comparing(Client::getMoneySpent).reversed()).collect(Collectors.toList());\n log.trace(\"clientsSortedByMoneySpent: result={}\", result);\n return result;\n }",
"public Collection getSortedEntries(final PropertyAccessor sortProperty, boolean descending) {\n \t\tIEntryQueries queries = (IEntryQueries)getSession().getAdapter(IEntryQueries.class);\n \tif (queries != null) {\n \t\treturn queries.getSortedEntries(this, sortProperty, descending);\n \t} else {\n \t\t// IEntryQueries has not been implemented in the datastore.\n \t\t// We must therefore provide our own implementation.\n \t\t\n \t\tList sortedEntries = new LinkedList();\n \t\t\n \t\tIterator it = entries.iterator();\n \t\twhile (it.hasNext()) {\n \t\t\tsortedEntries.add(it.next());\n \t\t}\n \t\t\n \t\tComparator entryComparator;\n \t\tif (sortProperty.getPropertySet() == EntryInfo.getPropertySet()) {\n \t\t\tentryComparator = new Comparator() {\n \t\t\t\tpublic int compare(Object a, Object b) {\n \t\t\t\t\tObject value1 = ((Entry) a).getPropertyValue(sortProperty);\n \t\t\t\t\tObject value2 = ((Entry) b).getPropertyValue(sortProperty);\n \t\t\t\t\tif (value1 == null && value2 == null) return 0;\n \t\t\t\t\tif (value1 == null) return 1;\n \t\t\t\t\tif (value2 == null) return -1;\n \t\t\t\t\tif (Comparable.class.isAssignableFrom(sortProperty.getValueClass())) {\n \t\t\t\t\t\treturn ((Comparable)value1).compareTo(value2);\n \t\t\t\t\t} else {\n \t\t\t\t\t\tthrow new RuntimeException(\"not yet implemented\");\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t};\n \t\t} else if (sortProperty.getPropertySet() == TransactionInfo.getPropertySet()) {\n \t\t\tentryComparator = new Comparator() {\n \t\t\t\tpublic int compare(Object a, Object b) {\n \t\t\t\t\tObject value1 = ((Entry) a).getTransaction().getPropertyValue(sortProperty);\n \t\t\t\t\tObject value2 = ((Entry) b).getTransaction().getPropertyValue(sortProperty);\n \t\t\t\t\tif (value1 == null && value2 == null) return 0;\n \t\t\t\t\tif (value1 == null) return 1;\n \t\t\t\t\tif (value2 == null) return -1;\n \t\t\t\t\tif (Comparable.class.isAssignableFrom(sortProperty.getValueClass())) {\n \t\t\t\t\t\treturn ((Comparable)value1).compareTo(value2);\n \t\t\t\t\t} else {\n \t\t\t\t\t\tthrow new RuntimeException(\"not yet implemented\");\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t};\n \t\t} else if (sortProperty.getPropertySet() == AccountInfo.getPropertySet()) {\n \t\t\tentryComparator = new Comparator() {\n \t\t\t\tpublic int compare(Object a, Object b) {\n \t\t\t\t\tObject value1 = ((Entry) a).getAccount().getPropertyValue(sortProperty);\n \t\t\t\t\tObject value2 = ((Entry) b).getAccount().getPropertyValue(sortProperty);\n \t\t\t\t\tif (value1 == null && value2 == null) return 0;\n \t\t\t\t\tif (value1 == null) return 1;\n \t\t\t\t\tif (value2 == null) return -1;\n \t\t\t\t\tif (Comparable.class.isAssignableFrom(sortProperty.getValueClass())) {\n \t\t\t\t\t\treturn ((Comparable)value1).compareTo(value2);\n \t\t\t\t\t} else {\n \t\t\t\t\t\tthrow new RuntimeException(\"not yet implemented\");\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t};\n \t\t} else {\n \t\t\tthrow new RuntimeException(\"given property cannot be used for entry sorting\");\n \t\t}\n \t\t\n \t\tif (descending) {\n \t\t\tfinal Comparator ascendingComparator = entryComparator;\n \t\t\tentryComparator = new Comparator() {\n \t\t\t\tpublic int compare(Object a, Object b) {\n \t\t\t\t\treturn ascendingComparator.compare(b, a);\n \t\t\t\t}\n \t\t\t};\n \t\t}\n \t\t\n \t\tCollections.sort(sortedEntries, entryComparator);\n \t\t\n \t\treturn sortedEntries;\n \t}\n \t}",
"List<E> findAll(Specification<E> spec, Sort sort);",
"public List<Player> getPlayersOrdered() {\r\n ArrayList<Player> result = new ArrayList<>();\r\n for (PlayerContainer container : players) {\r\n result.add(container.player);\r\n }\r\n return result;\r\n }",
"@RequestMapping(\"/players\")\n public List<Player> getAllPlayers() {\n return playerService.getPlayerList();\n }",
"public ArrayList<Player> getLeaderboard() {\n ArrayList<Player> result = new ArrayList(players);\n for (Player player : players) {\n Collections.sort(result);\n Collections.reverse(result);\n }\n return result;\n}",
"List<Player> listPlayers();",
"@Override\n\tpublic List<Resource> findAll(Sort sort) {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic ArrayList<Sort> selectAll() {\n\t\tResultSet rs;\r\n\t\tConnection conn = db.getConnection();\r\n\t\tArrayList<Sort> list=new ArrayList<Sort>();\r\n\t\tString sql = \"select * from movie_sort\";\r\n\t\tPreparedStatement pstmt;\r\n\t\ttry {\r\n\t\t\tpstmt = conn.prepareStatement(sql);\r\n\t\t\trs = pstmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\t list.add(new Sort(rs.getString(1), rs.getInt(2)));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {//현재 메서드가 종료하기 전에 꼭 실행해야하는 코드 작성\r\n\t\t\tdb.disConn();\r\n\t\t}\r\n\t\treturn list;\r\n\t}",
"public List<Player> getSortedListOfPlayersDesc(Long idGame) {\n Game game = this.getGameById(idGame);\n\n if(game == null) {\n return null;\n }\n\n List<Player> players= new ArrayList<>(game.getPlayers());\n game.getPlayers().sort((o1, o2) -> {\n if(o1.getHandValue() < o2.getHandValue())\n return 1;\n if(o1.getHandValue() > o2.getHandValue())\n return -1;\n return 0 ;\n });\n\n return players;\n }",
"private static void multipleSortOfFinalPlayerList() {\n\n sortedFinalPlayerList = new ArrayList<>();\n\n Comparator<Player> byLastName = (e1, e2) -> e1\n .getLastName().compareTo(e2.getLastName());\n\n Comparator<Player> byFirstName = (e1, e2) -> e1\n .getFirstName().compareTo(e2.getFirstName());\n\n Comparator<Player> byCountry = (e1, e2) -> e1\n .getCountry().compareTo(e2.getCountry());\n\n streamPlayerList.stream().sorted(byLastName.thenComparing(byFirstName).thenComparing(byCountry))\n .forEach(e -> System.out.print(e));\n Stream<Player> f = streamPlayerList.stream().sorted(byLastName.thenComparing(byFirstName).thenComparing(byCountry));\n f.forEach(r -> sortedFinalPlayerList.add(r));\n }",
"public List<T> findAll(Sort arg0) {\n\t\treturn null;\n\t}",
"public String sortBy();",
"protected List<Player> listQuery(final PreparedStatement statement) throws SQLException {\n\t\tfinal ArrayList<Player> searchResults = new ArrayList<Player>();\n\t\tResultSet result = null;\n\n\t\ttry {\n\t\t\tresult = statement.executeQuery();\n\n\t\t\twhile (result.next()) {\n\t\t\t\tfinal Player temp = createValueObject();\n\n\t\t\t\ttemp.setId(result.getInt(\"id\"));\n\t\t\t\ttemp.setFirstName(result.getString(\"firstName\"));\n\t\t\t\ttemp.setLastName(result.getString(\"lastName\"));\n\t\t\t\ttemp.setEmailAddress(result.getString(\"emailAddress\"));\n\t\t\t\ttemp.setGamerTag(result.getString(\"gamerTag\"));\n\t\t\t\ttemp.setBirthDate(result.getDate(\"birthDate\"));\n\n\t\t\t\tsearchResults.add(temp);\n\t\t\t}\n\t\t} finally {\n\t\t\tif (result != null) {\n\t\t\t\tresult.close();\n\t\t\t}\n\t\t\tif (statement != null) {\n\t\t\t\tstatement.close();\n\t\t\t}\n\t\t}\n\t\treturn searchResults;\n\t}",
"public ListResponse<PlayerResponse> getPlayers() {\n\t\tcheckProvided();\n\t\treturn players;\n\t}",
"public List<BaseModel> getAll(List<String> sortOn) throws UnsortableAttributeException {\n if (!cacheAvailable())\n return null;\n\n if (sortOn == null || sortOn.size() == 0)\n return getAll();\n\n logger.trace(\"sorting on \" + sortOn);\n\n try {\n Query query = cache.createQuery().includeValues();\n addSortToQuery(query, sortOn);\n Results results = query.execute();\n return getObjectValues(results);\n } catch (Exception e) {\n logger.info(\"-->Returing null result set. Got exception while getting data from cache : \", e);\n return null;\n }\n }",
"private static void sort(MongoCollection mongoCollection) {\n mongoCollection.find().sort(eq(\"name\", 1)).forEach(new Block<Document>() {\n public void apply(Document document) {\n System.out.println(document.toJson());\n }\n });\n }",
"@Override\n public List<PrescriptionRecord> findListByParams(Map map) {\n Map<String, Object> param = new HashMap<String, Object>(map);\n \n String sort = (String) map.get(\"sortType\");\n if(sort!=null) {\n param.put(\"sortType\", sort);\n }else {\n param.put(\"sortType\", \"DESC\");\n }\n \n List<ShardMeta> shardMetas = generateShardMetas();\n Integer pageSize = (Integer) param.get(\"pageSize\");\n boolean findRange = StringUtils.isBlank((String) param.get(\"orderNo\")) && pageSize != null;\n Integer startNum = findRange ? (Integer) param.get(\"startNum\") : 0;\n Integer subStartNum = startNum / shardMetas.size();\n \n List<PrescriptionRecord> allOrders = new ArrayList<PrescriptionRecord>();\n try {\n // 指定订单号则跳过\n if (findRange) {\n param.put(\"subStartNum\", subStartNum);\n // 提交第一次查询,查询每个分片的订单范围\n List<Future<List<Long>>> rangeTasks = submitRangeQuery(param, shardMetas, queryPool);\n long minTime = Long.MAX_VALUE;\n long maxTime = Long.MIN_VALUE;\n Iterator<ShardMeta> iterator = shardMetas.iterator();\n // 根据每个分片的订单范围计算出全局的订单范围\n for (int i = 0; i < rangeTasks.size(); i++) {\n ShardMeta shardMeta = iterator.next();\n List<Long> timestamps = rangeTasks.get(i).get();\n if (timestamps.isEmpty()) {\n continue;\n }\n \n shardMeta.setMaxTime(timestamps.get(0));\n shardMeta.setMinTime(timestamps.get(timestamps.size() - 1));\n if (maxTime < shardMeta.getMaxTime()) {\n maxTime = shardMeta.getMaxTime();\n }\n if (minTime > shardMeta.getMinTime()) {\n minTime = shardMeta.getMinTime();\n }\n }\n param.put(\"startTime\", minTime);\n param.put(\"endTime\", maxTime);\n }\n \n // 提交第二次查询,查询每个分片符合范围的订单\n List<Future<List<PrescriptionRecord>>> orderTasks = submitOrderQuery(param, shardMetas, queryPool);\n int offset = 0;\n Iterator<ShardMeta> iterator = shardMetas.iterator();\n List<ShardMeta> offsetShards = new ArrayList<ShardMeta>();\n // 合并所有分片的结果\n for (Future<List<PrescriptionRecord>> orderTask : orderTasks) {\n ShardMeta shardMeta = iterator.next();\n List<PrescriptionRecord> orderViews = orderTask.get();\n if (findRange) {\n if (shardMeta.getMaxTime() == Long.MIN_VALUE) {\n offsetShards.add(shardMeta);\n } else {\n int shardAheadCount = getAheadCount(orderViews, shardMeta.getMaxTime());\n // 累加全局偏移量\n offset += subStartNum - shardAheadCount;\n // 删除不需要后补齐查询的分片信息\n if (orderViews.size() - shardAheadCount < pageSize)\n iterator.remove();\n }\n }\n allOrders.addAll(orderViews);\n }\n \n if (!findRange || allOrders.isEmpty())\n return allOrders;\n /*\n // 进行分片偏移量查询\n if (!offsetShards.isEmpty()) {\n Object startTime = param.get(\"startTime\");\n param.put(\"startTime\", param.get(\"endTime\"));\n param.put(\"endTime\", map.get(\"endTime\"));\n \n List<Future<Long>> offsetTasks = submitOffsetQuery(param, offsetShards, queryPool);\n for (Future<Long> offsetTask : offsetTasks)\n offset += offsetTask.get();\n \n param.put(\"startTime\", startTime);\n }\n \n // 进行第三次查询\n int targetOffset = startNum - offset;\n int endIndex = targetOffset + pageSize;\n if (endIndex > allOrders.size() && !shardMetas.isEmpty()) {\n int backfill = endIndex - allOrders.size();\n param.put(\"backfill\", backfill);\n param.put(\"endTime\", param.get(\"startTime\"));\n param.put(\"startTime\", map.get(\"startTime\"));\n orderTasks = submitOrderQuery(param, shardMetas, queryPool);\n for (Future<List<PrescriptionRecord>> orderTask : orderTasks)\n allOrders.addAll(orderTask.get());\n }\n \n */\n int targetOffset = startNum;\n int endIndex = startNum + pageSize;\n \n if (allOrders.size() <= targetOffset)\n return Collections.EMPTY_LIST;\n \n \n // 对合并后的结果统一排序,并根据全局偏移量定位分页的第一条订单的偏移量,提取分页结果\n \n sortByCreateTime(allOrders);\n return allOrders.subList(targetOffset, Math.min(endIndex, allOrders.size()));\n } catch (Exception e) {\n e.printStackTrace();\n throw new SystemException(e);\n }\n }",
"@Override\n\t public int compare(Player p1, Player p2) {\n\t boolean desc = sortField.startsWith(\"-\");\n\t String fieldToUse = desc ? sortField.substring(1): sortField; \n\n\t try {\n\t String field1 = BeanUtils.getProperty(p1, fieldToUse);\n\t String field2 = BeanUtils.getProperty(p2, fieldToUse);\n\t return (desc) ? field2.compareTo(field1) : field1.compareTo(field2);\n\t } catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t// Again just for test purposes. Since we are in the service layer \n\t\t\t\t\t\t// and beyond the API. We will throw a Business Logic Exception.\n\t\t\t\t\t\tthrow new BusinessLogicException(e.getMessage(), \n\t\t\t\t\t\t\t\tBusinessErrorCodeEnum.INTERNAL_PROCESSING_ERROR);\n\t\t\t\t\t}\n\t\t\t\t}",
"@Override\n @EntityGraph(Item.GRAPH_CATEGORY)\n List<Item> findAll(Sort sort);",
"@RequestMapping(value = \"list\", method = RequestMethod.GET)\n public Iterable<UserMessage> listByPage(@RequestParam(\"page\") Integer page,\n @RequestParam(\"size\") Integer size,\n @RequestParam(value = \"sortby\", required = false) String sortby,\n @RequestParam(value = \"dir\", required = false) Sort.Direction direction) {\n\n log.debug(String.format(\"Begin listAll (page:%s, size:%s, sortby:%s, dir:%s):\",page,size,sortby,direction));\n\n // DEFAULT Sort property\n if (sortby == null) {\n sortby = \"id\";\n }\n\n // DEFAULT Sort direction\n if (direction == null) {\n direction = Sort.Direction.DESC;\n }\n Sort s = new Sort(direction, sortby);\n PageRequest pr = new PageRequest(page, size, s);\n Iterable<UserMessage> found = messageRepository.findAll(pr);\n log.debug(String.format(\"End listAll: %s\", found));\n\n return found;\n }",
"private void listPlayer(HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tList<Player> players = playerDbUtil.getPlayers();\n\n\t\t// adiciona o jogador no request attribute\n\t\trequest.setAttribute(\"PLAYER_LIST\", players);\n\n\t\t// envia para a jsp:list-players (view)\n\t\tRequestDispatcher dispatcher = request.getRequestDispatcher(\"/list-players.jsp\");\n\t\tdispatcher.forward(request, response);\n\t}",
"public List<Player> findAllPlayers(){\n\t\treturn playerRepository.findAll();\n\t}",
"public List<String> getAllPlayers() throws ServerProblem {\r\n\ttry (Connection connTDB = ConnectionManager.getInstance().getConnection()) {\r\n\t LOGGER.debug(\"Getting all players\");\r\n\t List<String> results = engine.getAllPlayers(connTDB);\r\n\t LOGGER.debug(\"Players found in the database: \" + results);\r\n\t return results;\r\n\t} catch (Exception ex) {\r\n\t String error = \"Problem encountered getting all players: \" + ex;\r\n\t LOGGER.error(error);\r\n\t throw new ServerProblem(error, ex);\r\n\t}\r\n }",
"public int getResourceSort(@Param(\"id\") String id);",
"@Override\n\tpublic List<Track> getAllTracks(String field, String sortOrder) {\n\t\tLOGGER.info(\"Fetching Sorted Tracks list of all Tracks from DB \");\n\t\tLOGGER.info(\"Sort Field : \" + field);\n\t\tLOGGER.info(\"Sort Order : \" + sortOrder);\n\t\tif (Util.isEmptyString(field)\n\t\t\t\t|| Util.isEmptyString(sortOrder)\n\t\t\t\t|| !(\"ASC\".equalsIgnoreCase(sortOrder) || \"DESC\"\n\t\t\t\t\t\t.equalsIgnoreCase(sortOrder))) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"Invalid Arguments to sort Tracks\");\n\t\t}\n\t\tList<Track> tracks = null;\n\t\ttry {\n\t\t\tOrder o1 = new Order(Direction.fromString(sortOrder), field).ignoreCase();\n\t\t\tOrder o2 = null;\n\t\t\tOrder o3 = null;\n\t\t\tif(\"type\".equalsIgnoreCase(field)) {\n\t\t\t\to2 = new Order(Direction.DESC,\"country\").ignoreCase();\n\t\t\t\to3 = new Order(Direction.ASC,\"id\").ignoreCase();\n\t\t\t} else if(\"country\".equalsIgnoreCase(field)) {\n\t\t\t\to2 = new Order(Direction.DESC,\"type\").ignoreCase();\n\t\t\t\to3 = new Order(Direction.ASC,\"id\").ignoreCase();\n\t\t\t} else {\n\t\t\t\to2 = new Order(Direction.ASC,\"type\").ignoreCase();\n\t\t\t\to3 = new Order(Direction.DESC,\"country\").ignoreCase();\n\t\t\t}\n\t\t\t\n\t\t\tSort sort = new Sort(new Order[]{o1,o2,o3}) ;\n\t\t\t\n\t\t\ttracks = tracksRepository.findAll(sort);\n\t\t\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.error(\n\t\t\t\t\t\"Error while retreiving all Tracks With Sorting by field : \"\n\t\t\t\t\t\t\t+ field + \" , Sort Order : \" + sortOrder, e);\n\t\t}\n\t\treturn tracks;\n\t}",
"private DBObject buildSortSpec(final GetObjectInformationParameters params) {\n\t\tfinal DBObject sort = new BasicDBObject();\n\t\tif (params.isObjectIDFiltersOnly()) {\n\t\t\tsort.put(Fields.VER_WS_ID, 1);\n\t\t\tsort.put(Fields.VER_ID, 1);\n\t\t\tsort.put(Fields.VER_VER, -1);\n\t\t}\n\t\treturn sort;\n\t}",
"@Override\n @Transactional(readOnly = true)\n public List<Producto> findAll(Sort sort) {\n return productoDao.findAll(sort);\n }",
"@GetMapping(\n path = \"song/page/{page}\",\n produces = MediaType.APPLICATION_JSON_VALUE\n )\n public Iterable<Song> getAllPaging(\n @PathVariable(\"page\") Integer pageNr,\n @RequestParam(name = \"size\", required = false) Integer perPage) {\n return perPage == null ?\n songService.getAllPaging(pageNr, Defaults.PAGESIZE) :\n songService.getAllPaging(pageNr, perPage);\n }",
"public BsonDocument getSort() {\n return sort;\n }",
"public LiveData<PagedList<Movie>> getMoviesByDataSource(String sortTag) {\n if (sortTag.equals(\"favorite\")) {\n movieDataSourceFactory = mDb.movieDao().loadMoviesByPage();\n }\n\n // For Popular and Top Rated Movies that are derived from network\n else {\n movieDataSourceFactory = new MovieDataSourceFactory(sortTag);\n }\n\n moviePagedList = new LivePagedListBuilder<>(movieDataSourceFactory, pagedListConfig)\n .build();\n return moviePagedList;\n }",
"protected final List<T> findSortedByQuery(String query, String sort, Object... params) {\n return this.findSortedByQuery(query, sort, (Integer) null, (Integer) null, params);\n }",
"private void sort(final OrderBy orderBy) {\n callback.orderByProperty().set(orderBy);\n\n sort();\n }",
"protected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tString playerId = req.getParameter(Constants.PARM_PLAYER_ID); // List of games that a friend is in\r\n\t\t\r\n\t\tPersistenceManager pm = PMF.get().getPersistenceManager();\r\n\t\ttry {\r\n\t\t\tList<Game> gamesList = new ArrayList<Game>();\r\n\t\t\tif (playerId!=null && !playerId.isEmpty()) {\r\n\t\t\t\tQuery query = pm.newQuery(GamePlayer.class);\r\n\t\t\t\tquery.setFilter(Player.FIELD_PLAYER_ID+\"=='\"+playerId+\"'\");\r\n\t\t\t\tList<GamePlayer> gamePlayers = (List<GamePlayer>) query.execute();\r\n\t\t\t\tif (gamePlayers.size()>0) {\r\n\t\t\t\t\t// build an int array of games he's in\r\n\t\t\t\t\tint[] iGames = new int[gamePlayers.size()];\r\n\t\t\t\t\tfor (int i=0; i < gamePlayers.size(); i++) {\r\n\t\t\t\t\t\tiGames[i] = gamePlayers.get(i).getGameNumber();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Get all these games\r\n\t\t\t\t\tquery = pm.newQuery(Game.class);\r\n\t\t\t\t\tquery.setFilter(Game.FIELD_GAME_NUMBER+\"== game_param\");\r\n\t\t\t\t\tquery.setOrdering(Game.FIELD_GAME_NUMBER+\" asc\");\r\n\t\t\t\t\tquery.declareParameters(\"int game_param\");\r\n\t\t\t\t\tgamesList = (List<Game>) query.executeWithArray(iGames);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tQuery query = pm.newQuery(Game.class);\r\n\t\t\t\tquery.setOrdering(Game.FIELD_GAME_NUMBER+\" asc\");\r\n\t\t\t\tgamesList = (List<Game>) query.execute();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// return games\r\n\t\t\tList<GameBean> gbList = new ArrayList<GameBean>();\r\n\t\t\tfor (int i=0; i < gamesList.size(); i++) {\r\n\t\t\t\tGame game = gamesList.get(i);\r\n\t\t\t\tGameBean gb = new GameBean(game.getGameNumber(), game.getGameName(), game.getGameType(),\r\n\t\t\t\t\t\tgame.isPrivate(), \"\", game.getLocationName(), game.getLatitude(), game.getLongitude(),\r\n\t\t\t\t\t\tgame.getRange(), game.getRatio(), game.getStartTime(), game.getEndTime());\r\n\t\t\t\tgb.setPlayerCount(CMUtil.getPlayerCount(gb.getGameNumber()));\r\n\t\t\t\tgbList.add(gb);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tString json = new Gson().toJson(gbList);\r\n\t\t System.out.println(\"SERIALIZED >> \" + json);\r\n\r\n\t\t resp.setContentType(\"application/json\");\r\n\t\t resp.setCharacterEncoding(\"UTF-8\");\r\n\t\t resp.getWriter().write(json);\t\t\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tif (pm!=null)\r\n\t\t\t\tpm.close();\r\n\t\t}\r\n\t}",
"@Test\n public void given_devEnvironmentWithParamFieldAndSort_when_callEndPointShowStudentAndSort_then_returnStatus200AndSortListStudent() throws Exception {\n List<Student> studentListSort = STUDENT_LIST.stream().sorted((student1, student2) -> student1.getName().compareTo(student2.getName())).collect(Collectors.toList());\n\n Mockito.when(studentRepo.findAll(ArgumentMatchers.any(Sort.class))).thenReturn(studentListSort);\n\n RequestBuilder request = MockMvcRequestBuilders\n .get(\"/students/sort\")\n .accept(MediaType.APPLICATION_JSON)\n .param(\"field\", \"name\")\n .param(\"sort\", \"ASC\");\n\n mockMvc.perform(request)\n .andExpect(status().isOk())\n .andExpect(content().json(gson.toJson(studentListSort)))\n .andDo(MockMvcResultHandlers.print())\n .andReturn();\n }",
"@Override\r\n\tpublic ArrayList<PlayerPO> getAllPlayers() {\n\t\treturn playerController.getAllPlayers();\r\n\t}",
"List <Dish> getDishesSortedBy(String sortBy);",
"public List<Periodo> obtenerListaCombo(String sortField, boolean sortOrder, Map<String, String> filters)\r\n/* 55: */ {\r\n/* 56:107 */ return this.periodoDao.obtenerListaCombo(sortField, sortOrder, filters);\r\n/* 57: */ }",
"public Iterator<Player> iterator ()\n\t{\n\t\tCollections.sort(playerList,(Player p1, Player p2) -> p1.name().compareTo(p2.name()));\n\t\tIterator<Player> it = playerList.iterator();\n\t\treturn it;\n\t}",
"@ResponseBody\n\t@GetMapping(\"/employees-sort-by-name\")\n\tpublic List<Employee> listEmployeesSortByName() {\n\t\tList<Employee> theEmployeesSortByName = employeeDAO.getEmployeesSortByName();\n\t\t\n\t\treturn theEmployeesSortByName;\n\t}",
"public List<Player> getAllPlayers() {\r\n // TODO fix actual order of players in the List.\r\n\r\n List<Player> players = new ArrayList<>();\r\n players.addAll(teamRed.getPlayers());\r\n players.addAll(teamBlue.getPlayers());\r\n\r\n return players;\r\n }",
"@Override\n\tpublic Page<Listing> findAllPagedSortedByTime(int pageNumber) {\n\t\tint pageSize=9;\n\t\tSort sort= Sort.by(\"dateUploaded\").descending();\n\t\tPageable pageable= PageRequest.of(pageNumber-1, pageSize,sort);\n\t\treturn theListingRepo.findAll(pageable);\n\t}",
"private ArrayList<IPlayer> sortPlayerAfterPoints() {\n ArrayList<IPlayer> arrlist = new ArrayList<>();\n\n iPlayerList.entrySet().stream().map((pair) -> (IPlayer) pair.getValue()).forEachOrdered((ip) -> {\n arrlist.add(ip);\n });\n\n Collections.sort(arrlist, (IPlayer p1, IPlayer p2) -> {\n try {\n if (p1.getPoints() == p2.getPoints()) {\n return 0;\n } else if (p1.getPoints() > p2.getPoints()) {\n return -1;\n } else {\n return 1;\n }\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n return 0;\n });\n\n return arrlist;\n }",
"public <T extends BusinessObject> Collection<T> findMatchingOrderBy(Class<T> clazz, Map<String, ?> fieldValues, String sortField, boolean sortAscending) {\r\n Criteria criteria = buildCriteria(fieldValues);\r\n QueryByCriteria queryByCriteria = new QueryByCriteria(clazz, criteria);\r\n\r\n if (sortAscending) {\r\n queryByCriteria.addOrderByAscending(sortField);\r\n }\r\n else {\r\n queryByCriteria.addOrderByDescending(sortField);\r\n }\r\n\r\n return (Collection<T>)getPersistenceBrokerTemplate().getCollectionByQuery(queryByCriteria);\r\n }",
"@Override\r\n\tpublic List<Player> getAllPlayer(String email) {\n\t\treturn dao.getAllPlayer(email);\r\n\t}",
"private String doSortOrder(SlingHttpServletRequest request) {\n RequestParameter sortOnParam = request.getRequestParameter(\"sortOn\");\n RequestParameter sortOrderParam = request.getRequestParameter(\"sortOrder\");\n String sortOn = \"sakai:filename\";\n String sortOrder = \"ascending\";\n if (sortOrderParam != null\n && (sortOrderParam.getString().equals(\"ascending\") || sortOrderParam.getString()\n .equals(\"descending\"))) {\n sortOrder = sortOrderParam.getString();\n }\n if (sortOnParam != null) {\n sortOn = sortOnParam.getString();\n }\n return \" order by @\" + sortOn + \" \" + sortOrder;\n }",
"public List<Player> loadAll() throws SQLException {\n\t\tfinal Connection connection = _database.getConnection();\n\t\tfinal String sql = \"SELECT * FROM \" + table_name + \" ORDER BY id ASC \";\n\t\tfinal List<Player> searchResults = listQuery(connection.prepareStatement(sql));\n\n\t\treturn searchResults;\n\t}",
"public abstract Collection<PlayerFish> getPlayers();",
"public Collection<Player> getPlayersChunk() {\n var chunk = new Chunk<Player>();\n var playersChunk = chunk.get(this.players, ALL_PLAYERS_CHUNK_SIZE, allPlayersChunkIndex);\n\n // up to ALL_PLAYERS_CHUNK_SIZE with empty players\n // to have an even view\n var startIndex = playersChunk.size();\n for (var i = startIndex; i < ALL_PLAYERS_CHUNK_SIZE; i++) {\n playersChunk.add(new Player(new Person()));\n }\n\n return playersChunk;\n }",
"@Override\n\tpublic List<Player> getPlayersByPosition(String position) throws BusinessException {\n\t\tList<Player> playersByPosition = new ArrayList<>();\n\t\ttry {\n\t\t\tConnection connection = PostgresqlConnection.getConnection();\n\t\t\tString sql = \"select playerid, playername, teamid, age, position, dob from \\\"Test\\\".player where position = ?\";\n\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(sql);\n\t\t\tpreparedStatement.setString(1, position);\n\t\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tPlayer player = new Player();\n\t\t\t\tplayer.setPlayerid(resultSet.getInt(\"playerid\"));\n\t\t\t\tplayer.setPlayername(resultSet.getString(\"playername\"));\n\t\t\t\tplayer.setTeamid(resultSet.getInt(\"teamid\"));\n\t\t\t\tplayer.setAge(resultSet.getInt(\"age\"));\n\t\t\t\tplayer.setPosition(\"position\");\n\t\t\t\tplayer.setDob(resultSet.getDate(\"dob\"));\n\t\t\t\t\n\t\t\t\tplayersByPosition.add(player);\n\t\t\t}\n\t\t} catch (ClassNotFoundException | SQLException e) {\n\t\t\tthrow new BusinessException(\"Internal Error Ocurred\");\n\t\t}\n\t\t\n\t\treturn playersByPosition;\n\t}",
"@GET(\"/api/users\")\n Call<Example> getUserDetails(@Query(\"page\") Integer sort);",
"@Query(\"SELECT p FROM Person p ORDER BY p.id\")\nList<Person> findAllSortById();",
"public static void doSort ( RunData data)\n\t{\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ());\n\n\t\t//get the ParameterParser from RunData\n\t\tParameterParser params = data.getParameters ();\n\n\t\t// save the current selections\n\t\tSet selectedSet = new TreeSet();\n\t\tString[] selectedItems = data.getParameters ().getStrings (\"selectedMembers\");\n\t\tif(selectedItems != null)\n\t\t{\n\t\t\tselectedSet.addAll(Arrays.asList(selectedItems));\n\t\t}\n\t\tstate.setAttribute(STATE_LIST_SELECTIONS, selectedSet);\n\n\t\tString criteria = params.getString (\"criteria\");\n\n\t\tif (criteria.equals (\"title\"))\n\t\t{\n\t\t\tcriteria = ResourceProperties.PROP_DISPLAY_NAME;\n\t\t}\n\t\telse if (criteria.equals (\"size\"))\n\t\t{\n\t\t\tcriteria = ResourceProperties.PROP_CONTENT_LENGTH;\n\t\t}\n\t\telse if (criteria.equals (\"created by\"))\n\t\t{\n\t\t\tcriteria = ResourceProperties.PROP_CREATOR;\n\t\t}\n\t\telse if (criteria.equals (\"last modified\"))\n\t\t{\n\t\t\tcriteria = ResourceProperties.PROP_MODIFIED_DATE;\n\t\t}\n\t\telse if (criteria.equals(\"priority\") && ContentHostingService.isSortByPriorityEnabled())\n\t\t{\n\t\t\t// if error, use title sort\n\t\t\tcriteria = ResourceProperties.PROP_CONTENT_PRIORITY;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcriteria = ResourceProperties.PROP_DISPLAY_NAME;\n\t\t}\n\n\t\tString sortBy_attribute = STATE_SORT_BY;\n\t\tString sortAsc_attribute = STATE_SORT_ASC;\n\t\tString comparator_attribute = STATE_LIST_VIEW_SORT;\n\t\t\n\t\tif(state.getAttribute(STATE_MODE).equals(MODE_REORDER))\n\t\t{\n\t\t\tsortBy_attribute = STATE_REORDER_SORT_BY;\n\t\t\tsortAsc_attribute = STATE_REORDER_SORT_ASC;\n\t\t\tcomparator_attribute = STATE_REORDER_SORT;\n\t\t}\n\t\t// current sorting sequence\n\t\tString asc = NULL_STRING;\n\t\tif (!criteria.equals (state.getAttribute (sortBy_attribute)))\n\t\t{\n\t\t\tstate.setAttribute (sortBy_attribute, criteria);\n\t\t\tasc = Boolean.TRUE.toString();\n\t\t\tstate.setAttribute (sortAsc_attribute, asc);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// current sorting sequence\n\t\t\tasc = (String) state.getAttribute (sortAsc_attribute);\n\n\t\t\t//toggle between the ascending and descending sequence\n\t\t\tif (asc.equals (Boolean.TRUE.toString()))\n\t\t\t{\n\t\t\t\tasc = Boolean.FALSE.toString();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tasc = Boolean.TRUE.toString();\n\t\t\t}\n\t\t\tstate.setAttribute (sortAsc_attribute, asc);\n\t\t}\n\n\t\tif (state.getAttribute(STATE_MESSAGE) == null)\n\t\t{\n\t\t\tComparator comparator = ContentHostingService.newContentHostingComparator(criteria, Boolean.getBoolean(asc));\n\t\t\tstate.setAttribute(comparator_attribute, comparator);\n\t\t\t\n\t\t\t// sort sucessful\n\t\t\t// state.setAttribute (STATE_MODE, MODE_LIST);\n\n\t\t}\t// if-else\n\n\t}",
"List<Employee> sort(Sorting selectedSortColoumn) throws SQLException;",
"private Collection<Player> getPlayers() {\n\t\treturn players;\n\t}",
"private void fetchSortingConfig() {\n IndexingConfig indexingConfig = _tableConfig.getIndexingConfig();\n List<String> sortedColumns = indexingConfig.getSortedColumn();\n Preconditions.checkArgument(sortedColumns.size() <= 1, \"There should be at most 1 sorted column in the table.\");\n if (sortedColumns.size() == 1) {\n _sortedColumn = sortedColumns.get(0);\n }\n }",
"public List<T> find(DBObject dbObjectQuery, DBObject orderBy) throws NoSQLException;",
"@Override\n\tpublic List<Movie> findAll(Sort sort) {\n\t\treturn null;\n\t}",
"List<TSortOrder> selectByExample(TSortOrderExample example);",
"@Override\n public List<Client> sortByNameAndID(){\n return null;\n }",
"public List<Player> getAll() {\n PlayerDB pdb = new PlayerDB();\n return pdb.getAll();\n }",
"public List<PlayerItem> getSpecific(int playerItemId);",
"public List getAllResults(String orderBy) {\n return dao.getQueryBuilder()\n .from(dao.getEntityClass(), (joinBuilder != null ? joinBuilder.getRootAlias() : null))\n .select(attributes)\n .add(getCurrentQueryRestrictions())\n .addParameters(parameters)\n .join(joinBuilder)\n .orderBy(orderBy)\n .debug(debug)\n .audit(isAuditQuery())\n .getResultList();\n }",
"@Override\n\tpublic Object findMany(String collectionName, Map<String, CustmerCriteria> params, String sortColumn,\n\t\t\tInteger currentPage, Integer pageSize) throws Exception {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Object findMany(String collectionName, Map<String, CustmerCriteria> params, String sortColumn,\n\t\t\tDirection sort, Integer currentPage, Integer pageSize) throws Exception {\n\t\treturn null;\n\t}",
"@Override\n\tpublic PaginationResultsTo<Track> getTracks(Integer pageNum, Integer pageSize, String field, String sortOrder) {\n\t\tif (Util.isEmptyString(field)\n\t\t\t\t|| Util.isEmptyString(sortOrder)\n\t\t\t\t|| !(\"ASC\".equalsIgnoreCase(sortOrder) || \"DESC\"\n\t\t\t\t\t\t.equalsIgnoreCase(sortOrder))) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"Invalid Arguments to sort Tracks in pagination\");\n\t\t}\n\t\tPaginationResultsTo<Track> paginationResults = null;\n\t\ttry {\n\t\t\t\n\t\t\tOrder o1 = new Order(Direction.fromString(sortOrder), field).ignoreCase();\n\t\t\tOrder o2 = null;\n\t\t\tOrder o3 = null;\n\t\t\tif(\"type\".equalsIgnoreCase(field)) {\n\t\t\t\to2 = new Order(Direction.DESC,\"country\").ignoreCase();\n\t\t\t\to3 = new Order(Direction.ASC,\"id\").ignoreCase();\n\t\t\t} else if(\"country\".equalsIgnoreCase(field)) {\n\t\t\t\to2 = new Order(Direction.DESC,\"type\").ignoreCase();\n\t\t\t\to3 = new Order(Direction.ASC,\"id\").ignoreCase();\n\t\t\t} else {\n\t\t\t\to2 = new Order(Direction.ASC,\"id\").ignoreCase();\n\t\t\t\to3 = new Order(Direction.DESC,\"country\").ignoreCase();\n\t\t\t}\n\t\t\t\n\n\t\t\tSort sort = new Sort(new Order[]{o1,o2,o3}) ;\n\t\t\t\n\t\t\tPageRequest request = new PageRequest(pageNum - 1, pageSize, sort);\n\n\t\t\tPage<Track> tracks = tracksRepository.findAll(request);\n\t\t\tif (!Util.isNull(tracks)) {\n\t\t\t\tpaginationResults = new PaginationResultsTo<Track>();\n\t\t\t\tpaginationResults.setPageNumber(pageNum);\n\t\t\t\tpaginationResults.setPageSize(pageSize);\n\t\t\t\tpaginationResults.setTotalNumberOfPages(tracks.getTotalPages());\n\t\t\t\tpaginationResults.setTotalNumberOfResults(tracks\n\t\t\t\t\t\t.getTotalElements());\n\t\t\t\tpaginationResults.setResults(tracks.getContent());\n\t\t\t\ttracks.getTotalPages();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.error(\n\t\t\t\t\t\"Error while retreiving all Tracks with Sorting for Pagination --> page Number : \"\n\t\t\t\t\t\t\t+ pageNum\n\t\t\t\t\t\t\t+ \" , Page Size : \"\n\t\t\t\t\t\t\t+ pageSize\n\t\t\t\t\t\t\t+ \" , Sort field : \"\n\t\t\t\t\t\t\t+ field\n\t\t\t\t\t\t\t+ \" , Sort order : \"\n\t\t\t\t\t\t\t+ sortOrder, e);\n\t\t}\n\n\t\treturn paginationResults;\n\t}",
"private List<List<Record>> sortRecordsBy(List<Record> unsortedRecords, RankingType rankingType) {\n Comparator<Long> comparator = rankingType.isDescending()\n ? Comparator.reverseOrder()\n : Comparator.naturalOrder();\n SortedMap<Long, List<Record>> scoreGroups = new TreeMap<>(comparator);\n for (Record record : unsortedRecords) {\n Long score = rankingType.getScoreFunction().apply(record);\n if (scoreGroups.containsKey(score)) {\n scoreGroups.get(score).add(record);\n } else {\n scoreGroups.put(score, new LinkedList<>());\n scoreGroups.get(score).add(record);\n }\n }\n\n return new ArrayList<>(scoreGroups.values());\n }",
"void setOrderBy(DriveRequest<?> request, String orderBy);",
"public TreeMap<String, Professor> getAllProfessors(String params) {\n\n StringBuffer json = new StringBuffer();\n ArrayList<Professor> allProfessors = new ArrayList<>();\n\n try {\n\n int i = 1;\n while (true) {\n if (params == null) {\n json.append(new JsonReader(\"http://api.umd\" +\n \".io/v0/professors?per_page=100&page=\" + i).readUrl());\n } else {\n json.append(new JsonReader(\"http://api.umd\" +\n \".io/v0/professors?per_page=100&page=\" + i + \"&\" +\n params).readUrl());\n }\n\n allProfessors.addAll(new Gson().fromJson(json.toString().replace\n (\"][\", \",\"),\n new TypeToken<ArrayList<Professor>>(){}.getType()));\n\n if (allProfessors.size() % 100 == 0) {\n i++;\n continue;\n } else {\n break;\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n TreeMap<String, Professor> genProfessors = new TreeMap<>();\n\n for (Professor p : allProfessors) {\n genProfessors.put(p.getName(), p);\n }\n\n return genProfessors;\n }"
] | [
"0.61365306",
"0.5602057",
"0.5429077",
"0.5394571",
"0.5365939",
"0.53601575",
"0.5313649",
"0.5291012",
"0.5246674",
"0.5222201",
"0.51889884",
"0.51434535",
"0.51352125",
"0.51237315",
"0.5121532",
"0.5110916",
"0.51093024",
"0.5105491",
"0.5098768",
"0.5092269",
"0.5079627",
"0.50705475",
"0.5059764",
"0.5058039",
"0.50357383",
"0.50212145",
"0.5019123",
"0.49996635",
"0.49852586",
"0.49535945",
"0.49534008",
"0.49486244",
"0.49202114",
"0.4913281",
"0.48983207",
"0.4862321",
"0.48520342",
"0.4848256",
"0.4831884",
"0.48228547",
"0.48196894",
"0.48181093",
"0.47881138",
"0.4775988",
"0.47737813",
"0.47628403",
"0.47579703",
"0.4755444",
"0.47222376",
"0.471475",
"0.47113523",
"0.46789372",
"0.46731657",
"0.46668416",
"0.46635273",
"0.46624303",
"0.46600685",
"0.46533313",
"0.46517995",
"0.46514055",
"0.46512738",
"0.46482736",
"0.46482575",
"0.4646529",
"0.46408713",
"0.46374303",
"0.4632712",
"0.46308035",
"0.46304137",
"0.46108294",
"0.46095002",
"0.46065316",
"0.4605378",
"0.46023503",
"0.4597256",
"0.4592156",
"0.4579419",
"0.45727998",
"0.45677912",
"0.45648476",
"0.4560585",
"0.45564327",
"0.45549458",
"0.4552407",
"0.45483688",
"0.45472753",
"0.45365342",
"0.45308322",
"0.45187137",
"0.45174253",
"0.4517281",
"0.451214",
"0.45084894",
"0.45035487",
"0.45022282",
"0.4497069",
"0.44960156",
"0.44930845",
"0.44922972",
"0.44901657"
] | 0.7451576 | 0 |
Returns a month based on a gregorian calendar. valuereturns 0January 1February 2March 3April 4May 5June 6July 7August 8September 9October 10November 11December otherwisenull | public static Month of(int value) {
if (value < MINIMUM_MONTH)
return null;
if (value > MAXIMUM_MONTH)
return null;
return MONTHS.get(value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int getCalendarMonth(String month){\n month = month.toUpperCase();\n if (month.indexOf(\"JAN\") == 0 ) {\n return Calendar.JANUARY;\n } else if (month.indexOf(\"FEB\") == 0) {\n return Calendar.FEBRUARY;\n } else if (month.indexOf(\"MAR\") == 0) {\n return Calendar.MARCH ;\n } else if (month.indexOf(\"APR\") == 0) {\n return Calendar.APRIL;\n } else if (month.indexOf(\"MAY\") == 0) {\n return Calendar.MAY;\n } else if (month.indexOf(\"JUN\") == 0) {\n return Calendar.JUNE;\n } else if (month.indexOf(\"JUL\") == 0) {\n return Calendar.JULY;\n } else if (month.indexOf(\"AUG\") == 0) {\n return Calendar.AUGUST;\n } else if (month.indexOf(\"SEP\") == 0) {\n return Calendar.SEPTEMBER;\n } else if (month.indexOf(\"OCT\") == 0) {\n return Calendar.OCTOBER;\n } else if (month.indexOf(\"NOV\") == 0) {\n return Calendar.NOVEMBER;\n } else if (month.indexOf(\"DEC\") == 0) {\n return Calendar.DECEMBER;\n } else {\n throw new IllegalArgumentException(\"month must be one of {JAN, \" +\n \"FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV ,DEC)\");\n }\n }",
"int calDateMonth(int mC,int yC,int mG,int yG){//(current-month, current-year, goal-month, goal-year)\n int x = 0,i,countM=0;\n if(yC<=yG){\n for(i = yC; i < yG; i++)\n countM += 12;\n }\n\n countM -= mC;\n countM += mG;\n return (countM);\n }",
"public static String getGMonth( String month ) {\r\n String ret = null;\r\n ret = \"January\".equals( month ) == true ? \"01\" : ret;\r\n ret = \"February\".equals( month ) == true ? \"02\" : ret;\r\n ret = \"March\".equals( month ) == true ? \"03\" : ret;\r\n ret = \"April\".equals( month ) == true ? \"04\" : ret;\r\n ret = \"May\".equals( month ) == true ? \"05\" : ret;\r\n ret = \"June\".equals( month ) == true ? \"06\" : ret;\r\n ret = \"July\".equals( month ) == true ? \"07\" : ret;\r\n ret = \"August\".equals( month ) == true ? \"08\" : ret;\r\n ret = \"September\".equals( month ) == true ? \"09\" : ret;\r\n ret = \"October\".equals( month ) == true ? \"10\" : ret;\r\n ret = \"November\".equals( month ) == true ? \"11\" : ret;\r\n ret = \"December\".equals( month ) == true ? \"12\" : ret;\r\n return ret;\r\n }",
"public int getMonthInteger() \n\t{\n\t\t// 1 will be added here to be able to use this func alone to construct e.g adate\n\t\t// to get the name of the month from getMonth(), 1 must be deducted.\n\t\treturn 1+m_calendar.get(Calendar.MONTH);\n\n\t}",
"public final native int getMonth() /*-{\n return this.getMonth();\n }-*/;",
"public static Date firstDayMonth(){\n String rep_inicio_de_mes = \"\";\n try {\n Calendar c = Calendar.getInstance();\n \n /*Obtenemos el primer dia del mes*/\n c.set(Calendar.DAY_OF_MONTH, c.getActualMinimum(Calendar.DAY_OF_MONTH));\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n \n /*Lo almacenamos como string con el formato adecuado*/\n rep_inicio_de_mes = sdf.format(c.getTime());\n\n \n } catch (Exception e) {\n // Si hay una excepcion se imprime un mensaje\n System.err.println(e.getMessage());\n }\n \n return stringToDate(rep_inicio_de_mes);\n }",
"public String intToMonth(int a)\r\n {\r\n if(a==1)return \"Januray\";\r\n else if(a==2)return \"February\";\r\n else if(a==3)return \"March\";\r\n else if(a==4)return \"April\";\r\n else if(a==5)return \"May\";\r\n else if(a==6)return \"June\";\r\n else if(a==7)return \"July\";\r\n else if(a==8)return \"August\";\r\n else if(a==9)return \"September\";\r\n else if(a==10)return \"October\";\r\n else if(a==11)return \"November\";\r\n else if(a==12)return \"December\";\r\n else return \"\";\r\n }",
"public int getMonth()\n {\n return month;\n }",
"int calMonthDay(int m,int y){//calMonthDay(month,year)\n int x=0,c;\n for(c = 1; c < m; c++) {// Jan to less than the month 'm' as 'm' we are not taking the the whole days of that month\n if(c == 2) {//if Feb\n if(y%4 == 0)//checks if year is leap or not\n x += 29;\n else\n x += 28;\n }\n else\n x += mon.get(c-1);\n }\n return(x);\n }",
"private String getMonth(int i) {\n String month = \"\";\n switch (i) {\n case 0:\n month = \"Jan\";\n break;\n case 1:\n month = \"Feb\";\n break;\n case 2:\n month = \"Mar\";\n break;\n case 3:\n month = \"Apr\";\n break;\n case 4:\n month = \"May\";\n break;\n case 5:\n month = \"Jun\";\n break;\n case 6:\n month = \"Jul\";\n break;\n case 7:\n month = \"Aug\";\n break;\n case 8:\n month = \"Sep\";\n break;\n case 9:\n month = \"Oct\";\n break;\n case 10:\n month = \"Nov\";\n break;\n case 11:\n month = \"Dec\";\n break;\n }\n return month;\n }",
"public Calendar getCurrentMonthCalendarObj() throws Throwable{\r\n\r\n\t\tString dateInput = \"01/\"+month+\"/\"+year;\t\t\t\r\n\t\tDateFormat df = new SimpleDateFormat(\"dd/MMMM/yyyy\");\r\n\t\tDate startDate = df.parse(dateInput);\r\n\t\tCalendar c = Calendar.getInstance(); // this takes current date\r\n\t c.setTime(startDate); // set date to specified in arguement\r\n\t\treturn c;\r\n\t}",
"public int getMonth(){\n\t\treturn month;\n\t}",
"public int getMonth() {\n\t\treturn month;\n\t}",
"public String numToMonth(int m)\n {\n return monthsArray[m-1];\n }",
"public int getMonth() {\n return month;\n }",
"public Calendar startOfMonth() {\r\n\t\t\r\n\t\tCalendar c2 = Calendar.getInstance(baseCalendar.getTimeZone());\r\n\t\tc2.clear();\r\n\t\tc2.set(baseCalendar.get(Calendar.YEAR), \r\n\t\t\t\tbaseCalendar.get(Calendar.MONTH), 1);\r\n\t\treturn c2;\r\n\t}",
"private String getMonthForInt(int number) {\n int num = number - 1;\n String month = \"Wrong number\";\n String[] months = dfs.getMonths();\n if (num >= 0 && num <= 11) {\n month = months[num];\n } else {\n throw new IllegalArgumentException(\"There is no month with number: \" + number);\n }\n return month;\n }",
"public static String getCalendarMonthString(int month)\r\n\t{\r\n\t\tString[] arrMonths = {\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"};\r\n\t\treturn arrMonths[month];\r\n\t}",
"public static int getTodaysMonth() {\t\r\n\t\t\r\n\t\tTime time = new Time();\r\n\t\ttime.setToNow();\r\n\t\treturn time.month + 1;\t\r\n\t\t\r\n\t}",
"public Integer getMonth() {\r\n return month;\r\n }",
"public int getMonthInt() {\n return month;\r\n }",
"public int getMonth() {\n\t\treturn month;\n\t}",
"public Date addMonths(int m) {\r\n if (m < 0) {\r\n\t\t\tthrow new RuntimeException(\r\n\t\t\t\t\t\"Month should not be the negative value!\");\r\n\t\t}\r\n\r\n\r\n\t\tint newMonth = (month + (m % 12)) > 12 ? ((month + (m % 12)) % 12) : month\r\n\t\t\t\t+ (m % 12);\r\n\t\tint newYear = (month + (m % 12)) > 12 ? year + (m / 12) + 1 : year\r\n\t\t\t\t+ (m / 12);\r\n int newDay = 0;\r\n // IF the new month has less total days in it than the starting month\r\n // and the date being added to is the last day of the month, adjust\r\n // and make newDay correct with its corresponding month.\r\n \r\n // IF not leap year and not Feb. make newDay correct.\r\n if (day > DAYS[newMonth] && (newMonth != 2)) {\r\n newDay = (DAYS[newMonth]);\r\n //System.out.println(\"1\");\r\n } \r\n \r\n // IF not leap year but not Feb. make newDay 28. (This is usually the case for Feb.)\r\n else if ((day > DAYS[newMonth]) && (isLeapYear(newYear) == false) && (newMonth == 2)){\r\n newDay = (DAYS[newMonth] - 1);\r\n }\r\n \r\n // IF leap year and is Feb. make newDay 29.\r\n else if ((day > DAYS[newMonth]) && isLeapMonth(newMonth, newYear) == true){\r\n newDay = DAYS[newMonth];\r\n }\r\n\r\n // if day is not gretaer than the last day of the new month, make no change.\r\n else {\r\n newDay = day;\r\n } \r\n\t\treturn (new Date(newMonth, newDay, newYear));\r\n\t}",
"public String getMonth()\n {\n SimpleDateFormat newDateFormat = new SimpleDateFormat(\"dd/MM\");\n String MySDate = newDateFormat.format(this.dueDate);\n return MySDate;\n }",
"@Test\n public void month() throws Exception {\n Date thisDate = dateFormat.parse(\"08/14/2006\");\n Month august06 = Month.create(thisDate);\n testThePeriod(august06, thisDate, \"08/01/2006 00:00:00.000\",\n \"08/31/2006 23:59:59.999\", \"2006-08\");\n\n //Test the prior period\n Date priorDate = dateFormat.parse(\"07/22/2006\");\n Month july06 = august06.prior();\n testThePeriod(july06, priorDate, \"07/01/2006 00:00:00.000\",\n \"07/31/2006 23:59:59.999\", \"2006-07\");\n\n //Test the next period.\n Date nextDate = dateFormat.parse(\"09/03/2006\");\n Month september06 = august06.next();\n testThePeriod(september06, nextDate, \"09/01/2006 00:00:00.000\",\n \"09/30/2006 23:59:59.999\", \"2006-09\");\n\n //Test compareTo\n testCompareTo(july06, august06, september06);\n }",
"public String getMonth(int Month)\n {\n String[] months = {\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"};\n String realMonth = months[Month] + \" \" + i.getYear();\n return realMonth;\n }",
"public Integer getMonth() {\n return month;\n }",
"public Integer getMonth() {\n return month;\n }",
"public CopticMonth getMonth() {\n\n return CopticMonth.valueOf(this.cmonth);\n\n }",
"public static int getCurrentMonth()\n\t{\n\t\treturn Calendar.getInstance().get(Calendar.MONTH) + 1;\n\t}",
"public static int getRndMonthNumber() {\n return ThreadLocalRandom.current().nextInt(1, 12 + 1);\n }",
"public String getMonth() {\r\n return month;\r\n }",
"public String getMonth()\n {\n return Month.get();\n }",
"public Month () {\n monthNumber = 1;\n }",
"int getExpMonth(String bookingRef);",
"public String getMonth(int month) {\n\t\treturn new DateFormatSymbols().getMonths()[month-1];\n\t}",
"public int getMonth() {\r\n return FormatUtils.uint8ToInt(mMonth);\r\n }",
"public int getMonth() {\r\n // ersetzt deprecated Methode Date.getMonth()\r\n return this.month;\r\n }",
"public int getMonth() {\r\n\t\treturn (this.month);\r\n\t}",
"public int getMonth() {\n\t\treturn date.getMonthValue();\n\t}",
"public String getJP_AcctMonth();",
"public String asMonth() {\n \treturn new SimpleDateFormat(\"MM\").format(expiredAfter);\n }",
"public int getMonth() {\n return this.month;\n }",
"public int getMonth() {\n return this.month;\n }",
"public int getDayOfMonth();",
"public static String monthToString(int month){\r\n\r\n if(month == 1) {return \"jan\"}\r\n else if(month == 2) {return \"feb\"}\r\n else if(month == 3) {return \"mar\"}\r\n else if(month == 4) {return \"apl\"}\r\n else if(month == 5) {return \"may\"}\r\n else if(month == 6) {return \"jun\"}\r\n else if(month == 7) {return \"jul\"}\r\n else if(month == 8) {return \"aug\"}\r\n else if(month == 9) {return \"sep\"}\r\n else if(month == 10) {return \"oct\"}\r\n else if(month == 11) {return \"nov\"}\r\n else if (month == 12) {return \"dec\"}\r\n else {}\r\n return \"broken\";\r\n\r\n}",
"public String getMonth(String x){\n\n if(x.contains(\"Apr\")){\n return \"April\";\n }\n else if(x.contains(\"Mar\")){\n return \"March\";\n }\n else if(x.contains(\"Jan\")){\n return \"January\";\n }\n else if(x.contains(\"Feb\")){\n return \"February\";\n }\n else if(x.contains(\"May\")){\n return \"May\";\n }\n else if(x.contains(\"Jun\")){\n return \"June\";\n }\n else if(x.contains(\"Jul\")){\n return \"July\";\n }\n else if(x.contains(\"Aug\")){\n return \"August\";\n }\n else if(x.contains(\"Sep\")){\n return \"September\";}\n else if(x.contains(\"Oct\")){\n return \"October\";}\n else if(x.contains(\"Nov\")){\n return \"November\";}\n else{\n return \"December\";}\n }",
"public String getMonth() {\n return month;\n }",
"public byte getMonth() {\n return month;\n }",
"public byte getMonth() {\n return month;\n }",
"public byte getMonth() {\n return month;\n }",
"public byte getMonth() {\n return month;\n }",
"public java.lang.String getMonth() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: gov.nist.javax.sip.header.SIPDate.getMonth():java.lang.String, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: gov.nist.javax.sip.header.SIPDate.getMonth():java.lang.String\");\n }",
"public byte getMonth() {\r\n return month;\r\n }",
"public String getMonth(int month) {\n\t\t\t\treturn new DateFormatSymbols().getMonths()[month];\n\t\t\t}",
"public Calendar getFechaMatriculacion() {\r\n\t\tCalendar c = Calendar.getInstance();\r\n\t\tc.set(Integer.parseInt(cbox_ano.getSelectedItem().toString()), cbox_mes.getSelectedIndex(),\r\n\t\t\t\tInteger.parseInt(cbox_dia.getSelectedItem().toString()));\r\n\t\treturn c;\r\n\t}",
"public byte getMonth() {\n return month;\n }",
"public final native int getUTCMonth() /*-{\n return this.getUTCMonth();\n }-*/;",
"public static int getCurrentMonth(int month) {\n month++;\n return month;\n }",
"public static String getTaskScheduleMonths(long taskScheduleMonts){\r\n\t\tString\ttaskScheduleMontsSt = \"\";\r\n\t\ttaskScheduleMontsSt = \"\";\r\n\t\tif(taskScheduleMonts == -1 || ((taskScheduleMonts & MONTH_OF_YEAR.EVERY_MONTH.getMont()) == MONTH_OF_YEAR.EVERY_MONTH.getMont())) taskScheduleMontsSt+=\" EVERY_MONTH\";\r\n\t\telse{\r\n\t\t\tif((taskScheduleMonts & MONTH_OF_YEAR.JANUARY.getMont()) != 0) taskScheduleMontsSt+=\" JANUARY\";\r\n\t\t if((taskScheduleMonts & MONTH_OF_YEAR.FEBRUARY.getMont()) != 0) taskScheduleMontsSt+=\" FEBRUARY\";\r\n\t\t\tif((taskScheduleMonts & MONTH_OF_YEAR.MARCH.getMont()) != 0) taskScheduleMontsSt+=\" MARCH\";\r\n\t\t\tif((taskScheduleMonts & MONTH_OF_YEAR.APRIL.getMont()) != 0) taskScheduleMontsSt+=\" APRIL\";\r\n\t\t\tif((taskScheduleMonts & MONTH_OF_YEAR.MAY.getMont()) != 0) taskScheduleMontsSt+=\" MAY\";\r\n\t\t\tif((taskScheduleMonts & MONTH_OF_YEAR.JUNE.getMont()) != 0) taskScheduleMontsSt+=\" JUNE\";\r\n\t\t\tif((taskScheduleMonts & MONTH_OF_YEAR.JULY.getMont()) != 0) taskScheduleMontsSt+=\" JULY\";\r\n\t\t\tif((taskScheduleMonts & MONTH_OF_YEAR.AUGUST.getMont()) != 0) taskScheduleMontsSt+=\" AUGUST\";\r\n\t\t\tif((taskScheduleMonts & MONTH_OF_YEAR.SEPTEMBER.getMont()) != 0) taskScheduleMontsSt+=\" SEPTEMBER\";\r\n\t\t\tif((taskScheduleMonts & MONTH_OF_YEAR.OCTOBER.getMont()) != 0) taskScheduleMontsSt+=\" OCTOBER\";\r\n\t\t\tif((taskScheduleMonts & MONTH_OF_YEAR.NOVEMBER.getMont()) != 0) taskScheduleMontsSt+=\" NOVEMBER\";\r\n\t\t\tif((taskScheduleMonts & MONTH_OF_YEAR.DECEMBER.getMont()) != 0) taskScheduleMontsSt+=\" DECEMBER\";\r\n\t\t}\r\n\t\treturn taskScheduleMontsSt;\r\n\t}",
"public String getMonthName()\r\n {\r\n int mn = theMonthNumber;\r\n if (mn == 1)\r\n {return \"January\";}\r\n else if (mn == 2)\r\n {return \"February\";}\r\n else if (mn == 3)\r\n {return \"March\";}\r\n else if (mn == 4)\r\n {return \"April\";}\r\n else if (mn == 5)\r\n {return \"May\";}\r\n else if (mn == 6)\r\n {return \"June\";}\r\n else if (mn == 7)\r\n {return \"July\";}\r\n else if (mn == 8)\r\n {return \"August\";}\r\n else if (mn == 9)\r\n {return \"September\";}\r\n else if (mn == 10)\r\n {return \"October\";}\r\n else if (mn == 11)\r\n {return \"November\";}\r\n else\r\n {return \"December\";}\r\n }",
"public static Date lastDayMonth(){\n String rep_fin_de_mes = \"\";\n try {\n Calendar c = Calendar.getInstance();\n\n /*Obteniendo el ultimo dia del mes*/\n c.set(Calendar.DAY_OF_MONTH, c.getActualMaximum(Calendar.DAY_OF_MONTH));\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n\n /*Almacenamos un string con el formato indicado*/\n rep_fin_de_mes = sdf.format(c.getTime());\n \n } catch (Exception e) {\n // Si hay una excepcion se imprime un mensaje\n System.err.println(e.getMessage());\n }\n \n return stringToDate(rep_fin_de_mes);\n }",
"public String getMonth() {\n return month.getText();\n }",
"public static Date createDate(int yyyy, int month, int day) {\n/* 75 */ CALENDAR.clear();\n/* 76 */ CALENDAR.set(yyyy, month - 1, day);\n/* 77 */ return CALENDAR.getTime();\n/* */ }",
"@Override\r\n public boolean setMonth(int month) {\r\n try {\r\n GregorianCalendar tempCalendar =(GregorianCalendar) calendar.clone();\r\n tempCalendar.setLenient(false); \r\n tempCalendar.set(Calendar.MONTH, month);\r\n tempCalendar.getTime();\r\n }\r\n catch (Exception e) {\r\n return false;\r\n }\r\n calendar.set(Calendar.MONTH, month); \r\n return true;\r\n }",
"Calendar getCalendar();",
"private String monthIntToString (int month){\n String mese = \"\";\n Log.d(TAG, \"valore di mese in monthIntToString: \" + month);\n switch (month){\n case 0:\n mese = \"Gennaio\";\n break;\n case 1:\n mese = \"Febbraio\";\n break;\n case 2:\n mese = \"Marzo\";\n break;\n case 3:\n mese = \"Aprile\";\n break;\n case 4:\n mese = \"Maggio\";\n break;\n case 5:\n mese = \"Giugno\";\n break;\n case 6:\n mese = \"Luglio\";\n break;\n case 7:\n mese = \"Agosto\";\n break;\n case 8:\n mese = \"Settembre\";\n break;\n case 9:\n mese = \"Ottobre\";\n break;\n case 10:\n mese = \"Novembre\";\n break;\n case 11:\n mese = \"Dicembre\";\n break;\n }\n Log.d(TAG, \"a fine metodo monthIntToString se mese è \" + month + \" allora siamo nel mese di: \" + mese);\n return mese;\n }",
"public int getNextMonth()\n\t{\n\t\tm_calendar.set(Calendar.MONTH, getMonthInteger());\n\t\t\n\t\tsetDay(getYear(),getMonthInteger(),1);\n\t\t\n\t\treturn getMonthInteger();\n\t\n\t}",
"public Month getMonth(){\n\t return this.month;\n }",
"private static Calendar createCalendar(int year, int month, int date) {\r\n\t\tCalendar calendar = Calendar.getInstance();\r\n\t\tcalendar.setLenient(false);\r\n\t\tcalendar.set(Calendar.YEAR, year);\r\n\t\tcalendar.set(Calendar.MONTH, month - 1);\r\n\t\tcalendar.set(Calendar.DAY_OF_MONTH, date);\r\n\t\tcalendar.set(Calendar.MINUTE, 0);\r\n\t\tcalendar.set(Calendar.HOUR_OF_DAY, 0);\r\n\t\tcalendar.set(Calendar.SECOND, 0);\r\n\t\treturn calendar;\r\n\t}",
"public ArrayList<String> getMonths() \r\n\t{\r\n\t\tString[] monthsArray = {\"January\", \"Febuary\", \"March\", \"April\", \"May\", \"June\",\r\n\t\t\t\t\t\t \"July\", \"August\", \"September\", \"October\", \"November\", \"Decmber\"};\r\n\t\tArrayList <String>monthList = new ArrayList<String>(Arrays.asList(monthsArray));\r\n\t\treturn monthList;\r\n\t}",
"public String getMonth(int month) {\r\n\t\tString str = \"\";\r\n\t\tswitch (month) {\r\n\t\tcase 1:\r\n\t\t\tstr = \"January\";\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tstr = \"February\";\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tstr = \"March\";\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tstr = \"April\";\r\n\t\t\tbreak;\r\n\t\tcase 5:\r\n\t\t\tstr = \"May\";\r\n\t\t\tbreak;\r\n\t\tcase 6:\r\n\t\t\tstr = \"June\";\r\n\t\t\tbreak;\r\n\t\tcase 7:\r\n\t\t\tstr = \"July\";\r\n\t\t\tbreak;\r\n\t\tcase 8:\r\n\t\t\tstr = \"August\";\r\n\t\t\tbreak;\r\n\t\tcase 9:\r\n\t\t\tstr = \"September\";\r\n\t\t\tbreak;\r\n\t\tcase 10:\r\n\t\t\tstr = \"October\";\r\n\t\t\tbreak;\r\n\t\tcase 11:\r\n\t\t\tstr = \"November\";\r\n\t\t\tbreak;\r\n\t\tcase 12:\r\n\t\t\tstr = \"December\";\r\n\t\t}\r\n\t\treturn str;\r\n\t}",
"public String checkDateMonth(Date aDate){\n if (aDate.getMonth() < 10) {\r\n String newDate = \"0\" + Integer.toString(aDate.getMonth()+1);\r\n \r\n return newDate;\r\n }\r\n return Integer.toString(aDate.getMonth());\r\n \r\n }",
"private String getMonth(Date date) {\n\t\tLocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();\n\n\t\tMonth month = localDate.getMonth();\n\n\t\treturn month.name();\n\t}",
"public void buildMonth()\r\n {\r\n int i=0,k=0;\r\n date=LocalDate.of(year,month,1);\r\n String st;\r\n for(int j=0;date.getMonthValue()==month;j++)\r\n {\r\n\r\n if(date.getDayOfWeek().name()==\"SUNDAY\"){k=0;i++;}\r\n else if(date.getDayOfWeek().name()==\"MONDAY\"){k=1;}\r\n else if(date.getDayOfWeek().name()==\"TUESDAY\"){k=2;}\r\n else if(date.getDayOfWeek().name()==\"WEDNESDAY\"){k=3;}\r\n else if(date.getDayOfWeek().name()==\"THURSDAY\"){k=4;}\r\n else if(date.getDayOfWeek().name()==\"FRIDAY\"){k=5;}\r\n else if(date.getDayOfWeek().name()==\"SATURDAY\"){k=6;}\r\n st=String.valueOf(date.getDayOfMonth());\r\n cmdDate=new JButton(st);\r\n cmdDate.setBounds(xpos+k*110,ypos+i*50,100,50);\r\n this.cmdDate.addActionListener(new DayListner());\r\n panel.add(cmdDate);\r\n date = date.plusDays(1);\r\n }\r\n\r\n }",
"@Override\n public int getMonth() {\n return this.deadline.getMonth();\n }",
"public Month(String name, int year) {\n\t\tthis.name = name;\n\t\tthis.year = year;\n\t\tint offset = getOffset();\n\t\tdays = new Day[42];\n\t\tif (name.equals(\"February\")) {\n\t\t\tif (leap(year)) {\n\t\t\t\tfor (int i = offset; i < 29 + offset; i++) {\n\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\tnumDays = 29;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (int i = offset; i < 28 + offset; i++) {\n\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\tnumDays = 28;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tswitch(name) {\n\t\t\t\tcase \"January\":\n\t\t\t\t\tfor (int i = offset; i < 31 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 31;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"March\":\n\t\t\t\t\tfor (int i = offset; i < 31 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 31;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"April\":\n\t\t\t\t\tfor (int i = offset; i < 30 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 30;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"May\":\n\t\t\t\t\tfor (int i = offset; i < 31 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 31;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"June\":\n\t\t\t\t\tfor (int i = offset; i < 30 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 30;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"July\":\n\t\t\t\t\tfor (int i = offset; i < 31 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 31;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"August\":\n\t\t\t\t\tfor (int i = offset; i < 31 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 31;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"September\":\n\t\t\t\t\tfor (int i = offset; i < 30 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 30;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"October\":\n\t\t\t\t\tfor (int i = offset; i < 31 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 31;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"November\":\n\t\t\t\t\tfor (int i = offset; i < 30 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 30;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"December\":\n\t\t\t\t\tfor (int i = offset; i < 31 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 31;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"public int getMonthValue(){\n\t\treturn monthValue;\n\t}",
"public int getMonthDate()\n\t{\n\t\tif (m_nType == AT_MONTH_DATE)\n\t\t\treturn ((Integer)m_oData).intValue();\n\t\telse\n\t\t\treturn -1;\n\t}",
"public static String[] getMonths() {\n\t\tString[] months = {\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \n\t\t\t\"July\", \"August\", \"September\", \"October\", \"November\", \"December\"};\n\t\treturn months;\n\t}",
"public static int getStartDay(int year, int month)\n {\n int startday = 3;//add 3 to the variable start\n int totalamountofdays = getTotalNumberOfDays(year,month);//call the method getTotalNumberOfDays and store it in a variable called start\n return(totalamountofdays + startday) % 7;//return start % 7 \n }",
"public static native JsDate create(int year, int month) /*-{\n return new Date(year, month);\n }-*/;",
"public int getDate(String month)\n\t{\n\t\tint a[] = {1,2,3};\n\t\t//17 Feb 2011 00:00:00\n\t\t\n\t\t\n\t\tHashMap<String, Integer> map = new HashMap<String, Integer>();\n\t\tmap.put(\"Jan\", 1);\n\t\tmap.put(\"Feb\", 2);\n\t\tmap.put(\"Mar\", 3);\n\t\tmap.put(\"Apr\", 4);\n\t\tmap.put(\"May\", 5);\n\t\tmap.put(\"Jun\", 6);\n\t\tmap.put(\"Jul\", 7);\n\t\tmap.put(\"Aug\", 8);\n\t\tmap.put(\"Sep\", 9);\n\t\tmap.put(\"Oct\", 10);\n\t\tmap.put(\"Nov\", 11);\n\t\tmap.put(\"Dec\", 12);\n\t\t\n\t\tint mon = (int) map.get(month);\n\t\treturn mon;\n\t}",
"@Test\n public void Month() {\n System.out.printf(\"%d%n\", Month.FEBRUARY.maxLength());\n\n Month month = Month.AUGUST;\n Locale locale = Locale.getDefault();\n System.out.println(month.getDisplayName(TextStyle.FULL, locale));\n System.out.println(month.getDisplayName(TextStyle.NARROW, locale));\n System.out.println(month.getDisplayName(TextStyle.SHORT, locale));\n }",
"private void monthFormat() {\n\t\ttry {\n\t\t\tString currentMonth = monthFormat.format(new Date()); //Get current month\n\t\t\tstartDate = monthFormat.parse(currentMonth); //Parse to first of the month\n\t\t\tString[] splitCurrent = currentMonth.split(\"-\");\n\t\t\tint month = Integer.parseInt(splitCurrent[0]) + 1; //Increase the month\n\t\t\tif (month == 13) { //If moving to next year\n\t\t\t\tint year = Integer.parseInt(splitCurrent[1]) + 1;\n\t\t\t\tendDate = monthFormat.parse(\"01-\" + year);\n\t\t\t} else {\n\t\t\t\tendDate = monthFormat.parse(month + \"-\" + splitCurrent[1]);\n\t\t\t}\n\t\t\t//Create SQL times\n\t\t\tstartDateSQL = new java.sql.Date(startDate.getTime());\n\t\t\tendDateSQL = new java.sql.Date(endDate.getTime());\n\t\t\tmonthString = new SimpleDateFormat(\"MMMM\").format(startDate);\n\t\t} catch (ParseException e) {\n\t\t\t_.log(Level.SEVERE, GameMode.Sonic, \"Failed to parse dates. Monthly leaderboard disabled.\");\n\t\t}\n\t}",
"public List<String> getMonthsList(){\n Calendar now = Calendar.getInstance();\n int year = now.get(Calendar.YEAR);\n\n String months[] = {\"JANUARY\", \"FEBRUARY\", \"MARCH\", \"APRIL\",\n \"MAY\", \"JUNE\", \"JULY\", \"AUGUST\", \"SEPTEMBER\",\n \"OCTOBER\", \"NOVEMBER\", \"DECEMBER\"};\n\n List<String> mList = new ArrayList<>();\n\n //3 months of previous year to view the attendances\n for(int i=9; i<months.length; i++){\n mList.add(months[i]+\" \"+(year-1));\n }\n\n //Months of Current Year\n for(int i=0; i<=(now.get(Calendar.MONTH)); i++){\n mList.add(months[i]+\" \"+year);\n }\n\n return mList;\n }",
"public final native double setMonth(int month) /*-{\n this.setMonth(month);\n return this.getTime();\n }-*/;",
"public void printMonth() {\r\n switch (cur.getMonth()){\r\n case 1:\r\n System.out.println(\"JANUARY\");\r\n break;\r\n case 2:\r\n System.out.println(\"FEBRUARY\");\r\n break;\r\n case 3:\r\n System.out.println(\"MARCH\");\r\n break;\r\n case 4:\r\n System.out.println(\"APRIL\");\r\n break;\r\n case 5:\r\n System.out.println(\"MAY\");\r\n break;\r\n case 6:\r\n System.out.println(\"JUNE\");\r\n break;\r\n case 7:\r\n System.out.println(\"JULY\");\r\n break;\r\n case 8:\r\n System.out.println(\"AUGUST\");\r\n break;\r\n case 9:\r\n System.out.println(\"SEPTEMBER\");\r\n break;\r\n case 10:\r\n System.out.println(\"OCTOBER\");\r\n break;\r\n case 11:\r\n System.out.println(\"NOVEMBER\");\r\n break;\r\n case 12:\r\n System.out.println(\"DECEMBER\");\r\n break;\r\n }\r\n }",
"private void resetCalendarToMonth(Calendar calendar) {\n\t\tcalendar.set(Calendar.DAY_OF_MONTH, 1);\n\t\tcalendar.set(Calendar.HOUR_OF_DAY, 0);\n\t\tcalendar.set(Calendar.MINUTE, 0);\n\t\tcalendar.set(Calendar.SECOND, 0);\n\t\tcalendar.set(Calendar.MILLISECOND, 0);\n\t}",
"public int[] getMonths() {\n return months;\n }",
"private static String getYearMonth() {\n LocalDate oneMonthAgo = LocalDate.now().minusMonths(1);\n return oneMonthAgo.getYear() + String.format(\"%02d\", oneMonthAgo.getMonth().getValue());\n }",
"public Month(int month, Day startDay, boolean isLeapYear) {\n switch (month) {\n case 0:\n case 2:\n case 4:\n case 6:\n case 7:\n case 10:\n case 11:\n this.days = 31;\n break;\n case 3:\n case 5:\n case 8:\n case 9:\n this.days = 30;\n break;\n case 1:\n if (isLeapYear) {\n this.days = 29;\n } else {\n this.days = 28;\n }\n break;\n }\n this.start = startDay.getValue();\n }",
"public java.math.BigInteger getStartMonth() {\r\n return startMonth;\r\n }",
"@JsonCreator\n public BirthYearMonth(\n @JsonProperty(\"year\") @JsonPropertyDescription(\"4-digit year\") int year,\n @JsonProperty(\"month\") @JsonPropertyDescription(\"1-2-digit month from 1-12\") int month\n ) {\n AgeUtil.checkYear(year);\n if (month<1 || month>12) throw new IllegalArgumentException(\"Month must be 1-12 but was: \"+month+\"!\");\n this.year = year;\n this.month = month;\n }",
"public static final Calendar getCalendar(int date, int month, int year) {\r\n\t\tCalendar cal = Calendar.getInstance(); // locale-specific\r\n\t\t// cal.setTime(dateObject);\r\n\t\tcal.set(Calendar.HOUR_OF_DAY, 0);\r\n\t\tcal.set(Calendar.MINUTE, 0);\r\n\t\tcal.set(Calendar.SECOND, 0);\r\n\t\tcal.set(Calendar.MILLISECOND, 0);\r\n\r\n\t\tcal.set(Calendar.DATE, date);\r\n\t\tcal.set(Calendar.MONTH, month);\r\n\t\tcal.set(Calendar.YEAR, year);\r\n\t\treturn cal;\r\n\t}",
"public void enumerators()\n {\n Month birthMonth; //create a variable type called birthMonth\n birthMonth = Month.MAY; //assign a value to birthMonth from the enum defined above\n int ordinalNum = birthMonth.ordinal();\n String getMonth = birthMonth.toString();\n \n if(birthMonth.equals(Month.NOV))\n {\n System.out.println(\"Turkey Month! \");\n }\n else\n {\n System.out.println(\"That's a good month! \");\n }\n System.out.println(birthMonth.valueOf(\"DEC\"));\n \n System.out.println(\"ordinal: \" + ordinalNum);\n \n System.out.println(\"getMonth is: \" + getMonth); //starts at 0\n \n }",
"public static Date getStartDateByMonth(int month, int year) {\n\n\t\tCalendar c = Calendar.getInstance();\n\t\tc.set(year, month, 1);\n\n\t\treturn c.getTime();\n\t}",
"public String cal(Calendar calendar) {\r\n String calendari;\r\n calendari = calendar.get(Calendar.DAY_OF_MONTH) + \"-\" + calendar.get(Calendar.MONTH) + \"-\" + calendar.get(Calendar.YEAR);\r\n return calendari;\r\n }",
"public void generateMonth(int year,int month,Graphics g, int offsetX,int offsetY) throws Exception\n {\n int m = month-1;\n //set calendar to get day of week\n Calendar calendar = Calendar.getInstance();\n calendar.set(year,m,1);\n\n int days = months[m];\n if (m==1 && year % 4 == 0)\n days = 29;\n int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK)-1;\n\n int weeks = (int)Math.ceil((days+dayOfWeek)/7.0);\n BufferedImage baseImage = getImageFromFile(basePath+\"/calendar\"+Integer.toString(weeks)+\"Row.png\");\n\n g.drawImage(baseImage, offsetX+mTagWidth, offsetY,null);\n\n BufferedImage baseMonthImage = getImageFromFile(baseMonthPath);\n\n int sx1 = 0;\n int sy1 = mTagHeight*m;\n int sx2 = mTagWidth;\n int sy2 = sy1 + mTagHeight;\n g.drawImage(baseMonthImage, offsetX, offsetY, offsetX+mTagWidth,offsetY+mTagHeight,sx1,sy1,sx2,sy2,null);\n\n //draw date\n drawDate(g,days,dayOfWeek, offsetX, offsetY);\n }",
"private int daysInMonth (int Month, int Year) {\n int result = 0;\n for (int i = 0; i <=6; i++) {\n if (Month == months31[i]){\n result = 31;\n } else {\n // ergänzen um schaltjahr\n if (Month == 2){\n result = daysFebruary(Year);\n } else {\n result = 30;\n }\n }\n } return result;\n\n }"
] | [
"0.6703685",
"0.6555714",
"0.6554219",
"0.63903046",
"0.6274132",
"0.6260861",
"0.61250395",
"0.6112495",
"0.60967433",
"0.6069555",
"0.6067861",
"0.6052029",
"0.6046",
"0.60385823",
"0.5973854",
"0.59578943",
"0.5946035",
"0.5933285",
"0.59318346",
"0.59305155",
"0.59110504",
"0.59004974",
"0.5889317",
"0.58789605",
"0.58715516",
"0.5869888",
"0.5869168",
"0.5869168",
"0.58669025",
"0.58582294",
"0.5852156",
"0.58485556",
"0.5848355",
"0.58445466",
"0.58425134",
"0.58391464",
"0.58328754",
"0.5830344",
"0.5828256",
"0.5821534",
"0.58197343",
"0.58102375",
"0.5809841",
"0.5809841",
"0.5809683",
"0.5806615",
"0.5792637",
"0.57863516",
"0.57781667",
"0.57693386",
"0.57693386",
"0.57693386",
"0.5726889",
"0.57028973",
"0.5701392",
"0.56773114",
"0.5654892",
"0.5636161",
"0.56351876",
"0.5634451",
"0.56273645",
"0.56047827",
"0.56033623",
"0.5599556",
"0.5580953",
"0.55607975",
"0.5556213",
"0.5553139",
"0.5544393",
"0.5543124",
"0.55333096",
"0.55261695",
"0.55234873",
"0.55096567",
"0.5503684",
"0.54543513",
"0.5444077",
"0.54393744",
"0.5434153",
"0.54153824",
"0.54150873",
"0.5408524",
"0.54061997",
"0.54007465",
"0.5400172",
"0.53972715",
"0.53947693",
"0.5386269",
"0.53860253",
"0.5385411",
"0.5379891",
"0.53758776",
"0.5375712",
"0.53710014",
"0.5357654",
"0.53413016",
"0.53359175",
"0.5330116",
"0.5319903",
"0.53183925"
] | 0.5457852 | 75 |
Returns the formal name of the current month from a gregorian calendar. monthNameReturn Month January | JanJanuary Febraury | FebFebruary March | MarMarch April | AprApril MayMay June | JunJune July | JulJuly August | AugAugust September | SepSeptember October | OctOctober November | NovNovember December | DecDecember | public static Month of(String monthName) {
for (Month month : MONTHS) {
if (month.name.equalsIgnoreCase(monthName))
return month;
if (month.shortName.equalsIgnoreCase(monthName))
return month;
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getMonthName()\r\n {\r\n int mn = theMonthNumber;\r\n if (mn == 1)\r\n {return \"January\";}\r\n else if (mn == 2)\r\n {return \"February\";}\r\n else if (mn == 3)\r\n {return \"March\";}\r\n else if (mn == 4)\r\n {return \"April\";}\r\n else if (mn == 5)\r\n {return \"May\";}\r\n else if (mn == 6)\r\n {return \"June\";}\r\n else if (mn == 7)\r\n {return \"July\";}\r\n else if (mn == 8)\r\n {return \"August\";}\r\n else if (mn == 9)\r\n {return \"September\";}\r\n else if (mn == 10)\r\n {return \"October\";}\r\n else if (mn == 11)\r\n {return \"November\";}\r\n else\r\n {return \"December\";}\r\n }",
"public final String getMonthName() {\n return yearMonthProperty().get().getMonth().getDisplayName(TextStyle.FULL, Locale.getDefault());\n }",
"private String getMonthName(int month)\n\t{\n\t\tswitch (month)\n\t\t{\n\t\tcase 1:\n\t\t\treturn \"January\";\n\t\tcase 2:\n\t\t\treturn \"February\";\n\t\tcase 3:\n\t\t\treturn \"March\";\n\t\tcase 4:\n\t\t\treturn \"April\";\n\t\tcase 5:\n\t\t\treturn \"May\";\n\t\tcase 6:\n\t\t\treturn \"June\";\n\t\tcase 7:\n\t\t\treturn \"July\";\n\t\tcase 8:\n\t\t\treturn \"August\";\n\t\tcase 9:\n\t\t\treturn \"September\";\n\t\tcase 10:\n\t\t\treturn \"October\";\n\t\tcase 11:\n\t\t\treturn \"November\";\n\t\tcase 12:\n\t\t\treturn \"December\";\n\t\t}\n\t\treturn \"MonthNameFail\";\n\t}",
"public String getMonthName(int month){\n\t\t\tString monthname;\n\t\t\tswitch(month){\n\t\t\t\tcase 1:\n\t\t\t\t\tmonthname = \"Enero\";\n\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tmonthname = \"Febrero\";\n\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tmonthname = \"Marzo\";\n\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tmonthname = \"Abril\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tmonthname = \"Mayo\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tmonthname = \"Junio\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\tmonthname = \"Julio\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 8:\n\t\t\t\t\tmonthname = \"Agosto\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 9:\n\t\t\t\t\tmonthname = \"Septiembre\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 10:\n\t\t\t\t\tmonthname = \"Octubre\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 11:\n\t\t\t\t\tmonthname = \"Noviembre\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 12:\n\t\t\t\t\tmonthname = \"Diciembre\";\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\tmonthname = \"No existe ese mes\";\n\t\t\t}\n\t\t\t\treturn monthname;\n\t\t}",
"public String getMonthName(int monthNumber) {\n String month = \"\";\n switch (monthNumber) {\n case 0:\n month = \"January\";\n break;\n case 1:\n month = \"February\";\n break;\n case 2:\n month = \"March\";\n break;\n case 3:\n month = \"April\";\n break;\n case 4:\n month = \"May\";\n break;\n case 5:\n month = \"June\";\n break;\n case 6:\n month = \"July\";\n break;\n case 7:\n month = \"August\";\n break;\n case 8:\n month = \"September\";\n break;\n case 9:\n month = \"October\";\n break;\n case 10:\n month = \"November\";\n break;\n case 11:\n month = \"December\";\n break;\n default:\n month = \"Invalid Month\";\n break;\n }\n return month;\n }",
"public static String getMonthNameByNumber(int Month){\n\t\tString MonthName = \"\";\n\t\tif(Month == 1){\n\t\t\tMonthName = \"January\" ;\t\n\t\t}else if(Month == 2){\n\t\t\tMonthName = \"February\";\n\t\t}else if(Month == 3){\n\t\t\tMonthName = \"March\";\n\t\t}else if(Month == 4){\n\t\t\tMonthName = \"April\";\n\t\t}else if(Month == 5){\n\t\t\tMonthName = \"May\";\n\t\t}else if(Month == 6){\n\t\t\tMonthName = \"June\";\n\t\t}else if(Month == 7){\n\t\t\tMonthName = \"July\";\n\t\t}else if(Month == 8){\n\t\t\tMonthName = \"August\";\n\t\t}else if(Month == 9){\n\t\t\tMonthName = \"September\";\n\t\t}else if(Month == 10){\n\t\t\tMonthName = \"October\";\n\t\t}else if(Month == 11){\n\t\t\tMonthName = \"November\";\n\t\t}else if(Month == 12){\n\t\t\tMonthName = \"December\";\n\t\t}\n\t\treturn MonthName;\n\t}",
"public String convertMonthNumToName(int month) {\n\t\t\t\treturn new DateFormatSymbols().getMonths()[month-1];\n\t\t\t}",
"public static String getCalendarMonthString(int month)\r\n\t{\r\n\t\tString[] arrMonths = {\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"};\r\n\t\treturn arrMonths[month];\r\n\t}",
"public String getMonth(int month) {\r\n\t\tString str = \"\";\r\n\t\tswitch (month) {\r\n\t\tcase 1:\r\n\t\t\tstr = \"January\";\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tstr = \"February\";\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tstr = \"March\";\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tstr = \"April\";\r\n\t\t\tbreak;\r\n\t\tcase 5:\r\n\t\t\tstr = \"May\";\r\n\t\t\tbreak;\r\n\t\tcase 6:\r\n\t\t\tstr = \"June\";\r\n\t\t\tbreak;\r\n\t\tcase 7:\r\n\t\t\tstr = \"July\";\r\n\t\t\tbreak;\r\n\t\tcase 8:\r\n\t\t\tstr = \"August\";\r\n\t\t\tbreak;\r\n\t\tcase 9:\r\n\t\t\tstr = \"September\";\r\n\t\t\tbreak;\r\n\t\tcase 10:\r\n\t\t\tstr = \"October\";\r\n\t\t\tbreak;\r\n\t\tcase 11:\r\n\t\t\tstr = \"November\";\r\n\t\t\tbreak;\r\n\t\tcase 12:\r\n\t\t\tstr = \"December\";\r\n\t\t}\r\n\t\treturn str;\r\n\t}",
"public static String getMonthName(Integer monthNo){\r\n return MONTHS[monthNo-1];\r\n }",
"private String getMonth(Date date) {\n\t\tLocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();\n\n\t\tMonth month = localDate.getMonth();\n\n\t\treturn month.name();\n\t}",
"@Test\n public void Month() {\n System.out.printf(\"%d%n\", Month.FEBRUARY.maxLength());\n\n Month month = Month.AUGUST;\n Locale locale = Locale.getDefault();\n System.out.println(month.getDisplayName(TextStyle.FULL, locale));\n System.out.println(month.getDisplayName(TextStyle.NARROW, locale));\n System.out.println(month.getDisplayName(TextStyle.SHORT, locale));\n }",
"public String getMonth(int Month)\n {\n String[] months = {\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"};\n String realMonth = months[Month] + \" \" + i.getYear();\n return realMonth;\n }",
"public static String getGMonth( String month ) {\r\n String ret = null;\r\n ret = \"January\".equals( month ) == true ? \"01\" : ret;\r\n ret = \"February\".equals( month ) == true ? \"02\" : ret;\r\n ret = \"March\".equals( month ) == true ? \"03\" : ret;\r\n ret = \"April\".equals( month ) == true ? \"04\" : ret;\r\n ret = \"May\".equals( month ) == true ? \"05\" : ret;\r\n ret = \"June\".equals( month ) == true ? \"06\" : ret;\r\n ret = \"July\".equals( month ) == true ? \"07\" : ret;\r\n ret = \"August\".equals( month ) == true ? \"08\" : ret;\r\n ret = \"September\".equals( month ) == true ? \"09\" : ret;\r\n ret = \"October\".equals( month ) == true ? \"10\" : ret;\r\n ret = \"November\".equals( month ) == true ? \"11\" : ret;\r\n ret = \"December\".equals( month ) == true ? \"12\" : ret;\r\n return ret;\r\n }",
"public static String getMonthTitle(int year, int month) {\n String result = \"\";\n result += \" \" + getMonthName(month) + \" \" + year + \"\\n\";\n result += \"---------------------------------------------\" + \"\\n\";\n result += \" Sun Mon Tue Wed Thu Fri Sat\" + \"\\n\";\n return result;\n }",
"public String getMonth(int month) {\n\t\treturn new DateFormatSymbols().getMonths()[month-1];\n\t}",
"public static String convertToMonthName(int calendarIndex, Context context) {\n if(calendarIndex == Calendar.JANUARY) {\n return context.getString(R.string.Jan);\n }\n if(calendarIndex == Calendar.FEBRUARY) {\n return context.getString(R.string.Feb);\n }\n if(calendarIndex == Calendar.MARCH) {\n return context.getString(R.string.Mar);\n }\n if(calendarIndex == Calendar.APRIL) {\n return context.getString(R.string.Apr);\n }\n if(calendarIndex == Calendar.MAY) {\n return context.getString(R.string.May);\n }\n if(calendarIndex == Calendar.JUNE) {\n return context.getString(R.string.Jun);\n }\n if(calendarIndex == Calendar.JULY) {\n return context.getString(R.string.Jul);\n }\n if(calendarIndex == Calendar.AUGUST) {\n return context.getString(R.string.Aug);\n }\n if(calendarIndex == Calendar.SEPTEMBER) {\n return context.getString(R.string.Sep);\n }\n if(calendarIndex == Calendar.OCTOBER) {\n return context.getString(R.string.Oct);\n }\n if(calendarIndex == Calendar.NOVEMBER) {\n return context.getString(R.string.Nov);\n }\n if(calendarIndex == Calendar.DECEMBER) {\n return context.getString(R.string.Dec);\n }\n return \"\";\n }",
"public String getMonth() {\n return month.getText();\n }",
"public String getMonthAlphabet(int month) {\n\t\treturn new DateFormatSymbols().getShortMonths()[month];\n\t}",
"public static String formatMonthName(Month month) {\n if(month == null) {\n return null;\n }\n\n String m = month.toString();\n return m.substring(0, 1).toUpperCase() + m.substring(1,3).toLowerCase();\n }",
"public String getMonth(int month) {\n\t\t\t\treturn new DateFormatSymbols().getMonths()[month];\n\t\t\t}",
"public String getMonth()\n {\n return Month.get();\n }",
"public static String[] getMonthNames() {\n if (MONTH_NAMES == null) {\n MONTH_NAMES = new String[12];\n int i = 0;\n for(Month m: Month.values()) {\n MONTH_NAMES[i++] = ProjectSummaryLogic.formatMonthName(m);\n }\n }\n return MONTH_NAMES;\n }",
"private String getMonth(int i) {\n String month = \"\";\n switch (i) {\n case 0:\n month = \"Jan\";\n break;\n case 1:\n month = \"Feb\";\n break;\n case 2:\n month = \"Mar\";\n break;\n case 3:\n month = \"Apr\";\n break;\n case 4:\n month = \"May\";\n break;\n case 5:\n month = \"Jun\";\n break;\n case 6:\n month = \"Jul\";\n break;\n case 7:\n month = \"Aug\";\n break;\n case 8:\n month = \"Sep\";\n break;\n case 9:\n month = \"Oct\";\n break;\n case 10:\n month = \"Nov\";\n break;\n case 11:\n month = \"Dec\";\n break;\n }\n return month;\n }",
"public static String monthToString(int month){\r\n\r\n if(month == 1) {return \"jan\"}\r\n else if(month == 2) {return \"feb\"}\r\n else if(month == 3) {return \"mar\"}\r\n else if(month == 4) {return \"apl\"}\r\n else if(month == 5) {return \"may\"}\r\n else if(month == 6) {return \"jun\"}\r\n else if(month == 7) {return \"jul\"}\r\n else if(month == 8) {return \"aug\"}\r\n else if(month == 9) {return \"sep\"}\r\n else if(month == 10) {return \"oct\"}\r\n else if(month == 11) {return \"nov\"}\r\n else if (month == 12) {return \"dec\"}\r\n else {}\r\n return \"broken\";\r\n\r\n}",
"public String getMonth() {\r\n return month;\r\n }",
"public String getMonth() {\n return month;\n }",
"public String monthName(int month, int minWidth, int maxWidth) {\n\t\tString name = swedishMonths[month-1];\n if (maxWidth < 3) {\n maxWidth = 3;\n }\n if (name.length() > maxWidth) {\n name = name.substring(0, maxWidth);\n }\n while (name.length() < minWidth) {\n name = name + ' ';\n }\n return name;\n\t}",
"public static String getMonth(int year, int month) {\n return getMonthTitle(year, month) + getMonthBody(year, month);\n }",
"public String getMonth()\n {\n SimpleDateFormat newDateFormat = new SimpleDateFormat(\"dd/MM\");\n String MySDate = newDateFormat.format(this.dueDate);\n return MySDate;\n }",
"public String monthConvert(int month) {\n\t\t\tif (month == 1) return \"Jan\";\r\n\t\t\telse if (month == 2) return \"Feb\";\r\n\t\t\telse if (month == 3) return \"Mar\";\r\n\t\t\telse if (month == 4) return \"Apr\";\r\n\t\t\telse if (month == 5) return \"May\";\r\n\t\t\telse if (month == 6) return \"Jun\";\r\n\t\t\telse if (month == 7) return \"Jul\";\r\n\t\t\telse if (month == 8) return \"Aug\";\r\n\t\t\telse if (month == 9) return \"Sep\";\r\n\t\t\telse if (month == 10) return \"Oct\";\r\n\t\t\telse if (month == 11) return \"Nov\";\r\n\t\t\telse return \"Dec\";\r\n\t\t}",
"public void printMonth() {\r\n switch (cur.getMonth()){\r\n case 1:\r\n System.out.println(\"JANUARY\");\r\n break;\r\n case 2:\r\n System.out.println(\"FEBRUARY\");\r\n break;\r\n case 3:\r\n System.out.println(\"MARCH\");\r\n break;\r\n case 4:\r\n System.out.println(\"APRIL\");\r\n break;\r\n case 5:\r\n System.out.println(\"MAY\");\r\n break;\r\n case 6:\r\n System.out.println(\"JUNE\");\r\n break;\r\n case 7:\r\n System.out.println(\"JULY\");\r\n break;\r\n case 8:\r\n System.out.println(\"AUGUST\");\r\n break;\r\n case 9:\r\n System.out.println(\"SEPTEMBER\");\r\n break;\r\n case 10:\r\n System.out.println(\"OCTOBER\");\r\n break;\r\n case 11:\r\n System.out.println(\"NOVEMBER\");\r\n break;\r\n case 12:\r\n System.out.println(\"DECEMBER\");\r\n break;\r\n }\r\n }",
"public static void printMonthTitle(int year, int month) {\n\n }",
"private String getFullMonthNameFromHeader(String labelname) \r\n\t{\n\t\tString substringgetfirstthree = labelname;\r\n String getactualmonth = substringgetfirstthree.replaceAll(\"[^a-zA-Z]\", \"\").trim();\r\n \r\n return getactualmonth;\t\r\n\t\r\n\t}",
"public String convertMonthNameToNumAsString(String name) {\n\t\t String month = null;\n\t\t name = name.substring(0,3);\n\t\t if (name.equals(\"Jan\")) { month = \"01\"; }\n\t\t if (name.equals(\"Feb\")) { month = \"02\"; }\n\t\t if (name.equals(\"Mar\")) { month = \"03\"; }\n\t\t if (name.equals(\"Apr\")) { month = \"04\"; }\n\t\t if (name.equals(\"May\")) { month = \"05\"; }\n\t\t if (name.equals(\"Jun\")) { month = \"06\"; }\n\t\t if (name.equals(\"Jul\")) { month = \"07\"; }\n\t\t if (name.equals(\"Aug\")) { month = \"08\"; }\n\t\t if (name.equals(\"Sep\")) { month = \"09\"; }\n\t\t if (name.equals(\"Oct\")) { month = \"10\"; }\n\t\t if (name.equals(\"Nov\")) { month = \"11\"; }\n\t\t if (name.equals(\"Dec\")) { month = \"12\"; }\n\t\t \treturn month;\n\t\t\t}",
"public java.lang.String getMonth() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: gov.nist.javax.sip.header.SIPDate.getMonth():java.lang.String, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: gov.nist.javax.sip.header.SIPDate.getMonth():java.lang.String\");\n }",
"public String getJP_AcctMonth();",
"public static String getMonthAbbreviated(String date) {\n Date dateDT = parseDate(date);\n\n if (dateDT == null) {\n return null;\n }\n\n // Get current date\n Calendar c = Calendar.getInstance();\n // it is very important to\n // set the date of\n // the calendar.\n c.setTime(dateDT);\n int day = c.get(Calendar.MONTH);\n\n String dayStr = null;\n\n switch (day) {\n\n case Calendar.JANUARY:\n dayStr = \"Jan\";\n break;\n\n case Calendar.FEBRUARY:\n dayStr = \"Feb\";\n break;\n\n case Calendar.MARCH:\n dayStr = \"Mar\";\n break;\n\n case Calendar.APRIL:\n dayStr = \"Apr\";\n break;\n\n case Calendar.MAY:\n dayStr = \"May\";\n break;\n\n case Calendar.JUNE:\n dayStr = \"Jun\";\n break;\n\n case Calendar.JULY:\n dayStr = \"Jul\";\n break;\n\n case Calendar.AUGUST:\n dayStr = \"Aug\";\n break;\n\n case Calendar.SEPTEMBER:\n dayStr = \"Sep\";\n break;\n\n case Calendar.OCTOBER:\n dayStr = \"Oct\";\n break;\n\n case Calendar.NOVEMBER:\n dayStr = \"Nov\";\n break;\n\n case Calendar.DECEMBER:\n dayStr = \"Dec\";\n break;\n }\n\n return dayStr;\n }",
"private String monthIntToString (int month){\n String mese = \"\";\n Log.d(TAG, \"valore di mese in monthIntToString: \" + month);\n switch (month){\n case 0:\n mese = \"Gennaio\";\n break;\n case 1:\n mese = \"Febbraio\";\n break;\n case 2:\n mese = \"Marzo\";\n break;\n case 3:\n mese = \"Aprile\";\n break;\n case 4:\n mese = \"Maggio\";\n break;\n case 5:\n mese = \"Giugno\";\n break;\n case 6:\n mese = \"Luglio\";\n break;\n case 7:\n mese = \"Agosto\";\n break;\n case 8:\n mese = \"Settembre\";\n break;\n case 9:\n mese = \"Ottobre\";\n break;\n case 10:\n mese = \"Novembre\";\n break;\n case 11:\n mese = \"Dicembre\";\n break;\n }\n Log.d(TAG, \"a fine metodo monthIntToString se mese è \" + month + \" allora siamo nel mese di: \" + mese);\n return mese;\n }",
"public String getMonth(String x){\n\n if(x.contains(\"Apr\")){\n return \"April\";\n }\n else if(x.contains(\"Mar\")){\n return \"March\";\n }\n else if(x.contains(\"Jan\")){\n return \"January\";\n }\n else if(x.contains(\"Feb\")){\n return \"February\";\n }\n else if(x.contains(\"May\")){\n return \"May\";\n }\n else if(x.contains(\"Jun\")){\n return \"June\";\n }\n else if(x.contains(\"Jul\")){\n return \"July\";\n }\n else if(x.contains(\"Aug\")){\n return \"August\";\n }\n else if(x.contains(\"Sep\")){\n return \"September\";}\n else if(x.contains(\"Oct\")){\n return \"October\";}\n else if(x.contains(\"Nov\")){\n return \"November\";}\n else{\n return \"December\";}\n }",
"public String intToMonth(int a)\r\n {\r\n if(a==1)return \"Januray\";\r\n else if(a==2)return \"February\";\r\n else if(a==3)return \"March\";\r\n else if(a==4)return \"April\";\r\n else if(a==5)return \"May\";\r\n else if(a==6)return \"June\";\r\n else if(a==7)return \"July\";\r\n else if(a==8)return \"August\";\r\n else if(a==9)return \"September\";\r\n else if(a==10)return \"October\";\r\n else if(a==11)return \"November\";\r\n else if(a==12)return \"December\";\r\n else return \"\";\r\n }",
"public String getYearMonthLabel() {\r\n return yearMonthLabel;\r\n }",
"private int getCalendarMonth(String month){\n month = month.toUpperCase();\n if (month.indexOf(\"JAN\") == 0 ) {\n return Calendar.JANUARY;\n } else if (month.indexOf(\"FEB\") == 0) {\n return Calendar.FEBRUARY;\n } else if (month.indexOf(\"MAR\") == 0) {\n return Calendar.MARCH ;\n } else if (month.indexOf(\"APR\") == 0) {\n return Calendar.APRIL;\n } else if (month.indexOf(\"MAY\") == 0) {\n return Calendar.MAY;\n } else if (month.indexOf(\"JUN\") == 0) {\n return Calendar.JUNE;\n } else if (month.indexOf(\"JUL\") == 0) {\n return Calendar.JULY;\n } else if (month.indexOf(\"AUG\") == 0) {\n return Calendar.AUGUST;\n } else if (month.indexOf(\"SEP\") == 0) {\n return Calendar.SEPTEMBER;\n } else if (month.indexOf(\"OCT\") == 0) {\n return Calendar.OCTOBER;\n } else if (month.indexOf(\"NOV\") == 0) {\n return Calendar.NOVEMBER;\n } else if (month.indexOf(\"DEC\") == 0) {\n return Calendar.DECEMBER;\n } else {\n throw new IllegalArgumentException(\"month must be one of {JAN, \" +\n \"FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV ,DEC)\");\n }\n }",
"public final native int getMonth() /*-{\n return this.getMonth();\n }-*/;",
"public void enumerators()\n {\n Month birthMonth; //create a variable type called birthMonth\n birthMonth = Month.MAY; //assign a value to birthMonth from the enum defined above\n int ordinalNum = birthMonth.ordinal();\n String getMonth = birthMonth.toString();\n \n if(birthMonth.equals(Month.NOV))\n {\n System.out.println(\"Turkey Month! \");\n }\n else\n {\n System.out.println(\"That's a good month! \");\n }\n System.out.println(birthMonth.valueOf(\"DEC\"));\n \n System.out.println(\"ordinal: \" + ordinalNum);\n \n System.out.println(\"getMonth is: \" + getMonth); //starts at 0\n \n }",
"@Override\n public String getCurrentMonthAndYear() {\n\n setLogString(\"Get Month and year\", true, CustomLogLevel.HIGH);\n final String currentMonth = getElement(getDriver(), By.className(SAVINGS_MONTH),\n TINY_TIMEOUT).getText();\n setLogString(\"Current Month and Year: \" + currentMonth, true, CustomLogLevel.HIGH);\n return currentMonth.substring(currentMonth.indexOf(\"-\") + 1, currentMonth.length()).trim();\n }",
"public String getCurrentDayOfMonthAsString() {\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}",
"public static String getMonth(String date) {\n Date dateDT = parseDate(date);\n\n if (dateDT == null) {\n return null;\n }\n\n // Get current date\n Calendar c = Calendar.getInstance();\n // it is very important to\n // set the date of\n // the calendar.\n c.setTime(dateDT);\n int day = c.get(Calendar.MONTH);\n\n String dayStr = null;\n\n switch (day) {\n\n case Calendar.JANUARY:\n dayStr = \"January\";\n break;\n\n case Calendar.FEBRUARY:\n dayStr = \"February\";\n break;\n\n case Calendar.MARCH:\n dayStr = \"March\";\n break;\n\n case Calendar.APRIL:\n dayStr = \"April\";\n break;\n\n case Calendar.MAY:\n dayStr = \"May\";\n break;\n\n case Calendar.JUNE:\n dayStr = \"June\";\n break;\n\n case Calendar.JULY:\n dayStr = \"July\";\n break;\n\n case Calendar.AUGUST:\n dayStr = \"August\";\n break;\n\n case Calendar.SEPTEMBER:\n dayStr = \"September\";\n break;\n\n case Calendar.OCTOBER:\n dayStr = \"October\";\n break;\n\n case Calendar.NOVEMBER:\n dayStr = \"November\";\n break;\n\n case Calendar.DECEMBER:\n dayStr = \"December\";\n break;\n }\n\n return dayStr;\n }",
"public static int getCurrentMonth()\n\t{\n\t\treturn Calendar.getInstance().get(Calendar.MONTH) + 1;\n\t}",
"public static int getCurrentMonth(int month) {\n month++;\n return month;\n }",
"public String asMonth() {\n \treturn new SimpleDateFormat(\"MM\").format(expiredAfter);\n }",
"private String dayName() {\n int arrayDay = (day + month + year + (year/4) + (year/100) % 4) % 7;\n return dayName[arrayDay];\n }",
"public Month getCurrentMonthDetails(){\r\n\t\tString req = \"select sum(amount) as total, case strftime('%m', date('now')) when '01' then 'Janvier' when '02' then 'Fevrier' when '03' then 'Mars' when '04' then 'Avril' when '05' then 'Mai' when '06' then 'Juin' when '07' then 'Juillet' when '08' then 'Aout' when '09' then 'Septembre' when '10' then 'Octobre' when '11' then 'Novembre' when '12' then 'Decembre' else '' end as label \"\r\n\t\t\t\t\t+ \"from fee \"\r\n\t\t\t\t\t+ \"where strftime('%m%Y', date) = strftime('%m%Y', date('now'))\";\r\n\t\tCursor cursor = database.rawQuery(req, null);\t\t\t\t\r\n\t\tif (cursor.moveToFirst()) {\r\n\t\t\tdo {\r\n\t\t\t\treturn new Month(cursor.getString(1), cursor.getString(0));\r\n\t\t\t} while (cursor.moveToNext());\r\n\t\t}\r\n\t\tif (cursor != null && !cursor.isClosed()) {\r\n\t\t\tcursor.close();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public String numToMonth(int m)\n {\n return monthsArray[m-1];\n }",
"public int getMonth() {\n\t\treturn month;\n\t}",
"public String toString(){\n\t\tString result = Integer.toString(day) + \" \";\n\t\tswitch (month){\n\t\t\tcase 1:\n\t\t\t\tresult += \"January, \";\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tresult += \"February, \";\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tresult += \"March, \";\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tresult += \"April, \";\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tresult += \"May, \";\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\tresult += \"June, \";\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\tresult += \"July, \";\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\tresult += \"August, \";\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\tresult += \"September, \";\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\tresult += \"October, \";\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\tresult += \"November, \";\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\tresult += \"December, \";\n\t\t\t\tbreak;\n\t\t}\n\t\tresult += Integer.toString((year / 10 % 10)) + Integer.toString((year % 10));\n\n\t\treturn result;\n\t}",
"public int getMonthInteger() \n\t{\n\t\t// 1 will be added here to be able to use this func alone to construct e.g adate\n\t\t// to get the name of the month from getMonth(), 1 must be deducted.\n\t\treturn 1+m_calendar.get(Calendar.MONTH);\n\n\t}",
"public CopticMonth getMonth() {\n\n return CopticMonth.valueOf(this.cmonth);\n\n }",
"public static int getMonthNumber(String monthName) {\r\n switch (monthName) {\r\n case \"Januar\": return 1;\r\n case \"Februar\": return 2;\r\n case \"Mars\": return 3;\r\n case \"April\": return 4;\r\n case \"Mai\": return 5;\r\n case \"Juni\": return 6;\r\n case \"Juli\": return 7;\r\n case \"August\": return 8;\r\n case \"September\": return 9;\r\n case \"Oktober\": return 10;\r\n case \"November\": return 11;\r\n case \"Desember\": return 12;\r\n default: return 0;\r\n }\r\n }",
"public int getMonth() {\n\t\treturn month;\n\t}",
"private static String getYearMonth() {\n LocalDate oneMonthAgo = LocalDate.now().minusMonths(1);\n return oneMonthAgo.getYear() + String.format(\"%02d\", oneMonthAgo.getMonth().getValue());\n }",
"@Override\n public String toString()\n {\n final StringBuilder builder = new StringBuilder();\n builder.append(\"Month[month=\").append(this.month).append(']'); //$NON-NLS-1$\n return builder.toString();\n }",
"public static Month fromName(String abbreviationMonth) {\n for (Month month : Month.values()) {\n if (month.getAbbreviation().equals(abbreviationMonth)) {\n return month;\n }\n }\n return null;\n }",
"public int getMonth() {\n\t\treturn date.getMonthValue();\n\t}",
"public int getMonth(){\n\t\treturn month;\n\t}",
"public int getMonth() {\r\n\t\treturn (this.month);\r\n\t}",
"private static void printMonthHeader(int month, int year) {\n System.out.printf(\" %s %d\\n\", monthNames[month - 1], year);\n for (String d : dayNames) {\n System.out.printf(\" %s \", d);\n }\n System.out.println();\n }",
"public int getMonth()\n {\n return month;\n }",
"public int getMonth() {\n return month;\n }",
"public String getReportMonth() {\r\n return reportMonth;\r\n }",
"private static void printCalendarMonthYear(int month, int year) {\n\t\t// create a new GregorianCalendar object\n\t\tCalendar cal = new GregorianCalendar();\n\t\tint currDate = cal.get(Calendar.DATE);\n\t\t// set its date to the first day of the month/year given by user\n\t\tcal.clear();\n\t\tcal.set(year, month - 1, 1);\n\n\t\t// print calendar header\n\t\tSystem.out.println(\" \" + cal.getDisplayName(Calendar.MONTH, Calendar.LONG, Locale.US) + \" \"\n\t\t\t\t+ cal.get(Calendar.YEAR));\n\n\t\t// obtain the weekday of the first day of month.\n\t\tint firstWeekdayOfMonth = cal.get(Calendar.DAY_OF_WEEK);\n\n\t\t// obtain the number of days in month.\n\t\tint numberOfMonthDays = cal.getActualMaximum(Calendar.DAY_OF_MONTH);\n\n\t\t// print anonymous calendar month based on the weekday of the first\n\t\t// day of the month and the number of days in month:\n\t\tprintCalendar(numberOfMonthDays, firstWeekdayOfMonth, currDate);\n\t}",
"public static void printMonth(int year, int month) {\n System.out.println(\" \");\n System.out.println(\" \");\n getMonthName(month,year);\n printTitle(year,month);//call the method printTitle with the values year and month\n printMonthBody(year,month);//call the method printMonthBody with the values year and month\n }",
"public void initNames() {\n DateFormatSymbols dateFormatSymbols = new DateFormatSymbols(locale);\n String[] monthNames = dateFormatSymbols.getMonths();\n if (comboBox.getItemCount() == 12) comboBox.removeAll();\n for (int i = 0; i < 12; i++)\n comboBox.addItem(monthNames[i]);\n comboBox.select(month);\n }",
"public static final String convertMonth(String monthSlashYear) {\r\n \tString[] monthYear = monthSlashYear.split(\"/\");\r\n \tString month = monthYear[0];\r\n \tString year = monthYear[1];\r\n \treturn getEnMonth(month) + \" \" + year;\r\n }",
"public static String dateToFullMonthNameInDate(LocalDate inputStringDate) {\n\t\tlog.info(\"input Date ::{}\", inputStringDate);\n\t\tDateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"yyyy-MM-dd\");\n\t\tDateTimeFormatter dateFormat = DateTimeFormatter.ofPattern(\"dd MMMM yyyy\");\n\t\treturn dateFormat.format(inputStringDate);\n\t}",
"public String getCalendarName()\r\n {\r\n return (m_calendarName);\r\n }",
"private void monthFormat() {\n\t\ttry {\n\t\t\tString currentMonth = monthFormat.format(new Date()); //Get current month\n\t\t\tstartDate = monthFormat.parse(currentMonth); //Parse to first of the month\n\t\t\tString[] splitCurrent = currentMonth.split(\"-\");\n\t\t\tint month = Integer.parseInt(splitCurrent[0]) + 1; //Increase the month\n\t\t\tif (month == 13) { //If moving to next year\n\t\t\t\tint year = Integer.parseInt(splitCurrent[1]) + 1;\n\t\t\t\tendDate = monthFormat.parse(\"01-\" + year);\n\t\t\t} else {\n\t\t\t\tendDate = monthFormat.parse(month + \"-\" + splitCurrent[1]);\n\t\t\t}\n\t\t\t//Create SQL times\n\t\t\tstartDateSQL = new java.sql.Date(startDate.getTime());\n\t\t\tendDateSQL = new java.sql.Date(endDate.getTime());\n\t\t\tmonthString = new SimpleDateFormat(\"MMMM\").format(startDate);\n\t\t} catch (ParseException e) {\n\t\t\t_.log(Level.SEVERE, GameMode.Sonic, \"Failed to parse dates. Monthly leaderboard disabled.\");\n\t\t}\n\t}",
"public int getMonth() {\n return this.month;\n }",
"public int getMonth() {\n return this.month;\n }",
"public String checkDateMonth(Date aDate){\n if (aDate.getMonth() < 10) {\r\n String newDate = \"0\" + Integer.toString(aDate.getMonth()+1);\r\n \r\n return newDate;\r\n }\r\n return Integer.toString(aDate.getMonth());\r\n \r\n }",
"public static String formatMonth(String time) {\n Date tempTime = DateUtils.parseStringToDateYYMMDD(time);\n DateFormat format = new SimpleDateFormat(MONTH);\n return format.format(tempTime);\n }",
"public static String getName(MARCDataField mfield) {\n String content = getTextContent(mfield, \"-$0\");\n String dates = getTextContent(mfield, \"$d\").trim()\n .replaceAll(\"[()]\", \"\");\n if (dates.length() > 0) {\n return content.replace(dates, \"(\" + dates + \")\");\n } else {\n return content;\n }\n }",
"public int getMonth() {\r\n // ersetzt deprecated Methode Date.getMonth()\r\n return this.month;\r\n }",
"public static String monthNameToNumber(String name) {\n\t\tMONTHS[] arrayOfMonths = MONTHS.values();\n\t\tint toReturn = -1;\n\t\tfor (int i = 0; i < arrayOfMonths.length; i++) {\n\t\t\tif (arrayOfMonths[i].name().equals(name)) {\n\t\t\t\ttoReturn = i + 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tString temp = Integer.toString(toReturn);\n\t\tif (toReturn <= 9) {\n\t\t\ttemp = \"0\" + toReturn;\n\t\t}\n\t\treturn temp;\n\t}",
"public void print(Calendar cal){\r\n\t\tString month;\r\n\t\tswitch(cal.get(Calendar.MONTH)){\r\n\t\t\tcase 0: month = \"Jan\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 1: month = \"Feb\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2: month = \"Mar\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3: month = \"Apr\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4: month = \"May\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 5: month = \"Jun\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 6: month = \"Jul\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 7: month = \"Aug\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 8: month = \"Sep\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 9: month = \"Oct\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 10: month = \"Nov\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault: month = \"Dec\";\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tSystem.out.print(\" \" + month + \" \" + cal.get(Calendar.DAY_OF_MONTH));\r\n\t}",
"private void printMonthNameByNumber() {\n while (SCANNER.hasNext()) {\n int monthNumber = SCANNER.nextInt();\n if (EXIT_COMMAND == monthNumber) {\n System.out.println(\"Good By\");\n SCANNER.close();\n break;\n } else {\n System.out.println(getMonthForInt(monthNumber));\n }\n }\n }",
"private String getMonthForInt(int number) {\n int num = number - 1;\n String month = \"Wrong number\";\n String[] months = dfs.getMonths();\n if (num >= 0 && num <= 11) {\n month = months[num];\n } else {\n throw new IllegalArgumentException(\"There is no month with number: \" + number);\n }\n return month;\n }",
"public Integer getMonth() {\r\n return month;\r\n }",
"public static void printMonthBody(int year, int month) {\n int startDay = getStartDay(year, month);\n //call the method getStartDay to get the start day for each month of the year \n print(startDay,year,month);\n //call the method print to print the calender for the month and pass the first day of the month as the parameter \n \n }",
"private static String generateDateString(int year, int month, int dayOfMonth){\n //Add one to month b/c Android is zero-based while SimpleDateFormatter is not\n month++;\n String yearString = String.format(Locale.getDefault(), \"%04d\", year);\n String monthString = String.format(Locale.getDefault(), \"%02d\", month);\n String dayOfMonthString = String.format(Locale.getDefault(), \"%02d\", dayOfMonth);\n\n String result = yearString + \".\" + monthString + \".\" + dayOfMonthString;\n return result;\n }",
"public java.lang.String getMaritimeName() {\n\t\treturn _dmHistoryMaritime.getMaritimeName();\n\t}",
"public static void printMonthBody(int year, int month) {\n\n }",
"public static void printMonth(int year, int month) {\n System.out.println(month + \" : \" + year);\n }",
"public Integer getMonth() {\n return month;\n }",
"public Integer getMonth() {\n return month;\n }",
"public String convertCalendarMillisecondsAsLongToMonthNameShort(long fingerprint) {\n\t\t\t\tDateFormat format = new SimpleDateFormat(\"MMM\"); // not \"yyyy-MM-dd HH:mm:ss\"\n\t\t\t\tDate date = new Date(fingerprint);\n\t\t\t\treturn format.format(date);\n\t\t\t}",
"public static String[] getMonths() {\n\t\tString[] months = {\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \n\t\t\t\"July\", \"August\", \"September\", \"October\", \"November\", \"December\"};\n\t\treturn months;\n\t}",
"public static void printTitle(int year, int month) {\n System.out.println(\" Sun Mon Tue Wed Thu Fri Sat\");//output the title for each month of the year\n }",
"public byte getMonth() {\r\n return month;\r\n }",
"public int getMonth() {\r\n return FormatUtils.uint8ToInt(mMonth);\r\n }"
] | [
"0.8254989",
"0.7620193",
"0.75561345",
"0.7435254",
"0.72470117",
"0.7212473",
"0.6941755",
"0.6843429",
"0.68385404",
"0.67864376",
"0.6699276",
"0.6684204",
"0.6645693",
"0.6629166",
"0.66182554",
"0.66053164",
"0.65972406",
"0.6591361",
"0.6586979",
"0.6566746",
"0.6545198",
"0.651068",
"0.64702576",
"0.6451899",
"0.6410763",
"0.6392344",
"0.6349844",
"0.6290034",
"0.6289215",
"0.62694997",
"0.6225828",
"0.62234974",
"0.61746365",
"0.6096586",
"0.6089852",
"0.60648847",
"0.6057888",
"0.6026196",
"0.59874755",
"0.59854954",
"0.5962869",
"0.5957116",
"0.5919177",
"0.58694494",
"0.58641654",
"0.5859551",
"0.58121854",
"0.57788455",
"0.5774839",
"0.5751979",
"0.5737583",
"0.5734017",
"0.57318926",
"0.5717804",
"0.57095814",
"0.5700113",
"0.5691975",
"0.56778634",
"0.56733364",
"0.56655437",
"0.5662582",
"0.5630568",
"0.5629584",
"0.56014144",
"0.5587072",
"0.5569249",
"0.55368537",
"0.5530427",
"0.5528034",
"0.5525013",
"0.5520849",
"0.550585",
"0.5477603",
"0.5472354",
"0.54643726",
"0.5463359",
"0.54610497",
"0.54557675",
"0.54557675",
"0.54526234",
"0.5447272",
"0.54405653",
"0.54369664",
"0.54243976",
"0.54083645",
"0.53666514",
"0.5360294",
"0.53452325",
"0.53432083",
"0.5335438",
"0.53267145",
"0.53264934",
"0.5322802",
"0.5305011",
"0.5305011",
"0.5301623",
"0.52951074",
"0.52897567",
"0.52883047",
"0.5287644"
] | 0.5623856 | 63 |
Returns the formal name of the current month from a gregorian calendar. Month IndexReturn Value 0January 1February 2March 3April 4May 5June 6July 7August 8September 9October 10November 11December | public String getName() {
return name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getMonthName()\r\n {\r\n int mn = theMonthNumber;\r\n if (mn == 1)\r\n {return \"January\";}\r\n else if (mn == 2)\r\n {return \"February\";}\r\n else if (mn == 3)\r\n {return \"March\";}\r\n else if (mn == 4)\r\n {return \"April\";}\r\n else if (mn == 5)\r\n {return \"May\";}\r\n else if (mn == 6)\r\n {return \"June\";}\r\n else if (mn == 7)\r\n {return \"July\";}\r\n else if (mn == 8)\r\n {return \"August\";}\r\n else if (mn == 9)\r\n {return \"September\";}\r\n else if (mn == 10)\r\n {return \"October\";}\r\n else if (mn == 11)\r\n {return \"November\";}\r\n else\r\n {return \"December\";}\r\n }",
"public final String getMonthName() {\n return yearMonthProperty().get().getMonth().getDisplayName(TextStyle.FULL, Locale.getDefault());\n }",
"public String getMonth() {\n return month.getText();\n }",
"public String getMonth(int Month)\n {\n String[] months = {\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"};\n String realMonth = months[Month] + \" \" + i.getYear();\n return realMonth;\n }",
"public String getMonth()\n {\n return Month.get();\n }",
"public static String getMonthNameByNumber(int Month){\n\t\tString MonthName = \"\";\n\t\tif(Month == 1){\n\t\t\tMonthName = \"January\" ;\t\n\t\t}else if(Month == 2){\n\t\t\tMonthName = \"February\";\n\t\t}else if(Month == 3){\n\t\t\tMonthName = \"March\";\n\t\t}else if(Month == 4){\n\t\t\tMonthName = \"April\";\n\t\t}else if(Month == 5){\n\t\t\tMonthName = \"May\";\n\t\t}else if(Month == 6){\n\t\t\tMonthName = \"June\";\n\t\t}else if(Month == 7){\n\t\t\tMonthName = \"July\";\n\t\t}else if(Month == 8){\n\t\t\tMonthName = \"August\";\n\t\t}else if(Month == 9){\n\t\t\tMonthName = \"September\";\n\t\t}else if(Month == 10){\n\t\t\tMonthName = \"October\";\n\t\t}else if(Month == 11){\n\t\t\tMonthName = \"November\";\n\t\t}else if(Month == 12){\n\t\t\tMonthName = \"December\";\n\t\t}\n\t\treturn MonthName;\n\t}",
"private String getMonthName(int month)\n\t{\n\t\tswitch (month)\n\t\t{\n\t\tcase 1:\n\t\t\treturn \"January\";\n\t\tcase 2:\n\t\t\treturn \"February\";\n\t\tcase 3:\n\t\t\treturn \"March\";\n\t\tcase 4:\n\t\t\treturn \"April\";\n\t\tcase 5:\n\t\t\treturn \"May\";\n\t\tcase 6:\n\t\t\treturn \"June\";\n\t\tcase 7:\n\t\t\treturn \"July\";\n\t\tcase 8:\n\t\t\treturn \"August\";\n\t\tcase 9:\n\t\t\treturn \"September\";\n\t\tcase 10:\n\t\t\treturn \"October\";\n\t\tcase 11:\n\t\t\treturn \"November\";\n\t\tcase 12:\n\t\t\treturn \"December\";\n\t\t}\n\t\treturn \"MonthNameFail\";\n\t}",
"public static String getCalendarMonthString(int month)\r\n\t{\r\n\t\tString[] arrMonths = {\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"};\r\n\t\treturn arrMonths[month];\r\n\t}",
"public String convertMonthNumToName(int month) {\n\t\t\t\treturn new DateFormatSymbols().getMonths()[month-1];\n\t\t\t}",
"@Test\n public void Month() {\n System.out.printf(\"%d%n\", Month.FEBRUARY.maxLength());\n\n Month month = Month.AUGUST;\n Locale locale = Locale.getDefault();\n System.out.println(month.getDisplayName(TextStyle.FULL, locale));\n System.out.println(month.getDisplayName(TextStyle.NARROW, locale));\n System.out.println(month.getDisplayName(TextStyle.SHORT, locale));\n }",
"public static String getMonthName(Integer monthNo){\r\n return MONTHS[monthNo-1];\r\n }",
"public String getMonth(int month) {\n\t\treturn new DateFormatSymbols().getMonths()[month-1];\n\t}",
"public String getMonthName(int month){\n\t\t\tString monthname;\n\t\t\tswitch(month){\n\t\t\t\tcase 1:\n\t\t\t\t\tmonthname = \"Enero\";\n\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tmonthname = \"Febrero\";\n\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tmonthname = \"Marzo\";\n\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tmonthname = \"Abril\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tmonthname = \"Mayo\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tmonthname = \"Junio\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\tmonthname = \"Julio\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 8:\n\t\t\t\t\tmonthname = \"Agosto\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 9:\n\t\t\t\t\tmonthname = \"Septiembre\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 10:\n\t\t\t\t\tmonthname = \"Octubre\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 11:\n\t\t\t\t\tmonthname = \"Noviembre\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 12:\n\t\t\t\t\tmonthname = \"Diciembre\";\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\tmonthname = \"No existe ese mes\";\n\t\t\t}\n\t\t\t\treturn monthname;\n\t\t}",
"public static String convertToMonthName(int calendarIndex, Context context) {\n if(calendarIndex == Calendar.JANUARY) {\n return context.getString(R.string.Jan);\n }\n if(calendarIndex == Calendar.FEBRUARY) {\n return context.getString(R.string.Feb);\n }\n if(calendarIndex == Calendar.MARCH) {\n return context.getString(R.string.Mar);\n }\n if(calendarIndex == Calendar.APRIL) {\n return context.getString(R.string.Apr);\n }\n if(calendarIndex == Calendar.MAY) {\n return context.getString(R.string.May);\n }\n if(calendarIndex == Calendar.JUNE) {\n return context.getString(R.string.Jun);\n }\n if(calendarIndex == Calendar.JULY) {\n return context.getString(R.string.Jul);\n }\n if(calendarIndex == Calendar.AUGUST) {\n return context.getString(R.string.Aug);\n }\n if(calendarIndex == Calendar.SEPTEMBER) {\n return context.getString(R.string.Sep);\n }\n if(calendarIndex == Calendar.OCTOBER) {\n return context.getString(R.string.Oct);\n }\n if(calendarIndex == Calendar.NOVEMBER) {\n return context.getString(R.string.Nov);\n }\n if(calendarIndex == Calendar.DECEMBER) {\n return context.getString(R.string.Dec);\n }\n return \"\";\n }",
"public String getMonthName(int monthNumber) {\n String month = \"\";\n switch (monthNumber) {\n case 0:\n month = \"January\";\n break;\n case 1:\n month = \"February\";\n break;\n case 2:\n month = \"March\";\n break;\n case 3:\n month = \"April\";\n break;\n case 4:\n month = \"May\";\n break;\n case 5:\n month = \"June\";\n break;\n case 6:\n month = \"July\";\n break;\n case 7:\n month = \"August\";\n break;\n case 8:\n month = \"September\";\n break;\n case 9:\n month = \"October\";\n break;\n case 10:\n month = \"November\";\n break;\n case 11:\n month = \"December\";\n break;\n default:\n month = \"Invalid Month\";\n break;\n }\n return month;\n }",
"private String getMonth(int i) {\n String month = \"\";\n switch (i) {\n case 0:\n month = \"Jan\";\n break;\n case 1:\n month = \"Feb\";\n break;\n case 2:\n month = \"Mar\";\n break;\n case 3:\n month = \"Apr\";\n break;\n case 4:\n month = \"May\";\n break;\n case 5:\n month = \"Jun\";\n break;\n case 6:\n month = \"Jul\";\n break;\n case 7:\n month = \"Aug\";\n break;\n case 8:\n month = \"Sep\";\n break;\n case 9:\n month = \"Oct\";\n break;\n case 10:\n month = \"Nov\";\n break;\n case 11:\n month = \"Dec\";\n break;\n }\n return month;\n }",
"private String getMonth(Date date) {\n\t\tLocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();\n\n\t\tMonth month = localDate.getMonth();\n\n\t\treturn month.name();\n\t}",
"public String getMonth() {\r\n return month;\r\n }",
"public String getMonth(int month) {\n\t\t\t\treturn new DateFormatSymbols().getMonths()[month];\n\t\t\t}",
"public String getMonth() {\n return month;\n }",
"public static String getGMonth( String month ) {\r\n String ret = null;\r\n ret = \"January\".equals( month ) == true ? \"01\" : ret;\r\n ret = \"February\".equals( month ) == true ? \"02\" : ret;\r\n ret = \"March\".equals( month ) == true ? \"03\" : ret;\r\n ret = \"April\".equals( month ) == true ? \"04\" : ret;\r\n ret = \"May\".equals( month ) == true ? \"05\" : ret;\r\n ret = \"June\".equals( month ) == true ? \"06\" : ret;\r\n ret = \"July\".equals( month ) == true ? \"07\" : ret;\r\n ret = \"August\".equals( month ) == true ? \"08\" : ret;\r\n ret = \"September\".equals( month ) == true ? \"09\" : ret;\r\n ret = \"October\".equals( month ) == true ? \"10\" : ret;\r\n ret = \"November\".equals( month ) == true ? \"11\" : ret;\r\n ret = \"December\".equals( month ) == true ? \"12\" : ret;\r\n return ret;\r\n }",
"public String getMonthAlphabet(int month) {\n\t\treturn new DateFormatSymbols().getShortMonths()[month];\n\t}",
"public String getMonth()\n {\n SimpleDateFormat newDateFormat = new SimpleDateFormat(\"dd/MM\");\n String MySDate = newDateFormat.format(this.dueDate);\n return MySDate;\n }",
"public String getMonth(int month) {\r\n\t\tString str = \"\";\r\n\t\tswitch (month) {\r\n\t\tcase 1:\r\n\t\t\tstr = \"January\";\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tstr = \"February\";\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tstr = \"March\";\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tstr = \"April\";\r\n\t\t\tbreak;\r\n\t\tcase 5:\r\n\t\t\tstr = \"May\";\r\n\t\t\tbreak;\r\n\t\tcase 6:\r\n\t\t\tstr = \"June\";\r\n\t\t\tbreak;\r\n\t\tcase 7:\r\n\t\t\tstr = \"July\";\r\n\t\t\tbreak;\r\n\t\tcase 8:\r\n\t\t\tstr = \"August\";\r\n\t\t\tbreak;\r\n\t\tcase 9:\r\n\t\t\tstr = \"September\";\r\n\t\t\tbreak;\r\n\t\tcase 10:\r\n\t\t\tstr = \"October\";\r\n\t\t\tbreak;\r\n\t\tcase 11:\r\n\t\t\tstr = \"November\";\r\n\t\t\tbreak;\r\n\t\tcase 12:\r\n\t\t\tstr = \"December\";\r\n\t\t}\r\n\t\treturn str;\r\n\t}",
"public static int getCurrentMonth()\n\t{\n\t\treturn Calendar.getInstance().get(Calendar.MONTH) + 1;\n\t}",
"public void printMonth() {\r\n switch (cur.getMonth()){\r\n case 1:\r\n System.out.println(\"JANUARY\");\r\n break;\r\n case 2:\r\n System.out.println(\"FEBRUARY\");\r\n break;\r\n case 3:\r\n System.out.println(\"MARCH\");\r\n break;\r\n case 4:\r\n System.out.println(\"APRIL\");\r\n break;\r\n case 5:\r\n System.out.println(\"MAY\");\r\n break;\r\n case 6:\r\n System.out.println(\"JUNE\");\r\n break;\r\n case 7:\r\n System.out.println(\"JULY\");\r\n break;\r\n case 8:\r\n System.out.println(\"AUGUST\");\r\n break;\r\n case 9:\r\n System.out.println(\"SEPTEMBER\");\r\n break;\r\n case 10:\r\n System.out.println(\"OCTOBER\");\r\n break;\r\n case 11:\r\n System.out.println(\"NOVEMBER\");\r\n break;\r\n case 12:\r\n System.out.println(\"DECEMBER\");\r\n break;\r\n }\r\n }",
"public String getJP_AcctMonth();",
"public java.lang.String getMonth() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: gov.nist.javax.sip.header.SIPDate.getMonth():java.lang.String, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: gov.nist.javax.sip.header.SIPDate.getMonth():java.lang.String\");\n }",
"public String getCurrentDayOfMonthAsString() {\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}",
"public static String[] getMonthNames() {\n if (MONTH_NAMES == null) {\n MONTH_NAMES = new String[12];\n int i = 0;\n for(Month m: Month.values()) {\n MONTH_NAMES[i++] = ProjectSummaryLogic.formatMonthName(m);\n }\n }\n return MONTH_NAMES;\n }",
"@Override\n public String getCurrentMonthAndYear() {\n\n setLogString(\"Get Month and year\", true, CustomLogLevel.HIGH);\n final String currentMonth = getElement(getDriver(), By.className(SAVINGS_MONTH),\n TINY_TIMEOUT).getText();\n setLogString(\"Current Month and Year: \" + currentMonth, true, CustomLogLevel.HIGH);\n return currentMonth.substring(currentMonth.indexOf(\"-\") + 1, currentMonth.length()).trim();\n }",
"public static String monthToString(int month){\r\n\r\n if(month == 1) {return \"jan\"}\r\n else if(month == 2) {return \"feb\"}\r\n else if(month == 3) {return \"mar\"}\r\n else if(month == 4) {return \"apl\"}\r\n else if(month == 5) {return \"may\"}\r\n else if(month == 6) {return \"jun\"}\r\n else if(month == 7) {return \"jul\"}\r\n else if(month == 8) {return \"aug\"}\r\n else if(month == 9) {return \"sep\"}\r\n else if(month == 10) {return \"oct\"}\r\n else if(month == 11) {return \"nov\"}\r\n else if (month == 12) {return \"dec\"}\r\n else {}\r\n return \"broken\";\r\n\r\n}",
"public static void printMonthTitle(int year, int month) {\n\n }",
"public int getMonth() {\n\t\treturn month;\n\t}",
"public String numToMonth(int m)\n {\n return monthsArray[m-1];\n }",
"public final native int getMonth() /*-{\n return this.getMonth();\n }-*/;",
"public static String getMonthTitle(int year, int month) {\n String result = \"\";\n result += \" \" + getMonthName(month) + \" \" + year + \"\\n\";\n result += \"---------------------------------------------\" + \"\\n\";\n result += \" Sun Mon Tue Wed Thu Fri Sat\" + \"\\n\";\n return result;\n }",
"public void enumerators()\n {\n Month birthMonth; //create a variable type called birthMonth\n birthMonth = Month.MAY; //assign a value to birthMonth from the enum defined above\n int ordinalNum = birthMonth.ordinal();\n String getMonth = birthMonth.toString();\n \n if(birthMonth.equals(Month.NOV))\n {\n System.out.println(\"Turkey Month! \");\n }\n else\n {\n System.out.println(\"That's a good month! \");\n }\n System.out.println(birthMonth.valueOf(\"DEC\"));\n \n System.out.println(\"ordinal: \" + ordinalNum);\n \n System.out.println(\"getMonth is: \" + getMonth); //starts at 0\n \n }",
"public int getMonth() {\n\t\treturn date.getMonthValue();\n\t}",
"public int getMonthInteger() \n\t{\n\t\t// 1 will be added here to be able to use this func alone to construct e.g adate\n\t\t// to get the name of the month from getMonth(), 1 must be deducted.\n\t\treturn 1+m_calendar.get(Calendar.MONTH);\n\n\t}",
"public String getYearMonthLabel() {\r\n return yearMonthLabel;\r\n }",
"public int getMonth() {\n\t\treturn month;\n\t}",
"private int getCalendarMonth(String month){\n month = month.toUpperCase();\n if (month.indexOf(\"JAN\") == 0 ) {\n return Calendar.JANUARY;\n } else if (month.indexOf(\"FEB\") == 0) {\n return Calendar.FEBRUARY;\n } else if (month.indexOf(\"MAR\") == 0) {\n return Calendar.MARCH ;\n } else if (month.indexOf(\"APR\") == 0) {\n return Calendar.APRIL;\n } else if (month.indexOf(\"MAY\") == 0) {\n return Calendar.MAY;\n } else if (month.indexOf(\"JUN\") == 0) {\n return Calendar.JUNE;\n } else if (month.indexOf(\"JUL\") == 0) {\n return Calendar.JULY;\n } else if (month.indexOf(\"AUG\") == 0) {\n return Calendar.AUGUST;\n } else if (month.indexOf(\"SEP\") == 0) {\n return Calendar.SEPTEMBER;\n } else if (month.indexOf(\"OCT\") == 0) {\n return Calendar.OCTOBER;\n } else if (month.indexOf(\"NOV\") == 0) {\n return Calendar.NOVEMBER;\n } else if (month.indexOf(\"DEC\") == 0) {\n return Calendar.DECEMBER;\n } else {\n throw new IllegalArgumentException(\"month must be one of {JAN, \" +\n \"FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV ,DEC)\");\n }\n }",
"public String asMonth() {\n \treturn new SimpleDateFormat(\"MM\").format(expiredAfter);\n }",
"public int getMonth(){\n\t\treturn month;\n\t}",
"public int getMonth() {\r\n\t\treturn (this.month);\r\n\t}",
"private String getFullMonthNameFromHeader(String labelname) \r\n\t{\n\t\tString substringgetfirstthree = labelname;\r\n String getactualmonth = substringgetfirstthree.replaceAll(\"[^a-zA-Z]\", \"\").trim();\r\n \r\n return getactualmonth;\t\r\n\t\r\n\t}",
"public String intToMonth(int a)\r\n {\r\n if(a==1)return \"Januray\";\r\n else if(a==2)return \"February\";\r\n else if(a==3)return \"March\";\r\n else if(a==4)return \"April\";\r\n else if(a==5)return \"May\";\r\n else if(a==6)return \"June\";\r\n else if(a==7)return \"July\";\r\n else if(a==8)return \"August\";\r\n else if(a==9)return \"September\";\r\n else if(a==10)return \"October\";\r\n else if(a==11)return \"November\";\r\n else if(a==12)return \"December\";\r\n else return \"\";\r\n }",
"public static String getMonth(int year, int month) {\n return getMonthTitle(year, month) + getMonthBody(year, month);\n }",
"public static int getCurrentMonth(int month) {\n month++;\n return month;\n }",
"public int getMonth() {\n return month;\n }",
"public int getMonth()\n {\n return month;\n }",
"public String convertMonthNameToNumAsString(String name) {\n\t\t String month = null;\n\t\t name = name.substring(0,3);\n\t\t if (name.equals(\"Jan\")) { month = \"01\"; }\n\t\t if (name.equals(\"Feb\")) { month = \"02\"; }\n\t\t if (name.equals(\"Mar\")) { month = \"03\"; }\n\t\t if (name.equals(\"Apr\")) { month = \"04\"; }\n\t\t if (name.equals(\"May\")) { month = \"05\"; }\n\t\t if (name.equals(\"Jun\")) { month = \"06\"; }\n\t\t if (name.equals(\"Jul\")) { month = \"07\"; }\n\t\t if (name.equals(\"Aug\")) { month = \"08\"; }\n\t\t if (name.equals(\"Sep\")) { month = \"09\"; }\n\t\t if (name.equals(\"Oct\")) { month = \"10\"; }\n\t\t if (name.equals(\"Nov\")) { month = \"11\"; }\n\t\t if (name.equals(\"Dec\")) { month = \"12\"; }\n\t\t \treturn month;\n\t\t\t}",
"public String getMonth(String x){\n\n if(x.contains(\"Apr\")){\n return \"April\";\n }\n else if(x.contains(\"Mar\")){\n return \"March\";\n }\n else if(x.contains(\"Jan\")){\n return \"January\";\n }\n else if(x.contains(\"Feb\")){\n return \"February\";\n }\n else if(x.contains(\"May\")){\n return \"May\";\n }\n else if(x.contains(\"Jun\")){\n return \"June\";\n }\n else if(x.contains(\"Jul\")){\n return \"July\";\n }\n else if(x.contains(\"Aug\")){\n return \"August\";\n }\n else if(x.contains(\"Sep\")){\n return \"September\";}\n else if(x.contains(\"Oct\")){\n return \"October\";}\n else if(x.contains(\"Nov\")){\n return \"November\";}\n else{\n return \"December\";}\n }",
"public int getMonth() {\r\n // ersetzt deprecated Methode Date.getMonth()\r\n return this.month;\r\n }",
"public int getMonth() {\n return this.month;\n }",
"public int getMonth() {\n return this.month;\n }",
"public String monthConvert(int month) {\n\t\t\tif (month == 1) return \"Jan\";\r\n\t\t\telse if (month == 2) return \"Feb\";\r\n\t\t\telse if (month == 3) return \"Mar\";\r\n\t\t\telse if (month == 4) return \"Apr\";\r\n\t\t\telse if (month == 5) return \"May\";\r\n\t\t\telse if (month == 6) return \"Jun\";\r\n\t\t\telse if (month == 7) return \"Jul\";\r\n\t\t\telse if (month == 8) return \"Aug\";\r\n\t\t\telse if (month == 9) return \"Sep\";\r\n\t\t\telse if (month == 10) return \"Oct\";\r\n\t\t\telse if (month == 11) return \"Nov\";\r\n\t\t\telse return \"Dec\";\r\n\t\t}",
"private String monthIntToString (int month){\n String mese = \"\";\n Log.d(TAG, \"valore di mese in monthIntToString: \" + month);\n switch (month){\n case 0:\n mese = \"Gennaio\";\n break;\n case 1:\n mese = \"Febbraio\";\n break;\n case 2:\n mese = \"Marzo\";\n break;\n case 3:\n mese = \"Aprile\";\n break;\n case 4:\n mese = \"Maggio\";\n break;\n case 5:\n mese = \"Giugno\";\n break;\n case 6:\n mese = \"Luglio\";\n break;\n case 7:\n mese = \"Agosto\";\n break;\n case 8:\n mese = \"Settembre\";\n break;\n case 9:\n mese = \"Ottobre\";\n break;\n case 10:\n mese = \"Novembre\";\n break;\n case 11:\n mese = \"Dicembre\";\n break;\n }\n Log.d(TAG, \"a fine metodo monthIntToString se mese è \" + month + \" allora siamo nel mese di: \" + mese);\n return mese;\n }",
"private String dayName() {\n int arrayDay = (day + month + year + (year/4) + (year/100) % 4) % 7;\n return dayName[arrayDay];\n }",
"public CopticMonth getMonth() {\n\n return CopticMonth.valueOf(this.cmonth);\n\n }",
"@Override\n public String toString()\n {\n final StringBuilder builder = new StringBuilder();\n builder.append(\"Month[month=\").append(this.month).append(']'); //$NON-NLS-1$\n return builder.toString();\n }",
"public static String getMonthAbbreviated(String date) {\n Date dateDT = parseDate(date);\n\n if (dateDT == null) {\n return null;\n }\n\n // Get current date\n Calendar c = Calendar.getInstance();\n // it is very important to\n // set the date of\n // the calendar.\n c.setTime(dateDT);\n int day = c.get(Calendar.MONTH);\n\n String dayStr = null;\n\n switch (day) {\n\n case Calendar.JANUARY:\n dayStr = \"Jan\";\n break;\n\n case Calendar.FEBRUARY:\n dayStr = \"Feb\";\n break;\n\n case Calendar.MARCH:\n dayStr = \"Mar\";\n break;\n\n case Calendar.APRIL:\n dayStr = \"Apr\";\n break;\n\n case Calendar.MAY:\n dayStr = \"May\";\n break;\n\n case Calendar.JUNE:\n dayStr = \"Jun\";\n break;\n\n case Calendar.JULY:\n dayStr = \"Jul\";\n break;\n\n case Calendar.AUGUST:\n dayStr = \"Aug\";\n break;\n\n case Calendar.SEPTEMBER:\n dayStr = \"Sep\";\n break;\n\n case Calendar.OCTOBER:\n dayStr = \"Oct\";\n break;\n\n case Calendar.NOVEMBER:\n dayStr = \"Nov\";\n break;\n\n case Calendar.DECEMBER:\n dayStr = \"Dec\";\n break;\n }\n\n return dayStr;\n }",
"public int getMonth() {\r\n return FormatUtils.uint8ToInt(mMonth);\r\n }",
"public Integer getMonth() {\r\n return month;\r\n }",
"public String monthName(int month, int minWidth, int maxWidth) {\n\t\tString name = swedishMonths[month-1];\n if (maxWidth < 3) {\n maxWidth = 3;\n }\n if (name.length() > maxWidth) {\n name = name.substring(0, maxWidth);\n }\n while (name.length() < minWidth) {\n name = name + ' ';\n }\n return name;\n\t}",
"private static String getYearMonth() {\n LocalDate oneMonthAgo = LocalDate.now().minusMonths(1);\n return oneMonthAgo.getYear() + String.format(\"%02d\", oneMonthAgo.getMonth().getValue());\n }",
"public byte getMonth() {\r\n return month;\r\n }",
"public String getReportMonth() {\r\n return reportMonth;\r\n }",
"public Integer getMonth() {\n return month;\n }",
"public Integer getMonth() {\n return month;\n }",
"public byte getMonth() {\n return month;\n }",
"public void initNames() {\n DateFormatSymbols dateFormatSymbols = new DateFormatSymbols(locale);\n String[] monthNames = dateFormatSymbols.getMonths();\n if (comboBox.getItemCount() == 12) comboBox.removeAll();\n for (int i = 0; i < 12; i++)\n comboBox.addItem(monthNames[i]);\n comboBox.select(month);\n }",
"public byte getMonth() {\n return month;\n }",
"public byte getMonth() {\n return month;\n }",
"public byte getMonth() {\n return month;\n }",
"public int getMonthInt() {\n return month;\r\n }",
"public static String formatMonthName(Month month) {\n if(month == null) {\n return null;\n }\n\n String m = month.toString();\n return m.substring(0, 1).toUpperCase() + m.substring(1,3).toLowerCase();\n }",
"public byte getMonth() {\n return month;\n }",
"public static int getTodaysMonth() {\t\r\n\t\t\r\n\t\tTime time = new Time();\r\n\t\ttime.setToNow();\r\n\t\treturn time.month + 1;\t\r\n\t\t\r\n\t}",
"public static int getMonthNumber(String monthName) {\r\n switch (monthName) {\r\n case \"Januar\": return 1;\r\n case \"Februar\": return 2;\r\n case \"Mars\": return 3;\r\n case \"April\": return 4;\r\n case \"Mai\": return 5;\r\n case \"Juni\": return 6;\r\n case \"Juli\": return 7;\r\n case \"August\": return 8;\r\n case \"September\": return 9;\r\n case \"Oktober\": return 10;\r\n case \"November\": return 11;\r\n case \"Desember\": return 12;\r\n default: return 0;\r\n }\r\n }",
"public Month getCurrentMonthDetails(){\r\n\t\tString req = \"select sum(amount) as total, case strftime('%m', date('now')) when '01' then 'Janvier' when '02' then 'Fevrier' when '03' then 'Mars' when '04' then 'Avril' when '05' then 'Mai' when '06' then 'Juin' when '07' then 'Juillet' when '08' then 'Aout' when '09' then 'Septembre' when '10' then 'Octobre' when '11' then 'Novembre' when '12' then 'Decembre' else '' end as label \"\r\n\t\t\t\t\t+ \"from fee \"\r\n\t\t\t\t\t+ \"where strftime('%m%Y', date) = strftime('%m%Y', date('now'))\";\r\n\t\tCursor cursor = database.rawQuery(req, null);\t\t\t\t\r\n\t\tif (cursor.moveToFirst()) {\r\n\t\t\tdo {\r\n\t\t\t\treturn new Month(cursor.getString(1), cursor.getString(0));\r\n\t\t\t} while (cursor.moveToNext());\r\n\t\t}\r\n\t\tif (cursor != null && !cursor.isClosed()) {\r\n\t\t\tcursor.close();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public String convertCalendarMillisecondsAsLongToMonthNameShort(long fingerprint) {\n\t\t\t\tDateFormat format = new SimpleDateFormat(\"MMM\"); // not \"yyyy-MM-dd HH:mm:ss\"\n\t\t\t\tDate date = new Date(fingerprint);\n\t\t\t\treturn format.format(date);\n\t\t\t}",
"private String getMonthForInt(int number) {\n int num = number - 1;\n String month = \"Wrong number\";\n String[] months = dfs.getMonths();\n if (num >= 0 && num <= 11) {\n month = months[num];\n } else {\n throw new IllegalArgumentException(\"There is no month with number: \" + number);\n }\n return month;\n }",
"public static LocalDate getFirstOfCurrentMonth() {\n\t\treturn LocalDate.now().with(TemporalAdjusters.firstDayOfMonth());\n\t}",
"public String checkDateMonth(Date aDate){\n if (aDate.getMonth() < 10) {\r\n String newDate = \"0\" + Integer.toString(aDate.getMonth()+1);\r\n \r\n return newDate;\r\n }\r\n return Integer.toString(aDate.getMonth());\r\n \r\n }",
"public String toString(){\n\t\tString result = Integer.toString(day) + \" \";\n\t\tswitch (month){\n\t\t\tcase 1:\n\t\t\t\tresult += \"January, \";\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tresult += \"February, \";\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tresult += \"March, \";\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tresult += \"April, \";\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tresult += \"May, \";\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\tresult += \"June, \";\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\tresult += \"July, \";\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\tresult += \"August, \";\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\tresult += \"September, \";\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\tresult += \"October, \";\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\tresult += \"November, \";\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\tresult += \"December, \";\n\t\t\t\tbreak;\n\t\t}\n\t\tresult += Integer.toString((year / 10 % 10)) + Integer.toString((year % 10));\n\n\t\treturn result;\n\t}",
"private static void printCalendarMonthYear(int month, int year) {\n\t\t// create a new GregorianCalendar object\n\t\tCalendar cal = new GregorianCalendar();\n\t\tint currDate = cal.get(Calendar.DATE);\n\t\t// set its date to the first day of the month/year given by user\n\t\tcal.clear();\n\t\tcal.set(year, month - 1, 1);\n\n\t\t// print calendar header\n\t\tSystem.out.println(\" \" + cal.getDisplayName(Calendar.MONTH, Calendar.LONG, Locale.US) + \" \"\n\t\t\t\t+ cal.get(Calendar.YEAR));\n\n\t\t// obtain the weekday of the first day of month.\n\t\tint firstWeekdayOfMonth = cal.get(Calendar.DAY_OF_WEEK);\n\n\t\t// obtain the number of days in month.\n\t\tint numberOfMonthDays = cal.getActualMaximum(Calendar.DAY_OF_MONTH);\n\n\t\t// print anonymous calendar month based on the weekday of the first\n\t\t// day of the month and the number of days in month:\n\t\tprintCalendar(numberOfMonthDays, firstWeekdayOfMonth, currDate);\n\t}",
"public void print(Calendar cal){\r\n\t\tString month;\r\n\t\tswitch(cal.get(Calendar.MONTH)){\r\n\t\t\tcase 0: month = \"Jan\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 1: month = \"Feb\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2: month = \"Mar\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3: month = \"Apr\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4: month = \"May\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 5: month = \"Jun\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 6: month = \"Jul\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 7: month = \"Aug\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 8: month = \"Sep\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 9: month = \"Oct\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 10: month = \"Nov\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault: month = \"Dec\";\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tSystem.out.print(\" \" + month + \" \" + cal.get(Calendar.DAY_OF_MONTH));\r\n\t}",
"public String cal(Calendar calendar) {\r\n String calendari;\r\n calendari = calendar.get(Calendar.DAY_OF_MONTH) + \"-\" + calendar.get(Calendar.MONTH) + \"-\" + calendar.get(Calendar.YEAR);\r\n return calendari;\r\n }",
"private static void printMonthHeader(int month, int year) {\n System.out.printf(\" %s %d\\n\", monthNames[month - 1], year);\n for (String d : dayNames) {\n System.out.printf(\" %s \", d);\n }\n System.out.println();\n }",
"public static String[] getMonths() {\n\t\tString[] months = {\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \n\t\t\t\"July\", \"August\", \"September\", \"October\", \"November\", \"December\"};\n\t\treturn months;\n\t}",
"public static final String convertMonth(String monthSlashYear) {\r\n \tString[] monthYear = monthSlashYear.split(\"/\");\r\n \tString month = monthYear[0];\r\n \tString year = monthYear[1];\r\n \treturn getEnMonth(month) + \" \" + year;\r\n }",
"public List<String> getMonthList() {\n\t\treturn stateEqualMasterDao.getElementValueList(\"Month_Of_a_Year\");\n\t}",
"private void monthFormat() {\n\t\ttry {\n\t\t\tString currentMonth = monthFormat.format(new Date()); //Get current month\n\t\t\tstartDate = monthFormat.parse(currentMonth); //Parse to first of the month\n\t\t\tString[] splitCurrent = currentMonth.split(\"-\");\n\t\t\tint month = Integer.parseInt(splitCurrent[0]) + 1; //Increase the month\n\t\t\tif (month == 13) { //If moving to next year\n\t\t\t\tint year = Integer.parseInt(splitCurrent[1]) + 1;\n\t\t\t\tendDate = monthFormat.parse(\"01-\" + year);\n\t\t\t} else {\n\t\t\t\tendDate = monthFormat.parse(month + \"-\" + splitCurrent[1]);\n\t\t\t}\n\t\t\t//Create SQL times\n\t\t\tstartDateSQL = new java.sql.Date(startDate.getTime());\n\t\t\tendDateSQL = new java.sql.Date(endDate.getTime());\n\t\t\tmonthString = new SimpleDateFormat(\"MMMM\").format(startDate);\n\t\t} catch (ParseException e) {\n\t\t\t_.log(Level.SEVERE, GameMode.Sonic, \"Failed to parse dates. Monthly leaderboard disabled.\");\n\t\t}\n\t}",
"public static String getMonth(String date) {\n Date dateDT = parseDate(date);\n\n if (dateDT == null) {\n return null;\n }\n\n // Get current date\n Calendar c = Calendar.getInstance();\n // it is very important to\n // set the date of\n // the calendar.\n c.setTime(dateDT);\n int day = c.get(Calendar.MONTH);\n\n String dayStr = null;\n\n switch (day) {\n\n case Calendar.JANUARY:\n dayStr = \"January\";\n break;\n\n case Calendar.FEBRUARY:\n dayStr = \"February\";\n break;\n\n case Calendar.MARCH:\n dayStr = \"March\";\n break;\n\n case Calendar.APRIL:\n dayStr = \"April\";\n break;\n\n case Calendar.MAY:\n dayStr = \"May\";\n break;\n\n case Calendar.JUNE:\n dayStr = \"June\";\n break;\n\n case Calendar.JULY:\n dayStr = \"July\";\n break;\n\n case Calendar.AUGUST:\n dayStr = \"August\";\n break;\n\n case Calendar.SEPTEMBER:\n dayStr = \"September\";\n break;\n\n case Calendar.OCTOBER:\n dayStr = \"October\";\n break;\n\n case Calendar.NOVEMBER:\n dayStr = \"November\";\n break;\n\n case Calendar.DECEMBER:\n dayStr = \"December\";\n break;\n }\n\n return dayStr;\n }",
"public java.math.BigInteger getStartMonth() {\r\n return startMonth;\r\n }",
"@Override\n public int getMonth() {\n return this.deadline.getMonth();\n }",
"public static void printMonth(int year, int month) {\n System.out.println(\" \");\n System.out.println(\" \");\n getMonthName(month,year);\n printTitle(year,month);//call the method printTitle with the values year and month\n printMonthBody(year,month);//call the method printMonthBody with the values year and month\n }",
"public int getMonthValue(){\n\t\treturn monthValue;\n\t}",
"public DateTimeFormatterBuilder appendMonthOfYearText() { \r\n return appendText(DateTimeFieldType.monthOfYear());\r\n }"
] | [
"0.7912883",
"0.7453658",
"0.6990397",
"0.69793636",
"0.6948603",
"0.6916588",
"0.69016576",
"0.6867812",
"0.68150616",
"0.6801028",
"0.6793758",
"0.6783467",
"0.6775553",
"0.6767148",
"0.6749169",
"0.6714487",
"0.6677462",
"0.66760373",
"0.6660554",
"0.6613327",
"0.65808666",
"0.6552897",
"0.6512756",
"0.65031606",
"0.6481754",
"0.64601374",
"0.6442865",
"0.6417762",
"0.63268113",
"0.6297886",
"0.6293483",
"0.6283561",
"0.6262217",
"0.6261611",
"0.6259918",
"0.6259366",
"0.62563676",
"0.62390965",
"0.62366575",
"0.6233279",
"0.6207202",
"0.6205417",
"0.6181051",
"0.61678714",
"0.614959",
"0.61411244",
"0.6138141",
"0.61205196",
"0.61075515",
"0.6079305",
"0.60717064",
"0.60686076",
"0.6044395",
"0.6032018",
"0.6017546",
"0.5981565",
"0.5981565",
"0.59739023",
"0.5972829",
"0.5970673",
"0.59695905",
"0.59654707",
"0.59126973",
"0.5909844",
"0.58681214",
"0.5856056",
"0.5838071",
"0.5822534",
"0.5816987",
"0.5810194",
"0.5810194",
"0.5808408",
"0.57899135",
"0.578034",
"0.578034",
"0.578034",
"0.57738703",
"0.5768628",
"0.5767857",
"0.57468873",
"0.5744709",
"0.57249486",
"0.569882",
"0.56984735",
"0.5687262",
"0.5684581",
"0.56831735",
"0.5673659",
"0.56702137",
"0.5641151",
"0.56370133",
"0.5633006",
"0.56279045",
"0.56145716",
"0.56133604",
"0.5612429",
"0.55980724",
"0.55828387",
"0.55824",
"0.5575869",
"0.55732167"
] | 0.0 | -1 |
Returns the short name of the current month from a gregorian calendar. Month IndexReturn Value 0Jan 1Feb 2Mar 3Apr/td> 4May 5Jun 6Jul 7Aug 8Sep 9Oct 10Nov 11Dec | public String getShortName() {
return shortName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getMonthName()\r\n {\r\n int mn = theMonthNumber;\r\n if (mn == 1)\r\n {return \"January\";}\r\n else if (mn == 2)\r\n {return \"February\";}\r\n else if (mn == 3)\r\n {return \"March\";}\r\n else if (mn == 4)\r\n {return \"April\";}\r\n else if (mn == 5)\r\n {return \"May\";}\r\n else if (mn == 6)\r\n {return \"June\";}\r\n else if (mn == 7)\r\n {return \"July\";}\r\n else if (mn == 8)\r\n {return \"August\";}\r\n else if (mn == 9)\r\n {return \"September\";}\r\n else if (mn == 10)\r\n {return \"October\";}\r\n else if (mn == 11)\r\n {return \"November\";}\r\n else\r\n {return \"December\";}\r\n }",
"public final String getMonthName() {\n return yearMonthProperty().get().getMonth().getDisplayName(TextStyle.FULL, Locale.getDefault());\n }",
"public String getMonth(int Month)\n {\n String[] months = {\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"};\n String realMonth = months[Month] + \" \" + i.getYear();\n return realMonth;\n }",
"public static String getCalendarMonthString(int month)\r\n\t{\r\n\t\tString[] arrMonths = {\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"};\r\n\t\treturn arrMonths[month];\r\n\t}",
"public String getMonth()\n {\n return Month.get();\n }",
"public static String convertToMonthName(int calendarIndex, Context context) {\n if(calendarIndex == Calendar.JANUARY) {\n return context.getString(R.string.Jan);\n }\n if(calendarIndex == Calendar.FEBRUARY) {\n return context.getString(R.string.Feb);\n }\n if(calendarIndex == Calendar.MARCH) {\n return context.getString(R.string.Mar);\n }\n if(calendarIndex == Calendar.APRIL) {\n return context.getString(R.string.Apr);\n }\n if(calendarIndex == Calendar.MAY) {\n return context.getString(R.string.May);\n }\n if(calendarIndex == Calendar.JUNE) {\n return context.getString(R.string.Jun);\n }\n if(calendarIndex == Calendar.JULY) {\n return context.getString(R.string.Jul);\n }\n if(calendarIndex == Calendar.AUGUST) {\n return context.getString(R.string.Aug);\n }\n if(calendarIndex == Calendar.SEPTEMBER) {\n return context.getString(R.string.Sep);\n }\n if(calendarIndex == Calendar.OCTOBER) {\n return context.getString(R.string.Oct);\n }\n if(calendarIndex == Calendar.NOVEMBER) {\n return context.getString(R.string.Nov);\n }\n if(calendarIndex == Calendar.DECEMBER) {\n return context.getString(R.string.Dec);\n }\n return \"\";\n }",
"public String getMonth() {\n return month.getText();\n }",
"public String getMonth(int month) {\n\t\treturn new DateFormatSymbols().getMonths()[month-1];\n\t}",
"public static String getMonthNameByNumber(int Month){\n\t\tString MonthName = \"\";\n\t\tif(Month == 1){\n\t\t\tMonthName = \"January\" ;\t\n\t\t}else if(Month == 2){\n\t\t\tMonthName = \"February\";\n\t\t}else if(Month == 3){\n\t\t\tMonthName = \"March\";\n\t\t}else if(Month == 4){\n\t\t\tMonthName = \"April\";\n\t\t}else if(Month == 5){\n\t\t\tMonthName = \"May\";\n\t\t}else if(Month == 6){\n\t\t\tMonthName = \"June\";\n\t\t}else if(Month == 7){\n\t\t\tMonthName = \"July\";\n\t\t}else if(Month == 8){\n\t\t\tMonthName = \"August\";\n\t\t}else if(Month == 9){\n\t\t\tMonthName = \"September\";\n\t\t}else if(Month == 10){\n\t\t\tMonthName = \"October\";\n\t\t}else if(Month == 11){\n\t\t\tMonthName = \"November\";\n\t\t}else if(Month == 12){\n\t\t\tMonthName = \"December\";\n\t\t}\n\t\treturn MonthName;\n\t}",
"public String getMonth()\n {\n SimpleDateFormat newDateFormat = new SimpleDateFormat(\"dd/MM\");\n String MySDate = newDateFormat.format(this.dueDate);\n return MySDate;\n }",
"public String getMonth(int month) {\n\t\t\t\treturn new DateFormatSymbols().getMonths()[month];\n\t\t\t}",
"private String getMonth(int i) {\n String month = \"\";\n switch (i) {\n case 0:\n month = \"Jan\";\n break;\n case 1:\n month = \"Feb\";\n break;\n case 2:\n month = \"Mar\";\n break;\n case 3:\n month = \"Apr\";\n break;\n case 4:\n month = \"May\";\n break;\n case 5:\n month = \"Jun\";\n break;\n case 6:\n month = \"Jul\";\n break;\n case 7:\n month = \"Aug\";\n break;\n case 8:\n month = \"Sep\";\n break;\n case 9:\n month = \"Oct\";\n break;\n case 10:\n month = \"Nov\";\n break;\n case 11:\n month = \"Dec\";\n break;\n }\n return month;\n }",
"private String getMonth(Date date) {\n\t\tLocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();\n\n\t\tMonth month = localDate.getMonth();\n\n\t\treturn month.name();\n\t}",
"@Test\n public void Month() {\n System.out.printf(\"%d%n\", Month.FEBRUARY.maxLength());\n\n Month month = Month.AUGUST;\n Locale locale = Locale.getDefault();\n System.out.println(month.getDisplayName(TextStyle.FULL, locale));\n System.out.println(month.getDisplayName(TextStyle.NARROW, locale));\n System.out.println(month.getDisplayName(TextStyle.SHORT, locale));\n }",
"private String getMonthName(int month)\n\t{\n\t\tswitch (month)\n\t\t{\n\t\tcase 1:\n\t\t\treturn \"January\";\n\t\tcase 2:\n\t\t\treturn \"February\";\n\t\tcase 3:\n\t\t\treturn \"March\";\n\t\tcase 4:\n\t\t\treturn \"April\";\n\t\tcase 5:\n\t\t\treturn \"May\";\n\t\tcase 6:\n\t\t\treturn \"June\";\n\t\tcase 7:\n\t\t\treturn \"July\";\n\t\tcase 8:\n\t\t\treturn \"August\";\n\t\tcase 9:\n\t\t\treturn \"September\";\n\t\tcase 10:\n\t\t\treturn \"October\";\n\t\tcase 11:\n\t\t\treturn \"November\";\n\t\tcase 12:\n\t\t\treturn \"December\";\n\t\t}\n\t\treturn \"MonthNameFail\";\n\t}",
"public String getMonthAlphabet(int month) {\n\t\treturn new DateFormatSymbols().getShortMonths()[month];\n\t}",
"public static String getGMonth( String month ) {\r\n String ret = null;\r\n ret = \"January\".equals( month ) == true ? \"01\" : ret;\r\n ret = \"February\".equals( month ) == true ? \"02\" : ret;\r\n ret = \"March\".equals( month ) == true ? \"03\" : ret;\r\n ret = \"April\".equals( month ) == true ? \"04\" : ret;\r\n ret = \"May\".equals( month ) == true ? \"05\" : ret;\r\n ret = \"June\".equals( month ) == true ? \"06\" : ret;\r\n ret = \"July\".equals( month ) == true ? \"07\" : ret;\r\n ret = \"August\".equals( month ) == true ? \"08\" : ret;\r\n ret = \"September\".equals( month ) == true ? \"09\" : ret;\r\n ret = \"October\".equals( month ) == true ? \"10\" : ret;\r\n ret = \"November\".equals( month ) == true ? \"11\" : ret;\r\n ret = \"December\".equals( month ) == true ? \"12\" : ret;\r\n return ret;\r\n }",
"public static String getMonthName(Integer monthNo){\r\n return MONTHS[monthNo-1];\r\n }",
"public String getMonth(int month) {\r\n\t\tString str = \"\";\r\n\t\tswitch (month) {\r\n\t\tcase 1:\r\n\t\t\tstr = \"January\";\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tstr = \"February\";\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tstr = \"March\";\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tstr = \"April\";\r\n\t\t\tbreak;\r\n\t\tcase 5:\r\n\t\t\tstr = \"May\";\r\n\t\t\tbreak;\r\n\t\tcase 6:\r\n\t\t\tstr = \"June\";\r\n\t\t\tbreak;\r\n\t\tcase 7:\r\n\t\t\tstr = \"July\";\r\n\t\t\tbreak;\r\n\t\tcase 8:\r\n\t\t\tstr = \"August\";\r\n\t\t\tbreak;\r\n\t\tcase 9:\r\n\t\t\tstr = \"September\";\r\n\t\t\tbreak;\r\n\t\tcase 10:\r\n\t\t\tstr = \"October\";\r\n\t\t\tbreak;\r\n\t\tcase 11:\r\n\t\t\tstr = \"November\";\r\n\t\t\tbreak;\r\n\t\tcase 12:\r\n\t\t\tstr = \"December\";\r\n\t\t}\r\n\t\treturn str;\r\n\t}",
"public String getMonth() {\r\n return month;\r\n }",
"public String getMonthName(int monthNumber) {\n String month = \"\";\n switch (monthNumber) {\n case 0:\n month = \"January\";\n break;\n case 1:\n month = \"February\";\n break;\n case 2:\n month = \"March\";\n break;\n case 3:\n month = \"April\";\n break;\n case 4:\n month = \"May\";\n break;\n case 5:\n month = \"June\";\n break;\n case 6:\n month = \"July\";\n break;\n case 7:\n month = \"August\";\n break;\n case 8:\n month = \"September\";\n break;\n case 9:\n month = \"October\";\n break;\n case 10:\n month = \"November\";\n break;\n case 11:\n month = \"December\";\n break;\n default:\n month = \"Invalid Month\";\n break;\n }\n return month;\n }",
"public String getMonthName(int month){\n\t\t\tString monthname;\n\t\t\tswitch(month){\n\t\t\t\tcase 1:\n\t\t\t\t\tmonthname = \"Enero\";\n\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tmonthname = \"Febrero\";\n\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tmonthname = \"Marzo\";\n\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tmonthname = \"Abril\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tmonthname = \"Mayo\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tmonthname = \"Junio\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\tmonthname = \"Julio\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 8:\n\t\t\t\t\tmonthname = \"Agosto\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 9:\n\t\t\t\t\tmonthname = \"Septiembre\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 10:\n\t\t\t\t\tmonthname = \"Octubre\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 11:\n\t\t\t\t\tmonthname = \"Noviembre\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 12:\n\t\t\t\t\tmonthname = \"Diciembre\";\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\tmonthname = \"No existe ese mes\";\n\t\t\t}\n\t\t\t\treturn monthname;\n\t\t}",
"public String getMonth() {\n return month;\n }",
"public String asMonth() {\n \treturn new SimpleDateFormat(\"MM\").format(expiredAfter);\n }",
"public String convertMonthNumToName(int month) {\n\t\t\t\treturn new DateFormatSymbols().getMonths()[month-1];\n\t\t\t}",
"public static int getCurrentMonth()\n\t{\n\t\treturn Calendar.getInstance().get(Calendar.MONTH) + 1;\n\t}",
"public String getCurrentDayOfMonthAsString() {\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}",
"public java.lang.String getMonth() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: gov.nist.javax.sip.header.SIPDate.getMonth():java.lang.String, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: gov.nist.javax.sip.header.SIPDate.getMonth():java.lang.String\");\n }",
"public String getJP_AcctMonth();",
"public static String monthToString(int month){\r\n\r\n if(month == 1) {return \"jan\"}\r\n else if(month == 2) {return \"feb\"}\r\n else if(month == 3) {return \"mar\"}\r\n else if(month == 4) {return \"apl\"}\r\n else if(month == 5) {return \"may\"}\r\n else if(month == 6) {return \"jun\"}\r\n else if(month == 7) {return \"jul\"}\r\n else if(month == 8) {return \"aug\"}\r\n else if(month == 9) {return \"sep\"}\r\n else if(month == 10) {return \"oct\"}\r\n else if(month == 11) {return \"nov\"}\r\n else if (month == 12) {return \"dec\"}\r\n else {}\r\n return \"broken\";\r\n\r\n}",
"@Override\n public String getCurrentMonthAndYear() {\n\n setLogString(\"Get Month and year\", true, CustomLogLevel.HIGH);\n final String currentMonth = getElement(getDriver(), By.className(SAVINGS_MONTH),\n TINY_TIMEOUT).getText();\n setLogString(\"Current Month and Year: \" + currentMonth, true, CustomLogLevel.HIGH);\n return currentMonth.substring(currentMonth.indexOf(\"-\") + 1, currentMonth.length()).trim();\n }",
"public void printMonth() {\r\n switch (cur.getMonth()){\r\n case 1:\r\n System.out.println(\"JANUARY\");\r\n break;\r\n case 2:\r\n System.out.println(\"FEBRUARY\");\r\n break;\r\n case 3:\r\n System.out.println(\"MARCH\");\r\n break;\r\n case 4:\r\n System.out.println(\"APRIL\");\r\n break;\r\n case 5:\r\n System.out.println(\"MAY\");\r\n break;\r\n case 6:\r\n System.out.println(\"JUNE\");\r\n break;\r\n case 7:\r\n System.out.println(\"JULY\");\r\n break;\r\n case 8:\r\n System.out.println(\"AUGUST\");\r\n break;\r\n case 9:\r\n System.out.println(\"SEPTEMBER\");\r\n break;\r\n case 10:\r\n System.out.println(\"OCTOBER\");\r\n break;\r\n case 11:\r\n System.out.println(\"NOVEMBER\");\r\n break;\r\n case 12:\r\n System.out.println(\"DECEMBER\");\r\n break;\r\n }\r\n }",
"public String monthName(int month, int minWidth, int maxWidth) {\n\t\tString name = swedishMonths[month-1];\n if (maxWidth < 3) {\n maxWidth = 3;\n }\n if (name.length() > maxWidth) {\n name = name.substring(0, maxWidth);\n }\n while (name.length() < minWidth) {\n name = name + ' ';\n }\n return name;\n\t}",
"public String intToMonth(int a)\r\n {\r\n if(a==1)return \"Januray\";\r\n else if(a==2)return \"February\";\r\n else if(a==3)return \"March\";\r\n else if(a==4)return \"April\";\r\n else if(a==5)return \"May\";\r\n else if(a==6)return \"June\";\r\n else if(a==7)return \"July\";\r\n else if(a==8)return \"August\";\r\n else if(a==9)return \"September\";\r\n else if(a==10)return \"October\";\r\n else if(a==11)return \"November\";\r\n else if(a==12)return \"December\";\r\n else return \"\";\r\n }",
"public String convertCalendarMillisecondsAsLongToMonthNameShort(long fingerprint) {\n\t\t\t\tDateFormat format = new SimpleDateFormat(\"MMM\"); // not \"yyyy-MM-dd HH:mm:ss\"\n\t\t\t\tDate date = new Date(fingerprint);\n\t\t\t\treturn format.format(date);\n\t\t\t}",
"public final native int getMonth() /*-{\n return this.getMonth();\n }-*/;",
"public String getYearMonthLabel() {\r\n return yearMonthLabel;\r\n }",
"public static String getMonthAbbreviated(String date) {\n Date dateDT = parseDate(date);\n\n if (dateDT == null) {\n return null;\n }\n\n // Get current date\n Calendar c = Calendar.getInstance();\n // it is very important to\n // set the date of\n // the calendar.\n c.setTime(dateDT);\n int day = c.get(Calendar.MONTH);\n\n String dayStr = null;\n\n switch (day) {\n\n case Calendar.JANUARY:\n dayStr = \"Jan\";\n break;\n\n case Calendar.FEBRUARY:\n dayStr = \"Feb\";\n break;\n\n case Calendar.MARCH:\n dayStr = \"Mar\";\n break;\n\n case Calendar.APRIL:\n dayStr = \"Apr\";\n break;\n\n case Calendar.MAY:\n dayStr = \"May\";\n break;\n\n case Calendar.JUNE:\n dayStr = \"Jun\";\n break;\n\n case Calendar.JULY:\n dayStr = \"Jul\";\n break;\n\n case Calendar.AUGUST:\n dayStr = \"Aug\";\n break;\n\n case Calendar.SEPTEMBER:\n dayStr = \"Sep\";\n break;\n\n case Calendar.OCTOBER:\n dayStr = \"Oct\";\n break;\n\n case Calendar.NOVEMBER:\n dayStr = \"Nov\";\n break;\n\n case Calendar.DECEMBER:\n dayStr = \"Dec\";\n break;\n }\n\n return dayStr;\n }",
"public static String getMonthTitle(int year, int month) {\n String result = \"\";\n result += \" \" + getMonthName(month) + \" \" + year + \"\\n\";\n result += \"---------------------------------------------\" + \"\\n\";\n result += \" Sun Mon Tue Wed Thu Fri Sat\" + \"\\n\";\n return result;\n }",
"public int getMonth() {\n\t\treturn month;\n\t}",
"public static String getMonth(int year, int month) {\n return getMonthTitle(year, month) + getMonthBody(year, month);\n }",
"public String monthConvert(int month) {\n\t\t\tif (month == 1) return \"Jan\";\r\n\t\t\telse if (month == 2) return \"Feb\";\r\n\t\t\telse if (month == 3) return \"Mar\";\r\n\t\t\telse if (month == 4) return \"Apr\";\r\n\t\t\telse if (month == 5) return \"May\";\r\n\t\t\telse if (month == 6) return \"Jun\";\r\n\t\t\telse if (month == 7) return \"Jul\";\r\n\t\t\telse if (month == 8) return \"Aug\";\r\n\t\t\telse if (month == 9) return \"Sep\";\r\n\t\t\telse if (month == 10) return \"Oct\";\r\n\t\t\telse if (month == 11) return \"Nov\";\r\n\t\t\telse return \"Dec\";\r\n\t\t}",
"public DateTimeFormatterBuilder appendMonthOfYearShortText() {\r\n return appendShortText(DateTimeFieldType.monthOfYear());\r\n }",
"public String numToMonth(int m)\n {\n return monthsArray[m-1];\n }",
"private static String getYearMonth() {\n LocalDate oneMonthAgo = LocalDate.now().minusMonths(1);\n return oneMonthAgo.getYear() + String.format(\"%02d\", oneMonthAgo.getMonth().getValue());\n }",
"public static void printMonthTitle(int year, int month) {\n\n }",
"public int getMonth() {\r\n // ersetzt deprecated Methode Date.getMonth()\r\n return this.month;\r\n }",
"public int getMonth() {\n\t\treturn date.getMonthValue();\n\t}",
"public String getMonth(String x){\n\n if(x.contains(\"Apr\")){\n return \"April\";\n }\n else if(x.contains(\"Mar\")){\n return \"March\";\n }\n else if(x.contains(\"Jan\")){\n return \"January\";\n }\n else if(x.contains(\"Feb\")){\n return \"February\";\n }\n else if(x.contains(\"May\")){\n return \"May\";\n }\n else if(x.contains(\"Jun\")){\n return \"June\";\n }\n else if(x.contains(\"Jul\")){\n return \"July\";\n }\n else if(x.contains(\"Aug\")){\n return \"August\";\n }\n else if(x.contains(\"Sep\")){\n return \"September\";}\n else if(x.contains(\"Oct\")){\n return \"October\";}\n else if(x.contains(\"Nov\")){\n return \"November\";}\n else{\n return \"December\";}\n }",
"public int getMonth() {\n\t\treturn month;\n\t}",
"public CopticMonth getMonth() {\n\n return CopticMonth.valueOf(this.cmonth);\n\n }",
"private String getFullMonthNameFromHeader(String labelname) \r\n\t{\n\t\tString substringgetfirstthree = labelname;\r\n String getactualmonth = substringgetfirstthree.replaceAll(\"[^a-zA-Z]\", \"\").trim();\r\n \r\n return getactualmonth;\t\r\n\t\r\n\t}",
"public static String[] getMonthNames() {\n if (MONTH_NAMES == null) {\n MONTH_NAMES = new String[12];\n int i = 0;\n for(Month m: Month.values()) {\n MONTH_NAMES[i++] = ProjectSummaryLogic.formatMonthName(m);\n }\n }\n return MONTH_NAMES;\n }",
"public int getMonth(){\n\t\treturn month;\n\t}",
"private String monthIntToString (int month){\n String mese = \"\";\n Log.d(TAG, \"valore di mese in monthIntToString: \" + month);\n switch (month){\n case 0:\n mese = \"Gennaio\";\n break;\n case 1:\n mese = \"Febbraio\";\n break;\n case 2:\n mese = \"Marzo\";\n break;\n case 3:\n mese = \"Aprile\";\n break;\n case 4:\n mese = \"Maggio\";\n break;\n case 5:\n mese = \"Giugno\";\n break;\n case 6:\n mese = \"Luglio\";\n break;\n case 7:\n mese = \"Agosto\";\n break;\n case 8:\n mese = \"Settembre\";\n break;\n case 9:\n mese = \"Ottobre\";\n break;\n case 10:\n mese = \"Novembre\";\n break;\n case 11:\n mese = \"Dicembre\";\n break;\n }\n Log.d(TAG, \"a fine metodo monthIntToString se mese è \" + month + \" allora siamo nel mese di: \" + mese);\n return mese;\n }",
"public int getMonth() {\r\n\t\treturn (this.month);\r\n\t}",
"private int getCalendarMonth(String month){\n month = month.toUpperCase();\n if (month.indexOf(\"JAN\") == 0 ) {\n return Calendar.JANUARY;\n } else if (month.indexOf(\"FEB\") == 0) {\n return Calendar.FEBRUARY;\n } else if (month.indexOf(\"MAR\") == 0) {\n return Calendar.MARCH ;\n } else if (month.indexOf(\"APR\") == 0) {\n return Calendar.APRIL;\n } else if (month.indexOf(\"MAY\") == 0) {\n return Calendar.MAY;\n } else if (month.indexOf(\"JUN\") == 0) {\n return Calendar.JUNE;\n } else if (month.indexOf(\"JUL\") == 0) {\n return Calendar.JULY;\n } else if (month.indexOf(\"AUG\") == 0) {\n return Calendar.AUGUST;\n } else if (month.indexOf(\"SEP\") == 0) {\n return Calendar.SEPTEMBER;\n } else if (month.indexOf(\"OCT\") == 0) {\n return Calendar.OCTOBER;\n } else if (month.indexOf(\"NOV\") == 0) {\n return Calendar.NOVEMBER;\n } else if (month.indexOf(\"DEC\") == 0) {\n return Calendar.DECEMBER;\n } else {\n throw new IllegalArgumentException(\"month must be one of {JAN, \" +\n \"FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV ,DEC)\");\n }\n }",
"public int getMonth() {\n return month;\n }",
"public static int getCurrentMonth(int month) {\n month++;\n return month;\n }",
"public int getMonth()\n {\n return month;\n }",
"public int getMonthInteger() \n\t{\n\t\t// 1 will be added here to be able to use this func alone to construct e.g adate\n\t\t// to get the name of the month from getMonth(), 1 must be deducted.\n\t\treturn 1+m_calendar.get(Calendar.MONTH);\n\n\t}",
"public String checkDateMonth(Date aDate){\n if (aDate.getMonth() < 10) {\r\n String newDate = \"0\" + Integer.toString(aDate.getMonth()+1);\r\n \r\n return newDate;\r\n }\r\n return Integer.toString(aDate.getMonth());\r\n \r\n }",
"public static int getTodaysMonth() {\t\r\n\t\t\r\n\t\tTime time = new Time();\r\n\t\ttime.setToNow();\r\n\t\treturn time.month + 1;\t\r\n\t\t\r\n\t}",
"public int getMonth() {\n return this.month;\n }",
"public int getMonth() {\n return this.month;\n }",
"@Override\n public String toString()\n {\n final StringBuilder builder = new StringBuilder();\n builder.append(\"Month[month=\").append(this.month).append(']'); //$NON-NLS-1$\n return builder.toString();\n }",
"public int getMonth() {\r\n return FormatUtils.uint8ToInt(mMonth);\r\n }",
"private void monthFormat() {\n\t\ttry {\n\t\t\tString currentMonth = monthFormat.format(new Date()); //Get current month\n\t\t\tstartDate = monthFormat.parse(currentMonth); //Parse to first of the month\n\t\t\tString[] splitCurrent = currentMonth.split(\"-\");\n\t\t\tint month = Integer.parseInt(splitCurrent[0]) + 1; //Increase the month\n\t\t\tif (month == 13) { //If moving to next year\n\t\t\t\tint year = Integer.parseInt(splitCurrent[1]) + 1;\n\t\t\t\tendDate = monthFormat.parse(\"01-\" + year);\n\t\t\t} else {\n\t\t\t\tendDate = monthFormat.parse(month + \"-\" + splitCurrent[1]);\n\t\t\t}\n\t\t\t//Create SQL times\n\t\t\tstartDateSQL = new java.sql.Date(startDate.getTime());\n\t\t\tendDateSQL = new java.sql.Date(endDate.getTime());\n\t\t\tmonthString = new SimpleDateFormat(\"MMMM\").format(startDate);\n\t\t} catch (ParseException e) {\n\t\t\t_.log(Level.SEVERE, GameMode.Sonic, \"Failed to parse dates. Monthly leaderboard disabled.\");\n\t\t}\n\t}",
"private String dayName() {\n int arrayDay = (day + month + year + (year/4) + (year/100) % 4) % 7;\n return dayName[arrayDay];\n }",
"public static String getMonth(String date) {\n Date dateDT = parseDate(date);\n\n if (dateDT == null) {\n return null;\n }\n\n // Get current date\n Calendar c = Calendar.getInstance();\n // it is very important to\n // set the date of\n // the calendar.\n c.setTime(dateDT);\n int day = c.get(Calendar.MONTH);\n\n String dayStr = null;\n\n switch (day) {\n\n case Calendar.JANUARY:\n dayStr = \"January\";\n break;\n\n case Calendar.FEBRUARY:\n dayStr = \"February\";\n break;\n\n case Calendar.MARCH:\n dayStr = \"March\";\n break;\n\n case Calendar.APRIL:\n dayStr = \"April\";\n break;\n\n case Calendar.MAY:\n dayStr = \"May\";\n break;\n\n case Calendar.JUNE:\n dayStr = \"June\";\n break;\n\n case Calendar.JULY:\n dayStr = \"July\";\n break;\n\n case Calendar.AUGUST:\n dayStr = \"August\";\n break;\n\n case Calendar.SEPTEMBER:\n dayStr = \"September\";\n break;\n\n case Calendar.OCTOBER:\n dayStr = \"October\";\n break;\n\n case Calendar.NOVEMBER:\n dayStr = \"November\";\n break;\n\n case Calendar.DECEMBER:\n dayStr = \"December\";\n break;\n }\n\n return dayStr;\n }",
"public static String formatMonth(String time) {\n Date tempTime = DateUtils.parseStringToDateYYMMDD(time);\n DateFormat format = new SimpleDateFormat(MONTH);\n return format.format(tempTime);\n }",
"public String toString(){\n\t\tString result = Integer.toString(day) + \" \";\n\t\tswitch (month){\n\t\t\tcase 1:\n\t\t\t\tresult += \"January, \";\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tresult += \"February, \";\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tresult += \"March, \";\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tresult += \"April, \";\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tresult += \"May, \";\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\tresult += \"June, \";\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\tresult += \"July, \";\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\tresult += \"August, \";\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\tresult += \"September, \";\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\tresult += \"October, \";\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\tresult += \"November, \";\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\tresult += \"December, \";\n\t\t\t\tbreak;\n\t\t}\n\t\tresult += Integer.toString((year / 10 % 10)) + Integer.toString((year % 10));\n\n\t\treturn result;\n\t}",
"public Integer getMonth() {\r\n return month;\r\n }",
"public String convertMonthNameToNumAsString(String name) {\n\t\t String month = null;\n\t\t name = name.substring(0,3);\n\t\t if (name.equals(\"Jan\")) { month = \"01\"; }\n\t\t if (name.equals(\"Feb\")) { month = \"02\"; }\n\t\t if (name.equals(\"Mar\")) { month = \"03\"; }\n\t\t if (name.equals(\"Apr\")) { month = \"04\"; }\n\t\t if (name.equals(\"May\")) { month = \"05\"; }\n\t\t if (name.equals(\"Jun\")) { month = \"06\"; }\n\t\t if (name.equals(\"Jul\")) { month = \"07\"; }\n\t\t if (name.equals(\"Aug\")) { month = \"08\"; }\n\t\t if (name.equals(\"Sep\")) { month = \"09\"; }\n\t\t if (name.equals(\"Oct\")) { month = \"10\"; }\n\t\t if (name.equals(\"Nov\")) { month = \"11\"; }\n\t\t if (name.equals(\"Dec\")) { month = \"12\"; }\n\t\t \treturn month;\n\t\t\t}",
"public Integer getMonth() {\n return month;\n }",
"public Integer getMonth() {\n return month;\n }",
"public String getReportMonth() {\r\n return reportMonth;\r\n }",
"public static final String convertMonth(String monthSlashYear) {\r\n \tString[] monthYear = monthSlashYear.split(\"/\");\r\n \tString month = monthYear[0];\r\n \tString year = monthYear[1];\r\n \treturn getEnMonth(month) + \" \" + year;\r\n }",
"@Test\n public void test_getMonth_by_short_string() throws AppException {\n assertEquals(getMonth(\"DEC\"),12);\n assertEquals(getMonth(\"feb\"),2);\n assertEquals(getMonth(\"SeP\"),9);\n assertEquals(getMonth(\"Jan\"),1);\n }",
"public byte getMonth() {\r\n return month;\r\n }",
"public byte getMonth() {\n return month;\n }",
"public DateTimeFormatterBuilder appendMonthOfYearText() { \r\n return appendText(DateTimeFieldType.monthOfYear());\r\n }",
"public static List<String> getListOfMonthsShort(){\r\n\t\t\r\n\t\tList<String> months = new ArrayList<String>();\r\n\t\tmonths.add(\"Jan\"); months.add(\"Feb\"); months.add(\"Mar\"); months.add(\"Apr\");\r\n\t\tmonths.add(\"May\"); months.add(\"Jun\"); months.add(\"Jul\"); months.add(\"Aug\");\r\n\t\tmonths.add(\"Sep\"); months.add(\"Oct\"); months.add(\"Nov\"); months.add(\"Dec\");\r\n\t\treturn months;\r\n\t\t\r\n\t}",
"public int getMonthInt() {\n return month;\r\n }",
"public byte getMonth() {\n return month;\n }",
"public byte getMonth() {\n return month;\n }",
"public byte getMonth() {\n return month;\n }",
"public byte getMonth() {\n return month;\n }",
"public Month getCurrentMonthDetails(){\r\n\t\tString req = \"select sum(amount) as total, case strftime('%m', date('now')) when '01' then 'Janvier' when '02' then 'Fevrier' when '03' then 'Mars' when '04' then 'Avril' when '05' then 'Mai' when '06' then 'Juin' when '07' then 'Juillet' when '08' then 'Aout' when '09' then 'Septembre' when '10' then 'Octobre' when '11' then 'Novembre' when '12' then 'Decembre' else '' end as label \"\r\n\t\t\t\t\t+ \"from fee \"\r\n\t\t\t\t\t+ \"where strftime('%m%Y', date) = strftime('%m%Y', date('now'))\";\r\n\t\tCursor cursor = database.rawQuery(req, null);\t\t\t\t\r\n\t\tif (cursor.moveToFirst()) {\r\n\t\t\tdo {\r\n\t\t\t\treturn new Month(cursor.getString(1), cursor.getString(0));\r\n\t\t\t} while (cursor.moveToNext());\r\n\t\t}\r\n\t\tif (cursor != null && !cursor.isClosed()) {\r\n\t\t\tcursor.close();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public static String dateDisplay(Calendar cal) {\n\t\tLONGDAYS[] arrayOfDays = LONGDAYS.values();\n\t\tString toReturn = cal.get(Calendar.MONTH)+1 + \"/\" + cal.get(Calendar.DAY_OF_MONTH);\n\t\ttoReturn = arrayOfDays[cal.get(Calendar.DAY_OF_WEEK)-1] + \" \" + toReturn;\n\t\treturn toReturn;\n\t}",
"public static String formatMonthName(Month month) {\n if(month == null) {\n return null;\n }\n\n String m = month.toString();\n return m.substring(0, 1).toUpperCase() + m.substring(1,3).toLowerCase();\n }",
"public void print(Calendar cal){\r\n\t\tString month;\r\n\t\tswitch(cal.get(Calendar.MONTH)){\r\n\t\t\tcase 0: month = \"Jan\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 1: month = \"Feb\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2: month = \"Mar\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3: month = \"Apr\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4: month = \"May\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 5: month = \"Jun\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 6: month = \"Jul\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 7: month = \"Aug\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 8: month = \"Sep\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 9: month = \"Oct\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase 10: month = \"Nov\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault: month = \"Dec\";\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tSystem.out.print(\" \" + month + \" \" + cal.get(Calendar.DAY_OF_MONTH));\r\n\t}",
"private String getMonthForInt(int number) {\n int num = number - 1;\n String month = \"Wrong number\";\n String[] months = dfs.getMonths();\n if (num >= 0 && num <= 11) {\n month = months[num];\n } else {\n throw new IllegalArgumentException(\"There is no month with number: \" + number);\n }\n return month;\n }",
"public void enumerators()\n {\n Month birthMonth; //create a variable type called birthMonth\n birthMonth = Month.MAY; //assign a value to birthMonth from the enum defined above\n int ordinalNum = birthMonth.ordinal();\n String getMonth = birthMonth.toString();\n \n if(birthMonth.equals(Month.NOV))\n {\n System.out.println(\"Turkey Month! \");\n }\n else\n {\n System.out.println(\"That's a good month! \");\n }\n System.out.println(birthMonth.valueOf(\"DEC\"));\n \n System.out.println(\"ordinal: \" + ordinalNum);\n \n System.out.println(\"getMonth is: \" + getMonth); //starts at 0\n \n }",
"public static String[] getMonths() {\n\t\tString[] months = {\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \n\t\t\t\"July\", \"August\", \"September\", \"October\", \"November\", \"December\"};\n\t\treturn months;\n\t}",
"public String getCurrentDay() {\n Calendar calendar = Calendar.getInstance(TimeZone.getDefault());\n //Get Current Day as a number\n int todayInt = calendar.get(Calendar.DAY_OF_MONTH);\n\n //Integer to String Conversion\n String todayStr = Integer.toString(todayInt);\n\n return todayStr;\n }",
"public String convertCalendarMillisecondsAsLongToMonthNumAsString(long fingerprint) {\n\t\t\t\tDateFormat format = new SimpleDateFormat(\"MM\"); // not \"yyyy-MM-dd HH:mm:ss\"\n\t\t\t\tDate date = new Date(fingerprint);\n\t\t\t\treturn format.format(date);\n\t\t\t}",
"public static void main(String[] args) {\n System.out.println(DateUtils.addMonths(new Date(), 1).getMonth());\n System.out.println(Calendar.getInstance().getDisplayName((Calendar.MONTH)+1, Calendar.LONG, Locale.getDefault()));\n System.out.println(LocalDate.now().plusMonths(1).getMonth());\n\t}",
"public String toString(){\n\t\t\n\t\treturn month+\"/\"+day+\"/\"+year;\n\t}",
"private String getDate(Calendar c) {\n\t\t\n\t\tStringBuffer sb = new StringBuffer();\n\t\t\n\t\tsb.append(EventHelper.getMonth(c));\n\t\tsb.append(\" \");\n\t\tsb.append(EventHelper.getDate(c));\n\t\t\n\t\treturn sb.toString();\n\t\t\n\t}",
"public java.math.BigInteger getStartMonth() {\r\n return startMonth;\r\n }"
] | [
"0.777555",
"0.72747743",
"0.69671273",
"0.6956956",
"0.6903955",
"0.68560356",
"0.6816727",
"0.6809455",
"0.67656064",
"0.67646074",
"0.6738682",
"0.6719289",
"0.6708304",
"0.6707328",
"0.670347",
"0.6669604",
"0.6652994",
"0.6634735",
"0.6627346",
"0.66268986",
"0.66216475",
"0.6579792",
"0.6578441",
"0.65633744",
"0.6548733",
"0.6501245",
"0.64961183",
"0.645084",
"0.64418733",
"0.64086187",
"0.6388339",
"0.6348377",
"0.6326119",
"0.6312217",
"0.6244288",
"0.624224",
"0.6232456",
"0.62216747",
"0.6200606",
"0.6190745",
"0.6189881",
"0.618483",
"0.61834854",
"0.61732113",
"0.6162591",
"0.6161545",
"0.61520374",
"0.6149662",
"0.61300397",
"0.6114813",
"0.60972583",
"0.60968614",
"0.6087092",
"0.6078036",
"0.60559964",
"0.60392195",
"0.60318536",
"0.60129166",
"0.60080904",
"0.5996517",
"0.59460557",
"0.59153205",
"0.59018713",
"0.58966315",
"0.58966315",
"0.58945775",
"0.5876247",
"0.58395475",
"0.58275986",
"0.58188874",
"0.581705",
"0.58069557",
"0.5784376",
"0.5768694",
"0.573832",
"0.573832",
"0.5734416",
"0.5730423",
"0.57259846",
"0.57199526",
"0.5718311",
"0.57105994",
"0.57045317",
"0.5703947",
"0.5688365",
"0.5688365",
"0.5688365",
"0.5685262",
"0.56827676",
"0.56722564",
"0.56709754",
"0.56527424",
"0.56496376",
"0.5640482",
"0.5620818",
"0.5593085",
"0.5529844",
"0.55296385",
"0.5500349",
"0.54949665",
"0.54904103"
] | 0.0 | -1 |
Returns the zero based index of the current month within a gregorian calendar. MonthReturn Value January0 February1 March2 April3 May4 June5 July6 August7 September8 October9 November10 December11 | public int getValue() {
return value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int getCurrentMonth()\n\t{\n\t\treturn Calendar.getInstance().get(Calendar.MONTH) + 1;\n\t}",
"public static int getCurrentMonth(int month) {\n month++;\n return month;\n }",
"public int getMonthInteger() \n\t{\n\t\t// 1 will be added here to be able to use this func alone to construct e.g adate\n\t\t// to get the name of the month from getMonth(), 1 must be deducted.\n\t\treturn 1+m_calendar.get(Calendar.MONTH);\n\n\t}",
"public static int getTodaysMonth() {\t\r\n\t\t\r\n\t\tTime time = new Time();\r\n\t\ttime.setToNow();\r\n\t\treturn time.month + 1;\t\r\n\t\t\r\n\t}",
"static private int getMonthIndex(String month) throws IllegalArgumentException {\n\t\tfor (int i = 0; i < Data.MESI.length; i++ ) {\n\t\t\tif ( month.equalsIgnoreCase(Data.MESI[i]) ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\tthrow new IllegalArgumentException(\"'\" + month + \"' is a month name\");\n\t}",
"public int getMonthIndex(String month){\n DateFormatSymbols dateFormat = new DateFormatSymbols();\n String[] months = dateFormat.getMonths();\n final String[] spliceMonths = Arrays.copyOfRange(months, 0, 12);\n\n for(int i = 0; i < spliceMonths.length; i++)\n if(month.equals(spliceMonths[i]))\n return i;\n return 0;\n }",
"public int getMonth() {\n\t\treturn month;\n\t}",
"private int getCalendarMonth(String month){\n month = month.toUpperCase();\n if (month.indexOf(\"JAN\") == 0 ) {\n return Calendar.JANUARY;\n } else if (month.indexOf(\"FEB\") == 0) {\n return Calendar.FEBRUARY;\n } else if (month.indexOf(\"MAR\") == 0) {\n return Calendar.MARCH ;\n } else if (month.indexOf(\"APR\") == 0) {\n return Calendar.APRIL;\n } else if (month.indexOf(\"MAY\") == 0) {\n return Calendar.MAY;\n } else if (month.indexOf(\"JUN\") == 0) {\n return Calendar.JUNE;\n } else if (month.indexOf(\"JUL\") == 0) {\n return Calendar.JULY;\n } else if (month.indexOf(\"AUG\") == 0) {\n return Calendar.AUGUST;\n } else if (month.indexOf(\"SEP\") == 0) {\n return Calendar.SEPTEMBER;\n } else if (month.indexOf(\"OCT\") == 0) {\n return Calendar.OCTOBER;\n } else if (month.indexOf(\"NOV\") == 0) {\n return Calendar.NOVEMBER;\n } else if (month.indexOf(\"DEC\") == 0) {\n return Calendar.DECEMBER;\n } else {\n throw new IllegalArgumentException(\"month must be one of {JAN, \" +\n \"FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV ,DEC)\");\n }\n }",
"public int getMonthInt() {\n return month;\r\n }",
"public final native int getMonth() /*-{\n return this.getMonth();\n }-*/;",
"public int getMonth(){\n\t\treturn month;\n\t}",
"public int getMonth() {\r\n return FormatUtils.uint8ToInt(mMonth);\r\n }",
"public int getMonth() {\n\t\treturn month;\n\t}",
"public int getMonth() {\r\n\t\treturn (this.month);\r\n\t}",
"public int getMonth() {\n return month;\n }",
"public int getCurrentDayOfMonthAsNum() {\n\t\t\t\tint dayOfMonth = Calendar.getInstance().get(Calendar.DAY_OF_MONTH);\n\t\t\t\treturn dayOfMonth;\n\t\t\t}",
"public int getMonth() {\n\t\treturn date.getMonthValue();\n\t}",
"public int getMonth()\n {\n return month;\n }",
"public int getMonthValue(){\n\t\treturn monthValue;\n\t}",
"public Integer getMonth() {\r\n return month;\r\n }",
"public Calendar startOfMonth() {\r\n\t\t\r\n\t\tCalendar c2 = Calendar.getInstance(baseCalendar.getTimeZone());\r\n\t\tc2.clear();\r\n\t\tc2.set(baseCalendar.get(Calendar.YEAR), \r\n\t\t\t\tbaseCalendar.get(Calendar.MONTH), 1);\r\n\t\treturn c2;\r\n\t}",
"public int getMonth() {\n return this.month;\n }",
"public int getMonth() {\n return this.month;\n }",
"public Integer getMonth() {\n return month;\n }",
"public Integer getMonth() {\n return month;\n }",
"int calDateMonth(int mC,int yC,int mG,int yG){//(current-month, current-year, goal-month, goal-year)\n int x = 0,i,countM=0;\n if(yC<=yG){\n for(i = yC; i < yG; i++)\n countM += 12;\n }\n\n countM -= mC;\n countM += mG;\n return (countM);\n }",
"public int dayOfMonth() {\r\n\t\treturn mC.get(Calendar.DAY_OF_MONTH);\r\n\t}",
"public int getStartMonth()\n\t{\n\t\treturn this.mStartMonth;\n\t}",
"public int getMonth() {\r\n // ersetzt deprecated Methode Date.getMonth()\r\n return this.month;\r\n }",
"public String getMonth(int Month)\n {\n String[] months = {\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"};\n String realMonth = months[Month] + \" \" + i.getYear();\n return realMonth;\n }",
"public static int getMonthNumber(String monthName) {\r\n switch (monthName) {\r\n case \"Januar\": return 1;\r\n case \"Februar\": return 2;\r\n case \"Mars\": return 3;\r\n case \"April\": return 4;\r\n case \"Mai\": return 5;\r\n case \"Juni\": return 6;\r\n case \"Juli\": return 7;\r\n case \"August\": return 8;\r\n case \"September\": return 9;\r\n case \"Oktober\": return 10;\r\n case \"November\": return 11;\r\n case \"Desember\": return 12;\r\n default: return 0;\r\n }\r\n }",
"public int getMonthDate()\n\t{\n\t\tif (m_nType == AT_MONTH_DATE)\n\t\t\treturn ((Integer)m_oData).intValue();\n\t\telse\n\t\t\treturn -1;\n\t}",
"public int getDayOfMonth() \n\t{\n\t\tint dayofmonth = m_calendar.get(Calendar.DAY_OF_MONTH);\n\t\treturn dayofmonth;\n\n\t}",
"public String numToMonth(int m)\n {\n return monthsArray[m-1];\n }",
"private static int monthNum(String month) {\n switch (month) {\n case \"1\": case \"january\": return 1;\n case \"2\": case \"february\": return 2;\n case \"3\": case \"march\": return 3;\n case \"4\": case \"april\": return 4;\n case \"5\": case \"may\": return 5;\n case \"6\": case \"june\": return 6;\n case \"7\": case \"july\": return 7;\n case \"8\": case \"august\": return 8;\n case \"9\": case \"september\": return 9;\n case \"10\": case \"october\": return 10;\n case \"11\": case \"november\": return 11;\n case \"12\": case \"december\": return 12;\n }\n\n return 0; // default\n }",
"public final native int getUTCMonth() /*-{\n return this.getUTCMonth();\n }-*/;",
"public String getMonth()\n {\n return Month.get();\n }",
"public int getDayOfMonth();",
"public int getDayOfMonth() {\n return _calendar.get(Calendar.DAY_OF_MONTH);\n }",
"public byte getMonth() {\n return month;\n }",
"public byte getMonth() {\n return month;\n }",
"public byte getMonth() {\n return month;\n }",
"public byte getMonth() {\n return month;\n }",
"public String getMonth(int month) {\n\t\treturn new DateFormatSymbols().getMonths()[month-1];\n\t}",
"public CopticMonth getMonth() {\n\n return CopticMonth.valueOf(this.cmonth);\n\n }",
"public byte getMonth() {\r\n return month;\r\n }",
"public java.math.BigInteger getStartMonth() {\r\n return startMonth;\r\n }",
"private MonthCellWithMonthIndex getMonthCellWithIndexByDate(Date date) {\n\t\tint index = 0;\n\t\tCalendar searchCal = Calendar.getInstance(locale);\n\t\tsearchCal.setTime(date);\n\t\tCalendar actCal = Calendar.getInstance(locale);\n\n\t\tfor (List<List<MonthCellDescriptor>> monthCells : cells) {\n\t\t\tfor (List<MonthCellDescriptor> weekCells : monthCells) {\n\t\t\t\tfor (MonthCellDescriptor actCell : weekCells) {\n\t\t\t\t\tactCal.setTime(actCell.getDate());\n\t\t\t\t\tif (sameDate(actCal, searchCal) && actCell.isSelectable()) {\n\t\t\t\t\t\treturn new MonthCellWithMonthIndex(actCell, index);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tindex++;\n\t\t}\n\t\treturn null;\n\t}",
"public String getMonth() {\r\n return month;\r\n }",
"public Month () {\n monthNumber = 1;\n }",
"public byte getMonth() {\n return month;\n }",
"public Calendar getCurrentMonthCalendarObj() throws Throwable{\r\n\r\n\t\tString dateInput = \"01/\"+month+\"/\"+year;\t\t\t\r\n\t\tDateFormat df = new SimpleDateFormat(\"dd/MMMM/yyyy\");\r\n\t\tDate startDate = df.parse(dateInput);\r\n\t\tCalendar c = Calendar.getInstance(); // this takes current date\r\n\t c.setTime(startDate); // set date to specified in arguement\r\n\t\treturn c;\r\n\t}",
"public int getNextMonth()\n\t{\n\t\tm_calendar.set(Calendar.MONTH, getMonthInteger());\n\t\t\n\t\tsetDay(getYear(),getMonthInteger(),1);\n\t\t\n\t\treturn getMonthInteger();\n\t\n\t}",
"public int intValue()\n {\n return this.month;\n }",
"public String getCurrentDayOfMonthAsString() {\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}",
"private String getMonth(int i) {\n String month = \"\";\n switch (i) {\n case 0:\n month = \"Jan\";\n break;\n case 1:\n month = \"Feb\";\n break;\n case 2:\n month = \"Mar\";\n break;\n case 3:\n month = \"Apr\";\n break;\n case 4:\n month = \"May\";\n break;\n case 5:\n month = \"Jun\";\n break;\n case 6:\n month = \"Jul\";\n break;\n case 7:\n month = \"Aug\";\n break;\n case 8:\n month = \"Sep\";\n break;\n case 9:\n month = \"Oct\";\n break;\n case 10:\n month = \"Nov\";\n break;\n case 11:\n month = \"Dec\";\n break;\n }\n return month;\n }",
"public static LocalDate getFirstOfCurrentMonth() {\n\t\treturn LocalDate.now().with(TemporalAdjusters.firstDayOfMonth());\n\t}",
"public String getMonth() {\n return month;\n }",
"public int monthOfYear() {\r\n\t\treturn mC.get(Calendar.MONTH);\r\n\t}",
"int calMonthDay(int m,int y){//calMonthDay(month,year)\n int x=0,c;\n for(c = 1; c < m; c++) {// Jan to less than the month 'm' as 'm' we are not taking the the whole days of that month\n if(c == 2) {//if Feb\n if(y%4 == 0)//checks if year is leap or not\n x += 29;\n else\n x += 28;\n }\n else\n x += mon.get(c-1);\n }\n return(x);\n }",
"public String getMonth() {\n return month.getText();\n }",
"int getExpMonth(String bookingRef);",
"public int getDayOfMonth(){\n\t\treturn dayOfMonth;\n\t}",
"public static int getRndMonthNumber() {\n return ThreadLocalRandom.current().nextInt(1, 12 + 1);\n }",
"public String getMonth(int month) {\n\t\t\t\treturn new DateFormatSymbols().getMonths()[month];\n\t\t\t}",
"private String getMonthForInt(int number) {\n int num = number - 1;\n String month = \"Wrong number\";\n String[] months = dfs.getMonths();\n if (num >= 0 && num <= 11) {\n month = months[num];\n } else {\n throw new IllegalArgumentException(\"There is no month with number: \" + number);\n }\n return month;\n }",
"public static String getGMonth( String month ) {\r\n String ret = null;\r\n ret = \"January\".equals( month ) == true ? \"01\" : ret;\r\n ret = \"February\".equals( month ) == true ? \"02\" : ret;\r\n ret = \"March\".equals( month ) == true ? \"03\" : ret;\r\n ret = \"April\".equals( month ) == true ? \"04\" : ret;\r\n ret = \"May\".equals( month ) == true ? \"05\" : ret;\r\n ret = \"June\".equals( month ) == true ? \"06\" : ret;\r\n ret = \"July\".equals( month ) == true ? \"07\" : ret;\r\n ret = \"August\".equals( month ) == true ? \"08\" : ret;\r\n ret = \"September\".equals( month ) == true ? \"09\" : ret;\r\n ret = \"October\".equals( month ) == true ? \"10\" : ret;\r\n ret = \"November\".equals( month ) == true ? \"11\" : ret;\r\n ret = \"December\".equals( month ) == true ? \"12\" : ret;\r\n return ret;\r\n }",
"private int checkMonth(int testMonth) {\n\t\tif (testMonth > 0 && testMonth <= 12) // validate month\n\t\t\treturn testMonth;\n\t\telse // month is invalid\n\t\t\tthrow new IllegalArgumentException(\"month must be 1-12\");\n\t}",
"@Override\n public String getCurrentMonthAndYear() {\n\n setLogString(\"Get Month and year\", true, CustomLogLevel.HIGH);\n final String currentMonth = getElement(getDriver(), By.className(SAVINGS_MONTH),\n TINY_TIMEOUT).getText();\n setLogString(\"Current Month and Year: \" + currentMonth, true, CustomLogLevel.HIGH);\n return currentMonth.substring(currentMonth.indexOf(\"-\") + 1, currentMonth.length()).trim();\n }",
"public static String getCalendarMonthString(int month)\r\n\t{\r\n\t\tString[] arrMonths = {\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"};\r\n\t\treturn arrMonths[month];\r\n\t}",
"public String getMonthName()\r\n {\r\n int mn = theMonthNumber;\r\n if (mn == 1)\r\n {return \"January\";}\r\n else if (mn == 2)\r\n {return \"February\";}\r\n else if (mn == 3)\r\n {return \"March\";}\r\n else if (mn == 4)\r\n {return \"April\";}\r\n else if (mn == 5)\r\n {return \"May\";}\r\n else if (mn == 6)\r\n {return \"June\";}\r\n else if (mn == 7)\r\n {return \"July\";}\r\n else if (mn == 8)\r\n {return \"August\";}\r\n else if (mn == 9)\r\n {return \"September\";}\r\n else if (mn == 10)\r\n {return \"October\";}\r\n else if (mn == 11)\r\n {return \"November\";}\r\n else\r\n {return \"December\";}\r\n }",
"@Override\n public int firstDayOfMonthInWeek() {\n int y = getYear();\n int m = getMonth()-1;\n XCalendar xCalendar = XCalendar.fromJalali(y,m,1);\n Calendar cc = Calendar.getInstance();\n int yy = xCalendar.getCalendar(XCalendar.GregorianType).getYear();\n int mm = xCalendar.getCalendar(XCalendar.GregorianType).getMonth()-1;\n int dd = xCalendar.getCalendar(XCalendar.GregorianType).getDay();\n cc.set(yy,mm,dd);\n int d = firstDayOfWeek[cc.get(Calendar.DAY_OF_WEEK)-1];\n return d;\n }",
"public int getDayOfMonth() {\n\n return this.cdom;\n\n }",
"public String getJP_AcctMonth();",
"public final native double setMonth(int month) /*-{\n this.setMonth(month);\n return this.getTime();\n }-*/;",
"public String asMonth() {\n \treturn new SimpleDateFormat(\"MM\").format(expiredAfter);\n }",
"public int lengthOfMonth() {\n\n return CALSYS.getLengthOfMonth(CopticEra.ANNO_MARTYRUM, this.cyear, this.cmonth);\n\n }",
"public int[] getMonths() {\n return months;\n }",
"public int getMonthOfYear() {\n return _calendar.get(Calendar.MONTH) + 1;\n }",
"public int getMonths() {\n return this.months;\n }",
"public String getMonth(String x){\n\n if(x.contains(\"Apr\")){\n return \"April\";\n }\n else if(x.contains(\"Mar\")){\n return \"March\";\n }\n else if(x.contains(\"Jan\")){\n return \"January\";\n }\n else if(x.contains(\"Feb\")){\n return \"February\";\n }\n else if(x.contains(\"May\")){\n return \"May\";\n }\n else if(x.contains(\"Jun\")){\n return \"June\";\n }\n else if(x.contains(\"Jul\")){\n return \"July\";\n }\n else if(x.contains(\"Aug\")){\n return \"August\";\n }\n else if(x.contains(\"Sep\")){\n return \"September\";}\n else if(x.contains(\"Oct\")){\n return \"October\";}\n else if(x.contains(\"Nov\")){\n return \"November\";}\n else{\n return \"December\";}\n }",
"public int getMonthInt(int monthint,String month){\n switch (month) {\n case \"JANUARY\": monthint = 1;\n break;\n case \"FEBUARY\": monthint = 2;\n break;\n case \"MARCH\": monthint = 3;\n break;\n case \"APRIL\": monthint = 4;\n break;\n case \"MAY\": monthint = 5;\n break;\n case \"JUNE\": monthint = 6;\n break;\n case \"JULY\": monthint = 7;\n break;\n case \"AUGUST\": monthint = 8;\n break;\n case \"SEPTEMBER\": monthint = 9;\n break;\n case \"OCTOBER\": monthint = 10;\n break;\n case \"NOVEMBER\": monthint = 11;\n break;\n case \"DECEMBER\": \n monthint = 12;\n break;\n// default: JOptionPane.showMessageDialog(null,\"Error\",\"INVALID INPUT\", JOptionPane.ERROR_MESSAGE);\n \n// break;\n }\n return monthint;\n }",
"public int getFirstDayOfMonth(int month)\n\t{\n\t\tm_calendar.set(Calendar.MONTH,month);\n\t\tm_calendar.set(Calendar.DAY_OF_MONTH,1);\n\t\t\n\t\treturn (getDay_Of_Week() - 1);\t\t\n\n\t}",
"private int daysInMonth (int Month, int Year) {\n int result = 0;\n for (int i = 0; i <=6; i++) {\n if (Month == months31[i]){\n result = 31;\n } else {\n // ergänzen um schaltjahr\n if (Month == 2){\n result = daysFebruary(Year);\n } else {\n result = 30;\n }\n }\n } return result;\n\n }",
"public int getDayOfWeekInMonth() \n\t{\n\t\treturn m_calendar.get(Calendar.DAY_OF_WEEK_IN_MONTH);\n\n\t}",
"private String getMonth(Date date) {\n\t\tLocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();\n\n\t\tMonth month = localDate.getMonth();\n\n\t\treturn month.name();\n\t}",
"public int getDaysInMonth()\r\n\t{\r\n\t\tif (this.year % 4 == 0)\r\n\t\t\treturn Date.leapMonthDays[this.month - 1];\r\n\t\telse\r\n\t\t\treturn monthDays[this.month - 1];\r\n\t}",
"public int getCurrentDate() {\n\n\t\t cal = Calendar.getInstance();\n\t\treturn cal.get(Calendar.DAY_OF_MONTH);\n\t}",
"public String checkDateMonth(Date aDate){\n if (aDate.getMonth() < 10) {\r\n String newDate = \"0\" + Integer.toString(aDate.getMonth()+1);\r\n \r\n return newDate;\r\n }\r\n return Integer.toString(aDate.getMonth());\r\n \r\n }",
"public String intToMonth(int a)\r\n {\r\n if(a==1)return \"Januray\";\r\n else if(a==2)return \"February\";\r\n else if(a==3)return \"March\";\r\n else if(a==4)return \"April\";\r\n else if(a==5)return \"May\";\r\n else if(a==6)return \"June\";\r\n else if(a==7)return \"July\";\r\n else if(a==8)return \"August\";\r\n else if(a==9)return \"September\";\r\n else if(a==10)return \"October\";\r\n else if(a==11)return \"November\";\r\n else if(a==12)return \"December\";\r\n else return \"\";\r\n }",
"public int getDate(String month)\n\t{\n\t\tint a[] = {1,2,3};\n\t\t//17 Feb 2011 00:00:00\n\t\t\n\t\t\n\t\tHashMap<String, Integer> map = new HashMap<String, Integer>();\n\t\tmap.put(\"Jan\", 1);\n\t\tmap.put(\"Feb\", 2);\n\t\tmap.put(\"Mar\", 3);\n\t\tmap.put(\"Apr\", 4);\n\t\tmap.put(\"May\", 5);\n\t\tmap.put(\"Jun\", 6);\n\t\tmap.put(\"Jul\", 7);\n\t\tmap.put(\"Aug\", 8);\n\t\tmap.put(\"Sep\", 9);\n\t\tmap.put(\"Oct\", 10);\n\t\tmap.put(\"Nov\", 11);\n\t\tmap.put(\"Dec\", 12);\n\t\t\n\t\tint mon = (int) map.get(month);\n\t\treturn mon;\n\t}",
"public int daysInMonth() {\r\n if (month == 4 || month == 6 || month == 9 || month == 11) {\r\n return 30;\r\n } else if (month == 2) {\r\n return 28;\r\n } else {\r\n return 31;\r\n }\r\n }",
"public void setMonth(Integer month) {\r\n this.month = month;\r\n }",
"public Month getMonth(){\n\t return this.month;\n }",
"public void printMonth() {\r\n switch (cur.getMonth()){\r\n case 1:\r\n System.out.println(\"JANUARY\");\r\n break;\r\n case 2:\r\n System.out.println(\"FEBRUARY\");\r\n break;\r\n case 3:\r\n System.out.println(\"MARCH\");\r\n break;\r\n case 4:\r\n System.out.println(\"APRIL\");\r\n break;\r\n case 5:\r\n System.out.println(\"MAY\");\r\n break;\r\n case 6:\r\n System.out.println(\"JUNE\");\r\n break;\r\n case 7:\r\n System.out.println(\"JULY\");\r\n break;\r\n case 8:\r\n System.out.println(\"AUGUST\");\r\n break;\r\n case 9:\r\n System.out.println(\"SEPTEMBER\");\r\n break;\r\n case 10:\r\n System.out.println(\"OCTOBER\");\r\n break;\r\n case 11:\r\n System.out.println(\"NOVEMBER\");\r\n break;\r\n case 12:\r\n System.out.println(\"DECEMBER\");\r\n break;\r\n }\r\n }",
"public static Month of(int value) {\n\n if (value < MINIMUM_MONTH)\n return null;\n\n if (value > MAXIMUM_MONTH)\n return null;\n\n return MONTHS.get(value);\n\n }",
"public static int getMonthNumberByDate(Date val) {\n\t\tif (val != null) {\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"MM\");\n\t\t\treturn parseInt(format.format(val));\n\t\t} else {\n\n\t\t\treturn 0;\n\n\t\t}\n\t}",
"public void setMonth(int month)\n {\n this.month = month;\n }",
"public void setMonth(byte value) {\n this.month = value;\n }",
"@JsonGetter(\"exp_month\")\r\n public int getExpMonth ( ) { \r\n return this.expMonth;\r\n }",
"public void setMonth(byte value) {\n this.month = value;\n }"
] | [
"0.7205362",
"0.69862384",
"0.6607929",
"0.6591078",
"0.65196484",
"0.6509328",
"0.6453782",
"0.6452349",
"0.64295584",
"0.6420044",
"0.6407181",
"0.63900936",
"0.6377965",
"0.63603646",
"0.63600695",
"0.6355515",
"0.6335842",
"0.6310558",
"0.63019013",
"0.6207383",
"0.6172124",
"0.61640894",
"0.61640894",
"0.6127833",
"0.6127833",
"0.61273926",
"0.6121847",
"0.6062657",
"0.6059537",
"0.6039152",
"0.59924304",
"0.59828347",
"0.5977046",
"0.59753346",
"0.59713763",
"0.5965114",
"0.59520257",
"0.59343827",
"0.59239787",
"0.59161294",
"0.5892722",
"0.5892722",
"0.5892722",
"0.58918256",
"0.587081",
"0.5868831",
"0.5862302",
"0.58343947",
"0.5826529",
"0.58239853",
"0.5815621",
"0.5785219",
"0.5777564",
"0.57699996",
"0.576373",
"0.5762971",
"0.5746682",
"0.5737647",
"0.5737323",
"0.57013756",
"0.56977093",
"0.5679989",
"0.5662858",
"0.56611776",
"0.56581646",
"0.5646951",
"0.56183565",
"0.5607938",
"0.56071687",
"0.5601956",
"0.5596276",
"0.5585257",
"0.5569244",
"0.5568773",
"0.5554335",
"0.5548769",
"0.55172384",
"0.55151486",
"0.55150825",
"0.55135477",
"0.55122656",
"0.5498638",
"0.5478184",
"0.5477973",
"0.5430313",
"0.54173076",
"0.541561",
"0.539381",
"0.5384773",
"0.5374024",
"0.53688127",
"0.5367693",
"0.5361408",
"0.53593856",
"0.534461",
"0.5340098",
"0.533875",
"0.5313946",
"0.53065246",
"0.52993286",
"0.5297246"
] | 0.0 | -1 |
we need to be able to delegate initial TableView population to AppLauncher because it sets the proper value for our db and thread pool. Feels hackish, but whatever. Populate the Table View with values. Called only after initialization. | public void runTableUpdateService() {
tableUpdateService.restart();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void initialize(URL url, ResourceBundle resourceBundle) {\n\n //configure the TableView to get data from the DB!\n getTableData();\n MSAppointmentsTableView.setItems(allAppointments);\n\n\n\n\n\n\n\n }",
"private void initializeTable()\n {\n mTable = new ListView(mData);\n mTable.setPrefSize(200, 250);\n mTable.setEditable(false);\n }",
"public void initialize() {\n resultsTable.setItems(null);\n resultsTable.setRowFactory(tv -> {\n TableRow<SuperAgentAppRecord> row = new TableRow<>();\n // Open window if row double-clicked\n row.setOnMouseClicked(event -> {\n if (event.getClickCount() == 2 && (!row.isEmpty())) {\n SuperAgentAppRecord rowData = row.getItem();\n try {\n // Open selected row in new window\n displayInspectApplications(rowData);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n return row;\n });\n }",
"@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n\r\n appointments = FXCollections.observableArrayList();\r\n customers = FXCollections.observableArrayList();\r\n\r\n //Get the user's login name and display it. \r\n usernameLabel.setText(user.getUserName());\r\n try {\r\n\r\n } catch (Exception ex) {\r\n Logger.getLogger(MainScreenController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n //G. Write two or more lambda expressions to make your program more efficient, justifying the use of each lambda expression with an in-line comment. \r\n //************LAMBDAS FOR APPOINTMENT TABLEVIEW COLUMNS*************************\r\n\r\n //Lines 152-194 are lambda expressions that generate the table columns for the table views. \r\n DateTimeFormatter tdtf = DateTimeFormatter.ofPattern(\"HH:mm\");\r\n startTimeColumn.setCellValueFactory(cellData -> {\r\n return new SimpleStringProperty(tdtf.format(cellData.getValue().getStartTime()));\r\n });\r\n\r\n endTimeColumn.setCellValueFactory(cellData -> {\r\n return new SimpleStringProperty(tdtf.format(cellData.getValue().getEndTime()));\r\n });\r\n\r\n appointmentTypeColumn.setCellValueFactory(cellData -> {\r\n return cellData.getValue().getAppointmentType();\r\n });\r\n\r\n appointmentCustomerCol.setCellValueFactory(cellData -> {\r\n return cellData.getValue().getAssociatedCustomer();\r\n });\r\n\r\n DateTimeFormatter dformat = DateTimeFormatter.ofPattern(\"YYYY-MM-dd\");\r\n dateColumn.setCellValueFactory(cellData -> {\r\n return new SimpleStringProperty(dformat.format(cellData.getValue().getStartTime()));\r\n });\r\n //*************LAMBDAS FOR CUSTOMER TABLEVIEW COLUMNS**********************\r\n\r\n column_Customer_Name.setCellValueFactory(cellData -> {\r\n return cellData.getValue().getCustomerName();\r\n });\r\n\r\n column_Customer_Address.setCellValueFactory(cellData -> {\r\n return cellData.getValue().getCustomerAddress();\r\n });\r\n\r\n column_Customer_Phone.setCellValueFactory(cellData -> {\r\n return cellData.getValue().getCustomerPhoneNumber();\r\n });\r\n\r\n column_Customer_City.setCellValueFactory(cellData -> {\r\n return cellData.getValue().getCustomerCity();\r\n });\r\n\r\n column_Customer_Country.setCellValueFactory(cellData -> {\r\n return cellData.getValue().getCustomerCountry();\r\n });\r\n\r\n try {\r\n\r\n appointments.clear();\r\n appointments.addAll(AppointmentImplementation.getAppointmentData());\r\n\r\n customerTable.getItems().clear();\r\n customerTable.getItems().addAll(customers);\r\n customerTable.setItems(customers);\r\n customers.addAll(CustomerImplementation.getCustomerData());\r\n\r\n table.setItems(appointments);\r\n\r\n //SECTION H: WRITE CODE TO ALERT USER IF AN APPOINTMENT IS WITHIN 15 MINUTES OF USER'S LOGIN\r\n Appointment appts = apptAlert(appointments);\r\n\r\n DateTimeFormatter tformat = DateTimeFormatter.ofPattern(\"HH:mm\");\r\n if (appts != null) {\r\n Alert alert = new Alert(AlertType.INFORMATION);\r\n alert.setHeaderText(\"Upcoming appointment\");\r\n alert.setContentText(\"You have an appointment with client \" + appts.getAssociatedCustomer().get() + \" \" + \" at\" + tformat.format(appts.getStartTime()));\r\n alert.showAndWait();\r\n System.out.println(\"apptAlert\");\r\n }\r\n } catch (SQLException ex) {\r\n ex.printStackTrace();\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n\r\n }",
"@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n \r\n \r\n try{\r\n Connection conn = dbconnection.getConnection();\r\n data = FXCollections.observableArrayList();\r\n \r\n ResultSet rs = conn.createStatement().executeQuery(\"SELECT * FROM gameweb.item\");\r\n \r\n while (rs.next()){\r\n data.add(new gamedetail(rs.getString(2), rs.getString(3), rs.getString(4), rs.getString(5), rs.getString(6)));\r\n \r\n }\r\n \r\n } catch(SQLException ex){\r\n \r\n System.err.println(\"Error\" + ex);\r\n \r\n }\r\n \r\n colGameType.setCellValueFactory(new PropertyValueFactory<>(\"gameType\"));\r\n colGameTitle.setCellValueFactory(new PropertyValueFactory<>(\"gameTitle\"));\r\n colDescription.setCellValueFactory(new PropertyValueFactory<>(\"description\"));\r\n colRegularPrice.setCellValueFactory(new PropertyValueFactory<>(\"rPrice\"));\r\n colDiscountedPrice.setCellValueFactory(new PropertyValueFactory<>(\"dPrice\"));\r\n \r\n gameTable.setItems(null);\r\n gameTable.setItems(data);\r\n \r\n // TODO\r\n }",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n try {\n populateAppointmentsTable();\n } catch (SQLException ex) {\n Logger.getLogger(AppointmentsViewController.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n customerNameColumn.setCellValueFactory(new PropertyValueFactory<>(\"customerName\"));\n consultantNameColumn.setCellValueFactory(new PropertyValueFactory<>(\"consultantName\"));\n titleColumn.setCellValueFactory(new PropertyValueFactory<>(\"title\"));\n descriptionColumn.setCellValueFactory(new PropertyValueFactory<>(\"description\"));\n locationColumn.setCellValueFactory(new PropertyValueFactory<>(\"location\"));\n contactColumn.setCellValueFactory(new PropertyValueFactory<>(\"contact\"));\n typeColumn.setCellValueFactory(new PropertyValueFactory<>(\"type\"));\n startColumn.setCellValueFactory(new PropertyValueFactory<>(\"formattedStart\"));\n endColumn.setCellValueFactory(new PropertyValueFactory<>(\"formattedEnd\"));\n dateColumn.setCellValueFactory(new PropertyValueFactory<>(\"date\"));\n\n appointmentsTable.setItems(allAppointments);\n }",
"public void initializeTable(){\r\n\t \r\n\t // Adding a button to tableView\r\n\t /*\r\n\t TableColumn actionCol = new TableColumn( \"Action\" );\r\n actionCol.setCellValueFactory( new PropertyValueFactory<>( \"DUMMY\" ) );\r\n\r\n Callback<TableColumn<WorkflowEntry, String>, TableCell<WorkflowEntry, String>> cellFactory = //\r\n new Callback<TableColumn<WorkflowEntry, String>, TableCell<WorkflowEntry, String>>()\r\n {\r\n public TableCell<WorkflowEntry, String> call( final TableColumn<WorkflowEntry, String> param )\r\n {\r\n final TableCell<WorkflowEntry, String> cell = new TableCell<WorkflowEntry, String>()\r\n {\r\n\r\n final Button btn = new Button( \"Approve\" );\r\n\r\n @Override\r\n public void updateItem( String item, boolean empty )\r\n {\r\n super.updateItem( item, empty );\r\n if ( empty )\r\n {\r\n setGraphic( null );\r\n setText( null );\r\n }\r\n else\r\n {\r\n btn.setOnAction( ( ActionEvent event ) ->\r\n {\r\n WorkflowEntry person = getTableView().getItems().get( getIndex() );\r\n System.out.println( person.getName() );\r\n } );\r\n setGraphic( btn );\r\n setText( null );\r\n }\r\n }\r\n };\r\n return cell;\r\n }\r\n };\r\n\r\n actionCol.setCellFactory( cellFactory );*/\r\n\t\t\r\n\t\ttableView.setItems(data);\r\n\t}",
"public void initView() {\n tableModel.containerInitialized(peripheralJobsContainer.getPeripheralJobs());\n }",
"private void initTable() {\n \t\t// init table\n \t\ttable.setCaption(TABLE_CAPTION);\n \t\ttable.setPageLength(10);\n \t\ttable.setSelectable(true);\n \t\ttable.setRowHeaderMode(Table.ROW_HEADER_MODE_INDEX);\n \t\ttable.setColumnCollapsingAllowed(true);\n \t\ttable.setColumnReorderingAllowed(true);\n \t\ttable.setSelectable(true);\n \t\t// this class handles table actions (see handleActions method below)\n \t\ttable.addActionHandler(this);\n \t\ttable.setDescription(ACTION_DESCRIPTION);\n \n \t\t// populate Toolkit table component with test SQL table rows\n \t\ttry {\n \t\t\tQueryContainer qc = new QueryContainer(\"SELECT * FROM employee\",\n \t\t\t\t\tsampleDatabase.getConnection());\n \t\t\ttable.setContainerDataSource(qc);\n \t\t} catch (SQLException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\t// define which columns should be visible on Table component\n \t\ttable.setVisibleColumns(new Object[] { \"FIRSTNAME\", \"LASTNAME\",\n \t\t\t\t\"TITLE\", \"UNIT\" });\n \t\ttable.setItemCaptionPropertyId(\"ID\");\n \t}",
"@Override\n public void initialize(URL location, ResourceBundle resources) {\n list = FXCollections.observableArrayList();\n userID.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\n tableID.setCellValueFactory(new PropertyValueFactory<>(\"table\"));\n status.setCellValueFactory(new PropertyValueFactory<>(\"status\"));\n\n try {\n list = bookingModel.getTableDetails();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n userTable.setItems(list);\n }",
"private void initTableView() {\n // nastaveni sloupcu pro zobrazeni spravne hodnoty a korektniho datoveho typu\n this.colId.setCellValueFactory(cellData -> cellData.getValue().getPersonalIdProperty());\n this.colName.setCellValueFactory(cellData -> cellData.getValue().getDisplayNameProperty());\n this.colAge.setCellValueFactory(cellData -> cellData.getValue().getAgeProperty().asObject());\n this.colGender.setCellValueFactory(cellData -> cellData.getValue().getGenderProperty());\n this.colPrice.setCellValueFactory(cellData -> cellData.getValue().getPriceProperty().asObject());\n\n // nastaveni listu prvku tabulce\n this.offerTable.setItems(this.marketplace.getOfferList());\n\n // listener pro zjisteni, ktery prvek tabulky uzivatel oznacil a naplneni aktualni reference na vybrane dite\n this.offerTable.getSelectionModel().getSelectedCells().addListener(new ListChangeListener<TablePosition>() {\n\n @Override\n public void onChanged(Change<? extends TablePosition> change) {\n ObservableList selectedCells = offerTable.getSelectionModel().getSelectedCells();\n TablePosition tablePosition = (TablePosition) selectedCells.get(0);\n currentChild = marketplace.getOfferList().get(tablePosition.getRow());\n System.out.println(currentChild);\n updateUi();\n }\n });\n }",
"private void buildTable() {\n\t\tObservableList<Record> data;\r\n\t\tdata = FXCollections.observableArrayList();\r\n\r\n\t\t// get records from the database\r\n\t\tArrayList<Record> list = new ArrayList<Record>();\r\n\t\tlist = getItemsToAdd();\r\n\r\n\t\t// add records to the table\r\n\t\tfor (Record i : list) {\r\n\t\t\tSystem.out.println(\"Add row: \" + i);\r\n\t\t\tdata.add(i);\r\n\t\t}\r\n\t\ttableView.setItems(data);\r\n\t}",
"@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n // TODO\r\n\r\n //make iterms\r\n // add 20 more rows\r\n Thread readDataThread = new Thread(() -> {\r\n Logs.e(\"wait for refreshing\");\r\n while (GlobalParameters.isRefreshingStockList) {\r\n\r\n try {\r\n Thread.sleep(1000);\r\n } catch (InterruptedException ex) {\r\n Logger.getLogger(ReviewTabController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n }\r\n\r\n recordIterms = readRecords();\r\n\r\n stockFilter = new StockFilter(GlobalParameters.getStockInfoObservableList());\r\n\r\n int size = recordIterms.size();\r\n\r\n for (int i = 1; i <= 30; i++) {\r\n recordIterms.add(new ReviewRecords(i + size));\r\n }\r\n\r\n reviewRecordsList = FXCollections.observableArrayList(recordIterms);\r\n reviewTableView.setItems(reviewRecordsList);\r\n });\r\n\r\n readDataThread.start();\r\n\r\n reviewTableView.setEditable(true);\r\n\r\n idCol.setCellValueFactory(cellData -> cellData.getValue().idProperty());\r\n stockCodeCol.setCellValueFactory(cellData -> cellData.getValue().stockCodeProperty());\r\n stockNameCol.setCellValueFactory(cellData -> cellData.getValue().stockNameProperty());\r\n referenceCol.setCellValueFactory(cellData -> cellData.getValue().obReferenceProperty());\r\n methodCol.setCellValueFactory(cellData -> cellData.getValue().obMethodPropertys().getComboBox());\r\n startDateCol.setCellValueFactory(cellData -> cellData.getValue().obStartDatePicker().getObserveDatePicker());\r\n startPriceCol.setCellValueFactory(cellData -> cellData.getValue().obStartClosePriceProperty());\r\n endDateCol.setCellValueFactory(cellData -> cellData.getValue().obEndDatePicker().getObserveDatePicker());\r\n endPriceCol.setCellValueFactory(cellData -> cellData.getValue().obEndClosePriceProperty());\r\n profitCol.setCellValueFactory(cellData -> cellData.getValue().obProfitProperty());\r\n efficencyCol.setCellValueFactory(cellData -> cellData.getValue().obEfficiencyProperty());\r\n commentsCol.setCellValueFactory(cellData -> cellData.getValue().obCommentsProperty());\r\n\r\n stockCodeCol.setCellFactory(TextFieldTableCell.forTableColumn());\r\n referenceCol.setCellFactory(TextFieldTableCell.forTableColumn());\r\n commentsCol.setCellFactory(TextFieldTableCell.forTableColumn());\r\n profitCol.setCellFactory(ratiolCellCallback);\r\n efficencyCol.setCellFactory(ratiolCellCallback);\r\n\r\n //set column editable\r\n for (int i = 0; i < reviewTableView.getColumns().size(); i++) {\r\n reviewTableView.getColumns().get(i).setEditable(true);\r\n\r\n }\r\n\r\n// comfirmCol.setCellValueFactory(cellData -> cellData.getValue().obEfficiencyProperty());\r\n }",
"public void initialize() throws SQLException {\n\t \n\tTypesReport typesObject = new TypesReport();\n\tObservableList<TypesReport> typeList = FXCollections.observableArrayList();\n\ttypeList.add(typesObject);\n\ttableViewType.setItems(typeList);\n\n\t\n\ttableColumnJan.setCellValueFactory(new PropertyValueFactory(\"january\"));\n\ttableColumnFeb.setCellValueFactory(new PropertyValueFactory(\"february\"));\n\ttableColumnMar.setCellValueFactory(new PropertyValueFactory(\"march\"));\n\ttableColumnApr.setCellValueFactory(new PropertyValueFactory(\"april\"));\n\ttableColumnMay.setCellValueFactory(new PropertyValueFactory(\"may\"));\n\ttableColumnJune.setCellValueFactory(new PropertyValueFactory(\"june\"));\n\ttableColumnJuly.setCellValueFactory(new PropertyValueFactory(\"july\"));\n\ttableColumnAug.setCellValueFactory(new PropertyValueFactory(\"august\"));\n\ttableColumnSept.setCellValueFactory(new PropertyValueFactory(\"september\"));\n\ttableColumnOct.setCellValueFactory(new PropertyValueFactory(\"october\"));\n\ttableColumnNov.setCellValueFactory(new PropertyValueFactory(\"november\"));\n\ttableColumnDec.setCellValueFactory(new PropertyValueFactory(\"december\"));\n\n\n buttonHome.setOnAction((event)-> {\n\ttry {\n\tFXMLLoader homeScreen = new FXMLLoader(getClass().getResource(\"HomeScreen.fxml\"));\n AnchorPane homeScreenPane = homeScreen.load();\n rootPane.getChildren().setAll(homeScreenPane);\n\t}catch(Exception ex){ex.getMessage();}});\n\n\tbuttonReports.setOnAction((event)-> {\n\ttry {\n\tFXMLLoader homeScreen = new FXMLLoader(getClass().getResource(\"Reports.fxml\"));\n AnchorPane homeScreenPane = homeScreen.load();\n rootPane.getChildren().setAll(homeScreenPane);\n\t}catch(Exception ex){ex.getMessage();}});\n }",
"@Override\r\n public void initialize(URL url, ResourceBundle resourceBundle) {\r\n\r\n //Initialize Parts Table\r\n partsTableView.setItems(Inventory.getAllParts());\r\n\r\n partIDCol.setCellValueFactory(new PropertyValueFactory<>(\"id\"));\r\n partNameCol.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\r\n partInvCol.setCellValueFactory(new PropertyValueFactory<>(\"stock\"));\r\n partPriceCol.setCellValueFactory(new PropertyValueFactory<>(\"price\"));\r\n\r\n\r\n //Initialize Products Table\r\n productsTableView.setItems(Inventory.getAllProducts());\r\n\r\n productIDCol.setCellValueFactory(new PropertyValueFactory<>(\"id\"));\r\n productNameCol.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\r\n productInvCol.setCellValueFactory(new PropertyValueFactory<>(\"stock\"));\r\n productPriceCol.setCellValueFactory(new PropertyValueFactory<>(\"price\"));\r\n\r\n }",
"@Override\n public void initialize(URL url, ResourceBundle resourceBundle) {\n\n CustomerTableview.setItems(allCustomers);\n CustomerTableIDColumn.setCellValueFactory(new PropertyValueFactory<>(\"customerID\"));\n CustomerTableNameColumn.setCellValueFactory(new PropertyValueFactory<>(\"customerName\"));\n CustomerTableAddressColumn.setCellValueFactory(new PropertyValueFactory<>(\"customerAddress\"));\n CustomerTablePostalColumn.setCellValueFactory(new PropertyValueFactory<>(\"customerPostal\"));\n CustomerTablePhoneColumn.setCellValueFactory(new PropertyValueFactory<>(\"customerPhone\"));\n CustomerTableCreatedColumn.setCellValueFactory(new PropertyValueFactory<>(\"createDate\"));\n CustomerTableCreatedByColumn.setCellValueFactory(new PropertyValueFactory<>(\"createdBy\"));\n CustomerTableUpdatedColumn.setCellValueFactory(new PropertyValueFactory<>(\"lastUpdate\"));\n CustomerTableUpdatedByColumn.setCellValueFactory(new PropertyValueFactory<>(\"lastUpdatedBy\"));\n CustomerTableDivisionIDColumn.setCellValueFactory(new PropertyValueFactory<>(\"customerDivision\"));\n\n try {\n populateCustomerTable();\n } catch (SQLException sqlException) {\n sqlException.printStackTrace();\n }\n }",
"@FXML\n @Override\n public void initialize() {\n populateTable();\n\n }",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n // tableViewBook.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);\n initCol();\n dbHandler = DatabaseHandler.getInstance();\n localData();\n\n }",
"public void initialize() {\n allAppointments = DBAppointments.returnAllAppointments();\n allUsers = DBUser.returnAllUsers();\n allContacts = DBContacts.returnAllContacts();\n Contact_Choicebox.setItems(allContacts);\n Contact_Choicebox.setConverter(new StringConverter<Contact>() {\n @Override\n public String toString(Contact contact) {\n return contact.getName();\n }\n\n @Override\n public Contact fromString(String s) {\n return null;\n }\n });\n Contact_Id_Column.setCellValueFactory(new PropertyValueFactory<Appointment, Integer>(\"id\"));\n Contact_Title_Column.setCellValueFactory(new PropertyValueFactory<Appointment, String>(\"title\"));\n Contact_Description_Column.setCellValueFactory(new PropertyValueFactory<Appointment, String>(\"description\"));\n Contact_Start_Column.setCellValueFactory(new PropertyValueFactory<Appointment, String>(\"startString\"));\n Contact_End_Column.setCellValueFactory(new PropertyValueFactory<Appointment, String>(\"endString\"));\n Contact_Customer_Id_Column.setCellValueFactory(new PropertyValueFactory<Appointment, Integer>(\"customerId\"));\n //Lambda\n FilteredList<Appointment> filteredAppointments = new FilteredList<>(allAppointments, a -> true);\n Contact_Table.setItems(filteredAppointments);\n Contact_Choicebox.getSelectionModel().selectedItemProperty().addListener(obs -> {\n filteredAppointments.setPredicate(Appointment -> {\n return Appointment.getContactId() == Contact_Choicebox.getSelectionModel().getSelectedItem().getId();\n });\n });\n Contact_Choicebox.getSelectionModel().selectFirst();\n //Setup Appointment description list\n ObservableList<String> monthData = FXCollections.observableArrayList();\n Month currentMonth = LocalDate.now().getMonth();\n ObservableList<Appointment> monthAppointments = FXCollections.observableArrayList();\n for (Appointment allAppointment : allAppointments) {\n if (currentMonth == allAppointment.getStart().getMonth()) {\n monthAppointments.add(allAppointment);\n }\n }\n for (int i=0; i < monthAppointments.size(); i++) {\n String description = monthAppointments.get(i).getDescription();\n int count = 0;\n for (Appointment monthAppointment : monthAppointments) {\n if (monthAppointment.getDescription().equals(description)) {\n count++;\n }\n }\n monthData.add(description + \" - \" + count);\n }\n Month_Appointment_List.setItems(monthData);\n\n ObservableList<String> userData = FXCollections.observableArrayList();\n for (int i = 0; i < allUsers.size(); i++) {\n int count = 0;\n for(int j = 0; j < allAppointments.size(); j++) {\n if (allUsers.get(i).getId() == allAppointments.get(j).getUserId()) {\n count ++;\n }\n }\n userData.add(allUsers.get(i).getName() + \" - \" + count);\n }\n User_Appointment_List.setItems(userData);\n }",
"public void initialize(){\n // Creating the columns for the table and adding data to them\n TableColumn name = new TableColumn(\"Name\");\n TableColumn hostName = new TableColumn(\"Host Name\");\n TableColumn price = new TableColumn(\"Price\");\n TableColumn neighbouthood = new TableColumn(\"Neighbourhood\");\n TableColumn noOfNights = new TableColumn(\"Minimum Nights\");\n TableColumn aptType = new TableColumn(\"Apt Type\");\n name.setPrefWidth(300);\n hostName.setPrefWidth(70);\n neighbouthood.setPrefWidth(100);\n price.setPrefWidth(50);\n noOfNights.setPrefWidth(100);\n aptType.setPrefWidth(75);\n\n // This column contains a button which deletes the particular row from the list\n TableColumn<AirbnbListing, AirbnbListing> removeColumn = new TableColumn<>(\"\");\n removeColumn.setCellValueFactory(\n param -> new ReadOnlyObjectWrapper<>(param.getValue())\n );\n removeColumn.setCellFactory(param -> new TableCell<>() {\n private final Button deleteButton = new Button(\"Remove\");\n\n @Override\n protected void updateItem(AirbnbListing property, boolean empty) {\n super.updateItem(property, empty);\n\n if (property == null) {\n setGraphic(null);\n return;\n }\n\n setGraphic(deleteButton);\n deleteButton.setOnMouseClicked(\n event -> getTableView().getItems().remove(property)\n );\n }\n });\n removeColumn.setPrefWidth(75);\n\n compareTable.getColumns().addAll(name, hostName, neighbouthood , price, aptType, noOfNights, removeColumn);\n\n ObservableList<AirbnbListing> compareList = FXCollections.observableArrayList(UserInput.getCompareList());\n\n name.setCellValueFactory(new PropertyValueFactory<AirbnbListing, String>(\"name\"));\n hostName.setCellValueFactory(new PropertyValueFactory<AirbnbListing, String>(\"host_name\"));\n neighbouthood.setCellValueFactory(new PropertyValueFactory<AirbnbListing, String>(\"neighbourhood\"));\n price.setCellValueFactory(new PropertyValueFactory<AirbnbListing, String>(\"price\"));\n noOfNights.setCellValueFactory(new PropertyValueFactory<AirbnbListing, String>(\"minimumNights\"));\n aptType.setCellValueFactory(new PropertyValueFactory<AirbnbListing, String>(\"room_type\"));\n\n new PropertyDescriptionCreator().propertyDescriptionMouseEvent(compareTable);\n\n compareTable.setItems(compareList);\n }",
"@FXML\n\tprivate void initialize() {\n\t\t// Initialize the person table with the two columns.\n\t\t\n\t\tloadDataFromDatabase();\n\n\t\tsetCellTable();\n\n\t\tstagiereTable.setItems(oblist);\n\t\tshowPersonDetails(null);\n\n\t\t// Listen for selection changes and show the person details when\n\t\t// changed.\n\t\tstagiereTable\n\t\t\t\t.getSelectionModel()\n\t\t\t\t.selectedItemProperty()\n\t\t\t\t.addListener(\n\t\t\t\t\t\t(observable, oldValue, newValue) -> showPersonDetails(newValue));\n\t}",
"private void initTableView() {\n\t\ttry {\r\n\t\t\tlist = LoginList.userList();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tSystem.out.println(list);\r\n\t\t// 조회된 데이터 tableView 에 넣기\r\n\r\n\t\tlogColIp.setCellValueFactory(new PropertyValueFactory<LoginUser, String>(\r\n\t\t\t\t\"ip\"));\r\n\t\tlogColId.setCellValueFactory(new PropertyValueFactory<LoginUser, String>(\r\n\t\t\t\t\"id\"));\r\n\t\tlogColSdi\r\n\t\t\t\t.setCellValueFactory(new PropertyValueFactory<LoginUser, String>(\r\n\t\t\t\t\t\t\"port\"));\r\n\r\n\t\tlogTableView.setItems(FXCollections.observableArrayList(list));\r\n\t\tlogTableView.getSelectionModel().select(-1);\r\n\t\t// listView 이벤트 등록\r\n\t\tlogTableView.getSelectionModel().selectedItemProperty()\r\n\t\t\t\t.addListener(new ChangeListener<LoginUser>() {\r\n\t\t\t\t\tpublic void changed(\r\n\t\t\t\t\t\t\t// 토나오는 코드..\r\n\t\t\t\t\t\t\tObservableValue<? extends LoginUser> observable,\r\n\t\t\t\t\t\t\tLoginUser oldValue, LoginUser newValue) {\r\n\t\t\t\t\t\tif (newValue != null) {\r\n\t\t\t\t\t\t\tlu = newValue;\r\n\t\t\t\t\t\t\tinitTextFeild();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\tlogTableView.addEventFilter(MouseEvent.MOUSE_CLICKED,\r\n\t\t\t\tnew EventHandler<MouseEvent>() {\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\t// 이거도 토나오네...\r\n\t\t\t\t\tpublic void handle(MouseEvent mouseEvent) {\r\n\t\t\t\t\t\tif (mouseEvent.getButton().equals(MouseButton.PRIMARY)) {\r\n\t\t\t\t\t\t\tif (mouseEvent.getClickCount() == 2) {\r\n\t\t\t\t\t\t\t\thandleButtonAction(mouseEvent);\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\r\n\t}",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n // Initialise context menu for tables\n contextMenu = new ContextMenu();\n\n MenuItem delete = new MenuItem(\"Delete\");\n MenuItem view = new MenuItem(\"View/edit\");\n MenuItem emailMenu = new MenuItem(\"Send email\");\n\n contextMenu.getItems().addAll(view, delete, emailMenu);\n delete.setOnAction(new handleDelete());\n view.setOnAction(new handleView());\n emailMenu.setOnAction(v -> handleSendEmailSingle());\n\n // Set up car table\n searchResultsTable.setContextMenu(contextMenu);\n // Set search options and select first\n searchSelection.getItems().addAll(FXCollections.observableArrayList(menuItems));\n searchSelection.getSelectionModel().select(0);\n searchSelection.getSelectionModel().selectedIndexProperty().addListener(\n (ov, oldv, newv) -> {\n setSearchItems(newv);\n }\n );\n filterSelection.getItems().addAll(FXCollections.observableArrayList(filterItems));\n filterSelection.getSelectionModel().select(0);\n filterSelection.getSelectionModel().selectedIndexProperty().addListener(\n (ov, oldv, newv) -> {\n setFilterItems(newv);\n }\n );\n\n nameColumn.setCellValueFactory(t -> t.getValue().getNameProperty());\n surnameColumn.setCellValueFactory(t -> t.getValue().getSurnameProperty());\n partnerNameColumn.setCellValueFactory(t -> t.getValue().getPartnerProperty());\n carRegColumn.setCellValueFactory(t -> t.getValue().getCarRegProperty());\n childrenColumn.setCellValueFactory(t -> t.getValue().getChildrenProperty());\n memberNoColumn.setCellValueFactory(cellData -> {\n\n StringProperty value = cellData.getValue().getMemberNoProperty();\n if (cellData.getValue().getRefuse() != null && cellData.getValue().getRefuse().getDate() != null) {\n value.setValue(\"refuse entry\");\n }\n if (value.getValue() == null) {\n value.setValue(\"n/a\");\n }\n return value;\n });\n\n // Comparator to ensure \"Sort by member joined date\" sorts by date, not String\n Comparator comparator = new Comparator<String>() {\n\n public int compare(String a, String b) {\n Date startDate;\n Date endDate;\n try {\n startDate = df.parse(a);\n endDate = df.parse(b);\n return startDate.compareTo(endDate);\n } catch (Exception e) {\n return (a.compareTo(b));\n }\n }\n };\n memberNoColumn.setComparator(comparator);\n\n societyColumn.setCellValueFactory(t -> t.getValue().getSocietyProperty());\n idValidColumn.setCellValueFactory(cellData -> {\n return Utility.checkValidID(cellData.getValue().getImageCollection());\n });\n\n // Make sure everything scales when we resize window\n //mainAnchorPane.prefHeightProperty().bind(scene.heightProperty());\n //mainAnchorPane.prefWidthProperty().bind(scene.widthProperty());\n mainVBox.prefWidthProperty().bind(mainAnchorPane.widthProperty());\n mainVBox.prefHeightProperty().bind(mainAnchorPane.heightProperty());\n\n subAnchorPane.prefWidthProperty().bind(mainAnchorPane.widthProperty());\n subAnchorPane.prefHeightProperty().bind(mainAnchorPane.heightProperty());\n tableAnchorPane.prefWidthProperty().bind(subAnchorPane.widthProperty());\n tableAnchorPane.prefHeightProperty().bind(subAnchorPane.heightProperty());\n\n filteredRowItemList = FXCollections.observableArrayList();\n searchResultsTable.setItems(filteredRowItemList);\n customerCountStatus.setText(Integer.toString(filteredRowItemList.size()));\n\n customersDisplayedHBox.setStyle(\"-fx-background-color: white\");\n queryHBox.setStyle(\"-fx-background-color: white \");\n setupMenu();\n\n }",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n TableColumn classId = new TableColumn(\"Class ID\");\n TableColumn classname = new TableColumn(\"Ten lop\");\n TableColumn numofPeople = new TableColumn(\"So nguoi\");\n TableColumn MaximumPeople = new TableColumn(\"So nguoi quy dinh\");\n TableColumn courseID = new TableColumn(\"Course ID\");\n TableColumn basic_grade = new TableColumn(\"Diem dau vao\");\n \n classId.setCellValueFactory(new PropertyValueFactory<Class,String>(\"classId\"));\n classname.setCellValueFactory(new PropertyValueFactory<>(\"className\"));\n numofPeople.setCellValueFactory(new PropertyValueFactory<>(\"numberOfPeople\"));\n MaximumPeople.setCellValueFactory(new PropertyValueFactory<>(\"maxNumberOfPeople\"));\n courseID.setCellValueFactory(new PropertyValueFactory<>(\"courseId\"));\n basic_grade.setCellValueFactory(new PropertyValueFactory<>(\"BasicGrade\"));\n \n maintable.getColumns().addAll(classId,classname,numofPeople,MaximumPeople,courseID,basic_grade);\n\n\n data = class_dal.GetData();\n maintable.setItems(data);\n }",
"public void initializeUserProductTypeTableView() {\n\t\tObservableList<ProductType> typeList = FXCollections.observableArrayList(restaurant.getProductTypes());\n\n\t\tcolumnProductTypeName.setCellValueFactory(new PropertyValueFactory<ProductType, String>(\"name\"));\n\t\tcolumnProductTypeCondition.setCellValueFactory(new PropertyValueFactory<ProductType, Condition>(\"condition\"));\n\n\t\ttableViewProductTypeList.setItems(typeList);\n\n\t\ttableViewProductTypeList.setRowFactory(tv -> {\n\t\t\tTableRow<ProductType> row = new TableRow<>();\n\t\t\trow.setOnMouseClicked(event -> {\n\t\t\t\tif (event.getClickCount() == 2 && (!row.isEmpty())) {\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tFXMLLoader updateClientFxml = new FXMLLoader(getClass().getResource(\"update-productType.fxml\"));\n\t\t\t\t\t\tupdateClientFxml.setController(this);\n\t\t\t\t\t\tParent root = updateClientFxml.load();\n\t\t\t\t\t\tmainPane_OptionsWindow.getChildren().setAll(root);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn row;\n\t\t});\n\t}",
"@FXML\r\n\tprivate void initialize() {\r\n\t\ttransactionList = refreshTransactions();\r\n\t\tif (transactionList != null) {\r\n\t\t\tfillTable();\r\n\t\t}\r\n\t}",
"public void initTable();",
"private void aveApptTableFill(){\n ObservableList<AverageAppointments> aveAppointments = FXCollections.observableArrayList();\n try {\n //Query and get results\n aveAppointments = AppointmentDB.getAverageAppointments();\n }\n catch (SQLException e){\n dialog(\"ERROR\",\"SQL Error\",\"Error: \"+ e.getMessage());\n }\n aveApptTable.setItems(aveAppointments);\n }",
"@Override\r\n\tpublic void initialize(URL arg0, ResourceBundle arg1) {\n\t\tMySQLDAO dao;\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tdao = new MySQLDAO();\r\n\t\t\tTestsList tList = dao.loadAllTests();\r\n\t\t\tdata = FXCollections.observableList(tList);\r\n\t\t\t\r\n\t\t\tid.setCellValueFactory(new PropertyValueFactory<Test, Integer>(\"id\"));\r\n\t\t\t\r\n\t\t\tname.setCellValueFactory(new PropertyValueFactory<Test, String>(\"name\"));\r\n\t\t\tname.setCellFactory(TextFieldTableCell.<Test>forTableColumn());\r\n\t\t\t\r\n\t\t\ttestsTable.setItems(data);\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"@Override\r\n public void initialize(URL url, ResourceBundle rb) { \r\n dateColumn.setCellValueFactory(cellData -> cellData.getValue().dateProperty());\r\n startColumn.setCellValueFactory(cellData -> cellData.getValue().startProperty());\r\n endColumn.setCellValueFactory(cellData -> cellData.getValue().endProperty());\r\n clientColumn.setCellValueFactory(cellData -> cellData.getValue().customerNameProperty());\r\n locationColumn.setCellValueFactory(cellData -> cellData.getValue().locationProperty());\r\n titleColumn.setCellValueFactory(cellData -> cellData.getValue().titleProperty());\r\n typeColumn.setCellValueFactory(cellData -> cellData.getValue().typeProperty());\r\n descriptionColumn.setCellValueFactory(cellData -> cellData.getValue().descriptionProperty());\r\n detailsTableView.setItems(AccessDB.selectedAppointment());\r\n }",
"public void initializeUserClientTableView() {\n\t\tObservableList<Client> clientsList = FXCollections.observableArrayList(restaurant.getClients());\n\n\t\tcolumnClientName.setCellValueFactory(new PropertyValueFactory<Client, String>(\"names\"));\n\t\tcolumnClientLastName.setCellValueFactory(new PropertyValueFactory<Client, String>(\"surnames\"));\n\t\tcolumnClientID.setCellValueFactory(new PropertyValueFactory<Client, String>(\"idNumber\"));\n\t\tcolumnClientAdress.setCellValueFactory(new PropertyValueFactory<Client, String>(\"adress\"));\n\t\tcolumnClientPhoneNumber.setCellValueFactory(new PropertyValueFactory<Client, String>(\"phoneNumber\"));\n\t\tcolumnClientObservations.setCellValueFactory(new PropertyValueFactory<Client, String>(\"observations\"));\n\t\tcolumnClientCondition.setCellValueFactory(new PropertyValueFactory<Client, Condition>(\"condition\"));\n\n\t\ttableViewClientsList.setItems(clientsList);\n\n\t\ttableViewClientsList.setRowFactory(tv -> {\n\t\t\tTableRow<Client> row = new TableRow<>();\n\t\t\trow.setOnMouseClicked(event -> {\n\t\t\t\tif (event.getClickCount() == 2 && (!row.isEmpty())) {\n\t\t\t\t\tClient client = row.getItem();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tFXMLLoader updateClientFxml = new FXMLLoader(getClass().getResource(\"Update-Client.fxml\"));\n\t\t\t\t\t\tupdateClientFxml.setController(this);\n\t\t\t\t\t\tParent root = updateClientFxml.load();\n\t\t\t\t\t\tmainPane_OptionsWindow.getChildren().setAll(root);\n\n\t\t\t\t\t\tLabelUpdateClientName.setText(client.getNames());\n\t\t\t\t\t\ttxtUpdateClientNames.setText(client.getNames());\n\t\t\t\t\t\ttxtUpdateClientSurnames.setText(client.getSurnames());\n\t\t\t\t\t\ttxtUpdateClientPhone.setText(client.getPhoneNumber());\n\t\t\t\t\t\ttxtUpdateClientAdress.setText(client.getAdress());\n\t\t\t\t\t\ttxtUpdateClientId.setText(client.getIdNumber());\n\t\t\t\t\t\ttxtUpdateClientObservations.setText(client.getObservations());\n\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn row;\n\t\t});\n\t}",
"protected abstract void initialiseTable();",
"@Override public void initialize(URL url, ResourceBundle rb) {\n partTableView.setItems(Inventory.getAllParts());\n partIdCol.setCellValueFactory(new PropertyValueFactory<>(\"id\"));\n partInvCol.setCellValueFactory(new PropertyValueFactory<>(\"stock\"));\n partNameCol.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\n partPriceCol.setCellValueFactory(new PropertyValueFactory<>(\"price\"));\n\n //initialize is called with every button action\n associatedPartIdCol.setCellValueFactory(new PropertyValueFactory<>(\"id\"));\n associatedPartInvCol.setCellValueFactory(new PropertyValueFactory<>(\"stock\"));\n associatedPartNameCol.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\n associatedPartPriceCol.setCellValueFactory(new PropertyValueFactory<>(\"price\"));\n\n }",
"@Override\n public void initialize(URL location, ResourceBundle resources) {\n String searchId = Controller.rId;\n char ch1 = searchId.charAt(0);\n\n\n String sql = \"select * from notifications where rolenum = \" + ch1 + \"\";\n\n try {\n Connection conn = DBConnector.getConnection();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql);\n System.out.println(\"connection succesfull\");\n\n while (rs.next()) {\n System.out.println(\"trying2\");\n oblist.add(new NotificationTable(\n rs.getString(\"nsubj\"),\n rs.getDate(\"ndate\")));\n }\n\n rs.close();\n stmt.close();\n conn.close();\n System.out.println(\"connection closed\");\n\n\n col_nsubj.setCellValueFactory(new PropertyValueFactory<>(\"nsubj\"));\n col_ndate.setCellValueFactory(new PropertyValueFactory<>(\"ndate\"));\n table.setItems(oblist);\n\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n\n }",
"@Override\r\n\tpublic void initialize(URL arg0, ResourceBundle arg1) {\n\t\tTableColumn workflowName = new TableColumn(\"Name\");\r\n\t\t\r\n\t\tworkflowName.setCellValueFactory(\r\n new PropertyValueFactory<WorkflowEntry, String>(\"name\"));\r\n\t\t\r\n\t\tTableColumn info = new TableColumn(\"Info\");\r\n\t\t\r\n\t info.setCellValueFactory(\r\n new PropertyValueFactory<WorkflowEntry, String>(\"info\"));\r\n\t \r\n\t // Adding a button to tableView\r\n\t \r\n\t TableColumn actionCol = new TableColumn( \"Action\" );\r\n actionCol.setCellValueFactory( new PropertyValueFactory<>( \"DUMMY\" ) );\r\n \r\n\t\ttableView.getColumns().addAll(workflowName,info,actionCol);\r\n\r\n\t}",
"@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n currentOrderTable.setEditable(true);\r\n tableID.setCellValueFactory(new PropertyValueFactory<>(\"tid\"));\r\n cusID.setCellValueFactory(new PropertyValueFactory<>(\"cid\"));\r\n DBConn c=new DBConn();\r\n conn=c.geConnection();\r\n \r\n \r\n }",
"@Override\n public void initialize(URL location, ResourceBundle resources) {\n\n // Load preferences\n preferences = Preferences.userRoot().node(APP_PREFS);\n txtKey.setText(preferences.get(APP_PREFS_KEY, \"\"));\n txtSteamId.setText(preferences.get(APP_PREFS_STEAM_ID, \"\"));\n txtLanguage.setText(preferences.get(APP_PREFS_LANGUAGE, \"english\"));\n\n // Build tableview\n colName.setCellValueFactory(cellData -> cellData.getValue().nameProperty());\n colAchievementsTotal.setCellValueFactory(cellData -> cellData.getValue().achievementsTotalProperty());\n colAchievementsDone.setCellValueFactory(cellData -> cellData.getValue().achievementsDoneProperty());\n colAchievementsPercentage.setCellValueFactory(cellData -> cellData.getValue().achievementsPercentageProperty());\n\n // Add table view mouse listener\n tableView.setRowFactory(tv -> {\n TableRow<Game> row = new TableRow<>();\n row.setOnMouseClicked(event -> {\n if (event.getClickCount() == 2 && (!row.isEmpty())) {\n showAchievementsForm(row.getItem());\n }\n });\n return row;\n });\n\n lblInfo.setText(\"No games loaded ...\");\n }",
"private void initTablesViews()\n {\n // Tokens\n tc_token_id.setCellValueFactory(new PropertyValueFactory<>(\"token\"));\n tc_tipo_token_id.setCellValueFactory(new PropertyValueFactory<>(\"tipoToken\"));\n tc_linea_token_id.setCellValueFactory(new PropertyValueFactory<>(\"linea\"));\n tv_tokens_encontrados_id.setItems(info_tabla_tokens);\n\n // Errores\n tc_error_id.setCellValueFactory(new PropertyValueFactory<>(\"error\"));\n tc_tipo_error_id.setCellValueFactory(new PropertyValueFactory<>(\"tipoError\"));\n tc_linea_error_id.setCellValueFactory(new PropertyValueFactory<>(\"linea_error\"));\n tv_errores_lexicos_id.setItems(info_tabla_errores);\n }",
"@Override\n\tpublic void onAppLoaded()\n\t{\n\t\tmHandler.post(new Runnable(){\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// Get new list of apps and populate your list\n\t\t\t\tmApps = mRequestManager.getApps();\n\t\t\t\tpopulateGrid();\n\t\t\t}\n\t\t});\n\t}",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n // TODO\n //Sets initial TableView Data\n ObservableList<customer> custData = Query.getAllCustomer();\n \n\n custId_col.setCellValueFactory(new PropertyValueFactory<>(\"customerId\"));\n custName_col.setCellValueFactory(new PropertyValueFactory<>(\"customerName\"));\n custPhone_col.setCellValueFactory(new PropertyValueFactory<>(\"customerPhone\"));\n custAddId_col.setCellValueFactory(new PropertyValueFactory<>(\"addressId\"));\n custAddress_col.setCellValueFactory(new PropertyValueFactory<>(\"address\"));\n custCity_col.setCellValueFactory(new PropertyValueFactory<>(\"city\"));\n custCountry_col.setCellValueFactory(new PropertyValueFactory<>(\"country\"));\n custZip_col.setCellValueFactory(new PropertyValueFactory<>(\"postalCode\"));\n \n customerTableView.setItems(custData);\n \n }",
"private void init() {\n try {\n renderer = new TableNameRenderer(tableHome);\n if (listId != null) {\n model = new DefaultComboBoxModel(listId);\n }\n else {\n Object[] idList = renderer.getTableIdList(step, extraTableRef);\n model = new DefaultComboBoxModel(idList);\n }\n setRenderer(renderer);\n setModel(model);\n }\n catch (PersistenceException ex) {\n ex.printStackTrace();\n }\n }",
"public void tableViewSetup() {\n nameColumn.setCellValueFactory(new PropertyValueFactory<>(\"Name\"));\n productTable.getColumns().add(nameColumn);\n\n manuColumn.setCellValueFactory(new PropertyValueFactory<>(\"Manufacturer\"));\n productTable.getColumns().add(manuColumn);\n\n typeColumn.setCellValueFactory(new PropertyValueFactory<>(\"Type\"));\n productTable.getColumns().add(typeColumn);\n }",
"private void loadData() {\n\n // connect the table column with the attributes of the patient from the Queries class\n id_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"pstiantID\"));\n name_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\n date_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"reserveDate\"));\n time_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"reserveTime\"));\n\n try {\n\n // database related code \"MySql\"\n ps = con.prepareStatement(\"select * from visitInfo \");\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n\n // load data to the observable list\n editOL.add(new Queries(new SimpleStringProperty(rs.getString(\"id\")),\n new SimpleStringProperty(rs.getString(\"patiantID\")),\n new SimpleStringProperty(rs.getString(\"patiant_name\")),\n new SimpleStringProperty(rs.getString(\"visit_type\")),\n new SimpleStringProperty(rs.getString(\"payment_value\")),\n new SimpleStringProperty(rs.getString(\"reserve_date\")),\n new SimpleStringProperty(rs.getString(\"reserve_time\")),\n new SimpleStringProperty(rs.getString(\"attend_date\")),\n new SimpleStringProperty(rs.getString(\"attend_time\")),\n new SimpleStringProperty(rs.getString(\"payment_date\")),\n new SimpleStringProperty(rs.getString(\"attend\")),\n new SimpleStringProperty(rs.getString(\"attend_type\"))\n\n ));\n }\n\n // assigning the observable list to the table\n table_view_in_edit.setItems(editOL);\n\n ps.close();\n rs.close();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }",
"public void initializeUserOrdersTableView() {\n\t\tSystemUser user = restaurant.returnUser(txtSystemUserUsername.getText());\n\t\t\n\t\tObservableList<Order> userOrder = FXCollections.observableArrayList(user.getOrders());\n\t\tObservableList<Order> orders = FXCollections.observableArrayList();\n\n\t\tfor (int i = 0; i < userOrder.size(); i++) {\n\t\t\tOrder order = userOrder.get(i);\n\n\t\t\tif (order.getUser().getUserName().equals(empleadoUsername)) {\n\t\t\t\torders.add(order);\n\t\t\t}\n\t\t}\n\n\t\ttableViewOrders.getItems().clear();\n\n\t\tcolumnOrderCode.setCellValueFactory(new PropertyValueFactory<Order, String>(\"code\"));\n\t\tcolumnOrderState.setCellValueFactory(new PropertyValueFactory<Order, State>(\"state\"));\n\t\tcolumnOrderEmployee.setCellValueFactory(new PropertyValueFactory<Order, String>(\"employeeName\"));\n\t\tcolumnOrderClient.setCellValueFactory(new PropertyValueFactory<Order, String>(\"clientName\"));\n\t\tcolumnOrderProducts.setCellValueFactory(new PropertyValueFactory<Order, String>(\"products\"));\n\t\tcolumnOrderCant.setCellValueFactory(new PropertyValueFactory<Order, String>(\"stringQuantity\"));\n\t\tcolumnOrderDate.setCellValueFactory(new PropertyValueFactory<Order, String>(\"date\"));\n\t\tcolumnOrderHour.setCellValueFactory(new PropertyValueFactory<Order, String>(\"hour\"));\n\t\tcolumnOrderObservations.setCellValueFactory(new PropertyValueFactory<Order, String>(\"observations\"));\n\t\t\n\n\t\ttableViewOrders.setItems(orders);\n\n\t\ttableViewOrders.setRowFactory(tv -> {\n\t\t\tTableRow<Order> row = new TableRow<>();\n\t\t\trow.setOnMouseClicked(event -> {\n\t\t\t\tif (event.getClickCount() == 2 && (!row.isEmpty())) {\n\t\t\t\t\tOrder order = row.getItem();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tFXMLLoader updateClientFxml = new FXMLLoader(getClass().getResource(\"update-OrderState.fxml\"));\n\t\t\t\t\t\tupdateClientFxml.setController(this);\n\t\t\t\t\t\tParent root = updateClientFxml.load();\n\t\t\t\t\t\tmainPane_OptionsWindow.getChildren().setAll(root);\n\n\t\t\t\t\t\tlabelOrderCode.setText(order.getCode());\n\n\t\t\t\t\t\tObservableList<State> statesOrderUser; \n\t\t\t\t\t\tif (order.getState().equals(State.REQUESTED)) {\n\t\t\t\t\t\t\tstatesOrderUser = FXCollections.observableArrayList(State.IN_PROCESS);\t\t\t\t\t\t\t\n\t\t\t\t\t\t}else if (order.getState().equals(State.IN_PROCESS)) {\n\t\t\t\t\t\t\tstatesOrderUser = FXCollections.observableArrayList(State.SENT);\t\t\t\t\t\t\t\n\t\t\t\t\t\t}else if (order.getState().equals(State.SENT)) {\n\t\t\t\t\t\t\tstatesOrderUser = FXCollections.observableArrayList(State.DELIVERED);\t\t\t\t\t\t\t\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tstatesOrderUser = FXCollections.observableArrayList(State.DELIVERED);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinitializeChoiceState(statesOrderUser);\n\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn row;\n\t\t});\n\t}",
"private void populateTable(Bundle savedInstanceState)\n {\n valueViews = new HashMap<String, TextView>();\n frequencyViews = new HashMap<String, TextView>();\n nextLossViews = new HashMap<String, TextView>();\n\n clickedLossesMap = new HashMap<View, MoneyLoss>();\n\n /* Use the bad budget application wide data object to get a hold of all the user's losses */\n BadBudgetData bbd = ((BadBudgetApplication) this.getApplication()).getBadBudgetUserData();\n List<MoneyLoss> losses = bbd.getLosses();\n losses = LossesActivity.sortLosses(losses);\n\n TableLayout table = (TableLayout) findViewById(R.id.lossesTable);\n\n /* For each loss we setup a row in our table with the name/description, value/amount,\n frequency, and destination fields.\n */\n for (final MoneyLoss loss : losses) {\n\n final MoneyLoss currLoss = loss;\n\n TableRow row = new TableRow(this);\n\n //Setup the name/description field\n final TextView descriptionView = new TextView(this);\n ((BadBudgetApplication)this.getApplication()).tableCellSetLayoutParams(descriptionView, currLoss.expenseDescription());\n descriptionView.setPaintFlags(descriptionView.getPaintFlags()| Paint.UNDERLINE_TEXT_FLAG);\n\n /*\n The description when clicked should take us to a page where the user can edit the\n loss that they clicked on.\n */\n clickedLossesMap.put(descriptionView, currLoss);\n descriptionView.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v)\n {\n MoneyLoss clickedLoss = clickedLossesMap.get(v);\n\n Intent intent = new Intent(LossesActivity.this, AddLossActivity.class);\n intent.putExtra(BadBudgetApplication.EDIT_KEY, true);\n intent.putExtra(BadBudgetApplication.EDIT_OBJECT_ID_KEY, clickedLoss.expenseDescription());\n startActivityForResult(intent, BadBudgetApplication.FORM_RESULT_REQUEST);\n }\n });\n\n //Setup the value field\n final TextView lossAmountView = new TextView(this);\n valueViews.put(currLoss.expenseDescription(), lossAmountView);\n double lossValue = currLoss.lossAmount();\n String lossValueString = BadBudgetApplication.roundedDoubleBB(lossValue);\n ((BadBudgetApplication)this.getApplication()).tableCellSetLayoutParams(lossAmountView, lossValueString);\n\n //Setup the frequency field\n final TextView frequencyView = new TextView(this);\n frequencyView.setPaintFlags(frequencyView.getPaintFlags()|Paint.UNDERLINE_TEXT_FLAG);\n frequencyViews.put(currLoss.expenseDescription(), frequencyView);\n\n if (currLoss.lossFrequency() != Frequency.oneTime) {\n frequencyView.setOnClickListener(new View.OnClickListener() {\n\n public void onClick(View v) {\n Frequency currentToggleFreq = BadBudgetApplication.freqFromShortHand(frequencyView.getText().toString());\n Frequency convertToggleFreq = BadBudgetApplication.getNextToggleFreq(currentToggleFreq);\n double toggleAmount = Prediction.toggle(currLoss.lossAmount(), currLoss.lossFrequency(), convertToggleFreq);\n\n frequencyView.setText(BadBudgetApplication.shortHandFreq(convertToggleFreq));\n lossAmountView.setText(BadBudgetApplication.roundedDoubleBB(toggleAmount));\n if (convertToggleFreq != currLoss.lossFrequency()) {\n lossAmountView.setText(lossAmountView.getText() + \" \" + BadBudgetApplication.TEMP_FREQUENCY_AMOUNT_MESSAGE);\n }\n }\n\n });\n }\n String frequencyString;\n if (savedInstanceState == null)\n {\n frequencyString = BadBudgetApplication.shortHandFreq(currLoss.lossFrequency());\n }\n else\n {\n Frequency savedFreq = (Frequency) savedInstanceState.getSerializable(BadBudgetApplication.TOGGLED_FREQUENCY_PREFIX_KEY + currLoss.expenseDescription());\n if (savedFreq != null) {\n frequencyString = BadBudgetApplication.shortHandFreq(savedFreq);\n if (savedFreq != currLoss.lossFrequency()) {\n double toggleAmount = Prediction.toggle(currLoss.lossAmount(), currLoss.lossFrequency(), savedFreq);\n lossAmountView.setText(BadBudgetApplication.roundedDoubleBB(toggleAmount) + \" \" + BadBudgetApplication.TEMP_FREQUENCY_AMOUNT_MESSAGE);\n }\n }\n else\n {\n frequencyString = BadBudgetApplication.shortHandFreq(currLoss.lossFrequency());\n }\n }\n ((BadBudgetApplication)this.getApplication()).tableCellSetLayoutParams(frequencyView, frequencyString);\n\n //Setup the next loss field.\n TextView nextLossView = new TextView(this);\n nextLossViews.put(currLoss.expenseDescription(), nextLossView);\n\n String nextLossString = BadBudgetApplication.dateString(currLoss.nextLoss());\n\n ((BadBudgetApplication)this.getApplication()).tableCellSetLayoutParams(nextLossView, nextLossString);\n ((BadBudgetApplication)this.getApplication()).tableAdjustBorderForLastColumn(nextLossView);\n\n row.addView(descriptionView);\n row.addView(lossAmountView);\n row.addView(frequencyView);\n row.addView(nextLossView);\n\n table.addView(row);\n }\n\n //Add in the total row and budget row with a toggable frequencies\n if (savedInstanceState == null)\n {\n addBudgetRow(BadBudgetApplication.DEFAULT_TOTAL_FREQUENCY);\n addEmptyRow();\n addTotalRow(BadBudgetApplication.DEFAULT_TOTAL_FREQUENCY);\n }\n else\n {\n addBudgetRow((Frequency)savedInstanceState.getSerializable(BadBudgetApplication.BUDGET_TOTAL_FREQ_KEY));\n addEmptyRow();\n addTotalRow((Frequency)savedInstanceState.getSerializable(BadBudgetApplication.TOTAL_FREQ_KEY));\n }\n }",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n itemName.setCellValueFactory(new PropertyValueFactory<Item, String>(\"Name\"));\n type.setCellValueFactory(new PropertyValueFactory<Item, String>(\"Type\"));\n category.setCellValueFactory(new PropertyValueFactory<Category, String>(\"CategoryName\"));\n description.setCellValueFactory(new PropertyValueFactory<Item, String>(\"Description\"));\n price.setCellValueFactory(new PropertyValueFactory<Item, Double>(\"Price\"));\n quantity.setCellValueFactory(new PropertyValueFactory<Item, Integer>(\"Quantity\"));\n rating.setCellValueFactory(new PropertyValueFactory<Item, Integer>(\"Rating\"));\n author.setCellValueFactory(new PropertyValueFactory<Item, String>(\"Author\"));\n publishDate.setCellValueFactory(new PropertyValueFactory<Item, Date>(\"PublishDate\"));\n pageNumber.setCellValueFactory(new PropertyValueFactory<Item, Integer>(\"PageNumber\"));\n\n ArrayList<Item> items = sba.selectItems();\n\n ObservableList<Item> data = FXCollections.<Item>observableArrayList(items);\n itemsTable.setItems(data);\n\n if (ws.getWishlistId(cs.showcustomer(idlogin).getUserid()) == 0) {\n cs.showcustomer(idlogin).setWishId((ws.createWishlist(cs.showcustomer(idlogin).getUserid())));\n }\n\n }",
"@Override\n public void initialize(URL url, ResourceBundle resourceBundle) {\n\n idColPart.setCellValueFactory(new PropertyValueFactory<>(\"id\"));\n nameColPart.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\n invColPart.setCellValueFactory(new PropertyValueFactory<>(\"stock\"));\n priceColPart.setCellValueFactory(new PropertyValueFactory<>(\"price\"));\n\n idColProduct.setCellValueFactory(new PropertyValueFactory<>(\"id\"));\n nameColProduct.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\n invColProduct.setCellValueFactory(new PropertyValueFactory<>(\"stock\"));\n priceColProduct.setCellValueFactory(new PropertyValueFactory<>(\"price\"));\n\n\n partTableView.setItems(Inventory.getAllParts());\n productTableView.setItems(Inventory.getAllProducts());\n\n\n\n\n\n }",
"private void init() {\n dao = new ProductDAO();\n model = new DefaultTableModel();\n \n try {\n showAll();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n \n }",
"@Override\r\n public void initialize(URL url, ResourceBundle resourceBundle) {\r\n\r\n appointmentsTable.setItems(DBAppointments.getAllAppointments());\r\n appointmentID.setCellValueFactory(new PropertyValueFactory<>(\"appointmentID\"));\r\n title.setCellValueFactory(new PropertyValueFactory<>(\"title\"));\r\n Description.setCellValueFactory(new PropertyValueFactory<>(\"description\"));\r\n location.setCellValueFactory(new PropertyValueFactory<>(\"location\"));\r\n contact.setCellValueFactory(new PropertyValueFactory<>(\"contactID\"));\r\n type.setCellValueFactory(new PropertyValueFactory<>(\"type\"));\r\n startDateTime.setCellValueFactory(new PropertyValueFactory<>(\"Start\"));\r\n endDateTime.setCellValueFactory(new PropertyValueFactory<>(\"End\"));\r\n customerID.setCellValueFactory(new PropertyValueFactory<>(\"customerID\"));\r\n }",
"public void fillPatientsTable()\r\n\t{\r\n\t\tdata = FXCollections.observableArrayList();\r\n\r\n\t\tResultSet patients = databaseHandler.execQuery(\"select adrID, patID, ID, name, gender, phoneNum, dateOfBirth from patients\");\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tTableColumn<ObservableList, String> pID = new TableColumn<>(\"pID\");\r\n\t\t\tpID.setMinWidth(30);\r\n\t\t\tpID.setCellValueFactory(param -> new SimpleStringProperty(param.getValue().get(0).toString()));\r\n\r\n\t\t\tTableColumn<ObservableList, String> ID = new TableColumn<>(\"ID\");\r\n\t\t\tID.setMinWidth(90);\r\n\t\t\tID.setCellValueFactory(param -> new SimpleStringProperty(param.getValue().get(1).toString()));\r\n\r\n\t\t\tTableColumn<ObservableList, String> name = new TableColumn<>(\"Name\");\r\n\t\t\tname.setMinWidth(120);\r\n\t\t\tname.setCellValueFactory(param -> new SimpleStringProperty(param.getValue().get(2).toString()));\r\n\r\n\t\t\tTableColumn<ObservableList, String> gender = new TableColumn<>(\"Gender\");\r\n\t\t\tgender.setMinWidth(55);\r\n\t\t\tgender.setCellValueFactory(param -> new SimpleStringProperty(param.getValue().get(3).toString()));\r\n\r\n\t\t\tTableColumn<ObservableList, String> sim = new TableColumn<>(\"Phone Number\");\r\n\t\t\tsim.setMinWidth(120);\r\n\t\t\tsim.setCellValueFactory(param -> new SimpleStringProperty(param.getValue().get(4).toString()));\r\n\r\n\t\t\tTableColumn<ObservableList, String> dob = new TableColumn<>(\"Date of birth\");\r\n\t\t\tdob.setMinWidth(60);\r\n\t\t\tdob.setCellValueFactory(param -> new SimpleStringProperty(param.getValue().get(5).toString()));\r\n\r\n\t\t\tTableColumn<ObservableList, String> city = new TableColumn<>(\"City\");\r\n\t\t\tcity.setMinWidth(110);\r\n\t\t\tcity.setCellValueFactory(param -> new SimpleStringProperty(param.getValue().get(6).toString()));\r\n\r\n\t\t\tTableColumn<ObservableList, String> street = new TableColumn<>(\"Street\");\r\n\t\t\tstreet.setMinWidth(110);\r\n\t\t\tstreet.setCellValueFactory(param -> new SimpleStringProperty(param.getValue().get(7).toString()));\r\n\r\n\t\t\tTableColumn<ObservableList, String> building = new TableColumn<>(\"Building\");\r\n\t\t\tbuilding.setMinWidth(102);\r\n\t\t\tbuilding.setCellValueFactory(param -> new SimpleStringProperty(param.getValue().get(7).toString()));\r\n\r\n\t\t\tpatientsTable.getColumns().addAll(ID, pID, name, gender, sim, dob, city, street, building);\r\n\r\n\t\t\twhile(patients.next())\r\n\t\t\t{\r\n\t\t\t\tObservableList<String> row = FXCollections.observableArrayList();\r\n\r\n\t\t\t\tfor(int i = 2; i <= patients.getMetaData().getColumnCount(); i++)\r\n\t\t\t\t\trow.add(patients.getString(i));\r\n\r\n\t\t\t\tResultSet address = databaseHandler.execQuery(\"select cID, street, building from addresses where adrID = \" + patients.getString(1));\r\n\t\t\t\taddress.first();\r\n\r\n\t\t\t\tResultSet cityName = databaseHandler.execQuery(\"select name from cities where cID = \" + address.getString(1));\r\n\t\t\t\tcityName.first();\r\n\r\n\t\t\t\trow.add(cityName.getString(1));\r\n\r\n\t\t\t\tfor(int i = 2; i <= address.getMetaData().getColumnCount(); i++)\r\n\t\t\t\t{\r\n\t\t\t\t\trow.add(address.getString(i));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdata.add(row);\r\n\t\t\t}\r\n\r\n\t\t\tpatientsTable.setItems(data);\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}",
"private void setUpTable()\n {\n //Setting the outlook of the table\n bookTable.setColumnReorderingAllowed(true);\n bookTable.setColumnCollapsingAllowed(true);\n \n \n bookTable.setContainerDataSource(allBooksBean);\n \n \n //Setting up the table data row and column\n /*bookTable.addContainerProperty(\"id\", Integer.class, null);\n bookTable.addContainerProperty(\"book name\",String.class, null);\n bookTable.addContainerProperty(\"author name\", String.class, null);\n bookTable.addContainerProperty(\"description\", String.class, null);\n bookTable.addContainerProperty(\"book genres\", String.class, null);\n */\n //The initial values in the table \n db.connectDB();\n try{\n allBooks = db.getAllBooks();\n }catch(SQLException ex)\n {\n ex.printStackTrace();\n }\n db.closeDB();\n allBooksBean.addAll(allBooks);\n \n //Set Visible columns (show certain columnes)\n bookTable.setVisibleColumns(new Object[]{\"id\",\"bookName\", \"authorName\", \"description\" ,\"bookGenreString\"});\n \n //Set height and width\n bookTable.setHeight(\"370px\");\n bookTable.setWidth(\"1000px\");\n \n //Allow the data in the table to be selected\n bookTable.setSelectable(true);\n \n //Save the selected row by saving the change Immediately\n bookTable.setImmediate(true);\n //Set the table on listener for value change\n bookTable.addValueChangeListener(new Property.ValueChangeListener()\n {\n public void valueChange(ValueChangeEvent event) {\n \n }\n\n });\n }",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n people.addAll(sp.getAll());\n idP.setCellValueFactory(new PropertyValueFactory<>(\"path_photo\"));\n price1.setCellValueFactory(new PropertyValueFactory<>(\"price\"));\n\n tabble1.setItems(people);\n try {\n ResultSet rs = c.createStatement().executeQuery(\"select path_photo, price from shoppingcart\");\n while(rs.next()){\n data1.add(new ShoppingCart(rs.getString(\"path_photo\"), rs.getDouble(\"price\")));\n \n }\n \n\n// TODO\n } catch (SQLException ex) {\n Logger.getLogger(ShoppingCartController.class.getName()).log(Level.SEVERE, null, ex);\n }\n Item2.setCellValueFactory(new PropertyValueFactory<>(\"path_photo\"));\n Price2.setCellValueFactory(new PropertyValueFactory<>(\"price\"));\n table.setItems(data1);\n }",
"private void initView() {\n\t\ttable = new JTable(ttm);\n\t\tfor (int i = 0; i < colWidths.length; i++) {\n\t\t\tTableColumn col = table.getColumnModel().getColumn(i);\n\t\t\tcol.setPreferredWidth(colWidths[i]);\n\t\t}\n\t\ttable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n\t\ttable.setFillsViewportHeight(false);\n\t\tsetViewportView(table);\n\t\tsetBorder(BorderFactory.createLineBorder(Color.black));\n\t}",
"public void initializeProductTypeTableViewAdm() {\n\t\tObservableList<ProductType> typeList = FXCollections.observableArrayList(restaurant.getProductTypes());\n\n\t\tcolumnProductTypeName.setCellValueFactory(new PropertyValueFactory<ProductType, String>(\"name\"));\n\t\tcolumnProductTypeCondition.setCellValueFactory(new PropertyValueFactory<ProductType, Condition>(\"condition\"));\n\n\t\ttableViewProductTypeList.setItems(typeList);\n\n\t\ttableViewProductTypeList.setRowFactory(tv -> {\n\t\t\tTableRow<ProductType> row = new TableRow<>();\n\t\t\trow.setOnMouseClicked(event -> {\n\t\t\t\tif (event.getClickCount() == 2 && (!row.isEmpty())) {\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tFXMLLoader updateClientFxml = new FXMLLoader(getClass().getResource(\"update-productType.fxml\"));\n\t\t\t\t\t\tupdateClientFxml.setController(this);\n\t\t\t\t\t\tParent root = updateClientFxml.load();\n\t\t\t\t\t\tmainPane_AdministratorOptionsWindow.getChildren().setAll(root);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn row;\n\t\t});\n\t}",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n // TODO\n dao = new DataAccessObject();\n getToday();\n refreshInfor();\n loadTableResPanePM();\n tableRes.setOnMouseClicked((event) -> {\n getDataSelected();\n });\n }",
"private void populateTable() {\n this.allLogs = this.auditLogService.getAllLogs();\n // Creat columns for users\n\n\n TableColumn<Map, String> actionColumn = new TableColumn<>(\"Action\");\n actionColumn.setCellValueFactory(new MapValueFactory<>(\"action\"));\n\n TableColumn<Map, String> actionByColumn = new TableColumn<>(\"By\");\n actionByColumn.setCellValueFactory(new MapValueFactory<>(\"actionByUserId\"));\n\n TableColumn<Map, String> actionAt = new TableColumn<>(\"At\");\n actionAt.setCellValueFactory(new MapValueFactory<>(\"createdAt\"));\n this.listOfLogs.getColumns().add(actionColumn);\n this.listOfLogs.getColumns().add(actionByColumn);\n this.listOfLogs.getColumns().add(actionAt);\n // Create an observable list to add customers to\n ObservableList<Map<String, Object>> items = FXCollections.<Map<String, Object>>observableArrayList();\n\n this.allLogs.forEach(log -> {\n Map<String, Object> obj = new HashMap<>();\n // Forces int to be string to be converted back to int\n obj.put(\"action\", log.getAction());\n obj.put(\"actionByUserId\", log.getActionByUserId().getName());\n obj.put(\"createdAt\", log.getCreatedAt());\n items.add(obj);\n });\n\n // Add all the users to the table\n this.listOfLogs.getItems().addAll(items);\n }",
"public void init() {\n \t\tWindow main = new Window(\"Table demo\");\n \t\tsetMainWindow(main);\n \n \t\t// set the application to use Corporate -theme\n \t\tsetTheme(\"corporate\");\n \n \t\t// Add link back to index.html\n \t\tmain.addComponent(menuLink);\n \n \t\t// create demo database\n \t\tsampleDatabase = new SampleDatabase();\n \n \t\t// Main window contains heading, two buttons, table and label\n \t\tmain.addComponent(new Label(\"<h2>Table demo</h2>\" + ACTION_DESCRIPTION,\n \t\t\t\tLabel.CONTENT_XHTML));\n \t\tOrderedLayout layout = new OrderedLayout(\n \t\t\t\tOrderedLayout.ORIENTATION_HORIZONTAL);\n \t\tlayout.addComponent(tableVisibility);\n \t\tlayout.addComponent(tableEnabler);\n \t\tlayout.addComponent(tableCaption);\n \t\tmain.addComponent(layout);\n \t\tmain.addComponent(table);\n \t\tmain.addComponent(tableLastAction);\n \t\tmain.addComponent(embeddedToolkitLink);\n \t\tmain.addComponent(tableDemoLink);\n \n \t\t// initialize demo components\n \t\tinitTable();\n \t}",
"void initTable();",
"@Override\r\n\tpublic void initializeTableContents() {\n\t\t\r\n\t}",
"public void initApp() {\r\n\t\tUtilities.program=this;\r\n\t\ttouchList = new Hashtable<Integer, Touch>();\r\n\r\n\t\t// DB\r\n\t\tqueryManager = new QueryManager(this);\r\n\r\n\t\tlong timer = System.currentTimeMillis();\r\n\t\tresults = queryManager.getCrashesALL();\r\n\t\tSystem.out.println(System.currentTimeMillis() - timer);\r\n\t\ttimer = System.currentTimeMillis();\r\n\r\n\t\t// MARKERS\r\n\t\tUtilities.markerShape = loadShape(\"marker.svg\");\r\n\t\tmarkerList = updateMarkerList();\r\n\t\t\r\n\t\t\r\n\t\t// GRID\r\n\t\tgm = new GridManager(this, map, results);\r\n\t\tSystem.out.println(\"InitApp1\");\r\n\t\tgm.computeGridValues();\r\n\t\tSystem.out.println(System.currentTimeMillis() - timer);\r\n\t\t\r\n\t\t// OTHER\r\n\t\tUtilities.font = this.loadFont(\"Helvetica-Bold-100.vlw\");\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n\tpublic void init() {\n\t\ttable = new JTable(dm);\n\t\tJScrollPane scrollPane = new JScrollPane(table);\n\n\t\tadd(scrollPane);\n\t}",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n //set up the columns in the table view for Available Parts\n fxidAvailablePartListIDCol.setCellValueFactory(new PropertyValueFactory<Part, Integer>(\"id\"));\n fxidAvailablePartListNameCol.setCellValueFactory(new PropertyValueFactory<Part, String>(\"name\"));\n fxidAvailablePartListInvCol.setCellValueFactory(new PropertyValueFactory<Part, Integer>(\"stock\"));\n fxidAvailablePartListPriceCol.setCellValueFactory(new PropertyValueFactory<Part, String>(\"price\"));\n //populate the tableview with all the parts\n this.fxidAddProdAvailableParts.setItems(Inventory.getAllParts());\n \n //set up the columns in the table view for Selected Parts\n fxidSelectedPartListIDCol.setCellValueFactory(new PropertyValueFactory<>(\"id\"));\n fxidSelectedPartListNameCol.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\n fxidSelectedPartListInvCol.setCellValueFactory(new PropertyValueFactory<>(\"stock\"));\n fxidSelectedPartListPriceCol.setCellValueFactory(new PropertyValueFactory<>(\"price\"));\n \n //set the ID of the Product\n fxidAddProdID.setText(Integer.toString(Inventory.getAllProducts().size()));\n }",
"@Override\n public void initialize(URL location, ResourceBundle resources){\n setCellTable();\n data=FXCollections.observableArrayList();\n loadData();\n }",
"@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n //set up the columns in the table\r\n idNumberColumn.setCellValueFactory\r\n (new PropertyValueFactory<Student, Integer>(\"idNumber\"));\r\n firstNameColumn.setCellValueFactory\r\n (new PropertyValueFactory<Student, String>(\"firstName\"));\r\n lastNameColumn.setCellValueFactory\r\n (new PropertyValueFactory<Student, String>(\"lastName\"));\r\n birthdayColumn.setCellValueFactory\r\n (new PropertyValueFactory<Student, LocalDate>(\"birthday\"));\r\n covidColumn.setCellValueFactory\r\n (new PropertyValueFactory<Student, LocalDate>(\"covidCase\"));\r\n \r\n try {\r\n // cast to ObservableList of Student objects\r\n tableView.setItems(FXCollections.observableList(\r\n covidMngrService.fetchStudents()));\r\n } catch (RemoteException ex) {\r\n Logger.getLogger(SecretaryStudentsTableCntrl.class.getName()).\r\n log(Level.SEVERE, null, ex);\r\n }\r\n \r\n // Update the table to allow for the first and last name fields\r\n // to be not editable\r\n tableView.setEditable(false);\r\n \r\n // firstNameColumn.setCellFactory(TextFieldTableCell.forTableColumn());\r\n // lastNameColumn.setCellFactory(TextFieldTableCell.forTableColumn());\r\n \r\n // This will disable the table to select multiple rows at once\r\n tableView.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);\r\n \r\n // Disable the detailed student view button until a row is selected\r\n this.detailedStudentViewButton.setDisable(true);\r\n }",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n tcID.setCellValueFactory(new PropertyValueFactory(\"id\"));\n tcName.setCellValueFactory(new PropertyValueFactory(\"name\"));\n tcMajor.setCellValueFactory(new PropertyValueFactory(\"major\"));\n tcGrade.setCellValueFactory(new PropertyValueFactory(\"grade\"));\n tableView.getSelectionModel().selectedItemProperty().addListener(\n event-> showSelectedStudent() );\n this.emf = Persistence.createEntityManagerFactory(\"JavaFXApplication17PU\");\n }",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n id.setCellValueFactory(new PropertyValueFactory<>(\"id\"));\n title.setCellValueFactory(new PropertyValueFactory<>(\"title\"));\n nbPerson.setCellValueFactory(new PropertyValueFactory<>(\"nbPerson\"));\n nbTable.setCellValueFactory(new PropertyValueFactory<>(\"nbTable\"));\n band.setCellValueFactory(new PropertyValueFactory<>(\"band\"));\n status.setCellValueFactory(new PropertyValueFactory<>(\"status\"));\n startDate.setCellValueFactory(new PropertyValueFactory<>(\"startDate\"));\n tableEvent.setItems(getEvent()); \n \n \n\n }",
"void initializeView() {\n displayProjectFilter();\n displayTimeFrameFilter();\n\n setUsersIntoComboBox();\n setClientsIntoComboBox();\n setProjectsIntoComboBox();\n setDateRestrictions();\n setValidators();\n setTable();\n\n selectUser();\n selectClient();\n selectProject();\n listenDatePickerStart();\n listenDatePickerEnd();\n\n removeUserFilter();\n removeProjectFilter();\n removeTimeFrameFilter();\n clearAllFilters();\n\n // this is important for hiding user combo box and stuff\n setUpUserRules();\n\n //vBox.translateXProperty().bind((scrollPane.widthProperty().subtract(vBox.widthProperty())).divide(2));\n scrollPane.widthProperty().addListener((observable, oldValue, newValue) -> {\n if (newValue != null) {\n grid.setPrefWidth(newValue.doubleValue() - (oldValue.doubleValue() - scrollPane.getViewportBounds().getWidth()));\n }\n });\n\n //TODO: Refactor this.\n setUpBarChart();\n tbvTasks.getItems().addListener((ListChangeListener.Change<? extends TaskConcrete2> c) -> {\n setUpBarChart();\n });\n\n setToolTipsForButtons();\n changeTableSize();\n }",
"@Override\n public void initialize(URL url, ResourceBundle resourceBundle) {\n\n allAppointments = Appointment.getAllAppointments();\n Appointments.setItems(allAppointments);\n AppointmentID.setCellValueFactory(new PropertyValueFactory<>(\"AppointmentID\"));\n Title.setCellValueFactory(new PropertyValueFactory<>(\"Title\"));\n Description.setCellValueFactory(new PropertyValueFactory<>(\"Description\"));\n Location.setCellValueFactory(new PropertyValueFactory<>(\"Location\"));\n Type.setCellValueFactory(new PropertyValueFactory<>(\"Type\"));\n Start.setCellValueFactory(new PropertyValueFactory<>(\"Start\"));\n End.setCellValueFactory(new PropertyValueFactory<>(\"End\"));\n Created.setCellValueFactory(new PropertyValueFactory<>(\"CreateDate\"));\n CreatedBy.setCellValueFactory(new PropertyValueFactory<>(\"CreateBy\"));\n LastUpdate.setCellValueFactory(new PropertyValueFactory<>(\"LastUpdate\"));\n UpdateBy.setCellValueFactory(new PropertyValueFactory<>(\"LastUpdateBy\"));\n CustomerID.setCellValueFactory(new PropertyValueFactory<>(\"CustomerID\"));\n UserID.setCellValueFactory(new PropertyValueFactory<>(\"UserID\"));\n ContactID.setCellValueFactory(new PropertyValueFactory<>(\"ContactID\"));\n int i = 0;\n\n for(Appointment appointment:allAppointments){\n LocalDateTime start = appointment.getStart();\n LocalDateTime current = LocalDateTime.now();\n long timeDifference = ChronoUnit.MINUTES.between(current,start);\n Customer customer = Customer.getCustomer(appointment.getCustomerID());\n String name = customer.getCustomerName();\n if(timeDifference > 0 && timeDifference < 30){\n i +=1;\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"Upcoming Appointment\");\n alert.setHeaderText(\"You have an upcoming appointment.\");\n alert.setContentText(\"In \" + timeDifference + \" minutes there is an appointment with \" + name + \".\");\n alert.showAndWait();}\n\n }\n if(i < 1){\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"No Upcoming Appointments\");\n alert.setHeaderText(\"You have no upcoming appointments.\");\n alert.setContentText(\"There is no appointment scheduled within the next 15 minutes.\");\n alert.showAndWait();}\n\n\n }",
"void appointmentListType(){\r\n if(this.appointment.getSelectedToggle().equals(this.monthRadio)){\r\n\r\n appointmentsTable.setItems(Appointment.getAppointmentMonth());\r\n appointmentID.setCellValueFactory(new PropertyValueFactory<>(\"appointmentID\"));\r\n title.setCellValueFactory(new PropertyValueFactory<>(\"title\"));\r\n Description.setCellValueFactory(new PropertyValueFactory<>(\"description\"));\r\n location.setCellValueFactory(new PropertyValueFactory<>(\"location\"));\r\n contact.setCellValueFactory(new PropertyValueFactory<>(\"contactID\"));\r\n type.setCellValueFactory(new PropertyValueFactory<>(\"type\"));\r\n startDateTime.setCellValueFactory(new PropertyValueFactory<>(\"Start\"));\r\n endDateTime.setCellValueFactory(new PropertyValueFactory<>(\"End\"));\r\n customerID.setCellValueFactory(new PropertyValueFactory<>(\"customerID\"));\r\n }\r\n\r\n else if(this.appointment.getSelectedToggle().equals(this.weekRadio)){\r\n\r\n appointmentsTable.setItems(Appointment.getAppointmentWeek());\r\n appointmentID.setCellValueFactory(new PropertyValueFactory<>(\"appointmentID\"));\r\n title.setCellValueFactory(new PropertyValueFactory<>(\"title\"));\r\n Description.setCellValueFactory(new PropertyValueFactory<>(\"description\"));\r\n location.setCellValueFactory(new PropertyValueFactory<>(\"location\"));\r\n contact.setCellValueFactory(new PropertyValueFactory<>(\"contactID\"));\r\n type.setCellValueFactory(new PropertyValueFactory<>(\"type\"));\r\n startDateTime.setCellValueFactory(new PropertyValueFactory<>(\"Start\"));\r\n endDateTime.setCellValueFactory(new PropertyValueFactory<>(\"End\"));\r\n customerID.setCellValueFactory(new PropertyValueFactory<>(\"customerID\"));\r\n }\r\n\r\n else{\r\n appointmentsTable.setItems(DBAppointments.getAllAppointments());\r\n appointmentID.setCellValueFactory(new PropertyValueFactory<>(\"appointmentID\"));\r\n title.setCellValueFactory(new PropertyValueFactory<>(\"title\"));\r\n Description.setCellValueFactory(new PropertyValueFactory<>(\"description\"));\r\n location.setCellValueFactory(new PropertyValueFactory<>(\"location\"));\r\n contact.setCellValueFactory(new PropertyValueFactory<>(\"contactID\"));\r\n type.setCellValueFactory(new PropertyValueFactory<>(\"type\"));\r\n startDateTime.setCellValueFactory(new PropertyValueFactory<>(\"Start\"));\r\n endDateTime.setCellValueFactory(new PropertyValueFactory<>(\"End\"));\r\n customerID.setCellValueFactory(new PropertyValueFactory<>(\"customerID\"));\r\n }\r\n\r\n\r\n\r\n }",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n productIDField.setEditable(false);\n productIDField.setText(\"Auto-generated\");\n productIDField.setDisable(true);\n\n //initialize the PartsTableView\n partIDColumn.setCellValueFactory(new PropertyValueFactory<Part, String>(\"id\"));\n partNameColumn.setCellValueFactory(new PropertyValueFactory<Part, String>(\"partName\"));\n partInventoryLevelColumn.setCellValueFactory(new PropertyValueFactory<Part, String>(\"partInventoryLevel\"));\n partPriceColumn.setCellValueFactory(new PropertyValueFactory<Part, String>(\"price\"));\n\n //set PartsTable to allow edits\n partsTableView.setEditable(true);\n partsTableView.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);\n\n partsTableView.setItems(Inventory.getAllParts());\n\n //initialize the AssociatedPartsTableView\n associatedPartIDColumn.setCellValueFactory(new PropertyValueFactory<Part, String>(\"id\"));\n associatedPartNameColumn.setCellValueFactory(new PropertyValueFactory<Part, String>(\"partName\"));\n associatedPartInventoryLevelColumn.setCellValueFactory(new PropertyValueFactory<Part, String>(\"partInventoryLevel\"));\n associatedPartPriceColumn.setCellValueFactory(new PropertyValueFactory<Part, String>(\"price\"));\n\n //set associatedPartsTable to allow edits\n associatedPartsTableView.setEditable(true);\n associatedPartsTableView.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);\n\n errorMessageLabel.setText(\"\");\n }",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n manager = (EntityManager) Persistence.createEntityManagerFactory(\"FelixDadeboPU\").createEntityManager();\n //database reference: \"IntroJavaFXPU\"\n\n \n StudentName.setCellValueFactory(new PropertyValueFactory<>(\"Name\"));\n StudentFollowers.setCellValueFactory(new PropertyValueFactory<>(\"Followers\"));\n\n StudentActivity.setCellValueFactory(new PropertyValueFactory<>(\"Activity\"));\n\n //enable row selection\n //(SelectionMode.MULTIPLE);\n UserTable.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);\n \n }",
"public void initializeClientTableViewAdm() {\n\t\tObservableList<Client> clientsList = FXCollections.observableArrayList(restaurant.getClients());\n\n\t\tcolumnClientName.setCellValueFactory(new PropertyValueFactory<Client, String>(\"names\"));\n\t\tcolumnClientLastName.setCellValueFactory(new PropertyValueFactory<Client, String>(\"surnames\"));\n\t\tcolumnClientID.setCellValueFactory(new PropertyValueFactory<Client, String>(\"idNumber\"));\n\t\tcolumnClientAdress.setCellValueFactory(new PropertyValueFactory<Client, String>(\"adress\"));\n\t\tcolumnClientPhoneNumber.setCellValueFactory(new PropertyValueFactory<Client, String>(\"phoneNumber\"));\n\t\tcolumnClientObservations.setCellValueFactory(new PropertyValueFactory<Client, String>(\"observations\"));\n\t\tcolumnClientCondition.setCellValueFactory(new PropertyValueFactory<Client, Condition>(\"condition\"));\n\n\t\ttableViewClientsList.setItems(clientsList);\n\n\t\ttableViewClientsList.setRowFactory(tv -> {\n\t\t\tTableRow<Client> row = new TableRow<>();\n\t\t\trow.setOnMouseClicked(event -> {\n\t\t\t\tif (event.getClickCount() == 2 && (!row.isEmpty())) {\n\t\t\t\t\tClient client = row.getItem();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tFXMLLoader updateClientFxml = new FXMLLoader(getClass().getResource(\"Update-ClientAdm.fxml\"));\n\t\t\t\t\t\tupdateClientFxml.setController(this);\n\t\t\t\t\t\tParent root = updateClientFxml.load();\n\t\t\t\t\t\tmainPane_AdministratorOptionsWindow.getChildren().setAll(root);\n\n\t\t\t\t\t\tLabelUpdateClientNameAdm.setText(client.getNames());\n\t\t\t\t\t\ttxtUpdateClientNamesAdm.setText(client.getNames());\n\t\t\t\t\t\ttxtUpdateClientSurnamesAdm.setText(client.getSurnames());\n\t\t\t\t\t\ttxtUpdateClientIdAdm.setText(client.getIdNumber());\n\t\t\t\t\t\ttxtUpdateClientAdressAdm.setText(client.getAdress());\n\t\t\t\t\t\ttxtUpdateClientPhoneAdm.setText(client.getPhoneNumber());\n\t\t\t\t\t\ttxtUpdateClientObservationsAdm.setText(client.getObservations());\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn row;\n\t\t});\n\t}",
"public void initialize()\r\n\t{\r\n\t\tdatabaseHandler = DatabaseHandler.getInstance();\r\n\t\tfillPatientsTable();\r\n\t}",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n fillTable();\n // TODO\n }",
"@FXML\n void OnActionWeeklyAppointments(ActionEvent event){\n getTableData();\n MSAppointmentsTableView.setItems(dbQuery.getWeeklyAppoinments());\n\n }",
"private void initTableView() {\n try {\n NonEditableDefaultTableModel dtm = new NonEditableDefaultTableModel();\n dtm.setColumnIdentifiers(new String[]{\"Id\", \"Code\", \"From\", \"To\", \"Prepared\", \"Status\"});\n\n for (PayrollPeriod p : ppDao.getPayrollPeriods()) {\n\n try {\n Object[] o = new Object[]{p.getId(), p,\n sdf.format(p.getDateFrom()), sdf.format(p.getDateTo()),\n sdf.format(p.getDatePrepared()), p.getStatus()};\n dtm.addRow(o);\n } catch (Exception ex) {\n }\n\n }\n tablePayrollPeriod.setModel(dtm);\n } catch (Exception ex) {\n Logger.getLogger(PayrollPeriodInformation.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }",
"@Override\r\n\tpublic void initialize(URL arg0, ResourceBundle arg1) {\n\r\n\t\t columnMaPhieuThue.setCellValueFactory(new PropertyValueFactory<>(\"MaPhieuThue\"));\r\n\t\t columnNgayThue.setCellValueFactory(new PropertyValueFactory<>(\"NgayThue\")); \r\n\t\t columnNgayHenTra.setCellValueFactory(new PropertyValueFactory<>(\"NgayHenTra\"));\t \r\n\t\t columnMaKhachThue.setCellValueFactory(new PropertyValueFactory<>(\"KhachHangThue\"));\r\n\t\t columnMaNhanVien.setCellValueFactory(new PropertyValueFactory<>(\"NhanVienTiepNhan\"));\r\n\t\t columnTienDatCoc.setCellValueFactory(new PropertyValueFactory<>(\"HoaDonDatCoc\"));\r\n\t\t columnTinhTrang.setCellValueFactory(new PropertyValueFactory<>(\"TrangThai\"));\r\n\t\t try {\r\n\t\t\t\ttbViewPhieuChoThue.setItems(data());\r\n\t\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (SQLException 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}",
"@Override\n public void initialize(URL location, ResourceBundle resources) {\n //Initialize the tableView\n columnNames = PresentationCtrl.getInstance().getHistoryColumnNames();\n ObservableList<String[]> data = PresentationCtrl.getInstance().getHistories();\n for (int i = 0; i < 5; ++i) {\n final int index = i;\n TableColumn<String[], String> tblCol = new TableColumn<String[], String>(columnNames.get(i));\n tblCol.setCellValueFactory(cellData-> new SimpleStringProperty(cellData.getValue()[index]));\n tableView.getColumns().add(tblCol);\n }\n\n //set default behaviour while double clicks on a row\n setDoubleClickOnTable();\n tableView.setItems(data);\n }",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n \n tablePlantelCasa.setRowFactory(tr -> {\n TableRow<Jogador> row = new TableRow();\n row.setOnMouseClicked(event -> {\n if (row.isEmpty()) {\n tablePlantelCasa.getSelectionModel().clearSelection();\n } else if (event.getClickCount() == 1) {\n //jornada selecionada passa a ser a jornada selecionada na table\n jogador = row.getItem(); \n }\n });\n return row;\n });\n \n tableSuplentesCasa.setRowFactory(tr -> {\n TableRow<Jogador> row = new TableRow();\n row.setOnMouseClicked(event -> {\n if (row.isEmpty()) {\n tableSuplentesCasa.getSelectionModel().clearSelection();\n } else if (event.getClickCount() == 1) {\n //jornada selecionada passa a ser a jornada selecionada na table\n jogador = row.getItem(); \n }\n });\n return row;\n });\n \n tableTitularesCasa.setRowFactory(tr -> {\n TableRow<Jogador> row = new TableRow();\n row.setOnMouseClicked(event -> {\n if (row.isEmpty()) {\n tableTitularesCasa.getSelectionModel().clearSelection();\n } else if (event.getClickCount() == 1) {\n //jornada selecionada passa a ser a jornada selecionada na table\n jogador = row.getItem(); \n }\n });\n return row;\n });\n \n tablePlantelFora.setRowFactory(tr -> {\n TableRow<Jogador> row = new TableRow();\n row.setOnMouseClicked(event -> {\n if (row.isEmpty()) {\n tablePlantelFora.getSelectionModel().clearSelection();\n } else if (event.getClickCount() == 1) {\n //jornada selecionada passa a ser a jornada selecionada na table\n jogador = row.getItem(); \n }\n });\n return row;\n });\n \n tableTitularesFora.setRowFactory(tr -> {\n TableRow<Jogador> row = new TableRow();\n row.setOnMouseClicked(event -> {\n if (row.isEmpty()) {\n tableTitularesFora.getSelectionModel().clearSelection();\n } else if (event.getClickCount() == 1) {\n //jornada selecionada passa a ser a jornada selecionada na table\n jogador = row.getItem(); \n }\n });\n return row;\n });\n \n tableSuplentesFora.setRowFactory(tr -> {\n TableRow<Jogador> row = new TableRow();\n row.setOnMouseClicked(event -> {\n if (row.isEmpty()) {\n tableSuplentesFora.getSelectionModel().clearSelection();\n } else if (event.getClickCount() == 1) {\n //jornada selecionada passa a ser a jornada selecionada na table\n jogador = row.getItem(); \n }\n });\n return row;\n });\n\n }",
"private void preencherTabela() {\n\t\tList<Cidade> listCidade;\n\t\tCidadeDAO cidadeDAO;\n\t\tObservableList<Cidade> oListCidade;\n\n\t\t// Determina os atributos que irão preencher as colunas\n\t\tcolCidade.setCellValueFactory(new PropertyValueFactory<>(\"nomeCidades\"));\n\t\tcolEstado.setCellValueFactory(new PropertyValueFactory<>(\"nomeEstado\"));\n\t\tcolSigla.setCellValueFactory(new PropertyValueFactory<>(\"siglaEstado\"));\n\t\tcolCodigoCidade.setCellValueFactory(new PropertyValueFactory<>(\"idCidade\"));\n\t\tcolIdEstado.setCellValueFactory(new PropertyValueFactory<>(\"idEstado\"));\n\n\t\t// Instancia a lista de cidades e a DAO\n\t\tlistCidade = new ArrayList<Cidade>();\n\t\tcidadeDAO = new CidadeDAO();\n\n\t\t// Chama o metodo para selecionar todas as cidades e atribuir a lista\n\t\tlistCidade = cidadeDAO.selecionar();\n\n\t\t// Converte a lista de cidades em observablearray\n\t\toListCidade = FXCollections.observableArrayList(listCidade);\n\n\t\t// Adiciona a lista na tabela\n\t\ttblCidades.setItems(oListCidade);\n\t}",
"@FXML\n private void initialize() {\n // Initialize the person table with the two columns.\n \t//ID.setText(user.getId());\n // password.setText(user.getPassword());\n \tshowLoginDetail(null);\n \n \n }",
"@FXML\r\n\tpublic void initialize() throws SQLException {\r\n\t\ttry {\r\n\t\t\tJavafxChoiceFill();\r\n\t\t\tloadData();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\tidColumn.setCellValueFactory(new Callback<CellDataFeatures<Roster, Number>, \r\n\t\t\t\tObservableValue<Number>>() { \r\n\t\t\t@Override \r\n\t\t\tpublic ObservableValue<Number> call(CellDataFeatures<Roster, Number> data){ \r\n\t\t\t\treturn data.getValue().getStaff().getidProperty(); \r\n\t\t\t} \r\n\t\t}); \r\n\r\n\t\tFNameColumn.setCellValueFactory(new Callback<CellDataFeatures<Roster, String>, \r\n\t\t\t\tObservableValue<String>>() { \r\n\t\t\t@Override \r\n\t\t\tpublic ObservableValue<String> call(CellDataFeatures<Roster, String> data2){ \r\n\t\t\t\treturn data2.getValue().getStaff().getFnameProperty(); \r\n\t\t\t} \r\n\t\t}); \r\n\r\n\t\tLNameColumn.setCellValueFactory(new Callback<CellDataFeatures<Roster, String>, \r\n\t\t\t\tObservableValue<String>>() { \r\n\t\t\t@Override \r\n\t\t\tpublic ObservableValue<String> call(CellDataFeatures<Roster, String> data3){ \r\n\t\t\t\treturn data3.getValue().getStaff().getlnameProperty(); \r\n\t\t\t} \r\n\t\t}); }",
"public static void init() {\n resetTable();\n window.setVisible(true);\n }",
"private void populateLangTable() {\n TreeTableColumn<String, String> languages = new TreeTableColumn<>(\"Languages\");\n languages.setMaxWidth(150);\n languages.setMinWidth(150);\n languages.setCellValueFactory(new ViewRequestControllerOUTDATED.selfFactoryTest<String>());\n\n trtbl_languages.getColumns().addAll(languages);\n }",
"public void initTable() {\n this.table.setSelectable(true);\n this.table.setImmediate(true);\n this.table.setWidth(\"100%\");\n this.table.addListener(this);\n this.table.setDropHandler(this);\n this.table.addActionHandler(this);\n this.table.setDragMode(TableDragMode.ROW);\n this.table.setSizeFull();\n\n this.table.setColumnCollapsingAllowed(true);\n // table.setColumnReorderingAllowed(true);\n\n // BReiten definieren\n this.table.setColumnExpandRatio(LABEL_ICON, 1);\n this.table.setColumnExpandRatio(LABEL_DATEINAME, 3);\n this.table.setColumnExpandRatio(LABEL_DATUM, 2);\n this.table.setColumnExpandRatio(LABEL_GROESSE, 1);\n this.table.setColumnExpandRatio(LABEL_ACCESS_MODES, 1);\n this.table.setColumnHeader(LABEL_ICON, \"\");\n }",
"protected void fillTable() {\r\n\t\ttabDate.setCellValueFactory(new PropertyValueFactory<TableRowAllTransactions, String>(\"transactionDate\"));\r\n\t\ttabSenderNumber.setCellValueFactory(new PropertyValueFactory<TableRowAllTransactions, String>(\"senderNumber\"));\r\n\t\ttabReceiverNumber\r\n\t\t\t\t.setCellValueFactory(new PropertyValueFactory<TableRowAllTransactions, String>(\"receiverNumber\"));\r\n\t\ttabAmount.setCellValueFactory(new PropertyValueFactory<TableRowAllTransactions, BigDecimal>(\"amount\"));\r\n\t\ttabReference.setCellValueFactory(new PropertyValueFactory<TableRowAllTransactions, String>(\"reference\"));\r\n\r\n\t\tList<TableRowAllTransactions> tableRows = new ArrayList<TableRowAllTransactions>();\r\n\r\n\t\tfor (Transaction transaction : transactionList) {\r\n\t\t\tTableRowAllTransactions tableRow = new TableRowAllTransactions();\r\n\t\t\ttableRow.setTransactionDate(\r\n\t\t\t\t\tnew SimpleDateFormat(\"dd.MM.yyyy HH:mm:ss\").format(transaction.getTransactionDate()));\r\n\t\t\ttableRow.setSenderNumber(transaction.getSender().getNumber());\r\n\t\t\ttableRow.setReceiverNumber(transaction.getReceiver().getNumber());\r\n\t\t\ttableRow.setAmount(transaction.getAmount());\r\n\t\t\ttableRow.setReferenceString(transaction.getReference());\r\n\t\t\ttableRows.add(tableRow);\r\n\r\n\t\t}\r\n\r\n\t\tObservableList<TableRowAllTransactions> data = FXCollections.observableList(tableRows);\r\n\t\ttabTransaction.setItems(data);\r\n\t}",
"public void initialize() {\n tableIDColumn.setCellValueFactory(new PropertyValueFactory<Table, String>(\"tableID\"));\n occupiedTableColumn.setCellValueFactory(new PropertyValueFactory<Table, Boolean>(\"isOccupied\"));\n\n notification = new Notification();\n notificationArea.getChildren().setAll(notification);\n\n }",
"@FXML\n private void initialize() {\n \t// Initialize the Taxi table with the two columns.\n nameColumn.setCellValueFactory(\n \t\tcellData -> cellData.getValue().nameProperty());\n// cityColumn.setCellValueFactory(\n// \t\tcellData -> cellData.getValue().cityProperty());\n taxiNumberColumn.setCellValueFactory(\n \t\tcellData -> cellData.getValue().taxiNumberProperty());\n // Clear Taxi details.\n showTaxiDetails(null);\n\n // Listen for selection changes and show the Taxi details when changed.\n\t\tTaxiTable.getSelectionModel().selectedItemProperty().addListener(\n\t\t\t\t(observable, oldValue, newValue) -> showTaxiDetails(newValue));\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n viewModel = ViewModelProviders.of(this).get(TimeTableViewModel.class);\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);\n days = prefs.getInt(\"timetableSize\", getResources().getInteger(R.integer.timetableDaysDefault));\n viewModel.setNumDays(days);\n\n setContentView(R.layout.activity_timetable);\n popup = new TimetablePopupView(this);\n setupUIViews();\n setupListView();\n\n FloatingActionButton fab = findViewById(R.id.fabNewAppointmentButton);\n fab.setOnClickListener(v -> {\n Intent intent = new Intent(this, NewAppointmentActivity.class);\n startActivity(intent);\n });\n\n setSupportActionBar(findViewById(R.id.toolbarTimetable));\n drawerLayout = findViewById(R.id.drawerLayout_timetable);\n NavigationView navView = findViewById(R.id.nav_view);\n navView.setNavigationItemSelectedListener(new NavigationListener(TimeTableActivity.this, drawerLayout));\n ImageButton navButton = findViewById(R.id.navButton_timetable);\n navButton.setOnClickListener(new NavigationButtonListener(drawerLayout));\n }",
"@FXML\n\tprivate void initialize() {\n\t\tcode_column.setCellValueFactory(\n \t\tcellData -> cellData.getValue().Index());\n\t\tname_column.setCellValueFactory(\n \t\tcellData -> cellData.getValue().Name());\n\t\tdate_column.setCellValueFactory(\n \t\tcellData -> cellData.getValue().Date());\n\t\texpert_column.setCellValueFactory(\n \t\tcellData -> cellData.getValue().Type());\n\t\tcode_column.setStyle(\"-fx-alignment: CENTER;\");\n\t\tname_column.setStyle(\"-fx-alignment: CENTER;\");\n\t\tdate_column.setStyle(\"-fx-alignment: CENTER;\");\n\t\texpert_column.setStyle(\"-fx-alignment: CENTER;\");\n\t\tloadData();\n\t}",
"@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n // TODO\r\n dc= new mysqlconnect();\r\n populateTableView();\r\n \r\n \r\n\r\n //populateTableView();\r\n }",
"public MainActivity() {\n initComponents();\n conn = JavaConnect.ConnectDB();\n displayAllTable();\n\n }",
"public void setMainApp(Main mainApp) {\n this.mainApp = mainApp;\n\n // Add observable list data to the table\n // personTable.setItems(mainApp.getPersonData());\n }",
"@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n try {\r\n utilies.backgroundImage(imageMedicaSud);\r\n List<Utilisateur> utilisateurs= new ArrayList<Utilisateur>();\r\n utilisateurs=us.displayAll();\r\n System.out.println(utilisateurs.size());\r\n utilisateursData=FXCollections.observableList(utilisateurs);\r\n codeUtilisateur.setCellValueFactory(new PropertyValueFactory<>(\"code\"));\r\n nomUtilisateur.setCellValueFactory(new PropertyValueFactory<>(\"nom\"));\r\n prenomUtilisateur.setCellValueFactory(new PropertyValueFactory<>(\"prenom\"));\r\n motdepasseUtilisateur.setCellValueFactory(new PropertyValueFactory<>(\"password\"));\r\n emailUtilisateur.setCellValueFactory(new PropertyValueFactory<>(\"email\"));\r\n fonctionUtilisateur.setCellValueFactory(new PropertyValueFactory<>(\"fonction\"));\r\n UtilisateurTableView.setItems(utilisateursData);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(GestionDesInterventionController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n\r\n\r\n\r\n \t\r\n \t\r\n }",
"private void setCoachesTable() {\n try {\n Connection conn = DatabaseHandler.getInstance().getConnection();;\n try (Statement st = conn.createStatement()) {\n ObservableList<Coach> coachesInDB = FXCollections.observableArrayList();\n try (ResultSet rs = st.executeQuery(\"select * from szkolka.uzytkownik where id_tu=2;\")) {\n while (rs.next()) {\n coachesInDB.add(new Coach(rs.getString(\"imie\"), rs.getString(\"nazwisko\"),\n rs.getString(\"login\"), rs.getString(\"haslo\"), rs.getInt(\"id_u\")));\n }\n coachesTable.setItems(coachesInDB);\n setTableHeight();\n }\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"private void init() {\n// LoginHelper.USER = new NguoiDungDAO().selectById(\"ND002\");\n putClientProperty(\"JInternalFrame.isPalette\", Boolean.TRUE);\n getRootPane().setWindowDecorationStyle(JRootPane.NONE);\n ((BasicInternalFrameUI) this.getUI()).setNorthPane(null);\n this.setBorder(null);\n\n if (LoginHelper.quyenQuanTri()) {\n mand = \"\";\n } else {\n mand = LoginHelper.USER.getMaND();\n }\n\n tbl_dangdat0.setModel(tblModel0);\n tbl_henngay1.setModel(tblModel1);\n tbl_23.setModel(tblModel23);\n tbl_4.setModel(tblModel4);\n\n loadTable0();\n loadTable1();\n// Thread th = new Thread(this);\n// th.start();\n loadTable23();\n loadTable4();\n }",
"@FXML\n private void initialize() {\n\n setUpPlayerTable();\n }",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n // configure orders table\n orderID_column.setCellValueFactory(new PropertyValueFactory<>(\"order_id\"));\n brandName_column.setCellValueFactory(new PropertyValueFactory<>(\"brand_name\"));\n price_column.setCellValueFactory(new PropertyValueFactory<>(\"total_price\"));\n date_column.setCellValueFactory(new PropertyValueFactory<>(\"order_date\"));\n }",
"@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n productDAO=new ProductDAO();\r\n productTable.setEditable(true);\r\n nameColumn.setCellFactory(TextFieldTableCell.forTableColumn());\r\n priceColumn.setCellFactory(TextFieldTableCell.forTableColumn(new DoubleStringConverter()));\r\n initColumns();\r\n loadProductWindow();\r\n \r\n }",
"@Override\r\n\tpublic void initialize(URL location, ResourceBundle resources) {\r\n\t\tinstance = this;\r\n\t\tuser_fullname.setText(\"Hello ,\" + MainClientGUI.getUserFirstName() + \" \" + MainClientGUI.getUserLastName());\r\n\t\t// set at the table\r\n\t\tnameColumn.setCellValueFactory(new PropertyValueFactory<SalePattern, String>(\"name\"));\r\n\t\tfuelTypeColumn.setCellValueFactory(new PropertyValueFactory<SalePattern, String>(\"fuelType\"));\r\n\t\tstatusColumn.setCellValueFactory(new PropertyValueFactory<SalePattern, String>(\"status\"));\r\n\t\tstationTagColumn.setCellValueFactory(new PropertyValueFactory<SalePattern, Integer>(\"gasStationTag\"));\r\n\t\tdiscountColumn.setCellValueFactory(new PropertyValueFactory<SalePattern, Float>(\"discount\"));\r\n\t\t// this query is for get from DB the details of the sales\r\n\t\tString query = \"SELECT sp.name , f.fuelName, sp.startHour, sp.endHour, sp.discount,salePatternTag, sp.status, sp.stationTag, sp.description\"\r\n\t\t\t\t+ \" FROM sale_pattern sp, fuels f\" + \" WHERE sp.fuelType = f.fuelType\";\r\n\t\tMessage message = new Message(MessageType.REQUESTINFO, \"MarketingAgentSalesMainController_initialize_table\",\r\n\t\t\t\tquery);\r\n\t\tMainClientGUI.client.handleMessageFromClientUI(message);\r\n\t}",
"@Override\n public void initialize(URL location, ResourceBundle resources) {\n monthCol.setCellValueFactory(cellData -> new SimpleStringProperty(cellData.getValue().getMonth()));\n monthTypeCol.setCellValueFactory(cellData -> new SimpleStringProperty(cellData.getValue().getType()));\n monthNumberCol.setCellValueFactory(cellData -> new SimpleStringProperty(cellData.getValue().getNumber()));\n apptByMonthTableFill();\n\n //Report 2 fill\n consultantsFieldFill();\n apptStartCol.setCellValueFactory(cellData -> new SimpleStringProperty(cellData.getValue().getStart()));\n apptEndCol.setCellValueFactory(cellData -> new SimpleStringProperty(cellData.getValue().getEnd()));\n apptTitleCol.setCellValueFactory(cellData -> new SimpleStringProperty(cellData.getValue().getTitle()));\n apptTypeCol.setCellValueFactory(cellData -> new SimpleStringProperty(cellData.getValue().getType()));\n apptCustomerCol.setCellValueFactory(cellData -> new SimpleStringProperty(cellData.getValue().getCustomer().getCustomerName()));\n //add listener to consultant combo box\n consultantsField.valueProperty().addListener((ov, t, t1) -> onUserSelection());\n consultantsField.setValue(\"All\");\n onUserSelection();\n\n //Report 2 fill\n todCol.setCellValueFactory(cellData -> new SimpleStringProperty(cellData.getValue().getHour()));\n aveApptCol.setCellValueFactory(cellData -> new SimpleStringProperty(cellData.getValue().getCount()));\n aveApptTableFill();\n\n }"
] | [
"0.7105355",
"0.704695",
"0.69647497",
"0.68108475",
"0.6750771",
"0.67203796",
"0.6699327",
"0.66992307",
"0.66905314",
"0.656699",
"0.655214",
"0.6518684",
"0.65016246",
"0.6483291",
"0.6455372",
"0.640948",
"0.64002186",
"0.6392366",
"0.6386661",
"0.6380783",
"0.63640803",
"0.63423395",
"0.6313877",
"0.6302173",
"0.628402",
"0.628266",
"0.6275288",
"0.6265992",
"0.62606144",
"0.6249174",
"0.62408936",
"0.6231187",
"0.6222731",
"0.62213516",
"0.6220935",
"0.6214723",
"0.621333",
"0.6212253",
"0.62090653",
"0.6180925",
"0.61798847",
"0.61722434",
"0.6164487",
"0.6160205",
"0.6159434",
"0.6118528",
"0.61180085",
"0.6111406",
"0.61110336",
"0.61064523",
"0.60998845",
"0.60975116",
"0.6095246",
"0.6073727",
"0.6061988",
"0.60612315",
"0.6051624",
"0.60493064",
"0.6040755",
"0.60196596",
"0.6015164",
"0.6011696",
"0.6007873",
"0.5985695",
"0.5979264",
"0.59761417",
"0.5968001",
"0.59608537",
"0.5957394",
"0.59505177",
"0.59461564",
"0.594316",
"0.5940729",
"0.59362817",
"0.5935763",
"0.5933733",
"0.5919502",
"0.5918753",
"0.5907899",
"0.5903271",
"0.5898288",
"0.58957464",
"0.5886854",
"0.5876398",
"0.5871213",
"0.5869728",
"0.58625466",
"0.5860454",
"0.5855352",
"0.5845982",
"0.5844464",
"0.5841155",
"0.5831348",
"0.5827863",
"0.5825438",
"0.58219355",
"0.58208627",
"0.5812349",
"0.57958657",
"0.5789954",
"0.5789443"
] | 0.0 | -1 |
passes data to table | public void pass_data (int row, String name, Boolean screen, Boolean reset, int direction) {
if (reset) {
data_table.model_data(row, " ", " ", " ");
}
else {
String screen_name;
String direction_str = " ";
if (screen)
screen_name = "Yes";
else
screen_name = "No";
if (direction == 1)
direction_str = "Right";
else if (direction == 2)
direction_str = "Left";
else if (direction == 3)
direction_str = "Down";
else if (direction == 4)
direction_str = "Up";
data_table.model_data(row, name, screen_name, direction_str);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void fillData() {\n table.setRowList(data);\n }",
"private void populateTableData() {\n DefaultTableModel model = (DefaultTableModel) jTable1.getModel();\n model.setRowCount(0);\n for (Organization o : organizationDirectory.getOrganizationList()) {\n Object[] row = new Object[1];\n row[0] = o;\n //row[1] = o.getOrgName();\n model.addRow(row);\n }\n }",
"private void TampilData() {\n DefaultTableModel model = new DefaultTableModel();\n model.addColumn(\"NO\");\n model.addColumn(\"ID\");\n model.addColumn(\"NAME\");\n model.addColumn(\"USERNAME\");\n tabelakses.setModel(model);\n\n //menampilkan data database kedalam tabel\n try {\n int i=1;\n java.sql.Connection conn = new DBConnection().connect();\n java.sql.Statement stat = conn.createStatement();\n ResultSet data = stat.executeQuery(\"SELECT * FROM p_login order by Id asc\");\n while (data.next()) {\n model.addRow(new Object[]{\n (\"\" + i++),\n data.getString(\"Id\"),\n data.getString(\"Name\"),\n data.getString(\"Username\")\n });\n tabelakses.setModel(model);\n }\n } catch (Exception e) {\n System.err.println(\"ERROR:\" + e);\n }\n }",
"void addTabularData(TabularData data);",
"private void populateTable(Vector data) {\n Vector columnNames = ViewStrings.getShareColumnNames();\n ((ShareTraderTable) table).updateTable(data, columnNames);\n }",
"public void populateDataToTable() throws SQLException {\n model = (DefaultTableModel) tblOutcome.getModel();\n List<Outcome> ouc = conn.loadOutcome();\n int i = 1;\n for (Outcome oc : ouc) {\n Object[] row = new Object[5];\n row[0] = i++;\n row[1] = oc.getCode_outcome();\n row[2] = oc.getTgl_outcome();\n row[3] = oc.getJml_outcome();\n row[4] = oc.getKet_outcome();\n model.addRow(row);\n }\n }",
"private void UpdateTable() {\n\t\t\t\t\n\t\t\t}",
"private void fillTable(){\n tblModel.setRowCount(0);// xoa cac hang trong bang\n \n for(Student st: list){\n tblModel.addRow(new String[]{st.getStudentId(), st.getName(), st.getMajor(),\"\"\n + st.getMark(), st.getCapacity(), \"\" + st.isBonnus()});\n // them (\"\" + )de chuyen doi kieu float va boolean sang string\n \n }\n tblModel.fireTableDataChanged();\n }",
"public void populate(){\n DefaultTableModel dtms = (DefaultTableModel)ticketTable.getModel();\n dtms.setRowCount(0);\n for(Ticket a:ticket)\n {\n Object[] row = new Object[dtms.getColumnCount()];\n row[0]=a;\n row[1]=a.getAirlineNO();\n row[2]=a.getCustomer();\n row[3]=a.getSeat();\n row[4]=a.getAirlineAgency();\n out.println(a+\" \"+a.getAirlineNO()+\" \"+a.getCustomer()+\" \"+a.getSeat()+\" \"+a.getAirlineAgency());\n dtms.addRow(row);\n }\n }",
"private void setTableModelData() {\r\n\t\t//Spin through the list and add the individual country fields.\r\n\t\tVector<String> fields;\r\n\t\tfor (Country c : countryList) {\r\n\t\t\tfields = new Vector<String>();\r\n\t\t\tfields.add(c.getName());\r\n\t\t\tfields.add(c.getCapital());\r\n\t\t\tfields.add(c.getFoundation().toString());\r\n\t\t\tfields.add(c.getContinent());\r\n\t\t\tfields.add(String.valueOf(c.getPopulation()));\r\n\t\t\tcountryData.add(fields);\r\n\t\t}\r\n\t}",
"public void populateDataOnTable() {\n /*Defining default table model*/\n DefaultTableModel dtm = new DefaultTableModel(){\n\n @Override\n public boolean isCellEditable(int row, int column) {\n //all cells false\n return false;\n }\n };\n \n try{\n dtm.addColumn(\"Client Id\");\n dtm.addColumn(\"Request Date\");\n dtm.addColumn(\"Request Id\");\n dtm.addColumn(\"Request Subject\");\n dtm.addColumn(\"Description\");\n dtm.addColumn(\"Response Date\");\n dtm.addColumn(\"Response Id\");\n dtm.addColumn(\"Response Subject\");\n dtm.addColumn(\"Description\");\n \n /*Getting the value of clientId and setting it to the request and response*/\n BLRequestResponse blRequestResponse = new BLRequestResponse();\n ResultSet rs = blRequestResponse.selectParticularClientRequestResponse(txt_username.getText()); \n \n while(rs.next()) {\n Object objData[] = new Object[9];\n //objData[0] = this.setInt(num);\n objData[0] = rs.getInt(\"clientId\");\n objData[1] = rs.getString(\"reqDate\");\n objData[2] = rs.getInt(\"requestId\");\n objData[3] = rs.getString(\"requestSubject\");\n objData[4] = rs.getString(\"requestDescrip\");\n objData[5] = rs.getString(\"resDate\");\n objData[6] = rs.getInt(\"responseId\");\n objData[7] = rs.getString(\"responseSubject\");\n objData[8] = rs.getString(\"responseDescrip\");\n \n dtm.addRow(objData);\n }\n this.jTable1.setModel(dtm);\n }catch(Exception ex){\n JOptionPane.showMessageDialog(null, ex.getMessage(), \"Exception\", JOptionPane.INFORMATION_MESSAGE);\n }\n }",
"protected void dataTableleibie(int i) {\n\t\r\n}",
"@Override\n public void tableRows_()\n {\n }",
"private void intiPlanTable(){\n //gets all plans that are linked with the current profile\n List<Plan> planList = profile.getPlans().getPlans();\n //now add all plans to the table\n DefaultTableModel model = (DefaultTableModel) this.jTable1.getModel();\n model.setRowCount(0);\n planList.forEach((p) -> {\n model.addRow(new Object[]{p.getPlanName(),p});\n });\n }",
"public void newRow();",
"public void showData(ActionEvent actionEvent) {\n\n firstNameCol.setCellValueFactory(new PropertyValueFactory<>(\"firstName\"));\n lastNameCol.setCellValueFactory(new PropertyValueFactory<>(\"lastName\"));\n ageCol.setCellValueFactory(new PropertyValueFactory<>(\"age\"));\n\n peopleTable.setItems(returnPeople());\n }",
"@Override\n public void initData() {\n customerResponses = distributorController.getAllDistributorResponseObject();\n Object[] obj = new Object[]{\"STT\", \"Mã Nhà phân phối\", \"Tên nhà phân phối\", \"Địa chỉ\", \"Số điện thoại\", \"Email\", \"Ghi chú\"};\n tableModel = new DefaultTableModel(obj, 0);\n tableRowSorter = new TableRowSorter<>(tableModel);\n tblDistribute.setModel(tableModel);\n tblDistribute.setRowSorter(tableRowSorter);\n count = 0;\n tableModel.setRowCount(0);\n try {\n customerResponses.forEach((Object[] item) -> {\n item[0] = ++count;\n tableModel.addRow(item);\n\n });\n } catch (Exception exception) {\n log.error(\"Can't add row to table model \");\n exception.printStackTrace();\n\n }\n setButtonsEnable(btnUpdate, false, btnAdd, true, btnEdit, false, btnDelete, false, btnCancel, true);\n }",
"private void processTableData(DefaultTableModel model) {\n \tVector vector;\r\n\t\ttry {\r\n\t\t\tvector = (Vector) referenceData.getStartUPData(\"TradeAttribute\");\r\n\t\t\tIterator it = vector.iterator();\r\n\t \tint i =0;\r\n\t \twhile(it.hasNext()) {\r\n\t \t\t\r\n\t \t\tStartUPData tradeAttributes = (StartUPData) it.next();\r\n\t \t\tif(tradeAttributes.getName().equalsIgnoreCase(\"Trade Date\")) {\r\n\t \t \tmodel.insertRow(i, new Object[]{tradeAttributes.getName(),commonUTIL.dateToString(commonUTIL.getCurrentDate())});\r\n\t \t } else {\r\n\t \t\t model.insertRow(i, new Object[]{tradeAttributes.getName(),\"0\"});\r\n\t \t }\r\n\t \t\t\r\n\t \t\ti++;\r\n\t \t\t}\r\n\t \t\t\r\n\t\t} catch (RemoteException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n }",
"public void prepareTable(){\n\n TableColumn<Student, String> firstNameCol = new TableColumn<>(\"FirstName\");\n firstNameCol.setMinWidth(100);\n firstNameCol.setCellValueFactory(new PropertyValueFactory<>(\"firstname\"));\n\n TableColumn<Student, String> lastNameCol = new TableColumn<>(\"LastName\");\n lastNameCol.setMinWidth(100);\n lastNameCol.setCellValueFactory(new PropertyValueFactory<>(\"lastname\"));\n\n TableColumn<Student, String> formCol = new TableColumn<>(\"Form\");\n formCol.setMinWidth(100);\n formCol.setCellValueFactory(new PropertyValueFactory<>(\"form\"));\n\n TableColumn<Student, String> streamCol = new TableColumn<>(\"Stream\");\n streamCol.setMinWidth(100);\n streamCol.setCellValueFactory(new PropertyValueFactory<>(\"stream\"));\n\n TableColumn<Student, String> dateOfBirthCol = new TableColumn<>(\"Favorite Game\");\n dateOfBirthCol.setMinWidth(100);\n dateOfBirthCol.setCellValueFactory(new PropertyValueFactory<>(\"dateOfBirth\"));\n\n TableColumn<Student, String> genderCol = new TableColumn<>(\"Gender\");\n genderCol.setMinWidth(100);\n genderCol.setCellValueFactory(new PropertyValueFactory<>(\"gender\"));\n\n TableColumn<Student, Integer> ageCol = new TableColumn<>(\"age\");\n ageCol.setMinWidth(100);\n ageCol.setCellValueFactory(new PropertyValueFactory<>(\"age\"));\n\n TableColumn<Student, Integer> admissionCol = new TableColumn<>(\"Admission\");\n admissionCol.setMinWidth(100);\n admissionCol.setCellValueFactory(new PropertyValueFactory<>(\"admission\"));\n\n\n table.getColumns().addAll(admissionCol,firstNameCol,lastNameCol,formCol,streamCol,dateOfBirthCol,genderCol,ageCol);\n table.setItems(dao.selectAll());\n\n }",
"public Table<Integer, Integer, String> getData();",
"private void loadAllToTable() {\n try {\n ArrayList<ItemDTO> allItems=ip.getAllItems();\n DefaultTableModel dtm=(DefaultTableModel) tblItems.getModel();\n dtm.setRowCount(0);\n \n if(allItems!=null){\n for(ItemDTO item:allItems){\n \n Object[] rowdata={\n item.getiId(),\n item.getDescription(),\n item.getQtyOnHand(),\n item.getUnitPrice()\n \n };\n dtm.addRow(rowdata);\n \n }\n }\n } catch (Exception ex) {\n Logger.getLogger(AddItem.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n \n }",
"public void updateTable() {\n tabelModel.setRowCount(0);\n Link current = result.first;\n for (int i = 0; current != null; i++) {\n Object[] row = {current.getMasjid(), current.getAlamat()};\n tabelModel.addRow(row);\n current = current.next;\n }\n }",
"public void getTableData() {\n MSApptIDCol.setCellValueFactory(new PropertyValueFactory<Appointment, Integer>(\"appointmentID\"));\n MSCustIDCol.setCellValueFactory(new PropertyValueFactory<Appointment, Integer>(\"customerID\"));\n MSTitleCol.setCellValueFactory(new PropertyValueFactory<Appointment, String>(\"appointmentTitle\"));\n MSDescriptionCol.setCellValueFactory(new PropertyValueFactory<Appointment, String>(\"description\"));\n MSContactCol.setCellValueFactory(new PropertyValueFactory<Appointment, String>(\"contactName\"));\n MSLocationCol.setCellValueFactory(new PropertyValueFactory<Appointment, String>(\"location\"));\n MSTypeCol.setCellValueFactory(new PropertyValueFactory<Appointment, String>(\"appointmentType\"));\n MSStartTimeCol.setCellValueFactory(new PropertyValueFactory<Appointment, LocalDateTime>(\"appointmentStart\"));\n MSEndTimeCol.setCellValueFactory(new PropertyValueFactory<Appointment, LocalDateTime>(\"appointmentEnd\"));\n }",
"public void updateTable()\n {\n tableModelPain = new DefaultTableModel(new String [] {\"Date\", \"Pain Average\", \"Accepted by\"},0);\n tableModelVisit = new DefaultTableModel(new String [] {\"Date\", \"Hospital Name\", \"Doctor\"},0);\n ArrayList<PainEntry> painList = patient.getPainHistory();\n ArrayList<Visit> visitList = patient.getVisitHistory();\n painData = new String[3];\n visitData = new String[3];\n for (PainEntry p : painList) {\n painData[0] = new SimpleDateFormat(\"MM/dd/yyyy\").format(p.getDate());\n painData[1] = p.getAvePain()+\"\";\n if(!\"\".equals(p.getDocName())) painData[2] = p.getDocName();\n else painData[2] = \"not treated yet\";\n \n tableModelPain.addRow(painData);\n }\n for (Visit v : visitList) {\n visitData[0] = new SimpleDateFormat(\"MM/dd/yyyy\").format(v.getDate());\n visitData[1] = v.getHospital();\n visitData[2] = v.getDocName();\n tableModelVisit.addRow(visitData);\n }\n jTablePain.setModel(tableModelPain);\n jTableVisit.setModel(tableModelVisit);\n }",
"private void repopulateTableForAdd()\n {\n clearTable();\n populateTable(null);\n }",
"public void setTransactionsTable(String[][] data)\n {\n GridBagConstraints cs = new GridBagConstraints();\n remove(transactionScrollPane);\n String[] cols = {\"Account ID\", \"Transction Type\", \"Amount\"};\n transactionsTable = new JTable(data, cols);\n transactionScrollPane = new JScrollPane(transactionsTable);\n cs.gridx = 0;\n cs.gridy = 1;\n add(transactionScrollPane, cs);\n add(transactionScrollPane);\n revalidate();\n repaint();\n }",
"private void loadData() {\n\n // connect the table column with the attributes of the patient from the Queries class\n id_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"pstiantID\"));\n name_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\n date_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"reserveDate\"));\n time_In_editTable.setCellValueFactory(new PropertyValueFactory<>(\"reserveTime\"));\n\n try {\n\n // database related code \"MySql\"\n ps = con.prepareStatement(\"select * from visitInfo \");\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n\n // load data to the observable list\n editOL.add(new Queries(new SimpleStringProperty(rs.getString(\"id\")),\n new SimpleStringProperty(rs.getString(\"patiantID\")),\n new SimpleStringProperty(rs.getString(\"patiant_name\")),\n new SimpleStringProperty(rs.getString(\"visit_type\")),\n new SimpleStringProperty(rs.getString(\"payment_value\")),\n new SimpleStringProperty(rs.getString(\"reserve_date\")),\n new SimpleStringProperty(rs.getString(\"reserve_time\")),\n new SimpleStringProperty(rs.getString(\"attend_date\")),\n new SimpleStringProperty(rs.getString(\"attend_time\")),\n new SimpleStringProperty(rs.getString(\"payment_date\")),\n new SimpleStringProperty(rs.getString(\"attend\")),\n new SimpleStringProperty(rs.getString(\"attend_type\"))\n\n ));\n }\n\n // assigning the observable list to the table\n table_view_in_edit.setItems(editOL);\n\n ps.close();\n rs.close();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }",
"public void populateTable()\n {\n DefaultTableModel model = (DefaultTableModel)workRequestJTable.getModel();\n \n model.setRowCount(0);\n for(WorkRequest request : weatherOrganisation.getWorkQueue().getWorkRequestList())\n {\n Object[] row = new Object[5];\n row[0] = request;\n \n row[1] = request.getStatus();\n row[2] = request.getRequestDate();\n row[3] = request.getResolveDate();\n row[4] = request.getDriverAcknowledgement();\n \n model.addRow(row);\n \n }\n \n }",
"public void setBorrowBookDetailsToTable() {\n\n try {\n Connection con = databaseconnection.getConnection();\n Statement st = con.createStatement();\n ResultSet rs = st.executeQuery(\"select * from lending_book where status= '\" + \"pending\" + \"'\");\n\n while (rs.next()) {\n String id = rs.getString(\"id\");\n String bookName = rs.getString(\"book_name\");\n String studentName = rs.getString(\"student_name\");\n String lendingDate = rs.getString(\"borrow_date\");\n String returnDate = rs.getString(\"return_book_datte\");\n String status = rs.getString(\"status\");\n\n Object[] obj = {id, bookName, studentName, lendingDate, returnDate, status};\n\n model = (DefaultTableModel) tbl_borrowBookDetails.getModel();\n model.addRow(obj);\n\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, \"Error\");\n }\n }",
"public void displayLoanToJTable()\n {\n DefaultTableModel model = (DefaultTableModel) loan_results_jTable.getModel();\n Object rowData[] = new Object[7];\n for(int i = 0; i < _list.size(); i++)\n {\n rowData[0] = _list.get(i)._Bname;\n rowData[1] = _list.get(i)._LoanId;\n rowData[2] = _list.get(i)._ISBN;\n rowData[3] = _list.get(i)._CardId;\n rowData[4] = _list.get(i)._DateOut;\n rowData[5] = _list.get(i)._DueDate;\n rowData[6] = _list.get(i)._DateIn; \n model.addRow(rowData);\n } \n }",
"protected void fillTable() {\r\n\t\ttabDate.setCellValueFactory(new PropertyValueFactory<TableRowAllTransactions, String>(\"transactionDate\"));\r\n\t\ttabSenderNumber.setCellValueFactory(new PropertyValueFactory<TableRowAllTransactions, String>(\"senderNumber\"));\r\n\t\ttabReceiverNumber\r\n\t\t\t\t.setCellValueFactory(new PropertyValueFactory<TableRowAllTransactions, String>(\"receiverNumber\"));\r\n\t\ttabAmount.setCellValueFactory(new PropertyValueFactory<TableRowAllTransactions, BigDecimal>(\"amount\"));\r\n\t\ttabReference.setCellValueFactory(new PropertyValueFactory<TableRowAllTransactions, String>(\"reference\"));\r\n\r\n\t\tList<TableRowAllTransactions> tableRows = new ArrayList<TableRowAllTransactions>();\r\n\r\n\t\tfor (Transaction transaction : transactionList) {\r\n\t\t\tTableRowAllTransactions tableRow = new TableRowAllTransactions();\r\n\t\t\ttableRow.setTransactionDate(\r\n\t\t\t\t\tnew SimpleDateFormat(\"dd.MM.yyyy HH:mm:ss\").format(transaction.getTransactionDate()));\r\n\t\t\ttableRow.setSenderNumber(transaction.getSender().getNumber());\r\n\t\t\ttableRow.setReceiverNumber(transaction.getReceiver().getNumber());\r\n\t\t\ttableRow.setAmount(transaction.getAmount());\r\n\t\t\ttableRow.setReferenceString(transaction.getReference());\r\n\t\t\ttableRows.add(tableRow);\r\n\r\n\t\t}\r\n\r\n\t\tObservableList<TableRowAllTransactions> data = FXCollections.observableList(tableRows);\r\n\t\ttabTransaction.setItems(data);\r\n\t}",
"public void populateTable() {\n DefaultTableModel dtm = (DefaultTableModel)tblSalesPersonCommision.getModel();\n dtm.setRowCount(0);\n // for(OrderList orderlist:salesperson.getOrderlistcatalog().getSalesPersonOrder()){\n // for(Order order:salesperson.getOrderListSalesPerson().getOrderList()){ \n // for(OrderList orderlist:salesperson.getOrderlistcatalog().getOrCatalog()){\n // for(SalesPerson salesperson :business.getEmployeedirectory().getSalesPersonList()){\n \n for(OrderList orderlist:salesperson.getOrderlistcatalog().getOrCatalog()){\n Object [] row = new Object[4];\n // row[0]=.getCustomer().getCustomerId();\n // row[1]= market.getCustomer().getCustomerName();\n row[0]=orderlist;\n row[1]=orderlist.getOrdertotalprice();\n row[2]=orderlist.getSalespersoncomission();\n row[3]=orderlist.getTotalorderlistquantity();\n //3 tcomission = tcomission + orderlist.getSalespersoncomission();\n //3 totalquantity = totalquantity + orderlist.getTotalorderlistquantity();\n //3 totalorderprice = totalorderprice + orderlist.getOrdertotalprice();\n \n // row[0]=order;\n // row[1]=order.getAmountprice();\n \n dtm.addRow(row);\n // }\n // }\n } \n //2 salesperson.getOrderlistcatalog().setTotalquantitypersalesperson(totalquantity);\n //2 salesperson.getOrderlistcatalog().setTotalcommision(tcomission);\n //2 salesperson.getOrderlistcatalog().setTotalorderlistcsatalogprice(totalorderprice);\n}",
"private void loadData()\n\t{\n\t\tVector<String> columnNames = new Vector<String>();\n\t\tcolumnNames.add(\"Item Name\");\n\t\tcolumnNames.add(\"Item ID\");\n\t\tcolumnNames.add(\"Current Stock\");\n\t\tcolumnNames.add(\"Unit Price\");\n\t\tcolumnNames.add(\"Section\");\n\t\t\n\t\tVector<Vector<Object>> data= new Vector<Vector<Object>>();\n\t\t\n\t\tResultSet rs = null;\n\t\ttry \n\t\t{\n\t\t\tConnection con = Connector.DBcon();\n\t\t\tString query=\"select * from items natural join sections order by sections.s_name\";\n\t\t\tPreparedStatement pst = con.prepareStatement(query);\n\t\t\trs = pst.executeQuery();\n\t\t\t\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tVector<Object> vector = new Vector<Object>();\n\t\t for (int columnIndex = 1; columnIndex <= 9; columnIndex++)\n\t\t {\n\t\t \t\n\t\t \tvector.add(rs.getObject(1));\n\t\t \tvector.add(rs.getObject(2));\n\t\t vector.add(rs.getObject(3));\n\t\t vector.add(rs.getObject(4));\n\t\t vector.add(rs.getObject(6));\n\t\t \n\t\t }\n\t\t data.add(vector);\n\t\t\t}\n\t\t\t\n\t\t\t tableModel.setDataVector(data, columnNames);\n\t\t\t \n\t\t\t rs.close();\n\t\t\t pst.close();\n\t\t\t con.close();\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t}\n\t\t\n\t\t\n\t}",
"private void refTable() {\n try {\n String s = \"select * from stock\";\n pstm = con.prepareStatement(s);\n res = pstm.executeQuery(s);\n table.setModel(DbUtils.resultSetToTableModel(res));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"There Is No Data In Server\");\n }\n }",
"public void setData()\n {\n lbl_f_Name.setText(\"Name: \" + obj_Faculty.getName());\n lbl_f_ID.setText(\"ID: \" + obj_Faculty.getId());\n\n //CODE for fetching data from DB from tbl_Up_Events and show on table\n //Things for DB\n //Connection_to_DB it connects to Access DB\n Connect_to_DB obj_conDB = new Connect_to_DB();\n Connection obj_con = obj_conDB.make_Connection();\n\n //Statement is used for updating, inserting and deleting\n Statement stmt = null;\n ResultSet res = null;\n\n try\n {\n stmt = obj_con.createStatement();\n\n String str_Data = \"select * from tbl_Up_Events\";\n\n res = stmt.executeQuery(str_Data);\n\n while (res.next())\n {\n String Name = res.getString(\"evntName\");\n String Day = res.getString(\"evntDay\");\n String Date = res.getString(\"evntDate\");\n String Venue = res.getString(\"evntVenue\");\n String Budget = res.getString(\"evntBudget\");\n String Descript = res.getString(\"evntDescript\");\n String Club = res.getString(\"evntClub\");\n String Ticket = res.getString(\"evntTicket\");\n\n String table[] =\n {\n Name, Day, Date, Venue, Budget, Descript, Club, Ticket\n };\n\n DefaultTableModel tblModel = (DefaultTableModel) tbl_Event.getModel();\n tblModel.addRow(table);\n }\n\n obj_con.close();\n\n }\n catch (Exception ex)\n {\n JOptionPane.showMessageDialog(null, ex);\n }\n //CODE for tables ENDS\n }",
"public void onTableClicked(){\n\t\tint row = table.getSelectedRow();\n//\t\tthis.messageBox(row+\"\");\n\t\tTParm parm = table.getParmValue();\n\t\tadmDate = parm.getValue(\"ADM_DATE\", row);\n\t\tdeptCode = parm.getValue(\"DEPT_CODE\", row);\n\t\tdeCode = parm.getValue(\"DR_CODE\", row);\n\t\tclinictypeCode = parm.getValue(\"CLINICTYPE_CODE\", row);\n\t\ttime = parm.getValue(\"START_TIME\", row);\n\t\tcrmId = parm.getValue(\"CRM_ID\", row);\n//\t\tSystem.out.println(\"time==\"+time);\n\t\t\n\t}",
"private void populateTable() {\n this.allLogs = this.auditLogService.getAllLogs();\n // Creat columns for users\n\n\n TableColumn<Map, String> actionColumn = new TableColumn<>(\"Action\");\n actionColumn.setCellValueFactory(new MapValueFactory<>(\"action\"));\n\n TableColumn<Map, String> actionByColumn = new TableColumn<>(\"By\");\n actionByColumn.setCellValueFactory(new MapValueFactory<>(\"actionByUserId\"));\n\n TableColumn<Map, String> actionAt = new TableColumn<>(\"At\");\n actionAt.setCellValueFactory(new MapValueFactory<>(\"createdAt\"));\n this.listOfLogs.getColumns().add(actionColumn);\n this.listOfLogs.getColumns().add(actionByColumn);\n this.listOfLogs.getColumns().add(actionAt);\n // Create an observable list to add customers to\n ObservableList<Map<String, Object>> items = FXCollections.<Map<String, Object>>observableArrayList();\n\n this.allLogs.forEach(log -> {\n Map<String, Object> obj = new HashMap<>();\n // Forces int to be string to be converted back to int\n obj.put(\"action\", log.getAction());\n obj.put(\"actionByUserId\", log.getActionByUserId().getName());\n obj.put(\"createdAt\", log.getCreatedAt());\n items.add(obj);\n });\n\n // Add all the users to the table\n this.listOfLogs.getItems().addAll(items);\n }",
"private void setTable() {\n try {\n DefaultTableModel dtm = (DefaultTableModel) table.getModel();\n dtm.setRowCount(0);\n ArrayList<Item> itemList = ItemController.getAllItem();\n if (itemList != null) {\n for (Item item : itemList) {\n String qoh = BatchController.getQOH(item.getCode());\n if (qoh != null) {\n if (item.getRol() >= Integer.valueOf(qoh)) {\n Object row[] = {item.getCode(), item.getDesciption(), item.getRol(), qoh};\n dtm.addRow(row);\n }\n }\n\n }\n }\n if (dtm.getRowCount() == 0) {\n JOptionPane.showMessageDialog(this, \"Stock level is above ROL\");\n }\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(ROL.class.getName()).log(Level.SEVERE, null, ex);\n } catch (SQLException ex) {\n Logger.getLogger(ROL.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"private void addData(){\n\n for (Recipe obj : frecipes)\n {\n /** Create a TableRow dynamically **/\n tr = new TableRow(this);\n tr.setLayoutParams(new TableRow.LayoutParams(\n TableRow.LayoutParams.MATCH_PARENT,\n TableRow.LayoutParams.WRAP_CONTENT));\n\n /** Creating a TextView to add to the row **/\n name = new TextView(this);\n name.setText(obj.getName());\n name.setWidth(320);\n name.setTypeface(Typeface.DEFAULT, Typeface.NORMAL);\n name.setPadding(5, 5, 5, 5);\n tr.addView(name); // Adding textView to tablerow.\n\n // Add the TableRow to the TableLayout\n tl.addView(tr, new TableLayout.LayoutParams(\n TableRow.LayoutParams.MATCH_PARENT,\n TableRow.LayoutParams.WRAP_CONTENT));\n }\n }",
"public void disTable () {\n\t\t\t\tJScrollPane scrollPane = new JScrollPane(table);\n\t\t\t\tvalues = new Vector();\n\t\t\t\tvalues.add(\"20\"); values.add(\"20\"); values.add(\"20\"); values.add(\"20\"); values.add(\"20\");values.add(\"20\");values.add(new Boolean(false));\n\t\t\t\tmyModel.addRow(values ); // more practicle, vector can take only objects.\n\t\t myModel.addRow(data);\n\n\n\t\t\t\tgetContentPane().add(scrollPane, BorderLayout.CENTER);\n\n\t\t\t\t addWindowListener(new WindowAdapter() {\n\t\t\t\t\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t\t\t}\n\t\t\t\t });\n\t}",
"private void updateTableData() {\n if (articles.size() == 0) {\n return; // no agent data yet !!!!\n }\n for (int i = 0; i < articles.size(); i++) {\n NewsArticle article = (NewsArticle) articles.elementAt(i);\n String score = \"0.0\";\n\n switch (filterType) {\n case FilterAgent.USE_KEYWORDS:\n score = String.valueOf(article.getKeywordScore());\n break ;\n case FilterAgent.USE_CLUSTERS:\n score = String.valueOf(article.getClusterScore());\n break ;\n case FilterAgent.USE_PREDICTED_RATING:\n score = String.valueOf(article.getPredictedRating()) ;\n break ;\n }\n data[i][COL_SCOREID] = score;\n }\n return;\n }",
"private RowData() {\n initFields();\n }",
"private void initTable() {\n\t\tDefaultTableModel dtm = (DefaultTableModel)table.getModel();\n\t\tdtm.setRowCount(0);\t\t\n\t\tfor(int i=0;i<MainUi.controller.sale.items.size();i++){\n\t\t\tVector v1 = new Vector();\n\t\t\tv1.add(MainUi.controller.sale.items.get(i).getProdSpec().getTitle());\n\t\t\tv1.add(MainUi.controller.sale.items.get(i).getCopies());\n\t\t\tdtm.addRow(v1);\n\t\t}\n\t\tlblNewLabel.setText(\"\"+MainUi.controller.sale.getTotal());\n\t}",
"public void fetRowList() {\n try {\n data.clear();\n if (rsAllEntries != null) {\n ObservableList row = null;\n //Iterate Row\n while (rsAllEntries.next()) {\n row = FXCollections.observableArrayList();\n //Iterate Column\n for (int i = 1; i <= rsAllEntries.getMetaData().getColumnCount(); i++) {\n row.add(rsAllEntries.getString(i));\n }\n data.add(row);\n }\n //connects table with list\n table.setItems(data);\n // cell instances are generated for Order Status column and then colored\n customiseStatusCells();\n\n } else {\n warning.setText(\"No rows to display\");\n }\n } catch (SQLException ex) {\n System.out.println(\"Failure getting row data from SQL \");\n }\n }",
"private void refreshTable() {\n data = getTableData();\n updateTable();\n }",
"public void showData()\n\t\t{\n\t\t\ttry {\n\t\t\t\tcon=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/MundheElectronics1\",\"root\",\"vishakha\");\n\t\t\t\tString sql=\"select *from ComplaintsData\";\n\t\t\t\tps=con.prepareStatement(sql);\n\t\t\t\trs=ps.executeQuery();\n\t\t\t\ttable.setModel(DbUtils.resultSetToTableModel(rs));\n\t\t\t\t\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}",
"public void dataSelect(){\n //deklarasi variabel\n int i = tblKembali.getSelectedRow();\n \n //uji adakah data di tabel?\n if(i == -1){\n //tidak ada yang terpilih atau dipilih.\n return;\n }\n txtNama.setText(\"\"+model.getValueAt(i,0));\n txtAlamat.setText(\"\"+model.getValueAt(i,1));\n txtNo.setText(\"\"+model.getValueAt(i,2));\n txtKamera.setText(\"\"+model.getValueAt(i,3));\n txtKode.setText(\"\"+model.getValueAt(i,4));\n txtdisewa.setText(\"\"+model.getValueAt(i,5));\n txtLama.setText(\"\"+model.getValueAt(i,6));\n txtLambat.setText(\"\"+model.getValueAt(i,7));\n \n }",
"public void showData(){\n listName.setText(this.listName);\n listDescription.setText(this.description);\n Double Total = Lists.getInstance().getLists(this.listName).getTotal();\n listTotal.setText(pending.toString());\n\n this.data = FXCollections.observableArrayList(Lists.getInstance().getLists(this.listName).getItems());\n articleColumn.setCellValueFactory(\n new PropertyValueFactory<>(\"name\")\n );\n quantityColumn.setCellValueFactory(\n new PropertyValueFactory<>(\"quantity\")\n );\n priceColumn.setCellValueFactory(\n new PropertyValueFactory<>(\"price\")\n );\n totalColumn.setCellValueFactory(\n new PropertyValueFactory<>(\"total\")\n );\n stateColumn.setCellValueFactory(\n new PropertyValueFactory<>(\"state\")\n );\n this.itemsTable.setItems(data);\n\n }",
"ReturnTable(TableModel dm) {\n super(dm);\n }",
"public void updateTable() {\n\t\ttable.getSelectionModel().removeListSelectionListener(lsl);\n\t\tdtm = new DefaultTableModel();\n\t\td = new Diet();\n\t\tdtm.addColumn(\"Id\");\n\t\tdtm.addColumn(\"Meal Id\");\n\t\tdtm.addColumn(\"Meal Type\");\n\t\tdtm.addColumn(\"Food Name\");\n\t\tdtm.addColumn(\"Food Type\");\n\t\tdtm.addColumn(\"Food Category\");\n\t\tdtm.addColumn(\"Ready Time\");\n\t\tdtm.addColumn(\"Calories (g)\");\t\t\n\t\tdtm.addColumn(\"Protein (g)\");\n\t\tdtm.addColumn(\"Fat (g)\");\n\t\tdtm.addColumn(\"Carbohydrates\");\n\t\tdtm.addColumn(\"VitaminA\");\n\t\tdtm.addColumn(\"VitaminC\");\n\t\tdtm.addColumn(\"Calcium\");\n\t\tdtm.addColumn(\"Iron\");\n\t\tdtm.addColumn(\"Author\");\n\t\tArrayList<Diet> dietList = dI.getDietList();\n\t\tif(isOrder && orderby!=\"\")\n\t\t{\t\t\t\n\t\t\tSystem.out.println(\"entering ----------------\"+orderby);\n\t\t\tdietList=dI.getDietOrderedList(type,orderby);\n\t\t\tfor (Diet d : dietList) {\t\n\t\t\t\tSystem.out.println(d.getId()+\" ------ \"+d.getCalories());\n\t\t\t}\n\t\t}\n\t\tif(isFiltered)\n\t\t{\n\t\t\tif(mealtypeSel!=\"\")\n\t\t\tdietList=dI.getFilteredMealTypeList(mealtypeSel);\n\t\t\tif(foodtypeSel!=\"\")\n\t\t\t\tdietList=dI.getFilteredFoodTypeList(foodtypeSel);\n\t\t\tif(authorSel!=\"\")\n\t\t\t\tdietList=dI.getFilteredauthorList(authorSel);\n\t\t\tif(foodCategorySel!=\"\")\n\t\t\t\tdietList=dI.getFilterFoodCategoryList(foodCategorySel);\n\t\t\t\n\t\t}\n\t\t\n\t\tfor (Diet d : dietList) {\t\n\t\t\tdtm.addRow(d.getVector());\n\t\t}\n\t\ttable.setModel(dtm);\n\n\t\ttable.getSelectionModel().addListSelectionListener(lsl);\n\n\t}",
"private void addTableData(Course course) {\n\t\tObject[] data = new Object[] { course.getName(), course.getNumber() };\n\t\ttableModel.addRow(data);\n\t}",
"@SuppressWarnings(\"unchecked\")\n \n \n private void table(){\n \n int c;\n \n try{\n \n Connection con1 = ConnectionProvider.getConn();\n Statement stm = con1.createStatement();\n ResultSet rst = stm.executeQuery(\"select * from sales\");\n ResultSetMetaData rstm = rst.getMetaData();\n \n c = rstm.getColumnCount();\n \n DefaultTableModel dtm2 = (DefaultTableModel)jTable1.getModel();\n dtm2.setRowCount(0);\n \n while (rst.next()){\n \n Vector vec = new Vector();\n \n for(int a =1 ; a<=c; a++)\n {\n vec.add(rst.getString(\"CustomerName\"));\n vec.add(rst.getString(\"OrderNo\"));\n vec.add(rst.getString(\"TypeOfService\"));\n vec.add(rst.getString(\"OrderType\"));\n vec.add(rst.getString(\"Descript\"));\n vec.add(rst.getString(\"OrderConfirmation\"));\n vec.add(rst.getString(\"OrderHandledBy\"));\n vec.add(rst.getString(\"OrderDate\"));\n vec.add(rst.getString(\"WarrantyExpireDate\"));\n vec.add(rst.getString(\"FullAmount\"));\n vec.add(rst.getString(\"AmountPaid\"));\n vec.add(rst.getString(\"Balance\"));\n }\n \n dtm2.addRow(vec);\n }\n \n }\n catch(Exception e)\n {\n \n }\n \n \n }",
"private void showData(Vector data) throws Exception{\n model = new PersonModel(data);\n dataTable.setModel(model);\n \n int[] width = {\n 80, 80, 120 \n };\n int count = dataTable.getColumnModel().getColumnCount();\n for(int i = 0; i < count; ++i){\n dataTable.getColumnModel().getColumn(i).setMinWidth(width[i]);\n dataTable.getColumnModel().getColumn(i).setMaxWidth(width[i] + 20);\n }\n // seteaza coloana telefon background\n TableColumn phoneColumn = dataTable.getColumnModel().getColumn(2);\n DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();\n renderer.setBackground(new Color(245, 245, 245));\n phoneColumn.setCellRenderer(renderer);\n }",
"public void initializeTable(){\r\n\t \r\n\t // Adding a button to tableView\r\n\t /*\r\n\t TableColumn actionCol = new TableColumn( \"Action\" );\r\n actionCol.setCellValueFactory( new PropertyValueFactory<>( \"DUMMY\" ) );\r\n\r\n Callback<TableColumn<WorkflowEntry, String>, TableCell<WorkflowEntry, String>> cellFactory = //\r\n new Callback<TableColumn<WorkflowEntry, String>, TableCell<WorkflowEntry, String>>()\r\n {\r\n public TableCell<WorkflowEntry, String> call( final TableColumn<WorkflowEntry, String> param )\r\n {\r\n final TableCell<WorkflowEntry, String> cell = new TableCell<WorkflowEntry, String>()\r\n {\r\n\r\n final Button btn = new Button( \"Approve\" );\r\n\r\n @Override\r\n public void updateItem( String item, boolean empty )\r\n {\r\n super.updateItem( item, empty );\r\n if ( empty )\r\n {\r\n setGraphic( null );\r\n setText( null );\r\n }\r\n else\r\n {\r\n btn.setOnAction( ( ActionEvent event ) ->\r\n {\r\n WorkflowEntry person = getTableView().getItems().get( getIndex() );\r\n System.out.println( person.getName() );\r\n } );\r\n setGraphic( btn );\r\n setText( null );\r\n }\r\n }\r\n };\r\n return cell;\r\n }\r\n };\r\n\r\n actionCol.setCellFactory( cellFactory );*/\r\n\t\t\r\n\t\ttableView.setItems(data);\r\n\t}",
"private void populateTable() {\n Collections.sort(this.player.arr, new SortByLevel());\n achievementLabel.setText(player.toString() + \" at \" + new SimpleDateFormat(\"dd/MM/yy HH:mm:ss\").format(new Date()));\n for(int i = 0; i < this.player.arr.size(); i++) {\n Achievement temp = this.player.arr.get(i);\n resultsTable.addRow(new Object[] {temp.getDescription(), temp.getLevel(), temp.getOutOfPossible()});\n }\n }",
"public void changeData() {\n\t\tDefaultTableModel dtm = new DefaultTableModel(dataModel.getData(),\n\t\t\t\tdataModel.getHeader());\n\t\tsetModel(dtm);\n\t}",
"public void updatedTable() {\r\n\t\tfireTableDataChanged();\r\n\t}",
"private void buildTable() {\n\t\tObservableList<Record> data;\r\n\t\tdata = FXCollections.observableArrayList();\r\n\r\n\t\t// get records from the database\r\n\t\tArrayList<Record> list = new ArrayList<Record>();\r\n\t\tlist = getItemsToAdd();\r\n\r\n\t\t// add records to the table\r\n\t\tfor (Record i : list) {\r\n\t\t\tSystem.out.println(\"Add row: \" + i);\r\n\t\t\tdata.add(i);\r\n\t\t}\r\n\t\ttableView.setItems(data);\r\n\t}",
"private void setDataModel() {\r\n tableData = new Object[resultSet.size()][classFields.length];\r\n // for every object from collection of objects\r\n for (int i = 0; i < resultSet.size(); i++) {\r\n // for every fields from class of object\r\n for (int j = 0; j < classFields.length; j++) {\r\n // for every method from class of object\r\n for (int x = 0; x < classMethods.length; x++) {\r\n // if class name start with 'get' and class method name\r\n // lenght is equal to field name + 3 (becouse of get word)\r\n if ((classMethods[x].getName().startsWith(\"get\"))\r\n && (classMethods[x].getName().length() == (classFields[j].getName().length() + 3))) {\r\n // if class name to lowercase ends with field name to\r\n // lower case\r\n if (classMethods[x].getName().toLowerCase().endsWith(classFields[j].getName().toLowerCase())) {\r\n // then try to invoke that getter\r\n try {\r\n tableData[i][j] = classMethods[x].invoke(resultSet.get(i));\r\n } catch (IllegalAccessException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n } catch (IllegalArgumentException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n } catch (InvocationTargetException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n }\r\n // This is alternative method for obtaining getter for field but\r\n // it will need public fields\r\n // try {\r\n // fieldValue = pola[j].get(resultSet.get(i));\r\n // data[i][j]=fieldValue;\r\n // } catch (IllegalArgumentException e) {\r\n // // TODO Auto-generated catch block\r\n // e.printStackTrace();\r\n // } catch (IllegalAccessException e) {\r\n // // TODO Auto-generated catch block\r\n // e.printStackTrace();\r\n // }\r\n }\r\n }\r\n }",
"public void getData( ){\n model2.getDataVector( ).removeAllElements( );\n model2.fireTableDataChanged( );\n\n try{\n //membuat statemen pemanggilan data pada table tblGaji dari database\n Statement s = koneksi.createStatement();\n String sql = \"Select * from tb_customer\";\n ResultSet r = s.executeQuery(sql);\n\n //penelusuran baris pada tabel tblGaji dari database\n while(r.next ()){\n Object[ ] o = new Object[4];\n o[0] = r.getString(\"id\");\n o[1] = r.getString(\"nama\");\n o[2] = r.getString(\"alamat\");\n o[3] = r.getString(\"telepon\");\n\n model2.addRow(o);\n }\n }catch(SQLException err){\n JOptionPane.showMessageDialog(null, err.getMessage() );\n }\n }",
"public void setTableData()\n\t{\n\t\tsetTableData(false);\n\t}",
"private void showData(String query) {\n try {\n ResultSet rs = DB.search(query);\n tbl.setRowCount(0);\n while (rs.next()) {\n Vector v = new Vector();\n v.add(rs.getString(1)); //inv id\n v.add(rs.getString(6)); //cus name\n v.add(rs.getString(2)); //date\n v.add(rs.getString(3)); //time\n v.add(rs.getString(10)); //price\n v.add(rs.getString(11)); //discount\n v.add(rs.getString(12)); //total\n v.add(rs.getString(13)); //pay method\n tbl.addRow(v);\n }\n //Calculating the total value of invoices\n double total = 0d;\n for (int row = 0; row < tbl.getRowCount(); row++) {\n total = total + Double.parseDouble(tbl.getValueAt(row, 4).toString());\n }\n lbAllValue.setText(String.valueOf(total));\n lbNoofnvs.setText(String.valueOf(tbl.getRowCount()));\n setCOLORSTB(jTable1);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private void refreshTable() {\n dataPanel.getModel().setRowCount(0);\n try {\n ResultSet resultSet = reg.get();\n while (resultSet.next()) {\n dataPanel.getModel().addRow(new Object[]{\n resultSet.getInt(\"id\"),\n resultSet.getString(\"first_name\"),\n resultSet.getString(\"last_name\"),\n resultSet.getString(\"username\"),\n resultSet.getString(\"password\"),\n resultSet.getInt(\"age\"),\n resultSet.getString(\"gender\"),\n });\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }",
"public TableData(Player p1, BotPlayer bot, Deck d1, int PlayerRaise, int BotRaise, Table t1)\n {\n this.p1 = p1;\n this.bot = bot;\n this.d1 = d1;\n this.playerRaise = Integer.toString(PlayerRaise);\n this.botRaise = Integer.toString(BotRaise);\n table = t1;\n }",
"public void prepareTable() {\n \tthis.table = new Tape(this.height,this.width,2,this.map);\n }",
"private void createTable() {\n\t\t// Tao dataModel & table \n\t\tdataModel = new DefaultTableModel(headers, 0);\n\t\ttable.setModel(dataModel);\n\t\t\n\t\tnapDuLieuChoBang();\n\t}",
"private void TampilData(){\n try{ //\n String sql = \"SELECT * FROM buku\"; // memanggil dari php dengan tabel buku\n stt = con.createStatement(); // membuat statement baru dengan mengkonekan ke database\n rss = stt.executeQuery(sql); \n while (rss.next()){ \n Object[] o = new Object [3]; // membuat array 3 dimensi dengan nama object\n \n o[0] = rss.getString(\"judul\"); // yang pertama dengan ketentuan judul\n o[1] = rss.getString(\"penulis\"); // yang kedua dengan ketentuan penulis\n o[2] = rss.getInt(\"harga\"); // yang ketiga dengan ketentuan harga\n model.addRow(o); // memasukkan baris dengan mengkonekan di tabel model\n } \n }catch(SQLException e){ // memanipulasi kesalahan\n System.out.println(\"ini error\"); // menampilkan pesan ini error\n }\n }",
"private void createTable(int columns, int rows, String[] column_name,\n\t\t\tObject[] row_data) {\n\t\ttblStationary = new Table(canvas2, SWT.MULTI | SWT.BORDER\n\t\t\t\t| SWT.FULL_SELECTION);\n\t\ttblStationary.setLinesVisible(true);\n\t\ttblStationary.setHeaderVisible(true);\n\n\t\tfor (int i = 0; i < columns; i++) {\n\t\t\tcolumn = new TableColumn(tblStationary, SWT.NONE);\n\n\t\t\tif (i == 0) {\n\t\t\t\tcolumn.setText(column_name[i]);\n\t\t\t\tcolumn.setWidth(50);\n\t\t\t} else if (i == 1) {\n\t\t\t\tcolumn.setText(column_name[i]);\n\t\t\t\tcolumn.setWidth(230);\n\t\t\t} else {\n\t\t\t\tcolumn.setText(column_name[i]);\n\t\t\t\tcolumn.setWidth(100);\n\t\t\t}\n\t\t}\n\n\t\teditor1 = new TableEditor[rows];\n\t\ttxtTopay = new Text[rows];\n\n\t\teditor2 = new TableEditor[rows];\n\t\ttxtPaid = new Text[rows];\n\n\t\teditor3 = new TableEditor[rows];\n\t\ttxtBilling = new Text[rows];\n\n\t\teditor4 = new TableEditor[rows];\n\t\ttxtCr = new Text[rows];\n\n\t\t// Drawing initial table items\n\t\tfor (int rowId = 0; rowId < rows; rowId++) {\n\n\t\t\titem = new TableItem(tblStationary, SWT.NONE);\n\n\t\t\titem.setText(0, Integer.toString((rowId + 1)));\n\n\t\t\t// First Column station\n\t\t\titem.setText(1, (((StationsDTO) (row_data[rowId])).getName()\n\t\t\t\t\t+ \" - \" + ((StationsDTO) row_data[rowId]).getId()));\n\n\t\t\t// Draw Text Field\n\t\t\teditor1[rowId] = new TableEditor(tblStationary);\n\t\t\ttxtTopay[rowId] = new Text(tblStationary, SWT.NONE);\n\t\t\ttxtTopay[rowId].addVerifyListener(new NumericValidation());\n\t\t\teditor1[rowId].grabHorizontal = true;\n\t\t\teditor1[rowId].setEditor(txtTopay[rowId], item, 2);\n\n\t\t\t// Draw Text Field\n\t\t\teditor2[rowId] = new TableEditor(tblStationary);\n\t\t\ttxtPaid[rowId] = new Text(tblStationary, SWT.NONE);\n\t\t\ttxtPaid[rowId].addVerifyListener(new NumericValidation());\n\t\t\teditor2[rowId].grabHorizontal = true;\n\t\t\teditor2[rowId].setEditor(txtPaid[rowId], item, 3);\n\n\t\t\t// Draw Text Field\n\t\t\teditor3[rowId] = new TableEditor(tblStationary);\n\t\t\ttxtBilling[rowId] = new Text(tblStationary, SWT.NONE);\n\t\t\ttxtBilling[rowId].addVerifyListener(new NumericValidation());\n\t\t\teditor3[rowId].grabHorizontal = true;\n\t\t\teditor3[rowId].setEditor(txtBilling[rowId], item, 4);\n\n\t\t\t// Draw Text Field\n\t\t\teditor4[rowId] = new TableEditor(tblStationary);\n\t\t\ttxtCr[rowId] = new Text(tblStationary, SWT.NONE);\n\t\t\ttxtCr[rowId].addVerifyListener(new NumericValidation());\n\t\t\teditor4[rowId].grabHorizontal = true;\n\t\t\teditor4[rowId].setEditor(txtCr[rowId], item, 5);\n\n\t\t}\n\t\ttblStationary.setBounds(32, 43, 750, 380);\n\n\t}",
"public void fillMyGoodsTable() {\n\t\tHashMap<Goods, Integer> myGoods = ship.getMyGoods();\n\t\tDefaultTableModel model = (DefaultTableModel)this.myGoodsTable.getModel();\n\t\tint number = 1;\n\t\tfor (HashMap.Entry<Goods, Integer> set: myGoods.entrySet()) {\n\t\t\tString name = set.getKey().getName();\n\t\t\tint quantity = set.getKey().getQuantityOwned();\n\t\t\tint price = set.getValue();\n\t\t\tmodel.addRow(new Object [] {number, name, quantity, price});\n\t\t\tnumber++;\n\t\t}\n\t}",
"private void populateTable() {\n \n DefaultTableModel dtm = (DefaultTableModel) tblAllCars.getModel();\n dtm.setRowCount(0);\n \n for(Car car : carFleet.getCarFleet()){\n \n Object[] row = new Object[8];\n row[0]=car.getBrandName();\n row[1]=car.getModelNumber();\n row[2]=car.getSerialNumber();\n row[3]=car.getMax_seats();\n row[4]=car.isAvailable();\n row[5]=car.getYearOfManufacturing();\n row[6]=car.isMaintenenceCerticateExpiry();\n row[7]=car.getCity();\n \n dtm.addRow(row);\n \n }\n }",
"public abstract void buildTable(PdfPTable table);",
"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 }",
"public static void viewtable() {\r\n\t\tt.dibuixa(table);\r\n\t}",
"public void getData( ){\n model.getDataVector( ).removeAllElements( );\n model.fireTableDataChanged( );\n\n try{\n //membuat statemen pemanggilan data pada table tblGaji dari database\n Statement stat = (Statement)koneksi_db.config( ).createStatement( );\n String sql = \"Select * from daftar_log\";\n ResultSet res = stat.executeQuery(sql);\n\n //penelusuran baris pada tabel tblGaji dari database\n while(res.next ()){\n Object[ ] obj = new Object[6];\n obj[0] = res.getString(\"id_log\"); \n obj[1] = res.getString(\"nama_kejadian\");\n model.addRow(obj);\n }\n }\n catch(SQLException err){\n JOptionPane.showMessageDialog(null, err.getMessage() );\n }\n }",
"public Row(TableBase table, Object[] data) {\n this.table = table;\n this.rowData = data;\n }",
"private void populateTreatementHistory() {\n DefaultTableModel model = (DefaultTableModel) historyTable.getModel();\n model.setRowCount(0);\n if (wr.getPatient().getPerson().getTreatmentHistory() != null) {\n for (WorkRequest r : wr.getPatient().getPerson().getTreatmentHistory()) {\n Object[] row = new Object[4];\n row[0] = r.getReceiver();\n row[1] = r.getResolveDate();\n row[2] = r.getMessage();\n row[3] = r.getStatus();\n\n model.addRow(row);\n }\n }\n\n }",
"public void initTable(){\n if(counter == 0){\n getDataSemua();\n }else if(counter == 1){\n getDataMakan();\n }else if(counter == 2){\n getDataMinum();\n }else if(counter == 3){\n getDataPaket();\n }\n id.setCellValueFactory(new PropertyValueFactory<casher, String>(\"Id\"));\n nama.setCellValueFactory(new PropertyValueFactory<casher, String>(\"Nama\"));\n kategori.setCellValueFactory(new PropertyValueFactory<casher, String>(\"Kategori\"));\n harga.setCellValueFactory(new PropertyValueFactory<casher, Integer>(\"Harga\"));\n status.setCellValueFactory(new PropertyValueFactory<casher, String>(\"Status\"));\n tambah.setCellValueFactory(new PropertyValueFactory<casher,Button>(\"Tambah\"));\n\n table.setItems(list);\n\n }",
"public void populateDiseaseTable() {\r\n DefaultTableModel dtm = (DefaultTableModel) tblDisease.getModel();\r\n dtm.setRowCount(0);\r\n for (Conditions disease : system.getConditionsList().getConditionList()) {\r\n Object[] row = new Object[2];\r\n row[0] = disease;\r\n row[1] = disease.getDiseaseId();\r\n dtm.addRow(row);\r\n }\r\n }",
"private void addRows() {\n this.SaleList.forEach(Factura -> {\n this.modelo.addRow(new Object[]{\n Factura.getId_Factura(),\n Factura.getPersona().getNombre(),\n Factura.getFecha().getTimestamp(),\n Factura.getCorreo(),\n Factura.getGran_Total()});\n });\n }",
"public void doUpdateTable() {\r\n\t\tlogger.info(\"Actualizando tabla books\");\r\n\t\tlazyModel = new LazyBookDataModel();\r\n\t}",
"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 void readValuesfromtableWithoutHeadings()\n\t {\n\t\t open();\n\t\t List<Map<Object, String>> tab1= withColumns(\"Last Name \" ,\"First Name\",\"Email\", \"Due\" , \"Web Site\" , \"My Test\") \n\t\t\t\t .readRowsFrom(table);\n\t\t System.out.println(tab1);\n\t }",
"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 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 }",
"private void Table()\n{\n Object [] Kolom = {\"Nama\", \"No. Telp\", \"Kota Asal\"};\n Table = new DefaultTableModel(null, Kolom);\n Tabel.setModel(Table);\n}",
"private void fillData() {\n jTextField1.setEnabled(false);\n jTextField11.setEnabled(false);\n\n if (owners != null && owners.get(\"editedOwner\") != null) {\n this.jTextField1.setText(owners.get(\"editedOwner\").getAsJsonObject().get(\"rc\").getAsString());\n this.jTextField11.setText(owners.get(\"editedOwner\").getAsJsonObject().get(\"share\").getAsString());\n }\n String[] header = new String[]{\"Rodné čislo\", \"Podiel v %\"};\n dtm.setColumnIdentifiers(header);\n jTableOwnerships.setModel(dtm);\n if (owners != null && owners.get(\"ownerships\") != null) {\n for (JsonElement jsonElement : owners.get(\"ownerships\").getAsJsonArray()) {\n JsonObject owner = (JsonObject) jsonElement;\n dtm.addRow(new Object[]{owner.get(\"rc\").getAsString(), owner.get(\"share\").getAsString()});\n }\n }\n }",
"public void MakeTableData()\r\n {\n classes = ResetClasses();\r\n \r\n // 'WHATS ON' TAB SELECTED\r\n if (selectedTab == 0)\r\n {\r\n // iterate through days\r\n for (int i = 0; i < daysPerWeek; i++)\r\n {\r\n // iterate through times and rooms\r\n for (int j = 0; j < totalSlots; j++)\r\n {\r\n LessonClass a = weekArray[(weekNo -1)].dayArray[i].dayMap.get(roomNtime[j]);\r\n if (a != null)\r\n {\r\n if (byAllFlag == true)\r\n {\r\n classes[j][i] = a.toString();\r\n }\r\n else if (bySubjectFlag == true)\r\n {\r\n if (a.subject == subComb)\r\n {\r\n classes[j][i] = a.toString();\r\n }\r\n }\r\n else if (byTutorFlag == true)\r\n {\r\n if (a.tutorName == tutComb)\r\n {\r\n classes[j][i] = a.toString();\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n // 'DIARY' TAB SELECTED\r\n else if (selectedTab == 1)\r\n {\r\n if (userLoggedIn != null)\r\n { \r\n // iterate through days\r\n for (int i = 0; i < daysPerWeek; i++)\r\n {\r\n // iterate through times and rooms\r\n for (int j = 0; j < totalSlots; j++)\r\n {\r\n // pertinent tracks if ID is in register\r\n boolean pertinent = false;\r\n LessonClass a = weekArray[(weekNo -1)].dayArray[i].dayMap.get(roomNtime[j]);\r\n if (a != null)\r\n {\r\n for (String s : a.register)\r\n {\r\n if (userLoggedIn.equals(s))\r\n {\r\n pertinent = true;\r\n }\r\n } \r\n \r\n if (byAllFlag == true && pertinent == true)\r\n {\r\n classes[j][i] = a.toString();\r\n }\r\n else if (bySubjectFlag == true && pertinent == true)\r\n {\r\n if (a.subject == subComb)\r\n {\r\n classes[j][i] = a.toString();\r\n }\r\n }\r\n else if (byTutorFlag == true && pertinent == true)\r\n {\r\n if (a.tutorName == tutComb)\r\n {\r\n classes[j][i] = a.toString();\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\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 void prepareData(){\n\tAssert.pre( data!=null, \"data must be aquired first\");\n\t//post: creates a vector of items with a maximum size, nullifies the original data. This prevents us from having to loop through the table each time we need a random charecter (only once to prepare the table). this saves us more time if certain seeds are used very often.\n\n\t//alternate post: changes frequencies in data vector to the sum of all the frequencies so far. would have to change getrandomchar method\n\n\n\t //if the array is small, we can write out all of the Strings\n\t \n\ttable = new Vector(MAX_SIZE);\n\n\tif (total < MAX_SIZE){\n\t\t\n\t\n\t\t//steps through data, creating a new vector\n\t\tfor(int i = 0; i<data.size(); i++){\n\n\t\t count = data.get(i);\n\n\t\t Integer fr = count.getValue();\n\t\t int f = fr.intValue();\n\n\t\t if(total<MAX_SIZE){\n\t\t\tf = (f*MAX_SIZE)/total;\n\t\t }\n\t\t\t\n\t\t //ensures all are represented (biased towards small values)\n\t\t //if (f == 0){ f == 1;}\n\n\n\t\t String word = (String)count.getKey();\n\t \n\t\t for (int x = 0; x< f; x++){\n\t\t\ttable.add( word);\n\t\t }\n\n\t\t}\n\t }\n\n\t//because of division with ints, the total might not add up 100.\n\t//so we redefine the total at the end of this process\n\ttotal = table.size();\n\n\t //we've now prepared the data\n\t dataprepared = true;\n\n\t //removes data ascociations to clear memory\n\t data = null;\n\t}",
"public void tabelaktivitas() {\n DefaultTableModel tbl= new DefaultTableModel();\n tbl.addColumn(\"Group\");\n tbl.addColumn(\"Compart\");\n tbl.addColumn(\"Activity\");\n tbl.addColumn(\"HA\");\n tbl.addColumn(\"Harga\");\n tbl.addColumn(\"Total\");\n tblaktivitas.setModel(tbl);\n try{\n java.sql.Statement statement=(java.sql.Statement)conek.GetConnection().createStatement();\n ResultSet res=statement.executeQuery(\"select * from tblaktivitas\");\n while(res.next())\n {\n tbl.addRow(new Object[]{\n res.getString(\"nama_grup\"),\n res.getString(\"compart\"),\n res.getString(\"pekerjaan\"),\n res.getInt(\"ha\"),\n res.getInt(\"harga\"),\n res.getInt(\"total\")\n });\n tblaktivitas.setModel(tbl); \n }\n }catch (Exception e){\n JOptionPane.showMessageDialog(rootPane,\"Salah\");\n }\n }",
"private void makeTable(PdfPTable table) {\n table.addCell(createTitleCell(\"Part Name\"));\n table.addCell(createTitleCell(\"Description\"));\n table.addCell(createTitleCell(\"Price\"));\n table.addCell(createTitleCell(\"Initial Stock\"));\n table.addCell(createTitleCell(\"Initial Cost, £\"));\n table.addCell(createTitleCell(\"Used\"));\n table.addCell(createTitleCell(\"Delivery\"));\n table.addCell(createTitleCell(\"New Stock\"));\n table.addCell(createTitleCell(\"Stock Cost, £\"));\n table.addCell(createTitleCell(\"Threshold\"));\n table.completeRow();\n \n addRow(table, emptyRow);\n \n for (Object[] row : data) addRow(table, row);\n \n addRow(table, emptyRow);\n \n PdfPCell c = createBottomCell(\"Total\");\n c.enableBorderSide(Rectangle.LEFT);\n table.addCell(c);\n table.addCell(createBottomCell(\"\"));\n table.addCell(createBottomCell(\"\"));\n table.addCell(createBottomCell(\"\"));\n table.addCell(createBottomCell(String.format(\"%.2f\", initialTotal)));\n table.addCell(createBottomCell(\"\"));\n table.addCell(createBottomCell(\"\"));\n table.addCell(createBottomCell(\"\"));\n PdfPCell l = createBottomCell(String.format(\"%.2f\", nowTotal));\n l.enableBorderSide(Rectangle.RIGHT);\n table.addCell(l);\n table.addCell(createBlankCell(\"\"));\n table.completeRow();\n }",
"private void insertProjectTable() {\n name.setCellValueFactory(new PropertyValueFactory<>(\"nameId\"));\n dateStart.setCellValueFactory(new PropertyValueFactory<>(\"dateStart\"));\n dateFinish.setCellValueFactory(new PropertyValueFactory<>(\"dateFinish\"));\n place.setCellValueFactory(new PropertyValueFactory<>(\"place\"));\n car.setCellValueFactory(new PropertyValueFactory<>(\"cars\"));\n instructors.setCellValueFactory(new PropertyValueFactory<>(\"instructors\"));\n description.setCellValueFactory(new PropertyValueFactory<>(\"description\"));\n author.setCellValueFactory(new PropertyValueFactory<>(\"author\"));\n }",
"@Override\n protected void loadAndFormatData()\n {\n // Place the data into the table model along with the column\n // names, set up the editors and renderers for the table cells,\n // set up the table grid lines, and calculate the minimum width\n // required to display the table information\n setUpdatableCharacteristics(getScriptAssociationData(allowSelectDisabled, parent),\n AssociationsTableColumnInfo.getColumnNames(),\n null,\n new Integer[] {AssociationsTableColumnInfo.AVAILABLE.ordinal()},\n null,\n AssociationsTableColumnInfo.getToolTips(),\n true,\n true,\n true,\n true);\n }",
"void visit(final Table table);",
"public void bindingTable(){\n String[] header={\"Region Id\",\"Region Name\"};\n DefaultTableModel defaultTableModel = new DefaultTableModel(header, 0);\n for (Region region : regionController.binding()) {\n// for (Region binding : regionController.binding(\"region_id\",\"asc\")) {\n Object[] region1 ={\n region.getRegionId(),region.getRegionName()\n };\n defaultTableModel.addRow(region1);\n }\n tableRegion.setModel(defaultTableModel);\n }",
"public void bindingTable() {\n String[] header = {\"Cuti ID\", \"Tanggal Awal\", \"Tanggal Akhir\", \"Keterangan\", \"Cuti Khusus ID\"};\n DefaultTableModel defaultTableModel = new DefaultTableModel(header, 0);\n for (Cuti cuti : cutiController.binding()) {\n Object[] cuti1 = {\n cuti.getCutiId(), cuti.getCkId(), cuti.getTanggalAwal(), cuti.getTanggalAkhir(), cuti.getKeterangan()\n };\n this.cmbCutiKhususID.addItem(cuti1[2].toString());\n defaultTableModel.addRow(cuti1);\n }\n tblCuti.setModel(defaultTableModel);\n }",
"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 addRowToTable(String panelTitle, Object[] data) {\n\t\tConsoleTable table = (ConsoleTable) getBoard(panelTitle);\n\t\ttable.addRow(data);\n\t}",
"private TableEntry(S searchKey, T dataValue)\n {\n key = searchKey;\n value = dataValue;\n inTable = true;\n }",
"public void addRow(String data){//adds a new row of data to the table\n\t\t\t\tif(row_count<100){//checks to see if there is space left in the current datum for an additional rows\n\t\t\t\t\tif(row_count<50){//halvs the data for more efficiant row insertion\n\t\t\t\t\t\tif(row_count<10){//checks to see if it is in the first inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[0].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[0]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[0].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(row_count<20){//checks to see if it is in the second inner datum\n\t\t\t\t\t\t\tf(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[1].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[1]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[1].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(row_count<30){//checks to see if it is in the third inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[2].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[2]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[2].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(row_count<40){//checks to see if it is in the fourth inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[3].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[3]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[3].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{//checks to see if it is in the fifth inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[4].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[4]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[4].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\t\n\t\t\t\t\t\tif(row_count<60){//checks to see if it is in the sixth inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[5].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[5]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[5].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(row_count<70){//checks to see if it is in the seventh inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[6].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[6]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[6].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(row_count<80){//checks to see if it is in the eighth inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[7].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[7]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[7].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(row_count<90){//checks to see if it is in the ninth inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[8].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[8]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[8].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{//checks to see if it is in the tenth inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[9].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[9]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[9].addRow(data);\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}else{//acctivated when there is no room left in the current outer datum}\n\t\t\t\t\tif(next==null){//checks to see if there is a next outer datum\n\t\t\t\t\t\tnext=new OuterDatum();\t\n\t\t\t\t\t}\n\t\t\t\t\tnext.addRow(data);\n\t\t\t\t}\n\t\t\t}"
] | [
"0.7087227",
"0.65080184",
"0.6465014",
"0.6461002",
"0.6446194",
"0.64185405",
"0.6359223",
"0.6333854",
"0.62866235",
"0.6275095",
"0.6244084",
"0.62376523",
"0.62235385",
"0.6183597",
"0.6163578",
"0.6146893",
"0.6140684",
"0.61344695",
"0.61166674",
"0.6100796",
"0.6092308",
"0.608684",
"0.60827625",
"0.6074408",
"0.6073995",
"0.60700464",
"0.60605186",
"0.60602796",
"0.60219145",
"0.6016252",
"0.6006908",
"0.59950376",
"0.59931856",
"0.5977934",
"0.5977854",
"0.5973575",
"0.59411687",
"0.59329563",
"0.5931101",
"0.59253496",
"0.5920305",
"0.59153485",
"0.59112686",
"0.5908057",
"0.59067625",
"0.5905178",
"0.5893898",
"0.58933055",
"0.58878976",
"0.5884918",
"0.5878696",
"0.587623",
"0.5865856",
"0.58582944",
"0.5857913",
"0.5846553",
"0.5846063",
"0.58371115",
"0.5823253",
"0.5819961",
"0.5814283",
"0.58139896",
"0.58075786",
"0.5797577",
"0.57969135",
"0.57961714",
"0.57946146",
"0.57871866",
"0.5783599",
"0.577968",
"0.57774734",
"0.57752734",
"0.57739645",
"0.57655907",
"0.5761211",
"0.5758593",
"0.5752032",
"0.57358646",
"0.57336503",
"0.57319415",
"0.5731028",
"0.57235783",
"0.5717218",
"0.5716723",
"0.57082844",
"0.57056165",
"0.56987",
"0.5697152",
"0.56966025",
"0.569255",
"0.56852293",
"0.56797683",
"0.567746",
"0.5672285",
"0.5671114",
"0.5668714",
"0.5667416",
"0.56629205",
"0.5662766",
"0.5662056"
] | 0.57164735 | 84 |
toggle for instruction showing | public void show_text (Boolean show) {
if (show)
instructions.setText(instr_str);
if (!show)
instructions.setText(default_str);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void showInstructions()\n {\n //make the instructions window visible\n instructionScreen.setVisible(true);\n }",
"public void toggle()\n\t{\n\t\tsetVisible(!this.isShowing());\n\t}",
"public void show() {\n hidden = false;\n }",
"void toggle();",
"@Override\n public void Toggle() {\n\t \n }",
"public void switchToInstructionScreen() {\n \tCardLayout currLayout = (CardLayout) screens.getLayout();\n \tcurrLayout.show(screens, \"insn\");\n }",
"public void show() {\n\t\thidden = false;\n\t}",
"public void showInstruction(View view) {\n }",
"public void toggleEnable();",
"public abstract void toggle();",
"public void showInstructionsPanel() {\n\t\tsetWidgetAsExample(introPanel);\n\t}",
"public boolean shown();",
"@Override\n\tpublic void shown() {\n\n\t}",
"public void showInstructionsPanel()\n {\n setWidgetAsExample(introPanel);\n }",
"@Override\n public boolean isInstruction() {\n return true;\n }",
"@Override\r\n\tpublic void show() {\n\t\t\r\n\t\t\r\n\t}",
"public void show() {\n visible=true;\n }",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t\t\tsetVisible(false);\r\n\t\t\tnew Transactions(pin).setVisible(true);\r\n\t\t\r\n\r\n\t}",
"private void switchShowHideReexposed() {\n if (!showReuses) {\n return;\n }\n showReexposed = !showReexposed;\n menu.toggleAction(showReexposed, ACTION_SHOW_HIDE_REEXPOSED);\n\n featureDiagramView.switchShowReexposed();\n }",
"public void show() {\n\t\t// Useless if called in outside animation loop\n\t\tactive = true;\n\t}",
"@Override\r\n\tpublic void show() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void show() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void show() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tshuaxin.setVisibility(8);\r\n\t\t\t}",
"public void toggle() {\n toggle(false);\n }",
"public void setIsShow (Boolean isShow) {\r\n\t\tthis.isShow = isShow;\r\n\t}",
"private void showInstructScreen() {\n\t\twhile (!Mouse.isButtonDown(0)\n\t\t\t\t|| !(Mouse.getX() >= 643 && Mouse.getX() <= 758 && Mouse.getY() <= (displayHeight - 494) && Mouse.getY() >= (displayHeight - 562))) {\n\t\t\t// draw instructions screen\n\t\t\tdrawScreen(sprite.get(\"instructScreen\"));\n\t\t\t\n\t\t\t// update display\n\t\t\tupdateDisplay();\n\t\t}\n\t}",
"public void toggle(){\n isOn = !isOn;\n }",
"public boolean isInstruction() {\r\n return true;\r\n }",
"@Override\n\tpublic boolean isShowing() {\n\t\treturn false;\n\t}",
"void toggleVisible (ActionEvent actionEvent) {\n element.visible = this.isSelected();\n }",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\t\t\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\n\tpublic void show() {\n\n\t}",
"@Override\r\n\tpublic void show() {\n\t}",
"@Action (selectedProperty = \"codeViewerVisible\")\n public void toggleCodeViewerVisible() {\n }",
"public void showInstructions() {\n \tcreateLabel(myResources.getString(\"whatgame\"), 1, 1, NORMAL_FONT);\n \tcreateLabel(myResources.getString(\"rightkey\"), 1, 2, NORMAL_FONT);\n \tcreateLabel(myResources.getString(\"esckey\"), 1, 3, NORMAL_FONT);\n \tcreateLabel(myResources.getString(\"buttons\"), 1, 4, NORMAL_FONT);\n }",
"public void setDisplayed(boolean show);",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\ttoggle = 1;\r\n\t\t\t\ttoggle(toggle);\r\n\t\t\t}",
"@Override\r\n\tpublic void show() {\n\r\n\t}",
"@Override\r\n\tpublic void show() {\n\r\n\t}",
"public void setIsShow(Boolean isShow) {\n this.isShow = isShow;\n }",
"@Override\n\tpublic void show() {\n\t}",
"@Override\n\tpublic void show() {\n\t}",
"@Override\n public void onClick(View v) {\n togglePhysicianHint();\n }",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\ttoggle = 2;\r\n\t\t\t\ttoggle(toggle);\r\n\t\t\t}",
"public void showDisarmed();",
"@Override\n\t\tpublic void onClick(View v) {\n\t\t\tindoorFlag = !indoorFlag;\n\t\t\t//indoorFlag = true;\n\t\t}",
"@Override\n public void onClick(View v) {\n togglePhysicianHint();\n\n }",
"public Boolean getIsShow() {\n return isShow;\n }",
"@Override\r\n public void show()\r\n {\r\n\r\n }",
"@Override\r\n public void show()\r\n {\r\n\r\n }",
"void updateCommonToggleStatus(boolean shown);",
"public void reveal() {\n revealed = true;\n }",
"private void toggle(int a) {\n\t\ttry {\r\n\t\t\tfor (int i = 0; i < et.size(); i++) {\r\n\t\t\t\ttoogleOne(et.get(i), el.get(i), false);\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < toggle; i++) {\r\n\t\t\t\ttoogleOne(et.get(i), el.get(i), true);\r\n\t\t\t}\r\n\t\t\tlogp(INFO, getClassName(GraphicalUserInterface.class), \"toggle\", String.join(getSpace(), \"T\".concat(Library.toString(a)), \"Activated\"));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tlogp(INFO, getClassName(GraphicalUserInterface.class), \"toggle\", String.join(getSpace(), \"Error\", \"Activated\"));\r\n\t\t}\r\n\t}",
"@Override\n public void show() {\n }",
"public void switchInsMode() {\n this.inputMode = !this.inputMode;\n }",
"public Boolean getIsShow () {\r\n\t\treturn isShow;\r\n\t}",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\ttoggle = 3;\r\n\t\t\t\ttoggle(toggle);\r\n\t\t\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n jlQuestion.setText(S_HIDE_LABEL);\n jbNewOrderButton.setVisible(true);\n jbConfirm.setVisible(false);\n jbCancel.setVisible(false);\n }",
"@Override\n public void show() {\n\n }",
"@Override\n public void show() {\n\n }",
"public void setShown(boolean shown){\r\n this.shown = shown;\r\n }",
"public void show() {\n\t\t// TODO Auto-generated method stub\n\n\t}",
"public void toggle(){\r\n isDown = !isDown;\r\n }",
"private void ShowOpcodeActionPerformed(java.awt.event.ActionEvent evt) {\n onShowOpcode();\n }",
"public boolean isHidden();",
"private void toggleGoToMapBtn() {\n boolean isShow = isValidLocationFound();\n NodeUtil.setNodeVisibility(this.gotoGeoMapBtn, isShow);\n }",
"public void showIcon(){\n\n lockScreenImageView.animate()\n .alpha(1.0f)\n .setDuration(iconHidingAnimationTime);\n shiftIconToScreenSide(2, -delta/2,\n screenWidth - iconWidth - delta/2);\n }",
"public void setInstruction(String ins)\n\t{\n\t\tgetJLabel().setText(ins);\n\t}",
"@Override\n\tpublic void show() {\n\t\tsuper.show();\n\t\t\n\t}",
"public boolean isShown(){\r\n return shown;\r\n }",
"protected void doToggleMinimap() {\r\n\t\trenderer.minimapMode = ui.viewSymbolicBuildings.isSelected();\r\n\t\trenderer.repaint();\r\n\t}",
"@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tif (button_SFX.getText().equals(\"효과음 : On\")){\n\t\t\t\tsfx=false;\n\t\t\t\tbutton_SFX.setText(\"효과음 : off\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tsfx=true;\n\t\t\t\tbutton_SFX.setText(\"효과음 : On\");\n\t\t\t}\n\t\t}",
"@Override\n\tpublic void show4() {\n\t\t\n\t}",
"public void show()\r\n {\r\n\tshow(\"\");\r\n }",
"public void toggleButton(){\r\n\t\tImageIcon xImage = new ImageIcon(\"image/x.png\");\t//Inserting image to the button\r\n\t\tImageIcon oImage = new ImageIcon(\"image/o.png\");\t//Inserting image to the button\r\n\t\tfor(int i=0;i<3;i++){\t\t\t\t\t//Update the buttons' text base on array of state\r\n\t\t\tfor(int j=0;j<3;j++){\r\n\t\t\t\t this.b[i][j].setIcon(Exer10.state[i][j]==1?xImage:(Exer10.state[i][j]==2?oImage:null));\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"void toggleButton_actionPerformed(ActionEvent e) {\n this.togglePlot();\n }",
"public void toggleSignal() {\n if (green) {\n green = false;\n } else {\n green = true;\n }\n }",
"@Override\n public void setVisible (boolean f)\n { \n }"
] | [
"0.7205485",
"0.6908987",
"0.68953776",
"0.6809813",
"0.6774422",
"0.67513835",
"0.6746867",
"0.66066146",
"0.65720725",
"0.64537376",
"0.64414227",
"0.6430666",
"0.6361776",
"0.6351973",
"0.63215643",
"0.6314401",
"0.6308965",
"0.6305772",
"0.62688136",
"0.6268159",
"0.62554234",
"0.62554234",
"0.62554234",
"0.6218909",
"0.62169677",
"0.621615",
"0.62127036",
"0.6207041",
"0.620349",
"0.6175232",
"0.61716986",
"0.61679876",
"0.61679876",
"0.61679876",
"0.61679876",
"0.61679876",
"0.61679876",
"0.61679876",
"0.61679876",
"0.61679876",
"0.61679876",
"0.61679876",
"0.61679876",
"0.61679876",
"0.61679876",
"0.61679876",
"0.61663795",
"0.61663795",
"0.61663795",
"0.61663795",
"0.61663795",
"0.61663795",
"0.61663795",
"0.61663795",
"0.61581755",
"0.6139435",
"0.613124",
"0.6127239",
"0.6111489",
"0.6101906",
"0.6101906",
"0.61018336",
"0.60887",
"0.60887",
"0.60826826",
"0.6063751",
"0.6063116",
"0.6062371",
"0.6055628",
"0.6048993",
"0.60461175",
"0.60461175",
"0.6033583",
"0.6031663",
"0.60234255",
"0.6020276",
"0.6018335",
"0.6004856",
"0.59761703",
"0.595139",
"0.5934396",
"0.5934396",
"0.5931316",
"0.5929697",
"0.5924039",
"0.590978",
"0.5909554",
"0.59095263",
"0.59000164",
"0.58916694",
"0.58790034",
"0.58680195",
"0.58674586",
"0.5864066",
"0.58605",
"0.5857753",
"0.585239",
"0.58493626",
"0.5847378",
"0.58439434"
] | 0.67712516 | 5 |
Methods: Converts date format from visual to logical. | @VTID(5)
String convertVisualToLogicalDateType(
int fieldType,
boolean skipEqualityInVerification,
String visualDate); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@VTID(4)\n String convertLogicalToVisualDate(\n String fieldName,\n String logicalDate);",
"@VTID(6)\n String convertLogicalToVisualDateType(\n int fieldType,\n boolean skipEqualityInVerification,\n String logicalDate);",
"@VTID(3)\n String convertVisualToLogicalDate(\n String fieldName,\n String visualDate);",
"String formatDateCondition(Date date);",
"public String ConvertDate(){\r\n//\t\tDate date=JavaUtils.getSystemDate();\r\n//\t DateFormat df = new SimpleDateFormat(\"yyyy/MM/dd\");\r\n\t String pattern = \"yyyy-MM-dd\";\r\n\t SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);\r\n\r\n\t String date = simpleDateFormat.format(new Date());\r\n//\t System.out.println(date);\r\n\t \r\n//\t String s = df.format(date);\r\n//\t String result = s;\r\n//\t try {\r\n//\t date=df.parse(result);\r\n//\t } catch (ParseException e) {\r\n//\t // TODO Auto-generated catch block\r\n//\t e.printStackTrace();\r\n//\t }\r\n\t return date;\r\n\t }",
"DateFormat getDisplayDateFormat();",
"public boolean isDate(int displayType) {\n\t\treturn false;\n\t}",
"public void formatDateTime() {\n // Check if type of parsing is for display or not. \n // If it is for display, no need to check if date has already passed.\n if (parseType != 2) {\n startDate = dtFormat.formatDate(startDate,0);\n endDate = dtFormat.formatDate(endDate,0);\n } else {\n startDate = dtFormat.formatDate(startDate,1);\n endDate = dtFormat.formatDate(endDate,1);\n }\n \n startTime = dtFormat.formatTime(startTime);\n endTime = dtFormat.formatTime(endTime);\n }",
"public boolean isDate() {\n return false;\n }",
"private String convertDateVN(String date) {\r\n String arrDate[] = date.split(\"-\");\r\n date = arrDate[2] + \"/\" + arrDate[1] + \"/\" + arrDate[0];\r\n return date;\r\n }",
"private void setDate() {\n java.util.Date d1 = new java.util.Date();\n SimpleDateFormat df = new SimpleDateFormat(\"YYYY-MM-dd\");\n String formateDate = df.format(d1);\n lblDate.setText(formateDate); \n }",
"private String convertDateToCron(Date date) {\n if (date == null)\n return \"\";\n Calendar calendar = java.util.Calendar.getInstance();\n calendar.setTime(date);\n\n String hours = String.valueOf(calendar.get(Calendar.HOUR_OF_DAY));\n\n String mins = String.valueOf(calendar.get(Calendar.MINUTE));\n\n String days = String.valueOf(calendar.get(Calendar.DAY_OF_MONTH));\n\n String months = new java.text.SimpleDateFormat(\"MM\").format(calendar.getTime());\n\n String years = String.valueOf(calendar.get(Calendar.YEAR));\n\n return \"0 \" + mins+ \" \" + hours + \" \" + days + \" \" + months + \" ? \" + years;\n }",
"public boolean selectDate(String dateString);",
"boolean isFilterByDate();",
"public String formatForAmericanModel(Date data){\n //definido modelo americano\n DateFormat formatBR = new SimpleDateFormat(\"yyyy-MM-dd\");\n return formatBR.format(data);\n \n }",
"private void configDate(){\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd\");\n tvDateLost.setText(dateFormat.format(date));\n }",
"public LocalDate getViewDate();",
"@Test\n public void generatedFormatIsParsable()\n {\n Date originalDate = new Date();\n String dateAsString = DateTimeAdapter.printDate( originalDate );\n Date parsedDate = DateTimeAdapter.parseDate( dateAsString );\n \n assertThat( parsedDate, equalTo( originalDate ) );\n }",
"public LocalDate getValidDateFormat(String msg) {\n String sDate = getCommand(msg);\n\n while (!isValidDate(sDate)){\n sDate = getCommand(ANSI_RED+\"Invalid date. Enter ISO format\"+ANSI_RESET);\n }\n return LocalDate.parse(sDate);\n }",
"private static String convertToDDMMYYYY(Date date) {\n\t\tString returnStr = \"\";\n\t\ttry {\n\t\tDateFormat format1 = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\treturnStr = format1.format(date);\n\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn returnStr;\n\t}",
"boolean isSetDate();",
"public void date_zone() {\n\n JLabel lbl_date = new JLabel(\"Date du Rapport :\");\n lbl_date.setBounds(40, 90, 119, 16);\n add(lbl_date);\n String date = rapport_visite.elementAt(DAO_Rapport.indice)[2];\n Date date_n = null;\n\n\n // *** note that it's \"yyyy-MM-dd hh:mm:ss\" not \"yyyy-mm-dd hh:mm:ss\"\n SimpleDateFormat dt = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n\n try {\n date_n = dt.parse(date);\n } catch (ParseException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n // *** same for the format String below\n SimpleDateFormat dt1 = new SimpleDateFormat(\"dd-MM-yyyy\");\n\n JTextField date_rapport = new JTextField();\n date_rapport.setBounds(200, 90, 125, 22);\n date_rapport.setText(dt1.format(date_n));\n date_rapport.setEditable(false);\n add(date_rapport);\n\n\n\n\n }",
"public String verifyDateFormat(String object, String data) {\n\t\tlogger.debug(\"verifying the date format\");\n\t\ttry {\n\t\t\tString date_text = wait.until(explicitWaitForElement(By.xpath(OR.getProperty(object)))).getText();\n\t\t\tString date[] = date_text.split(\"/\");\n\t\t\tBoolean flag = false;\n\n\t\t\tint month = Integer.parseInt(date[0]);\n\t\t\tint day = Integer.parseInt(date[1]);\n\t\t\tint year = Integer.parseInt(date[2]);\n\n\t\t\tfor (int i = 0; i < date.length; i++) {\n\t\t\t\tif (month <= 12 && day <= 31 && year > 2000) {\n\t\t\t\t\tflag = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tif (flag) {\n\n\t\t\t\treturn Constants.KEYWORD_PASS + \"--date is in correct format\";\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\treturn Constants.KEYWORD_FAIL + \"--date is not in correct format\";\n\t\t\t}\n\n\t\t} \ncatch(TimeoutException ex)\n\t\t\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + e.getLocalizedMessage();\n\t\t}\n\t}",
"public String getDateStyleClass() {\r\n return dateThreshold ? \"equipmentDate\" : \"\";\r\n }",
"DateFormat getSourceDateFormat();",
"public void makeValidDate() {\n\t\tdouble jd = swe_julday(this.year, this.month, this.day, this.hour, SE_GREG_CAL);\n\t\tIDate dt = swe_revjul(jd, SE_GREG_CAL);\n\t\tthis.year = dt.year;\n\t\tthis.month = dt.month;\n\t\tthis.day = dt.day;\n\t\tthis.hour = dt.hour;\n\t}",
"public Date obterHrEnt1Turno(){\n \ttxtHrEnt1Turno.setEditable(true);\n txtHrSai1Turno.setEditable(false);\n txtHrEnt2Turno.setEditable(false);\n txtHrSai2Turno.setEditable(false);\n \ttxtHrEnt1TurnoExt.setEditable(false);\n txtHrSai1TurnoExt.setEditable(false);\n txtHrEnt2TurnoExt.setEditable(false);\n txtHrSai2TurnoExt.setEditable(false);\n\n return new Date();\n }",
"java.lang.String getFromDate();",
"public boolean isValidDate(String valD) { //Checks if date is in proper format\n String valDWithoutSpace = valD.replaceAll(\"\\\\s\", \"\");\n return valDWithoutSpace.length() == 8;\n}",
"void setFilterByDate(boolean isFilterByDate);",
"public String format (Date date , String dateFormat) ;",
"public static void main(String[] args) {\n\t\t LocalDate ldt = LocalDate.of(2016,12,21);\n DateTimeFormatter format = DateTimeFormatter.ofPattern(\"yyyy-MMM-dd\");\n DateTimeFormatter format1 = DateTimeFormatter.ofPattern(\"YYYY-mmm-dd\");\n System.out.println(ldt.format(format));\n System.out.println(ldt.format(format1));\n\t}",
"private java.sql.Date convert(Date datet) {\n\t\treturn null;\n\t}",
"Date getDateDisabled();",
"public boolean htmlWindow(String inDate , String inDate2)\n {\n LocalDateTime currentTime = LocalDateTime.now();\n // current date value to compare with margins\n int monthValue = currentTime.getMonthValue();\n int dayOfMonth = currentTime.getDayOfMonth();\n int currentTimeYear = currentTime.getYear(); // obvioulsy in our case this will be 2021 but fo the sake of scalability we used getter\n\n // split in String to create margin 1\n String[] rawTime = inDate.split(\"-\");\n // split in String to create margin 2\n String[] rawClosedTime = inDate2.split(\"-\");\n\n //margin 1\n int inDateMonth = Integer.parseInt(rawTime[1]);\n int inDateDay = Integer.parseInt(rawTime[2]);\n int inDateYear = Integer.parseInt(rawTime[0]);\n // margin 2\n int inDate2Month = Integer.parseInt(rawClosedTime[1]);\n int inDate2Day = Integer.parseInt(rawClosedTime[2]);\n int inDate2Year = Integer.parseInt(rawClosedTime[0]);\n\n // checking if months are value equivalent , if so checking which day is later\n if((inDateMonth == monthValue && inDateDay <= dayOfMonth) || (inDateMonth < monthValue))\n {\n // // checking if months are value equivalent , if so checking which day is earlier\n if( (monthValue == inDate2Month && inDate2Day >= dayOfMonth) || (monthValue > inDate2Month) )\n {\n return true;\n }else{\n\n return false;\n\n }\n\n }\n return false;\n\n }",
"boolean hasDate();",
"protected final void normalise()\n {\n // yyyy, mm, dd must be set at this point\n if ( isValid(yyyy,mm,dd) ) return;\n else if ( mm > 12 )\n {\n yyyy += (mm-1) / 12;\n mm = ((mm-1) % 12) + 1;\n if ( isValid(yyyy,mm,dd) ) return;\n }\n else if ( mm <= 0 )\n {\n // Java's definition of modulus means we need to handle negatives as a special case.\n yyyy -= -mm / 12 + 1;\n mm = 12 - (-mm % 12);\n if ( isValid(yyyy,mm,dd) ) return;\n }\n if ( isValid(yyyy,mm,01) )\n {\n int olddd = dd;\n dd = 1;\n toOrdinal();\n ordinal += olddd - 1;\n toGregorian();\n if ( isValid(yyyy,mm,dd) ) return;\n }\n\n throw new IllegalArgumentException(\"date cannot be normalised: \"\n + yyyy + \"/\" + mm + \"/\" + dd);\n\n }",
"public static void dateFormat() {\n }",
"private static void formatDate(Date i) {\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"MM/dd/yy\");\n\t\tformatter.setLenient(false);\n\t\tAnswer = formatter.format(i);\n\t}",
"private String convertDate(String date){\r\n String arrDate[] = date.split(\"/\");\r\n date = arrDate[2] + \"-\" + arrDate[1] + \"-\" + arrDate[0];\r\n return date;\r\n }",
"public static String convertDateToStandardFormat(String inComingDateformat, String date)\r\n\t{\r\n\t\tString cmName = \"DateFormatterManaager.convertDateToStandardFormat(String,String)\";\r\n\t\tString returnDate = \"\";\r\n\t\ttry\r\n\t\t{\r\n\t\t\tif (date != null && !date.trim().equals(\"\"))\r\n\t\t\t{\r\n\t\t\t\tif (inComingDateformat != null && !inComingDateformat.trim().equals(\"\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(inComingDateformat);\r\n\t\t\t\t\tDate parsedDate = sdf.parse(date);\r\n\t\t\t\t\tSimpleDateFormat standardsdf = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\t\t\t\t\treturnDate = standardsdf.format(parsedDate);\r\n\t\t\t\t} else\r\n\t\t\t\t{\r\n\t\t\t\t\treturnDate = date;\r\n\t\t\t\t\tlogger.cterror(\"CTBAS00113\", cmName, date);\r\n\t\t\t\t}\r\n\t\t\t} else\r\n\t\t\t{\r\n\t\t\t\tlogger.ctdebug(\"CTBAS00114\", cmName);\r\n\t\t\t}\r\n\t\t} catch (ParseException pe) // just in case any runtime exception occurred just return input datestr as it is\r\n\t\t{\r\n\t\t\treturnDate = date;\r\n\t\t\tlogger.cterror(\"CTBAS00115\", pe, cmName, date, inComingDateformat);\r\n\t\t}\r\n\t\treturn returnDate;\r\n\t}",
"default String toDisplay(Date date) {\n return getDisplayDateFormat().format(date);\n }",
"private String formatDate(Date date) {\n String resultDate;\n SimpleDateFormat dateFormat;\n dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n resultDate = dateFormat.format(date);\n return resultDate;\n }",
"static String getReadableDate(LocalDate date){\r\n\t\tString readableDate = null;\r\n\t\t//convert only if non-null\r\n\t\tif(null != date){\r\n\t\t\t//convert date to readable form\r\n\t\t\treadableDate = date.toString(\"MM/dd/yyyy\");\r\n\t\t}\r\n\t\t\r\n\t\treturn readableDate;\r\n\t}",
"public String getFechatxt(Date d){\n \n try {\n String formato = selectorfecha.getDateFormatString();\n //Formato\n \n SimpleDateFormat sdf = new SimpleDateFormat(formato);\n String txtfechap = sdf.format(d);\n return txtfechap;\n } catch (NullPointerException ex) {\n JOptionPane.showMessageDialog(this, \"Al menos selecciona una fecha válida!\", \"Error!\", JOptionPane.INFORMATION_MESSAGE);\n return null;\n\n }\n\n\n \n }",
"private static void formatDate (XmlDoc.Element date) throws Throwable {\n\t\tString in = date.value();\n\t\tString out = DateUtil.convertDateString(in, \"dd-MMM-yyyy\", \"yyyy-MM-dd\");\n\t\tdate.setValue(out);\n\t}",
"public Boolean validarFecha(LocalDate fechaIngresada);",
"private static String convertDate(String dateString) {\n String date = null;\n\n try {\n //Parse the string into a date variable\n Date parsedDate = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss\").parse(dateString);\n\n //Now reformat it using desired display pattern:\n date = new SimpleDateFormat(DATE_FORMAT).format(parsedDate);\n\n } catch (ParseException e) {\n Log.e(TAG, \"getDate: Error parsing date\", e);\n e.printStackTrace();\n }\n\n return date;\n }",
"public String getDateConvert() {\n SimpleDateFormat dateFormat1 = new SimpleDateFormat(\"MMM dd yyyy - hh:mm\");\n SimpleDateFormat dateFormat2 = new SimpleDateFormat(\"a\");\n String date = dateFormat1.format(this.timePost) + dateFormat2.format(this.timePost).toLowerCase();\n return date;\n }",
"@Test\n @DisplayName(\"convert string to LocaleDate\")\n void convertStringToLocaleDate() {\n String date = \"10 13 2020\";\n LocalDate localDate = DateTimeFormatter.convertStringToLocaleDate(date);\n\n //agenda.addDanceClass(\"Tango Argentin\", \"Tokyo\", date);\n // assertEquals(localDate, );\n }",
"private boolean dateValidation(String userDate){\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\");\n sdf.setLenient(false);\n\n try {\n\n //if not valid, it will throw ParseException\n Date date = sdf.parse(userDate);\n System.out.println(date);\n\n } catch (ParseException e) {\n\n e.printStackTrace();\n return false;\n }\n\n return true;\n }",
"boolean isSetFoundingDate();",
"boolean getToDayNull();",
"private void updateLabel() {\n String myFormat = \"dd-MM-YYYY\"; //In which you need put here\n SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.US);\n dateInput.setText(sdf.format(myCalendar.getTime()));\n }",
"@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tString fcraDate = (String) btnFcraDate.getText();\n\t\t\t\t\tString dateParts[] = fcraDate.split(\"-\");\n\t\t\t\t\tsetfromday1 = dateParts[0];\n\t\t\t\t\tsetfrommonth1 = dateParts[1];\n\t\t\t\t\tsetfromyear1 = dateParts[2];\n\t \n\t\t\t\t\t//System.out.println(\"fcradate is:\"+setfromday1);\n\t\t\t\t\t//System.out.println(\"fcradate is:\"+setfrommonth1);\n\t\t\t\t\t//System.out.println(\"fcradate is:\"+setfromyear1);\n\t\t\t\t\t//System.out.println(\"fcradate is:\"+fcraDate);\n\t\t\t\t\tshowDialog(FCRA_DATE_DIALOG_ID);\n\t\t\t\t}",
"protected String getSelectedDate()\n {\n String startsOnDate = String.valueOf(selectedYear);\n if(selectedMonth<10)startsOnDate+=\"-0\"+String.valueOf(selectedMonth);\n else startsOnDate+=\"-\"+String.valueOf(selectedMonth);\n if(selectedDay<10)startsOnDate+=\"-0\"+String.valueOf(selectedDay);\n else startsOnDate+=\"-\"+String.valueOf(selectedDay);\n\n return startsOnDate;\n }",
"java.lang.String getDate();",
"java.lang.String getToDate();",
"private void setDate() {\n Date date = new Date();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n datetxt2.setText(sdf.format(date));\n }",
"public void testCompareDateAndString() {\n\t\tString value = \"2012-05-08\";\r\n FormatDateField dateField = new FormatDateField();\r\n\t\tdateField.setPropertyEditor(new DateTimePropertyEditor(DateUtil.datePattern));\r\n\t\tDate date = DateUtil.convertStringToDate(value.toString());\r\n\t\tassertEquals(false, compareDateAndString(dateField.getPropertyEditor(), date, value));\r\n\t\t\r\n\t\t// 2. Date (value = \"2012-05-09\", date = 2012-05-08)\r\n\t\tvalue = \"2012-05-09\";\r\n\t\tassertEquals(true, compareDateAndString(dateField.getPropertyEditor(), date, value));\r\n\t\t\r\n\t\t// 3. DateTime (value = \"2012-05-08T00:00:00\", date = 2012-05-08T00:00:00)\r\n\t\tvalue = \"2012-05-08T00:00:00\";\r\n\t\tdateField.setPropertyEditor(new DateTimePropertyEditor(DateUtil.formatDateTimePattern));\r\n\t\tdate = DateUtil.convertStringToDate(DateUtil.dateTimePattern,value.toString());\r\n dateField.setValue(date);\r\n\t\tassertEquals(false, compareDateAndString(dateField.getPropertyEditor(), date, value));\r\n\t\t\r\n\t\t// 4. DateTime (value = \"2012-05-09T00:00:00\", date = 2012-05-08T00:00:00)\r\n\t\tvalue = \"2012-05-09T00:00:00\";\r\n\t\tassertEquals(true, compareDateAndString(dateField.getPropertyEditor(), date, value));\r\n\t\t\r\n\t\t// 5. value = date = null;\r\n\t\tassertEquals(false, compareDateAndString(dateField.getPropertyEditor(), null, null));\r\n\t\t\r\n\t\t// 6. value = null, date != null\r\n\t\tassertEquals(true, compareDateAndString(dateField.getPropertyEditor(), date, null));\r\n\t\t\r\n\t\t// 7. value != null, date = null\r\n\t\tassertEquals(true, compareDateAndString(dateField.getPropertyEditor(), null, value));\r\n\t\t\r\n\t}",
"public boolean isDateValue()\n {\n return getFieldType().equalsIgnoreCase(TYPE_DATE);\n }",
"public boolean DateValidation(String date, String startTime, String currentTime) {\n\n boolean state = false;\n\n //String x = dateChooser.getDate().toString();\n String Hyear = date.substring(24, 28); // get user input date\n String Hmonth = monthToCompare(date);\n String Hdate = date.substring(8, 10);\n String stHr = startTime.substring(0, 2);\n String stMin = startTime.substring(3, 5);\n\n int userYr, userMnth, userDate, userHour, userMin = 0;\n userYr = Integer.parseInt(Hyear); // conversion of user entered year to int\n userMnth = Integer.parseInt(Hmonth);\n userDate = Integer.parseInt(Hdate);\n userHour = Integer.parseInt(stHr);\n userMin = Integer.parseInt(stMin);\n\n String yyr = currentTime.substring(0, 4); // get currrent year from the string f\n String mmnth = currentTime.substring(5, 7);\n String ddt = currentTime.substring(8, 10); // get current date from the string f\n String hours = currentTime.substring(11, 13);\n String mins = currentTime.substring(14, 16);\n\n int yr, mnth, dt, shr, smin = 0;\n yr = Integer.parseInt(yyr); // convert current year from string to int\n mnth = Integer.parseInt(mmnth);\n dt = Integer.parseInt(ddt);\n shr = Integer.parseInt(hours);\n smin = Integer.parseInt(mins);\n\n if ((userYr == yr) || (userYr > yr)) { // if user entered year is the current year or future year, ok \n if (((userYr == yr) && (userMnth >= mnth)) || ((userYr > yr) && (userMnth >= mnth)) || ((userYr > yr) && (userMnth < mnth))) {\n if (((userYr == yr) && (userMnth >= mnth) && (userDate >= dt)) || ((userYr == yr) && (userMnth > mnth) && (userDate < dt)) || ((userYr == yr) && (userMnth > mnth) && (userDate >= dt))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt)) || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt))\n || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt)) || ((userYr > yr) && (userMnth < mnth) && (userDate < dt))) {\n if (((userYr == yr) && (userMnth == mnth) && (userDate >= dt) && (userHour >= shr)) || ((userYr == yr) && (userMnth == mnth) && (userDate > dt) && (userHour < shr))\n || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour >= shr)) || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour >= shr))\n || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour < shr)) || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour < shr))\n || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour >= shr)) || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour >= shr))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour >= shr)) || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour >= shr))\n || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour < shr)) || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour < shr))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour < shr)) || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour < shr))) {\n if (((userYr == yr) && (userMnth == mnth) && (userDate == dt) && (userHour == shr) && (userMin >= smin)) || ((userYr == yr) && (userMnth == mnth) && (userDate == dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr == yr) && (userMnth == mnth) && (userDate == dt) && (userHour > shr) && (userMin < smin)) || ((userYr == yr) && (userMnth == mnth) && (userDate > dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr == yr) && (userMnth == mnth) && (userDate > dt) && (userHour < shr) && (userMin >= smin)) || ((userYr == yr) && (userMnth == mnth) && (userDate > dt) && (userHour >= shr) && (userMin < smin))\n || ((userYr == yr) && (userMnth == mnth) && (userDate > dt) && (userHour < shr) && (userMin < smin)) || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour >= shr) && (userMin < smin)) || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour < shr) && (userMin >= smin))\n || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour >= shr) && (userMin >= smin)) || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour >= shr) && (userMin < smin))\n || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour < shr) && (userMin >= smin)) || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour < shr) && (userMin < smin))\n || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour < shr) && (userMin < smin)) || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour >= shr) && (userMin < smin)) || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour < shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour < shr) && (userMin < smin)) || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour >= shr) && (userMin < smin)) || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour < shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour < shr) && (userMin < smin)) || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour >= shr) && (userMin < smin)) || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour < shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour < shr) && (userMin < smin)) || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour >= shr) && (userMin < smin)) || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour < shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour < shr) && (userMin < smin))) {\n state = true;\n } else {\n JOptionPane.showMessageDialog(null, \"Invalid time!\");\n state = false;\n }\n\n } else {\n JOptionPane.showMessageDialog(null, \"Invalid time!\");\n state = false;\n }\n\n } else {\n JOptionPane.showMessageDialog(null, \"Invalid day!\");\n state = false;\n }\n\n } else {\n JOptionPane.showMessageDialog(null, \"Invalid month!\");\n state = false;\n }\n } else {// if the user entered year is already passed\n JOptionPane.showMessageDialog(null, \"Invalid year\");\n state = false;\n }\n return state;\n }",
"public void setDateText(String date);",
"@Test\n public void dateUtilTest() {\n String orgStr = \"2016-01-05 10:00:17\";\n Date orgDate = new Date(1451959217000L);\n Assert.assertTrue(DateStrValueConvert.dateFormat(orgDate).equals(orgStr));\n Assert.assertTrue(DateStrValueConvert.dateConvert(orgStr).equals(orgDate));\n }",
"public void saveCalenderDate() {\r\n\t\tdate = getDateToDisplay(null);\r\n\t}",
"String getDate();",
"String getDate();",
"public String formatDate(Object valor) {\r\n\t\tString aux = valor.toString();\r\n\t\tif (!aux.equalsIgnoreCase(\" \") && !aux.equalsIgnoreCase(\"\")) {\r\n\t\t\tString anio = aux.substring(0, 4);\r\n\t\t\tString mes = aux.substring(4, 6);\r\n\t\t\tString dia = aux.substring(6);\r\n\t\t\treturn dia + \"/\" + mes + \"/\" + anio;\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn aux;\r\n\t}",
"@Method(selector = \"stringFromDate:toDate:\")\n public native String format(NSDate fromDate, NSDate toDate);",
"public static void main(String[] args) {\n\t double d=123456.789;\r\n\t\tNumberFormat nf=NumberFormat.getInstance(Locale.ITALY);\r\n\t\tNumberFormat nf1=NumberFormat.getInstance(Locale.US);\r\n\t\tNumberFormat nf2=NumberFormat.getInstance(Locale.ENGLISH);\r\n\t\tSystem.out.println(\"Italy representation of \" + d + \" : \"+nf.format(d));\r\n\t\tSystem.out.println(\"US representation of \" + d + \" : \" +nf1.format(d));\r\n\t\tSystem.out.println(\"Japan representation of \" + d + \" : \" +nf2.format(d));\r\n\t\t\r\n\t //DateTimeFormat in short,long and medium with getDateTimeInstance\r\n\t\tDateFormat df=DateFormat.getDateTimeInstance(DateFormat.SHORT,DateFormat.SHORT);\r\n\t System.out.println(\"Short format of date: \"+df.format(new Date()));\r\n\t DateFormat df1=DateFormat.getDateTimeInstance(DateFormat.LONG,DateFormat.LONG);\r\n\t System.out.println(\"Long format of date: \"+df1.format(new Date()));\r\n\t DateFormat df2=DateFormat.getDateTimeInstance(DateFormat.MEDIUM,DateFormat.MEDIUM);\r\n\t System.out.println(\"Medium format of date: \"+df2.format(new Date()));\r\n\t \r\n\t //Locale date format giving countries starting letters to get time but using only getDateInstance(de-denmark)\r\n\t DateFormat df3=DateFormat.getDateInstance(DateFormat.SHORT,new Locale(\"de\",\"DE\"));\r\n\t System.out.println(\"Short format of date: \"+df3.format(new Date()));\r\n\t DateFormat df4=DateFormat.getDateInstance(DateFormat.LONG,new Locale(\"de\",\"DE\"));\r\n\t System.out.println(\"Long format of date: \"+df4.format(new Date()));\r\n\t DateFormat df5=DateFormat.getDateInstance(DateFormat.MEDIUM,new Locale(\"de\",\"DE\"));\r\n\t System.out.println(\"Medium format of date: \"+df5.format(new Date()));\r\n\t \r\n\r\n}",
"private static String checkFormat(String date){\r\n\t\tif(date.length()==0) return \"\";\r\n\t\tint dateChars=0,timeChars=0;\r\n\t\tchar currenChar;\r\n\t\t\r\n\t\t//check if the first and the last character of the string is a number, it must always be\r\n\t\tif(!Character.isDigit(date.charAt(0))) return \"\";\r\n\t\tif(!Character.isDigit(date.charAt((date.length()-1)))) return \"\";\r\n\t\t\r\n\t\t\r\n\t\tfor(int i=1; i<date.length()-1;i++){\r\n\t\t\tcurrenChar=date.charAt(i);\r\n\t\t\t\r\n\t\t\t//check if every character is / or : or number\t\t\r\n\t\t\tif(!(Character.isDigit(currenChar) || currenChar==':' || currenChar=='/')) return \"\";\r\n\t\t\t//check if there is a number between // or ::, if not it returns false\r\n\t\t\tif((currenChar==':' || currenChar=='/') && (date.charAt(i+1)==':' || date.charAt(i+1)=='/')) return \"\";\r\n\t\t\t\r\n\t\t\t//count the / and :\r\n\t\t\tif(currenChar==':') timeChars++; \r\n\t\t\telse if(currenChar=='/') dateChars++;\r\n\t\t}\r\n\t\t\r\n\t\t//if it is time with one :\r\n\t\tif(timeChars==1 && dateChars==0){\r\n\t\t\t//check if one of the numbers has more than 2 digits, then it is invalid\r\n\t\t\tint index=0;\r\n\t\t\tfor(String s:splitWords(date.replaceAll(\":\", \" \"))){\r\n\t\t\t\tif( index==0 && s.length()!=1 && s.length()!=2) return \"\";\r\n\t\t\t\telse if(index>0 && s.length()!=2 ) return \"\";\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\treturn formats[2];\r\n\t\t}\r\n\t\t\r\n\t\t//if it is time with two :\r\n\t\telse if(timeChars==2 && dateChars==0){\r\n\t\t\t//check if one of the numbers has more than 2 digits, then it is invalid\r\n\t\t\tint index=0;\r\n\t\t\tfor(String s:splitWords(date.replaceAll(\":\", \" \"))){\r\n\t\t\t\tif( index==0 && s.length()!=1 && s.length()!=2) return \"\";\r\n\t\t\t\telse if(index>0 && s.length()!=2 ) return \"\";\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\treturn formats[1];\r\n\t\t}\r\n\t\t\r\n\t\t//if it is a date with two /\r\n\t\telse if(dateChars==2 && timeChars==0){\r\n\t\t\t//check if one of the numbers have the right amount of digits\r\n\t\t\tString[] numbers= splitWords(date.replaceAll(\"/\", \" \"));\r\n\t\t\tif(numbers[0].length()>2) return \"\";\r\n\t\t\tif(numbers[1].length()>2) return \"\";\r\n\t\t\tif(numbers[2].length()>4) return \"\";\r\n\t\t\t\r\n\t\t\treturn formats[0];\r\n\t\t}\r\n\t\t\r\n\t\telse return \"\";\t\t\r\n\t}",
"public DateCell(String value) // constructs the date\n\t{\n\t\tSimpleDateFormat format = new SimpleDateFormat(\"mm/dd/yyyy\"); // creates date format\n date = format.parse(value,new ParsePosition(0)); // creates date \n String dateCompare = format.format(date); // puts date into a string\n //below is used for comparing dates\n String[] dateCompareOps = dateCompare.split(\"/\"); // splits values at the /\n month = Integer.parseInt(dateCompareOps[0]); // gets value for month\n day = Integer.parseInt(dateCompareOps[1]); // gets value for day\n year = Integer.parseInt(dateCompareOps[2]); // gets value for year\n\t}",
"String isOoseChangeDateAllowed(Record inputRecord);",
"public static Date getDateIsos() {\n\t\tDate date;\n\t\ttry {\n\t\t\t/**\n\t\t\t * se crea una fecha con el ISO\n\t\t\t */\n\t\t\tdate = new SimpleDateFormat(DATE_FORMAT).parse(getDateIso());\n\t\t} catch (ParseException e) {\n\t\t\tUtils.printError(e, Utils.class.getName(), e.getMessage());\n\t\t\tdate = new Date();\n\t\t}\n\t\treturn date;\n\t}",
"private String leerFecha() {\n\t\ttry {\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"YYYY/MM/dd\");\n\t\t\treturn sdf.format(txtFecha.getDate());\n\t\t} catch (Exception e) {\n\t\t\tJOptionPane.showMessageDialog(this, \"Seleccione una fecha válida\", \"Aviso\", 2);\n\t\t\treturn null;\n\t\t}\n\t}",
"public static String getFormattedDateForVisualization(Date date) {\n SimpleDateFormat curFormater = new SimpleDateFormat(\"EEE, d MMM yyyy HH:mm\");\n String newDateStr = curFormater.format(date);\n return newDateStr;\n }",
"private static boolean validDate(String date) {\n\t\t SimpleDateFormat formatter = new SimpleDateFormat(\"MM/dd/yy\");\n\t\tformatter.setLenient(false);\n\t\tDate tryDate = null; \n\t\t\ttry\n\t\t{\n\t\t\ttryDate = formatter.parse(date);\n\t\t}catch (ParseException e) {\n\t\t\treturn false;\n\t\t}\n\t\tformatDate(tryDate);\n\t\treturn true; \n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tLocalDate today=LocalDate.now();\n\t\t\n\t\tDateTimeFormatter dtf=DateTimeFormatter.ofPattern(\"YYYY/MM/DD\");\n\t\tDateTimeFormatter dtf1=DateTimeFormatter.ofPattern(\"YYYY MM DD\");\n\t\t\n\t\tDateTimeFormatter dtfull=DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL);\n\t\tDateTimeFormatter dtm=DateTimeFormatter.ofLocalizedDate(FormatStyle.MEDIUM);\n\t\tDateTimeFormatter dts=DateTimeFormatter.ofLocalizedDate(FormatStyle.SHORT);\n\t\t\n\t\t\n\t\tString afterformat=today.format(dtf);\n\t\tSystem.out.println(afterformat);\n\t\tString afterformat1=today.format(dtf1);\n\t\tSystem.out.println(afterformat1);\n\t\tString fd=today.format(dtfull);\n\t\tSystem.out.println(fd);\n\t\tString md=today.format(dtm);\n\t\tSystem.out.println(md);\n\t\tString sd=today.format(dts);\n\t\tSystem.out.println(sd);\n\t\t\n\t\t\n\n\t}",
"public static String formatDate(String strDate, boolean TimeOnly) {\n Date date = new Date();\n String finalDate = \"\";\n try {\n date = SDF_ISO_8601.parse(strDate);\n Calendar c = new GregorianCalendar(Locale.getDefault());\n TimeZone tzGMT = TimeZone.getTimeZone(\"GMT\");\n // c.setTimeZone(tzGMT);\n c.setTimeInMillis(date.getTime());\n\n if (IsDateToday(strDate)) {\n finalDate = String.format(\n \"Today at %02d:%02d %s\",\n c.get(Calendar.HOUR_OF_DAY) > 12 ? c\n .get(Calendar.HOUR_OF_DAY) % 12 : c\n .get(Calendar.HOUR_OF_DAY), c\n .get(Calendar.MINUTE),\n c.get(Calendar.AM_PM) == Calendar.AM ? \"AM\" : \"PM\");\n } else if (IsDateYesterday(strDate)) {\n finalDate = String.format(\n \"Yesterday at %02d:%02d%s\",\n c.get(Calendar.HOUR_OF_DAY) > 12 ? c\n .get(Calendar.HOUR_OF_DAY) % 12 : c\n .get(Calendar.HOUR_OF_DAY), c\n .get(Calendar.MINUTE),\n c.get(Calendar.AM_PM) == Calendar.AM ? \"AM\" : \"PM\");\n } else if (IsDateWithinThisWeek(strDate)) {\n finalDate = String.format(\n \"%s %02d:%02d %s\",\n DaysOfWeek[c.get(Calendar.DAY_OF_WEEK) - 1],\n c.get(Calendar.HOUR_OF_DAY) > 12 ? c\n .get(Calendar.HOUR_OF_DAY) % 12 : c\n .get(Calendar.HOUR_OF_DAY), c\n .get(Calendar.MINUTE),\n c.get(Calendar.AM_PM) == Calendar.AM ? \"AM\" : \"PM\");\n } else {\n finalDate = String.format(\n \"%s %s %s at %02d:%02d %s\",\n Months[c.get(Calendar.MONTH)],\n c.get(Calendar.DATE),\n c.get(Calendar.YEAR),\n c.get(Calendar.HOUR_OF_DAY) > 12 ? c\n .get(Calendar.HOUR_OF_DAY) % 12 : c\n .get(Calendar.HOUR_OF_DAY), c\n .get(Calendar.MINUTE),\n c.get(Calendar.AM_PM) == Calendar.AM ? \"AM\" : \"PM\");\n }\n } catch (ParseException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return finalDate;\n\n }",
"private String formatDate(final Date date) {\r\n\t\tfinal Calendar calendar = Calendar.getInstance();\r\n\t\tcalendar.setTime(date);\r\n\r\n\t\tfinal String dayOfMonth = formatDayOfMonth(calendar);\r\n\t\tfinal String month = formatMonth(calendar);\r\n\t\tfinal String year = String.valueOf(calendar.get(Calendar.YEAR));\r\n\r\n\t\treturn String.format(\"%s/%s/%s\", year, month, dayOfMonth);\r\n\t}",
"private void clickAndCheckDateButton ( final String viewDate ) {\n final List<WebElement> radioList = driver.findElements( By.name( \"date\" ) );\n\n for ( final WebElement element : radioList ) {\n final String v = element.getAttribute( \"value\" );\n final ZonedDateTime datetimeLabor = ZonedDateTime.parse( v );\n String g = \"\";\n if ( datetimeLabor.getMonthValue() < 10 ) {\n g += \"0\" + datetimeLabor.getMonthValue() + \"/\";\n }\n else {\n g += datetimeLabor.getMonthValue() + \"/\";\n }\n if ( datetimeLabor.getDayOfMonth() < 10 ) {\n g += \"0\" + datetimeLabor.getDayOfMonth() + \"/\";\n }\n else {\n g += datetimeLabor.getDayOfMonth() + \"/\";\n }\n g += datetimeLabor.getYear();\n if ( g.equals( viewDate ) ) {\n element.click();\n // assertTextPresent( \"Labor and Delivery Reports for: \" +\n // viewDate );\n return;\n }\n }\n\n fail( \"The date isn't in the radio list.\" );\n }",
"public static boolean isDate(InputField f, String format) {\r\n\t\tString d = f.getValue().replace(\"-\", \"\").replace(\"/\", \"\");\r\n\t\ttry {\r\n\t\t\tnew SimpleDateFormat(format).parse(d);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tcatch(Exception e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"DateFormatPanel() {\r\n\t\tfDateFormat = DateFormat.getTimeInstance(DateFormat.DEFAULT);\r\n\t}",
"public void createDate(){\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy_MM_dd\"); //TODO -HHmm si dejo diagonales separa bonito en dia, pero para hacer un armado de excel creo que debo hacer un for mas\n currentDateandTime = sdf.format(new Date());\n Log.e(TAG, \"todays date is: \"+currentDateandTime );\n\n}",
"public static String dateTran(String dateOri){\n\t\tDateFormat formatter1 ; \n\t\tDate date ; \n\t\tString newDate=null;\n\t\tformatter1 = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\ttry {\n\t\t\tdate=formatter1.parse(dateOri);\n\t\t\tSimpleDateFormat formatter = new SimpleDateFormat ( \"M/d/yy\" );\n\t\t\tnewDate = formatter.format(date);\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn newDate;\n\t}",
"public static boolean comprobarFecha(String s){\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n //dateFormat.setLenient(false);\n try {\n dateFormat.parse(s.trim());\n }catch (ParseException pe) {\n System.out.println(\"Fecha introducida de manera erronea\");\n return false;\n }\n return true;\n }",
"public void selectDate(){\r\n\t\tcloseDateText.sendKeys(ConvertDate());\r\n\t}",
"@Test\n\t@DisplayName(\"date to string\")\n\tpublic void testDateToString()\n\t{\n\t\tString dateInString = \"2000-04-12\";\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\ttry {\n\t\t date1 = formatter.parse(dateInString);\n\t\t} catch (ParseException e) {\n\t\t //handle exception if date is not in \"dd-MMM-yyyy\" format\n\t\t}\n\t\tDateConverter s = new DateConverter(date1);\n\t\tassertEquals(\"2000-04-12\", s.getDateAsString());\n\t}",
"public interface DatePropertySchema {\n /**\n * Returns source date format\n * @return Source date format\n */\n DateFormat getSourceDateFormat();\n\n /**\n * Returns display date format\n * @return Display date format\n */\n DateFormat getDisplayDateFormat();\n\n /**\n * Converts a string into a date with the source date format\n * @param date A string representing a date\n * @return Date\n */\n default Date fromSource(String date) {\n try {\n return getSourceDateFormat().parse(date);\n } catch (ParseException e) {\n throw new RuntimeException(String.format(\"couldn't parse date:{0} using:{1}\", date, getSourceDateFormat()));\n }\n }\n\n /**\n * Converts a string into a date with the display date format\n * @param date A string representing a date\n * @return Date\n */\n default Date fromDisplay(String date) {\n try {\n return getDisplayDateFormat().parse(date);\n } catch (ParseException e) {\n throw new RuntimeException(String.format(\"couldn't parse date:{0} using:{1}\", date, getDisplayDateFormat()));\n }\n }\n\n /**\n * Converts a date into a string with the display date format\n * @param date A date\n * @return A string representing a date\n */\n default String toDisplay(Date date) {\n return getDisplayDateFormat().format(date);\n }\n\n /**\n * Converts a date into a string with the source date format\n * @param date A date\n * @return A string representing a date\n */\n default String toSource(Date date) {\n return getSourceDateFormat().format(date);\n }\n}",
"public String convertDateFormate(String dt) {\n String formatedDate = \"\";\n if (dt.equals(\"\"))\n return \"1970-01-01\";\n String[] splitdt = dt.split(\"-\");\n formatedDate = splitdt[2] + \"-\" + splitdt[1] + \"-\" + splitdt[0];\n \n return formatedDate;\n \n }",
"java.lang.String getStartDateYYYYMMDD();",
"private Command createDisplayDateRangeNaturalLanguage(ArrayList<String> timeArray, List<Date> dates,\n SimpleDateFormat dateFormat) {\n Command command;\n Date fromDate = dates.get(0);\n Date toDate = dates.get(1);\n String formattedStartDate = dateFormat.format(fromDate);\n String formattedToDate = dateFormat.format(toDate);\n timeArray.add(formattedStartDate); \n timeArray.add(formattedToDate);\n command = new Command(\"display\", 3, timeArray);\n return command;\n }",
"private static String toDateTime(String dateSubmitted) {\n\t\tString[] extracted = dateSubmitted.split(\" \");\n\t\t\n\t\tString[] date = extracted[0].split(\"/\");\n\t\t\n\t\tif(date[0].length() == 1)\n\t\t\tdate[0] = \"0\" + date[0];\n\t\tif(date[1].length() == 1)\n\t\t\tdate[1] = \"0\" + date[1];\n\t\t\n\t\treturn date[2] + \"-\" + date[0] + \"-\" + date[1] + \" \" + extracted[1];\n\t}",
"public String changeDateFormat(String dateStr) {\n String inputPattern = \"MMM-dd-yyyy\";\n String outputPattern = \"MMMM dd, yyyy\";\n SimpleDateFormat inputFormat = new SimpleDateFormat(inputPattern);\n SimpleDateFormat outputFormat = new SimpleDateFormat(outputPattern);\n\n Date date = null;\n String str = null;\n\n try {\n date = inputFormat.parse(dateStr);\n str = outputFormat.format(date);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return str;\n\n }",
"@Test\n public void testconvertDateYearsLongueurPasValide() {\n FieldVerifier projet = new FieldVerifier();\n boolean longueurInvalideTest = projet.isValidDate(\"01/05/102\");\n assertEquals(false, longueurInvalideTest);\n }",
"public boolean checkDate() {\n\t\tboolean cd = checkDate(this.year, this.month, this.day, this.hour);\n\t\treturn cd;\n\t}",
"private String toDate(Date appDate) throws ParseException {\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTime(appDate);\n\t\tString formatedDate = cal.get(Calendar.DATE) + \"/\" + (cal.get(Calendar.MONTH) + 1) + \"/\" + cal.get(Calendar.YEAR);\n\t\tSystem.out.println(\"formatedDate : \" + formatedDate); \n\t\treturn formatedDate;\n\t}",
"private static List<String> listDateFormats(){\r\n List<String> result = new ArrayList<String>();\r\n result.add(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\r\n result.add(\"yyyy-MM-ddZZ\");\r\n result.add(\"yyyy-MM-dd'T'HH:mm:ssz\");\r\n result.add(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\");\r\n result.add(\"EEE MMM d hh:mm:ss z yyyy\");\r\n result.add(\"EEE MMM dd HH:mm:ss yyyy\");\r\n result.add(\"EEEE, dd-MMM-yy HH:mm:ss zzz\");\r\n result.add(\"EEE, dd MMM yyyy HH:mm:ss zzz\");\r\n result.add(\"EEE, dd MMM yy HH:mm:ss z\");\r\n result.add(\"EEE, dd MMM yy HH:mm z\");\r\n result.add(\"EEE, dd MMM yyyy HH:mm:ss z\");\r\n result.add(\"yyyy-MM-dd'T'HH:mm:ss\");\r\n result.add(\"EEE, dd MMM yyyy HH:mm:ss Z\");\r\n result.add(\"dd MMM yy HH:mm:ss z\");\r\n result.add(\"dd MMM yy HH:mm z\");\r\n result.add(\"'T'HH:mm:ss\");\r\n result.add(\"'T'HH:mm:ssZZ\");\r\n result.add(\"HH:mm:ss\");\r\n result.add(\"HH:mm:ssZZ\");\r\n result.add(\"yyyy-MM-dd\");\r\n result.add(\"yyyy-MM-dd hh:mm:ss\");\r\n result.add(\"yyyy-MM-dd HH:mm:ss\");\r\n result.add(\"yyyy-MM-dd'T'HH:mm:ssz\");\r\n result.add(\"yyyy-MM-dd'T'HH:mm:ss\");\r\n result.add(\"yyyy-MM-dd'T'HH:mm:ssZZ\");\r\n result.add(\"dd.MM.yyyy\");\r\n result.add(\"dd.MM.yyyy hh:mm:ss\");\r\n result.add(\"dd.MM.yyyy HH:mm:ss\");\r\n result.add(\"dd.MM.yyyy'T'HH:mm:ssz\");\r\n result.add(\"dd.MM.yyyy'T'HH:mm:ss\");\r\n result.add(\"dd.MM.yyyy'T'HH:mm:ssZZ\");\r\n result.add(\"dd.MM.yyyy hh:mm\");\r\n result.add(\"dd.MM.yyyy HH:mm\");\r\n result.add(\"dd/MM/yyyy\");\r\n result.add(\"dd/MM/yy\");\r\n result.add(\"MM/dd/yyyy\");\r\n result.add(\"MM/dd/yy\");\r\n result.add(\"MM/dd/yyyy hh:mm:ss\");\r\n result.add(\"MM/dd/yy hh:mm:ss\");\r\n return result;\r\n }",
"public static String formartDateforGraph(String mDate) {\n\t\t\t// TODO Auto-generated method stub\n\t\t\t\n\t\t\tSimpleDateFormat inSDF = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\tSimpleDateFormat outSDF = new SimpleDateFormat(\"yyyy-MM-dd\");\n\n\t\t\t \n\t\t\t String outDate = \"\";\n\t\t\t \n\t\t\t if (mDate != null) {\n\t\t\t try {\n\t\t\t Date date = inSDF.parse(mDate);\n\t\t\t outDate = outSDF.format(date);\n\t\t\t \n\t\t\t \n\t\t\t } catch (Exception ex){ \n\t\t\t \tex.printStackTrace();\n\t\t\t }\n\t\t\t }\n\t\t\t return outDate;\n\t\t}",
"public String DateFormatted(){\n\t\tSimpleDateFormat simDate = new SimpleDateFormat(\"E, dd/MM/yy hh:mm:ss a\");\n\t\treturn simDate.format(date.getTime());\n\t}"
] | [
"0.71006835",
"0.6980413",
"0.688144",
"0.5659676",
"0.55190504",
"0.5511233",
"0.5421783",
"0.53688806",
"0.536479",
"0.53336245",
"0.5329587",
"0.5307037",
"0.5301122",
"0.52842987",
"0.52721083",
"0.5271816",
"0.5254605",
"0.52496946",
"0.5247872",
"0.523801",
"0.5177054",
"0.51639235",
"0.5161896",
"0.5155232",
"0.50978935",
"0.50950444",
"0.5090682",
"0.5038087",
"0.50245255",
"0.5020243",
"0.5015966",
"0.5014072",
"0.5013429",
"0.5008953",
"0.5007803",
"0.49940416",
"0.49856472",
"0.49812913",
"0.49788132",
"0.49781874",
"0.49586493",
"0.49502233",
"0.494009",
"0.49276447",
"0.49204344",
"0.491864",
"0.49111924",
"0.49105147",
"0.49063626",
"0.48959377",
"0.4895093",
"0.4887038",
"0.48850295",
"0.4879571",
"0.48782182",
"0.4877658",
"0.48769855",
"0.48758018",
"0.48742893",
"0.48733363",
"0.48587558",
"0.48513103",
"0.4851174",
"0.48453546",
"0.48443532",
"0.48399472",
"0.48399472",
"0.48396647",
"0.48165277",
"0.48153698",
"0.48150086",
"0.4813892",
"0.48109096",
"0.4809006",
"0.48032728",
"0.47907314",
"0.479009",
"0.47872907",
"0.4786381",
"0.47808814",
"0.47755197",
"0.4773552",
"0.4772606",
"0.47686908",
"0.47630006",
"0.4762719",
"0.47597742",
"0.4757791",
"0.47569528",
"0.47472754",
"0.4743621",
"0.47423735",
"0.4733424",
"0.47321677",
"0.47317535",
"0.4731366",
"0.47218353",
"0.47198793",
"0.47193685",
"0.47165203"
] | 0.68422276 | 3 |
Converts date format from logical to visual. | @VTID(6)
String convertLogicalToVisualDateType(
int fieldType,
boolean skipEqualityInVerification,
String logicalDate); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@VTID(4)\n String convertLogicalToVisualDate(\n String fieldName,\n String logicalDate);",
"@VTID(3)\n String convertVisualToLogicalDate(\n String fieldName,\n String visualDate);",
"DateFormat getDisplayDateFormat();",
"default String toDisplay(Date date) {\n return getDisplayDateFormat().format(date);\n }",
"public void formatDateTime() {\n // Check if type of parsing is for display or not. \n // If it is for display, no need to check if date has already passed.\n if (parseType != 2) {\n startDate = dtFormat.formatDate(startDate,0);\n endDate = dtFormat.formatDate(endDate,0);\n } else {\n startDate = dtFormat.formatDate(startDate,1);\n endDate = dtFormat.formatDate(endDate,1);\n }\n \n startTime = dtFormat.formatTime(startTime);\n endTime = dtFormat.formatTime(endTime);\n }",
"private void setDate() {\n java.util.Date d1 = new java.util.Date();\n SimpleDateFormat df = new SimpleDateFormat(\"YYYY-MM-dd\");\n String formateDate = df.format(d1);\n lblDate.setText(formateDate); \n }",
"@VTID(5)\n String convertVisualToLogicalDateType(\n int fieldType,\n boolean skipEqualityInVerification,\n String visualDate);",
"private void configDate(){\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd\");\n tvDateLost.setText(dateFormat.format(date));\n }",
"public static String getFormattedDateForVisualization(Date date) {\n SimpleDateFormat curFormater = new SimpleDateFormat(\"EEE, d MMM yyyy HH:mm\");\n String newDateStr = curFormater.format(date);\n return newDateStr;\n }",
"public String formatForAmericanModel(Date data){\n //definido modelo americano\n DateFormat formatBR = new SimpleDateFormat(\"yyyy-MM-dd\");\n return formatBR.format(data);\n \n }",
"public LocalDate getViewDate();",
"private String formatDate(final Date date) {\r\n\t\tfinal Calendar calendar = Calendar.getInstance();\r\n\t\tcalendar.setTime(date);\r\n\r\n\t\tfinal String dayOfMonth = formatDayOfMonth(calendar);\r\n\t\tfinal String month = formatMonth(calendar);\r\n\t\tfinal String year = String.valueOf(calendar.get(Calendar.YEAR));\r\n\r\n\t\treturn String.format(\"%s/%s/%s\", year, month, dayOfMonth);\r\n\t}",
"public void date_zone() {\n\n JLabel lbl_date = new JLabel(\"Date du Rapport :\");\n lbl_date.setBounds(40, 90, 119, 16);\n add(lbl_date);\n String date = rapport_visite.elementAt(DAO_Rapport.indice)[2];\n Date date_n = null;\n\n\n // *** note that it's \"yyyy-MM-dd hh:mm:ss\" not \"yyyy-mm-dd hh:mm:ss\"\n SimpleDateFormat dt = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n\n try {\n date_n = dt.parse(date);\n } catch (ParseException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n // *** same for the format String below\n SimpleDateFormat dt1 = new SimpleDateFormat(\"dd-MM-yyyy\");\n\n JTextField date_rapport = new JTextField();\n date_rapport.setBounds(200, 90, 125, 22);\n date_rapport.setText(dt1.format(date_n));\n date_rapport.setEditable(false);\n add(date_rapport);\n\n\n\n\n }",
"private String convertDateToCron(Date date) {\n if (date == null)\n return \"\";\n Calendar calendar = java.util.Calendar.getInstance();\n calendar.setTime(date);\n\n String hours = String.valueOf(calendar.get(Calendar.HOUR_OF_DAY));\n\n String mins = String.valueOf(calendar.get(Calendar.MINUTE));\n\n String days = String.valueOf(calendar.get(Calendar.DAY_OF_MONTH));\n\n String months = new java.text.SimpleDateFormat(\"MM\").format(calendar.getTime());\n\n String years = String.valueOf(calendar.get(Calendar.YEAR));\n\n return \"0 \" + mins+ \" \" + hours + \" \" + days + \" \" + months + \" ? \" + years;\n }",
"private String formatDate(Date dateObject) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"LLL dd, yyyy\", Locale.getDefault());\n return dateFormat.format(dateObject);\n }",
"String formatDateCondition(Date date);",
"private String formatDate(Date date) {\n String resultDate;\n SimpleDateFormat dateFormat;\n dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n resultDate = dateFormat.format(date);\n return resultDate;\n }",
"private String formatDate(Date dateObject) {\r\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"LLL dd, yyyy\");\r\n return dateFormat.format(dateObject);\r\n }",
"public String ConvertDate(){\r\n//\t\tDate date=JavaUtils.getSystemDate();\r\n//\t DateFormat df = new SimpleDateFormat(\"yyyy/MM/dd\");\r\n\t String pattern = \"yyyy-MM-dd\";\r\n\t SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);\r\n\r\n\t String date = simpleDateFormat.format(new Date());\r\n//\t System.out.println(date);\r\n\t \r\n//\t String s = df.format(date);\r\n//\t String result = s;\r\n//\t try {\r\n//\t date=df.parse(result);\r\n//\t } catch (ParseException e) {\r\n//\t // TODO Auto-generated catch block\r\n//\t e.printStackTrace();\r\n//\t }\r\n\t return date;\r\n\t }",
"private String formatDate(Date dateObject) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"LLL dd, yyyy\");\n return dateFormat.format(dateObject);\n }",
"private void updateLabel() {\n String myFormat = \"dd-MM-YYYY\"; //In which you need put here\n SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.US);\n dateInput.setText(sdf.format(myCalendar.getTime()));\n }",
"public String formatDate(Object valor) {\r\n\t\tString aux = valor.toString();\r\n\t\tif (!aux.equalsIgnoreCase(\" \") && !aux.equalsIgnoreCase(\"\")) {\r\n\t\t\tString anio = aux.substring(0, 4);\r\n\t\t\tString mes = aux.substring(4, 6);\r\n\t\t\tString dia = aux.substring(6);\r\n\t\t\treturn dia + \"/\" + mes + \"/\" + anio;\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn aux;\r\n\t}",
"private static void formatDate (XmlDoc.Element date) throws Throwable {\n\t\tString in = date.value();\n\t\tString out = DateUtil.convertDateString(in, \"dd-MMM-yyyy\", \"yyyy-MM-dd\");\n\t\tdate.setValue(out);\n\t}",
"private void setDate() {\n Date date = new Date();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n datetxt2.setText(sdf.format(date));\n }",
"public String format (Date date , String dateFormat) ;",
"void showDate()\n {\n Date d=new Date();\n SimpleDateFormat s=new SimpleDateFormat(\"dd-MM-yyyy\");\n date.setText(s.format(d));\n }",
"DateFormatPanel() {\r\n\t\tfDateFormat = DateFormat.getTimeInstance(DateFormat.DEFAULT);\r\n\t}",
"private static String convertToDDMMYYYY(Date date) {\n\t\tString returnStr = \"\";\n\t\ttry {\n\t\tDateFormat format1 = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\treturnStr = format1.format(date);\n\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn returnStr;\n\t}",
"public String DateFormatted(){\n\t\tSimpleDateFormat simDate = new SimpleDateFormat(\"E, dd/MM/yy hh:mm:ss a\");\n\t\treturn simDate.format(date.getTime());\n\t}",
"private static void formatDate(Date i) {\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"MM/dd/yy\");\n\t\tformatter.setLenient(false);\n\t\tAnswer = formatter.format(i);\n\t}",
"private String convertDateVN(String date) {\r\n String arrDate[] = date.split(\"-\");\r\n date = arrDate[2] + \"/\" + arrDate[1] + \"/\" + arrDate[0];\r\n return date;\r\n }",
"private void updateDateDisplay() {\n\t\tStringBuilder date = new StringBuilder()\n\t\t\t\t// Month is 0 based so add 1\n\t\t\t\t.append(mMonth + 1).append(\"-\").append(mDay).append(\"-\")\n\t\t\t\t.append(mYear).append(\" \");\n\n\t\tchangeDateButton.setText(date);\t\n\t}",
"public static String formatterDate(Date date){\n\t\tString retour = null;\n\t\tif(date != null){\n\t\t\tretour = dfr.format(date);\n\t\t}\n\t\treturn retour;\n\t}",
"public static String getDisplayDateFormat(Date val) {\n\n\t\tif (val != null) {\n\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\treturn \"\" + format.format(val);\n\n\t\t} else {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t}",
"private String formatDate (Date date) {\n SimpleDateFormat sdf = new SimpleDateFormat(\"E, dd MMM yyyy HH:mm:ss\", Locale.ENGLISH);\n return sdf.format(date);\n }",
"private void updateDisplay() {\r\n date1.setText(\r\n new StringBuilder()\r\n // Month is 0 based so add 1\r\n .append(pDay).append(\"/\")\r\n .append(pMonth + 1).append(\"/\")\r\n .append(pYear).append(\" \"));\r\n }",
"public static void dateFormat() {\n }",
"private String formatDueDate(Date date) {\n\t\t//TODO locale formatting via ResourceLoader\n\t\t\n\t\tif(date == null) {\n\t\t\treturn getString(\"label.studentsummary.noduedate\");\n\t\t}\n\t\t\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yy\");\n \treturn df.format(date);\n\t}",
"public static void main(String[] args) {\n\t double d=123456.789;\r\n\t\tNumberFormat nf=NumberFormat.getInstance(Locale.ITALY);\r\n\t\tNumberFormat nf1=NumberFormat.getInstance(Locale.US);\r\n\t\tNumberFormat nf2=NumberFormat.getInstance(Locale.ENGLISH);\r\n\t\tSystem.out.println(\"Italy representation of \" + d + \" : \"+nf.format(d));\r\n\t\tSystem.out.println(\"US representation of \" + d + \" : \" +nf1.format(d));\r\n\t\tSystem.out.println(\"Japan representation of \" + d + \" : \" +nf2.format(d));\r\n\t\t\r\n\t //DateTimeFormat in short,long and medium with getDateTimeInstance\r\n\t\tDateFormat df=DateFormat.getDateTimeInstance(DateFormat.SHORT,DateFormat.SHORT);\r\n\t System.out.println(\"Short format of date: \"+df.format(new Date()));\r\n\t DateFormat df1=DateFormat.getDateTimeInstance(DateFormat.LONG,DateFormat.LONG);\r\n\t System.out.println(\"Long format of date: \"+df1.format(new Date()));\r\n\t DateFormat df2=DateFormat.getDateTimeInstance(DateFormat.MEDIUM,DateFormat.MEDIUM);\r\n\t System.out.println(\"Medium format of date: \"+df2.format(new Date()));\r\n\t \r\n\t //Locale date format giving countries starting letters to get time but using only getDateInstance(de-denmark)\r\n\t DateFormat df3=DateFormat.getDateInstance(DateFormat.SHORT,new Locale(\"de\",\"DE\"));\r\n\t System.out.println(\"Short format of date: \"+df3.format(new Date()));\r\n\t DateFormat df4=DateFormat.getDateInstance(DateFormat.LONG,new Locale(\"de\",\"DE\"));\r\n\t System.out.println(\"Long format of date: \"+df4.format(new Date()));\r\n\t DateFormat df5=DateFormat.getDateInstance(DateFormat.MEDIUM,new Locale(\"de\",\"DE\"));\r\n\t System.out.println(\"Medium format of date: \"+df5.format(new Date()));\r\n\t \r\n\r\n}",
"DateFormat getSourceDateFormat();",
"private void updateDatedeparture() {\n String myFormat = \"MM/dd/yy\";\n SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.FRANCE);\n\n departureDate.setText(sdf.format(myCalendar.getTime()));\n }",
"public void populateFormats(Model model) {\n model.addAttribute(\"application_locale\", LocaleContextHolder.getLocale().getLanguage());\n model.addAttribute(\"rel_date_date_format\", DateTimeFormat.patternForStyle(\"M-\", LocaleContextHolder.getLocale()));\n }",
"public String getDateConvert() {\n SimpleDateFormat dateFormat1 = new SimpleDateFormat(\"MMM dd yyyy - hh:mm\");\n SimpleDateFormat dateFormat2 = new SimpleDateFormat(\"a\");\n String date = dateFormat1.format(this.timePost) + dateFormat2.format(this.timePost).toLowerCase();\n return date;\n }",
"private String getTimeFormat() {\r\n return mData.getConfiguration(\"x-labels-time-format\", \"yyyy-MM-dd\");\r\n }",
"private Command createDisplayDateRangeNaturalLanguage(ArrayList<String> timeArray, List<Date> dates,\n SimpleDateFormat dateFormat) {\n Command command;\n Date fromDate = dates.get(0);\n Date toDate = dates.get(1);\n String formattedStartDate = dateFormat.format(fromDate);\n String formattedToDate = dateFormat.format(toDate);\n timeArray.add(formattedStartDate); \n timeArray.add(formattedToDate);\n command = new Command(\"display\", 3, timeArray);\n return command;\n }",
"public void sortByDate(){\n output.setText(manager.display(true, \"date\"));\n }",
"public static String formatDateToDatePickerView(Date date) {\r\n if (date != null) {\r\n SimpleDateFormat formatter = new SimpleDateFormat(\"dd-MM-yyyy\");\r\n return formatter.format(date);\r\n }\r\n return \"\";\r\n }",
"public String convertDateToString(){\n\t\tString aDate = \"\";\n\t\taDate += Integer.toString(day);\n\t\taDate += \"/\";\n\t\taDate += Integer.toString(month);\n\t\taDate += \"/\";\n\t\taDate += Integer.toString(year);\n\t\treturn aDate;\n\t}",
"void showdate(){\n \n Date d = new Date();\n SimpleDateFormat s = new SimpleDateFormat(\"yyyy-MM-dd\");\n jLabel4.setText(s.format(d));\n}",
"private String formatDate(String dateStr) {\n try {\n SimpleDateFormat fmt = new SimpleDateFormat(Properties.DATE_FORMAT_ALL);\n Date date = fmt.parse(dateStr);\n SimpleDateFormat fmtOut = new SimpleDateFormat(Properties.DATE_FORMAT);\n return fmtOut.format(date);\n } catch (ParseException e) {\n System.out.println( Properties.K_WARNING + \" \" + e.getMessage());\n }\n return \"\";\n }",
"public static void main(String[] args) {\n\t\t LocalDate ldt = LocalDate.of(2016,12,21);\n DateTimeFormatter format = DateTimeFormatter.ofPattern(\"yyyy-MMM-dd\");\n DateTimeFormatter format1 = DateTimeFormatter.ofPattern(\"YYYY-mmm-dd\");\n System.out.println(ldt.format(format));\n System.out.println(ldt.format(format1));\n\t}",
"public void saveCalenderDate() {\r\n\t\tdate = getDateToDisplay(null);\r\n\t}",
"public static String formatNormalDate(Date date) {\n return formatNormalDate(date, true);\n }",
"private static String setDate() {\n mDate = new Date();\n DateFormat dateFormat = DateFormat.getDateInstance();\n String dateString = dateFormat.format(mDate);\n return dateString;\n }",
"public static String formatDateToDateTimePickerView(Date date) {\r\n if (date != null) {\r\n SimpleDateFormat formatter = new SimpleDateFormat(\"dd-MM-yyyy hh:mm:ss\");\r\n return formatter.format(date);\r\n }\r\n return \"\";\r\n }",
"private void updateLabel() {\n String myFormat = \"EEE, d MMM yyyy\";\n SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.US);\n dateText.setText(sdf.format(myCalendar.getTime()));\n }",
"public String convertDateToString(Date date) {\n\t\tString dateTime = SDF.format(date);\n\t\treturn dateTime;\t\n\t}",
"private void nastavViews() {\n tv_steps = (TextView) findViewById(R.id.textview1);\n den = (TextView) findViewById(R.id.time1);\n kcalTv = (TextView) findViewById(R.id.kCalTv);\n df = new SimpleDateFormat(\"EEE, d. MMM\");\n df2 = new SimpleDateFormat(\"dd-MMM-yyyy\");\n c = Calendar.getInstance().getTime();\n aktualnyDatum = df.format(c);\n aktualnyDatum2 = df2.format(c);\n }",
"@Method(selector = \"stringFromDate:toDate:\")\n public native String format(NSDate fromDate, NSDate toDate);",
"private void drawBookingDate() {\n try {\n bookingDate = bookingModel.getUserBookingDate(employeeID);\n labelBookingDate.setText(\"Booking Date: \" + bookingDate);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"public void setSysDate()\r\n\t{\r\n\t\tSimpleDateFormat sdf=new SimpleDateFormat(\"dd/MM/yyyy\");\r\n txtPDate.setText(sdf.format(new java.util.Date()));\r\n\t}",
"public static String formatterDateUS(Date date){\n\t\tString retour = null;\n\t\tif(date != null){\n\t\t\tretour = df.format(date);\n\t\t}\n\t\treturn retour;\n\t}",
"public String getFechatxt(Date d){\n \n try {\n String formato = selectorfecha.getDateFormatString();\n //Formato\n \n SimpleDateFormat sdf = new SimpleDateFormat(formato);\n String txtfechap = sdf.format(d);\n return txtfechap;\n } catch (NullPointerException ex) {\n JOptionPane.showMessageDialog(this, \"Al menos selecciona una fecha válida!\", \"Error!\", JOptionPane.INFORMATION_MESSAGE);\n return null;\n\n }\n\n\n \n }",
"private static String convertDate(String dateString) {\n String date = null;\n\n try {\n //Parse the string into a date variable\n Date parsedDate = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss\").parse(dateString);\n\n //Now reformat it using desired display pattern:\n date = new SimpleDateFormat(DATE_FORMAT).format(parsedDate);\n\n } catch (ParseException e) {\n Log.e(TAG, \"getDate: Error parsing date\", e);\n e.printStackTrace();\n }\n\n return date;\n }",
"public String changeDateTimeFormat(String dateStr) {\n String inputPattern = \"MMM-dd-yyyy hh:mm a\";\n String outputPattern = \"MMMM dd, yyyy hh:mm a\";\n SimpleDateFormat inputFormat = new SimpleDateFormat(inputPattern);\n SimpleDateFormat outputFormat = new SimpleDateFormat(outputPattern);\n\n Date date = null;\n String str = null;\n\n try {\n date = inputFormat.parse(dateStr);\n str = outputFormat.format(date);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return str;\n\n }",
"private String toDate(Date appDate) throws ParseException {\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTime(appDate);\n\t\tString formatedDate = cal.get(Calendar.DATE) + \"/\" + (cal.get(Calendar.MONTH) + 1) + \"/\" + cal.get(Calendar.YEAR);\n\t\tSystem.out.println(\"formatedDate : \" + formatedDate); \n\t\treturn formatedDate;\n\t}",
"public String formatDate(Date date) {\n String result = \"\";\n if (date != null) {\n result = DateUtility.simpleFormat(date, MEDIUM_DATE_FORMAT);\n }\n return result;\n }",
"public String getDateStyleClass() {\r\n return dateThreshold ? \"equipmentDate\" : \"\";\r\n }",
"private String formatDateForVSS(Date d) {\n SimpleDateFormat sdf = new SimpleDateFormat(this.dateFormat + \";hh:mma\");\n \t\tString vssFormattedDate = sdf.format(d);\n \t\treturn vssFormattedDate.substring(0, vssFormattedDate.length() - 1);\n \t}",
"private String formatDate(Date date){\n SimpleDateFormat format = new SimpleDateFormat(\"dd-MM-yyyy HH:mm\", Locale.getDefault());\n\n return format.format(date);\n }",
"private void updateLabel(EditText view) {\n String myFormat = \"MM/dd/yyyy\"; //In which you need put here\n SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.US);\n\n view.setText(sdf.format(myCalendar.getTime()));\n }",
"private void updateDateTxtV()\n {\n String dateFormat =\"EEE, d MMM yyyy\";\n SimpleDateFormat sdf = new SimpleDateFormat(dateFormat, Locale.CANADA);\n dateStr = sdf.format(cal.getTime());\n dateTxtV.setText(dateStr);\n\n //unix datetime for saving in db\n dateTimeUnix = cal.getTimeInMillis() / 1000L;\n }",
"private void updateDisplay() { \n\t \tmDateDisplay.setText( \n\t \t\t\tnew StringBuilder()\n\t \t\t\t.append(mYear).append(\"/\")\n\t \t\t\t// Month is 0 based so add 1 \n\t \t\t\t.append(mMonth + 1).append(\"/\") \n\t \t\t\t.append(mDay).append(\" \")); \n\t \t\t\t \n\t \t\t\t \n\t \t\t\t \n\t }",
"protected String getSelectedDate()\n {\n String startsOnDate = String.valueOf(selectedYear);\n if(selectedMonth<10)startsOnDate+=\"-0\"+String.valueOf(selectedMonth);\n else startsOnDate+=\"-\"+String.valueOf(selectedMonth);\n if(selectedDay<10)startsOnDate+=\"-0\"+String.valueOf(selectedDay);\n else startsOnDate+=\"-\"+String.valueOf(selectedDay);\n\n return startsOnDate;\n }",
"private void updateDateButtonText() {\n SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT); \n String dateForButton = dateFormat.format(mCalendar.getTime()); \n mDateButton.setText(dateForButton);\n\t}",
"public String changeDateFormat(String dateStr) {\n String inputPattern = \"MMM-dd-yyyy\";\n String outputPattern = \"MMMM dd, yyyy\";\n SimpleDateFormat inputFormat = new SimpleDateFormat(inputPattern);\n SimpleDateFormat outputFormat = new SimpleDateFormat(outputPattern);\n\n Date date = null;\n String str = null;\n\n try {\n date = inputFormat.parse(dateStr);\n str = outputFormat.format(date);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return str;\n\n }",
"protected <T> String renderFieldDate(FormField<T> field) {\n\t\treturn renderTextFieldInternal(field);\n\t}",
"@Override\n protected void addDefaultConverters() {\n super.addDefaultConverters();\n\n /* Add the \"shortDate\" conversion. */\n StringToDate dateAndTimeToDate = new StringToDate();\n dateAndTimeToDate.setPattern(DATE_AND_TIME_FORMAT);\n addConverter(\"date\", dateAndTimeToDate);\n }",
"@Override\n\t\t\tprotected MassageCalDayInfo prepareData(MassageCalDayInfo model) {\n\t\t\t\tString s1 = DateTimeFormat.getFormat(\"d.\").format(new Date(model.getDate()));\n\t\t\t\tString s2 = DateTimeFormat.getFormat(\"MMMM\").format(new Date(model.getDate()));\n\t\t\t\tswitch(model.getStatus()) {\n\t\t\t\t\tcase 0: //empty\n\t\t\t\t\t\t\tmodel.set(\"bg_color\", \"#aaa\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1: //full\n\t\t\t\t\t\t\tmodel.set(\"bg_color\", \"#faa\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2: //free;\n\t\t\t\t\t\t\tmodel.set(\"bg_color\", \"#afa\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tmodel.set(\"bg_color\", \"#fff\");\n\t\t\t\t}\n\t\t\t\tmodel.set(\"date_string\", s1+\"<br />\"+s2);\n\t\t\t\treturn super.prepareData(model);\n\t\t\t}",
"private void monthFormat() {\n\t\ttry {\n\t\t\tString currentMonth = monthFormat.format(new Date()); //Get current month\n\t\t\tstartDate = monthFormat.parse(currentMonth); //Parse to first of the month\n\t\t\tString[] splitCurrent = currentMonth.split(\"-\");\n\t\t\tint month = Integer.parseInt(splitCurrent[0]) + 1; //Increase the month\n\t\t\tif (month == 13) { //If moving to next year\n\t\t\t\tint year = Integer.parseInt(splitCurrent[1]) + 1;\n\t\t\t\tendDate = monthFormat.parse(\"01-\" + year);\n\t\t\t} else {\n\t\t\t\tendDate = monthFormat.parse(month + \"-\" + splitCurrent[1]);\n\t\t\t}\n\t\t\t//Create SQL times\n\t\t\tstartDateSQL = new java.sql.Date(startDate.getTime());\n\t\t\tendDateSQL = new java.sql.Date(endDate.getTime());\n\t\t\tmonthString = new SimpleDateFormat(\"MMMM\").format(startDate);\n\t\t} catch (ParseException e) {\n\t\t\t_.log(Level.SEVERE, GameMode.Sonic, \"Failed to parse dates. Monthly leaderboard disabled.\");\n\t\t}\n\t}",
"public static String formatDateForQuery(java.util.Date date){\n return (new SimpleDateFormat(\"yyyy-MM-dd\")).format(date);\n }",
"private String changeDateFormat (String oldDate) throws ParseException {\n // Source: https://stackoverflow.com/questions/3469507/how-can-i-change-the-date-format-in-java\n final String OLD_FORMAT = \"MM/dd/yyyy\";\n final String NEW_FORMAT = \"yyyyMMdd\";\n String newDateString;\n SimpleDateFormat sdf = new SimpleDateFormat(OLD_FORMAT);\n Date d = sdf.parse(oldDate);\n sdf.applyPattern(NEW_FORMAT);\n newDateString = sdf.format(d);\n return newDateString;\n }",
"private String formatarData(Date data)\n {\n String sDate;\n String sDia = \"\";\n String sMes = \"\";\n\n GregorianCalendar calendar = new GregorianCalendar();\n calendar.setTime(data);\n int dia = calendar.get(GregorianCalendar.DAY_OF_MONTH);\n if (dia > 0) {\n if (dia < 10) {\n sDia = \"0\";\n }\n }\n sDia += dia;\n\n int mes = calendar.get(GregorianCalendar.MONTH);\n mes = mes + 1;\n if (mes > 0) {\n if (mes < 10) {\n sMes = \"0\";\n }\n }\n sMes += mes;\n\n int ano = calendar.get(GregorianCalendar.YEAR);\n\n int hora = calendar.get(GregorianCalendar.HOUR);\n // 0 = dia\n // 1 = noite\n int amPm = calendar.get(GregorianCalendar.AM_PM);\n\n if(amPm == 1)\n {\n if(hora>0 && hora < 13)\n {\n if(hora > 11)\n hora = 0;\n else\n hora += 12;\n }\n }\n\n String sHora = \" \";\n if(hora<=9)\n {\n sHora += \"0\";\n }\n String sMin=\":\";\n int min = calendar.get(GregorianCalendar.MINUTE);\n if(min <10)\n sMin += \"0\";\n sMin += String.valueOf(min);\n sHora += String.valueOf(hora) + sMin + \":00\";\n sDate = String.valueOf(ano) + \"-\" + sMes + \"-\" + sDia + sHora;\n return sDate;\n\n }",
"private String leerFecha() {\n\t\ttry {\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"YYYY/MM/dd\");\n\t\t\treturn sdf.format(txtFecha.getDate());\n\t\t} catch (Exception e) {\n\t\t\tJOptionPane.showMessageDialog(this, \"Seleccione una fecha válida\", \"Aviso\", 2);\n\t\t\treturn null;\n\t\t}\n\t}",
"@Override\r\n\tpublic void date() {\n\t\tSystem.out.println(\"10/19/21\");\r\n\t}",
"private String formatDate(String dateString) {\n DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern(\"LLL dd, yyyy\");\n LocalDate localDate = LocalDate.parse(dateString.substring(0, 10));\n return dateTimeFormatter.format(localDate);\n }",
"public static String formartDateforGraph(String mDate) {\n\t\t\t// TODO Auto-generated method stub\n\t\t\t\n\t\t\tSimpleDateFormat inSDF = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\tSimpleDateFormat outSDF = new SimpleDateFormat(\"yyyy-MM-dd\");\n\n\t\t\t \n\t\t\t String outDate = \"\";\n\t\t\t \n\t\t\t if (mDate != null) {\n\t\t\t try {\n\t\t\t Date date = inSDF.parse(mDate);\n\t\t\t outDate = outSDF.format(date);\n\t\t\t \n\t\t\t \n\t\t\t } catch (Exception ex){ \n\t\t\t \tex.printStackTrace();\n\t\t\t }\n\t\t\t }\n\t\t\t return outDate;\n\t\t}",
"public String formatDate (Date date){\r\n\t\tDateFormat df = new SimpleDateFormat(\"EEE, d MMM yyyy HH:mm:ss z\", Locale.ENGLISH);\r\n\t\treturn df.format(date);\r\n\t}",
"public void displayDate() {\n\t\tSystem.out.print(year + \"/\" + month + \"/\" + day);\r\n\t}",
"public void setDateText(String date);",
"public String getDateString(){\n return Utilities.dateToString(date);\n }",
"private void showDate(Calendar calendar) {\n //TODO have configurable for spanish dates based on locale\n dateView.setText(new SimpleDateFormat(\"MM/dd/yy\").format(calendar.getTime()));\n }",
"@Test\n public void generatedFormatIsParsable()\n {\n Date originalDate = new Date();\n String dateAsString = DateTimeAdapter.printDate( originalDate );\n Date parsedDate = DateTimeAdapter.parseDate( dateAsString );\n \n assertThat( parsedDate, equalTo( originalDate ) );\n }",
"public static String toStringFormat_2(Date date) {\r\n\r\n\t\treturn dateToString(date, DATE_FORMAT_2);\r\n\t}",
"public static String formatDate(Date d) {\n\t\tint month = d.getMonth() + 1;\n\t\tint dayOfMonth = d.getDate();\n\t\tint year = d.getYear() + 1900;\n\t\tString y = \"\" + year;\n\t\tString m = \"\" + month;\n\t\tString dom = \"\" + dayOfMonth;\n\t\tif (month < 10) {\n\t\t\tm = \"0\" + m;\n\t\t}\n\t\tif (dayOfMonth < 10) {\n\t\t\tdom = \"0\" + dom;\n\t\t}\n\t\treturn m + \"/\" + dom + \"/\" + y.substring(2);\n\t}",
"private String getDateTime() {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd.MM.yyyy\", Locale.GERMANY);\n Date date = new Date();\n return dateFormat.format(date);\n }",
"public static void main(String[] args) {\n\t\tLocalDate today=LocalDate.now();\n\t\t\n\t\tDateTimeFormatter dtf=DateTimeFormatter.ofPattern(\"YYYY/MM/DD\");\n\t\tDateTimeFormatter dtf1=DateTimeFormatter.ofPattern(\"YYYY MM DD\");\n\t\t\n\t\tDateTimeFormatter dtfull=DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL);\n\t\tDateTimeFormatter dtm=DateTimeFormatter.ofLocalizedDate(FormatStyle.MEDIUM);\n\t\tDateTimeFormatter dts=DateTimeFormatter.ofLocalizedDate(FormatStyle.SHORT);\n\t\t\n\t\t\n\t\tString afterformat=today.format(dtf);\n\t\tSystem.out.println(afterformat);\n\t\tString afterformat1=today.format(dtf1);\n\t\tSystem.out.println(afterformat1);\n\t\tString fd=today.format(dtfull);\n\t\tSystem.out.println(fd);\n\t\tString md=today.format(dtm);\n\t\tSystem.out.println(md);\n\t\tString sd=today.format(dts);\n\t\tSystem.out.println(sd);\n\t\t\n\t\t\n\n\t}",
"public static String toDisplayString(HISDate date) {\r\n String foo = \"\";\r\n if (date != null) {\r\n foo = date.toDisplayString();\r\n }\r\n\r\n return foo;\r\n }",
"default String toSource(Date date) {\n return getSourceDateFormat().format(date);\n }",
"@Override\r\n\t\t\t\tpublic String valueToString(Object value) throws ParseException {\n\t\t\t\t\tif(value != null) {\r\n\t\t\t\t\tCalendar cal=(Calendar) value;\r\n\t\t\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"dd-MMM-yyyy\");\r\n\t\t\t\t\tString strDate=format.format(cal.getTime());\r\n\t\t\t\t\treturn strDate;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn \" \";\r\n\t\t\t\t}"
] | [
"0.68718034",
"0.6510748",
"0.634327",
"0.628979",
"0.6267672",
"0.621386",
"0.6134754",
"0.60703504",
"0.5994508",
"0.5955347",
"0.58744955",
"0.5841012",
"0.5820375",
"0.5800442",
"0.5798362",
"0.5796948",
"0.5794125",
"0.57862663",
"0.57724047",
"0.5762136",
"0.57310534",
"0.57305694",
"0.5724722",
"0.5707534",
"0.57058644",
"0.57044506",
"0.5691908",
"0.5682161",
"0.56627226",
"0.5600714",
"0.5568952",
"0.55634445",
"0.5558084",
"0.55469364",
"0.55356246",
"0.5528968",
"0.5528858",
"0.55263597",
"0.55246913",
"0.5519724",
"0.551486",
"0.5507861",
"0.5491362",
"0.5487892",
"0.54837584",
"0.5483726",
"0.5473695",
"0.5472688",
"0.54563975",
"0.5455801",
"0.5436732",
"0.5386833",
"0.5386144",
"0.53855425",
"0.53821725",
"0.5377835",
"0.5370338",
"0.53671575",
"0.5347194",
"0.5345413",
"0.53453004",
"0.5344176",
"0.53423524",
"0.5337323",
"0.53352755",
"0.5330907",
"0.5328167",
"0.53250515",
"0.53206265",
"0.532024",
"0.5307643",
"0.53040266",
"0.5302633",
"0.5297341",
"0.5292341",
"0.5289159",
"0.52874637",
"0.528647",
"0.5283207",
"0.52816886",
"0.5281155",
"0.5280841",
"0.5275768",
"0.52750707",
"0.52733546",
"0.5270235",
"0.52701735",
"0.5269463",
"0.52596086",
"0.5257801",
"0.52547634",
"0.5254555",
"0.52519256",
"0.52394605",
"0.5221879",
"0.52193284",
"0.52175033",
"0.52162296",
"0.52160734",
"0.52082366"
] | 0.6386374 | 2 |
/ Each private variable (gyroscope, dcmotor, diital channel, distance sensor, and servo) is for everything we configured. However we didn't use some of these things but this is for practicing/ examples. TeleOp (at the beginning) indicates that this was written for a driver controlled period, | @Override
public void runOpMode () {
motor1 = hardwareMap.get(DcMotor.class, "motor1");
motor2 = hardwareMap.get(DcMotor.class, "motor2");
telemetry.addData("Status", "Initialized");
telemetry.update();
//Wait for game to start (driver presses PLAY)
waitForStart();
/*
the overridden runOpMode method happens with every OpMode using the LinearOpMode type.
hardwareMap is an object that references the hardware listed above (private variables).
The hardwareMap.get method matches the name of the device used in the configuration, so
we would have to change the names (ex. motorTest to Motor 1 or Motor 2 (or something else))
if not, the opMode won't recognize the device
in the second half of this section, it uses something called telemetry. In the first and
second lines it sends a message to the driver station saying ("Status", "Initialized") and
then it prompts the driver to press start and waits. All linear functions should have a wait
for start command so that the robot doesn't start executing the commands before the driver
wants to (or pushes the start button)
*/
//run until end of match (driver presses STOP)
double tgtpower = 0;
while (opModeIsActive()) {
telemetry.addData("Left Stick X", this.gamepad1.left_stick_x);
telemetry.addData("Left Stick Y", this.gamepad1.left_stick_y);
telemetry.addData("Right Stick X", this.gamepad1.right_stick_x);
telemetry.addData("Right Stick Y", this.gamepad1.right_stick_y);
if (this.gamepad1.left_stick_y < 0){
tgtpower=-this.gamepad1.left_stick_y;
motor1.setPower(tgtpower);
motor2.setPower(-tgtpower);
}else if (this.gamepad1.left_stick_y > 0){
tgtpower=this.gamepad1.left_stick_y;
motor1.setPower(-tgtpower);
motor2.setPower(tgtpower);
}else if (this.gamepad1.left_stick_x > 0){
tgtpower=this.gamepad1.left_stick_x;
motor1.setPower(tgtpower);
motor2.setPower(tgtpower);
}else if (this.gamepad1.left_stick_x < 0){
tgtpower=-this.gamepad1.left_stick_x;
motor1.setPower(-tgtpower);
motor2.setPower(-tgtpower);
}else{
motor1.setPower(0);
motor2.setPower(0);
}
telemetry.addData("Motor1 Power", motor1.getPower());
telemetry.addData("Motor2 Power", motor2.getPower());
telemetry.addData("Status", "Running");
telemetry.update ();
/*
if (this.gamepad1.right_stick_x == 1){
//trying to make robot turn right, == 1 may be wrong
motor2.setPower(-1);
}
else if (this.gamepad1.right_stick_x == -1){
//trying to make robot turn left, == -1 may be wrong
motor1.setPower(-1);
}
else {
}
*/
/*
After the driver presses start,the opMode enters a while loop until the driver presses stop,
while the loop is running it will continue to send messages of ("Status", "Running") to the
driver station
*/
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initializing\"); //display on the drivers phone that its working\n\n FLM = hardwareMap.get(DcMotor.class, \"FLM\"); //Go into the config and get the device named \"FLM\" and assign it to FLM\n FRM = hardwareMap.get(DcMotor.class, \"FRM\"); //device name doesn't have to be the same as the variable name\n BLM = hardwareMap.get(DcMotor.class, \"BLM\"); //DcMotor.class because that is what the object is\n BRM = hardwareMap.get(DcMotor.class, \"BRM\");\n\n BigSuck = hardwareMap.get(DcMotor.class, \"BigSUCK\");\n SmallSuck = hardwareMap.get(DcMotor.class, \"SmallSUCK\");\n SmallSuck.setDirection(DcMotor.Direction.REVERSE);\n \n UpLift = hardwareMap.get(DcMotor.class, \"LIFT\");\n UpLift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n UpLift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n //Make it so we don't have to add flip the sign of the power we are setting to half the motors\n //FRM.setDirection(DcMotor.Direction.REVERSE); //Run the right side of the robot backwards\n FLM.setDirection(DcMotor.Direction.REVERSE);\n BRM.setDirection(DcMotor.Direction.REVERSE); //the right motors are facing differently than the left handed ones\n\n FLM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n FRM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n BLM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n BRM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n DragArm = hardwareMap.servo.get(\"drag_arm\");\n DragArm.setDirection(Servo.Direction.REVERSE);\n DragArm.setPosition(DragArmRestPosition);\n\n LiftGrab = hardwareMap.servo.get(\"GRAB\");\n LiftGrab.setPosition(LiftGrabRestPosition);\n\n LiftSwivel = hardwareMap.servo.get(\"SWIVEL\");\n LiftSwivel.setPosition(LiftSwivelRestPosition);\n\n Push = hardwareMap.get(Servo.class, \"PUSH\");\n Push.setDirection(Servo.Direction.FORWARD);\n Push.setPosition(PushRestPosition);\n\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update();\n }",
"@Override\n public void init() {\n\n try {\n\n // Get wheel motors\n wheelMotor1 = hardwareMap.dcMotor.get(\"Wheel 1\");\n wheelMotor2 = hardwareMap.dcMotor.get(\"Wheel 2\");\n\n // Initialize wheel motors\n wheelMotor1.setMode(DcMotorController.RunMode.RUN_WITHOUT_ENCODERS);\n wheelMotor2.setMode(DcMotorController.RunMode.RUN_WITHOUT_ENCODERS);\n wheelMotor1.setDirection(DcMotor.Direction.FORWARD);\n wheelMotor2.setDirection(DcMotor.Direction.REVERSE);\n robotDirection = DriveMoveDirection.Forward;\n motion = new Motion(wheelMotor1, wheelMotor2);\n\n // Get hook motor\n motorHook = hardwareMap.dcMotor.get(\"Hook\");\n motorHook.setDirection(DcMotor.Direction.REVERSE);\n\n // Get servos\n servoTapeMeasureUpDown = hardwareMap.servo.get(\"Hook Control\");\n servoClimberDumperArm = hardwareMap.servo.get(\"Climber Dumper Arm\");\n servoDebrisPusher = hardwareMap.servo.get(\"Debris Pusher\");\n servoZipLineLeft = hardwareMap.servo.get(\"Zip Line Left\");\n servoZipLineRight = hardwareMap.servo.get(\"Zip Line Right\");\n servoAllClearRight = hardwareMap.servo.get (\"All Clear Right\");\n servoAllClearLeft = hardwareMap.servo.get (\"All Clear Left\");\n\n setServoPositions();\n }\n catch (Exception ex)\n {\n telemetry.addData(\"error\", ex.getMessage());\n }\n }",
"@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initialized\");\n\n // Initialize the hardware variables. Note that the strings used here as parameters\n // to 'get' must correspond to the names assigned during the robot configuration\n // step (using the FTC Robot Controller app on the phone).\n left = hardwareMap.get(DcMotor.class, \"left\");\n right = hardwareMap.get(DcMotor.class, \"right\");\n wrist = hardwareMap.crservo.get(\"wrist\");\n extension = hardwareMap.get(DcMotor.class, \"extension\");\n lift = hardwareMap.get(DcMotor.class, \"lift\");\n\n\n //lift = hardwareMap.get(DcMotor.class, \"lift\");\n bucket = hardwareMap.servo.get(\"bucket\");\n //fBucket = hardwareMap.get(DcMotor.class, \"fBucket\");\n //fBucket.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n left.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n right.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n extension.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n collection = hardwareMap.crservo.get(\"collection\");\n //lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // Most robots need the motor on one side to be reversed to drive forward\n // Reverse the motor that runs backwards when connected directly to the battery\n left.setDirection(DcMotor.Direction.FORWARD);\n right.setDirection(DcMotor.Direction.REVERSE);\n //lift.setDirection(DcMotor.Direction.FORWARD);\n // fBucket.setDirection(DcMotor.Direction.FORWARD);\n lift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lift.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n // Tell the driver that initialization is complete.\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.addData(\"left\", left.getPower());\n telemetry.addData(\"right\", right.getPower());\n //telemetry.addData(\"lift\", lift.getPower());\n telemetry.addData(\"collection\", collection.getPower());\n //wrist.setPosition(-1);\n //telemetry.addData(\"fBucket\", fBucket.getPower());\n //Robot robot = new Robot(lift, extension, wrist, bucket, collection, drive);\n }",
"@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initialized Interative TeleOp Mode\");\n telemetry.update();\n\n // Initialize the hardware variables. Note that the strings used here as parameters\n // to 'get' must correspond to the names assigned during the robot configuration\n // step (using the FTC Robot Controller app on the phone).\n leftDrive = hardwareMap.dcMotor.get(\"leftDrive\");\n rightDrive = hardwareMap.dcMotor.get(\"rightDrive\");\n armMotor = hardwareMap.dcMotor.get(\"armMotor\");\n\n leftGrab = hardwareMap.servo.get(\"leftGrab\");\n rightGrab = hardwareMap.servo.get(\"rightGrab\");\n colorArm = hardwareMap.servo.get(\"colorArm\");\n leftTop = hardwareMap.servo.get(\"leftTop\");\n rightTop = hardwareMap.servo.get(\"rightTop\");\n\n /*\n left and right drive = motion of robot\n armMotor = motion of arm (lifting the grippers)\n extendingArm = motion of slider (used for dropping the fake person)\n left and right grab = grippers to get the blocks\n */\n\n }",
"protected void initialize() {\n \t starttime = Timer.getFPGATimestamp();\n \tthis.startAngle = RobotMap.navx.getAngle();\n \tangleorientation.setSetPoint(RobotMap.navx.getAngle());\n \t\n \tRobotMap.motorLeftTwo.enableControl();\n \tRobotMap.motorRightTwo.enableControl();\n \tRobotMap.motorLeftTwo.enableControl();\n \tRobotMap.motorRightTwo.enableControl();\n \n //settting talon control mode\n \tRobotMap.motorLeftTwo.changeControlMode(TalonControlMode.MotionMagic);\t\t\n\t\tRobotMap.motorLeftOne.changeControlMode(TalonControlMode.Follower);\t\n\t\tRobotMap.motorRightTwo.changeControlMode(TalonControlMode.MotionMagic);\t\n\t\tRobotMap.motorRightOne.changeControlMode(TalonControlMode.Follower);\n\t\t//setting peak and nominal output voltage for the motors\n\t\tRobotMap.motorLeftTwo.configPeakOutputVoltage(+12.0f, -12.0f);\n\t\tRobotMap.motorLeftTwo.configNominalOutputVoltage(0.00f, 0.0f);\n\t\tRobotMap.motorRightTwo.configPeakOutputVoltage(+12.0f, -12.0f);\n\t\tRobotMap.motorRightTwo.configNominalOutputVoltage(0.0f, 0.0f);\n\t\t//setting who is following whom\n\t\tRobotMap.motorLeftOne.set(4);\n\t\tRobotMap.motorRightOne.set(3);\n\t\t//setting pid value for both sides\n\t//\tRobotMap.motorLeftTwo.setCloseLoopRampRate(1);\n\t\tRobotMap.motorLeftTwo.setProfile(0);\n\t RobotMap.motorLeftTwo.setP(0.000014f);\n \tRobotMap.motorLeftTwo.setI(0.00000001);\n\t\tRobotMap.motorLeftTwo.setIZone(0);//325);\n\t\tRobotMap.motorLeftTwo.setD(1.0f);\n\t\tRobotMap.motorLeftTwo.setF(this.fGainLeft+0.014);//0.3625884);\n\t\tRobotMap.motorLeftTwo.setAllowableClosedLoopErr(0);//300);\n\t\t\n\t RobotMap.motorRightTwo.setCloseLoopRampRate(1);\n\t RobotMap.motorRightTwo.setProfile(0);\n\t\tRobotMap.motorRightTwo.setP(0.000014f);\n\t\tRobotMap.motorRightTwo.setI(0.00000001);\n\t\tRobotMap.motorRightTwo.setIZone(0);//325);\n\t\tRobotMap.motorRightTwo.setD(1.0f);\n\t\tRobotMap.motorRightTwo.setF(this.fGainRight);// 0.3373206);\n\t\tRobotMap.motorRightTwo.setAllowableClosedLoopErr(0);//300);\n\t\t\n\t\t//setting Acceleration and velocity for the left\n\t\tRobotMap.motorLeftTwo.setMotionMagicAcceleration(125);\n\t\tRobotMap.motorLeftTwo.setMotionMagicCruiseVelocity(250);\n\t\t//setting Acceleration and velocity for the right\n\t\tRobotMap.motorRightTwo.setMotionMagicAcceleration(125);\n\t\tRobotMap.motorRightTwo.setMotionMagicCruiseVelocity(250);\n\t\t//resets encoder position to 0\t\t\n\t\tRobotMap.motorLeftTwo.setEncPosition(0);\n\t\tRobotMap.motorRightTwo.setEncPosition(0);\n\t //Set Allowable error for the loop\n\t\tRobotMap.motorLeftTwo.setAllowableClosedLoopErr(300);\n\t\tRobotMap.motorRightTwo.setAllowableClosedLoopErr(300);\n\t\t\n\t\t//sets desired endpoint for the motors\n RobotMap.motorLeftTwo.set(motionMagicEndPoint);\n RobotMap.motorRightTwo.set(-motionMagicEndPoint );\n \t\n }",
"@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initializing\");\n\n // Initialize the hardware variables. Note that the strings used here as parameters\n // to 'get' must correspond to the names assigned during the robot configuration\n // step (using the FTC Robot Controller app on the phone).\n leftDrive = hardwareMap.get(DcMotor.class, \"left_drive\");\n rightDrive = hardwareMap.get(DcMotor.class, \"right_drive\");\n elev = hardwareMap.get(DcMotor.class, \"elev\");\n arm = hardwareMap.get(DcMotor.class,\"arm\");\n hook = hardwareMap.get(Servo.class,\"hook\");\n claw = hardwareMap.get(Servo.class,\"claw\");\n\n // Most robots need the motor on one side to be reversed to drive forward\n // Reverse the motor that runs backwards when connected directly to the battery\n leftDrive.setDirection(DcMotor.Direction.FORWARD);\n rightDrive.setDirection(DcMotor.Direction.REVERSE);\n elev.setDirection(DcMotor.Direction.REVERSE);\n arm.setDirection(DcMotor.Direction.REVERSE);\n elev.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n arm.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n lowerLimit = hardwareMap.digitalChannel.get(\"lower_limit\");\n upperLimit = hardwareMap.digitalChannel.get(\"upper_limit\");\n lowerLimit.setMode(DigitalChannel.Mode.INPUT);\n upperLimit.setMode(DigitalChannel.Mode.INPUT);\n\n// rightElev.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER); // Encoder on Left Elev only\n\n // Tell the driver that initialization is complete.\n telemetry.addData(\"Status\", \"Initialized\");\n }",
"@Override\n\tpublic void teleopPeriodic() {\n\t\t\n\t\t\n\t\t\n//\t\tSmartDashboard.putBoolean(\"Alliance_R\", alliance_R_SwitchState);\n//\t\tSmartDashboard.putBoolean(\"Alliance_L\", alliance_L_SwitchState);\n//\t\tSmartDashboard.putBoolean(\"Scale_R\", R_scaleState);\n//\t\tSmartDashboard.putBoolean(\"Scale_L\", L_scaleState);\n//\t\tSmartDashboard.putBoolean(\"oppisite_R\", opposite_R_SwitchState);\n//\t\tSmartDashboard.putBoolean(\"opposite_L\", opposite_L_SwitchState);\n//\t\t\n//\t\tSmartDashboard.putNumber(\"right Vel\", chassis.rightMagVelocity());\n//\t\tSmartDashboard.putNumber(\"left Vel\", chassis.leftMagVelocity());\n//\t\tSmartDashboard.putNumber(\"right Pos\", chassis.rightMagPosition());\n//\t\tSmartDashboard.putNumber(\"left Pos\", chassis.leftMagPosition());\n\t\tSmartDashboard.putData(\"gyro\", chassis.navx);\n\t\tSmartDashboard.putData(\"Chassis\",chassis);\n\t\tSmartDashboard.putBoolean(\"shift is high\", chassis.shiftIsHigh);\n\t\tSmartDashboard.putNumber(\"Arm Pot Value\", Robot.arm.getArmPot());\n\t\tSmartDashboard.putNumber(\"Elevator Encoder\", elevator.getElevatorMagPosition());\n\t\t\n//\t\tSmartDashboard.putNumber(\"TurnPID\", chassis.turnSpeed.getSpeed());\n//\t\tSmartDashboard.putData(\"TurnController\", chassis.turnController);\n//\t\tSmartDashboard.putData(\"Turn\",new Turn());\t\t\n//\t\tSmartDashboard.putNumber(\"leftDistPID\", chassis.leftDistanceSpeed.getSpeed());\n//\t\tSmartDashboard.putNumber(\"rightDistPID\", chassis.rightDistanceSpeed.getSpeed());\n//\t\tSmartDashboard.putData(\"right drive controller\", chassis.rightDistanceController);\n//\t\tSmartDashboard.putData(\"left drive controller\", chassis.leftDistanceController);\t\t\t\n//\t\tSmartDashboard.putData(\"test\",new drivefrompoint());\n\t\tSmartDashboard.putData(\"Arm PID\", arm.armPID);\n\t\tSmartDashboard.putData(\"Elevator PID\", elevator.elePID);\n\t\tSmartDashboard.putData(\"Elevator Subsystem\", elevator);\n\t\tSmartDashboard.putData(\"Hold Climb Command\", new LowerElevatorManual(0.1));\n\t\t\n\t\tSmartDashboard.putNumber(\"intake lead current\", Robot.intake.intakeLeader.getOutputCurrent());\n\t\tSmartDashboard.putNumber(\"intake follow current\", Robot.intake.intakeFollower.getOutputCurrent());\n\t\t\n\t\tSmartDashboard.putNumber(\"arm current\", arm.arm.getOutputCurrent());\n\t\t//SmartDashboard.putBoolean(\"Upper Elevator Limit Switch\", elevato);\n\t\t\n\t\tScheduler.getInstance().run();\n\t\t\n\t\t\n\t\tif(!elevator.getBottomElevatorLimit()) {\n\t\t\televator.resetElevatorMag();\n\t\t}\n\t\t\n\t}",
"protected void initialize() {\n \tRobot.gyroSubsystem.reset();\n \tstartAngle = Robot.gyroSubsystem.gyroPosition();\n \ttargetAngle = startAngle + goal;\n }",
"protected void initialize() {\n \tDrivetrain.gyro.reset();\n }",
"public void init(HardwareMap ahwMap) {\n // Save reference to Hardware map\n hwMap = ahwMap;\n\n // Define and Initialize Motors\n// frontLeft = hwMap.get(DcMotor.class, \"frontLeft\");\n// frontRight = hwMap.get(DcMotor.class, \"frontRight\");\n// backLeft = hwMap.get(DcMotor.class, \"backLeft\");\n// lift = hwMap.get(DcMotor.class, \"lift\");\n// backRight = hwMap.get(DcMotor.class, \"backRight\");\n\n leftIntake = hwMap.get(DcMotor.class, \"leftIntake\");\n rightIntake = hwMap.get(DcMotor.class, \"rightIntake\");\n dropper = hwMap.get(DcMotor.class, \"dropper\");\n\n\n //range = hwMap.get(ModernRoboticsI2cRangeSensor.class, \"range\");\n gyro = (ModernRoboticsI2cGyro)hwMap.gyroSensor.get(\"gyro\");\n //color = hwMap.get(ModernRoboticsI2cColorSensor.class, \"color\");\n\n frontLeft.setDirection(DcMotor.Direction.REVERSE); // Set to REVERSE if using AndyMark motors\n frontRight.setDirection(DcMotor.Direction.FORWARD);// Set to FORWARD if using AndyMark motors\n backLeft.setDirection(DcMotor.Direction.REVERSE); // Set to REVERSE if using AndyMark motors\n backRight.setDirection(DcMotor.Direction.FORWARD);// Set to FORWARD if using AndyMark motors\n\n // Set all motors to zero power\n frontLeft.setPower(0);\n frontRight.setPower(0);\n backLeft.setPower(0);\n backRight.setPower(0);\n leftIntake.setPower(0);\n rightIntake.setPower(0);\n dropper.setPower(0);\n\n // Set all motors to run without encoders.\n // May want to use RUN_USING_ENCODERS if encoders are installed.\n frontLeft.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n frontRight.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n backLeft.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n backRight.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n leftIntake.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n rightIntake.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n dropper.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n // Define and initialize ALL installed servos.\n\n// claimingArm = hwMap.get(Servo.class, \"claimingArm\");\n// claw1 = hwMap.get(Servo.class, \"claw1\");\n// claw2 = hwMap.get(Servo.class, \"claw2\");\n// samplingArm = hwMap.get(Servo.class, \"samplingArm\");\n\n helper = hwMap.get(Servo.class, \"helper\");\n leftUp = hwMap.get(Servo.class, \"leftUp\");\n rightUp = hwMap.get(Servo.class, \"rightUp\");\n outLeft = hwMap.get(Servo.class, \"outLeft\");\n outRight = hwMap.get(Servo.class, \"outRight\");\n\n// claimingArm.setPosition(0); // find out what servo they are using\n// claw1.setPosition(0);\n// claw2.setPosition(0);\n// samplingArm.setPosition(0);\n\n helper.setPosition(MID_SERVO);\n leftUp.setPosition(MID_SERVO);\n rightUp.setPosition(MID_SERVO);\n outLeft.setPosition(0.5);\n outRight.setPosition(0.5);\n\n dim = hwMap.get(DeviceInterfaceModule.class, \"Device Interface Module 1\");\n\n }",
"@Override\n public void init() {\n // Get references to dc motors and set initial mode and direction\n // It appears all encoders are reset upon robot startup, but just in case, set all motor\n // modes to Stop-And-Reset-Encoders during initialization.\n motorLeftA = hardwareMap.dcMotor.get(MOTOR_DRIVE_LEFT_A);\n motorLeftA.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n motorLeftA.setDirection(DcMotor.Direction.FORWARD);\n\n motorLeftB = hardwareMap.dcMotor.get(MOTOR_DRIVE_LEFT_B);\n motorLeftB.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n motorLeftB.setDirection(DcMotor.Direction.FORWARD);\n\n motorRightA = hardwareMap.dcMotor.get(MOTOR_DRIVE_RIGHT_A);\n motorRightA.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n motorRightA.setDirection(DcMotor.Direction.REVERSE);\n\n motorRightB = hardwareMap.dcMotor.get(MOTOR_DRIVE_RIGHT_B);\n motorRightB.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n motorRightB.setDirection(DcMotor.Direction.REVERSE);\n\n //motorGlyphLift = hardwareMap.dcMotor.get(GLYPH_LIFT);\n //motorGlyphLift.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n //motorGlyphLift.setDirection(DcMotor.Direction.FORWARD);\n\n sGlyphL = hardwareMap.servo.get(GLYPH_LEFT);\n //sGlyphL.scaleRange(0,180);\n\n sGlyphR = hardwareMap.servo.get(GLYPH_RIGHT);\n sGem = hardwareMap.servo.get(Gem);\n\n //Initialize vex motor\n sGLift = hardwareMap.crservo.get(Servo_GlyphLift);\n\n //sGLift.setPower(0);\n\n //sGLift2 = hardwareMap.servo.get(Servo_GlyphLift);\n\n BNO055IMU.Parameters parameters = new BNO055IMU.Parameters();\n parameters.angleUnit = BNO055IMU.AngleUnit.DEGREES;\n\n imu = hardwareMap.get(BNO055IMU.class, \"imu\");\n imu.initialize(parameters);\n\n imu = hardwareMap.get(BNO055IMU.class,\"imu\");\n imu.initialize(parameters);\n\n //servoGlyph1.setPosition(180);\n //servoGlyph2.setPosition(180);\n\n bDirection = true;\n }",
"void gyroSafety(){\n }",
"@Override\n public void teleopPeriodic() {\n CommandScheduler.getInstance().run();\n OI.getInstance().getPilot().run();\n SmartDashboard.putNumber(\"gyro\", getRobotContainer().getTecbotSensors().getYaw());\n SmartDashboard.putBoolean(\"isSpeed\", getRobotContainer().getDriveTrain().getTransmissionMode() == DriveTrain.TransmissionMode.speed);\n SmartDashboard.putString(\"DT_MODE\", getRobotContainer().getDriveTrain().getCurrentDrivingMode().toString());\n SmartDashboard.putNumber(\"x_count\", getRobotContainer().getClimber().getxWhenPressedCount());\n\n }",
"private void configVelocityControl() {\n //config remote sensors\n //sets the sensor to be a quad encoder, sets our feedback device to be that sensor\n m_masterMotor.configSelectedFeedbackSensor(TalonSRXFeedbackDevice.CTRE_MagEncoder_Relative, RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //zero the encoders on every init\n zeroEncoder();\n\n //sets whether our motor is inverted\n //this is currently false but can be switched based on testing\n m_masterMotor.setInverted(RobotMap.LAUNCHER_MASTER_INVERTED);\n m_masterMotor.setSensorPhase(RobotMap.LAUNCHER_MASTER_INVERTED);\n\n //this sets how often we pull data from our sensor\n m_masterMotor.setStatusFramePeriod(StatusFrame.Status_2_Feedback0, RobotMap.LAUNCHER_FEEDBACK_PERIOD_MS, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //this configs the deadband for the PID output. Any output with an absolute value less than this will be treated as zero\n m_masterMotor.configNeutralDeadband(0, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //this sets the peak output for our motor controller.\n m_masterMotor.configPeakOutputForward(RobotMap.LAUNCHER_PID_PEAK_OUTPUT, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n //this does the same thing but for the reverse direction\n m_masterMotor.configPeakOutputReverse(0, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n \n //sets the period of the velocity sample\n //effectively this defines the amount of time used to calculate the velocity\n m_masterMotor.configVelocityMeasurementPeriod(RobotMap.VELOCITY_MEASUREMENT_PERIOD, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //Sets the number of samples used in the rolling average for calculating velocity\n m_masterMotor.configVelocityMeasurementWindow(RobotMap.LAUNCHER_VELOCITY_MEASUREMENT_WINDOW, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n \n //set p, i, d, f values\n //the zero is the PID slot, in this case it is zero for the primary PID\n //the launcher has no auxillary or turning PID control\n m_masterMotor.config_kP(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_P);\n m_masterMotor.config_kI(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_I);\n m_masterMotor.config_kD(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_D);\n m_masterMotor.config_kF(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_F);\n\n //this sets the acceptable amount of Integral error, where if the absolute accumulated error exceeds this ammount, it resets to zero\n //this is designed to prevent the PID from going crazy if we move too far from our target\n m_masterMotor.config_IntegralZone(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_I_ZONE, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //sets the max output of the motor specifically within closed loop control\n m_masterMotor.configClosedLoopPeakOutput(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_PID_PEAK_OUTPUT, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //this configures an allowable error in closed loop control\n //any error less than this is treated as zero.\n m_masterMotor.configAllowableClosedloopError(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_ACCEPTABLE_ERROR, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //configures the period for closed loop calculations in MS \n //should be increased if the can bus is haveing issues\n m_masterMotor.configClosedLoopPeriod(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_CLOSED_LOOP_PERIOD_MS, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //configures ramp speed\n m_masterMotor.configOpenloopRamp(RobotMap.LAUNCHER_OPEN_LOOP_RAMP_TIME_S);\n m_masterMotor.configClosedloopRamp(0);\n\n //sets our closed loop control to use our primary PID slot\n m_masterMotor.selectProfileSlot(RobotMap.PID_PRIMARY_SLOT, 0);\n }",
"@Override\n\tpublic void robotInit() {\n\t\toi = new OI();\n\t\tdrivebase.calibrateGyro();\n\t\tSmartDashboard.putData(\"Zero Gyro\", new ZeroGyro());\n\t\tSmartDashboard.putData(\"Calibrate Gyro - WHILE ROBOT NOT MOVING\", new CalibrateGyro());\n\t\tchooser.addDefault(\"Default Prepare Gear Auto\", new PrepareGearManipulator());\n\t\t//shooterModeChooser.addDefault(\"Shooter at Nominal Preset when Pressed\", object);\n\t\t/*chooser.addObject(\"Left Gear Auto\", new LeftGearGroup());\n\t\tchooser.addObject(\"Center Gear Auto\", new CenterGearGroup());*/\n\t//\tchooser.addObject(\"Test Vision Auto\", new TurnTillPerpVision(true));\n\t//\tchooser.addObject(\"Testing turn gyro\", new RotateToGyroAngle(90,4));\n\t\t//chooser.addObject(\"DriveStraightTest\", new GoAndReturn());\n\t\t //UNNECESSARY AUTOS FOR TESTING ^\n\t\tchooser.addObject(\"Center Gear Encoder Auto (place)\", new DriveStraightCenter());\n\t\tchooser.addObject(\"Vision center TESTING!!!\", new TurnTillPerpVision());\n\t\tchooser.addObject(\"Boiler Auto RED\", new BoilerAuto(true));\n\t\tchooser.addObject(\"Boiler Auto BLUE\", new BoilerAuto(false));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t//\tchooser.addObject(\"Center Gear Encoder Auto (do not place )\", new DriveToFace(false, false, false));\n\t\tchooser.addObject(\"Baseline\", new DriveToLeftRightFace(false,false,false,false));\n\t\tchooser.addObject(\"TEST DRIVETANK AUTO\", new DriveTimedTank(0.7,0.7,5));\n\t\tchooser.addObject(\"Side Gear Auto RIGHT (manual straight lineup)(place)(TURN AFTER AND START CYCLE)\", new DriveStraightSide(true,false));\n\n\t\tchooser.addObject(\"Side Gear Auto LEFT (manual straight lineup)(place)(TURN AFTER AND START CYCLE)\", new DriveStraightSide(true,true));\n\t\t//chooser.addObject(\"Side Gear Auto (place)\", new DriveToLeftRightFace(true,false,false,false));\n\t\t//chooser.addObject(\"Test DriveStraight Auto\", new DriveStraightPosition(10,5));\n\t\t//chooser.addObject(\"Center Gear Encoder Auto (place)\", new DriveStraightCenter());\n\t\t/*InterpreterGroup interp = new InterpreterGroup();\n\t\t(interp.init()){\n\t\t\tchooser.addObject(\"Interpreter\",interp);\n\t\t}*/\n\t\t// chooser.addObject(\"My Auto\", new MyAutoCommand());\n\t\tSmartDashboard.putData(\"Auto Chooser\", chooser);\n\n\t\tRobot.drivebase.leftDrive1.setPosition(0);\n \tRobot.drivebase.rightDrive1.setPosition(0);\n \t\n\t\t\n \tRobot.leds.initializei2cBus();\n \tbyte mode = 0;\n \tRobot.leds.setMode(mode);\n \tgearcamera = CameraServer.getInstance();\n\t\t\n \tUsbCamera gearUsb = gearcamera.startAutomaticCapture();\n \tgearUsb.setFPS(25);\n \tgearUsb.setResolution(256, 144);\n\n\t\t//NetworkTable.setClientMode();\n \t//NetworkTable.setIPAddress(\"raspberrypi.local\");\n\t\t\n\t\t\n\t\t/*\n\t\t * new Thread(() -> { UsbCamera goalcamera =\n\t\t * CameraServer.getInstance().startAutomaticCapture();\n\t\t * goalcamera.setResolution(320, 240); goalcamera.setFPS(30);\n\t\t * goalcamera.setBrightness(1); goalcamera.setExposureManual(1);\n\t\t * \n\t\t * CvSink goalCvSink = CameraServer.getInstance().getVideo();\n\t\t * \n\t\t * Mat source = new Mat();\n\t\t * \n\t\t * while(!Thread.interrupted()) { goalCvSink.grabFrame(source);\n\t\t * goaloutputmat = source; } }).start();\n\t\t * goalPipeline.process(goaloutputmat);\n\t\t * \n\t\t * new Thread(() -> { UsbCamera gearcamera =\n\t\t * CameraServer.getInstance().startAutomaticCapture();\n\t\t * gearcamera.setResolution(320, 240); gearcamera.setFPS(30);\n\t\t * gearcamera.setBrightness(1); gearcamera.setExposureManual(1);\n\t\t * \n\t\t * CvSink gearCvSink = CameraServer.getInstance().getVideo();\n\t\t * \n\t\t * Mat source = new Mat();\n\t\t * \n\t\t * while(!Thread.interrupted()) { gearCvSink.grabFrame(source);\n\t\t * gearoutputmat = source; } }).start();\n\t\t * gearPipeline.process(gearoutputmat);\n\t\t */\n\t}",
"@Override\n public void init() {\n robot.init(hardwareMap, telemetry, false);\n //robot.resetServo();\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.addData(\"Status\", \"Initialized\");\n // robot.FL.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // robot.FR.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // robot.BL.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // robot.BR.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n }",
"@Override\n public void init() {\n \n \n rightFront = hardwareMap.dcMotor.get(\"frontR\");\n rightBack = hardwareMap.dcMotor.get(\"backR\");\n \n \n \n rightFront.setDirection(DcMotor.Direction.FORWARD); \n rightBack.setDirection(DcMotor.Direction.FORWARD);\n \n \n \n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n }",
"protected void ratCrewInit() {\n\n // Init motor state machine.\n motorTurnType = \"none\";\n motorTurnDestination = 0.0f;\n motorTurnAngleToGo = 0.0f;\n motorTurnAngleAdjustedToGo = 0.0f;\n isDriving = false;\n driveLeftStart = 0;\n driveRightStart = 0;\n driveLeftTarget = 0;\n driveRightTarget = 0;\n driveRightSpeed = 0.0f;\n driveLeftSpeed = 0.0f;\n driveAngleOffset = 0.0f;\n driveAngleCorrection = 0.0f;\n\n // TODO: push into initMotor function\n if (doMotors) {\n // Initialize Motors, finding them through the hardware map.\n leftDrive = hardwareMap.get(DcMotor.class, \"motorLeft\");\n rightDrive = hardwareMap.get(DcMotor.class, \"motorRight\");\n leftDrive.setDirection(DcMotor.Direction.REVERSE);\n rightDrive.setDirection(DcMotor.Direction.FORWARD);\n\n // initialize the encoder\n leftDrive.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n rightDrive.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n leftDrive.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n rightDrive.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n leftDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rightDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n // Set all motors to zero power.\n leftDrive.setPower(0);\n rightDrive.setPower(0);\n\n gate = hardwareMap.get(Servo.class, \"Gate\");\n gate.setPosition(1.0);\n }\n initGyroscope();\n\n if (doVuforia){\n initVuforia();\n initTfod();\n\n if (tfod != null) {\n tfod.activate();\n\n // The TensorFlow software will scale the input images from the camera to a lower resolution.\n // This can result in lower detection accuracy at longer distances (> 55cm or 22\").\n // If your target is at distance greater than 50 cm (20\") you can adjust the magnification value\n // to artificially zoom in to the center of image. For best results, the \"aspectRatio\" argument\n // should be set to the value of the images used to create the TensorFlow Object Detection model\n // (typically 1.78 or 16/9).\n\n // Uncomment the following line if you want to adjust the magnification and/or the aspect ratio of the input images.\n tfod.setZoom(2.5, 1.78);\n }\n }\n\n // Init run state.\n madeTheRun = false;\n startTime = 0;\n telemetry.addData(\"Init\", \"motors=%b, gyro=%b, vuforia=%b\", doMotors, doGyro, doVuforia);\n telemetry.update();\n }",
"public void robotInit() {\n\t\toi = OI.getInstance();\r\n\t\t\r\n\t\t// instantiate the command used for the autonomous and teleop period\r\n\t\treadings = new D_SensorReadings();\r\n\t\t// Start pushing values to the SD.\r\n\t\treadings.start();\r\n\t\t//Gets the single instances of driver and operator, from OI. \r\n\t\tdriver = oi.getDriver();\r\n\t\toperator = oi.getOperator();\r\n\r\n\t\t//Sets our default auto to NoAuto, if the remainder of our code doesn't seem to work. \r\n\t\tauto = new G_NoAuto();\r\n\t\t\r\n\t\t//Sets our teleop commandGroup to T_TeleopGroup, which contains Kaj,ELevator, Intake, and Crossbow Commands. \r\n\t\tteleop = new T_TeleopGroup();\r\n\t\t\r\n\t}",
"@Override \n public void init() {\n intakeLeft = hardwareMap.crservo.get(\"intakeLeft\");\n intakeRight = hardwareMap.crservo.get(\"intakeRight\");\n topLeft = hardwareMap.servo.get(\"topLeft\");\n bottomLeft = hardwareMap.servo.get(\"bottomRight\");\n topRight = hardwareMap.servo.get(\"topRight\");\n bottomRight = hardwareMap.servo.get(\"bottomRight\");\n lift = hardwareMap.dcMotor.get(\"lift\");\n }",
"@Override\n\tpublic void setupSensors() {\n\t\t\n\t}",
"@Override\n public void robotInit() {\n\n // Motor controllers\n leftMotor = new CANSparkMax(1, MotorType.kBrushless);\n leftMotor.setInverted(false);\n leftMotor.setIdleMode(IdleMode.kBrake);\n\n CANSparkMax leftSlave1 = new CANSparkMax(2, MotorType.kBrushless);\n leftSlave1.setInverted(false);\n leftSlave1.setIdleMode(IdleMode.kBrake);\n leftSlave1.follow(leftMotor);\n\n CANSparkMax leftSlave2 = new CANSparkMax(3, MotorType.kBrushless);\n leftSlave2.setInverted(false);\n leftSlave2.setIdleMode(IdleMode.kBrake);\n leftSlave2.follow(leftMotor);\n\n rightMotor = new CANSparkMax(4, MotorType.kBrushless);\n rightMotor.setInverted(false);\n rightMotor.setIdleMode(IdleMode.kBrake);\n\n CANSparkMax rightSlave1 = new CANSparkMax(5, MotorType.kBrushless);\n rightSlave1.setInverted(false);\n rightSlave1.setIdleMode(IdleMode.kBrake);\n rightSlave1.follow(leftMotor);\n\n CANSparkMax rightSlave2 = new CANSparkMax(6, MotorType.kBrushless);\n rightSlave2.setInverted(false);\n rightSlave2.setIdleMode(IdleMode.kBrake);\n rightSlave2.follow(leftMotor);\n\n // Encoders\n leftEncoder = leftMotor.getEncoder();\n rightEncoder = rightMotor.getEncoder();\n\n // Gyro\n gyro = new ADXRS450_Gyro();\n\n }",
"public void init() {\n // Define and Initialize Motors (note: need to use reference to actual OpMode).\n leftDrive = myOpMode.hardwareMap.get(DcMotor.class, \"left_drive\");\n rightDrive = myOpMode.hardwareMap.get(DcMotor.class, \"right_drive\");\n armMotor = myOpMode.hardwareMap.get(DcMotor.class, \"arm\");\n\n // To drive forward, most robots need the motor on one side to be reversed, because the axles point in opposite directions.\n // Pushing the left stick forward MUST make robot go forward. So adjust these two lines based on your first test drive.\n // Note: The settings here assume direct drive on left and right wheels. Gear Reduction or 90 Deg drives may require direction flips\n leftDrive.setDirection(DcMotor.Direction.REVERSE);\n rightDrive.setDirection(DcMotor.Direction.FORWARD);\n\n // If there are encoders connected, switch to RUN_USING_ENCODER mode for greater accuracy\n // leftDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n // rightDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n // Define and initialize ALL installed servos.\n leftHand = myOpMode.hardwareMap.get(Servo.class, \"left_hand\");\n rightHand = myOpMode.hardwareMap.get(Servo.class, \"right_hand\");\n leftHand.setPosition(MID_SERVO);\n rightHand.setPosition(MID_SERVO);\n\n myOpMode.telemetry.addData(\">\", \"Hardware Initialized\");\n myOpMode.telemetry.update();\n }",
"public void runOpMode() {\n leftBackDrive = hardwareMap.get(DcMotor.class, \"left_back_drive\"); //port 0, hub1\n rightBackDrive = hardwareMap.get(DcMotor.class, \"right_back_drive\"); //port 1, hub1\n leftFrontDrive = hardwareMap.get(DcMotor.class, \"left_front_drive\"); //port 2, hub1\n rightFrontDrive = hardwareMap.get(DcMotor.class, \"right_front_drive\"); //port 3, hub1\n craneExtend = hardwareMap.get(DcMotor.class, \"craneExtend\"); //port 0, hub2\n cranePitch = hardwareMap.get(DcMotor.class, \"cranePitch\"); //port 1, hub2\n craneElevate = hardwareMap.get(DcMotor.class, \"craneElevate\"); //port 2, hub2\n fakeMotor = hardwareMap.get(DcMotor.class, \"fakeMotor\"); //port 2, hub3\n craneGrab = hardwareMap.get(Servo.class, \"craneGrab\"); //port 0, servo\n craneGrabAttitude = hardwareMap.get(Servo.class, \"craneGrabAttitude\"); //port 2, servo\n trayGrab = hardwareMap.get(Servo.class, \"trayGrab\"); //port 1, servo\n flipperLeft = hardwareMap.get(Servo.class, \"flipperLeft\"); //port 3. servo\n flipperRight = hardwareMap.get(Servo.class, \"flipperRight\"); //port 4, servo\n \n //Setting the motor directions\n leftBackDrive.setDirection(DcMotor.Direction.FORWARD);\n rightBackDrive.setDirection(DcMotor.Direction.REVERSE);\n leftFrontDrive.setDirection(DcMotor.Direction.FORWARD);\n rightFrontDrive.setDirection(DcMotor.Direction.REVERSE);\n\n //Initializing variables\n \n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update(); //Done initalizing\n\n //Wait for the game to start (driver presses PLAY)\n waitForStart();\n runtime.reset();\n\n //run until the end of the match (driver presses STOP)\n while (opModeIsActive()) {\n \n//******************************************************************************\n\n //Drive controls\n if (gamepad1.left_trigger>0 || gamepad1.right_trigger>0) { //Crab\n leftBackDrive.setPower(gamepad1.left_stick_x*0.8);\n rightBackDrive.setPower(-gamepad1.left_stick_x*0.8);\n leftFrontDrive.setPower(-gamepad1.left_stick_x*0.8);\n rightFrontDrive.setPower(gamepad1.left_stick_x*0.8);\n }\n\n else { //Tank\n leftBackDrive.setPower(-gamepad1.left_stick_x);\n rightBackDrive.setPower(-gamepad1.right_stick_x);\n leftFrontDrive.setPower(-gamepad1.left_stick_x);\n rightFrontDrive.setPower(-gamepad1.right_stick_x);\n }\n }\n \n//******************************************************************************\n\n //Crane control\n \n \n//******************************************************************************\n\n //Telemetry display\n telemetry.addData(\"Run Time:\", \"\" + runtime.toString());\n telemetry.addData(\"Motor Power\", \"L (%.2f), R (%.2f)\", gamepad1.left_stick_y, gamepad1.right_stick_y);\n telemetry.update();\n }",
"@Override public void init() {\n /// Important Step 2: Get access to a list of Expansion Hub Modules to enable changing caching methods.\n all_hubs_ = hardwareMap.getAll(LynxModule.class);\n /// Important Step 3: Option B. Set all Expansion hubs to use the MANUAL Bulk Caching mode\n for (LynxModule module : all_hubs_ ) {\n switch (motor_read_mode_) {\n case BULK_READ_AUTO:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.AUTO);\n break;\n case BULK_READ_MANUAL:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.MANUAL);\n break;\n case BULK_READ_OFF:\n default:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.OFF);\n break;\n }\n }\n\n /// Use the hardwareMap to get the dc motors and servos by name.\n\n motorLF_ = hardwareMap.get(DcMotorEx.class, lfName);\n motorLB_ = hardwareMap.get(DcMotorEx.class, lbName);\n motorRF_ = hardwareMap.get(DcMotorEx.class, rfName);\n motorRB_ = hardwareMap.get(DcMotorEx.class, rbName);\n motorLF_.setDirection(DcMotor.Direction.REVERSE);\n motorLB_.setDirection(DcMotor.Direction.REVERSE);\n\n // map odometry encoders\n verticalLeftEncoder = hardwareMap.get(DcMotorEx.class, verticalLeftEncoderName);\n verticalRightEncoder = hardwareMap.get(DcMotorEx.class, verticalRightEncoderName);\n horizontalEncoder = hardwareMap.get(DcMotorEx.class, horizontalEncoderName);\n\n if( USE_ENCODER_FOR_TELEOP ) {\n motorLF_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorLF_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorLB_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorLB_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorRF_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorRF_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorRB_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorRB_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n verticalLeftEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n verticalRightEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n horizontalEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n motorLF_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorLB_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorRF_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorRB_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n }\n\n if( USE_INTAKE ) {\n motor_left_intake_ = hardwareMap.get(DcMotorEx.class, \"motorLeftIntake\");\n motor_right_intake_ = hardwareMap.get(DcMotorEx.class, \"motorRightIntake\");\n motor_right_intake_.setDirection(DcMotor.Direction.REVERSE) ;\n\n motor_left_intake_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n motor_left_intake_.setMode( DcMotor.RunMode.RUN_USING_ENCODER );\n motor_right_intake_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n motor_right_intake_.setMode( DcMotor.RunMode.RUN_USING_ENCODER );\n\n servo_left_intake_ = hardwareMap.servo.get(\"servoLeftIntake\");\n servo_left_intake_pos_ = CR_SERVO_STOP ;\n servo_left_intake_.setPosition(CR_SERVO_STOP);\n servo_right_intake_ = hardwareMap.servo.get(\"servoRightIntake\");\n servo_right_intake_pos_ = CR_SERVO_STOP ;\n servo_right_intake_.setPosition(CR_SERVO_STOP);\n }\n if( USE_LIFT ) {\n motor_lift_ = hardwareMap.get(DcMotorEx.class, \"motorLift\");\n motor_lift_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motor_lift_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n power_lift_ = 0.0;\n if( USE_RUN_TO_POS_FOR_LIFT ) {\n motor_lift_.setTargetPosition(0);\n motor_lift_.setMode( DcMotor.RunMode.RUN_TO_POSITION ); // must call setTargetPosition() before switching to RUN_TO_POSISTION\n } else {\n motor_lift_.setMode( DcMotor.RunMode.RUN_USING_ENCODER);\n }\n last_stone_lift_enc_ = -1;\n }\n\n if( USE_STONE_PUSHER ) {\n servo_pusher_ = hardwareMap.servo.get(\"servoPusher\");\n servo_pusher_.setPosition(PUSHER_INIT);\n servo_pusher_pos_ = PUSHER_INIT;\n }\n if( USE_STONE_GATER ) {\n servo_gater_ = hardwareMap.servo.get(\"servoGater\");\n servo_gater_.setPosition(GATER_INIT);\n servo_gater_pos_ = GATER_INIT;\n }\n\n if( USE_ARM ) {\n servo_arm_ = hardwareMap.servo.get(\"servoArm\");\n servo_arm_.setPosition(ARM_INIT);\n servo_arm_pos_ = ARM_INIT;\n servo_claw_ = hardwareMap.servo.get(\"servoClaw\");\n servo_claw_.setPosition(CLAW_OPEN);\n servo_claw_pos_ = CLAW_OPEN;\n }\n\n if( USE_HOOKS ) {\n servo_left_hook_ = hardwareMap.servo.get(\"servoLeftHook\");\n servo_left_hook_.setPosition(LEFT_HOOK_UP);\n servo_left_hook_pos_ = LEFT_HOOK_UP;\n servo_right_hook_ = hardwareMap.servo.get(\"servoRightHook\");\n servo_right_hook_.setPosition(RIGHT_HOOK_UP);\n servo_right_hook_pos_ = RIGHT_HOOK_UP;\n }\n\n if( USE_PARKING_STICKS ) {\n servo_left_park_ = hardwareMap.servo.get(\"servoLeftPark\");\n servo_left_park_.setPosition(LEFT_PARK_IN);\n servo_left_park_pos_ = LEFT_PARK_IN;\n servo_right_park_ = hardwareMap.servo.get(\"servoRightPark\");\n servo_right_park_.setPosition(RIGHT_PARK_IN);\n servo_right_park_pos_ = RIGHT_PARK_IN;\n }\n\n if( USE_RGB_FOR_STONE ) {\n rev_rgb_range_ = hardwareMap.get(LynxI2cColorRangeSensor.class, \"stoneColor\");\n //rev_rgb_range_ = hardwareMap.get(LynxI2cColorRangeSensor.class, \"stoneColorV3\"); // different interface for V3, can't define it as LynxI2cColorRangeSensor anymore, 2020/02/29\n if( rev_rgb_range_!=null ) {\n if( AUTO_CALIBRATE_RGB ) {\n int alpha = rev_rgb_range_.alpha();\n //double dist = rev_rgb_range_.getDistance(DistanceUnit.CM);\n double dist = rev_rgb_range_.getDistance(DistanceUnit.METER);\n if( alpha>=MIN_RGB_ALPHA && alpha<100000 ) {\n rev_rgb_alpha_init_ = alpha;\n }\n if( AUTO_CALIBRATE_RGB_RANGE && !Double.isNaN(dist) ) {\n if( dist>MIN_RGB_RANGE_DIST && dist<MAX_RGB_RANGE_DIST ) {\n rev_rgb_dist_init_ = dist;\n }\n }\n }\n }\n }\n if( USE_RGBV3_FOR_STONE ) {\n //rgb_color_stone_ = hardwareMap.get(ColorSensor.class, \"stoneColorV3\");\n rgb_range_stone_ = hardwareMap.get(DistanceSensor.class, \"stoneColorV3\");\n if( AUTO_CALIBRATE_RANGE && rgb_range_stone_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RGB_RANGE_STONE);\n if( dis>0.0 && dis<0.2 ) {\n rgb_range_stone_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_RIGHT_RANGE ) {\n range_right_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"rightRange\"));\n if( AUTO_CALIBRATE_RANGE && range_right_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_RIGHT);\n if( dis>0.01 && dis<2.0 ) {\n range_right_dist_init_ = dis;\n break;\n }\n }\n }\n }\n if( USE_LEFT_RANGE ) {\n range_left_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"leftRange\"));\n if( AUTO_CALIBRATE_RANGE && range_left_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_LEFT);\n if( dis>0.01 && dis<2.0 ) {\n range_left_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_RANGE_FOR_STONE) {\n range_stone_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"stoneRange\"));\n if( AUTO_CALIBRATE_RANGE && range_stone_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_STONE);\n if( dis>0.01 && dis<0.5 ) {\n range_stone_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_INTAKE_MAG_SWITCH ) {\n intake_mag_switch_ = hardwareMap.get(DigitalChannel.class, \"intake_mag_switch\");\n intake_mag_switch_.setMode(DigitalChannelController.Mode.INPUT);\n intake_mag_prev_state_ = intake_mag_switch_.getState();\n intake_mag_change_time_ = 0.0;\n }\n if( USE_STONE_LIMIT_SWITCH ) {\n stone_limit_switch_ = hardwareMap.get(DigitalChannel.class, \"stone_limit_switch\");\n stone_limit_switch_.setMode(DigitalChannelController.Mode.INPUT);\n stone_limit_switch_prev_state_ = stone_limit_switch_.getState();\n }\n\n\n /////***************************** JOY STICKS *************************************/////\n\n /// Set joystick deadzone, any value below this threshold value will be considered as 0; moved from init() to init_loop() to aovid crash\n if(gamepad1!=null) gamepad1.setJoystickDeadzone( JOYSTICK_DEAD_ZONE );\n if(gamepad2!=null) gamepad2.setJoystickDeadzone( JOYSTICK_DEAD_ZONE );\n\n resetControlVariables();\n }",
"@Override\n public void init() {\n /* Initialize the hardware variables.\n * The init() method of the hardware class does all the work here\n */\n robot.init(hardwareMap);\n\n telemetry.addData(\"Status\", \"Initialized\");\n\n //the below lines set up the configuration file\n BallSensor = hardwareMap.i2cDevice.get(\"BallSensor\");\n\n BallSensorreader = new I2cDeviceSynchImpl(BallSensor, I2cAddr.create8bit(0x3a), false);\n\n BallSensorreader.engage();\n\n sensorGyro = hardwareMap.gyroSensor.get(\"gyro\"); //Point to the gyro in the configuration file\n mrGyro = (ModernRoboticsI2cGyro)sensorGyro; //ModernRoboticsI2cGyro allows us to .getIntegratedZValue()\n mrGyro.calibrate(); //Calibrate the sensor so it knows where 0 is and what still is. DO NOT MOVE SENSOR WHILE BLUE LIGHT IS SOLID\n\n //touch = hardwareMap.touchSensor.get(\"touch\");\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n telemetry.update();\n\n }",
"public void init() {\n delayingTimer = new ElapsedTime();\n\n // Define and Initialize Motors and Servos: //\n tailMover = hwMap.dcMotor.get(\"tail_lift\");\n grabberServo = hwMap.servo.get(\"grabber_servo\");\n openGrabber();\n\n // Set Motor and Servo Directions: //\n tailMover.setDirection(DcMotorSimple.Direction.FORWARD);\n\n tailMover.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n tailMover.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n int prevEncoder = tailMover.getCurrentPosition();\n tailMover.setPower(-0.15);\n mainHW.opMode.sleep (300);\n Log.d(\"catbot\", String.format(\"tail lift power %.2f current position %2d prev %2d\", tailMover.getPower(), tailMover.getCurrentPosition(),prevEncoder));\n runtime.reset();\n while((Math.abs(prevEncoder - tailMover.getCurrentPosition()) > 10)&& (runtime.seconds()<3.0)){\n prevEncoder = tailMover.getCurrentPosition();\n mainHW.opMode.sleep(300);\n Log.d(\"catbot\", String.format(\"tail lift power %.2f current position %2d prev %2d\", tailMover.getPower(), tailMover.getCurrentPosition(),prevEncoder));\n }\n tailMover.setPower(0.0);\n // Set Motor and Servo Modes: //\n tailMover.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n tailMover.setTargetPosition(0);\n tailMover.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n closeGrabber();\n }",
"@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\tisAutonomous = false;\n\t\tisTeleoperated = true;\n\t\tisEnabled = true;\n\t\tupdateLedState();\n\t\t//SmartDashboard.putNumber(\"Gyro\", Robot.drivebase.driveGyro.getAngle());\n\t\tSmartDashboard.putNumber(\"Climber Current Motor 1\", Robot.climber.climberTalon.getOutputCurrent());\n\t\tSmartDashboard.putNumber(\"Climber Current motor 2\", Robot.climber.climberTalon2.getOutputCurrent());\n\t\t//visionNetworkTable.getGearData();\n\t//\tvisionNetworkTable.showGearData();\n\t\tSmartDashboard.putNumber(\"GM ACTUAL POSITION\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\n\t\tif(Robot.debugging){\t\t\t\n\t\t\tSmartDashboard.putNumber(\"Shooter1RPM Setpoint\", shooter.shooter1.getSetpoint());\n\t \tSmartDashboard.putNumber(\"Intake Pivot Encoder Position\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\t\n\t\t\tSmartDashboard.putNumber(\"Gear Manipulator Setpoint\", gearManipulator.gearManipulatorPivot.getSetpoint());\n\t\t}\n\t\t//\tvisionNetworkTable.getGearData();\n\t\t//visionNetworkTable.getHighData();\n\t}",
"public void robotInit() {\n ;\n System.out.println(\"robot_init\");\n liftJoystick = new Joystick(2);\n armJoystick = new Joystick(4);\n setEncoder(new Encoder(2, 3));\n getEncoder().setDistancePerPulse(8.0 * 3.14 / 360.0 / 2);\n compressor = new Compressor(1, 1);\n compressor.start();\n // cameraMount = new CameraMount(10,9);\n //File file = new File (\"WALT_output.txt\");\n displayIndex = 1;\n driverScreen = DriverStationLCD.getInstance();\n\n //sensor wiring was switche so I fixed it programming wise\n setLeft(new DigitalInput(12));\n if (getLeft() == null) {\n printToScreen(\"LEFT SENSOR [DigitalInput(12)] IS NULL!!\");\n } else {\n printToScreen(\"LEFT SENSOR [DigitalInput(12)] is initialized\");\n }\n\n middle = new DigitalInput(13);\n if (getMiddle() == null) {\n printToScreen(\"MIDDLE SENSOR [DigitalInput(13)] IS NULL!!\");\n } else {\n printToScreen(\"MIDDLE SENSOR [DigitalInput(13)] is initialized\");\n }\n\n right = new DigitalInput(14);\n if (getRight() == null) {\n printToScreen(\"RIGHT SENSOR [DigitalInput(14)] IS NULL!!\");\n } else {\n printToScreen(\"RIGHT SENSOR [DigitalInput(14)] INITIALIZED\");\n }\n\n demoMode = false;\n myDog = Watchdog.getInstance();\n myDog.setEnabled(true);\n myDog.setExpiration(1);\n joysticks = new TankControls(1, 3);//All channel values arbitrary at this point and may need to be changed.\n // xboxController = new XboxControls(3);//channel value\n //initializes pneumatics\n //int[] solenoidChannels=(4,5);\n int spikeChannel = 1;\n int pressureSwitch = 2;\n //pneumatics=new pneumaticSystem(solenoidChannels,spikeChannel,pressureSwitch, 120);\n\n //Arm constructor\n //currently the arm is controlling the drive motors- arm channels are 3,4\n int liftChannel = 3;\n int armChannel = 4;\n int solenoidChannelWrist = 1;\n int clawSolenoid = 2;\n int armGyroChannel = 2;\n arm = new Arm(liftChannel, armChannel, solenoidChannelWrist,\n clawSolenoid, armGyroChannel);\n //channel for gyro\n int gyroChannel = 1;\n\n //channels for camera initiation\n boolean usingCamera = true;\n int panMotorCamChannel = 9;\n int tiltCamChannel = 8;\n\n //channels for accelerators- may want multiple for multiple directions\n int accSlot = -1;\n\n setSensors(new SensorSet(gyroChannel, accSlot, usingCamera,\n tiltCamChannel, panMotorCamChannel));\n\n setRobotDrive(new TwoMotorDrive(1, 2, demoMode));\n getRobotDrive().setInvertedSide(true);//boolean is true to invert right, false for left\n\n //so that it doesn't return nulls- should not be started before re-creating Why do we initialize it here then?\n driveTask = new WaltLineTrack(false, false, this);\n armTask = arm.getNewGoToHeightInstance(2);\n armTask2 = arm.getNewGoToAngleInstance(135);\n }",
"@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initialized\");\n\n // Initialize the hardware variables. Note that the strings used here as parameters\n // to 'get' must correspond to the names assigned during the robot configuration\n // step (using the FTC Robot Controller app on the phone).\n\n VinceHardwareBruinBot robot = new VinceHardwareBruinBot();\n // Inititalize last wheel speed\n for (int i = 0; i < lastwheelSpeeds.length; i++){\n lastwheelSpeeds[i] = 0;\n }\n robot.init(hardwareMap);\n {\n //init all drive wheels\n leftFrontDrive = robot.leftFrontDrive;\n rightFrontDrive = robot.rightFrontDrive;\n leftRearDrive = robot.leftRearDrive;\n rightRearDrive = robot.rightRearDrive;\n\n // init all other motors & servos\n intakeMotor = robot.intakeMotor;\n wobbleMotor = robot.wobbleMotor;\n ringShooterMotor = robot.ringShooterMotor;\n\n fireServo = robot.fireServo;\n\n //init imu\n imu = robot.imu;\n }\n initVuforiaNavigation();\n\n // Reset the wobble motor - Use a repeatable starting position\n wobbleMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n /*\n // Get PID constants for wobble motor\n int motorIndex = ((robot.wobbleMotor).getPortNumber());\n DcMotorControllerEx motorControllerEx = (DcMotorControllerEx)robot.wobbleMotor.getController();\n PIDCoefficients pidModified = motorControllerEx.getPIDCoefficients(motorIndex, DcMotor.RunMode.RUN_TO_POSITION);\n\n // change coefficients using methods included with DcMotorEx class.\n PIDCoefficients pidNew = new PIDCoefficients(10, 2, 3);\n motorControllerEx.setPIDCoefficients(motorIndex, DcMotor.RunMode.RUN_TO_POSITION, pidNew);\n */\n //wobbleMotor.setPIDFCoefficients(DcMotor.RunMode.RUN_TO_POSITION,pidNew);\n // Tell the driver that initialization is complete.\n telemetry.addData(\"Status\", \"Initialized\");\n }",
"@Override\n public void teleopPeriodic() {\n double x = xcontroller2.getX(Hand.kLeft);\n //double y = xcontroller1.getTriggerAxis(Hand.kRight) - xcontroller1.getTriggerAxis(Hand.kLeft);\n // For testing just use left joystick. Use trigger axis code for GTA Drive/\n double y = -xcontroller2.getY(Hand.kLeft);\n double z = xcontroller2.getX(Hand.kRight);\n double yaw = imu.getAngleZ();\n RobotDT.driveCartesian(x, y, 0, 0);\n \n\n // After you spin joystick R3 press A button to reset gyro angle\n if (xcontroller1.getAButtonPressed()) {\n imu.reset();\n }\n \n if (xcontroller2.getBButtonPressed()){\n mGPM.goSpongeHatch();\n }\n\n if (xcontroller2.getXButtonPressed()){\n mGPM.goPineHome();\n \n }\n\n\n /** \n * If Bumpers are pressed then Cargo Intake Motor = -1 for Intake \n *if Triggers are pressed set value to 1 for Outtake\n *If triggers are released set value to 0*/\n if(xcontroller2.getBumperPressed(Hand.kLeft) && xcontroller2.getBumperPressed(Hand.kRight)) {\n mGPM.setCargoMotor(-1);\n } else if((xcontroller2.getTriggerAxis(Hand.kLeft) >0.75) && (xcontroller2.getTriggerAxis(Hand.kRight) >0.75)) {\n mGPM.setCargoMotor(1);\n } else{\n mGPM.setCargoMotor(0);\n }\n }",
"@Override\n public void robotInit() {\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n\n /* lets grab the 360 degree position of the MagEncoder's absolute position */\n /* mask out the bottom12 bits, we don't care about the wrap arounds */ \n\t\tint absolutePosition = elevator.getSelectedSensorPosition(0) & 0xFFF;\n \n /* use the low level API to set the quad encoder signal */\n elevator.setSelectedSensorPosition(absolutePosition, Constants.kPIDLoopIdx, Constants.kTimeoutMs);\n\n /* choose the sensor and sensor direction */\n elevator.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, \n Constants.kPIDLoopIdx, Constants.kTimeoutMs);\n\n /* Ensure sensor is positive when output is positive */\n elevator.setSensorPhase(false);\n\n /**\n * Set based on what direction you want forward/positive to be.\n * This does not affect sensor phase. \n */ \n //elevator.setInverted(Constants.kMotorInvert);\n \n /* Config the peak and nominal outputs, 12V means full */\n elevator.configNominalOutputForward(0, Constants.kTimeoutMs);\n elevator.configNominalOutputReverse(0, Constants.kTimeoutMs);\n //elevator.configPeakOutputForward(1, Constants.kTimeoutMs);\n elevator.configNominalOutputForward(0.5);\n //elevator.configPeakOutputForward(1, Constants.kTimeoutMs);\n elevator.configPeakOutputForward(0.5);\n elevator.configPeakOutputReverse(-1, Constants.kTimeoutMs);\n \n /**\n * Config the allowable closed-loop error, Closed-Loop output will be\n * neutral within this range. See Table in Section 17.2.1 for native\n * units per rotation.\n */\n //elevator.configAllowableClosedloopError(0, Constants.kPIDLoopIdx, Constants.kTimeoutMs);\n \n /* Config Position Closed Loop gains in slot0, typically kF stays zero. */\n elevator.config_kF(Constants.kPIDLoopIdx, 0.0, Constants.kTimeoutMs);\n elevator.config_kP(Constants.kPIDLoopIdx, 0.5, Constants.kTimeoutMs);\n elevator.config_kI(Constants.kPIDLoopIdx, 0.0, Constants.kTimeoutMs);\n elevator.config_kD(Constants.kPIDLoopIdx, 0.0, Constants.kTimeoutMs);\n\n\n }",
"@Override\n public void robotPeriodic() {\n\n SmartDashboard.putString(\"DB/String 0\", \": \" + ControllerMap.driverMode);\n SmartDashboard.putString(\"DB/String 3\",\n \"pot value: \" + String.valueOf(Intake.getInstance().potentiometer.getVoltage()));\n SmartDashboard.putString(\"DB/String 7\", \"Zero position: \" + Intake.getInstance().getStartingWristEncoderValue());\n SmartDashboard.putString(\"DB/String 8\",\n \"wrist encoder: \" + String.valueOf(Hardware.intakeWrist.getSensorCollection().getQuadraturePosition()));\n SmartDashboard.putString(\"DB/String 9\",\n \"Corrected wrist: \" + String.valueOf(Intake.getInstance().getCorrectedWristEncoderValue()));\n // SmartDashboard.putString(\"DB/String 4\", \"pot value: \" +\n // String.valueOf(intake.potentiometer.getValue()));\n // SmartDashboard.putString(\"DB/String 9\", \"pot voltage: \" +\n // String.valueOf(intake.potentiometer.getVoltage()));\n }",
"protected void initialize() {\n \t//instantiate PIDs with motor groups\n \t\n \tPIDOutputGroup leftSide = new PIDOutputGroup(new PIDOutput[] {Robot.drive.frontLeftMotor, Robot.drive.backLeftMotor}, new Boolean[] {false, false}, 1.0);\n \t\n \tPIDOutputGroup rightSide = new PIDOutputGroup(new PIDOutput[] {Robot.drive.frontRightMotor, Robot.drive.backRightMotor}, new Boolean[] {true, true}, 1.0);\n\n \t//reset PIDs\n \tRobot.drive.leftEncoder.reset();\n \tRobot.drive.rightEncoder.reset();\n \t\n \t//set PID type\n \tRobot.drive.leftEncoder.setPIDSourceType(PIDSourceType.kRate);\n \tRobot.drive.rightEncoder.setPIDSourceType(PIDSourceType.kRate);\n \t\n \tleftEncoderPID = new PIDController(lEncoderP, lEncoderI, lEncoderD, Robot.drive.leftEncoder, leftSide);\n \t\n \trightEncoderPID = new PIDController(rEncoderP, rEncoderI, rEncoderD, Robot.drive.rightEncoder, rightSide);\n \t\n \tleftEncoderPID.setContinuous();\n \trightEncoderPID.setContinuous();\n \t\n \t\n \tleftEncoderPID.enable();\n \trightEncoderPID.enable();\n \t\n \t\n \t//timer things\n \ttimer = new Timer();\n \ttimer.start();\n \t\n \t//set timer times\n \ttAccelerating = maxVelocity / acceleration;\n \ttCruising = (distance - (Math.pow(maxVelocity, 2) / acceleration)) / maxVelocity;\n \ttTotal = 2 * tAccelerating + tCruising;\n \t\n \t//reset gyro\n \tRobot.gyroscope.reset();\n \t\n \t//set starting state\n \tcurrentState = DriveState.accelerating;\n }",
"protected void initialize()\n {\n // Set the pid up for driving straight\n Robot.drivetrain.getAngleGyroController().setPID(Constants.DrivetrainAngleGyroControllerP, Constants.DrivetrainAngleGyroControllerI, Constants.DrivetrainAngleGyroControllerD);\n //Robot.drivetrain.resetGyro();\n if (setpointSpecified == true)\n {\n Robot.drivetrain.getAngleGyroController().setSetpoint(Robot.initialGyroAngle); \n }\n else\n {\n Robot.drivetrain.getAngleGyroController().setSetpoint(Robot.drivetrain.getGyroValue());\n }\n Robot.drivetrain.setDirection(driveDirection);\n Robot.drivetrain.setMagnitude(drivePower);\n Robot.drivetrain.getAngleGyroController().enable();\n timer.reset();\n timer.start();\n }",
"@Override\n public void init() {\n telemetry.addData(\">\", \"Initializing...\");\n telemetry.update();\n\n // Sensors\n gyro = new Gyro(hardwareMap, \"gyro\");\n if (!gyro.isAvailable()) {\n telemetry.log().add(\"ERROR: Unable to initalize gyro\");\n }\n\n // Drive motors\n tank = new WheelMotorConfigs().init(hardwareMap, telemetry);\n tank.stop();\n\n // Vuforia\n vuforia = new VuforiaFTC(VuforiaConfigs.AssetName, VuforiaConfigs.TargetCount,\n VuforiaConfigs.Field(), VuforiaConfigs.Bot());\n vuforia.init();\n\n // Wait for the game to begin\n telemetry.addData(\">\", \"Ready for game start\");\n telemetry.update();\n }",
"public Gyro (){\n try {\n /* Communicate w/navX MXP via the MXP SPI Bus. */\n /* Alternatively: I2C.Port.kMXP, SerialPort.Port.kMXP or SerialPort.Port.kUSB */\n /* See http://navx-mxp.kauailabs.com/guidance/selecting-an-interface/ for details. */\n gyro_board = new AHRS(SPI.Port.kMXP);\n\n last_world_linear_accel_x = gyro_board.getWorldLinearAccelX();\n last_world_linear_accel_y = gyro_board.getWorldLinearAccelY();\n last_check_time = Timer.getFPGATimestamp();\n\n initial_offset = gyro_board.getYaw();\n } catch (RuntimeException ex ) {\n DriverStation.reportError(\"Error instantiating navX MXP: \" + ex.getMessage(), true);\n }\n\n\n }",
"public void init(HardwareMap ahwMap) {\n // Save reference to Hardware map\n hwMap = ahwMap;\n\n // Define and Initialize Motors\n// leftRearMotor = hwMap.dcMotor.get(\"left_rear_drive\");\n// rightRearMotor = hwMap.dcMotor.get(\"right_rear_drive\");\n leftFrontMotor = hwMap.dcMotor.get(\"left_front_drive\");\n rightFrontMotor = hwMap.dcMotor.get(\"right_front_drive\");\n// liftMotor = hwMap.dcMotor.get(\"lift_motor\");\n brushMotor = hwMap.dcMotor.get(\"brush_motor\");\n leftSpinMotor = hwMap.dcMotor.get(\"left_spin_motor\");\n rightSpinMotor = hwMap.dcMotor.get(\"right_spin_motor\");\n tiltMotor = hwMap.dcMotor.get(\"tilt_motor\");\n\n// rangeSensor = hwMap.get(ModernRoboticsI2cRangeSensor.class, \"range sensor\");\n\n //define and initialize servos\n// loadServo = hwMap.servo.get(\"load_servo\");\n// loadServo.setPosition(BEGIN_SERVO);\n pushServo = hwMap.servo.get(\"push_servo\");\n pushServo.setPosition(MID_SERVO);\n leftLiftServo = hwMap.servo.get(\"left_lift_servo\");\n leftLiftServo.setPosition(MID_SERVO);\n rightLiftServo = hwMap.servo.get(\"right_lift_servo\");\n rightLiftServo.setPosition(MID_SERVO);\n\n //define and initialize buttons\n// bottomTouchButton = hwMap.touchSensor.get(\"bottom_touch_button\");\n// topTouchButton = hwMap.touchSensor.get(\"top_touch_button\");\n\n leftSpinMotor.setDirection(DcMotor.Direction.REVERSE);\n leftFrontMotor.setDirection(DcMotor.Direction.REVERSE); // Set to REVERSE if using AndyMark motors\n rightFrontMotor.setDirection(DcMotor.Direction.FORWARD); // Set to FORWARD if using AndyMark motors\n\n // Set all motors to zero power\n// leftRearMotor.setPower(0);\n// rightRearMotor.setPower(0);\n leftFrontMotor.setPower(0);\n rightFrontMotor.setPower(0);\n// liftMotor.setPower(0);\n brushMotor.setPower(0);\n leftSpinMotor.setPower(0);\n rightSpinMotor.setPower(0);\n tiltMotor.setPower(0);\n\n // Set all motors to run without encoders.\n // May want to use RUN_USING_ENCODERS if encoders are installed.\n// leftRearMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n// rightRearMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n leftFrontMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n rightFrontMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n// liftMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n brushMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n leftSpinMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n// rightSpinMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n tiltMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n }",
"public void teleopPeriodic() {\n\t\t// resetAndDisable();\n\t\tupdateDashboard();\n\t\tLogitechJoystick.controllers();\n\t\tDrivetrain.arcadeDrive();\n\t\tShooterAngleMotor.angleShooter();\n\t\tBallShooter.shootBalls();\n\t\tSonicSensor.updateSensors();\n\t\t\n\t\t//if(LogitechJoystick.rightBumper2)\n\t\t\t//{\n\t\t\t\t//LowBar.makeArmStable();\n\t\t\t//}\n\n\t}",
"@Override\n public void runOpMode() {\n androidGyroscope = new AndroidGyroscope();\n\n // Put initialization blocks here.\n if (androidGyroscope.isAvailable()) {\n telemetry.addData(\"Status\", \"GyroAvailable\");\n }\n waitForStart();\n if (opModeIsActive()) {\n // Put run blocks here.\n androidGyroscope.startListening();\n androidGyroscope.setAngleUnit(AngleUnit.DEGREES);\n while (opModeIsActive()) {\n telemetry.addData(\"X Axis\", androidGyroscope.getX());\n telemetry.update();\n }\n }\n }",
"public void init() {\n \tpidControllers.add(leftMotorPID);\n\t\tpidControllers.add(rightMotorPID);\n\t\tpidControllers.add(leftMiniCIMMotorPID);\n\t\tpidControllers.add(rightMiniCIMMotorPID);\n\t\t\n \tgyro.initGyro();\n \tgyro.setSensitivity(RobotMap.gyroGain);\n \tgyro.calibrate();\n }",
"@Override\n public void runOpMode() {\n\n //PUTS THE NAMES OF THE MOTORS INTO THE CODE\n\n //DRIVE Motors\n aDrive = hardwareMap.get(DcMotor.class, \"aDrive\");\n bDrive = hardwareMap.get(DcMotor.class, \"bDrive\");\n cDrive = hardwareMap.get(DcMotor.class, \"cDrive\");\n dDrive = hardwareMap.get(DcMotor.class, \"dDrive\");\n cDrive.setDirection(DcMotor.Direction.REVERSE);\n dDrive.setDirection(DcMotor.Direction.REVERSE);\n\n //FUNCTIONS Motors\n Arm = hardwareMap.get(DcMotor.class, \"Arm\");\n ArmExtender = hardwareMap.get(DcMotor.class, \"ArmExtender\");\n Spindle = hardwareMap.get(DcMotor.class, \"Spindle\");\n Lift = hardwareMap.get(DcMotor.class, \"Lift\");\n\n //SERVOS\n Cover = hardwareMap.get(Servo.class, \"Cover\");\n\n //Vuforia\n telemetry.addData(\"Status\", \"DogeCV 2018.0 - Gold Align Example\");\n\n detector = new GoldAlignDetector();\n detector.init(hardwareMap.appContext, CameraViewDisplay.getInstance());\n detector.useDefaults();\n\n // Phone Stuff\n detector.alignSize = 100; // How wide (in pixels) is the range in which the gold object will be aligned. (Represented by green bars in the preview)\n detector.alignPosOffset = 0; // How far from center frame to offset this alignment zone.\n detector.downscale = 0.4; // How much to downscale the input frames\n detector.areaScoringMethod = DogeCV.AreaScoringMethod.MAX_AREA; // Can also be PERFECT_AREA\n //detector.perfectAreaScorer.perfectArea = 10000; // if using PERFECT_AREA scoring\n detector.maxAreaScorer.weight = 0.005;\n detector.ratioScorer.weight = 5;\n detector.ratioScorer.perfectRatio = 1.0;\n detector.enable();\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update();\n\n waitForStart();\n\n telemetry.addData(\"IsAligned\" , detector.getAligned()); // Is the bot aligned with the gold mineral\n\n goldPos = detector.getXPosition(); // Gets gold block posistion\n\n sleep(1000); // Waits to make sure it is correct\n\n // Move Depending on gold position\n if(goldPos < 160){\n driftleft();\n sleep(1500);\n }else if (goldPos > 500) {\n driftright();\n sleep(1500);\n }else{\n forward();\n }\n\n forward(); //Drives into crater\n sleep(4000);\n\n detector.disable();\n\n }",
"public void commonPeriodic()\n {\n double d1LeftJoystick = driver1.getAxis(driver1.LAxisUD);\n double d1RightJoystick = driver1.getAxis(driver1.RAxisUD);\n\n double d2LeftJoystick = driver2.getAxis(driver2.LAxisUD);\n double d2RightJoystick = driver2.getAxis(driver2.RAxisUD);\n\n // -------------------- DRIVER 1\n\n driveTrain.drive(d1LeftJoystick * speedModifier, d1RightJoystick * speedModifier);\n\n // driver1 controls ramp\n // press start and select together to deploy\n if(driver1.down(driver1.Start) && driver1.down(driver1.Select))\n {\n ramp.deploy();\n hatchArm.fingerGrab();\n }\n else\n {\n ramp.undeploy();\n }\n\n // driver 1 can double speed by holding L2\n //driveTrain.fastSpeed = driver1.down(driver1.L2);\n if(driver1.pressed(driver1.A))\n {\n driveTrain.slowSpeed = !driveTrain.slowSpeed;\n System.out.println(\"Fast speed toggled to: \" + driveTrain.slowSpeed);\n }\n\n //drive straight\n if(driver1.down(driver1.L1))\n {\n driveTrain.set_right_motors(speedModifier);\n }\n if(driver1.down(driver1.R1))\n {\n driveTrain.set_left_motors(speedModifier);\n }\n\n // flip drive orientation\n if(driver1.pressed(driver1.Select))\n {\n driveTrain.flip_orientation();\n \n if(driveTrain.isFacingForward())\n {\n camServForward.setSource(camFront);\n //camServReverse.setSource(camBack);\n // camBack.free();\n // camFront.close();\n // camFront = CameraServer.getInstance().startAutomaticCapture(0);\n // camBack = CameraServer.getInstance().startAutomaticCapture(1);\n }\n else\n {\n camServForward.setSource(camBack);\n //camServReverse.setSource(camFront);\n // camBack.close();\n // camFront.close();\n // camFront = CameraServer.getInstance().startAutomaticCapture(1);\n // camBack = CameraServer.getInstance().startAutomaticCapture(0);\n }\n }\n\n\n // -------------------- DRIVER 2\n\n\n // up is out\n // down is in\n // (when it's negated)\n cargoArm.spinBallMotor(-1 * d2LeftJoystick * 0.9);\n\n // control hatch placement pistons\n if(driver2.pressed(driver2.A))\n {\n hatchArm.pushPistons();\n }\n else if (driver2.released(driver2.A))\n {\n hatchArm.retractPistons();\n }\n\n // open/close hatch grabber arms\n if(driver2.pressed(driver2.B))\n {\n hatchArm.toggleGrabber();\n }\n\n if(driver2.pressed(driver2.Select))\n {\n //cargoArm.toggleArmLock();\n hatchArm.toggleFinger();\n }\n\n // extend/de-extend cargo hand\n if(driver2.pressed(driver2.Start))\n {\n cargoArm.toggleHand();\n }\n\n // button 7: L2\n // button 8: R2\n // L2 will reverse the finger\n // R2 will rotate it forward\n if(driver2.down(driver2.L1))\n {\n hatchArm.rotateFinger(1);\n }\n else\n {\n if(driver2.down(driver2.L2))\n {\n hatchArm.rotateFinger(-1);\n }\n else\n {\n hatchArm.rotateFinger(0);\n }\n }\n\n \n // button 5: L1\n // button 6: R1\n // L1 will move the hatch arm one way\n // R1 will move it the other way\n if(driver2.down(driver2.R1))\n {\n hatchArm.rotateArm(-1 * speedModifier);// * 0.75);\n }\n else\n {\n if(driver2.down(driver2.R2))\n {\n hatchArm.rotateArm(1 * speedModifier);// * 0.75);\n }\n else\n {\n hatchArm.rotateArm(0);\n }\n }\n\n \n // button 1: x\n // button 4: y\n // button 1 will move the ball arm one way\n // button 4 will move it the other way\n if(driver2.down(driver2.X))\n {\n //cargoArm.requestMove(-1 * speedModifier);\n cargoArm.rotateArm(-1);\n //cargoArm.solArmBrake.set(false);\n }\n else\n {\n if(driver2.down(driver2.Y))\n {\n //cargoArm.requestMove(2 * speedModifier);\n cargoArm.rotateArm(1);\n //cargoArm.solArmBrake.set(false);\n }\n else\n {\n //cargoArm.rotateArm(cargoArm.getArmCalculation());\n //cargoArm.solArmBrake.set(true);\n cargoArm.rotateArm(0);\n }\n }\n if(driver2.released(driver2.X) || driver2.released(driver2.Y))\n {\n //cargoArm.setArmTarget(cargoArm.currentPosition());\n //cargoArm.solArmBrake.set(true);\n cargoArm.rotateArm(0);\n }\n\n if(driver2.dpad(driver2.Up))\n {\n cargoArm.setArmUp();\n }\n if(driver2.dpad(driver2.Down))\n {\n cargoArm.setArmDown();\n }\n if(driver2.dpad(driver2.Left))\n {\n cargoArm.setArmMid();\n }\n if(driver2.dpad(driver2.Right))\n {\n cargoArm.setArmLow();\n }\n\n if(driver2.pressed(driver2.LThumb))\n {\n cargoArm.armLockEnabled = !cargoArm.armLockEnabled;\n \n }\n if(driver2.pressed(driver2.RThumb))\n {\n cargoArm.toggleBrake();\n }\n\n\n // allow move-to calculations to occur\n hatchArm.periodic();\n cargoArm.periodic();\n }",
"public void teleopPeriodic() {\n joystick1X = leftStick.getAxis(Joystick.AxisType.kX);\n joystick1Y = leftStick.getAxis(Joystick.AxisType.kY);\n joystick2X = rightStick.getAxis(Joystick.AxisType.kX);\n joystick2Y = rightStick.getAxis(Joystick.AxisType.kY);\n \n mapped1Y = joystick1Y/2 + 0.5;\n mapped1X = joystick1X/2 + 0.5;\n mapped2X = joystick2X/2 + 0.5;\n mapped2Y = joystick2Y/2 + 0.5;\n \n X1testServo.set(mapped1X);\n Y1testServo.set(mapped1Y);\n X2testServo.set(mapped2X);\n Y2testServo.set(mapped2Y);\n }",
"protected void initialize() {\n //drivetrain.initGyro();\n }",
"private static void configTalonSensors()\n {\n //Left Talon\n frontLeftTalon.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, 0, 5); //set encoder\n frontLeftTalon.setStatusFramePeriod(StatusFrame.Status_2_Feedback0, 5, 0); //Set the update rate\n\n //Right Talon\n frontRightTalon.configRemoteFeedbackFilter(frontLeftTalon.getDeviceID(), RemoteSensorSource.TalonSRX_SelectedSensor, 0, 0); //Config the right talon to look at the left talon as a sensor\n frontRightTalon.configRemoteFeedbackFilter(pigeon.getDeviceID(), RemoteSensorSource.GadgeteerPigeon_Yaw, 1, 0); //Config the right talon to use the navX (over CANifier) as a gyro sensor\n\n //Config the primary sensor of the right talon to be a sum sensor (to average the left/right sides, telling us the overall position/speed of the bot)\n frontRightTalon.configSensorTerm(SensorTerm.Sum0, FeedbackDevice.RemoteSensor0, 0); \n frontRightTalon.configSensorTerm(SensorTerm.Sum1, FeedbackDevice.CTRE_MagEncoder_Relative, 0);\n\n frontRightTalon.configSelectedFeedbackSensor(FeedbackDevice.SensorSum, 0, 0);\n frontRightTalon.configSelectedFeedbackCoefficient(0.5, 0, 0);\n\n // Configure NavX via CANifier or PigeonIMU\n frontRightTalon.configSelectedFeedbackSensor(FeedbackDevice.RemoteSensor1, 1, 0); //Set the secondary sensor of the right talon to be the navX (via CANifier) \n frontRightTalon.configSelectedFeedbackCoefficient((3600.0 / 8192.0), 1, 0);\n }",
"public interface RobotMap {\n\t// CAN Device IDs\n\n\tpublic static final int WINCH_TALON = 1;\n\t// winch motors\n\n\tpublic static final int LEFT_ALIGN_TALON = 3;\n\tpublic static final int RIGHT_ALIGN_TALON = 4;\n\t// allignment wheels\n\n\tpublic static final int REAR_RIGHT_TALON = 5;\n\tpublic static final int REAR_LEFT_TALON = 6;\n\tpublic static final int FRONT_RIGHT_TALON = 7;\n\tpublic static final int FRONT_LEFT_TALON = 8;\n\t// drivetrain wheels\n\n\tpublic static final int PCM_MAIN = 9;\n\n\t/******************\n ** PNEUMATICS ** \n ******************/ \n\tpublic static final int FLIPPER_RIGHT = 0;\n\tpublic static final int FLIPPER_LEFT = 1;\n\tpublic static final int ARMS_A = 2;\n\tpublic static final int ARMS_B = 3;\n\t// End Pneumatic Channels\n\n\t/******************\n **PID CONTROLLER** \n ******************/ \n public static final double ABS_TOL = 100;\n public static final double P = .4;\n public static final double I = .01;\n public static final double D = 11;\n public static final double OUT_RANGE_L = -0.8;\n public static final double OUT_RANGE_H = 0.8;\n\n}",
"@Override\n\tpublic void robotInit() {\n\t\tfr = new Spark(HardwareMap.PWM.DRIVE_FR);\n\t\tfl = new Spark(HardwareMap.PWM.DRIVE_FL);\n\t\tbr = new Spark(HardwareMap.PWM.DRIVE_BR);\n\t\tbl = new Spark(HardwareMap.PWM.DRIVE_BL);\n\t\t\n\t\t// Create the side modules\n\t\tleftGroup = new SpeedControllerGroup(bl, fl);\n\t\trightGroup = new SpeedControllerGroup(br, fr);\n\n\t\t// Init the the drive train\n\t\tdrive = new DifferentialDrive(leftGroup, rightGroup);\n\t\t\n\t\t//Init the gyro\n\t\tgyro.calibrate();\n\t\tSmartDashboard.putData(\"Gyro\", gyro);\n\t\t\n\t\tdrive.setSafetyEnabled(false);\n\t\tthis.setName(Subsystems.DRIVE);\n\t}",
"public static void init() {\n driveLeft = new VictorSP(1);\r\n LiveWindow.addActuator(\"Drive\", \"Left\", (VictorSP) driveLeft);\r\n \r\n driveRight = new VictorSP(0);\r\n LiveWindow.addActuator(\"Drive\", \"Right\", (VictorSP) driveRight);\r\n \r\n driveMotors = new RobotDrive(driveLeft, driveRight);\r\n \r\n driveMotors.setSafetyEnabled(false);\r\n driveMotors.setExpiration(0.1);\r\n driveMotors.setSensitivity(0.5);\r\n driveMotors.setMaxOutput(1.0);\r\n\r\n driveEncoderLeft = new Encoder(0, 1, true, EncodingType.k1X);\r\n LiveWindow.addSensor(\"Drive\", \"EncoderLeft\", driveEncoderLeft);\r\n driveEncoderLeft.setDistancePerPulse(0.053855829);\r\n driveEncoderLeft.setPIDSourceType(PIDSourceType.kRate);\r\n driveEncoderRight = new Encoder(2, 3, false, EncodingType.k1X);\r\n LiveWindow.addSensor(\"Drive\", \"EncoderRight\", driveEncoderRight);\r\n driveEncoderRight.setDistancePerPulse(0.053855829);\r\n driveEncoderRight.setPIDSourceType(PIDSourceType.kRate);\r\n driveFrontSonar = new Ultrasonic(4, 5);\r\n LiveWindow.addSensor(\"Drive\", \"FrontSonar\", driveFrontSonar);\r\n \r\n shooterMotor = new VictorSP(3);\r\n LiveWindow.addActuator(\"Shooter\", \"Motor\", (VictorSP) shooterMotor);\r\n \r\n climberMotor = new Spark(2);\r\n LiveWindow.addActuator(\"Climber\", \"Motor\", (Spark) climberMotor);\r\n \r\n gearGrabReleaseSolonoid = new DoubleSolenoid(0, 0, 1);\r\n LiveWindow.addActuator(\"Gear\", \"GrabReleaseSolonoid\", gearGrabReleaseSolonoid);\r\n \r\n powerPanel = new PowerDistributionPanel(0);\r\n LiveWindow.addSensor(\"Power\", \"Panel\", powerPanel);\r\n \r\n cameraMountpan = new Servo(4);\r\n LiveWindow.addActuator(\"CameraMount\", \"pan\", cameraMountpan);\r\n \r\n cameraMounttilt = new Servo(5);\r\n LiveWindow.addActuator(\"CameraMount\", \"tilt\", cameraMounttilt);\r\n \r\n\r\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\r\n\t\tdriveSonarFront = new SonarMB1010(0);\r\n\t\tLiveWindow.addSensor(\"Drive\", \"SonarFront\", driveSonarFront);\r\n\r\n\t\t//driveGyro = new GyroADXRS453();\r\n\t\tdriveGyro = new ADXRS450_Gyro();\r\n\t\tLiveWindow.addSensor(\"Drive\", \"Gyro\", driveGyro);\r\n\t\tdriveGyro.calibrate();\r\n\t}",
"@Override\n public void runOpMode() {\n telemetry.addData(\"Status\", \"Resetting Encoders\"); //\n telemetry.update();\n\n leftFront = hardwareMap.get(DcMotor.class, \"left_front\");\n rightFront = hardwareMap.get(DcMotor.class, \"right_front\");\n leftBack = hardwareMap.get(DcMotor.class, \"left_back\");\n rightBack = hardwareMap.get(DcMotor.class, \"right_back\");\n\n\n leftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n rightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n leftBack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n rightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n right = hardwareMap.get(Servo.class, \"right\");\n left = hardwareMap.get(Servo.class, \"left\");\n // Most robots need the motor on one side to be reversed to drive forward\n // Reverse the motor that runs backwards when connected directly to the battery\n leftFront.setDirection(DcMotor.Direction.REVERSE);\n rightFront.setDirection(DcMotor.Direction.FORWARD);\n leftBack.setDirection(DcMotor.Direction.REVERSE);\n rightBack.setDirection(DcMotor.Direction.FORWARD);\n\n leftFront.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n leftBack.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rightFront.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rightBack.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n digitalTouch = hardwareMap.get(DigitalChannel.class, \"sensor_digital\");\n digitalTouch.setMode(DigitalChannel.Mode.INPUT);\n\n right.setDirection(Servo.Direction.REVERSE);\n\n right.scaleRange(0, 0.25);\n left.scaleRange(0.7, 1);\n\n\n // Wait for the game to start (driver presses PLAY)\n waitForStart();\n\n\n servo(0);\n runtime.reset();\n encoderSideways(0.25, -5, -5, 5);\n // drive until touch sensor pressed\n // activate servos to grab platform\n // drive backwards for a while\n // release servos\n // sideways part\n // remember to do red autonomous for repackage org.firstinspires.ftc.teamcode;\n }",
"@Override\n public void init() {\n /* Initialize the hardware variables.\n * The init() method of the hardware class does all the work here\n */\n robot.init(hardwareMap);\n\n robot.leftDriveMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot.rightDriveMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n // Possibly add a delay\n robot.leftDriveMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n robot.rightDriveMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n }",
"@Override\n public void teleopInit() {\n /* factory default values */\n _talonL1.configFactoryDefault();\n _talonL2.configFactoryDefault();\n _talonR1.configFactoryDefault();\n _talonR2.configFactoryDefault();\n\n /* flip values so robot moves forward when stick-forward/LEDs-green */\n _talonL1.setInverted(true); // <<<<<< Adjust this\n _talonL2.setInverted(true); // <<<<<< Adjust this\n _talonR1.setInverted(true); // <<<<<< Adjust this\n _talonR2.setInverted(true); // <<<<<< Adjust this\n\n\n /*\n * WPI drivetrain classes defaultly assume left and right are opposite. call\n * this so we can apply + to both sides when moving forward. DO NOT CHANGE\n */\n _drive.setRightSideInverted(true);\n }",
"@Override\n public void initialize() {\n m_drive.resetGyro();// first call\n m_drive.resetEncoders();\n m_drive.lockMotors();\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}",
"@Override\n public void init() {\n touchSensor1 = hardwareMap.touchSensor.get(\"touchSensor1\");\n lightSensor1 = hardwareMap.lightSensor.get(\"lightSensor1\");\n motorLeft1 = hardwareMap.dcMotor.get(\"motorLeft1\");\n motorLeft2 = hardwareMap.dcMotor.get(\"motorLeft2\");\n motorRight1 = hardwareMap.dcMotor.get(\"motorRight1\");\n motorRight2 = hardwareMap.dcMotor.get(\"motorRight2\");\n\n //Setup Hardware\n motorLeft1.setDirection(DcMotor.Direction.REVERSE);\n motorLeft2.setDirection(DcMotor.Direction.REVERSE);\n\n // Set up the parameters with which we will use our IMU. Note that integration\n // algorithm here just reports accelerations to the logcat log; it doesn't actually\n // provide positional information.\n BNO055IMU.Parameters parameters = new BNO055IMU.Parameters();\n parameters.angleUnit = BNO055IMU.AngleUnit.DEGREES;\n parameters.accelUnit = BNO055IMU.AccelUnit.METERS_PERSEC_PERSEC;\n parameters.calibrationDataFile = \"AdafruitIMUCalibration.json\"; // see the calibration sample opmode\n parameters.loggingEnabled = true;\n parameters.loggingTag = \"IMU\";\n // parameters.accelerationIntegrationAlgorithm = new JustLoggingAccelerationIntegrator();\n\n // Retrieve and initialize the IMU. We expect the IMU to be attached to an I2C port\n // on a Core Device Interface Module, configured to be a sensor of type \"AdaFruit IMU\",\n // and named \"imu\".\n imu = hardwareMap.get(BNO055IMU.class, \"imu\");\n imu.initialize(parameters);\n\n currentState = MotorState.WAIT_TO_START;\n nextState = MotorState.WAIT_TO_START;\n count = 0;\n composeTelemetry();\n }",
"public interface Gyro {\n /**\n * Get the amount of time the gyro spends calibrating\n *\n * @return Length of gyro calibration period\n */\n double getCalibrationPeriod();\n\n /**\n * Set the amount of time the gyro will spend calibrating\n *\n * @param calibrationPeriod Desired length of gyro calibration period\n */\n void setCalibrationPeriod(double calibrationPeriod);\n\n /**\n * Reset calibration and angle monitoring\n */\n void fullReset();\n\n /**\n * Starts calibrating the gyro. Resets the calibration value and begins\n * sampling gyro values to get the average 0 value. Sample time determined\n * by calibrationTicks\n */\n void startCalibration();\n\n /**\n * Finishes calibration. Stops calibrating and sets the calibration value.\n */\n void finishCalibration();\n\n /**\n * Gets the zero point for rate measurement\n *\n * @return The offset found by calibration\n */\n double getCalibrationOffset();\n\n /**\n * Checks if the gyro is currently calibrating.\n * If it is, measured rate and angle values are not guaranteed to be accurate.\n *\n * @return Whether the gyro is currently calibrating\n */\n boolean isCalibrating();\n\n /**\n * Gets the rate of yaw change from the gyro\n *\n * @return The rate of yaw change in degrees per second, positive is clockwise\n */\n double getRate();\n\n /**\n * Gets the yaw of the gyro\n *\n * @return The yaw of the gyro in degrees\n */\n double getAngle();\n\n /**\n * Resets the current angle of the gyro to zero\n */\n void resetAngle();\n}",
"private void initSensors() {\n\t\t\n\t\tmSsorManager = (SensorManager) mContext.getSystemService(Context.SENSOR_SERVICE);\n\t\t\n\t\t\n\t\tif(!(hasLSsor = SensorTool.hasSensor(mSsorManager, Sensor.TYPE_LIGHT))) {\n\t\t\tmtvLssor.setText(mContext.getString(R.string.tv_lssor_not_available));\n\t\t} else {\n\t\t\tlssor = mSsorManager.getDefaultSensor(Sensor.TYPE_LIGHT);\n\t\t\t// set Pass button unClickable\n\t\t}\n\t\t\n\t}",
"private void initializeMap() {\n FLMotor = hardwareMap.get(DcMotor.class, \"FLMotor\");\n FRMotor = hardwareMap.get(DcMotor.class, \"FRMotor\");\n BLMotor = hardwareMap.get(DcMotor.class, \"BLMotor\");\n BRMotor = hardwareMap.get(DcMotor.class, \"BRMotor\");\n //ods = hardwareMap.get(OpticalDistanceSensor.class, \"ods\");\n //color = hardwareMap.get(ColorSensor.class, \"color\");\n //touch = hardwareMap.get(TouchSensor.class, \"touch\");\n gyro = hardwareMap.get(GyroSensor.class, \"gyro\");\n\n // Most robots need the motor on one side to be reversed to drive forward\n // Reverse the motor that runs backwards when connected directly to the battery\n BRMotor.setDirection(DcMotorSimple.Direction.FORWARD);\n BLMotor.setDirection(DcMotorSimple.Direction.REVERSE);\n FRMotor.setDirection(DcMotorSimple.Direction.FORWARD);\n FLMotor.setDirection(DcMotorSimple.Direction.REVERSE);\n }",
"public void init(HardwareMap ahwMap) {\n // Save reference to Hardware map\n hwMap = ahwMap;\n\n // Define and Initialize Motors\n try {\n leftMotor1 = hwMap.dcMotor.get(\"right_motor1\");\n leftMotor2 = hwMap.dcMotor.get(\"right_motor2\");\n rightMotor1 = hwMap.dcMotor.get(\"left_motor1\");\n rightMotor2 = hwMap.dcMotor.get(\"left_motor2\");\n //servo_one = hwMap.servo.get(\"servant\");\n leftMotor1.setDirection(DcMotor.Direction.REVERSE); // Set to REVERSE if using AndyMark motors\n leftMotor2.setDirection(DcMotor.Direction.REVERSE); // Set to REVERSE if using AndyMark motors\n rightMotor1.setDirection(DcMotor.Direction.FORWARD);// Set to FORWARD if using AndyMark motors\n rightMotor2.setDirection(DcMotor.Direction.FORWARD);// Set to FORWARD if using AndyMark motors\n\n // Set all motors to zero power\n leftMotor1.setPower(0);\n rightMotor1.setPower(0);\n leftMotor2.setPower(0);\n rightMotor2.setPower(0);\n\n // Set all motors to run without encoders.\n // May want to use RUN_USING_ENCODERS if encoders are installed.\n leftMotor1.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n rightMotor1.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n leftMotor2.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n rightMotor2.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n // Enable NavX Sensor\n\n navx_device = AHRS.getInstance(hwMap.deviceInterfaceModule.get(\"DIM1\"),\n NAVX_DIM_I2C_PORT,\n AHRS.DeviceDataType.kProcessedData,\n NAVX_DEVICE_UPDATE_RATE_HZ);\n } catch (Exception e) {\n\n RobotLog.ee(MESSAGETAG,e.getMessage());\n\n }\n }",
"public void teleopPeriodic() {\r\n //Driving\r\n if (driveChooser.getSelected().equals(\"tank\")){\r\n if (joystickChooser.getSelected().equals(\"two\")){\r\n drive.tankDrive(leftJoystick.getY(), rightJoystick.getY());\r\n } \r\n else {\r\n drive.tankDrive(manipulator.getY(), manipulator.getThrottle());\r\n }\r\n }\r\n if (driveChooser.getSelected().equals(\"arcade1\")){\r\n if (joystickChooser.getSelected().equals(\"two\")){\r\n drive.arcadeDrive(leftJoystick.getY(), leftJoystick.getX());\r\n } \r\n else {\r\n drive.arcadeDrive(manipulator.getY(), manipulator.getX());\r\n }\r\n }\r\n if (driveChooser.getSelected().equals(\"arcade2\")){\r\n if (joystickChooser.getSelected().equals(\"two\")){\r\n drive.arcadeDrive(leftJoystick.getY(), rightJoystick.getX());\r\n }\r\n else{\r\n drive.arcadeDrive(manipulator.getY(), manipulator.getTwist());\r\n }\r\n }\r\n \r\n //Shooting\r\n if (shootButton1.get()||shootButton2.get()){\r\n frontShooter.set(-1);\r\n backShooter.set(1);\r\n }\r\n else{\r\n frontShooter.set(0);\r\n backShooter.set(0); \r\n }\r\n if (transportButton1.get()||transportButton2.get()){\r\n transport.set(-1);\r\n }\r\n else{\r\n transport.set(0); \r\n }\r\n \r\n //Intake\r\n if (intakeButton1.get()||intakeButton2.get()){\r\n //intakeA.set(-1);BROKEN\r\n intakeB.set(-1);\r\n }\r\n else{\r\n intakeA.set(0);\r\n intakeB.set(0); \r\n }\r\n \r\n //Turret\r\n if (toggleTurretButton.get()){\r\n turret.set(leftJoystick.getX());\r\n }\r\n else{\r\n turret.set(manipulator.getX());\r\n }\r\n }",
"@Override\n public void periodic() {\n\t\t// myDrive.\n\n\t\t// System.out.println(Robot.m_oi.getSpeed());\n\t\t// SmartDashboard.putNumber(\"Dial Output: \", Robot.m_oi.getSpeed());\n\n\t\t// //Wheel Speed Limits\n\n\t\t// SmartDashboard.putNumber(\"Front Left Percent\", myDrive.getFLSpeed());\n\t\t// SmartDashboard.putNumber(\"Front Right Percent\", myDrive.getFRSpeed());\n\t\t// SmartDashboard.putNumber(\"Rear Left Percent\", myDrive.getRLSpeed());\n\t\t// SmartDashboard.putNumber(\"Rear Right Percent\", myDrive.getRRSpeed());\n\n\t\t//Test Code for Selecting Calibration Motor \n\t\t//***COMMENT OUT BEFORE REAL GAME USE***\n\t\t// if (Robot.m_oi.getArmDown()) {\n\t\t// \t// System.out.println(\"Front Left Wheel Selected\");\n\t\t// \tWheel = 1;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getArmUp()) {\n\t\t// \t// System.out.println(\"Back Left Wheel Selected\");\n\t\t// \tWheel = 2;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getBallIn()) {\n\t\t// \t// System.out.println(\"Front Right Wheel Selected\");\n\t\t// \tWheel = 3;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getBallOut()) {\n\t\t// \t// System.out.println(\"Back Right Wheel Selected\");\n\t\t// \tWheel = 4;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t\t\n\t\t// } else if (Robot.m_oi.getBlueButton()) {\n\t\t// \t// System.out.println(\"Back Right Wheel Selected\");\n\t\t// \tWheel = 0;\n\t\t// \tSmartDashboard.putNumber(\"Wheel Selected: \", Wheel);\n\t\t// } \n\n\t\t// if (Wheel == 1) {\n\n\t\t// \tmyDrive.setFLSpeed(Robot.m_oi.getSpeed());\n\n\t\t// } else if (Wheel == 2) {\n\n\t\t// \tmyDrive.setRLSpeed(Robot.m_oi.getSpeed());\n\n\t\t// } else if (Wheel == 3) {\n\n\t\t// \tmyDrive.setFRSpeed(Robot.m_oi.getSpeed());\n\n\t\t// } else if (Wheel == 4) {\n\n\t\t// \tmyDrive.setRRSpeed(Robot.m_oi.getSpeed());\n\n\t\t// }\n\n\t\t// if (Robot.m_oi.getSafety()) {\n\n\t\t// \tspeedLimit = 1.0;\n\t\t// \tstrafeLimit = 1.0;\n\n\t\t// } else {\n\n\t\t// \tspeedLimit = 0.5; \n\t\t// \tstrafeLimit = 0.8;\n\t\t\t\t\n\t\t// }\n\n\n\n\t\t//System.out.print (\"strafeLimit: \" + strafeLimit);\n\t\t//System.out.println(Robot.m_oi.getX() * strafeLimit);\n\n\t\t// myDrive.driveCartesian(\n\t\t// \t(Robot.m_oi.getY() * speedLimit), // set Y speed\n\t\t// \t(Robot.m_oi.getX() * strafeLimit), // set X speed\n\t\t// \t(Robot.m_oi.getRotate() * rotateLimit), // set rotation rate\n\t\t// \t0); // gyro angle \n\t\t\n\t\t//TODO: Rotate robot with vision tracking, set up curve to slow down as target approaches center.\n\t\t// if (Robot.m_oi.getStartButton()) {\n\t\t// \tmyDrive.driveCartesian(\n\t\t// \t\t (0.4), // set Rotation\n\t\t// \t\t (0.0), // set Strafe\n\t\t// \t\t (0.0), // set Forward/Back\n\t\t// \t\t 0);\n\t\t// } else {\n\t\tmyDrive.driveCartesian(\n\t\t\t(Robot.m_oi.getY() * rotateLimit), // set Y speed\n\t\t\t(Robot.m_oi.getX() * strafeLimit), // set X speed\n\t\t\t(Robot.m_oi.getRotate() * speedLimit), // set rotation rate\n\t\t\t0);\n\t\t// }\n\t\t// myDrive.driveCartesian(\n\t\t// \t(Robot.m_oi.getY()), // set Y speed\n\t\t// \t(Robot.m_oi.getX()), // set X speed\n\t\t// \t(Robot.m_oi.getRotate()), // set rotation rate\n\t\t// \t0); \n\n }",
"public void teleopInit() {\n if (autonomousCommand != null) \n autonomousCommand.cancel();\n\n // RobotMap.enableUltrasonicTrigger(false);\n driveTrain.configForTeleopMode();\n }",
"@Override public void init_loop() {\n if (gyro.isCalibrated()) {\n telemetry.addData(\"Gyro\", \"Calibrated\");\n }\n\n /** Place any code that should repeatedly run after INIT is pressed but before the op mode starts here. **/\n }",
"@Override\n public void robotPeriodic() {\n\n enabledCompr = pressBoy.enabled();\n //pressureSwitch = pressBoy.getPressureSwitchValue();\n currentCompr = pressBoy.getCompressorCurrent();\n //SmartDashboard.putBoolean(\"Pneumatics Loop Enable\", closedLoopCont);\n SmartDashboard.putBoolean(\"Compressor Status\", enabledCompr);\n //SmartDashboard.putBoolean(\"Pressure Switch\", pressureSwitch);\n SmartDashboard.putNumber(\"Compressor Current\", currentCompr);\n }",
"@Override\n public void init() {\n /* Initialize the hardware variables.\n * The init() method of the hardware class does all the work here\n */\n robot.init(hardwareMap);\n\n //ColorSensor colorSensor;\n //colorSensor = hardwareMap.get(ColorSensor.class, \"Sensor_Color\");\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n }",
"public boolean setup() {\n\t\tmakeStream(EVENT, EVENT_BUFFER_SIZE);\n\t\t\n\t\tmakeStream(BAROMETER, BAROMETER_BUFFER_SIZE);\n\t\trocket.barometer.setListener(new MS5611.MS5611Listener() {\n\t\t\t@Override\n\t\t\tpublic void onData(int P /* mbar */, int TEMP /* C */) {\n\t\t\t\tif (enabled) {\n\t\t\t\t\tDataOutputStream stream = out.get(BAROMETER);\n\t\t\t\t\t\n\t\t\t\t\tif (stream == null) {\n\t\t\t\t\t\tApp.log.e(App.TAG, \"Output stream not available for \" + BAROMETER + \".\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tstream.writeFloat(App.elapsedTime());\n\t\t\t\t\t\t\tstream.writeInt(P);\n\t\t\t\t\t\t\tstream.writeInt(TEMP);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\tApp.log.e(App.TAG, \"Failed to write \" + BAROMETER + \" values to output stream.\");\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\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 onError(String message) {}\n\t\t});\n\t\t\n//\t\tmakeStream(GYRO, GYRO_BUFFER_SIZE);\n//\t\trocket.gyro.setListener(new ITG3205.ITG3205Listener() {\n//\t\t\t@Override\n//\t\t\tpublic void onDeviceId(byte deviceId) {}\n//\t\t\t\n//\t\t\t@Override\n//\t\t\tpublic void onData(int x, int y, int z, int temperature) {\n//\t\t\t\tif (enabled) {\n//\t\t\t\t\tDataOutputStream stream = out.get(GYRO);\n//\t\t\t\t\t\n//\t\t\t\t\tif (stream == null) {\n//\t\t\t\t\t\tApp.log.e(App.TAG, \"Output stream not available for \" + GYRO + \".\");\n//\t\t\t\t\t} else {\n//\t\t\t\t\t\ttry {\n//\t\t\t\t\t\t\tstream.writeFloat(App.elapsedTime());\n//\t\t\t\t\t\t\tstream.writeInt(x);\n//\t\t\t\t\t\t\tstream.writeInt(y);\n//\t\t\t\t\t\t\tstream.writeInt(z);\n//\t\t\t\t\t\t\tstream.writeInt(temperature);\n//\t\t\t\t\t\t} catch (IOException e) {\n//\t\t\t\t\t\t\tApp.log.e(App.TAG, \"Failed to write \" + GYRO + \" values to output stream.\");\n//\t\t\t\t\t\t\te.printStackTrace();\n//\t\t\t\t\t\t\treturn;\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\t\n//\t\t\t@Override\n//\t\t\tpublic void onError(String message) {}\n//\t\t});\n\t\t\n\t\tmakeStream(LOX_PRESSURE, PRESSURE_BUFFER_SIZE);\n\t\trocket.loxPressure.setListener(new P51500AA1365V.P51500AA1365VListener() {\n\t\t\t@Override\n\t\t\tpublic void onVoltage(float voltage) {\n\t\t\t\tif (enabled) {\n\t\t\t\t\tDataOutputStream stream = out.get(LOX_PRESSURE);\n\t\t\t\t\t\n\t\t\t\t\tif (stream == null) {\n\t\t\t\t\t\tApp.log.e(App.TAG, \"Output stream not available for \" + LOX_PRESSURE + \".\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tstream.writeFloat(App.elapsedTime());\n\t\t\t\t\t\t\tstream.writeFloat(voltage);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\tApp.log.e(App.TAG, \"Failed to write \" + LOX_PRESSURE + \" values to output stream.\");\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\treturn;\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\t\n\t\tmakeStream(ETHANOL_PRESSURE, PRESSURE_BUFFER_SIZE);\n\t\trocket.ethanolPressure.setListener(new P51500AA1365V.P51500AA1365VListener() {\n\t\t\t@Override\n\t\t\tpublic void onVoltage(float voltage) {\n\t\t\t\tif (enabled) {\n\t\t\t\t\tDataOutputStream stream = out.get(ETHANOL_PRESSURE);\n\t\t\t\t\t\n\t\t\t\t\tif (stream == null) {\n\t\t\t\t\t\tApp.log.e(App.TAG, \"Output stream not available for \" + ETHANOL_PRESSURE + \".\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tstream.writeFloat(App.elapsedTime());\n\t\t\t\t\t\t\tstream.writeFloat(voltage);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\tApp.log.e(App.TAG, \"Failed to write \" + ETHANOL_PRESSURE + \" values to output stream.\");\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\treturn;\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\t\n\t\tmakeStream(ENGINE_PRESSURE, PRESSURE_BUFFER_SIZE);\n\t\trocket.enginePressure.setListener(new P51500AA1365V.P51500AA1365VListener() {\n\t\t\t@Override\n\t\t\tpublic void onVoltage(float voltage) {\n\t\t\t\tif (enabled) {\n\t\t\t\t\tDataOutputStream stream = out.get(ENGINE_PRESSURE);\n\t\t\t\t\t\n\t\t\t\t\tif (stream == null) {\n\t\t\t\t\t\tApp.log.e(App.TAG, \"Output stream not available for \" + ENGINE_PRESSURE + \".\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tstream.writeFloat(App.elapsedTime());\n\t\t\t\t\t\t\tstream.writeFloat(voltage);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\tApp.log.e(App.TAG, \"Failed to write \" + ENGINE_PRESSURE + \" values to output stream.\");\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\treturn;\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\t\n\t\tmakeStream(ACCELEROMETER, ACCELEROMETER_BUFFER_SIZE);\n\t\trocket.accelerometer.setListener(new ADXL345.ADXL345Listener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onDeviceId(byte deviceId) {}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onMultiplier(float multiplier) {\n\t\t\t\tbyte[] data = new byte[4];\n\t\t\t\tByteBuffer.wrap(data).putFloat(multiplier);\n\t\t\t\tevent(Event.ACCELEROMETER_MULTIPLIER, data);\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onData(int x, int y, int z) {\n\t\t\t\tif (enabled) {\n\t\t\t\t\tDataOutputStream stream = out.get(ACCELEROMETER);\n\t\t\t\t\t\n\t\t\t\t\tif (stream == null) {\n\t\t\t\t\t\tApp.log.e(App.TAG, \"Output stream not available for \" + ACCELEROMETER + \".\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tstream.writeFloat(App.elapsedTime());\n\t\t\t\t\t\t\tstream.writeInt(x);\n\t\t\t\t\t\t\tstream.writeInt(y);\n\t\t\t\t\t\t\tstream.writeInt(z);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\tApp.log.e(App.TAG, \"Failed to write \" + ACCELEROMETER + \" values to output stream.\");\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onError(String message) {}\n\t\t\t\n\t\t});\n\t\t\n\t\tmakeStream(INTERNAL_ACCELEROMETER, ACCELEROMETER_BUFFER_SIZE);\n\t\trocket.internalAccelerometer.setListener(new PhoneAccelerometer.PhoneAccelerometerListener() {\n\t\t\t@Override\n\t\t\tpublic void onPhoneAccelerometer(float x, float y, float z) {\n\t\t\t\tif (enabled) {\n\t\t\t\t\tDataOutputStream stream = out.get(INTERNAL_ACCELEROMETER);\n\t\t\t\t\t\n\t\t\t\t\tif (stream == null) {\n\t\t\t\t\t\tApp.log.e(App.TAG, \"Output stream not available for \" + INTERNAL_ACCELEROMETER + \".\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tstream.writeFloat(App.elapsedTime());\n\t\t\t\t\t\t\tstream.writeFloat(x);\n\t\t\t\t\t\t\tstream.writeFloat(y);\n\t\t\t\t\t\t\tstream.writeFloat(z);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\tApp.log.e(App.TAG, \"Failed to write \" + INTERNAL_ACCELEROMETER + \" values to output stream.\");\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\treturn;\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\t\n\t\tmakeStream(LOX_TEMPERATURE, TEMPERATURE_BUFFER_SIZE);\n\t\trocket.loxTemperature.setListener(new MAX31855.MAX31855Listener() {\n\t\t\t@Override\n\t\t\tpublic void onFault(byte fault) {}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onData(float internal, float thermocouple) {\n\t\t\t\tif (enabled) {\n\t\t\t\t\tDataOutputStream stream = out.get(LOX_TEMPERATURE);\n\t\t\t\t\t\n\t\t\t\t\tif (stream == null) {\n\t\t\t\t\t\tApp.log.e(App.TAG, \"Output stream not available for \" + LOX_TEMPERATURE + \".\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tstream.writeFloat(App.elapsedTime());\n\t\t\t\t\t\t\tstream.writeFloat(internal);\n\t\t\t\t\t\t\tstream.writeFloat(thermocouple);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\tApp.log.e(App.TAG, \"Failed to write \" + LOX_TEMPERATURE + \" values to output stream.\");\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\treturn;\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\t\n\t\tmakeStream(IGNITOR_TEMPERATURE, TEMPERATURE_BUFFER_SIZE);\n\t\trocket.ignitorTemperature.setListener(new MAX31855.MAX31855Listener() {\n\t\t\t@Override\n\t\t\tpublic void onFault(byte fault) {}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onData(float internal, float thermocouple) {\n\t\t\t\tif (enabled) {\n\t\t\t\t\tDataOutputStream stream = out.get(IGNITOR_TEMPERATURE);\n\t\t\t\t\t\n\t\t\t\t\tif (stream == null) {\n\t\t\t\t\t\tApp.log.e(App.TAG, \"Output stream not available for \" + IGNITOR_TEMPERATURE + \".\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tstream.writeFloat(App.elapsedTime());\n\t\t\t\t\t\t\tstream.writeFloat(internal);\n\t\t\t\t\t\t\tstream.writeFloat(thermocouple);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\tApp.log.e(App.TAG, \"Failed to write \" + IGNITOR_TEMPERATURE + \" values to output stream.\");\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\treturn;\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\t\n\t\treturn true;\n\t}",
"public void init(HardwareMap hwMap) {\r\n\r\n //DRIVE//\r\n front_left = hwMap.dcMotor.get(\"front_left\");\r\n front_right = hwMap.dcMotor.get(\"front_right\");\r\n back_left = hwMap.dcMotor.get(\"back_left\");\r\n back_right = hwMap.dcMotor.get(\"back_right\");\r\n\r\n hook = hwMap.dcMotor.get(\"hook\");\r\n\r\n //intake1 = hwMap.servo.get(\"intake1\");\r\n //intake2 = hwMap.servo.get(\"intake2\");\r\n //intake3 = hwMap.servo.get(\"intake3\");\r\n //intake4 = hwMap.servo.get(\"intake4\");\r\n\r\n phone = hwMap.servo.get(\"phone\");\r\n marker = hwMap.servo.get(\"marker\");\r\n\r\n //linSlide1 = hwMap.dcMotor.get(\"lin_slide1\");\r\n //linSlide2 = hwMap.dcMotor.get(\"lin_slide2\");\r\n\r\n //arm_motor_1 = hwMap.dcMotor.get(\"arm1\");\r\n //arm_motor_2 = hwMap.dcMotor.get(\"arm2\");\r\n\r\n\r\n front_left.setDirection(DcMotor.Direction.FORWARD);\r\n front_right.setDirection(DcMotor.Direction.FORWARD);\r\n back_left.setDirection(DcMotor.Direction.REVERSE);\r\n back_right.setDirection(DcMotor.Direction.REVERSE);\r\n\r\n /* front_left.setMode(DcMotor.RunMode.RUN_TO_POSITION);\r\n front_right.setMode(DcMotor.RunMode.RUN_TO_POSITION);\r\n back_left.setMode(DcMotor.RunMode.RUN_TO_POSITION);\r\n back_right.setMode(DcMotor.RunMode.RUN_TO_POSITION);\r\n */\r\n hook.setDirection(DcMotor.Direction.FORWARD);\r\n\r\n //linSlide1.setDirection(DcMotor.Direction.FORWARD);\r\n //linSlide1.setDirection(DcMotor.Direction.REVERSE);\r\n\r\n //arm_motor_1.setDirection(DcMotor.Direction.FORWARD);\r\n //arm_motor_2.setDirection(DcMotor.Direction.REVERSE);\r\n\r\n front_left.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n front_right.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n back_left.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n back_right.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n\r\n //encoder1 = hwMap.analogInput.get(\"encoder1\");\r\n //encoder2 = hwMap.analogInput.get(\"encoder2\");\r\n\r\n imu = hwMap.get(BNO055IMU.class, \"imu\");\r\n }",
"@Override\n public void robotInit() {\n m_oi = new OI();\n m_chooser.setDefaultOption(\"Default Auto\", new ExampleCommand());\n // chooser.addOption(\"My Auto\", new MyAutoCommand());\n SmartDashboard.putData(\"Auto mode\", m_chooser);\n\n Comp = new Compressor();\n\n //ClimbBack = new DoubleSolenoid(PCM_COMP_24V, 0, 1);\n //ClimbFront = new DoubleSolenoid(PCM_COMP_24V, 2, 3);\n LegFrontL = new VictorSPX(30);\n LegFrontR = new Spark(9);\n LegBackL = new VictorSPX(31);\n LegBackR = new VictorSPX(32);\n\n BackFootMover = new VictorSP(1);\n FrontFootMover = new Spark(2);\n //FeetMovers = new SpeedControllerGroup(BackFootMoverFootMover);\n\n MainRight = new CANSparkMax(9, MotorType.kBrushless);\n AltRight = new CANSparkMax(10, MotorType.kBrushless);\n MainLeft = new CANSparkMax(11, MotorType.kBrushless);\n AltLeft = new CANSparkMax(12, MotorType.kBrushless);\n\n MainRight.setIdleMode(IdleMode.kCoast);\n AltRight.setIdleMode(IdleMode.kCoast);\n MainLeft.setIdleMode(IdleMode.kCoast);\n AltLeft.setIdleMode(IdleMode.kCoast);\n\n AltLeft.follow(MainLeft);\n AltRight.follow(MainRight);\n\n Drive = new DifferentialDrive(MainLeft, MainRight);\n\n Lifter = new TalonSRX(6);\n Lifter.setNeutralMode(NeutralMode.Brake);\n Lifter.enableCurrentLimit(false);\n /*Lifter.configContinuousCurrentLimit(40);\n Lifter.configPeakCurrentLimit(50);\n Lifter.configPeakCurrentDuration(1500);*/\n //Lifter.configReverseSoftLimitEnable(true);\n //Lifter.configReverseSoftLimitThreshold(-27000);\n //Lifter.configForwardLimitSwitchSource(LimitSwitchSource.FeedbackConnector, LimitSwitchNormal.NormallyOpen);\n //Lifter.configClearPositionOnLimitF(true, 0);\n Lifter.selectProfileSlot(0, 0);\n LiftSetpoint = 0;\n\n LiftFollower = new TalonSRX(5);\n LiftFollower.follow(Lifter);\n LiftFollower.setNeutralMode(NeutralMode.Brake);\n\n ArmExtender = new Solenoid(0);\n ArmOpener = new Solenoid(1);\n ArmGrippers = new Spark(0);\n\n HatchSwitch0 = new DigitalInput(0);\n HatchSwitch1 = new DigitalInput(1);\n\n Accel = new BuiltInAccelerometer(Range.k2G);\n\n //Diagnostics = new DiagnosticsLogger();\n // Uncomment this line to enable diagnostics. Warning: this may\n // cause the robot to be slower than it is supposed to be because of lag.\n //Diagnostics.start();\n\n xbox = new XboxController(0);\n joystick = new Joystick(1);\n \n LiftRamp = new SRamp();\n SpeedRamp = new SRamp();\n\n NetworkTableInstance nt = NetworkTableInstance.getDefault();\n\n VisionTable = nt.getTable(\"ChickenVision\");\n TapeDetectedEntry = VisionTable.getEntry(\"tapeDetected\");\n TapePitchEntry = VisionTable.getEntry(\"tapePitch\");\n TapeYawEntry = VisionTable.getEntry(\"tapeYaw\");\n\n LedTable = nt.getTable(\"LedInfo\");\n LedScript = LedTable.getEntry(\"CurrentScript\");\n LedScriptArgument = LedTable.getEntry(\"ScriptArgument\");\n LedArmsClosed = LedTable.getEntry(\"ArmsClosed\");\n\n UsbCamera cam = CameraServer.getInstance().startAutomaticCapture();\n cam.setPixelFormat(PixelFormat.kMJPEG);\n cam.setResolution(320, 240);\n cam.setFPS(15);\n \n\n LedScript.setString(\"ColorWaves\");\n LedScriptArgument.setString(\"\");\n\n limits = new DigitalInput[8];\n\n for (int i = 0; i < limits.length; i++) {\n limits[i] = new DigitalInput(i + 2);\n }\n }",
"public static final void control(float args_cmd_forward, float args_cmd_turn,\r\n\t\t\tfloat args_gyro, float args_gyro_offset, float args_theta_m_l,\r\n\t\t\tfloat args_theta_m_r, float args_battery) {\r\n\t\tfloat tmp_theta;\r\n\t\tfloat tmp_theta_lpf;\r\n\t\tfloat tmp_pwm_r_limiter;\r\n\t\tfloat tmp_psidot;\r\n\t\tfloat tmp_pwm_turn;\r\n\t\tfloat tmp_pwm_l_limiter;\r\n\t\tfloat tmp_thetadot_cmd_lpf;\r\n\t\tint tmp_0;\r\n\r\n\t\t/*\r\n\t\t * Sum: '<S8>/Sum' incorporates: Constant: '<S3>/Constant6' Constant:\r\n\t\t * '<S8>/Constant' Constant: '<S8>/Constant1' Gain: '<S3>/Gain1' Gain:\r\n\t\t * '<S8>/Gain2' Inport: '<Root>/cmd_forward' Product: '<S3>/Divide'\r\n\t\t * Product: '<S8>/Product' Sum: '<S8>/Sum1' UnitDelay: '<S8>/Unit Delay'\r\n\t\t */\r\n\t\ttmp_thetadot_cmd_lpf = (((args_cmd_forward / CMD_MAX) * K_THETADOT) * (1.0F - A_R))\r\n\t\t\t\t+ (A_R * ud_thetadot_cmd_lpf);\r\n\r\n\t\t/*\r\n\t\t * Gain: '<S4>/Gain' incorporates: Gain: '<S4>/deg2rad' Gain:\r\n\t\t * '<S4>/deg2rad1' Inport: '<Root>/theta_m_l' Inport: '<Root>/theta_m_r'\r\n\t\t * Sum: '<S4>/Sum1' Sum: '<S4>/Sum4' Sum: '<S4>/Sum6' UnitDelay:\r\n\t\t * '<S10>/Unit Delay'\r\n\t\t */\r\n\t\ttmp_theta = (((DEG2RAD * args_theta_m_l) + ud_psi) + ((DEG2RAD * args_theta_m_r) + ud_psi)) * 0.5F;\r\n\r\n\t\t/*\r\n\t\t * Sum: '<S11>/Sum' incorporates: Constant: '<S11>/Constant' Constant:\r\n\t\t * '<S11>/Constant1' Gain: '<S11>/Gain2' Product: '<S11>/Product' Sum:\r\n\t\t * '<S11>/Sum1' UnitDelay: '<S11>/Unit Delay'\r\n\t\t */\r\n\t\ttmp_theta_lpf = ((1.0F - A_D) * tmp_theta) + (A_D * ud_theta_lpf);\r\n\r\n\t\t/*\r\n\t\t * Gain: '<S4>/deg2rad2' incorporates: Inport: '<Root>/gyro'\r\n\t\t * Sum: '<S4>/Sum2'\r\n\t\t */\r\n\t\ttmp_psidot = (args_gyro - args_gyro_offset) * DEG2RAD;\r\n\r\n\t\t/*\r\n\t\t * Gain: '<S2>/Gain' incorporates: Constant: '<S3>/Constant2' Constant:\r\n\t\t * '<S3>/Constant3' Constant: '<S6>/Constant' Constant: '<S9>/Constant'\r\n\t\t * Gain: '<S1>/FeedbackGain' Gain: '<S1>/IntegralGain' Gain:\r\n\t\t * '<S6>/Gain3' Inport: '<Root>/battery' Product: '<S2>/Product'\r\n\t\t * Product: '<S9>/Product' Sum: '<S1>/Sum2' Sum: '<S1>/sum_err' Sum:\r\n\t\t * '<S6>/Sum2' Sum: '<S9>/Sum' UnitDelay: '<S10>/Unit Delay' UnitDelay:\r\n\t\t * '<S11>/Unit Delay' UnitDelay: '<S5>/Unit Delay' UnitDelay: '<S7>/Unit\r\n\t\t * Delay'\r\n\t\t */\r\n\t\ttmp[0] = ud_theta_ref;\r\n\t\ttmp[1] = 0.0F;\r\n\t\ttmp[2] = tmp_thetadot_cmd_lpf;\r\n\t\ttmp[3] = 0.0F;\r\n\t\ttmp_theta_0[0] = tmp_theta;\r\n\t\ttmp_theta_0[1] = ud_psi;\r\n\t\ttmp_theta_0[2] = (tmp_theta_lpf - ud_theta_lpf) / EXEC_PERIOD;\r\n\t\ttmp_theta_0[3] = tmp_psidot;\r\n\t\ttmp_pwm_r_limiter = 0.0F;\r\n\t\tfor (tmp_0 = 0; tmp_0 < 4; tmp_0++) {\r\n\t\t\ttmp_pwm_r_limiter += (tmp[tmp_0] - tmp_theta_0[tmp_0])\r\n\t\t\t\t\t* K_F[(tmp_0)];\r\n\t\t}\r\n\r\n\t\ttmp_pwm_r_limiter = (((K_I * ud_err_theta) + tmp_pwm_r_limiter) / ((BATTERY_GAIN * args_battery) - BATTERY_OFFSET)) * 100.0F;\r\n\r\n\t\t/*\r\n\t\t * Gain: '<S3>/Gain2' incorporates: Constant: '<S3>/Constant1' Inport:\r\n\t\t * '<Root>/cmd_turn' Product: '<S3>/Divide1'\r\n\t\t */\r\n\t\ttmp_pwm_turn = (args_cmd_turn / CMD_MAX) * K_PHIDOT;\r\n\r\n\t\t/* Sum: '<S2>/Sum' */\r\n\t\ttmp_pwm_l_limiter = tmp_pwm_r_limiter + tmp_pwm_turn;\r\n\r\n\t\t/* Saturate: '<S2>/pwm_l_limiter' */\r\n\t\ttmp_pwm_l_limiter = rt_SATURATE(tmp_pwm_l_limiter, -100.0F, 100.0F);\r\n\r\n\t\t/*\r\n\t\t * Outport: '<Root>/pwm_l' incorporates: DataTypeConversion: '<S1>/Data\r\n\t\t * Type Conversion'\r\n\t\t */\r\n\t\tpwm_l = (int) tmp_pwm_l_limiter;\r\n\r\n\t\t/* Sum: '<S2>/Sum1' */\r\n\t\ttmp_pwm_r_limiter -= tmp_pwm_turn;\r\n\r\n\t\t/* Saturate: '<S2>/pwm_r_limiter' */\r\n\t\ttmp_pwm_r_limiter = rt_SATURATE(tmp_pwm_r_limiter, -100.0F, 100.0F);\r\n\r\n\t\t/*\r\n\t\t * Outport: '<Root>/pwm_r' incorporates: DataTypeConversion: '<S1>/Data\r\n\t\t * Type Conversion6'\r\n\t\t */\r\n\t\tpwm_r = (int) tmp_pwm_r_limiter;\r\n\r\n\t\t/*\r\n\t\t * Sum: '<S7>/Sum' incorporates: Gain: '<S7>/Gain' UnitDelay: '<S7>/Unit\r\n\t\t * Delay'\r\n\t\t */\r\n\t\ttmp_pwm_l_limiter = (EXEC_PERIOD * tmp_thetadot_cmd_lpf) + ud_theta_ref;\r\n\r\n\t\t/*\r\n\t\t * Sum: '<S10>/Sum' incorporates: Gain: '<S10>/Gain' UnitDelay:\r\n\t\t * '<S10>/Unit Delay'\r\n\t\t */\r\n\t\ttmp_pwm_turn = (EXEC_PERIOD * tmp_psidot) + ud_psi;\r\n\r\n\t\t/*\r\n\t\t * Sum: '<S5>/Sum' incorporates: Gain: '<S5>/Gain' Sum: '<S1>/Sum1'\r\n\t\t * UnitDelay: '<S5>/Unit Delay' UnitDelay: '<S7>/Unit Delay'\r\n\t\t */\r\n\t\ttmp_pwm_r_limiter = ((ud_theta_ref - tmp_theta) * EXEC_PERIOD)\r\n\t\t\t\t+ ud_err_theta;\r\n\r\n\t\t/* user code (Update function Body) */\r\n\t\t/* System '<Root>' */\r\n\t\t/* 次回演算用状態量保存処理 */\r\n\r\n\t\t/* Update for UnitDelay: '<S5>/Unit Delay' */\r\n\t\tud_err_theta = tmp_pwm_r_limiter;\r\n\r\n\t\t/* Update for UnitDelay: '<S7>/Unit Delay' */\r\n\t\tud_theta_ref = tmp_pwm_l_limiter;\r\n\r\n\t\t/* Update for UnitDelay: '<S8>/Unit Delay' */\r\n\t\tud_thetadot_cmd_lpf = tmp_thetadot_cmd_lpf;\r\n\r\n\t\t/* Update for UnitDelay: '<S10>/Unit Delay' */\r\n\t\tud_psi = tmp_pwm_turn;\r\n\r\n\t\t/* Update for UnitDelay: '<S11>/Unit Delay' */\r\n\t\tud_theta_lpf = tmp_theta_lpf;\r\n\t}",
"@Override\n public void teleopPeriodic() {\n double pi4 = (double)Math.PI/4;\n/*\n double deadzoneX = 0.1;\n double multiplierX = 1/deadzoneX;\n double deadzoneY = 0.1;\n double multiplierY = 1/deadzoneY;\n\n double maxSpeed = stick.getThrottle() * 1f;\nstick.getX()/Math.abs(stick.getX())\n double stickX;\n if (Math.abs(stick.getX())< deadzoneX){\n stickX = 0;\n }\n\n else {\n stickX = ((stick.getMagnitude() * Math.sin(stick.getDirectionRadians())) - deadzoneX)*multiplierX;\n }\n\n \n double stickY;\n if (Math.abs(stick.getY())< deadzoneY){\n stickY = 0;\n }\n\n else {\n stickY = (stick.getMagnitude() * Math.cos(stick.getDirectionRadians()) - deadzoneY)*multiplierY;\n }\n \n\n double stickTwist = stick.getTwist();\n\n double leftFrontForwardsPower = -stickY;\n double rightFrontForwardsPower = stickY;\n double leftBackForwardsPower = -stickY;\n double rightBackForwardsPower = stickY;\n\n double leftFrontSidePower = -stickX;\n double rightFrontSidePower = -stickX;\n double leftBackSidePower = +stickX;\n double rightBackSidePower = stickX;\n\n double leftFrontRotatePower = -stickTwist;\n double rightFrontRotatePower = -stickTwist;\n double leftBackRotatePower = -stickTwist;\n double rightBackRotatePower = -stickTwist;\n\n */\n\n /* get gyro from robot\n set gyro tto original gyro\n void()\n\n get X for joystick\n get Y for Joystick\n\n get gyro for robot\n\n if X = 0\n then Joystick angle pi/2\n else\n then Joystick angle = arctan(Y/X)\n\n newGyro = original gyro - gyro\n\n xfinal = cos(newGyro+joystickangle) * absolute(sqrt(x^2+y^2))\n yfinal = sin(newGyro+joystickangle) * absolute(sqrt(x^2+y^2))\n*/\n\n//Xbox COntroller\n \n double maxSpeed = stick.getThrottle() * 0.2f;\n double maxRot = 1f;\n\n double controllerX = -controller.getX(Hand.kRight);\n double controllerY = controller.getY(Hand.kRight);\n double joyAngle;\n boolean gyroRestart = controller.getAButtonPressed();\n\n if (gyroRestart){\n gyro.reset();\n origGyro = Math.toRadians(gyro.getAngle());\n }\n\n double mainGyro = Math.toRadians(gyro.getAngle());\n/*\n if (controllerX == 0 && controllerY > 0){\n joyAngle = (3*Math.PI)/2;\n }\n\n \n if (controllerX == 0 && controllerY < 0){\n joyAngle = Math.PI/2;\n }\n\n else{\n joyAngle = Math.atan(controllerY/controllerX);\n }\n\n if (controllerX > 0 && controllerY < 0){\n joyAngle = Math.abs(joyAngle + Math.toRadians(180));\n }\n if (controllerX > 0 && controllerY > 0){\n joyAngle -= Math.toRadians(180);\n }\n / * if (controllerX < 0 && controllerY > 0){\n joyAngle -= Math.toRadians(270);\n }* /\n*/\n joyAngle = Math.atan2(controllerY, controllerX);\n\n double newGyro = origGyro - mainGyro;\n //double newGyro = 0;\n\n double controllerTurn = -controller.getX(Hand.kLeft)*maxRot;\n\n double magnitude = Math.abs(Math.sqrt(Math.pow(controllerX,2) + Math.pow(controllerY, 2)));\n\n double xFinal = Math.cos(newGyro + joyAngle) * magnitude;\n double yFinal = Math.sin(newGyro + joyAngle) * magnitude;\n\n\n /* \n double leftFrontForwardsPower = -controllerY;\n double rightFrontForwardsPower = controllerY;\n double leftBackForwardsPower = -controllerY;\n double rightBackForwardsPower = controllerY;\n\n double leftFrontSidePower = -controllerX;\n double rightFrontSidePower = -controllerX;\n double leftBackSidePower = controllerX;\n double rightBackSidePower = controllerX;\n*/\n \n double leftFrontForwardsPower = -yFinal;\n double rightFrontForwardsPower = yFinal;\n double leftBackForwardsPower = -yFinal;\n double rightBackForwardsPower = yFinal;\n\n double leftFrontSidePower = -xFinal;\n double rightFrontSidePower = -xFinal;\n double leftBackSidePower = xFinal;\n double rightBackSidePower = xFinal;\n \n double leftFrontRotatePower = -controllerTurn;\n double rightFrontRotatePower = -controllerTurn;\n double leftBackRotatePower = -controllerTurn;\n double rightBackRotatePower = -controllerTurn;\n\n double forwardsWeight = 1;\n double sideWeight = 1;\n double rotateWeight = 1;\n\n double leftFrontPower = leftFrontForwardsPower * forwardsWeight + leftFrontSidePower * sideWeight + leftFrontRotatePower * rotateWeight;\n double rightFrontPower = rightFrontForwardsPower * forwardsWeight + rightFrontSidePower * sideWeight + rightFrontRotatePower * rotateWeight;\n double leftBackPower = leftBackForwardsPower * forwardsWeight + leftBackSidePower * sideWeight + leftBackRotatePower * rotateWeight;\n double rightBackPower = rightBackForwardsPower * forwardsWeight + rightBackSidePower * sideWeight + rightBackRotatePower * rotateWeight;\n\n leftFrontPower *= maxSpeed;\n rightFrontPower *= maxSpeed;\n leftBackPower *= maxSpeed;\n rightBackPower *= maxSpeed;\n\n\n double largest = Math.max( \n Math.max( Math.abs( leftFrontPower),\n Math.abs(rightFrontPower)),\n Math.max( Math.abs( leftBackPower), \n Math.abs( rightBackPower)));\n\n if (largest > 1) {\n leftFrontPower /= largest;\n rightFrontPower /= largest;\n leftBackPower /= largest;\n rightBackPower /= largest;\n }\n \n \n leftFrontMotor.set(leftFrontPower);\n rightFrontMotor.set(rightFrontPower); \n leftBackMotor.set(leftBackPower);\n rightBackMotor.set(rightBackPower);\n\n SmartDashboard.putNumber(\"Main Gyro\", mainGyro);\n SmartDashboard.putNumber(\"Original Gyro\", origGyro);\n SmartDashboard.putNumber(\"New Gyro\", newGyro);\n SmartDashboard.putNumber(\"Controller X\", controllerX);\n SmartDashboard.putNumber(\"Controller Y\", controllerY);\n SmartDashboard.putNumber(\"Magnitude \", magnitude);\n SmartDashboard.putNumber(\"Largest\", largest);\n SmartDashboard.putNumber(\"Joystick Angle\", Math.toDegrees(joyAngle));\n SmartDashboard.putNumber(\"X final\", xFinal);\n SmartDashboard.putNumber(\"Y final\", yFinal);\n SmartDashboard.putNumber(\"Left Front Power\", leftFrontPower);\n SmartDashboard.putNumber(\"Right Front Power\", rightFrontPower);\n SmartDashboard.putNumber(\"Left Back Power\", leftBackPower);\n SmartDashboard.putNumber(\"Right Back Power\", rightBackPower);\n }",
"public void initialize() {\n\n Robot.driveSubsystem.resetGyro();\n\n }",
"public void runOpMode() {\n robot.init(hardwareMap);\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Status\", \"Resetting Encoders\"); //\n telemetry.update();\n\n robot.leftMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot.rightMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n idle();\n\n robot.leftMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.rightMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n // Send telemetry message to indicate successful Encoder reset\n telemetry.addData(\"Path0\", \"Starting at %7d :%7d\",\n robot.leftMotor.getCurrentPosition(),\n robot.rightMotor.getCurrentPosition());\n telemetry.addData(\"Gyro Heading:\", \"%.4f\", getHeading());\n telemetry.update();\n\n int cameraMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\"cameraMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters(cameraMonitorViewId);\n\n parameters.vuforiaLicenseKey = \"Adiq0Gb/////AAAAme76+E2WhUFamptVVqcYOs8rfAWw8b48caeMVM89dEw04s+/mRV9TqcNvLkSArWax6t5dAy9ISStJNcnGfxwxfoHQIRwFTqw9i8eNoRrlu+8X2oPIAh5RKOZZnGNM6zNOveXjb2bu8yJTQ1cMCdiydnQ/Vh1mSlku+cAsNlmfcL0b69Mt2K4AsBiBppIesOQ3JDcS3g60JeaW9p+VepTG1pLPazmeBTBBGVx471G7sYfkTO0c/W6hyw61qmR+y7GJwn/ECMmXZhhHkNJCmJQy3tgAeJMdKHp62RJqYg5ZLW0FsIh7cOPRkNjpC0GmMCMn8AbtfadVZDwn+MPiF02ZbthQN1N+NEUtURP0BWB1CmA\";\n\n\n parameters.cameraDirection = VuforiaLocalizer.CameraDirection.FRONT;\n this.vuforia = ClassFactory.createVuforiaLocalizer(parameters);\n\n VuforiaTrackables relicTrackables = this.vuforia.loadTrackablesFromAsset(\"RelicVuMark\");\n VuforiaTrackable relicTemplate = relicTrackables.get(0);\n relicTemplate.setName(\"relicVuMarkTemplate\"); // can help in debugging; otherwise not necessary\n\n telemetry.addData(\">\", \"Press Play to start\");\n telemetry.update();\n\n\n\n // Wait for the game to start (driver presses PLAY)\n waitForStart();\n relicTrackables.activate();\n\n //while (opModeIsActive()) {\n\n /**\n * See if any of the instances of {@link relicTemplate} are currently visible.\n * {@link RelicRecoveryVuMark} is an enum which can have the following values:\n * UNKNOWN, LEFT, CENTER, and RIGHT. When a VuMark is visible, something other than\n * UNKNOWN will be returned by {@link RelicRecoveryVuMark#from(VuforiaTrackable)}.\n */\n RelicRecoveryVuMark vuMark = RelicRecoveryVuMark.from(relicTemplate);\n while (vuMark == RelicRecoveryVuMark.UNKNOWN) {\n vuMark = RelicRecoveryVuMark.from(relicTemplate);\n /* Found an instance of the template. In the actual game, you will probably\n * loop until this condition occurs, then move on to act accordingly depending\n * on which VuMark was visible. */\n }\n telemetry.addData(\"VuMark\", \"%s visible\", vuMark);\n telemetry.update();\n sleep(550);\n\n //switch (vuMark) {\n // case LEFT: //RelicRecoveryVuMark vuMark = RelicRecoveryVuMark.LEFT;\n // coLumn = 2;\n // case CENTER:// RelicRecoveryVuMark vuMark = RelicRecoveryVuMark.CENTER;\n // coLumn = 1;\n // case RIGHT:// RelicRecoveryVuMark vuMark = RelicRecoveryVuMark.RIGHT;\n // coLumn = 0;\n //}\n if ( vuMark == RelicRecoveryVuMark.LEFT) {\n coLumn = 2;\n }\n else if(vuMark == RelicRecoveryVuMark.RIGHT){\n coLumn = 0;\n }\n else if(vuMark == RelicRecoveryVuMark.CENTER){\n coLumn = 1;\n }\n\n\n telemetry.addData(\"coLumn\", \"%s visible\", coLumn);\n telemetry.update();\n sleep(550);\n\n\n\n//if jewej is red 1 if jewel is blue 2\n\n // if(jewel == 1) {\n // gyroturn(-10, TURN_SPEED, -TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[1], -turndistance[1], 5.0);\n //gyroturn(-2, -TURN_SPEED, TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[1], -turndistance[1], 5.0);\n //}\n //else if(jewel == 2){\n // gyroturn(10, -TURN_SPEED, TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[1], -turndistance[1], 5.0);\n // gyroturn(-2, TURN_SPEED, -TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[1], -turndistance[1], 5.0);\n //}\n encoderDrive(DRIVE_SPEED, DRIVE_SPEED, disandTurn[0][coLumn], disandTurn[0][coLumn], 5.0); // S1: Forward 24 Inches with 5 Sec timeout shoot ball\n\n gyroturn(disandTurn[1][coLumn], TURN_SPEED, -TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[0], -turndistance[0], 5.0);\n\n encoderDrive(DRIVE_SPEED, DRIVE_SPEED, disandTurn[2][coLumn], disandTurn[2][coLumn], 5.0); // S3: Forward 43.3 iNCHES\n\n gyroturn(disandTurn[3][coLumn], TURN_SPEED, -TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[1], -turndistance[1], 5.0);\n\n encoderDrive(DRIVE_SPEED, DRIVE_SPEED, disandTurn[4][coLumn], disandTurn[4][coLumn], 5.0);// S5: Forward 12 Inches with 4 Sec timeout\n\n gyroturn(disandTurn[5][coLumn], TURN_SPEED, -TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[1], -turndistance[1], 5.0);\n\n encoderDrive(DRIVE_SPEED, DRIVE_SPEED, disandTurn[6][coLumn], disandTurn[6][coLumn], 5.0);// S5: Forward 12 Inches with 4 Sec timeout\n\n\n Outake();\n encoderDrive(DRIVE_SPEED, DRIVE_SPEED, disandTurn[7][coLumn], disandTurn[7][coLumn], 5.0);// S6: Forward 48 inches with 4 Sec timeout\n }",
"@Override\n public void robotInit() {\n myRobot = new DifferentialDrive(leftfrontmotor, rightfrontmotor);\n leftrearmotor.follow(leftfrontmotor);\n rightrearmotor.follow(rightfrontmotor);\n leftfrontmotor.setInverted(true); // <<<<<< Adjust this until robot drives forward when stick is forward\n\t\trightfrontmotor.setInverted(true); // <<<<<< Adjust this until robot drives forward when stick is forward\n\t\tleftrearmotor.setInverted(InvertType.FollowMaster);\n rightrearmotor.setInverted(InvertType.FollowMaster);\n \n CameraServer.getInstance().startAutomaticCapture();\n\n \n\n comp.setClosedLoopControl(true);\n \n\n /* Set up Dashboard widgets */\n SmartDashboard.putNumber(\"L Stick\", gamepad.getRawAxis(1));\n\t\tSmartDashboard.putNumber(\"R Stick\", gamepad.getRawAxis(5));\n\t\tSmartDashboard.putBoolean(\"Back Button\", gamepad.getRawButton(5));\n\t\tSmartDashboard.putBoolean(\"Fwd Button\", gamepad.getRawButton(6));\n\t\t\n SmartDashboard.putNumber(\"LF\", pdp.getCurrent(leftfrontmotorid));\n\t\tSmartDashboard.putNumber(\"LR\", pdp.getCurrent(leftrearmotorid));\n\t\tSmartDashboard.putNumber(\"RF\", pdp.getCurrent(rightfrontmotorid));\n\t\tSmartDashboard.putNumber(\"RR\", pdp.getCurrent(rightrearmotorid));\n SmartDashboard.putNumber(\"Total\", pdp.getCurrent(0) + pdp.getCurrent(1) + pdp.getCurrent(2) + pdp.getCurrent(3) + pdp.getCurrent(4) + pdp.getCurrent(5) + pdp.getCurrent(6) + pdp.getCurrent(7) + pdp.getCurrent(8) + pdp.getCurrent(9) + pdp.getCurrent(10) + pdp.getCurrent(11) + pdp.getCurrent(12) + pdp.getCurrent(13) + pdp.getCurrent(14) + pdp.getCurrent(15));\n }",
"void initialize() {\n setClockSource(MPU6050_CLOCK_PLL_INTERNAL);\n setFullScaleGyroRange(MPU6050_GYRO_FS_250);\n setFullScaleAccelRange(MPU6050_ACCEL_FS_2);\n }",
"@Override\n public void runOpMode() throws InterruptedException {\n distanceSensorInRange = false;\n myGlyphLift = new glyphLift(hardwareMap.dcMotor.get(\"glyph_lift\"));\n myColorSensorArm = new colorSensorArm(hardwareMap.servo.get(\"color_sensor_arm\"),hardwareMap.colorSensor.get(\"sensor_color\"), hardwareMap.servo.get(\"color_sensor_arm_rotate\"));\n myMechDrive = new mechDriveAuto(hardwareMap.dcMotor.get(\"front_left_motor\"), hardwareMap.dcMotor.get(\"front_right_motor\"), hardwareMap.dcMotor.get(\"rear_left_motor\"), hardwareMap.dcMotor.get(\"rear_right_motor\"));\n myGlyphArms = new glyphArms(hardwareMap.servo.get(\"top_left_glyph_arm\"), hardwareMap.servo.get(\"bottom_left_glyph_arm\"), hardwareMap.servo.get(\"top_left_glyph_arm\"), hardwareMap.servo.get(\"bottom_right_glyph_arm\"));\n myBoardArm = new boardArm(hardwareMap.dcMotor.get(\"board_arm\"));\n myRevColorDistanceSensor = new revColorDistanceSensor(hardwareMap.get(ColorSensor.class, \"rev_sensor_color_distance\"), hardwareMap.get(DistanceSensor.class, \"rev_sensor_color_distance\"));\n\n\n myColorSensorArm.colorSensorArmUpSlow();\n myColorSensorArm.colorRotateResting();\n //myGlyphArms.openRaisedGlyphArms(); //ensures robot is wihin 18\" by 18\" parameters\n\n int cameraMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\"cameraMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters(cameraMonitorViewId);\n parameters.vuforiaLicenseKey = \"ASmjss3/////AAAAGQGMjs1d6UMZvrjQPX7J14B0s7kN+rWOyxwitoTy9i0qV7D+YGPfPeeoe/RgJjgMLabjIyRXYmDFLlJYTJvG9ez4GQSI4L8BgkCZkUWpAguRsP8Ah/i6dXIz/vVR/VZxVTR5ItyCovcRY+SPz3CP1tNag253qwl7E900NaEfFh6v/DalkEDppFevUDOB/WuLZmHu53M+xx7E3x35VW86glGKnxDLzcd9wS1wK5QhfbPOExe97azxVOVER8zNNF7LP7B+Qeticfs3O9pGXzI8lj3zClut/7aDVwZ10IPVk4oma6CO8FM5UtNLSb3sicoKV5QGiNmxbbOlnPxz9qD38UAHshq2/y0ZjI/a8oT+doCr\";\n parameters.cameraDirection = VuforiaLocalizer.CameraDirection.BACK;\n this.vuforia = ClassFactory.createVuforiaLocalizer(parameters);\n VuforiaTrackables relicTrackables = this.vuforia.loadTrackablesFromAsset(\"RelicVuMark\");\n VuforiaTrackable relicTemplate = relicTrackables.get(0);\n relicTemplate.setName(\"relicVuMarkTemplate\"); // can help in debugging; otherwise not necessary\n\n waitForStart();\n\n relicTrackables.activate();\n\n while (opModeIsActive()) {\n myGlyphArms.closeGlyphArms();\n sleep(2000);\n myMechDrive.vuforiaLeft(myGlyphArms);\n sleep(1000);\n requestOpModeStop();\n }\n }",
"protected AutonomousMode() {\n driveMotions = new Vector();\n auxMotions = new Vector();\n }",
"@Override\n public void robotPeriodic() {\n //This prints Data to the Driver Station\n SmartDashboard.putString(\"DB/String 2\", \"\" + elevator.getSensorCollection().getQuadraturePosition());\n //SmartDashboard.putString(\"DB/String 7\", \"\" + rightEncoder.getDistance());\n }",
"protected void initialize() {\n \tRobot.io.bottomGyro.reset();\n \tRobot.io.topGyro.reset();\n \tpid.reset();\n \tpid.setSetpoint(rotAngle);\n \tpid.enable();\n }",
"@Override\n public void runOpMode() throws InterruptedException{\n\n LeftWheel = hardwareMap.dcMotor.get(\"LeftWheel\");\n RightWheel = hardwareMap.dcMotor.get(\"RightWheel\");\n LLAMA = hardwareMap.dcMotor.get(\"LLAMA\");\n RightWheel.setDirection(DcMotor.Direction.REVERSE);\n beaconFlagSensor = hardwareMap.i2cDevice.get(\"color sensor\");\n LeftWheel.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n RightWheel.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n buttonPusher = hardwareMap.servo.get(\"Button Pusher\");\n buttonPusher.setDirection(Servo.Direction.REVERSE);\n\n LeftWheel.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n RightWheel.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n LLAMA.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n beaconFlagReader= new I2cDeviceSynchImpl(beaconFlagSensor, I2cAddr.create8bit(0x3c), false);\n beaconFlagReader.engage();\n\n double PUSHER_MIN = 0;\n double PUSHER_MAX = 1;\n buttonPusher.scaleRange(PUSHER_MIN,PUSHER_MAX);\n\n if(beaconFlagLEDState){\n beaconFlagReader.write8(3, 0); //Set the mode of the color sensor using LEDState\n }\n else{\n beaconFlagReader.write8(3, 1); //Set the mode of the color sensor using LEDState\n }\n\n\n waitForStart();\n //Go forward to position to shoot\n long iniForward = 0;\n //Shoot LLAMA\n long shootLLAMA=0 ;\n //Turn towards Wall\n long turnToWall= 0;\n //Approach Wall\n long wallApproach= 0;\n //Correct to prepare for button\n long correctForButton= 0;\n long correctForButton2=0 ;\n //Use sensors to press button\n /** This is sensor*/\n //Go forward\n long toSecondButton= 0;\n //Use Sensors to press button\n /** This is sensor*/\n //turn to center\n\n //charge\n long chargeTime= 0;\n\n //Go forward to position to shoot\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(iniForward);\n\n STOP();\n\n //Shoot LLAMA\n LLAMA.setPower(1);\n\n sleep(shootLLAMA);\nSTOP();\n //Turn towards Wall\n LeftWheel.setPower(-1);\n RightWheel.setPower(1);\n\n sleep(turnToWall);\n\n STOP();\n //Approach Wall\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(wallApproach);\n\n STOP();\n //Correct to prepare for button\n\n LeftWheel.setPower(1);\n RightWheel.setPower(-1);\n\n sleep(correctForButton);\n\n STOP();\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(correctForButton2);\n\n STOP();\n topCache = beaconFlagReader.read(0x04, 1);\n //Use sensors to press button\n if ((topCache[0] & 0xFF) <=4 && (topCache[0] & 0xFF) > 0 &&(topCache[0] & 0xFF) <16) {\n while (((topCache[0] & 0xFF) <=4 && (topCache[0] & 0xFF) > 0 &&\n (topCache[0] & 0xFF) <16) && opModeIsActive()) {\n\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n sleep(100);\n LeftWheel.setPower(0);\n RightWheel.setPower(0);\n topCache = beaconFlagReader.read(0x04, 1);\n\n if ((topCache[0] & 0xFF) >=7 && (topCache[0] & 0xFF) >= 0){\n telemetry.addLine(\"Color Detected, Pressing Button...\");\n telemetry.update();\n buttonPusher.setPosition(PUSHER_MAX);\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(100);\n\n STOP();\n break;\n }\n }\n\n }\n\n else if ((topCache[0] & 0xFF) >=7 && (topCache[0] & 0xFF) >= 0) {\n telemetry.addLine(\"Color Detected, Pressing Button...\");\n telemetry.update();\n buttonPusher.setPosition(PUSHER_MAX);\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(100);\n\n STOP();\n }\n\n //Go forward\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(toSecondButton);\n\n STOP();\n //Use Sensors to press button\n topCache = beaconFlagReader.read(0x04, 1);\n //Use sensors to press button\n if ((topCache[0] & 0xFF) <=4 && (topCache[0] & 0xFF) > 0 &&(topCache[0] & 0xFF) <16) {\n while (((topCache[0] & 0xFF) <=4 && (topCache[0] & 0xFF) > 0 &&\n (topCache[0] & 0xFF) <16) && opModeIsActive()) {\n\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n sleep(100);\n LeftWheel.setPower(0);\n RightWheel.setPower(0);\n topCache = beaconFlagReader.read(0x04, 1);\n\n if ((topCache[0] & 0xFF) >=7 && (topCache[0] & 0xFF) >= 0){\n telemetry.addLine(\"Color Detected, Pressing Button...\");\n telemetry.update();\n buttonPusher.setPosition(PUSHER_MAX);\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(100);\n\n STOP();\n break;\n }\n }\n\n }\n\n else if ((topCache[0] & 0xFF) >=7 && (topCache[0] & 0xFF) >= 0) {\n telemetry.addLine(\"Color Detected, Pressing Button...\");\n telemetry.update();\n buttonPusher.setPosition(PUSHER_MAX);\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(100);\n\n STOP();\n }\n\n //turn to center\n\n\n //charge\n }",
"@Override\n\tpublic void robotInit() {\n\t\toi = new OI();\n\t\t\n\t\t// chooser.addObject(\"My Auto\", new MyAutoCommand());\n\t\tSmartDashboard.putData(\"Auto mode\", chooser);\n\t\tSystem.out.println(\"I am here\");\n\t\ttopRight = new CANTalon(1);\n\t\tmiddleRight = new CANTalon(3);\n\t\tbottomRight = new CANTalon(2);\n\t\ttopLeft = new CANTalon(5);\n\t\tmiddleLeft = new CANTalon(6);\n\t\tbottomLeft = new CANTalon(7);\n\t\tclimber = new CANTalon(4);\n\t\tshifter = new DoubleSolenoid(2,3);\n\t\tshifter.set(Value.kForward);\n\t\tbucket= new DoubleSolenoid(0, 1);\n\t\tclimber.reverseOutput(true);\n\t\t//Setting Followers\n\t\t//topRight is Right Side Master (TalonSRX #1)0.062, 0.00062, 0.62)\n\t\t//middleRight.reset();\n//\t\tmiddleRight.setProfile(0);\n//\t\tmiddleRight.setPID( 0.0, 0.0, 0.0);//TODO: make multiple profiles\n\t\t\n//\t\tmiddleRight.setFeedbackDevice(FeedbackDevice.CtreMagEncoder_Absolute);\n//\t\tmiddleRight.setEncPosition(0);\n//\t\tmiddleRight.setAllowableClosedLoopErr(10);\n\t\tmiddleRight.reverseSensor(true);\n//\t\tmiddleRight.configNominalOutputVoltage(+0f, -0f);\n//\t\tmiddleRight.configPeakOutputVoltage(+12f, -12f);\n\t\ttopRight.changeControlMode(TalonControlMode.Follower);\n\t\ttopRight.set(middleRight.getDeviceID());\n\t\ttopRight.reverseOutput(true);\n\t\tbottomRight.changeControlMode(TalonControlMode.Follower); //TalonSRX #3\n\t\tbottomRight.set(middleRight.getDeviceID());\n//\t\tmiddleRight.setProfile(1);\n//\t\tmiddleRight.setPID( 0.0, 0.0, 0.0);\n\t\t//climber is the climber Motor (TalonSRX #4)\n\t\t//TopLeft is Right Side Master (TalonSRX #5)\n\t\t//middleLeft.reset();\n\t\t//middleLeft.setProfile(0);\n//\t\tmiddleLeft.setPID(0.0, 0.00, 0.0);\n//\t\tmiddleLeft.setEncPosition(0);\n//\t\tmiddleLeft.setFeedbackDevice(FeedbackDevice.CtreMagEncoder_Absolute);\n//\t\tmiddleLeft.configNominalOutputVoltage(+0f, -0f);\n//\t\tmiddleLeft.configPeakOutputVoltage(+12f, -12f);\n\t\tmiddleLeft.reverseSensor(false);\n//\t\tmiddleLeft.setAllowableClosedLoopErr(10);\n\t\ttopLeft.changeControlMode(TalonControlMode.Follower); //TalonSRX #6\n\t\ttopLeft.set(middleLeft.getDeviceID());\n\t\ttopLeft.reverseOutput(true);\n\t\tbottomLeft.changeControlMode(TalonControlMode.Follower); //TalonSRX #7\n\t\tbottomLeft.set(middleLeft.getDeviceID());\n//\t\tmiddleLeft.setProfile(1);\n//\t\tmiddleLeft.setPID(0, 0, 0);\n\t\t//Sensors\n\t\timu = new ADIS16448IMU();\n\t\tclimberSubsystem = new ClimberSubsystem();\n\t\tbucketSubsystem = new BucketSubsystem();\n\t\tdriveSubsystem = new DriveSubsystem();\n\t}",
"void resetControlVariables() {\n a1_cnt_ = 0;\n b1_cnt_ = 0;\n x1_cnt_ = 0;\n y1_cnt_ = 0;\n lb1_cnt_ = 0;\n rb1_cnt_ = 0;\n lsb1_cnt_ = 0;\n rsb1_cnt_ = 0;\n lt1_left_cnt_ = 0;\n lt1_right_cnt_ = 0;\n\n a2_cnt_ = 0;\n b2_cnt_ = 0;\n x2_cnt_ = 0;\n y2_cnt_ = 0;\n lb2_cnt_ = 0;\n rb2_cnt_ = 0;\n lsb2_cnt_ = 0;\n rsb2_cnt_ = 0;\n\n curr_time_ = 0.0;\n loop_cnt_ = 0;\n last_imu_read_loop_id_ = -1;\n last_motor_read_loop_id_ = -1;\n last_rgb_range_stone_read_loop_id_ = -1;\n last_range_stone_read_loop_id_ = -1;\n last_range_right_read_loop_id_ = -1;\n last_range_left_read_loop_id_ = -1;\n last_range_stone_read_time_ = 0;\n last_range_right_read_time_ = 0;\n last_range_left_read_time_ = 0;\n range_stone_dist_init_min_ = 0;\n range_right_dist_init_min_ = 0;\n range_left_dist_init_min_ = 0;\n range_stone_error_detected_ = false;\n range_right_error_detected_ = false;\n range_left_error_detected_ = false;\n battery_voltage_ = 0.0;\n\n last_button_time_ = 0.0;\n last_button_a1_time_ = 0.0;\n last_button_b1_time_ = 0.0;\n last_button_rb1_time_ = 0.0;\n last_button_time2_ = 0.0;\n last_double_stone_time_ = 0.0;\n }",
"public interface RobotMap {\n\n /* COMPETITION BOT */\n\n // CAN Talon SRX\n int LEFT_TALON = 7;\n int RIGHT_TALON = 9;\n int LIFT_TALON = 8;\n int CLIMB_TALON = 10;\n\n // CAN Victor SPX\n int LEFT_DRIVE_VICTOR = 1;\n int RIGHT_DRIVE_VICTOR = 3;\n\n // Victor SP PWM ports\n int INTAKE_VICTOR = 0;\n int CLIMB_VICTOR = 1;\n\n // Double Solenoid PCM IDs\n int FORWARD_CHANNEL = 6;\n int REVERSE_CHANNEL = 7;\n\n // Digital Input ports\n int HALL_SENSOR = 0;\n int LIMIT_SWITCH = 1;\n\n // Pneumatics Control Module CAN ID\n int PCM = 0;\n\n\n /* PRACTICE BOT */\n\n /*\n\n // CAN Talon SRX\n int LEFT_TALON = 6;\n int RIGHT_TALON = 1;\n int LIFT_TALON = 2;\n int CLIMB_TALON = 5;\n\n // CAN Victor SPX\n int LEFT_DRIVE_VICTOR = 6;\n int RIGHT_DRIVE_VICTOR = 2;\n\n // Victor SP PWM ports\n int INTAKE_VICTOR = 0;\n int CLIMB_VICTOR = 1;\n\n // Double Solenoid PCM IDs\n int FORWARD_CHANNEL = 6;\n int REVERSE_CHANNEL = 7;\n\n // Digital Input ports\n int HALL_SENSOR = 0;\n int LIMIT_SWITCH = 1;\n\n // Pneumatics Control Module CAN ID\n int PCM = 0;\n\n */\n\n}",
"@Override\n\tpublic void robotInit() {\n\t\tdt = new DriveTrain();\n\t\t//Initialize drive Talons\n\t\tRobotMap.vspLeft = new WPI_TalonSRX(RobotMap.dtLeft);\n\t\tRobotMap.vspRight = new WPI_TalonSRX(RobotMap.dtRight);\n\t\t//Initialize drive slave Victors\n\t\t//RobotMap.slaveLeft = new WPI_VictorSPX(RobotMap.slaveDriveLeft);\n\t\t//RobotMap.slaveRight = new WPI_VictorSPX(RobotMap.slaveDriveRight);\n\t\t//Set drive slaves to follower mode\n\t\t//RobotMap.slaveLeft.follow(RobotMap.vspLeft);\n\t\t//RobotMap.slaveRight.follow(RobotMap.vspRight);\n\t\t//Initialize drive train\n\t\tRobotMap.rd = new DifferentialDrive(RobotMap.vspLeft, RobotMap.vspRight);\n\t\t//Initialize drive joystick\n\t\tRobotMap.stick = new Joystick(RobotMap.joystickPort);\n\t\t//Disabled drive safety\n\t\tRobotMap.vspLeft.setSafetyEnabled(false);\n\t\tRobotMap.vspRight.setSafetyEnabled(false);\n\t\tRobotMap.rd.setSafetyEnabled(false);\n\t\t//Initialize lift Talon\n\t\tRobotMap.liftTalon = new WPI_TalonSRX(5);\n\t\t//Initialize operator controller\n\t\tRobotMap.controller = new Joystick(RobotMap.controllerPort);\n\t\t//Initialize intake Victors\n\t\tRobotMap.intakeVictorLeft = new WPI_VictorSPX(RobotMap.intakeMaster);\n\t\tRobotMap.intakeVictorRight = new WPI_VictorSPX(RobotMap.intakeSlave);\n\t\t//Set right intake Victor to follow left intake Victor\n\t\tRobotMap.intakeVictorRight.follow(RobotMap.intakeVictorLeft);\n\t\t\n\t\tRobotMap.climberVictorLeft = new WPI_VictorSPX(RobotMap.climberLeftAddress);\n\t\tRobotMap.climberVictorRight = new WPI_VictorSPX(RobotMap.climberRightAddress);\n\t\t\n\t\tRobotMap.climberVictorRight.follow(RobotMap.climberVictorLeft);\n\t\t\n\t\tRobotMap.piston = new DoubleSolenoid(RobotMap.inChannel, RobotMap.outChannel);\n\t\t\n\t\tRobotMap.intakeLifter = new WPI_VictorSPX(2);\n\t\t\n\t\tRobotMap.liftTalon = new WPI_TalonSRX(RobotMap.liftTalonAddress);\n\t\t\n\t\tautoChooser = new SendableChooser();\n\t\tautoChooser.addDefault(\"Drive to baseline\" , new DriveToBaseline());\n\t\tautoChooser.addObject(\"Null auto\", new NullAuto());\n\t\tautoChooser.addObject(\"Switch from right\", new SwitchFromRight());\n\t\tautoChooser.addObject(\"Switch from left\", new SwitchFromLeft());\n\t\tautoChooser.addObject(\"PID from left\", new PIDfromLeft());\n\t\tautoChooser.addObject(\"PID from right\", new PIDfromRight());\n\t\tautoChooser.addObject(\"Scale from right\", new ScaleAutoRight());\n\t\tautoChooser.addObject(\"Scale from left\", new ScaleAutoLeft());\n\t\tautoChooser.addObject(\"PID tester\", new PIDTESTER());\n\t\tautoChooser.addObject(\"Joe use this one\", new leftOnly());\n\t\tSmartDashboard.putData(\"Autonomous mode chooser\", autoChooser);\n\t\t\n\t\t//RobotMap.liftVictor.follow(RobotMap.climberTalon);\n\t\t\n\t\tRobotMap.vspLeft.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, 0, 0);\n\t\tRobotMap.vspRight.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, 0, 0);\n\t\t\n\t\tRobotMap.intakeLifted = new DigitalInput(1);\n\t\tRobotMap.isAtTop = new DigitalInput(2);\n\t\tRobotMap.isAtBottom = new DigitalInput(0);\n\t\t\n\t\tRobotMap.vspLeft.configVelocityMeasurementPeriod(VelocityMeasPeriod.Period_100Ms, 1);\n\t\tRobotMap.vspRight.configVelocityMeasurementWindow(64, 1); \n\t\t\n\t\toi = new OI();\n\t}",
"public Feedback(){\n\n\t\tleftVL = new DigitalInput(RobotPorts.leftVL);\n\t\trightVL = new DigitalInput(RobotPorts.rightVL);\n\n\t\ttoteDetectorLow = new DigitalInput(RobotPorts.toteDetectorLow);\n\t\ttoteDetectorHigh = new DigitalInput(RobotPorts.toteDetectorHigh);\n\n\t\taccel = new BuiltInAccelerometer();\n\t}",
"private static void initConfig() {\n /*\n * Human IO\n */\n {\n /*\n * Constants\n */\n {\n /*\n * Joysticks\n */\n {\n addToConstants(\"joysticks.left\", 0);\n addToConstants(\"joysticks.right\", 1);\n addToConstants(\"joysticks.operator\", 2);\n }\n\n /*\n * Buttons and axis\n */\n {\n }\n }\n }\n\n /*\n * RobotIO\n */\n {\n /*\n * Constants\n */\n {\n /*\n * Kicker\n */\n addToConstantsA(\"kicker.encoder.distPerPulse\", 360.0 / 1024.0);\n }\n }\n\n /*\n * Chassis\n */\n {\n /*\n * Constants\n */\n {\n }\n\n /*\n * Variables\n */\n {\n }\n }\n\n /*\n * Kicker\n */\n {\n /*\n * Constants\n */\n {\n addToConstants(\"kicker.kick.normal\", 1.75);\n addToConstants(\"kicker.kick.timeout\", 0.75);\n\n addToConstants(\"kicker.shaken.voltage\", -0.3316);\n addToConstants(\"kicker.shaken.tolerance\", 3.0);\n\n addToConstants(\"kicker.zero.voltage\", 0.8);\n addToConstants(\"kicker.zero.duration\", 0.75);\n }\n\n /*\n * Variables\n */\n {\n }\n }\n\n /*\n * Gripper\n */\n {\n /*\n * Constants\n */\n {\n addToConstants(\"gripper.collection.voltage\", 0.82);\n addToConstants(\"gripper.ejection.voltage\", -0.45);\n }\n }\n }",
"public void robotInit()\r\n {\r\n // Initialize all subsystems\r\n CommandBase.init();\r\n // instantiate the command used for the autonomous period\r\n //Initializes triggers\r\n mecanumDriveTrigger = new MechanumDriveTrigger();\r\n tankDriveTrigger = new TankDriveTrigger();\r\n resetGyro = new ResetGyro();\r\n }",
"public DriveTrain(){\r\n super(\"Drive Train\");\r\n Log = new MetaCommandLog(\"DriveTrain\", \"Gyro\" , \"Left Jaguars,Right Jaguars\");\r\n gyro1 = new Gyro(RobotMap.AnalogSideCar , RobotMap.DriveTrainGyroInput);\r\n lfJag = new Jaguar(RobotMap.frontLeftMotor);\r\n lfRearJag = new Jaguar(RobotMap.rearLeftMotor);\r\n rtJag = new Jaguar(RobotMap.frontRightMotor);\r\n rtRearJag = new Jaguar(RobotMap.rearRightMotor);\r\n drive = new RobotDrive(lfJag, lfRearJag, rtJag, rtRearJag);\r\n \r\n //lfFrontJag = new Jaguar (3);\r\n //rtFrontJag = new Jaguar (4);\r\n \r\n //joystick2 = new Joystick(2);\r\n //sensor1 = new DigitalInput(1);\r\n //sensor2 = new DigitalInput (2);\r\n\r\n }",
"public void teleopPeriodic() {\n\n \t//NetworkCommAssembly.updateValues();\n \t\n\t\t// both buttons pressed simultaneously, time to cal to ground\n\t\tif (gamepad.getRawButton(FRONT_ARM_GROUND_CAL_BUTTON1) && gamepad.getRawButton(FRONT_ARM_GROUND_CAL_BUTTON2)) {\n\t\t\tprocessGroundCal();\n\t\t}\n\n\t\t// PID CONTROL ONLY\n\t\tdouble armDeltaPos = gamepad.getRawAxis(1);\n\t\tif (Math.abs(armDeltaPos) < ARM_DEADZONE) {\n\t\t\tarmDeltaPos = 0.0f;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tarmDeltaPos *= ARM_POS_MULTIPLIER;\n\t\t\tdouble currPos = testMotor.getPosition();\n\t\t\t\n\t\t\tif (((currPos > SOFT_ENCODER_LIMIT_MAX) && armDeltaPos > 0.0) || ((currPos < SOFT_ENCODER_LIMIT_FLOOR) && armDeltaPos < 0.0)) {\n\t\t\t\tSystem.out.println(\"SOFT ARM LIMIT HIT! Setting armDeltaPos to zero\");\n\t\t\t\tarmDeltaPos = 0.0;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tdouble newPos = currPos + armDeltaPos;\n\t\t\ttestMotor.set(newPos);\n\t\t\tSystem.out.println(\"Setting new front arm pos = \" + newPos);\t\n\t\t}\t\t\n\n \t/*\n\t\tdouble newArmPos = gamepad.getRawAxis(1);\n\t\tif(Math.abs(newArmPos) <= ARM_DEADZONE) {\n\t\t\tnewArmPos = 0.0;\n\t\t}\n\t\tdouble newMotorPos = (newArmPos * ARM_SPEED_MULTIPLIER) + testMotor.getPosition();\n\t\tpositionMoveByCount(newMotorPos);\n\t\tSystem.out.println(\"input = \" + newArmPos + \" target pos = \" + newMotorPos + \" enc pos = \" + testMotor.getPosition());\n \t*/\n \t\n\t\t// PercentVbus test ONLY!!\n \t/*\n\t\tdouble armSpeed = gamepad.getRawAxis(1);\n\t\tif (Math.abs(armSpeed) < ARM_DEADZONE) {\n\t\t\tarmSpeed = 0.0f;\n\t\t}\t\n\t\tarmSpeed *= ARM_MULTIPLIER;\n\t\t\n\t\tdouble pos= testMotor.getPosition();\n\t\tif (((pos > SOFT_ENCODER_LIMIT_1) && armSpeed < 0.0) || ((pos < SOFT_ENCODER_LIMIT_2) && armSpeed > 0.0))\n\t\t\tarmSpeed = 0.0;\n\t\ttestMotor.set(armSpeed);\n\t\t\n\t\tSystem.out.println(\"armSpeed = \" + armSpeed + \" enc pos = \" + testMotor.getPosition());\n\t\t */ \n }",
"@Override\n\tpublic void teleopPeriodic() {\n\t\tif (state.equals(\"teleop\")) {\n\t\t\tlastState = \"teleop\";\n\t\t}\n\t\tstate = \"teleop\";\n\n\t\tif (lastState.equals(\"auton\")) {\n\t\t\tNetworkTables.getControlsTable().putBoolean(\"auton\", false);\n\t\t\t\n\t\t\t//Changes the control Mode back to PercentVbus\n\t\t\t//Should only run once - first interation of teleop\n\t\t\t//And ends auton if running\n\t\t\tif(autonomousCommand != null){\n\t\t\t\tautonomousCommand.cancel();\n\t\t\t}\n\t\t\tActuators.getLeftDriveMotor().changeControlMode(TalonControlMode.PercentVbus);\n\t\t\tActuators.getLeftDriveMotor().set(Constants.MOTOR_STOP);\n\t\t\tActuators.getRightDriveMotor().changeControlMode(TalonControlMode.PercentVbus);\n\t\t\tActuators.getRightDriveMotor().set(Constants.MOTOR_STOP);\n\t\t}\n\n//\t\tNetworkTables.putStream(Gamepad.primary.getX() || Gamepad.secondary.getX());\n\t\t/*\n\t\t * Primary Controllers Controls\n\t\t */\n\t\t// TODO: confirm right trigger forward, left trigger reverse\n\t\t// Drive controls\n\t\tDrive.drive(-Gamepad.primary.getLeftX(), Gamepad.primary.getTriggers()); \n\t\tDrive.shift(Gamepad.primary.getA(), Gamepad.primary.getY()); // shifting with A low gear and Y high gear\n\t\tDrive.shiftToggle(Gamepad.primary.getLB());\n\t\tDrive.crab(Gamepad.primary.getDPadLeft(), Gamepad.primary.getDPadRight());\n\t\t\n//\t\tif (Gamepad.primary.getDPadLeft()){\n//\t\t\tDrive.goingLeft = true;\n//\t\t\tDrive.crab();\t\t\n//\t\t}else if( Gamepad.primary.getDPadRight()){\n//\t\t\tDrive.goingLeft = false;\n//\t\t\tDrive.crab();\t\t\t\n//\t\t}else if (Drive.crabState > 0){\n//\t\t\tDrive.crab();\n//\t\t}\n\n\t\t\n\t\t// Climb controls\n\t\tClimb.climbStopPrimary(Gamepad.primary.getDPadUp()); // runs climbStop using left on the DPad - Primary\n\t\t// Climb.climbSafetyTogglePrimary(Gamepad.primary.getBack()); //toggles safety if pressed 3 times\n\n\t\t// Gear controls\n\t\tScore.dispenseGear(Gamepad.primary.getB() || Gamepad.secondary.getDPadUp());\n\n\t\t/*\n\t\t * Secondary Controllers Controls\n\t\t */\n\t\t// Intake controls\n\t\tIntake.intake(Gamepad.secondary.getRightButton()); // runs intake with clicking in the Right Joystick on second controller\n\t\tIntake.intakeSpeed(Gamepad.secondary.getRightY()); // Override Y Button\n\t\tIntake.intakeDirection(Gamepad.secondary.getRightX()); // Override Y Button\n\t\tIntake.intakeJam(Gamepad.secondary.getLB()); // Runs the unjamming procedure for a max of 3 seconds per press\n\t\t// Intake.intakeSafety(Gamepad.secondary.getStart()); //Have to press 3 times to toggle the safety\n\t\tIntake.intakeIn(Gamepad.secondary.getA(), Gamepad.secondary.getB(), Gamepad.secondary.getX()); // Toggles Intake running into the robot at full speed\n\t\tIntake.intakeRun(Gamepad.secondary.getRB()); // Runs all stuff for intake in(conveyor and intake motor)\n//\t\tIntake.intakeOut(Gamepad.secondary.getB());\n\t\t// Climb controls\n\t\tClimb.climbStopSecondary(Gamepad.secondary.getDPadRight()); // runs climbStop using left on the DPad - Secondary\n\t\tClimb.climbStartSecondary(Gamepad.secondary.getDPadLeft()); // runs climbStart using right on the DPad Secondary\n\t\tClimb.climbSafetyToggleSecondary(Gamepad.secondary.getBack()); // Have to press 3 times to toggle the safety\n\n\t\t// Gear controls\n\t\t// Score.gearLock(Gamepad.secondary.getStart(),\n\t\t// Gamepad.secondary.getBack());\n\n\t\t// Outtake Controls\n\t\t// Score.outtakeToggle(Gamepad.secondary.getLB());\n\n\t\t// Conveyor Controls\n\n\t\tScore.conveyor(Gamepad.secondary.getLeftButton()); // runs conveyor with clicking in the Left Joystick on second controller\n\t\tScore.conveyorSpeed(Gamepad.secondary.getLeftY());\n\t\tScore.conveyorDirection(Gamepad.secondary.getLeftX());\n\t\tScore.conveyorIn(Gamepad.secondary.getY());\n\n\t\t// Sweeper\n\t\t// Sweeper.sweeperMotion(Gamepad.secondary.getTriggers());\n\n\t\tDash.driveMode();\n\n\t\tSmartDashboard.putString(\"Controls Table\", NetworkTables.getControlsTable().getKeys().toString());\n\t\tSmartDashboard.putString(\"Stream\", NetworkTables.getControlsTable().getString(\"stream\", \"nothing\"));\n\n\t}",
"protected void initialize() {\n \t\n \ttimeStarted = System.currentTimeMillis();\n \tangle = driveTrain.gyro.getYaw();\n \tspeed = RobotMap.speedAtFullVoltage * power;\n \ttimeToGo = (long)(distance / speed) * 1000;\n }",
"@Override\n public void robotInit() {\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n SmartDashboard.putData(leftMotor1);\n SmartDashboard.putData(leftMotor2);\n SmartDashboard.putData(rightMotor1);\n SmartDashboard.putData(rightMotor2);\n SmartDashboard.putData(firstMotor);\n SmartDashboard.putData(secondMotor);\n \n\n\n\n }",
"public void initGyro() {\r\n\t\tresult = new AccumulatorResult();\r\n\t\tif (m_analog1 == null || m_analog2 == null) {\r\n\t\t\tSystem.out.println(\"Null m_analog\");\r\n\t\t}\r\n\t\tm_voltsPerDegreePerSecond = kDefaultVoltsPerDegreePerSecond;\r\n\t\t\r\n\t\t\r\n\t\tm_analog1.setAverageBits(kAverageBits);\r\n\t\tm_analog1.setOversampleBits(kOversampleBits);\r\n\t\t\r\n\t\tm_analog2.setAverageBits(kAverageBits);\r\n\t\tm_analog2.setOversampleBits(kOversampleBits);\r\n\t\t\r\n\t\t\r\n\t\tdouble sampleRate = kSamplesPerSecond\r\n\t\t\t\t* (1 << (kAverageBits + kOversampleBits));\r\n\t\tAnalogInput.setGlobalSampleRate(sampleRate);\r\n\t\tTimer.delay(1.0);\r\n\r\n\t\tm_analog1.initAccumulator();\r\n\t\tm_analog1.resetAccumulator();\r\n\t\tm_analog2.initAccumulator();\r\n\t\tm_analog2.resetAccumulator();\r\n\r\n\t\tTimer.delay(kCalibrationSampleTime);\r\n\r\n\t\tfor(int i =0 ; i < mAnalogs.length; i++)\r\n\t\t{\r\n\t\t\tmAnalogs[i].getAccumulatorOutput(result);\r\n\t\r\n\t\t\tm_centers[i]= (int) ((double) result.value / (double) result.count + .5);\r\n\t\r\n\t\t\tm_offsets[i] = ((double) result.value / (double) result.count)\r\n\t\t\t\t\t- m_centers[i];\r\n\t\r\n\t\t\tmAnalogs[i].setAccumulatorCenter(m_centers[i]);\r\n\t\t\tmAnalogs[i].resetAccumulator();\r\n\t\r\n\t\t\t\r\n\t\t\t//LiveWindow.addSensor(\"Gyro\", m_analog.getChannel(), this);\r\n\t\t}\r\n\t\tif(mMode == TWO_CANCEL) setDeadband(kCancelDeadband);\r\n\t\telse if(mMode == TWO_DEADBAND) {\r\n\t\t\tsetDeadband1(0.0);\r\n\t\t\tmAccumulatedAngle = 0;\r\n\t\t}\r\n\t\t\r\n\t\tmOffset = 0;\r\n\t}",
"protected void initialize() {\n \tRobot.driveBase.resetEnc(2);\n \tRobot.gyro.reset();\n \t//stop extraneous moving parts\n }",
"public void teleopPeriodic() {\n Scheduler.getInstance().run();\n// if (oi.driveStick.getRawButton(4)) {\n// System.out.println(\"Left Encoder Distance: \" + RobotMap.leftDriveEncoder.getDistance());\n// System.out.println(\"RightEncoder Distance: \" + RobotMap.rightDriveEncoder.getDistance());\n// }\n\n }",
"@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}",
"@Override\n public void robotInit() {\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n leftFrontMotor = new CANSparkMax(10, MotorType.kBrushless);\n leftBackMotor = new CANSparkMax(11, MotorType.kBrushless);\n rightFrontMotor = new CANSparkMax(12, MotorType.kBrushless);\n rightBackMotor = new CANSparkMax(13, MotorType.kBrushless);\n leftFrontMotor.setIdleMode(IdleMode.kCoast);\n leftBackMotor.setIdleMode(IdleMode.kCoast);\n rightFrontMotor.setIdleMode(IdleMode.kCoast);\n rightBackMotor.setIdleMode(IdleMode.kCoast);\n gyro = new ADXRS450_Gyro();\n gyro.calibrate();\n stick = new Joystick(1);\n controller = new XboxController(0);\n origGyro = 0;\n }",
"@Override\r\n public void init() {\r\n BackRight = hardwareMap.dcMotor.get(\"BackRight\");\r\n BackLeft = hardwareMap.dcMotor.get(\"BackLeft\");\r\n FrontRight = hardwareMap.dcMotor.get(\"FrontRight\");\r\n FrontLeft = hardwareMap.dcMotor.get(\"FrontLeft\");\r\n FrontRight.setDirection(DcMotor.Direction.REVERSE);\r\n BackRight.setDirection(DcMotor.Direction.REVERSE);\r\n\r\n TreadLeft = hardwareMap.dcMotor.get(\"TreadLeft\");\r\n TreadRight = hardwareMap.dcMotor.get(\"TreadRight\");\r\n\r\n ArmMotor = hardwareMap.dcMotor.get(\"ArmMotor\");\r\n }",
"protected void initialize() {\n if ( Math.abs( m_autorotateangle - Robot.drive.gyroGetAngle()) <= 45) {\n rampthreshold = 35;\n } else { // > 45 degrees}\n rampthreshold = Math.abs( m_autorotateangle - Robot.drive.gyroGetAngle()) / 2.5;\n }\n\n \tsetTimeout(m_timeout);\n\n }",
"public void initializeHardware(HardwareMap hwMap) {\n\n // Save reference to Hardware map\n this.hwMap = hwMap;\n period.reset();\n\n // Define Motors\n frontLeftMotor = hwMap.dcMotor.get(\"front_left\");\n frontRightMotor = hwMap.dcMotor.get(\"front_right\");\n backLeftMotor = hwMap.dcMotor.get(\"back_left\");\n backRightMotor = hwMap.dcMotor.get(\"back_right\");\n clawServo = hwMap.servo.get(\"claw\");\n armServo = hwMap.servo.get(\"arm\");\n barrierServo = hwMap.servo.get(\"barrier_servo\");\n intake = hwMap.dcMotor.get(\"intake\");\n shooter = hwMap.dcMotor.get(\"shooter\");\n\n\n // Initialize Motors\n\n // ******MAY CHANGE ******* Fix Forward/Reverse under testing\n frontLeftMotor.setDirection(DcMotor.Direction.REVERSE);\n frontRightMotor.setDirection(DcMotor.Direction.FORWARD);\n backLeftMotor.setDirection(DcMotor.Direction.REVERSE);\n backRightMotor.setDirection(DcMotor.Direction.FORWARD);\n intake.setDirection(DcMotor.Direction.REVERSE);\n shooter.setDirection(DcMotor.Direction.REVERSE);\n\n\n if(encoder) {\n // May use RUN_USING_ENCODERS if encoders are installed\n frontLeftMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n frontRightMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n backLeftMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n backRightMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n //intake.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n //shooter.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n frontLeftMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n frontRightMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n backLeftMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n backRightMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n //intake.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n //shooter.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n }\n else{\n frontLeftMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n frontRightMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n backLeftMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n backRightMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n //intake.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n //shooter.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n }\n\n\n frontLeftMotor.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n frontRightMotor.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n backLeftMotor.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n backRightMotor.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n //intake.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n //shooter.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n frontLeftMotor.setPower(0);\n frontRightMotor.setPower(0);\n backLeftMotor.setPower(0);\n backRightMotor.setPower(0);\n\n //intake.setPower(0);\n //shooter.setPower(0);\n\n\n\n //Define Sensors\n\n imu = hwMap.get(BNO055IMU.class, \"imu\");\n\n BNO055IMU.Parameters parameters = new BNO055IMU.Parameters();\n\n parameters.mode = BNO055IMU.SensorMode.IMU; //inertial measurement unit\n parameters.angleUnit = BNO055IMU.AngleUnit.DEGREES; //angle unit to degrees\n parameters.loggingEnabled = false; //will log values if true\n imu.initialize(parameters); //initializing using above parameters\n\n //Define Servos\n }",
"public void teleopContinuous() {\n //feed the watchdog\n myDog.feed();\n\n //check safestop button\n /*safestop commented out\n if (joysticks.getRightButton(10))//Buttons on top of right stick stops robot\n {\n safeStop();\n //delay to allow driver to release button\n Timer.delay(.1);\n myDog.feed();\n //at this point driver should have released the butto\n while (!joysticks.getRightTop()) {\n myDog.feed();\n }\n //now the button is pressed again, indicating a restart- the program can continue\n\n //slight delay to allow driver to release the button before the next loop\n Timer.delay(.1);\n }\n */\n\n //if arm is in teleop mode, handles input accordingly\n if (armState == TELEOP) {\n handleArmInput();\n }\n\n //if arm is in auto mode, checks whether user is pressing button 1 to regain\n //control and stops the auto task if so\n\n /*\n arm never goes to auto mode, so this is commented out\n\n (armState == AUTO) {\n //if the driver is attempting to cancel the task OR the task is done, return control\n //to the driver\n if (armJoystick.getRawButton(7) || !armTask.isRunning()) {\n armTask.interrupt();\n armTask.stop();\n armState = TELEOP;\n }\n }\n */\n\n //if drive is in teleop mode, handles input accordingly\n if (driveState == TELEOP) {\n try {\n handleDriveInput();\n } catch (EnhancedIOException e) {\n }\n\n }\n\n //if drive is in auto mode, checks whether user is trying to regain control\n /*not used\n if (driveState == AUTO) {\n //if the driver is attempting to cancel the task OR the task is done, return control\n //to the driver\n if (joysticks.getLeftButton(1) || !driveTask.isRunning()) {\n driveTask.interrupt();\n driveTask.stop();\n driveState = TELEOP;\n }\n }\n */\n\n\n printToScreen(\"Gyro Angle: \" + arm.gyro.getAngle());\n printToScreen(\"Arm Angle: \" + arm.getArmAngle());\n }"
] | [
"0.67998976",
"0.66259664",
"0.66028357",
"0.6596697",
"0.65128475",
"0.6385841",
"0.6382263",
"0.63767606",
"0.6368629",
"0.6342001",
"0.63387513",
"0.6317162",
"0.63152957",
"0.62871313",
"0.62848794",
"0.6274658",
"0.6268246",
"0.626436",
"0.62440556",
"0.6227371",
"0.62099415",
"0.6184445",
"0.61591184",
"0.61590916",
"0.6146406",
"0.6135826",
"0.61330456",
"0.6127501",
"0.6118122",
"0.61053437",
"0.60912126",
"0.6088708",
"0.60870326",
"0.60626006",
"0.6058064",
"0.60499096",
"0.6045277",
"0.6032781",
"0.60319567",
"0.6027036",
"0.6004868",
"0.600481",
"0.5990904",
"0.5971793",
"0.59691566",
"0.5966593",
"0.59617364",
"0.59551764",
"0.5951219",
"0.5950326",
"0.59478796",
"0.59368443",
"0.59293306",
"0.59287256",
"0.59286636",
"0.59225094",
"0.59157825",
"0.590509",
"0.5894789",
"0.5894231",
"0.5891025",
"0.58881277",
"0.58865035",
"0.58804685",
"0.587247",
"0.58681977",
"0.58647335",
"0.5860921",
"0.5857944",
"0.5857137",
"0.5854241",
"0.58423287",
"0.58162683",
"0.58126503",
"0.5803846",
"0.5797974",
"0.5795929",
"0.57841045",
"0.57649446",
"0.5760837",
"0.57543075",
"0.5740662",
"0.5736277",
"0.57328385",
"0.57119155",
"0.5709463",
"0.57039076",
"0.57004356",
"0.5698539",
"0.56980914",
"0.56977224",
"0.5695918",
"0.56881297",
"0.56879675",
"0.56851745",
"0.56793046",
"0.5675874",
"0.56749886",
"0.5671115",
"0.5664333"
] | 0.57759637 | 78 |
loadingView = getView(loadingView, R.id.loading_view); | @Override
public void initView() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\t\t\t\t\tpublic void onLoadingStarted(String arg0, View arg1) {\n\t\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void onLoadingStarted(String arg0, View arg1) {\n\t\t\t\t\t}",
"@Override\n public void onLoadingStarted(String arg0, View arg1) {\n }",
"@Override\r\n\t\tpublic void onLoadingStarted(String arg0, View arg1) {\n\t\t\t\r\n\t\t}",
"public RemoteViews getLoadingView() {\n return null;\n }",
"public RemoteViews getLoadingView() {\n return null;\n }",
"@Override\n public void onLoadingStarted(String paramString, View paramView) {\n\n }",
"@Override\n\t\t\t\t\tpublic void onLoadingStarted(String arg0, View arg1) {\n\n\t\t\t\t\t}",
"@Override\n\tpublic RemoteViews getLoadingView() {\n\t\treturn null;\n\t}",
"private void showLoadingView(LoadingViewHolder viewHolder, int position) {\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n ctx = getActivity();\n View view = inflater.inflate(getLayoutID(),null);\n mPreenter = createPresenter();\n loading = new MyProgressLoading(ctx, R.style.DialogStyle);\n sp = ctx.getSharedPreferences(SpUtiles.SP_Mode,Context.MODE_PRIVATE);\n HideUtil.init(getActivity());\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n initListener();\n return view;\n }",
"@Override\n public void onLoadingStarted(String imageUri, View view) {\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n v= inflater.inflate(R.layout.fragment_blank, container, false);\n ButterKnife.bind(this,v);\n progressDialog=new ProgressDialog(getContext());\n showMessage(\"Loading\");\n initRecycler();\n retrofitObject();\n loadData();\n return v;\n }",
"private void loadViews(){\n\t}",
"void onLoadingStarted(String imageUri, View view);",
"public void showLoadingView() {\n mStateView.showViewLoading();\n }",
"@Override\n public void onLoadingStarted(String arg0, View arg1) {\n holder.imageView.setVisibility(View.GONE);\n }",
"@Override\n public void onLoadingComplete(String arg0, View arg1, Bitmap arg2) {\n holder.imageView.setVisibility(View.VISIBLE);\n }",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tloadingView.setVisibility(View.VISIBLE);\n\t\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_loading_dialog, container, false);\n }",
"@Override\n public void onLoadingCancelled(String arg0, View arg1) {\n }",
"@Override\n protected void onStartLoading() {\n progressBar.setVisibility(View.VISIBLE);\n forceLoad();\n }",
"@Override\r\n\t\tpublic void onLoadingComplete(String arg0, View arg1, Bitmap arg2) {\n\t\t\tholder.app_icon.setVisibility(View.VISIBLE);\r\n\t\t}",
"@Override\r\n public void onPrepareLoad(Drawable arg0) {\n\r\n }",
"public interface BaseView {\r\n void showLoading();\r\n void hideLoading();\r\n}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_roads, container, false);\n\n mRecyclerView = (RecyclerView) view.findViewById(R.id.RecyclerView);\n mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));\n progressBar = (ProgressBar) view.findViewById(R.id.progress_bar);\n\n\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_all_ads, container, false);\n\n\n progressBar=view.findViewById(R.id.allAds_progressBar);\n allAds_swiperefreshlayout=view.findViewById(R.id.allAds_swiperefreshlayout);\n\n ///jsut dumy data for test\n\n\n FillData(view);\n\n HandleLoadingAds();\n\n RefreshData();\n\n return view;\n }",
"@Override\r\n\t\t\t\t\tpublic void onLoadingComplete(String arg0, View arg1, Bitmap arg2) {\n\t\t\t\t\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_nation, container, false);\n\n Log.d(TAG, \"onCreateView called!!\");\n\n pbar = (ProgressBar) view.findViewById(R.id.nation_progressbar);\n mRecyclerView = (RecyclerView) view.findViewById(R.id.national_news_rv);\n connectionStatusText = (TextView) view.findViewById(R.id.national_connection_status);\n connectionStatusText.setVisibility(View.GONE);\n mSwipeRefreshLayout = (SwipeRefreshLayout) view.findViewById(R.id.national_swipe_refresh_layout);\n if (mSwipeRefreshLayout != null) {\n mSwipeRefreshLayout.setColorSchemeColors(R.color.orange, R.color.green, R.color.blue);\n }\n mSwipeRefreshLayout.setOnRefreshListener(this);\n\n mLayoutManager = new LinearLayoutManager(getContext());\n mRecyclerView.setLayoutManager(mLayoutManager);\n\n if (savedInstanceState != null) {\n savedValue = savedInstanceState.getString(\"nationalNewsState\");\n mItems = savedInstanceState.getParcelableArrayList(\"nationalNews\");\n }\n\n return view;\n\n }",
"public interface StatisticView extends LoadingView{\n void initActionBar();\n void initWidget();\n}",
"@Override\n protected void onStartLoading() {\n super.onStartLoading();\n\n mLoadingIndicator.setVisibility(View.VISIBLE);\n\n forceLoad();\n }",
"public interface BaseView\n{\n void showLoading();\n void hideLoading();\n}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_looked, container, false);\n\n SharedPreferences myPrefs = this.getActivity().getSharedPreferences(LOGIN_SETTING, Context.MODE_PRIVATE);\n userID=myPrefs.getInt(SAVED_ID,1);\n\n\n\n progressBar = (ProgressBar) rootView.findViewById(R.id.progressBar3);\n\n new LoadLookTask().execute();\n\n return rootView;\n }",
"@Override\r\n\t\t\t\t\tpublic void onLoadingCancelled(String arg0, View arg1) {\n\t\t\t\t\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_indoor_mapsview, container, false);\n spinner = view.findViewById(R.id.search_button);\n // 建立数据源\n String[] mItems = getResources().getStringArray(R.array.IndoorMaps);\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(this.getActivity(), android.R.layout.simple_spinner_item, mItems);\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinner.setAdapter(adapter);\n spinner.setOnItemSelectedListener(this);\n imageView = view.findViewById(R.id.imageview);\n// imageView.setBackgroundResource(images[0]);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n activity = (InitializeDineOrderActivity) getActivity();\n View view = inflater.inflate(R.layout.fragment_items_added_success, container, false);\n unbinder = ButterKnife.bind(this, view);\n //animate(imageView);\n return view;\n\n }",
"@Override\n public void showLoading() {\n Log.i(Tag, \"showLoading\");\n }",
"public interface BaseView {\n\n //显示正在加载\n void showLoading();\n\n // 隐藏正在加载\n void hideLoading();\n}",
"@Override\n public void setLoadingDrawable(ImageView imageView, Drawable drawable) {\n }",
"@Override\n public void prepareView() {\n }",
"@Override\n\t\t\t\t\tpublic void onLoadingCancelled(String arg0, View arg1) {\n\n\t\t\t\t\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_downloaded, container, false);\n\n ButterKnife.bind(this, view);\n\n new LoadLocalFiles().execute();\n\n return view;\n }",
"void onLoaderLoading();",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }",
"@Override\r\n public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {\n \tLog.v(\"catch\",view+\"\");\r\n \ttry{\r\n if (loadedImage != null && view!=null) { \r\n ImageView imageView = (ImageView) view; \r\n // imageView.setImageBitmap(loadedImage);\r\n // 是否第一次显示 \r\n boolean firstDisplay = !displayedImages.contains(imageUri); \r\n if (firstDisplay) { \r\n // 图片淡入效果 \r\n FadeInBitmapDisplayer.animate(imageView, 800); \r\n displayedImages.add(imageUri); \r\n \r\n/* \t ViewGroup.LayoutParams params = imageView.getLayoutParams(); \r\n \t params.height =loadedImage.getHeight(); \r\n \t ((MarginLayoutParams)params).setMargins(10, 10, 10, 10);\r\n \t imageView.setLayoutParams(params);*/ \r\n } \r\n } \r\n \t}catch(Exception e){\r\n \t\tLog.v(\"catch1\",e.getMessage());\r\n \t}\r\n }",
"public void setLoadingView(int resId) {\n //Instantiates a layout XML file into its corresponding View objects. It is never used directly. Instead, use getLayoutInflater()\n LayoutInflater inflater = (LayoutInflater) super.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n footer = inflater.inflate(resId, null);\n //Add a fixed view to appear at the bottom of the list.\n this.addFooterView(footer);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n convertView = inflater.inflate(R.layout.fragment_homecircles, container, false);\n init();\n return convertView;\n }",
"private void initViews() {\n userNumberEditText = findViewById(R.id.numberEdittextactivityinfo);\n filterButton = findViewById(R.id.cirUploadDetailsBtn_activityinfo);\n filterButton.setOnClickListener(filterButtonClickListener());\n\n// progressDialog = new ProgressDialog(this);\n// progressDialog.setMessage(\"Loading...\");\n// progressDialog.setCancelable(false);\n\n// WaveLoadingView loadingView = findViewById(R.id.waveloadingviewfilterchat);\n// loadingView.setAnimDuration(10000);\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_trangchu, container, false);\n recyclerview_douong_124= (RecyclerView)view.findViewById(R.id.listview);\n progressBar_124=view.findViewById(R.id.progressBar);\n\n return view; }",
"@Override\r\n\t\tpublic void onLoadingCancelled(String arg0, View arg1) {\n\t\t\tholder.app_icon.setVisibility(View.VISIBLE);\r\n\t\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View view = inflater.inflate(R.layout.rider_tracking_fragment, container, false);\n\n //getting reference to the widgets in layout\n progressBar = view.findViewById(R.id.viewTrackingProgressBar);\n message = view.findViewById(R.id.viewTrackingMessage);\n //method call to get bookings\n getPlacedBookings(view, getContext());\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_tasks_list, container, false);\n\n loadTasks();\n // createRV();\n\n return view;\n }",
"void loadById(int id, LoadView mLoadView);",
"public void showLoading() {\n }",
"public interface ILoadingView {\n\n /**\n * The loading message which will be shown on the loading view.\n *\n * @return Loading message/text\n */\n String getLoadingMessage();\n}",
"public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage);",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n if(closeToEnd(position) && !locker.isLocked() ) loadContent();\n\n inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n View gridView;\n\n gridView = inflater.inflate(R.layout.album_item,parent,false);\n // binding views to objects and filling them with data\n ImageView albumPhoto = (ImageView) gridView.findViewById(R.id.album_item_imageview);\n TextView albumName = (TextView) gridView.findViewById(R.id.album_item_name);\n TextView albumCount = (TextView) gridView.findViewById(R.id.album_item_count);\n albumName.setText(this.getItem(position).getName());\n albumCount.setText(this.getItem(position).getCount());\n albumPhoto.setScaleType(ImageView.ScaleType.CENTER_CROP);\n final ProgressBar progressBar = (ProgressBar) gridView.findViewById(R.id.album_item_progress_bar);\n\n Glide.with(getApplicationContext())\n\n // calls the getUrlByImageId in order to retrieve the Url of\n // the desired picture\n .load(Helper.getUrlByImageId(getItem(position).getId(),\"album\"))\n // I added this listener in order to desactivate\n // the progressbar whenever the Glide load function\n // gets the picture\n .listener(new RequestListener<Drawable>() {\n @Override\n public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<Drawable> target, boolean isFirstResource) {\n progressBar.setVisibility(View.GONE);\n return false;\n }\n @Override\n public boolean onResourceReady(Drawable resource, Object model, Target<Drawable> target, DataSource dataSource, boolean isFirstResource) {\n progressBar.setVisibility(View.GONE);\n return false;\n }\n })\n .into(albumPhoto);\n\n return gridView;\n }",
"@Override\n public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {\n }",
"@Override\n public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {\n if (holder instanceof LoadingViewHolder) {\n LoadingViewHolder loadingViewHolder = (LoadingViewHolder) holder;\n if ( loadingViewHolder.loading_progressbar !=null) {\n loadingViewHolder.loading_progressbar.setIndeterminate(true);\n }\n }else if (holder instanceof HeaderViewHolder){\n onCreateHeaderView(holder,position);\n }else {\n if (addedHeader()){\n onCreateMainView(holder,position -1);\n }else {\n onCreateMainView(holder, position);\n }\n }\n\n\n }",
"public interface PhotoGalleryView extends LoadingView {\n\n void showPhotos(ArrayList<PhotoGalleryItem> arPhotos);\n\n void openFullSizePhoto(int position, ArrayList<PhotoGalleryItem> ar);\n\n void setLoadedCount(int loadedCount, int size);\n\n void showToolbarLoading();\n\n void onAdd(ArrayList<PhotoGalleryItem> ar);\n\n void setPosition(int position);\n}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_down_load_manage, container, false);\n mListView = (ListView) view.findViewById(R.id.lv_download);\n tvEmpty = (RelativeLayout) view.findViewById(R.id.empty_offline);\n initView();\n getUpdateInfo();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_news, container, false);\n progressBar = (ProgressBar)v.findViewById(R.id.progressBar);\n progressBar.setVisibility(View.INVISIBLE);\n list = (ListView)v.findViewById(R.id.listView);\n new parseMagic().execute();\n return v;\n }",
"ImageView getView() {\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view= inflater.inflate(R.layout.fragment_fragment__branches__ecet, container, false);\n recyclerView = view.findViewById(R.id.recyclebranch);\n\n p=view.findViewById(R.id.progress);\n retry=view.findViewById(R.id.retry);\n r=(SwipeRefreshLayout)view.findViewById(R.id.refreshcollege);\n\n recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));\n\n retry.setVisibility(View.INVISIBLE);\n\n r.setColorSchemeResources(R.color.cutdown);\n r.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n start(view);\n r.setRefreshing(false);\n }\n },2000);\n }\n });\n\n start(view);\n\n\n return view;\n }",
"@Override\r\n\t\tpublic void onLoadingFailed(String arg0, View arg1, FailReason arg2) {\n\t\t\tholder.app_icon.setVisibility(View.VISIBLE);\r\n\t\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View rootView = inflater.inflate(R.layout.fragment_now_playing, container, false);\n rvNowPlaying = (RecyclerView)rootView.findViewById(R.id.rv_now_playing);\n\n nowPlayingList = new ArrayList<>();\n NowPlayingAsync nowPlayingAsync = new NowPlayingAsync();\n nowPlayingAsync.execute(URL);\n\n return rootView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n mMovieListAdapter = new MovieListAdapter(getActivity(), null, 0);\n\n // Inflate the layout for this fragment\n View view = inflater.inflate(R.layout.fragment_movie, container, false);\n progressBar = (ProgressBar) view.findViewById(R.id.progressbar);\n progressBar.setVisibility(View.INVISIBLE);\n\n mGridView = (GridView) view.findViewById(R.id.movie_fragment_gridview);\n mGridView.setAdapter(mMovieListAdapter);\n\n // Call the Callback listner method of the activity and pass the required message up to the activity\n mGridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Cursor cursor = (Cursor) mMovieListAdapter.getItem(position);\n if (cursor != null) {\n String movieId = cursor.getString(MovieUtility.COL_MOVIE_ID);\n ((Callback) getActivity()).onItemSelected(movieId);\n\n }\n }\n });\n\n return view;\n }",
"public interface IView {\n\n void showLoading();\n\n\n void handlerView(int what, Object data);\n\n\n\n\n}",
"@Override\n protected void loadViewLayout() {\n setContentView(R.layout.ui_imgs_graffit);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_synchronous_content, container, false);\n ButterKnife.bind(this, view);\n\n initProgress();\n return view;\n }",
"private void initView() {\n\n }",
"@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\tMyGridViewHolder viewHolder = null;\n\t\tif(convertView == null){\n\t\t\tviewHolder = new MyGridViewHolder();\n\t\t\tconvertView = mLayoutInflater.inflate(R.layout.imageloader_gridview_item, null);\n\t\t\tviewHolder.imageview_thumbnail = (ImageView)convertView.findViewById(R.id.imageview_thumbnail);\n\t\t\tconvertView.setTag(viewHolder);\n\t\t}else{\n\t\t\tviewHolder = (MyGridViewHolder)convertView.getTag();\n\t\t}\n\t\t\n\t\tString url = mList.get(position);\n//\t\tif (cancelPotentialLoad(url, viewHolder.imageview_thumbnail)) {\n//\t AsyncLoadImageTask task = new AsyncLoadImageTask(viewHolder.imageview_thumbnail);\n//\t LoadedDrawable loadedDrawable = new LoadedDrawable(task);\n//\t viewHolder.imageview_thumbnail.setImageDrawable(loadedDrawable);\n//\t task.execute(position);\n//\t }\t\t \n\t\t\n\t\t/////////////////////\n\t\tif (!busyFlag) {\n\t\t\tif (AsyncImageLoader2.bitmapCache.size() > 0 &&\n\t\t\t\t\tAsyncImageLoader2.bitmapCache.get(url) != null) {\n\t\t\t\tSystem.out.println(\"busy,but i have cache:\" + url);\n\t\t\t\tviewHolder.imageview_thumbnail.setImageBitmap(AsyncImageLoader2.bitmapCache.get(url).get());\n\t\t\t}else {\n\t\t\t\tSystem.out.println(\"busy,no cache:\" + url);\n\t\t\t\tviewHolder.imageview_thumbnail.setImageResource(R.drawable.imageloader_default_icon);\n\t\t\t}\n\t\t}else {\n\t\t\tBitmap cacheBitmap = asyncImageLoader.loadImage(url, viewHolder.imageview_thumbnail, new ILoadImageCallback() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onObtainDrawable(Drawable drawable, ImageView imageView) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onObtainBitmap(Bitmap bitmap, ImageView imageView) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\timageView.setImageBitmap(bitmap);\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tif (null != cacheBitmap) {\n\t\t\t\tSystem.out.println(\"not busy, not null:\" + url);\n\t\t\t\tviewHolder.imageview_thumbnail.setImageBitmap(cacheBitmap);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(\"not busy, null:\" + url);\n//\t\t\t\tviewHolder.imageview_thumbnail.setImageResource(R.drawable.imageloader_default_icon);\n\t\t\t\tviewHolder.imageview_thumbnail.setImageDrawable(mContext.getResources().getDrawable(R.drawable.imageloader_default_icon));\n\t\t\t}\n\t\t}\n\t\t\n\t\t////////////////////////\n\t\treturn convertView;\n\t}",
"public void initViews(){\n }",
"public void setLoadingView(int resId) {\t\t\n\t\tfooter = ((LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(resId, null);\t\t//\t\tfooter = (View)inflater.inflate(resId, null);\n\t\tthis.addFooterView(footer);\n\t}",
"public void onLoadResource (WebView view, String url) {\n if (progressDialog == null) {\n // in standard case YourActivity.this\n progressDialog = new ProgressDialog(SearchActivity.this);\n progressDialog.setMessage(\"Loading...\");\n progressDialog.show();\n }\n }",
"@Override\n\t\tprotected void onPreExecute()\n\t\t{\n\t\t\t//Initialize the ViewSwitcher object\n\t viewSwitcher = new ViewSwitcher(LoadingScreenActivity.this);\n\t \n\t\t\tviewSwitcher.addView(ViewSwitcher.inflate(LoadingScreenActivity.this, R.layout.loadingscreen, null));\n\n\t\t\tpb_progressBar = (ProgressBar) viewSwitcher.findViewById(R.id.progressBar1);\n\t\t\t\n\t\t\tpb_progressBar.setMax(100);\n\n\t\t\tsetContentView(viewSwitcher);\n\t\t}",
"@Override\n\tprotected void initView() {\n\t\tlvMsg=(ListView) findViewById(R.id.lv_activity_my_message);\n\t\tivBack = (ImageView) findViewById(R.id.activity_my_message_iv_back);\n\t\tprogressDialog=ProgressDialogHandle.getProgressDialog(this, null);\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_owner_payment, container, false);\n\n loading = (AVLoadingIndicatorView) v.findViewById(R.id.loading);\n\n ll_empty = (LinearLayout) v.findViewById(R.id.ll_empty);\n ll_empty.setVisibility(View.GONE);\n\n rv_payment = (RecyclerView) v.findViewById(R.id.rv_payment);\n rv_payment.setHasFixedSize(true);\n rv_payment.setLayoutManager(new LinearLayoutManager(getContext()));\n rv_payment.setItemAnimator(new DefaultItemAnimator());\n\n pref = getActivity().getSharedPreferences(Config.SHARED_PREF, Context.MODE_PRIVATE);\n token = pref.getString(\"token\", null);\n if (!token.isEmpty()) {\n loading.setVisibility(View.VISIBLE);\n loadPaymentData(\"Bearer \" + token);\n } else {\n Toast.makeText(getContext(), \"Something went wrong\", Toast.LENGTH_SHORT).show();\n }\n\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View view = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_main_story,null);\n mSwipeRefreshLayout = (SwipeRefreshLayout)view.findViewById(R.id.mainFragment_swipeRefreshLayout);\n\n mProgressDialog = new ProgressDialog(getActivity());\n mProgressDialog.setMessage(\"正在载入\");\n mProgressDialog.show();\n mSwipeRefreshLayout.setColorSchemeResources(android.R.color.holo_red_light);\n mSwipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n fetchData();\n }\n });\n\n mSwipeRefreshLayout.setRefreshing(true);\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View contentView = inflater.inflate(R.layout.fragment_restaurant_details_full_image, container, false);\n\n Log.d(\"mife\",\"stid = \" + stId);\n Button backBtn = (Button) contentView.findViewById(R.id.back_button);\n backBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if(listener != null)\n listener.onBack();\n }\n });\n imageView = (ImageView) contentView.findViewById(R.id.full_image);\n progressBar = (ProgressBar) contentView.findViewById(R.id.full_image_progressBar);\n st = Model.instace.getRestaurant(stId);\n Log.d(\"TAG\",\"got restaurant name: \" + st.name);\n\n\n if (st.imageUrl != null && !st.imageUrl.isEmpty() && !st.imageUrl.equals(\"\")){\n progressBar.setVisibility(View.VISIBLE);\n Model.instace.getImage(st.imageUrl, new Model.GetImageListener() {\n @Override\n public void onSuccess(Bitmap image) {\n imageView.setImageBitmap(image);\n progressBar.setVisibility(View.GONE);\n }\n\n @Override\n public void onFail() {\n progressBar.setVisibility(View.GONE);\n }\n });\n }\n\n\n return contentView;\n }",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_payables, container, false);\r\n ButterKnife.bind(this, v);\r\n\r\n sharedPreferences = getActivity().getSharedPreferences(\"GRP_INFO\", Context.MODE_PRIVATE);\r\n\r\n editor = sharedPreferences.edit();\r\n gpId = getArguments().getString(\"gpId\").toString();\r\n\r\n\r\n\r\n model = new PayablesModelImplementation(getActivity());\r\n viewModel = new ViewModelProvider(getActivity()).get(PayablesViewModel.class);\r\n\r\n progressHUD = KProgressHUD.create(getActivity())\r\n .setStyle(KProgressHUD.Style.SPIN_INDETERMINATE)\r\n .setCancellable(false)\r\n .setAnimationSpeed(2)\r\n .setDimAmount(0.5f);\r\n\r\n nextImage.setOnClickListener(v12 -> postPayablesOperation());\r\n\r\n backBt.setOnClickListener(v1 -> getActivity().getSupportFragmentManager().popBackStack());\r\n return v;\r\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_events, container, false);\n rvEvents = (RecyclerView)view.findViewById(R.id.RvEvents);\n tvRedError = (TextView)view.findViewById(R.id.TvRedError);\n imgReload = (ImageView)view.findViewById(R.id.ImgVReload);\n imgCharge = (ImageView)view.findViewById(R.id.ImgVChargeEditB);\n imgCharge.setImageResource(R.mipmap.ic_charge);\n anim = AnimationUtils.loadAnimation(getContext(), R.anim.anim_charge_rotation);\n anim.setDuration(2000);\n imgCharge.startAnimation(anim);\n preferences = getActivity().getSharedPreferences(\"UserInfo\",0);\n reportList();\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_splash_screen, container, false);\n ButterKnife.bind(this,view);\n if (!NetworkUtils.isNetworkAvailable(getContext())) {\n AlertDialog.Builder builder1 = new AlertDialog.Builder(getContext());\n builder1.setMessage(\"No Internet Connection Available !\");\n builder1.setCancelable(true);\n builder1.setPositiveButton(\n \"Retry\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n if (!NetworkUtils.isNetworkAvailable(getContext())) {\n\n Toast.makeText(getContext(), \"No Internet Connection\", Toast.LENGTH_SHORT).show();\n }\n\n else {\n dialog.dismiss();\n }\n }\n });\n\n builder1.setNegativeButton(\n \"Cancel\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }\n });\n\n AlertDialog alert = builder1.create();\n alert.show();\n }\n Glide.with(this).load(R.drawable.codenicely_logo).into(codenicely_logo);\n Glide.with(this).load(R.drawable.logo).into(one_mile_logo);\n tag_line.setVisibility(View.VISIBLE);\n splashScreenPresenter = new SplashScreenPresenterImpl(this, new RetrofitSplashScreenProvider());\n splashScreenPresenter.getSplashResponse();\n sharedPrefs = new SharedPrefs(getContext());\n\n return view;\n }",
"private void initViews() {\n\n }",
"public void showLoadingView() {\n handleLoadingContainer(false /* showContent */, false /* showEmpty */, false /* animate */);\n }",
"private void setEmptyView(View emptyView)\n\t{\n\t\tif (mLoadingView != null)\n\t\t{\n\t\t\t((ViewGroup) mListView.getParent()).removeView(mLoadingView);\n\t\t}\n\t\tmLoadingView = emptyView;\n\t\tRelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT);\n\t\tmLoadingView.setLayoutParams(params);\n\t\t((ViewGroup) mListView.getParent()).addView(mLoadingView);\n\t\tmListView.setEmptyView(mLoadingView);\n\t}",
"@Override\n public void onLoadingStarted(String imageUri, View view) {\n Log.d(TAG, \"#onLoadingStarted imageUri = \"+imageUri);\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_planning, container, false);\n\n ((MainActivity) getActivity()).setToolbarTitle(\"Planning\");\n progressDialog = new ProgressDialog(getActivity());\n progressDialog.setIndeterminate(true);\n progressDialog.setMessage(\"Loading...\");\n progressDialog.show();\n listEvents = (ListView) view.findViewById(R.id.list_events);\n listEvents.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Planning clicked = (Planning) listEvents.getItemAtPosition(position);\n if (clicked.getEvent_registered() != null && clicked.getEvent_registered().equals(\"registered\")\n && clicked.getAllow_token()\n )\n ((MainActivity) getActivity()).loadTokenFragment(clicked.getScolaryear(),\n clicked.getCodemodule(),\n clicked.getCodeinstance(),\n clicked.getCodeacti(),\n clicked.getCodeevent());\n }\n });\n searchBar = (EditText) view.findViewById(R.id.planning_search);\n if (getActivity() == null) {\n progressDialog.dismiss();\n return view;\n }\n adapter = new PlanningAdapter(getActivity(), events);\n spinner = (Spinner) view.findViewById(R.id.planning_semester_spinner);\n ArrayAdapter<CharSequence> spinnerAdapter = ArrayAdapter.createFromResource(getActivity(),\n R.array.module_semester_spinner_array,\n android.R.layout.simple_spinner_item);\n\n spinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinner.setAdapter(spinnerAdapter);\n\n if (UserData.getInstance().getToken() != null) {\n new Task().execute();\n } else {\n progressDialog.dismiss();\n }\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bus_single_item_shop, container, false);\n\n\n AndroidSupportInjection.inject(this);\n ButterKnife.bind(this, view);\n\n //TODO take care of the progressBar\n\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_good_image, container, false);\n ButterKnife.bind(this, view);\n Glide.with(getActivity())\n .load(imagePath)\n .error(Glide.with(getActivity()).load(R.drawable.goods_default))\n .into(goodImg);\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View v = inflater.inflate(R.layout.fragment_feed_json, container, false);\n mListView = (ListView) v.findViewById(R.id.listview);\n// mBlurredImage = (ImageView) v.findViewById(R.id.blurred_image);\n// mNormalImage = (ImageView) v.findViewById(R.id.normal_image);\n new FeedAsynTask().execute(\"http://codemobiles.com/adhoc/feed/youtube_feed.php\");\n\n return v;\n\n }",
"@Override\n protected void onStartLoading() {\n if (idlingResource != null) {\n idlingResource.setIdleState(false);\n }\n\n if (recepts != null) {\n deliverResult(recepts);\n } else {\n mLoadingIndicator.setVisibility(View.VISIBLE);\n forceLoad();\n }\n }",
"void onFinishedLoading();",
"public View getView() { return view; }",
"private void showLoading() {\n mRecycleView.setVisibility(View.INVISIBLE);\n /* Finally, show the loading indicator */\n mLoadingIndicator.setVisibility(View.VISIBLE);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n\n queue= Volley.newRequestQueue(getContext());\n pd= new ProgressDialog(getContext());\n pd.setProgressStyle(pd.STYLE_SPINNER);\n pd.setTitle(\"Login __ !\");\n pd.setMessage(\"Plz Wait ___ !\");\n alertDialog= new AlertDialog.Builder(getContext()).create();\n alertDialog.setTitle(\"Message\");\n\n\n\n\n View rootview = inflater.inflate(R.layout.fragment_booking_history, container, false);\n list= (ListView) rootview.findViewById(R.id.listHistory);\n tdisplay= (TextView) rootview.findViewById(R.id.display);\n\n\n\n findBooking();\n return rootview;\n }",
"public void initView(){}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n final View view = inflater.inflate(R.layout.fragment_home, container, false);\n\n\n recyclerView = view.findViewById(R.id.recycleview);\n\n progressBar = view.findViewById(R.id.progressbar);\n\n progressBar.setVisibility(View.VISIBLE);\n\n RecyclerView.LayoutManager layoutManager = new GridLayoutManager(getContext(), 2, RecyclerView.VERTICAL, false);\n recyclerView.setLayoutManager(layoutManager);\n recyclerView.addItemDecoration(new GridSpacingItemDecoration(2, 20, true));\n recyclerView.setItemAnimator(new DefaultItemAnimator());\n\n return view;\n }",
"private void initViews(){\n rootView = View.inflate(getContext(), R.layout.fragment_titles, null);\n unbinder = ButterKnife.bind(this, rootView);\n listener = new TitleListener() {\n @Override\n public void onClick(View view, int position, String id , String label) {\n Intent intent = new Intent();\n intent.putExtra(MEConstants.TITLE_ID, id);\n intent.putExtra(MEConstants.TITLE_LABEL , label);\n\n getTargetFragment().onActivityResult(getTargetRequestCode() , 109 , intent);\n\n dismiss();\n }\n };\n if(!DeviceConnectivity.isNetworkAvailable(getContext())) {\n loader.setVisibility(View.GONE);\n noTitles.setVisibility(View.GONE);\n llConnectivityDialog.setVisibility(View.VISIBLE);\n llTitles.setVisibility(View.GONE);\n } else {\n getTitlesWS();\n }\n }",
"public interface ILoaderView extends IView {\n\n void showLoading(String loadingMessage);\n\n void hideLoading();\n\n void showError(String title, String message);\n\n}"
] | [
"0.75615203",
"0.74494773",
"0.7446948",
"0.7371172",
"0.7356045",
"0.7356045",
"0.7336416",
"0.73265237",
"0.7312038",
"0.7287237",
"0.70237035",
"0.6946704",
"0.6913425",
"0.6896624",
"0.679046",
"0.67349046",
"0.6711601",
"0.6683244",
"0.6658766",
"0.66499805",
"0.6635336",
"0.66239274",
"0.66107666",
"0.66106784",
"0.6585557",
"0.65821934",
"0.6581233",
"0.65696174",
"0.6567699",
"0.6561492",
"0.65562123",
"0.6551066",
"0.6542849",
"0.652852",
"0.6527045",
"0.6519883",
"0.6507309",
"0.64935434",
"0.64922774",
"0.6448572",
"0.64456594",
"0.6432201",
"0.6431839",
"0.64288163",
"0.64266497",
"0.6423468",
"0.64078635",
"0.64074415",
"0.64006263",
"0.63935727",
"0.6382208",
"0.6381699",
"0.6376849",
"0.6365555",
"0.63640183",
"0.63517445",
"0.6351007",
"0.6341686",
"0.6338122",
"0.6333859",
"0.6333521",
"0.6326669",
"0.6325387",
"0.63173705",
"0.6316877",
"0.6310958",
"0.6302653",
"0.6285762",
"0.6279683",
"0.62790203",
"0.6273521",
"0.6272821",
"0.62631345",
"0.62616515",
"0.624132",
"0.6231976",
"0.6228284",
"0.62227005",
"0.6222669",
"0.621983",
"0.62182194",
"0.6204347",
"0.6201551",
"0.61991334",
"0.61989874",
"0.6197602",
"0.6195579",
"0.6190543",
"0.61874056",
"0.61859983",
"0.6181496",
"0.6181359",
"0.6180588",
"0.61797184",
"0.617956",
"0.6158845",
"0.6154655",
"0.61517036",
"0.6150235",
"0.6145488"
] | 0.6303602 | 66 |
ZigzagIterator it = new ZigzagIterator(Arrays.asList(1,2), Arrays.asList(3,4,5,6)); | public static void main(String[] args) {
ZigzagIterator it = new ZigzagIterator(Arrays.asList(1,2,3), Arrays.asList(4,5,6,7), Arrays.asList(8,9));
while(it.hasNext()) {
System.out.println(it.next());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void ZigZag(int x[] , int y[]){\n int a[] = new int[x.length + y.length];\n\t\tint k = 0;\n\t\tfor(int i = 0; i < x.length; i++){\n\t\t\ta[k++] = x[i];\n\t\t}\n\t\tfor(int i = 0; i < y.length; i++){\n\t\t\ta[k++] = y[i];\n\t\t}\n\t\tboolean flag = true;\n\t\tfor(int i= 0; i <= a.length - 2; i++){\n\t\t\tif(flag){\n\t\t\t\tif(a[i] > a[i + 1]){\n\t\t\t\t\tint temp = a[i];\n\t\t\t\t\ta[i] = a[i + 1];\n\t\t\t\t\ta[i + 1] = temp;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(a[i] < a[i + 1]){\n\t\t\t\t\tint temp = a[i];\n\t\t\t\t\ta[i] = a[i + 1];\n\t\t\t\t\ta[i + 1] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t\tflag = !flag;\n\t\t}\n\n\t\tfor(Integer xc : a) System.out.print(xc + \" \");\n\t}",
"public Iterator<BigInteger> iterator() {\n // return new FibIterator();\n return new Iterator<BigInteger>() {\n private BigInteger previous = BigInteger.valueOf(-1);\n private BigInteger current = BigInteger.ONE;\n private int index = 0;\n \n \n @Override\n //if either true will stop, evaluates upper < 0 first (short circuit)\n public boolean hasNext() {\n return upper < 0 || index < upper;\n }\n\n @Override\n //Creating a new value called next\n public BigInteger next() {\n BigInteger next = previous.add(current);\n previous = current;\n current = next;\n index++;\n return current;\n }\n \n };\n }",
"public static void main(String[] args) {\n\t\tBinaryNode root = new BinaryNode(1);\n root.left = new BinaryNode(2);\n root.right = new BinaryNode(3);\n root.left.left = new BinaryNode(4);\n root.right.left = new BinaryNode(5);\n root.right.right = new BinaryNode(6);\n root.right.left.left = new BinaryNode(7);\n root.right.left.right = new BinaryNode(8);\n ZigZag(root);\n\n\t\t\n\n\t}",
"IteratorExp createIteratorExp();",
"public static void MergeArrayZigZagWay(int a[] , int b[]){\n int na[] = new int[a.length + b.length];\n\t\tint k = 0;\n\t\tfor(int i = 0; i < a.length; i++){\n\t\t\tna[k++] = a[i];\n\t\t}\n\t\tfor(int i = 0; i < b.length; i++){\n\t\t\tna[k++] = b[i];\n\t\t}\n\t\tArrays.sort(na);\n\t\tint j = na.length - 1;\n\t\tint i = 0;\n\t\twhile(i < j){\n\t\t\tint temp = na[i];\n\t\t\tna[i] = na[j];\n\t\t\tna[j] = temp;\n\t\t\ti++;\n\t\t\tj--;\n\t\t}\n\t\tfor(Integer x : na) {\n\t\t\tSystem.out.print(x + \" \");\n\t\t}\n \n }",
"@Test\n void solvesTestCase() {\n TreeNode root = new TreeNode(3);\n root.left = new TreeNode(9);\n root.right = new TreeNode(20);\n root.right.left = new TreeNode(15);\n root.right.right = new TreeNode(7);\n\n List<List<Integer>> traversal = new ZigZagLevelOrder().zigzagLevelOrder(root);\n assertThat(traversal.size()).isEqualTo(3);\n assertThat(traversal.get(0)).containsExactly(3);\n assertThat(traversal.get(1)).containsExactly(20, 9);\n assertThat(traversal.get(2)).containsExactly(15, 7);\n }",
"private ZigzagStroke() {}",
"public static Iterator buildIterator(Object[] paramArrayOfObject, int paramInt1, int paramInt2)\n/* */ {\n/* 113 */ if ((paramArrayOfObject == null) || (paramInt1 >= paramInt2)) {\n/* 114 */ return EMPTY_ITERATOR;\n/* */ }\n/* 116 */ return new ArrayRangeIterator(paramArrayOfObject, paramInt1, paramInt2);\n/* */ }",
"@Override\n public Iterator<Integer> iterator() {\n return new Iterator<>() {\n int i = 0;\n\n @Override\n public boolean hasNext() {\n return i < Set.this.count;\n }\n\n @Override\n public Integer next() {\n return Set.this.arr[i++];\n }\n };\n }",
"<C, PM> IteratorExp<C, PM> createIteratorExp();",
"public DbIterator iterator() {\n // some code goes here\n if (gbfield == Aggregator.NO_GROUPING) {\n Type[] tp = new Type[1];\n tp[0] = Type.INT_TYPE;\n String[] fn = new String[1];\n fn[0] = aop.toString();\n TupleDesc td = new TupleDesc(tp, fn);\n Tuple t = new Tuple(td);\n t.setField(0, new IntField(gbCount.get(null)));\n ArrayList<Tuple> a = new ArrayList<>();\n a.add(t);\n return new TupleIterator(td, a);\n } else {\n Type[] tp = new Type[2];\n tp[0] = gbfieldtype;\n tp[1] = Type.INT_TYPE;\n String[] fn = new String[2];\n fn[0] = gbname;\n fn[1] = aop.toString();\n TupleDesc td = new TupleDesc(tp, fn);\n ArrayList<Tuple> a = new ArrayList<>();\n for (Field f : gbCount.keySet()) {\n Tuple t = new Tuple(td);\n t.setField(0, f);\n t.setField(1, new IntField(gbCount.get(f)));\n a.add(t);\n }\n return new TupleIterator(td, a);\n }\n }",
"public VectorStackWithIterator() {\n\t\tthis(10);\n\t}",
"@Test\r\n public void descendingIterator() throws Exception {\r\n Iterator<Integer> it = sInt.descendingIterator();\r\n int[] arr = {5, 4, 3, 2, 1};\r\n int[] res = new int[5];\r\n int i = 0;\r\n while (it.hasNext()) {\r\n res[i++] = it.next();\r\n }\r\n assertArrayEquals(arr, res);\r\n }",
"public OpIterator iterator() {\n // some code goes here\n // throw new\n // UnsupportedOperationException(\"please implement me for lab2\");\n return new InterAggrIterator();\n }",
"Iterator<T> iterator();",
"public static void main(String[] args) \n\t{\n\t Scanner sc = new Scanner(System.in);\n\t \n\t // Input the number of test cases\n\t int t = sc.nextInt();\n\t \n\t sc.nextLine();\n\t \n\t while (t > 0)\n\t {\n\t \tint N = sc.nextInt();\n\t \t\n\t \tint[] arr = new int[N];\n\t \t\n\t \tsc.nextLine();\n\t \t\n\t \tString line = sc.nextLine();\n\t String[] lineArr = line.split(\" \");\n\n\t for (int i = 0; i < lineArr.length; i++)\n\t {\n\t \tarr[i] = Integer.parseInt(lineArr[i]);\n\t }\n\t \n\t printZigZagArray(arr);\n\n\t t--;\t \n\t }\n\t \n\t sc.close();\t\n\t}",
"public abstract Iterator<E> createIterator();",
"@Override\n public Iterator<E> iterator() {\n return new Iterator<>() {\n public int currentIndex = 0;\n @Override\n public boolean hasNext() {\n if (size == 0){\n return false;\n }\n return currentIndex + 1 <= size;\n }\n\n @Override\n public E next() {\n return heap[currentIndex++];\n }\n @Override\n public void remove(){\n if (size > 0){\n currentIndex = currentIndex == 0 ? 0 : currentIndex - 1;\n heap[currentIndex] = heap[--size];\n siftDown(currentIndex);\n } else {\n throw new IllegalStateException();\n }\n }\n };\n }",
"public void printZigZag(){\n if(root == null)\n return;\n\n // add root and null to queue, declare bool value print and a stack\n Queue<Node<T>> queue = new LinkedList<>();\n queue.add(root);\n queue.add(null);\n boolean print = true;\n Stack<Node<T>> stack = new Stack<Node<T>>();\n\n while(queue.size() != 0){\n Node<T> node = queue.remove();\n if(node != null){\n // if print is true print the node else add it in stack\n if(print)\n System.out.print(node.data + \" ,\");\n else\n stack.push(node);\n\n // add left and right node if they exist\n if(node.left != null)\n queue.add(node.left);\n if(node.right != null)\n queue.add(node.right);\n }else{\n // flip print and empty stack and print\n print = !print;\n while(stack.size() != 0){\n System.out.print(stack.pop().data + \" ,\");\n }\n System.out.println();\n if(queue.size() == 0)\n break;\n queue.add(null);\n }\n }\n\n // check if there is any remaining elements in stack\n while(stack.size() != 0){\n System.out.print(stack.pop().data + \" ,\");\n }\n System.out.println();\n }",
"@Override\n\tpublic Iterator<NumberInterface> createIterator() {\n\t\treturn numbers.iterator();\n\t}",
"@SuppressWarnings(\"unchecked\")\n private <X> Iterator<X> itx(Iterator<X>[] ita) {\n if (ita == null || ita.length == 0) \n return (Iterator<X>)Arrays.stream(ofDim(Iterator.class,0)).iterator();\n return new Iterator<X>() {\n private int i = 0;\n public boolean hasNext() {\n while ( i < ita.length && !ita[i].hasNext()) i++;\n return i < ita.length;\n }\n public X next() {\n while ( i < ita.length && !ita[i].hasNext()) i++;\n return ita[i].next();\n }\n };\n }",
"@Test\n public void testIterator_Forward() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n\n int i = 0;\n while (instance.hasNext()) {\n assertEquals(baseList.get(i++), instance.next());\n }\n\n }",
"Iterator<E> iterator();",
"Iterator<E> iterator();",
"public void byLevelZigZag(int maxLevel) {\n\n if (root == null) System.out.println(\"Empty Tree :(\");\n else if (maxLevel <= 0) System.out.println(root.element);\n else{\n\n for (int i = maxLevel; i >= 0; i--) {\n zigZagger(root, i, 0);\n\n }\n }\n }",
"Iterator<K> iterator();",
"public int getIteration();",
"public static void main(String[] args) {\n\t\tZBinaryTree tree = new ZBinaryTree();\n\t\ttree.rootNode = new ZNode(1);\n\t\ttree.rootNode.leftChild = new ZNode(2);\n\t\ttree.rootNode.rightChild = new ZNode(3);\n\t\ttree.rootNode.leftChild.leftChild = new ZNode(7);\n\t\ttree.rootNode.leftChild.rightChild = new ZNode(6);\n\t\ttree.rootNode.rightChild.leftChild = new ZNode(5);\n\t\ttree.rootNode.rightChild.rightChild = new ZNode(4);\n\n\t\tSystem.out.println(\"ZigZag Order traversal of binary tree is\");\n\t\ttree.printZigZagTraversal();\n\t}",
"private static String ZigZagConversionTest(String test, int rows) {\n\t\tString[] Temp = new String[rows];\r\n\t\tString result = \"\";\r\n\t\t\r\n\t\tif(rows == 1){\r\n\t\t\treturn test;\r\n\t\t}\r\n\t\t\r\n\t\tfor(int a = 0; a<rows;a++){\r\n\t\t\tTemp[a] = \"\";\r\n\t\t}\r\n\r\n\t\tfor(int i = 0; i<test.length(); i++){\r\n\t\t\tint pos = (i)%(2*rows-2);\r\n\t\t\tif(pos < rows){\r\n\t\t\t\tSystem.out.println(\"position is type1: \" + pos + test.charAt(i));\r\n\t\t\t\tTemp[pos] = Temp[pos] + String.valueOf(test.charAt(i));\r\n\t\t\t\tSystem.out.println(\"Current string for row \" + pos + \": \" + Temp[pos]);\r\n\t\t\t}else{\r\n\t\t\t\tSystem.out.println(\"position is type2: \" + pos + test.charAt(i));\r\n\t\t\t\tTemp[2*rows-2-pos] = Temp[2*rows-2-pos] + String.valueOf(test.charAt(i));\r\n\t\t\t\tSystem.out.println(\"Current string for row \" + pos + \": \" + Temp[2*rows-2-pos]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(int j = 0; j<rows;j++){\r\n\t\t\tresult = result + Temp[j];\r\n\t\t\tSystem.out.println(\"Current Row: \" + j + \" \" + result);\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public Iterator<T> inorderIterator() { return new InorderIterator(root); }",
"@Test\n public void test8() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1354,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test8\");\n Integer[] integerArray0 = new Integer[9];\n ResettableListIterator<Integer> resettableListIterator0 = IteratorUtils.arrayListIterator(integerArray0);\n assertEquals(true, resettableListIterator0.hasNext());\n }",
"iterator(){current = start;}",
"public Iterator<ElementType> iterator(){\n return new InnerIterator();\n }",
"public static void m8() {\r\n\tfor(int i =1;i<=5;i++) {\r\n\t\tchar ch ='A';\r\n\t\tfor(int j=5;j>=i;j--) {\r\n\t\t\tSystem.out.print(ch);\r\n\t\t\tch++;\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}\r\n}",
"Iterator features();",
"public static void main(String[] args){\n\n int[] test = {5,1,3,4,1};\n\n System.out.println(greedy(test));\n\n }",
"public Iterator<E> iteratorRev();",
"public Iterable<Key> iterator() {\n Queue<Key> queue = new LinkedList<>();\n inorder(root, queue);\n return queue;\n }",
"@Override\n public Iterator<E> iterator() {\n // Yup.\n Iterator<E> ans = new Iterator<E>(){\n private int curIndex = 0;\n\n @Override\n public boolean hasNext(){\n return curIndex < size && queue[curIndex] != null;\n }\n @Override\n public E next(){\n return (E)queue[curIndex++];\n }\n public void remove(){\n // No.\n }\n };\n return ans;\n }",
"public void testIterator01() {\r\n\t\tBTree<String, Integer> bt = new BTree<String, Integer>(4);\r\n\t\tList<String> words = TestUtils.randomWords(256, 3);\r\n\r\n\t\tfor (int i = 0; i < words.size(); i++) {\r\n\t\t\tbt.set(words.get(i), i);\r\n\t\t}\r\n\r\n\t\tCollections.sort(words);\r\n\t\tStringBuilder expected = new StringBuilder();\r\n\t\tfor (int i = 0; i < words.size(); i++) {\r\n\t\t\texpected.append(words.get(i)).append(',');\r\n\t\t}\r\n\r\n\t\tStringBuilder actual = new StringBuilder();\r\n\t\tfor (Entry<String, Integer> e : bt) {\r\n\t\t\tactual.append(e.getKey()).append(',');\r\n\t\t}\r\n\r\n\t\tassertEquals(actual.toString(), expected.toString());\r\n\t}",
"public static void main(String[] args) {\n var x = new Iterator1(\"123456789101112\");\n System.out.println(x.getNums());\n for (String d : x) {\n System.out.println(d);\n }\n x.iterReverse = false;\n System.out.println(\"*****\");\n for (String d : x) {\n System.out.println(d);\n }\n }",
"@Override\n protected Z advanceG(final long k) {\n return Z.valueOf(5 * k - 2); // mSeqG.next();\n }",
"public ArrayList<ArrayList<Integer>> zigzagLevelOrder(TreeNode root) {\n ArrayList<ArrayList<Integer>> list=new ArrayList<ArrayList<Integer>>(); \n if(root==null) return list; \n Stack<TreeNode> T=new Stack<TreeNode>(); \n Stack<TreeNode> S=new Stack<TreeNode>(); \n ArrayList<Integer> sub=new ArrayList<Integer>(); \n T.push(root);\n boolean reverse=false; \n while(!T.isEmpty())\n {\n TreeNode top=T.pop();\n sub.add(top.val);\n if(!reverse)\n {\n if(top.left!=null) S.push(top.left);\n if(top.right!=null) S.push(top.right);\n }else\n {\n if(top.right!=null) S.push(top.right);\n if(top.left!=null) S.push(top.left);\n }\n if(T.isEmpty())\n {\n list.add(sub);\n T=S;\n S=new Stack<TreeNode>();\n reverse=!reverse; \n sub=new ArrayList<Integer>(); \n }\n }\n return list; \n }",
"@Override\n public Iterator<Integer> iterator() {\n return new IteratorImplementation();\n }",
"public Iterator<T> byGenerations() {\r\n ArrayIterator<T> iter = new ArrayIterator<T>();\r\n\r\n for (int i = 0; i < SIZE; i++) {\r\n iter.add(tree[i]);\r\n }\r\n\r\n return iter;\r\n }",
"public void linewiseZigZag2() {\n\n\t\tLinkedList<Node> clq = new LinkedList<>();\n\t\tLinkedList<Node> nls = new LinkedList<>();\n\n\t\tclq.addLast(root);\n\t\tint level = 1;\n\t\twhile (clq.size() > 0) {\n\t\t\tNode temp = clq.removeFirst();\n\t\t\tSystem.out.print(temp.data + \" \");\n\t\t\tif (level % 2 == 1) {\n\t\t\t\tfor (int i = 0; i < temp.children.size(); i++) {\n\t\t\t\t\tnls.addFirst(temp.children.get(i));\n\t\t\t\t\t;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (int i = temp.children.size() - 1; i >= 0; i--) {\n\t\t\t\t\tnls.addFirst(temp.children.get(i));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (clq.size() == 0) {\n\t\t\t\tSystem.out.println();\n\t\t\t\tclq = nls;\n\n\t\t\t\tlevel++;\n\t\t\t\tnls = new LinkedList<>();\n\t\t\t}\n\t\t}\n\n\t}",
"IterateExp createIterateExp();",
"@Test\r\n public void descendingSetIterator() throws Exception {\r\n TreeSet<Integer> kek = new TreeSet<>();\r\n kek.addAll(sInt);\r\n TreeSet<Integer> check = (TreeSet<Integer>) kek.descendingSet();\r\n Object[] arr1 = kek.toArray();\r\n Object[] arr2 = check.toArray();\r\n for (int i = 0; i < arr1.length; i++) {\r\n assertEquals(arr1[i], arr2[arr1.length - 1 - i]);\r\n }\r\n }",
"public Iterable<K> inOrder() {\n Queue<K> q = new Queue<>();\n inOrder(root, q);\n return q;\n }",
"@Override\n public Iterator<E> getInorderIterator() {\n return new InorderIterator();\n }",
"public InorderIterator() {\r\n\t\t\tinorder(); // Traverse binary tree and store elements in list\r\n\t\t}",
"public IteratorForXML(String i, String tag)\r\n/* 25: */ {\r\n/* 26:30 */ this(i, tag, tag);\r\n/* 27: */ }",
"public Iterator<Hex> iterator() {\n return new Iterator<Hex>() {\n private int g = 0;\n private int h = 0;\n @Override\n public boolean hasNext() {\n return g < hexWidth && h < hexHeight;\n }\n @Override\n public Hex next() {\n Hex result = hexes[g][h];\n if (++g == hexWidth) {\n g = 0;\n h++;\n }\n return result;\n }\n @Override\n public void remove() {\n throw new UnsupportedOperationException();\n }\n };\n }",
"public abstract Iterator<C17883a<E>> mo45843b();",
"@Test\n public void testGet1() {\n Zeckendorf z = new Zeckendorf();\n Iterator<Long> fibs = z.get(10).iterator();\n assertEquals(Long.valueOf(8), fibs.next());\n assertEquals(Long.valueOf(2), fibs.next());\n assertFalse(fibs.hasNext());\n }",
"@Test\n public void testIterator() {\n System.out.println(\"iterator\");\n Goban g = createGoban();\n ArrayList<PierrePoint> groupeAttendu = new ArrayList<>();\n groupeAttendu.add(g.getPierre(0, 0));\n groupeAttendu.add(g.getPierre(0, 1));\n groupeAttendu.add(g.getPierre(1, 0));\n GroupeDePierres groupe = new GroupeDePierres(g.getPierre(0, 0), g);\n \n for( PierrePoint p : groupe)\n {\n assertTrue(groupeAttendu.contains(p));\n }\n \n assertEquals(groupeAttendu.size(),groupe.size());\n }",
"@Test\r\n\tpublic void testIterator()\r\n\t{\r\n\t\tInteger[] results =\r\n\t\t{ 5, 7, 3 };\r\n\t\tint i = 0;\r\n\t\tfor (Integer item : threeElementsInOrder)\r\n\t\t{\r\n\t\t\tassertEquals(results[i], item);\r\n\t\t\ti++;\r\n\t\t}\r\n\t}",
"@Test\n public void testGet4() {\n Zeckendorf z = new Zeckendorf();\n Iterator<Long> fibs = z.get(10000).iterator();\n assertEquals(Long.valueOf(6765), fibs.next());\n assertEquals(Long.valueOf(2584), fibs.next());\n assertEquals(Long.valueOf(610), fibs.next());\n assertEquals(Long.valueOf(34), fibs.next());\n assertEquals(Long.valueOf(5), fibs.next());\n assertEquals(Long.valueOf(2), fibs.next());\n assertFalse(fibs.hasNext());\n }",
"private void gobble(Iterator<String> iter) {\n }",
"public InorderIterator() {\n inorder(); // Traverse binary tree and store elements in list\n }",
"BooleanIterator iterator(int startIndex);",
"@Test\n public void whenAddElementToTreeThenIteratorReturnsSorted() {\n final List<Integer> resultList = Arrays.asList(4, 3, 6);\n final List<Integer> testList = new LinkedList<>();\n this.tree.add(4);\n this.tree.add(6);\n this.tree.add(3);\n\n Iterator<Integer> iterator = this.tree.iterator();\n testList.add(iterator.next());\n testList.add(iterator.next());\n testList.add(iterator.next());\n\n assertThat(testList, is(resultList));\n }",
"public static Iterator buildIterator(Object[] paramArrayOfObject)\n/* */ {\n/* 122 */ if ((paramArrayOfObject == null) || (paramArrayOfObject.length == 0)) {\n/* 123 */ return ArrayRangeIterator.EMPTY_ITERATOR;\n/* */ }\n/* 125 */ return new SparseArrayIterator(paramArrayOfObject);\n/* */ }",
"<C, PM> IterateExp<C, PM> createIterateExp();",
"public RunIterator iterator() {\n // Replace the following line with your solution.\n return new RunIterator(runs.getFirst());\n // You'll want to construct a new RunIterator, but first you'll need to\n // write a constructor in the RunIterator class.\n \n \n }",
"public static void number_invsert(){\n for(int i=7; i > 0 ; i--){\n for(int j =1;j<=i;j++){\n System.out.print(j);\n }\n System.out.println();\n } \n }",
"@Test\n public void testGet2() {\n Zeckendorf z = new Zeckendorf();\n Iterator<Long> fibs = z.get(100).iterator();\n assertEquals(Long.valueOf(89), fibs.next());\n assertEquals(Long.valueOf(8), fibs.next());\n assertEquals(Long.valueOf(3), fibs.next());\n assertFalse(fibs.hasNext());\n }",
"public void interleave(Queue<Integer> q) {\n\tif(q.size() % 2 == 1) {\n\t\t\tthrow new IllegalArgumentException();\n\t} // after this point, guaranteed queue is even size\n\tStack<Integer> s = new ArrayStack<Integer>();\n\twhile(!q.isEmpty()) {\n\t\ts.push(q.dequeue());\n\t}\n\twhile(!s.isEmpty()) {\n\t\tq.enqueue(s.pop());\n\t}\n\twhile(!q.isEmpty()) {\n\t\ts.push(q.dequeue());\n\t} // all contents are in original order top-bot inside of stack\n\t// t[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]b\n\tint times = s.size(); // temp for correct bounds\n\tfor(int i = 0; i < times / 2; i++) { // we are splitting by two, so we only iterate 1/2 times\n\t\tq.enqueue(s.pop());\n\t} // after this point, we have queue f[1, 2, 3, 4, 5]b stack t[6, 7, 8, 9, 10]b\n\t// This closely recreates the process described by the spec. \n\t// We can just follow along at this point. The spec says 1 should be right next to 6\n\t// 2 should be right next to 7\n\t// 3 next to 8\n\t// We can see from here that we simply add 1 to the back and add 6 to the back of the queue\n\t// then we add 2 to the back of the queue and 7 to the back of the queue\n\t// then we add 3 back and 8 back\n\t// etc. This can be summarized as\n\t// q.add(q.remove());\n\t// q.add(s.pop());\n\t// And we only want to do this until all are interleaved, which is while !s.empty\n\twhile(!s.isEmpty()) {\n\t\tq.enqueue(q.dequeue());\n\t\tq.enqueue(s.pop());\n\t}\n\t// at this point, interleaved, correct orientation\n}",
"public DbIterator iterator() {\n // some code goes here\n //throw new UnsupportedOperationException(\"please implement me for proj2\");\n List<Tuple> tuparr = new ArrayList<Tuple>();\n Type[] typearr = new Type[]{gbfieldtype, Type.INT_TYPE};\n TupleDesc fortup = new TupleDesc(typearr, new String[]{null, null});\n Object[] keys = groups.keySet().toArray();\n for (int i = 0; i < keys.length; i++) {\n \n int key = (Integer) keys[i];\n \n Tuple tup = new Tuple(fortup);\n if (gbfieldtype == Type.STRING_TYPE) {\n tup.setField(0, hashstr.get(key));\n }\n else {\n tup.setField(0, new IntField(key));\n }\n //tup.setField(0, new IntField(key));\n tup.setField(1, new IntField(groups.get(key)));\n tuparr.add(tup); \n\n }\n List<Tuple> immutable = Collections.unmodifiableList(tuparr);\n TupleIterator tupiter = new TupleIterator(fortup, immutable);\n if (gbfield == NO_GROUPING) {\n List<Tuple> tuparr1 = new ArrayList<Tuple>();\n TupleDesc fortup1 = new TupleDesc(new Type[]{Type.INT_TYPE}, new String[]{null});\n Tuple tup1 = new Tuple(fortup1);\n tup1.setField(0, new IntField(groups.get(-1)));\n tuparr1.add(tup1);\n List<Tuple> immutable1 = Collections.unmodifiableList(tuparr1);\n TupleIterator tupiter1 = new TupleIterator(fortup1, immutable1);\n \n return (DbIterator) tupiter1;\n }\n return (DbIterator) tupiter;\n }",
"public DbIterator iterator() {\n \t\tArrayList<Tuple> tuples = new ArrayList<Tuple>(); //tuples to return\n TupleDesc desc;\n String[] names;\n\t \tType[] types;\n\t \t// these will be the TupleDesc to return\n\t \tif (gbfield == Aggregator.NO_GROUPING){\n\t \t\tnames = new String[] {\"aggregateVal\"};\n\t \t\ttypes = new Type[] {Type.INT_TYPE};\n\t \t} else {\n\t \t\tnames = new String[] {\"groupVal\", \"aggregateVal\"};\n\t \t\ttypes = new Type[] {gbfieldtype, Type.INT_TYPE};\n\t \t}\n\t \tdesc = new TupleDesc(types, names);\n\t \t\n\t \tTuple toAdd;\n\t \t// iterate over the GROUP BY entries and make the tuples\n\t \tIterator<Map.Entry<Field, Integer>> it = gbcount.entrySet().iterator();\n\t \tMap.Entry<Field, Integer> nextfield;\n\t \tint aggregateVal = 0;\n\t \twhile(it.hasNext()) {\n\t \t\tnextfield = it.next();\n\t \t\taggregateVal = nextfield.getValue();\n\t \t\ttoAdd = new Tuple(desc);\n\t \t\tif(gbfield == Aggregator.NO_GROUPING) {\n\t \t\t\ttoAdd.setField(0, new IntField(aggregateVal));\n\t \t\t} else {\n\t \t\t\ttoAdd.setField(0, nextfield.getKey());\n\t \t\t\ttoAdd.setField(1, new IntField(aggregateVal));\n\t \t\t}\n\t \t\ttuples.add(toAdd);\n\t \t}\n\t \treturn new TupleIterator(desc, tuples);\n }",
"@Test\n public void testIterator_Overflow() {\n OasisList<Integer> baseList = new SegmentedOasisList<>(2, 2);\n baseList.addAll(Arrays.asList(1, 2, 6, 8, 7, 8, 90));\n\n Iterator<Integer> instance = baseList.iterator();\n assertTrue(isEqual(instance, baseList));\n\n }",
"public SeqIter(Collection<Integer> unvisited, Collection<Integer> visited, int currentVertex, Graph g, ArrayList<Pair<Integer, Integer>> paires){\n\t\tthis.g = g;\n\t\tthis.candidates = new ArrayList<Integer>(unvisited.size()+1);\n\t\tthis.neighbours = new ArrayList<Integer>(unvisited.size()+1);\n\t\tfor (Integer s : unvisited){\n\t\t\tif (g.isArc(currentVertex, s))\n\t\t\t\tneighbours.add(s);\n\t\t\t\tfor(Pair<Integer, Integer> p : paires) {\n\t\t\t\t\tInteger key = p.getKey();\n\t\t\t\t\tInteger value = p.getValue();\n\t\t\t\t\tif(s == key) {\n\t\t\t\t\t\tcandidates.add(s);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else if(s == value) {\n\t\t\t\t\t\tif(visited.contains(key) || currentVertex == key) {\n\t\t\t\t\t\t\tcandidates.add(s);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t}",
"public Iterator<T> iterator();",
"public Iterator<T> iterator();",
"public Iterator<T> iterator();",
"public Iterator<T> iterator();",
"@Test\r\n public void shouldReturnFalseIfNoAnyEvenNumbers() {\r\n it = new EvenIterator(new int[]{1});\r\n assertThat(it.hasNext(), is(false));\r\n }",
"@Test\n public void testIterator() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n Iterator<Integer> instance = baseList.iterator();\n assertTrue(isEqual(instance, baseList));\n\n }",
"public static void m7() {\r\n\tchar ch ='A';\r\n\tfor(int i=1;i<=5;i++) {\r\n\t\tfor(int j =1;j<=i;j++)\r\n\t\t{\r\n\t\t\tSystem.out.print(ch);\r\n\t\t}\r\n\t\tch++;\r\n\t\tSystem.out.println();\r\n\t}\r\n}",
"public void inOrderTraverseIterative();",
"Iterator<T> iterator(int start, int limit);",
"private static List<Integer> reverseFibonnaci(int a, int b){\n List<Integer> res = new ArrayList<Integer>();\n Deque<Integer> stack = new ArrayDeque<Integer>();\n\n int prev2 = a;\n int prev1 = b;\n stack.push(prev2);\n stack.push(prev1);\n for(int i = 0; i < 10; i++){\n int sum = prev1 + prev2;\n stack.push(sum);\n prev2 = prev1;\n prev1 = sum;\n }\n\n while(!stack.isEmpty()){\n res.add(stack.pop());\n }\n\n\n return res;\n }",
"public Iterator<Integer> iterator() {\n\t\treturn new WrappedIntIterator(intIterator());\n\t}",
"public static void m5() {\r\nfor(int i =1;i<=5;i++) {\r\n\tchar ch ='A';\r\n\tfor(int j =1;j<=i;j++) {\r\n\t\tSystem.out.print(ch);\r\n\t\tch++;\r\n\t}\r\n\tSystem.out.println();\r\n}\t\r\n}",
"@Test\r\n public void allNumbersAreEven() {\r\n it = new EvenIterator(new int[]{2, 4, 6, 8});\r\n assertThat(it.hasNext(), is(true));\r\n assertThat(it.next(), is(2));\r\n assertThat(it.hasNext(), is(true));\r\n assertThat(it.next(), is(4));\r\n assertThat(it.hasNext(), is(true));\r\n assertThat(it.next(), is(6));\r\n assertThat(it.hasNext(), is(true));\r\n assertThat(it.next(), is(8));\r\n }",
"public static Iterator <Gate> iterator() {\n return allGates.iterator();\n }",
"@Override\r\n\tpublic Iterator<E> iterator() {\r\n\t\treturn new CircularGridIterator<E>(this);\r\n\t}",
"public IntIterator intIterator() {\n\t\treturn new BufferedEWAHintIterator(this);\n\t}",
"private Iterator<Integer> getIterator(Iterator<Iterator<Integer>> iter) {\n Iterator<Integer> iterator = null;\n while (iter.hasNext()) {\n iterator = iter.next();\n break;\n }\n return iterator;\n }",
"public Iterator<E> iterator();",
"public Iterator<E> iterator();",
"public Iterator<E> iterator();",
"public DbIterator iterator() {\n \tTupleDesc td = generateTupleDesc();\n List<Tuple> tuples = new ArrayList<Tuple>();\n if(gbField == NO_GROUPING){\n \tTuple tuple = new Tuple(td);\n \ttuple.setField(0, new IntField(tupleCounts.get(null)));\n \ttuples.add(tuple);\n } else {\n \tfor(Object key : tupleCounts.keySet()){\n \t\tTuple tuple = new Tuple(td);\n \t\ttuple.setField(0, (Field)key);\n \t\ttuple.setField(1, new IntField(tupleCounts.get(key)));\n \t\ttuples.add(tuple);\n \t}\n }\n return new TupleIterator(td, tuples);\n }",
"public JaggedArrayIterator(int[][] array) {\n this.array = array;\n }",
"@Override\n public Iterator<E> iterator() {\n return new Iterator<E>() {\n private int nextIndex = 0;\n private int lastNextIndex = -1;\n private int rest = size();\n\n @Override\n public boolean hasNext() {\n return rest > 0;\n }\n\n @Override\n public E next() {\n if(!hasNext()){\n throw new NoSuchElementException();\n }\n rest--;\n lastNextIndex = nextIndex++;\n siftDown(nextIndex);\n\n return (E) array[lastNextIndex];\n }\n\n @Override\n public void remove() {\n if (lastNextIndex == -1) {\n throw new IllegalStateException();\n }\n removeElement(lastNextIndex);\n nextIndex--;\n lastNextIndex = -1;\n }\n };\n }",
"@Override public java.util.Iterator<Function> iterator() {return new JavaIterator(begin(), end()); }",
"public Iterator<T> getIterator();",
"@Test\n public void testIterator_Backward() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n\n int i = 0;\n while (instance.hasNext()) {\n instance.next();\n }\n\n i = baseList.size() - 1;\n while (instance.hasPrevious()) {\n assertEquals(baseList.get(i--), instance.previous());\n }\n\n }",
"public static void main(String[] args) {\n\t\t\n\t\tint i=10;\n\t\tint j=++i;\n\t\tint g=2;\n\t\tg *= j;\n\t\t\n\t\tfor(int h=0; h<10;h++) {\n\t\t//System.out.println(i+j);\n\t\tSystem.out.println(g);\n\t\t}\n\t}",
"protected Graph<Integer, Edge<Integer>> generateGraph() {\n Graph<Integer, Edge<Integer>> graph = newGraph();\n Integer[] integersArray = new Integer[25];\n\n /*\n * add all integers in [0,24]\n */\n for (int i = 0; i < 25; i++) {\n integersArray[i] = new Integer(i);\n graph.addVertex(integersArray[i]);\n }\n\n /*\n * create edges between all integers i, j for which (i + j) is even\n */\n for (int i = 0; i < 25; i++) {\n for (int j = 0; j < 25; j++) {\n if ((i + j) % 2 != 0) {\n continue;\n }\n graph.addEdge(new UnweightedEdge(integersArray[i], integersArray[j]));\n }\n }\n\n return graph;\n }"
] | [
"0.64445317",
"0.6008304",
"0.5588034",
"0.55853903",
"0.53187394",
"0.5188742",
"0.5105969",
"0.50424594",
"0.5040366",
"0.4963959",
"0.4933699",
"0.493291",
"0.4927468",
"0.49116215",
"0.4894379",
"0.48893067",
"0.4886844",
"0.48849708",
"0.48829126",
"0.48458648",
"0.48351723",
"0.47932032",
"0.47816",
"0.47816",
"0.47650528",
"0.476123",
"0.47535324",
"0.47399357",
"0.47388276",
"0.47323614",
"0.4714969",
"0.47028404",
"0.46943367",
"0.46923703",
"0.46912745",
"0.46835947",
"0.46816128",
"0.4677839",
"0.46755612",
"0.46701008",
"0.465799",
"0.46471798",
"0.46387777",
"0.46309608",
"0.46252263",
"0.46233454",
"0.46081975",
"0.4608117",
"0.45941055",
"0.45931876",
"0.45881948",
"0.45855433",
"0.45579302",
"0.4555363",
"0.45550153",
"0.45541674",
"0.45537814",
"0.4553441",
"0.45519492",
"0.45501858",
"0.45419055",
"0.45346707",
"0.4534231",
"0.4531711",
"0.45311353",
"0.45262167",
"0.45130253",
"0.45126534",
"0.45117778",
"0.45094454",
"0.450125",
"0.45009387",
"0.44962278",
"0.44962278",
"0.44962278",
"0.44962278",
"0.44915548",
"0.44845355",
"0.44834924",
"0.44786298",
"0.4475426",
"0.4473577",
"0.44726628",
"0.44683987",
"0.44579226",
"0.44567946",
"0.44539085",
"0.44488686",
"0.444857",
"0.44365355",
"0.44365355",
"0.44365355",
"0.443249",
"0.4431192",
"0.44237682",
"0.44231087",
"0.4421032",
"0.44185022",
"0.4417792",
"0.44136825"
] | 0.7083456 | 0 |
111123456 111123457 111123458 111123459 | @Test
@Prepare(autoImport = true, autoClearExistsData = true)
public void testdeleteById() throws Exception {
int[] ids = { 111123456, 111123457, 111123458, 111123459 };
for (int id : ids) {
inventoryOutDao.deleteById(id);
}
for (int id : ids) {
assertNull(inventoryOutDao.getById(id));
}
// List<InventoryOutDO> list = inventoryOutDao.list(new
// InventoryOutDO());
// assertResultListSorted(list, "id");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void calculationOnElevenDigitMsgIsCorrect() {\n final String msg = \"00110001110\";\n final int[] expectedMsg = {0,0,1,0, 1,0,1,1, 1,0,0,0, 1,1,1,0};\n\n // When\n int[] transformedMsg = HammingAlgorithm.calculate(msg);\n\n // Then\n assertThat(transformedMsg).isEqualTo(expectedMsg);\n }",
"public static void main(String args[] ) throws Exception {\n Scanner in = new Scanner(System.in);\n \n String original = in.next();\n int n = original.length();\n long moda = 1000000007;\n long ones = 1;\n long sum=0; \n for (int s=original.length()-1; s>=0; s--) {\n sum = (sum + (s+1) * (original.charAt(s) - '0') * ones) %moda; \n ones = (ones * 10 + 1) % moda;\n \n }\n \n System.out.println(sum);\n \n }",
"public static void main(String[] args) {\nint t = 101010101;\n// koden begynner her\nString s = \"\";\nwhile ( t % 10 > 0 ) {\ns = t % 10 + s;\nt = t / 10;\n}\ns = \"s = \" + s;\nout.println(s);\n\n }",
"void mo5875b(String str, long j);",
"public static void main(String[] args) {\r\n\r\n\t\tint n=439;\r\n\r\n\t\tint count = 1;\r\n\t\tint binary[] = new int[32];\r\n\t\tint i = 0;\r\n\t\twhile (n > 0) {\r\n\t\t\tbinary[i] = n % 2;\r\n\t\t\tn = n / 2;\r\n\t\t\ti++;\r\n\t\t}\r\n\r\n\t\tfor (int j = i - 1; j >= 0; j--) {\r\n\r\n\t\t\tString str = String.valueOf(i);\r\n\t\t\t\r\n\t\tString ar[]=str.split(\"0\");\r\n\t\t\t\r\n\t\tif(ar.length>1)\r\n\t\t{\r\n\t\t\tcount++;\r\n\t\t}\r\n\t\t/*\t\r\n\t\t\tif (binary[j] == 1 && binary[j + 1] == 1) {\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.print(binary[j]);\r\n*/\r\n\t\t}\r\n\t\tSystem.out.print(count);\r\n\t\t/*scanner.close();*/\r\n\t}",
"short digits();",
"int mo5867a(String str, long j);",
"public static void main(String[] args) {\n\t\tString s1 = \"234\";\n\t\tint fd = 0;\n\t\tint fd1 = 0;\n\t\tint fd2 = 1;\n\t\tfor (int df = s1.length() - 1; df >= 0; df--) {\n\t\t\tString firstLetter7 = String.valueOf(s1.charAt(df));\n\t\t\tif (firstLetter7.equals(\"0\"))\n\t\t\t\tfd1 = 0;\n\t\t\telse if (firstLetter7.equals(\"1\"))\n\t\t\t\tfd1 = 1;\n\t\t\telse if (firstLetter7.equals(\"2\"))\n\t\t\t\tfd1 = 2;\n\t\t\telse if (firstLetter7.equals(\"3\"))\n\t\t\t\tfd1 = 3;\n\t\t\telse if (firstLetter7.equals(\"4\"))\n\t\t\t\tfd1 = 4;\n\t\t\telse if (firstLetter7.equals(\"5\"))\n\t\t\t\tfd1 = 5;\n\t\t\telse if (firstLetter7.equals(\"6\"))\n\t\t\t\tfd1 = 6;\n\t\t\telse if (firstLetter7.equals(\"7\"))\n\t\t\t\tfd1 = 7;\n\t\t\telse if (firstLetter7.equals(\"8\"))\n\t\t\t\tfd1 = 8;\n\t\t\telse if (firstLetter7.equals(\"9\"))\n\t\t\t\tfd1 = 9;\n\t\t\tfd = fd + fd2 * fd1;\n\t\t\tfd2 = fd2 * 10;\n\t\t}\n\t\tint a = fd - 1;\n\t\tfor (int i = a; i > 1; i--) {\n\t\t\tint qw = 0;\n\t\t\tint qw1 = i;\n\t\t\tString s2 = \"\";\n\t\t\twhile (qw1 > 0) {\n\t\t\t\tqw = qw1 % 10;\n\t\t\t\tif (qw == 0)\n\t\t\t\t\ts2 = \"0\" + s2;\n\t\t\t\telse if (qw == 1)\n\t\t\t\t\ts2 = \"1\" + s2;\n\t\t\t\telse if (qw == 2)\n\t\t\t\t\ts2 = \"2\" + s2;\n\t\t\t\telse if (qw == 3)\n\t\t\t\t\ts2 = \"3\" + s2;\n\t\t\t\telse if (qw == 4)\n\t\t\t\t\ts2 = \"4\" + s2;\n\t\t\t\telse if (qw == 5)\n\t\t\t\t\ts2 = \"5\" + s2;\n\t\t\t\telse if (qw == 6)\n\t\t\t\t\ts2 = \"6\" + s2;\n\t\t\t\telse if (qw == 7)\n\t\t\t\t\ts2 = \"7\" + s2;\n\t\t\t\telse if (qw == 8)\n\t\t\t\t\ts2 = \"8\" + s2;\n\t\t\t\telse if (qw == 9)\n\t\t\t\t\ts2 = \"9\" + s2;\n\t\t\t\tqw1 = qw1 / 10;\n\t\t\t}\n\t\t\tSystem.out.println(s1);\n\t\t\tSystem.out.println(s2);\n\t\t\tExp11 ur = new Exp11();\n\t\t\ts1 = ur.emp11(s1, s2);\n\t\t}\n\t\tSystem.out.println(s1);\n\t}",
"private String zxt (long inp, int length) {\n String result = Long.toString(inp);\n int dist = (length - result.length());\n for (int i = 0; i < dist; i++) {\n result = \"0\" + result;\n }\n return result;\n }",
"static int beautifulBinaryString(String b) {\n int index = b.indexOf(\"010\", 0) ;\n int change = 0;\n while (index != -1) {\n change++;\n index = b.indexOf(\"010\", index + 3) ;\n }\n return change;\n }",
"@Test\n public void test2(){\n\n String s =\"1000000000000001\";\n //s = BinaryCalculate.BinaryArithmeticalRightShift(s,1);\n s = BinaryCalculate.BinaryLogicRightShift(s,1);\n int a = BitConversion.fromBinaryStringToInt(s);\n System.out.println(a);\n }",
"public static void main(String[] args) {\n String s = \"**********1111111111\";\n Solution solution = new Solution();\n System.out.println(solution.numDecodings(s));\n }",
"public static void main(String [] args) {\n\t\tString str = \"ccacacabccacabaaaabbcbccbabcbbcaccabaababcbcacabcabacbbbccccabcbcabbaaaaabacbcbbbcababaabcbbaa\"\n\t\t\t\t+ \"ababababbabcaabcaacacbbaccbbabbcbbcbacbacabaaaaccacbaabccabbacabaabaaaabbccbaaaab\"\n\t\t\t\t+ \"acabcacbbabbacbcbccbbbaaabaaacaabacccaacbcccaacbbcaabcbbccbccacbbcbcaaabbaababacccbaca\"\n\t\t\t\t+ \"cbcbcbbccaacbbacbcbaaaacaccbcaaacbbcbbabaaacbaccaccbbabbcccbcbcbcbcabbccbacccbacabcaacbcac\"\n\t\t\t\t+ \"cabbacbbccccaabbacccaacbbbacbccbcaaaaaabaacaaabccbbcccaacbacbccaaacaacaaaacbbaaccacbcbaaaccaab\"\n\t\t\t\t+ \"cbccacaaccccacaacbcacccbcababcabacaabbcacccbacbbaaaccabbabaaccabbcbbcaabbcabaacabacbcabbaaabccab\"\n\t\t\t\t+ \"cacbcbabcbccbabcabbbcbacaaacaabb\"\n\t\t\t\t+ \"babbaacbbacaccccabbabcbcabababbcbaaacbaacbacacbabbcacccbccbbbcbcabcabbbcaabbaccccabaa\"\n\t\t\t\t+ \"bbcbcccabaacccccaaacbbbcbcacacbabaccccbcbabacaaaabcccaaccacbcbbcccaacccbbcaaaccccaabacabc\"\n\t\t\t\t+ \"abbccaababbcabccbcaccccbaaabbbcbabaccacaabcabcbacaccbaccbbaabccbbbccaccabccbabbbccbaabcaab\"\n\t\t\t\t+ \"cabcbbabccbaaccabaacbbaaaabcbcabaacacbcaabbaaabaaccacbaacababcbacbaacacccacaacbacbbaacbcbbbabc\"\n\t\t\t\t+ \"cbababcbcccbccbcacccbababbcacaaaaacbabcabcacaccabaabcaaaacacbccccaaccbcbccaccacbcaaaba\";\n\t\tSystem.out.println(substrCount2(1017, str));\n\t}",
"public static void main(String[] args) {\n\t\tStringBuilder sb=new StringBuilder();\n\t\tString str=\"xheixhixhi\";\n\t\tint x=0;\n\t\tfor(int i=0;i<str.length();i++)\n\t\t{\n\t\t\tif(str.charAt(i)=='x')\n\t\t\t\tx++;\n\t\t\n\t\t\telse\n\t\t\t\tsb.append(str.charAt(i));\n\t\t}\n\t\tfor(int i=0;i<x;i++)\n\t\t\tsb.append('x');\n\t\tSystem.out.println(sb);\n\t\t\n\t\tString str1=\"xxxyyy\";\n\t\tStringBuffer sb1=new StringBuffer(str1);\n\t\tSystem.out.println(sb1.toString());\n\t\tfor(int i=0;i<(str1.length());i++)\n\t\t{\n\t\t\tif(sb1.charAt(i)==sb1.charAt(i+1))\n\t\t\t{\n\t\t\t\tSystem.out.println(i);\n\t\t\t\tsb1.insert(++i,'*');\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\tSystem.out.println(sb1.toString());\n\t\t\n\t\t//anagram\n\t\tString s1=\"niveda\";\n\t\tString s2=\"Nivedas\";\n\t\tString s4=s2.toLowerCase();\n\t\tchar[] s3=s1.toCharArray();\n\t\tchar[] s5=s4.toCharArray();\n\t\tArrays.sort(s3);\n\t\tArrays.sort(s5);\n\t\tboolean result=Arrays.equals(s3, s5);\n\t\tSystem.out.println(\"result is \"+result);\n\t\t\n\t\t//check all digits\n\t\tString s=\"09779\";\n\t\tif (s.isEmpty())\n\t\t\tSystem.out.println(\"empty\");;\n\n\t\tfor (int i = 0; i < s.length(); i++) {\n\t\tint temp = s.charAt(i) - (int)'0';\n\t\tSystem.out.println(temp);\n\t\tif (temp < 0 || temp > 9)\n\t\t\tSystem.out.println(\"false\");\n\t\t\n\t\t}\n\n\t\tSystem.out.println(\"true\");\n\n\t\t//reverse a string\n\t\tString s6=\"niveda is\";\n\t\tString sb4=new StringBuffer(s6).reverse().toString();\n\t\tSystem.out.println(sb4);\n\t\t\n\t\tStringBuilder s7=new StringBuilder();\n\t\tchar[] c1=s6.toCharArray();\n\t\tfor(int i=c1.length-1;i>=0;i--)\n\t\t{\n\t\t\ts7.append(c1[i]);\n\t\t}\n\t\tSystem.out.println(s7);\n\t\t\n\t\t//replace with space\n\t\tString str5=\"xxx yyy\";\n\t\tStringBuilder sb6=new StringBuilder(str5);\n\t\tSystem.out.println(sb6.toString());\n\t\tfor(int i=0;i<(str5.length());i++)\n\t\t{\n\t\t\tif(sb6.charAt(i)==32)\n\t\t\t{\n\t\t\t\tSystem.out.println(i);\n\t\t\t\tsb6.replace(i,i+1,\"%20\");\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\tSystem.out.println(sb6.toString());\n\t\t\n\t\tString sentence=\"my name is niveda\";\n\t\tList< String> words = Arrays.asList(sentence.split(\"\\\\s\")); \n\t\tCollections.reverse(words); \n\t\t\n\t\tSystem.out.println(words);\n\t\tStringBuilder sb8 = new StringBuilder(sentence.length()); \n\t\t\n\t\tfor (int i = 0; i <=words.size() - 1; i++)\n\t\t{ \n\t\t\tsb8.append(words.get(i)); \n\t\t\t\n\t\tsb8.append(' ');\n\t\t}\n\t\tSystem.out.println(sb8.toString().trim());\n\t\t\n\t\tStringBuffer sb9=new StringBuffer(sentence);\n\t\tString sb10=sb9.reverse().toString();\n\t\tSystem.out.println(\"old \"+sb10.toString().trim());\n\t\t\n\t\tStringBuilder reverse = new StringBuilder(); \n\t\tString[] sa = sentence.trim().split(\"\\\\s\"); \n\t\tString newest=\"\";\n\t\tfor (int i = sa.length - 1; i >= 0; i--) \n\t\t{ \n\t\t\tString newword=sa[i]; \n\t\t\t//reverse.append(' '); \n\t\t\tString newstring=\"\";\n\t\t\tfor(int n=newword.length()-1;n>=0;n--)\n\t\t\t{\n\t\t\t\tnewstring=newstring+newword.charAt(n);\n\t\t\n\t\t\t}\n\t\t\tnewest=newest+newstring+\" \";\n\t\t} \n\t\tSystem.out.println( reverse.toString().trim());\n\t\tSystem.out.println(\"newest \"+newest);\n\t\tSystem.out.println(\"number of words in the string \"+sa.length);\n\n\t\t\n\t\t//reverse chars in the word in place\n\t\tString s11=\"my name is niveda\";\n\t\tString reversestring=\"\";\n\t\tString[] c11=s11.trim().split(\"\\\\s\");\n\t\tfor(int k=0;k<c11.length;k++)\n\t\t{\n\t\t\tString word=c11[k];\n\t\t\tString reverseword=\"\";\n\t\t\tfor(int m=word.length()-1;m>=0;m--)\n\t\t\t{\n\t\t\t\t\n\t\t\treverseword=reverseword+word.charAt(m);\n\t\t\t}\n\t\t\treversestring=reversestring+reverseword+\" \";\n\t\t}\n\t\t\n\t\tSystem.out.println( reversestring);\n\t}",
"protected long bruteForce(long endingNumber) {\n StringBuffer buffer = new StringBuffer();\n for (int index = 1; index <= endingNumber; ++index) {\n buffer.append(index);\n }\n String digits = buffer.toString();\n int matches = 0, offset = 0;\n while ((offset = digits.indexOf('2', offset)) != -1) {\n matches++;\n offset++;\n }\n return matches;\n }",
"static int getNumPatterns() { return 64; }",
"static void separateNumbers(String s) {\n \tlong flag = 0;\n \tif(s.charAt(0) == '0') {\n \t\tflag = -1;\n \t}\n\t\tif (flag == 0) {\n\t\t\tfor (int length = 1; length * 2 <= s.length(); length++) {\n\t\t\t\tlong firstNumber = Long.parseLong(s.substring(0, length));\n\n\t\t\t\tStringBuilder sequence = new StringBuilder();\n\t\t\t\tlong number = firstNumber;\n\t\t\t\twhile (sequence.length() < s.length()) {\n\t\t\t\t\tsequence.append(number);\n\t\t\t\t\tnumber++;\n\t\t\t\t}\n\t\t\t\tif (sequence.toString().equals(s)) {\n\t\t\t\t\tflag = firstNumber;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n \tif(flag <= 0 ) {\n \t\tSystem.out.println(\"NO\");\n \t}\n \telse {\n \t\tSystem.out.println(\"YES \"+flag);\n \t}\n \t\n }",
"static long repeatedString(String s, long n) {\n char[] arr=s.toCharArray();\n int i,count=0,cnt=0;\n for(i=0;i<arr.length;i++){\n if(arr[i]=='a'){\n count++;\n }\n }\n long len=(n/arr.length)*count;\n long extra=n%arr.length;\n if(extra==0){\n return len;\n }else{\n for(i=0;i<extra;i++){\n if(arr[i]=='a'){\n cnt++;\n }\n }\n return len+cnt;\n }\n\n\n }",
"private String preparaMensaje(String mensaje){\n String binario;\n int longitud = 0;\n String bi=\"\";\n longitud = mensaje.length() + 4;\n for( int i = 15; i>=0; i--){\n bi += ( ( ( longitud & ( 1<<i ) ) > 0 ) ? \"1\" : \"0\" ) ;\n }\n return binario = cadenaABinario(\" \") + bi + cadenaABinario(mensaje);\n }",
"private static String digits(long val, int digits) {\n\tlong hi = 1L << (digits * 4);\n\treturn Long.toHexString(hi | (val & (hi - 1))).substring(1);\n }",
"public static long[] pack(String b) {\n String[] ab = chordToArray(b);\n int longCount = (int) Math.ceil(ab.length/8.0);\n long[] ngrams = new long[longCount];\n for (int j = 0; j < longCount; j++){\n \tlong out = 0;\n int count = 0;\n\t String[] a = Arrays.copyOfRange(ab, j*8, j+1 != longCount ? (j+1)*8 : ab.length);\n\t for (int i = 0; i < Math.min(8, (j+1 == longCount && ab.length != 8) ? ab.length % 8 : 8); i++) { \n\t \tout += Long.parseLong(a[i]) << 7 * (8 - count);\n\t count++;\t \n\t }\n\t if (longCount > 1 && j != longCount-1) out = out + 1; \n\t ngrams[j] = out;\n\n }\n return ngrams;\n }",
"static long repeatedString(String s, long n) {\n \t\n \tchar first;\n \tfirst = s.charAt(0);\n \t\n \tint count = 0;\n \tlong[] fill = new long[n];\n \t\n \tfor(int i=1; i<n; i++) {\n \t\tif(first == s.charAt(i)) count++;\n \t}\n \t\n \tlong result = ((n / s.length()) * count) + (n % s.length());\n \treturn result;\n\n }",
"public static void main(String[] args) {\n \tString s = \"[94,93,95,92,94,96,94,93,93,93,95,97,97,95,95,92,94,94,94,92,94,94,96,98,98,96,98,96,94,94,96,91,91,93,95,93,95,95,95,91,93,93,95,95,93,97,97,97,97,97,99,95,97,97,99,95,97,93,95,null,95,95,95,90,92,90,92,92,94,94,96,94,null,96,94,94,94,96,null,90,92,null,null,94,null,94,96,null,null,null,null,96,null,null,null,96,98,96,96,96,96,100,100,94,94,98,96,96,96,98,100,94,96,98,98,94,94,94,96,null,null,94,96,94,94,89,91,null,93,91,91,91,91,null,91,null,null,null,null,null,null,93,95,95,95,93,95,null,null,95,93,null,null,null,null,null,93,null,95,93,95,null,97,95,97,95,95,97,99,97,97,null,97,95,null,95,97,101,101,99,99,95,null,93,null,97,99,95,97,97,97,95,95,99,97,101,99,93,93,95,97,97,99,99,null,null,null,null,95,95,95,97,95,null,null,95,null,null,95,null,null,88,88,92,null,null,94,90,92,92,92,90,90,90,92,90,92,null,null,null,94,94,96,null,null,null,94,null,null,null,null,94,null,null,null,94,null,null,null,96,null,96,96,94,94,null,null,null,96,96,94,96,96,100,100,96,98,96,96,null,96,94,null,94,96,null,null,100,102,100,null,null,100,98,98,94,96,92,94,96,98,98,98,94,94,96,98,96,98,96,98,null,96,96,94,98,98,96,98,100,102,98,null,92,94,92,94,96,null,null,null,96,98,98,100,100,100,94,96,94,null,null,96,96,98,null,null,null,null,96,94,null,null,87,89,91,null,null,null,89,89,null,91,93,93,null,93,89,91,89,91,91,89,93,null,91,null,null,null,null,93,null,null,null,null,null,null,null,null,null,null,null,null,null,95,97,null,95,null,null,95,95,97,95,97,95,null,95,95,97,97,101,101,101,101,95,95,97,99,95,null,95,97,97,null,95,null,93,95,null,null,null,null,101,103,99,null,null,101,null,null,null,null,null,93,97,97,null,91,null,95,97,97,97,null,97,null,97,99,95,95,93,null,null,97,97,null,95,null,null,99,95,97,97,99,95,97,95,97,93,95,99,97,97,99,95,97,97,99,99,99,101,101,null,99,91,null,null,null,null,null,null,93,null,97,95,95,97,null,97,97,101,99,null,99,99,null,null,null,97,97,null,null,null,null,97,97,null,null,null,95,null,null,null,null,null,null,null,null,null,null,null,null,92,null,null,null,null,null,null,94,88,null,null,null,90,90,null,null,null,null,88,88,null,null,null,90,null,null,null,null,null,null,null,null,96,96,96,96,96,96,96,94,null,null,96,96,94,null,94,96,96,null,98,96,100,102,null,null,102,102,null,100,94,96,94,null,96,98,98,null,94,96,96,null,98,null,null,null,96,94,null,null,null,94,null,null,null,104,null,100,null,102,null,null,96,96,96,96,null,92,null,96,null,96,null,null,96,null,null,null,null,null,98,null,null,null,94,94,null,null,null,98,null,96,null,null,100,null,96,96,96,98,96,98,98,100,94,null,null,null,null,null,null,98,94,92,96,96,null,100,96,null,98,null,98,100,94,94,96,98,null,96,98,100,98,98,100,100,102,100,100,null,null,null,null,92,92,null,null,null,96,94,null,96,98,98,96,98,96,null,102,null,98,null,null,null,100,100,null,null,null,null,96,98,96,98,null,94,null,null,95,null,87,null,null,91,91,91,87,null,null,89,91,null,null,null,null,null,null,null,null,null,97,95,95,97,null,null,null,null,97,95,null,null,93,null,95,93,null,null,95,null,97,99,95,95,99,null,null,103,101,null,null,103,null,99,95,95,null,95,95,93,null,97,null,null,null,null,93,95,95,97,null,null,null,null,97,null,null,null,null,null,null,null,101,null,101,103,97,97,95,null,null,null,null,97,null,null,95,null,null,null,null,97,null,null,93,93,null,null,97,null,null,null,99,null,95,95,null,null,97,95,null,null,95,null,97,null,97,99,99,null,null,null,null,99,93,95,91,93,97,97,95,95,101,99,null,null,null,null,99,null,null,null,93,null,93,95,97,95,97,99,95,95,97,99,99,101,97,null,null,99,99,99,null,null,103,103,101,101,null,101,null,93,null,91,null,95,null,95,null,97,99,99,97,99,97,97,97,null,95,95,null,null,null,97,101,99,99,101,null,null,null,null,95,null,null,null,93,null,null,null,null,88,null,null,null,null,null,null,null,null,88,null,90,92,null,null,94,96,null,null,96,96,98,null,96,96,null,null,94,96,92,null,94,null,96,98,100,100,null,96,94,null,null,null,102,null,null,null,null,102,null,null,94,94,94,96,null,96,null,null,92,94,96,null,94,null,94,94,null,96,null,98,null,null,null,100,100,102,null,null,98,null,96,98,null,null,null,null,null,null,null,null,94,94,null,94,null,null,null,null,94,96,96,96,96,96,null,96,null,null,96,96,98,98,null,100,98,100,null,null,null,94,94,96,92,92,92,94,null,98,null,98,94,96,94,96,null,null,null,100,null,null,92,null,92,94,null,96,98,96,96,null,98,98,98,null,96,null,96,96,null,null,null,100,98,null,null,100,96,98,null,null,98,98,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,96,96,98,null,null,100,100,96,98,100,98,null,null,96,98,98,98,96,null,94,null,null,null,null,100,98,null,100,null,null,102,null,null,null,null,null,null,87,null,null,null,null,null,95,95,null,97,null,null,null,97,97,null,95,97,95,97,95,null,null,null,null,null,null,null,95,null,null,null,null,null,null,101,97,null,93,null,null,null,null,103,null,null,95,null,95,93,95,95,95,null,null,93,null,93,null,null,null,null,95,95,null,null,95,97,97,99,null,null,null,null,103,null,null,null,95,95,99,null,93,null,null,null,null,null,93,95,97,95,95,97,null,97,97,null,95,null,null,null,null,null,95,97,99,97,97,99,null,null,99,97,101,null,95,null,null,93,97,97,91,93,91,93,93,91,93,93,null,null,99,97,93,93,95,97,93,null,null,95,null,null,null,93,91,93,95,95,95,97,null,null,null,null,null,null,99,null,null,null,null,null,97,null,95,null,null,null,null,null,99,null,null,null,95,95,null,97,97,null,99,99,95,null,null,null,null,null,null,101,99,null,95,95,null,null,null,null,97,99,null,95,99,null,97,null,null,null,97,null,null,null,101,null,99,null,null,null,103,null,null,null,null,null,94,94,null,null,null,null,null,98,94,94,null,null,null,null,96,null,96,null,null,96,null,102,null,98,null,null,null,null,null,null,null,null,94,94,null,94,96,94,null,null,null,null,null,null,null,94,94,null,null,null,null,null,null,null,null,100,null,null,96,94,null,96,null,null,null,null,94,null,null,null,null,96,null,null,94,null,null,96,null,null,96,null,null,null,null,null,96,null,null,null,96,96,null,98,null,null,98,null,null,null,null,102,null,null,92,94,96,null,96,96,null,90,null,null,92,92,null,92,92,null,null,92,null,92,94,92,null,100,96,null,94,null,null,94,96,null,98,null,92,94,94,96,null,null,92,90,null,null,94,null,94,96,94,96,98,96,null,null,null,null,94,96,null,null,94,null,94,94,null,null,null,98,98,null,null,100,null,null,null,102,null,null,96,null,null,96,null,null,null,null,96,null,100,null,null,null,null,null,null,102,null,null,104,104,null,null,null,null,null,97,null,95,95,null,95,97,null,null,95,null,null,103,null,97,95,95,null,null,93,93,null,null,null,95,null,null,null,93,null,null,97,null,93,null,null,null,null,null,95,null,null,null,null,null,null,null,95,97,95,null,95,null,97,99,null,null,null,null,91,93,null,95,null,null,null,97,95,null,89,null,null,91,null,null,null,null,null,null,null,null,91,null,93,95,93,91,null,null,95,null,93,null,95,null,null,null,null,null,null,93,null,null,null,95,null,null,null,null,89,null,null,95,null,null,95,null,95,93,null,null,null,97,95,null,null,null,95,null,null,null,null,95,null,95,99,null,97,null,null,null,null,103,95,null,95,null,null,97,null,null,null,null,null,null,null,null,null,null,null,96,94,null,null,null,98,null,null,null,104,null,null,null,null,null,null,null,null,null,94,94,null,null,null,94,null,98,94,null,null,96,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,94,null,null,null,null,null,null,null,null,null,92,null,null,null,null,94,null,94,null,92,null,94,92,94,94,96,94,92,null,null,null,null,94,94,null,null,96,null,92,null,96,null,null,null,null,null,null,null,94,null,null,null,96,null,null,102,null,null,null,null,null,null,null,null,null,null,null,null,null,null,93,null,93,null,null,null,99,null,null,null,null,null,null,null,null,null,null,null,null,null,null,91,null,null,null,91,null,null,null,null,null,97,null,null,null,91,null,95,null,null,null,null,null,null,null,97,null,null,null,null,101,null,94,null,null,null,null,null,null,92,null,null,null,96,null,null,94,null,null,96,null,null,93,null,null,null,null,null,null,null,97]\";\r\n\t\tTreeNode one = TreeNode.str2tree(s);\r\n \tFindDuplicateSubtrees3 findDuplicateSubtrees = new FindDuplicateSubtrees3();\r\n\t\tList<TreeNode> result = findDuplicateSubtrees.findDuplicateSubtrees(one);\r\n\t\tfor (TreeNode treeNode : result) {\r\n\t\t\tSystem.out.println(treeNode);\r\n\t\t}\r\n\t}",
"void mo64942a(String str, long j, long j2);",
"static long repeatedString(String s, long n) {\n long l=s.length();\n long k=n/l;\n long r=n%l;\n long count=0;\n long count1=0;\n char ch[]=s.toCharArray();\n for(int t=0;t<ch.length;t++){\n if(ch[t]=='a')\n count1++;\n }\n for(int t=0;t<r;t++){\n if(ch[t]=='a')\n count++;\n }\n return k*count1+count;\n\n }",
"public void testLong() throws Exception {\n String string = reverse(\"The quick brown fox jumps over the lazy dog.\");\n CharIndex idx = CharIndex.getInstance(string);\n\n long[] map = PatternBitmap.map(string, idx, new long[idx.size()]);\n\n /* Spot check some */\n long e = Long.parseLong(\"00100000000000000000000000001000010000000000\", 2);\n /* ............ The quick brown fox jumps over the lazy dog. */\n\n assertEquals(e, map[idx.lookup('e')]);\n\n long o = Long.parseLong(\"00000000000010000100000000100000000000000100\", 2);\n /* ............ The quick brown fox jumps over the lazy dog. */\n assertEquals(o, map[idx.lookup('o')]);\n\n /* Check all others for zero/non-zero */\n for (int i = 0; i < 0xffff; i++) {\n char c = (char)i;\n int where = string.indexOf(c);\n if (where >= 0) {\n assertTrue(\"Map for pattern character '\" + c + \"' should be non-zero\",\n (map[idx.lookup(c)] & (1L << where)) != 0);\n } else {\n assertEquals(\"Map for unused character '\" + c + \"' should be zero\",\n 0, map[idx.lookup(c)]);\n }\n }\n }",
"public static void main(String[] args) {\n\t\t\n\t\tString str = \"abccbc\";\n\t\t\n\t\tlong[][] dp = new long[str.length()][str.length()];\t\n\t\t\n\t\tfor (int g=0 ; g<str.length() ; g++) {\n\t\t\t\n\t\t\tfor (int i=0 , j=g ; j<str.length() ; i++ , j++) {\n\t\t\t\tif (g == 0) dp[i][j] = 1;\n\t\t\t\t\n\t\t\t\telse if (g == 1) dp[i][j] = (str.charAt(i) == str.charAt(j)) ? 3 : 2;\n\t\t\t\t\n\t\t\t\telse dp[i][j] = (str.charAt(i) == str.charAt(j)) ? (dp[i][j-1] + dp[i+1][j] + 1) : (dp[i][j-1] + dp[i+1][j] - dp[i+1][j-1]);\n\t\t\t\t\n\t\t\t\t//if (dp[i][j] && str.substring(i, j+1).length() > result.length()) result = str.substring(i, j+1);\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(dp[0][str.length()-1]);\n\t}",
"public static String getCheckNumber(String paramString){\n int i =paramString.substring(0, 1).getBytes()[0];\n for(int j=1;;j++){\n if(j>=paramString.length())\n return intToHex(Integer.valueOf(i));\n i=(byte)(i^paramString.substring(j, j+1).getBytes()[0]);\n\n }\n }",
"public static void main(String[] args) throws IOException {\n FastReader sc = new FastReader();\n int tc = sc.nextInt();\n while (tc-- > 0) {\n int n = sc.nextInt();\n StringBuilder s = new StringBuilder(sc.next());\n int numberofzeros = 0;\n boolean flag = false;\n for (int i = 0; i < s.length(); i++) {\n if(s.charAt(i) == '1'){\n flag = true;\n }\n if(s.charAt(i) == '0' && flag){\n numberofzeros++;\n }\n }\n //System.out.println(numberofzeros);\n for (int i = 0; i < s.length()-1; ) {\n if(s.charAt(i) == '1' && s.charAt(i+1) == '0'){\n if(numberofzeros != 1){\n s.deleteCharAt(i+1);\n numberofzeros--;\n continue;\n }\n else {\n s.deleteCharAt(i);\n // System.out.println(\"In else block\"+s);\n if(i >= 1){\n i--;\n }\n else\n i=0;\n continue;\n }\n }\n //System.out.println(s);\n //System.out.println(s.length());\n i++;\n }\n System.out.println(s);\n }\n }",
"static String GetCheckDigitAndCheckCode(String input) {\n int sum = 0;\n for(int i = 0; i < input.length(); i++) {\n if(i%2 == 0 || i == 0) {\n\n sum += 3 * Character.getNumericValue(input.charAt(i));\n }else {\n sum += Character.getNumericValue(input.charAt(i));\n }\n }\n int subDigit = ((sum/10) + 1 ) * 10;\n int checkDigit = subDigit - sum;\n\n input = input + checkDigit;\n\n\n int digit1 = get9Digits(input.substring(0, 8));\n int digit2 = get9Digits(input.substring(9));\n\n // NOTE - Not able to understand what means by index of 2\n // digit numbers so here am just adding instead of multiplying the 2 9 digits.\n int result = digit1 + digit2 + 207;\n int remainder = result % 103;\n\n StringBuilder sb = new StringBuilder();\n sb.append(checkDigit);\n sb.append(',');\n sb.append(remainder);\n return sb.toString();\n }",
"public static void main(String[] args) {\n new BigInteger(\"abc\",16);\n String test = \"#$Y^!#Pf&~#FUyTtAfZhCs&Dly%M@(muOI@Le^mydvc((w$x-cP&t-f$R%CCp)bCck@P-ag\";\n LetterSort opr = new LetterSort();\n opr.sortLetters(test);\n\n String test2 = \" asd \".replaceAll(\"[^ ]\", \"\");\n System.out.println(test2.length()+\"\");\n\n int[] test1 = new int[]{1,2,4};\n int[] test3 = test1;\n\n test3[0] = 5;\n System.out.println(test1[0]+\"\");\n System.out.println(Integer.toBinaryString(10));\n\n int i = 1_000_000_000;\n int j = 2_000_000_000;\n System.out.println(\"Sum \" + ((long) i+j));\n }",
"private static Set<Integer> getRadix(String number) {\n Set<Integer> result = new HashSet<>();\n for(int i=2;i<=36;i++) {\n try {\n String poly = (new BigInteger(number)).toString(i);\n String polyLeft = poly.substring(0, (poly.length() + 1) / 2);\n String polyRight = poly.substring((poly.length() ) / 2 );\n //System.out.println(i+\":\"+poly+\" \"+polyLeft+\"=\"+polyRight);\n if (polyLeft.equalsIgnoreCase((new StringBuffer(polyRight)).reverse().toString())) {\n result.add(i);\n }\n } catch (Exception e) {};\n }\n return result;\n }",
"public static void main(String[] args) {\n List<Integer> res = sequentialDigits(744, 1928);\n }",
"public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nString input1=sc.nextLine();\r\ninput1=input1.toLowerCase();\r\nint l=input1.length();\r\nchar a[]=input1.toCharArray();\r\nint d[]=new int[1000];\r\nString str=\"\";\r\nint i=0,k1=0,k2=0,m=0,c1=0,c2=0,c3=0,l1=0,u=0,u1=0;\r\nchar b[]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};\r\nfor(i=0;i<l;i++)\r\n{ c3=0;\r\n\tif(a[i]==' ')\r\n\t{u=i;c3=0;\r\n\t\tfor(k1=u1,k2=i-1;k1<k2 && k2>k1;k1++,k2--)\r\n\t\t{ c1=0;c2=0;\r\n\t\t\tfor(m=0;m<26;m++)\r\n\t\t\t{\r\n\t\t\t\tif(b[m]==a[k1]) {\r\n\t\t\t\tc1=m+1;}\t\r\n\t\t\t\tif(b[m]==a[k2]) {\r\n\t\t\t\t\tc2=m+1;}\t\r\n\t\t\t}\r\n\t\t\tc3=c3+Math.abs(c1-c2);\r\n\t\t}\r\n\t\tif(k1==k2) {\r\n\t\t\tfor(m=0;m<26;m++) {\r\n\t\t\t\tif(b[m]==a[k1])\r\n\t\t\t\t\tc3=c3+(m+1);\r\n\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\td[l1]=c3;\r\n\t\tl1++;\r\n\t\tu1=i+1;\r\n\t\tc3=0;\r\n\t}\r\n\tif(i==l-1)\r\n\t{\r\n\t\tfor(k1=u+1,k2=i;k1<k2 && k2>k1;k1++,k2--)\r\n\t\t{ c1=0;c2=0;\r\n\t\t\tfor(m=0;m<26;m++)\r\n\t\t\t{\r\n\t\t\t\tif(b[m]==a[k1]) {\r\n\t\t\t\tc1=m+1;}\t\r\n\t\t\t\tif(b[m]==a[k2]) {\r\n\t\t\t\t\tc2=m+1;}\t\r\n\t\t\t}\r\n\t\t\tc3=c3+Math.abs(c1-c2);\r\n\t\t}\r\n\t\tif(k1==k2) {\r\n\t\t\tfor(m=0;m<26;m++) {\r\n\t\t\t\tif(b[m]==a[k1])\r\n\t\t\t\t\tc3=c3+(m+1);\r\n\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\td[l1]=c3;\r\n\t\tl1++;\r\n\t\tk1=i+1;\r\n\t}\r\n}\r\n\r\n for(i=0;i<l1;i++)\r\n {\r\n\t str=str+Integer.toString(d[i]);\r\n }\r\n int ans=Integer.parseInt(str);\r\n System.out.print(ans);\r\n}",
"public static void main(String[] args) throws IOException {\n String str=\"111111\";\n char[] chars = str.toCharArray();\n\n //处理特殊情况:字符个数小于三个\n if(chars.length==1){\n System.out.println(0);\n return;\n }else if(chars.length==2){\n if(chars[0]==chars[1]) {\n System.out.println(1);\n }else{\n System.out.println(0);\n }\n return;\n }\n //走到这里说明字符数组至少有三个元素,使用滑动窗口来处理\n int sum=0;\n for(int i=2;i<chars.length;i++){\n if(chars[i]==chars[i-1]&&chars[i-2]==chars[i-1]){//三个元素相等,修改第二个元素\n chars[i-1]='x';\n sum++;\n }else if(chars[i-1]==chars[i]){//后两个相等,修改最后一个\n chars[i]='x';\n sum++;\n }else if(chars[i-1]==chars[i-2]){//前两个相等,中间那个(只有开始的时候会出现这个判断)\n chars[i-1]='x';\n sum++;\n }\n }\n\n System.out.println(sum);\n return;\n }",
"public static void main(String[] args) {\n\t\tString s=\"22\";\n\t\t\n\t\tif(s.indexOf(\"1\")>=0||s.equals(\"\"))\n\t\t\tSystem.out.println(\"hello\");\n\t\t\t\n\t\tArrayList f=new ArrayList();\n\t\tint stack[]=new int[2*s.length()];\n\t\tint top=-1;\n\t\tchar a[][]=new char[][]{{},{},{'#','a','b','c','#'},{'#','d','e','f','#'},{'#','g','h','i','#'},{'#','j','k','l','#'},{'#','m','n','o','#'},{'#','p','q','r','s','#'},{'#','t','u','v','#'},{'#','w','x','y','z','#'}};\n\t\tint length[]=new int []{0,0,3,3,3,3,3,4,3,4};\n\t\tStringBuilder ans=new StringBuilder();\n\t\tfor(int i=0;i<s.length();i++){\n\t\t\tint x=stack[++top]=(int)s.charAt(i)-'0';\n\t\t\tans.append(a[x][1]);\n\t\t\tstack[++top]=1;\n\t\t}\n\t\twhile(stack[1]!=length[(int)s.charAt(0)-'0']+1){\n\t\t\tif(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\tif(s.length()==(top+1)/2){\n\t\t\t\t\twhile(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\t\t\tint r=(top-1)/2;\n\t\t\t\t\t\tchar r1=a[stack[top-1]][stack[top]];\n\t\t\t\t\t\tans.setCharAt(r, r1);\n\t\t\t\t\t\tString ans1=ans.toString();\n\t\t\t\t\t\tf.add(ans1);\n\t\t\t\t\t\tstack[top]++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t\t\ttop+=2;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstack[top]=1;\n\t\t\t\ttop-=2;\n\t\t\t\tstack[top]++;\n\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(f.size());\n\t}",
"public static void main(String[] args) {\n String iSBNumber = \"978013213080\";\n int parni = 0;\n int neparni = 0;\n int suma;\n\n\n for (int i = 0; i < iSBNumber.length(); i++) {\n\n if (i % 2 == 0) {\n neparni += (Integer.parseInt(String.valueOf(iSBNumber.charAt(i))));\n\n } else {\n parni += 3 * (Integer.parseInt(String.valueOf(iSBNumber.charAt(i))));\n\n }\n }\n suma = 10 - (parni + neparni) % 10;\n if (suma == 10) {\n iSBNumber += \"0\";\n System.out.println(iSBNumber);\n } else {\n iSBNumber += suma;\n System.out.println(iSBNumber);\n }\n\n }",
"public static void main(String[] args) {\n\t\tint n=3;\n\t\tString s=\"1\";\n\t\tint count =1;\n\t\tint k=1;\n\t\twhile(k<n){\n\t\t\tStringBuilder t=new StringBuilder();\n\t\t\t//t.append(s.charAt(0));\n\t\t\tfor(int i=1;i<=s.length();i++){\n\t\t\t\t\t\t\t\t\n\t\t\t\tif(i==s.length() || s.charAt(i-1)!=s.charAt(i)){\n\t\t\t\t\tt.append(count); t.append(s.charAt(i-1));\n\t\t\t\t\tcount=1;\n\t\t\t\t}\n\t\t\t\telse if(s.charAt(i-1)==s.charAt(i)){count=count+1;}\n\t\t\t }\t\n\t\t\t\ts=t.toString();\n\t\t\t\tk=k+1;\n\t\t\t\tSystem.out.println(\"k:\"+k);\n\n\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(s);\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"private static void spacesToBinary() {\n\t\tString stringBinary = \"\"; \n\t\tfor(int i = 0; i < spaces.length; i++) {\n\t\t\tif(spaces[i].length() % 2 == 0) { stringBinary += \"1\"; }\n\t\t\telse if(spaces[i].length() % 2 == 1) { stringBinary += \"0\"; }\n\n\t\t\tif(i != 0 && (i+1) % 5 == 0) {\n\t\t\t\tbinary.add(stringBinary);\n\t\t\t\tstringBinary = \"\";\n\t\t\t} \n\t\t\telse if(i+1 == spaces.length) {\n\t\t\t\tfor(int k = (i+1)%5; k < 5; k++) {\n\t\t\t\t\tstringBinary += \"0\";\n\t\t\t\t}\n\t\t\t\tbinary.add(stringBinary);\n\t\t\t\tstringBinary = \"\";\n\t\t\t}\n\t\t}\n\t}",
"static int twoCharaters(String s) {\n\t\tList<String> list = Arrays.asList(s.split(\"\"));\n\t\tHashSet<String> uniqueValues = new HashSet<>(list);\n\t\tSystem.out.println(uniqueValues);\n\t\tString result;\n\t\twhile(check(list,1,list.get(0))) {\n\t\t\tresult = replace(list,1,list.get(0));\n\t\t\tif(result != null) {\n\t\t\t\tSystem.out.println(result);\n\t\t\t\ts = s.replaceAll(result,\"\");\n\t\t\t\tlist = Arrays.asList(s.split(\"\"));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(s);\n\t\treturn 5;\n }",
"public static int numDecodings_orig(String s) {\n\n if (s == null || s.length() == 0) {\n return 0;\n }\n\n char[] nums = s.toCharArray();\n int[] memos = new int[nums.length];\n memos[nums.length-1] = nums[nums.length-1] != '0' ? 1 : 0;\n for (int i = nums.length-2; i >= 0; i--) {\n int numAtI = nums[i+0]-'0';\n int numAtI_1 = nums[i+1]-'0';\n\n if (numAtI > 2 || (numAtI == 2 && numAtI_1 > 6)) {\n memos[i] = memos[i+1];\n } else if (numAtI == 1 || (numAtI == 2 && numAtI_1 <= 6)) {\n if (i < nums.length-2) {\n memos[i] = memos[i+1] + memos[i+2];\n } else {\n memos[i] = memos[i+1] + 1;\n }\n }\n }\n\n return memos[0];\n }",
"public boolean isStrobogrammatic(String num) {\n char input[] = num.toCharArray();\n int p1 = 0, p2 = num.length() - 1;//pointers\n while(p1 <= p2) {\n if(input[p1] == '6') {\n if(input[p2] != '9') return false;\n } else if (input[p1] == '9') {\n if(input[p2] != '6') return false;\n } else if (input[p1] == '1' || input[p1] == '8'||input[p1] == '0') {\n if (input[p2] != input[p1]) return false;\n } else {\n return false;\n }\n p1++;\n p2--;\n }\n return true;\n }",
"public static void main(String[] args) {\n\t\tint n=345;\r\n\t\tint s=0;\r\n\t\twhile(n!=0)\r\n\t\t{\r\n\t\tint last=n%10;\r\n\t\ts =s+last;\r\n\t\tn= n/10;\t\r\n\t\t\t\r\n\t\t\t}\r\n\r\nSystem.out.println(s);\r\n\t}",
"public static void main(String[] args)\n {\n String string = \"101101101\";\n int[][] dp = new int[string.length()+1][string.length() +1];\n int len = string.length();\n for (int i=0 ; i<= len ;i++) {\n for (int j=0 ;j<=len ;j++) {\n dp[i][j] = -1;\n }\n }\n System.out.println(minPartitions(string, 0, string.length() -1, dp));\n }",
"public static long[] packPN(String b) {\n String[] ab = chordToArray(b);\n int longCount = (int) Math.ceil(ab.length/7.0);\n long[] ngrams = new long[longCount];\n for (int j = 0; j < longCount; j++){\n \tlong out = 0;\n int count = 0;\n\t String[] a = Arrays.copyOfRange(ab, j*7, j+1 != longCount ? (j+1)*7 : ab.length);\n\t for (int i = 0; i < Math.min(7, (j+1 == longCount && ab.length != 7) ? ab.length % 7 : 7); i++) { \n\t \tout += (Long.parseLong(a[i]) & 0xff) << 8 * (7 - count);\n\t count++;\t \n\t }\n\t if (longCount > 1 && j != longCount-1) out = out + 1; \n\t ngrams[j] = out;\n\n }\n return ngrams;\n }",
"public static void main(String[] args) {\n System.out.println(\"Enter the number\");\n try (Scanner scanner = new Scanner(System.in)) {\n long theNumber = scanner.nextLong();\n\n //Using inBuilt method from the Integer class\n String x = Long.toBinaryString(theNumber);\n System.out.println(x);\n\n System.out.println(x.concat(\"0\".repeat(5)));\n new String(new char[10]);\n\n\n }\n }",
"private static char[] m619z(String str) {\n char[] toCharArray = str.toCharArray();\n if (toCharArray.length < 2) {\n toCharArray[0] = (char) (toCharArray[0] ^ 20);\n }\n return toCharArray;\n }",
"private static String digits(long val, int digits) {\n long hi = 1L << (digits * 4);\n return Long.toHexString(hi | (val & (hi - 1))).substring(1);\n }",
"private static String m12564b(String str, String str2, String str3) {\n StringBuilder sb = new StringBuilder(String.valueOf(str).length() + 4 + String.valueOf(str2).length() + String.valueOf(str3).length());\n sb.append(str);\n sb.append(\"|T|\");\n sb.append(str2);\n sb.append(\"|\");\n sb.append(str3);\n return sb.toString();\n }",
"private static String create50DigitString(){\n StringBuilder sb = new StringBuilder(\"1\");\n for(int i = 1; i < 50; i++){\n sb.append(\"0\");\n }\n return sb.toString();\n }",
"private static String getCheckSum(String msg)\n {\n byte y = 0;\n String chk = null;\n for (int x = 0; x < msg.length() - 1; x++) {\t\t\n if (msg.charAt(x) == '*') { // Detect the asterisk \n break;\n } else {\n y ^= (msg.charAt(x) & 0X7F); // Buffer 127 bit\t \t\t\n }\n }\n chk = Integer.toHexString(y).toUpperCase();\n if (chk.length() == 1) {\n chk = \"0\" + chk;\n }\t\t\n return chk;\n }",
"public static void main(String[] args) {\n\tString NUM = \"73167176531330624919225119674426574742355349194934\" +\n \"96983520312774506326239578318016984801869478851843\" +\n \"85861560789112949495459501737958331952853208805511\" +\n \"12540698747158523863050715693290963295227443043557\" +\n \"66896648950445244523161731856403098711121722383113\" +\n \"62229893423380308135336276614282806444486645238749\" +\n \"30358907296290491560440772390713810515859307960866\" +\n \"70172427121883998797908792274921901699720888093776\" +\n \"65727333001053367881220235421809751254540594752243\" +\n \"52584907711670556013604839586446706324415722155397\" +\n \"53697817977846174064955149290862569321978468622482\" +\n \"83972241375657056057490261407972968652414535100474\" +\n \"82166370484403199890008895243450658541227588666881\" +\n \"16427171479924442928230863465674813919123162824586\" +\n \"17866458359124566529476545682848912883142607690042\" +\n \"24219022671055626321111109370544217506941658960408\" +\n \"07198403850962455444362981230987879927244284909188\" +\n \"84580156166097919133875499200524063689912560717606\" +\n \"05886116467109405077541002256983155200055935729725\" +\n \"71636269561882670428252483600823257530420752963450\";\n\n //greatest combo array\n int[] greatestCombo = new int[13];\n //array to iterate through NUMS\n int[] combos = new int[13];\n //adjacency\n boolean adjacent = true;\n //product\n long product = 1;\n //maxProduct\n long maxProduct = 0;\n\n\t//iterating through the entire NUM string\n\tfor(int i = 0 ; i < NUM.length()-13; i++){\n\t //make a temporary array with the combination of the three numbers\n\t for(int c = 0; c < 13; c++){\n\t combos[c] = NUM.charAt(i+c);\n }\n\n\t //loop to determine if the numbers are adjacent\n for(int k = 1; k < 13; k++){\n if(abs(combos[k-1]-combos[k])>1){\n adjacent = false;\n break;\n }\n }\n\n //now that we have an adjacent 13-number array\n if(adjacent){\n //find the product\n for(int r = 0; r < 13; r++){\n product *= combos[r];\n }\n\n if(product > maxProduct){\n maxProduct = product;\n for(int p = 0; p < 13; p++){\n greatestCombo[p]=combos[p];\n }\n }\n }\n\n }\n System.out.println(maxProduct);\n\n }",
"public String countAndSay(int n) {\n Map<Integer, String> ans = new HashMap<>();\n\n ans.put(1, \"1\");\n ans.put(2, \"11\");\n ans.put(3, \"21\");\n ans.put(4, \"1211\");\n ans.put(5, \"111221\");\n ans.put(6, \"312211\");\n ans.put(7, \"13112221\");\n ans.put(8, \"1113213211\");\n ans.put(9, \"31131211131221\");\n ans.put(10, \"13211311123113112211\");\n ans.put(11, \"11131221133112132113212221\");\n ans.put(12, \"3113112221232112111312211312113211\");\n ans.put(13, \"1321132132111213122112311311222113111221131221\");\n ans.put(14, \"11131221131211131231121113112221121321132132211331222113112211\");\n ans.put(15, \"311311222113111231131112132112311321322112111312211312111322212311322113212221\");\n ans.put(16, \"132113213221133112132113311211131221121321131211132221123113112221131112311332111213211322211312113211\");\n ans.put(17, \"11131221131211132221232112111312212321123113112221121113122113111231133221121321132132211331121321231231121113122113322113111221131221\");\n ans.put(18, \"31131122211311123113321112131221123113112211121312211213211321322112311311222113311213212322211211131221131211132221232112111312111213111213211231131122212322211331222113112211\");\n ans.put(19, \"1321132132211331121321231231121113112221121321132122311211131122211211131221131211132221121321132132212321121113121112133221123113112221131112311332111213122112311311123112111331121113122112132113213211121332212311322113212221\");\n ans.put(20, \"11131221131211132221232112111312111213111213211231132132211211131221131211221321123113213221123113112221131112311332211211131221131211132211121312211231131112311211232221121321132132211331121321231231121113112221121321133112132112312321123113112221121113122113121113123112112322111213211322211312113211\");\n ans.put(21, \"311311222113111231133211121312211231131112311211133112111312211213211312111322211231131122211311122122111312211213211312111322211213211321322113311213212322211231131122211311123113223112111311222112132113311213211221121332211211131221131211132221232112111312111213111213211231132132211211131221232112111312211213111213122112132113213221123113112221131112311311121321122112132231121113122113322113111221131221\");\n ans.put(22, \"132113213221133112132123123112111311222112132113311213211231232112311311222112111312211311123113322112132113213221133122112231131122211211131221131112311332211211131221131211132221232112111312111213322112132113213221133112132113221321123113213221121113122123211211131221222112112322211231131122211311123113321112131221123113111231121113311211131221121321131211132221123113112211121312211231131122211211133112111311222112111312211312111322211213211321322113311213211331121113122122211211132213211231131122212322211331222113112211\");\n ans.put(23, \"111312211312111322212321121113121112131112132112311321322112111312212321121113122112131112131221121321132132211231131122211331121321232221121113122113121113222123112221221321132132211231131122211331121321232221123113112221131112311332111213122112311311123112112322211211131221131211132221232112111312211322111312211213211312111322211231131122111213122112311311221132211221121332211213211321322113311213212312311211131122211213211331121321123123211231131122211211131221131112311332211213211321223112111311222112132113213221123123211231132132211231131122211311123113322112111312211312111322212321121113122123211231131122113221123113221113122112132113213211121332212311322113212221\");\n ans.put(24, \"3113112221131112311332111213122112311311123112111331121113122112132113121113222112311311221112131221123113112221121113311211131122211211131221131211132221121321132132212321121113121112133221123113112221131112311332111213213211221113122113121113222112132113213221232112111312111213322112132113213221133112132123123112111311222112132113311213211221121332211231131122211311123113321112131221123113112221132231131122211211131221131112311332211213211321223112111311222112132113212221132221222112112322211211131221131211132221232112111312111213111213211231132132211211131221232112111312211213111213122112132113213221123113112221133112132123222112111312211312112213211231132132211211131221131211132221121311121312211213211312111322211213211321322113311213212322211231131122211311123113321112131221123113112211121312211213211321222113222112132113223113112221121113122113121113123112112322111213211322211312113211\");\n ans.put(25, \"132113213221133112132123123112111311222112132113311213211231232112311311222112111312211311123113322112132113212231121113112221121321132132211231232112311321322112311311222113111231133221121113122113121113221112131221123113111231121123222112132113213221133112132123123112111312111312212231131122211311123113322112111312211312111322111213122112311311123112112322211211131221131211132221232112111312111213111213211231132132211211131221232112111312212221121123222112132113213221133112132123123112111311222112132113213221132213211321322112311311222113311213212322211211131221131211221321123113213221121113122113121132211332113221122112133221123113112221131112311332111213122112311311123112111331121113122112132113121113222112311311221112131221123113112221121113311211131122211211131221131211132221121321132132212321121113121112133221123113112221131112212211131221121321131211132221123113112221131112311332211211133112111311222112111312211311123113322112111312211312111322212321121113121112133221121321132132211331121321231231121113112221121321132122311211131122211211131221131211322113322112111312211322132113213221123113112221131112311311121321122112132231121113122113322113111221131221\");\n ans.put(26, \"1113122113121113222123211211131211121311121321123113213221121113122123211211131221121311121312211213211321322112311311222113311213212322211211131221131211221321123113213221121113122113121113222112131112131221121321131211132221121321132132211331121321232221123113112221131112311322311211131122211213211331121321122112133221121113122113121113222123211211131211121311121321123113111231131122112213211321322113311213212322211231131122211311123113223112111311222112132113311213211221121332211231131122211311123113321112131221123113111231121113311211131221121321131211132221123113112211121312211231131122113221122112133221121113122113121113222123211211131211121311121321123113213221121113122113121113222113221113122113121113222112132113213221232112111312111213322112311311222113111221221113122112132113121113222112311311222113111221132221231221132221222112112322211213211321322113311213212312311211131122211213211331121321123123211231131122211211131221131112311332211213211321223112111311222112132113213221123123211231132132211231131122211311123113322112111312211312111322111213122112311311123112112322211213211321322113312211223113112221121113122113111231133221121321132132211331121321232221123123211231132132211231131122211331121321232221123113112221131112311332111213122112311311123112112322211211131221131211132221232112111312111213111213211231132132211211131221131211221321123113213221123113112221131112211322212322211231131122211322111312211312111322211213211321322113311213211331121113122122211211132213211231131122212322211331222113112211\");\n ans.put(27, \"31131122211311123113321112131221123113111231121113311211131221121321131211132221123113112211121312211231131122211211133112111311222112111312211312111322211213211321322123211211131211121332211231131122211311122122111312211213211312111322211231131122211311123113322112111331121113112221121113122113111231133221121113122113121113222123211211131211121332211213211321322113311213211322132112311321322112111312212321121113122122211211232221123113112221131112311332111213122112311311123112111331121113122112132113311213211321222122111312211312111322212321121113121112133221121321132132211331121321132213211231132132211211131221232112111312212221121123222112132113213221133112132123123112111311222112132113311213211231232112311311222112111312211311123113322112132113212231121113112221121321132122211322212221121123222112311311222113111231133211121312211231131112311211133112111312211213211312111322211231131122211311123113322113223113112221131112311332211211131221131211132211121312211231131112311211232221121321132132211331221122311311222112111312211311123113322112132113213221133122211332111213112221133211322112211213322112111312211312111322212321121113121112131112132112311321322112111312212321121113122112131112131221121321132132211231131122211331121321232221121113122113121122132112311321322112111312211312111322211213111213122112132113121113222112132113213221133112132123222112311311222113111231132231121113112221121321133112132112211213322112111312211312111322212311222122132113213221123113112221133112132123222112111312211312111322212321121113121112133221121311121312211213211312111322211213211321322123211211131211121332211213211321322113311213212312311211131122211213211331121321122112133221123113112221131112311332111213122112311311123112111331121113122112132113121113222112311311222113111221221113122112132113121113222112132113213221133122211332111213322112132113213221132231131122211311123113322112111312211312111322212321121113122123211231131122113221123113221113122112132113213211121332212311322113212221\");\n ans.put(28, \"13211321322113311213212312311211131122211213211331121321123123211231131122211211131221131112311332211213211321223112111311222112132113213221123123211231132132211231131122211311123113322112111312211312111322111213122112311311123112112322211213211321322113312211223113112221121113122113111231133221121321132132211331121321232221123123211231132132211231131122211331121321232221123113112221131112311332111213122112311311123112112322211211131221131211132221232112111312211322111312211213211312111322211231131122111213122112311311221132211221121332211213211321322113311213212312311211131122211213211331121321123123211231131122211211131221232112111312211312113211223113112221131112311332111213122112311311123112112322211211131221131211132221232112111312211322111312211213211312111322211231131122111213122112311311221132211221121332211211131221131211132221232112111312111213111213211231132132211211131221232112111312211213111213122112132113213221123113112221133112132123222112111312211312112213211231132132211211131221131211322113321132211221121332211213211321322113311213212312311211131122211213211331121321123123211231131122211211131221131112311332211213211321322113311213212322211322132113213221133112132123222112311311222113111231132231121113112221121321133112132112211213322112111312211312111322212311222122132113213221123113112221133112132123222112111312211312111322212311322123123112111321322123122113222122211211232221123113112221131112311332111213122112311311123112111331121113122112132113121113222112311311221112131221123113112221121113311211131122211211131221131211132221121321132132212321121113121112133221123113112221131112212211131221121321131211132221123113112221131112311332211211133112111311222112111312211311123113322112111312211312111322212321121113121112133221121321132132211331121321132213211231132132211211131221232112111312212221121123222112311311222113111231133211121321321122111312211312111322211213211321322123211211131211121332211231131122211311123113321112131221123113111231121123222112111331121113112221121113122113111231133221121113122113121113221112131221123113111231121123222112111312211312111322212321121113121112131112132112311321322112111312212321121113122122211211232221121321132132211331121321231231121113112221121321133112132112312321123113112221121113122113111231133221121321132132211331221122311311222112111312211311123113322112111312211312111322212311322123123112112322211211131221131211132221132213211321322113311213212322211231131122211311123113321112131221123113112211121312211213211321222113222112132113223113112221121113122113121113123112112322111213211322211312113211\");\n ans.put(29, \"11131221131211132221232112111312111213111213211231132132211211131221232112111312211213111213122112132113213221123113112221133112132123222112111312211312112213211231132132211211131221131211132221121311121312211213211312111322211213211321322113311213212322211231131122211311123113223112111311222112132113311213211221121332211211131221131211132221231122212213211321322112311311222113311213212322211211131221131211132221232112111312111213322112131112131221121321131211132221121321132132212321121113121112133221121321132132211331121321231231121113112221121321133112132112211213322112311311222113111231133211121312211231131122211322311311222112111312211311123113322112132113212231121113112221121321132122211322212221121123222112111312211312111322212321121113121112131112132112311321322112111312212321121113122112131112131221121321132132211231131122111213122112311311222113111221131221221321132132211331121321231231121113112221121321133112132112211213322112311311222113111231133211121312211231131122211322311311222112111312211311123113322112132113212231121113112221121321132122211322212221121123222112311311222113111231133211121312211231131112311211133112111312211213211312111322211231131122111213122112311311222112111331121113112221121113122113121113222112132113213221232112111312111213322112311311222113111221221113122112132113121113222112311311222113111221132221231221132221222112112322211211131221131211132221232112111312111213111213211231132132211211131221232112111312211213111213122112132113213221123113112221133112132123222112111312211312111322212321121113121112133221132211131221131211132221232112111312111213322112132113213221133112132113221321123113213221121113122123211211131221222112112322211231131122211311123113321112132132112211131221131211132221121321132132212321121113121112133221123113112221131112311332111213211322111213111213211231131211132211121311222113321132211221121332211213211321322113311213212312311211131122211213211331121321123123211231131122211211131221131112311332211213211321223112111311222112132113213221123123211231132132211231131122211311123113322112111312211312111322111213122112311311123112112322211213211321322113312211223113112221121113122113111231133221121321132132211331121321232221123123211231132132211231131122211331121321232221123113112221131112311332111213122112311311123112112322211211131221131211132221232112111312211322111312211213211312111322211231131122111213122112311311221132211221121332211213211321322113311213212312311211131211131221223113112221131112311332211211131221131211132211121312211231131112311211232221121321132132211331121321231231121113112221121321133112132112211213322112312321123113213221123113112221133112132123222112311311222113111231132231121113112221121321133112132112211213322112311311222113111231133211121312211231131112311211133112111312211213211312111322211231131122111213122112311311221132211221121332211211131221131211132221232112111312111213111213211231132132211211131221232112111312211213111213122112132113213221123113112221133112132123222112111312211312111322212311222122132113213221123113112221133112132123222112311311222113111231133211121321132211121311121321122112133221123113112221131112311332211322111312211312111322212321121113121112133221121321132132211331121321231231121113112221121321132122311211131122211211131221131211322113322112111312211322132113213221123113112221131112311311121321122112132231121113122113322113111221131221\");\n ans.put(30, \"3113112221131112311332111213122112311311123112111331121113122112132113121113222112311311221112131221123113112221121113311211131122211211131221131211132221121321132132212321121113121112133221123113112221131112212211131221121321131211132221123113112221131112311332211211133112111311222112111312211311123113322112111312211312111322212321121113121112133221121321132132211331121321132213211231132132211211131221232112111312212221121123222112311311222113111231133211121321321122111312211312111322211213211321322123211211131211121332211231131122211311123113321112131221123113111231121123222112111331121113112221121113122113111231133221121113122113121113221112131221123113111231121123222112111312211312111322212321121113121112131112132112311321322112111312212321121113122122211211232221121321132132211331121321231231121113112221121321132132211322132113213221123113112221133112132123222112111312211312112213211231132132211211131221131211322113321132211221121332211231131122211311123113321112131221123113111231121113311211131221121321131211132221123113112211121312211231131122211211133112111311222112111312211312111322211213211321223112111311222112132113213221133122211311221122111312211312111322212321121113121112131112132112311321322112111312212321121113122122211211232221121321132132211331121321231231121113112221121321132132211322132113213221123113112221133112132123222112111312211312112213211231132132211211131221131211322113321132211221121332211213211321322113311213212312311211131122211213211331121321123123211231131122211211131221131112311332211213211321223112111311222112132113213221123123211231132132211231131122211311123113322112111312211312111322111213122112311311123112112322211213211321322113312211223113112221121113122113111231133221121321132132211331222113321112131122211332113221122112133221123113112221131112311332111213122112311311123112111331121113122112132113121113222112311311221112131221123113112221121113311211131122211211131221131211132221121321132132212321121113121112133221123113112221131112311332111213122112311311123112112322211322311311222113111231133211121312211231131112311211232221121113122113121113222123211211131221132211131221121321131211132221123113112211121312211231131122113221122112133221121321132132211331121321231231121113121113122122311311222113111231133221121113122113121113221112131221123113111231121123222112132113213221133112132123123112111312211322311211133112111312211213211311123113223112111321322123122113222122211211232221121113122113121113222123211211131211121311121321123113213221121113122123211211131221121311121312211213211321322112311311222113311213212322211211131221131211221321123113213221121113122113121113222112131112131221121321131211132221121321132132211331121321232221123113112221131112311322311211131122211213211331121321122112133221121113122113121113222123112221221321132132211231131122211331121321232221121113122113121113222123211211131211121332211213111213122112132113121113222112132113213221232112111312111213322112132113213221133112132123123112111311222112132113311213211221121332211231131122211311123113321112131221123113112221132231131122211211131221131112311332211213211321223112111311222112132113212221132221222112112322211211131221131211132221232112111312111213111213211231131112311311221122132113213221133112132123222112311311222113111231132231121113112221121321133112132112211213322112111312211312111322212321121113121112131112132112311321322112111312212321121113122122211211232221121311121312211213211312111322211213211321322123211211131211121332211213211321322113311213211322132112311321322112111312212321121113122122211211232221121321132132211331121321231231121113112221121321133112132112312321123113112221121113122113111231133221121321132122311211131122211213211321222113222122211211232221123113112221131112311332111213122112311311123112111331121113122112132113121113222112311311221112131221123113112221121113311211131122211211131221131211132221121321132132212321121113121112133221123113112221131112311332111213213211221113122113121113222112132113213221232112111312111213322112132113213221133112132123123112111312211322311211133112111312212221121123222112132113213221133112132123222113223113112221131112311332111213122112311311123112112322211211131221131211132221232112111312111213111213211231132132211211131221131211221321123113213221123113112221131112211322212322211231131122211322111312211312111322211213211321322113311213211331121113122122211211132213211231131122212322211331222113112211\");\n \n return ans.get(n);\n }",
"public static void main(String[] args) \n\t{\n\t\tString str = \"647mahesh\";\n\t\tint size = str.length();\n\t\tint i;\n\t\tfor (i = 0; i < size ; i++)\n\t\t{\n\t\t\tchar split = str.charAt(i);\n\t\t\tif ('0'<=split && split<='8')\n\t\t\tbreak;\n\t\t}\n\t\tString numeric = str.substring(0,i);\n\t\tString alphabets = str.substring(i);\n\t\tSystem.out.println(numeric);\n\t\tSystem.out.println(alphabets);\n\t}",
"public static void main(String[] args) {\n\t\tString binary = Integer.toBinaryString(5);\r\n int count=0;\r\n int max=0;\r\n for(int i=0; i<binary.length();i++){\r\n \tif(binary.charAt(i)=='1'){\r\n count++;\r\n if(count>max)\r\n max=count;\r\n }else{\r\n count=0;\r\n }\r\n }\r\n System.out.println(max);\r\n\r\n\t}",
"public static void main(String[] args) {\n// String before1 = \"27e80000\";\n// String before1 = \"715b00000\";\n String before1 = \"715b00000\";\n\n long after1 = Long.parseLong(before1, 16);\n System.out.println(after1);\n\n// String before2 = \"28d80000\";\n// String before2 = \"7c0000000\";\n// String before2 = \"71db80000\";\n String before2 = \"720580000\";\n long after2 = Long.parseLong(before2, 16);\n System.out.println(after2);\n\n long size = (after2 - after1) / 1024 / 1024;\n System.out.println(\"Size: \" + size + \"M\");\n }",
"public static void main(String[] args) {\n\t\tint x = ~0;\r\n\t\tSystem.out.println(Integer.toBinaryString(x));\r\n\t\tint y = x>>>8;\r\n\t\tSystem.out.println(Integer.toBinaryString(y));\r\n\t\tSystem.out.println(x+\" \"+y);\r\n\t\t\r\n\t\tint N = 1<<31;\r\n\t\tint M = 0b11;\r\n\t\tint j=2;\r\n\t\tint i=1;\r\n\t\tSystem.out.println(Integer.toBinaryString(N));\r\n\t\tSystem.out.println(Integer.toBinaryString(M));\r\n\t\tSystem.out.println(Integer.toBinaryString(insertMIntoNFromJtoI(M, N, j, i)));\r\n\t\t\r\n\t}",
"static long substrCount(int n, String s) {\nchar arr[]=s.toCharArray();\nint round=0;\nlong count=0;\nwhile(round<=arr.length/2)\n{\nfor(int i=0;i<arr.length;i++)\n{\n\t\n\t\tif(round==0)\n\t\t{\n\t\t//System.out.println(arr[round+i]);\n\t\tcount++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(i-round>=0&&i+round<arr.length)\n\t\t\t{\n\t\t\t\tboolean flag=true;\n\t\t\t\tchar prev1=arr[i-round];\n\t\t\t\tchar prev2=arr[i+round];\n\t\t\t\t\n\t\t\t\tfor(int j=1;j<=round;j++)\n\t\t\t\t{\n\t\t\t\t\tif(prev1!=arr[i+j]||prev1!=arr[i-j])\n\t\t\t\t\t{\n\t\t\t\t\t\tflag=false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\tif(arr[i+j]!=arr[i-j])\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\tflag=false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(flag)\n\t\t\t\t{\n\t\t\t\t\t//System.out.print(arr[i-round]);\n\t\t\t\t\t//System.out.print(arr[round+i]);\n\t\t\t\t\t//System.out.println(round);\n\t\t\t\t\t//System.out.println();\n\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n}\nround++;\n}\nreturn count;\n }",
"private static long m26007a(String str, long j) {\n if (str == null || str.isEmpty()) {\n return C10442z4.m26659a(ByteBuffer.allocate(8).putLong(j).array());\n }\n byte[] bytes = str.getBytes(f26939b);\n ByteBuffer allocate = ByteBuffer.allocate(bytes.length + 8);\n allocate.put(bytes);\n allocate.putLong(j);\n return C10442z4.m26659a(allocate.array());\n }",
"public static List<String> findStrobogrammatic(int n) {\n List<String> cur, ans;\n ans = new ArrayList<String>((n & 1) == 0 ? Arrays.asList(\"\") : Arrays.asList(\"0\", \"1\", \"8\"));\n if (n < 2) return ans;\n\n for (;n > 1; n -= 2) {\n cur = ans;\n ans = new ArrayList<String>();\n for (String i : cur) {\n if (n > 3) {\n ans.add('0' + i + '0');\n }\n ans.add('1' + i + '1');\n ans.add('8' + i + '8');\n ans.add('6' + i + '9');\n ans.add('9' + i + '6');\n }\n }\n System.out.println(ans.size());\n return ans;\n }",
"public int numDupDigitsAtMostN(int n) {\n List<Integer> digits = new ArrayList<>();\n for (int i = n + 1; i > 0; i /= 10)\n digits.add(0, i % 10);\n int res = 0, n = digits.size();\n // *, **, ***, **** until 54321\n for (int i = 1; i < n; i++)\n res += 9 * A(9, i - 1);\n // 1****, 2****, 3****, ...\n // 12***, 13***, ...\n boolean[] contains = new boolean[10];\n // From the first index to last index of digit\n for (int index = 0; index < n; index++) {\n int end = digits.get(index);// end of permutation\n for (int d = index == 0 ? 1 : 0; d < end; d++)\n if (!contains[d])\n res += A(9 - index, n - index - 1);// choose (n - index - 1) numbers from (10 - index - 1)\n // Because as we continue, the prefix already contains duplicate\n if (contains[end])\n break;\n contains[end] = true;\n }\n return n - res;\n }",
"static long m5599a(String str) {\n String[] split = str.split(\"\\\\:\");\n byte[] bArr = new byte[6];\n int i = 0;\n while (i < 6) {\n try {\n bArr[i] = (byte) Integer.parseInt(split[i], 16);\n i++;\n } catch (NumberFormatException unused) {\n return 0;\n }\n }\n return ((((long) bArr[0]) & 255) << 40) | ((((long) bArr[3]) & 255) << 16) | (((long) bArr[5]) & 255) | ((((long) bArr[4]) & 255) << 8) | ((((long) bArr[2]) & 255) << 24) | ((((long) bArr[1]) & 255) << 32);\n }",
"public int count_decoding_improved(char[] digits, int n){\n// if(n==0 || n==1)\n// return 1;\n\n int[] count = new int[n+1];\n\n count[0] = 1;\n count[1] = 1;\n //int count = 0;\n\n for(int i = 2; i <= n; i++){\n if(digits[i-1] > '0')\n count[i] = count[i-1];\n\n if(digits[i-2]=='1' || digits[i-2] == '2' && digits[i-1] < '7')\n count[i] += count[i-2];\n }\n\n\n\n return count[n];\n }",
"public static void main(String args[]){\n\n //even number of everything\n //odd number of 1 thing MAX\n\n //sort string\n //check subsequent chars to count their numbers until length -1\n //break if 2 odd number chars\n System.out.println(isPalindromePermutation(\"22334455asdfdsa66\"));\n\n\n }",
"static int findBinaryStringBrutForce(int[] arr){\n int numOfZeros;\n int numOfOnes;\n int maxLength = 0;\n for(int i=0; i<arr.length; i++) {\n numOfZeros=0;\n numOfOnes=0;\n for(int j=i; j<arr.length; j++) {\n if(arr[j] == 0)\n numOfZeros++;\n else\n numOfOnes++;\n if( numOfZeros == numOfOnes )\n maxLength = Math.max(maxLength, numOfZeros*2 );\n }\n }\n return maxLength;\n }",
"public static void main(String[] args) {\n\t\tString str=\"aabcccccaaaa\";\n\t\tString str2=\"\";\n\t\tint freq=1;\n\t\tfor(int i=0;i<str.length()-1;i++){\n\t\t\tif(str.charAt(i)==str.charAt(i+1)){\n\t\t\t\tfreq++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstr2=str2+str.charAt(i)+freq;\n\t\t\t\tfreq=1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(str2+str.charAt(str.length()-1)+freq);\n\t}",
"public static void show() {\r\n\t\t int[] forword=new int[6];\r\n\t\t int[] temp;\r\n\t\t for(int i=1;i<7;i++){\r\n\t\t\t temp=Arrays.copyOf(forword, 6);\r\n\t\t\t for(int j=0;j<i;j++){\r\n\t\t\t\t if(j==0){\r\n\t\t\t\t\t forword[0]=i;\r\n\t\t\t\t\t System.out.print(forword[0]+\" \");\r\n\t\t\t\t }else{\r\n\t\t\t\t\t forword[j]=forword[j-1]+temp[j-1];\r\n\t\t\t\t\t System.out.print(forword[j]+\" \");\t\t \r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t System.out.println();\r\n\t\t }\r\n\t\t //0-9:48-57 ; A-Z:65-90 ; a-z:97-122 \r\n\t\t\r\n\t}",
"private static String[] getValidMiniFloatBitSequences(){\r\n int nbrValues = (int)Math.pow(2, MINI_FLOAT_SIZE);\r\n\r\n String[] result = new String[nbrValues];\r\n for(int i = 0; i < nbrValues; i++){\r\n\r\n String full = String.format(\"%\" + Integer.SIZE + \"s\", Integer.toBinaryString(i))\r\n .replace(' ', '0');\r\n result[i] = full.substring(Integer.SIZE - MINI_FLOAT_SIZE, Integer.SIZE);\r\n }\r\n return result;\r\n }",
"public static void main(String[] args) {\n\t\tint m = 12345;\n\t\tint n = 123;\n\t\tString mBin = \"11000000111001\";\n\t\tString nBin = \"1111011\";\n\t\tSystem.out.println(updateBits(mBin, nBin, 2, 8));\n\t\t//myUpdateBits(412, 14, 4, 7);\n\t}",
"private static char[] m6491z(String str) {\n char[] toCharArray = str.toCharArray();\n if (toCharArray.length < 2) {\n toCharArray[0] = (char) (toCharArray[0] ^ 108);\n }\n return toCharArray;\n }",
"@Test\n\tpublic void testInputWithMoreNumbers() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0; i <= 100; i++) {\n\t\t\tsb.append(i);\n\t\t\tif (i <100) {\n\t\t\t\tsb.append(\" \");\n\t\t\t}\n\t\t}\n\t\t\n\t\tassertEquals(\"Many numbers in input string\", 5050L, calculator.calculeteSum(sb.toString()).longValue());\n\t}",
"private String Rellenar(String cadena) \n {\n String c = \"\";\n for(int i=0; i<cadena.length();i++)\n {\n c+=Completar(Integer.toBinaryString( cadena.charAt(i)),8);\n }\n //Completar para que sea multiplo de 512\n int longitud = c.length();\n c+=\"1\";\n while((c.length()+64)%512!=0)\n c+=\"0\";\n c+=Completar(Integer.toBinaryString(longitud),64);\n return c;\n }",
"static int alternate(String s) {\n\n \n char[] charArr = s.toCharArray();\n\n int[] arrCount=new int[((byte)'z')+1];\n\n for(char ch:s.toCharArray()){ \n arrCount[(byte)ch]+=1;\n }\n \n int maxLen=0;\n for(int i1=0;i1<charArr.length;++i1)\n {\n char ch1= charArr[i1];\n for(int i2=i1+1;i2<charArr.length;++i2)\n {\n char ch2 = charArr[i2];\n if(ch1 == ch2)\n break;\n\n //validate possible result\n boolean ok=true;\n {\n char prev = ' ';\n for(char x:charArr){\n if(x == ch1 || x == ch2){\n if(prev == x){\n ok=false;\n break;\n }\n prev = x;\n }\n }\n\n }\n if(ok)\n maxLen = Math.max(maxLen,arrCount[(byte)ch1]+arrCount[(byte)ch2]);\n }\n }\n\n return maxLen;\n\n }",
"@Test\n public void consTest1() throws Exception {\n parsecs.digits.parse(Lists.charactersOf(\"123456789b\"))\n .forEach(this::dumpResult);\n }",
"public List<String> findRepeatedDnaSequences(String s){\n HashMap<Character,Integer> map=new HashMap<>();\n Set<Integer> firstSet=new HashSet<>();\n Set<Integer> dupSet=new HashSet<>();\n List<String> res=new ArrayList<>();\n map.put('A',0);\n map.put('C',1);\n map.put('G',2);\n map.put('T',3);\n char[] chars=s.toCharArray();\n for(int i=0;i<chars.length-9;i++){\n int v=0;\n for(int j=i;j<i+10;j++){\n v<<=2;\n v|=map.get(chars[j]);\n }\n if(!firstSet.add(v)&&dupSet.add(v)){\n res.add(s.substring(i,i+10));\n }\n }\n return res;\n }",
"public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n String base = n + \"000000000\";\n int sum = 0;\n while (in.hasNextInt()) {\n sum += in.nextInt() % 1000000000;\n }\n String sumS = Integer.toString(sum);\n System.out.println(base.substring(0, base.length() - sumS.length()) + sumS);\n }",
"public static void pattern7(int input){\n\t\tfor(int i=1;i<=input;i++){\n\t\t\tfor(int j=1;j<=i;j++){\n\t\t\t\tSystem.out.print(j+\" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"private static int m615a(String str, int i) {\n int length = str.length() - 1;\n int i2 = 1;\n int i3 = 0;\n while (length >= 0) {\n int indexOf = (f337z[0].indexOf(str.charAt(length)) * i2) + i3;\n i3 = i2 + 1;\n if (i3 > i) {\n i3 = 1;\n }\n length--;\n i2 = i3;\n i3 = indexOf;\n }\n return i3 % 47;\n }",
"static long repeatedString(String s, long n) {\n\n char[] str = s.toCharArray();\n\n String temp = \"\";\n\n int i=0;\n long count=0;\n\n while(i<str.length){\n if(str[i]=='a'){\n count++;\n }\n i++;\n }\n\n long occurance = n/str.length;\n long remainder = n%str.length;\n count = count*occurance;\n\n i=0;\n while(i<remainder){\n if(str[i]=='a'){\n count++;\n }\n i++;\n }\n\n return count;\n\n }",
"public boolean check3sameNumbersMax(String password) {\n for (int i = 0; i < password.length() - 3; i++) {\n if (String.valueOf(password.charAt(i)).matches(\"\\\\d\")) { //next time: Character.isDigit(passtword.charAt(i))\n for (int j = i; j < i+3; j++) {\n if (password.charAt(j) != password.charAt(j + 1)) {\n break;\n } else if (j-i == 2) {\n return false;\n }\n }\n }\n }\n return true;\n }",
"public static void main(String[] args) throws Exception {\n String s;\n// s = \"0000000000000\";\n s = \"000000-123456\";\n// s = \"000000123456\";\n if (s.matches(\"^0+$\")) {\n s = \"0\";\n }else{\n s = s.replaceFirst(\"^0+\",\"\");\n }\n System.out.println(s);\n\n\n// System.out.println(StringUtils.addRight(s,'A',mod));\n// String s = \"ECPay thong bao: Tien dien T11/2015 cua Ma KH PD13000122876, la 389.523VND. Truy cap www.ecpay.vn hoac lien he 1900561230 de biet them chi tiet.\";\n// Pattern pattern = Pattern.compile(\"^(.+)[ ](\\\\d+([.]\\\\d+)*)+VND[.](.+)$\");\n// Matcher matcher = pattern.matcher(s);\n// if(matcher.find()){\n// System.out.println(matcher.group(2));\n// }\n }",
"public static void main(String[] args) {\n\t\t\t\n\tString str = \"aaabbbddddcccaabd\";\n\t\n\tString RemoveDup = \"\";//to store non-duplicate values of the str\n\t\n\t\n\t\n\tfor(int i = 0; i < str.length(); i++) {\n\t\tif (!RemoveDup.contains(str.substring(i, i+1))) {\n\t\t\tRemoveDup += str.substring(i, i+1);//will concat character from str to RemoveDup\n\t\t}\n\t\t\n\t}\n\tSystem.out.println(RemoveDup);\t\n\t\t\n\t\t\n\t// str = \"aaabbbddddcccaabd\"; RemoveDup = \"abcd\"\n\t//\t\t\t\t\t\t\t\t\t\t j, j+1\n\t\t// result = a5b4c3d5\n\t\t\n\t\tString result = \"\";//store expected result\n\t\t int count = 0;//count the numbers occurred characters\n\t\t\n\t\tfor(int j=0; j < RemoveDup.length(); j++) {\n\t\t for(int i=0; i <str.length(); i++) {\n\t\t\t if(str.substring(i, i+1).equals(RemoveDup.substring(j, j+1))) {\n\t\t\t\t count++;\n\t\t\t }\n\t\t }\n\t\t result += RemoveDup.substring(j, j+1)+count;\n\t\t\n\t\t}\n\t\t System.out.println(result);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\tSystem.out.println(CodeMap.getInstance().encode(\"0123456\"));\r\n\tSystem.out.println(CodeMap.getInstance().encode(\"01234567\"));\r\n\tSystem.out.println(CodeMap.getInstance().encode(\"012345678\"));\r\n\tSystem.out.println(CodeMap.getInstance().encode(\"0123456789\"));\r\n\tSystem.out.println(CodeMap.getInstance().encode(\"01234567890\"));\r\n\r\n//\tSystem.out.println(CodeMap.getInstance().decode(\"UCYF\\nALXLAT\\nSAZUF\\nCYFALT\\nXLASAU\\nYCXH\"));\r\n//\tSystem.out.println(CodeMap.getInstance().decode(\"UHTL\\nYTHCFC\\nJJZUU\\nHTLYTX\\nHCFJJT\\nAFTY\"));\r\n\t}",
"public static long sumOfDigitsByLooping(BigInteger integer) {\n String data = integer.toString();\n long sum = 0;\n for (int i = 0; i < data.length(); i++) {\n sum += data.charAt(i) & 0xF;\n }\n return sum;\n }",
"static int minSteps(int n, String B){\n // Complete this function\n int count=0;\n for(int i=0;i<n-2;i++){\n int j=i+1;\n int k=j+1;\n if(B.charAt(i) == '0' && B.charAt(j) == '1' && B.charAt(k) == '0'){\n count++;\n i=i+2;\n }\n }\n return count;\n }",
"static int printPermutn(String str, String ans)\n {\n\n // If string is empty\n if (str.length() == 0) {\n if (ans.contains(\"123\") || ans.contains(\"321\") || ans.contains(\"234\") || ans.contains(\"345\") || ans.contains(\"456\") || ans.contains(\"654\") || ans.contains(\"543\") || ans.contains(\"432\") || ans.contains(\"321\")) {\n return 0;\n }\n System.out.println(ans);\n return 1;\n }\n int res = 0;\n for (int i = 0; i < str.length(); i++) {\n\n // ith character of str\n char ch = str.charAt(i);\n\n // Rest of the string after excluding\n // the ith character\n String ros = str.substring(0, i) +\n str.substring(i + 1);\n // Recurvise call\n res += printPermutn(ros, ans + ch);\n }\n return res;\n }",
"public boolean find132pattern(int[] nums) {\n int i = 0, j=0, k=0;\n int n = nums.length;\n while (i<n){\n while (i<n-1&&nums[i]>=nums[i+1]) i++;\n j=i+1;\n while (j<n-1&&nums[j]<=nums[j+1]) j++;\n k=j+1;\n while (k<n){\n if(nums[i]<nums[j]&&nums[i]<nums[k]&&nums[k]<nums[j]){\n return true;\n }\n k++;\n }\n i=j+1;\n }\n return false;\n }",
"List<C45111a> mo107675a(Integer num, Integer num2);",
"public static void pattern9(int input){\n\t\tfor(int i= 1;i <= input;i++){\n\t\t\tfor(int j=i;j<=input;j++){\n\t\t\t\tSystem.out.print(j+\" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"private void sumbit(String ip){\n }",
"public static void main(String[] args) throws Exception {\n\t\tScanner scn = new Scanner(System.in);\r\n\t\tint tc = scn.nextInt();\r\n\t\tfor(int t=1; t<=tc; t++) {\r\n\t\t\tint n = scn.nextInt();\r\n\t\t\tint k = scn.nextInt();\r\n\t\t\tString str = scn.next();\r\n\t\t\tString arr[] = new String[n];\r\n\t\t\tarr = str.split(\"\");\r\n\t\t\tLinkedList<String> list = new LinkedList<>();\r\n\t\t\tLinkedList<Integer> result = new LinkedList<>();\r\n\t\t\tfor(int i=0; i<n; i++) {\r\n\t\t\t\tlist.add(arr[i]);\r\n\t\t\t}\r\n\t\t\tint comeback = 0;\r\n\t\t\twhile(comeback<4) {\r\n\t\t\t\tint cnt = 0;\r\n\t\t\t\tcomeback = 0;\r\n\t\t\t\tString st = \"\";\r\n\t\t\t\tfor(int i=0; i<n; i++) {\r\n\t\t\t\t\tif(cnt==(n/4)-1) {\r\n\t\t\t\t\t\tcnt = 0;\r\n\t\t\t\t\t\tst += list.get(i);\r\n\t\t\t\t\t\tint tmp = Integer.parseInt(st, 16);\r\n\t\t\t\t\t\tif(!isHave(result,tmp) && (result.size()>0)) {\r\n\t\t\t\t\t\t\tresult.add(tmp);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if(result.size() == 0){\r\n\t\t\t\t\t\t\tresult.add(tmp);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tcomeback++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tst = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tst+= list.get(i);\r\n\t\t\t\t\t\tcnt++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\trotate(list);\r\n\t\t\t}\r\n\t\t\tCollections.sort(result);\r\n\t\t\tint cnt = 0;\r\n\t\t\tSystem.out.println(\"#\"+t+\" \"+result.get(result.size()-k));\t\t\t\r\n\t\t}\r\n\t}",
"private static String mod10(String code) {\n if (!code.matches(\"\\\\d+\")) {\n return null;\n }\n if (code.length() > 5) {\n return null;\n }\n // if length < 5, add leading \"0\"\n StringBuffer input = new StringBuffer(code);\n while (input.length() < 5) {\n input.insert(0, \"0\");\n }\n\n // 1. Using the number 12345, assign positions to the digits, from right\n // to left.\n\n // 2. Take the odd digit positions counting from the right (1st, 3rd,\n // 5th, etc.)\n StringBuffer odd = new StringBuffer();\n for (int i = 0; 2 * i < input.length(); i++) {\n odd.insert(0, input.charAt(2 * i));\n }\n\n // 3.Multiply by 2.\n int odd2 = Integer.parseInt(odd.toString()) * 2;\n\n // 4. Take the even digit positions starting from the right (2nd, 4th,\n // etc.).\n StringBuffer even = new StringBuffer();\n for (int i = 0; 2 * i + 1 < input.length(); i++) {\n even.insert(0, input.charAt(2 * i + 1));\n }\n\n // 5.Append (4) to the front of the results of (3).\n even.append(odd2);\n\n // 6. Add the digits of (5) together.\n double add = 0;\n for (int i = 0; i < even.length(); i++) {\n add = add + Integer.parseInt(even.substring(i, i + 1));\n }\n\n // 7. Find the next highest multiple of 10.\n double multiple = Math.ceil(add / 10) * 10;\n\n // 8. Subtract (6) from (7).\n Long result = Math.round(multiple - add);\n\n return result.toString();\n }",
"public int palsubsequence2(String str) {\r\n\t\tint m = str.length();\r\n\t\tint[][] mem = new int[m + 1][m + 1];\r\n\r\n\t\tfor (int i = 1; i <= m; ++i) {\r\n\t\t\tmem[i][i] = 1;\r\n\t\t}\r\n\t\t// Bottom-up row-wise filling\r\n\t\tfor (int i = m - 1; i >= 1; --i) {\r\n\t\t\tfor (int j = i + 1; j <= m; ++j) {\r\n\r\n\t\t\t\tif (str.charAt(i - 1) == str.charAt(j - 1))\r\n\t\t\t\t\tmem[i][j] = mem[i + 1][j - 1] + 2;\r\n\t\t\t\telse {\r\n\t\t\t\t\tint incr = mem[i + 1][j];\r\n\t\t\t\t\tint decr = mem[i][j - 1];\r\n\t\t\t\t\tmem[i][j] = Math.max(incr, decr);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tprintMemory(mem);\r\n\t\t// printSequence(mem, 1, m, str);\r\n\t\tSystem.out.println();\r\n\t\treturn mem[1][m];\r\n\r\n\t}",
"public static void main(String[] args) {\n\t\tint N = 234;\n\t\tint times=N%10;\n\t\tN/=10;\n\t\tint temp=N/10,sum=0;\n\t\twhile(times>0)\n\t\t{\n\t\t\tint rem=N%10;\n\t\t\tsum=temp+rem;\n\t\t\ttemp=sum;\n\t\t\ttimes--;\n\t\t}\n\t\tSystem.out.println(temp);\n\t\n\t}",
"public int countDigitOne(int n) {\n int res = 0;\n for(long i = 1 ; i <= n; i *= 10){\n long k = n/i, r = n % i;\n res += (k + 8) / 10 * i + ((k%10 == 1)?(r+1):0);\n }\n return res;\n }",
"@Test\n\t public void test5 ()\n\t{\n\t\t\tString s = new String(\"aaabaaaaabaabaaaabaaaaaaaaaaaaaabaaaaaaaaaaaaaaabaaaaaaaaaaaaaaba\");\n\t s = s.replaceAll(\"\\\\s+\", \" \");\n\t assertEquals(\"aaaaaaaaaaaaaabaaaaaaaaaaaaaa\", LRS.lrs(s)); \n\t}",
"static int findBinaryStringUsingHMap(int[] arr){\n Map<Integer, Integer> map = new HashMap<>();\n int count =0, maxLength =0;\n //need a default value in map (0,-1) i.e count is zero at index -1 because when we start travelling\n // (after +- counter and encounter zero at very first time (means 0==1) means from index 0 --> current 0=1\n // to calculate the length we need 0,-1\n //e.g 0 1 --> count will be like -1 --> 0 at 1 = 1 ( how to calculate i-(-1) => 2\n map.put(0, -1);\n for(int i=0; i<arr.length; i++){\n count = count + (arr[i]==1 ? 1 : -1);\n if(map.containsKey(count)){\n maxLength = Math.max(maxLength, i - map.get(count));\n }else{\n map.put(count, i);\n }\n }\n return maxLength;\n }",
"public String digit(String digit);",
"@Test\n public void repeatedSubstringPattern() {\n assertTrue(new Solution1().repeatedSubstringPattern(\"abcabcabcabc\"));\n }",
"public static int[] convertToBinary(String[] str)\n {\n int binaryArr[] = new int[32];\n int a, b, c, d, i, remainder;\n a = b = c = d = 1;\n Stack<Integer> st = new Stack<Integer>();\n\n // Separate each number of the IP address e.g. for 10.0.0.1 => a=10, b=0, c=0, d=1\n if (str != null)\n {\n a = Integer.parseInt(str[0]);\n b = Integer.parseInt(str[1]);\n c = Integer.parseInt(str[2]);\n d = Integer.parseInt(str[3]);\n }\n\n // convert first number to binary\n for (i = 0; i <= 7; i++)\n {\n remainder = a % 2;\n st.push(remainder);\n a = a / 2;\n }\n\n // Obtain First octet\n for (i = 0; i <= 7; i++) {\n binaryArr[i] = st.pop();\n }\n\n // convert second number to binary\n for (i = 8; i <= 15; i++) {\n remainder = b % 2;\n st.push(remainder);\n b = b / 2;\n }\n\n // Obtain Second octet\n for (i = 8; i <= 15; i++) {\n binaryArr[i] = st.pop();\n }\n\n // convert Third number to binary\n for (i = 16; i <= 23; i++) {\n remainder = c % 2;\n st.push(remainder);\n c = c / 2;\n }\n\n // Obtain Third octet\n for (i = 16; i <= 23; i++) {\n binaryArr[i] = st.pop();\n }\n\n // convert fourth number to binary\n for (i = 24; i <= 31; i++) {\n remainder = d % 2;\n st.push(remainder);\n d = d / 2;\n }\n\n // Obtain Fourth octet\n for (i = 24; i <= 31; i++) {\n binaryArr[i] = st.pop();\n }\n\n return (binaryArr);\n }",
"public static void main(String[] args) {\n\t\tScanner in=new Scanner(System.in);\r\n\t\tint l=in.nextInt();\r\n\t\tString string=in.next();\r\n\t\tint max=0;\r\n\t\tString rs=\"\";\r\n\t\tMap<String, Integer>map=new HashMap<>();\r\n\t\tfor(int i=0;i<string.length()-l+1;i++) {\r\n\t\t\tString s=string.substring(i, i+l);\r\n\t\t\tif(map.containsKey(s)) {\r\n\t\t\t\t//更新子串计数\r\n\t\t\t\tint temp=map.get(s);\r\n\t\t\t\tif(temp>max) {\r\n\t\t\t\t\tmax=temp;\r\n\t\t\t\t\trs=s;\r\n\t\t\t\t}\r\n\t\t\t\tmap.put(s, ++temp);\r\n\t\t\t}else {\r\n\t\t\t\t//若没有子串,则设初值为1\r\n\t\t\t\tmap.put(s, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(rs);\r\n\t}"
] | [
"0.6589994",
"0.6215127",
"0.6102794",
"0.59671324",
"0.5952409",
"0.58389556",
"0.58265805",
"0.5733374",
"0.56846595",
"0.5667819",
"0.5662449",
"0.56487715",
"0.5638271",
"0.56334597",
"0.56087565",
"0.5598173",
"0.55861646",
"0.5576129",
"0.55755377",
"0.5558121",
"0.55407614",
"0.5532314",
"0.5525297",
"0.5501349",
"0.5498135",
"0.5497814",
"0.5490384",
"0.54724354",
"0.54676074",
"0.54543877",
"0.54403985",
"0.543604",
"0.5427904",
"0.5416039",
"0.54133093",
"0.5407985",
"0.5403932",
"0.5402614",
"0.54010993",
"0.5396583",
"0.5382739",
"0.53812265",
"0.53783566",
"0.5369247",
"0.5365164",
"0.53627014",
"0.5345463",
"0.5336961",
"0.53356415",
"0.5326713",
"0.53208935",
"0.53174746",
"0.5306891",
"0.5299892",
"0.52943593",
"0.5287696",
"0.5286747",
"0.5285597",
"0.52836436",
"0.5281958",
"0.52804416",
"0.5274459",
"0.52744555",
"0.5273827",
"0.5257722",
"0.52562594",
"0.52288085",
"0.52234864",
"0.52084845",
"0.5192722",
"0.5190866",
"0.518516",
"0.5184905",
"0.51794696",
"0.5178709",
"0.51753813",
"0.51682955",
"0.51671225",
"0.5166253",
"0.5157668",
"0.5153763",
"0.51510406",
"0.51499665",
"0.51497716",
"0.5147593",
"0.5146826",
"0.5143136",
"0.51420677",
"0.5129834",
"0.51280177",
"0.51270455",
"0.51257175",
"0.5119463",
"0.51184696",
"0.5118271",
"0.5117662",
"0.51124346",
"0.51033795",
"0.5102762",
"0.5099678",
"0.5099558"
] | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
int[][] t1 = new int[4][];
t1[0]= new int[4];
System.out.println(t1[0]);
System.out.println(t1[0][0]);
int[][] t2 = {{1,2,3,4,5},{44,66,77,99,12,21},{11,22}};
for(int i=0 ; i<t2.length;i++) {
for(int j=0 ; j < t2[i].length ;j++) {
System.out.print(t2[i][j]+" ");
}
System.out.println();
}
char[][]s = {
{'x','x','x'},
{'x','o','x'},
{'x','x','o'},
{'x','x','x'}
};
for(int i=0 ; i<s.length ; i++) {
for(int j=0 ; j<s[i].length;j++) {
if(s[i][j]=='o') {
System.out.printf("[%2d행%2d열}%n",i,j);
}
}
}
} | {
"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 |
User u = new User(); u.setUsername("testMybatisss"); u.setPassword("123"); u.setBrithDate(Calendar.getInstance().getTime()); System.out.println(u); int insert = iUserDao.insert(u); System.out.println(u); | @Test
public void insert() {
// int insert = iUserDao.insert(u);
// System.out.println(u);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\r\n\t\tpublic void insertUserTestCase() {\r\n\t\t\t\r\n\t\t\tUser user = new User();\r\n\t\t\t\t\t\r\n\t\t//\tuser.setBirthDate(LocalDate.parse(\"1994-04-09\"));\r\n\t\t\tuser.setUsername(\"renu\");\r\n\t\t//\tuser.setUserId(1003);\r\n\t\t\t\r\n\t\t\tuser.setEmail(\"[email protected]\");\r\n\t\t\t\t\t\r\n\t\t\tuser.setFirstname(\"Renu\");\r\n\t\t\tuser.setSurname(\"Rawat\");\r\n\t\t//\tuser.setGender('F');\r\n\t\t\tuser.setPassword(\"renu\");\r\n\t\t\tuser.setPhone(\"9876543210\");\r\n\t\t//\tuser.setStatus(\"A\");\r\n\t\t\tuser.setIsOnline(false);\r\n\t\t\t\r\n\t\t\tuser.setRole(\"ADMIN\");\r\n\t\t//\tuser.setConfmemail(\"[email protected]\");\r\n\t\t//\tuser.setConfpassword(\"renu\");\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"user printed\");\r\n\t\t\tassertEquals(\"successfully!\", Boolean.valueOf(true), userDao.registerUser(user));\r\n\t\t\tSystem.out.println(\"After User Table\");\r\n\t\t\t\r\n\t}",
"@Test\n void insertSuccess() {\n Date today = new Date();\n User newUser = new User(\"Artemis\", \"Jimmers\", \"[email protected]\", \"ajimmers\", \"supersecret2\", today);\n int id = dao.insert(newUser);\n assertNotEquals(0, id);\n User insertedUser = (User) dao.getById(id);\n assertNotNull(insertedUser);\n assertEquals(\"Jimmers\", insertedUser.getLastName());\n //Could continue comparing all values, but\n //it may make sense to use .equals()\n }",
"@Test\n\tpublic void testInsert(){\n\t\tUser u = new User();\n\t\tu.setFirst(\"ttest\");\n\t\tu.setLast(\"ttest2\");\n\t\tu.setUsername(\"testusername\");\n\t\tu.setPassword(\"password\");\n\t\t//u.getSalt();\n\t\tu.setUserWins(1);\n\t\tu.setUserLosses(3);\n\t\tu.setUserRecord(0.25);\n\t\t\n\t\twhen(udaoMock.insert(u)).thenReturn(u);\n\t\tassertEquals(u, uSerMock.insertUser(u));\n\n\t}",
"@Override\n\tpublic void insert(User user) throws DAOException {\n\t\t\n\t}",
"@Override\n\tpublic void insert(User objetc) {\n\t\tuserDao.insert(objetc);\n\t\t\n\t}",
"public void insert(User user);",
"public void insertUser(User user) {\n mUserDAO.insertUser(user);\n }",
"public void insertUser() {}",
"@Test\n public void testInsertUser() throws Exception {\n int insert = userDao.insertUser(\n 123,\n \"abc\",\n \"天涯\");\n System.out.println(\"insert=\" + insert);\n }",
"@Test\n public void testSaveUser() {\n User user = new User();\n user.setUsername(\"MyBatis Annotation\");\n user.setAddress(\"北京市海淀区\");\n user.setSex(\"男\");\n user.setBirthday(new Date());\n userDao.saveUser(user);\n }",
"@Override\n\tpublic void insertUser(User user) {\n\t\t\n\t}",
"@Test\n void insertWithTripSuccess() {\n String newUserFirst = \"Dave\";\n String newUserLast = \"Bowman\";\n String newUserEmail = \"[email protected]\";\n String newUserUname = \"dbowman1\";\n String newUserPassword = \"Supersecret2!\";\n String tripCityLoc = \"MILWWI\";\n int tripCount = 6;\n String tripRating = \"5\";\n String tripComment = \"Definitely worth a second look\";\n Date today = new Date();\n User newUser = new User(newUserFirst, newUserLast, newUserEmail, newUserUname, newUserPassword, today);\n //Usertrip newUserTrip = new Usertrip(newUser, tripCityLoc, tripCount, tripRating, tripComment, today);\n //newUser.addTrip(newUserTrip);\n //int id = dao.insert(newUser);\n //assertNotEquals(0, id);\n //User insertedUser = (User) dao.getById(id);\n //assertNotNull(insertedUser);\n //assertEquals(\"dbowman1\", insertedUser.getUserName());\n //assertEquals(1, insertedUser.getUsertrips().size());\n\n }",
"public User insert(User user) throws DataAccessException;",
"@Override\r\n\tpublic void insert(User user) {\n\t\tint iRet = dao.insert(user);\r\n\t\tif(iRet != 1){\r\n\t\t\tlogger.error(\"新增失败\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tlogger.info(\"新增成功\");\r\n\t}",
"Long insert(User user);",
"Long insert(User record);",
"@Test\n public void testInsert() {\n\n User user = new User();\n user.setUsername(\"yinka\");\n\n user = repository.save(user);\n\n assertEquals(user, repository.findOne(user.getId()));\n assertThat(user.getFirstName(), is(\"yinka\"));\n }",
"public User InsertUser(User user){\n\t\t\t//step to call the jpa class and insert user into the db\n\t\t\treturn user;\n\t\t}",
"private void insert() {//将数据录入数据库\n\t\tUser eb = new User();\n\t\tUserDao ed = new UserDao();\n\t\teb.setUsername(username.getText().toString().trim());\n\t\tString pass = new String(this.pass.getPassword());\n\t\teb.setPassword(pass);\n\t\teb.setName(name.getText().toString().trim());\n\t\teb.setSex(sex1.isSelected() ? sex1.getText().toString().trim(): sex2.getText().toString().trim());\t\n\t\teb.setAddress(addr.getText().toString().trim());\n\t\teb.setTel(tel.getText().toString().trim());\n\t\teb.setType(role.getSelectedIndex()+\"\");\n\t\teb.setState(\"1\");\n\t\t\n\t\tif (ed.addUser(eb) == 1) {\n\t\t\teb=ed.queryUserone(eb);\n\t\t\tJOptionPane.showMessageDialog(null, \"帐号为\" + eb.getUsername()\n\t\t\t\t\t+ \"的客户信息,录入成功\");\n\t\t\tclear();\n\t\t}\n\n\t}",
"int insert(BaseUser record);",
"public static void main(String[] args) {\n\n UserDao userDao = new UserDao();\n User user = new User();\n user.setName(\"cai\");\n user.setPassword(\"123456\");\n try {\n System.out.println(userDao.save(user));\n } catch (IllegalArgumentException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }",
"int insert(User record);",
"int insert(User record);",
"int insert(User record);",
"int insert(User record);",
"int insert(User record);",
"int insert(User record);",
"int insert(User record);",
"int insert(User record);",
"@Insert(\"insert into shoppinguser(id,nickname,password,salt,register_date,last_login_date,login_count) \"\n\t\t\t+ \"values(#{id},#{nickname},#{password},#{salt},#{register_date},#{last_login_date},#{login_count})\")\n\tBoolean tx(ShoppingUser user);",
"@Test\n void insertSuccess() {\n User newUser = new User(\"testname\",\"testpass\",\"Test\",\"name\",\"[email protected]\");\n UserRoles newRole = new UserRoles(1, \"administrator\", newUser, \"testname\");\n int id = genericDAO.insert(newRole);\n assertNotEquals(0,id);\n UserRoles insertedRole = (UserRoles)genericDAO.getByID(id);\n assertEquals(\"administrator\", insertedRole.getRoleName(), \"role is not equal\");\n }",
"@Test\r\n public void testA1Insert() throws Exception {\r\n System.out.println(\"insert\");\r\n \r\n Usuario obj = new Usuario();\r\n obj.setFullName(\"Nicolas Duran\");\r\n obj.setUser(\"admin\");\r\n obj.setPassword(\"admin\");\r\n obj.setEmail(\"[email protected]\");\r\n obj.setType(1);\r\n \r\n UsuarioDao instance = new UsuarioDao();\r\n int expResult = 0;\r\n int result = instance.insert(obj);\r\n \r\n assertNotEquals(expResult, result);\r\n }",
"public void insert1(login uv) {\n\t\ttry\n {\n SessionFactory sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory();\n \t\n Session session = sessionFactory.openSession();\n \n Transaction transaction=session.beginTransaction();\n \n session.save(uv);\n \n transaction.commit();\n \n session.close();\n }\n catch(Exception ex)\n {\n ex.printStackTrace();\n }\n\t\t\n\t}",
"@Override\n\tpublic Integer insert(User user) {\n\t\tuserMapper.insert(user);\n\t\t// MyBatisUtil.closeSqlSession();\n\t\treturn user.getId();\n\t}",
"@Test\n void insertSuccess() {\n int insertedCarId;\n\n //Get User\n GenericDao<User> userDao = new GenericDao(User.class);\n User user = userDao.getById(1);\n\n //Create Inserted Car\n Car insertedCar = new Car(user,\"2016\",\"Honda\",\"Civic\",\"19XFC1F35GE206053\");\n\n //Save Inserted Car\n insertedCarId = carDao.insert(insertedCar);\n\n //Get Saved Car\n Car retrievedCar = carDao.getById(insertedCarId);\n assertNotNull(retrievedCar);\n\n //Compare Cars\n assertEquals(insertedCar,retrievedCar);\n }",
"@Override\n public void saveUser(User user){\n try {\n runner.update(con.getThreadConnection(),\"insert into user(username,address,sex,birthday) values(?,?,?,?)\",user.getUsername(),user.getAddress(),user.getSex(),user.getBirthday());\n } catch (SQLException e) {\n System.out.println(\"执行失败\");\n e.printStackTrace();\n }\n\n }",
"int insert(UserEntity record);",
"@Override\n public boolean userRegister(User user) \n { \n Connection conn = null;\n Statement stmt = null;\n try \n {\n db_controller.setClass();\n conn = db_controller.getConnection();\n stmt = conn.createStatement();\n String sql;\n \n sql = \"INSERT INTO users (firstname,lastname,username,password,city,number) \"\n + \"values ('\"+ user.getFirstname()+\"',\" \n + \"'\" + user.getLastname() + \"',\" \n + \"'\" + user.getUsername() + \"',\" \n + \"'\" + user.getPassword() + \"',\" \n + \"'\" + user.getCity() + \"',\"\n + \"'\" + user.getNumber() + \"')\";\n int result = stmt.executeUpdate(sql);\n \n stmt.close();\n conn.close();\n if(result == 1) return true;\n else return false;\n } \n catch (SQLException ex) { ex.printStackTrace(); return false;} \n catch (ClassNotFoundException ex) { ex.printStackTrace(); return false;} \n }",
"@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);",
"@Test\n void insertSuccess() {\n GenericDao userDao = new GenericDao(User.class);\n //get a user to insert a new role\n User toInsert = (User) userDao.getEntityByName(\"lastName\", \"Curry\").get(0);\n\n UserRoles roles = new UserRoles(\"admin\", toInsert, toInsert.getUserName() );\n int id = genericDao.insert(roles);\n assertNotEquals(0, id);\n int insertedRoles = roles.getId();\n //assertEquals(toInsert.getId(), insertedRoles);\n }",
"@Test\n void insertSuccess() {\n String name = \"Testing a new event\";\n LocalDate date = LocalDate.parse(\"2020-05-23\");\n LocalTime startTime = LocalTime.parse(\"11:30\");\n LocalTime endTime = LocalTime.parse(\"13:45\");\n String notes = \"Here are some new notes for my new event.\";\n GenericDao userDao = new GenericDao(User.class);\n User user = (User)userDao.getById(1);\n\n Event newEvent = new Event(name, date, startTime, endTime, notes, user);\n int id = genericDao.insert(newEvent);\n assertNotEquals(0,id);\n Event insertedEvent = (Event)genericDao.getById(id);\n assertEquals(newEvent, insertedEvent);\n }",
"@Override\n\tpublic void insertUser(UserPojo user) {\n\t\tuserDao.insertUser(user);\n\t}",
"int insert(UserDO record);",
"@Override\n\tpublic void insertOne(User u) {\n\t\tdao.insertOne(u);\n\t}",
"int insert(UUser record);",
"@Test\n\n public void create() {\n User user = new User();\n user.setAccount(\"TestUser03\");\n user.setEmail(\"[email protected]\");\n user.setPhoneNumber(\"010-1111-3333\");\n user.setCreatedAt(LocalDateTime.now());\n user.setCreatedBy(\"TestUser3\");\n\n User newUser = userRepository.save(user);\n System.out.println(\"newUser : \" + newUser);\n }",
"public void createUser() {\n try {\n conn = dao.getConnection();\n\n ps = conn.prepareStatement(\"INSERT INTO Users(username, password) VALUES(?, ?)\");\n ps.setString(1, this.username);\n ps.setString(2, this.password);\n\n ps.execute();\n\n ps.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"public int insertUser(final User user);",
"public interface UserDao {\n User getUser(String userId);\n\n boolean insertUser(User obj);\n}",
"@Test\n public void testsaveUser(){\n \tSession session=myHibernateUtil.getSessionFactory().getCurrentSession();\n \t\n \tTransaction ts=session.beginTransaction();\n \tUsers u=new Users();\n \tu.setUsername(\"zhangsan\");\n \tu.setPassword(\"123456\");\n \tsession.save(u);\n \tts.commit();\n }",
"int insert(AdminUser record);",
"int insert(AdminUser record);",
"@Override\n public void intsertUser(SysUser user) {\n System.out.println(\"user插入到mysql数据库中(oracle数据库):\"+user);\n }",
"@Override\n\tpublic void save() {\n\t\tSystem.out.println(\"UserDao实现类\");\n\t}",
"public static boolean addUser(UserDetailspojo user) throws SQLException {\n Connection conn=DBConnection.getConnection();\n String qry=\"insert into users1 values(?,?,?,?,?)\";\n System.out.println(user);\n PreparedStatement ps=conn.prepareStatement(qry);\n ps.setString(1,user.getUserid());\n ps.setString(4,user.getPassword());\n ps.setString(5,user.getUserType());\n ps.setString(3,user.getEmpid());\n ps.setString(2,user.getUserName());\n //ResultSet rs=ps.executeQuery();\n int rs=ps.executeUpdate();\n return rs==1;\n //String username=null;\n }",
"int insert(SysUser record);",
"int insert(SysUser record);",
"private void autoPopulateDB() {\r\n User newUser = new User(\"din_djarin\", \"baby_yoda_ftw\");\r\n User secondNew = new User(\"csumb\", \"otters_woo\");\r\n User lastNew = new User(\"username\", \"password\");\r\n\r\n mUserDAO.insert(newUser);\r\n mUserDAO.insert(secondNew);\r\n mUserDAO.insert(lastNew);\r\n }",
"void add(User user) throws SQLException;",
"public int insertUser(UserData user) {\n try {\n jdbcTemplate.execute(\"SELECT 1 from userData\");\n } catch (Exception ex) {\n creatTable();\n }\n\n\n PreparedStatementSetter preps = new PreparedStatementSetter() {\n @Override\n public void setValues(PreparedStatement ps) throws SQLException {\n ps.setString(1, user.getUserName());\n ps.setString(2, user.getFirstName());\n ps.setString(3, user.getLastName());\n ps.setString(4, user.getEmail());\n ps.setString(5, user.getPassword());\n ps.setString(6, user.getPhoneNo());\n\n ps.setString(7, user.getImage());\n\n }\n };\n\n return jdbcTemplate.update(CREATEUSER, preps);\n\n\n }",
"int insert(Userinfo record);",
"@Insert({\r\n \"insert into umajin.user_master (user_id, nickname, \",\r\n \"sex, age, birthday, \",\r\n \"regist_date, update_date, \",\r\n \"disable)\",\r\n \"values (#{user_id,jdbcType=INTEGER}, #{nickname,jdbcType=VARCHAR}, \",\r\n \"#{sex,jdbcType=INTEGER}, #{age,jdbcType=INTEGER}, #{birthday,jdbcType=DATE}, \",\r\n \"#{regist_date,jdbcType=TIMESTAMP}, #{update_date,jdbcType=TIMESTAMP}, \",\r\n \"#{disable,jdbcType=INTEGER})\"\r\n })\r\n int insert(UserMaster record);",
"@Override\r\n\tpublic int insert(User record) {\n\t\treturn userDao.insert(record);\r\n\t}",
"@Insert({\n \"insert into tb_user (username, password)\",\n \"values (#{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR})\"\n })\n int insert(User record);",
"@Test\n public void validUserCreation() {\n boolean success = this.userDAO.insertNewUser(testUser);\n\n Assertions.assertTrue(success);\n }",
"@Override\n\tpublic int insertUser(User user) {\n\t\treturn uDao.insertUser(user);\n\t}",
"public static int save(User u){ \n int status=0; \n try{ \n //membuka koneksi\n Connection con=Koneksi.openConnection();\n //melakukan query database\n PreparedStatement ps=con.prepareStatement( \n \"insert into t_user(user_name,nama_lengkap,password,hak_akses) values(?,?,?,?)\"); \n ps.setString(1,u.getUserName()); \n ps.setString(2,u.getNamaLengkap()); \n ps.setString(3,u.getPassword()); \n ps.setString(4,u.getHakAkses()); \n status=ps.executeUpdate(); \n }catch(Exception e){\n System.out.println(e);\n } \n return status; \n }",
"private void pushToHibernate(){\n DATA_API.saveUser(USER);\n }",
"User createUser();",
"int insert(UserInfo record);",
"User create(final User user) throws DatabaseException;",
"int insert(UserPasswordDO record);",
"@Test\n public void testInsert() throws SQLException {\n QueryRunner runner = new QueryRunner(dataSource);\n int result = runner.update(\"insert into sys_user(user_id, username, password, full_name) values(?, ?, ?, ?)\", 2, \"test\", \"test\", \"test\");\n Assert.assertEquals(1, result);\n }",
"@Override\r\n\tpublic boolean insertUsuario(Usuario user) {\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic void insertUser(VIPUser user) {\n\t\ttry{\r\n\t\t\tString sql = \"insert into vipuser(id,name) values (?,?)\";\r\n\t\t\tObject[] args = new Object[]{user.getId(), user.getName()};\r\n\t\t\tdaoTemplate.update(sql, args, false);\r\n\t\t}catch (Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}",
"public boolean insertUser(User user) {\n\t\t try{\n\t\t\t sessionFactory.getCurrentSession().save(user);\n\t\t\treturn true; \n\t\t }\n\t\t catch(Exception e){\n\t\t\t return false; \n\t\t }\n\t}",
"int insert(UserInfoUserinfo record);",
"public User saveUser(User user) throws UserException {\n\t\tString sql=\"insert into User(user_name, user_password, user_is_admin, test_id) values(?,?,?,?)\";\r\n\t\tOnlineTest onlineTest=new OnlineTest();\r\n\t try {\r\n\t \tpreparedStatement=connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);\r\n\t \tpreparedStatement.setString(1, user.getUserName());\r\n\t \tpreparedStatement.setString(2, user.getUserPassword());\r\n\t \tpreparedStatement.setBoolean(3, user.getIsAdmin());\r\n\t \tpreparedStatement.setLong(5, onlineTest.getTestId().longValue());\r\n\t \tint result=preparedStatement.executeUpdate();\r\n\t \tif(result==0)\r\n\t \t{\r\n\t \t\treturn null;\r\n\t \t}\r\n\t \t\r\n\t \tBigInteger generatedId = BigInteger.valueOf(0L);\r\n\t\t\tresultSet = preparedStatement.getGeneratedKeys();\r\n\t\t\tif (resultSet.next()) {\r\n\t\t\t\tgeneratedId = BigInteger.valueOf(resultSet.getLong(1));\r\n\t\t\t\tSystem.out.println(\"Auto generated id : \" + generatedId);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tuser.setUserId(generatedId.longValue());\r\n\t\t\tSystem.out.println(\"Added User to the database with id as : \" + generatedId);\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\tSystem.out.println(\"Error at add User Dao method: \" + e);\r\n\t\t} finally {\r\n\t\t\tif (preparedStatement != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tpreparedStatement.close();\r\n\t\t\t\t} catch (SQLException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tSystem.out.println(\"Error at add User Dao method: \" + e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn user;\r\n\t}",
"@Override\n public void addUser(User u) {\n Session session = this.sessionFactory.getCurrentSession();\n session.persist(u);\n logger.info(\"User saved successfully, User Details=\"+u);\n }",
"int insert(UserT record);",
"@Override\n\tpublic User insertNewUser(User User) {\n\t\treturn null;\n\t}",
"public void SaveUsuario(UsuarioDTO u) {\n Conexion c = new Conexion();\n PreparedStatement ps = null;\n String sql = \"INSERT INTO Usuario(nombre,apellido,usuario,email,password,fecha_nacimiento,fecha_creacion)\"\n + \"VALUES (?,?,?,?,?,?,?)\";\n try {\n ps = c.getConexion().prepareStatement(sql);\n ps.setString(1, u.getNombre());\n ps.setString(2, u.getApellido());\n ps.setString(3, u.getUsuario());\n ps.setString(4, u.getEmail());\n ps.setString(5, u.getPassword());\n ps.setDate(6, Date.valueOf(u.getFecha_Nacimiento()));\n ps.setDate(7, Date.valueOf(u.getFecha_Creacion()));\n ps.executeUpdate();\n } catch (SQLException ex) {\n System.out.println(\"A \" + ex.getMessage());\n } catch (Exception ex) {\n System.out.println(\"B \" + ex.getMessage());\n } finally {\n try {\n ps.close();\n c.cerrarConexion();\n } catch (Exception ex) {\n }\n }\n }",
"int insert(ROmUsers record);",
"@Override\r\n\tpublic void save() {\n\t\tSystem.out.println(\"UserServiceImplÍ┤đđ┴╦\");\r\n\t\tuserDao.save();\r\n\t}",
"public void addUser(User user) {\n try (PreparedStatement pst = this.conn.prepareStatement(\"INSERT INTO users (name, login, email, createDate)\"\n + \"VALUES (?, ?, ?, ?)\")) {\n pst.setString(1, user.getName());\n pst.setString(2, user.getLogin());\n pst.setString(3, user.getEmail());\n pst.setTimestamp(4, user.getCreateDate());\n pst.executeUpdate();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"@Override\r\n\tpublic Usuario insert(Usuario t) {\n\t\treturn null;\r\n\t}",
"private static void saveNewUserTest(Connection conn) {\n\n\t\tUser user1 = new User();\n\t\tuser1.setUsername(\"john\");\n\t\tuser1.setPassword(\"123\");\n\t\tuser1.setEmail(\"[email protected]\");\n\t\ttry {\n\t\t\tuser1.saveToDB(conn);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public static void testAdd(){\n\t\tSqlSession sqlSession = MybatisUtil.getSqlSession(true);\r\n\t\t/**\r\n\t\t * 映射sql的标识字符串,\r\n\t\t * me.gacl.mapping.userMapper是userMapper.xml文件中mapper标签的namespace属性的值,\r\n\t\t * addUser是insert标签的id属性值,通过insert标签的id属性值就可以找到要执行的SQL\r\n\t\t */\r\n\t\tString statement = \"me.mapping.userMapper.addUser\";\r\n\t\tUser user = new User(\"用户孤傲苍狼\",20);\r\n\t\t//执行插入操作\r\n\t\tint result = sqlSession.insert(statement, user);\r\n\t\t//手动提交事务\r\n//\t\tsqlSession.commit();\r\n\t\t//使用SqlSession执行完SQL之后需要关闭SqlSession\r\n\t\tsqlSession.close();\r\n\t\tSystem.out.println(\"插入影响条数:\"+result);\r\n\t}",
"@Test\n public void invalidNullUserCreation() {\n boolean success = this.userDAO.insertNewUser(null);\n\n Assertions.assertFalse(success);\n }",
"int insert(CommentUser record);",
"public static void main(String[] args) throws SQLException, ClassNotFoundException, IOException {\n \tUserDaoClass pdao = new UserDaoClass();\n pdao.testConnection(); \n List<User> plist = pdao.getAllUsers();\n for(User p: plist)\n \t System.out.println(p.getName());\n \n //Insert\n// User p = new User();\n// p.setName(\"Ryan\");\n// p.setPassword(\"Ryan0000\");\n// p.setJavaScore(100.0);\n// p.setSqlScore(80.0);\n// pdao.registerUser(p);\n \n //update \n User u = new User();\n u.setName(\"Kavita\");\n u.setPassword(\"kav000\");\n u.setUserId(3);\n pdao.updateUser(u);\n //System.out.println(pdao.getUserId);\n \n //delete\n User d = new User();\n d.setUserId(5);\n pdao.removeUser(5);\n // System.out.println(pdao.getUserId(5));\n }",
"void insertUser(String pseudo, String password, String email) throws SQLException;",
"void addUser(BlogUser user) throws DAOException;",
"public void insertUsers(User user){\n Tag Tag=null;\n db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(databaseValues.COLUMN_NAME3,user.getUsername());\n values.put(databaseValues.COLUMN_NAME1,user.getName());\n values.put(databaseValues.COLUMN_NAME2,user.getSurname());\n values.put(databaseValues.COLUMN_NAME4,user.getPassword());\n values.put(databaseValues.COLUMN_NAME5,user.getConfirmPassword());\n Log.e(String.valueOf(Tag), user.getName());\n Log.e(String.valueOf(Tag), user.getSurname());\n Log.e(String.valueOf(Tag), user.getUsername());\n Log.e(String.valueOf(Tag), user.getPassword());\n Log.e(String.valueOf(Tag), user.getConfirmPassword());\n db.insert(databaseValues.TABLE_NAME, null, values);\n db.close();\n }",
"@Override\n public void insertUser(User user, String userType) {\n\n int userRoleId = insertUserRole(userType);\n\n try(Connection conn = DriverManager.getConnection(URL, USERNAME, PASSWORD)){\n\n String sql = \"INSERT INTO ers_users(ers_username, ers_password, user_first_name, user_last_time, user_email, user_role_id) \" +\n \"VALUES (?, ?, ?, ?, ?, ?);\";\n\n PreparedStatement ps = conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);\n ps.setString(1, user.getUsername());//the 1st \"?\"\n ps.setString(2, user.getPassword());\n ps.setString(3, user.getFirstName());\n ps.setString(4, user.getLastName());\n ps.setString(5, user.getEmail());\n ps.setInt(6, userRoleId);\n\n ps.executeUpdate();\n\n //PRINTING THE PRIMARY KEY\n ResultSet rs = ps.getGeneratedKeys();\n if (rs.next()) {\n System.out.println(\"The returned PK: \"+ rs.getInt(\"ers_user_id\"));\n }\n\n }catch(SQLException e){\n e.printStackTrace();\n }\n }",
"boolean saveUser(User entity) throws UserDaoException;",
"@Override\n\tpublic void insert(User entity) {\n\t\tuserlist.put(String.valueOf(entity.getDni()), entity);\n\t}",
"int insert(RegsatUser record);",
"@Override\n public int insert(User record) {\n return 0;\n }",
"@Test\n\tpublic void testCreateUser(){\n\t\trepository.createUser(expectedUser);\n\t\tSystem.out.println(\"#########################>User inserted into database<#########################\");\n\t\tUser actualUser = repository.findByUsername(\"vgeorga\");\n\t\tassertEquals(expectedUser.getUsername(), actualUser.getUsername());\n\t}"
] | [
"0.80710447",
"0.7850062",
"0.78472424",
"0.7736815",
"0.77130044",
"0.77116203",
"0.7653171",
"0.7645515",
"0.76342463",
"0.76124895",
"0.7576947",
"0.74119985",
"0.7352934",
"0.7342664",
"0.72989076",
"0.72942597",
"0.7230732",
"0.7220337",
"0.7212791",
"0.7186933",
"0.71772563",
"0.7176597",
"0.7176597",
"0.7176597",
"0.7176597",
"0.7176597",
"0.7176597",
"0.7176597",
"0.7176597",
"0.7165304",
"0.716483",
"0.716133",
"0.71517336",
"0.71410537",
"0.71398145",
"0.71303344",
"0.71290255",
"0.7120897",
"0.7119119",
"0.711568",
"0.7111946",
"0.7108363",
"0.71048355",
"0.7103561",
"0.7103317",
"0.7076316",
"0.7018627",
"0.6990725",
"0.69654673",
"0.6943302",
"0.6925868",
"0.6925868",
"0.6910876",
"0.6910021",
"0.68746054",
"0.6857821",
"0.6857821",
"0.68556887",
"0.68552685",
"0.6849434",
"0.6848724",
"0.6798219",
"0.6793852",
"0.6787215",
"0.6778659",
"0.6772983",
"0.6770126",
"0.6760736",
"0.6755995",
"0.67547864",
"0.6746582",
"0.67407763",
"0.67361426",
"0.672309",
"0.6708879",
"0.67058057",
"0.6689989",
"0.6687209",
"0.6686496",
"0.6681937",
"0.6680418",
"0.6674032",
"0.66731375",
"0.66629755",
"0.6642374",
"0.6640764",
"0.66386986",
"0.66369414",
"0.6633235",
"0.6627845",
"0.66147107",
"0.66028816",
"0.66021436",
"0.65987843",
"0.6586565",
"0.6581207",
"0.6579121",
"0.6566998",
"0.6563032",
"0.6562801"
] | 0.7819804 | 3 |
User user = iUserDao.findById(3); user.setUsername("update"); iUserDao.updateById(user); | @Test
public void update() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void updateUser(User entity) throws UserDaoException;",
"public User updateUser(User user);",
"int updateUserById( User user);",
"@Test\n public void testModifyUser() throws Exception {\n\n User user = userDao.retrieveById(\"uuid123123123\");\n user.setUsername(\"newbody4\");\n\n Boolean result = userDao.update(user);\n Assert.assertTrue(result);\n }",
"void updateUserById(String username, User userData);",
"UserEntity updateUser(UserEntity userEntity);",
"@Test\n void testUpdateUser() {\n String password = \"testPassword\";\n User updateUser = (User) userData.crud.getById(1);\n updateUser.setPassword(password);\n userData.crud.updateRecords(updateUser);\n User getUser = (User) userData.crud.getById(1);\n assertEquals(getUser, updateUser);\n logger.info(\"Updated the password for ID: \" + updateUser.getId());\n }",
"public User update(User user) throws DataAccessException;",
"@Test\n void updateSuccess() {\n String newFirstName = \"Artemis\";\n User userToUpdate = (User) dao.getById(1);\n userToUpdate.setFirstName(newFirstName);\n dao.saveOrUpdate(userToUpdate);\n User userAfterUpdate = (User) dao.getById(1);\n assertEquals(newFirstName, userAfterUpdate.getFirstName());\n }",
"public void update(User user);",
"@Test\n public void test_update() throws Exception {\n User user1 = createUser(1, false);\n\n user1.setUsername(\"new\");\n\n entityManager.getTransaction().begin();\n instance.update(user1);\n entityManager.getTransaction().commit();\n entityManager.clear();\n\n User retrievedUser = instance.get(user1.getId());\n\n assertEquals(\"'update' should be correct.\", user1.getUsername(), retrievedUser.getUsername());\n }",
"int updateByPrimaryKey(UserEntity record);",
"void update(User user) throws SQLException;",
"void update(User user);",
"void update(User user);",
"public User update(User user)throws Exception;",
"@Test\n public void updateUser() {\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n\n assertTrue(userResource.updateUser(new User(\"dummy\", \"dummyUPDATED\", 2)));\n\n //clean up\n userDAO.removeUser(\"dummy\");\n }",
"@Override\r\n\tpublic void updateUser(User user) throws ToDoListDAOException{\r\n\t\t// TODO Auto-generated method stub\r\n\t\t Session session = factory.openSession();\r\n\t\t try\r\n\t\t {\r\n\t\t session.beginTransaction();\r\n\t\t Query query = session.createQuery(\"from User where userName = :user\");\r\n\t\t User ifUserExist =(User) query.setParameter(\"user\",user.getUserName()).uniqueResult();\r\n\t\t long id = ifUserExist.getId();\r\n\t\t Query query2 = session.createQuery(\"UPDATE User SET password = :pass , userName= :user\" +\r\n\t\t \" where id = :d\");\r\n\t\t query2.setParameter(\"pass\", user.getPassword());\r\n\t\t query2.setParameter(\"user\", user.getUserName());\r\n\t\t query2.setParameter(\"d\", id);\r\n\t\t query2.executeUpdate();\r\n\t\t session.getTransaction().commit();\r\n\t\t \r\n\t\t }\r\n\t\t catch (HibernateException e)\r\n\t\t {\r\n\t\t e.printStackTrace();\r\n\t\t if(session.getTransaction()!=null) session.getTransaction().rollback();\r\n\t\t }\r\n\t\t finally\r\n\t\t {\r\n\t\t\t if(session != null) \r\n\t\t\t\t{ \r\n\t\t\t\t\tsession.close(); \r\n\t\t\t\t} \r\n\t\t } \r\n\t}",
"@Override\n public User update(User user) {\n return dao.update(user);\n }",
"int updateByPrimaryKey(User record);",
"int updateByPrimaryKey(User record);",
"int updateByPrimaryKey(User record);",
"int updateByPrimaryKey(User record);",
"int updateByPrimaryKey(User record);",
"int updateByPrimaryKey(User record);",
"int updateByPrimaryKey(User record);",
"int updateByPrimaryKey(User record);",
"int updateByPrimaryKey(User record);",
"public void updateUser(User oldUser, User newUser) ;",
"@Test\n public void updateTest() throws SQLException, IDAO.DALException {\n userDAO.create(user);\n user.setNavn(\"SørenBob\");\n user.setCpr(\"071199-4397\");\n user.setAktiv(false);\n user.setIni(\"SBO\");\n // Opdatere objektet i databasen, og sammenligner.\n userDAO.update(user);\n recivedUser = userDAO.get(-1);\n\n assertEquals(recivedUser.getId(), user.getId());\n assertEquals(recivedUser.getNavn(), user.getNavn());\n assertEquals(recivedUser.getIni(), user.getIni());\n assertEquals(recivedUser.getCpr(), user.getCpr());\n assertEquals(recivedUser.isAktiv(),user.isAktiv());\n }",
"int updateByPrimaryKey(BaseUser record);",
"@Override\n\tpublic void update(User objetc) {\n\t\tuserDao.update(objetc);\n\t}",
"public void update(User u) {\n\r\n\t}",
"void update(User user, Connection connection) throws DAOException;",
"@Test\n public void updateById() {\n User user = new User();\n user.setId(1259474874313797634L);\n user.setAge(30);\n boolean ifUpdate = user.updateById();\n System.out.println(ifUpdate);\n }",
"public boolean update(User u);",
"@Override\n\tpublic void updateOne(User u) {\n\t\tdao.updateInfo(u);\n\t}",
"public void updateUser(User user) {\n\t\t\r\n\t}",
"@Update({\n \"update user_t\",\n \"set user_name = #{userName,jdbcType=VARCHAR},\",\n \"password = #{password,jdbcType=VARCHAR},\",\n \"age = #{age,jdbcType=INTEGER},\",\n \"ver = #{ver,jdbcType=INTEGER}\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int updateByPrimaryKey(User record);",
"int updateByPrimaryKey(UUser record);",
"@Test\n\t public void testUpdate(){\n\t\t try{\n\t\t\t Users user = BaseData.getUsers();\n\t\t\t\twhen(entityManager.merge(user)).thenReturn(BaseData.getDBUsers());\n\t\t\t\tUsers savedUser = userDao.update(user);\n\t\t\t\tassertNotNull(savedUser);\n\t\t\t\tassertTrue(savedUser.getFirstName().equals(\"MerchandisingUI\"));\n\t\t }catch(DataAcessException se){\n\t\t\t logger.error(\"error at service layer while testing update:.\",se);\n\t\t }\n\t }",
"@Override\n\tpublic void update(User user) throws DAOException {\n\t\t\n\t}",
"public User update(User updatedInfo);",
"int updateByPrimaryKey(SysUser record);",
"void updateUser(UserDTO user);",
"User editUser(User user);",
"User modifyUser(Long user_id, User user);",
"int updateByPrimaryKey(UserDO record);",
"int updateByPrimaryKey(LikeUser record);",
"int updateByPrimaryKey(Userinfo record);",
"@Test\n public void test() throws Exception{\n update(\"update user set username=? where id=?\",\"wangjian\",\"4\");\n }",
"public void UserServiceTest_Edit()\r\n {\r\n User user = new User();\r\n user.setId(\"1234\");\r\n user.setName(\"ABCEdited\");\r\n user.setPassword(\"123edited\");\r\n ArrayList<Role> roles = new ArrayList<>();\r\n roles.add(new Role(\"statio manager\"));\r\n user.setRoles(roles);\r\n \r\n UserService service = new UserService(); \r\n try {\r\n service.updateUser(user);\r\n } catch (SQLException e) {\r\n fail();\r\n System.out.println(e);\r\n }catch (NotFoundException e) {\r\n fail();\r\n System.out.println(e);\r\n }\r\n }",
"int updateByPrimaryKey(AdminUser record);",
"int updateByPrimaryKey(AdminUser record);",
"@Override\r\n\tpublic void update(User user) {\n\t\tuserDao.update(user);\r\n\t}",
"public void updateUser() {\n Connection conn = null;\n try {\n conn = DriverManager.getConnection(db.DB.connectionString, db.DB.user, db.DB.password);\n Statement stmt = conn.createStatement();\n String query = \"update users set first_name='\" + firstName + \"', \";\n query += \"last_name='\" + lastName + \"', \";\n query += \"phone_number='\" + phoneNumber + \"', \";\n query += \"email='\" + email + \"', \";\n query += \"address='\" + address + \"', \";\n query += \"id_city='\" + idCity + \"' \";\n query += \"where id_user = \" + id;\n stmt.executeUpdate(query);\n\n User updatedUser = findUser(id);\n updatedUser.setFirstName(firstName);\n updatedUser.setLastName(lastName);\n updatedUser.setPhoneNumber(phoneNumber);\n updatedUser.setEmail(email);\n updatedUser.setIdCity(idCity);\n updatedUser.setAddress(address);\n\n } catch (SQLException ex) {\n Logger.getLogger(UserController.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n clear();\n try {\n conn.close();\n } catch (Exception e) {\n /* ignored */ }\n }\n }",
"public Account update(Account user);",
"void updateUser(int id, UpdateUserDto updateUserDto);",
"@Override\n\tpublic void updateUser(User user)\n\t{\n\n\t}",
"public DAO updateUserName(User user) throws SQLException{\n String SQL = \"UPDATE user SET name = ? where id = ?\";\n PreparedStatement ps = connection.prepareStatement(SQL);\n ps.setString(1, user.getName());\n ps.setLong(2, user.getId());\n int result = ps.executeUpdate();\n if(result > 0) System.out.println(\"Atualização de nome concluída!\");\n ps.close();\n return this;\n\n }",
"@Override\n\tpublic void updateUser(user theUser) {\n\t}",
"@Update({\n \"update tb_user\",\n \"set password = #{password,jdbcType=VARCHAR}\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n int updateByPrimaryKey(User record);",
"@Override\n\tpublic void update(User user)\n\t{\n\t\tuserDAO.update(user);\n\t}",
"@Override\n\n public void update(UserInfoVo userInfoVo) {\n\n userDao.update(userInfoVo);\n\n }",
"@Override\n\tpublic void updateUser(User pUser) {\n\t\t\n\t}",
"@Override\n public void updateUser(EntityManager entityManager,User user) {\n entityManager.merge(user);\n //entityManager.getTransaction().commit();\n }",
"public User updateUser(long id, UserDto userDto);",
"public interface UserDAO {\n User selectUserByName(User user);\n User selectUserById(User user);\n void update(User user);\n}",
"public void update(User obj) {\n\t\t\n\t}",
"public void update(User u) {\n\t\tUserDao ua=new UserDao();\n\t\tua.update(u);\n\t\t\n\t}",
"@Override\r\n\tpublic void update(User user) {\n\t\tint iRet = dao.update(user);\r\n\t\tif(iRet != 1){\r\n\t\t\tlogger.error(\"修改失败\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tlogger.info(\"修改成功\");\r\n\t}",
"@Override\n public boolean updateUserById(User user ) {\n boolean tag=false;\n this.sqlSession = MyBatisUtils.getSqlSession();\n tag = this.sqlSession.getMapper(UserDao.class).updateUserInfoById(user);\n sqlSession.commit();\n return tag;\n }",
"@Override\n public void updateUser(User u) {\n Session session = this.sessionFactory.getCurrentSession();\n session.update(u);\n logger.info(\"User updated successfully, User Details=\"+u);\n }",
"int updateByPrimaryKey(UserInfoUserinfo record);",
"int updateByPrimaryKey(WbUser record);",
"public void updateUser(User user) {\n\t\t\r\n\t\tsessionFactory.getCurrentSession().update(user);\r\n\t\t\r\n\t}",
"@Test\n public void updateUserCatch() {\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n\n assertFalse(userDAO.updateUser(new User(\"notdummy\", \"dummyUPDATED\", 2)));\n\n //clean up\n userDAO.removeUser(\"dummy\");\n }",
"private static void updateUserTest(Connection conn) {\n\t\t\n\t\ttry {\n\t\t\tUser existingUser = User.loadUserById(conn, 3); // User user = User.loadUserById(conn, 3);\n\t\t\t// the same id is preserved\n\t\t\texistingUser.setUsername(\"jo\");\n\t\t\texistingUser.setEmail(\"[email protected]\");\n\t\t\texistingUser.setUserGroupId(2);\n\t\t\texistingUser.saveToDB(conn);\n\t\t\t\n\t\t\t/*Następnie\tnależy\tsprawdzić,\tczy:\n\t\t\t\t1.\t Czy\twpis\tw\tbazie\tdanych\tma\twszystkie\n\t\t\t\tdane\todpowiednio\tponastawiane?\n\t\t\t\t2.\t Czy\tobiekt\tma\tnastawione\tpoprawne\tid? - czyli niezmienione, bo nie mamy settera dla id\n\t\t\t\t3.\t Czy\tnie\tdodał\tsię\tnowy\twpis\tw\tbazie?*/\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"void updateUser(@Nonnull User user);",
"int updateByPrimaryKey(ROmUsers record);",
"public void updateUser(Person user) {\n\t\t\n\t}",
"@Override\r\n\tpublic void updateUser(User user) {\n\t\tuserReposotory.save(user);\r\n\t\t\r\n\t}",
"int updateByPrimaryKey(RegsatUser record);",
"public User updateone_user(User user) {\n\t\tConnection conn=null;\t\t\t\n\t\tString sql = \"update users set username=?,password=?,phonenumber=?,email=? where id=?\";\n\t\t\n\t\ttry {\n\t \t conn =ConnectDB.getconnect();\n\t\t\t\t\tPreparedStatement pstmt=conn.prepareStatement(sql);\t\n\t\t\t\tpstmt.setString(1, user.getUsername());\n\t\t\t\tpstmt.setString(2,user.getPassword());\n\t\t\t\tpstmt.setString(3,user.getPhonenumber());\n\t\t\t\tpstmt.setString(4, user.getEmail());\n\t\t\t\tpstmt.setInt(5, user.getId());\n\t\t\t\t System.out.println(\"userDAO修改的user.getUsername()=\"+user.getUsername());\n\t\t\t\t\n\t\t\tpstmt.executeUpdate();\n\t\t\t\tpstmt.close();\n\t\t\t\tconn.close();\n\t\t\t\treturn user;\n\t\t\t\t}catch (Exception e) {\n\t\t\t\t\te.printStackTrace() ;\n\t\t\t\t System.out.println(\"修改一行数据失败\");\n\t\t\t\t}\t\n\t\treturn user;\n\t}",
"void editUser(String uid, User newUser);",
"int updateByPrimaryKey(RoleUser record);",
"public void updateUser(User user) {\n\n String updateSql = \"update USER set name = ?, age = ? , salary = ? where id = ?\";\n jdbcTemplate.update(updateSql, user.getName(), user.getAge(), user.getSalary(), user.getId());\n }",
"@Override\n public void updateUser(User user){\n try {\n runner.update(con.getThreadConnection(),\"update user set username=?,address=?,sex=?,birthday=? where id=?\"\n ,user.getUsername(),user.getAddress(),user.getSex(),user.getBirthday(),user.getId());\n } catch (SQLException e) {\n System.out.println(\"执行失败\");\n e.printStackTrace();\n }\n }",
"E update(IApplicationUser user, ID id, U updateDto);",
"@Override\n\tpublic User update(User u) {\n\t\tSystem.out.println(\"OracleDao is update\");\n\t\treturn null;\n\t}",
"void saveOrUpdate(User user);",
"@Override\n\tpublic void update(Users entity) {\n\t\tSession session = this.sessionFactory.getCurrentSession();\n \tsession.save(entity);\n\t}",
"@Override\r\n\tpublic int updateByPrimaryKey(User record) {\n\t\treturn userDao.updateByPrimaryKey(record);\r\n\t}",
"int updateByPrimaryKey(UserInfo record);",
"@Override\n\tpublic int update(Users user) {\n\t\treturn userDAO.update(user);\n\t}",
"int updateByPrimaryKey(SysRoleUser record);",
"int updateByExample(User record, UserExample example);",
"@Test\n void updateTest() {\n admin.setSurname(\"Rossini\");\n Admin modifyied = adminJpa.update(admin);\n assertEquals(\"Rossini\", modifyied.getSurname());\n }",
"@Test\r\n public void testBUpdate() throws Exception {\r\n System.out.println(\"update\");\r\n \r\n UsuarioDao instance = new UsuarioDao();\r\n \r\n Usuario obj = instance.login(\"admin\", \"admin\");\r\n obj.setFullName(\"Kevin Duran\");\r\n \r\n int expResult = 1;\r\n int result = instance.update(obj);\r\n assertEquals(expResult, result);\r\n }",
"@Override\r\n\tpublic int updateUser(User user, String userName) {\n\t\treturn 0;\r\n\t}",
"@Update({\r\n \"update umajin.user_master\",\r\n \"set nickname = #{nickname,jdbcType=VARCHAR},\",\r\n \"sex = #{sex,jdbcType=INTEGER},\",\r\n \"age = #{age,jdbcType=INTEGER},\",\r\n \"birthday = #{birthday,jdbcType=DATE},\",\r\n \"regist_date = #{regist_date,jdbcType=TIMESTAMP},\",\r\n \"update_date = #{update_date,jdbcType=TIMESTAMP},\",\r\n \"disable = #{disable,jdbcType=INTEGER}\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n int updateByPrimaryKey(UserMaster record);"
] | [
"0.81850153",
"0.80780137",
"0.7985893",
"0.7963281",
"0.7901159",
"0.78461033",
"0.77393395",
"0.77378184",
"0.76729256",
"0.7621004",
"0.75973487",
"0.75901556",
"0.7550346",
"0.75322884",
"0.75322884",
"0.74959576",
"0.74727315",
"0.7460605",
"0.74577856",
"0.7450215",
"0.7450215",
"0.7450215",
"0.7450215",
"0.7450215",
"0.7450215",
"0.7450215",
"0.7450215",
"0.7450215",
"0.74184555",
"0.7391176",
"0.7374717",
"0.7351967",
"0.73316705",
"0.7329702",
"0.7297527",
"0.7289673",
"0.7275631",
"0.72666585",
"0.72507876",
"0.72498804",
"0.7232404",
"0.72319853",
"0.72282225",
"0.72175825",
"0.72142696",
"0.7194264",
"0.7191973",
"0.71904784",
"0.7187057",
"0.71805984",
"0.71773285",
"0.7152173",
"0.71323615",
"0.71323615",
"0.7112995",
"0.7112441",
"0.71048164",
"0.7101511",
"0.7073902",
"0.7070519",
"0.7053274",
"0.7052716",
"0.70208836",
"0.7014363",
"0.7013419",
"0.7012798",
"0.70041424",
"0.69940597",
"0.6993078",
"0.6992705",
"0.6979322",
"0.69583833",
"0.6947809",
"0.6946893",
"0.6943898",
"0.6941179",
"0.69371974",
"0.6930336",
"0.69186074",
"0.6916704",
"0.69159395",
"0.69153565",
"0.691423",
"0.6896961",
"0.688166",
"0.6871541",
"0.6856011",
"0.683641",
"0.6826875",
"0.68230546",
"0.68046427",
"0.6804135",
"0.68009394",
"0.678966",
"0.67874885",
"0.6786319",
"0.67819357",
"0.67689365",
"0.676683",
"0.67648727",
"0.67608935"
] | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.